Debian Codegraph @

android/app/jni/extern/vgsound_emu-modified/vgsound_emu/src/k007232/README.md

raw
1 # Konami K007232
2
3 ## Summary
4
5 - 2 voice PCM
6 - 7 bit unsigned, with end marker
7 - total accessible memory: 128 Kbyte per bank
8 - Per-voice bankswitchable via E clock
9 - External 8 bit I/O (usually for volume)
10
11 ## Source code
12
13 - k007232.hpp: Base header
14 - k007232.cpp: Source emulation core
15
16 ## Description
17
18 It's Konami's one of custom PCM sound chip, Used at their arcade hardware at mid-80s to early-90s.
19
20 It has 2 channel of PCM, these are has its own output pins...just 7 LSB of currently fetched data.
21
22 PCM Sample format is unique, 1 MSB is end marker and 7 LSB is actually output. (unsigned format)
23
24 The chip itself is DACless, so Sound output and mixing control needs external logics and sound DAC.
25
26 ## Register layout
27
28 ```
29 Address Bits R/W Description
30 7654 3210
31
32 0x0 xxxx xxxx W Channel 0 Pitch bit 0-7
33 0x1 --x- ---- W Channel 0 4 bit Frequency mode
34 ---x ---- W Channel 0 8 bit Frequency mode
35 ---- xxxx W Channel 0 Pitch bit 8-11
36
37 0x2 xxxx xxxx W Channel 0 Start address bit 0-7
38 0x3 xxxx xxxx W Channel 0 Start address bit 8-15
39 0x4 ---- ---x W Channel 0 Start address bit 16
40
41 0x5 R/W Channel 0 Key on trigger (R/W)
42
43 0x6 xxxx xxxx W Channel 1 Pitch bit 0-7
44 0x7 --x- ---- W Channel 1 4 bit Frequency mode
45 ---x ---- W Channel 1 8 bit Frequency mode
46 ---- xxxx W Channel 1 Pitch bit 8-11
47
48 0x8 xxxx xxxx W Channel 1 Start address bit 0-7
49 0x9 xxxx xxxx W Channel 1 Start address bit 8-15
50 0xa ---- ---x W Channel 1 Start address bit 16
51
52 0xb R/W Channel 1 Key on trigger (R/W)
53
54 0xc xxxx xxxx W External port write (w/SLEV pin, Usually for volume control)
55
56 0xd ---- --x- W Channel 1 Loop enable
57 ---- ---x W Channel 0 Loop enable
58 ```
59
60 ## Frequency calculation
61
62 (Guesswork in 8/4 bit Frequency mode)
63
64 ```
65 if 8 bit Frequency mode then
66 Frequency: Input clock / 4 * (256 - (Pitch bit 0 - 7))
67 else if 4 bit Frequency mode then
68 Frequency: Input clock / 4 * (16 - (Pitch bit 8 - 11))
69 else
70 Frequency: Input clock / 4 * (4096 - (Pitch bit 0 - 11))
71 ```
72
73 ## Reference
74
75 <https://github.com/furrtek/VGChips/tree/master/Konami/007232>