Visual 6502 Documentation / Tutorial

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
Emu6502Writer
Posts: 13
Joined: Sun Aug 11, 2013 10:21 am

Visual 6502 Documentation / Tutorial

Post by Emu6502Writer » Sun Aug 11, 2013 10:36 am

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: Select all

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!

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Visual 6502 Documentation / Tutorial

Post by cpow » Sun Aug 11, 2013 12:54 pm

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.

Emu6502Writer
Posts: 13
Joined: Sun Aug 11, 2013 10:21 am

Re: Visual 6502 Documentation / Tutorial

Post by Emu6502Writer » Mon Aug 12, 2013 6:38 am

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: Select all

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?

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Visual 6502 Documentation / Tutorial

Post by cpow » Mon Aug 12, 2013 6:44 am

You've seen this help right?

Emu6502Writer
Posts: 13
Joined: Sun Aug 11, 2013 10:21 am

Re: Visual 6502 Documentation / Tutorial

Post by Emu6502Writer » Mon Aug 12, 2013 7:02 am

Sure, but I don't think it mentions any of the things I asked about ;-(

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Visual 6502 Documentation / Tutorial

Post by cpow » Mon Aug 12, 2013 7:32 am

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.

Emu6502Writer
Posts: 13
Joined: Sun Aug 11, 2013 10:21 am

Re: Visual 6502 Documentation / Tutorial

Post by Emu6502Writer » Mon Aug 12, 2013 1:10 pm

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...

Post Reply