diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-14 16:31:43 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-03-14 16:31:43 +0100 |
| commit | cdfebce9c34e3116457a7c28e3eb60000d65d7e6 (patch) | |
| tree | eb8a9f3771fab15e97f72416d94fffe6933f759d /src | |
| parent | 9ff2033e936689135210989a5fee057a4a13527e (diff) | |
| download | jetpac.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')
| -rw-r--r-- | src/jetpac.s | 30 | ||||
| -rw-r--r-- | src/title.s | 2 |
2 files changed, 27 insertions, 5 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" diff --git a/src/title.s b/src/title.s index db627ae..3e6da61 100644 --- a/src/title.s +++ b/src/title.s @@ -8,7 +8,7 @@ SPRITE_X_POSITION = $40 ;; The title has a timer as a delay between joypad presses from the player. - TIMER_INIT_VALUE = 20 + TIMER_INIT_VALUE = (HZ / 3) zp_title_timer = $30 ;; Initialize all the elements for the title screen. |
