Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user shad0wfax ! (Registered 2025-06-17) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Keeping a few bits of information in a hostile environment
2021-04-18 09:24
Krill

Registered: Apr 2002
Posts: 3083
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....
 
2021-04-28 00:08
Krill

Registered: Apr 2002
Posts: 3083
Quoting Jammer
Sorry 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
2021-04-28 00:31
Oswald

Registered: Apr 2002
Posts: 5126
so why not ask the drive if you are before uploading the code?
2021-04-28 06:51
JackAsser

Registered: Jun 2002
Posts: 2038
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.
2021-04-28 09:08
Krill

Registered: Apr 2002
Posts: 3083
Quoting Oswald
so 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 JackAsser
I 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.
2021-04-28 11:54
chatGPZ

Registered: Dec 2001
Posts: 11510
Cant you redirect the error handler and return the info in the error channel? mmh
2021-04-28 12:24
Krill

Registered: Apr 2002
Posts: 3083
Quoting Groepaz
Cant 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.
2021-04-28 12:33
chatGPZ

Registered: Dec 2001
Posts: 11510
doh. obviously. coffee time!
2021-04-28 17:50
Oswald

Registered: Apr 2002
Posts: 5126
"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?
2021-04-28 18:07
Krill

Registered: Apr 2002
Posts: 3083
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.
2021-04-28 21:52
Rastah Bar
Account closed

Registered: Oct 2012
Posts: 336
You can't write the bits to disk?
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - 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
HBH.ZTH/Abnormal
GI-Joe/MYD!
Smasher/F4CG
CreaMD/React
Mason/Unicess
A3/AFL
swasti
Erol
Steffan/BOOM!
Guests online: 326
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Uncensored  (9.5)
9 Wonderland XIV  (9.5)
10 No Bounds  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Stinsen  (9.7)
4 LMan  (9.7)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.082 sec.