Game Boy Color >> Assembly

Minimal


參考資訊:
1. bgb
2. rgbds
3. gambatte
4. DMGreport

0x143位置決定是否為GBC ROM


main.s

section "vblank", rom0[$0040]
    reti

section "lcdc", rom0[$0048]
    reti

section "timer", rom0[$0050]
    reti

section "serial", rom0[$0058]
    reti

section "joypad", rom0[$0060]
    reti

section "entry", rom0[$0100]
    nop
    jp _start

section "header", rom0[$0104]
    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
    db "0123456789abcde"
    db $80
    db 0, 0
    db 0
    db 0
    db 0
    db 0
    db 1
    db $33
    db 0
    db 0
    dw 0
 
_start:
    jp @

一個精簡的程式框架

編譯

$ rgbasm -o main.o main.s
$ rgblink -o main.gb main.o
$ rgbfix -v -p0 main.gb

執行bgb.exe,然後在bgb視窗上,按滑鼠右鍵,選擇Load ROM...,載入main.gb


在bgb視窗上按滑鼠右鍵,選擇Other > VRAM Viewer

GBC預設也是載入GB使用的Nintendo字串,只是預設沒有顯示


返回上一頁