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 > Disk/side detection
2005-07-25 13:18
xeron
Account closed

Registered: Jul 2005
Posts: 5
Disk/side detection

What is the best way to detect which disk/side is inserted before attempting to load a file?

If its a case of reading the disk ID, how do you do that?

I'm using this loader:
http://cadaver.homeftp.net/rants/irqload.htm

If I use Kernal routines to detect the disk/side, will i have to call "initfastload" again?

Another question just occurred to me... if I try to detect the disk/side, will I have to restore normal interrupts first? or can I detect it without disabling that loader routine?
2005-07-25 14:48
cadaver

Registered: Feb 2002
Posts: 1160
Why not use the proper loadersystem (v2.1 or v2.2) with multidrive support? The loader in the rant is about as bad as you can get for real-life applications.

IMO easiest and most compatible (some might copy all disksides to a 1581/FD/HD/IDE64 directory) is to use short identifying files, whose existence tells which side is inserted. Or even simpler, ask the user to flip disk if the file you want to load is not found :)
2005-07-25 14:54
xeron
Account closed

Registered: Jul 2005
Posts: 5
Are the sources for the 2.x loader on the plush disk? If so, does anyone have them in plain text files, since I'm cross-compiling in DASM and the sources seem to be in a custom format which I assume is for turbo assembler.
2005-07-25 14:58
cadaver

Registered: Feb 2002
Posts: 1160
Didn't mean plush loader, but covertbitops loadersystem. It is exclusively built for DASM compiling:

http://covertbitops.c64.org/tools/loader.zip (V2.1)
http://covertbitops.c64.org/tools/loader22.zip (V2.2)

V2.2 is somewhat simplified, as it autodetects whether fastloading or fake-IRQloading (IDE64) can be used.
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
Andy/AEG
rambo/Therapy/ Resou..
AnonymousMOS
iceout/Avatar/HF
jicas/Patagonia
kenji/dream
JEZ
Mr. Lee
Meikel aka ZUX/Sparks
Bieno/Commodore Plus
Guests online: 98
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.7)
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 Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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