graceful shutdown if cpu core exits

This commit is contained in:
Greg Hewgill 2011-08-19 21:43:12 +12:00
parent 9f09818aa0
commit a673f8a4d4

View File

@ -386,6 +386,8 @@ class Apple2:
quit = False quit = False
while not quit: while not quit:
op = self.cpu.recv(8) op = self.cpu.recv(8)
if len(op) == 0:
break
cycle, rw, addr, val = struct.unpack("<IBHB", op) cycle, rw, addr, val = struct.unpack("<IBHB", op)
if rw == 0: if rw == 0:
self.cpu.send(chr(self.softswitches.read_byte(cycle, addr))) self.cpu.send(chr(self.softswitches.read_byte(cycle, addr)))