summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/m68000
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-02-08 06:48:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-02-08 06:48:39 +0000
commit4f7efb1ca4bcf00edd9e519167367f44d797186c (patch)
treec9ee8aae0bc80942f118df4df24d9054504b9ad9 /src/emu/cpu/m68000
parentf4f3adf2506ce7808363593436de5b13bb304d47 (diff)
Moved the state saving system to C++. For now the registration macros
are still intact. The new state_manager class has templatized methods for saving the various types, and through template specialization can save more complex system types cleanly (like bitmaps and attotimes). Added new mechanism to detect proper state save types. This is much more strict and there will likely be some games/devices that fatalerror at startup until they are remedied. Spot checking has caught the more common situations. The new state_manager is embedded directly in the running_machine, allowing objects to register state saving in their constructors now. Added NAME() macro which is a generalization of FUNC() and can be used to wrap variables that are registered when directly using the new methods as opposed to the previous macros. For example: machine->state().save_item(NAME(global_item)) Added methods in the device_t class that implicitly register state against the current device, making for a cleaner interface. Just a couple of required regexes for now: state_save_register_postload( *)\(( *)([^,;]+), * \3->state().register_postload\1\(\2 state_save_register_presave( *)\(( *)([^,;]+), * \3->state().register_presave\1\(\2
Diffstat (limited to 'src/emu/cpu/m68000')
-rw-r--r--src/emu/cpu/m68000/m68kcpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c
index 4738f23dd37..2dbbc94fbc1 100644
--- a/src/emu/cpu/m68000/m68kcpu.c
+++ b/src/emu/cpu/m68000/m68kcpu.c
@@ -769,8 +769,8 @@ static CPU_INIT( m68k )
state_save_register_device_item(device, 0, m68k->save_halted);
state_save_register_device_item(device, 0, m68k->pref_addr);
state_save_register_device_item(device, 0, m68k->pref_data);
- state_save_register_presave(device->machine, m68k_presave, m68k);
- state_save_register_postload(device->machine, m68k_postload, m68k);
+ device->machine->state().register_presave(m68k_presave, m68k);
+ device->machine->state().register_postload(m68k_postload, m68k);
}
/* Pulse the RESET line on the CPU */