Jump to content
IGNORED

Trying to bankswitch ... having troubles


Synthpopalooza

Recommended Posts

It's working for me with the altgamestart, for the most part. You haven't included a drawscreen command, and there's no loop, so it the 6502 reaches the empty rom and starts to execute it.

 

Try adding the following to your code after your plotsprite command...

main 
        drawscreen
        goto main

 

Link to comment
Share on other sites

Welp, apologies for the double-post, but it seems a new problem has made itself known. Although the first bank works just fine, bank 2's "dmahole 0 noflow" is not able to get to my code it seems. Same issue as before, in the other banks. Am I able to use the "altgamestart" in other banks as well, or will there need to be another solution?

Link to comment
Share on other sites

Theres only one place where your game can start. You should be able to use goto to get to any other dmahole.  

 

[edit] with "noflow" it's up to you to goto/gosub in and out of dmaholes. Thing of them as isolated pockets of rom that you can never reach or leave, except via goto/gosub.

Link to comment
Share on other sites

I can't tell you a hard rule for where to place your gotos. It depends on how the code flows, and  more specifically, where you want it to flow.

 

If you're in one dma hole and want to go to the next, then you can do something like...

 dmahole 0 noflow
altgamestart    ; the game logic starts here
 [some game code]
 goto nextcode  ; without this goto, we'd hit the wall of dmahole 1. Instead we need to "goto" a destination somewhere...
 dmahole 1 noflow
nextcode
 [more game code] ; ...where the code flow will continue
 goto someotherplace

 

The point is just to never hit the wall at the start or end of a dmahole. So this is invalid...

 [some game logic code]
 ; bad - missing a goto to get to the code in dmahole 0
 dmahole 0 noflow
 [some more game logic]

As is this...

 goto mycode ; good
 dmahole 0 noflow
mycode
 [some game logic]
 ; bad - missing a goto to get to dma hole 1 code
 dmahole 1 noflow
 [more game logic]

 

If you use "dmahole" without the "noflow" argument, then all of this can be skipped, and code will flow naturally from one hole to the next. But you can't stuff the rom full of graphics that way. When you stuff things to the max, the price you pay is to use "noflow", with the consequence that you need to navigate your code flow in and out of these islands of rom.

  • Like 1
Link to comment
Share on other sites

On 9/24/2020 at 3:40 AM, RevEng said:

If you use "dmahole" without the "noflow" argument, then all of this can be skipped, and code will flow naturally from one hole to the next. But you can't stuff the rom full of graphics that way. When you stuff things to the max, the price you pay is to use "noflow", with the consequence that you need to navigate your code flow in and out of these islands of rom.

Ah interesting to know that Mike!

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