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: 7

Wuigi

Well-Known Member
Member
Joined
Sep 14, 2012
Messages
728
Trophies
1
XP
1,801
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,678
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
37
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
37
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
362
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
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
    +1
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87 cents. Free shipping from China... It arrived it works and honestly I don't understand how it was so cheap.
    Psionic Roshambo @ Psionic Roshambo: @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87...