View Single Post
Old 01 September 2018, 11:28   #1
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,483
System takeover and multi floppy mess

Take this situation:
- bare metal game with multiple floppy but hdd installable
- system take over but reanimated when needed
- files loading through standard Open(diskname:dir/filename)/Seek()/Read() DOS functions
- task->pr_WindowPtr=-1 so all the requesters are suppressed
- if Open() fail then a request (in my private non-system screen) to insert proper disk is displayed

All work as it should and compatibility for an hdd usage is guaranteed.
But there is a big contraindication.

If you swap floppys during system takeover Open() call never return to the caller and you are stuck with no possibilities to regain program control!
This sure is due to system that is not aware of the disk change and use now invalid structures.

Ok, a low level file loader can be used but for various reason (also 'academic') I want to avoid this.
Or a message for the user to not change the discs unless requested.. also no.

So after thinking about it I thought about simulating a disk change using an ACTION_INHIBIT packet to the file system before the takeover
and then, after the reanimation, uninhibit.

Before trying I have some questions:
- has anyone already tried this way and it works?
[EDIT] it works
- The ACTION packet to the file system need to be sent for each device separately? (DF0, DF1, DF2, DF3)
[EDIT] yes, to each device
- there are better/faster way, maybe sending a command directly to trackdisk.device?

Thanks.

[EDIT] forgot to mention that I need to support also <KS2.0

Last edited by ross; 01 September 2018 at 12:27.
ross is offline  
 
Page generated in 0.07790 seconds with 11 queries