Skip to content

Instantly share code, notes, and snippets.

@kanzure
Created February 28, 2013 08:36
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 kanzure/5055220 to your computer and use it in GitHub Desktop.
Save kanzure/5055220 to your computer and use it in GitHub Desktop.
vba-warping
import vba
vba.load_rom()
# load my favorite state
vba.set_state(vba.load_state("mom-speech-1-before"))
# set warp memory
vba.set_memory_at(0xdcb5, 0x1)
vba.set_memory_at(0xdcb6, 0x1)
vba.set_memory_at(0xdcb8, 0x1)
vba.set_memory_at(0xdcb7, 0x1)
vba.set_memory_at(0xd001, 0xFF)
vba.set_memory_at(0xFF91, 0xF1)
vba.set_memory_at(0xFF9F, 0xF1)
# set pc ?
registers = vba.get_registers()
registers[0] = 0x6e11
vba.Gb.writeRegisters(registers)
# set current bank
vba.Gb.setROMBank(0x25)
# run
vba.go()
# crash (something about the game pak?)
@kanzure
Copy link
Author

kanzure commented Feb 28, 2013

vba.set_memory_at(0xdcb5, 1);
vba.set_memory_at(0xdcb6, 1);
vba.set_memory_at(0xdcb7, 1);
vba.set_memory_at(0xdcb8, 1);
vba.set_memory_at(0xd001, 0xff);
vba.set_memory_at(0xff91, 0xf1);
vba.set_memory_at(0xd432, 0x1);
val = vba.get_memory_at(0xd434);
vba.set_memory_at(0xd434, val & 251)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment