trunk/src/mame/drivers/srmp2.c
| r244754 | r244755 | |
| 94 | 94 | iox.protcheck[1] = 0x4c; iox.protlatch[1] = 0x00; |
| 95 | 95 | iox.protcheck[2] = 0x1c; iox.protlatch[2] = 0x04; |
| 96 | 96 | iox.protcheck[3] = 0x45; iox.protlatch[3] = 0x00; |
| 97 | |
| 98 | membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x8000, 0x2000); |
| 97 | 99 | } |
| 98 | 100 | |
| 99 | 101 | MACHINE_START_MEMBER(srmp2_state,rmgoldyh) |
| r244754 | r244755 | |
| 107 | 109 | iox.protcheck[1] = 0x45; iox.protlatch[1] = 0x00; |
| 108 | 110 | iox.protcheck[2] = -1; iox.protlatch[2] = -1; |
| 109 | 111 | iox.protcheck[3] = -1; iox.protlatch[3] = -1; |
| 112 | |
| 113 | membank("bank1")->configure_entries(0, 32, memregion("maincpu")->base() + 0x8000, 0x2000); |
| 110 | 114 | } |
| 111 | 115 | |
| 112 | 116 | /*************************************************************************** |
| r244754 | r244755 | |
| 349 | 353 | ---x xxxx : MAIN ROM bank |
| 350 | 354 | xxx- ---- : ADPCM ROM bank |
| 351 | 355 | */ |
| 352 | | |
| 353 | | UINT8 *ROM = memregion("maincpu")->base(); |
| 354 | | int addr; |
| 355 | | |
| 356 | 356 | m_adpcm_bank = ((data & 0xe0) >> 5); |
| 357 | 357 | |
| 358 | | if (data & 0x1f) addr = ((0x10000 + (0x2000 * (data & 0x0f))) - 0x8000); |
| 359 | | else addr = 0x10000; |
| 360 | | |
| 361 | | membank("bank1")->set_base(&ROM[addr]); |
| 358 | // TODO: Check this code (and the corresponding configure_entires), |
| 359 | // as it seems to be inconsistent with the notes at the head of this function |
| 360 | if (data & 0x1f) |
| 361 | membank("bank1")->set_entry(data & 0x0f); |
| 362 | else |
| 363 | membank("bank1")->set_entry(8); |
| 362 | 364 | } |
| 363 | 365 | |
| 364 | 366 | /************************************************************************** |
| r244754 | r244755 | |
| 499 | 501 | ---x xxxx : MAIN ROM bank |
| 500 | 502 | xxx- ---- : ADPCM ROM bank |
| 501 | 503 | */ |
| 502 | | |
| 503 | | UINT8 *ROM = memregion("maincpu")->base(); |
| 504 | | int addr; |
| 505 | | |
| 506 | 504 | m_adpcm_bank = ((data & 0xe0) >> 5); |
| 507 | 505 | |
| 508 | | if (data & 0x1f) addr = ((0x10000 + (0x2000 * (data & 0x1f))) - 0x8000); |
| 509 | | else addr = 0x10000; |
| 510 | | |
| 511 | | membank("bank1")->set_base(&ROM[addr]); |
| 506 | if (data & 0x1f) |
| 507 | membank("bank1")->set_entry(data & 0x1f); |
| 508 | else |
| 509 | membank("bank1")->set_entry(8); |
| 512 | 510 | } |
| 513 | 511 | |
| 514 | 512 | static ADDRESS_MAP_START( rmgoldyh_io_map, AS_IO, 8, srmp2_state ) |
trunk/src/mame/drivers/srmp5.c
| r244754 | r244755 | |
| 114 | 114 | DECLARE_READ8_MEMBER(cmd1_r); |
| 115 | 115 | DECLARE_READ8_MEMBER(cmd2_r); |
| 116 | 116 | DECLARE_READ8_MEMBER(cmd_stat8_r); |
| 117 | virtual void machine_start(); |
| 117 | 118 | DECLARE_DRIVER_INIT(srmp5); |
| 118 | 119 | UINT32 screen_update_srmp5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 119 | 120 | |
| r244754 | r244755 | |
| 237 | 238 | return 0; |
| 238 | 239 | } |
| 239 | 240 | |
| 241 | void srmp5_state::machine_start() |
| 242 | { |
| 243 | membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); |
| 244 | } |
| 245 | |
| 240 | 246 | WRITE32_MEMBER(srmp5_state::bank_w) |
| 241 | 247 | { |
| 242 | 248 | m_chrbank = ((data & 0xf0) >> 4) * (0x100000 / sizeof(UINT16)); |
| r244754 | r244755 | |
| 394 | 400 | // common rombank? should go in machine/st0016 with larger address space exposed? |
| 395 | 401 | WRITE8_MEMBER(srmp5_state::st0016_rom_bank_w) |
| 396 | 402 | { |
| 397 | | membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000)); |
| 403 | membank("bank1")->set_entry(data); |
| 398 | 404 | } |
| 399 | 405 | |
| 400 | 406 | |