It is currently Sat Apr 21, 2018 1:05 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: 6502 debugger
PostPosted: Tue Sep 24, 2013 3:50 am 
Offline
User avatar

Joined: Sat Sep 07, 2013 2:59 pm
Posts: 1588
Do you know a debugger for 6502 code where you can walk through the code like in Visual Studio?
That means you have the text editor with the source code open and there is an arrow on the left side of the text lines that shows you where you are in the moment. With a button, you can execute the current instruction and the arrow jumps to the next line.
And in another window, you can enter any memory location and the program shows you which value is written to it and you can edit it.

The debugger doesn't need to understand any NES-specific stuff, nor does it need to be able to handle commands like .res, .db, .word or anything like that. All I need is a generic 6502 debugger that I can quickly use to test code snippets without having to write a complicated debug output into my actual program.

_________________
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 3:54 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7416
Location: Chexbres, VD, Switzerland
Have you tried the debugger in the FCEUX emulator ? It's awesome. However it won't directly debug in your text editor.


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 4:12 am 
Offline
User avatar

Joined: Sat Sep 07, 2013 2:59 pm
Posts: 1588
I will have a closer look.
However, I'm looking more for a debugger where you can put any little code into. Like when I have an algorithm and I want to check if I didn't do any off-by-one errors or whatever, I want to put only this code into the text editor and then test it. (Best would be if I could add or delete lines at debug time.
For the FCEUX debugger, you need to have a complete NES game and that's a bit too much for just testing a single code snippet.

_________________
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 6:25 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6203
Location: Canada
You put a breakpoint on the code snippet you're interested in and click Run. It will execute normally until the breakpoint, and then you can begin stepping through just the snippet.


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 6:56 am 
Offline

Joined: Sat Jan 23, 2010 11:41 pm
Posts: 1161
There are so called 'CPU simulators', like a 6502 simulator, that allow to enter and run a snippet of code. However, they are not tied to any particular hardware like NES. So if you want to debug NES-related code, you just have to use a NES emulator.


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 7:32 am 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1060
Location: Minneapolis, MN
DRW wrote:
Do you know a debugger for 6502 code where you can walk through the code like in Visual Studio?

This? :wink:


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 7:49 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10417
Location: Rio de Janeiro - Brazil
I learned 6502 assembly using this. It's great for testing little snippets of code without having to set anything up. It doesn't have a lot of functionality present in more complete assemblers, like .incbin, temporary labels and the like, so don't expect 100% compatibility.


Top
 Profile  
 
 Post subject: Re: 6502 debugger
PostPosted: Tue Sep 24, 2013 8:14 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3045
Location: Tampere, Finland
For source level debugging (with CA65) check this: http://kkfos.aspekt.fi/projects/nes/too ... dulatordx/

It's just a modified version of Nintendulator though, not a quick test platform.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group