lemm: update so time works w/o mockingboard

This commit is contained in:
Vince Weaver 2022-03-31 00:47:31 -04:00
parent fd0254618e
commit c1b3808e35
11 changed files with 57 additions and 105 deletions

View File

@ -214,15 +214,7 @@ l1_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l1_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l1_timer_not_yet:
jsr update_timer
; main drawing loop
@ -255,6 +247,8 @@ l1_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level1.inc"

View File

@ -217,16 +217,7 @@ l10_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l10_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l10_timer_not_yet:
jsr update_timer
; main drawing loop
@ -257,6 +248,8 @@ l10_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level10.inc"

View File

@ -214,16 +214,7 @@ l2_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l2_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l2_timer_not_yet:
jsr update_timer
; main drawing loop
@ -257,6 +248,7 @@ l2_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level2.inc"

View File

@ -214,16 +214,7 @@ l3_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l3_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l3_timer_not_yet:
jsr update_timer
; main drawing loop
@ -254,7 +245,7 @@ l3_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level3.inc"

View File

@ -215,15 +215,7 @@ l4_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l4_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l4_timer_not_yet:
jsr update_timer
; main drawing loop
@ -255,6 +247,7 @@ l4_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level4.inc"

View File

@ -197,16 +197,7 @@ l5_door_is_open:
; jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l5_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l5_timer_not_yet:
jsr update_timer
; main drawing loop
@ -241,6 +232,7 @@ l5_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level5.inc"

View File

@ -182,7 +182,7 @@ do_level6:
; Main Loop
;===================
;===================
l4_main_loop:
l6_main_loop:
;=========================
; load next chunk of music
@ -193,15 +193,15 @@ l4_main_loop:
l4_no_load_chunk:
l6_no_load_chunk:
lda DOOR_OPEN
bne l4_door_is_open
bne l6_door_is_open
jsr draw_door
l4_door_is_open:
l6_door_is_open:
;======================
; release lemmings
@ -215,16 +215,7 @@ l4_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l4_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l4_timer_not_yet:
jsr update_timer
; main drawing loop
@ -246,15 +237,17 @@ l4_timer_not_yet:
inc FRAMEL
lda LEVEL_OVER
bne l4_level_over
bne l6_level_over
jmp l4_main_loop
jmp l6_main_loop
l4_level_over:
l6_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level6.inc"

View File

@ -215,15 +215,7 @@ l7_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l7_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l7_timer_not_yet:
jsr update_timer
; main drawing loop
@ -255,6 +247,8 @@ l7_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level7.inc"

View File

@ -217,16 +217,7 @@ l8_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l8_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l8_timer_not_yet:
jsr update_timer
; main drawing loop
@ -257,6 +248,8 @@ l8_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level8.inc"

View File

@ -217,16 +217,7 @@ l9_door_is_open:
jsr draw_flames
lda TIMER_COUNT
cmp #50
bcc l9_timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
l9_timer_not_yet:
jsr update_timer
; main drawing loop
@ -257,6 +248,8 @@ l9_level_over:
rts
.include "update_timer.s"
.include "graphics/graphics_level9.inc"

24
games/lemm/update_timer.s Normal file
View File

@ -0,0 +1,24 @@
update_timer:
lda SOUND_STATUS
and #SOUND_MOCKINGBOARD
bne timer_mockingboard
; if no mockingboard, then
; fake timer count so clocks tick
lda TIMER_COUNT
clc
adc #7
sta TIMER_COUNT
timer_mockingboard:
lda TIMER_COUNT
cmp #50
bcc timer_not_yet
jsr update_time
lda #$0
sta TIMER_COUNT
timer_not_yet:
rts