1GB Image limit ...

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1556
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

1GB Image limit ...

Postby frank.lukas » Tue Oct 15, 2013 6:24 pm

Is there a 1GB limit in Hatari for acsi and ide Harddrive Images ...?
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Tue Oct 15, 2013 8:44 pm

frank.lukas wrote:Is there a 1GB limit in Hatari for acsi and ide Harddrive Images ...?


AFAIK, no. Do you have some problem with them, that doesn't happen on real device?

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1556
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: 1GB Image limit ...

Postby frank.lukas » Wed Oct 16, 2013 7:29 am

I can not partition an acsi image that is greater than 1GB, HDDriver offers me from a 4GB Image only 1GB for Partition …

And the IDE Port is not working properly, I think. I can not use the same Image, the System are booting from the GemDOS Drive and not from the IDE Image under TOS 2.06 ...

See the Pictures -> http://forum.atari-home.de/index.php?to ... 2#msg82962

Or work the IDE port only in Falcon Mode ?
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Wed Oct 16, 2013 8:17 am

If there is no ICD extended command support, ACSI is limited to 1GB . And as there is no mention of it, I guess that no.

Considering IDE - I experienced that it works only in Falcon mode - pretty bad idea :D
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1556
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: 1GB Image limit ...

Postby frank.lukas » Wed Oct 16, 2013 8:44 am

The IDE Port is not limited, but it can not handle a 4GB IDE Image under TOS 2.06 and HDDriver 8.22 is going crazy !?!
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Wed Oct 16, 2013 11:55 am

It seems like problem caused by using 32-bit signed integers, what results in troubles over 2GB .
Of course, problem may be in IDE emulation self. Not too new LBA can 128 GB.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Wed Oct 16, 2013 6:54 pm

frank.lukas wrote:Or work the IDE port only in Falcon Mode ?


Only Falcon had IDE, so I think only TOSv4 supports it (in addition to EmuTOS). With ST / TOS you need to use ACSI.

As to 2GB limit, Hatari's ACSI or IDE code (latter is from ported from Qemu) might be using 32-bit ints, I haven't reviewed it for that. Thomas would probably know.

joska
Hardware Guru
Hardware Guru
Posts: 3981
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: 1GB Image limit ...

Postby joska » Wed Oct 16, 2013 6:59 pm

TOS 2.x also supports IDE.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1556
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: 1GB Image limit ...

Postby frank.lukas » Wed Oct 16, 2013 7:41 pm

TOS 3.06 also Supports IDE, but it can not boot from it ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Thu Oct 17, 2013 7:48 am

All TOS including 2.06 and above have IDE autoboot support, even if no HW in machine, so TT TOS too - code is practically same as 2.06 one.
Then, there is people made IDE interfaces for ST 22 years ago, and used it. And currently, Alan's IDE interface for ST, STE is popular, so only thing what I can do is strong demand to make Hatari working with IDE in case of ST, STE and even TT emulation.

And there are patched TOS versions 1.04, 1.62 etc. with IDE autoboot support.
If I remember correct, IDE worked with ST, STE in earlier Hatari versions.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Thu Oct 17, 2013 6:41 pm

AtariZoll wrote:And there are patched TOS versions 1.04, 1.62 etc. with IDE autoboot support.
If I remember correct, IDE worked with ST, STE in earlier Hatari versions.


In that case, is there some problem with it now? :-)

Note that one may need to use different hard disk drivers depending on whether one wants to use ACSI or IDE interface, Falcon/TT or earlier machines, EmuTOS or real TOS. Hatari manual contains my notes from few years ago [1] when I last investigated this:
http://hg.tuxfamily.org/mercurialroot/h ... sk_support

At least EmuTOS stuff there is out of date (for starters, it supports IDE). Updates to the information in the manual would be welcome.

[1] Because EmuTOS nowadays supports both IDE & ACSI and doesn't require installing any drivers, I haven't bothered trying anything else for a long time. And even then, that was only for couple of MiNT experiments, which I stopped because dealing with disk images was so awkward. If I still had time, Helmut's recent TOSFS fixes for MiNT kernel would be very interesting...

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Thu Oct 17, 2013 7:28 pm

I thought that I did not ask anything hard to do. It should be really not big deal to allow already existing emulation in Hatari to work with ST, STE ...
The point is that it would be good exactly to test diverse drivers, among other things. There is no need for IDE formatting emulation - it is already obsolete with real hardware.
Yes, it is problem to use older versions of Hatari. And it is not good to use EmuTOS, especially if it takes over job of hard disk drivers - how then to test them ???? Or we should go now on Cecile ? :D
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Fri Oct 18, 2013 7:44 pm

AtariZoll wrote:especially if it takes over job of hard disk drivers - how then to test them ????


Uwe (HD Driver author) actually provides fixes/patches to Hatari's ACSI emulation. He knows how the HW works / should work better than us.

His HD Driver FAQ lists some of the above mentioned limits: http://hddriver.seimet.de/en/faq.html

AtariZoll wrote:I thought that I did not ask anything hard to do. It should be really not big deal to allow already existing emulation in Hatari to work with ST, STE ...


Patches are of course welcome also from others than Uwe.... :-)

Above discussion is missing relevant information:
  • What happens on real Atari device
  • How it differs from what Hatari's emulation of that device does (exact details)
  • Pointers to relevant HW documentation
  • Promise to do tests for experimental Hatari patches and preferably also some testing on real device [1]

[1] not many have real Atari's with GB sized drives, my own Megafile was 30MB in size, but even that doesn't work anymore...

Two potential problems are mentioned:
1. "I can not partition an acsi image that is greater than 1GB, HDDriver offers me from a 4GB Image only 1GB for Partition …"
-> "If there is no ICD extended command support, ACSI is limited to 1GB"
2. "The IDE Port is not limited, but it can not handle a 4GB IDE Image under TOS 2.06 and HDDriver 8.22 is going crazy !?!"

In case 1), where's ICD extended commands documentation? (list of commands needed by HD Driver would also be nice)
In case 2), what actually happens on Hatari (what means "going crazy") and what happens on real Atari device?

As to this comment from above discussion:
"And the IDE Port is not working properly, I think. I can not use the same Image, the System are booting from the GemDOS Drive and not from the IDE Image under TOS 2.06"

Hatari manual says: "As the IDE disk format (little endian) differs from the ACSI disk format (big endian), you need separate disk images for them".


Another option for disk image use is Aranym, I'm fairly sure its ACSI/IDE disk image support is still more mature than Hatari's, as Aranym has been long been used e.g. in Debian m68k port builds...

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1556
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: 1GB Image limit ...

Postby frank.lukas » Fri Oct 18, 2013 8:30 pm

With Pictures ...

HDDriver 8.22 with a 1GB ACSI Image and a 4GB IDE Image ... (going crazy)

Bildschirmfoto 2013-10-15 um 17.23.39.png


The Partition dialog give from a 4GB Image only 1MB !?!

Bildschirmfoto 2013-10-15 um 17.32.40.png
You do not have the required permissions to view the files attached to this post.
Last edited by frank.lukas on Sat Oct 19, 2013 10:21 am, edited 1 time in total.
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Fri Oct 18, 2013 9:19 pm

Eero Tamminen, all what I meant is to not disable IDE emulation when in ST, STE mode. Implementation is same as in Falcon.
But if you want to overcomplicate thing:

What happens on real Atari Device ? Same as in case of Falcon.
How it differs ... - irrelevant. Partial emulation is enough. Otherwise can write 333 pages about complete irrelevant differences.
Relevant HW docs: Are you serious ? Try some 10 years old ATA doc for instance.
I promise that will do tests.

But likely simpler will be that go in Hatari source, and myself correct that IDE enabling for ST :D

Continuing with this reply, even if it hurts me:
Can you buy today some IDE device below 2-4GB (CF card for instance) ? People don't want used CF cards.
ICD command set protocol is simple: you give prefix $1F before SCSI type 2 command (code over $1F , so $20 ... $FF), as command, and then command self, and then parameters. What all commands Hddriver use you need to ask Uwe.

ACSI is not big endian. It is bytewise transfer, so no sense to talk about endianess.
In case of IDE necessary byte swap is done in driver, when DOS partitioned disk is attached. So, you don't need separated disk images.
Look my site with images. Same is good for ACSI and IDE. User needs only to replace driver and bootsector at start (some 10 KB) .

Sorry, Aranym is not real emulator.

Ah, and there is Atari STE with IDE interface: ST Book http://en.wikipedia.org/wiki/ST_BOOK
So, there is official Atari STE with IDE interface and TOS 2.06 . It was launched before Falcon.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Sun Oct 27, 2013 11:21 am

AtariZoll wrote:Eero Tamminen, all what I meant is to not disable IDE emulation when in ST, STE mode. Implementation is same as in Falcon.


The code in Hatari is exactly the same for all of ST/ST/TT/Falcon [1]. I.e. difference in behavior you see in different machines emulated by Hatari, is in TOS & HD driver, and potential unknown emulation bugs in Hatari that somebody needs to debug both on Hatari and real HW (which Hatari developers AFAIK don't have).

[1] Except for PSG port-A IDE reset bit 7 which has a comment that it's Falcon specific. However, emulation for that bit isn't implemented.


AtariZoll wrote:But if you want to overcomplicate thing:

What happens on real Atari Device ? Same as in case of Falcon.


If it in Hatari works different for ST/STE, TOS or HD driver you're using, do something different there than under Falcon emulation.


AtariZoll wrote:How it differs ... - irrelevant. Partial emulation is enough. Otherwise can write 333 pages about complete irrelevant differences.
Relevant HW docs: Are you serious ? Try some 10 years old ATA doc for instance.
I promise that will do tests.

But likely simpler will be that go in Hatari source, and myself correct that IDE enabling for ST :D

Continuing with this reply, even if it hurts me:
Can you buy today some IDE device below 2-4GB (CF card for instance) ? People don't want used CF cards.
ICD command set protocol is simple: you give prefix $1F before SCSI type 2 command (code over $1F , so $20 ... $FF), as command, and then command self, and then parameters. What all commands Hddriver use you need to ask Uwe.


Uwe and Thomas are current debugging and fixing some issues in ACSI emulation on hatar-devel. It's better if you subscribe to that and give your input there:
http://listengine.tuxfamily.org/lists.t ... ari-devel/


AtariZoll wrote:ACSI is not big endian. It is bytewise transfer, so no sense to talk about endianess.
In case of IDE necessary byte swap is done in driver, when DOS partitioned disk is attached. So, you don't need separated disk images.
Look my site with images. Same is good for ACSI and IDE. User needs only to replace driver and bootsector at start (some 10 KB) .


Ok, I guess byte-swapping comment in manual was DOS/Windows compatibility related (-> needs to be corrected). But if "User needs only to replace driver and bootsector at start", it's not the same image, you do need different images for ACSI and IDE access...


AtariZoll wrote:Ah, and there is Atari STE with IDE interface: ST Book http://en.wikipedia.org/wiki/ST_BOOK
So, there is official Atari STE with IDE interface and TOS 2.06 . It was launched before Falcon.


Besides those, does it differ from STE otherwise, from SW developer point of view?

I mean, would "--machine ste --ide-master ide.img --tos tos206.tos" be all that's needed for emulating such a thing with Hatari?

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Sun Oct 27, 2013 11:31 am

frank.lukas wrote:HDDriver 8.22 with a 1GB ACSI Image and a 4GB IDE Image ... (going crazy)


Uwe identified some issues in Hatari ACSI emulation in regards to reporting image sizes & command errors, what happens at reset, and in handing of commands that aren't yet handled by Hatari (causes rest of commands to work incorrectly, image "corruption"). Some of the issues are already fixed in Mercurial by Thomas, but at least handling of unknown commands is still broken.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Sun Oct 27, 2013 5:07 pm

OK - I did some more tries, and yes, IDE emulation actually works with ST, STE mode in Hatari 1.7 . But only with images where L/H is byte-swapped - in compare with how looks on Atari . If Atari boot code is not byte swapped in Intel platform, then will not boot.
All this is pretty much confusing. Additionally, EmuTOS boots and installs from image which is byte swapped and which is not byte swapped ! There is likely some detection of what is it - at least for DOS partitioning. I don't have IDE autoboot image, TOS compatible at moment. Just did byte swap on DOS/TOS compatible, what I use on Atari mostly, and then it worked in ST mode.
Things are not simple on real Ataris too, in fact. To achieve autoboot with DOS compatible or TOS/DOS compatible (what is DOS in fact, with special parameters) you need to write bootsector byteswapped, with 68000 code. But rest of disk sectors is in Intel byte order.
I need to make some tests with larger images, over 2GB, yet.

Considering ACSI emulation bugs: I think that it is because using too much diverse commands in Hddriver, in purpose to have some complete SCSI emulation. It may have sense for some cases, but for instance for UltraSatan it caused just problems, and need to upgrade it's firmware, while it worked well with older Hddriver versions.

When I said that ACSI and IDE image is same, I meant that all sectors containing FAT, data sectors etc. are same, and no bytes swapped. And it is normal, as disk structure has nothing with interface used. Normal is that driver is different in case of ACSI and IDE. And in practice it looks that you upload only 1 large image, with content, usually it is with ACSI autoboot, because there is more people with such disks. And provide short - about 10-15KB long short image with IDE autoboot. So, IDE user first writes long image on CF card, and then writes that 10 KB on CF card begin. Or, can prepare image with IDE autoboot at start with some Hex editor for instance, and after that writing to CF card, or IDE drive.

As I know, ST Book uses TOS 2.08, very similar to 2.06 - it is 512KB instead 256 . There are some threads here about ST Book ROM, and I need to make some CRC fixing for modded ROM soon .. But did not have time to go in it yet . Considering IDE, it should be 100% same with 2.06 . So, you need to add support only for 2.08 and it's 512KB - but better ask Simbo or Dal about that. May be problems if it has some LCD display specific port.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Sun Oct 27, 2013 5:28 pm

Thomas commited hopefully a fix for handling of commands unknown to Hatari.

As to IDE and byte swapping, the IDE emulation code is from Qemu (which started as an x86 emulator), maybe that explains part of it. :-)

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 1GB Image limit ...

Postby AtariZoll » Sun Oct 27, 2013 5:54 pm

Just tried 4GB image with IDE driver in Hatari 1.7, WIn. version . It sees only first 4 partitions (512MB each), from 8, so only up to 2GB boundary. It confirms that problem should be in using 32-bit (signed) integers in image file access. We need to go on 64-bit obviously.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1695
Joined: Sun Jul 31, 2011 1:11 pm

Re: 1GB Image limit ...

Postby Eero Tamminen » Sun Oct 27, 2013 7:53 pm

AtariZoll wrote:Just tried 4GB image with IDE driver in Hatari 1.7, WIn. version . It sees only first 4 partitions (512MB each), from 8, so only up to 2GB boundary. It confirms that problem should be in using 32-bit (signed) integers in image file access.


Try with latest Hatari Mercurial version. Thomas just changed it to use ftello() instead of ftell().

Ato
Captain Atari
Captain Atari
Posts: 300
Joined: Tue Aug 10, 2010 3:27 am
Location: Duisburg, Germany

Re: 1GB Image limit ...

Postby Ato » Sun Oct 27, 2013 10:35 pm

Eero Tamminen wrote:Try with latest Hatari Mercurial version. Thomas just changed it to use ftello() instead of ftell().


That won't make a difference unless compiled (on Linux) with support for 64-bit file offset types. Excerpt from the man page of ftello:

On many architectures both off_t and long are 32-bit types, but compilation with

#define _FILE_OFFSET_BITS 64

will turn off_t into a 64-bit type.


Long story made short: replacing ftell with ftello in this case makes sense but not without 64-bit offset support.

Hth. Cheers,
T.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 3 guests