68k program header: Difference between revisions
Jump to navigation
Jump to search
m (26 revisions: Import from wikkii) |
m (Renaming according to official doc) |
||
| Line 3: | Line 3: | ||
== For cartridge systems == | == For cartridge systems == | ||
{|class="regdef" | |||
|'''Address''' | |||
|'''Size''' | |||
|'''Description''' | |||
|- | |||
|$100 | |||
|8 bytes | |||
|"NEO-GEO",$00 string (first cartridge recognition code) | |||
|- | |||
|$107 | |||
|byte | |||
|System version (0) | |||
|- | |||
|$108 | |||
|word | |||
|[[NGH number]] | |||
|- | |||
|$10A | |||
|longword | |||
|Program size in bytes | |||
|- | |||
|$10E | |||
|longword | |||
|Pointer to start of debug/software DIPs (in [[user RAM]]) | |||
|- | |||
|$112 | |||
|word | |||
|Size of the debug/software DIP settings | |||
|- | |||
|$114 | |||
|byte | |||
|Boot logo flag. 0=Done by BIOS, 1=Done by game, 2=Nothing | |||
|- | |||
|$115 | |||
|byte | |||
|Sprite bank number (upper 8 bits of tile number) for the boot logo, if done by BIOS | |||
|- | |||
|$116 | |||
|longword | |||
|Pointer to Japanese [[Software_DIPs|software DIPs settings layout]] | |||
|- | |||
|$11A | |||
|longword | |||
|Pointer to US settings software DIPs settings layout | |||
|- | |||
|$11E | |||
|longword | |||
|Pointer to Euro settings software DIPs settings layout | |||
|- | |||
|$122 | |||
|6 bytes | |||
|JMP to [[USER subroutine]] (code start) | |||
|- | |||
|$128 | |||
|6 bytes | |||
|JMP to [[PLAYER_START subroutine]] | |||
|- | |||
|$12E | |||
|6 bytes | |||
|JMP to [[DEMO_END subroutine]] | |||
|- | |||
|$134 | |||
|6 bytes | |||
|JMP to [[COIN_SOUND subroutine]] | |||
|- | |||
|$182 | |||
|longword | |||
|Pointer to [[security code]] (second cartridge recognition code) | |||
|} | |||
===Minimal header (from [[User:Smkdan|Smkdan's]] sources)=== | ===Minimal header (from [[User:Smkdan|Smkdan's]] sources)=== | ||
| Line 60: | Line 115: | ||
dc.w $0052 ;NGH | dc.w $0052 ;NGH | ||
dc.l $00080000 ;ROM | dc.l $00080000 ;P ROM size | ||
dc.l $00100000 ;debug DIPs pointer | dc.l $00100000 ;debug DIPs pointer | ||
dc.w $01 ; | dc.w $01 ;size of DIP data | ||
dc.b $00 ; | dc.b $00 ;let the BIOS show the logo | ||
dc.b $1B ;first tile | dc.b $1B ;first tile of the logo is $1B00 | ||
dc.l JPConfig ;Japanese config menu pointer | dc.l JPConfig ;Japanese config menu pointer | ||
dc.l USConfig ;US config menu pointer | dc.l USConfig ;US config menu pointer | ||
| Line 70: | Line 125: | ||
jmp Start | jmp Start | ||
jmp Start | jmp Start | ||
jmp Start | jmp Start | ||
jmp Start | jmp Start | ||
org $0182 | org $0182 | ||
| Line 131: | Line 186: | ||
<pre> | <pre> | ||
org $100 | org $100 | ||
dc.b "NEO-GEO", $02 | dc.b "NEO-GEO",$02 ;CDDA flag | ||
dc.w $ | dc.w $0052 ;NGH | ||
dc.l $ | dc.l $00080000 ;P ROM size | ||
dc.l $ | dc.l $00100000 ;debug DIPs pointer | ||
dc.w $ | dc.w $01 ;size of DIP data | ||
dc. | dc.b $00 ;let the BIOS show the logo | ||
dc.b $1B ;first tile of the logo is $1B00 | |||
dc.l JPConfig ;Japanese config menu pointer | |||
dc.l USConfig ;US config menu pointer | |||
dc.l EUConfig ;European config menu pointer | |||
org $122 | org $122 | ||
jmp Start | jmp Start | ||
org $13A | org $13A | ||
dc.w $0000 ;Z80 RAM address for CDDA commands | dc.w $0000 ;Z80 RAM address for CDDA commands | ||
</pre> | </pre> | ||
[[Category:Base system]] | [[Category:Base system]] | ||
[[Category:Code]] | [[Category:Code]] | ||
Revision as of 04:51, 28 June 2011
ASM ROM header templates.
For cartridge systems
| Address | Size | Description |
| $100 | 8 bytes | "NEO-GEO",$00 string (first cartridge recognition code) |
| $107 | byte | System version (0) |
| $108 | word | NGH number |
| $10A | longword | Program size in bytes |
| $10E | longword | Pointer to start of debug/software DIPs (in user RAM) |
| $112 | word | Size of the debug/software DIP settings |
| $114 | byte | Boot logo flag. 0=Done by BIOS, 1=Done by game, 2=Nothing |
| $115 | byte | Sprite bank number (upper 8 bits of tile number) for the boot logo, if done by BIOS |
| $116 | longword | Pointer to Japanese software DIPs settings layout |
| $11A | longword | Pointer to US settings software DIPs settings layout |
| $11E | longword | Pointer to Euro settings software DIPs settings layout |
| $122 | 6 bytes | JMP to USER subroutine (code start) |
| $128 | 6 bytes | JMP to PLAYER_START subroutine |
| $12E | 6 bytes | JMP to DEMO_END subroutine |
| $134 | 6 bytes | JMP to COIN_SOUND subroutine |
| $182 | longword | Pointer to security code (second cartridge recognition code) |
Minimal header (from Smkdan's sources)
No need for a complete 68k vector table.
org $0064 dc.l VBLANK ;IRQ handler org $0100 dc.b "NEO-GEO",$00 org $0108 dc.w $017 ;NGH org $0122 jmp Start ;entry org $0114 dc.w $0100 ;logo flag, don't show it just go straight to the entry point org $0182 dc.l Code ;code pointer Code: dc.l $76004A6D,$0A146600,$003C206D,$0A043E2D dc.l $0A0813C0,$00300001,$32100C01,$00FF671A dc.l $30280002,$B02D0ACE,$66103028,$0004B02D dc.l $0ACF6606,$B22D0AD0,$67085088,$51CFFFD4 dc.l $36074E75,$206D0A04,$3E2D0A08,$3210E049 dc.l $0C0100FF,$671A3010,$B02D0ACE,$66123028 dc.l $0002E048,$B02D0ACF,$6606B22D,$0AD06708 dc.l $588851CF,$FFD83607 dc.w $4e75
Full header (from some unknown example code)
org $0100
dc.b "NEO-GEO",$00
dc.w $0052 ;NGH
dc.l $00080000 ;P ROM size
dc.l $00100000 ;debug DIPs pointer
dc.w $01 ;size of DIP data
dc.b $00 ;let the BIOS show the logo
dc.b $1B ;first tile of the logo is $1B00
dc.l JPConfig ;Japanese config menu pointer
dc.l USConfig ;US config menu pointer
dc.l EUConfig ;European config menu pointer
jmp Start
jmp Start
jmp Start
jmp Start
org $0182
dc.l Code ;code pointer
Code:
dc.l $76004A6D,$0A146600,$003C206D,$0A043E2D
dc.l $0A0813C0,$00300001,$32100C01,$00FF671A
dc.l $30280002,$B02D0ACE,$66103028,$0004B02D
dc.l $0ACF6606,$B22D0AD0,$67085088,$51CFFFD4
dc.l $36074E75,$206D0A04,$3E2D0A08,$3210E049
dc.l $0C0100FF,$671A3010,$B02D0ACE,$66123028
dc.l $0002E048,$B02D0ACF,$6606B22D,$0AD06708
dc.l $588851CF,$FFD83607
dc.w $4e75
; Configuration menu layouts (soft DIPs)
JPConfig:
dc.b "0123456789ABCDEF" ; Game name
dc.b $FF,$FF,$FF,$FF,$FF,$FF ; Special list
dc.b $24,$02,$00,$00,$00,$00,$00,$00,$00,$00 ; Option list
dc.b "LIVES "
dc.b "1 "
dc.b "2 "
dc.b "3 "
dc.b "4 "
dc.b "HOW TO PLAY "
dc.b "WITH "
dc.b "WITHOUT "
USConfig:
dc.b "0123456789ABCDEF" ; Game name
dc.b $FF,$FF,$FF,$FF,$FF,$FF ; Special list
dc.b $24,$02,$00,$00,$00,$00,$00,$00,$00,$00 ; Option list
dc.b "LIVES "
dc.b "1 "
dc.b "2 "
dc.b "3 "
dc.b "4 "
dc.b "HOW TO PLAY "
dc.b "WITH "
dc.b "WITHOUT "
EUConfig:
dc.b "0123456789ABCDEF" ; Game name
dc.b $FF,$FF,$FF,$FF,$FF,$FF ; Special list
dc.b $24,$02,$00,$00,$00,$00,$00,$00,$00,$00 ; Option list
dc.b "LIVES "
dc.b "1 "
dc.b "2 "
dc.b "3 "
dc.b "4 "
dc.b "HOW TO PLAY "
dc.b "WITH "
dc.b "WITHOUT "
For CD systems
org $100
dc.b "NEO-GEO",$02 ;CDDA flag
dc.w $0052 ;NGH
dc.l $00080000 ;P ROM size
dc.l $00100000 ;debug DIPs pointer
dc.w $01 ;size of DIP data
dc.b $00 ;let the BIOS show the logo
dc.b $1B ;first tile of the logo is $1B00
dc.l JPConfig ;Japanese config menu pointer
dc.l USConfig ;US config menu pointer
dc.l EUConfig ;European config menu pointer
org $122
jmp Start
org $13A
dc.w $0000 ;Z80 RAM address for CDDA commands