libretro / libretro-meta

The Unlicense
4 stars 3 forks source link

MBC7 support --- Kirby - Tilt 'n' Tumble #41

Open sergiobenrocha2 opened 7 years ago

sergiobenrocha2 commented 7 years ago

Add MBC7 mapper support


From @sergiobenrocha2 on September 15, 2014 23:17

Trying to load Kirby - Tilt 'n' Tumble (USA) in gambatte core, and I got a segfault. Tested in Linux and Android.

Compiled with DEBUG=1:

bt full
#0  0x000000000046aca8 in ?? ()
No symbol table info available.
#1  0x00000000004110ff in ?? ()
No symbol table info available.
#2  0x0000000000462b88 in ?? ()
No symbol table info available.
#3  0x000000000040f03e in ?? ()
No symbol table info available.
#4  0x000000000040daa0 in ?? ()
No symbol table info available.
#5  0x00007ffff26f1ec5 in __libc_start_main (main=0x40d9d0, argc=1, argv=0x7fffffffdf48, init=<optimized out>, fini=<  optimized out  >, rtld_fini=<  optimized out  >, 
    stack_end=0x7fffffffdf38) at libc-start.c:287
        result = <  optimized ou  t>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 8751052256051647789, 4250700, 140737488346944, 0, 0, -8751052255027342035, -8751022428627610323}, mask_was_saved = 0}}, 
          priv = {pad = {0x0, 0x0, 0x49bba0, 0x7fffffffdf48}, data = {prev = 0x0, cleanup = 0x0, canceltype = 4832160}}}
        not_first_call = <  optimized out  >
#6  0x000000000040dc75 in ?? ()
No symbol table info available.

more: http://pastebin.com/b20R7WiL

Copied from original issue: libretro/gambatte-libretro#33

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42897848-mbc7-support-kirby-tilt-n-tumble?utm_campaign=plugin&utm_content=tracker%2F56438981&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F56438981&utm_medium=issues&utm_source=github).
sergiobenrocha2 commented 7 years ago

From @twinaphex on February 21, 2015 4:49

Can you test this again? Gambatte libretro should now be as up-to-date as upstream.

sergiobenrocha2 commented 7 years ago

From @Oggom on February 21, 2015 12:31

It's an upstream issue. The segfault happens because Gambatte doesn't support the mapper used in this game (MBC7).

https://github.com/libretro/gambatte-libretro/blob/dc3b8015cb5bcaa7a1cda7951dcd11970fd42b16/libgambatte/src/mem/cartridge.cpp#L491.

sergiobenrocha2 commented 7 years ago

VBA-M can handle this game, you can assign buttons to the motion control. Is it possible to backport it?

sergiobenrocha2 commented 7 years ago

https://github.com/visualboyadvance-m/visualboyadvance-m/blob/master/src/gb/gbMemory.h#L50

https://github.com/visualboyadvance-m/visualboyadvance-m/blob/master/src/gb/gbMemory.cpp#L664