newcoleco Posted August 27, 2010 Share Posted August 27, 2010 (edited) Again, if you find this message useful, vote for it or do a nice reply. http://www.youtube.com/watch?v=6XYazGHmR4w Essentially, the cartridge header contains all the information the ColecoVision BIOS need to boot up and run your game properly. Regardless on the functionalities you are willing to use from the BIOS, and your intention to use your own RST commands, this information is essential to know if you want to code a ColecoVision game, even more if you code in assembly codes. The names used in the video are the official ones from the ColecoVision programmers' manual. The cartridge header is composed of : $8000 : CARTRIDGE game type = bytes AA 55 , display CV logo title screen test type = bytes 55 AA , execute your game no delay otherwise it is invalid and display "INSERT CARTRIDGE" $8002 : LOCAL_SPR_TBL it is the memory address where is your sprites table for their coordinates, patterns and colors. $8004 : SPRITE_ORDER it is a table of usually maximum 32 bytes that simply say in which order each sprite entry should display. The corresponding initialisation function set the values as 0,1,2,3,4... which mean that the first entry (entry 0) is first, then the second entry (entry 1) is second to be disaplayed. By reordering these numbers, you affect the order of sprites, allowing to do flickering if needed. $8006 : WORK_BUFFER it is usually a big memory RAM space that can be used by some BIOS functions to calculate graphics manipulations like mobile and semi-mobile objects, tiles rotations, etc. $8008 : CONTROLLER_MAP it contains first 2 bytes telling if port-1 and port-2 are enabled to be analyzed with the POLLER function. The following values correspond to different fire buttons, stick direction, keypad and spinner values. $800A : START_GAME it is the address of the starting point of you code, your main code entry. $800C - $801B : RST_8H_RAM - RST_30H_RAM Are usually jumps to sub-programs in the cartridge or to BIOS functions. $801E : IRQ_INT_VECT It should be a jump to a sub-routine saving all the PAIRs (AF, BC, DE, HL, AF', BC' DE' and HL') and then jump to BIOS to count spinner value $1F88 -or- something similar made by the programmer. To avoid an interuption within an interuption it is highly recommanded to use DI and EI opcodes to encapsulate this part of the code. "IM 1" should be done as soon as possible in game program, like the first thing at the main game entry point. $8021 : NMI_INT_VECT It is the crucial part of all ColecoVision games. If you are not using the CV logo screen, you can directly code your sequence of actions to do while a non maskable interrupt (NMI) occurs. To be safe, you should save all the regsiter PAIRs before executing anything in the NMI function. And most important, you should read the video status Otherwise there will be no other non maskable interupt. $8024 : GAME_NAME It is a string that contains first the name of the game with usually the trademark symbol (characters 1E and 1F), a slash as a separator, then the usual PRESENTS with the original licensor, a slash separator again, and finally the release year in 4 digits. That's all you really need to know. Note for people who want to make optimized (small) games, take advantage of the ColecoVision title screen to initialize already the sound chip, graphic mode 1, and random number generator. Edited August 27, 2010 by newcoleco 4 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 27, 2010 Share Posted August 27, 2010 Thanks for sharing. Can you tell me what is used for generating the speech in the demo ? Quote Link to comment Share on other sites More sharing options...
newcoleco Posted August 27, 2010 Author Share Posted August 27, 2010 Can you tell me what is used for generating the speech in the demo ? Say It by analogX, it's a freeware! http://www.analogx.com/contents/download/Audio/sayit/Freeware.htm Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted August 28, 2010 Share Posted August 28, 2010 Can you tell me what is used for generating the speech in the demo ? Say It by analogX, it's a freeware! http://www.analogx.com/contents/download/Audio/sayit/Freeware.htm Thanks, that's very cool. Might use that for one of my future projects. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.