Jump to content
IGNORED

64K Multikernel Framework


RevEng

Recommended Posts

64k Multikernel Framework

 

I've put together a 64k multikernel framework, similar to my previous 32k multikernel framework. If you're converting a work from the 32k framework, please note that the bankswitching command has changed.

 

In a nutshell, this framework is an example of how to build up a 64k game out of individual 4k projects.

 

While this makes it a bit more cumbersome to build a game - I'd only recommend it for people that are very familiar with bB and the build process - it has the benefit of doing away with some bB limitations that people often complain about...

  • Each bank can have a different instance of the kernel. This means different sprite definitions, different playfields, different kernel compile options.
  • There can be multiple banks with title screens. Use them for their intended purpose, game over screens, in-game displays, hidden easter egg screens, scrolling game credits, or whatever.
It should be pointed out that the framework can't be used to mix completely different kernels, like the multisprite and standard kernels, due to the fact they use different vcs initialization and differing memory maps.

 

 

How the framework works

 

Each 4k project is built separately, with a custom bB score_graphics.asm file that adds a bankswitch table to the binary. Each project except for the "bank 1" project gets a custom bB 2600basicfooter.asm file that ensures bank 1 is the start-up bank.

 

When you want to change to another bank, you just issue a "temp1=switchbank(#)" in your bB code. This will switch banks and starts running the bB code at the top of the selected bank. It's up to you to decide how to make that work within your game flow.

 

If you want to make an empty bank/project without a standard kernel, you just need to stick a dummy std_kernel.asm in your project. The framework includes an example of this with the titlescreen held in bank 8. It's also recommended you use a custom default.inc in any bank without a kernel, to remove unused bB routines, e.g. the playfield routines.

 

 

Putting it all together

 

To build the project you need to build each bank individually (as you usually do) and then glue all the binaries together by double-clicking the included "make.bat" file (windows) or typing "make" from the parent directory. (Linux, probably OSX)

 

The sample bin is also attached here. The score displays the current bank, and pressing the fire button brings you to the next bank.

64kMultikernelFramework.131029.zip

64kmultikernel.bas.bin

  • Like 4
Link to comment
Share on other sites

You're welcome guys! I'm glad it will be put to good use. :)

 

Is it safe to manually hack your own 0-9 score font data into the different banks via editing the score_graphics.asm?

Sure. The actual graphics in the score data in each of the banks can differ, but the position of everything needs to be consistent from bank to bank.

 

And if you want to hack in 16 characters, just change the "ORG $FF7E" line in score_graphics.asm to "ORG $FF7E-48", add an extra 6 characters of data, copy the new score_graphics.asm into each bank directory, and modify the graphics in each score_graphics.asm as desired.

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