@@ -605,35 +605,36 @@ begin |
| 605 |
2: snd[3].Bit := 8 or (snd[3].Bit shr 1); |
605 |
2: snd[3].Bit := 8 or (snd[3].Bit shr 1); |
| 606 |
3: snd[3].Bit := $c or (snd[3].Bit shr 2); |
606 |
3: snd[3].Bit := $c or (snd[3].Bit shr 2); |
| 607 |
end; |
607 |
end; |
|
|
608 |
|
|
|
609 |
if m_iram[$FF25] and 4 > 0 then |
|
|
610 |
Inc(ls[3], (snd[3].Bit shl 4) - $80); |
|
|
611 |
if m_iram[$FF25] and $40 > 0 then |
|
|
612 |
Inc(rs[3], (snd[3].Bit shl 4) - $80); |
| 608 |
end; |
613 |
end; |
| 609 |
if m_iram[$FF25] and 4 > 0 then |
|
|
| 610 |
Inc(ls[3], (snd[3].Bit shl 4) - $80); |
|
|
| 611 |
if m_iram[$FF25] and $40 > 0 then |
|
|
| 612 |
Inc(rs[3], (snd[3].Bit shl 4) - $80); |
|
|
| 613 |
end; |
614 |
end; |
| 614 |
if not snd[4].channelOFF then |
615 |
if not snd[4].channelOFF then |
| 615 |
begin |
616 |
begin |
| 616 |
|
617 |
|
| 617 |
if snd[4].Enable then |
618 |
if snd[4].Enable then |
| 618 |
begin |
619 |
begin |
| 619 |
|
|
|
| 620 |
Inc(freq4Clk, cycles); |
620 |
Inc(freq4Clk, cycles); |
| 621 |
if (freq4Clk >= snd[4].Freq) then |
621 |
if (freq4Clk >= snd[4].Freq) then |
| 622 |
begin |
622 |
begin |
| 623 |
freq4Clk := freq4Clk mod snd[4].Freq; |
623 |
freq4Clk := freq4Clk mod snd[4].Freq; |
| 624 |
snd[4].Bit := NextLFSRBit((m_iram[$FF22] and %1000) <> 0);// random(255) and 1; // white noise |
624 |
snd[4].Bit := NextLFSRBit((m_iram[$FF22] and %1000) <> 0); |
| 625 |
end; |
625 |
end; |
|
|
626 |
|
|
|
627 |
if (m_iram[$FF25] and 8) > 0 then |
|
|
628 |
if snd[4].Bit > 0 then |
|
|
629 |
Inc(ls[4], vol[snd[4].Vol]) |
|
|
630 |
else |
|
|
631 |
Dec(ls[4], vol[snd[4].Vol]); |
|
|
632 |
if (m_iram[$FF25] and $80) > 0 then |
|
|
633 |
if snd[4].Bit > 0 then |
|
|
634 |
Inc(rs[4], vol[snd[4].Vol]) |
|
|
635 |
else |
|
|
636 |
Dec(rs[4], vol[snd[4].Vol]); |
| 626 |
end; |
637 |
end; |
| 627 |
if (m_iram[$FF25] and 8) > 0 then |
|
|
| 628 |
if snd[4].Bit > 0 then |
|
|
| 629 |
Inc(ls[4], vol[snd[4].Vol]) |
|
|
| 630 |
else |
|
|
| 631 |
Dec(ls[4], vol[snd[4].Vol]); |
|
|
| 632 |
if (m_iram[$FF25] and $80) > 0 then |
|
|
| 633 |
if snd[4].Bit > 0 then |
|
|
| 634 |
Inc(rs[4], vol[snd[4].Vol]) |
|
|
| 635 |
else |
|
|
| 636 |
Dec(rs[4], vol[snd[4].Vol]); |
|
|
| 637 |
end; |
638 |
end; |
| 638 |
|
639 |
|
| 639 |
for I := 1 to 4 do begin |
640 |
for I := 1 to 4 do begin |