Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user peterfj ! (Registered 2019-04-20) You are not logged in 
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: 1115
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: 1115
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: 373
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: 1115
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: 373
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: 1115
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: 1115
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: 1165
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: 1115
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: 1165
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: 1115
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
G-Force
Acidchild/Padua
leuat
Dipswitch/Up Rough
pcollins/Excess
Walt/Bonzai
awsm/MYD
TheEnemy/Excess/THD
iAN CooG/HVSC
Knight Rider/Excess
Sentinel/Excess
Cargo/Singular Crew
algorithm
Snabel
Dymo/G★P
Guests online: 59
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Rivalry  (9.7)
4 Edge of Disgrace  (9.6)
5 Coma Light 13  (9.6)
6 Comaland 100%  (9.6)
7 The Shores of Reflec..  (9.6)
8 Lunatico  (9.6)
9 X Marks the Spot  (9.5)
10 Old Men in Used Cars  (9.5)
Top onefile Demos
1 Instinct  (9.7)
2 Smile to the Sky  (9.6)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.4)
5 FMX Music Demo  (9.4)
6 Party Horse  (9.4)
7 Bad Boy  (9.4)
8 Crystal Gazer  (9.4)
9 Rewind  (9.4)
10 Pandemoniac Part 2 o..  (9.4)
Top Groups
1 Fossil  (9.9)
2 PriorArt  (9.7)
3 Oxyron  (9.5)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top Logo Graphicians
1 Mermaid  (9.3)
2 Pal  (9.2)
3 Elko  (9.1)
4 Yazoo  (9.0)
5 Jailbird  (8.9)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.051 sec.