more startup initialization fixes

This commit is contained in:
FeralChild64 committed 2019-10-19 13:00:28 +02:00
1 parent bb9450b221
commit 455ca2ee56
12 files changed
+22 -22

No files matched your search

+4 -4
View File
@@ -98,10 +98,10 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| Address | Unofficial | Name | Status | Remarks |
| :-------: | :--------: | :---------- | :------: | :--------------------------------------------------: |
| `($028F)` | | `KEYLOG` | DONE | works differently on purpose, to improve kb scanning |
| `$FF81` | `$FF5B` | `CINT` | DONE | |
| `($028F)` | | `KEYLOG` | DONE | |
| `$FF81` | `$FF5B` | `CINT` | PARTIAL | probably incomplete, to be checked |
| `$FF84` | `$FDA3` | `IOINIT` | PARTIAL | CIA initialization incomplete |
| `$FF87` | `$FD50` | `RAMTAS` | DONE | |
| `$FF87` | `$FD50` | `RAMTAS` | PARTIAL | probably shouldn't touch VIC and CIA's |
| `$FF8A` | `$FD15` | `RESTOR` | DONE | |
| `$FF8D` | `$FD1A` | `VECTOR` | DONE | |
| `$FF90` | | `SETMSG` | DONE | |
@@ -156,7 +156,7 @@ Not all of them - only these we want to have implemented.
| :-------: | :------------------ | :------: | :------------------------------------------------: |
| `$E544` | clear screen | DONE | |
| `$E50C` | set cursor position | PARTIAL | |
| `$E5A0` | setup VIC II & IO | PARTIAL | |
| `$E5A0` | setup VIC II & IO | DONE | |
| `$EA31` | default IRQ | PARTIAL | |
| `$EA7E` | ack CIA1 + below | DONE | |
| `$EA81` | ret from IRQ/NMI | DONE | |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1
View File
@@ -130,7 +130,6 @@
#if CONFIG_CPU_WDC_65C02 || CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_WDC_65816
#define HAS_BCD_SAFE_INTERRUPTS
#define HAS_BCD_SAFE_RESET
.pseudocommand phx { .byte $DA }
.pseudocommand phy { .byte $5A }
+1 -1
View File
@@ -25,7 +25,7 @@ clrchn_real:
// Handle IEC output device
jsr UNLSN
!:
clrchn_reset: // entry needed by CHRIN
clrchn_reset: // entry needed by setup_vicii
// Set input device number to keyboard
lda #$00
sta DFLTN
-3
View File
@@ -114,9 +114,6 @@ cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
// Put non-zero value in MODE to enable case switch
ldx #$00
stx MODE
// Set default I/O devices (see SCINIT description at http://sta.c64.org/cbm64krnfunc.html)
jsr clrchn_reset
// Fallthrough/jump to screen clear routine (Compute's Mapping the 64 p215)
jmp clear_screen
+15 -10
View File
@@ -1,4 +1,11 @@
//
// Well-known Kernal routine, described in:
//
// - [CM64] Compute's Mapping the Commodore 64 - page 215
//
setup_vicii:
// XXX it should also set default devices
@@ -21,12 +28,12 @@ setup_vicii:
stx VIC_CLKRATE
// Set up default IO values - Compute's Mapping the 64
// - page 129 - VIC_SCROLY
// - pages 140-144 - VIC_SCROLX
// - pages 145-146 - VIC_YMCSB
// Set up default IO values
// - [CM64] page 129 - VIC_SCROLY
// - [CM64] pages 140-144 - VIC_SCROLX
// - [CM64] pages 145-146 - VIC_YMCSB
lda #$9B
lda #$1B // according to [CM64] page 137 some software assumes oldest bit is 0
sta VIC_SCROLY
lda #$C8
sta VIC_SCROLX // 40 column etc
@@ -35,14 +42,12 @@ setup_vicii:
lda #$0F
sta VIC_IRQ // clear all interrupts
// XXX initialize $D012 (VIC_RASTER) - which values to use?
// We use a different colour scheme of white text on all blue
lda #$06
sta VIC_EXTCOL
sta VIC_BGCOL0
rts
// Setup default I/O devices
jmp clrchn_reset
+2 -3
View File
@@ -6,9 +6,8 @@ hw_entry_reset:
// 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
#if !HAS_BCD_SAFE_RESET
cld // for CPUs having undefined D flag after reset
#endif
cld // for CPUs might clear D flag - but it is possible this is called manually
ldx #$FF
txs
sei