From 86a31bf6144ad203e73def8a629140651e8d633d Mon Sep 17 00:00:00 2001 From: "Carl.Kenner" Date: Thu, 9 Apr 2009 11:36:14 +0000 Subject: [PATCH] Rumble now works with some GBC games that didn't ship on rumble cartridges but still had rumble programmed into them by the developers. For example, Disney Tarzan. I have no idea which other games support this. Disney Tarzan will rumble when a wild boar is charging and with Clayton and some other things. http://au.gameboy.ign.com/articles/068/068800p1.html --- source/ngc/gameinput.cpp | 4 ++-- source/vba/gb/gbMemory.cpp | 6 +++++- vba-wii.pnproj | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/ngc/gameinput.cpp b/source/ngc/gameinput.cpp index a67f766..5ec12df 100644 --- a/source/ngc/gameinput.cpp +++ b/source/ngc/gameinput.cpp @@ -30,9 +30,9 @@ #include "gba/bios.h" #include "gba/GBAinline.h" -char DebugStr[50] = ""; +/*char DebugStr[50] = ""; -/*void DebugPrintf(const char *format, ...) { +void DebugPrintf(const char *format, ...) { va_list args; va_start( args, format ); vsprintf( DebugStr, format, args ); diff --git a/source/vba/gb/gbMemory.cpp b/source/vba/gb/gbMemory.cpp index 3c508e6..aed86d5 100644 --- a/source/vba/gb/gbMemory.cpp +++ b/source/vba/gb/gbMemory.cpp @@ -582,7 +582,11 @@ void mapperMBC5ROM(u16 address, u8 value) } break; case 0x4000: // RAM bank select, plus rumble - if(gbDataMBC5.isRumbleCartridge) { + // Some games support rumble, such as Disney Tarzan, but aren't on a + // rumble cartridge. As long as the RAM is less than or equal to 256Kbit + // we know that the last address line is not used for real RAM addresses, + // so it must be a rumble signal instead. + if(gbDataMBC5.isRumbleCartridge || gbRamSizeMask <= 0x7FFF) { systemCartridgeRumble(value & 0x08); value &= 0x07; } else diff --git a/vba-wii.pnproj b/vba-wii.pnproj index 3eea206..cae6ec0 100644 --- a/vba-wii.pnproj +++ b/vba-wii.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file