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 > unknown Register $D7FF
2023-11-19 21:50
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
2023-11-19 22:06
iAN CooG

Registered: May 2002
Posts: 3141
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.
2023-11-19 22:42
Martin Piper

Registered: Nov 2007
Posts: 647
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?
2023-11-19 22:46
GI-Joe

Registered: Sep 2015
Posts: 15
normal #$37
2023-11-20 02:25
chatGPZ

Registered: Dec 2001
Posts: 11154
We use $d7ff for the debug register in VICE :)
2023-11-21 17:16
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 ?
2023-11-21 17:52
iAN CooG

Registered: May 2002
Posts: 3141
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.
2023-11-21 19:06
chatGPZ

Registered: Dec 2001
Posts: 11154
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
2023-11-21 19:11
TheRyk

Registered: Mar 2009
Posts: 2101
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?
2023-11-21 19:42
iAN CooG

Registered: May 2002
Posts: 3141
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.
2023-11-21 20:11
tlr

Registered: Sep 2003
Posts: 1730
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.
2023-11-21 20:42
CyberBrain
Administrator

Posts: 392
Quote: 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?

You might be thinking about the SID-posts in thread: https://csdb.dk/forums/?roomid=11&topicid=141335&showallposts=1
So yeah, a SID-write can be read back, but with lots of caveats :) (aka. not working like normal mem - see the thread for info)

(Of course, it was only speculated in that thread what would happen when reading/writing $D41D-$D41F (=$D7FD-$D7FF). Should be tested...)
2023-11-21 21:10
ws

Registered: Apr 2012
Posts: 235
OMG. I just read that thread... i think my head exploded a little bit.
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
Guests online: 74
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.7)
6 Aliens in Wonderland  (9.6)
7 Comaland 100%  (9.6)
8 Uncensored  (9.6)
9 No Bounds  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Daah, Those Acid Pil..  (9.5)
9 Birth of a Flower  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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