Jump to content
IGNORED

What would cause smartbranching to stop working?


Random Terrain

Recommended Posts

I added more code to my program that uses bankswitching and I haven't run out of space yet, so that shouldn't be a problem. The problem I am having is that the program won't work unless all new if-thens I've added use then goto within the same bank. Is there a limit when using set smartbranching on?

 

I have another problem that started when I added the new code. Any time the program reaches a spot that uses pfscore2, the program resets to the title screen. I don't understand what in the heck is going on.

Link to comment
Share on other sites

I added more code to my program that uses bankswitching and I haven't run out of space yet, so that shouldn't be a problem. The problem I am having is that the program won't work unless all new if-thens I've added use then goto within the same bank. Is there a limit when using set smartbranching on?

 

I have another problem that started when I added the new code. Any time the program reaches a spot that uses pfscore2, the program resets to the title screen. I don't understand what in the heck is going on.

I would need to see your code and compile it myself before I could hazard a guess.

 

Michael

Link to comment
Share on other sites

I would need to see your code and compile it myself before I could hazard a guess.

Thanks. I think I tracked down the cause. I moved my joystick code to another bank to make room and that's what messed everything up. Seems I can move other chunks of code to another bank to make room, but the joystick code has to stay in the same bank with the main loop.

Link to comment
Share on other sites

You should be able to put joystick code anywhere. There is no limit to smartbranching. I'd guess a problem with DASM - it has a known bug with branching that I have not been able to fix.

I just did a test version where I moved the SWCHA on-goto to the other bank instead of using something like this:

 

   on x goto Red Green Blue Purple

Red
  goto Red02 bank2

Green
  goto Green02 bank2

Blue
  goto Blue02 bank3

Purple
  goto Purple02 bank3

 

Now that every bit of the joystick code has been moved to the other bank and the conversion of the SWCHA on-goto isn't necessary, everything seems to be working fine. Maybe DASM was choking on all of the on-gotos and gotos mixed with bankswitching? Now I jump to the whole joystick section in another bank and jump back when it's done. Doing it this way also means all of the converting I had to do the first time isn't necessary.

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