diff options
Diffstat (limited to 'src/mame/drivers/bingoc.cpp')
-rw-r--r-- | src/mame/drivers/bingoc.cpp | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/src/mame/drivers/bingoc.cpp b/src/mame/drivers/bingoc.cpp index 30377225a85..c3f9ee3e7b6 100644 --- a/src/mame/drivers/bingoc.cpp +++ b/src/mame/drivers/bingoc.cpp @@ -124,47 +124,50 @@ WRITE8_MEMBER(bingoc_state::sound_play_w) // printf("%02x\n",data); } -ADDRESS_MAP_START(bingoc_state::main_map) - AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x100000, 0x100001) AM_DEVREADWRITE8("uart1", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8("uart1", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100008, 0x100009) AM_DEVREADWRITE8("uart2", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x10000a, 0x10000b) AM_DEVREADWRITE8("uart2", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100010, 0x100011) AM_DEVREADWRITE8("uart3", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x100012, 0x100013) AM_DEVREADWRITE8("uart3", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100018, 0x100019) AM_DEVREADWRITE8("uart4", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x10001a, 0x10001b) AM_DEVREADWRITE8("uart4", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100020, 0x100021) AM_DEVREADWRITE8("uart5", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x100022, 0x100023) AM_DEVREADWRITE8("uart5", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100028, 0x100029) AM_DEVREADWRITE8("uart6", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x10002a, 0x10002b) AM_DEVREADWRITE8("uart6", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100030, 0x100031) AM_DEVREADWRITE8("uart7", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x100032, 0x100033) AM_DEVREADWRITE8("uart7", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x100038, 0x100039) AM_DEVREADWRITE8("uart8", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x10003a, 0x10003b) AM_DEVREADWRITE8("uart8", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x180000, 0x18007f) AM_READ(unknown_r) //lamps? +void bingoc_state::main_map(address_map &map) +{ + map(0x000000, 0x03ffff).rom(); + map(0x100001, 0x100001).rw("uart1", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x100003, 0x100003).rw("uart1", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100009, 0x100009).rw("uart2", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x10000b, 0x10000b).rw("uart2", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100011, 0x100011).rw("uart3", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x100013, 0x100013).rw("uart3", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100019, 0x100019).rw("uart4", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x10001b, 0x10001b).rw("uart4", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100021, 0x100021).rw("uart5", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x100023, 0x100023).rw("uart5", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100029, 0x100029).rw("uart6", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x10002b, 0x10002b).rw("uart6", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100031, 0x100031).rw("uart7", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x100033, 0x100033).rw("uart7", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x100039, 0x100039).rw("uart8", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x10003b, 0x10003b).rw("uart8", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x180000, 0x18007f).r(this, FUNC(bingoc_state::unknown_r)); //lamps? #if !SOUND_TEST - AM_RANGE(0x180010, 0x180011) AM_WRITE(main_sound_latch_w) //WRONG there... + map(0x180010, 0x180011).w(this, FUNC(bingoc_state::main_sound_latch_w)); //WRONG there... #endif - AM_RANGE(0xff8000, 0xffffff) AM_RAM -ADDRESS_MAP_END - -ADDRESS_MAP_START(bingoc_state::sound_map) - AM_RANGE(0x0000, 0x4fff) AM_ROM - AM_RANGE(0xf800, 0xffff) AM_RAM -ADDRESS_MAP_END - -ADDRESS_MAP_START(bingoc_state::sound_io) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write) - AM_RANGE(0x40, 0x40) AM_WRITE(sound_play_w) - AM_RANGE(0x80, 0x80) AM_DEVWRITE("upd", upd7759_device, port_w) + map(0xff8000, 0xffffff).ram(); +} + +void bingoc_state::sound_map(address_map &map) +{ + map(0x0000, 0x4fff).rom(); + map(0xf800, 0xffff).ram(); +} + +void bingoc_state::sound_io(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x01).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); + map(0x40, 0x40).w(this, FUNC(bingoc_state::sound_play_w)); + map(0x80, 0x80).w(m_upd7759, FUNC(upd7759_device::port_w)); #if !SOUND_TEST - AM_RANGE(0xc0, 0xc0) AM_DEVREAD("soundlatch", generic_latch_8_device, read) + map(0xc0, 0xc0).r(m_soundlatch, FUNC(generic_latch_8_device::read)); #else - AM_RANGE(0xc0, 0xc0) AM_READ(sound_test_r) + map(0xc0, 0xc0).r(this, FUNC(bingoc_state::sound_test_r)); #endif -ADDRESS_MAP_END +} static INPUT_PORTS_START( bingoc ) |