View Single Post
Old 05 June 2018, 01:51   #3
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 881
Quote:
Originally Posted by phx View Post
No, unfortunately not. You could try to send an ACTION_FLUSH packet to the filesystem, but there is no DOS-call for it.

Or maybe you can enforce the buffer flush by opening and reading from another file after your write?

Although, I never tried both options myself.

IMHO, reanimating the OS temporarily for disk operations doesn't feel quite right and always has a taste of hack. The two clean and easy solutions would be:
- Delay all write operations until your program is about to return to the, just restored, OS.
- Use a lowlevel trackloader and write data with your own write-routines in your own format.
Yep - depending on the filesystem etc it seems like there is almost no safe way to do this.

I have used both of the above techniques, and in the end for games running from a HD/CD I used the third option of *gasp* leaving the OS running. This wasn't nearly as painful as I thought it would be and doesn't cause many issues except RAM usage.
alpine9000 is offline  
 
Page generated in 0.04644 seconds with 10 queries