From 9ff2033e936689135210989a5fee057a4a13527e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 13 Mar 2025 22:52:49 +0100 Subject: Add a title and a main screens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds the skeleton for having a title and a main screen. For now the title menu doesn't do much, as the selection is simply ignored, but at least it already knows how to cycle between these two states. Signed-off-by: Miquel Sabaté Solà --- src/driver.s | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/driver.s (limited to 'src/driver.s') diff --git a/src/driver.s b/src/driver.s new file mode 100644 index 0000000..521c335 --- /dev/null +++ b/src/driver.s @@ -0,0 +1,28 @@ +.segment "CODE" + +.scope Driver + .proc switch + ;; Get the assets ready for the main screen. That is, make sure that the + ;; palettes and such are as desired since the title screen needed + ;; another setup. + jsr Assets::prepare_for_main_screen + + ;; Switch to the other base nametable. + lda #%10001010 + sta PPU::zp_control + + ;; Mark the state of the game as "game". That is, the player has + ;; started. Also set the `ppu` flag so the PPU control update takes + ;; place. + lda #%01000001 + ora Globals::zp_flags + sta Globals::zp_flags + + rts + .endproc + + .proc update + ;; TODO + rts + .endproc +.endscope -- cgit v1.2.3