Jump to content
Swami

how to get source code for an original Colecovision game

Recommended Posts

Can anyone tell me how get the source code for an original Colecovision game, like Centipede?

Share this post


Link to post
Share on other sites

Does any still exist of commercial Colecovision games?  It's pretty rare when source is found (regardless of platform).

 

BTW, source code is the actual program assembly files/modules/etc created by the original developer.  Most often, these files are lost forever when a company ceases development...reappearing only when some backup copy or printout was forgotten about in some programmer's attic.

 

A disassembly is an attempted reconstruction of an assembly file, created by examining a programs' binary cartridge or disk data...and translating those bytes back into assembly mnemonic instructions, arguments, and data tables.

 

Reverse-engineering takes the disassembly process one step further, replacing generic labels with descriptive names and adding comments explaining what the program lines are doing.  Depending on the complexity of the program, this process could take a very long time for even an accomplished programmer to decipher.  And even then, the original programmers' comments and label names are unrecoverable.

 

By contrast, a beginning disassembly file can be generated automatically using a program disassembler...requiring only minimal human assistance (to correctly separate program code from data tables).  I never attempted Colecovision disassembly, but dZ80 is supposed to have a good rep.

http://www.inkland.org.uk/dz80/

  • Like 1

Share this post


Link to post
Share on other sites
23 hours ago, Nukey Shay said:

Does any still exist of commercial Colecovision games?  It's pretty rare when source is found (regardless of platform).

 

BTW, source code is the actual program assembly files/modules/etc created by the original developer.  Most often, these files are lost forever when a company ceases development...reappearing only when some backup copy or printout was forgotten about in some programmer's attic.

 

A disassembly is an attempted reconstruction of an assembly file, created by examining a programs' binary cartridge or disk data...and translating those bytes back into assembly mnemonic instructions, arguments, and data tables.

 

Reverse-engineering takes the disassembly process one step further, replacing generic labels with descriptive names and adding comments explaining what the program lines are doing.  Depending on the complexity of the program, this process could take a very long time for even an accomplished programmer to decipher.  And even then, the original programmers' comments and label names are unrecoverable.

 

By contrast, a beginning disassembly file can be generated automatically using a program disassembler...requiring only minimal human assistance (to correctly separate program code from data tables).  I never attempted Colecovision disassembly, but dZ80 is supposed to have a good rep.

http://www.inkland.org.uk/dz80/

This is what disassembly got me. It doesn't make any sense compared to the assembly programming I've read, though. Any idea what the joypad mappings are for N, S, E, W?

Centipede.asm

Share this post


Link to post
Share on other sites

After doing a lot of looking around, this supposedly a better disassembly using BlueMSX: Any idea what the joypad mappings are for N, S, E, W? This is probably becoming more for the programming section now, so apologies on that.

centipede2.asm

Share this post


Link to post
Share on other sites

Just noticed that BlueMSX has bugs in the disassembly. Anyway I gave a peek. Also I prefer $ instead of # for hexadecimal.

 

At #a0a8 it saves the current state of controller into #60a6 with inverted bits (so bit set to 1 = push). It could be enough to change this routine if you want to change mappings.

 

At #853e it calls the routine to read the controller and saves value still in A also into register C.

 

At #8561 it starts testing the C register for movements

 

#8565 bit 0,a = test for left

#8572 bit 2,a = test for right

#857f bit 3,a = test for up

#858c bit 1,a = test for down

 

At #85ae bit 3,(hl) = test for up but using #60a6.

At #85d9 bit 0,(hl) and bit 2,(hl) = test for left/right using #60a6.

 

Share this post


Link to post
Share on other sites
2 hours ago, nanochess said:

Just noticed that BlueMSX has bugs in the disassembly. Anyway I gave a peek. Also I prefer $ instead of # for hexadecimal.

 

At #a0a8 it saves the current state of controller into #60a6 with inverted bits (so bit set to 1 = push). It could be enough to change this routine if you want to change mappings.

 

At #853e it calls the routine to read the controller and saves value still in A also into register C.

 

At #8561 it starts testing the C register for movements

 

#8565 bit 0,a = test for left

#8572 bit 2,a = test for right

#857f bit 3,a = test for up

#858c bit 1,a = test for down

 

At #85ae bit 3,(hl) = test for up but using #60a6.

At #85d9 bit 0,(hl) and bit 2,(hl) = test for left/right using #60a6.

 

Thanks nanochess. Your the best! It seems no utility gives a very good disassembly, but BlueMSX is supposedly better than dz80. I found it confusing because manuals listed bits 5-8 as joypad, but  I may not understand the context.

  • Like 2

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