aboutsummaryrefslogtreecommitdiff
path: root/src/jetpac.s
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-14 16:31:43 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-14 16:31:43 +0100
commitcdfebce9c34e3116457a7c28e3eb60000d65d7e6 (patch)
treeeb8a9f3771fab15e97f72416d94fffe6933f759d /src/jetpac.s
parent9ff2033e936689135210989a5fee057a4a13527e (diff)
downloadjetpac.nes-cdfebce9c34e3116457a7c28e3eb60000d65d7e6.tar.gz
jetpac.nes-cdfebce9c34e3116457a7c28e3eb60000d65d7e6.zip
Support PAL natively
Also add a make target specific for a PAL version, even if only the full game will be built, not the development "partial" one. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'src/jetpac.s')
-rw-r--r--src/jetpac.s30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/jetpac.s b/src/jetpac.s
index 8acbb4e..d3eef5a 100644
--- a/src/jetpac.s
+++ b/src/jetpac.s
@@ -1,12 +1,34 @@
+;; NOTE: automatically generated by the build system.
+.include "../config/generated.s"
+
.segment "HEADER"
+ ;; Bytes 0-3: NES\0 magic header.
.byte 'N', 'E', 'S', $1A
+
+ ;; Standard 32KB + 8KB NROM cartridge.
.byte $02, $01
- .res $0A, $00
-.segment "CODE"
+ ;; Horizontal mirroring, no battery.
+ .byte $00
-;; NOTE: automatically generated by the build system.
-.include "../config/generated.s"
+ ;; We use the NES 2.0 header mainly to differentiate between NTSC vs PAL in
+ ;; a way that emulators won't ignore it.
+ .byte $08
+
+ ;; Blanked out stuff.
+ .res $04, $00
+
+ ;; NTSC vs PAL
+ .ifdef PAL
+ .byte $01
+ .else
+ .byte $00
+ .endif
+
+ ;; Blanked out stuff.
+ .res $03, $00
+
+.segment "CODE"
.include "../include/apu.s"
.include "../include/oam.s"