3 ms·
Well, 5000 bytes of C++ plus the SDL library.
by guenthert 4y ago
Well, 5000 bytes of C++ plus the SDL library.
- NobodyNada 4y agoThe emulator receives keyboard input from SDL and generates a framebuffer which it passes back to SDL. SDL is only used to handle the grunt work of reading keyboard input and displaying the framebuffer in a window, which is not the interesting part of writing a NES emulator. It's also not a necessary part of an emulator -- it's actually easier to write an emulator that reads controller inputs from a TAS movie file and writes its output to a video file. Making it interactive is just more fun.
- Waterluvian 4y agoSDL isn’t the emulator. It’s the hardware.
- lifthrasiir 4y agoEven IOCCC allows SDL (for example, 2005/jetro [1] is the only entry that used SDL_Audio as far as I know), so it is not that significant. [1] https://github.com/ioccc-src/winner/blob/master/2005/jetro/jetro.c https://github.com/ioccc-src/winner/blob/master/2005/jetro/j...
- djmips 4y agoI guess I agree with the other comments here. The SDL is an abstraction that allows this emulator to be a bit portable. You could target this to some microcontroller with a framebuffer in hardware and then SDL disappears, you write directly to the framebuffer and read the inputs directly from some GPIO.