Page 1 of 1

Unable to overwrite file on .d64 disk?

Posted: Tue Dec 01, 2020 9:57 am
by Newsdee
I've been using the core to play around with Commodore BASiC. It works okay, but I notice that if I do a SAVE on an existing file on disk, then it does not seem to modify the file contents.

It works fine if I create a new file, though. I can restart the core and reload the .d64 and my program is still there.

Am I doing something wrong? Or is it an issue in the core?
My main concern is that it fails silently, I accidentally lost some changes.

Re: Unable to overwrite file on .d64 disk?

Posted: Tue Dec 01, 2020 2:43 pm
by lupin3rd
Yes, you're doing something wrong. On the C-64, you can't just overwrite a file by using the SAVE command again. See this page for more details. To overwrite, you can use this command (but it comes with caveats, so do your own research into the matter):

SAVE "@0:FILENAME",8

Hope that helps!