How do you guys debug on SNES?

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How do you guys debug on SNES?

Post by lidnariq »

byuu wrote:I still wish we could find a USB2 chip that'd let us stream at 2.68MB/s over the expansion port B-bus via DMA, though.
Cypress EZ-USB. e.g. CY7C68013A . 3.3V but 5V tolerant. Has a native FSM that lets the other end negotiate when to present data. Should even be able to be used bidirectionally.

It's been used in the various cheap digital logic analyzers, such as Saleae and is supported by the Sigrok project.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How do you guys debug on SNES?

Post by tepples »

byuu wrote:The annoying part is you still need a boot-loader cartridge (flash cart is fine), and you are limited to 128KiB RAM for both your program and data.
Which is a crapload more than a lot of NES games had available to them. Depending on the game design, you could make a compile-time option to include only a single level's data, and then testing becomes as easy as reset on the Control Deck and then Ctrl+R on your computer. This "romless" concept worked for "multiboot" games on the GBA, and it could work for entries to a collaborative Super NES multicart. INL could sell a "coder's cable" bundle with a bootloader cart and a USB cable. Heck, if the Cypress is fast enough, a game could essentially mount the cartridge as a block device and DMA things to RAM that way, using the computer on the other end as a makeshift SSD.
User avatar
bazz
Posts: 476
Joined: Fri Sep 02, 2011 8:34 pm
Contact:

Re: How do you guys debug on SNES?

Post by bazz »

That's a really open-ended question. But...

One thing I do is when I know I can get to a certain section code I'll add a label right there if one doesn't exist... I use WLA to export a symbol file which gives me the ROM address, then in BSNES debugger I set a breakpoint at that ROM address.. then I step thru the code and do my thing...

but there's different approaches for all different types of problems.. BSNES debugger also lets me set breakpoints on a read/write of memory.. even lets me break on when certain values are read/write IIRC...

Sometimes I might do a trace from one point to another and analyze the code in between the trace points.

I dunno what else to say to you cause there's loads of possible situations, calling for all different approaches :D
Post Reply