VICMON on VICE help

You need an actual VIC.

Moderator: Moderators

Post Reply
VulkanMU
Vic 20 Newbie
Posts: 2
Joined: Sun Oct 07, 2018 3:39 pm

VICMON on VICE help

Post by VulkanMU »

I am trying to learn about programing assembly on the VIC-20. I'm using VICMON 6000 and using this guide http://techtinkering.com/2013/04/16/beg ... re-vic-20/. When I enter the HEX to change the background color of the screen, the VICE emulator gives me a blank single color screen like so

Image

I'm not really sure what I'm doing wrong. I even tried using 32k ram expansion but didn't help. Any ideas?
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: VICMON on VICE help

Post by Mike »

VulkanMU wrote:When I enter the HEX to change the background color of the screen, the VICE emulator gives me a blank single color screen like so [...]
Works for me... sort of.

Slight problem - and this isn't specific to VICE but also happens on real hardware: as per instructions on that other web site, the ".:"-command writes not only to register $900F of the VIC chip, but (with 5 given byte values in total) also to the addresses $9010, $9011, $9012 and $9013. Those are mirrors of the VIC registers $9000..$9003, and due to a hardware peculiarity of the VIC-20 hardware, also the VIA #1 is addressed (which is a minor issue here, even though it can make VICMON throw an error "?", because it can't successfully back-verify the written data).

If you, for some reason, enter the command as ".:900F AE 00 00 00 00", you will write four 0s to the original VIC registers $9000..$9003, and these values will move the display window to the top-left, and reduce the window size to 0 rows by 0 columns. Only thing that then remains visible is the blue border, and that is exactly what you see.

Greetings,

Michael

P.S. Oh - and welcome to Denial! :mrgreen:
VulkanMU
Vic 20 Newbie
Posts: 2
Joined: Sun Oct 07, 2018 3:39 pm

Re: VICMON on VICE help

Post by VulkanMU »

Thanks for the reply, I understand some of whats going on. I seem to have a taken one step to deep into the VIC-20, compared to my abilities. Back to BASIC POKE and PEEK I go :D . I just think that I don't understand 6502 or the VIC-20 Memory layout enough to figure this out. Thanks for the info though I did learn something!
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: VICMON on VICE help

Post by Mike »

VulkanMU wrote:I seem to have a taken one step to deep into the VIC-20, [...]
Don't worry, you're in the right place here. :D

Actually, this is an issue of the stuff as presented on that other web page. As I've found out after some more research, the example as given there mostly works (i.e. it doesn't 'crash') only with older versions of VICE (around 2013). In the meantime, the emulation of VICE has gotten much more accurate, and so the peculiarities I mentioned are much better modelled - up to the point that those VIC/VIA mirrors behave like in real hardware.

The memory dump of $900F..$9013 with VICMON, with a fairly current VICE 3.1 r34289 results in either ".:900F 1B 0C 26 00 00" or ".:900F 1B 0C 26 00 80", whereas older versions display ".:900F 1B 0C 26 96 2E" (as shown in the example screen dump). On real hardware, these differing values are the result of VIC and VIA putting bytes on the data bus simultaneously, and this isn't emulated correctly by older versions of VICE.

Now those two values, $00/$00 or $00/$80, when written back to the VIC, do exactly as I wrote in my lastest post - they reduce the display window size to nil.
Post Reply