diff options
Diffstat (limited to 'src/mame/drivers/mil4000.cpp')
-rw-r--r-- | src/mame/drivers/mil4000.cpp | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/src/mame/drivers/mil4000.cpp b/src/mame/drivers/mil4000.cpp index c2c8fe97767..1474af7f647 100644 --- a/src/mame/drivers/mil4000.cpp +++ b/src/mame/drivers/mil4000.cpp @@ -425,48 +425,50 @@ WRITE16_MEMBER(mil4000_state::unk_w) } -ADDRESS_MAP_START(mil4000_state::mil4000_map) - AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x500000, 0x503fff) AM_RAM_WRITE(sc0_vram_w) AM_SHARE("sc0_vram") // CY62256L-70, U77 - AM_RANGE(0x504000, 0x507fff) AM_RAM_WRITE(sc1_vram_w) AM_SHARE("sc1_vram") // CY62256L-70, U77 - AM_RANGE(0x508000, 0x50bfff) AM_RAM_WRITE(sc2_vram_w) AM_SHARE("sc2_vram") // CY62256L-70, U78 - AM_RANGE(0x50c000, 0x50ffff) AM_RAM_WRITE(sc3_vram_w) AM_SHARE("sc3_vram") // CY62256L-70, U78 - AM_RANGE(0x708000, 0x708001) AM_READ_PORT("IN0") - AM_RANGE(0x708002, 0x708003) AM_READ_PORT("IN1") - AM_RANGE(0x708004, 0x708005) AM_READ(hvretrace_r) - AM_RANGE(0x708006, 0x708007) AM_READ_PORT("IN2") - AM_RANGE(0x708008, 0x708009) AM_WRITE(output_w) - AM_RANGE(0x708010, 0x708011) AM_NOP //touch screen - AM_RANGE(0x70801e, 0x70801f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) - - AM_RANGE(0x780000, 0x780fff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette") - AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("nvram") // 2x CY62256L-70 (U7 & U8). - -ADDRESS_MAP_END - -ADDRESS_MAP_START(mil4000_state::chewheel_map) - AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x500000, 0x503fff) AM_RAM_WRITE(sc0_vram_w) AM_SHARE("sc0_vram") // V62C518256L-35P (U7). - AM_RANGE(0x504000, 0x507fff) AM_RAM_WRITE(sc1_vram_w) AM_SHARE("sc1_vram") // V62C518256L-35P (U7). - AM_RANGE(0x508000, 0x50bfff) AM_RAM_WRITE(sc2_vram_w) AM_SHARE("sc2_vram") // V62C518256L-35P (U8). - AM_RANGE(0x50c000, 0x50ffff) AM_RAM_WRITE(sc3_vram_w) AM_SHARE("sc3_vram") // V62C518256L-35P (U8). - - AM_RANGE(0x51000c, 0x51000f) AM_READ(unk_r) // no idea what's mapped here. - AM_RANGE(0x510000, 0x51000f) AM_WRITE(unk_w) // no idea what's mapped here. - - AM_RANGE(0x708000, 0x708001) AM_READ_PORT("IN0") - AM_RANGE(0x708002, 0x708003) AM_READ_PORT("IN1") - AM_RANGE(0x708004, 0x708005) AM_READ(hvretrace_r) - AM_RANGE(0x708006, 0x708007) AM_READ_PORT("IN2") - AM_RANGE(0x708008, 0x708009) AM_WRITE(output_w) - AM_RANGE(0x708010, 0x708011) AM_READWRITE(chewheel_mcu_r, chewheel_mcu_w) - AM_RANGE(0x70801e, 0x70801f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) - - AM_RANGE(0x780000, 0x780fff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette") - AM_RANGE(0xff0000, 0xff3fff) AM_RAM AM_SHARE("nvram") // V62C51864L-70P (U77). - AM_RANGE(0xffc000, 0xffffff) AM_RAM // V62C51864L-70P (U78). - -ADDRESS_MAP_END +void mil4000_state::mil4000_map(address_map &map) +{ + map(0x000000, 0x03ffff).rom(); + map(0x500000, 0x503fff).ram().w(this, FUNC(mil4000_state::sc0_vram_w)).share("sc0_vram"); // CY62256L-70, U77 + map(0x504000, 0x507fff).ram().w(this, FUNC(mil4000_state::sc1_vram_w)).share("sc1_vram"); // CY62256L-70, U77 + map(0x508000, 0x50bfff).ram().w(this, FUNC(mil4000_state::sc2_vram_w)).share("sc2_vram"); // CY62256L-70, U78 + map(0x50c000, 0x50ffff).ram().w(this, FUNC(mil4000_state::sc3_vram_w)).share("sc3_vram"); // CY62256L-70, U78 + map(0x708000, 0x708001).portr("IN0"); + map(0x708002, 0x708003).portr("IN1"); + map(0x708004, 0x708005).r(this, FUNC(mil4000_state::hvretrace_r)); + map(0x708006, 0x708007).portr("IN2"); + map(0x708008, 0x708009).w(this, FUNC(mil4000_state::output_w)); + map(0x708010, 0x708011).noprw(); //touch screen + map(0x70801f, 0x70801f).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); + + map(0x780000, 0x780fff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); + map(0xff0000, 0xffffff).ram().share("nvram"); // 2x CY62256L-70 (U7 & U8). + +} + +void mil4000_state::chewheel_map(address_map &map) +{ + map(0x000000, 0x03ffff).rom(); + map(0x500000, 0x503fff).ram().w(this, FUNC(mil4000_state::sc0_vram_w)).share("sc0_vram"); // V62C518256L-35P (U7). + map(0x504000, 0x507fff).ram().w(this, FUNC(mil4000_state::sc1_vram_w)).share("sc1_vram"); // V62C518256L-35P (U7). + map(0x508000, 0x50bfff).ram().w(this, FUNC(mil4000_state::sc2_vram_w)).share("sc2_vram"); // V62C518256L-35P (U8). + map(0x50c000, 0x50ffff).ram().w(this, FUNC(mil4000_state::sc3_vram_w)).share("sc3_vram"); // V62C518256L-35P (U8). + + map(0x51000c, 0x51000f).r(this, FUNC(mil4000_state::unk_r)); // no idea what's mapped here. + map(0x510000, 0x51000f).w(this, FUNC(mil4000_state::unk_w)); // no idea what's mapped here. + + map(0x708000, 0x708001).portr("IN0"); + map(0x708002, 0x708003).portr("IN1"); + map(0x708004, 0x708005).r(this, FUNC(mil4000_state::hvretrace_r)); + map(0x708006, 0x708007).portr("IN2"); + map(0x708008, 0x708009).w(this, FUNC(mil4000_state::output_w)); + map(0x708010, 0x708011).rw(this, FUNC(mil4000_state::chewheel_mcu_r), FUNC(mil4000_state::chewheel_mcu_w)); + map(0x70801f, 0x70801f).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); + + map(0x780000, 0x780fff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); + map(0xff0000, 0xff3fff).ram().share("nvram"); // V62C51864L-70P (U77). + map(0xffc000, 0xffffff).ram(); // V62C51864L-70P (U78). + +} static INPUT_PORTS_START( mil4000 ) PORT_START("IN0") |