Closed z80andrew closed 4 years ago
_dskbufp disk buffer is 1024KiB. Perhaps this is where the problem lies. Need to try using a separate buffer to test this theory.
Using a separate buffer doesn't work. I think this might be prohibitively complex to implement, but will leave the issue open in case I have any breakthroughs.
I've been experimenting with modifying the Buffer Control Blocks at $4B2 and $4B6, and so far the results are very promising! Will write up an analysis on the wiki and work on the code some more (everything is hard-coded at the moment), but I think I will delay the 2.2 release if it means I can include this.
Edit: Needs more testing. Finalise 2.2 release first.
Back on to this now, and I have 16KiB (2x8KiB) buffers for each of the data and FAT BCBs allocating on startup. This is working correctly with virtual disks up to 512MiB in size, hurrah! I'm going to investigate if there's a way to allocate these dynamically such that memory usage is kept to a minimum. I'm considering a point release for this.
Released with version 2.3
Maximum disk size is currently 32MiB, but TOS 1.04+ can support 512MiB with larger sector sizes.
SerialDisk works with 512KiB sector sizes but not with anything larger.