Jump to content
  • 0

Viewing banks with emu debugger / MON command


ZeroByte
 Share

Question

I've spent time needlessly banging my head against a wall here. I'm starting to learn to work with the banked RAM. So I wrote a routine to load stuff into hi memory, and then wanted to go into MON or the debugger just to see that this was successful. I read that MON uses Oxx to set the RAM bank, and the debugger uses B RAM xx to set the RAM bank. However, when doing either of these, I see the same seemingly random data over and over when I then do MA000 A0FF.

I'm guessing that I'm only ever seeing bank0 which the Kernal/BASIC use, and never the actual data.

Realizing that it must be user error, I decided to just bang out a quickie BASIC program to poke predictable values into the banks and then peek them back out again - this confirms that my banking is in fact working, but I still can't figure out what I'm doing wrong with my debug tools.

Q: In debugger, when I set, e.g.: B RAM 4 - does this cause the actual RAM bank to switch to 4 in the system? What about MON?

What commands should I use to just view the contents of the banks, but not actually meddle with the system state?

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I was just re-visiting the thread where you're discussing this topic but regarding the debug output when jumping into the kernal load API - this info wasn't explicit (or I missed it) but your screenshots gave me the clue I needed to get the debugger to show what I want. I just figured this syntax out and was about to come close my own thread lol.

But while we're at it, do you know the equivalent commands in the monitor (or do they not exist yet)?

Thanks for replying here!

Link to comment
Share on other sites

  • 0

In the monitor use oxx, and make sure it 's not a Shift-O (like if you're in lower case mode), and make sure you use BOTH digits, so bank 0 would be 'o00', 255 would be 'off'  (use hex)

For inspecting vera memory use ov0 and ov1.  o by itself will reset back to main memory bank 0

to summarize for the monitor
banks: o00 to off   (switches both ram and rom banks)
vera: ov0 and ov1
o by itself: same as o00
(then use m to display whatever part of memory you're after)
pro tip: do a quick m 9f60, and the first two numbers will tell you what banks you're looking at (rom, ram)
(the rom bank is 0-7 and wraps around)

For the debugger:
the b command doesn't seem to work
but if you do m bbaaaa, it does, for example:

m 01a000
m 04c000

I haven't yet discovered how to display VERA memory in the debugger

derp, you guys already figured out the debugger above 🙂

 

Edited by x16tial
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use