Skip to content

Commit

Permalink
sfc: brr bank -> brr page
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffythedragonslayer committed Jun 30, 2023
1 parent c4aea44 commit 1ed43da
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ares/sfc/dsp/dsp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ struct DSP : Thread {
} noise;

struct BRR {
n8 bank;
n8 page;

n8 _bank;
n8 _page;
n8 _source;
n16 _address;
n16 _nextAddress;
Expand Down
2 changes: 1 addition & 1 deletion ares/sfc/dsp/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ auto DSP::write(n7 address, n8 data) -> void {
for(u32 n : range(8)) voice[n].echo = data.bit(n);
break;
case 0x5d: //DIR
brr.bank = data;
brr.page = data;
break;
case 0x6d: //ESA
echo.bank = data;
Expand Down
2 changes: 1 addition & 1 deletion ares/sfc/dsp/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ auto DSP::misc27() -> void {

auto DSP::misc28() -> void {
for(auto& v : voice) v._noise = v.noise, v._echo = v.echo;
brr._bank = brr.bank;
brr._page = brr.page;
}

auto DSP::misc29() -> void {
Expand Down
4 changes: 2 additions & 2 deletions ares/sfc/dsp/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ auto DSP::serialize(serializer& s) -> void {
s(noise.frequency);
s(noise.lfsr);

s(brr.bank);
s(brr._bank);
s(brr.page);
s(brr._page);
s(brr._source);
s(brr._address);
s(brr._nextAddress);
Expand Down
2 changes: 1 addition & 1 deletion ares/sfc/dsp/voice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inline auto DSP::voiceOutput(Voice& v, n1 channel) -> void {
}

auto DSP::voice1(Voice& v) -> void {
brr._address = (brr._bank << 8) + (brr._source << 2);
brr._address = (brr._page << 8) + (brr._source << 2);
brr._source = v.source;
}

Expand Down

0 comments on commit 1ed43da

Please sign in to comment.