src/mess/devices/snapquik.h
| r1982 | r1983 | |
| 22 | 22 | MESS_DEVINFO_FLOAT_QUICKLOAD_DELAY = MESS_DEVINFO_FLOAT_DEV_SPECIFIC |
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | | typedef int (*snapquick_loadproc)(mess_image *image, const char *file_type, int file_size); |
| 25 | typedef int (*snapquick_loadproc)(running_machine *machine, mess_image *image, const char *file_type, int file_size); |
| 26 | 26 | |
| 27 | | #define SNAPSHOT_LOAD(name) int snapshot_load_##name(mess_image *image, const char *file_type, int snapshot_size) |
| 28 | | #define QUICKLOAD_LOAD(name) int quickload_load_##name(mess_image *image, const char *file_type, int quickload_size) |
| 27 | #define SNAPSHOT_LOAD(name) int snapshot_load_##name(running_machine *machine, mess_image *image, const char *file_type, int snapshot_size) |
| 28 | #define QUICKLOAD_LOAD(name) int quickload_load_##name(running_machine *machine, mess_image *image, const char *file_type, int quickload_size) |
| 29 | 29 | |
| 30 | 30 | void snapshot_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
| 31 | 31 | void quickload_device_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info); |
src/mess/machine/spectrum.c
| r1982 | r1983 | |
| 23 | 23 | |
| 24 | 24 | ***************************************************************************/ |
| 25 | 25 | |
| 26 | | #include <stdarg.h> |
| 27 | 26 | #include "driver.h" |
| 28 | | #include "deprecat.h" |
| 29 | 27 | #include "cpu/z80/z80.h" |
| 30 | 28 | #include "includes/spectrum.h" |
| 31 | 29 | #include "eventlst.h" |
| r1982 | r1983 | |
| 110 | 108 | logerror("Invalid .SNA file size.\n"); |
| 111 | 109 | goto error; |
| 112 | 110 | } |
| 113 | | spectrum_setup_sna(Machine, snapshot_data, snapshot_size); |
| 111 | spectrum_setup_sna(machine, snapshot_data, snapshot_size); |
| 114 | 112 | } |
| 115 | 113 | else if (!mame_stricmp(file_type, "sp")) |
| 116 | 114 | { |
| r1982 | r1983 | |
| 119 | 117 | logerror("Invalid .SP signature.\n"); |
| 120 | 118 | goto error; |
| 121 | 119 | } |
| 122 | | spectrum_setup_sp(Machine, snapshot_data, snapshot_size); |
| 120 | spectrum_setup_sp(machine, snapshot_data, snapshot_size); |
| 123 | 121 | } |
| 124 | 122 | else |
| 125 | 123 | { |
| 126 | | spectrum_setup_z80(Machine, snapshot_data, snapshot_size); |
| 124 | spectrum_setup_z80(machine, snapshot_data, snapshot_size); |
| 127 | 125 | } |
| 128 | 126 | free(snapshot_data); |
| 129 | 127 | logerror("Snapshot loaded - new PC = %04x\n", (unsigned) cpunum_get_reg(0, Z80_PC) & 0x0ffff); |
src/mess/machine/microtan.c
| r1982 | r1983 | |
| 800 | 800 | if (microtan_varify_snapshot(snapshot_buff, snapshot_size)==IMAGE_VERIFY_FAIL) |
| 801 | 801 | return INIT_FAIL; |
| 802 | 802 | |
| 803 | | microtan_snapshot_copy(Machine, snapshot_buff, snapshot_size); |
| 803 | microtan_snapshot_copy(machine, snapshot_buff, snapshot_size); |
| 804 | 804 | return INIT_PASS; |
| 805 | 805 | } |
| 806 | 806 | |
| r1982 | r1983 | |
| 835 | 835 | else |
| 836 | 836 | rc = parse_zillion_hex(snapshot_buff, buff); |
| 837 | 837 | if (rc == INIT_PASS) |
| 838 | | microtan_snapshot_copy(Machine, snapshot_buff, snapshot_size); |
| 838 | microtan_snapshot_copy(machine, snapshot_buff, snapshot_size); |
| 839 | 839 | free(snapshot_buff); |
| 840 | 840 | return rc; |
| 841 | 841 | } |
src/mess/machine/amstrad.c
| r1982 | r1983 | |
| 28 | 28 | #include "devices/snapquik.h" |
| 29 | 29 | #include "includes/amstrad.h" |
| 30 | 30 | #include "sound/ay8910.h" |
| 31 | | #include "deprecat.h" |
| 32 | 31 | |
| 33 | 32 | |
| 34 | 33 | void amstrad_setup_machine(running_machine *machine) |
| r1982 | r1983 | |
| 37 | 36 | } |
| 38 | 37 | |
| 39 | 38 | /* load CPCEMU style snapshots */ |
| 40 | | void amstrad_handle_snapshot(unsigned char *pSnapshot) |
| 39 | void amstrad_handle_snapshot(running_machine *machine, unsigned char *pSnapshot) |
| 41 | 40 | { |
| 42 | | running_machine *machine = Machine; |
| 43 | 41 | int RegData; |
| 44 | 42 | int i; |
| 45 | 43 | |
| r1982 | r1983 | |
| 195 | 193 | return INIT_FAIL; |
| 196 | 194 | } |
| 197 | 195 | |
| 198 | | amstrad_handle_snapshot(snapshot); |
| 196 | amstrad_handle_snapshot(machine, snapshot); |
| 199 | 197 | free(snapshot); |
| 200 | 198 | return INIT_PASS; |
| 201 | 199 | } |