cleaned up header

This commit is contained in:
tA 2020-05-25 17:10:59 +12:00
parent c4ccba52d2
commit fa65a2b0b2
4 changed files with 17 additions and 43 deletions

View file

@ -11,7 +11,16 @@ ROM_OUTPUT=${BUILD}/${NAME}.gb
OBJECT_OUTPUT=${BUILD}/${NAME}.o OBJECT_OUTPUT=${BUILD}/${NAME}.o
SYMFILE_OUTPUT=${BUILD}/${NAME}.sym SYMFILE_OUTPUT=${BUILD}/${NAME}.sym
LICENSEE="tA"
OLDLIC="0x33"
MBC="0x00"
VERSION="0"
PAD="0xFF"
RAM="0x00"
PP_FLAGS=-c -f lhg -j -t ${NAME} -k ${LICENSEE} -l ${OLDLIC} -m ${MBC} -n ${VERSION} -p ${PAD} -r ${RAM}
all : ${ENTRY} all : ${ENTRY}
${ASSEMBLER} -o ${OBJECT_OUTPUT} ${ENTRY} \ ${ASSEMBLER} -o ${OBJECT_OUTPUT} ${ENTRY} \
&& ${LINKER} -o ${ROM_OUTPUT} -n ${SYMFILE_OUTPUT} ${OBJECT_OUTPUT} \ && ${LINKER} -o ${ROM_OUTPUT} -n ${SYMFILE_OUTPUT} ${OBJECT_OUTPUT} \
&& ${POSTPROC} -v -p 0 ${ROM_OUTPUT} && ${POSTPROC} -v ${PP_FLAGS} ${ROM_OUTPUT}

View file

@ -6,9 +6,9 @@ INCLUDE "src/actor.asm"
SECTION "Program Start", ROM0[$150] SECTION "Program Start", ROM0[$150]
Start: Start:
ei
ld a, IEF_VBLANK ld a, IEF_VBLANK
ld [rIE], a ld [rIE], a
ei
xor a xor a
ld [hVBlankFlag], a ld [hVBlankFlag], a
call Wait_VBlank call Wait_VBlank
@ -21,6 +21,7 @@ Start:
ld a, %11100100 ld a, %11100100
ld [rBGP], a ld [rBGP], a
ld [rOBP0], a ld [rOBP0], a
ld [rOBP1], a
xor a xor a
ld [rSCY], a ld [rSCY], a
ld [rSCX], a ld [rSCX], a

View file

@ -2,44 +2,9 @@
; Gameboy Header ; Gameboy Header
;----------------- ;-----------------
SECTION "Header", ROM0[$100] SECTION "Entry", ROM0[$100]
di
; Jump to the "Start" label
; which we must define ourselves
EntryPoint:
nop
jp Start; jp Start;
; ROM Header $104 to $150 ; Reserve space for header
RomHeader: ds $150 - @, 0
; Nintendo Logo $104-$133
db $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D
db $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99
db $BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E
; Title (11 characters) $134-$13E
db "ANIMATION",$00,$00
; Manufacturer Code (4 characters) $13F-$142
db "LATA"
; CGB Flag $143
db $00
; Licensee Code (2 characters) $144-$145
db "00"
; SGB Flag $146
db $00
; Cartridge Type $147
db $00
; ROM Size $148
db $00
; RAM Size $149
db $00
; Destination Code $14A
db $01
; Depreciated Licensee Code $14B
db $33
; Version Number $14C
db $00
; Header Checksum $14D
db $00
; Global Checksum $14E-$14F
db $00, $00

View file

@ -49,7 +49,7 @@ Clear_OAM:
Hide_OAM: Hide_OAM:
ld hl, wShadowOAM ld hl, wShadowOAM
ld c, wShadowOAMEnd - wShadowOAM ld c, (wShadowOAMEnd - wShadowOAM) / 4
.loop: .loop:
xor a xor a
ld [hl], a ld [hl], a
@ -91,4 +91,3 @@ Load_Map:
call MemCpy call MemCpy
ret ret