diff --git a/host/src/mainloop.s b/host/src/mainloop.s index ce3b532..6ffbda1 100644 --- a/host/src/mainloop.s +++ b/host/src/mainloop.s @@ -13,12 +13,23 @@ mainsetup: .endrep .endif -.ifndef EMULATOR_PREVIEW @waitstart: ;; Wait until joystick 2 has been pulled down to start the program dec $d020 - lda $dc00 - and #$02 - bne @waitstart + + lda #%11111111 + sta $dc02 + lda #%00000000 + sta $dc03 + + lda #%01111111 + sta $dc00 + + lda $dc01 + eor #$ff + beq @waitstart + + lda #%00000000 + sta $dc02 jsr setup_loader jmp endsetup @@ -34,7 +45,6 @@ mainsetup: jsr maybe_download_userprog beq @trying -.endif endsetup: DOWNLOAD_TIMER = $FFFF