| |
Krill
Registered: Apr 2002 Posts: 2839 |
Keeping a few bits of information in a hostile environment
If not reserving space in RAM, where would read-writable data be most likely to survive throughout the run-time of any random demo or game?
$D800-$DC00 is often overwritten entirely, $00/$01 in RAM are too cumbersome to access.
$DD03 (parallel port data direction register) might be good, or maybe the 2x4 CIA TOD registers at $DC08 and $DD08.
Or are they? What else could be usable for that purpose? =) |
|
... 72 posts hidden. Click here to view all posts.... |
| |
Krill
Registered: Apr 2002 Posts: 2839 |
Quoting JammerSorry for layman question again but isn't there any safe space on drive's RAM? Safe yes, but not enough: "[...] and the 2 bits are required because there is no code space for the drives in question (1541 mostly) to tell their kind prior to uploading and executing [...]".
Then again, $dd03 FTW. =D |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
so why not ask the drive if you are before uploading the code? |
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
Quote: so why not ask the drive if you are before uploading the code?
I suppose that would require drive code to actually retreive the two bits and xfer them to the c64. |
| |
Krill
Registered: Apr 2002 Posts: 2839 |
Quoting Oswaldso why not ask the drive if you are before uploading the code? As i said, because there is no space in the drive code. There is just a bare minimum routine to receive and execute custom code, the rest is taken by the actual loader code to do its thing. Any kind of extra handshake to decide which drive type it is would take quite a few bytes. Too many! :)
Quoting JackAsserI suppose that would require drive code to actually retreive the two bits and xfer them to the c64. The drives know the two bits (they encode 1541 or 1571 or 1581). Just querying that information before upload is too expensive for me on 1541. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
Cant you redirect the error handler and return the info in the error channel? mmh |
| |
Krill
Registered: Apr 2002 Posts: 2839 |
Quoting GroepazCant you redirect the error handler and return the info in the error channel? mmh There are no such things once the loader drive code is running. It sits on bare metal and implements its own serial bus protocol. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11114 |
doh. obviously. coffee time! |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
"to tell their kind prior to uploading and executing "
prior uploading the drive is not in default state, to ask it its version the standard way? |
| |
Krill
Registered: Apr 2002 Posts: 2839 |
Quoting Oswald"to tell their kind prior to uploading and executing "
prior uploading the drive is not in default state, to ask it its version the standard way? It's running loader drivecode, which in turn was selected after detecting the drive model. |
| |
Rastah Bar
Registered: Oct 2012 Posts: 336 |
You can't write the bits to disk? |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next |