vblank: Added way to overwrite vblank handler at runtime
authorLukas Krickl <lukas@krickl.dev>
Sun, 10 Aug 2025 06:17:24 +0000 (08:17 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sun, 10 Aug 2025 06:17:24 +0000 (08:17 +0200)
commit9b25466a8bd05a8d283d0f4ade8838b7e412428b
tree037113034fbde52b179fb082bf036fb8a9fd267f
parente283e5a27fc3003286a4d4ec80dfe4728cc637ef
vblank: Added way to overwrite vblank handler at runtime

This is done by having 4 bytes of self modifying code in wram.
It offers enough space for a call and a reti instruction.
Currently it is simply hard-set to the default handler, but if a custom handler is ever needed
it can be put there.
src/jmp.inc
src/sys.s
src/video.s
src/wram.s