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 > AR/RR fastloader, command channel & device number other than 8
2019-03-20 22:25
cadaver

Registered: Feb 2002
Posts: 1160
AR/RR fastloader, command channel & device number other than 8

I'm tinkering with a loader / boot system where it first sends the "UI" command on the command channel to read back the device init-time string & detect the device type. Similar to what the Easyprog fastloader (ELoad) does.

Seems that when the device number is something other than 8, and AR/RR fastloader has been enabled, reading the command channel will get stuck inside Kernal.

Using device number 8 works fine. Not enabling AR/RR fastloader (normal reset) also works.

Anyone else seen this or have an explanation? Probably this is something that I shouldn't bother too much trying to work around, since there are ways the user can fix it :)
 
... 18 posts hidden. Click here to view all posts....
 
2019-03-21 11:18
cadaver

Registered: Feb 2002
Posts: 1160
Even shorter repro case with the AR/RR wedge command:

Load something on device 9 with fastload
@UI
@

-> device not present, which is cause of the lockup if you just persist on trying to read from it :)
2019-03-21 11:31
Flavioweb

Registered: Nov 2011
Posts: 463
Quoting cadaver
Even shorter repro case with the AR/RR wedge command:

Load something on device 9 with fastload
@UI
@

-> device not present, which is cause of the lockup if you just persist on trying to read from it :)


Yes... but:
@UJ
@
works fine.
And it works also on Sd2IEC, Vice Virtual Drive and Ide64...
2019-03-21 12:23
cadaver

Registered: Feb 2002
Posts: 1160
Cool, thanks!

EDIT: UJ is unfriendlier in the sense that you actually do have to wait until the drive is responsive again, else you'll lockup. So yeah.. probably still have to go the upload drivecode first route :)
2019-03-21 12:56
Flavioweb

Registered: Nov 2011
Posts: 463
I guess rr/ar leave some drivecode running after a load, so maybe you go into troubles uploading some code to drive...
Just guessing eh...
2019-03-21 13:07
cadaver

Registered: Feb 2002
Posts: 1160
Possibly it messes the drive OS state some way, and only for device != 8. After the UI command, the drive appears to be in the idle loop, not responding to anything the computer would send under ATN.

In my tests uploading new drivecode always works fine even after AR fastload.
2019-03-22 11:22
cadaver

Registered: Feb 2002
Posts: 1160
Got info from GRG, the problem stems from the AR fastloader setting $1802 on the fastload-enabled drive, but not resetting it. It's possible to M-W the correct value back in to fix, though that's making an assumption the drive is a 1541 :)
2019-03-22 13:41
Krill

Registered: Apr 2002
Posts: 2980
cadaver: Do you save onto the disk?

If not, you can change the DOS version marker in the BAM (3rd byte on track 18, sector 0) from $41 ('A') to something else.
Trying to save (without prior "UI" command and AR/RR problems) would yield DOS mismatch error 73, which has the init string in the message.

Now, of course, no idea if that behaviour is implemented consistently across all weirdo drives. :)
2019-03-22 14:28
cadaver

Registered: Feb 2002
Posts: 1160
Yes, I save using jobcodes to write on preallocated sectors (or directly via Kernal on fallback loader)

But as all solutions seem a bit nasty, I went ahead and reversed my detection strategy, so drivecode-capable drives no longer receive the UI command / string detection at all, only SD2IEC.
2019-03-22 16:21
Krill

Registered: Apr 2002
Posts: 2980
That seems like a sane thing to do. :)

How do you detect the real-drive model now?
2019-03-22 17:08
cadaver

Registered: Feb 2002
Posts: 1160
I upload a monolithic drivecode from about $0400 to $06ff, it contains a detection based on Dreamload (reading strategic ROM locations), then it patches itself for the drive model, and signals to the C64 with the DATA line. C64 side contains a delay loop to watch for that signal.

Actually just committed the stuff to https://github.com/cadaver/c64gameframework/blob/master/loader.s
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
Trap/Bonzai
Airwolf/F4CG
Chesser/Blazon
Fresh
t0m3000/hf^boom!^ibx
MWR/Visdom
WVL/Xenon
Walt/Bonzai
St0rmfr0nt/Quantum
csabanw
Alakran_64
iAN CooG/HVSC
Mike
Freeze/Blazon
Mihai
Case/Padua
Guests online: 103
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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