Skip to content

Commit

Permalink
== N64 ==
Browse files Browse the repository at this point in the history
- Controller test basic skeleton
  • Loading branch information
ArtemioUrbina committed Sep 18, 2024
1 parent a6fae8f commit d492d49
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions 240psuite/N64/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ uint32_t calculateCRC(uint32_t startAddress, uint32_t size) {
if(keys.b)
done = 1;

if(keys.a) {
if(keys.a) {
locpos ++;
if(locpos == MAX_LOCATIONS)
locpos = 0;
Expand All @@ -203,4 +203,35 @@ uint32_t calculateCRC(uint32_t startAddress, uint32_t size) {
if(keys.c_right)
docrc = !docrc;
}
}
}


void drawControllerTest() {
int end = 0;
image *back = NULL;
joypad_buttons_t keys;

back = loadImage("rom:/mainbg.sprite");
if(!back)
return;
while(!end) {
getDisplay();

rdpqStart();

rdpqDrawImage(back);
rdpqEnd();

drawStringC(42, 0x00, 0xff, 0x00, "Controller Test");
waitVsync();

joypad_poll();
keys = controllerButtonsDown();

if(keys.b)
end = 1;
}


freeImage(&back);
}

0 comments on commit d492d49

Please sign in to comment.