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 :)
2019-03-20 22:50
chatGPZ

Registered: Dec 2001
Posts: 11386
You shouldnt use the drive message for detection anyway, its extremely unreliable :)
2019-03-20 23:20
cadaver

Registered: Feb 2002
Posts: 1160
Assume 1541 if unidentified :)

In seriousness, the ID string method is nice for not needing to push the detection / drivecode patching code to the drive first, which results in faster startup.
2019-03-20 23:25
chatGPZ

Registered: Dec 2001
Posts: 11386
yeah ok, that could work good enough in practise.

the problem you are describing seems kinda odd though. is it really a AR issue? would be really weird :)
2019-03-20 23:28
Krill

Registered: Apr 2002
Posts: 2980
I'm reading the drive ROM at strategic places using M-R to detect the model, seems to work fine (and shouldn't be noticably slower than sending UI = drive reset, then reading and parsing the init string).

Any better methods? :)
2019-03-20 23:37
cadaver

Registered: Feb 2002
Posts: 1160
groepaz: It looks like the combination of AR/RR loader and the device number, and should be possible to reproduce in VICE too.

The code reading the cmd channel shouldn't be anything special, SETNAM with 'UI', SETLFS 15,<devicenum>,15, OPEN, CHKIN, then CHRIN until status bit $40 is set. I'm running it inside stack but it shouldn't be a stack overwrite issue.

Krill: that's probably the most optimal. I used to send the whole drivecode, doing all detection on drive side, and then seeing if it actually starts to run (by checking if the lines change state). But the ID method is needed for SD2IEC in any case.

Btw. it seems that on 1541 the reset is very fast. On 1581 and above it takes noticeable time. :)
2019-03-20 23:39
chatGPZ

Registered: Dec 2001
Posts: 11386
beware: depending on the ROM in the 1541 you need to wait a bit before issueing any commands or it will indeed hang and wait forever
2019-03-20 23:44
Krill

Registered: Apr 2002
Posts: 2980
Quoting cadaver
But the ID method is needed for SD2IEC in any case.
How does SD2IEC respond to M-R or M-E? My method so far has been to M-R $0300 in drive RAM, then upload and execute a small routine to flip (EOR #$FF) the value at $0300 and then M-R it again. If no change, fallback to KERNAL API.
2019-03-21 00:35
cadaver

Registered: Feb 2002
Posts: 1160
M-R on SD2IEC returns bytes from the drive ROM. M-E initiates one of the firmware fastloader implementations if the data checksum / address from M-W matches.

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. Your method would be good for getting a negative result (as intended for the fallback)
2019-03-21 07:07
Flavioweb

Registered: Nov 2011
Posts: 463
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: 2980
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.
 
... 18 posts hidden. Click here to view all posts....
 
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
duce/extend
diabolus
Beast/Crescent
Flashback
Hydrogen/Glance
Alakran_64
Devia/Ancients
Guests online: 84
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 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (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 Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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