Jump to content
IGNORED

Stella Debugger question


Recommended Posts

I've been trying to figure out how to "fix" a problem I've having with my first ever 2600 hack (and first attempt at any type of programming in 30+ years) and I've been getting a weird bug and this notification in Stella.  I'm referring to the auto-highlighted portion that says "inc DARK_GREEN" in the code on the bottom right of the debug window.  I can't find the same in the dissassembled version (though I found the sections above and below it) and it likely is related to the issue I'm having.  If I try to change the color of Pitfall Harry's pants from Dark_Green to black then the character dies when entering or exiting a closed supposedly safe tar pit.  Am I reading too much into this highlighted area of the code given the problem I'm having?  Is there any way of extracting the code from Stella back into ASM form to remove that one line and see what happens?  Thanks in advance for any help with this as I'm practically wet behind the ears in terms of coding experience (my last attempt was on an Apple IIe when it wasn't retro!) and I figured I'd dip my toes into the pool with a hack first.

 

stelladebug.jpg

Edited by LatchKeyKid
Link to comment
Share on other sites

That 'inc DARK_GREEN' is mislabeled.... an underlying issue with the order in which labels are listed in the .SYM file produced by DASM.

 

If you need help with this, it's better to share your source code and indicate the where the changes you made are located.

  • Like 1
Link to comment
Share on other sites

1 hour ago, LatchKeyKid said:

I've been trying to figure out how to "fix" a problem I've having with my first ever 2600 hack (and first attempt at any type of programming in 30+ years) and I've been getting a weird bug and this notification in Stella.  I'm referring to the auto-highlighted portion that says "inc DARK_GREEN" in the code on the bottom right of the debug window.

This is not related to what you are looking for.

1 hour ago, LatchKeyKid said:

I can't find the same in the dissassembled version (though I found the sections above and below it) and it likely is related to the issue I'm having. 

DARK_GREEN is in this case defined as $D2. And probably something else is defined as $D2 too. Stella cannot know which one is right.

1 hour ago, LatchKeyKid said:

If I try to change the color of Pitfall Harry's pants from Dark_Green to black then the character dies when entering or exiting a closed supposedly safe tar pit.  Am I reading too much into this highlighted area of the code given the problem I'm having?

Definitely! (see above) :) 

 

Also, changing the color depending on the situation is definitely not possible with a simple hack. This requires additional logic (= code).

1 hour ago, LatchKeyKid said:

Is there any way of extracting the code from Stella back into ASM form to remove that one line and see what happens?

Removing code is usually not working (because data pointers and subroutine addresses become invalid), unless the disassembly is perfect. It is better to replace the bytes with the same number of NOPs ($ea).

  • Like 1
Link to comment
Share on other sites

Thanks for the quick replies, @splendidnut and @Thomas Jentzsch!   It's a small world as I'm actually using your Pitfall dissassembly (terminology?), Thomas!  If I change a number of Pitfall Harry's pants colors above the third from the bottom to black on the climbing sprite specifically (or other colors but black is my goal for the hack) then he has a glitch where he falls through the closed pit upon entrance and exit (though if you hop over those areas the 80% of the middle of the closed pit is fine).  I've tried (admittedly randomly given my lack of knowledge/experience) changing the timing, size, and variables of the pit and detection with no luck and only made the problem worse typically.

 

pitfall death.png

 

While I'm made more changes in my WIP file like swapping sprites and incorporating Nukeyshay's moving enemies code, your original dissassembly still has the issue if you change the color so I attached that original one instead.  This is the only change I've made to it where the color is switched to black on Climbing Harry.  The first three lines of colors are swappable but the rest of the DARK_GREEN only seem to initiate the glitch with pits; the rest of colors of that sprite as well as the running Harry sprites are fine and swapped out without issue.  On a related coding note, in the dissassembly code, what does it mean when you have a color+number in terms of coding?  Does it refer to the initial table of color variables (or some other) or going up/down or across the TIA NTSC color table?   I see numerous references to things like DARK_GREEN-2 for the croc colors and wasn't sure what that meant.  Thanks again for any help for a n00b.

Quote

; Harry's colors while climbing:
ClimbColTab:
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte BLACK
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte DARK_GREEN
    .byte YELLOW_GREEN
    .byte YELLOW_GREEN
    .byte YELLOW_GREEN
    .byte YELLOW_GREEN
    .byte YELLOW_GREEN
    .byte YELLOW_GREEN
    .byte PINK
    .byte PINK
    .byte PINK
    .byte BROWN

 

 

color swap death.bin color swap death.asm

Edited by LatchKeyKid
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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