menu and name fix
This commit is contained in:
@@ -624,6 +624,7 @@ txt_info: !scr "p1: joystick 2 or a/d"
|
|||||||
txt_info2: !scr "p2: joystick 1 or j/l"
|
txt_info2: !scr "p2: joystick 1 or j/l"
|
||||||
txt_ttgname: !scr "teletype games"
|
txt_ttgname: !scr "teletype games"
|
||||||
txt_presents:!scr "presents"
|
txt_presents:!scr "presents"
|
||||||
|
txt_vs: !scr "vs"
|
||||||
txt_over: !scr "game over"
|
txt_over: !scr "game over"
|
||||||
txt_return: !scr "fire = return"
|
txt_return: !scr "fire = return"
|
||||||
txt_blank: !fill 19, $20
|
txt_blank: !fill 19, $20
|
||||||
|
|||||||
+1
-1
@@ -265,7 +265,7 @@ cu_input:
|
|||||||
beq cu_stay
|
beq cu_stay
|
||||||
lda #$c8 ; leave with the scroll register clean
|
lda #$c8 ; leave with the scroll register clean
|
||||||
sta XCTRL
|
sta XCTRL
|
||||||
jmp title_init ; back to the menu
|
jmp menu_init ; back to the menu
|
||||||
cu_stay:
|
cu_stay:
|
||||||
|
|
||||||
; ---- beam work: fine scroll on for the scroller row only ----
|
; ---- beam work: fine scroll on for the scroller row only ----
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ iw_skip:
|
|||||||
; fire skips, otherwise wait out the timer
|
; fire skips, otherwise wait out the timer
|
||||||
jsr start_edge
|
jsr start_edge
|
||||||
beq iw_tick
|
beq iw_tick
|
||||||
jmp title_init
|
jmp menu_init
|
||||||
iw_tick:
|
iw_tick:
|
||||||
dec introt
|
dec introt
|
||||||
bne iw_done
|
bne iw_done
|
||||||
jmp title_init
|
jmp menu_init
|
||||||
iw_done:
|
iw_done:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ wf_hit:
|
|||||||
; the states and everything they share
|
; the states and everything they share
|
||||||
; ============================================================
|
; ============================================================
|
||||||
!src "intro.asm"
|
!src "intro.asm"
|
||||||
!src "title.asm"
|
!src "menu.asm"
|
||||||
!src "credits.asm"
|
!src "credits.asm"
|
||||||
!src "play.asm"
|
!src "play.asm"
|
||||||
!src "over.asm"
|
!src "over.asm"
|
||||||
|
|||||||
+43
-42
@@ -1,17 +1,18 @@
|
|||||||
; -----------------------------------------------------------
|
; -----------------------------------------------------------
|
||||||
; title.asm - full-screen menu card: big RABBIT / SCOOTER
|
; menu.asm - full-screen menu card: big RABBIT VS SCOOTER
|
||||||
; logo flanked by two hopping rabbits, and a three-item menu:
|
; logo flanked by two hopping rabbits, and a three-item menu:
|
||||||
; single player / multiplayer / credits (joystick up/down +
|
; single player / multiplayer / credits (joystick up/down +
|
||||||
; fire; s, m, c pick; 1 and 2 pick and start at once)
|
; fire; s, m, c pick; 1 and 2 pick and start at once)
|
||||||
; -----------------------------------------------------------
|
; -----------------------------------------------------------
|
||||||
|
|
||||||
title_init:
|
menu_init:
|
||||||
lda #BLACK ; the menu plays on a black screen
|
lda #BLACK ; the menu plays on a black screen
|
||||||
sta bg_top
|
sta bg_top
|
||||||
sta bg_bot
|
sta bg_bot
|
||||||
jsr clear_screen
|
jsr clear_screen
|
||||||
|
|
||||||
+prbig 1, 8, RED, txt_rabbit, 6
|
+prbig 1, 8, RED, txt_rabbit, 6
|
||||||
|
+prtext 6, 19, YELLOW, txt_vs, 2
|
||||||
+prbig 7, 6, WHITE, txt_scooter, 7
|
+prbig 7, 6, WHITE, txt_scooter, 7
|
||||||
|
|
||||||
lda mp_mode ; cursor starts on the last played mode
|
lda mp_mode ; cursor starts on the last played mode
|
||||||
@@ -45,10 +46,10 @@ title_init:
|
|||||||
lda #%00000111
|
lda #%00000111
|
||||||
sta SPR_EN
|
sta SPR_EN
|
||||||
|
|
||||||
+setupd title_update
|
+setupd menu_update
|
||||||
rts
|
rts
|
||||||
|
|
||||||
title_update:
|
menu_update:
|
||||||
; hop the flanking rabbits through the big frames,
|
; hop the flanking rabbits through the big frames,
|
||||||
; half a cycle apart
|
; half a cycle apart
|
||||||
lda framectr
|
lda framectr
|
||||||
@@ -72,28 +73,28 @@ title_update:
|
|||||||
jsr read_joy
|
jsr read_joy
|
||||||
lda joyb
|
lda joyb
|
||||||
and #3
|
and #3
|
||||||
beq tu_udrel
|
beq mu_udrel
|
||||||
lda udheld
|
lda udheld
|
||||||
bne tu_udend
|
bne mu_udend
|
||||||
lda #1
|
lda #1
|
||||||
sta udheld
|
sta udheld
|
||||||
lda joyb
|
lda joyb
|
||||||
and #1 ; up
|
and #1 ; up
|
||||||
beq tu_down
|
beq mu_down
|
||||||
lda menusel
|
lda menusel
|
||||||
beq tu_udend
|
beq mu_udend
|
||||||
dec menusel
|
dec menusel
|
||||||
jmp tu_udend
|
jmp mu_udend
|
||||||
tu_down:
|
mu_down:
|
||||||
lda menusel
|
lda menusel
|
||||||
cmp #MENU_ITEMS-1
|
cmp #MENU_ITEMS-1
|
||||||
beq tu_udend
|
beq mu_udend
|
||||||
inc menusel
|
inc menusel
|
||||||
jmp tu_udend
|
jmp mu_udend
|
||||||
tu_udrel:
|
mu_udrel:
|
||||||
lda #0
|
lda #0
|
||||||
sta udheld
|
sta udheld
|
||||||
tu_udend:
|
mu_udend:
|
||||||
|
|
||||||
; letter keys pick a line (fire still starts); skipped
|
; letter keys pick a line (fire still starts); skipped
|
||||||
; while joystick 1 fire is down, because it grounds the
|
; while joystick 1 fire is down, because it grounds the
|
||||||
@@ -102,31 +103,31 @@ tu_udend:
|
|||||||
sta CIA1_PA
|
sta CIA1_PA
|
||||||
lda CIA1_PB
|
lda CIA1_PB
|
||||||
and #$10
|
and #$10
|
||||||
beq tu_keydone
|
beq mu_keydone
|
||||||
lda #$fd ; 's': keyboard column 1, row bit 5
|
lda #$fd ; 's': keyboard column 1, row bit 5
|
||||||
sta CIA1_PA
|
sta CIA1_PA
|
||||||
lda CIA1_PB
|
lda CIA1_PB
|
||||||
and #$20
|
and #$20
|
||||||
bne tu_nos
|
bne mu_nos
|
||||||
lda #0
|
lda #0
|
||||||
sta menusel
|
sta menusel
|
||||||
tu_nos:
|
mu_nos:
|
||||||
lda #$ef ; 'm': keyboard column 4, row bit 4
|
lda #$ef ; 'm': keyboard column 4, row bit 4
|
||||||
sta CIA1_PA
|
sta CIA1_PA
|
||||||
lda CIA1_PB
|
lda CIA1_PB
|
||||||
and #$10
|
and #$10
|
||||||
bne tu_nom
|
bne mu_nom
|
||||||
lda #1
|
lda #1
|
||||||
sta menusel
|
sta menusel
|
||||||
tu_nom:
|
mu_nom:
|
||||||
lda #$fb ; 'c': keyboard column 2, row bit 4
|
lda #$fb ; 'c': keyboard column 2, row bit 4
|
||||||
sta CIA1_PA
|
sta CIA1_PA
|
||||||
lda CIA1_PB
|
lda CIA1_PB
|
||||||
and #$10
|
and #$10
|
||||||
bne tu_noc
|
bne mu_noc
|
||||||
lda #2
|
lda #2
|
||||||
sta menusel
|
sta menusel
|
||||||
tu_noc:
|
mu_noc:
|
||||||
|
|
||||||
; the 1 / 2 keys pick and start right away (edge detected)
|
; the 1 / 2 keys pick and start right away (edge detected)
|
||||||
lda #$7f ; keyboard column 7: '1' = bit 0, '2' = bit 3
|
lda #$7f ; keyboard column 7: '1' = bit 0, '2' = bit 3
|
||||||
@@ -134,38 +135,38 @@ tu_noc:
|
|||||||
lda CIA1_PB
|
lda CIA1_PB
|
||||||
and #$09
|
and #$09
|
||||||
cmp #$09
|
cmp #$09
|
||||||
beq tu_keyup ; neither key held
|
beq mu_keyup ; neither key held
|
||||||
ldx k12held
|
ldx k12held
|
||||||
bne tu_keydone ; still held from an earlier frame
|
bne mu_keydone ; still held from an earlier frame
|
||||||
inx
|
inx
|
||||||
stx k12held
|
stx k12held
|
||||||
and #$01
|
and #$01
|
||||||
bne tu_key2
|
bne mu_key2
|
||||||
lda #0
|
lda #0
|
||||||
sta menusel
|
sta menusel
|
||||||
jmp title_go
|
jmp menu_go
|
||||||
tu_key2:
|
mu_key2:
|
||||||
lda #1
|
lda #1
|
||||||
sta menusel
|
sta menusel
|
||||||
jmp title_go
|
jmp menu_go
|
||||||
tu_keyup:
|
mu_keyup:
|
||||||
lda #0
|
lda #0
|
||||||
sta k12held
|
sta k12held
|
||||||
tu_keydone:
|
mu_keydone:
|
||||||
|
|
||||||
; footer: the two control lines take turns
|
; footer: the two control lines take turns
|
||||||
lda framectr
|
lda framectr
|
||||||
and #64
|
and #64
|
||||||
beq tu_foot2
|
beq mu_foot2
|
||||||
+prtext 21, 9, LGREY, txt_info, 21
|
+prtext 21, 9, LGREY, txt_info, 21
|
||||||
jmp tu_footdone
|
jmp mu_footdone
|
||||||
tu_foot2:
|
mu_foot2:
|
||||||
+prtext 21, 9, LGREY, txt_info2, 21
|
+prtext 21, 9, LGREY, txt_info2, 21
|
||||||
tu_footdone:
|
mu_footdone:
|
||||||
|
|
||||||
; the menu items: the picked line is yellow
|
; the menu items: the picked line is yellow
|
||||||
ldx #0
|
ldx #0
|
||||||
tm_items:
|
mm_items:
|
||||||
txa
|
txa
|
||||||
pha
|
pha
|
||||||
jsr draw_mitem
|
jsr draw_mitem
|
||||||
@@ -173,7 +174,7 @@ tm_items:
|
|||||||
tax
|
tax
|
||||||
inx
|
inx
|
||||||
cpx #MENU_ITEMS
|
cpx #MENU_ITEMS
|
||||||
bne tm_items
|
bne mm_items
|
||||||
|
|
||||||
; blinking '>' cursor in front of the picked line
|
; blinking '>' cursor in front of the picked line
|
||||||
lda #$20
|
lda #$20
|
||||||
@@ -182,7 +183,7 @@ tm_items:
|
|||||||
sta SCREEN+18*40+12
|
sta SCREEN+18*40+12
|
||||||
lda framectr
|
lda framectr
|
||||||
and #16
|
and #16
|
||||||
bne tu_start
|
bne mu_start
|
||||||
ldx menusel
|
ldx menusel
|
||||||
lda mcur_lo,x
|
lda mcur_lo,x
|
||||||
sta scrlo
|
sta scrlo
|
||||||
@@ -198,19 +199,19 @@ tm_items:
|
|||||||
lda #YELLOW
|
lda #YELLOW
|
||||||
sta (scrlo),y
|
sta (scrlo),y
|
||||||
|
|
||||||
tu_start:
|
mu_start:
|
||||||
; fire or space opens the picked line
|
; fire or space opens the picked line
|
||||||
jsr start_edge
|
jsr start_edge
|
||||||
beq tu_done
|
beq mu_done
|
||||||
title_go:
|
menu_go:
|
||||||
lda menusel
|
lda menusel
|
||||||
cmp #2
|
cmp #2
|
||||||
beq tg_credits
|
beq mg_credits
|
||||||
sta mp_mode ; item 0 / 1 doubles as the player count
|
sta mp_mode ; item 0 / 1 doubles as the player count
|
||||||
jmp play_init ; its rts returns to the main loop
|
jmp play_init ; its rts returns to the main loop
|
||||||
tg_credits:
|
mg_credits:
|
||||||
jmp credits_init
|
jmp credits_init
|
||||||
tu_done:
|
mu_done:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; ---- draw menu item X, yellow when it is the picked one ----
|
; ---- draw menu item X, yellow when it is the picked one ----
|
||||||
Reference in New Issue
Block a user