X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=pico%2Fcarthw%2Fcarthw.c;h=2fed822024e73b41a7035db733f4e382c7bd7b49;hb=8fde2033ac268ee9fe198f5d1c9d0b964f2763ab;hp=41dc6bd8e8438803eefed4fdccaa94cfb0149fc5;hpb=310d973b9e4f25c0359d5a489d6c061ea989a92a;p=picodrive.git diff --git a/pico/carthw/carthw.c b/pico/carthw/carthw.c index 41dc6bd..2fed822 100644 --- a/pico/carthw/carthw.c +++ b/pico/carthw/carthw.c @@ -31,11 +31,11 @@ static carthw_state_chunk carthw_ssf2_state[] = { 0, 0, NULL } }; -static void carthw_ssf2_write8(u32 a, u32 d) +void carthw_ssf2_write8(u32 a, u32 d) { u32 target, base; - if ((a & 0xfffff0) != 0xa130f0) { + if ((a & ~0x0e) != 0xa130f1) { PicoWrite8_io(a, d); return; } @@ -54,13 +54,19 @@ static void carthw_ssf2_write8(u32 a, u32 d) cpu68k_map_set(m68k_read8_map, target, target + 0x80000 - 1, Pico.rom + base, 0); cpu68k_map_set(m68k_read16_map, target, target + 0x80000 - 1, Pico.rom + base, 0); - if (PicoIn.AHW & PAHW_32X) - p32x_update_banks(); +} + +void carthw_ssf2_write16(u32 a, u32 d) +{ + PicoWrite16_io(a, d); + if ((a & ~0x0f) == 0xa130f0) + carthw_ssf2_write8(a + 1, d); } static void carthw_ssf2_mem_setup(void) { - cpu68k_map_set(m68k_write8_map, 0xa10000, 0xa1ffff, carthw_ssf2_write8, 1); + cpu68k_map_set(m68k_write8_map, 0xa10000, 0xa1ffff, carthw_ssf2_write8, 1); + cpu68k_map_set(m68k_write16_map, 0xa10000, 0xa1ffff, carthw_ssf2_write16, 1); } static void carthw_ssf2_statef(void)