Autostart.

This commit is contained in:
giomba 2022-12-04 20:12:19 +01:00
parent 1b6283102c
commit 16c3c4dc49
1 changed files with 25 additions and 9 deletions

View File

@ -59,24 +59,36 @@ coldstart SUBROUTINE
ldy #>message ldy #>message
jsr $cb1e ; print null terminated string jsr $cb1e ; print null terminated string
; install fake chrin to hijack custom commands
sei
lda #<fake_chrin
sta $324
lda #>fake_chrin
sta $325
cli
jmp $c483 ; BASIC jmp $c483 ; BASIC
fake_input_line: fake_input_line:
BYTE "RUN", #$0d BYTE "RUN",#$0d,#0,#0,#0
fake_chrin SUBROUTINE fake_chrin SUBROUTINE
ldy fake_current_byte ldy fake_current_byte
lda fake_input_line,y lda fake_input_line,y
iny iny
sty fake_current_byte sty fake_current_byte
cpy #4 cpy #5
bne .end_fake_chrin bne .end_fake_chrin
sei dey
lda #$f2 sty fake_current_byte
sta $324
lda #$0e ; sei
sta $325 ; lda #$f2
cli ; sta $324
; lda #$0e
; sta $325
; cli
.end_fake_chrin: .end_fake_chrin:
clc clc
rts rts
@ -152,11 +164,15 @@ copyloop:
rts rts
message: message:
BYTE #$0d,#$0d,"TYPE 'RUN'",#$0d,"THEN WAIT 20 SEC",#$0d,#$0d,#0 BYTE #$0d,#$0d,"PLEASE WAIT 20 SEC",#$0d,"I'M JUST",#$0d,"AN OLD COMPUTER",#$0d,#0
; https://www.commodore.ca/manuals/funet/cbm/vic20/demos.basic/unexpanded/Stillenacht.prg
basicdemo: basicdemo:
.incbin "res/stillenacht.raw" .incbin "res/stillenacht.raw"
demoend: demoend:
. = $bffc
jmp coldstart
. = $bfff . = $bfff
BYTE #$ff BYTE #$ff