How to read a part of a files with sedoric

This is the best place to discuss about the various Oric operating systems like Sedoric, Randos, FT-Dos, and others.
Post Reply
User avatar
coco.oric
Flight Lieutenant
Posts: 431
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

How to read a part of a files with sedoric

Post by coco.oric » Fri Jul 11, 2014 7:34 pm

Hello,

I'm looking to adapt an old game to the oric with osdk
Support will be DSK file.

I've a big data file of 58ko where i've to read a part of it to put in struct.c, or writing a part for it.
I don't see anything in sedoric information or sedoric_a_nu to do it.

Does anybody have a solution to use this data file or i 'll have to read sectors directly in a special structure of the disk like the demo pushing the envelop ?

Thanks a lot, Didier
coco.oric as DidierV, CEO Member
Image Image

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

Re: How to read a part of a files with sedoric

Post by Symoon » Fri Jul 11, 2014 8:37 pm

You should try and find the Sedoric manual (not Sedoric à Nu) and look at the files section.
I'm not an expert in Sedoric commands but some may help you maybe?

User avatar
coco.oric
Flight Lieutenant
Posts: 431
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: How to read a part of a files with sedoric

Post by coco.oric » Sat Jul 12, 2014 3:01 am

Thanks Simon but i didn't find anything in the manual. The file section seems to be limited to classic files (or i didn't understand the possibilities)
coco.oric as DidierV, CEO Member
Image Image

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

Re: How to read a part of a files with sedoric

Post by Symoon » Sat Jul 12, 2014 8:30 am

Took a quick look and you're right, I think the only solution is a sector-based one. I used the Sedoric Basic commands long ago and they were working fine (based on OPEN D command to open the disk as a file)..

User avatar
ibisum
Squad Leader
Posts: 879
Joined: Fri Apr 03, 2009 8:56 am

Re: How to read a part of a files with sedoric

Post by ibisum » Sat Jul 12, 2014 9:45 am

Could this be the point where someone works out some byte-level/sector-level assembly routines for the disk which .. maybe one day .. could be integrated into ContikiOS?

User avatar
Chema
Game master
Posts: 2081
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: How to read a part of a files with sedoric

Post by Chema » Sat Jul 12, 2014 10:03 am

Hi. I am not sure to understand what you want to do.

If you want to load separate pieces of data from disk, that should not be difficult: you save the contents of memory to a file and load them whenever you want wherever you want. So if you want to load just part of that data you can split it in chunks that could be loaded separately in different files. Some logic in your program should care about when to load what and if the currently in memory chunk needs saving...

But I guess what you want is something more complex. In that case you should go for a sector based read/write. If you want I can provide the routines for c or asm.

User avatar
coco.oric
Flight Lieutenant
Posts: 431
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: How to read a part of a files with sedoric

Post by coco.oric » Sat Jul 12, 2014 11:09 am

But I guess what you want is something more complex. In that case you should go for a sector based read/write. If you want I can provide the routines for c or asm.
@chema : thanks a lot. it seems that it's only with this solution that i can try my adaptation.
Of course, it will be easier to split datas but I don't want it to keep them protected from cheating

Didier
coco.oric as DidierV, CEO Member
Image Image

User avatar
Chema
Game master
Posts: 2081
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: How to read a part of a files with sedoric

Post by Chema » Sat Jul 12, 2014 11:36 am

In that case I have been using sector based disc access for quite a long time. Both in Space:1999 and 1337. If you look at the sources in the repository, there's a file called disk.s which works quite well and could be used within a c program.

Only thing is that you need to create the data file in advance, then store it when creating the disk. This way it goes just after Sedoric and you know which sector is the first of your file. All this can be automated within osdk. If you want I can prepare everything for you. I just need the datafile (or a way to create it) and I can prepare a simple c project whit some examples of read/writing.

Of course, I also need some time to spend... But I'd gladly do it.

User avatar
coco.oric
Flight Lieutenant
Posts: 431
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: How to read a part of a files with sedoric

Post by coco.oric » Sun Jul 13, 2014 6:34 am

Thanks Chema, your help will be appreciated but i'll try before to understand how it works with your softcode. I saw that the solution of "pushing the envelope" will also be a good option.
I have also my datas to rebuild with a sector size of data-blocks.

So i'll :

1/ learning to create a disk with a file at a fixed place
2/ building a new data structure for my game
3/ creating the adaptation with your solution. (i've also a problem to solve with differents programs and variables to exchange between them)
4/ looking at the pushing the enveloppe solution to improve it or no

.. a few months of work 8)
coco.oric as DidierV, CEO Member
Image Image

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: How to read a part of a files with sedoric

Post by Hialmar » Sun Jul 13, 2014 7:43 am

In order to transfer the datafile, I think that assinie's code (which mounts a .dsk under Linux and allows you to copy data files with a cp) is a must.
Hialmar
CEO and Silicium member.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests