annotate system.h @ 2210:3e591869d135

SP should be set to $FFFF on reset
author Michael Pavone <pavone@retrodev.com>
date Sun, 28 Aug 2022 14:32:17 -0700
parents 9a8dd4ba2753
children a8af8d898a7c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef SYSTEM_H_
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define SYSTEM_H_
1690
319d90025d50 Implement serialization/deserialization in libretro build
Mike Pavone <pavone@retrodev.com>
parents: 1643
diff changeset
3 #include <stddef.h>
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 #include <stdint.h>
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
5 #include <stdio.h>
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 typedef struct system_header system_header;
1140
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
8 typedef struct system_media system_media;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 typedef enum {
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 SYSTEM_UNKNOWN,
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 SYSTEM_GENESIS,
1946
c3c62dbf1ceb WIP netplay support
Michael Pavone <pavone@retrodev.com>
parents: 1909
diff changeset
13 SYSTEM_GENESIS_PLAYER,
1472
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
14 SYSTEM_SEGACD,
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 SYSTEM_SMS,
1946
c3c62dbf1ceb WIP netplay support
Michael Pavone <pavone@retrodev.com>
parents: 1909
diff changeset
16 SYSTEM_SMS_PLAYER,
c3c62dbf1ceb WIP netplay support
Michael Pavone <pavone@retrodev.com>
parents: 1909
diff changeset
17 SYSTEM_JAGUAR,
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 } system_type;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20 typedef enum {
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 DEBUGGER_NATIVE,
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 DEBUGGER_GDB
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 } debugger_type;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 typedef void (*system_fun)(system_header *);
1117
928a65750345 Initial support for Genesis/Megadrive PBC mode. VDP still needs Mode 4 to be useful.
Michael Pavone <pavone@retrodev.com>
parents: 1113
diff changeset
26 typedef uint16_t (*system_fun_r16)(system_header *);
1149
6b0da6021544 Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
Michael Pavone <pavone@retrodev.com>
parents: 1140
diff changeset
27 typedef void (*system_str_fun)(system_header *, char *);
6b0da6021544 Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
Michael Pavone <pavone@retrodev.com>
parents: 1140
diff changeset
28 typedef uint8_t (*system_str_fun_r8)(system_header *, char *);
1583
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
29 typedef void (*system_u32_fun)(system_header *, uint32_t);
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
30 typedef void (*system_u8_fun)(system_header *, uint8_t);
1433
c886c54d8cf1 Added save states to SMS emulation
Michael Pavone <pavone@retrodev.com>
parents: 1208
diff changeset
31 typedef uint8_t (*system_u8_fun_r8)(system_header *, uint8_t);
1583
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
32 typedef void (*system_u8_u8_fun)(system_header *, uint8_t, uint8_t);
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
33 typedef void (*system_mabs_fun)(system_header *, uint8_t, uint16_t, uint16_t);
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
34 typedef void (*system_mrel_fun)(system_header *, uint8_t, int32_t, int32_t);
1690
319d90025d50 Implement serialization/deserialization in libretro build
Mike Pavone <pavone@retrodev.com>
parents: 1643
diff changeset
35 typedef uint8_t *(*system_ptrszt_fun_rptr8)(system_header *, size_t *);
319d90025d50 Implement serialization/deserialization in libretro build
Mike Pavone <pavone@retrodev.com>
parents: 1643
diff changeset
36 typedef void (*system_ptr8_sizet_fun)(system_header *, uint8_t *, size_t);
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37
1149
6b0da6021544 Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
Michael Pavone <pavone@retrodev.com>
parents: 1140
diff changeset
38 #include "arena.h"
6b0da6021544 Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
Michael Pavone <pavone@retrodev.com>
parents: 1140
diff changeset
39 #include "romdb.h"
1946
c3c62dbf1ceb WIP netplay support
Michael Pavone <pavone@retrodev.com>
parents: 1909
diff changeset
40 #include "event_log.h"
1149
6b0da6021544 Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
Michael Pavone <pavone@retrodev.com>
parents: 1140
diff changeset
41
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
42 struct system_header {
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
43 system_header *next_context;
1149
6b0da6021544 Don't lock up CPU if performing a read with writes configured when in PBC mode. Allow access to VDP debug commands from Z80 debugger in PBC mode. Handle Mode 4 in VDP debug print functions
Michael Pavone <pavone@retrodev.com>
parents: 1140
diff changeset
44 system_str_fun start_context;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
45 system_fun resume_context;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
46 system_fun load_save;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
47 system_fun persist_save;
1433
c886c54d8cf1 Added save states to SMS emulation
Michael Pavone <pavone@retrodev.com>
parents: 1208
diff changeset
48 system_u8_fun_r8 load_state;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
49 system_fun request_exit;
1208
95f5253e75c7 Implement soft reset in Genesis mode
Michael Pavone <pavone@retrodev.com>
parents: 1201
diff changeset
50 system_fun soft_reset;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
51 system_fun free_context;
1117
928a65750345 Initial support for Genesis/Megadrive PBC mode. VDP still needs Mode 4 to be useful.
Michael Pavone <pavone@retrodev.com>
parents: 1113
diff changeset
52 system_fun_r16 get_open_bus_value;
1583
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
53 system_u32_fun set_speed_percent;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
54 system_fun inc_debug_mode;
1583
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
55 system_u8_u8_fun gamepad_down;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
56 system_u8_u8_fun gamepad_up;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
57 system_u8_u8_fun mouse_down;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
58 system_u8_u8_fun mouse_up;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
59 system_mabs_fun mouse_motion_absolute;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
60 system_mrel_fun mouse_motion_relative;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
61 system_u8_fun keyboard_down;
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
62 system_u8_fun keyboard_up;
1595
360d5bab199f Update controller config when changed in UI without restart
Michael Pavone <pavone@retrodev.com>
parents: 1583
diff changeset
63 system_fun config_updated;
1690
319d90025d50 Implement serialization/deserialization in libretro build
Mike Pavone <pavone@retrodev.com>
parents: 1643
diff changeset
64 system_ptrszt_fun_rptr8 serialize;
319d90025d50 Implement serialization/deserialization in libretro build
Mike Pavone <pavone@retrodev.com>
parents: 1643
diff changeset
65 system_ptr8_sizet_fun deserialize;
1909
508522f08e4d Initial stab at VGM logging support
Michael Pavone <pavone@retrodev.com>
parents: 1690
diff changeset
66 system_str_fun start_vgm_log;
508522f08e4d Initial stab at VGM logging support
Michael Pavone <pavone@retrodev.com>
parents: 1690
diff changeset
67 system_fun stop_vgm_log;
1595
360d5bab199f Update controller config when changed in UI without restart
Michael Pavone <pavone@retrodev.com>
parents: 1583
diff changeset
68 rom_info info;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
69 arena *arena;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
70 char *next_rom;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
71 char *save_dir;
2179
9a8dd4ba2753 Implement frame advance debugger command
Michael Pavone <pavone@retrodev.com>
parents: 2116
diff changeset
72 int enter_debugger_frames;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
73 uint8_t enter_debugger;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
74 uint8_t should_exit;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
75 uint8_t save_state;
1479
a568dca999b2 Fix genesis save state loading via Nuklear UI, sms probably still needs work
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
76 uint8_t delayed_load_slot;
1583
430dd12e4010 Refactor to split device bindings from IO emulation code
Michael Pavone <pavone@retrodev.com>
parents: 1479
diff changeset
77 uint8_t has_keyboard;
1909
508522f08e4d Initial stab at VGM logging support
Michael Pavone <pavone@retrodev.com>
parents: 1690
diff changeset
78 uint8_t vgm_logging;
1980
81df9aa2de9b Less hacky run on audio thread mode
Michael Pavone <pavone@retrodev.com>
parents: 1946
diff changeset
79 uint8_t force_release;
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80 debugger_type debugger_type;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81 system_type type;
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 };
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83
1472
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
84 typedef enum {
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
85 MEDIA_CART,
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
86 MEDIA_CDROM
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
87 } media_type;
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
88
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
89 typedef enum {
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
90 TRACK_AUDIO,
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
91 TRACK_DATA
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
92 } track_type;
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
93
2116
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
94 enum {
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
95 SUBCODES_NONE,
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
96 SUBCODES_RAW,
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
97 SUBCODES_COOKED
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
98 };
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
99
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
100 typedef struct {
2114
2449c88cea36 Enhance support for CUE files and add initial support for cdrdao TOC files
Michael Pavone <pavone@retrodev.com>
parents: 2089
diff changeset
101 FILE *f;
2449c88cea36 Enhance support for CUE files and add initial support for cdrdao TOC files
Michael Pavone <pavone@retrodev.com>
parents: 2089
diff changeset
102 uint32_t file_offset;
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
103 uint32_t fake_pregap;
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
104 uint32_t pregap_lba;
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
105 uint32_t start_lba;
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
106 uint32_t end_lba;
2114
2449c88cea36 Enhance support for CUE files and add initial support for cdrdao TOC files
Michael Pavone <pavone@retrodev.com>
parents: 2089
diff changeset
107 uint16_t sector_bytes;
2089
0db3af42dd72 Fix some byte order stuff for audio tracks
Michael Pavone <pavone@retrodev.com>
parents: 2080
diff changeset
108 uint8_t need_swap;
2116
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
109 uint8_t has_subcodes;
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
110 track_type type;
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
111 } track_info;
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
112
2080
bafb757e1cd2 Implement CD audio
Michael Pavone <pavone@retrodev.com>
parents: 2076
diff changeset
113 typedef uint8_t (*seek_fun)(system_media *media, uint32_t sector);
2076
3f29e2726522 Added basic support for ISO images for games that only have a data track
Michael Pavone <pavone@retrodev.com>
parents: 2059
diff changeset
114 typedef uint8_t (*read_fun)(system_media *media, uint32_t offset);
3f29e2726522 Added basic support for ISO images for games that only have a data track
Michael Pavone <pavone@retrodev.com>
parents: 2059
diff changeset
115
1140
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
116 struct system_media {
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
117 void *buffer;
1438
e2bd03ed3190 Allow reloading current ROM with a hotkey (default F5) and allow locking on a cartridge via menu
Michael Pavone <pavone@retrodev.com>
parents: 1433
diff changeset
118 char *dir;
1201
aee2177a1630 Use filename for game title in SMS mode
Michael Pavone <pavone@retrodev.com>
parents: 1149
diff changeset
119 char *name;
1140
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
120 char *extension;
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
121 system_media *chain;
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
122 track_info *tracks;
2116
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
123 uint8_t *tmp_buffer;
2076
3f29e2726522 Added basic support for ISO images for games that only have a data track
Michael Pavone <pavone@retrodev.com>
parents: 2059
diff changeset
124 seek_fun seek;
3f29e2726522 Added basic support for ISO images for games that only have a data track
Michael Pavone <pavone@retrodev.com>
parents: 2059
diff changeset
125 read_fun read;
2116
cd057d6fe030 Initial stab at subcode emulation
Michael Pavone <pavone@retrodev.com>
parents: 2114
diff changeset
126 read_fun read_subcodes;
2059
6399a776e981 Add basic support for BIN/CUE images
Michael Pavone <pavone@retrodev.com>
parents: 2053
diff changeset
127 uint32_t num_tracks;
2089
0db3af42dd72 Fix some byte order stuff for audio tracks
Michael Pavone <pavone@retrodev.com>
parents: 2080
diff changeset
128 uint32_t cur_track;
1140
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
129 uint32_t size;
2076
3f29e2726522 Added basic support for ISO images for games that only have a data track
Michael Pavone <pavone@retrodev.com>
parents: 2059
diff changeset
130 uint32_t cur_sector;
1472
d2d637dbacfb Change load_rom into load_media with some interface changes in preparation for CD support
Michael Pavone <pavone@retrodev.com>
parents: 1438
diff changeset
131 media_type type;
2076
3f29e2726522 Added basic support for ISO images for games that only have a data track
Michael Pavone <pavone@retrodev.com>
parents: 2059
diff changeset
132 uint8_t in_fake_pregap;
2089
0db3af42dd72 Fix some byte order stuff for audio tracks
Michael Pavone <pavone@retrodev.com>
parents: 2080
diff changeset
133 uint8_t byte_storage;
1140
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
134 };
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
135
1113
45db303fc705 Restore 68K address logging functionality
Michael Pavone <pavone@retrodev.com>
parents: 1111
diff changeset
136 #define OPT_ADDRESS_LOG (1U << 31U)
45db303fc705 Restore 68K address logging functionality
Michael Pavone <pavone@retrodev.com>
parents: 1111
diff changeset
137
1140
4490c9c12272 Detect system type from filename if header based methods fail. Allow overriding system type from command line.
Michael Pavone <pavone@retrodev.com>
parents: 1117
diff changeset
138 system_type detect_system_type(system_media *media);
1595
360d5bab199f Update controller config when changed in UI without restart
Michael Pavone <pavone@retrodev.com>
parents: 1583
diff changeset
139 system_header *alloc_config_system(system_type stype, system_media *media, uint32_t opts, uint8_t force_region);
1946
c3c62dbf1ceb WIP netplay support
Michael Pavone <pavone@retrodev.com>
parents: 1909
diff changeset
140 system_header *alloc_config_player(system_type stype, event_reader *reader);
1980
81df9aa2de9b Less hacky run on audio thread mode
Michael Pavone <pavone@retrodev.com>
parents: 1946
diff changeset
141 void system_request_exit(system_header *system, uint8_t force_release);
1111
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
142
2eb54e24914e Mostly working changes to allow support for multiple emulated system types in main blastem program
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
143 #endif //SYSTEM_H_