Game Boy Color >> C/C++

Sound


參考資訊:
1. bgb
2. doc
3. gbdk_playground

暫存器



main.c

#include <gb/gb.h>
#include <gb/cgb.h>
#include <stdio.h>

void main(void)
{
    NR52_REG = 0x80;
    NR50_REG = 0x77;
    NR51_REG = 0xff;

    while (1) {
        NR10_REG = 0x16; 
        NR11_REG = 0x40;
        NR12_REG = 0x73;  
        NR13_REG = 0x00;   
        NR14_REG = 0xc3;
        delay(100);
    }
}


返回上一頁