Making Super Mario Advance 4 e-reader level cards!

Description: Make level cards that you can print and scan with an e-reader!

Categories: In-Depth Guides, Miscellaneous things (Video game stuff)

Link to this article: Select all

[url=]Knowledge Base - Making Super Mario Advance 4 e-reader level cards![/url]

If you have the SMA4_e-Reader_Project files from GBAtemp, then you'll have the tools to make levels into dotcodes!
Now let's see if I remember how to do this... It's been a while!

Before you start, you WILL need a hex editor and a basic understanding of hexadecimal!

Step 1: Make a level in Smaghetti, and under 'Experiments' (the beaker icon at the bottom right corner of the editor), download the level as binary!

Step 2: If you don't have it already, go to ... ed.529179/ and download SMA4_e-Reader_Project.rar from the first post and extract all the files somewhere using 7-Zip!

Step 3: Navigate to the SMA4 Level Scripts folder and move the .level that you downloaded from Smaghetti there!

Step 4: This is an important step! Find Header.bin, and open that in a hex editor! In 0x72, this is the level ID! Each level that was released was assigned a unique ID which can be a number from 01 to 72, with 73 being a special ID, and being strictly temporary! Nintendo has assigned IDs 01-05, 11-40, and 51-53 to their official levels, leaving the other 35 slots unassigned! My recommendation is to assign your first levels with any of the unassigned IDs, so you can still use Nintendo's levels with any of your levels on the same game pack! All of my levels as of now use the unassigned IDs which can allow anyone to still use Nintendo's levels with mine if they wish to! So anyways, with Header.bin in a hex editor, change the byte 0x72 to any number from (this is in hexadecimal!) 01 to 48, with 49 being a special temporary level that cannot be saved, does not record clear data for Mario & Luigi, or save Ace or e coins, occupies a single spot on the last page of the level list (which can give a tenth page if 65-72 levels are saved, allowing for a grand total of up to 73 levels) that will be removed from the level list if another level card is scanned, and save the file!

Warning for step 4: Do not assign a level with an ID higher than 73 (49 in hex), because it will mess up the level list! Also, if you assign two (or more) level cards the same level ID, scanning those will replace any levels and their record data using the same ID with the new one you scanned! Make sure that all the levels you make use a unique ID! That's why I recommend that you assign your first levels with the unassigned IDs!

Step 5: This is optional, but I recommend that you do this step either way! Open your .level that you moved to the SMA4 Level Scripts folder, and open that with a hex editor! The first 5 bytes are the level properties! 0x0 is the e-coin id, which determines where the e-coin will be placed in the castle if there is one! Valid numbers (in hex) are 01 to 18, with 00 having no e-coin! 01-08 occupies the first floor, 09-16 (hex 09-10) occupies floor 2, and 17-24 (hex 11-18) occupies floor 3! If you are using Nintendo levels with yours, then reserve IDs 09-24 (hex 09-18) for your own e-coins if you want to avoid conflicts, but that's up to you! You can leave 0x01 alone, since that's the ace coin count, and that gets determined by the the editor! 0x02 is the level set! This determines what set your level belongs to! Refer to the attached .txt files for all valid values, but the most common ones are 01 for star, 02 for mushroom, 03 for flower, 04 for heart, and 1F for PR (Promotional)! 0x03 is the set level number (not ID)! Numbers can be from 00 to 99 (hex 00-63)! 0x04 is the level icon! Refer to the attached .txt file for the the list of valid values! Once you have made all of your desired changes in the hex editor, save them!

Step 6: With all that done, find Convert_to_Raw.bat in the SMA4 Level Scripts folder (you should be there now), and run that! Two files called level.bin and level.hex will be created! You're done! Print it out and scan it with an actual e-reader, or scan it with the mGBA emulator, and enjoy your properly coded level!

Level Sets (0x02) (menu icon):

01 - star
02 - mushroom
03 - flower
04 - heart
05 - A
06 - B
07 - C
08 - D
09 - E
0A - F
0B - G
0C - H
0D - I
0E - J
0F - K
10 - L
11 - M
12 - N
13 - O
14 - P
15 - Q
16 - R
17 - S
18 - T
19 - U
1A - V
1B - W
1C - X
1D - Y
1E - Z
1F - PR (promo level)
20 - e (last entry)

Level Icons (0x04) (level info box):

00 - e+ tile (unused in main game)
01 - glowing star
02 - quicksand
03 - world e level select tile
04 - foretess
05 - king's castle
06 - world 5 spiral tower
07 - pyramid
08 - orange mushroom house
09 - castle with square window
0A - airship
0B - tank with gun
0C - "smiling" tank
0D - tank with "mast pole" ("thin tank)
0E - coin ship (kanji is "宝", pronounced takara)
0F - hand
10 - cloud
11 - world 1 background hills
12 - world 2 background tree
13 - world 3 background water tile
14 - flower
15 - ice
16 - muncher plant
17 - fire
18 - world 8 skull
19 - hammer bro
1A - boomerang bro
1B - hammer bro
1C - fire bro
1D - summo bro
1E - orange glitch (halfway between the e level selection tile, with 2 animations)
1F - blank (last entry)