English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 14 November 2018, 00:06   #1
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Overwriting a .HDF with the same name

Hi Toni.

When I create a HDF with the same filename as one on my hard disk it says do you want to replace it? When I choose yes I get a creation Error Failed to create hard disk image file..

Is it possible to overwrite a hdf with a new hdf or not?
ransom1122 is offline  
Old 14 November 2018, 00:15   #2
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
I assume that you are trying to do this in the same session and the "old" .HDF is locked, so to speak, as that's what has been originally added?

That's normal.
DamienD is offline  
Old 14 November 2018, 00:25   #3
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Correct. So we cannot overwrite a HDF in the "locked" state it is in even although I get a prompt asking me to overwrite?
ransom1122 is offline  
Old 14 November 2018, 00:28   #4
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by ransom1122 View Post
Correct. So we cannot overwrite a HDF in the "locked" state it is in even although I get a prompt asking me to overwrite?
Not that I'm aware of as it's in currently in use / locked... just remove the old .HDF from the "CD & Hard drives" section, reset, press <F12> and create again using the same name
DamienD is offline  
Old 14 November 2018, 00:33   #5
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Need to quit winuae to unlock, delete, then restart winuae to achieve this, it's a fairly annoying process.. If you could overwrite would save so much time..
ransom1122 is offline  
Old 14 November 2018, 00:49   #6
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by ransom1122 View Post
Need to quit winuae to unlock, delete, then restart winuae to achieve this, it's a fairly annoying process..
...and takes what; 30 seconds maximum?

Anyway, you could just do the following instead:
  • Say the .HDF is originally named "System.hdf".
  • You're doing what you need to do, then realise you've make a mistake and want to start again.
  • Create a new .HDF named "System1.hdf".
  • Finish everything as desired and quit WinUAE.
  • Now delete "System.hdf" and finally rename "System1.hdf" --> "System.hdf".
This way you didn't need to end WinUAE at all
DamienD is offline  
Old 14 November 2018, 02:09   #7
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Quote:
Originally Posted by ransom1122 View Post
Need to quit winuae to unlock, delete, then restart winuae to achieve this, it's a fairly annoying process.. If you could overwrite would save so much time..
There is a remedy, even if drastic but not dangerous (done hundreds of times), I use it when I have to delete or overwrite one or more files. In practice, just install on Windows Unlocker or IObit Unlocker (more updated). Once this is done, just right click on one or more files and choose unlock (you can also rename or delete).

AMIGASYSTEM is offline  
Old 14 November 2018, 07:13   #8
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
@DamienD Yes I follow those steps, but pretty much rename the HDF to Gamename (1) as I cannot use Gamename, then Delete, Rename. But yes it does take time.

I have 5,734 HDF's x 30 Seconds > 172,020 Seconds compared to Zero seconds if Replace was implemented

@AMIGASYSTEM Yes IObit unblocker works perfect. It unlocked the HDF while it was still active in winuae, and I was able to replace the HDF with same filename by Overwriting.

@Toni Is it as all possible to add a simple script to UNLOCK & DELETE when REPLACING?
ransom1122 is offline  
Old 14 November 2018, 08:54   #9
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by ransom1122 View Post
Need to quit winuae to unlock, delete, then restart winuae to achieve this, it's a fairly annoying process..
No need for this. Just click on Restart and it will be unlocked.

Or quit and restart WinUAE, load the config and overwrite the HDF *before* you start emulation. It's only locked while emulation is running.
thomas is offline  
Old 14 November 2018, 09:19   #10
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Updated the thread title to something more appropriate: "Create a HDF" --> "Overwriting a .HDF with the same name"
DamienD is offline  
Old 14 November 2018, 09:49   #11
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Hmmm, I have a vague memory of you asking this previously ransom1122...

Ah yes; Creating HDF over an existing HDF with same filename.
DamienD is offline  
Old 14 November 2018, 10:20   #12
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
Quote:
Originally Posted by DamienD View Post
Hmmm, I have a vague memory of you asking this previously ransom1122...

Ah yes; Creating HDF over an existing HDF with same filename.
I swear I had Deja Vu when adding this issue. Obviously nothing was done about it, lets see if it's within Toni's reach to address?
ransom1122 is offline  
Old 14 November 2018, 10:33   #13
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Thing is; it's not really a WinUAE issue but a normal OS feature to stop corruption of data.

Files get locked when they are in use... as AMIGASYSTEM has provided, there are external tools to get around this though.
DamienD is offline  
Old 14 November 2018, 11:51   #14
ransom1122
Registered User
 
ransom1122's Avatar
 
Join Date: Aug 2011
Location: Omnicorp
Age: 45
Posts: 5,813
The purpose of the thread was is it possible?

Why should I use an external tool if it is possible to do?
ransom1122 is offline  
Old 14 November 2018, 14:21   #15
Tomislav
Registered User
 
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 302
When emulation is stopped with F12, emulation is not finished, it is calculated as running and anything in use by emulation is still locked. You need to end emulation which finally unlocks file.

Only two ways are to unlock it. First is to quit WinUAE. Second is to press "Restart" button that is near "Reset" and "Quit" buttons which shows only when emulation is still running.

Only exceptions are floppy, CD and tape for which you need to press "Eject" button and then "OK" to continue emulation. Those 2 main steps unlocks floppy, CD or tape image file.

It is logically that program needs to close handling of file that you can do other things like deleting or renaming of that file.

Last edited by Tomislav; 14 November 2018 at 14:34.
Tomislav is offline  
Old 14 November 2018, 14:32   #16
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Quote:
Originally Posted by Tomislav View Post
When emulation is stopped with F12, emulation is not finished, it is calculated as running and anything in use by emulation is still locked. To unlock you need to end emulation which finally unlocks file.

Only two ways are to unlock it. First is to quit WinUAE. Second is to press "Restart" button that is near "Reset" and "Quit" buttons that shows only when emulation is still running.

It is logically that program needs to close handling of file that you can do other things like deleting or renaming of that file.
What you say is normal, the problem is another, the "Reset" still does not solve the files remain in use anyway, you must exit WinUAE

If you, for example, consult dozens of archives, or files of any types, these can not be deleted if WinUAE is not closed, the only clean way to solve "Unlocker" mentioned above
AMIGASYSTEM is offline  
Old 14 November 2018, 15:30   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
HDF is always "in use", they are only released (file handle closed) during reset but HD controller emulation opens it again almost immediately (to get size, partition table etc). It is also by design write locked because any external write would corrupt the filesystem because part of data is always cached by HD controller driver and/or filesystem. (which is also the reason why statefiles can't work with read-write HDFs)

"Restart" is the only supported way to release/free HDFs. (and it is a bug if it isn't released after restart)

I guess with "1 second boot delay" enabled, it should be possible to keep HDFs unlocked until delay ends but HDFs really aren't designed for on the fly swapping.
Toni Wilen is online now  
Old 14 November 2018, 15:41   #18
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Yes Toni, the Hardfiles after i "Reset" they are free to be renamed, deleted, etc. I referred to all the files dragged on the Worbench (archives, data files, sound, images, etc.)

Last edited by AMIGASYSTEM; 14 November 2018 at 15:46.
AMIGASYSTEM is offline  
Old 14 November 2018, 19:21   #19
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by AMIGASYSTEM View Post
What you say is normal, the problem is another, the "Reset" still does not solve the files remain in use anyway, you must exit WinUAE
You should read more carefully. Nobody said that "Reset" will free the HDF. We are talking about "Restart" which is a different button.
thomas is offline  
Old 14 November 2018, 19:46   #20
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by thomas View Post
You should read more carefully. Nobody said that "Reset" will free the HDF. We are talking about "Restart" which is a different button.
Yes, "Reset" is the Amiga reset, as in Ctrl+LAmiga+RAmiga, and in WinUAE also achieved with (RAlt+)RCtrl+Insert+Home.

"Restart" is to close the current running WinUAE emulation and get ready to run a new config: that's why the emulation window disappears. Then, you should be able to do the task you want, before selecting a config and thus restarting emulation.

As for the HDF file, in my case I usually use different copies of the same HDF but with different contents, so I never need to change the config.
Foebane is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating HDF over an existing HDF with same filename. ransom1122 support.WinUAE 29 22 February 2018 10:21
hdf? narud17 New to Emulation or Amiga scene 3 02 February 2005 20:39
Overwriting MBR zen support.Hardware 5 03 September 2004 20:42
How do you use .hdf's? Mr Softy support.WinUAE 7 27 November 2002 21:55

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


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

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11100 seconds with 15 queries