Need a small byte swapping test routine

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

Moderator: troed

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

Need a small byte swapping test routine

Post by exxos »

Could some kind soul write a test routine in assembly to do by swapping which is what would happen in HD11 etc when used on hard drives ?

Reason is, I'm just curious as to how long it would take a 8MHz CPU to do the byte swapping on I assume 512 bytes of data ? versus the same test on a 32MHz boosted CPU...

This boils down to if a boosted CPU can do a reasonably quick job at byte swapping, there may actually be no need for us to develop a byte swapping function in hardware for our IDE boards...Then let users simply tick the byte swap box in the driver, and even though it is a lot slower, if we can gain speed back with a faster CPU, we could just do that instead. But this is why I need on sort of benchmark tool so I can do the comparison...
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.
czietz
Posts: 547
Joined: Sun Jan 14, 2018 1:02 pm

Re: Need a small byte swapping test routine

Post by czietz »

I see one issue with that idea: It's not only slower, but HDDRIVER can't boot from a byte-swapped drive, either. I.e., when you don't byte-swap in hardware (like e.g. the Thunder is capable of doing), one cannot boot from a PC-compatible IDE hard drive / CF card / SD card adapter. Meaning that you always need two drives: one with Atari byte order for booting and one with PC byte order for data exchange.
User avatar
exxos
Site Admin
Site Admin
Posts: 23488
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Need a small byte swapping test routine

Post by exxos »

I guess that would be more of a TOS issue though ? I assume TOS would check for the IDE driver and try to load the driver.. I assume that would fail before the driver itself..


EDIT:
Has anyone tried using HD11 etc with one byte swapped drive and one not-byte swapped , IE master and slave ? I assume that is how people are doing it currently anyway ?
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.
czietz
Posts: 547
Joined: Sun Jan 14, 2018 1:02 pm

Re: Need a small byte swapping test routine

Post by czietz »

exxos wrote: Fri Mar 13, 2020 6:13 pm I guess that would be more of a TOS issue though ? I assume TOS would check for the IDE driver and try to load the driver.. I assume that would fail before the driver itself..
Actually, it's both. Meaning that even if you patch TOS 2 to get the root sector loaded from a byte-swapped IDE, then HDDRIVER's loader (the part that loads HDDRIVER.SYS from disk) fails on a byte-swapped drive. Of course, with EmuTOS one does not have such issues. There, a byte-swapped drive is merely slower.
exxos wrote: Fri Mar 13, 2020 6:13 pm Has anyone tried using HD11 etc with one byte swapped drive and one not-byte swapped , IE master and slave ? I assume that is how people are doing it currently anyway ?
I know several people who use it that way in a Falcon with a dual-CF card reader, yes. In the ST and TT, I also of course know a lot of people who have a Lightning ST or Thunder and therefore don't have these problems in the first place. ;)
Post Reply

Return to “SOFTWARE PROGRAMMING & DISCUSSION”