Jump to content



1

[coleco] Cartridge Header (from official documentation)


3 replies to this topic

#1 newcoleco OFFLINE  

newcoleco

    Stargunner

  • 1,053 posts

Posted Thu Aug 26, 2010 7:59 PM

Again, if you find this message useful, vote for it or do a nice reply.



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 by newcoleco, Thu Aug 26, 2010 8:10 PM.


#2 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,095 posts
  • Location:Germany

Posted Fri Aug 27, 2010 11:22 AM

Thanks for sharing.

Can you tell me what is used for generating the speech in the demo ?

#3 newcoleco OFFLINE  

newcoleco

    Stargunner

  • 1,053 posts

Posted Fri Aug 27, 2010 11:38 AM

View Postretroclouds, on Fri Aug 27, 2010 11:22 AM, said:

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.c...it/Freeware.htm

#4 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,095 posts
  • Location:Germany

Posted Sat Aug 28, 2010 2:33 AM

View Postnewcoleco, on Fri Aug 27, 2010 11:38 AM, said:

View Postretroclouds, on Fri Aug 27, 2010 11:22 AM, said:

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.c...it/Freeware.htm

Thanks, that's very cool. Might use that for one of my future projects.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users