src/mess/machine/mtx.c
| r1596 | r1597 | |
| 76 | 76 | |
| 77 | 77 | SNAPSHOT_LOAD( mtx )
|
| 78 | 78 | {
|
| 79 | | return INIT_FAIL;
|
| 79 | UINT8 header[18];
|
| 80 | UINT16 sys_addr;
|
| 81 |
|
| 82 | /* get the header */
|
| 83 | image_fread(image, &header, sizeof(header));
|
| 84 | |
| 85 | if (header[0] == 0xff)
|
| 86 | {
|
| 87 | /* long header */
|
| 88 | sys_addr = pick_integer_le(header, 16, 2);
|
| 89 | image_fread(image, mtx_ram + (sys_addr - 0xc000), 599);
|
| 90 | image_fread(image, mtx_ram, snapshot_size - 599 - 18);
|
| 91 | }
|
| 92 | else
|
| 93 | {
|
| 94 | /* short header */
|
| 95 | sys_addr = pick_integer_le(header, 0, 2);
|
| 96 | image_fseek(image, 4, SEEK_SET);
|
| 97 | image_fread(image, mtx_ram + (sys_addr - 0xc000), 599);
|
| 98 | image_fread(image, mtx_ram, snapshot_size - 599 - 4);
|
| 99 | }
|
| 100 |
|
| 101 | return INIT_PASS;
|
| 80 | 102 | }
|
| 81 | 103 | |
| 82 | 104 | |
src/mess/drivers/mtx.c
| r1596 | r1597 | |
| 35 | 35 | |
| 36 | 36 | /************************************* |
| 37 | 37 | * |
| 38 | * Global variables |
| 39 | * |
| 40 | *************************************/ |
| 41 | |
| 42 | UINT8 *mtx_ram; |
| 43 | |
| 44 | |
| 45 | |
| 46 | /************************************* |
| 47 | * |
| 38 | 48 | * Memory maps |
| 39 | 49 | * |
| 40 | 50 | *************************************/ |
| r1596 | r1597 | |
| 44 | 54 | AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(2) |
| 45 | 55 | AM_RANGE(0x4000, 0x7fff) AM_RAMBANK(3) |
| 46 | 56 | AM_RANGE(0x8000, 0xbfff) AM_RAMBANK(4) |
| 47 | | AM_RANGE(0xc000, 0xffff) AM_RAM |
| 57 | AM_RANGE(0xc000, 0xffff) AM_RAM AM_BASE(&mtx_ram) |
| 48 | 58 | ADDRESS_MAP_END |
| 49 | 59 | |
| 50 | 60 | |