Skip to content

Commit

Permalink
aleck64: alignment/formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeUsher committed Jan 11, 2025
1 parent dd737b1 commit 4a47694
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
11 changes: 5 additions & 6 deletions ares/n64/aleck64/aleck64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ struct Aleck64 : Memory::RCP<Aleck64> {
template<u32 Size>
auto writeBurst(u32 address, u32 *value, const char *peripheral) -> void {
address = address & 0x00ff'ffff;
if (address >= size) return;
if(address >= size) return;
Memory::Writable::write<Word>(address | 0x00, value[0]);
Memory::Writable::write<Word>(address | 0x04, value[1]);
Memory::Writable::write<Word>(address | 0x08, value[2]);
Memory::Writable::write<Word>(address | 0x0c, value[3]);
if (Size == ICache) {
if(Size == ICache) {
Memory::Writable::write<Word>(address | 0x10, value[4]);
Memory::Writable::write<Word>(address | 0x14, value[5]);
Memory::Writable::write<Word>(address | 0x18, value[6]);
Expand All @@ -25,17 +25,17 @@ struct Aleck64 : Memory::RCP<Aleck64> {
template<u32 Size>
auto readBurst(u32 address, u32 *value, const char *peripheral) -> void {
address = address & 0x00ff'ffff;
if (address >= size) {
if(address >= size) {
value[0] = value[1] = value[2] = value[3] = 0;
if (Size == ICache)
if(Size == ICache)
value[4] = value[5] = value[6] = value[7] = 0;
return;
}
value[0] = Memory::Writable::read<Word>(address | 0x00);
value[1] = Memory::Writable::read<Word>(address | 0x04);
value[2] = Memory::Writable::read<Word>(address | 0x08);
value[3] = Memory::Writable::read<Word>(address | 0x0c);
if (Size == ICache) {
if(Size == ICache) {
value[4] = Memory::Writable::read<Word>(address | 0x10);
value[5] = Memory::Writable::read<Word>(address | 0x14);
value[6] = Memory::Writable::read<Word>(address | 0x18);
Expand All @@ -48,7 +48,6 @@ struct Aleck64 : Memory::RCP<Aleck64> {
auto unload() -> void;
auto power(bool reset) -> void;
auto save() -> void;
auto applyGameSpecificSettings(string name) -> void;

//io.cpp
auto readWord(u32 address, Thread& thread) -> u32;
Expand Down
66 changes: 33 additions & 33 deletions ares/n64/aleck64/controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,55 @@ auto Aleck64::Controls::load(Node::Object parent) -> void {
node = parent->append<Node::Object>("Controls");

service = node->append<Node::Input::Button>("Service");
test = node->append<Node::Input::Button>("Test");
test = node->append<Node::Input::Button>("Test");

p1x = node->append<Node::Input::Axis>("Player 1 X-Axis");
p1y = node->append<Node::Input::Axis>("Player 1 Y-Axis");
p1up = node->append<Node::Input::Button>("Player 1 Up");
p1down = node->append<Node::Input::Button>("Player 1 Down");
p1left = node->append<Node::Input::Button>("Player 1 Left");
p1x = node->append<Node::Input::Axis>("Player 1 X-Axis");
p1y = node->append<Node::Input::Axis>("Player 1 Y-Axis");
p1up = node->append<Node::Input::Button>("Player 1 Up");
p1down = node->append<Node::Input::Button>("Player 1 Down");
p1left = node->append<Node::Input::Button>("Player 1 Left");
p1right = node->append<Node::Input::Button>("Player 1 Right");
p1start = node->append<Node::Input::Button>("Player 1 Start");
p1coin = node->append<Node::Input::Button>("Player 1 Coin");
p1coin = node->append<Node::Input::Button>("Player 1 Coin");

for (auto n: range(9)) {
for(auto n: range(9)) {
string name = {"Player 1 Button ", 1 + n};
p1[n] = node->append<Node::Input::Button>(name);
}

p2x = node->append<Node::Input::Axis>("Player 2 X-Axis");
p2y = node->append<Node::Input::Axis>("Player 2 Y-Axis");
p2up = node->append<Node::Input::Button>("Player 2 Up");
p2down = node->append<Node::Input::Button>("Player 2 Down");
p2left = node->append<Node::Input::Button>("Player 2 Left");
p2x = node->append<Node::Input::Axis>("Player 2 X-Axis");
p2y = node->append<Node::Input::Axis>("Player 2 Y-Axis");
p2up = node->append<Node::Input::Button>("Player 2 Up");
p2down = node->append<Node::Input::Button>("Player 2 Down");
p2left = node->append<Node::Input::Button>("Player 2 Left");
p2right = node->append<Node::Input::Button>("Player 2 Right");
p2start = node->append<Node::Input::Button>("Player 2 Start");
p2coin = node->append<Node::Input::Button>("Player 2 Coin");
p2coin = node->append<Node::Input::Button>("Player 2 Coin");

for (auto n: range(9)) {
for(auto n: range(9)) {
string name = {"Player 2 Button ", 1 + n};
p2[n] = node->append<Node::Input::Button>(name);
}

mahjongA = node->append<Node::Input::Button>("Mahjong A");
mahjongB = node->append<Node::Input::Button>("Mahjong B");
mahjongC = node->append<Node::Input::Button>("Mahjong C");
mahjongD = node->append<Node::Input::Button>("Mahjong D");
mahjongE = node->append<Node::Input::Button>("Mahjong E");
mahjongF = node->append<Node::Input::Button>("Mahjong F");
mahjongG = node->append<Node::Input::Button>("Mahjong G");
mahjongH = node->append<Node::Input::Button>("Mahjong H");
mahjongI = node->append<Node::Input::Button>("Mahjong I");
mahjongJ = node->append<Node::Input::Button>("Mahjong J");
mahjongK = node->append<Node::Input::Button>("Mahjong K");
mahjongL = node->append<Node::Input::Button>("Mahjong L");
mahjongM = node->append<Node::Input::Button>("Mahjong M");
mahjongN = node->append<Node::Input::Button>("Mahjong N");
mahjongKan = node->append<Node::Input::Button>("Mahjong カン");
mahjongPon = node->append<Node::Input::Button>("Mahjong ポン");
mahjongChi = node->append<Node::Input::Button>("Mahjong チー");
mahjongA = node->append<Node::Input::Button>("Mahjong A");
mahjongB = node->append<Node::Input::Button>("Mahjong B");
mahjongC = node->append<Node::Input::Button>("Mahjong C");
mahjongD = node->append<Node::Input::Button>("Mahjong D");
mahjongE = node->append<Node::Input::Button>("Mahjong E");
mahjongF = node->append<Node::Input::Button>("Mahjong F");
mahjongG = node->append<Node::Input::Button>("Mahjong G");
mahjongH = node->append<Node::Input::Button>("Mahjong H");
mahjongI = node->append<Node::Input::Button>("Mahjong I");
mahjongJ = node->append<Node::Input::Button>("Mahjong J");
mahjongK = node->append<Node::Input::Button>("Mahjong K");
mahjongL = node->append<Node::Input::Button>("Mahjong L");
mahjongM = node->append<Node::Input::Button>("Mahjong M");
mahjongN = node->append<Node::Input::Button>("Mahjong N");
mahjongKan = node->append<Node::Input::Button>("Mahjong カン");
mahjongPon = node->append<Node::Input::Button>("Mahjong ポン");
mahjongChi = node->append<Node::Input::Button>("Mahjong チー");
mahjongReach = node->append<Node::Input::Button>("Mahjong リーチ");
mahjongRon = node->append<Node::Input::Button>("Mahjong ロン");
mahjongRon = node->append<Node::Input::Button>("Mahjong ロン");
}

auto Aleck64::Controls::poll() -> void {
Expand Down

0 comments on commit 4a47694

Please sign in to comment.