| |
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.... |
| |
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 |
| |
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. |
| |
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. |
| |
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. |
| |
Krill
Registered: Apr 2002 Posts: 2995 |
Quoting chatGPZWhat 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. =) |
| |
Raistlin
Registered: Mar 2007 Posts: 694 |
Quote: Quoting chatGPZWhat 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 :-) |
| |
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? ;) |
| |
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 ? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11430 |
what ninja suggested is WAY too specific. It'd be a nightmare to implement :) |
| |
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 |