]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/opl3
add games/dmid and games/opl3
[plan9front.git] / sys / man / 1 / opl3
1 .TH OPL3 1
2 .SH NAME
3 opl3 \- OPL3 chip emulator
4 .SH SYNOPSIS
5 .B opl3
6 [
7 .B -n
8 .I rate
9 ] [
10 .I file
11 ]
12 .SH DESCRIPTION
13 .I Opl3
14 is an emulator of a single Yamaha 262 chip, also known as
15 .SM OPL3.
16 .PP
17 The emulated chip is programmed by a stream of commands either from
18 .I file
19 or from standard in.
20 It then synthesizes a number of stereo 16 bit little-endian samples for a sampling rate of 44.1 kHz,
21 and writes them to standard out.
22 .PP
23 Commands are 5 bytes wide, in little-endian byte order:
24 .PP
25 .RS
26 .IR register [2]
27 .IR value [1]
28 .IR delay [2]
29 .RE
30 .PP
31 Each command specifies a
32 .I value
33 to be written to an
34 .SM OPL3
35 chip
36 .IR register ,
37 modifying its internal state.
38 .PP
39 The
40 .I delay
41 field provides timing.
42 It is a multiple of a command period, during which the
43 .SM OPL3
44 chip may be sampled before processing the next command.
45 The period itself is the inverse of the command rate, 44100 Hz by default.
46 This rate can be set using the
47 .B -n
48 parameter.
49 .SH SOURCE
50 .B /sys/src/games/opl3
51 .SH "SEE ALSO"
52 .IR audio (3)
53 .SH HISTORY
54 .I Opl3
55 first appeared in 9front (July, 2018), based on
56 .I ymf262.c
57 from the Multiple Arcade Machine Emulator (
58 .SM MAME
59 ).