Page 1 of 1

mon bank question

Posted: Wed May 10, 2023 12:44 pm
by wizardmountain
Hey everyone. I am looking for some clarification on certain behaviours in 'mon' as it relates to bank switching.

When I load up mon (in the emulator) and ask for address $9F20, I am shown what I assume is random garbage.
I want to try setting the VERA address registers to 00000, so I type in 00, 00, 00 for $9F20 - $9F22 in mon.

As soon as I hit enter though, the values revert back to the "garbage" that was there before.

Shouldn't I be able to set those register values?

Second part to the question... the documentation for mon found https://github.com/commanderx16/x16-doc ... Monitor.md here, talks about switching banks with the O command. When I did a O V0 command, thinking I may need to switch to video ram, and retried my write at $9F20, the value seemed to stick.

Basically, I'm unclear why mon won't save my values to vera address registers, as well as, what the bank switching in mon is actually doing. I thought bank switching was for ram/rom banks located at $A000 -> $FFFF?

Any guidance would be appreciated!

Re: mon bank question

Posted: Wed May 10, 2023 3:59 pm
by StephenHorn
Most likely, the mon is resetting the registers when it adds text to the screen, and is failing to backup/restore the values.

Re: mon bank question

Posted: Wed May 10, 2023 6:08 pm
by TomXP411
Every time you write to the screen, the values on VERA's address vectors change. Since the OS has to write to the screen, the values change. You press RETURN in the monitor... the values change.

The VERA address vector is extremely volatile; every single thing that writes data to the screen has to set the address, so you can't set it with the M command in the monitor and expect it to stay at that value after pressing the enter key.

Re: mon bank question

Posted: Wed May 10, 2023 7:41 pm
by wizardmountain
As to why the values are changing, this now makes sense. I'm embarassed I didn't clue in to that.

I'm guessing when I use the 'O' command to change banks... v0 would be the first FFFF of the vera memory, and v1 would be the second bit?

Re: mon bank question

Posted: Wed May 10, 2023 9:50 pm
by TomXP411
wizardmountain wrote: Wed May 10, 2023 7:41 pm As to why the values are changing, this now makes sense. I'm embarassed I didn't clue in to that.

I'm guessing when I use the 'O' command to change banks... v0 would be the first FFFF of the vera memory, and v1 would be the second bit?
I think so. I haven't actually played with the video tools in SuperMon, but that sounds right.