Difference between revisions of "FF1NES"

From Final Fantasy Inside
Jump to navigation Jump to search
my_wiki>Halkun
m (5 revisions imported)
 
(3 intermediate revisions by 3 users not shown)
Line 6: Line 6:
  
 
A typical NES ROM downloaded from the Internet almost always has a 10 byte header at the beginning. For our purposes, this data is going to be thrown away. This is for two reasons.
 
A typical NES ROM downloaded from the Internet almost always has a 10 byte header at the beginning. For our purposes, this data is going to be thrown away. This is for two reasons.
 
+
* This document assumes you have an original ROM dump and not something downloaded.
*This document assumes you have an original ROM dump and not something downloaded.
+
* It messes up bank boundaries and offsets by 10 bytes, making it harder to point to data
*It messes up bank boundaries and offsets by 10 bytes, making it harder to point to data
 
 
 
 
The following below is a map of the ROM.
 
The following below is a map of the ROM.
  
{| border="0" cellspacing="1" cellpadding="3" style="background: rgb(0,0,0)" align="center"
+
{| class="wikitable"
! style="background:rgb(204,204,204)" align="center" | Bank
+
! Bank !! Data Within
! style="background:rgb(204,204,204)" align="center" | Data Within
 
|-
 
|style="background:rgb(255,255,255)" | Bank 0
 
|style="background:rgb(255,255,255)" align="center" | Inital values
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 1
+
| Bank 0 || Inital values
|style="background:rgb(255,255,255)" align="center" | Overworld map and decompresser
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 2
+
| Bank 1 || Overworld map and decompresser
|style="background:rgb(255,255,255)" align="center" | Overworld Graphics/sprites
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 3
+
| Bank 2 || Overworld Graphics/sprites
|style="background:rgb(255,255,255)" align="center" | Town/Dungeon graphics
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 4
+
| Bank 3 || Town/Dungeon graphics
|style="background:rgb(255,255,255)" align="center" | Town/Dungeon maps and decompresser
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 5
+
| Bank 4 || Town/Dungeon maps and decompresser
|style="background:rgb(255,255,255)" align="center" | Code
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 6
+
| Bank 5 || Code
|style="background:rgb(255,255,255)" align="center" | Code
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 7
+
| Bank 6 || Code
|style="background:rgb(255,255,255)" align="center" | Battle Graphics (Overworld)
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 8
+
| Bank 7 || Battle Graphics (Overworld)
|style="background:rgb(255,255,255)" align="center" | Battle Graphics (Dungeon)
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank 9
+
| Bank 8 || Battle Graphics (Dungeon)
|style="background:rgb(255,255,255)" align="center" | Shop/menu text/character battle/minimap
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank A
+
| Bank 9 || Shop/menu text/character battle/minimap
|style="background:rgb(255,255,255)" align="center" | Dialog
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank B
+
| Bank A || Dialog
|style="background:rgb(255,255,255)" align="center" | Bridge Crossing/Ending Event
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank C
+
| Bank B || Bridge Crossing/Ending Event
|style="background:rgb(255,255,255)" align="center" | Armor/weapon data
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank D
+
| Bank C || Armor/weapon data
|style="background:rgb(255,255,255)" align="center" | Code + Crystal Graphics
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank E
+
| Bank D || Code + Crystal Graphics
|style="background:rgb(255,255,255)" align="center" | Code
 
 
|-
 
|-
|style="background:rgb(255,255,255)" | Bank F
+
| Bank E || Code
|style="background:rgb(255,255,255)" align="center" | Kernel
 
 
|-
 
|-
 +
| Bank F || Kernel
 
|}
 
|}

Latest revision as of 05:10, 23 May 2019

To understand how the data is organized for Final Fantasy 1, you must first understand how the original NES operated.

The NES had a 6502 microprocessor, this gave the system a maximum of 65,536 bytes, or 64K of addressable memory. At the time, RAM was very expensive, costing upwardly of one dollar per kilobyte of storage. When Nintendo created the original NES, the game slot plugged in 32K of ROM, split into two sections of 16K each. As games grew, "mapping" technologies allowed the top half of 16K to be swapped out for other sections of 16K ROM.

FF1 uses this technology to organize it's ROM. The game is split into 16 banks of 16K each. (This means the whole game is 256K in size.)

A typical NES ROM downloaded from the Internet almost always has a 10 byte header at the beginning. For our purposes, this data is going to be thrown away. This is for two reasons.

  • This document assumes you have an original ROM dump and not something downloaded.
  • It messes up bank boundaries and offsets by 10 bytes, making it harder to point to data

The following below is a map of the ROM.

Bank Data Within
Bank 0 Inital values
Bank 1 Overworld map and decompresser
Bank 2 Overworld Graphics/sprites
Bank 3 Town/Dungeon graphics
Bank 4 Town/Dungeon maps and decompresser
Bank 5 Code
Bank 6 Code
Bank 7 Battle Graphics (Overworld)
Bank 8 Battle Graphics (Dungeon)
Bank 9 Shop/menu text/character battle/minimap
Bank A Dialog
Bank B Bridge Crossing/Ending Event
Bank C Armor/weapon data
Bank D Code + Crystal Graphics
Bank E Code
Bank F Kernel