1/*****************************************************************************\
2 Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
3 This file is licensed under the Snes9x License.
4 For further information, consult the LICENSE file in the root directory.
5\*****************************************************************************/
6
7#ifndef _BSX_H_
8#define _BSX_H_
9
10#include <fstream>
11
12struct SBSX
13{
14 bool8 dirty; // Changed register values
15 bool8 dirty2; // Changed register values
16 bool8 bootup; // Start in bios mapping
17 bool8 flash_enable; // Flash state
18 bool8 write_enable; // ROM write protection
19 bool8 read_enable; // Allow card vendor reading
20 uint32 flash_command; // Flash command
21 uint32 old_write; // Previous flash write address
22 uint32 new_write; // Current flash write address
23 uint8 out_index;
24 uint8 output[32];
25 uint8 PPU[32];
26 uint8 MMC[16];
27 uint8 prevMMC[16];
28 uint8 test2192[32];
29
30 bool flash_csr;
31 bool flash_gsr;
32 bool flash_bsr;
33 bool flash_cmd_done;
34
35 std::ifstream sat_stream1;
36 std::ifstream sat_stream2;
37
38 bool sat_pf_latch1_enable, sat_dt_latch1_enable;
39 bool sat_pf_latch2_enable, sat_dt_latch2_enable;
40
41 bool sat_stream1_loaded, sat_stream2_loaded;
42 bool sat_stream1_first, sat_stream2_first;
43 uint8 sat_stream1_count, sat_stream2_count;
44 uint16 sat_stream1_queue, sat_stream2_queue;
45};
46
47extern struct SBSX BSX;
48
49uint8 S9xGetBSX (uint32);
50void S9xSetBSX (uint8, uint32);
51uint8 S9xGetBSXPPU (uint16);
52void S9xSetBSXPPU (uint8, uint16);
53uint8 * S9xGetBasePointerBSX (uint32);
54void S9xInitBSX (void);
55void S9xResetBSX (void);
56void S9xBSXPostLoadState (void);
57
58#endif
59