Skip to content

Commit

Permalink
Updated address range
Browse files Browse the repository at this point in the history
  • Loading branch information
TexZK committed Mar 13, 2023
1 parent bd9c137 commit 119241a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/YM7128B_emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ void YM7128B_ChipFixed_Reset(YM7128B_ChipFixed* self)
{
assert(self);

for (YM7128B_Address i = 0; i <= YM7128B_Address_Max; ++i) {
for (YM7128B_Address i = YM7128B_Address_Min; i <= YM7128B_Address_Max; ++i) {
YM7128B_ChipFixed_Write(self, i, 0x00);
}
}
Expand Down Expand Up @@ -693,7 +693,7 @@ void YM7128B_ChipFloat_Reset(YM7128B_ChipFloat* self)
{
assert(self);

for (YM7128B_Address i = 0; i < YM7128B_Reg_Count; ++i) {
for (YM7128B_Address i = YM7128B_Address_Min; i <= YM7128B_Address_Max; ++i) {
YM7128B_ChipFloat_Write(self, i, 0x00);
}
}
Expand Down Expand Up @@ -854,7 +854,7 @@ void YM7128B_ChipIdeal_Reset(YM7128B_ChipIdeal* self)
{
assert(self);

for (YM7128B_Address i = 0; i < YM7128B_Reg_Count; ++i) {
for (YM7128B_Address i = YM7128B_Address_Min; i <= YM7128B_Address_Max; ++i) {
YM7128B_ChipIdeal_Write(self, i, 0x00);
}
}
Expand Down Expand Up @@ -1044,7 +1044,7 @@ void YM7128B_ChipShort_Reset(YM7128B_ChipShort* self)
{
assert(self);

for (YM7128B_Address i = 0; i <= YM7128B_Address_Max; ++i) {
for (YM7128B_Address i = YM7128B_Address_Min; i <= YM7128B_Address_Max; ++i) {
YM7128B_ChipShort_Write(self, i, 0x00);
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/YM7128B_emu.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ enum YM7128B_DatasheetSpecs {
//! Output sample rate
YM7128B_Output_Rate = YM7128B_Input_Rate * YM7128B_Oversampling,

//! Minimum register address
YM7128B_Address_Min = 0,

//! Maximum register address
YM7128B_Address_Max = YM7128B_Reg_Count - 1,

Expand Down

0 comments on commit 119241a

Please sign in to comment.