Skip to content

Instantly share code, notes, and snippets.

@knight-ryu12
Created March 11, 2020 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knight-ryu12/b9168e85d05353b1a39f12ea9c42289a to your computer and use it in GitHub Desktop.
Save knight-ryu12/b9168e85d05353b1a39f12ea9c42289a to your computer and use it in GitHub Desktop.
#include <stdint.h>
uint32_t d[8];
uint32_t a[8];
bool Z;
writeSR(0x2700); // Disable all Interrupt (move 0x2700, sr)
Z = read32(0xa10008)==0?true:false; // tst.l 0xa10008
if(!Z) goto SkipJoyDetect; // bne.s SkipJoyDetect
Z = read32(0xa1000c); // tst.l 0xa1000c
SkipJoyDetect:
if(!Z) goto SkipSetup; // bne.s SkipSetup
a[5] = *(Table); // lea Table, a5
a[5]+=2; d[5] - d[7];
a[5]+=4; a[0] - a[4];
d[0] = *(a[1] - 0x10ff);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment