Falcon SCSI write issues

Problems with your machine in general.
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: Falcon SCSI write issues

Post by exxos »

dml wrote: 26 Sep 2025 14:05 But isn't it the very opposite? The limit is specifically the sector counter implemented as 14 bits in hardware according to Atari sources - not the byte count resulting from that and the sector size. So the limit is fixed at 16383 sectors, not 8mb.
Uwe said :
This is not correct. How would the DMA chip know the physical sector size? It would have to send a SCSI command to the drive to learn that. The DMA chip counters of ST and Falcon assume 512 bytes per sector. If a sector is bigger, the driver has to take this into account. When Atari talk about sectors and AHDI, it is always sectors of 512 bytes, because AHDI does not support anything else. HDDRIVER supports physical sector sizes of up to 4096 bytes, because these sizes are used by hard drives. 4096 only by SATA 4kn drives, as far as I can tell. I have such a drive, it works fine with the Atari.
I should add that you can transfer not just multiples of 512, but any byte count. Most SCSI commands do not deal with sectors, but only with byte sequences, e.g. the commands that get the drive name, the capacity or the block size. The computer tells the device how many bytes to transfer.
User avatar
dml
Posts: 842
Joined: 15 Nov 2017 22:11

Re: Falcon SCSI write issues

Post by dml »

Ok so the truth is really somewhere in between - the limit is indeed caused by a 14 bit counter but the hardware-side sector counting is in 512byte sector blocks, so insensitive to the actual sector size in use. An important distinction there but at least it seems to be clear now.
czietz
Posts: 584
Joined: 14 Jan 2018 13:02

Re: Falcon SCSI write issues

Post by czietz »

Fwiw, this restriction is also mentioned in the "Sparrow DMA ASIC" documentation by Atari. (Sparrow being the codename for what would become the Falcon.)
write only sector counter (14 bits)
This kind of documentation must always be read with a bit of caution, since these are clearly draft documents. But here the documentation matches the actual implementation.
User avatar
Cyprian
Posts: 542
Joined: 22 Dec 2017 09:16
Location: Warszawa, Poland

Re: Falcon SCSI write issues

Post by Cyprian »

czietz wrote: 27 Sep 2025 14:54 Fwiw, this restriction is also mentioned in the "Sparrow DMA ASIC" documentation by Atari. (Sparrow being the codename for what would become the Falcon.)
write only sector counter (14 bits)
This kind of documentation must always be read with a bit of caution, since these are clearly draft documents. But here the documentation matches the actual implementation.
is it also valid for the ST/TT ACSI?
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
czietz
Posts: 584
Joined: 14 Jan 2018 13:02

Re: Falcon SCSI write issues

Post by czietz »

Cyprian wrote: 27 Sep 2025 16:14 is it also valid for the ST/TT ACSI?
No. Atari's ACSI/DMA Integration Guide:
The Atari ST can DMA up to 127.5K bytes (i.e.255*512 byte blocks) in a single operation.
Off the top of my head, I don't know about the TT; but it's probably prudent to assume that the DMA chip limit is the same. (With the TT - or an ST with Alt-RAM - there is another restriction. Transfers with a final destination that is not ST-RAM have to go through the FRB, which is only 64 KiB.)
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: Falcon SCSI write issues

Post by Badwolf »

Badwolf wrote: 26 Sep 2025 11:58
czietz wrote: 26 Sep 2025 10:31 If you have a reproducible test case that shows that something still is wrong with EmuTOS's implementation, please share it on emutos-devel and Roger or I will have a look when time permits. However, I can confirm that the limit of 16383 for the Falcon SCSI DMA is known to EmuTOS and being enforced by its disk driver.
I suspect it may have merely been a coincidental error and then a misreading of the code on my part.
Sorry, @czietz, I forgot to mention this: I obtained the latest ET 1.4 512 PRG and booted into it from floppy from a completely clean boot and replicated my megabyte-by-megabyte increasing block size Fwrite() test: I did not see a failure under these conditions.

So my previous lock up was unlikely EmuTOS related and the max block transfer size limiting code appears to be working well.

Thanks,

David.
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
czietz
Posts: 584
Joined: 14 Jan 2018 13:02

Re: Falcon SCSI write issues

Post by czietz »

Thank you for retesting and reporting back. :)
Dlfrsilver
Posts: 84
Joined: 05 Jun 2019 06:41

Re: Falcon SCSI write issues

Post by Dlfrsilver »

I remember last year i had a chat with a Falcon user doing cubase and also transfering big files in SCSI.

He found the solution, it's a bug in the TOS v4.04 : You need in HDdriver to lower the buffers from 300 to 100 only (otherwise a patch in TOS v4.04 would be needed).

Note that i have met the same corruption problem with IDE (i use an 8gb compact flash in mine). Anything above 20mb got silently corrupted (even with clockpatch installed). I applied the same fix he did for SCSI, and it solved the problem also with IDE hard drive/CF file transfer.
User avatar
exxos
Site Admin
Site Admin
Posts: 28344
Joined: 16 Aug 2017 23:19
Location: UK

Re: Falcon SCSI write issues

Post by exxos »

@Dlfrsilver I think it was a limitation in the hardware which basically no one knew about.. There's fixes in the latest HDdriver for it.
mikro
Posts: 820
Joined: 28 Aug 2017 23:22
Location: Kosice, Slovakia

Re: Falcon SCSI write issues

Post by mikro »

Dlfrsilver wrote: 26 Oct 2025 22:21He found the solution, it's a bug in the TOS v4.04 : You need in HDdriver to lower the buffers from 300 to 100 only (otherwise a patch in TOS v4.04 would be needed).
I somehow doubt that HD Driver's *internal* cache manager has anything to do with TOS. Either it was / is a bug in HD Driver and you should report it or this is just pure speculation.
Note that i have met the same corruption problem with IDE (i use an 8gb compact flash in mine). Anything above 20mb got silently corrupted (even with clockpatch installed).
Again, either a bug in HD Driver (I wonder what exactly the "300" means, IIRC there's 2/2/10 default setting in the three text fields?) or completely unrelated (like bad memory -- that would actually explain a lot in your case: less memory used, less likely to touch the wrong memory module).

Return to “HARDWARE ISSUES”

Who is online

Users browsing this forum: ClaudeBot and 3 guests