Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Nicron ! (Registered 2024-05-21) 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: 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.
2023-11-19 22:42
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?
2023-11-19 22:46
GI-Joe

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

Registered: Dec 2001
Posts: 11147
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: 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.
2023-11-21 19:06
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
2023-11-21 19:11
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?
2023-11-21 19:42
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.
2023-11-21 20:11
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
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
DJ Space
Genius/Xenon
Guests online: 87
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Bromance  (9.5)
10 Lunatico  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Elwix  (9.1)
5 A Life in Hell  (9.1)

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