Convert psx/sio.cpp to psx/sio.c