Jump to content
IGNORED

16K games and startup vectors


johnnywc

Recommended Posts

Hello all,

 

I have made a 16K game and I'm having a small issue when running it on real hardware (using a CC2).  If I don't specify F6BANK0, it will not start up properly.

 

In banks 1, 2 and 3, I have setup my vectors like so:

 

ORG	$4FF4
RORG	$FFF4

SwitchToBank0
bit  	$1FF6; $FFF4

.byte  #$FF, #$FF, #$FF; holder for the JMP in bank0

.word   SwitchToBank0; $FFFA
.word   SwitchToBank0; 
.word   SwitchToBank0

 

In bank 0, I have the following:

 

jmp     Start; $9FF7  

.word	Start  
.word  Start; set start vector
.word  Start; set interrupt vector

 

Start points to $9000.

 

Any ideas? Is there a way to force the emulators to start in a certain bank? Through z26 it appears that the program always starts up in bank0 but through the CC2 it would appear that it's starting up in another bank. Again - if I use the F6BANK0 option, the game runs fine.

 

Any help is greatly appeciated.

 

Thanks,

Edited by johnnywc
Link to comment
Share on other sites

Wouldn't the third byte of the BIT instruction and the complete JMP instruction sit on bankswitch hotspots? It should work if you leave $FFF6-$FFF9 completely empty in all banks. The JMP possibly strobes three hotspots at once and it may be vague what side effect will determine the "winning bank" in case...

 

BTW: Instead of the JMP you can just BRK, as you have that vector pointing to Start as well ;)

Link to comment
Share on other sites

Wouldn't the third byte of the BIT instruction and the complete JMP instruction sit on bankswitch hotspots? It should work if you leave $FFF6-$FFF9 completely empty in all banks. The JMP possibly strobes three hotspots at once and it may be vague what side effect will determine the "winning bank" in case...

 

BTW: Instead of the JMP you can just BRK, as you have that vector pointing to Start as well ;)

1007224[/snapback]

 

Thanks for the tips - I moved the code out of xFF6-xFF9 in all banks and it works perfectly. Even replaced the JMP with a BRK for good measure... :)

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