head	1.1;
access;
symbols
	netbsd-11-0-RC4:1.1
	netbsd-11-0-RC3:1.1
	netbsd-11-0-RC2:1.1
	netbsd-11-0-RC1:1.1
	perseant-exfatfs-base-20250801:1.1
	netbsd-11:1.1.0.12
	netbsd-11-base:1.1
	netbsd-10-1-RELEASE:1.1
	perseant-exfatfs-base-20240630:1.1
	perseant-exfatfs:1.1.0.10
	perseant-exfatfs-base:1.1
	netbsd-10-0-RELEASE:1.1
	netbsd-10-0-RC6:1.1
	netbsd-10-0-RC5:1.1
	netbsd-10-0-RC4:1.1
	netbsd-10-0-RC3:1.1
	netbsd-10-0-RC2:1.1
	thorpej-ifq:1.1.0.8
	thorpej-ifq-base:1.1
	thorpej-altq-separation:1.1.0.6
	thorpej-altq-separation-base:1.1
	netbsd-10-0-RC1:1.1
	netbsd-10:1.1.0.4
	netbsd-10-base:1.1
	bouyer-sunxi-drm:1.1.0.2
	bouyer-sunxi-drm-base:1.1;
locks; strict;
comment	@# @;


1.1
date	2022.06.10.21.42.24;	author tsutsui;	state Exp;
branches;
next	;
commitid	3RhWl9CpTnKLyxHD;


desc
@@


1.1
log
@luna68k: add psgpam(4) audio for LUNA, using YM2149 PSG/SSG sound chip.

"PSG PAM" is a audio driver using "Pulse Amplitude Modulation" with the
YM2149 PSG/SSG chip connected to the I/O processor HD647180X on LUNA.
The driver plays up to 30 kHz PCM audio by manipulating PSG channel volumes
at extremely high speed with 6.144 MHz HD647180X, a Z80 compatible sub CPU.
 https://www.youtube.com/watch?v=fR7PqaLpijQ
 https://www.youtube.com/watch?v=kCDZCgkwgBA

Compatibilities with the existing XPIOCDOWNLD ioctl(2) to download and
exec user programs (PSG sound driver player ported from PC-6001 etc.)
on the HD647180X is still provided.
 https://twitter.com/tsutsuii/status/1533247362965315584

This psgpam(4) driver for NetBSD/luna68k was written by @@moveccr
during isaki-audio2 branch developments, and it was also demonstrated
at Open Source Conference 2018 Kyoto:
 https://github.com/isaki68k/netbsd-src/tree/audio2
 https://mail-index.netbsd.org/netbsd-advocacy/2018/08/07/msg000781.html
 https://twitter.com/tsutsuii/status/1025504875625365505

Note specifications of interrupts from the HD647180X to the host LUNA
was confirmed by Kenji Aoyama on his LUNA-88K2 running OpenBSD/luna88k.

I would like to thank all people still working on ancient LUNA machines!
@
text
@
#### xplx

TOOL_AWK?=	awk
TOOL_HEXDUMP?=	hexdump

ZASM?=	zasm	# see "used language" comments in xplx.asm

.PHONY: all
all: xplx.inc xplxdefs.h # xplxfirm.o

xplx.rom xplx.lst: xplx.asm
	${ZASM} -uwy xplx.asm || (rm -f xplx.rom xplx.lst ; exit 1)

xplx.inc: xplx.rom
	${TOOL_HEXDUMP} -Cv xplx.rom | ${TOOL_AWK} -f cdump.awk > ${.TARGET}.tmp
	mv ${.TARGET}.tmp ${.TARGET}

xplxfirm.o: ../xplxfirm.c xplx.inc
	${CC} ${CFLAGS} -c ../xplxfirm.c -o ${.TARGET}

xplxdefs.h: mkdefs.awk xplx.lst
	${TOOL_AWK} -f mkdefs.awk < xplx.lst > ${.TARGET}.tmp
	mv ${.TARGET}.tmp ${.TARGET}

.PHONY:	clean
clean:
	rm -f xplxfirm.o xplx.rom xplx.lst xplx.inc
	rm -f *.tmp
@
