SuperFW: a (beta) custom firmware for Supercard

davidgf

Well-Known Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
99
Trophies
1
XP
927
Country
Hello there!

This is a Work-In-Progress firmware, currently in a Beta-ish state, getting closed to a stable condition. There are still bugs here and there (please report them so I can fix them :P). Use at your own risk!

The website / documentation is at https://superfw.davidgf.net/
The github source release is not there yet, I expect it will happen in the next weeks.

The current version is 0.12. Feature work is mostly complete, working on fixing bugs, testing, and some UI/translation work.
This firmware does not support supercard lite, there's no plan for support yet (don't even own one and they are hard to get these days). Donations are gladly accepted :)

Features:
- Rich nice UI
- Support for non-latin characters (ext latin, greek, cyrilic, japanese/chinese)
- FAT16/32 and exFat support (recommended for non-ascii filenames)
- Auto patching (WaitCNT, save, RTC, in-game-menu/addon) most games
- Patch engine for unknown games (automatic, yet slow, patching for all).
- Support for save management
- Direct saving (for flash/eeprom games), no more save on reboot!
- Support 128KB flash (using direct saving or ingame menu)
- In-game menu (supports reset, saving, RTC, etc).
- Cheats (using the In-game menu)
- Saving backups (saves #N last savegames)
- Flashing updates (GBA and NDS)
- Support for NDS mode, works well with TWL++ and ndsbootstrap to play NDS games.
- Minimal file management (ie. delete files)
- Multilanguage support (EN/ES/CA/IT/DE/FR/UK/RU/ZH)

Pending features / Coming up / TODO:
- Character composition (ie. for Korean support?)
- Release 1.0 on github!


Installing instructions:

Note: please backup your firmware (ie. the original fw) before flashing stuff, otherwise you won't be able to go back!

- Place two copies on your SD CARD: one named superfw.gba and the other superfw.fw
- Launch superfw.gba from whatever loader you use (ie SuperFW, SCFW, the original supercard menu...)
- Move to the info menu (using the right shoulder button) and press the combo specified at the bottom to unlock flasing
- Go back to the browser menu and locate superfw.fw file. Follow the steps to flash it.
- Reboot your GBA!

You can use an NDS to flash as well, or to unbrick your firmware if you screwed up! This tool allows to backup your firmware too. Find it here: https://github.com/davidgfnet/superfw-nds-flasher-tool/releases

shot1.png
shot2.png

shot3.png
shot4.png



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

  • superfw-cheats-45d75a13.zip
    21.9 KB · Views: 3
  • superfw-older-releases.zip
    3.8 MB · Views: 1
  • superfw-v0.12.zip
    486.2 KB · Views: 1
Last edited by davidgf,

Wuigi

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

davidgf

Well-Known Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
99
Trophies
1
XP
927
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,162
Trophies
2
XP
3,232
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

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
95
Trophies
0
XP
264
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: KWG-08C and BETA215

Archeychen

Active Member
Newcomer
Joined
Jun 22, 2022
Messages
25
Trophies
0
Age
25
Location
Beijing
XP
148
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

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
95
Trophies
0
XP
264
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: KooZ27 and zfreeman

Peeteris

Well-Known Member
Member
Joined
Mar 7, 2017
Messages
107
Trophies
0
Age
44
XP
627
Country
Can't wait for more! Awesome job you doing here!

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

moon_rabbit

Well-Known Member
Member
Joined
May 6, 2022
Messages
225
Trophies
0
Age
35
Location
kor
XP
537
Country
Korea, South
Currently SCFW doesn't have a database, so finding the savetype is the most time consuming thing.
With a database, like ez-flash and everdrive, it will definitely be faster.
 

Xyvir

Well-Known Member
Newcomer
Joined
Apr 17, 2023
Messages
55
Trophies
0
Age
36
XP
184
Country
United States
@davidgf

Nice work, this is really slick.

Any plans for DS-mode support?

Just curious, I primarily use my supercardSD on slot-2 phat DS atm.
 

davidgf

Well-Known Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
99
Trophies
1
XP
927
Country
Hey there! I'm back :)

Answering some questions now, thanks for the feedback!

Will the card still support passme to run DS homebrew?
> For now I'm focusing on GBA mode (also my NDS died and I don't have a SuperKey with me for testing)

Looks great, might this also work for a supercard miniSD?
> I think it works with all of them? I tested with several supercards (miniSd, microsd...). I have a full SD one (really old) but cannot find it now :P

Seems SuperFW doesn't recognize the save files from SCFW as the latter saves in the directory where the ROM file is located.
> There's an option to select where saves are stored (three possibilities)

does it comes with Chinese support?
> Not yet. The font was a bit too big, will try to get some ZH/JP/KR support in the next releases

also, what's your sd r/w speed?
> I think it's over ~1.2MB/s, measuring with a timer I think it's more than 10% faster than the default supercard firmware. It's pretty close to the limit I think.

how do you load your fw?
> I just manually chain-load it (using the regular SC firmware), like another game.


So the plans at the moment are roughly:

- Finish the patching code (for WAITCNT patching), and implementing a built-in patcher (for games that are not in the database)
- Tackling FLASH carts (right now only SRAM/EEPROM is supported).
- Exploring flashing the firmware into the internal flash, like SCFW does for its bootloader, with some updater tool and whatnot.
- In-game menu: explore savestate support, forced SRAM flush/write. This will also require some patch database.
- Explore DS mode, once I revive my DS (damn fuses).
- UI stuff: more character support, add some translations, some theming, etc.

I was also told that some SC have no battery? My assumption was that they all have it, so we can defer SRAM saving to the next boot. Anyone has any pointers about this?

Thanks for the feedback! Really appreciated. Stay tuned for more!
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,628
Trophies
3
Age
37
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
7,497
Country
United States
I was also told that some SC have no battery? My assumption was that they all have it, so we can defer SRAM saving to the next boot. Anyone has any pointers about this?

I know for sure the SuperCard Lite MicroSD doesn't use a battery as I personally own one. Not sure on the others. Most models do have battery but SuperCard Lite is one of the unique ones that don't.
 

davidgf

Well-Known Member
OP
Newcomer
Joined
Mar 25, 2011
Messages
99
Trophies
1
XP
927
Country
Thanks for the report!
I also noticed that the Lite has some quirks (I found some funny comments in SCFW and devkitpro sources) so I was wondering whether my FW was at all compatible with this particular model.
It seems it's not easy to find any more (only the regular microsd version is still available in aliexpress and similar sites, the other versions seem gone).
That means having an in-game menu will be even more important for these carts.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @AngryCinnabon, how r u?