SuperFW: a (very much WIP) supercard firmware

davidgf

Active Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
29
Trophies
1
XP
454
Country
Hey there!
So yeah, after seeing that this was pretty much possible (thanks to metroidmaniac's effort) and since this was something that I always wanted but nobody came up with, I decided to give it a shot and try it myself. I've been working on this over the past 2-3 weeks and so far it looks half-decent.

The goal is to create a firmware that is nice, easy to use, has some sane defaults and requires no PC (patches included in the FW). Ideally would be fast, have many features, and be easy to update and mess around. And open source of course! (Will be releasing the code soon!) Other cool things are: using Elm's FatFS lib (so support for FAT32 and extFAT is possible), proper font rendering and unicode support (no more ascii-only filenames!), no limits on file count/directory count, can load GB/GBC roms using goombacolor, etc. Let's make this very 2024.
So far this is a pretty much early demo. Supports many commercial games (haven't done almost any testing) with patches for WAITCNT (aka whitescreen) and EEPROM. Working on getting patches for FLASH next. Has no support for flashing, so you need chainload it from another supercard firmware.

WARNING! ACHTUNG! This is pretty much a demo, almost guaranteed to destroy your sav files, if not your SD card! Please stay away if you want something usable.
I'm posting this since I'm gonna be out for a month on vacation so I wanted to say hi and force myself to pick it up and finish it once I'm back.

The obligatory video:


That's it, below here a long explanation for those interested in the details:

I have worked a bit of gpsp over the past years, so I added some minimal supercard emulation on a branch, so I could develop this without having to test on real hardware (it's so much faster to develop this way). That's how the video was recorded. The support is very minimal, and unlikely to publish it, but I thought about adding some support to mgba, since the developers seem open to the idea.
Another cool topic is patching: I've developed some cool emulation/static-analysis based system that can find patching offsets for WAITCNT. I will be writing a post about this soon, since it is a cool idea and can be repurposed for other things. ATM it only works for the Thumb instruction set, working on adding ARM support. The firmware ships a database of patches (~80KB) and uses it to patch games. It also has support to load patches from the SDcard so updates and alternative patch databases can be distributed (without having to flash a new firmware).

And I'm going to bed, I'll post more tomorrow :)
 

Attachments

  • firmware.gba.zip
    122 KB · Views: 6

Wuigi

Well-Known Member
Member
Joined
Sep 14, 2012
Messages
728
Trophies
1
XP
1,800
Country
United States
Looks great, might this also work for a supercard miniSD?
Will the card still support passme to run DS homebrew?
 

davidgf

Active Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
29
Trophies
1
XP
454
Country
I tested this in a Supercard with microsd and minisd (I do no think it is relevant, it's just the same kind of device).
I haven't added support for flashing the internal flash yet, I assume that might be tricky, given all the messages in the SCFW thread, right metroid maniac? Seems that there might be different flash manufacturers. I also want to implement this in gpsp so I can do proper testing (before I kill my carts :P)
For now I'm focusing on GBA, but I will explore any DS support as well :)

I'm also curious of adding some support for in-game menu (like the EZ flash carts have). I think it is cool how they do that (by patching the IRQ handlers in the games) and I could reuse my WAITCNT patcher for it (since it is pretty much the same kind of patching).
 
  • Like
Reactions: Wuigi and Flame

metroid maniac

An idiot with an opinion
Member
Joined
May 16, 2009
Messages
2,089
Trophies
2
XP
2,675
Country
Not having any of the carts which have been bricked, I don't know what the issue with flashing is. It seems easy enough, but I guess in practice it turns out a little different. Clones are definitely using new flash ids these days, because they aren't being recognised by the OFW installer.

Patching the IRQ handler is more regular and reliable than patching WAITCNT so that's definitely possible. I'm not sure how feasible tricky an ingame menu with save states is though, seems like it'd have a large memory footprint including the SD driver. My implementation in SCFW only handles soft reset and has no menu so it's very lean.
 
Last edited by metroid maniac,
  • Like
  • Love
Reactions: jejer and Flame

OmDRetro

Member
Newcomer
Joined
Apr 23, 2024
Messages
14
Trophies
0
XP
35
Country
Philippines
I took the risk to load your kernel and I do like the UI so far (already backed up my files just in case ~ heh).

Seems SuperFW doesn't recognize the save files from SCFW as the latter saves in the directory where the ROM file is located.

For yours, the target directory for saves appears to be found in:
  • ./SAVEGAME/{ROM FILENAME HERE}.SAV
So, I tried transferring my saves there and it works!

I assume the configs for this kernel is found here:
  • ./retrofw/
 
  • Like
Reactions: BETA215

Archeychen

Member
Newcomer
Joined
Jun 22, 2022
Messages
22
Trophies
0
Age
25
Location
Beijing
XP
123
Country
China
grate work! looks cool!

does it comes with Chinese support?

also, what's your sd r/w speed?

about the nds side, you can use mine dldi, it's heavily optimized,about 2.5MB read and 1.4MB write, IIRC


https://github.com/ArcheyChen/SuperCard-SDHC-DLDI/tree/master/source

but the code heavily use inline asm, and will not directly compile on gba

if you need any help on displaying Chinese or opt the sd card speed, please contact me.
Post automatically merged:

grate work! looks cool!

does it comes with Chinese support?

also, what's your sd r/w speed?

about the nds side, you can use mine dldi, it's heavily optimized,about 2.5MB read and 1.4MB write, IIRC


https://github.com/ArcheyChen/SuperCard-SDHC-DLDI/tree/master/source

but the code heavily use inline asm, and will not directly compile on gba

if you need any help on displaying Chinese or opt the sd card speed, please contact me.
Post automatically merged:

and ,how do you load your fw?I use Manic's loader, but according to him, to load the fully 512KB of fw, you need to toggle some regs to unlock the scsd, but we didn't find a way to 'relock' it, which will cause nds games white screen when using twlmenu++

it's really PITA to deasm it, because it's a selfcopy code in stock fw, really hard to analysis.
 
Last edited by Archeychen,

OmDRetro

Member
Newcomer
Joined
Apr 23, 2024
Messages
14
Trophies
0
XP
35
Country
Philippines
I ran davidgf's kernel by renaming the "firmware" file to kernel.gba and placed it inside the scfw folder(thus replacing the SCFW kernel).

It's practically a frankenstein-ish combination of metroid-maniac's firmware/loader & davidgf's kernel :lol:

PXL_20240504_005840372.jpg
 
  • Like
Reactions: zfreeman

Peeteris

Well-Known Member
Newcomer
Joined
Mar 7, 2017
Messages
74
Trophies
0
Age
43
XP
361
Country
Can't wait for more! Awesome job you doing here!

Pokemon Emerald not working at the moment with this, though.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    I tell people I wrestled a 5 foot alligator and they get this smile like this guy is full of shit lol the reality is I am sad it got away.... I wanted a pet alligator lol
  • BigOnYa @ BigOnYa:
    You live in Florida, so I believe it, you guys are crazy.
  • Psionic Roshambo @ Psionic Roshambo:
    At the time I would have probably fed it people lol
  • Psionic Roshambo @ Psionic Roshambo:
    Seriously cocaine not even once lol
  • BigOnYa @ BigOnYa:
    Not even once, but 100's of times
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    My girlfriend at the time, she had me stay up with her all night because some how the crazy bitch had spent like 12 hours snorting 2 8 balls, didn't use any water (gotta clean your nose) so she had so much crusted in her nose I was sure she was gonna blow up her heart. I mean this was the stuff right off the boat so absolutely pure. ugghh so annoying
  • Psionic Roshambo @ Psionic Roshambo:
    Also doing like 320 dollars worth of coke in half a day lol damn it
  • Psionic Roshambo @ Psionic Roshambo:
    hmmm 360 even lol
  • Psionic Roshambo @ Psionic Roshambo:
    Well I was getting a discount so 320 is probably right
  • BigOnYa @ BigOnYa:
    That is cheap, I used to pay $100 for a tine.
  • Psionic Roshambo @ Psionic Roshambo:
    Tine? One gram?
  • BigOnYa @ BigOnYa:
    Sixteenth
  • Psionic Roshambo @ Psionic Roshambo:
    Also it was literally out of a kilo when I got it off the boat so absolutely pure
  • Psionic Roshambo @ Psionic Roshambo:
    Holy shiz that's a lot
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I was getting 3.5 Grams for 320 could have stepped on it and doubled my money easy lol
    +1
  • BigOnYa @ BigOnYa:
    I'd be afraid to it nowdays, my heart would explode prob. I just stick beers n buds nowdays.
  • Psionic Roshambo @ Psionic Roshambo:
    I would get to drive from tarpon springs to like Miami a thousand bucks lol do that twice a week and back in 92 that was good money
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    @Psionic Roshambo what are you guys talking about?
  • Psionic Roshambo @ Psionic Roshambo:
    Blew it on women and muscle cars lol
    +1
  • BigOnYa @ BigOnYa:
    @Xdqwerty Hamster food, its pricey nowadays to keep PCs running.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I don't do anything except cigarettes and gotta stop eventually lol
    +1
  • BigOnYa @ BigOnYa:
    I'd do shrooms again if could find, and I was outside camping/fishing, and had a cooler full of beer.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I wouldn't mind some LSD, laughing until my face hurt sounds fun lol
    +1
    Psionic Roshambo @ Psionic Roshambo: I wouldn't mind some LSD, laughing until my face hurt sounds fun lol +1