Jump to content
djmips

Making of Mega Man 2600

Recommended Posts

I thought I'd start a thread regarding some of the things I did to make Mega Man 2600 with bBasic and share a few tech things that came out of this. (Binary is here)

 

It was made very quickly in the Summer 2007 so some things are a little fuzzy. So it turns out that I did nothing special for the sprites, they all did fit in with the kernel.

 

Here is the bank map for Mega Man. I recall that I developed the Main game first and then branched the code to do the boss battle and then folded it all back in together. I didn't have time to make the Mega Man code a proper subroutine so it appears that his main control code is replicated in my haste. If I had more time I could reduce the code size.

 

Bank                               Free  Available  Used
1   MegaMan Game                  3781     43      3738
2   Music                         3781   3065       716
3   Title                         3781    900      2881
4   Screen transitions            3781   3317       464
5   Unused                        3781   3781         0
6   MegaMan + Boss AI             3781    874      2907
7   Elec Man                      3781   1810      1971
8   Graphics Kernel bBasic        3781    868      2913

                                 30248  14658     15590

Edited by djmips

Share this post


Link to post
Share on other sites

OK, now here is the source for those who would like to play with it, add more levels, program some more enemies or just use it for your own creations / inspiration or answer some questions ( jrok ;) )

 

There's probably something useful in there somewhere? ;-)

 

Contents of Zip

 

build.bat -> builds the game

 

collision.s bcollision.s and ecollision.s -> three copies of the same subroutine for different banks I think and the 'e' version is for ElecMan

 

The collision subroutine checkPos (and variants) checks the playfield data directly for collision versus an x,y position

 

mmm.s -> Music player source and song data

 

logo.s -> Title screen code and art

 

header.bas -> variable declarations including how to use Super Chip RAM (at least the way I did it anyway)

 

mm.bas -> The game - you might notice that I drop into ASM in a few places because I was working around a compiler bug or I just thought I could do it better or it's easier for me or executes faster in ASM.

MegaManSource.zip

  • Like 1

Share this post


Link to post
Share on other sites

Awesome, thanks for posting the source and starting this "Making Of" thread. I am probably going to post news about your release of the binary (and source) later today. :)

 

..Al

Share this post


Link to post
Share on other sites
OK, now here is the source for those who would like to play with it, add more levels, program some more enemies or just use it for your own creations / inspiration or answer some questions ( jrok ;) )

 

There's probably something useful in there somewhere? ;-)

 

Contents of Zip

 

build.bat -> builds the game

 

collision.s bcollision.s and ecollision.s -> three copies of the same subroutine for different banks I think and the 'e' version is for ElecMan

 

The collision subroutine checkPos (and variants) checks the playfield data directly for collision versus an x,y position

 

mmm.s -> Music player source and song data

 

logo.s -> Title screen code and art

 

header.bas -> variable declarations including how to use Super Chip RAM (at least the way I did it anyway)

 

mm.bas -> The game - you might notice that I drop into ASM in a few places because I was working around a compiler bug or I just thought I could do it better or it's easier for me or executes faster in ASM.

 

This is great, thanks! In addition to the lovely art, I think the most interesting parts of your project to me are the way you incorporated the title screen and the music. It would be really neat to hear you describe their development and your implementation of each within a batariBasic framework.

Edited by jrok

Share this post


Link to post
Share on other sites
This is great, thanks! In addition to the lovely art, I think the most interesting parts of your project to me are the way you incorporated the title screen and the music. It would be really neat to hear you describe their development and your implementation of each within a batariBasic framework.

 

It was/is an awesome title kernel from cd-w. I had to basically understand his routines from Juno first in order to adapt this for the Mega Man titles. Once again, I spent more time in Gimp editing the graphics before exporting as PCX files and using PCX2GRP to export to source code. Some of the big issues were the monochrome aspect of Atari graphics. I modified the kernel to update colors from a table as I recall so I think I had to fit some extra cycles in there.

 

Incorporating the titles was one of the biggest problems of getting it to work on a 'real' cartridge. Since the titles module had no understanding of bBasic's zpage usage, I had to make sure that they worked together and that bBasic was setup correctly after the titles returned. In the end I had to save and restore playfieldpos around the call to the title screen code which also had to clear zero page before starting. It was kind of drastic but it worked.

 

Getting the music driver working with bBasic was mainly just making sure that they had no conflicts in zpage usage. After initializing the driver I make sure that I call the update from the main loop. It was pretty smooth integrating this work from vdub_bobby and his brother.

Share this post


Link to post
Share on other sites

I've got the music looping on my headphones this morning. So cool. I'd like to try out some of the 'slurring' in my own songs, great effect :)

Share this post


Link to post
Share on other sites

The music driver is probably overkill; on projects since then I've used the same concepts but trimmed it down considerably, to save code, data, and especially to save RAM. ;)

 

One thing I like about this, though, is that the data is easy to read and reasonably compact.

 

EDIT: David didn't end up using all the music that Tommy translated; here's a binary with the rest:

MegaManMusic20080229.bin

 

Press the joystick button to cycle through them.

Edited by vdub_bobby

Share this post


Link to post
Share on other sites

The music driver is probably overkill; on projects since then I've used the same concepts but trimmed it down considerably, to save code, data, and especially to save RAM. ;)

 

One thing I like about this, though, is that the data is easy to read and reasonably compact.

 

EDIT: David didn't end up using all the music that Tommy translated; here's a binary with the rest:

MegaManMusic20080229.bin

 

Press the joystick button to cycle through them.

 

Wow. I didn't realize that there was boss fight music otherwise I would have used it! :dunce:

 

I don't think I have that boss fight music.

 

I didn't use the selection music because I only had one boss.

Share this post


Link to post
Share on other sites

I don't think there is boss fight music in there. Just the stage select music, the little fanfare when you select a stage, and ElecMan music.

Share this post


Link to post
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.

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