My favorites | Sign in
Project Home Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
Changes to /yabause/src/yabause/cs0.h
c5e341fa6aad vs. b045a477886c Compare: vs.  Format:
Revision b045a477886c
Go to: 
Project members, sign in to write a code review
/yabause/src/yabause/cs0.h   c5e341fa6aad /yabause/src/yabause/cs0.h   b045a477886c
1 /* Copyright 2004-2005 Theo Berkau 1 /* Copyright 2004-2005 Theo Berkau
2 Copyright 2005 Guillaume Duhamel 2 Copyright 2005 Guillaume Duhamel
3 3
4 This file is part of Yabause. 4 This file is part of Yabause.
5 5
6 Yabause is free software; you can redistribute it and/or modify 6 Yabause is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 Yabause is distributed in the hope that it will be useful, 11 Yabause is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with Yabause; if not, write to the Free Software 17 along with Yabause; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21 #ifndef CS0_H 21 #ifndef CS0_H
22 #define CS0_H 22 #define CS0_H
23 23
24 #include "memory.h" 24 #include "memory.h"
25 25
26 #define CART_NONE 0 26 #define CART_NONE 0
27 #define CART_PAR 1 27 #define CART_PAR 1
28 #define CART_BACKUPRAM4MBIT 2 28 #define CART_BACKUPRAM4MBIT 2
29 #define CART_BACKUPRAM8MBIT 3 29 #define CART_BACKUPRAM8MBIT 3
30 #define CART_BACKUPRAM16MBIT 4 30 #define CART_BACKUPRAM16MBIT 4
31 #define CART_BACKUPRAM32MBIT 5 31 #define CART_BACKUPRAM32MBIT 5
32 #define CART_DRAM8MBIT 6 32 #define CART_DRAM8MBIT 6
33 #define CART_DRAM32MBIT 7 33 #define CART_DRAM32MBIT 7
34 #define CART_NETLINK 8 34 #define CART_NETLINK 8
35 #define CART_ROM16MBIT 9 35 #define CART_ROM16MBIT 9
36 #define CART_JAPMODEM 10 36 #define CART_JAPMODEM 10
37 37
38 typedef struct 38 typedef struct
39 { 39 {
40 int carttype; 40 int carttype;
41 int cartid; 41 int cartid;
42 const char *filename; 42 const char *filename;
43 43
44 u8 FASTCALL (*Cs0ReadByte)(u32 addr); 44 u8 FASTCALL (*Cs0ReadByte)(u32 addr);
45 u16 FASTCALL (*Cs0ReadWord)(u32 addr); 45 u16 FASTCALL (*Cs0ReadWord)(u32 addr);
46 u32 FASTCALL (*Cs0ReadLong)(u32 addr); 46 u32 FASTCALL (*Cs0ReadLong)(u32 addr);
47 void FASTCALL (*Cs0WriteByte)(u32 addr, u8 val); 47 void FASTCALL (*Cs0WriteByte)(u32 addr, u8 val);
48 void FASTCALL (*Cs0WriteWord)(u32 addr, u16 val); 48 void FASTCALL (*Cs0WriteWord)(u32 addr, u16 val);
49 void FASTCALL (*Cs0WriteLong)(u32 addr, u32 val); 49 void FASTCALL (*Cs0WriteLong)(u32 addr, u32 val);
50 50
51 u8 FASTCALL (*Cs1ReadByte)(u32 addr); 51 u8 FASTCALL (*Cs1ReadByte)(u32 addr);
52 u16 FASTCALL (*Cs1ReadWord)(u32 addr); 52 u16 FASTCALL (*Cs1ReadWord)(u32 addr);
53 u32 FASTCALL (*Cs1ReadLong)(u32 addr); 53 u32 FASTCALL (*Cs1ReadLong)(u32 addr);
54 void FASTCALL (*Cs1WriteByte)(u32 addr, u8 val); 54 void FASTCALL (*Cs1WriteByte)(u32 addr, u8 val);
55 void FASTCALL (*Cs1WriteWord)(u32 addr, u16 val); 55 void FASTCALL (*Cs1WriteWord)(u32 addr, u16 val);
56 void FASTCALL (*Cs1WriteLong)(u32 addr, u32 val); 56 void FASTCALL (*Cs1WriteLong)(u32 addr, u32 val);
57 57
58 u8 FASTCALL (*Cs2ReadByte)(u32 addr); 58 u8 FASTCALL (*Cs2ReadByte)(u32 addr);
59 u16 FASTCALL (*Cs2ReadWord)(u32 addr); 59 u16 FASTCALL (*Cs2ReadWord)(u32 addr);
60 u32 FASTCALL (*Cs2ReadLong)(u32 addr); 60 u32 FASTCALL (*Cs2ReadLong)(u32 addr);
61 void FASTCALL (*Cs2WriteByte)(u32 addr, u8 val); 61 void FASTCALL (*Cs2WriteByte)(u32 addr, u8 val);
62 void FASTCALL (*Cs2WriteWord)(u32 addr, u16 val); 62 void FASTCALL (*Cs2WriteWord)(u32 addr, u16 val);
63 void FASTCALL (*Cs2WriteLong)(u32 addr, u32 val); 63 void FASTCALL (*Cs2WriteLong)(u32 addr, u32 val);
64 64
65 void *rom; 65 void *rom;
66 void *bupram; 66 void *bupram;
67 void *dram; 67 void *dram;
68 } cartridge_struct; 68 } cartridge_struct;
69 69
70 extern cartridge_struct *CartridgeArea; 70 extern cartridge_struct *CartridgeArea;
71 71
72 int CartInit(const char *filename, int); 72 int CartInit(const char *filename, int);
73 void CartDeInit(void); 73 void CartDeInit(void);
74 74
75 #ifndef MDFNPS3 //Save state hack
75 int CartSaveState(FILE *fp); 76 int CartSaveState(FILE *fp);
76 int CartLoadState(FILE *fp, int version, int size); 77 int CartLoadState(FILE *fp, int version, int size);
78 #else
79 int CartSaveState(StateMemTag *fp);
80 int CartLoadState(StateMemTag *fp, int version, int size);
81 #endif
77 82
78 #endif 83 #endif
Powered by Google Project Hosting