diff options
Diffstat (limited to 'src/devices/bus/neogeo/sbp.cpp')
-rw-r--r-- | src/devices/bus/neogeo/sbp.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/devices/bus/neogeo/sbp.cpp b/src/devices/bus/neogeo/sbp.cpp index 6b6920cb5e8..b778230fb19 100644 --- a/src/devices/bus/neogeo/sbp.cpp +++ b/src/devices/bus/neogeo/sbp.cpp @@ -8,6 +8,11 @@ Note: since protection here involves accesses to ROM, we include the scrambling in this file rather than in a separate prot_* source + TODO: + - level token counter on the right stays stuck after finishing level 1 (internal token + counter still works, so you can still progress) + - any other protection checks later on? + ***********************************************************************************************************/ @@ -22,6 +27,10 @@ neogeo_sbp_cart_device::neogeo_sbp_cart_device(const machine_config &mconfig, co } +//------------------------------------------------- +// mapper specific start/reset +//------------------------------------------------- + void neogeo_sbp_cart_device::device_start() { } @@ -31,12 +40,15 @@ void neogeo_sbp_cart_device::device_reset() } +//------------------------------------------------- +// protection +//------------------------------------------------- -READ16_MEMBER( neogeo_sbp_cart_device::protection_r ) +uint16_t neogeo_sbp_cart_device::protection_r(address_space &space, offs_t offset) { uint16_t* rom = (get_rom_size()) ? get_rom_base() : get_region_rom_base(); uint16_t origdata = rom[offset + (0x200/2)]; - uint16_t data = bitswap<16>(origdata, 11,10,9,8,15,14,13,12,3,2,1,0,7,6,5,4); + uint16_t data = bitswap<16>(origdata, 11,10,9,8,15,14,13,12,3,2,1,0,7,6,5,4); int realoffset = 0x200 + (offset * 2); logerror("sbp_lowerrom_r offset %08x data %04x\n", realoffset, data); @@ -49,13 +61,12 @@ READ16_MEMBER( neogeo_sbp_cart_device::protection_r ) } -WRITE16_MEMBER( neogeo_sbp_cart_device::protection_w ) +void neogeo_sbp_cart_device::protection_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int realoffset = 0x200 + (offset * 2); // the actual data written is just pulled from the end of the rom, and unused space - // maybe this is just some kind of watchdog for the protection device and it doesn't - // matter? + // maybe this is just some kind of watchdog for the protection device and it doesn't matter? if (realoffset == 0x1080) { if (data == 0x4e75) @@ -74,12 +85,16 @@ WRITE16_MEMBER( neogeo_sbp_cart_device::protection_w ) void neogeo_sbp_cart_device::patch(uint8_t* cpurom, uint32_t cpurom_size) { - /* the game code clears the text overlay used ingame immediately after writing it.. why? protection? sloppy code that the hw ignores? imperfect emulation? */ uint16_t* rom = (uint16_t*)cpurom; + // the game code clears the text overlay used ingame immediately after writing it.. + // why? protection? sloppy code that the hw ignores? imperfect emulation? rom[0x2a6f8/2] = 0x4e71; rom[0x2a6fa/2] = 0x4e71; rom[0x2a6fc/2] = 0x4e71; + + // enable joystick inputs + rom[0x3ff2d/2] = 0x7001; } void neogeo_sbp_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) |