| 1 | /* FCE Ultra - NES/Famicom Emulator |
| 2 | * |
| 3 | * Copyright notice for this file: |
| 4 | * Copyright (C) 1998 Bero |
| 5 | * Copyright (C) 2002 Ben Parnell |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 20 | */ |
| 21 | |
| 22 | #include "driver.h" |
| 23 | |
| 24 | typedef struct { |
| 25 | int PAL; |
| 26 | #ifdef NETWORK |
| 27 | int NetworkPlay; |
| 28 | #endif |
| 29 | int SoundVolume; |
| 30 | int GameGenie; |
| 31 | int SUnderBase; |
| 32 | |
| 33 | /* Current first and last rendered scanlines. */ |
| 34 | int FirstSLine; |
| 35 | int LastSLine; |
| 36 | |
| 37 | /* Driver code(user)-specified first and last rendered scanlines. |
| 38 | Usr*SLine[0] is for NTSC, Usr*SLine[1] is for PAL. |
| 39 | */ |
| 40 | int UsrFirstSLine[2]; |
| 41 | int UsrLastSLine[2]; |
| 42 | int SnapName; |
| 43 | unsigned int SndRate; |
| 44 | } FCEUS; |
| 45 | |
| 46 | extern FCEUS FSettings; |
| 47 | |
| 48 | void FCEU_PrintError(char *format, ...); |
| 49 | void FCEU_DispMessage(char *format, ...); |
| 50 | #define FCEU_printf printf |
| 51 | |
| 52 | void DrawTextTrans(uint8 *dest, uint32 width, uint8 *textmsg, uint8 fgcolor); |
| 53 | void FCEU_PutImage(void); |
| 54 | #ifdef FRAMESKIP |
| 55 | void FCEU_PutImageDummy(void); |
| 56 | #endif |
| 57 | |
| 58 | extern uint8 Exit; |
| 59 | extern uint8 pale; |
| 60 | extern uint8 vsdip; |
| 61 | |
| 62 | #define JOY_A 1 |
| 63 | #define JOY_B 2 |
| 64 | #define JOY_SELECT 4 |
| 65 | #define JOY_START 8 |
| 66 | #define JOY_UP 0x10 |
| 67 | #define JOY_DOWN 0x20 |
| 68 | #define JOY_LEFT 0x40 |
| 69 | #define JOY_RIGHT 0x80 |
| 70 | |
| 71 | void DoCommand(uint8 c); |
| 72 | extern uint8 CommandQueue; |
| 73 | |
| 74 | void FlushCommandQueue(void); |