Motocross Maniacs/Notes

From Data Crystal
Jump to navigation Jump to search
Motocross Maniacs
Internal Name xxx
Region Code xxx
Type Grayscale Game
SGB Support xxx
Cartridge Type xxx
License Code xxx
ROM Size xxx
ROM Checksum xxx
SRAM Size xxx
Header Checksum xxx

The goal of these notes is to provide enough elements for someone to hopefully write a basic level editor.

This tiny ROM only contains 2 banks. And no bank swaps = less headaches!

Level data

General idea

The track of levels 1 to 8 are simply a sequences of track objects, such as ramps, bumps, etc.
Below is the level 1 track: floor, small triangular ramp, floor, etc.
 Motocross Maniacs ScreenData.png
A track object is an array of metatiles, where each metatile is 16x16px (each metatile is a 2x2 array of regular 8x8px tiles).
Below is a small triangular ramp object: it's made of 4 metatiles (each in a different color), and each metatile is made of 4 tiles.
 Motocross Maniacs TriangularRamp.png

Track data

Track data structure

In the ROM data, a track is defined by a sequence of 3-byte words YY XX ZZ:
* YY XX = coordinates from top left of the level
* ZZ = objectID
Below is a sample of level 1 data, with 3-byte word highlighted.
 Motocross Maniacs Level1Data.png
The first floor object (ID=x0F) is at (x00,x00), the second small triangular ramp object (ID=x0E) is at (x0A,x01), etc.

Track data location in ROM

* 0x4760-0x476F - table of 8 pointers to the 8 tracks
* 0x4770-0x4908 - track 1 data
* 0x4909-0x4AE3 - track 2 data
* 0x4AE4-0x4C8E - track 3 data
* 0x4C8F-0x4E9C - track 4 data
* 0x4E9D-0x5062 - track 5 data
* 0x5063-0x52A0 - track 6 data
* 0x52A1-0x54C0 - track 7 data
* 0x54C1-0x56CB - track 8 data
Note that each chunk of track data ends with xFF.

Track object data

Track object data structure

In the ROM data, a track object is defined by a sequence of bytes XX YY AA BB....
 * XX YY define the metatile array's dimensions: XX rows and YY columns.
 * AA BB... are the metatileIDs that will fill the array, one line at a time.
Below are the first two objects of level 1: a floor object, followed by a small triangular ramp object.
  Motocross Maniacs ObjectDefinition.png
  * The floor object is a row of x0A metatiles with ID x09.
  * The small triangular ramp object is a 2x2 array of metatiles x0A, x0B, xC and x0D.

Track object data location in ROM

* x56CC-x5793 - table of 100 pointers to track object definitions
* x5794-x579F - 1x9 floor
* x57A0-x57A5 - 2x2 small triangular ramp 
* ...
* x5A19-x5A1E - 2x2 something (todo)

Metatile data

Metatile data structure

Metatiles are 16x16px, and are made from 2x2 arrays of 8x8px tiles.
They are defined with 4 consecutive bytes, the first two are the top half of the array, the last two are the lower half.
Motocross Maniacs TriangularRamp.png
The top-left metatile (in red) is defined by x7F x7F x7F x1E, where x7F is blank and x1E is a chunk of ramp.
The bottom-left metatile (in yellow) is defined by x1E x1A x8E x8E, where x1A is an inner chunk of ramp, and x8E is floor.

Metatile data location in ROM

* x5A1F-5C8E

Item data

Items are the various power-ups you can collect throughout a level: N for Nitrous boost, T for tires, S for speed, etc.
Motocross Maniacs Items.png

Item data structure

In the ROM data, items are defined by 3-byte words YY XX ZZ:
* YY XX = coordinates from top left of the level
* ZZ = itemID
Possible IDs are:
* x02 = S for speed
* x03 = T for tire
* x04 = N for nitro
* x05 = R for traction
* x06 = mini-bikers (invisible)
* x07 = jet (invisible)

Item data location in ROM

* 0x5EAB-0x5F0A - table of 8 pointers to item data for each of the 8 tracks
* 0x5F0B-0x5F53 - track 1 item data
* 0x5F54-0x5F90 - track 2 item data
* 0x5F91-0x5FBE - track 3 item data
* 0x5FBF-0x5FF8 - track 4 item data
* 0x5FF9-0x603B - track 5 item data
* 0x603C-0x60AC - track 6 item data
* 0x60AD-0x6078 - track 7 item data
* 0x6079-0x60E9 - track 8 item data
Note that each chunk of item data ends with xFF.

Text data

Text data structure

Below are various text elements from the game, as well as their respective ROM locations.
Text data is a sequence of words, each word structured as follows:
* 2 bytes for the display address
* a sequence of text tiles for the word
* a terminal xFE when the word is finished
* a terminal xFF when the text is finished

Text data location in ROM

Pre-race screen

Motocross Maniacs PreRaceScreen.png
* x0F37-x0F91 -