Important
4-e's public source code repository is now hosted on Codeberg at mattiebee/4-e. The original public source code repository at GitHub is now a best-effort mirror. Releases will only be published at Codeberg.
4-e sends Super Mario Advance 4 e-Reader cards from the Game Boy Advance it's running on to another running Mario. It uses decoded .bin files of those cards' data instead of printed cards an an actual e-Reader.
It can send level, power-up, and demo cards between real Game Boys Advance and Analogue Pockets using link cables. It can also send cards between mGBA multiplayer windows. No e-Reader or e-Reader ROM is required.
Need .bin files? The latest versions of the Smaghetti editor for Mario can save .bin files. Head to the flask icon in the lower-right corner of the editor to access Experiments—you can download your levels as .bin files there!
Gather your cards in ".bin" format.
Download the base "4-e.gba" ROM from releases, or build it with devkitARM:
gmakeIf you want to build a multiboot ROM, you can use an alternate target:
gmake PROJECT=4-e_mbThe easiest way to attach cards is with gbfs-web](https://mattiebee.app/gbfs-web). Select your 4-e ROM, select your cards, and save a new 4-e ROM with the cards attached.
You can also use the standard tools from GBFS to create a GBFS file, then concatenate it to 4-e.gba. These tools are also included in the "gba-tools" package in devkitARM.
gbfs cards.gbfs *.bin
cat 4-e.gba cards.gbfs >"4-e with Cards.gba"If you have a lot of cards, since v3.0 you can also attach multiple GBFS files and treat them as "stacks" you can page through.
Note
Each GBFS file must be padded to 256 bytes for this to work correctly. You can use the "padbin" tool available in the GBFS distribution or devkitARM to do this.
gbfs a.gbfs a/*.bin
padbin 256 a.gbfs
gbfs b.gbfs b/*.bin
padbin 256 b.gbfs
cat 4-e.gba a.gbfs b.gbfs >"4-e with Stacks.gba"-
On one Game Boy Advance, run Super Mario Advance 4. Connect the player-1 end of a link cable to this system.
-
On another Game Boy Advance, run the 4-e ROM you built. Connect the player-2 end of the link cable to this system.
-
Pick the e-Card you wish you send from the list. (If your GBFS file only had one e-Card in it, it will be selected automatically; you won't see the list.) 4-e says "Waiting..."
[!NOTE] From this point on, you can cancel and start over by pressing B.
-
On the first system, start the e-Reader communication process. 4-e will connect to the game automatically and send your card, saying "Sending..."
-
When 4-e has finished ("Done!"), press any button. Now you can send another card, if you wish!
If you're having communication issues, such as communication not starting or check that your link cable is connected firmly and correctly.
-
If you're using the official Nintendo link cable, it must be connected with the purple end to the game and the gray end to 4-e.
-
If you're using the Analogue Pocket link cable, it must be switched to GBA mode, not GB/C mode. The end closest to the switch is player 1 (the Mario end); the other end is player 2 (the 4-e end).
If 4-e says
No card data attached. See instructions.
check that you built your ROM correctly and that the built ROM is the one you launched on your Game Boy Advance.
If 4-e is behaving oddly, doesn't let you switch stacks (if you have more than one), or says
Error reading card data. See instructions.
check that you've built and attached your GBFS files correctly.
gbfs-web does this for you. You shouldn't run into problems if you used this method.
If you're building on the command line, make sure you've built and concatenated the GBFS file correctly and (if you're using multiple stacks) padded each file to 256 bytes.
4-e is built on, and takes inspiration from, all these projects and people:
-
devkitARM, the community-maintained toolchain to build it all.
-
gba-makefile-template, providing a solid base to build on.
-
Tonc and libtonc, the libraries supporting everything you see and interact with.
-
Usenti, the pixel editor made by Tonc's author, which I used to create the new "four" font used in v4.0.
-
GBATEK (specifically the section on GBA Communication Ports), the definitive guide to how the GBA hardware works.
-
GBFS, for providing a ready-made solution for bringing files to a system that has no filesystem.
-
mGBA and especially its serial logging, which made it possible for me to black-box reverse-engineer the protocol Mario used to talk to the e-Reader.
-
The GB Operator, which dumped ROMs from my copy of Mario and my e-Reader that I could use with mGBA.
-
Super Mario Wiki and their list of e-Reader cards, for information on the many cards I never saw in the US.
A huge special thanks to the community over the past decades for digging into the e-Reader and Super Mario Advance 4. Without your work, I could never have pulled this off.
And, of course, Nintendo. You didn't help any of us make this, but you did make the game I loved so much in the first place—inspiring me to see if I could take it further.

