4 ms·
I agree. I believe OpenCL is the way to go. I did a very simple Sega Genesis emulator and basically what you do is control with a very slow CPU a very fast ha
by forgottenpaswrd 13y ago
I agree.
I believe OpenCL is the way to go. I did a very simple Sega Genesis emulator and basically what you do is control with a very slow CPU a very fast hardware that does very simple things like drawing tiles.
You control the tile with something like a pointer with the CPU but it is draw by hardware. Same with sound.
It is not hard to do, it just takes time.
- forgottenpaswrd 13y agoPS: For those interested, programming in OpenCL-OpenGL is way harder, painful and slower(in developer time) than in the CPU. In particular, you extract all the performance in OpenCL from knowing how to manage memory. We talk about orders of magnitude difference(100x-200x times faster). This memory management is hell for anybody trained with garbage collectors, Object oriented constructors and so on. It is way harder than pure c and the feedback loop is way longer(unless you invest a lot in hardware).
- derefr 13y agoIn this case, I don't think the emulator would be "programmed" in OpenCL; instead, what would be programmed in OpenCL would be a generalized cellular-automata-style FPGA "emulator." (This would be deep magic, but it would only need to be done once.) Then you'd "flash" the trace of the chips you want emulated to this virtual FPGA, just as if you were deploying it to a real one.