Homebrew SCFW: Custom Firmware & Kernel for Supercard

djmuted

Member
Newcomer
Joined
Jul 21, 2018
Messages
16
Trophies
0
Age
28
XP
533
Country
Poland
I had managed to get the EZ Flash Omega splash to show up but hangs due to fat init issues which seems to suggest I have to use libgba's libfat instead of the custom stuff EZ Flash is using since obviously none of that stuff would work as intended on a SuperCard.
It actually does (except for Send_FATbuffer). All you need to do is to replace Read_SD_sectors, Write_SD_sectors, SD_Enable, SD_Disable implementations with calls to _SCSD_readSectors_my, _SCSD_writeSectors_my, _SCSD_unlock, _SCSD_shutdown_my functions from SCFW codebase. You also need to call _SCSD_startUp_my at the start of the main() function. This change alone makes fatfs work just fine (no need to use devkitpro libfat).
Post automatically merged:

How were you booting this by the way? Omega's kernel is pretty large so I had modified SCFW's firmware.frm to accept larger kernels. (for some reason it was limited to loading very small ones and would error if you tried to give it a larger one. The way it manages the file read and such seems to suggest it shouldn't have been limited to such a small size.)
I was chainloading this with a regular SCFW kernel, making ROM flashing impossible (I think?), since the code would replace its own memory in the process. I was about to do the same mod to the SCFW firmware. Removed the kernel size limit, renamed the modified firmware .gba to .frm, flashed it and hoped for the best. This did not work and the cart is bricked. I guess the firmware .gba file is not something that should be directly flashed, wish that was pointed out in the repo README.

Still, I think there might be a reason for why this this kernel size limit was introduced in the first place. It might be the only free space left in the memory, anything more would be replaced by game ROM loading. However I am not sure about that, it's just some guesswork.
 
Last edited by djmuted,

OmDRetro

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
61
Trophies
0
XP
197
Country
Philippines
Now, I have a question. Would it theoretically be possible to add RTC to this flashcart?

That's something I'm trying to experiment with lately after the release of HVCA Rev. B

What I got during my tests with the PseudoRTC build was this:

PseudoRTC.PNG


I have not implemented this on the card itself, but the clock time experiment here is based on what is saved at file level(via Unix time). If it opens the RTC.dat file and reads the time from it, it will continue the clock from there.

At the moment it is INACCURATE, but it works. 🤷‍♂️
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,581
Trophies
3
Age
37
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
7,276
Country
United States
It actually does (except for Send_FATbuffer). All you need to do is to replace Read_SD_sectors, Write_SD_sectors, SD_Enable, SD_Disable implementations with calls to _SCSD_readSectors_my, _SCSD_writeSectors_my, _SCSD_unlock, _SCSD_shutdown_my functions from SCFW codebase. You also need to call _SCSD_startUp_my at the start of the main() function. This change alone makes fatfs work just fine (no need to use devkitpro libfat).
Post automatically merged:


I was chainloading this with a regular SCFW kernel, making ROM flashing impossible (I think?), since the code would replace its own memory in the process. I was about to do the same mod to the SCFW firmware. Removed the kernel size limit, renamed the modified firmware .gba to .frm, flashed it and hoped for the best. This did not work and the cart is bricked. I guess the firmware .gba file is not something that should be directly flashed, wish that was pointed out in the repo README.

Still, I think there might be a reason for why this this kernel size limit was introduced in the first place. It might be the only free space left in the memory, anything more would be replaced by game ROM loading. However I am not sure about that, it's just some guesswork.

Interesting. I did not experience issues doing this with on my SC Lite. Only I didn't know how to properly build the new frm file so I instead compiled a version with the expanded kernel size and compared it to the original. Saw that only two bytes changed and made that change to the original FRM file then flashed that to my SC.

As far as I can tell it works as I had intended. It loads SCFW kernels just fine still even after I had attempted to load the large Omega kernal. The Omega kernal did seem to load as it displayed it's splash screen.

My attempt at replacing the SD code involved just putting the entire c files for SC's SD code into the project and having f_mount call that disc interface instead of the old one but I guess the code still tries to call the original SD code in places so that probably explains why that didn't work. :P
 

Gamemaster2022

Active Member
Newcomer
Joined
Apr 9, 2024
Messages
43
Trophies
0
Age
18
XP
106
Country
Czech Republic
That's something I'm trying to experiment with lately after the release of HVCA Rev. B

What I got during my tests with the PseudoRTC build was this:

View attachment 444818

I have not implemented this on the card itself, but the clock time experiment here is based on what is saved at file level(via Unix time). If it opens the RTC.dat file and reads the time from it, it will continue the clock from there.

At the moment it is INACCURATE, but it works. 🤷‍♂️
Wow, that sounds promising!
 

OmDRetro

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
61
Trophies
0
XP
197
Country
Philippines
Anyone able to get the final fantasy games working on scfw? Tactics is the only one I can get to run the rest are white screen. Also metroid zero mission does not seem to work and these are all games that worked on stock firmware. I wont bother reflashing mine I am actually very happy with scfw it runs much faster than the stock firmware. A good test is the first level on mario world with the line of koopas. There is far more lag on the stock firmware than there is on scfw 0.5.2. Excellent work.
Post automatically merged:

Okay another oddity I discovered. supercard with scfw works just fine on both my AGS-001 SPs but when I try to boot it on my AGB-001 it loads the kernel and when you get to the file explorer its just garbage text

I was able to get the FF games run on SCFW provided that the ROM has already patched out the INCREASE ROM SPEED FEATURE. The SuperCard SD does not support that and it WILL load into a white screen if left unpatched.


As for your other concern, the garbage text only appears when an "SDRAM write failed" prompt appears during kernel loading. This will require a reboot. Otherwise, ensure that your SuperCard SD pins are clean then reinsert the cartridge
 
Last edited by OmDRetro,
  • Like
Reactions: Bandit_Keith

GBAUSER19865

New Member
Newbie
Joined
Jul 12, 2024
Messages
2
Trophies
0
Age
23
XP
9
Country
Australia
Just got a Super Card, unfortunately the firmware flash doesn't work due to incompatibility with the latest flash chips that it ships with 'c2ba', do you know if this is just an issue with my specific card or an issue with all new cards with these flash chips?
 

eosia

Well-Known Member
Member
Joined
Aug 19, 2010
Messages
179
Trophies
1
XP
413
Country
United States
I am quite new to gba development. This DLDI requires nds/ndstypes.h, which is not found in my gba environment. Also the CRC code relies on u64. does gba even support that? This code looks like it's meant to work on the NDS.

Edit: after some research, it looks like it was obviously made for the NDS. There are some ASM instructions that are not supported by the gba compiler it seems.

Edit2: I could not get the DLDI to work (I even used some older version that did not include any ASM code and it compiles but still does not run). However, I managed to fix the performance problems that I had with scfw sd driver and it seems to be fast now.
Yes, thumbnails are working as well.

Edit3: I bricked the Supercard SD while flashing new firmware. Unless there's a way to flash the original firmware on it using ch341a or something similar, it's over.

View attachment 444044
got the source code?
 

OmDRetro

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
61
Trophies
0
XP
197
Country
Philippines
Just got a Super Card, unfortunately the firmware flash doesn't work due to incompatibility with the latest flash chips that it ships with 'c2ba', do you know if this is just an issue with my specific card or an issue with all new cards with these flash chips?

The stock firmware has issues with different flash chips(c2ba in this case), but it's compatible with SCFW. You can try flashing this version of the stock firmware v1.85 by downloading the OFW file from post 191 and then flash it via SCFW
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,581
Trophies
3
Age
37
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
7,276
Country
United States
got the source code?
I'm not sure where he left off in the project but I think I got about as far as him. I got it booting and able to access the file directory. Rom loading is not working. I think fatlib EZ Flash using not compatible or something because i can't get it to create a test file and roms it loads to psram should have at least had a working Nintendo Logo on the gba screen but they do not. :P

The modified frm file is included which you'll need to flash to your SC to make this all work. It has the expanded kernel size (up to 2MB) which seems to work fine in my case on SC Lite as I've set this up as a kernel gba as there's no way you'd have room to flash it directly. Not on SC Lite anyways. It only has 512KB flash. Maybe the other models used larger chips but that was the case with my SC Lite. I wouldn't recommend trying that anyways.

I do recommend you have some method of flashing original firmware back via DS/DS Lite before you flash it but it seems to work just fine for me. Bricked units can be recovered but they require a DS/DS Lite to do.

I went into Ezcard_OP and disabled most of the functions as they have no relevance with SuperCard and would just cause unexpected behavior. So I've ruled that out being the issue with rom loading.

For the most part EZflash doesn't do save patches (it relied on FPGA on card to emulate that) so you'll likely have to port SCFW's patch system to get this up and running. (you'll obviously need SC's specific patches for whitescreens, etc too as well) Assuming you can sort out the fat lib problems.
 

Attachments

  • OmegaSCFW.zip
    2.2 MB · Views: 26
Last edited by Apache Thunder,
  • Wow
Reactions: OmDRetro

Bandit_Keith

Member
Newcomer
Joined
Jun 28, 2024
Messages
6
Trophies
0
Age
124
XP
26
Country
Canada
I was able to get the FF games run on SCFW provided that the ROM has already patched out the INCREASE ROM SPEED FEATURE. The SuperCard SD does not support that and it WILL load into a white screen if left unpatched.


As for your other concern, the garbage text only appears when an "SDRAM write failed" prompt appears during kernel loading. This will require a reboot. Otherwise, ensure that your SuperCard SD pins are clean then reinsert the cartridge
My supercard is brand new so I didnt think it was that clean it anyway, my gameboy is ancient so I gave that a clean. No sram error but still garbage text.
In regards to the first part how would I go about doing that to my roms?
 

OmDRetro

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
61
Trophies
0
XP
197
Country
Philippines
My supercard is brand new so I didnt think it was that clean it anyway, my gameboy is ancient so I gave that a clean. No sram error but still garbage text.
In regards to the first part how would I go about doing that to my roms?

Try narrowing down what's causing the issue:
  • If your SuperCard SD is new, check if your GBA edge connector pins are corroded. You need to make sure that all the edge connectors are clean and have good contact with the cartridge pins.
  • If it still shows garbage text, like the one here, that would likely mean your SD card is failing. Which means it needs replacement
  • Your MicroSD does not have firm contact with the microSD slot pins on the SuperCard SD or those pins are not clean.

For the ROMs with INCREASE ROM SPEED:
Note: this is one of those edge cases where using a patched ROM might be needed.
  • Using SuperCard team's patch tool (Super Card V2.71)
    • Install the patching tool (preferably via Windows XP through a type-2 hypervisor like Oracle's Virtual Box)
    • Open the ROM in the Super Card V2.71 patching tool and deselect all parameters from the ROM properties.
      • We only need to use this tool to disable INCREASE ROM SPEED hence why we deselected every other ROM option as those patches are done automatically via SCFW.
    • Ignore the status under the Patch column as that is irrelevant(doesn't matter if it shows FAIL or PASS).
    • Ensure that your OUT path is somewhere you can access on your computer.
      • For this example, I'll use the "Desktop"
    • Export the patched ROM by pressing the OUT button from within the Game List tab(Lower right of the window)
      • It will export 3 files:
        • {ROM NAME}.SAV
        • {ROM NAME}.SCI
        • {ROM NAME}.BIN
          • Take/Copy ONLY the bin file.
    • Rename the exported ROM extension from *.BIN to *.GBA
    • Transfer the ROM with the modified extension to your micro SD card.

ALTERNATIVE # 1:

You can use this open source SuperCard SD patching tool, but I personally have not tried this method. So, I won't be able to help you here.

ALTERNATIVE # 2:

You can use the patched HEX values reported by other users such as the sample provided in our Github repository issue report ticket#10. A user named multi-vitamin already patched the ROM via patching tool and found a few differences with the original binary/dump.

You'll need the ff.:
  • Hex Editor like HxD
  • Obviously, the ROM you're going to modify.
  • Some knowledge in navigating/using your preferred hex editor.

Since you wanted to play FF games, a user named multi-vitamin provided the modified hex pattern that disables the INCREASE ROM SPEED feature. Refer to the table below:

ROMORIGINAL HEX PATTERNMODIFIED HEX PATTERN
Final Fantasy I & II: Dawn of Souls10 9F E5 04 12 80 E510 9F E5 00 00 A0 E1
Final Fantasy IV Advance10 9F E5 04 12 80 E510 9F E5 00 00 A0 E1
Final Fantasy V Advance10 9F E5 04 12 80 E510 9F E5 C0 46 80 E5
Final Fantasy VI Advance10 9F E5 04 12 80 E510 9F E5 C0 46 80 E5

Depending on the game you want to play:
  • Look for the Original HEX pattern found in your ROM on your Hex Editor
  • Replace ALL THE INSTANCES of the ORIGINAL HEX PATTERN with the MODIFIED HEX PATTERN
  • Save the changes and transfer the modified ROM to your micro SD card
 
Last edited by OmDRetro,

Gamemaster2022

Active Member
Newcomer
Joined
Apr 9, 2024
Messages
43
Trophies
0
Age
18
XP
106
Country
Czech Republic
Try narrowing down what's causing the issue:
  • If your SuperCard SD is new, check if your GBA edge connector pins are corroded. You need to make sure that all the edge connectors are clean and have good contact with the cartridge pins.
  • If it still shows garbage text, like the one here, that would likely mean your SD card is failing. Which means it needs replacement
  • Your MicroSD does not have firm contact with the microSD slot pins on the SuperCard SD or those pins are not clean.

For the ROMs with INCREASE ROM SPEED:
Note: this is one of those edge cases where using a patched ROM might be needed.
  • Using SuperCard team's patch tool (Super Card V2.71)
    • Install the patching tool (preferably via Windows XP through a type-2 hypervisor like Oracle's Virtual Box)
    • Open the ROM in the Super Card V2.71 patching tool and deselect all parameters from the ROM properties.
      • We only need to use this tool to disable INCREASE ROM SPEED hence why we deselected every other ROM option as those patches are done automatically via SCFW.
    • Ignore the status under the Patch column as that is irrelevant(doesn't matter if it shows FAIL or PASS).
    • Ensure that your OUT path is somewhere you can access on your computer.
      • For this example, I'll use the "Desktop"
    • Export the patched ROM by pressing the OUT button from within the Game List tab(Lower right of the window)
      • It will export 3 files:
        • {ROM NAME}.SAV
        • {ROM NAME}.SCI
        • {ROM NAME}.BIN
          • Take/Copy ONLY the bin file.
    • Rename the exported ROM extension from *.BIN to *.GBA
    • Transfer the ROM with the modified extension to your micro SD card.

ALTERNATIVE # 1:

You can use this open source SuperCard SD patching tool, but I personally have not tried this method. So, I won't be able to help you here.

ALTERNATIVE # 2:

You can use the patched HEX values reported by other users such as the sample provided in our Github repository issue report ticket#10. A user named multi-vitamin already patched the ROM via patching tool and found a few differences with the original binary/dump.

You'll need the ff.:
  • Hex Editor like HxD
  • Obviously, the ROM you're going to modify.
  • Some knowledge in navigating/using your preferred hex editor.

Since you wanted to play FF games, a user named multi-vitamin provided the modified hex pattern that disables the INCREASE ROM SPEED feature. Refer to the table below:

ROMORIGINAL HEX PATTERNMODIFIED HEX PATTERN
Final Fantasy I & II: Dawn of Souls10 9F E5 04 12 80 E510 9F E5 00 00 A0 E1
Final Fantasy IV Advance10 9F E5 04 12 80 E510 9F E5 00 00 A0 E1
Final Fantasy V Advance10 9F E5 04 12 80 E510 9F E5 C0 46 80 E5
Final Fantasy VI Advance10 9F E5 04 12 80 E510 9F E5 C0 46 80 E5

Depending on the game you want to play:
  • Look for the Original HEX pattern found in your ROM on your Hex Editor
  • Replace ALL THE INSTANCES of the ORIGINAL HEX PATTERN with the MODIFIED HEX PATTERN
  • Save the changes and transfer the modified ROM to your micro SD card
Could this possibly fix the NES Classics games that never worked? I have barely any knowledge about these ROMs so my question might be stupid, but still...
 

soukron

New Member
Newbie
Joined
Mar 19, 2024
Messages
3
Trophies
0
Age
44
Location
Valencia - Spain
XP
22
Country
Spain
@soukron , I have published a new release which adds a soft reset patch. There is also a setting to only autosave when using soft reset, rather than on every boot. Please let me know how you get on with this.

I am sorry for the late answer, but the feature works perfectly! Now even those old carts without battery like mine can work again. Thank you!

FWIW I used the 0.5.2 and avoided the PreReleases until they're considered stable.

On the other hand, the L+R to sort/hide save file is very useful. I would still hide by default the dot files without any option to show them, though.
 
Last edited by soukron,

OmDRetro

Well-Known Member
Newcomer
Joined
Apr 23, 2024
Messages
61
Trophies
0
XP
197
Country
Philippines
Could this possibly fix the NES Classics games that never worked? I have barely any knowledge about these ROMs so my question might be stupid, but still...

Sadly, no. If it doesn't work on stock, the patch it does will not be any different on SCFW. That is until any of us figures out what causes those ROMs to fail in the first place.

I am sorry for the late answer, but the feature works perfectly! Now even those old carts without battery like mine can work again. Thank you!

FWIW I used the 0.5.2 and avoided the PreReleases until they're considered stable.

On the other hand, the L+R to sort/hide save file is very useful. I would still hide by default the dot files without any option to show them, though.

0.5.2 and the pre-release variants are not that different. It's basically the same, but with added emulators. It's "unstable"/ has unexpected behaviour on clone GBAs(EXEQ Game Box SP so far), but otherwise stable on legit/original hardware(NDS/NDSL/GBA/SP)
 

Bandit_Keith

Member
Newcomer
Joined
Jun 28, 2024
Messages
6
Trophies
0
Age
124
XP
26
Country
Canada
thanks dude I will give this a try, you wouldnt happen to know where a list of fastrom games is would you? just so I know what I would need to patch before even attempting to play them.

as for the supercard on my agb001 still no dice tried a different SD card a known good one and still getting issues. loaded the directories this time but folders filled with garbage text. honestly im not too worried about it. it was just something I noticed.
 

GBAUSER19865

New Member
Newbie
Joined
Jul 12, 2024
Messages
2
Trophies
0
Age
23
XP
9
Country
Australia
I ran the suggested update for the firmware using the OFW.frm file provided to account for the c2ba flash chip, this succeeded in updating the firmware which now shows v1.85. Unfortunately the Supercard is now also showing a list of sdram errors and continues to show a flash error quoting the c2ba chip, and wont detect any sd cards. I will attempt to flash back to older firmware using an R4 tomorrow. Any ideas on how to fix this?
 

marizkyu

New Member
Newbie
Joined
Jun 30, 2024
Messages
4
Trophies
0
Age
27
XP
43
Country
Indonesia
hi. question.
ive read that some romhack games (like pokemons) using bigger sav file so they can't be save since supercard only read certain size of sav file. is it a hardware limitation or is it something that can be worked out?
Would love to play some pokemon unbound/radical red on supercard
 

metroid maniac

An idiot with an opinion
OP
Member
Joined
May 16, 2009
Messages
2,126
Trophies
2
XP
3,024
Country
hi. question.
ive read that some romhack games (like pokemons) using bigger sav file so they can't be save since supercard only read certain size of sav file. is it a hardware limitation or is it something that can be worked out?
Would love to play some pokemon unbound/radical red on supercard
Hardware limitation the cart doesn't contain enough save memory. There are theoretical alternatives but it's hard to know whether it'll work unless it's tried.
 
  • Like
Reactions: marizkyu

Bandit_Keith

Member
Newcomer
Joined
Jun 28, 2024
Messages
6
Trophies
0
Age
124
XP
26
Country
Canada
Thank you so much I got the final fantasy games working and metroid zero mission as well. Still can not get Duke Nukem advance to work but thank you for your help. I still cant get the card to work on my standard GBA I tried a different SD card, cleaning it, cleaning the GBA pins. I am not too concerned about it though thank you for your suggestions anyway. I have enough legit games to play on it I dont need the supercard as well. Mostly to run second copies to play multiplayer. Tested out 4 swords with my copy of zelda and the supercard and it worked great :)
 
  • Like
Reactions: OmDRetro

pikachuguay23

Member
Newcomer
Joined
Apr 18, 2024
Messages
7
Trophies
0
XP
20
Country
Spain
HOLA CHICOS, TENGO UNA SUPERCARD QUE HE COMPRADO TRAS BRICKEAR UNA ANTERIOR INSTALANDO CFW. Sigo con el mismo fallo de que no salen los juegos en la seccion lista. Alguien sabe como solucionar esto, o si hay algun tutorial de un software que aplicarle para que funcionen los juegos ? Estoy desesperado y no logro avanzar nada. Leo el foro y literamente no entiendo de que hablan ni nada. Por favor AYUDA
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Bigonya knows