Skip to content

Instantly share code, notes, and snippets.

@loveemu
Last active August 29, 2015 14:19
Show Gist options
  • Save loveemu/b31e33189dcc6d1a281f to your computer and use it in GitHub Desktop.
Save loveemu/b31e33189dcc6d1a281f to your computer and use it in GitHub Desktop.
Donkey Kong Country - Trace Sound Transfer Script
memory.registerexec(0x8ab414, function()
local a = memory.getregister("a")
local word_16 = memory.readword(0x7e0016)
local word_18 = memory.readword(0x7e0018)
local word_1a = memory.readword(0x7e001a)
local word_1c = memory.readword(0x7e001c)
print(string.format("Load waveform: a=$%04x, $16=$%02x, $18=$%02x, $1a=$%02x, $1c=$%02x", a, word_16, word_18, word_1a, word_1c))
end)
memory.registerexec(0x8ab1cb, function()
local a = memory.getregister("a")
print(string.format("Load sequence: a=$%04x", a))
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment