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 > VICE Request: shadow registers
2025-01-20 03:31
Raistlin

Registered: Mar 2007
Posts: 694
VICE Request: shadow registers

When determining whether an image is MC/FLI etc, one thing that I'll do is watch for changes to $d018... so, in VICE mon, just:

w store d018

Potentially I should also be looking for $dd00/2 changes too .. but I never came across one of those yet where $d018 wasn't changed as well.

But anyway... it's of course possible that someone could use one of the shadow registers. I deliberately do it in my own demoparts, for example, "just for the lulz"... but perhaps I'm the only one who does? So I'm wondering whether we can somehow tag that we'd like the address + shadows to be considered?

w store !d018

for example.. possibly it could also detect whether or not it's actually writing to the VIC register. And SID, too, of course.

Actually, this could also be useful to make sure that we only care about VIC/SID writes? I've sometimes wanted that in the past - such as debugging bitmap scrollers where the MAP data is at $c000-df3f.

I dunno... seems like it could be an easy addition that could be useful to some like me?
 
... 18 posts hidden. Click here to view all posts....
 
2025-01-20 15:42
chatGPZ

Registered: Dec 2001
Posts: 11430
Most do, some do not because of exactly this problem.

Look at The Stock entry - they fixed a bunch of those to work on C128
2025-01-20 16:16
oziphantom

Registered: Oct 2014
Posts: 498
Quote: Quote:
no that is the calling address, not the target address.

????
watch store d000 d3ff if (ADDR & $3f) == $18

it uses the target address to check for all mirrors of $d018


I was replying to my self, I didn't see that you had posted between my posts. Sorry for the confusion.
2025-01-20 16:27
chatGPZ

Registered: Dec 2001
Posts: 11430
:)

This btw seems like the best way to add this to the monitor, it won't require added a lot of separate watchpoints, and the monitor knows which address triggered it AFAIK. So this would be mostly about hacking up some lex/yuck magic.
2025-01-20 16:42
Ninja

Registered: Jan 2002
Posts: 415
Hardware extensions using VIC shadow registers I know of:

+60K-Ram-Expansion
SuperCPU

For myself, I concluded to not use shadow registers if not absolutely necessary. The obfuscation factor is... well... low.
2025-01-20 22:59
Krill

Registered: Apr 2002
Posts: 2995
Quoting chatGPZ
What Krill proposed sounds like a good idea to me though - not sure how tricky it would be to add this. Feel free to give it a try and post a patch :)
Added to the list. Been a while since i submitted a patch. Let's see when there'll be time to give it a whirl. =)
2025-01-21 13:28
Raistlin

Registered: Mar 2007
Posts: 694
Quote: Quoting chatGPZ
What Krill proposed sounds like a good idea to me though - not sure how tricky it would be to add this. Feel free to give it a try and post a patch :)
Added to the list. Been a while since i submitted a patch. Let's see when there'll be time to give it a whirl. =)


Sweet. I’ll definitely give it a try once it’s in :-) .. thanks, Krill :-)
2025-01-22 08:08
Ninja

Registered: Jan 2002
Posts: 415
While Krill's suggestion sounds pretty useful and flexible for other cases as well, another approach would maybe be

watch store vic_18 (or whatever label)

which will only trigger when VIC register $18 is accessed. That would involve shadow registers. Yet, it would also skip writes to $D018 if IO is disabled via $01. The same can be achieved with Krill's suggestion, of course. Just the command-line would be quite long. So, we need macros on top of that? ;)
2025-01-22 11:12
oziphantom

Registered: Oct 2014
Posts: 498
the problem with the monitor is that is all machines, and it doesn't really know which machine it is on. So what does vic_18 do on a +4 or a PET? the VIC-20 has a Vic but it doesn't have an 18 register, does vic_0 repeat the same on the VIC-20 as it does on the C64 and then the C128 vic? Do we need vic_ vic2_ vic2e_ what about the CIA and VIA? TED? VDC? MMU?

Also I can see how the SuperCPU can have extra registers for the VIC given its not really the VIC and is in its own RAM for it to decide upon, but how does the 60K+ RAM expansion stop the bank change trashing Sprite 0 X ?
2025-01-22 14:34
chatGPZ

Registered: Dec 2001
Posts: 11430
what ninja suggested is WAY too specific. It'd be a nightmare to implement :)
2025-01-22 21:36
Ninja

Registered: Jan 2002
Posts: 415
Yeah, yeah, I didn't know that the monitor is so machine independent (makes sense, of course). So, let's just scrap my idea and squeeze the max out of Krill's idea.
Previous - 1 | 2 | 3 - 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
mutetus/Ald ^ Ons
WVL/Xenon
YPS
Peiselulli/tRSi
Durandal
Icecube/Light
kbs/Pht/Lxt
TheRyk/MYD!
Broti/DT/KRN
Guests online: 134
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Coma Light 13  (9.6)
5 Mojo  (9.6)
6 Edge of Disgrace  (9.6)
7 Uncensored  (9.6)
8 Comaland 100%  (9.6)
9 Wonderland XIV  (9.6)
10 What Is The Matrix 2  (9.5)
Top onefile Demos
1 Nine  (9.8)
2 Layers  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Libertongo  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Censor Design  (9.2)
5 Triad  (9.2)
Top Coders
1 Axis  (9.8)
2 Sailor  (9.8)
3 Graham  (9.8)
4 Lft  (9.8)
5 Crossbow  (9.8)

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