diff options
Diffstat (limited to 'src/mame/drivers/pc100.cpp')
-rw-r--r-- | src/mame/drivers/pc100.cpp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/mame/drivers/pc100.cpp b/src/mame/drivers/pc100.cpp index bc977f862b6..33fb115091f 100644 --- a/src/mame/drivers/pc100.cpp +++ b/src/mame/drivers/pc100.cpp @@ -232,12 +232,13 @@ WRITE16_MEMBER( pc100_state::pc100_vram_w ) } } -ADDRESS_MAP_START(pc100_state::pc100_map) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000,0xbffff) AM_RAM // work ram - AM_RANGE(0xc0000,0xdffff) AM_READWRITE(pc100_vram_r,pc100_vram_w) // vram, blitter based! - AM_RANGE(0xf8000,0xfffff) AM_ROM AM_REGION("ipl", 0) -ADDRESS_MAP_END +void pc100_state::pc100_map(address_map &map) +{ + map.unmap_value_high(); + map(0x00000, 0xbffff).ram(); // work ram + map(0xc0000, 0xdffff).rw(this, FUNC(pc100_state::pc100_vram_r), FUNC(pc100_state::pc100_vram_w)); // vram, blitter based! + map(0xf8000, 0xfffff).rom().region("ipl", 0); +} READ16_MEMBER( pc100_state::pc100_kanji_r ) { @@ -312,28 +313,29 @@ WRITE8_MEMBER( pc100_state::pc100_crtc_data_w ) /* everything is 8-bit bus wide */ -ADDRESS_MAP_START(pc100_state::pc100_io) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x03) AM_DEVREADWRITE8("pic8259", pic8259_device, read, write, 0x00ff) // i8259 +void pc100_state::pc100_io(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x03).rw("pic8259", FUNC(pic8259_device::read), FUNC(pic8259_device::write)).umask16(0x00ff); // i8259 // AM_RANGE(0x04, 0x07) i8237? - AM_RANGE(0x08, 0x0b) AM_DEVICE8("upd765", upd765a_device, map, 0x00ff ) // upd765 - AM_RANGE(0x10, 0x17) AM_DEVREADWRITE8("ppi8255_1", i8255_device, read, write,0x00ff) // i8255 #1 - AM_RANGE(0x18, 0x1f) AM_DEVREADWRITE8("ppi8255_2", i8255_device, read, write,0x00ff) // i8255 #2 - AM_RANGE(0x20, 0x23) AM_READ8(pc100_key_r,0x00ff) //i/o, keyboard, mouse - AM_RANGE(0x22, 0x23) AM_WRITE8(pc100_output_w,0x00ff) //i/o, keyboard, mouse - AM_RANGE(0x24, 0x25) AM_WRITE8(pc100_tc_w,0x00ff) //i/o, keyboard, mouse - AM_RANGE(0x28, 0x29) AM_DEVREADWRITE8("uart8251", i8251_device, data_r, data_w, 0x00ff) - AM_RANGE(0x2a, 0x2b) AM_DEVREADWRITE8("uart8251", i8251_device, status_r, control_w, 0x00ff) - AM_RANGE(0x30, 0x31) AM_READWRITE8(pc100_shift_r,pc100_shift_w,0x00ff) // crtc shift - AM_RANGE(0x38, 0x39) AM_WRITE8(pc100_crtc_addr_w,0x00ff) //crtc address reg - AM_RANGE(0x3a, 0x3b) AM_WRITE8(pc100_crtc_data_w,0x00ff) //crtc data reg - AM_RANGE(0x3c, 0x3f) AM_READWRITE8(pc100_vs_vreg_r,pc100_vs_vreg_w,0x00ff) //crtc vertical start position - AM_RANGE(0x40, 0x5f) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette") + map(0x08, 0x0b).m(m_fdc, FUNC(upd765a_device::map)).umask16(0x00ff); // upd765 + map(0x10, 0x17).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff); // i8255 #1 + map(0x18, 0x1f).rw("ppi8255_2", FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff); // i8255 #2 + map(0x20, 0x23).r(this, FUNC(pc100_state::pc100_key_r)).umask16(0x00ff); //i/o, keyboard, mouse + map(0x22, 0x22).w(this, FUNC(pc100_state::pc100_output_w)); //i/o, keyboard, mouse + map(0x24, 0x24).w(this, FUNC(pc100_state::pc100_tc_w)); //i/o, keyboard, mouse + map(0x28, 0x28).rw("uart8251", FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x2a, 0x2a).rw("uart8251", FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x30, 0x30).rw(this, FUNC(pc100_state::pc100_shift_r), FUNC(pc100_state::pc100_shift_w)); // crtc shift + map(0x38, 0x38).w(this, FUNC(pc100_state::pc100_crtc_addr_w)); //crtc address reg + map(0x3a, 0x3a).w(this, FUNC(pc100_state::pc100_crtc_data_w)); //crtc data reg + map(0x3c, 0x3f).rw(this, FUNC(pc100_state::pc100_vs_vreg_r), FUNC(pc100_state::pc100_vs_vreg_w)).umask16(0x00ff); //crtc vertical start position + map(0x40, 0x5f).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // AM_RANGE(0x60, 0x61) crtc command (16-bit wide) - AM_RANGE(0x80, 0x81) AM_READWRITE(pc100_kanji_r,pc100_kanji_w) - AM_RANGE(0x82, 0x83) AM_WRITENOP //kanji-related? - AM_RANGE(0x84, 0x87) AM_WRITENOP //kanji "strobe" signal 0/1 -ADDRESS_MAP_END + map(0x80, 0x81).rw(this, FUNC(pc100_state::pc100_kanji_r), FUNC(pc100_state::pc100_kanji_w)); + map(0x82, 0x83).nopw(); //kanji-related? + map(0x84, 0x87).nopw(); //kanji "strobe" signal 0/1 +} /* Input ports */ |