Reworked wait time before making a move in demo mode

This commit is contained in:
hkz 2025-10-14 11:04:53 +02:00
commit d920f68139
2 changed files with 10 additions and 9 deletions

View file

@ -93,7 +93,7 @@ void main(void) {
__enable_interrupts();
uint16_t lfsr;
uint16_t current_run = 0;
uint16_t current_run = 0;
while(1) { // Game loop
lfsr = lfsr_update();
@ -103,16 +103,16 @@ void main(void) {
snd_mod_button();
done = 1;
}
__enable_interrupts();
if(!done && current_run < RUNS_TO_SKIP) {
if(!done && current_run <= RUNS_TO_SKIP) {
current_run++;
__enable_interrupts();
continue;
} else {
current_run = 0;
}
}
__disable_interrupts();
current_run = 0;
if(!done) {
switch((lfsr & 0x0003) + 1) {
case K_UP:

View file

@ -527,14 +527,15 @@ vdp_irq_handler:
;;; Save ZP
jsr _irq_save_zp
lda VDP_REG
jsr vdp_write_interleaved_sat
;;; Restore ZP
jsr _irq_restore_zp
;;; Clear the IRQ
lda VDP_REG
; Restore the registers
pla
tay