z80andrew / SerialDisk

A virtual Atari ST disk over serial for Windows, Linux and macOS
GNU General Public License v3.0
21 stars 2 forks source link

Maximum disk size should be 512MiB on TOS 1.04+ #12

Closed z80andrew closed 4 years ago

z80andrew commented 5 years ago

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.

z80andrew commented 5 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.

z80andrew commented 5 years ago

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.

z80andrew commented 5 years ago

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.

z80andrew commented 4 years ago

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.

z80andrew commented 4 years ago

Released with version 2.3