initial fce ultra 0.81 import
[fceu.git] / Documentation / tech / exp / mmc5-e.txt
CommitLineData
c62d2810 1========= mmc5 infomation ==========
2date 1998/05/31
3by goroh
4translated May 31, 1998 by Sgt. Bowhack
5mail goroh_kun@geocities.co.jp
6
75000,5004 ch1,ch2 Pulse Control
8 bit CCwevvvv
9 CC Duty Cycle (Positive vs. Negative)
10 #0:87.5% #1:75.0% #2:50.0% #3:25.0%
11 w Waveform Hold (e.g. Looping)
12 0: Off 1: On
13 e Envelope Select
14 0: Varied 1: Fixed
15 < e=0 >
16 vvvv Playback Rate
17 #0<-fast<--->-slow--> #15
18 < e=1 >
19 vvvv Output Volume
20
215002,5006 ch1,ch2 frequency L
22 bit ffffffff
235003,5007 ch1,ch2 frequency H
24 bit tttttfff
25 ttttt sound occurence time
26
27Objective is to remove the continuous changing of frequency for
28square wave setup and do the same to the main part of the square wave
29of studying the main part of the famicom. (?- Sgt. Bowhack)
30
315010 ch3 synthetic voice business channel
32 bit -------O
33 O wave output 0:Off 1:On
34
355011 ch4 synthetic voice business channel 2
36 bit vvvvvvvv
37 vvvvvvvv wave size
38
395015 sound output channel
40 bit ------BA
41 A: ch1 output 1:enable 0:disable
42 B: ch2 output 1:enable 0:disable
43
445100 PRG-page size Setting
45 bit ------SS
46 SS PRG-page size
47 0: 32k 1:16k 2,3:8k
48* Reset is misled the first times for about 8k (?- SB)
49
505101 CHR-page size Setting
51 bit ------SS
52 SS CHR-page size
53 0:8k 1:4k 2:2k 3:1k
54
555102 W BBR-RAM Write Protect 1
56 bit ------AA
575103 W BBR-RAM Write Protect 2
58 bit ------BB
59 (AA,BB) = (2,1) permitted to write to BBR-RAM only when crowded
60*Reset write around becomes prohibited when crowded
61
625104 Grafix Mode Setting
63 $5c00-$5fff decides how it should be used
64 bit ------MM
65 #00:Enable only Split Mode
66 #01:Enable Split Mode & ExGrafix Mode
67 #02:ExRAM Mode
68 #03:ExRAM Mode & Write Protect
69
70Consideration
71 MMC5 has 2 graphic mode extensions that allow more than 256 characters
72on one standard game screen. It uses Split Mode so it can display the
73specified CHR-page and scroll position seperate from ExGrafix Mode to
74be able to choose a palette, and the other divides it vertically.
75
765105 W NameTable Setting
77 bit ddccbbaa
78 aa: Select VRAM at 0x2000-0x23ff
79 bb: Select VRAM at 0x2400-0x27ff
80 cc: Select VRAM at 0x2800-0x2bff
81 dd: Select VRAM at 0x2c00-0x2fff
82 #0:use VRAM 0x000-0x3ff
83 #1:use VRAM 0x400-0x7ff
84 #2:use ExVRAM 0x000-0x3ff
85 #3:use ExNameTable(Fill Mode)
86
87Consideration
88 The name table can designate 4 kinds of this resister and be a useful
89special quality for this because painting and smashing it with a
90character that there is 1 sheet for the remaining sheets can generally
91be used. (?-SB)
92
935106 W Fill Mode Setting 1
94 bit vvvvvvvv
95 Fill chr-table
96 For whether it paints or smashes it at any non-designated character
97
985107 W Fill Mode Setting 2
99 bit ------pp
100 Whether or not it uses any non-designated palettes
101
1025113 RAM-page for $6000-$7FFF
103 bit -----p--
104
1055114-5117 Program Bank switch
106 < page_size=32k >
107 $5117 [8]-[F] bit pppppp--
108
109 < page_size=16k >
110 $5115 [8]-[B] bit ppppppp-
111 $5117 [C]-[F] bit ppppppp-
112
113 < page_size=8k >
114 $5114 [8][9] bit pppppppp
115 $5115 [A][B] bit pppppppp
116 $5116 [C][D] bit pppppppp
117 $5117* [E][F] bit pppppppp
118
119*Reset is around early, Last Page misled
120
1215120-512b Charactor Bank switch
122 < page_size=8k >
123 $5120-$5127 switch to mode A
124 $5128-$512b switch to mode B
125 $5127 [0]-[7] modeA
126 $512b [0]-[7] modeB
127
128 < page_size=4k >
129 $5120-$5127 switch to mode A
130 $5128-$512b switch to mode B
131 $5123 [0]-[3] modeA
132 $5127 [4]-[7] modeA
133 $512b [0]-[3],[4]-[7] modeB
134
135 < page_size=2k >
136 $5120-$5127 switch to mode A
137 $5128-$512b switch to mode B
138 $5121 [0]-[1] modeA
139 $5123 [2]-[3] modeA
140 $5125 [4]-[5] modeA
141 $5127 [6]-[7] modeA
142 $5129 [0]-[1],[4]-[5] modeB
143 $512b [2]-[3],[6]-[7] modeB
144
145 < page_size=1k >
146 $5120-$5127 switch to mode A
147 $5128-$512b switch to mode B
148 $5120 [0] modeA
149 $5121 [1] modeA
150 $5122 [2] modeA
151 $5123 [3] modeA
152 $5124 [4] modeA
153 $5125 [5] modeA
154 $5126 [6] modeA
155 $5127 [7] modeA
156 $5128 [0],[4] modeB
157 $5129 [1],[5] modeB
158 $512a [2],[6] modeB
159 $512b [3],[7] modeB
160
161Consideration
162 MMC5 has mode A ,mode B and 2 kinds of CHR-page memory resistors.
163They can be used for refreshing it. (?-SB)
164
1655130 ???
166analyzing it...
167
1685200 W Split Mode Control 1
169 bit Ec-vvvvv
170 For the E function 0:don't use 1:use
171 c boundary's side is for using Split Mode extension of graphics
172 0: left side 1: right side
173 vvvvv left boundary is designated with the char. # to count places
174
175Sample.
176 5200 <- #00
177 (not?) used yet
178 5200 <- #82
179 Used for SplitMode GFX extension from left 1-2 character
180 5200 <- #c2
181 Used for SplitMode GFX extension from the right side 3 chars.
182 5200 <- #c0
183 Used for SplitMode GFX extension on the whole screen
184 5200 <- #d0
185 Used for SplitMode GFX extension on the right side of the screen
186 5200 <- #90
187 Used for SplitMode GFX extension on the left side of the screen
188
1895201 W SplitMode setup for SplitMode Ext. GFX use 1
190 $2005 determines the vertical movement; it can also delay ext. gfx's
191 vert. movement if necessary. It's written 2 times in bulk in the same
192 way as it would slip off a grade in $2005 (??-SB)
193
1945202 W SplitMode setup for SplitMode Ext. GFX use 2
195 bit --pppppp
196 uses vertical division of ext. gfx CHR-page designation
197 index_size=4k(0x1000byte)
198In case it uses a character 0x4000-0x4fff for the ext. gfx in question
199 $5202 <- 4
200
2015203 W scanline break point
202 For scanline # that it splits and wants to make it designate it in bulk
203
2045204 WR IRQ enable/disable
205 W bit I-------
206 I 1:IRQ Enable 0:IRQ Disable
207 R bit I-------
208 I 1:Scanline Hit 0:Scanline not Hit
209 $5203 is designated as scanline when arrived.
210
2115205 WR mult input/output
2125206 WR mult input/output
213($5205in)*($5206in) = $5205,$5206out
214
2155c00-5fbf ext. gfx business VRAM
216 shows an attribute of every position character
217
218 <ExGrafix Mode>
219 bit PPpppppp
220 PP: use character palette number
221 pppppp: use background CHR-PAGE number index=4k
222 #0-#3F are designations, $0000-$3FFF is CHR-data's range
223 Use for extension gfx
224
225 <Split Mode>
226 SplitMode uses a Name Table for extension gfx use.
227 bit pppppppp
228 pppppppp: use for background char. number designation
229
230 <ExRAM Mode>
231 Used for Extension RAM
232
2335fc0-5fff
234 <ExGrafix Mode>
235 (not?) used yet
236
237 <Split Mode>
238 SplitMode uses gfx's Attribute Table extension.
239 PPU uses $23c0-$23ff in the same way as the Attribute Table
240
241 <ExRAM Mode>
242 Used for Extension RAM
243
244Consideration
245 5c00-5fff has 3 uses.
246 Split Mode and ExGrafix Mode's VBlank is written so as to become
247 crowded, it writes a 0 and becomes crowded.
248 Every mode tries to go around ExRAM mode including reading but it
249 writes it, is effective in bulk and #5c-#5f is the output at times
250 where it is effective.