diff --git a/orao/cpu.py b/orao/cpu.py index 3bb05bb..d9dba41 100755 --- a/orao/cpu.py +++ b/orao/cpu.py @@ -103,7 +103,7 @@ class CPU(object): self.memory[addr] = val & 0xFF for listener in self.store_mem_listeners: - listener(addr, val) + listener(addr, val, self) def stack_push(self, value): self.store_byte(256 + self.sp, value & 0xFF) diff --git a/orao/video.py b/orao/video.py index f7126ad..6bedc73 100644 --- a/orao/video.py +++ b/orao/video.py @@ -4,7 +4,7 @@ terminal = pygame.Surface((256, 256), pygame.SRCALPHA, depth=32) terminal.fill((255, 255, 255)) alphaarray = pygame.surfarray.pixels_alpha(terminal) -def mem_listener(addr, val): +def mem_listener(addr, val, cpu): if 0x6000 <= addr <= 0x7FFF: # Video RAM y, x = divmod((addr - 0x6000) * 8, 256) for i in range(8):