SuperFW: a (very much WIP) supercard firmware

davidgf

Active Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
29
Trophies
1
XP
452
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: 3

Wuigi

Well-Known Member
Member
Joined
Sep 14, 2012
Messages
728
Trophies
1
XP
1,791
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
452
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,088
Trophies
2
XP
2,646
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
Reactions: Flame

OmDRetro

Member
Newcomer
Joined
Apr 23, 2024
Messages
7
Trophies
0
XP
22
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
117
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
7
Trophies
0
XP
22
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

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Bollocks