English Amiga Board    


Go Back   English Amiga Board > » Requests > request.UAE Wishlist

Reply
 
Thread Tools
Old 24 September 2006, 20:27   #1
Konrad
Registered User
 
Konrad's Avatar
 
Join Date: Apr 2002
Location: Germany
Age: 32
Posts: 541
Savestate also for Harddisks

I thought I read about this some time ago, but I couldn't find anything about it. However is it possible to make hd's also work with savestates ?

But I'm sure that there's a reason why Tony didn't add this until now, am I right ?
Konrad is offline   Reply With Quote
Old 26 September 2006, 14:40   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,936
I can't find it either..

It can never work properly. OS and applications can easily get confused and worst case is data loss if any program writes to HD between saving and restoring state files.

For example:

State file saved, you continue playing the game/using text editor/etc, it decides to do autosave (or maybe update highscores or just write something to HD), load state file, AmigaOS or game's internal state is now incorrect (there is already autosave saved on HD but AmigaOS/game thinks the file is not there) -> program writes to disk again -> possible data loss or crashes etc..

IMHO best option is to implement WHDLoad specific statefiles (with possible help from emulation side), only safe and compatible way to do it. (but it won't be trivial either)
Toni Wilen is offline   Reply With Quote
Old 26 September 2006, 15:02   #3
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 3,898
Couldn't you calculate a CRC sum of the HDF and if the CRC does not match on load, tell the user that the HDF has been changed and ask him if he wants to continue anyway with the risk of data loss ?

Also, doesn't the same problem apply to ADFs, too ? Or do you store the entire ADF in the state file ?
__________________
Home: thomas-rapp.homepage.t-online.de
Email: thomas-rapp@web.de
thomas is offline   Reply With Quote
Old 26 September 2006, 15:32   #4
killergorilla
Lesser Talent
 
killergorilla's Avatar
 
Join Date: Jan 2003
Location: UK
Age: 31
Posts: 7,888
Maybe the possibity of read-only hdfs?
__________________
I'm totally gratified that people find Interceptor worthy of being downloaded and played after so many years especially in light of its rather rudimentary visual content by standards constantly increasing over time.
killergorilla is offline   Reply With Quote
Old 26 September 2006, 17:01   #5
Marcuz
Wurk???
 
Marcuz's Avatar
 
Join Date: Jun 2002
Location: .
Age: 37
Posts: 4,738
Send a message via MSN to Marcuz
Quote:
Originally Posted by killergorilla
Maybe the possibity of read-only hdfs?
that would be useful only with read-only little whdload hdfs, and this would so render not unuseful but almost unuseful the thing: a savestate is prolly helpful on main HD because you would use it casually. on little whdload hdfs, why should i play them instead of direct adfs if my interest is saving states?
Marcuz is offline   Reply With Quote
Old 26 September 2006, 17:52   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,936
Quote:
Originally Posted by thomas
Couldn't you calculate a CRC sum of the HDF and if the CRC does not match on load, tell the user that the HDF has been changed and ask him if he wants to continue anyway with the risk of data loss ?
Using HDF would "always" result in a filesystem corruption or crash except in read-only mode. (AmigaOS buffer cache would contain invalid data)

I won't implement features that can cause easy HD data loss.

Directory harddrive support is less dangerous (only currently open files can be lost or system can "only" crash) but it won't be too realiable either..

Quote:
Also, doesn't the same problem apply to ADFs, too ? Or do you store the entire ADF in the state file ?
Yes, same thing can happen with ADFs but it isn't too dangerous (worst case is single ADF lost instead of big HD partition) and most disk-based programs won't do "random" writes (no background utilities/patches active), use simple custom disk routines (no buffering) and writing is only used for saves.
Toni Wilen is offline   Reply With Quote
Old 26 September 2006, 18:33   #7
Anubis
Duck hunter
 
Anubis's Avatar
 
Join Date: Jan 2005
Location: Huntin' Ducks!
Age: 40
Posts: 1,786
Quote:
Originally Posted by Toni Wilen
IMHO best option is to implement WHDLoad specific statefiles (with possible help from emulation side), only safe and compatible way to do it. (but it won't be trivial either)
I don't think that I would like to see this either as time to write back to disk from WHDLoad session is loooong, and those files will be the size of memory (compressed probably) which is huge for WHDLoad settings.


Quote:
Originally Posted by Konrad
Take ShadowOfTheBeast for example. You have to watch the intro sequence before you can play the game.
You can map one of the buttons to 0x20F (Warp mode) and speed up movies.
Anubis is offline   Reply With Quote
Old 26 September 2006, 21:09   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,936
Cabinet discussion moved to http://eab.abime.net/showthread.php?t=25801
Toni Wilen is offline   Reply With Quote
Old 27 September 2006, 10:54   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,936
I have quite crazy idea... implement trackdisk.device patch that allows use of really big adfs. (=regular partition hardfiles)

Statefile problem fixed
Toni Wilen is offline   Reply With Quote
Old 27 September 2006, 11:48   #10
Marcuz
Wurk???
 
Marcuz's Avatar
 
Join Date: Jun 2002
Location: .
Age: 37
Posts: 4,738
Send a message via MSN to Marcuz
that's a great idea! but wouldn't be the read/access/write time longer than to hdfs?
Marcuz is offline   Reply With Quote
Old 27 September 2006, 13:05   #11
Anubis
Duck hunter
 
Anubis's Avatar
 
Join Date: Jan 2005
Location: Huntin' Ducks!
Age: 40
Posts: 1,786
We talking about one huge adf per game?

Will that work with amiga disk formats? (some games don't like even turbo read mode)
Anubis is offline   Reply With Quote
Old 27 September 2006, 13:09   #12
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 3,898
Quote:
Originally Posted by Toni Wilen
Using HDF would "always" result in a filesystem corruption or crash except in read-only mode. (AmigaOS buffer cache would contain invalid data)
That's no problem IMHO. When you load the state file, you check if the HDF has been changed and if it has, you reject the load (rendering the state file unusable). If the HDF hasn't changed, you restore the entire memory including HDD buffers, so no data is lost.

The HDF is always usuable. The Amiga is designed to be switched off at any point, so disk buffers cannot be an issue. Of cource, saving the state in the middle of a write operation is dangerous as is switching power off in the middle of an operation. But if the HDF is not touched between save and load of the state, there is no problem.
__________________
Home: thomas-rapp.homepage.t-online.de
Email: thomas-rapp@web.de
thomas is offline   Reply With Quote
Old 27 September 2006, 13:33   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,936
Quote:
Originally Posted by thomas
The HDF is always usuable. The Amiga is designed to be switched off at any point, so disk buffers cannot be an issue.
That is a different problem. Switching the Amiga off and back on results in full OS memory rebuild (including buffers) from the disk = disk<>memory out of sync situation can't happen.


Quote:
When you load the state file, you check if the HDF has been changed and if it has, you reject the load (rendering the state file unusable).
Yes but the HDF will be changed in most cases. Single save or high score file created and the statefile will be useless..

Quote:
We talking about one huge adf per game?

Will that work with amiga disk formats? (some games don't like even turbo read mode)
Yes and no. It is about emulating harddrive "inserted" in floppy disk drive (by hacking the OS trackdisk.device to support very large disk images, basically regular HDF images with OFS or FFS format) Nothing to do with trackloading programs.

Quote:
but wouldn't be the read/access/write time longer than to hdfs?
I don't think so if all delays are removed from trackdisk.device (like rw-head step delays) and implementing some kind of "super-turbo" floppy speed mode .)
Toni Wilen is offline   Reply With Quote
Old 27 September 2006, 13:47   #14
Anubis
Duck hunter
 
Anubis's Avatar
 
Join Date: Jan 2005
Location: Huntin' Ducks!
Age: 40
Posts: 1,786
So this means that we will be able to add HDF file into flopy drive, start emulator and play the game. We don't need then internal save option of WHDLoad (drive can be read only).

Now, can you make dynamic HDF that will grow as more files we place into them or at least some HDZ - compressed HDF?

See, it takes a small initiative for us to come up with some crazy ideas.
Anubis is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Savestate file size JayParker support.WinUAE 2 22 March 2006 17:59
prefered savestate format selection... Joe Maroni request.UAE Wishlist 0 01 August 2005 22:08
A1200 PCMCIA cd-rom controller to use with harddisks? Jerry support.Hardware 1 04 June 2005 19:38
WIll Harddisks work with Kickstart 37.299 ? Dr.Doom support.Hardware 8 30 November 2002 20:39


All times are GMT +2. The time now is 04:17.

-->

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Page generated in 0.79104 seconds with 9 queries