git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

BootROMs/sameboot.inc

      1 IF !DEF(SAMEBOY_INC)
      2 DEF SAMEBOY_INC EQU 1
      3 
      4 include "hardware.inc"
      5 
      6 DEF rKEY0 EQU $FF4C
      7 DEF rBANK EQU $FF50
      8 
      9 DEF rJOYP EQU rP1
     10 
     11 
     12 MACRO lb ; r16, high, low
     13     ld \1, LOW(\2) << 8 | LOW(\3)
     14 ENDM
     15 
     16 
     17 MACRO header_section ; name, address
     18     PUSHS
     19     SECTION "\1", ROM0[\2]
     20     \1:
     21     POPS
     22 ENDM
     23     header_section EntryPoint,       $0100
     24     header_section NintendoLogo,     $0104
     25     header_section NintendoLogoEnd,  $0134
     26     header_section Title,            $0134
     27     header_section ManufacturerCode, $013F
     28     header_section CGBFlag,          $0143
     29     header_section NewLicenseeCode,  $0144
     30     header_section SGBFlag,          $0146
     31     header_section CartridgeType,    $0147
     32     header_section ROMSize,          $0148
     33     header_section RAMSize,          $0149
     34     header_section DestinationCode,  $014A
     35     header_section OldLicenseeCode,  $014B
     36     header_section MaskRomVersion,   $014C
     37     header_section HeaderChecksum,   $014D
     38     header_section GlobalChecksum,   $014E
     39 
     40 ENDC

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.