Motocross Maniacs/Notes: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
|game=Motocross Maniacs
|game=Motocross Maniacs
}}
}}
 
The goal of these notes is to provide enough elements for someone to build a basic level editor.
The ROM only contains 2 banks!
== Level data ==
== Level data ==
=== General idea ===
=== General idea ===
==== Track definitions ====
  The <b>track</b> of levels 1 to 8 are simply a sequences of <b>track objects</b>, such as ramps, bumps, etc.
  A <b>track</b> is simply a sequence of <b>objects</b>, such as ramps, bumps, etc.
  Below is the level 1 track: floor, small triangular ramp, floor, etc.
  Below is 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 itself 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.
  [[Image:Motocross_Maniacs_TriangularRamp.png|200px]]
=== Track data ===
==== Track data structure ====
  In the ROM data, a <b>track</b> is a sequence of 3-byte words <b>YY XX ZZ</b>:
  In the ROM data, a <b>track</b> is a sequence of 3-byte words <b>YY XX ZZ</b>:
  * <b>ZZ</b> = objectID
* <b>ZZ</b> = objectID
  * <b>YY XX</b> = coordinates from top left of the level
* <b>YY XX</b> = coordinates from top left of the level
  Below is level 1 data, with each 3-byte word highlighted.
  Below is a sample of level 1 data, with 3-byte word highlighted.
   [[Image:Motocross_Maniacs_Level1Data.png|600px]]
   [[Image:Motocross_Maniacs_Level1Data.png|600px]]
  The first floor object (ID=x0F) is at (x00,x00), the second small triangular ramp object (ID=x0E) is at (x0A,x01), etc.
  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 ====
==== Object definitions ====
  * 0x4760-0x476F - table of 8 pointers to the 8 tracks
  An <b>object</b> is an array of <b>metatiles</b>, where each <b>metatile</b> is itself a 2x2 array of regular 8x8px tiles.
* 0x4770-0x4908 - track 1 data
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.
* 0x4909-0x4AE3 - track 2 data
  [[Image:Motocross_Maniacs_TriangularRamp.png|200px]]
* 0x4AE4-0x4C8E - track 3 data
  In the ROM data, a track <b>object</b> is a sequence of bytes <b>XX YY AA BB...</b>.
* 0x4C8F-0x4E9C - track 4 data
   * <b>XX YY</b> define the <b>metatile</b> array's dimensions, <b>XX</b> rows, <b>YY</b> columns.
* 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 <b>xFF</b>.
=== Track object data ===
==== Track object data structure ====
  In the ROM data, a <b>track object</b> is defined by a sequence of bytes <b>XX YY AA BB...</b>.
   * <b>XX YY</b> define the <b>metatile</b> array's dimensions: <b>XX</b> rows and <b>YY</b> columns.
   * <b>AA BB...</b> are the metatileIDs that will fill the array, one line at a time.
   * <b>AA BB...</b> 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.
  Below are the first two objects of level 1: a floor object, followed by a small triangular ramp object.
  [[Image:Motocross_Maniacs_ObjectDefinition.png|600px]]
  [[Image:Motocross_Maniacs_ObjectDefinition.png|600px]]
  * The floor object is a row of <b>x0A</b> metatiles with ID <b>x09</b>.
  * The floor object is a row of <b>x0A</b> metatiles with ID <b>x09</b>.
  * The small triangular ramp object is a 2x2 array of metatiles <b>x0A</b>, <b>x0B</b>, <b>xC</b> and <b>x0D</b>.
  * The small triangular ramp object is a 2x2 array of metatiles <b>x0A</b>, <b>x0B</b>, <b>xC</b> and <b>x0D</b>.
== Item data ==
=== Item data structure ===
<b>Items</b> are the various power-ups you can collect throughout a level: <b>N</b> for Nitrous boost, <b>T</b> for tires, <b>S</b> for speed, etc.
They are placed on
=== Item data location in ROM ===
* 0x5EAB-0x5F0A - table of 8 pointers to item data for each of the 8 tracks
* 0x5F0B-0x4908 - track 1 data
* 0x5F54-0x5F90 - track 2 data
* 0x5F91-0x4AE3 - track 3 data
* 0x5FBF-0x4C8E - track 4 data
* 0x5FF9-0x4E9C - track 5 data
* 0x603C-0x5062 - track 6 data
* 0x60AD-0x52A0 - track 7 data
* 0x6079-0x54C0 - track 8 data
Note that each chunk of item data ends with <b>xFF</b>.

Revision as of 21:00, 20 April 2023

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 build a basic level editor. The ROM only contains 2 banks!

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 itself 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 a sequence of 3-byte words YY XX ZZ:
* ZZ = objectID
* YY XX = coordinates from top left of the level
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.

Item data

Item data structure

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

Item data location in ROM

* 0x5EAB-0x5F0A - table of 8 pointers to item data for each of the 8 tracks
* 0x5F0B-0x4908 - track 1 data
* 0x5F54-0x5F90 - track 2 data
* 0x5F91-0x4AE3 - track 3 data
* 0x5FBF-0x4C8E - track 4 data
* 0x5FF9-0x4E9C - track 5 data
* 0x603C-0x5062 - track 6 data
* 0x60AD-0x52A0 - track 7 data
* 0x6079-0x54C0 - track 8 data
Note that each chunk of item data ends with xFF.