diff options
author | Wilbert Pol <wilbert@jdg.info> | 2013-01-13 12:51:53 +0000 |
---|---|---|
committer | Wilbert Pol <wilbert@jdg.info> | 2013-01-13 12:51:53 +0000 |
commit | 0190f8a555b1a6d1500ae1929caa767e58c8d1d3 (patch) | |
tree | fa0ef670991ef153ea0f36fa71993add28789975 /src | |
parent | b56e1fdc6954b190fd59ac4cacbd2abf38f0bd2f (diff) |
(MESS)sms.c: The Gam*Boy II seems to a bit more strict address descoding; at least the mirrors for I/O ports 3E and 3F do not seem to exist there. Fixes bublboky from the software list. (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mess/drivers/sms.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c index 923baa23f83..07b58ed86eb 100644 --- a/src/mess/drivers/sms.c +++ b/src/mess/drivers/sms.c @@ -133,6 +133,33 @@ static ADDRESS_MAP_START( sms_io, AS_IO, 8, sms_state ) AM_RANGE(0xf9, 0xf9) AM_MIRROR(0x06) AM_READ(sms_input_port_1_r) ADDRESS_MAP_END +// It seems the Korean version does some more strict decoding on the I/O +// addresses. +// At least the mirrors for I/O ports $3E/$3F don't seem to exist there. +// Leaving the mirrors breaks the Korean cartridge bublboky. +static ADDRESS_MAP_START( sms_kor_io, AS_IO, 8, sms_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x3e, 0x3e) AM_WRITE(sms_bios_w) + AM_RANGE(0x3f, 0x3f) AM_WRITE(sms_io_control_w) + AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) + AM_RANGE(0x40, 0x7f) AM_DEVWRITE("segapsg", segapsg_device, write) + AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, vram_read, vram_write) + AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, register_read, register_write) + AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x1e) AM_READ(sms_input_port_0_r) + AM_RANGE(0xc1, 0xc1) AM_MIRROR(0x1e) AM_READ(sms_input_port_1_r) + AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0e) AM_READ(sms_input_port_0_r) + AM_RANGE(0xe1, 0xe1) AM_MIRROR(0x0e) AM_READ(sms_input_port_1_r) + AM_RANGE(0xf0, 0xf0) AM_READWRITE(sms_input_port_0_r, sms_ym2413_register_port_0_w) + AM_RANGE(0xf1, 0xf1) AM_READWRITE(sms_input_port_1_r, sms_ym2413_data_port_0_w) + AM_RANGE(0xf2, 0xf2) AM_READWRITE(sms_fm_detect_r, sms_fm_detect_w) + AM_RANGE(0xf3, 0xf3) AM_READ(sms_input_port_1_r) + AM_RANGE(0xf4, 0xf4) AM_MIRROR(0x02) AM_READ(sms_input_port_0_r) + AM_RANGE(0xf5, 0xf5) AM_MIRROR(0x02) AM_READ(sms_input_port_1_r) + AM_RANGE(0xf8, 0xf8) AM_MIRROR(0x06) AM_READ(sms_input_port_0_r) + AM_RANGE(0xf9, 0xf9) AM_MIRROR(0x06) AM_READ(sms_input_port_1_r) +ADDRESS_MAP_END + static ADDRESS_MAP_START( gg_io, AS_IO, 8, sms_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) ADDRESS_MAP_UNMAP_HIGH @@ -569,6 +596,8 @@ static MACHINE_CONFIG_DERIVED( sg1000m3, sms_fm ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( sms2_fm, sms2_ntsc ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_IO_MAP(sms_kor_io) MCFG_SOUND_ADD("ym2413", YM2413, XTAL_53_693175MHz/15) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |