From 4a9b13126b5306003f427ac26bde551374bab4bc Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 2 Dec 2024 09:04:21 +0100 Subject: [PATCH] - Push de rigor --- Makefile | 2 +- zx_ula.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a4254bb..d3c768f 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,4 @@ run: compile ./z80 debug: compile - gdb z80 + gdb -ex run z80 diff --git a/zx_ula.cpp b/zx_ula.cpp index 5b3d25b..e7b764d 100644 --- a/zx_ula.cpp +++ b/zx_ula.cpp @@ -57,6 +57,9 @@ namespace zx_ula static uint8_t ear = 0; static uint8_t mic = 0; + // this variable keeps track of the last "1" written to the sound buffer, so when streaming it in the audio callback, if there + // are only zeros remaining in the buffer, we just discard it. It's a poor man's method of keeping the buffer size in control. + // This is useless when there are music, sounds, tape loading, etc... as 1's and 0's keep alternating static uint16_t last_1 = 0; void update_zx_keyboard()