File: sameboot.inc

package info (click to toggle)
sameboy 1.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 10,528 kB
  • sloc: ansic: 29,948; objc: 22,249; asm: 1,424; pascal: 1,373; makefile: 1,065; xml: 111
file content (40 lines) | stat: -rw-r--r-- 1,026 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
IF !DEF(SAMEBOY_INC)
DEF SAMEBOY_INC EQU 1

include "hardware.inc"

DEF rKEY0 EQU $FF4C
DEF rBANK EQU $FF50

DEF rJOYP EQU rP1


MACRO lb ; r16, high, low
    ld \1, LOW(\2) << 8 | LOW(\3)
ENDM


MACRO header_section ; name, address
    PUSHS
    SECTION "\1", ROM0[\2]
    \1:
    POPS
ENDM
    header_section EntryPoint,       $0100
    header_section NintendoLogo,     $0104
    header_section NintendoLogoEnd,  $0134
    header_section Title,            $0134
    header_section ManufacturerCode, $013F
    header_section CGBFlag,          $0143
    header_section NewLicenseeCode,  $0144
    header_section SGBFlag,          $0146
    header_section CartridgeType,    $0147
    header_section ROMSize,          $0148
    header_section RAMSize,          $0149
    header_section DestinationCode,  $014A
    header_section OldLicenseeCode,  $014B
    header_section MaskRomVersion,   $014C
    header_section HeaderChecksum,   $014D
    header_section GlobalChecksum,   $014E

ENDC