Skip to content

Commit 50310f4

Browse files
KellanClarkISSOtm
authored andcommitted
Mark NR31 and NR41 as write only
This is seen in both SameBoy's APU read function (https://github.com/LIJI32/SameBoy/blob/master/Core/apu.c#L746-L787) and the dmg_sound test rom. Both use a mask of $FF, meaning it is impossible to read these registers and effectively making them write only.
1 parent 58bd2c5 commit 50310f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Sound_Controller.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ square wave. This channel doesn't have a volume envelope register.
152152
Bit 7 - Sound Channel 3 Off (0=Stop, 1=Playback) (Read/Write)
153153
```
154154

155-
### FF1B - NR31 - Channel 3 Sound Length (R/W)
155+
### FF1B - NR31 - Channel 3 Sound Length (W)
156156

157157
```
158-
Bit 7-0 - Sound length (t1: 0 - 255)
158+
Bit 7-0 - Sound length (Write only) (t1: 0 - 255)
159159
```
160160

161161
Sound Length = (256-t1)\*(1/256) seconds This value is used only if Bit
@@ -215,10 +215,10 @@ It is also possible to influence the function of the random generator,
215215
so the that the output becomes more regular, resulting in a limited
216216
ability to output Tone instead of Noise.
217217

218-
### FF20 - NR41 - Channel 4 Sound Length (R/W)
218+
### FF20 - NR41 - Channel 4 Sound Length (W)
219219

220220
```
221-
Bit 5-0 - Sound length data (t1: 0-63)
221+
Bit 5-0 - Sound length data (Write only) (t1: 0-63)
222222
```
223223

224224
Sound Length = (64-t1)\*(1/256) seconds The Length value is used only if

0 commit comments

Comments
 (0)