Created
January 28, 2026 21:58
-
-
Save shiona/8ec95d8539410de2547295acaf527a93 to your computer and use it in GitHub Desktop.
Double Dragon 2: The Revenge flying knee timing trainer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The script is written for fceux emulator. | |
| It simply reads the memory addresses of the game that seem to determine if a flying knee can be performed in that frame. | |
| The script shows the state by drawing a large red or green box just below the game area. | |
| Logically the box drawing may be one frame off, but I'm not sensitive enough to feel that. | |
| If you are, change those 0x06 and 0x07 values to your liking. | |
| Much credit to https://www.youtube.com/watch?v=2nI6EuzJ-sw which provided the address of the knee timer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while (true) do | |
| -- Highest byte denotes looking left or right, would be nice | |
| -- to drop that, but lua 5.1 doesn't seem to have bitwise operators | |
| local CROUCHING_LEFT = 0x06; | |
| local CROUCHING_RIGHT = 0x86; | |
| local sprite = memory.readbyte(0x00c7); | |
| local kneetimer = memory.readbyte(0x0055); | |
| gui.box(60, 186, 200, 190, "red"); | |
| if (sprite == CROUCHING_LEFT or sprite == CROUCHING_RIGHT) then | |
| if (kneetimer == 0x06 or kneetimer == 0x07) then | |
| gui.box(60, 186, 200, 190, "green"); | |
| end; | |
| end; | |
| emu.frameadvance(); | |
| end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment