Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) 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: 1153
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 07:07
Flavioweb

Registered: Nov 2011
Posts: 442
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.
2019-03-21 08:48
Krill

Registered: Apr 2002
Posts: 2822
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.
2019-03-21 08:51
Krill

Registered: Apr 2002
Posts: 2822
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: 1153
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: 1153
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: 1153
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: 2822
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: 2822
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: 1153
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: 1153
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.
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
The Syndrom/TIA/Pret..
Matt
Bitbreaker/Performers
TLF/Sonic Uproar
macx
maak
JackAsser/Booze Design
CreaMD/React
trident
Mason/Unicess
Guests online: 129
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Newscopy  (9.1)
5 Elwix  (9.1)

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