| |
aeeben
Registered: May 2002 Posts: 45 |
The good old 1541 save @:bug - question
Finally googled the 1541 replace-save bug - so all the three conditions listed here must be met to make it corrupt data:
https://www.c64-wiki.com/wiki/REPLACE
-> If I'm saving a game state or program settings or something, and it's only 1 or 2 blocks, it should be always safe to use KERNAL save with @:filename, because condition #2 ("One or more blocks must get marked as occupied on at least three tracks") is never met?
Please correct if wrong. Please confirm if right :)
@-save slowly rot my programming disks as a kid, so I learned to never use it! |
|
... 1 post hidden. Click here to view all posts.... |
| |
TheRyk
Registered: Mar 2009 Posts: 2367 |
Quoting chatGPZ...
Just don't use it. Ever.
...
Yeah, i.e. if chatGPZ meant save"@:..." not c64-wiki ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11445 |
of course :D |
| |
TheRyk
Registered: Mar 2009 Posts: 2367 |
Quoting 'TS'so I learned to never use it!
And I wouldn't rely on ALL of the 3 conditions having to be fulfilled for making error happen...
Apart from direct mode and BASIC, where it's of course easier/shorter than doing it properly with all the OPEN-CLOSE-hankypanky, I don't see any advantage leading to recommending anyone risking SAVE"@..." at all |
| |
chatGPZ
Registered: Dec 2001 Posts: 11445 |
save/scratch/rename is the way to go indeed. there is no reason to try to work around that bug - there has to be enough blocks free for this in either case. |
| |
Fungus
Registered: Sep 2002 Posts: 714 |
I traced it out once, and what happened was the 1541 allocates the block in the bam, then when it goes to update the directory, it re-reads the bam into the same buffer and the bam is then corrupted. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11445 |
That is _one_ of the many problems that exist in various DOS versions :) (The wiki page tries to explain some of the others, but is written in a very confusing and slightly misinforming way imho) |
| |
Frantic
Registered: Mar 2003 Posts: 1650 |
Is a simple and relatively up-to-date (drive-code-wise) library available somewhere, with fastload/fastsave/fastsave-overwrite/read-dir functionality for use in tools ? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11445 |
Krills can only overwrite iirc (creating files is a bit complex...) |
| |
Frantic
Registered: Mar 2003 Posts: 1650 |
I will pay 5 SEK to the person who creates such a library, and 5 SEK more if the code is fairly independent of super specific features of some particular assembler. |
| |
Krill
Registered: Apr 2002 Posts: 3007 |
Frantic: Maybe Plushdos fits your bill. It's a collection of separate routines, with those you listed not requiring previous installation for mix & match.
There is no save-with-replace, though, nobody really needs that (unless it's in-place on an existing fixed-size file like hiscores, and then the saver in the IRQ loader would be good enough - also note that next release will be able to load the directory as if it were a regular file, but as a binary blob and without BAM).
Edit: Eh, and what's that bit about a particular assembler? Don't tell me you're also one of those people who'd port EVERYTHING to their own assembler of fancy? |
Previous - 1 | 2 - Next |