Keatah, on Sat Jan 28, 2012 2:59 PM, said:
..great stuff! What are the requirements for the new SDL library. While Stella's workload would go down, like you say, but what of the newer SDL?
This is still up in the air a little, but according to what they're saying on the mailing list, WinXP will be the minimum supported. For OSX, probably 10.4 (Tiger), and right now Intel-only. This last one is a concern, because if they don't support PPC, then effectively as of Stella 4.0, PPC support will be dropped as well. I'm still looking into that. It might be possible for me to create PPC-compatible libraries. But at some point I think PPC support is going to disappear. I can only go back so far ...
As for general requirements, an accelerated video card will be assumed. There will be a backup software-renderer built in, but I'm not sure if I'm going to use it in Stella. I want to move away from that sort of thing. That means a Direct3D compatible card for Windows, and an OpenGL compatible card for Linux/OSX.
Now before anyone worries, most cards and drivers released in the past 6-7 years are actually compatible. The main issue with the current SDL is that it was written for systems in the 90's, when software rendering was all the rage, and Direct3D/OpenGL 3D rendering was very new on PC hardware. The industry is moving on, and now SDL is as well, making its default rendering modes take advantage of 3D hardware (which as I said, has actually been available for at least 5+ years).
As for performance improvements, I give an example for my development system (Intel Corei7, Nvidia 9600GT video card). Using 4-5X zoom in software mode pegs one core at 100%. Running at 2560x1440 OpenGL mode (effectively over 7X zoom) takes 4% CPU of
one core! For those interested, the main problem in that in 2560x1440 software mode, Stella itself has to maintain a framebuffer of that size, effectively updating 13MB/frame @ 60 frames/sec (or 780MB/sec). For OpenGL mode, it only has to maintain a framebuffer of size 160x240 or so (or 9MB/sec). Think about having a very flexible sheet of rubber, and making a drawing on it. Then, stretch this sheet several times over both horizontally and vertically. That's what Stella does in hardware rendering mode. It draws a little picture, and lets the video card 'stretch' it. And it typically saves over 80 times the work. It's actually ridiculous that software is still using non-accelerated rendering in 2012. But that's the case currently ...
EDIT: I forgot to mention that all current phone/tablet-like devices support hardware-accelerated rendering at this point (usually OpenGL ES), and since SDL (and Stella) will now support this natively as well, it actually makes porting to these devices even easier than it is now. Really, apart from the fact that SDL 2.0 is new and there will probably be some initial teething problems, there is zero drawback in moving to it.