| |
GI-Joe
Registered: Sep 2015 Posts: 15 |
unknown Register $D7FF
Hi,
i have found this code in a source:
ldy #$00
sty $d7ff
The D7FF bytes are not changed by the code.
Can someone explain this to me?
Thanxx
GI-Joe |
|
| |
iAN CooG
Registered: May 2002 Posts: 3137 |
From Mapping the Commodore 64
Location Range: 54301-54303 ($D41D-$D41F)
Not Connected
The SID chip has been provided with enough addresses for 32 different
registers, but as it has only 29, the remaining three addresses are not used.
Reading them will always return a value of 255 ($FF), and writing to them will
have no effect.
Location Range: 54304-55295 ($D420-$D7FF)
SID Register Images
Since the SID chip requires enough addressing lines for only 32 locations (the
minimum possible for its 29 registers), none of the higher bits are decoded
when addressing the 1K area that has been assigned to it. The result is that
every 32-byte area in this 1K block is a mirror of every other. For the sake
of clarity in your programs, it is advisable not to use these addresses at
all.
If you poke anything at $d41f or the mirror copy $d7ff you shouldn't be able to read it back as it can't be written to. |
| |
Martin Piper
Registered: Nov 2007 Posts: 645 |
Quote: Hi,
i have found this code in a source:
ldy #$00
sty $d7ff
The D7FF bytes are not changed by the code.
Can someone explain this to me?
Thanxx
GI-Joe
What is $01 set to when that code runs? |
| |
GI-Joe
Registered: Sep 2015 Posts: 15 |
normal #$37 |
| |
chatGPZ
Registered: Dec 2001 Posts: 11147 |
We use $d7ff for the debug register in VICE :) |
| |
GI-Joe
Registered: Sep 2015 Posts: 15 |
Quote: We use $d7ff for the debug register in VICE :)
ok. Does this address give the value I wrote in it earlier ?
If so, I could use this for detection (vice)emulation ? |
| |
iAN CooG
Registered: May 2002 Posts: 3137 |
x64sc doesn't keep the value, but you get 0 and not 255 ($ff) as expected from an unconnected address and as written in Mapping the C64. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11147 |
Quote:ok. Does this address give the value I wrote in it earlier ?
If so, I could use this for detection (vice)emulation ?
no and no. it's also disabled by default. if enabled, when something is written to $d7ff, the emulator quits with the value written as exitcode |
| |
TheRyk
Registered: Mar 2009 Posts: 2086 |
wasn't there something with SID registers/Mirror RAM (IO banked) being "WOM" (write only memory) by the book but in fact you _can_ read those at least for a frame or am I confusing stuff now? |
| |
iAN CooG
Registered: May 2002 Posts: 3137 |
Sid registers, $d400-1c, maybe true, but those 3 leftovers are unconnected, so whatever you write doesn't get stored anywhere even for a fraction of a second. |
| |
tlr
Registered: Sep 2003 Posts: 1726 |
Quote: Sid registers, $d400-1c, maybe true, but those 3 leftovers are unconnected, so whatever you write doesn't get stored anywhere even for a fraction of a second.
I believe it’s the last write you may read back for a while after it has been written. The adress, at least within the write only regs, should not matter.
I presume this behavior is due to the value being retained for a while on the SID’s floating internal data bus.
It might be that these retained values may also read back on the “unconnected” registers. |
... 2 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |