start on longjump macro

This commit is contained in:
Cadey Ratio 2020-05-09 11:20:58 -04:00
parent 902c98451b
commit 3e3be0dc1e
2 changed files with 50 additions and 0 deletions

46
longjump.inputs Normal file
View File

@ -0,0 +1,46 @@
0000f97f
0000f97f
0000f97f
0000f97f
0000f97f
2000fa7f
2000fa7f
2000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000ff7f
a000177f
a000347f
a0005479
a0005a74
a0005a73
a0006269
a0006664
a0006b5f
a0006b5e
20006b5e
20006b5e
20006b5e
2000576b
20003e6f
20002765
20002042
20001e24
20000000
20000000
20000000
20000000
20000000
20000000

View File

@ -30,12 +30,14 @@ static void tas_recorder_init(void) {
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));
fwrite(buf, 1, sizeof(buf), fout); fwrite(buf, 1, sizeof(buf), fout);
atexit(tas_recorder_close); atexit(tas_recorder_close);
counter = 0;
} }
static void tas_recorder_read(OSContPad *pad) { static void tas_recorder_read(OSContPad *pad) {
if (fout == NULL) { if (fout == NULL) {
return; return;
} }
counter += 4;
uint8_t bytes[4] = {0}; uint8_t bytes[4] = {0};
int button1 = pad->button; int button1 = pad->button;
@ -45,6 +47,8 @@ static void tas_recorder_read(OSContPad *pad) {
bytes[2] = pad->stick_x; bytes[2] = pad->stick_x;
bytes[3] = pad->stick_y; bytes[3] = pad->stick_y;
fwrite(bytes, 1, 4, fout); fwrite(bytes, 1, 4, fout);
printf("[tas_recorder] %08x: %04x %02x%02x\n", (counter + OFFSET), pad->button, bytes[2], bytes[3]);
} }
struct ControllerAPI controller_tas_recorder = { struct ControllerAPI controller_tas_recorder = {