+Random Terrain Posted November 15, 2010 Share Posted November 15, 2010 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. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted November 16, 2010 Share Posted November 16, 2010 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 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 16, 2010 Author Share Posted November 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
+batari Posted November 16, 2010 Share Posted November 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 16, 2010 Author Share Posted November 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.