Monitor shows incorrect values for several registers
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
Vice 3.5 r39522 (GTK3 3.24.24, GLib 2.66.4) 64-bit version (but I think this applies to all other versions of the latest nightly build and the "official" version of 3.5 as well), Windows 10. No peripheries attached.
Start VICE, open monitor. Type m 00 01:
(C:$e5d4) m 00 01
C:0000 00 00 ..
(C:$0002)
Shouldn't the values be $2F and $37?
Start VICE, open monitor. Type m dd00 dd02:
(C:$0002) m dd00 dd02
C:dd00 d7 ff 3f ..?
(C:$dd03)
Shouldn't it be $97 (Clock In=0)? Thanks!
To view $00/$01, use the "R" or register command.
As for the other registers, not all bits are readable. To see what is happening exactly inside them, use the IO command:
to elaborate - the "m" command shows RAM
Thank you for the quick response. So is this a new feature of the "m" command in terms of $00/$01?
Re: $dd00. The Clock In bit (bit 6 of $dd00) is readable.
?PEEK(56576)
151
vs.
ALT+H and then io dd00 or m dd00 dd00
Thanks again!
to elaborate a little more, the "m" command shows what the current bank is set to and the default bank is ram. So if you do "bank io" the "m" command will then show you the contents of the IO chips at dd00 instead. Note that the CPU $00/$01 port isn't considered IO for reasons someone else can explain :)
Thank you for your response.
I'd say the default bank is not RAM, because by default (i.e. right after startup), the "m a000 a0ff" command will show BASIC ROM and not the underlying RAM. I think the default bank is cpu(?).
All I know is whatever the current bank is set to, the "m" command no longer shows the correct values of $00/$01. Pre-3.5 VICE versions showed the correct values with "bank cpu".
Re: $dd00. The built-in monitor does NOT correctly display the value of the Clock In bit (bit 6).
Start VICE, type ALT-H, then type:
Stepping into the code, A=$97 which is the correct value of $dd00, but the "io" command (and "m" as well) still INCORRECTLY shows $d7.
Thanks again! :)
Last edit: Sparta 2021-01-11
The default bank is CPU :)
I should look at this CIA thing
Aah, thanks, I just realized the default bank, and added it to the above post:
Yes and no :)
When you start vice the bank is set to cpu (not default), but if you literally set the bank to default with
bank defaultit sets it to ram instead.IMO when you start vice the bank should be set to default which should be cpu as that is what most people would expect. At the moment it is not set to default, but it is set to cpu.
Confusing as..
Reverting revisions 37497 and 37498 fixes this... however, a comment added in 37497 says
I don't know how to reproduce such side effects. Does anyone remember what side effects those were?
it says right in the comment - set a checkpoint (watch- or breakpoint on load/store) to the respective address
Proposed solution: https://sourceforge.net/p/vice-emu/patches/285/
The issue regarding 0/1 should be fixed in 39963/4. CIA peek issue moved to #1467.
CIA should also be fixed in r39970 - please test and report back in https://sourceforge.net/p/vice-emu/bugs/1467/