; a NES MMC4 cartridge, uses iNES mapper 10
; 8×16 kB PRGROM and 32×4kB CHRROM
; $c000–$ffff is assumed to be fixed to prgrom7, $8000-$bfff can be switched
; the initial values for variables are stored in prgrom0
; has switchable mirroring; call set_vertical_mirroring() or set_horizontal_mirroring() to switch
; uses extra 8K of RAM at $6000–$7fff that is not battery-backed:
; - to disable it, change byte #10 of the header from $07 to 0 and remove the ram segment
; - to make it battery-backed, change byte #10 of the header from $07 to $77
; output file size: 262160 bytes

[compilation]
arch=ricoh
modules=nes_hardware,nes_routines,default_panic,nes_mmc4,stdlib

[allocation]
zp_bytes=all

segments=default,ram,prgrom0,prgrom1,prgrom2,prgrom3,prgrom4,prgrom5,prgrom6,prgrom7,chrrom0,chrrom1
default_code_segment=prgrom7
ram_init_segment=prgrom0

segment_default_start=$200
segment_default_end=$7ff
segment_default_bank=$ff

segment_ram_start=$6000
segment_ram_end=$7fff
segment_ram_bank=$ff

segment_prgrom7_start=$c000
segment_prgrom7_end=$ffff
segment_prgrom7_bank=7

segment_prgrom0_start=$8000
segment_prgrom0_end=$bfff
segment_prgrom0_bank=0

segment_prgrom1_start=$8000
segment_prgrom1_end=$bfff
segment_prgrom1_bank=1

segment_prgrom2_start=$8000
segment_prgrom2_end=$bfff
segment_prgrom2_bank=2

segment_prgrom3_start=$8000
segment_prgrom3_end=$bfff
segment_prgrom3_bank=3

segment_prgrom4_start=$8000
segment_prgrom4_end=$bfff
segment_prgrom4_bank=4

segment_prgrom5_start=$8000
segment_prgrom5_end=$bfff
segment_prgrom5_bank=5

segment_prgrom6_start=$8000
segment_prgrom6_end=$bfff
segment_prgrom6_bank=6

segment_chrrom0_start=$0000
segment_chrrom0_end=$ffff

segment_chrrom1_start=$0000
segment_chrrom1_end=$ffff

[define]
NES=1
WIDESCREEN=0
KEYBOARD=0
JOYSTICKS=2
HAS_BITMAP_MODE=0

[output]
style=single
format=$4E,$45,$53,$1A,   8,16,$A0,8, 0,0,$07,0, 2,0,0,0, prgrom0:$8000:$bfff,prgrom1:$8000:$bfff,prgrom2:$8000:$bfff,prgrom3:$8000:$bfff,prgrom4:$8000:$bfff,prgrom5:$8000:$bfff,prgrom6:$8000:$bfff,prgrom7:$c000:$ffff,chrrom0:$0000:$ffff,chrrom1:$0000:$ffff

extension=nes
labels=nesasm


