EMUTOS fast floppy loading ?

News,announcements,programming,fixes,game patches & discussions.

Moderator: troed

Post Reply
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

EMUTOS fast floppy loading ?

Post by exxos »

Does anyone know why EMUTOS is like a million times faster at loading stuff floppy than TOS is ?
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
ijor
Posts: 428
Joined: Fri Nov 30, 2018 8:45 pm

Re: EMUTOS fast floppy loading ?

Post by ijor »

I don't have much personal experience with Emutos but it should be faster, at least in many cases, because it uses a more efficient seek implementation. Original TOS uses FDC command Seek with Verify, and the Verify part doesn't help too much besides wasting one revolution per track.
http://github.com/ijor/fx68k 68000 cycle exact FPGA core
FX CAST Cycle Accurate Atari ST core
http://pasti.fxatari.com
czietz
Posts: 548
Joined: Sun Jan 14, 2018 1:02 pm

Re: EMUTOS fast floppy loading ?

Post by czietz »

I was pointed to this thread and was asked to comment. (Sidenote: The mailing list might be a faster way to get EmuTOS developers to notice.) However, ijor already provided the answer; therefore, I can only add some further explanation here.

Atari TOS, for reasons unknown, uses a "seek with verify." With that command, after seeking to a track, the FDC waits for the first address mark (sector header) to verify the track number. On a normal floppy format, the track layout always has sector 1 after the index mark, followed by sectors 2 - 9. If you read consecutive sectors spanning more than one track, "seek with verify" means that one always misses sector 1 for reading (because it is consumed by the seek command). Therefore, one wastes one revolution of the disk per track.

EmuTOS does not set the verify bit for the seek command. You might ask: But isn't this dangerous if the drive ever seeks to the wrong track? Well, it isn't! Before reading or writing, the FDC verifies the track number again, anyway.

In fact, people used to patch the verify bit from Atari TOS, as discussed in the (German) Scheibenkleister book. This can also be seen for example in the (German) TOSPATCH program. Otherwise, you can also speed up loading by clever floppy formats (track layouts), as done by Martin Backschat's FastCopy.
User avatar
exxos
Site Admin
Site Admin
Posts: 23499
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: EMUTOS fast floppy loading ?

Post by exxos »

Thanks for the replies. I didn't see it as a relevant topic for the mailing list, so didn't ask there.

I did see the same in the 206 sources..

Code: Select all

#if TP_23 /* FASTLOAD */
        moveq.l   #$10,d6                       /* execute 1770 "seek" */
#else
        moveq.l   #$14,d6                       /* execute 1770 "seek_with_verify" */
#endif

But when I tried it, it didn't seem to make any odds. It's why I thought EMUTOS was doing something different. I will try it again to make sure.

EDIT:

OK so it is faster, just didn't notice then :roll:

Loading sysinfo from A:

206 normal - 32 seconds
206 FAST LOAD - 24 seconds
EMUTOS -25 seconds

ETOS likely was slower as for some reason running MAPROM caused the floppy to malfunction. So I tested without anything loaded which is likely where the slowdown came from. In otherwords, ignore the ETOS test :)
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
Post Reply

Return to “SOFTWARE PROGRAMMING & DISCUSSION”