Hey all, I'm investigating a glitch in Super Mario Land 2 for GB, and I cannot seem to reproduce it in BGB, since it requires frame exact timing. Luckily, I have a movie file of someone performing the glitch, and I was able to create a savestate at the exact frame the glitch occurs (with the game paused), so I can load the savestate, unpause and the glitch executes. This is in VBA.
I need to get the same state into BGB so I can debug it and find out what's happening. My plan was to copy data from the VBA savestate into a BGB savestate and hope nothing went wrong. I copied over all of the RAM data, which seemed to work great, I appear in the same location with the game paused, but the glitch doesn't execute. I then realized I should copy over the registers (AF, HL, DE, BC, and a bunch of CPU registers like LCDC, STAT, etc.). After I did that, the game draws one frame and then crashes. I did some tracing and it seems what is happening is that another Vblank period is occuring before the previous one is done executing. I did manage to find some info in the BGB savestate that seems to correspond to it's internal representation of when Vblank occurs ("vidtime" and "lcdpos" variables in the savestate) - however I can't seem to find anything in VBA that is similar.
Does anyone know where I can find info on VBA's savestate format? Or a way I can stop the second vblank from happening and resynch the game? Or maybe a better approach? Any advice is greatly appreciated.

Edit: Nevermind, I was able to figure out how when VBA was undergoing VBLANK using some hacky Lua scripting. If anyone knows a better way, I'm still interested in knowing.