3 ms·
The GPU implementation is surprisingly simple https://github.com/cottsay/arm_asm_emu/blob/main/src/gpu.S https://github.com/cottsay/arm_asm_emu/blob/main/src/g
by teaearlgraycold 5y ago
The GPU implementation is surprisingly simple
https://github.com/cottsay/arm_asm_emu/blob/main/src/gpu.S https://github.com/cottsay/arm_asm_emu/blob/main/src/gpu.S
- danielvaughn 5y agoMakes me wonder how easy it would be to implement something like this with WASM and either WebGL or WebGPU.
- flohofwoe 5y agoDepending on how 'correct' the video emulation is (e.g. per pixel, per scanline or per frame), it won't make much sense to offload the video emulation to the GPU because it must run in lockstep with the rest of the system emulation. Moving the entire emulation to the GPU also makes little sense because such old-school system emulations are hard to parallelize (because of the above mentioned lock-step problem - for a cycle-correct emulator you basically need to emulate one clock cycle for all 'subsystems' after another). You could probably emulate a ton of fairly slow gameboy emulators in parallel though :)
- aappleby 5y agoThat's not the whole GPU, just the timing part.
- flohofwoe 5y agoThe rest appears to be in framebuffer.S, still not a lot of code though.
- Vel0cityX 5y agoThis is all of course a very rudimentary GB emulator, not accurate at all.
- cottsay 5y agoHey hey hey. Whatsamatta with my implementation? It should be fairly cycle-accurate...
- ret_2 5y ago