Implement a software renderer #120

Open
st3fan opened this Issue Jan 7, 2017 · 5 comments

Projects

None yet

1 participant

@st3fan
Owner
st3fan commented Jan 7, 2017

Implement a software renderer that blits/copies pixels into an SDL_Surface. This will allow the emulators to run on the Raspberry Pi Zero and other platforms without hardware accelerated OpenGL support.

@st3fan st3fan added one scr tty two labels Jan 7, 2017
@st3fan
Owner
st3fan commented Jan 8, 2017 edited

Current performance on a Raspberry Pi Zero:

pi@raspberrypi:~/Projects/ewm/src $ ./scr_test
txt_full_refresh      green      95.103/refresh
txt_full_refresh      color      24.554/refresh
lgr_full_refresh      green      17.619/refresh
lgr_full_refresh      color      17.648/refresh
hgr_full_refresh      green      19.561/refresh
hgr_full_refresh      color      35.250/refresh
@st3fan
Owner
st3fan commented Jan 8, 2017

After changing the BlendMode to SDL_BLENDMODE_NONE in scr_render_character():

txt_full_refresh                         green      36.373/refresh
@st3fan
Owner
st3fan commented Jan 8, 2017

More refactorings:

txt_full_refresh                 green      36.192/refresh
txt_full_refresh                 color      23.082/refresh
lgr_full_refresh                 green      17.386/refresh
lgr_full_refresh                 color      17.327/refresh
hgr_full_refresh                 green      19.289/refresh
hgr_full_refresh                 color      20.671/refresh
@st3fan
Owner
st3fan commented Jan 8, 2017
txt_full_refresh                         green      36.007/refresh
txt_full_refresh                         color      22.986/refresh
lgr_full_refresh                         green      17.295/refresh
lgr_full_refresh                         color      17.265/refresh
hgr_full_refresh                         green      18.400/refresh
hgr_full_refresh                         color      19.863/refresh
@st3fan
Owner
st3fan commented Jan 8, 2017
txt_full_refresh                         green      22.094/refresh
txt_full_refresh                         color      22.218/refresh
lgr_full_refresh                         green      17.155/refresh
lgr_full_refresh                         color      17.127/refresh
hgr_full_refresh                         green      17.698/refresh
hgr_full_refresh                         color      19.170/refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment