You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
See here for more information viewtopic.php?f=20&t=7296
DO NOT USE DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time it is unfortunately not possible to white list users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
At this time it is unfortunately not possible to white list users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
Falcon SCSI write issues
Re: Falcon SCSI write issues
The limit seems to be about 3MB..
Re: Falcon SCSI write issues
Interesting. I wonder if that limit is actually lower on the production machines?SteveBagley wrote: Thu Sep 25, 2025 12:28 am More interestingly, is this comment:which more or less confirms there's an 8MB DMA limit. Interestingly, the ST is limited to 128KB transfers according to the same source. If more than 8MB (128KB on the ST) is requested for transfer then the transfer is split into multiple DMA requests.Code: Select all
; 12-Feb-1992 ml 5.0c Modified _do_rw() to use the 14-bit counter on the ; ACSI DMA chip of the Sparrow.
We need to test a 7MB file with AHDI.
Unknown. Only just confirmed the behaviour yesterday.dml wrote: Thu Sep 25, 2025 7:59 am Aside from AHDI, is it only HDDriver & EmuTOS affected, or not known yet?
BW
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
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Re: Falcon SCSI write issues
Jookies test program doesn't use any driver.dml wrote: Thu Sep 25, 2025 7:59 am Aside from AHDI, is it only HDDriver & EmuTOS affected, or not known yet?
Re: Falcon SCSI write issues
Does the program perform read & write or just reads? Is there any way for the program to know the DMA address counter is still aligned with the end of the transfer? It may be this problem is not easy to test for until the exact mis-behaviour is understood.
d:m:l
Home: http://www.leonik.net/dml/sec_atari.py
BadMooD d/l: https://www.leonik.net/dml/sec_bm.py
AGT playlist https://www.youtube.com/playlist?list=P ... GzrdrZJxgM
Quake II playlist: http://www.youtube.com/playlist?list=PL ... 5nMm10m0UM
Home: http://www.leonik.net/dml/sec_atari.py
BadMooD d/l: https://www.leonik.net/dml/sec_bm.py
AGT playlist https://www.youtube.com/playlist?list=P ... GzrdrZJxgM
Quake II playlist: http://www.youtube.com/playlist?list=PL ... 5nMm10m0UM
Re: Falcon SCSI write issues
I think it just does reads..but it seems writes has the same problem anyway in copying files.. I'll copy the post to Jookie to answer later..dml wrote: Thu Sep 25, 2025 10:46 am Does the program perform read & write or just reads? Is there any way for the program to know the DMA address counter is still aligned with the end of the transfer? It may be this problem is not easy to test for until the exact mis-behaviour is understood.
I think EMUTOS may hold a clue as it corrupts FAT..
Re: Falcon SCSI write issues
The test prog does only 1 single large SCSI READ(10) command, and it waits for DMA interrupt to appear, by polling MFP register...dml wrote: Thu Sep 25, 2025 10:46 amDoes the program perform read & write or just reads? Is there any way for the program to know the DMA address counter is still aligned with the end of the transfer?
Code: Select all
#define mfpGpip ((volatile uint8_t *) 0xFFFA01)
#define IO_DINT 0x20 // DMA interrupt (FDC or HDC)
uint8_t wait_dma_cmpl(uint32_t t_ticks)
{
uint32_t now, until;
uint8_t gpip;
now = *HZ_200;
until = t_ticks + now; // calc value timer must get to
while(1) {
gpip = *mfpGpip;
if ((gpip & IO_DINT) == 0) { // Poll DMA IRQ interrupt
return OK; // got interrupt, then OK
}
now = *HZ_200;
if(now >= until) {
break;
}
}
return 0xff; // no interrupt, and timer expired,
}
From the device's perspective (viewed using DSO and logic analyzer on CosmosEx years ago), first ~3+ MBs are transferred fine, but after the 4th MB the REQ-ACK handshake from Falcon stops, so device cannot transfer more data and just times out (seconds later), and the Falcon thus doesn't get any additional data after the 4MB boundary, and also times out.
Re: Falcon SCSI write issues
My tests have all be reading from IDE and writing to SCSI.
OS implementation notes:
EMUCON (seen not to exhibit the problem) implements copy using Fread() and Fwrite() with a 16k limit (https://github.com/emutos/emutos/blob/m ... cmd.h#L101).
EmuDesk (wrapping Fwrite()) uses as much STRAM as it can grab: https://github.com/emutos/emutos/blob/m ... #L918-L936
TOS2 appears to allocate as much RAM as available too, and then calls Fread/Fwrite() as expected: https://github.com/th-otto/tos3x/blob/m ... #L734-L735 https://github.com/th-otto/tos3x/blob/m ... dir.c#L838
In TOS2 Fwrite() ultimately ends up allocating a buffer as large as the contiguous sectors it can find up to the transfer size and then calling usrio(), which is a wrapper to Rwabs(). https://github.com/th-otto/tos3x/blob/m ... 1083-L1084 https://github.com/th-otto/tos3x/blob/m ... at.c#L1093
Rwabs() is one of the functions that a hard disc driver overrides, devolving the matter to the driver at this point.
BW
OS implementation notes:
EMUCON (seen not to exhibit the problem) implements copy using Fread() and Fwrite() with a 16k limit (https://github.com/emutos/emutos/blob/m ... cmd.h#L101).
EmuDesk (wrapping Fwrite()) uses as much STRAM as it can grab: https://github.com/emutos/emutos/blob/m ... #L918-L936
TOS2 appears to allocate as much RAM as available too, and then calls Fread/Fwrite() as expected: https://github.com/th-otto/tos3x/blob/m ... #L734-L735 https://github.com/th-otto/tos3x/blob/m ... dir.c#L838
In TOS2 Fwrite() ultimately ends up allocating a buffer as large as the contiguous sectors it can find up to the transfer size and then calling usrio(), which is a wrapper to Rwabs(). https://github.com/th-otto/tos3x/blob/m ... 1083-L1084 https://github.com/th-otto/tos3x/blob/m ... at.c#L1093
Rwabs() is one of the functions that a hard disc driver overrides, devolving the matter to the driver at this point.
BW
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
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
- stephen_usher
- Site sponsor

- Posts: 7008
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: Falcon SCSI write issues
I know that this is not relevant to Jookie’s test but it should be made clear that:
Size of file != Size of transfer.
I’m very surprised that Atari drivers are trying to send such large chunks all in the one transfer. It’s very unusual.
Size of file != Size of transfer.
I’m very surprised that Atari drivers are trying to send such large chunks all in the one transfer. It’s very unusual.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: Falcon SCSI write issues
Here's how EmuTOS does it:stephen_usher wrote: Thu Sep 25, 2025 12:52 pm I know that this is not relevant to Jookie’s test but it should be made clear that:
Size of file != Size of transfer.
I’m very surprised that Atari drivers are trying to send such large chunks all in the one transfer. It’s very unusual.
The sector count, calculated from file size and contiguous available clusters (1), is passed directly to the hardware and it's set off (2).
1. https://github.com/emutos/emutos/blob/m ... fsio.c#L84
2. https://github.com/emutos/emutos/blob/m ... csi.c#L167
So on a nice clean drive, a large file will be perhaps only three transfers depending on cluster boundaries (head, middle [the big bit], tail).
BW
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
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Re: Falcon SCSI write issues
Just got this from Uwe...
regarding your SCSI issue, while preparing and testing the next HDDRIVER
release I played a bit with HDDRUTIL's "Read Test" functionality. This test
reads quite large (in Atari terms) amounts of data with a single SCSI command.
Usually (but this may depend on the HDDRUTIL release used) the test tries
to transfer up to 5 MiB of data in one go. This works fine with my Falcon.
But 10 MiB in one go did *not* work.
With my Ataris I use SCSI2Pi (https://www.scsi2pi.net/), which is perfect
for conveniently debugging scenarios like this on the Pi command line. Using
a nested intervals approach I found that with my Falcon the maximum amount
of bytes that are correctly transferred are 8388096. For a drive with 512
physical bytes per sector this is equivalent to 16383 sectors.
This is an excerpt from an SCSI2Pi log on debug level with 16384 ($4000)
sectors:
[s2p] (ID 3) [debug] Controller is executing READ(10), CDB 28:00:00:00:00:00:00:40:00:00
[s2p] (ID:LUN 3:0) [debug] Device is executing READ(10) ($28)
[s2p] (ID 3) [warning] Sent 33 byte(s), 512 required
[s2p] (ID 3) [warning] Received RESET signal
Something is obviously wrong here, HDDRIVER had to reset the SCSI bus.
With 16383 ($3fff) sectors there are no issues:
[s2p] (ID 3) [debug] Controller is executing READ(10), CDB 28:00:00:00:00:00:00:3f:ff:00
[s2p] (ID:LUN 3:0) [debug] Device is executing READ(10) ($28)
[s2p] (ID 3) [debug] Controller is executing READ(10), CDB 28:00:00:00:3f:ff:00:20:01:00
[s2p] (ID:LUN 3:0) [debug] Device is executing READ(10) ($28)
The 16384 boundary does not appear to be arbitrary, because it is 2^14. I
am not aware of any official Falcon documentation that says there is such
a limit, though. But a final official Falcon documentation does not even
exist I think. Atari probably had no money left do document things .
16384 is very small compared to what the TT supports, or to transfer sizes
used by other SCSI platforms. The SCSI protocol has been updated several
times to support larger transfer sizes, because they are important for
high throughput. Up to 2^32 sectors in one go are supported even by old
SCSI standards, because for obvious reasons workstations prefer large
transfer sizes.
Anyway, there is kind of a conflict now: Without any official source saying
that there is an 8 MiB limit I am reluctant to change the optimized transfer
mode settings in HDDRIVER 12.7 to 8 MiB. Just the fact that I can clearly
show this limit with my Falcon is not really a proof. On the other hand,
with a Falcon it does not really matter whether the limit is 8 MiB or more.
In particular HDDRIVER users appear not to have been affected by this for
decades, which is not that surprising because. transfers of more than 8 MiB
*in one go* are very unusual with an Atari.
