Difference between revisions of "PM Cartridge"

From SublabWiki
Jump to: navigation, search
(Cartridge Overview)
(Cartridge Header)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Cartridge Overview ==
 
== Cartridge Overview ==
The Pokemon Mini cartridge has a 21 bit addressing bus, which up until recently has gone completely unused.  Since the PM has a relatively wide address space, it can provide up to a 2MB worth of data without additional hardware.  One of the more bizzare design choices by Nintendo is that the cartridge address space starts relative to the beginning of the Pokemon Mini's memory space, which is then overwritten by [[PM BIOS|BIOS]], [[PM RAM|RAM]] and [[PM Registers|Internal Register]], making $2100 bytes of ROM space inaccessible except through mirrors.
+
The Pokemon Mini cartridge has a 21 bit addressing bus, which up until recently has gone completely unused.  Since the PM has a relatively wide address space, it can provide up to a 2MB worth of data without additional hardware.  One of the more bizzare design choices by Nintendo is that the cartridge address space starts relative to the beginning of the Pokemon Mini's memory space, which is then overwritten by [[PM Bios|BIOS]], [[PM RAM|RAM]] and [[PM Registers|Internal Register]], making $2100 bytes of ROM space inaccessible except through mirrors.
  
 
After the overloaded memory space, the Pokemon Mini has $D0 byte header standard.  The vast majority of this space is reserved for IRQ jump locations.  Much of the remaining space is plain asciiz info about the game, with a couple of BIOS checked watermarks to verify a ROM is a PM image.
 
After the overloaded memory space, the Pokemon Mini has $D0 byte header standard.  The vast majority of this space is reserved for IRQ jump locations.  Much of the remaining space is plain asciiz info about the game, with a couple of BIOS checked watermarks to verify a ROM is a PM image.
  
Following the header is completely user mapped data.  It is typical for the reset IRQ location to simply jump to $21D0.  The IRQ locations  are 6 bytes in size to accommodate for a long jump (3 bytes) + a U load (3 bytes)
+
Following the header is completely user mapped data.  It is typical for the reset IRQ location to simply jump to $21D0.  The IRQ locations  are 6 bytes in size to accommodate for a U load (3 bytes) and a long jump (3 bytes)
  
 
== Cartridge Header ==
 
== Cartridge Header ==
Line 25: Line 25:
 
| $2108
 
| $2108
 
| 6
 
| 6
| Yes
+
| *
 
| PRC Frame Copy IRQ
 
| PRC Frame Copy IRQ
 
|-
 
|-
 
| $210e
 
| $210e
 
| 6
 
| 6
| Yes
+
| *
 
| PRC Render IRQ
 
| PRC Render IRQ
 
|-
 
|-
 
| $2114
 
| $2114
 
| 6
 
| 6
| Yes
+
| *
 
| Timer 2 Underflow (upper) IRQ
 
| Timer 2 Underflow (upper) IRQ
 
|-
 
|-
 
| $211a
 
| $211a
 
| 6
 
| 6
| Yes
+
| *
 
| Timer 2 Underflow (lower) IRQ
 
| Timer 2 Underflow (lower) IRQ
 
|-
 
|-
 
| $2120
 
| $2120
 
| 6
 
| 6
| Yes
+
| *
 
| Timer 1 Underflow (upper) IRQ
 
| Timer 1 Underflow (upper) IRQ
 
|-
 
|-
 
| $2126
 
| $2126
 
| 6
 
| 6
| Yes
+
| *
 
| Timer 1 Underflow (lower) IRQ
 
| Timer 1 Underflow (lower) IRQ
 
|-
 
|-
 
| $212c
 
| $212c
 
| 6
 
| 6
| Yes
+
| *
 
| Timer 3 Underflow (upper) IRQ
 
| Timer 3 Underflow (upper) IRQ
 
|-
 
|-
 
| $2132
 
| $2132
 
| 6
 
| 6
| Yes
+
| *
 
| Timer 3 Comparator IRQ
 
| Timer 3 Comparator IRQ
 
|-
 
|-
 
| $2138
 
| $2138
 
| 6
 
| 6
| Yes
+
| *
 
| 32hz Timer (256hz linked) IRQ
 
| 32hz Timer (256hz linked) IRQ
 
|-
 
|-
 
| $213e
 
| $213e
 
| 6
 
| 6
| Yes
+
| *
 
| 8hz Timer (256hz linked) IRQ
 
| 8hz Timer (256hz linked) IRQ
 
|-
 
|-
 
| $2144
 
| $2144
 
| 6
 
| 6
| Yes
+
| *
 
| 2hz Timer (256hz linked) IRQ
 
| 2hz Timer (256hz linked) IRQ
 
|-
 
|-
 
| $214a
 
| $214a
 
| 6
 
| 6
| Yes
+
| *
 
| 1hz Timer (256hz linked) IRQ
 
| 1hz Timer (256hz linked) IRQ
 
|-
 
|-
 
| $2150
 
| $2150
 
| 6
 
| 6
| Yes
+
| *
 
| IR Receiver IRQ
 
| IR Receiver IRQ
 
|-
 
|-
 
| $2156
 
| $2156
 
| 6
 
| 6
| Yes
+
| *
 
| Shake Sensor IRQ
 
| Shake Sensor IRQ
 
|-
 
|-
 
| $215c
 
| $215c
 
| 6
 
| 6
| Yes
+
| *
 
| Power Key IRQ
 
| Power Key IRQ
 
|-
 
|-
 
| $2162
 
| $2162
 
| 6
 
| 6
| Yes
+
| *
 
| Right Key IRQ
 
| Right Key IRQ
 
|-
 
|-
 
| $2168
 
| $2168
 
| 6
 
| 6
| Yes
+
| *
 
| Left Key IRQ
 
| Left Key IRQ
 
|-
 
|-
 
| $216e
 
| $216e
 
| 6
 
| 6
| Yes
+
| *
 
| Down Key IRQ
 
| Down Key IRQ
 
|-
 
|-
 
| $2174
 
| $2174
 
| 6
 
| 6
| Yes
+
| *
 
| Up Key IRQ
 
| Up Key IRQ
 
|-
 
|-
 
| $217a
 
| $217a
 
| 6
 
| 6
| Yes
+
| *
 
| C Key IRQ
 
| C Key IRQ
 
|-
 
|-
 
| $2180
 
| $2180
 
| 6
 
| 6
| Yes
+
| *
 
| B Key IRQ
 
| B Key IRQ
 
|-
 
|-
 
| $2186
 
| $2186
 
| 6
 
| 6
| Yes
+
| *
 
| A Key IRQ
 
| A Key IRQ
 
|-
 
|-
 
| $218c
 
| $218c
 
| 6
 
| 6
| Yes
+
| *
 
|
 
|
 
|-
 
|-
 
| $2192
 
| $2192
 
| 6
 
| 6
| Yes
+
| *
 
|
 
|
 
|-
 
|-
 
| $2198
 
| $2198
 
| 6
 
| 6
| Yes
+
| *
 
|
 
|
 
|-
 
|-
 
| $219e
 
| $219e
 
| 6
 
| 6
| Yes
+
| *
 
| Cartridge IRQ
 
| Cartridge IRQ
 
|-
 
|-
Line 174: Line 174:
 
|-
 
|-
 
| $21BE
 
| $21BE
| 12
+
| 18
 
| No
 
| No
 
| Reserved (Zero)
 
| Reserved (Zero)
 
|}
 
|}
 +
 +
* = This is only required if the IRQ is ever enabled.

Latest revision as of 19:15, 28 May 2008

Cartridge Overview

The Pokemon Mini cartridge has a 21 bit addressing bus, which up until recently has gone completely unused. Since the PM has a relatively wide address space, it can provide up to a 2MB worth of data without additional hardware. One of the more bizzare design choices by Nintendo is that the cartridge address space starts relative to the beginning of the Pokemon Mini's memory space, which is then overwritten by BIOS, RAM and Internal Register, making $2100 bytes of ROM space inaccessible except through mirrors.

After the overloaded memory space, the Pokemon Mini has $D0 byte header standard. The vast majority of this space is reserved for IRQ jump locations. Much of the remaining space is plain asciiz info about the game, with a couple of BIOS checked watermarks to verify a ROM is a PM image.

Following the header is completely user mapped data. It is typical for the reset IRQ location to simply jump to $21D0. The IRQ locations are 6 bytes in size to accommodate for a U load (3 bytes) and a long jump (3 bytes)

Cartridge Header

Location Size Required Description
$2100 2 No "PM" marker
$2102 6 Yes Reset Location
$2108 6 * PRC Frame Copy IRQ
$210e 6 * PRC Render IRQ
$2114 6 * Timer 2 Underflow (upper) IRQ
$211a 6 * Timer 2 Underflow (lower) IRQ
$2120 6 * Timer 1 Underflow (upper) IRQ
$2126 6 * Timer 1 Underflow (lower) IRQ
$212c 6 * Timer 3 Underflow (upper) IRQ
$2132 6 * Timer 3 Comparator IRQ
$2138 6 * 32hz Timer (256hz linked) IRQ
$213e 6 * 8hz Timer (256hz linked) IRQ
$2144 6 * 2hz Timer (256hz linked) IRQ
$214a 6 * 1hz Timer (256hz linked) IRQ
$2150 6 * IR Receiver IRQ
$2156 6 * Shake Sensor IRQ
$215c 6 * Power Key IRQ
$2162 6 * Right Key IRQ
$2168 6 * Left Key IRQ
$216e 6 * Down Key IRQ
$2174 6 * Up Key IRQ
$217a 6 * C Key IRQ
$2180 6 * B Key IRQ
$2186 6 * A Key IRQ
$218c 6 *
$2192 6 *
$2198 6 *
$219e 6 * Cartridge IRQ
$21A4 8 Yes "NINTENDO" in plain text
$21AC 4 No Game Code
$21B0 12 No Game Title (Zero Padded)
$21BC 2 No "2P" (Unknown purpose)
$21BE 18 No Reserved (Zero)
  • = This is only required if the IRQ is ever enabled.