Homebrew Emulation Forked MSXAdvance to add auto ROM mapper detection

patters

Well-Known Member
OP
Member
Joined
Jan 28, 2006
Messages
174
Trophies
1
XP
908
Country
https://github.com/patters-syno/msxadvance

FluBBa's MSXAdvance is a solid emulator which runs very well on GBA. There are many absolute classic shooters on the MSX1:
  • Nemesis, Nemesis 2, Nemesis 3
  • Salamander
  • Zanac A.I.
  • Twin Bee
  • Parodius
  • Fantasy Zone
  • R-Type
However, until now MSXAdvance was let down by one significant usability issue - you had to manually select the ROM mapper for each game (which was hidden away in the Other Settings menu), and you also had to restart the emulator once you had changed it. Furthermore you need to remember which mapper for each game. Not anymore though!

I forked the MSXAdvance sourcecode to hack in automatic mapper selection. I remember begging for this feature on the PocketHeaven forums back in 2006, and I seem to recall that FluBBa answered something along the lines of "it's open source, so you can add that if you really want". Well now I did :)

My new Python 3 builder must be used for this feature. In fact it is the builder which detects the appropriate mapper to use and records this choice in a spare byte in the ROM header for retrieval by the emulator. I implemented the same algorithm which several other MSX emulators use to scan the ROM for likely bank switch instructions and rank the observed destination addresses.

To minimise the changes needed to the emulator ARM ASM code I repurposed the upper 3 bits of the emuflags 4 byte word passed by main.c to cart.s, meaning that the spritefollow half-word within is reduced from 16 bits to 13 bits wide. The rarely-used sprite follow feature will still function but the max value is now limited to 8191.

Although MSXAdvance v0.3 and v0.4 were released, they very significantly impacted game compatibility, which is why I forked v0.2. I have updated my EZ-Flash IV exit-patched emulator collection with this development.

I never in a thousand years thought I would be able teach myself the skills to pull off this kind of hackery, but it's all thanks to open source. I have zero training nor prior experience in C, Python, nor ARM assembler other than what I've pieced together from looking at this stuff. If I can do it, so can you with some experimentation.

Enjoy!
 
Last edited by patters,

patters

Well-Known Member
OP
Member
Joined
Jan 28, 2006
Messages
174
Trophies
1
XP
908
Country
I can see downloads for the wrong build. If you downloaded this and were wondering why the mapper choice is still manual, it's because you got the wrong build. GitHub was marking the wrong one as the latest, which was confusing. That's fixed now.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Jayro @ Jayro:
    The phat model had amazingly loud speakers tho.
    +1
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +2
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
    rqkaiju2 @ rqkaiju2: i like physical media because it actually feels like you own it. thats why i plan on burning...