Jump to content

Photo

ColecoVision MegaCart FAQ

Bank switching

30 replies to this topic

#26 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,674 posts

Posted Fri Feb 19, 2016 10:21 PM

I wanted to let you all know that I'm no longer bankswitch-impaired.  I figured it out with the help with AlekMaul and also figured out how to use Cygwin instead of cci3 to compile my source code. Also used PkK tutorial on getting the cygwin and the stuff comes with it.

 

I can plan my next project around bankswitching.  Expect more animation, more levels, more FMV, and more of everything. 

I think BIOS os7 sound/music engine data might be the only thing that can't be bankswitched.



#27 digress OFFLINE  

digress

    Stargunner

  • 1,123 posts
  • Location:Toronto, Ontario, Canada

Posted Sun Feb 21, 2016 7:56 AM

Not completely accurate. You can't switch the bank while os7 sounds are playing but you can put all music & soundfx for any 1 level in the second bank that you switch in. Then assign that sound table to be current and play from it. 

 

You have to stop all sounds before bank switching os7 sounds.

 

If you are constantly bank switching for routines no it definately won't work.

 

what I've tried is putting all sound effects & music into the the permanent bank for the initial levels.

 

For special levels which can run completly from 1 16kb bank including the os7 music or sound you can bank switch and play from the other bank.

 

It works well enough for title screen & end game music where you can make a complete stop to sounds before the bank switch.

I wanted to let you all know that I'm no longer bankswitch-impaired.  I figured it out with the help with AlekMaul and also figured out how to use Cygwin instead of cci3 to compile my source code. Also used PkK tutorial on getting the cygwin and the stuff comes with it.

 

I can plan my next project around bankswitching.  Expect more animation, more levels, more FMV, and more of everything. 

I think BIOS os7 sound/music engine data might be the only thing that can't be bankswitched.



#28 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,674 posts

Posted Fri Feb 26, 2016 11:29 PM

I'm running into an issue where the cvmkcart.exe haven't place the data into the right bank. I looked in hexedit to see where the data. Most of the data/function is in address 1C000 and up.  The other banks had the word, "BANK1" "END OF BANK1" that I have placed into each other 7 source file to be filled later.  I started at bank 7, made the title screen, story screen and etc.  Then it exit that bank and the non switchable bank is intended to be more like a trampoline. So I can keep the sound, music and stuff in the first non swapable bank16KB and not have the main game in that bank.  And the switch bank to run routine and pulling data from.  Also, do multi directional level scroll because 16 KB bank is a good amount of memory and have the handler to handle levels that does wraparound.  

 

I can attach an image of what command I typed into Cygwin console and  I run cvmkcart in window's run command. C:\sdcctest\BlackTiger\cvmkcart.exe -icrtcv.ihx -b6 BlackTiger.rom

abank.jpg

 

Yea... I am attempting making Black Tiger on the Colecovision...

 

I wasn't sure if I type anything wrong or you're not allow to have functions in other banks, just data.  I was able to build a 128KB banksw example with 4 added picture



#29 digress OFFLINE  

digress

    Stargunner

  • 1,123 posts
  • Location:Toronto, Ontario, Canada

Posted Sun Feb 28, 2016 1:00 PM

I'm using tursi's method and make system so I guess alekmaul will know.

 

I'm running into an issue where the cvmkcart.exe haven't place the data into the right bank. I looked in hexedit to see where the data. Most of the data/function is in address 1C000 and up.  The other banks had the word, "BANK1" "END OF BANK1" that I have placed into each other 7 source file to be filled later.  I started at bank 7, made the title screen, story screen and etc.  Then it exit that bank and the non switchable bank is intended to be more like a trampoline. So I can keep the sound, music and stuff in the first non swapable bank16KB and not have the main game in that bank.  And the switch bank to run routine and pulling data from.  Also, do multi directional level scroll because 16 KB bank is a good amount of memory and have the handler to handle levels that does wraparound.  

 

I can attach an image of what command I typed into Cygwin console and  I run cvmkcart in window's run command. C:\sdcctest\BlackTiger\cvmkcart.exe -icrtcv.ihx -b6 BlackTiger.rom

attachicon.gifabank.jpg

 

Yea... I am attempting making Black Tiger on the Colecovision...

 

I wasn't sure if I type anything wrong or you're not allow to have functions in other banks, just data.  I was able to build a 128KB banksw example with 4 added picture



#30 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,674 posts

Posted Sun Feb 28, 2016 1:35 PM

I should give an update.  I made sure all the bank don't void function in it.  The data, mostly graphic and text are in different banks.  Bankswitch is working right with cvmkcart.exe. Kinda a trial and error for me to guess which banks is which.  I have around 11KB left in the main bank and now working on controls and tile collusion. I think that should be enough for the game logic.  I will have to read Tursi stuff and see his method in order to use functions in other banks. 



#31 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,674 posts

Posted Fri Mar 4, 2016 2:42 AM

I fixed my issue.
I used
 

sdcc -c -mz80 --vs --no-std-crt0 --constseg bank7 --codeseg bank7 btbank7.c

to compile the data and the code into 1 bank.  I added --codeseg bank7 to the compile line and now the bank if flagged with seg for data and code.  I linked and used cvmkcart to make a megacart ROM.  I am able to use function while having data in a bank.   







Also tagged with one or more of these keywords: Bank switching

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users