Hi,
Think I found a bug? When reading sectors on the microdrive, one after another (scanning the tape) after ~14 sectors the program crashes "4 OUT OF MEMORY, 10:3". I guess scanning the sectors in this way is the only way to get an index of the tape contents? And the expected behavior should be the contents of the CHAN_M struct buffer is overwritten with each call.
The code here is starting at sector 70 and trying to read to 100, we get 83 when it pops.
Test code being used : https://github.com/thweasel/Microdrive_ ... src/main.c
Checked the addresses and using pointers and direct passing the Struct, both seem to fail in the same way.
Any help or pointers welcome, totally stumped.
Owen
Microdrive - Classic lib - "4 OUT OF MEMORY, 10:3"
No problem.
I think I created the problem while trying to understand an odd condition you'll probably run into: the record number, when reading a sector is forced to the same value of the sector number.
I can't explain this myself, on the z88dk library side I'm only picking the sector data and referring to it with a struct skeleton. I should do one more experiment to determine whether the record number is used only on the "PRINT" files (stream based) only, but in that case I miss the way a binary file is being sorted.
I think I created the problem while trying to understand an odd condition you'll probably run into: the record number, when reading a sector is forced to the same value of the sector number.
I can't explain this myself, on the z88dk library side I'm only picking the sector data and referring to it with a struct skeleton. I should do one more experiment to determine whether the record number is used only on the "PRINT" files (stream based) only, but in that case I miss the way a binary file is being sorted.