diskio f_seek_w() abandoned due to unreliability

This commit is contained in:
Irmen de Jong 2023-05-02 19:21:01 +02:00
parent 180dbbb521
commit 87d3109ffb
3 changed files with 12 additions and 12 deletions

View File

@ -693,15 +693,16 @@ internal_vload:
cbm.CLOSE(15)
}
; TODO see if we can get this to work as well:
; NOTE: f_seek_w() doesn't work reliably right now. I only manage to corrupt the fat32 filesystem on the sdcard with it...
; sub f_seek_w(uword pos_hiword, uword pos_loword) {
; ; -- seek in the output file opened with f_open_w, to the given 32-bits position
; f_seek.command[1] = 13 ; f_open_w uses channel 13
; f_seek.command[2] = lsb(pos_loword)
; f_seek.command[3] = msb(pos_loword)
; f_seek.command[4] = lsb(pos_hiword)
; f_seek.command[5] = msb(pos_hiword)
; goto f_seek.send_command
; diskio.f_seek.command[1] = 13 ; f_open_w uses channel 13
; diskio.f_seek.command[2] = lsb(pos_loword)
; diskio.f_seek.command[3] = msb(pos_loword)
; diskio.f_seek.command[4] = lsb(pos_hiword)
; diskio.f_seek.command[5] = msb(pos_hiword)
; goto diskio.f_seek.send_command
; }
}

View File

@ -11,7 +11,6 @@ For 9.0 major changes
- DONE: cx16diskio module merged into diskio (which got specialized for commander x16 target). load() and load_raw() with extra ram bank parameter are gone.
- DONE: drivenumber parameter removed from all routines in diskio module. The drive to work on is now simply stored as a diskio.drivenumber variable, which defaults to 8.
- get f_seek_w working like in the BASIC program on the sdcard - this needs the changes to diskio.f_open to use suffixes ,p,m
- 6502 codegen: see if we can let for loops skip the loop if startvar>endvar, without adding a lot of code size/duplicating the loop condition.
It is documented behavior to now loop 'around' $00 but it's too easy to forget about!
Lot of work because of so many special cases in ForLoopsAsmgen.....

View File

@ -31,9 +31,9 @@ main {
read_last_bytes()
; NOTE: f_seek_w() doesn't work right now. It requires substantial changes to the diskio library that are not compatible with the C64/C128.
; NOTE: f_seek_w() doesn't work reliably right now. I only manage to corrupt the fat32 filesystem on the sdcard with it...
; txt.print("\nseeking to 1292 and writing a few bytes...\n")
; if diskio.f_open_w("seektestfile.bin,p,m") {
; if diskio.f_open_w("seektestfile.bin,p,a") {
; diskio.f_seek_w(0, 1292)
; void diskio.f_write("123", 3)
; diskio.f_close_w()
@ -42,8 +42,8 @@ main {
; txt.print(diskio.status())
; sys.exit(1)
; }
;
; read_last_bytes()
read_last_bytes()
}
sub read_last_bytes() {