Commit b343702

Nick committed on
WIP stuff
commit b3437024f324540218e741caed71c8d5c1ab597a parent 63399c1
4 changed files +23−20
ModifiedSound/sound.pas +17−16
@@ -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
Modifiedinstruments.pas +1−0
@@ -274,6 +274,7 @@ begin
274 NR42.Direction := Instr.VolSweepDirection = Up; 274 NR42.Direction := Instr.VolSweepDirection = Up;
275 275
276 NR43.ShiftClockFrequency := $F - (Frequency shr 7); // Quantize CH4 note 276 NR43.ShiftClockFrequency := $F - (Frequency shr 7); // Quantize CH4 note
277
277 NR43.DividingRatio:= Instr.DividingRatio; 278 NR43.DividingRatio:= Instr.DividingRatio;
278 NR43.SevenBitCounter:=Instr.CounterStep = Seven; 279 NR43.SevenBitCounter:=Instr.CounterStep = Seven;
279 280
Modifiedtracker.lfm +2−2
@@ -55,10 +55,10 @@ object frmTracker: TfrmTracker
55 Height = 845 55 Height = 845
56 Top = 0 56 Top = 0
57 Width = 1709 57 Width = 1709
58 ActivePage = GeneralTabSheet 58 ActivePage = InstrumentTabSheet
59 Align = alClient 59 Align = alClient
60 ParentFont = False 60 ParentFont = False
61 TabIndex = 0 61 TabIndex = 2
62 TabOrder = 0 62 TabOrder = 0
63 object GeneralTabSheet: TTabSheet 63 object GeneralTabSheet: TTabSheet
64 Caption = 'General' 64 Caption = 'General'
Modifiedtracker.pas +3−2
@@ -472,7 +472,7 @@ begin
472 Spokeb(NR24, %10000000); 472 Spokeb(NR24, %10000000);
473 473
474 // Silence CH3 474 // Silence CH3
475 Spokeb(NR32, 0); 475 Spokeb(NR30, 0);
476 476
477 // Silence CH4 477 // Silence CH4
478 Spokeb(NR42, 0); 478 Spokeb(NR42, 0);
@@ -828,7 +828,8 @@ begin
828 LengthEnabledCheckbox.Checked := Random <= 0.5; 828 LengthEnabledCheckbox.Checked := Random <= 0.5;
829 LengthSpinner.Position := Random(Round(LengthSpinner.Max)); 829 LengthSpinner.Position := Random(Round(LengthSpinner.Max));
830 830
831 PreviewInstrument(C_5, InstrumentNumberSpinner.Value); 831 PreviewInstrument(NotesToFreqs.KeyData[RandomRange(LOWEST_NOTE, HIGHEST_NOTE)],
832 InstrumentNumberSpinner.Value);
832 end; 833 end;
833 834
834 procedure TfrmTracker.FormCreate(Sender: TObject); 835 procedure TfrmTracker.FormCreate(Sender: TObject);