Commit a7cf88a

Nick committed on
Perfect sound emulation by changing one line of code.
commit a7cf88a451272321adefb0827f602ae1938e6865 parent 6b40d82
3 changed files +13−18
ModifiedGBEmu.lpi +11−15
@@ -37,7 +37,7 @@
37 <PackageName Value="LCL"/> 37 <PackageName Value="LCL"/>
38 </Item2> 38 </Item2>
39 </RequiredPackages> 39 </RequiredPackages>
40 <Units Count="12"> 40 <Units Count="11">
41 <Unit0> 41 <Unit0>
42 <Filename Value="GBEmu.lpr"/> 42 <Filename Value="GBEmu.lpr"/>
43 <IsPartOfProject Value="True"/> 43 <IsPartOfProject Value="True"/>
@@ -54,44 +54,40 @@
54 <IsPartOfProject Value="True"/> 54 <IsPartOfProject Value="True"/>
55 </Unit2> 55 </Unit2>
56 <Unit3> 56 <Unit3>
57 <Filename Value="Gpu\ddraw_out.pas"/> 57 <Filename Value="Gpu\gfx.pas"/>
58 <IsPartOfProject Value="True"/> 58 <IsPartOfProject Value="True"/>
59 </Unit3> 59 </Unit3>
60 <Unit4> 60 <Unit4>
61 <Filename Value="Gpu\gfx.pas"/> 61 <Filename Value="Cpu\machine.pas"/>
62 <IsPartOfProject Value="True"/> 62 <IsPartOfProject Value="True"/>
63 </Unit4> 63 </Unit4>
64 <Unit5> 64 <Unit5>
65 <Filename Value="CPU\machine.pas"/> 65 <Filename Value="Cpu\z80cpu.pas"/>
66 <IsPartOfProject Value="True"/> 66 <IsPartOfProject Value="True"/>
67 <UnitName Value="Z80CPU"/>
67 </Unit5> 68 </Unit5>
68 <Unit6> 69 <Unit6>
69 <Filename Value="Cpu\z80cpu.pas"/> 70 <Filename Value="Sound\sound.pas"/>
70 <IsPartOfProject Value="True"/> 71 <IsPartOfProject Value="True"/>
71 <UnitName Value="Z80CPU"/>
72 </Unit6> 72 </Unit6>
73 <Unit7> 73 <Unit7>
74 <Filename Value="Sound\sound.pas"/> 74 <Filename Value="Global\vars.pas"/>
75 <IsPartOfProject Value="True"/> 75 <IsPartOfProject Value="True"/>
76 </Unit7> 76 </Unit7>
77 <Unit8> 77 <Unit8>
78 <Filename Value="Global\vars.pas"/> 78 <Filename Value="mainloop.pas"/>
79 <IsPartOfProject Value="True"/> 79 <IsPartOfProject Value="True"/>
80 </Unit8> 80 </Unit8>
81 <Unit9> 81 <Unit9>
82 <Filename Value="mainloop.pas"/>
83 <IsPartOfProject Value="True"/>
84 </Unit9>
85 <Unit10>
86 <Filename Value="Debugger\UnitDebug.pas"/> 82 <Filename Value="Debugger\UnitDebug.pas"/>
87 <IsPartOfProject Value="True"/> 83 <IsPartOfProject Value="True"/>
88 <HasResources Value="True"/> 84 <HasResources Value="True"/>
89 </Unit10> 85 </Unit9>
90 <Unit11> 86 <Unit10>
91 <Filename Value="Debugger\UnitMapview.pas"/> 87 <Filename Value="Debugger\UnitMapview.pas"/>
92 <IsPartOfProject Value="True"/> 88 <IsPartOfProject Value="True"/>
93 <HasResources Value="True"/> 89 <HasResources Value="True"/>
94 </Unit11> 90 </Unit10>
95 </Units> 91 </Units>
96 </ProjectOptions> 92 </ProjectOptions>
97 <CompilerOptions> 93 <CompilerOptions>
ModifiedGBEmu.lpr +0−1
@@ -7,7 +7,6 @@ uses
7 Interfaces, 7 Interfaces,
8 UnitMain in 'UnitMain.pas' {frmGameboy}, 8 UnitMain in 'UnitMain.pas' {frmGameboy},
9 debugger in 'Debugger\debugger.pas', 9 debugger in 'Debugger\debugger.pas',
10 ddraw_out in 'GPU\ddraw_out.pas',
11 gfx in 'GPU\gfx.pas', 10 gfx in 'GPU\gfx.pas',
12 machine in 'CPU\machine.pas', 11 machine in 'CPU\machine.pas',
13 Z80CPU in 'CPU\z80cpu.pas', 12 Z80CPU in 'CPU\z80cpu.pas',
ModifiedSound/sound.pas +2−2
@@ -9,7 +9,7 @@
9 9
10 unit sound; 10 unit sound;
11 11
12 {$MODE Delphi} 12 {$MODE objfpc}
13 13
14 interface 14 interface
15 15
@@ -510,7 +510,7 @@ begin
510 if stage and 1 > 0 then 510 if stage and 1 > 0 then
511 snd[3].Bit := snd[3].Bit and $f 511 snd[3].Bit := snd[3].Bit and $f
512 else 512 else
513 snd[3].Bit := snd[2].Bit shr 4; 513 snd[3].Bit := snd[3].Bit shr 4;
514 514
515 case (m_iram[$FF1c] shr 5) and 3 of 515 case (m_iram[$FF1c] shr 5) and 3 of
516 0: snd[3].Bit := 8; 516 0: snd[3].Bit := 8;