Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Formatting a disk from Basic
2005-12-15 11:36
Cruzer

Registered: Dec 2001
Posts: 1048
Formatting a disk from Basic

Anyone knows how to format a disk in basic, without using any cartridge-specific commands? IIRC it's something with "open".
 
... 17 posts hidden. Click here to view all posts....
 
2005-12-15 23:11
Wanderer
Account closed

Registered: Apr 2003
Posts: 478
Quote: :D

As mentioned, without the ",id" it will only erase the contents of the directory (track 18). The other tracks will not be formatted.

I've had many bad experiences with the emulator lately, with files corrupting. I religiously do a validation after saving code over and over and I also avoid "save and replace" (eg. save "@0:blah,8"). I've always been told save and replace could cause corruption and you know what, it does!! Despite making backups of source code for my last two demos, the original source files were garbled.

open1,8,15,"v0":close1 will validate a disk
open1,8,15,"i0":close 1 will initialize a disk

The zero is optional and dates back from the time where drives were numbered 0 and 1 (like PET drives)

2005-12-15 23:13
Zyron

Registered: Jan 2002
Posts: 2381
I've always used save "@:name" & never had any problems with it.
2005-12-16 02:30
Nafcom

Registered: Apr 2002
Posts: 588
Quote: I've always used save "@:name" & never had any problems with it.

But I experience the same as Wanderer, but only very rarely.
2005-12-16 02:55
Oswald

Registered: Apr 2002
Posts: 5094
wanderer,

replacing files with original 1541 dos is bugges, I've experienced it on the real thing. if you really have to attach an AR, and that will do it fine.


Vice.. I've noticed that it doesnt handles files correctly when a new file is created on the attached .d64 ( PRG* it doesnt close the file until you deattch the d64). That was a year or more ago, not sure if this bug still exists, but when making a new file within vice I always deattach and reattach the d64 to make sure.
2005-12-16 06:03
JackAsser

Registered: Jun 2002
Posts: 2014
@Wanderer: "I've had many bad experiences with the emulator lately". Hmmm... so you're basically saying that you're coding on the real thing, but on an emulator, that is, u're not cross-compiling. Ever considered simply use Save Snapshot in the VICE menu instead of fiddeling with disks etc?
I atleast always do that when I want to save f.e. a BASIC program or whatever. It's not until I wish to transfer the code to the real thing or distribute it as a .d64/.prg I actually save to disk.
2005-12-16 06:24
Wanderer
Account closed

Registered: Apr 2003
Posts: 478
I use CCGS, which I've become accustomed to. It's a mess really.

I save my data files in the monitor but they can't be loaded from a .d64 file, only from the monitor (where they are stored in the CCGS root directory).

Then I have to import the data files using the D64 editor, link them, and I have the final product.

However with CCGS (which has an option to allow instant write on the D64 file so as not to keep it open) it still corrupts.

I have tried the snapshot option, and it works great... but I am somewhat convinced that it also snapshots the D64 file. I'm not 100% certain but I can recall a time where I loaded my snapshot and went to the disk directory to find an outdated file instead of the newer one.

I'd love it if I could save data files direct to D64 file so I could link them. I tried Vice once or twice and it works good but I'm not sure I can save direct to the disk file?? If so I may consider switching.

In a related/unrelated note, you have to be careful with the D64 editor and the "wipe" file option. I once "wiped" a SCR-atched file that was crosslinked with a real file. This occurs when you scratch a file and it's sectors become occupied with a valid file - d64 says they are crosslinked. If you WIPE the old file (which shows as SCRATCHED) so as to avoid getting that crosslink message it will actually fill in the sectors with 0 bytes. Ouch! Thus your valid file gets erased.

2005-12-16 15:57
QuasaR

Registered: Dec 2001
Posts: 145
VICE only updates the D64-file if it's detached (IIRC there was a option to update the file after every write but I'm not sure...)
The old SAVE"@:XZY",8 mostly didn't work because the 1541-DOS first wrote the file and then scratched it afterwards, so when there were too less blocks left on the disc, the file went corrupt.
2005-12-16 20:06
Oswald

Registered: Apr 2002
Posts: 5094
with save"@:xxx" I had a problem when the new file was overwritten on an older existing one. So when loading "somefilealreadyondisksinceages" It loaded "filesavedwith@:" instead....
2005-12-17 13:53
Graham
Account closed

Registered: Dec 2002
Posts: 990
Hehe, only stupid Action Replay folks use @:, FC3 users can continue to work during file deleting :)
2005-12-17 14:10
chatGPZ

Registered: Dec 2001
Posts: 11386
and FC3 users definetly need those extra seconds i guess! :=)
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
goerp/F4CG/HF
Magic/Nah-Kolor
Unlock/Padua/Albion
katon/Lepsi De
WVL/Xenon
algorithm
Acidchild/Padua
MCM/ONSLAUGHT
DnP
Guests online: 129
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.065 sec.