even more startup tweaks

This commit is contained in:
FeralChild64 committed 2019-10-20 09:03:23 +02:00
1 parent 455ca2ee56
commit dc63912edd
8 files changed
+30 -16

No files matched your search

+13 -8
View File
@@ -56,18 +56,16 @@ cint_pal:
!: !:
sta TVSFLG sta TVSFLG
// Setup KEYLOG vector - XXX is it proper place? cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
// Setup KEYLOG vector
lda #<scnkey_set_keytab lda #<scnkey_set_keytab
sta KEYLOG+0 sta KEYLOG+0
lda #>scnkey_set_keytab lda #>scnkey_set_keytab
sta KEYLOG+1 sta KEYLOG+1
cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start? // Initialise cursor blink flags (Compute's Mapping the 64 p215)
jsr setup_vicii
// Initialise cursor blink flags (Compute's Mapping the 64 p215)
lda #$01 lda #$01
sta BLNCT sta BLNCT
@@ -94,15 +92,18 @@ cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
bpl !- bpl !-
sta BufferQuantity sta BufferQuantity
#endif
// Set key repeat delay (Compute's Mapping the 64 p215) // Set key repeat delay (Compute's Mapping the 64 p215)
// Making some numbers up here: Repeat every ~1/10th sec // Making some numbers up here: Repeat every ~1/10th sec
// But require key to be held for ~1/3sec before // But require key to be held for ~1/3sec before
// repeating (Compute's Mapping the 64 p58) // repeating (Compute's Mapping the 64 p58)
// Not needed for default keyboard scanning code
ldx #22-2 // Fudge factor to match speed ldx #22-2 // Fudge factor to match speed
stx DELAY stx DELAY
#endif
// Set current colour for text (Compute's Mapping the 64 p215) // Set current colour for text (Compute's Mapping the 64 p215)
ldx #$01 // default is light blue ($0E), but we use a different one ldx #$01 // default is light blue ($0E), but we use a different one
stx COLOR stx COLOR
@@ -115,5 +116,9 @@ cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
ldx #$00 ldx #$00
stx MODE stx MODE
// Setup video and I/O
jsr setup_vicii
// Fallthrough/jump to screen clear routine (Compute's Mapping the 64 p215) // Fallthrough/jump to screen clear routine (Compute's Mapping the 64 p215)
jmp clear_screen jmp clear_screen
-2
View File
@@ -8,8 +8,6 @@
setup_vicii: setup_vicii:
// XXX it should also set default devices
// Clear everything - turn off sprites (observed hanging around after // Clear everything - turn off sprites (observed hanging around after
// running programs and resetting), etc. // running programs and resetting), etc.
@@ -5,12 +5,18 @@
hw_entry_reset: hw_entry_reset:
// The GPL program at https://github.com/Klaus2m5/6502_65C02_functional_tests/blob/master/6502_functional_test.a65 // The GPL program at https://github.com/Klaus2m5/6502_65C02_functional_tests/blob/master/6502_functional_test.a65
// uses the following initial reset sequence, affirmed by c64 PRG p269 // uses the similar initial reset sequence, affirmed by c64 PRG p269
cld // for CPUs might clear D flag - but it is possible this is called manually sei // disable the interrupts, as fast as possible - they are disabled in case of HW reset,
ldx #$FF // but this routine can be also called manually
ldx #$00
sta VIC_SCROLX // turn the display off - we want as little screen artifacts as possible
cld // required for all CPUs - due to possibility of manual call
dex // $FF - to initialize stack pointer
txs txs
sei
// The following routine is based on reading the public KERNAL jumptable routine // The following routine is based on reading the public KERNAL jumptable routine
// list, and making unimaginative assumptions about what should be done on reset. // list, and making unimaginative assumptions about what should be done on reset.
File renamed without changes.
+1 -1
View File
@@ -13,7 +13,7 @@ IOINIT:
// Set $00/$01 port mode and value // Set $00/$01 port mode and value
// We want BASIC and KERNAL ROMs mapped, and datasette motor off // We want BASIC and KERNAL ROMs mapped, and datasette motor off
// (https://www.c64-wiki.com/wiki/Zeropage) // (https://www.c64-wiki.com/wiki/Zeropage)
// XXX - Work around VICE bug: Writing $00 before $01 results in rubbish in $01 // Work around for VICE bug: Writing $00 before $01 results in rubbish in $01
// after. https://sourceforge.net/p/vice-emu/bugs/1057/ // after. https://sourceforge.net/p/vice-emu/bugs/1057/
lda #$27 lda #$27
ldx #$2F ldx #$2F
File renamed without changes.
@@ -5,6 +5,11 @@ default_brk_handler:
sei // disable IRQs, to be sure they won't interfere sei // disable IRQs, to be sure they won't interfere
ldx #$00
sta VIC_SCROLX // turn the display off - we want as little screen artifacts as possible
cld // make sure this dangerous flag is disabled
jsr JRESTOR jsr JRESTOR
jsr JIOINIT jsr JIOINIT
jsr cint_brk jsr cint_brk
@@ -1,5 +1,5 @@
// Just a helper routines // Just a helper routine
// Find the LAT / SAT / FAT entry index where LAT corresponds to A, returns index in Y // Find the LAT / SAT / FAT entry index where LAT corresponds to A, returns index in Y
// Carry flag set means not found // Carry flag set means not found