Jump to content
IGNORED

Re-arranged Code


Just Jeff

Recommended Posts

It's hard to say without the full source, but it looks like dasm is working fine. I think what you're seeing is stella loading symbols from another bank. Essentially each location may have more than one name which is dependent on the current bank and I believe stella will display them all in the debugger regardless of which bank is currently selected.

  • Like 1
Link to comment
Share on other sites

Yep, Stella doesn't use your source code - it creates its own disassembly and uses the contents of the symbol file you created, 32KGame20180101p.sym, for the labels. If you look inside it you'll find that TitleScreenCounter and ScratchRAM have the same value of 0088. The symbol file is sorted alphabetically, so Stella most likely used the first one it found for the value in question.

  • Like 1
Link to comment
Share on other sites

Thanks.. I'm glad I asked. I was thinking it was a compile issue.

 

Looking at GameStateHi and GameStateLow,some of values were put in with commas and the $F06E and $F072 are actually the GameStateHi and GameStateLo values again. Same issue I guess.

 

It looks like the op codes at least still line up though though I guess you have to focus more on them when troubleshooting.

Link to comment
Share on other sites

Actually, I can't see any issue at all. What Stella shows you is not the source, but a formally correct disassembly. The only reason why you get symbols from your source is that Stella reads in the symbol definitions generated by DASM, but the banking messes up the mapping. The disassembly itself is fully correct.

Link to comment
Share on other sites

DirtyHairy is correct in that the disassembly is fully correct. But what I was referring to is that we will eventually add source-level debugging (https://github.com/stella-emu/stella/issues/237). Basically, if we already have the source file, lst file and sym file, we may as well use that fully, and not use the built-in disassembler at all. This is what we hope to add eventually.

  • Like 1
Link to comment
Share on other sites

DirtyHairy is correct in that the disassembly is fully correct. But what I was referring to is that we will eventually add source-level debugging (https://github.com/stella-emu/stella/issues/237). Basically, if we already have the source file, lst file and sym file, we may as well use that fully, and not use the built-in disassembler at all. This is what we hope to add eventually.

 

Until then it would be nice if stella at least handled variables that are larger than a single byte. Rather than ram_85 it should display the closest symbol prior to that location and an offset, Game_JumpInd+1.

  • Like 1
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...