1 /* Copyright 2006 Theo Berkau 2 3 This file is part of Yabause. 4 5 Yabause is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 Yabause is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with Yabause; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 /*! \file bios.h 21 \brief Header for emulated bios functions required for running games and saving backup ram. 22 */ 23 24 #ifndef BIOS_H 25 #define BIOS_H 26 27 #include "sh2core.h" 28 29 typedef struct 30 { 31 char filename[12]; 32 char comment[11]; 33 u8 language; 34 u8 year; 35 u8 month; 36 u8 day; 37 u8 hour; 38 u8 minute; 39 u8 week; 40 u32 datasize; 41 u16 blocksize; 42 } saveinfo_struct; 43 44 typedef struct 45 { 46 u8 id; 47 char name[32]; 48 } deviceinfo_struct; 49 50 void BiosInit(void); 51 int FASTCALL BiosHandleFunc(SH2_struct * sh); 52 53 deviceinfo_struct *BupGetDeviceList(int *numdevices); 54 int BupGetStats(SH2_struct *sh, u32 device, u32 *freespace, u32 *maxspace); 55 saveinfo_struct *BupGetSaveList(SH2_struct *sh, u32 device, int *numsaves); 56 int BupDeleteSave(SH2_struct *sh, u32 device, const char *savename); 57 void BupFormat(u32 device); 58 int BupCopySave(u32 srcdevice, u32 dstdevice, const char *savename); 59 int BupImportSave(u32 device, const char *filename); 60 int BupExportSave(u32 device, const char *savename, const char *filename); 61 #endif 62 63