diff --git a/STATUS.md b/STATUS.md index a535689f..7579756b 100644 --- a/STATUS.md +++ b/STATUS.md @@ -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 | | diff --git a/bin/basic_generic.rom b/bin/basic_generic.rom index 89242f1b..62534b24 100644 Binary files a/bin/basic_generic.rom and b/bin/basic_generic.rom differ diff --git a/bin/basic_mega65.rom b/bin/basic_mega65.rom index 5fff525b..6b0c3983 100644 Binary files a/bin/basic_mega65.rom and b/bin/basic_mega65.rom differ diff --git a/bin/basic_ultimate64.rom b/bin/basic_ultimate64.rom index 36620ad7..e146a1a9 100644 Binary files a/bin/basic_ultimate64.rom and b/bin/basic_ultimate64.rom differ diff --git a/bin/kernal_generic.rom b/bin/kernal_generic.rom index 15295fdd..ae78c8ea 100644 Binary files a/bin/kernal_generic.rom and b/bin/kernal_generic.rom differ diff --git a/bin/kernal_mega65.rom b/bin/kernal_mega65.rom index c8395834..e4fa473e 100644 Binary files a/bin/kernal_mega65.rom and b/bin/kernal_mega65.rom differ diff --git a/bin/kernal_ultimate64.rom b/bin/kernal_ultimate64.rom index a69028ef..65b2cde4 100644 Binary files a/bin/kernal_ultimate64.rom and b/bin/kernal_ultimate64.rom differ diff --git a/c64/aliases/,aliases_config.s b/c64/aliases/,aliases_config.s index 1e84c2a9..77ebc752 100644 --- a/c64/aliases/,aliases_config.s +++ b/c64/aliases/,aliases_config.s @@ -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 } diff --git a/c64/kernal/clrchn_real.s b/c64/kernal/clrchn_real.s index b12177af..6c97cc4d 100644 --- a/c64/kernal/clrchn_real.s +++ b/c64/kernal/clrchn_real.s @@ -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 diff --git a/c64/kernal/init/cint_real.s b/c64/kernal/init/cint_real.s index 54b03723..82cbc77f 100644 --- a/c64/kernal/init/cint_real.s +++ b/c64/kernal/init/cint_real.s @@ -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 diff --git a/c64/kernal/init/e5a0.setup_vicii.s b/c64/kernal/init/e5a0.setup_vicii.s index 2f8c321a..3cc68a93 100644 --- a/c64/kernal/init/e5a0.setup_vicii.s +++ b/c64/kernal/init/e5a0.setup_vicii.s @@ -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 diff --git a/c64/kernal/interrupts/fce2.hw_entry_reset.s b/c64/kernal/interrupts/fce2.hw_entry_reset.s index ed498dfc..f04dd653 100644 --- a/c64/kernal/interrupts/fce2.hw_entry_reset.s +++ b/c64/kernal/interrupts/fce2.hw_entry_reset.s @@ -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