ATARI HDD low level info

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
leonard
Moderator
Moderator
Posts: 660
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: ATARI HDD low level info

Postby leonard » Tue Jan 05, 2016 5:08 pm

It took years to reach some level and get experience


don't worry for me I have a small exp in atari ST.

Thanks to GGN advice, I'm using the GEMDOS for best compatibility with every hardware. (not a big deal in my demo because I have plenty of free RAM with the 4MiB version)
ULS is really nice, I heard about it recently. But ULS is overkill for my need. My demo context is really more simple than a generic solution for several games. My HDD emulation source code is only two pages long, not a big deal.

"We Were @" HDD will be released soon. HDD part was really easy to do compared to MegaSTE compatibility, believe me!
Leonard/OXYGENE.

User avatar
leonard
Moderator
Moderator
Posts: 660
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: ATARI HDD low level info

Postby leonard » Tue Jan 05, 2016 5:22 pm

@mike: to keep it simple: In "We Were @", every effect are running in 1MiB, the second MiB is used for music ( 800KiB of un-compressed PCM samples)
If you unpack the two floppies, you get 4.1MiB of data! so I can't keep the two floppies in memory in a "unpacked" form, just a part of it.
To keep a fast flow in the demo effect chaining, I use the two last MiB as a "unpacked data" cache ( data loaded from floppy of course ). During the demo, I have three loading parts ( the first big one with the bee, the girl with hair, and the electric sphere).
Now I use GEMDOS for HDD loading, I "read" & "unpack" data during the loading parts exactly as I did with floppy, and there is no issue.

Funny part is that the HDD version is theorically slower than floppy version, because I read & depack in parallel with the floppy routine. (With HDD, GEMDOS call is blocking so you don't benefit of parallel unpacking). But nobody will notice it as HDD loading is so fast.
Leonard/OXYGENE.

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

Re: ATARI HDD low level info

Postby AtariZoll » Tue Jan 05, 2016 6:54 pm

leonard wrote:
It took years to reach some level and get experience

don't worry for me I have a small exp in atari ST. ...

I did not talk about general Atari ST experience, but concrete case - running floppy SW from hard disk, and running SW located in TOS area from hard disk.
You are right that ULS or some similar is overkill for this. But point is in that that you can use it without need for doing self necessary code. In WHDLoad terminology you need to do only slave, master is what will do harder part. We just wanted to save you from doing what is already done. Price for that would be about 10-20KB more RAM spent.
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
CiH
Atari God
Atari God
Posts: 1145
Joined: Wed Feb 11, 2004 4:34 pm
Location: Middle Earth (Npton) UK
Contact:

Re: ATARI HDD low level info

Postby CiH » Tue Jan 05, 2016 7:58 pm

"We Were @" HDD will be released soon.
:cheers:
"Where teh feck is teh Hash key on this Mac?!"

User avatar
leonard
Moderator
Moderator
Posts: 660
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: ATARI HDD low level info

Postby leonard » Tue Jan 05, 2016 9:12 pm

CiH wrote: :cheers:


and MegaSTE owners will see the demo too! Was really a pain to make the 4 cycles slower blitter works in every fullscreen :)
Leonard/OXYGENE.

emcclariion
Captain Atari
Captain Atari
Posts: 203
Joined: Wed Nov 28, 2012 6:37 pm

Re: ATARI HDD low level info

Postby emcclariion » Wed Jan 06, 2016 11:00 am

cool, Will be running it ont he MegaSTE with a HD!
Atari TT Nova card Mach64, Lightning VME, 64MB of RAM, Mega STE 4MB, Nova mach 32 and Atari STE 4MB TOS 2.06 Netusb Ultrasatan 2, Atari Falcon CT60 512MB Netusb

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2781
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: ATARI HDD low level info

Postby alexh » Wed Jan 06, 2016 1:51 pm

leonard wrote:MegaSTE [snip] 4 cycles slower blitter


I never knew that. You learn something new every day. Congratulations on an even more excellent product.

Paranoid/PDX wrote:The BLiTTER requires 4 to 7 CPU cycles to arbitrate the bus on a regular ST or STE, leaving the CPU enough time to finish a bus access. On the MegaSTE, the CPU accesses the bus through a cache, which, unfortunately, Atari has never disclosed any internals of. However, the cache controller is likely to organize the cache in "lines" of 16 bytes each. To either read or write a complete line in one go, the cache needs to do 8 subsequent accesses, reading or writing 16 bits at once. This implies 8 bus cycles (minimally), so that it's likely that Atari simple changed the minimum "slot" which is granted to the CPU/cache from 4 cycles on the ST/STE to 8 cycles on the MegaSTE, making the BLiTTER require 8 to 11 cycles to arbitrate the bus.

User avatar
Mikefulton
Captain Atari
Captain Atari
Posts: 169
Joined: Sun Nov 29, 2015 10:27 am

Re: ATARI HDD low level info

Postby Mikefulton » Wed Jan 06, 2016 3:11 pm

AtariZoll wrote:Well Mikefulton: data packing is used in HAGA, in Gamex and of course even with simple Ramdisks, decades ago . Data can be "streamed' from hard disk. I gave link where can see examples.


Data packing in HAGA, Gamex, etc., is not relevant to the question of what Leonard is doing in his demo. Nor is it relevant if other demos do any of the other things I asked about.

Nobody was asking if such things were possible or if they'd ever been done in other programs. Of course they are possible and those techniques are in fact commonplace.

The question was specifically about what Leonard was doing in his program, because something being possible and commonplace doesn't mean it automatically happens in every new program.

User avatar
Mikefulton
Captain Atari
Captain Atari
Posts: 169
Joined: Sun Nov 29, 2015 10:27 am

Re: ATARI HDD low level info

Postby Mikefulton » Wed Jan 06, 2016 3:29 pm

leonard wrote:@mike: to keep it simple: In "We Were @", every effect are running in 1MiB, the second MiB is used for music ( 800KiB of un-compressed PCM samples)


There are some simple audio compression methods for 8-bit PCM which give about 50% compression with little audible difference in quality and which don't require a lot of CPU cycles to decode.

For example, we had a MU-Law compression tool we used for Jaguar, and it worked pretty well. You might wanna look into something like that.

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

Re: ATARI HDD low level info

Postby AtariZoll » Wed Jan 06, 2016 5:36 pm

Mikefulton wrote:Data packing in HAGA, Gamex, etc., is not relevant to the question of what Leonard is doing in his demo. Nor is it relevant if other demos do any of the other things I asked about.
Nobody was asking if such things were possible or if they'd ever been done in other programs. Of course they are possible and those techniques are in fact commonplace.
The question was specifically about what Leonard was doing in his program, because something being possible and commonplace doesn't mean it automatically happens in every new program.


You don't get it. What I talked about is that he could use specialized SW for his purpose: SW what makes some existing floppy SW to run from hard drive. And that adaptation can be done usually in 30-120 minutes. So, idea was that he must not change his demo, just use HAGA or ULS as platform what will make it work from hard disks. In other words, I did not talk what is done in some programs, but that we already have everything for fast and easy solution (and there is support for packing too). But I'm sure that Leonard just wanted to use own code, put his name on launcher. That's all OK. Forum is to learn things and exchange experiences. Eh, for some is place to spread lies and insults (hopefully he is really finished here). For some is place to compete with others. What is fine too, until they read carefully others posts. Could not say that you did it.
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
leonard
Moderator
Moderator
Posts: 660
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: ATARI HDD low level info

Postby leonard » Wed Jan 06, 2016 5:55 pm

Mikefulton wrote:For example, we had a MU-Law compression tool we used for Jaguar, and it worked pretty well. You might wanna look into something like that.


Yes could be fast but I really needed almost 0% cpu in my music driver, because of all effects
Player take an average of 1/3 of raster line. Unfortunatly no real time depacking could fit in such a short period ;)
Leonard/OXYGENE.

fenarinarsa
Atari freak
Atari freak
Posts: 51
Joined: Sat Mar 15, 2014 11:23 pm

Re: ATARI HDD low level info

Postby fenarinarsa » Wed Jan 06, 2016 10:28 pm

Thanks Leonard for the HDD & Mega STE version ! I will test it very soon :) I'm a bit sad I couldn't attend STNICCC and thank you in person (as for other things like SainT :p). Sad since I'm quite sure we already attended the same parties in the 90s.

I agree that it's not important which way you implemented GEMDOS HDD access, by using an already existing solution or making your own. IMO the other HDD loaders aim at making a generic HDD compatibility layer whereas it's obvious that in demos you have some really specific needs. Knowing your background I guess you implemented it in a few hours.

And btw I never heard of ULS before, so D-bug's site was very interesting to read. Sorry for people that seem to take this a bit too seriously :) I only come back to the ST world from time to time and I find it fabulous to be able to get so much information about SW & HW tricks now. It wasn't quite the same 25 years ago.

User avatar
Mikefulton
Captain Atari
Captain Atari
Posts: 169
Joined: Sun Nov 29, 2015 10:27 am

Re: ATARI HDD low level info

Postby Mikefulton » Thu Jan 07, 2016 6:31 am

AtariZoll wrote:You don't get it. What I talked about is that he could use specialized SW for his purpose: SW what makes some existing floppy SW to run from hard drive. And that adaptation can be done usually in 30-120 minutes. So, idea was that he must not change his demo, just use HAGA or ULS as platform what will make it work from hard disks. In other words, I did not talk what is done in some programs, but that we already have everything for fast and easy solution (and there is support for packing too). But I'm sure that Leonard just wanted to use own code, put his name on launcher. That's all OK. Forum is to learn things and exchange experiences. Eh, for some is place to spread lies and insults (hopefully he is really finished here). For some is place to compete with others. What is fine too, until they read carefully others posts. Could not say that you did it.


I asked Leonard a question specifically about what he was doing in his demo and you responded with information about other demos. The information you provided may be true, as regards those other programs, but it did not answer my question.

User avatar
Dbug
Atari freak
Atari freak
Posts: 52
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: ATARI HDD low level info

Postby Dbug » Thu Jan 07, 2016 8:03 am

Earlier somebody asked for legitimate reasons for wanting to write low in memory, one of the perfectly valid reasons is that if allows you to use short absolute addressing.

I don't really remember which of my demos used that, but basically during development I had a 32k buffer where I copied all the lower memory on startup and then restored it on exit to avoid exploding when going back to the text editor :)

Was really a pain to make the 4 cycles slower blitter works in every fullscreen :)

I had the same problem in my Monochrome demo...

emcclariion
Captain Atari
Captain Atari
Posts: 203
Joined: Wed Nov 28, 2012 6:37 pm

Re: ATARI HDD low level info

Postby emcclariion » Thu Jan 07, 2016 8:22 am

Hi,

I tested it last night on a real mega STE, with a UltraSatan and it worked great.
Atari TT Nova card Mach64, Lightning VME, 64MB of RAM, Mega STE 4MB, Nova mach 32 and Atari STE 4MB TOS 2.06 Netusb Ultrasatan 2, Atari Falcon CT60 512MB Netusb

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

Re: ATARI HDD low level info

Postby AtariZoll » Thu Jan 07, 2016 8:53 am

Dbug wrote:Earlier somebody asked for legitimate reasons for wanting to write low in memory, one of the perfectly valid reasons is that if allows you to use short absolute addressing.
I don't really remember which of my demos used that, but basically during development I had a 32k buffer where I copied all the lower memory on startup and then restored it on exit to avoid exploding when going back to the text editor :)

That's used a lot in games, of course mostly those not using TOS calls Idirect floppy access) . Coder of Wolfenstein 3D said that he used it too, but that using TOS disk access, so may be the reason for some problems (on some TOS versions).
However, using low memory - not lowest 32K, but area around $A000-$20000 is mostly done because: code is not relocatable, and they wanted that it works on 512KB machines. The result of it is failure when running from hard disk, or even just some higher TOS version. So, the reason is often just not so good code, and being not interested for hard disk run.
My opinion is that it is good to avoid TOS calls when RAM is very tight - 512K machines in first place. But when there is much more, using TOS can make it simpler. This demo case is good example for probably not good start concept. Because limited RAM it is made to use low RAM. Not only lowest 32KB. So, TOS is killed, and it uses own floppy code. Then came need for running from hard disks, and some RAM went on saving TOS workspace, hard disk driver, + needs code to swap it all. Better would be if it was designed at start to be hard disk compatible - so doing those parts of code which would be hard to make relocatable for top of 4MB RAM. Basically filling RAM from top to bottom. Then could still use TOS and hard disk driver normally (adding just some Timer settings, restores and like). If there is need for lowest 32 KB it could be swapped, as Dbug described. That would be surely much faster than swapping some 200 KB - and demo loadings would be faster. My conclusion is that main issue here was not low hard disk related, but RAM usage, and how TOS deals with RAM related.
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
Dbug
Atari freak
Atari freak
Posts: 52
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: ATARI HDD low level info

Postby Dbug » Thu Jan 07, 2016 9:01 am

As far as I know, the reason for using our own FDC routines instead of TOS was just that it made it much more practical to write fast loaders that can also do stable animation on the disk. The fact that you got more memory was more of a bonus :)

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

Re: ATARI HDD low level info

Postby AtariZoll » Thu Jan 07, 2016 9:30 am

TOS loads from floppy not slowly. You can not make it much faster. Actually, skewed format is what gives real speed advantage, regardless from loader.
But direct FDC has advantage that you can simply do something useful (animation for instance :-) ) during wait that floppy finishes.
And it's not only floppy access for what SW calls TOS, but diverse other things, like kb., mouse read, video related, RAM handling ..
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
Dbug
Atari freak
Atari freak
Posts: 52
Joined: Tue Jan 28, 2003 8:42 pm
Location: Oslo (Norway)
Contact:

Re: ATARI HDD low level info

Postby Dbug » Thu Jan 07, 2016 11:36 am

Well, if you want to make a compatible game, yes.
If you want to take advantage of all the ste hardware, nobody sane would go through the system functions to read the keyboard, mouse or set video parameters :)

User avatar
leonard
Moderator
Moderator
Posts: 660
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: ATARI HDD low level info

Postby leonard » Thu Jan 07, 2016 1:46 pm

But direct FDC has advantage that you can simply do something useful (animation for instance :-) )


you're right: in my demos I always decompress during the floppy loading. (so decompression is CPU "free")

If I use TOS for floppy read, the initial "apple" loading bar in the "We Were @" should have take twice the time! Twice the time is just not an option.
Leonard/OXYGENE.

User avatar
Tronic
Atari Super Hero
Atari Super Hero
Posts: 581
Joined: Wed May 19, 2004 10:37 am
Location: West Sussex, England
Contact:

Re: ATARI HDD low level info

Postby Tronic » Tue May 10, 2016 3:07 pm

Was a HDD version ever released to the general public? I saw Grazey had a version at Outline last week. Is there a link to download?
Atari STE, Mega STE, Atari STFM, UltraSatan, SatanDisk, Commodore 64, BBC Micro Model B, Playstation 1, Playstation 4, XBox 360, Amiga 600, Amiga 1200, Nintendo DS, Super Nintendo Classic Mini, Sony PSP and Super Nintendo.

http://www.ataristsales.com and http://stores.ebay.co.uk/Jays-Retro-Computer-Sales.
Atari ST demoscener, active in Effect^Elite since 1992! http://www.effect.org.uk.

User avatar
alien
Atari maniac
Atari maniac
Posts: 97
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: ATARI HDD low level info

Postby alien » Wed May 11, 2016 1:09 am

Dbug wrote:As far as I know, the reason for using our own FDC routines instead of TOS was just that it made it much more practical to write fast loaders that can also do stable animation on the disk. The fact that you got more memory was more of a bonus :)


Depended on the demo... Let's do the Twist Again, would not have worked on 520STFMs without that "bonus". I used pretty much all the RAM, and not because I was lazy.
Alien / ST-Connexion

User avatar
leonard
Moderator
Moderator
Posts: 660
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: ATARI HDD low level info

Postby leonard » Wed May 18, 2016 9:00 pm

TronicOfEffect wrote:Was a HDD version ever released to the general public? I saw Grazey had a version at Outline last week. Is there a link to download?


simply get latest version from pouet:

http://www.pouet.net/prod.php?which=66702
Leonard/OXYGENE.


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: joska, vido and 3 guests

cron