Initial Commit

This commit is contained in:
2020-07-11 08:41:14 -05:00
parent 55c0f7f3cd
commit 1478a597cf
176 changed files with 11933 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
AS = lcc -c
CC = lcc -Wa-l -Wl-m
BIN = beep.gb
OBJS = beep.o
all: $(BIN)
%.s: %.ms
maccer -o $@ $<
$(BIN): $(OBJS)
$(CC) -o $(BIN) $(OBJS)
clean:
rm -rf $(BIN) $(OBJS) *~

View File

@@ -0,0 +1,6 @@
# Beep
![](screenshot.png)
Demonstrates how to play a simple SFX sound.

View File

@@ -0,0 +1,31 @@
#include <gb/gb.h>
#include <gb/drawing.h>
void main() {
NR50_REG = 0xFF;
NR51_REG = 0xFF;
NR52_REG = 0x80;
gotogxy(1, 1);
gprintf("====== Beep ======");
gotogxy(2, 3);
gprintf("Press any button");
while(1) {
UBYTE joypad_state = joypad();
if(joypad_state) {
NR10_REG = 0x38U;
NR11_REG = 0x70U;
NR12_REG = 0xE0U;
NR13_REG = 0x0AU;
NR14_REG = 0xC6U;
NR51_REG |= 0x11;
delay(200);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB