diff --git a/Makefile b/Makefile index d4751fce..afec2b7e 100644 --- a/Makefile +++ b/Makefile @@ -189,7 +189,7 @@ test_mega65: build/kernal_mega65.rom build/basic_mega65.rom build/symbols_mega65 test_ultimate64: build/kernal_ultimate64.rom build/basic_ultimate64.rom build/symbols_ultimate64.vs x64 -kernal build/kernal_ultimate64.rom -basic build/basic_ultimate64.rom -moncommands build/symbols_ultimate64.vs -8 empty.d64 -test_m65: build/newc65 +test_m65: build/newc65.rom m65 -b ../mega65-core/bin/mega65r1.bit -k ../mega65-core/bin/KICKUP.M65 -R build/newc65.rom -4 testremote: build/kernal_generic.rom build/basic_generic.rom build/symbols_generic.vs diff --git a/STATUS.md b/STATUS.md index 472daf2b..9c26e41b 100644 --- a/STATUS.md +++ b/STATUS.md @@ -126,8 +126,10 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on | `$FFCC` | `$F333` | `CLRCHN` | DONE | | | `$FFCF` | `$F157` | `CHRIN` | PARTIAL | | | `$FFD2` | `$F1CA` | `CHROUT` | PARTIAL | | -| `$FFD5` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support, no STOP key, check $F49E addr | -| `$FFD8` | `$F5ED` | `SAVE` | NOT DONE | check $F5DD location | +| `$FFD5` | `$F49E` | `LOAD` | PARTIAL | not yet clear what's this entry doing | +| `($0330)` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support, no STOP key, check $F49E addr | +| `$FFD8` | `$F5DD` | `SAVE` | NOT DONE | | +| `($0332)` | `$F5ED` | `SAVE` | NOT DONE | | | `$FFDB` | | `SETTIM` | DONE | | | `$FFDE` | | `RDTIM` | DONE | | | `$FFE1` | `$F6ED` | `STOP` | DONE | | diff --git a/bin/basic_generic.rom b/bin/basic_generic.rom index 1a3e9780..f1d719c8 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 f992e1d8..e12993d3 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 bbeab1f3..a870b4ac 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 8b262ddf..d5c4c797 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 a39fd8ac..d0870777 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 65ec49a3..8b59fe08 100644 Binary files a/bin/kernal_ultimate64.rom and b/bin/kernal_ultimate64.rom differ diff --git a/c64/kernal/f49e.interop b/c64/kernal/f49e.interop new file mode 100644 index 00000000..e3e2a1b3 --- /dev/null +++ b/c64/kernal/f49e.interop @@ -0,0 +1,2 @@ +This is a well-known address of a heavily used Kernal routine, it has to be the same so our ROM is compatible. + diff --git a/c64/kernal/f49e.load_int.s b/c64/kernal/f49e.load_int.s new file mode 100644 index 00000000..837d896c --- /dev/null +++ b/c64/kernal/f49e.load_int.s @@ -0,0 +1,13 @@ + +// +// XXX Note: something unusual was done with LOAD routine - although the vector at $330 points to $F4A5, +// the Kernal jump table points to $F49E (see also Mapping the C64, page 76). By experimenting +// I have already discovered that $F4A5 performs indirect jump via ($0330) vector, but it must +// be doing a little bit more - not sure yet, what. Something similar is done with SAVE. +// +// This has to be clarified. +// + +LOAD_INT: + jmp (ILOAD) + diff --git a/c64/kernal/f5dd.interop b/c64/kernal/f5dd.interop new file mode 100644 index 00000000..e3e2a1b3 --- /dev/null +++ b/c64/kernal/f5dd.interop @@ -0,0 +1,2 @@ +This is a well-known address of a heavily used Kernal routine, it has to be the same so our ROM is compatible. + diff --git a/c64/kernal/f5dd.save_int.s b/c64/kernal/f5dd.save_int.s new file mode 100644 index 00000000..7ef54a41 --- /dev/null +++ b/c64/kernal/f5dd.save_int.s @@ -0,0 +1,12 @@ + +// +// XXX Note: something unusual was done with LOAD routine - although the vector at $330 points to $F4A5, +// the Kernal jump table points to $F49E (see also Mapping the C64, page 76). By experimenting +// I have already discovered that $F4A5 performs indirect jump via ($0330) vector, but it must +// be doing a little bit more - not sure yet, what. Something similar is done with SAVE. +// +// This has to be clarified. +// + +SAVE_INT: + jmp (ISAVE) diff --git a/c64/kernal/jumptable/ffd5.jload.s b/c64/kernal/jumptable/ffd5.jload.s index b632434d..ef66f320 100644 --- a/c64/kernal/jumptable/ffd5.jload.s +++ b/c64/kernal/jumptable/ffd5.jload.s @@ -1,4 +1,4 @@ // load RAM from a device // C64 Programmer's Reference Guide Page 272 - jmp LOAD + jmp LOAD_INT diff --git a/c64/kernal/jumptable/ffd8.jsave.s b/c64/kernal/jumptable/ffd8.jsave.s index 1ac529e4..1213f478 100644 --- a/c64/kernal/jumptable/ffd8.jsave.s +++ b/c64/kernal/jumptable/ffd8.jsave.s @@ -1,4 +1,4 @@ // SAVE RAM to device // C64 Programmer's Reference Guide Page 273 - jmp SAVE + jmp SAVE_INT