diff options
author | 2018-04-21 13:26:02 +0200 | |
---|---|---|
committer | 2018-04-21 13:27:17 +0200 | |
commit | b44fe96e40b3ba347682979832d1d7b50627f668 (patch) | |
tree | d3f5b9dd6364c253fc7646ce6c1192354bed5894 /src/devices/bus/snes/sgb.cpp | |
parent | 9a35d98c6e223bfa3c2702af5b9388855eddfcd4 (diff) |
maps: Finish devices/bus (nw)
That's it for ADDRESS_MAP_START. Please don't try to remove the
macros yet, let's wait for a full release before that so that the
forks can catch up.
Diffstat (limited to 'src/devices/bus/snes/sgb.cpp')
-rw-r--r-- | src/devices/bus/snes/sgb.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/devices/bus/snes/sgb.cpp b/src/devices/bus/snes/sgb.cpp index 710ac885d3e..d668e96b45b 100644 --- a/src/devices/bus/snes/sgb.cpp +++ b/src/devices/bus/snes/sgb.cpp @@ -129,22 +129,23 @@ WRITE8_MEMBER(sns_rom_sgb_device::gb_ie_w) -ADDRESS_MAP_START(sns_rom_sgb_device::supergb_map) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x7fff) AM_READWRITE(gb_cart_r, gb_bank_w) - AM_RANGE(0x8000, 0x9fff) AM_DEVREADWRITE("sgb_ppu", sgb_ppu_device, vram_r, vram_w) /* 8k VRAM */ - AM_RANGE(0xa000, 0xbfff) AM_READWRITE(gb_ram_r, gb_ram_w ) /* 8k switched RAM bank (cartridge) */ - AM_RANGE(0xc000, 0xdfff) AM_RAM /* 8k low RAM */ - AM_RANGE(0xe000, 0xfdff) AM_READWRITE(gb_echo_r, gb_echo_w) - AM_RANGE(0xfe00, 0xfeff) AM_DEVREADWRITE("sgb_ppu", sgb_ppu_device, oam_r, oam_w) /* OAM RAM */ - AM_RANGE(0xff00, 0xff0f) AM_READWRITE(gb_io_r, gb_io_w) /* I/O */ - AM_RANGE(0xff10, 0xff26) AM_DEVREADWRITE("sgb_apu", gameboy_sound_device, sound_r, sound_w) /* sound registers */ - AM_RANGE(0xff27, 0xff2f) AM_NOP /* unused */ - AM_RANGE(0xff30, 0xff3f) AM_DEVREADWRITE("sgb_apu", gameboy_sound_device, wave_r, wave_w) /* Wave RAM */ - AM_RANGE(0xff40, 0xff7f) AM_DEVREADWRITE("sgb_ppu", sgb_ppu_device, video_r, video_w) /* also disable bios?? */ /* Video controller & BIOS flip-flop */ - AM_RANGE(0xff80, 0xfffe) AM_RAM /* High RAM */ - AM_RANGE(0xffff, 0xffff) AM_READWRITE(gb_ie_r, gb_ie_w) /* Interrupt enable register */ -ADDRESS_MAP_END +void sns_rom_sgb_device::supergb_map(address_map &map) +{ + map.unmap_value_high(); + map(0x0000, 0x7fff).rw(this, FUNC(sns_rom_sgb_device::gb_cart_r), FUNC(sns_rom_sgb_device::gb_bank_w)); + map(0x8000, 0x9fff).rw("sgb_ppu", FUNC(sgb_ppu_device::vram_r), FUNC(sgb_ppu_device::vram_w)); /* 8k VRAM */ + map(0xa000, 0xbfff).rw(this, FUNC(sns_rom_sgb_device::gb_ram_r), FUNC(sns_rom_sgb_device::gb_ram_w)); /* 8k switched RAM bank (cartridge) */ + map(0xc000, 0xdfff).ram(); /* 8k low RAM */ + map(0xe000, 0xfdff).rw(this, FUNC(sns_rom_sgb_device::gb_echo_r), FUNC(sns_rom_sgb_device::gb_echo_w)); + map(0xfe00, 0xfeff).rw("sgb_ppu", FUNC(sgb_ppu_device::oam_r), FUNC(sgb_ppu_device::oam_w)); /* OAM RAM */ + map(0xff00, 0xff0f).rw(this, FUNC(sns_rom_sgb_device::gb_io_r), FUNC(sns_rom_sgb_device::gb_io_w)); /* I/O */ + map(0xff10, 0xff26).rw("sgb_apu", FUNC(gameboy_sound_device::sound_r), FUNC(gameboy_sound_device::sound_w)); /* sound registers */ + map(0xff27, 0xff2f).noprw(); /* unused */ + map(0xff30, 0xff3f).rw("sgb_apu", FUNC(gameboy_sound_device::wave_r), FUNC(gameboy_sound_device::wave_w)); /* Wave RAM */ + map(0xff40, 0xff7f).rw("sgb_ppu", FUNC(sgb_ppu_device::video_r), FUNC(sgb_ppu_device::video_w)); /* also disable bios?? */ /* Video controller & BIOS flip-flop */ + map(0xff80, 0xfffe).ram(); /* High RAM */ + map(0xffff, 0xffff).rw(this, FUNC(sns_rom_sgb_device::gb_ie_r), FUNC(sns_rom_sgb_device::gb_ie_w)); /* Interrupt enable register */ +} |