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 08:51
Krill

Registered: Apr 2002
Posts: 2980
Quoting Flavioweb
In my loader i use the "UJ" command to reset drive then, after a delay to wait drive reset, i read the error channel and i can found which drive is by pattern matching the string drive send...
Seems to work also on devices !=8 even if ar/rr fastload is enabled.
That seems to be pretty much exactly what cadaver does. Except it works with AR/RR and devices on #9 and up.
2019-03-21 08:59
cadaver

Registered: Feb 2002
Posts: 1160
Thanks. I have the drive stuck in the idle loop and computer also waiting after CHKIN, so I'll check my sequence of calls, possibly a better idea to close the command channel first, then reopen before reading.
2019-03-21 09:00
cadaver

Registered: Feb 2002
Posts: 1160
Quote: Quoting cadaver
In my case I need to know that it's specifically SD2IEC, to know I can send the "eload1" string to get a somewhat sane timed 2-bit fastload protocol.
Can you read the error channel after sending the "eload1" string to SD2IEC? Because any other drive would return error 31, syntax error.


Sorry, that's bytes sent in a M-W command, so an actual drive would accept it just fine. The bytes need to also be executed (M-E), so a drive would crash..
2019-03-21 09:37
cadaver

Registered: Feb 2002
Posts: 1160
OK.. seems I have a minimal repro case which can be done in BASIC. Load any file with fastloader on drive 9, then

NEW
1 OPEN15,9,15,"UI"
2 GET #15,A$:PRINT A$;:GOTO2

Should get stuck without printing anything.
I'm using Retro Replay 3.8Q. Though I believe I got the same result with AR6. Will do further testing.
2019-03-21 09:39
Krill

Registered: Apr 2002
Posts: 2980
Quoting cadaver
Sorry, that's bytes sent in a M-W command, so an actual drive would accept it just fine. The bytes need to also be executed (M-E), so a drive would crash..
Sigh. That's a pretty poor design committed by the ELoad inventor.
2019-03-21 09:45
Krill

Registered: Apr 2002
Posts: 2980
Quoting cadaver
Your method [of seeing whether the drive can execute uploaded code] would be good for getting a negative result (as intended for the fallback)
The only other "drive" than SD2IEC that can't execute custom code i came across is VICE with disabled true drive emulation. The latter might probably survive uploading the "eload" string and "executing" it just fine (after the initial safe M-E check). If so... :)
2019-03-21 10:14
cadaver

Registered: Feb 2002
Posts: 1160
Yeah, but in case the drive is an actual SD2IEC, then you'd want to continue with the ELoad protocol. And with VICE fast emu or IDE64, you'd want to continue with Kernal calls, so you'd still need to distinguish between.

You kind of can do this, by watching the $a5 serial bus variable, if that is unchanged (or also if you get an error at any point while sending M-W etc.), you know it's not an actual serial device.
2019-03-21 10:48
cadaver

Registered: Feb 2002
Posts: 1160
Hmm.. probably I'll just reverse my detection sequence. I was trying to be (too) clever by having multiple loader implementation files and choosing them with an initial bootpart, which uses the UI command.

But if I just load the full loader first, I can try uploading the drivecode first, and if that fails, proceeding to the ELoad / Kernal load decision.

It appears I get the drive 9 lockup on using the UI command after AR turbo load, even if I load a file byte-by-byte (CHRIN) inbetween. So yeah, best to use it only after verifying the drive isn't arbitrary drivecode capable.
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...
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
Magic/Nah-Kolor
Walt/Bonzai
saimo/RETREAM
t0m3000/hf^boom!^ibx
Mike
Chesser/Blazon
katon/Lepsi De
Steffan/BOOM!
Andy/AEG
MWR/Visdom
Freeze/Blazon
Scrap/Genesis Project
4gentE/ΤRIΛD
hedning/G★P
LightSide
Guests online: 109
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 Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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