Difference between revisions of "A78 Header Specification"
From 8BitDev.org - Atari 7800 Development Wiki
Line 5: | Line 5: | ||
The format has since been expanded to incorporate new hardware, and is now being used by multiple emulators and the Concerto 7800 flash cart. | The format has since been expanded to incorporate new hardware, and is now being used by multiple emulators and the Concerto 7800 flash cart. | ||
+ | ==A78 Header Fields== | ||
− | ==A78 Header | + | {| style="float:left;" |
+ | |+A78 Header Fields | ||
+ | ! 0000 || style="background-color: #fc8;" | 01 || style="background-color: #fcf;" | 41 || style="background-color: #fcf;" | 54 || style="background-color: #fcf;" | 41 || style="background-color: #fcf;" | 52 || style="background-color: #fcf;" | 49 || style="background-color: #fcf;" | 37 || style="background-color: #fcf;" | 38 || style="background-color: #fcf;" | 30 || style="background-color: #fcf;" | 30 || style="background-color: #fcf;" | 00 || style="background-color: #fcf;" | 00 || style="background-color: #fcf;" | 00 || style="background-color: #fcf;" | 00 || style="background-color: #fcf;" | 00 || style="background-color: #fcf;" | 00 || <tt>.ATARI7800......</tt> | ||
+ | |- | ||
+ | ! 0010 || style="background-color: #fcf;" | 00 || style="background-color: #acf;" | 43 || style="background-color: #acf;" | 6f || style="background-color: #acf;" | 6d || style="background-color: #acf;" | 6d || style="background-color: #acf;" | 61 || style="background-color: #acf;" | 6e || style="background-color: #acf;" | 64 || style="background-color: #acf;" | 6f || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || <tt>.Commando.......</tt> | ||
+ | |- | ||
+ | ! 0020 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || style="background-color: #acf;" | 00 || <tt>................</tt> | ||
+ | |- | ||
+ | ! 0030 || style="background-color: #acf;" | 00 || style="background-color: #faa;" | 00 || style="background-color: #faa;" | 02 || style="background-color: #faa;" | 00 || style="background-color: #faa;" | 00 || style="background-color: #ffb;" | 00 || style="background-color: #ffb;" | 03 || style="background-color: #8fc;" | 01 || style="background-color: #caa;" | 01 || style="background-color: #8c8;" | 00 || style="background-color: #c8c;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #aac;" | 00 || <tt>................</tt> | ||
+ | |- | ||
+ | ! 0040 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || <tt>................</tt> | ||
+ | |- | ||
+ | ! 0050 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || <tt>................</tt> | ||
+ | |- | ||
+ | ! 0060 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cbb;" | 00 || style="background-color: #cf8;" | 41 || style="background-color: #cf8;" | 43 || style="background-color: #cf8;" | 54 || style="background-color: #cf8;" | 55 || style="background-color: #cf8;" | 41 || style="background-color: #cf8;" | 4c || style="background-color: #cf8;" | 20 || style="background-color: #cf8;" | 43 || style="background-color: #cf8;" | 41 || style="background-color: #cf8;" | 52 || style="background-color: #cf8;" | 54 || style="background-color: #cf8;" | 20 || <tt>....ACTUAL CART </tt> | ||
+ | |- | ||
+ | ! 0070 || style="background-color: #cf8;" | 44 || style="background-color: #cf8;" | 41 || style="background-color: #cf8;" | 54 || style="background-color: #cf8;" | 41 || style="background-color: #cf8;" | 20 || style="background-color: #cf8;" | 53 || style="background-color: #cf8;" | 54 || style="background-color: #cf8;" | 41 || style="background-color: #cf8;" | 52 || style="background-color: #cf8;" | 54 || style="background-color: #cf8;" | 53 || style="background-color: #cf8;" | 20 || style="background-color: #cf8;" | 48 || style="background-color: #cf8;" | 45 || style="background-color: #cf8;" | 52 || style="background-color: #cf8;" | 45 || <tt>DATA STARTS HERE</tt> | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | {| style="float:left; margin-left: 30px;" | ||
+ | ! color !! purpose !! size | ||
+ | |- | ||
+ | | style="background-color: #fc8;" | || header version || 1 byte | ||
+ | |- | ||
+ | | style="background-color: #fcf;" | || ATARI7800 magic-text || 16 bytes | ||
+ | |- | ||
+ | | style="background-color: #acf;" | || cart title || 32 bytes | ||
+ | |- | ||
+ | | style="background-color: #faa;" | || rom size without header || 4 bytes | ||
+ | |- | ||
+ | | style="background-color: #ffb;" | || cart type || 2 bytes | ||
+ | |- | ||
+ | | style="background-color: #8fc;" | || controller 1 type || 1 byte | ||
+ | |- | ||
+ | | style="background-color: #caa;" | || controller 2 type || 1 byte | ||
+ | |- | ||
+ | | style="background-color: #8c8;" | || TV type || 1 byte | ||
+ | |- | ||
+ | | style="background-color: #c8c;" | || save device || 1 byte | ||
+ | |- | ||
+ | | style="background-color: #cbb;" | || reserved || | ||
+ | |- | ||
+ | | style="background-color: #aac;" | || expansion module || 1 byte | ||
+ | |- | ||
+ | | style="background-color: #cf8;" | || header end magic-text || 28 bytes | ||
+ | |} | ||
+ | |||
+ | <div style="clear:both;"></div> | ||
+ | |||
+ | ==Adding an A78 Header to Source Code== | ||
To add an A78 header to your DASM source code, you can add or include the header at the start of your source, and adjust the fields to encode the hardware your game requires. | To add an A78 header to your DASM source code, you can add or include the header at the start of your source, and adjust the fields to encode the hardware your game requires. |
Revision as of 05:01, 10 November 2015
History and Purpose
The A78 header was originally created by Dan Boris, in tandem with his A7800 emulator. The header, which is added to the beginning of ROM images, serves to tell the emulator which hardware should be present for the game to run correctly.
The format has since been expanded to incorporate new hardware, and is now being used by multiple emulators and the Concerto 7800 flash cart.
A78 Header Fields
0000 | 01 | 41 | 54 | 41 | 52 | 49 | 37 | 38 | 30 | 30 | 00 | 00 | 00 | 00 | 00 | 00 | .ATARI7800...... |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0010 | 00 | 43 | 6f | 6d | 6d | 61 | 6e | 64 | 6f | 00 | 00 | 00 | 00 | 00 | 00 | 00 | .Commando....... |
0020 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | ................ |
0030 | 00 | 00 | 02 | 00 | 00 | 00 | 03 | 01 | 01 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | ................ |
0040 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | ................ |
0050 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | ................ |
0060 | 00 | 00 | 00 | 00 | 41 | 43 | 54 | 55 | 41 | 4c | 20 | 43 | 41 | 52 | 54 | 20 | ....ACTUAL CART |
0070 | 44 | 41 | 54 | 41 | 20 | 53 | 54 | 41 | 52 | 54 | 53 | 20 | 48 | 45 | 52 | 45 | DATA STARTS HERE |
color | purpose | size |
---|---|---|
header version | 1 byte | |
ATARI7800 magic-text | 16 bytes | |
cart title | 32 bytes | |
rom size without header | 4 bytes | |
cart type | 2 bytes | |
controller 1 type | 1 byte | |
controller 2 type | 1 byte | |
TV type | 1 byte | |
save device | 1 byte | |
reserved | ||
expansion module | 1 byte | |
header end magic-text | 28 bytes |
Adding an A78 Header to Source Code
To add an A78 header to your DASM source code, you can add or include the header at the start of your source, and adjust the fields to encode the hardware your game requires.
SEG ROM HEADER ORG ROMTOP-128 DC.B 1 ; 0 Header version - 1 byte DC.B "ATARI7800" ; 1..16 "ATARI7800 " - 16 bytes DS 7,32 DC.B "Your Name Here"; 17..48 Cart title - 32 bytes DS HEADER+49-.,0 DC.B $00,$00,256->ROMTOP,$00; 49..52 data length - 4 bytes DC.B $00,$00 ; 53..54 cart type - 2 bytes ; bit 0 - pokey at $4000 ; bit 1 - supergame bank switched ; bit 2 - supergame ram at $4000 ; bit 3 - rom at $4000 ; bit 4 - bank 6 at $4000 ; bit 5 - supergame banked ram ; bit 6 - pokey at $450 ; bit 8-15 - Special ; 0 = Normal cart DC.B 1 ; 55 controller 1 type - 1 byte DC.B 1 ; 56 controller 2 type - 1 byte ; 0 = None ; 1 = Joystick ; 2 = Light Gun DC.B 0 ; 57 0 = NTSC 1 = PAL DC.B 0 ; 58 Save data peripheral - 1 byte (version 2) ; 0 = None / unknown (default) ; 1 = High Score Cart (HSC) ; 2 = SaveKey ORG HEADER+63 DC.B 0 ; 63 Expansion module ; 0 = No expansion module (default on all currently released games) ; 1 = Expansion module required ORG HEADER+100 ; 100..127 "ACTUAL CART DATA STARTS HERE" - 28 bytes DC.B "ACTUAL CART DATA STARTS HERE" ROMTOP ORG $8000