static bool CPUWriteState(gzFile gzFile)
bool CPUWriteState(char *file)
static bool CPUWriteState(gzFile gzFile){  utilWriteInt(gzFile, SAVE_GAME_VERSION);  utilGzWrite(gzFile, &rom[0xa0], 16);  utilWriteInt(gzFile, useBios);    utilGzWrite(gzFile, &reg[0], sizeof(reg));  utilWriteData(gzFile, saveGameStruct);  // new to version 0.7.1  utilWriteInt(gzFile, stopState);  // new to version 0.8  utilWriteInt(gzFile, intState);  utilGzWrite(gzFile, internalRAM, 0x8000);  utilGzWrite(gzFile, paletteRAM, 0x400);  utilGzWrite(gzFile, workRAM, 0x40000);  utilGzWrite(gzFile, vram, 0x20000);  utilGzWrite(gzFile, oam, 0x400);  utilGzWrite(gzFile, pix, 4*241*162);  utilGzWrite(gzFile, ioMem, 0x400);  eepromSaveGame(gzFile);  flashSaveGame(gzFile);  soundSaveGame(gzFile);  cheatsSaveGame(gzFile);  // version 1.5  rtcSaveGame(gzFile);    return true;}