From 3e3be0dc1e293e10a1dbef5b32d83a68a44f39db Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 9 May 2020 11:20:58 -0400 Subject: [PATCH] start on longjump macro --- longjump.inputs | 46 +++++++++++++++++++++ src/pc/controller/controller_tas_recorder.c | 4 ++ 2 files changed, 50 insertions(+) create mode 100644 longjump.inputs diff --git a/longjump.inputs b/longjump.inputs new file mode 100644 index 0000000..1e3b254 --- /dev/null +++ b/longjump.inputs @@ -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 diff --git a/src/pc/controller/controller_tas_recorder.c b/src/pc/controller/controller_tas_recorder.c index 6bd1c99..53464fe 100644 --- a/src/pc/controller/controller_tas_recorder.c +++ b/src/pc/controller/controller_tas_recorder.c @@ -30,12 +30,14 @@ static void tas_recorder_init(void) { memset(buf, 0, sizeof(buf)); fwrite(buf, 1, sizeof(buf), fout); atexit(tas_recorder_close); + counter = 0; } static void tas_recorder_read(OSContPad *pad) { if (fout == NULL) { return; } + counter += 4; uint8_t bytes[4] = {0}; int button1 = pad->button; @@ -45,6 +47,8 @@ static void tas_recorder_read(OSContPad *pad) { bytes[2] = pad->stick_x; bytes[3] = pad->stick_y; 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 = {