diff --git a/Makefile b/Makefile index b8f93f63..931d9c24 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ SRCDIR_KERNAL = $(SRCDIR_COMMON) \ c64/kernal/iostack \ c64/kernal/keyboard \ c64/kernal/print \ - c64/kernal/screen + c64/kernal/screen \ + c64/kernal/stubs SRC_TOOLS = $(wildcard src/tools/*.c,src/tools/*.cc) diff --git a/STATUS.md b/STATUS.md index 7579756b..036ebf26 100644 --- a/STATUS.md +++ b/STATUS.md @@ -63,7 +63,7 @@ Note: vectors at `$0300` are not supported yet - for now only the locations belo | `(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)` | `$E394` | cold start | PARTIAL | | -| `($A002)` | | warm start | PARTIAL | | +| `($A002)` | `$E3B7` | warm start | PARTIAL | |
@@ -76,7 +76,9 @@ Not all of them - only these we want to have implemented. | Address | Name | Status | Remarks | | :-------: | :----------- | :------: | :------------------------------------------------: | | `$A004` | revision str | DONE | | +| `$A453` | (unknown) | NOT DONE | | | `$A533` | LINKPRG | DONE | | +| `$A644` | new | NOT DONE | | | `$A659` | set txt ptr | NOT DONE | | | `$A68E` | RUNC | DONE | | | `$A7AE` | NEWSTT | PARTIAL | redirected to RUN command | @@ -107,7 +109,7 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on | `$FF90` | | `SETMSG` | DONE | | | `$FF93` | | `SECOND` | DONE | | | `$FF96` | | `TKSA` | DONE | | -| `$FF99` | | `MEMTOP` | DONE | | +| `$FF99` | `$FE25` | `MEMTOP` | DONE | | | `$FF9C` | | `MEMBOT` | DONE | | | `$FF9F` | | `SCNKEY` | DONE | | | `$FFA2` | | `SETTMO` | DONE | | @@ -156,12 +158,20 @@ Not all of them - only these we want to have implemented. | :-------: | :------------------ | :------: | :------------------------------------------------: | | `$E544` | clear screen | DONE | | | `$E50C` | set cursor position | PARTIAL | | +| `$E566` | home cursor | NOT DONE | | | `$E5A0` | setup VIC II & IO | DONE | | +| `$E6B6` | advance cursor | NOT DONE | | +| `$E701` | previous line | NOT DONE | | +| `$E8EA` | scroll line | NOT DONE | | +| `$E9FF` | clear line | NOT DONE | | | `$EA31` | default IRQ | PARTIAL | | | `$EA7E` | ack CIA1 + below | DONE | | | `$EA81` | ret from IRQ/NMI | DONE | | | `$F142` | get key from buffer | DONE | | | `$FD30` | default vectors | DONE | | +| `$FD90` | (unknown) | NOT DONE | | +| `$FD90` | (unknown) | NOT DONE | | +| `$FE2D` | memtop set part | DONE | | | `$FE47` | default NMI | PARTIAL | | | `$FE66` | default BRK | DONE | | | `$FF80` | revision byte | DONE | | diff --git a/c64/basic/a453.interop b/c64/basic/a453.interop new file mode 100644 index 00000000..f5dc0a42 --- /dev/null +++ b/c64/basic/a453.interop @@ -0,0 +1,3 @@ + +This routine is probably used by many cartridges and other software to initialize parts of the system. At least the UCart uses it - see here: +- https://www.elektroda.pl/rtvforum/topic3293027.html diff --git a/c64/basic/a453.unknown.s b/c64/basic/a453.unknown.s new file mode 100644 index 00000000..ecb53d23 --- /dev/null +++ b/c64/basic/a453.unknown.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION() \ No newline at end of file diff --git a/c64/basic/a644.interop b/c64/basic/a644.interop new file mode 100644 index 00000000..f5dc0a42 --- /dev/null +++ b/c64/basic/a644.interop @@ -0,0 +1,3 @@ + +This routine is probably used by many cartridges and other software to initialize parts of the system. At least the UCart uses it - see here: +- https://www.elektroda.pl/rtvforum/topic3293027.html diff --git a/c64/basic/a644.new.s b/c64/basic/a644.new.s new file mode 100644 index 00000000..e4e54f59 --- /dev/null +++ b/c64/basic/a644.new.s @@ -0,0 +1,5 @@ + +// XXX provide documentation and real implementation + +new: + STUB_IMPLEMENTATION() diff --git a/c64/basic/basic_warm_start.s b/c64/basic/init/basic_warm_start_internal.s similarity index 73% rename from c64/basic/basic_warm_start.s rename to c64/basic/init/basic_warm_start_internal.s index 1416ec4e..b271b928 100644 --- a/c64/basic/basic_warm_start.s +++ b/c64/basic/init/basic_warm_start_internal.s @@ -1,6 +1,9 @@ -// Clear screen etc, show READY prompt. -basic_warm_start: +// +// Continuation of the BASIC cold start routine +// + +basic_warm_start_real: #if CONFIG_MEMORY_MODEL_60K // We need our helpers to get to filenames under ROMs or IO area @@ -8,6 +11,7 @@ basic_warm_start: #endif // If warm start caused by BRK, print it address + // XXX sys 58235 also triggers this - to be fixed lda CMP0 ora CMP0+1 beq !+ diff --git a/c64/basic/init/e3b7.basic_warm_start.jmp.s b/c64/basic/init/e3b7.basic_warm_start.jmp.s new file mode 100644 index 00000000..8ebcfbde --- /dev/null +++ b/c64/basic/init/e3b7.basic_warm_start.jmp.s @@ -0,0 +1,5 @@ +// Clear screen etc, show READY prompt. + +basic_warm_start: + + jmp basic_warm_start_real diff --git a/c64/basic/init/e3b7.interop b/c64/basic/init/e3b7.interop new file mode 100644 index 00000000..1af6a185 --- /dev/null +++ b/c64/basic/init/e3b7.interop @@ -0,0 +1,5 @@ + +This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here: + +- http://ready64.org/articoli/_files/043_pokesc64.txt + sys 58235 - Warm Start diff --git a/c64/kernal/fe25.interop b/c64/kernal/fe25.interop new file mode 100644 index 00000000..828e597b --- /dev/null +++ b/c64/kernal/fe25.interop @@ -0,0 +1,3 @@ + +Address adjusted to support $FE2D - routine which is probably used by many cartridges and other software to initialize parts of the system. At least the UCart uses it - see here: +- https://www.elektroda.pl/rtvforum/topic3293027.html \ No newline at end of file diff --git a/c64/kernal/memtop.s b/c64/kernal/fe25.memtop.s similarity index 100% rename from c64/kernal/memtop.s rename to c64/kernal/fe25.memtop.s diff --git a/c64/kernal/screen/e544.clear_screen.s b/c64/kernal/screen/clear_screen_real.s similarity index 98% rename from c64/kernal/screen/e544.clear_screen.s rename to c64/kernal/screen/clear_screen_real.s index 9c790007..df0b835a 100644 --- a/c64/kernal/screen/e544.clear_screen.s +++ b/c64/kernal/screen/clear_screen_real.s @@ -1,7 +1,7 @@ // Clear screen and initialise line link table // (Compute's Mapping the 64 p215-216) -clear_screen: +clear_screen_real: // XXX it is probably a good idea to hide cursor first diff --git a/c64/kernal/screen/e544.clear_screen.jmp.s b/c64/kernal/screen/e544.clear_screen.jmp.s new file mode 100644 index 00000000..50d16f38 --- /dev/null +++ b/c64/kernal/screen/e544.clear_screen.jmp.s @@ -0,0 +1,6 @@ +// Clear screen and initialise line link table +// (Compute's Mapping the 64 p215-216) + +clear_screen: + + jmp clear_screen_real diff --git a/c64/kernal/stubs/e566.home_cursor.s b/c64/kernal/stubs/e566.home_cursor.s new file mode 100644 index 00000000..4e5b7d5f --- /dev/null +++ b/c64/kernal/stubs/e566.home_cursor.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION() diff --git a/c64/kernal/stubs/e566.interop b/c64/kernal/stubs/e566.interop new file mode 100644 index 00000000..0d7630ac --- /dev/null +++ b/c64/kernal/stubs/e566.interop @@ -0,0 +1,5 @@ + +This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here: + +- http://ready64.org/articoli/_files/043_pokesc64.txt + sys 58726 - CLR/HOME diff --git a/c64/kernal/stubs/e6b6.advance_cursor.s b/c64/kernal/stubs/e6b6.advance_cursor.s new file mode 100644 index 00000000..4e5b7d5f --- /dev/null +++ b/c64/kernal/stubs/e6b6.advance_cursor.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION() diff --git a/c64/kernal/stubs/e6b6.interop b/c64/kernal/stubs/e6b6.interop new file mode 100644 index 00000000..3c127ba7 --- /dev/null +++ b/c64/kernal/stubs/e6b6.interop @@ -0,0 +1,5 @@ + +This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here: + +- http://ready64.org/articoli/_files/043_pokesc64.txt + sys 59062 - Advance Cursor diff --git a/c64/kernal/stubs/e701.interop b/c64/kernal/stubs/e701.interop new file mode 100644 index 00000000..89b3c8a9 --- /dev/null +++ b/c64/kernal/stubs/e701.interop @@ -0,0 +1,5 @@ + +This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here: + +- http://ready64.org/articoli/_files/043_pokesc64.txt + sys 59137 - Previous Line diff --git a/c64/kernal/stubs/e701.previous_line.s b/c64/kernal/stubs/e701.previous_line.s new file mode 100644 index 00000000..4e5b7d5f --- /dev/null +++ b/c64/kernal/stubs/e701.previous_line.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION() diff --git a/c64/kernal/stubs/e8ea.interop b/c64/kernal/stubs/e8ea.interop new file mode 100644 index 00000000..fa5c0c1b --- /dev/null +++ b/c64/kernal/stubs/e8ea.interop @@ -0,0 +1,5 @@ + +This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here: + +- http://ready64.org/articoli/_files/043_pokesc64.txt + sys 59626 - Scrolls a Line diff --git a/c64/kernal/stubs/e8ea.scroll_line.s b/c64/kernal/stubs/e8ea.scroll_line.s new file mode 100644 index 00000000..4e5b7d5f --- /dev/null +++ b/c64/kernal/stubs/e8ea.scroll_line.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION() diff --git a/c64/kernal/stubs/e9ff.clear_line.s b/c64/kernal/stubs/e9ff.clear_line.s new file mode 100644 index 00000000..4e5b7d5f --- /dev/null +++ b/c64/kernal/stubs/e9ff.clear_line.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION() diff --git a/c64/kernal/stubs/e9ff.interop b/c64/kernal/stubs/e9ff.interop new file mode 100644 index 00000000..107072db --- /dev/null +++ b/c64/kernal/stubs/e9ff.interop @@ -0,0 +1,5 @@ + +This is a well-known address, needed even for some BASIC programming - it's a common target for a SYS command. See for example here: + +- http://ready64.org/articoli/_files/043_pokesc64.txt + sys 59903 - Clears Line of Text diff --git a/c64/kernal/stubs/fd90.interop b/c64/kernal/stubs/fd90.interop new file mode 100644 index 00000000..28ecfca7 --- /dev/null +++ b/c64/kernal/stubs/fd90.interop @@ -0,0 +1,4 @@ + +This routine is probably used by many cartridges and other software to initialize parts of the system. At least the UCart uses it - see here: + +- https://www.elektroda.pl/rtvforum/topic3293027.html diff --git a/c64/kernal/stubs/fd90.unknown.s b/c64/kernal/stubs/fd90.unknown.s new file mode 100644 index 00000000..4e5b7d5f --- /dev/null +++ b/c64/kernal/stubs/fd90.unknown.s @@ -0,0 +1,4 @@ + +// XXX provide documentation and implementation + + STUB_IMPLEMENTATION()