From 217b5f88f387acd2e77328a9a95057e55626a4ec Mon Sep 17 00:00:00 2001 From: neauoire Date: Wed, 24 Mar 2021 11:14:41 -0700 Subject: [PATCH] Started audio device --- projects/software/noodle.usm | 1 + src/emulator.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/software/noodle.usm b/projects/software/noodle.usm index 70de073..78dd612 100644 --- a/projects/software/noodle.usm +++ b/projects/software/noodle.usm @@ -19,6 +19,7 @@ - [tool] fill rect - [tool] spray - [tool] pen + - [tool] line ) %RTN { JMP2r } diff --git a/src/emulator.c b/src/emulator.c index 533cc30..a58aa81 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -401,6 +401,14 @@ file_poke(Uxn *u, Uint16 ptr, Uint8 b0, Uint8 b1) return b1; } +Uint8 +audio_poke(Uxn *u, Uint16 ptr, Uint8 b0, Uint8 b1) +{ + (void)u; + printf("%04x - %02x,%02x\n", ptr, b0, b1); + return b1; +} + Uint8 system_poke(Uxn *u, Uint16 ptr, Uint8 b0, Uint8 b1) { @@ -478,7 +486,7 @@ main(int argc, char **argv) devkey = portuxn(&u, "key", ppnil); devmouse = portuxn(&u, "mouse", ppnil); portuxn(&u, "file", file_poke); - portuxn(&u, "empty", ppnil); + portuxn(&u, "audio", audio_poke); portuxn(&u, "empty", ppnil); portuxn(&u, "empty", ppnil); portuxn(&u, "empty", ppnil);