| 247 | */ |
| 248 | extern int eoptions; |
| 249 | static void SetInputNes20(uint8 expansion) { |
| 250 | static struct INPSEL_NES20 moo[] = |
| 251 | { |
| 252 | {0x01, SI_GAMEPAD, SI_GAMEPAD, SIFC_UNSET }, // Standard NES/Famicom controllers |
| 253 | {0x02, SI_GAMEPAD, SI_GAMEPAD, SIFC_NONE }, // NES Four Score/Satellite with two additional standard controllers |
| 254 | {0x03, SI_GAMEPAD, SI_GAMEPAD, SIFC_4PLAYER }, // Famicom Four Players Adapter with two additional standard controllers using the "simple" protocol |
| 255 | {0x04, SI_GAMEPAD, SI_GAMEPAD, SIFC_NONE }, // Vs. System (1P via $4016) |
| 256 | {0x05, SI_GAMEPAD, SI_GAMEPAD, SIFC_NONE }, // Vs. System (1P via $4017) |
| 257 | {0x07, SI_ZAPPER, SI_NONE, SIFC_NONE }, // Vs. Zapper |
| 258 | {0x08, SI_UNSET, SI_ZAPPER, SIFC_NONE }, // Zapper ($4017) |
| 259 | {0x0A, SI_UNSET, SI_UNSET, SIFC_SHADOW }, // Bandai Hyper Shot Lightgun |
| 260 | {0x0B, SI_UNSET, SI_POWERPADA, SIFC_UNSET }, // Power Pad Side A |
| 261 | {0x0C, SI_UNSET, SI_POWERPADB, SIFC_UNSET }, // Power Pad Side B |
| 262 | {0x0D, SI_UNSET, SI_UNSET, SIFC_FTRAINERA }, // Family Trainer Side A |
| 263 | {0x0E, SI_UNSET, SI_UNSET, SIFC_FTRAINERB }, // Family Trainer Side B |
| 264 | {0x0F, SI_UNSET, SI_ARKANOID, SIFC_UNSET }, // Arkanoid Vaus Controller (NES) |
| 265 | {0x10, SI_UNSET, SI_UNSET, SIFC_ARKANOID }, // Arkanoid Vaus Controller (Famicom) |
| 266 | {0x12, SI_UNSET, SI_UNSET, SIFC_HYPERSHOT }, // Konami Hyper Shot Controller |
| 267 | {0x15, SI_UNSET, SI_UNSET, SIFC_MAHJONG }, // Jissen Mahjong Controller |
| 268 | {0x17, SI_UNSET, SI_UNSET, SIFC_OEKAKIDS }, // Oeka Kids Tablet |
| 269 | {0x18, SI_UNSET, SI_UNSET, SIFC_BWORLD }, // Sunsoft Barcode Battler |
| 270 | {0x1B, SI_UNSET, SI_UNSET, SIFC_TOPRIDER }, // Top Rider (Inflatable Bicycle) |
| 271 | {0x23, SI_UNSET, SI_UNSET, SIFC_FKB }, // Family BASIC Keyboard plus Famicom Data Recorder |
| 272 | {0x24, SI_UNSET, SI_UNSET, SIFC_PEC586KB }, // Dongda PEC-586 Keyboard |
| 273 | {0x26, SI_UNSET, SI_UNSET, SIFC_SUBORKB }, // Subor Keyboard |
| 274 | //{0x27, SI_UNSET, SI_MOUSE, SIFC_SUBORKB }, // Subor Keyboard plus mouse (3x8-bit protocol) |
| 275 | {0x28, SI_UNSET, SI_MOUSE, SIFC_SUBORKB }, // Subor Keyboard plus mouse (24-bit protocol) |
| 276 | {0x29, SI_UNSET, SI_SNES_MOUSE, SIFC_UNSET }, // SNES Mouse |
| 277 | {0, SI_UNSET, SI_UNSET, SIFC_UNSET } |
| 278 | }; |
| 279 | |
| 280 | int x = 0; |
| 281 | |
| 282 | if (expansion == 0x02) |
| 283 | eoptions |= 32768; // dirty hack to enable Four-Score |
| 284 | GameInfo->vs_cswitch = expansion == 0x05; |
| 285 | |
| 286 | while (moo[x].expansion_id) { |
| 287 | if (moo[x].expansion_id == expansion) { |
| 288 | GameInfo->input[0] = moo[x].input1; |
| 289 | GameInfo->input[1] = moo[x].input2; |
| 290 | GameInfo->inputfc = moo[x].inputfc; |
| 291 | break; } |
| 292 | x++; |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | #define INESB_INCOMPLETE 1 |
| 297 | #define INESB_CORRUPT 2 |