Jump to content
  • entries
    39
  • comments
    0
  • views
    820

Debugging


Piledriver

27 views

I got frustrated debugging on 8bitworkshop.  With more complex bank switched code things would mess up and the program counter would just go to weird random places.  I switched to VS Code and Atari Dev Studio for this reason.

 

Despite the issue I had with the bad labels with bank switched code Stella is an amazing emulator and debugger!  You can step ahead by an instruction, a line, or a full screen.  You can even jump back in time, so if something weird happens you can rewind and not miss it!  Having AI players also helped with debugging since weird stuff would always reoccur identically after a rewind which might not be the case with human input.

 

Let's look at how Stella helped me fix two bugs.

bug 1.  inconsistent scanline count - especially during a screen transition.

Run this "breakIf _scanEnd!=#276".  So if any frame doesn't match my target frame rate the emulator will halt.  I hate glitchy screen jumps in 2600 games.  With this its very easy to track down the problem... and also identify the problem as it can be easy to not notice.  Fixing the problem is another matter though.  😀

 

bug 2.  At the moment a player dies the AI opponent can crash into a wall!

This occurred pretty rarely but really annoyed me and was in the game for a long long time before I finally tracked it down.  With Stella I could have 4 (more if I wanted) instances of the game running with computer players with the emulation speed cranked way up and a breakpoint for a player crashing into a wall.  This let me track the issue down pretty easily!  What happened was there was too much processing for the one player dying so it disabled the wall collision check for the other player allowing it to crash.  The fix was to disable the other players movement for that one frame.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

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

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...