Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.
The wiki has recently moved; please report any issues in Discord. Pardon the dust.
Motocross Maniacs/Notes: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
}} | }} | ||
The goal of these notes is to provide enough elements for someone to hopefully write a basic level editor. | 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 switching = less headaches for disassembly! | This tiny ROM only contains 2 banks. And no bank switching = less headaches for disassembly! | ||
== Level data == | == Level data == | ||
Line 22: | Line 21: | ||
Below is the beginning of the level 1 track: floor, small triangular ramp, floor, etc. | Below is the beginning of the level 1 track: floor, small triangular ramp, floor, etc. | ||
[[Image:Motocross_Maniacs_ScreenData.png|600px]] | [[Image:Motocross_Maniacs_ScreenData.png|600px]] | ||
A <b>track object</b> is an array of <b>metatiles</b>, where each <b>metatile</b> is 16x16px (each metatile is a 2x2 array of regular 8x8px tiles). | A <b>track object</b> is an array of <b>metatiles</b>, where each <b>metatile</b> 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. | 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. | ||
[[Image:Motocross_Maniacs_TriangularRamp.png|200px]] | [[Image:Motocross_Maniacs_TriangularRamp.png|200px]] | ||
=== Track data === | === Track data === | ||
==== Track data structure ==== | ==== Track data structure ==== | ||
Line 36: | Line 33: | ||
The first object is floor (ID=<b>x00</b>), located at (<b>x0F</b>,<b>x00</b>). | The first object is floor (ID=<b>x00</b>), located at (<b>x0F</b>,<b>x00</b>). | ||
The second object is a small triangular ramp (ID=<b>x01</b>), located at (<b>x0E</b>,<b>x0A</b>). | The second object is a small triangular ramp (ID=<b>x01</b>), located at (<b>x0E</b>,<b>x0A</b>). | ||
==== Track data location in ROM ==== | ==== Track data location in ROM ==== | ||
* <b>0x4760-0x476F</b> - table of 8 pointers to the 8 tracks | * <b>0x4760-0x476F</b> - table of 8 pointers to the 8 tracks | ||
Line 70: | Line 66: | ||
The top-left metatile (in red) is defined by <b>x7F x7F x7F x1E</b>, where <b>x7F</b> is blank and <b>x1E</b> is a chunk of ramp. | The top-left metatile (in red) is defined by <b>x7F x7F x7F x1E</b>, where <b>x7F</b> is blank and <b>x1E</b> is a chunk of ramp. | ||
The bottom-left metatile (in yellow) is defined by <b>x1E x1A x8E x8E</b>, where <b>x1A</b> is an inner chunk of ramp, and <b>x8E</b> is floor. | The bottom-left metatile (in yellow) is defined by <b>x1E x1A x8E x8E</b>, where <b>x1A</b> is an inner chunk of ramp, and <b>x8E</b> is floor. | ||
==== Metatile data location in ROM ==== | ==== Metatile data location in ROM ==== | ||
* <b>x5A1F-5C8E</b> | * <b>x5A1F-5C8E</b> | ||
Line 77: | Line 72: | ||
These items are placed on the course just like the other track objects. | These items are placed on the course just like the other track objects. | ||
[[Image:Motocross_Maniacs_Items.png|600px]] | [[Image:Motocross_Maniacs_Items.png|600px]] | ||
==== Item data structure ==== | ==== Item data structure ==== | ||
In the ROM data, items are defined by 3-byte words <b>YY XX ZZ</b>: | In the ROM data, items are defined by 3-byte words <b>YY XX ZZ</b>: | ||
Line 89: | Line 83: | ||
* <b>x06</b> = mini-bikers hitbox (invisible) | * <b>x06</b> = mini-bikers hitbox (invisible) | ||
* <b>x07</b> = jet hitbox (invisible) | * <b>x07</b> = jet hitbox (invisible) | ||
==== Item data location in ROM ==== | ==== Item data location in ROM ==== | ||
Note that data for level 8 appears before data for level 7. | Note that data for level 8 appears before data for level 7. | ||
Line 106: | Line 99: | ||
A table of 8 bytes at <b>x677C</b> specifies which background music to play for each of the 8 levels: | A table of 8 bytes at <b>x677C</b> specifies which background music to play for each of the 8 levels: | ||
<b>x20 x1E x1F x1D x20 x1E x1F x1D</b> | <b>x20 x1E x1F x1D x20 x1E x1F x1D</b> | ||
The musicIDs are (note the IDs are not in level order): | The musicIDs are (note the IDs are not in level order): | ||
* <b>x20</b> - level 1 music (same as level 5) | * <b>x20</b> - level 1 music (same as level 5) | ||
Line 152: | Line 144: | ||
<b>0x2F66-0x2F6D</b> "TIME UP" | <b>0x2F66-0x2F6D</b> "TIME UP" | ||
<b>0x2F6E-0x2F75</b> (row of 9 gray tiles) | <b>0x2F6E-0x2F75</b> (row of 9 gray tiles) | ||
=== Gameplay data === | |||
==== Gravity data ==== | |||
<b>0x2143-0x214A</b> - a table of 8 bytes that is continuously read during the game, it specifies gravity pull. | |||
Changing all bytes to <b>x38</b> creates a very slow descent for instance. |
Revision as of 09:13, 21 April 2023
Motocross Maniacs | |
Internal Name | "MOTOCROSSMANIAC" |
Region Code | x01 (non-Japanese) |
Type | Grayscale Game |
SGB Support | x00 (not SGB) |
Cartridge Type | ROM |
License Code | x0000 (new license) |
ROM Size | x00 (32 KiB) |
ROM Checksum | x4EEF |
SRAM Size | xxx |
Header Checksum | x57 |
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 switching = less headaches for disassembly!
Level data
General idea
The track of levels 1 to 8 are simply sequences of track objects, such as ramps, bumps, etc. Below is the beginning of the level 1 track: floor, small triangular ramp, floor, etc. 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.
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 words highlighted. The first object is floor (ID=x00), located at (x0F,x00). The second object is a small triangular ramp (ID=x01), located at (x0E,x0A).
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. * 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. 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. These items are placed on the course just like the other track objects.
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 hitbox (invisible) * x07 = jet hitbox (invisible)
Item data location in ROM
Note that data for level 8 appears before data for level 7.
* 0x5EAB-0x5F0A - table of 8 pointers to item data for each of the 8 tracks x5F0B x5F54 x5F91 x5FBF x5FF9 x603C x60AD x6079 * 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-0x6078 - track 6 item data * 0x6079-0x60AC - track 8 item data * 0x60AD-0x60E9 - track 7 item data Note that each chunk of item data ends with xFF.
Music data
A table of 8 bytes at x677C specifies which background music to play for each of the 8 levels: x20 x1E x1F x1D x20 x1E x1F x1D The musicIDs are (note the IDs are not in level order): * x20 - level 1 music (same as level 5) * x1E - level 2 music (same as level 6) * x1F - level 3 music (same as level 7) * x1D - level 4 music (same as level 8) You can also use other (short) tunes from the game as well: * x19 - level select menu music * x1A - victory music, but no record * x1B - victory music, with a record * x1C - game over music
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
Title screen
0x0EC1-0x0EC5 "TM" (from the Motocross Maniacs logo) at x990F 0x0EC6-0x0EDC "TM AND © 1989 KONAMI" at x9940 0x0EDD-0x0EEF "INDUSTRY CO.,LTD." at x9960 0x0EDD-0x0EEF "INDUSTRY CO.,LTD." at x9960 0x0EF0-0x0F07 "LICENSED BY NINTENDO " (yes, an extra blank tile) at x9980 0x0F14-0x0F1A "SOLO" at x99E6 0x0F1B-0x0F28 "VS COMPUTER" at x99E6 0x0F29-0x0F36 "VS 2-PLAYER" at x9A06
Game over screen
Fun fact: the game over text data is nested in the title screen text data. 0x0F08-0x0F13 "GAME OVER" at x98E6
Pre-race screen
0x0F37-0x0F48 "QUALIFYING TIME" at x99A3 0x0F49-0x0F4F ": :" at x99E8 0x0F50-0x0F5D row of 11 gray tiles at x9865 0x0F5E-0x0F6B " COURSE " at x9885 0x0F6C-0x0F79 row of 11 gray tiles at x98A5 0x0F7A-0x0F8A "COURSE RECORD" at x9924 0x0F8B-0x0F8F ": :" at x9968
Time up screen
This message doesn't contain a display address, only the text itself. 0x2F66-0x2F6D "TIME UP" 0x2F6E-0x2F75 (row of 9 gray tiles)
Gameplay data
Gravity data
0x2143-0x214A - a table of 8 bytes that is continuously read during the game, it specifies gravity pull. Changing all bytes to x38 creates a very slow descent for instance.