Porting SDL2 to Casio Prizms Calculator

Hi Everybody,

I am currently evaluating the possibility of porting the SDL2 to a new architecture (ie. Casio Prizm calculators also known as fx-CG10/20/50). I made the port of SDL 1.2.15 some months back, as well as SDL_gfx and SDL_image libraries, for this plateform, based on a document I found on how to start for porting SDL 1.2 on a new architecture. In my case, it was basically done in four steps :

  • porting the keyboard handler through the Pump-Event method and putting the right names of the keys in the headers file
  • porting the video driver through the UpdateRects method
  • porting the Timers
  • checking and adjusting the RWops constants (SEEK, CUR…) and the endianness

But in the case of SDL2.0 (I am targeting 2.8.15), this is much a more complex process. My understanding so far is that I need to implement :

  • still the video drivers for the architecture
  • a renderer which aims at making the link between the SDL library and the hardware (putting everything in the VRAM and update the screen)
  • a keyboard driver with the correct translation of “Scan_Codes”
  • The timers with some additional features (this should be OK)
  • check the file RWops and the endianness (this should also be OK, very close to SDL 1.2)

The question is : is there somewhere a good guideline on how to port SDL2 to a new plateform / architecture ? If so, could you please provide me some guidance and if not, is there someone that could confirm my thoughts or correct me if I am wrong ?

Thanks in advance for your very valuable support and help.

Cheers

Sly

Check this detailed answer by icculus

1 Like