Publish VCC Plus OSS source distribution for 3.6.2 build 60

This commit is contained in:
Brian Holman committed 2026-11-13 00:14:03 -07:00
commit c652a5276d
1192 files changed
+272368

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include <vcc/orch90.h>
unsigned char orch90_play(const struct orch90_frame *frames, unsigned int count,
unsigned char clock)
{
unsigned int savedY;
unsigned char delay;
if (clock != ORCH90_CLOCK_NORMAL && clock != ORCH90_CLOCK_FAST)
return 0;
if (count == 0)
return 1;
// For a non-null 16-bit address, unsigned negation counts the remaining
// bytes up to and including $FFFF. Each sample frame requires two.
if (!frames || count > (0u - (unsigned int)frames) / sizeof(*frames))
return 0;
delay = clock == ORCH90_CLOCK_NORMAL ? 39 : 84;
asm {
ldx :frames
sty :savedY
ldy :count
@frame
ldd ,x++ // One interleaved left/right pair.
std >$ff7a
ldb :delay
@wait
decb
bne @wait
leay -1,y
bne @frame
ldy :savedY
}
return 1;
}