1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-07-15 11:28:58 +00:00
This commit is contained in:
Stephen Crane 2014-10-31 17:44:37 +00:00
parent 848a91c68c
commit e0633e6450
2 changed files with 5 additions and 10 deletions

View File

@ -44,11 +44,8 @@ void hardware_checkpoint(Stream &s) {
unsigned ds = 0;
for (unsigned i = 0; i < 0x10000; i += ds) {
Memory::Device *dev = memory.get(i);
if (dev) {
dev->checkpoint(s);
ds = dev->pages() * Memory::page_size;
} else
ds = Memory::page_size;
dev->checkpoint(s);
ds = dev->pages() * Memory::page_size;
}
_cpu->checkpoint(s);
}
@ -57,11 +54,8 @@ void hardware_restore(Stream &s) {
unsigned ds = 0;
for (unsigned i = 0; i < 0x10000; i += ds) {
Memory::Device *dev = memory.get(i);
if (dev) {
dev->restore(s);
ds = dev->pages() * Memory::page_size;
} else
ds = Memory::page_size;
dev->restore(s);
ds = dev->pages() * Memory::page_size;
}
_cpu->restore(s);
}

View File

@ -19,4 +19,5 @@ public:
void Memory::begin() {
put(nd, 0);
nd._pages = 1; // hack for checkpointing
}