loading from disk

If you want to ask questions about how the machine works, peculiar details, the differences between models, here it is !
How to program the oric hardware (VIA, FDC, ...) is also welcome.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

loading from disk

Post by jbperin »

Hi all,

I have a technical question for.people having a disk drive on their Oric.

How long does it take to load 32kb from a disk drive on an Oric ?

Thanks by advance.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: loading from disk

Post by Dbug »

I believe the Microdisc is rated at about 6KB/second, and based on quick tests, it did not look like using filepack compression mode on FloppyBuilder was actually slowing down the speed, and it was actually faster on data that compressed a lot because then most of the time was spent in the copy loop, which has a much higher throughput than what you get from the disk interface.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: loading from disk

Post by jbperin »

Dbug wrote: Sun Aug 29, 2021 10:36 am about 6KB/second
Thank you very much for this valuable information.

By any chance, would you have the same measurements for Erebus or Cumana (I don't remember which one is capable of reading .DSK files) ?
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: loading from disk

Post by Dbug »

Erebus only loads TAP file
Cumana is a real disk system with a real disk controller connected to a real disk drive, what you may be thinking of is "Cumana Reborn" which is a Cumana disk controller with a built-in gotek floppy emulator.

Performance wise, Microdisc, Jasmin and Cumana are all similar, they all use a WDC disk controller which have similar command sets.

When you add a gotek or HxC, the main speed does not change much, but track changes seem to be faster.

And then you have Cumulus which is a very approximate emulation of the system, and is generally speaking much faster than the real hardware.
User avatar
iss
Wing Commander
Posts: 1641
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: loading from disk

Post by iss »

jbperin wrote: Sun Aug 29, 2021 1:18 pm
Dbug wrote: Sun Aug 29, 2021 10:36 am about 6KB/second
I think it should be lot faster ... theoretically :). Here is my "reverse" math:
From the 3" floppy drive Hitachi-HFD305S spec:
fdd.jpg
300 rpm => 5 rotations per second or 1 rotation takes 0.2 seconds i.e. the time to read 1 raw track.
The raw track has 6400 bytes (see Oric DSK format and 6400*8*5 = 256000 => this confirms 250kBits/s transfer rate).
If we have 256 bytes per sector and 16 sectors per track then we can read 256*16=4096 bytes in 0.2 secs,
which means 20 kBytes per second real data!

Or the answer of @jbperin's question is: for 32 kBytes we need 8*0.2 = 1.6 seconds :).

Of course this is the ideal case. We assume that one track is read in just one rotation and we don't count startup(spin-up) time, seek time from track to track, etc.

Else, I'll second what @Dbug said about different controllers, floppy emulators, data compression... ;).
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: loading from disk

Post by Dbug »

The 6KB/s is what was indicated in the Oric documentation.

The question is basically a combination of multiple things:
- How fast the disk drive can rotate
- The sector density
- How fast can the FDC send data to the Oric

I believe we have like about 30 clock cycles to process each byte, so reading a 256 bytes sector would take 7680 cycles.

A 1mhz, we have 1 000 000 cycles per second, divided by 30 cycles that gives us a 33333 bytes per second speed.

Obviously that's rounded values, and that does not count the book keeping, request for the next sector, etc...

In theory, we should be able to load two sectors each frame, stop to run the VBL and play the music without distortion, then load two more sectors, etc... just did not have the patience to figure out how all that work.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: loading from disk

Post by jbperin »

iss wrote: Sun Aug 29, 2021 3:28 pm Or the answer of @jbperin's question is: for 32 kBytes we need 8*0.2 = 1.6 seconds :).
Hey ..it sounds good

I'm working on a new concept for adventure games on Oric and I need to load 32kB of memory from disk at each scene.

So I was wondering if the gameplay would not be too slow ..

1.6 seconds is very cool ..
6 second is a bit too much IMO

It the truth is in the middle .. that should do.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: loading from disk

Post by Chema »

You can get a rough idea from booting Blake's7. It loads the game engine and all the tables, as well as the data for the intro. Could not tell the total amount without checking, but should use most of the available RAM... it takes 6 seconds with the appropriate interleave.

And data is stored compressed.
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: loading from disk

Post by jbperin »

Chema wrote: Sun Aug 29, 2021 7:49 pm You can get a rough idea from booting Blake's7.
I have neither disk nor Cumana reborn nor cumulus to test and I wonder is the reading from an emulator is relevant.

By the way, I realise that the link to blake's7 on oric.org looks broken:

https://www.oric.org/software/blake_s_7-2422.html

It leads to http://blakes7.defence-force.org/ which should rather be:

https://defence-force.org/index.php?page=games&game=blakes7
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: loading from disk

Post by Chema »

jbperin wrote: Sun Aug 29, 2021 8:34 pm
Chema wrote: Sun Aug 29, 2021 7:49 pm You can get a rough idea from booting Blake's7.
I have neither disk nor Cumana reborn nor cumulus to test and I wonder is the reading from an emulator is relevant.
6s is with real hardware and a real floppy disk. I cannot recall the amount of data read for the intro, but the engine leaves 32kb free (plus the 8k screen) from the full 64, and the data for the intro is quite big, so easily 25k (should check this). In the emulator it takes 4 seconds, I think.
By the way, I realise that the link to blake's7 on oric.org looks broken:

https://www.oric.org/software/blake_s_7-2422.html

It leads to http://blakes7.defence-force.org/ which should rather be:

https://defence-force.org/index.php?page=games&game=blakes7
Thanks for spotting this! I cannot fix it, but someone will for sure :)
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: loading from disk

Post by coco.oric »

oric.org is updated :)
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
Post Reply