Discussion:
I accidentally deleted an important C64 disk file by mistake! Is there any way I can get it back?
(too old to reply)
Phyrne
2008-01-01 17:44:00 UTC
Permalink
I accidentally deleted an important C64 disk file by mistake! Is
there any way I can get it back?

I have not saved anything to this disk since I deleted the file.

I have a C64 with a 1541 disk drive and a COMAL cartridge and some
issues of COMAL Today.

I use my C64 for most of my word processing.

Thank you for any suggestions,

Phyrne
Rusty
2008-01-01 18:31:08 UTC
Permalink
Yes, you should be able to find a unscratch utility, they are standard
in most utility packages.
Caricon
2008-01-01 18:51:20 UTC
Permalink
Just use a sector editor and change the one bite. When you delete a
file, all it does is change
the one bit in the file name. I used to play around a lot with sector
editors.
iAN CooG
2008-01-01 19:46:24 UTC
Permalink
Post by Caricon
Just use a sector editor and change the one bite. When you delete a
file, all it does is change
the one bit in the file name. I used to play around a lot with sector
editors.
It's not in the file name, but the file type (puts a $00 instead of $82 for
a PRG for example)

Example of a dir track $12/01 containing 1 good PRG (marked $81, pointing to
track $11 sector $00) and a deleted one (marked $00 and pointing to track
$13 sector $00)

00 FF[82]11-00 44 4F 43-54 4F 52 20-57 48 4F A0
A0 A0 A0 A0-A0 00 00 00-00 00 00 00-00 00 C7 00
00 00[00]13-00 44 52 57-48 4F A0 A0-A0 A0 A0 A0
A0 A0 A0 A0-A0 00 00 00-00 00 00 00-00 00 06 00

just change the $00 to $82 and you recovered its directory entry, but NOT
the BAM, so you have 2 options:
1) validate the disk: time consuming procedure if the disk is almost full
and potentially dangerous in some rare circumstances, but still.
2) copy it to another disk with a (fast) file copier, then restore the file
type to $00 and copy it back
--
-=[]=--- iAN CooG/HokutoForce ---=[]=-
Peter Dassow (remove the NOSPAM. for direct answer)
2008-01-02 09:46:31 UTC
Permalink
Post by Caricon
Just use a sector editor and change the one bite.
What's that ? I mean I know sometimes floppies "bite the dust", but
changing to bite what ?
Sure you mean byte, or :)

Regards
Peter
iAN CooG
2008-01-02 14:20:16 UTC
Permalink
Peter Dassow (remove the NOSPAM. for direct answer)
Post by Peter Dassow (remove the NOSPAM. for direct answer)
Post by Caricon
Just use a sector editor and change the one bite.
What's that ? I mean I know sometimes floppies "bite the dust", but
changing to bite what ?
Sure you mean byte, or :)
Wrong reply, it's Caricon who wrote that
--
-=[]=--- iAN CooG/HokutoForce ---=[]=-
Phyrne
2008-01-01 20:37:52 UTC
Permalink
Thanks everyone!

I used a disk editor, which I wrote in COMAL over a decade ago, to
change the third entry for that file in my disk directory to 82 just
as you suggested (since my word processor saves its files as PRG
files), and then did a validation to rewrite the BAM. I suspect that
BAM stands for block availability memory.

I am thrilled and delighted!

Thanks again,

Phyrne
Marc 'BlackJack' Rintsch
2008-01-01 21:14:18 UTC
Permalink
[…] I suspect that BAM stands for block availability memory.
The `M` stands for `map`.

Ciao,
Marc 'BlackJack' Rintsch
christianlott1
2008-01-01 23:03:05 UTC
Permalink
check out Inside Commodore DOS:

http://sta.c64.org/docs.html
Brian Ketterling
2008-01-01 23:54:45 UTC
Permalink
I suspect that BAM stands for block availability memory.
"Block Allocation Map", but, /what-hever/...
I used a disk editor, which I wrote in COMAL over a decade ago, to
change the third entry for that file...
I am thrilled and delighted!
There's the good part! :)

Brian
--
rusure
2008-01-02 03:56:47 UTC
Permalink
Post by Phyrne
I accidentally deleted an important C64 disk file
by mistake!  Is there any way I can get it back?
I have not saved anything to this disk since I deleted the file.
For those who are hesitant to use sector editors to fix (?)
a disk's systems information, I am almost positive
that MAVERICK will unscratch a file. Any good
general purpose disk utility should also inscratch files.

The 1571 TEST/DEMO disk has an UNSCRATCH
program If you don't have an original disk that came with
a 1571 drive, you can download a ZIPPED SDA from :

http://www.q-link.cc/c64utila.shtml

You may be able to use the DOS SHELL program on
the same disk. I have had difficulties with file copying
with the DOS SHELL, but unscratching files should work.
Continue reading on narkive:
Loading...