| 1 | NAME PCDR\r |
| 2 | \r |
| 3 | #include <eikon.rh>\r |
| 4 | #include <eikon.rsg>\r |
| 5 | #include <qikon.rh>\r |
| 6 | #include <qikcommand.rh>\r |
| 7 | #include "picodrive.hrh"\r |
| 8 | \r |
| 9 | \r |
| 10 | RESOURCE RSS_SIGNATURE { }\r |
| 11 | \r |
| 12 | // Defines the name of the default file the application framework creates.\r |
| 13 | // This resource must always be the second resource in the resource file.\r |
| 14 | RESOURCE TBUF { buf = "PicoDrive"; }\r |
| 15 | \r |
| 16 | RESOURCE EIK_APP_INFO { }\r |
| 17 | \r |
| 18 | \r |
| 19 | // A view shall use the QIK_VIEW_CONFIGURATIONS resource struct to define which \r |
| 20 | // UI configurations it supports. Can also use QIK_VIEW_CONFIGURATIONS to setup \r |
| 21 | // the view to switch layout and command list automatically when changes of UI \r |
| 22 | // configuration occur. This is done with the view and command_list members of \r |
| 23 | // the QIK_VIEW_CONFIGURATIONS.\r |
| 24 | // The application supports the reference UI Configurations that are supported\r |
| 25 | // in the UIQ 3 SDK. Use the UiqEnv tool, to change the UI Configuration in the\r |
| 26 | // emulator in order to develop and test the application with varying phone styles.\r |
| 27 | RESOURCE QIK_VIEW_CONFIGURATIONS r_app_ui_configurations\r |
| 28 | {\r |
| 29 | configurations = \r |
| 30 | {\r |
| 31 | QIK_VIEW_CONFIGURATION\r |
| 32 | {\r |
| 33 | ui_config_mode = KQikPenStyleTouchPortrait;\r |
| 34 | command_list = r_app_commands;\r |
| 35 | view = r_app_layout;\r |
| 36 | },\r |
| 37 | QIK_VIEW_CONFIGURATION\r |
| 38 | {\r |
| 39 | ui_config_mode = KQikPenStyleTouchLandscape;\r |
| 40 | command_list = r_app_commands;\r |
| 41 | view = r_app_layout;\r |
| 42 | },\r |
| 43 | QIK_VIEW_CONFIGURATION\r |
| 44 | {\r |
| 45 | ui_config_mode = KQikSoftkeyStyleTouchPortrait;\r |
| 46 | command_list = r_app_commands;\r |
| 47 | view = r_app_layout;\r |
| 48 | },\r |
| 49 | QIK_VIEW_CONFIGURATION\r |
| 50 | {\r |
| 51 | ui_config_mode = KQikSoftkeyStylePortrait;\r |
| 52 | command_list = r_app_commands;\r |
| 53 | view = r_app_layout;\r |
| 54 | },\r |
| 55 | QIK_VIEW_CONFIGURATION\r |
| 56 | {\r |
| 57 | ui_config_mode = KQikSoftkeyStyleSmallPortrait;\r |
| 58 | command_list = r_app_commands;\r |
| 59 | view = r_app_layout;\r |
| 60 | }\r |
| 61 | };\r |
| 62 | }\r |
| 63 | \r |
| 64 | // Commands are defined with the QIK_COMMAND_LIST struct, \r |
| 65 | // commands can also be created in code by instantiating CQikCommand.\r |
| 66 | // The control command id for debug command is a reserved id from uikon.hrh.\r |
| 67 | // The id for each command is defined in the .hrh file.\r |
| 68 | RESOURCE QIK_COMMAND_LIST r_app_commands\r |
| 69 | {\r |
| 70 | items = \r |
| 71 | {\r |
| 72 | // QIK_COMMAND { id=EEikCmdPicoMain; text="Main"; type=EQikCommandTypeDone; namedGroupLinkId=EEikCmdPicoMain; },\r |
| 73 | // QIK_COMMAND { id=EEikCmdPicoDebugInfo; text="Debug info"; type=EQikCommandTypeScreen; stateFlags=EQikCmdFlagDebugOnly; },\r |
| 74 | QIK_COMMAND { id=EEikCmdPicoFrameskip; text="Frameskip"; type=EQikCommandTypeScreen; namedGroupLinkId=EEikCmdPicoFrameskip; },\r |
| 75 | QIK_COMMAND { id=EEikCmdPicoFrameskipAuto; text="Auto"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoFrameskip;\r |
| 76 | groupId=EEikCmdPicoFrameskip; stateFlags=EQikCmdFlagRadioStart; },\r |
| 77 | QIK_COMMAND { id=EEikCmdPicoFrameskip0; text="0"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoFrameskip;\r |
| 78 | groupId=EEikCmdPicoFrameskip0; stateFlags=EQikCmdFlagRadioMiddle; },\r |
| 79 | QIK_COMMAND { id=EEikCmdPicoFrameskip1; text="1"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoFrameskip;\r |
| 80 | groupId=EEikCmdPicoFrameskip0; stateFlags=EQikCmdFlagRadioMiddle; },\r |
| 81 | QIK_COMMAND { id=EEikCmdPicoFrameskip2; text="2"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoFrameskip;\r |
| 82 | groupId=EEikCmdPicoFrameskip0; stateFlags=EQikCmdFlagRadioMiddle; },\r |
| 83 | QIK_COMMAND { id=EEikCmdPicoFrameskip4; text="4"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoFrameskip;\r |
| 84 | groupId=EEikCmdPicoFrameskip0; stateFlags=EQikCmdFlagRadioMiddle; },\r |
| 85 | QIK_COMMAND { id=EEikCmdPicoFrameskip8; text="8"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoFrameskip;\r |
| 86 | groupId=EEikCmdPicoFrameskip0; stateFlags=EQikCmdFlagRadioEnd; },\r |
| 87 | QIK_COMMAND { id=EEikCmdPicoConfig; text="Configure"; type=EQikCommandTypeScreen; namedGroupLinkId=EEikCmdPicoConfig; },\r |
| 88 | QIK_COMMAND { id=EEikCmdPicoKeys; text="Keys"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoConfig; },\r |
| 89 | QIK_COMMAND { id=EEikCmdPicoSettings; text="Settings"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoConfig; },\r |
| 90 | QIK_COMMAND { id=EEikCmdHelpAbout; text="About"; type=EQikCommandTypeScreen; namedGroupId=EEikCmdPicoConfig; },\r |
| 91 | \r |
| 92 | QIK_COMMAND { id=EEikCmdPicoLoadROM; text="Load new ROM/ISO";type=EQikCommandTypeScreen; groupId=EEikCmdPicoResume; },\r |
| 93 | QIK_COMMAND { id=EEikCmdPicoReset; text="Reset game"; type=EQikCommandTypeScreen; groupId=EEikCmdPicoResume; },\r |
| 94 | QIK_COMMAND { id=EEikCmdPicoLoadState; text="Load state"; type=EQikCommandTypeScreen; groupId=EEikCmdPicoResume; },\r |
| 95 | QIK_COMMAND { id=EEikCmdPicoSaveState; text="Save state"; type=EQikCommandTypeScreen; groupId=EEikCmdPicoResume; },\r |
| 96 | QIK_COMMAND { id=EEikCmdPicoResume; text="Resume game"; type=EQikCommandTypeScreen; groupId=EEikCmdPicoResume; cpfFlags=EQikCpfFlagIsDefault; },\r |
| 97 | \r |
| 98 | QIK_COMMAND { id=EEikCmdExit; text="Exit"; type=EQikCommandTypeScreen; groupId=EEikCmdExit; }\r |
| 99 | };\r |
| 100 | }\r |
| 101 | \r |
| 102 | \r |
| 103 | // Defines the view by linking to the pages.\r |
| 104 | RESOURCE QIK_VIEW r_app_layout\r |
| 105 | {\r |
| 106 | pages = {};\r |
| 107 | }\r |
| 108 | \r |
| 109 | \r |
| 110 | /**************************************\r |
| 111 | *\r |
| 112 | * config dialog\r |
| 113 | *\r |
| 114 | **************************************/\r |
| 115 | \r |
| 116 | RESOURCE DIALOG r_pico_config\r |
| 117 | {\r |
| 118 | title = "Settings";\r |
| 119 | buttons = R_EIK_BUTTONS_CANCEL_OK;\r |
| 120 | flags = EEikDialogFlagWait;\r |
| 121 | pages = r_pico_config_pages;\r |
| 122 | }\r |
| 123 | \r |
| 124 | RESOURCE ARRAY r_pico_config_pages\r |
| 125 | {\r |
| 126 | items = {\r |
| 127 | PAGE\r |
| 128 | {\r |
| 129 | id = ECtlOptPageMain;\r |
| 130 | text = "Main";\r |
| 131 | lines = r_pico_config_page_main;\r |
| 132 | },\r |
| 133 | PAGE\r |
| 134 | {\r |
| 135 | id = ECtlOptPageSound;\r |
| 136 | text = "Sound";\r |
| 137 | lines = r_pico_config_page_sound;\r |
| 138 | },\r |
| 139 | PAGE\r |
| 140 | {\r |
| 141 | id = ECtlOptPageMCD;\r |
| 142 | text = "MegaCD";\r |
| 143 | lines = r_pico_config_page_mcd;\r |
| 144 | },\r |
| 145 | PAGE\r |
| 146 | {\r |
| 147 | id = ECtlOptPageMisc;\r |
| 148 | text = "Misc";\r |
| 149 | lines = r_pico_config_page_misc;\r |
| 150 | }\r |
| 151 | };\r |
| 152 | }\r |
| 153 | \r |
| 154 | \r |
| 155 | RESOURCE ARRAY r_pico_config_page_main\r |
| 156 | {\r |
| 157 | items = {\r |
| 158 | DLG_LINE\r |
| 159 | {\r |
| 160 | id = ECtlOptRotationLabel;\r |
| 161 | type = EEikCtLabel;\r |
| 162 | prompt = "Screen Rotation";\r |
| 163 | control = LABEL { horiz_align = EEikLabelAlignHLeft; };\r |
| 164 | },\r |
| 165 | DLG_LINE\r |
| 166 | {\r |
| 167 | id = ECtlOptRotation;\r |
| 168 | type = EEikCtHorOptionButList;\r |
| 169 | control = HOROPBUT\r |
| 170 | {\r |
| 171 | array_id = r_pico_config_rotation_buttons;\r |
| 172 | };\r |
| 173 | },\r |
| 174 | DLG_LINE\r |
| 175 | {\r |
| 176 | id = ECtlOptScreenModeLabel;\r |
| 177 | type = EEikCtLabel;\r |
| 178 | prompt = "Screen Mode";\r |
| 179 | control = LABEL { horiz_align = EEikLabelAlignHLeft; };\r |
| 180 | },\r |
| 181 | DLG_LINE\r |
| 182 | {\r |
| 183 | id = ECtlOptScreenMode;\r |
| 184 | type = EEikCtHorOptionButList;\r |
| 185 | control = HOROPBUT\r |
| 186 | {\r |
| 187 | array_id = r_pico_config_screenmode_buttons;\r |
| 188 | };\r |
| 189 | },\r |
| 190 | DLG_LINE\r |
| 191 | {\r |
| 192 | id = ECtlOptUseAltRend;\r |
| 193 | type = EEikCtCheckBox;\r |
| 194 | prompt = "Fast renderer (inaccurate)";\r |
| 195 | },\r |
| 196 | DLG_LINE\r |
| 197 | {\r |
| 198 | id = ECtlOptShowFPS;\r |
| 199 | type = EEikCtCheckBox;\r |
| 200 | prompt = "Show FPS";\r |
| 201 | }\r |
| 202 | };\r |
| 203 | }\r |
| 204 | \r |
| 205 | \r |
| 206 | RESOURCE ARRAY r_pico_config_page_sound\r |
| 207 | {\r |
| 208 | items = {\r |
| 209 | DLG_LINE\r |
| 210 | {\r |
| 211 | id = ECtlOptEnableSound;\r |
| 212 | type = EEikCtCheckBox;\r |
| 213 | prompt = "Enable sound";\r |
| 214 | },\r |
| 215 | DLG_LINE\r |
| 216 | {\r |
| 217 | id = ECtlOptChipSelLabel;\r |
| 218 | type = EEikCtLabel;\r |
| 219 | prompt = "Emulate these sound chips:";\r |
| 220 | control = LABEL { horiz_align = EEikLabelAlignHLeft; };\r |
| 221 | },\r |
| 222 | DLG_LINE\r |
| 223 | {\r |
| 224 | id = ECtlOptEmulateZ80;\r |
| 225 | type = EEikCtCheckBox;\r |
| 226 | prompt = "Z80";\r |
| 227 | },\r |
| 228 | DLG_LINE\r |
| 229 | {\r |
| 230 | id = ECtlOptEmulateYM2612;\r |
| 231 | type = EEikCtCheckBox;\r |
| 232 | prompt = "YM2612";\r |
| 233 | },\r |
| 234 | DLG_LINE\r |
| 235 | {\r |
| 236 | id = ECtlOptEmulateSN76496;\r |
| 237 | type = EEikCtCheckBox;\r |
| 238 | prompt = "SN76496 (PSG)";\r |
| 239 | },\r |
| 240 | DLG_LINE\r |
| 241 | {\r |
| 242 | id = ECtlOptSndQLabel;\r |
| 243 | type = EEikCtLabel;\r |
| 244 | prompt = "Quality (lowest is fastest)";\r |
| 245 | control = LABEL { horiz_align = EEikLabelAlignHLeft; };\r |
| 246 | },\r |
| 247 | DLG_LINE\r |
| 248 | {\r |
| 249 | id = ECtlOptSndQuality;\r |
| 250 | type = EEikCtChoiceList;\r |
| 251 | prompt = "";\r |
| 252 | control = CHOICELIST { array_id = r_pico_config_snd_quality; };\r |
| 253 | itemflags = EEikDlgItemNonFocusing;\r |
| 254 | }\r |
| 255 | };\r |
| 256 | }\r |
| 257 | \r |
| 258 | \r |
| 259 | RESOURCE ARRAY r_pico_config_page_mcd\r |
| 260 | {\r |
| 261 | items = {\r |
| 262 | DLG_LINE\r |
| 263 | {\r |
| 264 | id = ECtlOptCDcdda;\r |
| 265 | type = EEikCtCheckBox;\r |
| 266 | prompt = "CDDA audio";\r |
| 267 | },\r |
| 268 | DLG_LINE\r |
| 269 | {\r |
| 270 | id = ECtlOptCDpcm;\r |
| 271 | type = EEikCtCheckBox;\r |
| 272 | prompt = "PCM audio";\r |
| 273 | },\r |
| 274 | DLG_LINE\r |
| 275 | {\r |
| 276 | id = ECtlOptCDramcart;\r |
| 277 | type = EEikCtCheckBox;\r |
| 278 | prompt = "SaveRAM cart";\r |
| 279 | },\r |
| 280 | DLG_LINE\r |
| 281 | {\r |
| 282 | id = ECtlOptCDscalerot;\r |
| 283 | type = EEikCtCheckBox;\r |
| 284 | prompt = "Scale/Rot. fx (slow)";\r |
| 285 | },\r |
| 286 | DLG_LINE\r |
| 287 | {\r |
| 288 | id = ECtlOptCDbettersync;\r |
| 289 | type = EEikCtCheckBox;\r |
| 290 | prompt = "Better sync (slow)";\r |
| 291 | }\r |
| 292 | };\r |
| 293 | }\r |
| 294 | \r |
| 295 | \r |
| 296 | RESOURCE ARRAY r_pico_config_page_misc\r |
| 297 | {\r |
| 298 | items = {\r |
| 299 | DLG_LINE\r |
| 300 | {\r |
| 301 | id = ECtlOpt6ButtonPad;\r |
| 302 | type = EEikCtCheckBox;\r |
| 303 | prompt = "6 button pad";\r |
| 304 | },\r |
| 305 | DLG_LINE\r |
| 306 | {\r |
| 307 | id = ECtlOptGzipStates;\r |
| 308 | type = EEikCtCheckBox;\r |
| 309 | prompt = "gzip save states";\r |
| 310 | },\r |
| 311 | DLG_LINE\r |
| 312 | {\r |
| 313 | id = ECtlOptUseSRAM;\r |
| 314 | type = EEikCtCheckBox;\r |
| 315 | prompt = "Use SRAM saves (.srm)";\r |
| 316 | },\r |
| 317 | DLG_LINE\r |
| 318 | {\r |
| 319 | id = ECtlOptRegion;\r |
| 320 | type = EEikCtChoiceList;\r |
| 321 | prompt = "Region:";\r |
| 322 | control = CHOICELIST { array_id = r_pico_config_region; };\r |
| 323 | itemflags = EEikDlgItemNonFocusing;\r |
| 324 | }\r |
| 325 | };\r |
| 326 | }\r |
| 327 | \r |
| 328 | \r |
| 329 | RESOURCE ARRAY r_pico_config_rotation_buttons\r |
| 330 | {\r |
| 331 | items = {\r |
| 332 |