Skip to content

Commit

Permalink
mark NES headers as dual NTSC/PAL
Browse files Browse the repository at this point in the history
fix #47
  • Loading branch information
pinobatch committed Mar 9, 2024
1 parent fc402d6 commit 1923651
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions nes/src/bnrom.s
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nes2chr 0
nes2chrram 8192
nes2mirror 'V'
nes2mapper 34
nes2tv 'N','P'
nes2end

.import reset_handler
Expand Down
16 changes: 9 additions & 7 deletions nes/src/mmc1.s
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
; code copies. This file is offered as-is, without any warranty.
;

.include "nes2header.inc"
nes2prg 65536
nes2chr 0
nes2chrram 8192
nes2mirror 'V'
nes2mapper 1
nes2tv 'N','P'
nes2end

.import reset_handler
.importzp nmis
.import unpb53_some, unpb53_file_cb, load_sb53_file_cb, load_iu53_file_cb
Expand All @@ -16,13 +25,6 @@
.export rf_vwfClearPuts, rf_load_layout
.export rtl, mmc_bank_a

.segment "INESHDR"
.byt "NES",$1A ; magic signature
.byt 4 ; size of PRG ROM in 16384 byte units
.byt 0 ; size of CHR ROM in 8192 byte units
.byt $10 ; lower mapper nibble
.byt $00 ; upper mapper nibble

; Fixed code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

MAIN_CODE_BANK = $02
Expand Down
17 changes: 9 additions & 8 deletions nes/src/mmc3.s
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
; code copies. This file is offered as-is, without any warranty.
;

.include "nes2header.inc"
nes2prg 65536
nes2chr 0
nes2chrram 8192
nes2mirror 'V'
nes2mapper 4
nes2tv 'N','P'
nes2end

.import reset_handler
.importzp nmis
.import unpb53_some, unpb53_file_cb, load_sb53_file_cb, load_iu53_file_cb
Expand All @@ -16,16 +25,8 @@
.export rf_vwfClearPuts, rf_load_layout
.export rtl, mmc_bank_a

.segment "INESHDR"
.byt "NES",$1A ; magic signature
.byt 4 ; size of PRG ROM in 16384 byte units (two MMC3 banks per unit)
.byt 0 ; size of CHR ROM in 8192 byte units
.byt $40 ; lower mapper nibble
.byt $00 ; upper mapper nibble

; Fixed code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


MAIN_CODE_BANK = $04
GATE_DATA_BANK = $02
RESETSTUB_BASE = $FF70
Expand Down
1 change: 1 addition & 0 deletions nes/src/unrom.s
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nes2chr 0
nes2chrram 8192
nes2mirror 'V'
nes2mapper 2
nes2tv 'N','P'
nes2end

.import reset_handler
Expand Down

0 comments on commit 1923651

Please sign in to comment.