Debian Codegraph @

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

raw
1 # Konami K053260
2
3 ## Summary
4
5 - 4 voice DPCM or PCM
6 - 8 bit signed PCM or 4 bit DPCM (unique type)
7 - total accessible memory: 2 MByte, 64 KByte per sample
8 - CPU to CPU Communication
9 - CPU can be accessible k053260 memory through voice register
10 - 2 Stereo sound input, 1 Stereo output (YM3012 DAC compatible)
11
12 ## Source code
13
14 - k053260.hpp: Base header
15 - k053260.cpp: Source emulation core
16
17 ## Description
18
19 It's one of Konami's custom PCM playback chip with CPU to CPU communication feature, and built in timer.
20
21 It's architecture is successed from K007232, but it features various enhancements:
22
23 it's expanded to 4 channels, Supports more memory space, 4 bit DPCM, Built in volume and stereo panning support, and Dual chip configurations.
24
25 There's 2 stereo inputs and single stereo output, Both format is YM3012 compatible.
26
27 ## Register layout
28
29 ```
30 Address Bits R/W Description
31 7654 3210
32
33 00...03 Communication Registers
34
35 00 xxxx xxxx R Answer from host CPU LSB
36 01 xxxx xxxx R Answer from host CPU MSB
37
38 02 xxxx xxxx W Reply to host CPU LSB
39 03 xxxx xxxx W Reply to host CPU MSB
40
41 08...0f Voice 0 Register
42
43 08 xxxx xxxx W Pitch bit 0-7
44 09 ---- xxxx W Pitch bit 8-11
45
46 0a xxxx xxxx W Source length bit 0-7 (byte wide)
47 0b xxxx xxxx W Source length bit 8-15 (byte wide)
48
49 0c xxxx xxxx W Start address/ROM readback base bit 0-7
50 0d xxxx xxxx W Start address/ROM readback base bit 8-15
51 0e ---x xxxx W Start address/ROM readback base bit 16-20
52
53 0f -xxx xxxx W Volume
54
55 10...17 Voice 1 Register
56 18...1f Voice 2 Register
57 20...27 Voice 3 Register
58
59 28 ---- x--- W Voice 3 Key on/off trigger
60 ---- -x-- W Voice 2 Key on/off trigger
61 ---- --x- W Voice 1 Key on/off trigger
62 ---- ---x W Voice 0 Key on/off trigger
63
64 29 ---- x--- R Voice 3 busy
65 ---- -x-- R Voice 2 busy
66 ---- --x- R Voice 1 busy
67 ---- ---x R Voice 0 busy
68
69 2a x--- ---- W Voice 3 source format
70 0--- ---- 8 bit signed PCM
71 1--- ---- 4 bit ADPCM
72 -x-- ---- W Voice 2 source format
73 --x- ---- W Voice 1 source format
74 ---x ---- W Voice 0 source format
75
76 ---- x--- W Voice 3 Loop enable
77 ---- -x-- W Voice 2 Loop enable
78 ---- --x- W Voice 1 Loop enable
79 ---- ---x W Voice 0 Loop enable
80
81 2c --xx x--- W Voice 1 Pan angle in degrees*1
82 --00 0--- Mute
83 --00 1--- 0 degrees
84 --01 0--- 24 degrees
85 --01 1--- 35 degrees
86 --10 0--- 45 degrees
87 --10 1--- 55 degrees
88 --11 0--- 66 degrees
89 --11 1--- 90 degrees
90 ---- -xxx W Voice 0 Pan angle in degrees*1
91
92 2d --xx x--- W Voice 3 Pan angle in degrees*1
93 ---- -xxx W Voice 2 Pan angle in degrees*1
94
95 2e xxxx xxxx R ROM readback (use Voice 0 register)
96
97 2f ---- x--- W AUX2 input enable
98 ---- -x-- W AUX1 input enable
99 ---- --x- W Sound enable
100 ---- ---x W ROM readbank enable
101
102 *1 Actually fomula unknown, Use floating point type until explained that.
103 ```
104
105 ## Frequency calculation
106
107 ```
108 Frequency: Input clock / (4096 - Pitch)
109 ```