Skip to content

Latest commit

 

History

History
164 lines (85 loc) · 4.58 KB

README.md

File metadata and controls

164 lines (85 loc) · 4.58 KB

SMBLevelDrawer

A program to draw images of Super Mario Bros. level data.

How to Use

java -jar SMBLevelDrawer.jar [arguments]

You will need to supply your own game ROMs to draw levels from the games the supported games are:

  • Super Mario Bros. (NES)
  • Super Mario Bros. (FDS)
  • All Night Nippon: Super Mario Bros. (FDS)
  • VS. Super Mario Bros. (NES conversion)
  • Super Mario Bros. 2 (FDS)

However with additional inputs you can supply any file with level data in it along with some pointers to the data within that file to draw arbitrary levels.

Arguments

Input File

-i <filename>

-input <filename>

The file to read level data from. Supply one of the games above and the program will detect it so you can just specify a level number.

Input BIOS File

-b <filename>

-bios <filename>

The file to read the FDS BIOS from. This is necessary to more accurately draw glitch levels on the FDS games, but is not required.

Input Inline Level Data

-n <tiledata> <spritedata> <leveltype>

-inline <tiledata> <spritedata> <leveltype>

Instead of reading from a file, you can supply level data in the arguments. <tiledata> and <spritedata> are hex digits, e.g. 5001A813FD. <leveltype> is 0 for underwater, 1 for overworld, 2 for underground, and 3 for castle.

Output File

-o <filename>

-output <filename>

The output .png file. Default value is output.png.

Level Name

-l <levelname>

-level <levelname>

What level to draw. Format is W-L.S where W is the world number, L is the level number within the world, and S is the sublevel within the level. the .S part is not required, and defaults to .1, the first room of that level. In order for this argument to work, you have to supply one of the supported game ROMs.

Level ID

-d <levelid>

-id <levelid>

What level to draw. Format is a 7-bit integer corresponding to the level's internal ID (0-127). In order for this argument to work, you have to supply one of the supported game ROMs.

Level Address

-a <tileaddress> <spriteaddress> <leveltype>

-address <tileaddress> <spriteaddress> <leveltype>

What level to draw. These are two offsets into the input file--the first marks the tile object data (the level header), and the second marks the sprite data. <leveltype> is 0 for underwater, 1 for overworld, 2 for underground, and 3 for castle. This argument is required if you don't supply one of the supported game ROMs, as it is the only way to know where the level data is located within the input file. For supported game ROMs, the addresses are within the NES's address space. For other input files, the addresses are offsets from the start of the file.

If you supply a ROM file, but don't supply a level name, ID, or address, the program will draw all levels and sublevels in the game.

Game

-g <game>

-game <game>

What game to use. This is only used if you don't supply one of the supported game ROMs. Each of the different games have slightly different rules for decoding level data, so you can choose which one to use here. <game> is smb, for SMB NES, smbfds for SMB FDS, smbll for SMB2 FDS, annsmb for ANN:SMB, or vssmb for VS. SMB. Default value is smb.

Disk File

-f <file>

-file <file>

Forces the corresponding disk file to be loaded while decoding the level data. Only useful for accurate glitch levels. <file> can be 1, 2, 3, or 4. Default is whatever file the level is normally in, or 1 if not applicable or -a is used.

Second Quest

-second-quest

Enables the second quest. Not applicable to SMB2, but can be turned on anyway. Turns Goombas into Buzzy Beetles and makes levels more difficult their first time around.

Disable Tiles / Sprites

-no-tiles

-no-sprites

Don't render tiles or sprites in the final output.

No Block Contents

-no-block-contents

Don't show semi-opaque icons of what items are inside certain blocks.

Width

-width <screens>

The width of the generated output file in screens (256 pixel increments). Default will draw the entire level, with some buffer at the end.

Zoom

-zoom <scale>

An integer (1, 2, 3, etc.) to scale the final image by.

Verbose Data

-verbose-tiles

-verbose-sprites

Show markers for each of the tile objects and sprites, along with the data corresponding to those objects.

Other

This program is not guaranteed to be 100% accurate. All normal levels draw correctly, but glitch levels may not be perfect. It seems there is an endless amount of little quirks in the level loading routine that cause certain oddities that never actually come up in normal gameplay.