Move sio-related globals into struct psxSio. Initialize struct in sioInit().
Improve memcard interface/implementation and error reporting/handling:
Divide memcard interface between higher-level interface for emulator use and lower-level interface to service it (or for use by frontend in future memcard manager).
Eliminate large number of unnecessary system calls and file writes/syncs by keeping memcard files open for writing across several incoming writes from emulated games. Before this change, a single 8KB (1 block) game save would result in 64 separate series of open/seek/write/sync/close operations, once for each sector written. Now it is just one series.
New PSXINT_SIO_SYNC_MCD event ensures a memcard file open for writing is closed a small amount of time after last incoming write (see above).
Detect redundant memcard writes and prevent them from resulting in an actual file write. This prevents BIOS from causing unnecessary flash wear.
Move sio-related globals into struct psxSio. Initialize struct in sioInit().
Improve memcard interface/implementation and error reporting/handling:
TODO: add memcard manager to frontend.