pewpew/header.asm

58 lines
1.5 KiB
NASM
Raw Normal View History

2015-05-22 18:24:25 +00:00
; LoRom header.
.MEMORYMAP
SLOTSIZE $8000 ; The slot is $8000 bytes in size.
DEFAULTSLOT 0 ; The SNES only has 1 slot.
2015-05-22 16:49:40 +00:00
SLOT 0 $8000 ; Define's Slot 0's starting address.
2015-05-22 18:24:25 +00:00
.ENDME
2015-05-22 16:49:40 +00:00
2015-05-22 18:24:25 +00:00
.ROMBANKSIZE $8000 ; Every ROM bank is 32 KB in size.
.ROMBANKS 8 ; 8 ROM banks = 2 Mb (256 KB).
2015-05-22 16:49:40 +00:00
.SNESHEADER
2015-05-22 18:24:25 +00:00
ID "SNES"
2015-05-22 16:49:40 +00:00
2015-05-22 18:24:25 +00:00
NAME "PEW PEW " ; Program title. Should be 21 bytes long;
2015-05-22 16:49:40 +00:00
; "123456789012345678901" ; use spaces for unused bytes of the name.
SLOWROM
LOROM
2015-05-22 18:24:25 +00:00
CARTRIDGETYPE $00 ; $00 = ROM only.
ROMSIZE $08 ; $08 = 2 Mbits.
SRAMSIZE $00 ; No SRAM.
COUNTRY $01 ; $01 = U.S.; $00 = Japan.
LICENSEECODE $00
2015-05-22 16:49:40 +00:00
VERSION $00 ; $00 = 1.00, $01 = 1.01, etc.
.ENDSNES
2015-05-22 18:24:25 +00:00
.SNESNATIVEVECTOR ; Native Mode interrupt vector table.
2015-05-22 16:49:40 +00:00
COP EmptyHandler
BRK EmptyHandler
ABORT EmptyHandler
NMI VBlankHandler
IRQ EmptyHandler
.ENDNATIVEVECTOR
2015-05-22 18:24:25 +00:00
.SNESEMUVECTOR ; Emulation Mode interrupt vector table.
2015-05-22 16:49:40 +00:00
COP EmptyHandler
ABORT EmptyHandler
NMI EmptyHandler
RESET Start
IRQBRK EmptyHandler
.ENDEMUVECTOR
2015-05-22 18:24:25 +00:00
; Defines the ROM bank and the slot it is inserted in memory.
; .ORG 0 is really $8000, because the slot starts at $8000.
.BANK 0 SLOT 0
.ORG 0
2015-05-22 16:49:40 +00:00
.SECTION "EmptyVectors" SEMIFREE
EmptyHandler:
2015-05-22 18:24:25 +00:00
rti
2015-05-22 16:49:40 +00:00
.ENDS
; Fills unused areas with $00.
; This is the opcode for BRK, which will halt the SNES if executed.
2015-05-22 16:49:40 +00:00
.EMPTYFILL $00