mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-26 14:29:31 +00:00
cleanup
This commit is contained in:
parent
848a91c68c
commit
e0633e6450
14
hardware.cpp
14
hardware.cpp
@ -44,11 +44,8 @@ void hardware_checkpoint(Stream &s) {
|
|||||||
unsigned ds = 0;
|
unsigned ds = 0;
|
||||||
for (unsigned i = 0; i < 0x10000; i += ds) {
|
for (unsigned i = 0; i < 0x10000; i += ds) {
|
||||||
Memory::Device *dev = memory.get(i);
|
Memory::Device *dev = memory.get(i);
|
||||||
if (dev) {
|
dev->checkpoint(s);
|
||||||
dev->checkpoint(s);
|
ds = dev->pages() * Memory::page_size;
|
||||||
ds = dev->pages() * Memory::page_size;
|
|
||||||
} else
|
|
||||||
ds = Memory::page_size;
|
|
||||||
}
|
}
|
||||||
_cpu->checkpoint(s);
|
_cpu->checkpoint(s);
|
||||||
}
|
}
|
||||||
@ -57,11 +54,8 @@ void hardware_restore(Stream &s) {
|
|||||||
unsigned ds = 0;
|
unsigned ds = 0;
|
||||||
for (unsigned i = 0; i < 0x10000; i += ds) {
|
for (unsigned i = 0; i < 0x10000; i += ds) {
|
||||||
Memory::Device *dev = memory.get(i);
|
Memory::Device *dev = memory.get(i);
|
||||||
if (dev) {
|
dev->restore(s);
|
||||||
dev->restore(s);
|
ds = dev->pages() * Memory::page_size;
|
||||||
ds = dev->pages() * Memory::page_size;
|
|
||||||
} else
|
|
||||||
ds = Memory::page_size;
|
|
||||||
}
|
}
|
||||||
_cpu->restore(s);
|
_cpu->restore(s);
|
||||||
}
|
}
|
||||||
|
@ -19,4 +19,5 @@ public:
|
|||||||
|
|
||||||
void Memory::begin() {
|
void Memory::begin() {
|
||||||
put(nd, 0);
|
put(nd, 0);
|
||||||
|
nd._pages = 1; // hack for checkpointing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user