Jump to content

Recommended Posts

I'm trying to make a home console port of Space Race using visual batari basic. (Its my first time coding a game). I'm coding my game. Everything is going fine, but when I compile and then attempt to test the game with Stella, an error message appears in Stella.

 

Fatal Error

Invalid Instruction.

 

So I tried it with Z26. But when I compile and open the game, instead of opening the game, it opens to a black screen with the word jammed at the bottom.

Please help me. I looked everywhere but I haven't found a way to fix this.

Share this post


Link to post
Share on other sites

You might have to post the code for specific solutions.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

I doubt it's the emulator. Sounds like the compiled code is hitting one of the 6502 JAM instructions which effectively kills the cpu from fetching new instructions. http://forum.6502.org/viewtopic.php?f=1&t=1409&view=previous

 

The only way to restore the cpu to a valid state once it's jammed on real hardware is sending a reset signal to the cpu. The error message you are seeing is alerting you to the fact the cpu has attempted to execute one of the JAM instructions and is now in an unresponsive state.

 

VICE actually has test programs to ensure once a JAM instruction is executed the cpu indeed remains frozen. These test programs show that jam instructions can be compiled with no issues. https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/CPU/cpujam/

Edited by willymanilly
  • Like 1

Share this post


Link to post
Share on other sites

If you don’t want to post the code, you could always PM it to me and I could take a look and see if I notice anything that might be causing the problem. If I find something, I’ll add the error and the fix to the bB page.

  • Like 2

Share this post


Link to post
Share on other sites
On 6/12/2019 at 11:16 PM, willymanilly said:

I doubt it's the emulator. Sounds like the compiled code is hitting one of the 6502 JAM instructions which effectively kills the cpu from fetching new instructions. http://forum.6502.org/viewtopic.php?f=1&t=1409&view=previous

 

The only way to restore the cpu to a valid state once it's jammed on real hardware is sending a reset signal to the cpu. The error message you are seeing is alerting you to the fact the cpu has attempted to execute one of the JAM instructions and is now in an unresponsive state.

 

VICE actually has test programs to ensure once a JAM instruction is executed the cpu indeed remains frozen. These test programs show that jam instructions can be compiled with no issues. https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/CPU/cpujam/

And how do I fix the issue with these programs?

Share this post


Link to post
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.

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