Visual 6502 Documentation / Tutorial

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Visual 6502 Documentation / Tutorial
by on (#116362)
Hello,

I'd like to use the Visual 6502 simulator, but couldn't get anywhere figuring out how to use its interface.

The most important and basic thing you'd want to do with an emulator is loading a program, setting the PC and running it. It seems like

Code:
http://www.visual6502.org/JSSim/expert.html?r=0600&a=0600&d=...


does the job.

But I'm kinda stuck from there on. How can I inspect the memory beyond the first two pages displayed on the right? Why is there already some data in the zeropage, I'd want all memory to be cleared. It seems my program is executing normally for a few instruction, but then it's all corrupted. Since I can't even look if the memory was loaded, I'm not sure what's going on. Is there a size limit for the d= string?

All want to do is load a few dozen instructions into some sensible memory location, set the PC and maybe some other registers, run / step through the code and then inspect memory / registers as I go along. I'd really appreciate any documentation / help / guide here.

Thanks!
Re: Visual 6502 Documentation / Tutorial
by on (#116366)
I've made several posts on using the Visual2A03 simulator for various things.

Sprite DMA by DEC.
DMC DMA and $2002 reads.
DMC DMA during Sprite DMA.

Take a look at the programs I run in those...

There are various other postings too but they are buried in threads that I didn't create.
Re: Visual 6502 Documentation / Tutorial
by on (#116397)
That Visual 2A03 stuff is fascinating and I will certainly dig into it once my emulator gets there, but none of those threads seem to talk about the actual emulator UI / usage, just the amazing stuff you can do once you figured it all out!

Now I'm using this URL string:

Code:
http://www.visual6502.org/JSSim/expert.html?r=0500&graphics=false&r=0500&a=0000&d=00000000000000000000000000000000000000000000000000000000000000000000&a=0500&d=...


After fixing a bug in my quick bin-to-hexdump-string one liner the correct code executes. This also zeroes out the sample code in the zero page.

Now I can use Visual 6502 to get traces that I can compare to my emulator for timing / memory differences. Great!

Biggest remaining Qs - how to I look at memory past the zp / stack? Is there a key for the step function or a way to run till I reach a certain PC? Can I edit register values somehow?
Re: Visual 6502 Documentation / Tutorial
by on (#116398)
You've seen this help right?
Re: Visual 6502 Documentation / Tutorial
by on (#116399)
Sure, but I don't think it mentions any of the things I asked about ;-(
Re: Visual 6502 Documentation / Tutorial
by on (#116400)
Took a quick look at the code and it seems the 2-page memory display is a hard-coded limit. :roll:

I guess I can see why that was done to limit the amount of crap that needed to be updated each cycle. But maybe making it configurable for your situation would be something they'd be interested in doing. Or...since the code is on github you could submit a pull.
Re: Visual 6502 Documentation / Tutorial
by on (#116420)
Ah, well ;-) I can see that this stuff wasn't their main focus, but I find having an accurate simulator with a great trace is valuable for testing my own emulator against, even ignoring the 'Visual' and circuit-level parts. The kind of clumsy URL parameter interface turns out to be pretty cool as well. It's easy to write a short script that just launches any 6502 binary ready to run in the browser.

I've been using the Visual 6502 enough in the past days that I just might be annoyed enough with it to add some better memory display and a step shortcut key...