| |
Krill
Registered: Apr 2002 Posts: 2940 |
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? =) |
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
$0100-$011f
Only very special demo parts or very complex games will use this memory |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Or the reset vector maybe? $fffc/d
You could store both on TOD, $fffc/d and $0100/0101 and do some heuristics to determine which value has not been overwritten |
| |
AlexC
Registered: Jan 2008 Posts: 298 |
Very interesting question. I would say there aren't such, especially if you do not narrow your selection. For example are we talking about games with copy protection? There are some copy protection schemes were whole memory is overwritten during loading starting from load address in order to reach $01 for example and change it accordingly. Secondly are we talking about loading from tape or disk?
But you know all of that ;)
Do you need whole bytes or just bits?
How about reset vector assuming you can disable kernal rom? (we wrote the same idea with JackAsser at the same time)
How about using external ram from attached devices like disk drive ram. Action Replay and clones have interesting memory access model too.
Just my 5 cents... looking forward to other ideas. |
| |
tlr
Registered: Sep 2003 Posts: 1762 |
The upper bits in the $00 (DDR) could often be used. IIRC Mr. Z said that he often used that for his cheat flags. |
| |
Krill
Registered: Apr 2002 Posts: 2940 |
Quoting JackAsser$0100-$011f
Only very special demo parts or very complex games will use this memory Or anything printing numbers using ROM calls. =) $0100 is FBUFFR, where numbers converted to strings are stored.
Quoting JackAsserOr the reset vector maybe? $fffc/d
You could store both on TOD, $fffc/d and $0100/0101 and do some heuristics to determine which value has not been overwritten Reset vector is sometimes written to when the adjacent NMI and IRQ vectors are set up by simply copying to them in a loop.
True about the heuristics, but those need good locations in the first place. :)
Quoting AlexCDo you need whole bytes or just bits? Yes. =)
I mean, if a register is written to, one can expect all of its bits to be changed, even if just one is required. But it's about any information, at least one bit, the more the merrier.
Copy protections can be ignored. The "hostile" wordage was just for effect. :)
I mean any kind of read-writeable machine state that is very rarely used, intentionally or accidentally. Stock machine, without extra hardware.
And for some narrowing-down, loading (tape/disk/user port) is under control and can be ignored (hence my idea of using $DD03). |
| |
Krill
Registered: Apr 2002 Posts: 2940 |
Quoting tlrThe upper bits in the $00 (DDR) could often be used. IIRC Mr. Z said that he often used that for his cheat flags. Could some accelerators fail with that? |
| |
tlr
Registered: Sep 2003 Posts: 1762 |
Quoting KrillQuoting tlrThe upper bits in the $00 (DDR) could often be used. IIRC Mr. Z said that he often used that for his cheat flags. Could some accelerators fail with that?
Not sure. I seem to remember that flash8 uses the corresponding ones in $01 but I might be wrong. A '0' in a $00 bit will make the corresponding output effectively forced as a '1' so it may or may not be a problem even if used.
You did say "I mean any kind of read-writeable machine state that is very rarely used, intentionally or accidentally. Stock machine, without extra hardware." though. |
| |
Krill
Registered: Apr 2002 Posts: 2940 |
Quoting tlrYou did say "I mean any kind of read-writeable machine state that is very rarely used, intentionally or accidentally. Stock machine, without extra hardware." though. Yes, did not think of accelerators before your post popped up. I just wanted to rule out storing information in external/add-on hardware. |
| |
Frantic
Registered: Mar 2003 Posts: 1641 |
Would it be possible to use redundance? E g to store the information in several places, to increase chances of survival? |
| |
Krill
Registered: Apr 2002 Posts: 2940 |
Quoting FranticWould it be possible to use redundance? E g to store the information in several places, to increase chances of survival? This is what Jacky referred to with "heuristics". =)
So yes, possible, but that's an add-on solution to the problem here. |
... 72 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next |