diff --git a/STATUS.md b/STATUS.md index 10c353e2..8c9e16db 100644 --- a/STATUS.md +++ b/STATUS.md @@ -54,12 +54,14 @@ Note: vectors at `$0300` are not supported yet - for now only the locations belo | Entry | Unofficial | Name | Status | Remarks | | :-------: | :--------: | :--------- | :------: | :------------------------------------------------: | -| | `$E38B` | `ERROR` | NOT DONE | | -| | `$A483` | `MAIN` | NOT DONE | some implementation exists, but not connected here | -| | `$A57C` | `CHRNCH` | NOT DONE | | -| | `$A71A` | `QPLOP` | NOT DONE | some implementation exists, but not connected here | -| | `$A7E4` | `GONE` | NOT DONE | some implementation exists, but not connected here | -| | `$AE86` | `EVAL` | NOT DONE | some implementation exists, but not connected here | +| `($0003)` | | `ADRAY1` | NOT DONE | | +| `($0005)` | | `ADRAY2` | NOT DONE | | +| `(00300)` | `$E38B` | `ERROR` | NOT DONE | | +| `(00302)` | `$A483` | `MAIN` | NOT DONE | some implementation exists, but not connected here | +| `(00304)` | `$A57C` | `CHRNCH` | NOT DONE | | +| `(00306)` | `$A71A` | `QPLOP` | NOT DONE | some implementation exists, but not connected here | +| `(00308)` | `$A7E4` | `GONE` | NOT DONE | some implementation exists, but not connected here | +| `(0030A)` | `$AE86` | `EVAL` | NOT DONE | some implementation exists, but not connected here | | `($A000)` | | cold start | PARTIAL | | | `($A002)` | | warm start | PARTIAL | | @@ -95,6 +97,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on | Address | Unofficial | Name | Status | Remarks | | :-------: | :--------: | :---------- | :------: | :------------------------------------------------: | +| `($028F)` | | `KEYLOG` | NOT DONE | | | `$FF81` | `$FF5B` | `CINT` | DONE | | | `$FF84` | `$FDA3` | `IOINIT` | PARTIAL | CIA initialization incomplete | | `$FF87` | `$FD50` | `RAMTAS` | DONE | | diff --git a/bin/basic_generic.rom b/bin/basic_generic.rom index 826cc63b..e201428e 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 071c0b5b..f992e1d8 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 da45a31a..28f7f46c 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 1765f7d2..bed9f709 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 5660cad6..de9a054c 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 f853f836..9e443ee8 100644 Binary files a/bin/kernal_ultimate64.rom and b/bin/kernal_ultimate64.rom differ diff --git a/c64/aliases/,aliases_ram_lowmem.s b/c64/aliases/,aliases_ram_lowmem.s index 4dfdefcd..7979fff0 100644 --- a/c64/aliases/,aliases_ram_lowmem.s +++ b/c64/aliases/,aliases_ram_lowmem.s @@ -12,8 +12,8 @@ // // $02 -- UNUSED -- free for user software - .label ADRAY1 = $03 // $03-$04 -- NOT IMPLEMENTED -- - .label ADRAY2 = $05 // $05-$06 -- NOT IMPLEMENTED -- + .label ADRAY1 = $03 // $03-$04 + .label ADRAY2 = $05 // $05-$06 .label CHARAC = $07 // [!] our implementation might be different XXX give more details .label ENDCHR = $08 // [!] our implementation might be different XXX give more details .label TRMPOS = $09 // -- NOT IMPLEMENTED -- @@ -170,7 +170,7 @@ .label DELAY = $28C // -- NOT IMPLEMENTED -- .label SHFLAG = $28D // bucky keys (SHIFT/CTRL/C=) flags .label LSTSHF = $28E // last bucky key flags - .label KEYLOG = $28F // $28F-$290 -- NOT IMPLEMENTED -- keyboard decoding pointer + .label KEYLOG = $28F // $28F-$290 routine to setup keyboard decoding .label MODE = $291 // flag, is case switch allowed .label AUTODN = $292 // -- NOT IMPLEMENTED -- screen scroll disable .label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551 diff --git a/c64/basic/basic_adray1.s b/c64/basic/basic_adray1.s new file mode 100644 index 00000000..879a6bce --- /dev/null +++ b/c64/basic/basic_adray1.s @@ -0,0 +1,5 @@ + +// XXX provide documentation and implementation + +basic_adray1: + STUB_IMPLEMENTATION() diff --git a/c64/basic/basic_adray2.s b/c64/basic/basic_adray2.s new file mode 100644 index 00000000..dbdd00c1 --- /dev/null +++ b/c64/basic/basic_adray2.s @@ -0,0 +1,5 @@ + +// XXX provide documentation and implementation + +basic_adray2: + STUB_IMPLEMENTATION() diff --git a/c64/basic/basic_cold_start.s b/c64/basic/basic_cold_start.s index 38d9cefb..01928aef 100644 --- a/c64/basic/basic_cold_start.s +++ b/c64/basic/basic_cold_start.s @@ -6,11 +6,27 @@ basic_cold_start: // Setup vectors at $300 ldy #$0B !: - lda basic_vector_defaults, y + lda basic_vector_defaults_1, y sta IERROR, y dey bpl !- + // Setup misc vectors + ldy #$04 +!: + lda basic_vector_defaults_2, y + sta ADRAY1, y + dey + bpl !- + + // Setup USRPOK + lda #$4C // JMP opcode + sta USRPOK + lda #do_ILLEGAL_QUANTITY_error + sta USRADD+1 + // Print startup banner jsr printf // XXX don't use printf, keep it for debug purposes only TARGET_HOOK_BANNER() diff --git a/c64/basic/basic_vector_defaults.s b/c64/basic/basic_vector_defaults.s index 5f2f5943..a12d2275 100644 --- a/c64/basic/basic_vector_defaults.s +++ b/c64/basic/basic_vector_defaults.s @@ -6,11 +6,16 @@ // - [CM64] Compute's Mapping the Commodore 64 - page 318 // -basic_vector_defaults: +basic_vector_defaults_1: - .word ERROR // IERROR - .word MAIN // IMAIN - .word CHRNCH // ICHRNCH - .word QPLOP // IQPLOP - .word GONE // IGONE - .word EVAL // IEVAL + .word ERROR // IERROR + .word MAIN // IMAIN + .word CHRNCH // ICHRNCH + .word QPLOP // IQPLOP + .word GONE // IGONE + .word EVAL // IEVAL + +basic_vector_defaults_2: + + .word basic_adray1 // ADRAY1 + .word basic_adray2 // ADRAY2 diff --git a/c64/kernal/cint_real.s b/c64/kernal/cint_real.s index 23452e08..a312cf6c 100644 --- a/c64/kernal/cint_real.s +++ b/c64/kernal/cint_real.s @@ -56,6 +56,13 @@ cint_pal: !: sta TVSFLG + // Setup KEYLOG vector - XXX is it proper place? + + lda #setup_keydecode + sta KEYLOG+1 + cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start? jsr setup_vicii diff --git a/c64/kernal/setup_keydecode.s b/c64/kernal/setup_keydecode.s new file mode 100644 index 00000000..d6010685 --- /dev/null +++ b/c64/kernal/setup_keydecode.s @@ -0,0 +1,5 @@ + +// XXX provide documentation and implementation + +setup_keydecode: + STUB_IMPLEMENTATION()