Commit 83a0c68

Nick committed on
Add counter step width to halt.gb
commit 83a0c68574313d0a2216f0ea4e05d5373139b2f7 parent c94e28d
7 changed files +24−22
ModifiedResources/z80/halt.z80 +10−0
@@ -65,6 +65,11 @@ _macro_begin:
65 65
66 ld a, [note] 66 ld a, [note]
67 call _convert_ch4_note 67 call _convert_ch4_note
68 ld d, a
69 ld a, [instr+1]
70 and %10000000
71 swap a
72 or d
68 ld [rAUD4POLY], a 73 ld [rAUD4POLY], a
69 74
70 ld a, [instr+1] 75 ld a, [instr+1]
@@ -88,6 +93,11 @@ _macro_update:
88 add b 93 add b
89 94
90 call _convert_ch4_note 95 call _convert_ch4_note
96 ld d, a
97 ld a, [instr+1]
98 and %10000000
99 swap a
100 or d
91 ld [rAUD4POLY], a 101 ld [rAUD4POLY], a
92 102
93 xor a 103 xor a
ModifiedSound/sound.pas +1−1
@@ -11,7 +11,7 @@
11 11
12 unit sound; 12 unit sound;
13 13
14 {$MODE objfpc} 14 {$MODE objfpc}{$H+}
15 15
16 interface 16 interface
17 17
Modifiedconstants.pas +1−1
@@ -1,6 +1,6 @@
1 unit Constants; 1 unit Constants;
2 2
3 {$mode objfpc} 3 {$MODE objfpc}
4 4
5 interface 5 interface
6 6
ModifiedhUGEDriver +1−1
@@ -1 +1 @@
1 Subproject commit 5acfb8fcd4cc8a7331471938a7680683f9f12a09 1 Subproject commit b39b8712f8e588369611ee0196ce07c6fbb30ae5
Modifiedmainloop.pas +1−1
@@ -9,7 +9,7 @@
9 9
10 unit mainloop; 10 unit mainloop;
11 11
12 {$MODE objfpc} 12 {$MODE objfpc}{$H+}
13 13
14 interface 14 interface
15 15
Modifiedtracker.pas +10−18
@@ -753,7 +753,12 @@ begin
753 end; 753 end;
754 itNoise: begin 754 itNoise: begin
755 Regs := NoiseInstrumentToRegisters(Freq, True, Instr); 755 Regs := NoiseInstrumentToRegisters(Freq, True, Instr);
756 Addr := SymbolTable.KeyData['instr']; 756 if Instr.LengthEnabled then
757 Regs.NR41 := Regs.NR41 or %01000000;
758 if Instr.CounterStep = swSeven then
759 Regs.NR41 := Regs.NR41 or %10000000;
760
761 Addr := SymbolTable.KeyData[SYM_HALT_INSTR];
757 Spokeb(Addr, Regs.NR42); 762 Spokeb(Addr, Regs.NR42);
758 Spokeb(Addr+1, Regs.NR41); 763 Spokeb(Addr+1, Regs.NR41);
759 764
@@ -761,14 +766,8 @@ begin
761 Spokeb(Addr+2+I, Byte(Instr.NoiseMacro[I])); 766 Spokeb(Addr+2+I, Byte(Instr.NoiseMacro[I]));
762 end; 767 end;
763 768
764 PokeSymbol('macro_index', 1); 769 PokeSymbol(SYM_HALT_MACRO_INDEX, 1);
765 PokeSymbol('note', Note); 770 PokeSymbol(SYM_HALT_NOTE, Note);
766
767 {Regs := NoiseInstrumentToRegisters(Freq, True, Instr);
768 Spokeb(NR41, Regs.NR41);
769 Spokeb(NR42, Regs.NR42);
770 Spokeb(NR43, Regs.NR43);
771 Spokeb(NR44, Regs.NR44);}
772 end; 771 end;
773 end; 772 end;
774 end; 773 end;
@@ -1114,16 +1113,9 @@ begin
1114 end; 1113 end;
1115 1114
1116 itNoise: begin 1115 itNoise: begin
1117 {ShiftClockTrackbar.Position := CI^.ShiftClockFreq; 1116 //ShiftClockTrackbar.Position := CI^.ShiftClockFreq;
1118 DivRatioTrackbar.Position := CI^.DividingRatio; 1117 //DivRatioTrackbar.Position := CI^.DividingRatio;
1119 SevenBitCounterCheckbox.Checked := CI^.CounterStep = swSeven; 1118 SevenBitCounterCheckbox.Checked := CI^.CounterStep = swSeven;
1120
1121 Edit1.Text := IntToStr(CI^.NoiseMacro[0]);
1122 Edit2.Text := IntToStr(CI^.NoiseMacro[1]);
1123 Edit3.Text := IntToStr(CI^.NoiseMacro[2]);
1124 Edit4.Text := IntToStr(CI^.NoiseMacro[3]);
1125 Edit5.Text := IntToStr(CI^.NoiseMacro[4]);
1126 Edit6.Text := IntToStr(CI^.NoiseMacro[5]);}
1127 end; 1119 end;
1128 end; 1120 end;
1129 1121