1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 * Mupen64plus - rom.h * 3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * 4 * Copyright (C) 2008 Tillin9 * 5 * Copyright (C) 2002 Hacktarux * 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 * 19 * Free Software Foundation, Inc., * 20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 21 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 22 23 #ifndef __ROM_H__ 24 #define __ROM_H__ 25 26 #include "api/m64p_types.h" 27 #include "md5.h" 28 29 /* ROM Loading and Saving functions */ 30 31 m64p_error open_rom(const unsigned char* romimage, unsigned int size); 32 m64p_error close_rom(void); 33 34 extern unsigned char* g_rom; 35 extern int g_rom_size; 36 extern int g_vi_refresh_rate; 37 extern unsigned char g_fixed_audio_pos; 38 39 typedef struct _rom_params 40 { 41 m64p_system_type systemtype; 42 char headername[21]; /* ROM Name as in the header, removing trailing whitespace */ 43 int fixedaudiopos; 44 int audiosignal; 45 int special_rom; 46 } rom_params; 47 48 extern m64p_rom_header ROM_HEADER; 49 extern rom_params ROM_PARAMS; 50 extern m64p_rom_settings ROM_SETTINGS; 51 52 /* Supported rom image types. */ 53 enum 54 { 55 Z64IMAGE, 56 V64IMAGE, 57 N64IMAGE 58 }; 59 60 /* Supported CIC chips. */ 61 enum 62 { 63 CIC_NUS_6101, 64 CIC_NUS_6102, 65 CIC_NUS_6103, 66 CIC_NUS_6105, 67 CIC_NUS_6106, 68 CIC_NUS_5167, 69 CIC_NUS_8303, 70 CIC_NUS_USDD, 71 CIC_NUS_DVDD 72 }; 73 74 /* Supported save types. */ 75 enum 76 { 77 EEPROM_4KB, 78 EEPROM_16KB, 79 SRAM, 80 FLASH_RAM, 81 CONTROLLER_PACK, 82 NONE 83 }; 84 85 /*ROM specific hacks */ 86 enum 87 { 88 NORMAL_ROM, 89 GOLDEN_EYE, 90 RAT_ATTACK, 91 PERFECT_DARK 92 }; 93 94 #endif /* __ROM_H__ */ 95 96