Astatin's stream gameboy RCE sandbox




Documentation:

Most of what you can do is documented in the gbdev pandocs
The opcodes are also available here

Your code is executed at $0000 inside a sandbox starting at $0100.
Most of the gameboy code you might find on the internet starts at $0100 so be careful, this is more similar to making a bootrom.
The sandbox contains a few useful functions to hopefully save you some space:

You can import them as labels to be able to CALL =NextFrame by placing this at the beginning of your code:


.DEFINELABEL VBlank_Wait $00:2000
.DEFINELABEL memcpy $00:2011
.DEFINELABEL bzero $00:201d
.DEFINELABEL HBlank_Wait $00:2409
.DEFINELABEL NextFrame $00:2418
			
This is purely preprocessing and will not take any space in the final assembled machine code.

VRAM

The runtime also loads a few sprites and a font in VRAM. You can directly write them to the tilemap at $9800-$9BFF to display something quickly on screen.
You can obviously load your own sprites if you want.

This is the default loaded sprite sheet:

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF 0x 1x 2x 3x 4x 5x 6x 7x 8x 9x Ax Bx Cx Dx Ex Fx

Have fun~

If you need something or have a suggestion for something to add to the runtime, message astatin on discord or irc :3