LOAD/SAVE preparation routines should be OK now

This commit is contained in:
FeralChild64 committed 2019-10-29 22:15:44 +01:00
1 parent 7eca8ea05b
commit 73f1e24e3c
6 files changed
+47 -19

No files matched your search

+4 -4
View File
@@ -128,13 +128,13 @@ NOTE: Even the 'DONE' routines won't support features described as missing in on
| `$FFC0` | `$F34A` | `OPEN` | DONE | |
| `$FFC3` | `$F291` | `CLOSE` | DONE | |
| `$FFC6` | `$F20E` | `CHKIN` | DONE | |
| `$FFC9` | `$F250` | `CKOUT` | PARTIAL | |
| `$FFC9` | `$F250` | `CKOUT` | DONE | |
| `$FFCC` | `$F333` | `CLRCHN` | DONE | |
| `$FFCF` | `$F157` | `CHRIN` | PARTIAL | |
| `$FFD2` | `$F1CA` | `CHROUT` | PARTIAL | |
| `$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 | |
| `$FFD5` | `$F49E` | `LOAD` | DONE | |
| `($0330)` | `$F4A5` | `LOAD` | PARTIAL | no VERIFY support, no STOP key support |
| `$FFD8` | `$F5DD` | `SAVE` | DONE | only this preparation routine part is done |
| `($0332)` | `$F5ED` | `SAVE` | NOT DONE | |
| `$FFDB` | | `SETTIM` | DONE | |
| `$FFDE` | | `RDTIM` | DONE | |
@@ -1,11 +1,22 @@
//
// LOAD preparation routine
//
//
// Input (according to http://sta.c64.org/cbm64krnfunc.html)
// .A - 0 for load, non-0 for verify
// .X and .Y - load address (if secondary address is 0)
//
//
// Note: 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 discovered that $F49E performs
// indirect jump via ($0330) vector, after setting MEMUSS.
//
LOAD_INT:
LOAD_PREP:
sty MEMUSS+1
stx MEMUSS+0
-12
View File
@@ -1,12 +0,0 @@
//
// 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)
+29
View File
@@ -0,0 +1,29 @@
//
// SAVE preparation routine
//
//
// Input (according to http://sta.c64.org/cbm64krnfunc.html)
// .A - address of zero page register holding start address of memory area to save
// .X and .Y - end address of memory area plus 1
//
//
// Note: Experimenting can easily confirm that SAVE preparation routine does similar
// actions as LOAD preparation routine.
//
SAVE_PREP:
sty EAL+1
stx EAL+0
tax
lda $01, x
sta STAL+1
lda $00, x
sta STAL+0
jmp (ISAVE)
+1 -1
View File
@@ -1,4 +1,4 @@
// load RAM from a device
// C64 Programmer's Reference Guide Page 272
jmp LOAD_INT
jmp LOAD_PREP
+1 -1
View File
@@ -1,4 +1,4 @@
// SAVE RAM to device
// C64 Programmer's Reference Guide Page 273
jmp SAVE_INT
jmp SAVE_PREP