Reading Sedoric Free Sectors

This is the best place to discuss about the various Oric operating systems like Sedoric, Randos, FT-Dos, and others.
Post Reply
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Reading Sedoric Free Sectors

Post by Twilighte » Sat Jan 31, 2009 6:15 pm

Does anyone know if there is a memory location in Sedoric where i can read the free remaining sectors from the last disk operation?

User avatar
Symoon
Archivist
Posts: 1023
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Post by Symoon » Sat Jan 31, 2009 10:20 pm

Hi Jonathan,

The amount of free sectors is recorded in the sector #2 of track #20, the 3rd and 4th bytes (bytes #2 and #3 if you count them from zero).

I think each time the system does an operation, it loads this track in a buffer (BUF2 in #C200), marks the newly used (or free) sectors, and updates the free sectors amount.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Sat Jan 31, 2009 10:41 pm

Trust Symoon to help.. thanks Symoon
only trouble is that i don't seem to find this.
From mc i refresh the directory and have an infinite loop just before switching the rom back in. So i then examine C200 and it has 3D,1B,4C,50,46,48 at the start, not relating to the 942 Sectors free it reports when i do a normal DIR from BASIC. :(

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Sat Jan 31, 2009 10:46 pm

Well that is very strange, i just retried it and it came back with the correct figures, like FF,00,AE,03,08,00.. etc.
That was after doing a dir from basic. i then F6 and tried again (with dir from basic) and the correct figures again (03,AE in hex is 942 in decimal).
Very strange. i'll have to experiment a bit more to see if it was purely a quirky thing or recreatable. But looks hopeful :)

Ok, after some experiments, i can't seem to see any other correlation than first DIR on launching, then loading app which refreshes directory. very strange :?

Incidentally i just thought its CEO today isn't it?.. so sorry i couldn't make it. I hope the figures are still in shape and they'll be enough interest for a summer show, which i will definately try to make. :wink:

User avatar
Symoon
Archivist
Posts: 1023
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Post by Symoon » Sun Feb 01, 2009 7:56 pm

Beware that BUF2 in #C200 is used to load the bitmap, but can be used for different purposes. So before reading the memory in #C202 and #C203, you have to load the bitmap sector in BUF2.

Typically, there's a routine in #DA4C (overlay RAM of course), that loads the 1st bitmap sector in BUF2, and then flags the 7th bit in the memory location #2F to say it's loaded.
Maybe you can test this bit in this byte to be sure that you'll find the free sectors value there.

I'm only answering by quickly looking in Sedoric à Nu, so maybe this is not a complete description but I think it should work.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest