initial import
[picodrive.git] / platform / uiq2 / ClientServer.h
diff --git a/platform/uiq2/ClientServer.h b/platform/uiq2/ClientServer.h
new file mode 100644 (file)
index 0000000..b320bce
--- /dev/null
@@ -0,0 +1,69 @@
+// protocol used to talk between exe and it's launcher\r
+\r
+#ifndef __CLIENTSERVER_H\r
+#define __CLIENTSERVER_H\r
+\r
+#include <w32std.h>\r
+\r
+// names\r
+_LIT(KServerName,   "PicodriveNServ");\r
+_LIT(KServerWGName, "Picosmall"); // window group name\r
+_LIT(KClientName,   "PicodriveN");\r
+_LIT(KClientFind,   "PicodriveN*"); // client search mask (for TFindLibrary)\r
+\r
+\r
+// opcodes used in message passing between client and server\r
+enum TPicoServRqst {\r
+       PicoMsgLoadState,\r
+       PicoMsgSaveState,\r
+       PicoMsgLoadROM,\r
+       PicoMsgResume,\r
+       PicoMsgReset,\r
+       PicoMsgKeys,\r
+       PicoMsgPause,\r
+       PicoMsgQuit,\r
+       PicoMsgConfigChange,    // launcher -> emu\r
+       PicoMsgRetrieveConfig,  // emu -> launcher\r
+       PicoMsgRetrieveDebugStr,// fixed to 512 bytes 4 now\r
+       kDefaultMessageSlots // this is how many messages we need :)\r
+};\r
+\r
+\r
+// event messages to launcher\r
+enum TPicoLauncherEvents {\r
+       EEventKeyCfgDone = EEventUser + 1,\r
+       EEventGamePaused,\r
+};\r
+\r
+\r
+// configuration data to be sent between server and client\r
+struct TPicoConfig {\r
+       enum TPicoScreenRotation {\r
+               PRot0,\r
+               PRot90,\r
+               PRot180,\r
+               PRot270\r
+       };\r
+       enum TPicoScreenMode {\r
+               PMCenter,\r
+               PMFit,\r
+               PMFit2\r
+       };\r
+       enum TPicoFrameSkip {\r
+               PFSkipAuto = -1,\r
+               PFSkip0\r
+       };\r
+       TInt32                          iScreenRotation;\r
+       TInt32                          iScreenMode;\r
+       TUint32                         iFlags;   // LSb->MSb: use_sram, show_fps, enable_sound, sound_rate(3bits), gzip_saves{=0x40}, dont_use_mot_vol\r
+    // enable_ym2612&dac, enable_sn76496, enable_z80, stereo_sound;\r
+    // alt_renderer, 6button_gamepad, accurate_timing\r
+       TInt32                          iPicoOpt;\r
+       TInt32                          iFrameskip;\r
+       TUint32                         iKeyBinds[32];\r
+       TUint32                         iAreaBinds[19];\r
+       TInt32                          PicoRegion;\r
+};\r
+\r
+\r
+#endif // __CLIENTSERVER_H\r