Jump to content
IGNORED

6502 brk opcode and Stella break not working


jgrillout

Recommended Posts

It would be helpful if I could use the brk opcode and stella would open the debugger at that point. I tried putting a brk opcode in my code but nothing happens. If I press the ` key. then the debugger window appears but the program counter is not on the brk line or anywhere close to it. I tried the stella break command but it rejects labels and says it requires an address. the documentation I read implies you can use labels for break.

Link to comment
Share on other sites

3 hours ago, jgrillout said:

It would be helpful if I could use the brk opcode and stella would open the debugger at that point.

That would "break" any game that uses the brk instruction...

Stella emulates the Atari 2600 and when it finds a "brk" opcode it behaves like a real console does: it pushes the program counter and the status register onto the stack, then jumps to the address defined in the IRQ vector.

 

Quote

the documentation I read implies you can use labels for break.

Indeed you can *if* you created a symbol file with the same filename as the rom and ".sym" extension. Else Stella doesn't know what address your label corresponds to.

 

You can do that with dasm using the "-s" option.

e.g.

dasm game.asm -f3 -ogame.bin -sgame.sym

Creates the rom "game.bin" and the corresponding symbol file "game.sym".

Edited by alex_79
  • 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...