From 45fd0ca73ec84a9b605f918a7b1b3497d2a25b33 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 20 May 2016 15:23:00 +0100 Subject: First pass at NES ROM support. --- doc/casm.html | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/casm.html b/doc/casm.html index 7696136..5581eba 100644 --- a/doc/casm.html +++ b/doc/casm.html @@ -8,13 +8,25 @@ h1 { padding-top: 20px; - padding-top: 10px; + padding-bottom: 10px; } h2 { padding-top: 20px; - padding-top: 10px; + padding-bottom: 10px; +} + +h3 +{ + padding-top: 20px; + padding-bottom: 10px; +} + +h4 +{ + padding-top: 20px; + padding-bottom: 10px; } body @@ -983,6 +995,13 @@ A simple library format that allows the importing of pre-built memory and labels. + +nes + + +A NES ROM file. + + @@ -1323,6 +1342,70 @@ gfx.lib: gfx.asm +

NES ROM File Output Format

+ +

+Generates a ROM file for a NES emulator or hardware. Note that large ROM +sizes have not been extensively checked and verified. +

+ +

It searches for banks with code in the range 0x8000 to 0xffff, or just in the +range 0xc000 to 0xffff if there is just one ROM code bank. Video ROM (VROM) +banks are identified by just using addresses up to 0x1fff.

+ +

The output driver will output the appropriate number of ROM and VROM chunks +to the file depending on these, and will error if there are no ROM banks +or banks using illegal addresses.

+ +

NES ROM Output Format options

+ +

The NES output driver supports the following settings that can be set via +an option command. +

+ + + + + + + + + + + + + + + +
OptionDescription
+option nes-vector, vector, address + +Specifies an address where an IRQ routine is stored, and sets the appropriate +vectors in the appropriate place in memory. irq can either by +reset, nmi or brk.

+ +reset is for the reset vector (i.e. where the ROM runs from). If +undefined a warning is displayed and the vector will automatically be set to +either 0x8000 or 0xc000 according to the ROM size.

+ +nmi is the NMI vector used for the vertical blanking interrupt. If +undefined a warning is issued.

+ +brk is the vector used for software interrupts from the brk command. +This can be left undefined if not needed. +
+option nes-mapper, number + +Sets the mapper type in the output file header. If undefined left at zero, +which is the correct one if you have 16 or 32K of code ROM and 8KB of video +ROM. +
+option nes-tv-format, pal|ntsc + +Defines the TV format stored in the ROM header, defaulting to pal. +
+ +

Listing

-- cgit v1.2.3