This commit is contained in:
RichardG867
2020-12-03 01:46:04 -03:00
111 changed files with 8720 additions and 2236 deletions

View File

@@ -111,7 +111,8 @@ extern int network_card; /* (C) net interface num */
extern char network_host[522]; /* (C) host network intf */
extern int hdd_format_type; /* (C) hard disk file format */
extern int confirm_reset, /* (C) enable reset confirmation */
confirm_exit; /* (C) enable exit confirmation */
confirm_exit, /* (C) enable exit confirmation */
confirm_save; /* (C) enable save confirmation */
#ifdef USE_DISCORD
extern int enable_discord; /* (C) enable Discord integration */
#endif
@@ -151,6 +152,7 @@ extern void pclog_toggle_suppr(void);
extern void pclog(const char *fmt, ...);
extern void fatal(const char *fmt, ...);
extern void set_screen_size(int x, int y);
extern void reset_screen_size(void);
extern void set_screen_size_natural(void);
#if 0
extern void pc_reload(wchar_t *fn);
@@ -176,6 +178,7 @@ extern uint16_t get_last_addr(void);
should be in cpu.c but I put it here to avoid
having to include cpu.c everywhere. */
extern void sub_cycles(int c);
extern void resub_cycles(int old_cycles);
extern double isa_timing;
extern int io_delay;

View File

@@ -89,6 +89,8 @@ typedef struct
/* Global variables. */
extern int acpi_rtc_status;
extern const device_t acpi_intel_device;
extern const device_t acpi_smc_device;
extern const device_t acpi_via_device;

View File

@@ -106,32 +106,6 @@ typedef struct {
extern hard_disk_t hdd[HDD_NUM];
extern unsigned int hdd_table[128][3];
typedef struct vhd_footer_t
{
uint8_t cookie[8];
uint32_t features;
uint32_t version;
uint64_t offset;
uint32_t timestamp;
uint8_t creator[4];
uint32_t creator_vers;
uint8_t creator_host_os[4];
uint64_t orig_size;
uint64_t curr_size;
struct {
uint16_t cyl;
uint8_t heads;
uint8_t spt;
} geom;
uint32_t type;
uint32_t checksum;
uint8_t uuid[16];
uint8_t saved_state;
uint8_t reserved[427];
} vhd_footer_t;
extern int hdd_init(void);
extern int hdd_string_to_bus(char *str, int cdrom);
extern char *hdd_bus_to_string(int bus, int cdrom);
@@ -153,11 +127,6 @@ extern void hdd_image_unload(uint8_t id, int fn_preserve);
extern void hdd_image_close(uint8_t id);
extern void hdd_image_calc_chs(uint32_t *c, uint32_t *h, uint32_t *s, uint32_t size);
extern void vhd_footer_from_bytes(vhd_footer_t *vhd, uint8_t *bytes);
extern void vhd_footer_to_bytes(uint8_t *bytes, vhd_footer_t *vhd);
extern void new_vhd_footer(vhd_footer_t **vhd);
extern void generate_vhd_checksum(vhd_footer_t *vhd);
extern int image_is_hdi(const wchar_t *s);
extern int image_is_hdx(const wchar_t *s, int check_signature);
extern int image_is_vhd(const wchar_t *s, int check_signature);

View File

@@ -24,7 +24,7 @@
#define IDS_STRINGS 2048 // "86Box"
#define IDS_2049 2049 // "Error"
#define IDS_2050 2050 // "Fatal error"
#define IDS_2051 2051 // "Are you sure you want to save..."
#define IDS_2051 2051 // "<reserved>"
#define IDS_2052 2052 // "Press CTRL+ALT+PAGE DOWN..."
#define IDS_2053 2053 // "Speed"
#define IDS_2054 2054 // "ZIP %i (%03i): %ls"
@@ -44,11 +44,11 @@
#define IDS_2068 2068 // "Sound"
#define IDS_2069 2069 // "Network"
#define IDS_2070 2070 // "Ports (COM & LPT)"
#define IDS_2071 2071 // "Other peripherals"
#define IDS_2071 2071 // "Storage controllers"
#define IDS_2072 2072 // "Hard disks"
#define IDS_2073 2073 // "Floppy and CD-ROM drives"
#define IDS_2074 2074 // "Other removable devices"
#define IDS_2075 2075 // "CD-ROM images (*.ISO;*.CU.."
#define IDS_2075 2075 // "Other peripherals"
#define IDS_2076 2076 // "Surface-based images (*.8.."
#define IDS_2077 2077 // "Click to capture mouse"
#define IDS_2078 2078 // "Press F12-F8 to release mouse"
@@ -94,9 +94,9 @@
#define IDS_2118 2118 // "Internal controller"
#define IDS_2119 2119 // "Exit"
#define IDS_2120 2120 // "No ROMs found"
#define IDS_2121 2121 // "Save changes\nThis will hard..."
#define IDS_2122 2122 // "Discard changes\nAll changes..."
#define IDS_2123 2123 // "Cancel\nGo back to the..."
#define IDS_2121 2121 // "Do you want to save the settings?"
#define IDS_2122 2122 // "This will hard reset the virtual..."
#define IDS_2123 2123 // "Save"
#define IDS_2124 2124 // "About 86Box"
#define IDS_2125 2125 // "86Box v" EMU_VERSION
#define IDS_2126 2126 // "An emulator of old computers..."
@@ -109,10 +109,12 @@
#define IDS_2133 2133 // LIB_NAME_FLUIDSYNTH " is required..."
#define IDS_2134 2134 // "Entering fullscreen mode"
#define IDS_2135 2135 // "Don't show this message again"
#define IDS_2136 2136 // "Don't Exit"
#define IDS_2136 2136 // "Don't exit"
#define IDS_2137 2137 // "Reset"
#define IDS_2138 2138 // "Don't Reset"
#define IDS_2138 2138 // "Don't reset"
#define IDS_2139 2139 // "MO images (*.IM?)\0*.IM?..."
#define IDS_2140 2140 // "CD-ROM images (*.ISO;*.CU.."
#define IDS_2141 2141 // "%hs Device Configuration"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
@@ -139,7 +141,20 @@
#define IDS_4118 4118 // "The selected file will be..."
#define IDS_4119 4119 // "Unsupported disk image"
#define IDS_4120 4120 // "Overwrite"
#define IDS_4121 4121 // "Don't Overwrite"
#define IDS_4121 4121 // "Don't overwrite"
#define IDS_4122 4122 // "Raw image (.img)"
#define IDS_4123 4123 // "HDI image (.hdi)"
#define IDS_4124 4124 // "HDX image (.hdx)"
#define IDS_4125 4125 // "Fixed-size VHD (.vhd)"
#define IDS_4126 4126 // "Dynamic-size VHD (.vhd)"
#define IDS_4127 4127 // "Differencing VHD (.vhd)"
#define IDS_4128 4128 // "Large blocks (2 MB)"
#define IDS_4129 4129 // "Small blocks (512 KB)"
#define IDS_4130 4130 // "VHD files (*.VHD)\0*.VHD\0All..."
#define IDS_4131 4131 // "Select the parent VHD"
#define IDS_4132 4132 // "This could mean that the parent..."
#define IDS_4133 4133 // "Parent and child disk timestamps..."
#define IDS_4134 4134 // "Could not fix VHD timestamp."
#define IDS_4352 4352 // "MFM/RLL"
#define IDS_4353 4353 // "XT IDE"
@@ -207,9 +222,9 @@
#define IDS_LANG_ENUS IDS_7168
#define STR_NUM_2048 92
#define STR_NUM_2048 94
#define STR_NUM_3072 11
#define STR_NUM_4096 18
#define STR_NUM_4096 39
#define STR_NUM_4352 6
#define STR_NUM_4608 6
#define STR_NUM_5120 1

View File

@@ -64,7 +64,7 @@
/* Combined flags. */
#define MACHINE_VIDEO_FIXED 0x00003000 /* sys has fixed int video */
/* Feature flags for internal storage controllers. */
#define MACHINE_HDC 0x0FFC0000 /* sys has int HDC */
#define MACHINE_HDC 0x07FC0000 /* sys has int HDC */
#define MACHINE_MFM 0x00100000 /* sys has int MFM/RLL */
#define MACHINE_XTA 0x00200000 /* sys has int XTA */
#define MACHINE_ESDI 0x00400000 /* sys has int ESDI */

View File

@@ -236,31 +236,16 @@ extern uint16_t read_mem_w(uint32_t addr);
extern void write_mem_b(uint32_t addr, uint8_t val);
extern void write_mem_w(uint32_t addr, uint16_t val);
#ifndef USE_NEW_DYNAREC
#define readmemb(a) ((readlookup2[(a)>>12]==-1)?readmembl(a):*(uint8_t *)(readlookup2[(a) >> 12] + (a)))
#define readmemw(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF || (((s)+(a)) & 1))?readmemwl(s,a):*(uint16_t *)(readlookup2[(uint32_t)((s)+(a))>>12]+(uint32_t)((s)+(a))))
#define readmeml(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF || (((s)+(a)) & 3))?readmemll(s,a):*(uint32_t *)(readlookup2[(uint32_t)((s)+(a))>>12]+(uint32_t)((s)+(a))))
extern uint8_t readmembl(uint32_t addr);
extern void writemembl(uint32_t addr, uint8_t val);
extern void rwmembl(uint32_t raddr, uint32_t waddr, uint8_t val);
extern uint8_t readmembl(uint32_t addr);
extern void writemembl(uint32_t addr, uint8_t val);
extern uint8_t readmemb386l(uint32_t seg, uint32_t addr);
extern void writememb386l(uint32_t seg, uint32_t addr, uint8_t val);
extern uint16_t readmemwl(uint32_t seg, uint32_t addr);
extern void writememwl(uint32_t seg, uint32_t addr, uint16_t val);
extern uint32_t readmemll(uint32_t seg, uint32_t addr);
extern void writememll(uint32_t seg, uint32_t addr, uint32_t val);
extern uint64_t readmemql(uint32_t seg, uint32_t addr);
extern void writememql(uint32_t seg, uint32_t addr, uint64_t val);
#else
extern uint8_t readmembl(uint32_t addr);
extern void writemembl(uint32_t addr, uint8_t val);
extern uint16_t readmemwl(uint32_t addr);
extern void writememwl(uint32_t addr, uint16_t val);
extern uint32_t readmemll(uint32_t addr);
extern void writememll(uint32_t addr, uint32_t val);
extern uint64_t readmemql(uint32_t addr);
extern void writememql(uint32_t addr, uint64_t val);
#endif
extern uint8_t *getpccache(uint32_t a);
extern uint64_t mmutranslatereal(uint32_t addr, int rw);

View File

@@ -35,11 +35,12 @@
#define DLG_CFG_SOUND 114 /* sub-dialog of config */
#define DLG_CFG_NETWORK 115 /* sub-dialog of config */
#define DLG_CFG_PORTS 116 /* sub-dialog of config */
#define DLG_CFG_PERIPHERALS 117 /* sub-dialog of config */
#define DLG_CFG_STORAGE 117 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS 118 /* sub-dialog of config */
#define DLG_CFG_HARD_DISKS_ADD 119 /* sub-dialog of config */
#define DLG_CFG_FLOPPY_AND_CDROM_DRIVES 120 /* sub-dialog of config */
#define DLG_CFG_OTHER_REMOVABLE_DEVICES 121 /* sub-dialog of config */
#define DLG_CFG_PERIPHERALS 122 /* sub-dialog of config */
/* Static text label IDs. */
#define IDT_1700 1700 /* Language: */
@@ -100,11 +101,13 @@
#define IDT_1766 1766 /* Board #4: */
#define IDT_1767 1767 /* ISA RTC: */
#define IDT_1768 1768 /* Ext FD Controller: */
#define IDT_1769 1769 /* MO drives: */
#define IDT_1770 1770 /* Bus: */
#define IDT_1771 1771 /* ID: */
#define IDT_1772 1772 /* Channel */
#define IDT_1773 1773 /* Type: */
#define IDT_1769 1769 /* MO drives: */
#define IDT_1770 1770 /* Bus: */
#define IDT_1771 1771 /* ID: */
#define IDT_1772 1772 /* Channel */
#define IDT_1773 1773 /* Type: */
#define IDT_1774 1774 /* Image Format: */
#define IDT_1775 1775 /* Block Size: */
/*
@@ -137,114 +140,117 @@
#define IDC_MEMSPIN 1019
#define IDC_TEXT_MB IDT_1705
#define IDC_VIDEO 1030 /* video config */
#define IDC_COMBO_VIDEO 1031
#define IDC_CHECK_VOODOO 1032
#define IDC_BUTTON_VOODOO 1033
#define IDC_VIDEO 1020 /* video config */
#define IDC_COMBO_VIDEO 1021
#define IDC_CHECK_VOODOO 1022
#define IDC_BUTTON_VOODOO 1023
#define IDC_INPUT 1050 /* input config */
#define IDC_COMBO_MOUSE 1051
#define IDC_COMBO_JOYSTICK 1052
#define IDC_COMBO_JOY 1053
#define IDC_CONFIGURE_MOUSE 1054
#define IDC_INPUT 1030 /* input config */
#define IDC_COMBO_MOUSE 1031
#define IDC_COMBO_JOYSTICK 1032
#define IDC_COMBO_JOY 1033
#define IDC_CONFIGURE_MOUSE 1034
#define IDC_SOUND 1070 /* sound config */
#define IDC_COMBO_SOUND 1071
#define IDC_CHECK_SSI 1072
#define IDC_CHECK_CMS 1073
#define IDC_CHECK_GUS 1074
#define IDC_COMBO_MIDI 1075
#define IDC_CHECK_MPU401 1076
#define IDC_CONFIGURE_MPU401 1077
#define IDC_CHECK_FLOAT 1078
#define IDC_CONFIGURE_GUS 1079
#define IDC_COMBO_MIDI_IN 1080
#define IDC_SOUND 1040 /* sound config */
#define IDC_COMBO_SOUND 1041
#define IDC_CHECK_SSI 1042
#define IDC_CHECK_CMS 1043
#define IDC_CHECK_GUS 1044
#define IDC_COMBO_MIDI 1045
#define IDC_CHECK_MPU401 1046
#define IDC_CONFIGURE_MPU401 1047
#define IDC_CHECK_FLOAT 1048
#define IDC_CONFIGURE_GUS 1049
#define IDC_COMBO_MIDI_IN 1050
#define IDC_COMBO_NET_TYPE 1090 /* network config */
#define IDC_COMBO_PCAP 1091
#define IDC_COMBO_NET 1092
#define IDC_COMBO_NET_TYPE 1060 /* network config */
#define IDC_COMBO_PCAP 1061
#define IDC_COMBO_NET 1062
#define IDC_COMBO_LPT1 1110 /* ports config */
#define IDC_COMBO_LPT2 1111
#define IDC_COMBO_LPT3 1112
#define IDC_CHECK_SERIAL1 1113
#define IDC_CHECK_SERIAL2 1114
#define IDC_CHECK_SERIAL3 1115
#define IDC_CHECK_SERIAL4 1116
#define IDC_CHECK_PARALLEL1 1117
#define IDC_CHECK_PARALLEL2 1118
#define IDC_CHECK_PARALLEL3 1119
#define IDC_COMBO_LPT1 1070 /* ports config */
#define IDC_COMBO_LPT2 1071
#define IDC_COMBO_LPT3 1072
#define IDC_CHECK_SERIAL1 1073
#define IDC_CHECK_SERIAL2 1074
#define IDC_CHECK_SERIAL3 1075
#define IDC_CHECK_SERIAL4 1076
#define IDC_CHECK_PARALLEL1 1077
#define IDC_CHECK_PARALLEL2 1078
#define IDC_CHECK_PARALLEL3 1079
#define IDC_OTHER_PERIPH 1120 /* other periph config */
#define IDC_COMBO_SCSI 1121
#define IDC_CONFIGURE_SCSI 1122
#define IDC_COMBO_HDC 1123
#define IDC_CONFIGURE_HDC 1124
#define IDC_CHECK_IDE_TER 1125
#define IDC_BUTTON_IDE_TER 1126
#define IDC_CHECK_IDE_QUA 1127
#define IDC_BUTTON_IDE_QUA 1128
#define IDC_CHECK_BUGGER 1129
#define IDC_CHECK_POSTCARD 1130
#define IDC_COMBO_ISARTC 1131
#define IDC_CONFIGURE_ISARTC 1132
#define IDC_COMBO_FDC 1133
#define IDC_CONFIGURE_FDC 1134
#define IDC_GROUP_ISAMEM 1140
#define IDC_COMBO_ISAMEM_1 1141
#define IDC_COMBO_ISAMEM_2 1142
#define IDC_COMBO_ISAMEM_3 1143
#define IDC_COMBO_ISAMEM_4 1144
#define IDC_CONFIGURE_ISAMEM_1 1145
#define IDC_CONFIGURE_ISAMEM_2 1146
#define IDC_CONFIGURE_ISAMEM_3 1147
#define IDC_CONFIGURE_ISAMEM_4 1148
#define IDC_OTHER_PERIPH 1080 /* storage controllers config */
#define IDC_COMBO_SCSI 1081
#define IDC_CONFIGURE_SCSI 1082
#define IDC_COMBO_HDC 1083
#define IDC_CONFIGURE_HDC 1084
#define IDC_CHECK_IDE_TER 1085
#define IDC_BUTTON_IDE_TER 1086
#define IDC_CHECK_IDE_QUA 1087
#define IDC_BUTTON_IDE_QUA 1088
#define IDC_HARD_DISKS 1150 /* hard disks config */
#define IDC_LIST_HARD_DISKS 1151
#define IDC_BUTTON_HDD_ADD_NEW 1152
#define IDC_BUTTON_HDD_ADD 1153
#define IDC_BUTTON_HDD_REMOVE 1154
#define IDC_COMBO_HD_BUS 1155
#define IDC_COMBO_HD_CHANNEL 1156
#define IDC_COMBO_HD_ID 1157
#define IDC_COMBO_HD_LUN 1158
#define IDC_COMBO_HD_CHANNEL_IDE 1159
#define IDC_HARD_DISKS 1090 /* hard disks config */
#define IDC_LIST_HARD_DISKS 1091
#define IDC_BUTTON_HDD_ADD_NEW 1092
#define IDC_BUTTON_HDD_ADD 1093
#define IDC_BUTTON_HDD_REMOVE 1094
#define IDC_COMBO_HD_BUS 1095
#define IDC_COMBO_HD_CHANNEL 1096
#define IDC_COMBO_HD_ID 1097
#define IDC_COMBO_HD_LUN 1098
#define IDC_COMBO_HD_CHANNEL_IDE 1099
#define IDC_EDIT_HD_FILE_NAME 1160 /* add hard disk dialog */
#define IDC_EDIT_HD_SPT 1161
#define IDC_EDIT_HD_HPC 1162
#define IDC_EDIT_HD_CYL 1163
#define IDC_EDIT_HD_SIZE 1164
#define IDC_COMBO_HD_TYPE 1165
#define IDC_PBAR_IMG_CREATE 1166
#define IDC_EDIT_HD_FILE_NAME 1100 /* add hard disk dialog */
#define IDC_EDIT_HD_SPT 1101
#define IDC_EDIT_HD_HPC 1102
#define IDC_EDIT_HD_CYL 1103
#define IDC_EDIT_HD_SIZE 1104
#define IDC_COMBO_HD_TYPE 1105
#define IDC_PBAR_IMG_CREATE 1106
#define IDC_COMBO_HD_IMG_FORMAT 1107
#define IDC_COMBO_HD_BLOCK_SIZE 1108
#define IDC_REMOV_DEVICES 1170 /* floppy and cd-rom drives config */
#define IDC_LIST_FLOPPY_DRIVES 1171
#define IDC_COMBO_FD_TYPE 1172
#define IDC_CHECKTURBO 1173
#define IDC_CHECKBPB 1174
#define IDC_LIST_CDROM_DRIVES 1175
#define IDC_COMBO_CD_BUS 1176
#define IDC_COMBO_CD_ID 1177
#define IDC_COMBO_CD_LUN 1178
#define IDC_COMBO_CD_CHANNEL_IDE 1179
#define IDC_REMOV_DEVICES 1110 /* floppy and cd-rom drives config */
#define IDC_LIST_FLOPPY_DRIVES 1111
#define IDC_COMBO_FD_TYPE 1112
#define IDC_CHECKTURBO 1113
#define IDC_CHECKBPB 1114
#define IDC_LIST_CDROM_DRIVES 1115
#define IDC_COMBO_CD_BUS 1116
#define IDC_COMBO_CD_ID 1117
#define IDC_COMBO_CD_LUN 1118
#define IDC_COMBO_CD_CHANNEL_IDE 1119
#define IDC_LIST_ZIP_DRIVES 1180 /* other removable devices config */
#define IDC_COMBO_ZIP_BUS 1181
#define IDC_COMBO_ZIP_ID 1182
#define IDC_COMBO_ZIP_LUN 1183
#define IDC_COMBO_ZIP_CHANNEL_IDE 1184
#define IDC_CHECK250 1185
#define IDC_COMBO_CD_SPEED 1186
#define IDC_LIST_MO_DRIVES 1187
#define IDC_COMBO_MO_BUS 1188
#define IDC_COMBO_MO_ID 1189
#define IDC_COMBO_MO_LUN 1190
#define IDC_COMBO_MO_CHANNEL_IDE 1191
#define IDC_COMBO_MO_TYPE 1192
#define IDC_LIST_ZIP_DRIVES 1120 /* other removable devices config */
#define IDC_COMBO_ZIP_BUS 1121
#define IDC_COMBO_ZIP_ID 1122
#define IDC_COMBO_ZIP_LUN 1123
#define IDC_COMBO_ZIP_CHANNEL_IDE 1124
#define IDC_CHECK250 1125
#define IDC_COMBO_CD_SPEED 1126
#define IDC_LIST_MO_DRIVES 1127
#define IDC_COMBO_MO_BUS 1128
#define IDC_COMBO_MO_ID 1129
#define IDC_COMBO_MO_LUN 1130
#define IDC_COMBO_MO_CHANNEL_IDE 1131
#define IDC_COMBO_MO_TYPE 1132
#define IDC_SLIDER_GAIN 1193 /* sound gain dialog */
#define IDC_CHECK_BUGGER 1140 /* other periph config */
#define IDC_CHECK_POSTCARD 1141
#define IDC_COMBO_ISARTC 1142
#define IDC_CONFIGURE_ISARTC 1143
#define IDC_COMBO_FDC 1144
#define IDC_CONFIGURE_FDC 1145
#define IDC_GROUP_ISAMEM 1146
#define IDC_COMBO_ISAMEM_1 1147
#define IDC_COMBO_ISAMEM_2 1148
#define IDC_COMBO_ISAMEM_3 1149
#define IDC_COMBO_ISAMEM_4 1150
#define IDC_CONFIGURE_ISAMEM_1 1151
#define IDC_CONFIGURE_ISAMEM_2 1152
#define IDC_CONFIGURE_ISAMEM_3 1153
#define IDC_CONFIGURE_ISAMEM_4 1154
#define IDC_SLIDER_GAIN 1160 /* sound gain dialog */
#define IDC_EDIT_FILE_NAME 1200 /* new floppy image dialog */
#define IDC_COMBO_DISK_SIZE 1201
@@ -289,8 +295,9 @@
#define IDM_VID_REMEMBER 40041
#define IDM_VID_SDL_SW 40050
#define IDM_VID_SDL_HW 40051
#define IDM_VID_SDL_OPENGL 40052
#ifdef USE_VNC
#define IDM_VID_VNC 40052
#define IDM_VID_VNC 40053
#endif
#define IDM_VID_SCALE_1X 40055
#define IDM_VID_SCALE_2X 40056

View File

@@ -49,6 +49,8 @@ extern FILE *rom_fopen(wchar_t *fn, wchar_t *mode);
extern int rom_getfile(wchar_t *fn, wchar_t *s, int size);
extern int rom_present(wchar_t *fn);
extern int rom_load_linear_oddeven(wchar_t *fn, uint32_t addr, int sz,
int off, uint8_t *ptr);
extern int rom_load_linear(wchar_t *fn, uint32_t addr, int sz,
int off, uint8_t *ptr);
extern int rom_load_interleaved(wchar_t *fnl, wchar_t *fnh, uint32_t addr,
@@ -68,6 +70,8 @@ extern int bios_load_linear_combined2(wchar_t *fn1, wchar_t *fn2,
extern int rom_init(rom_t *rom, wchar_t *fn, uint32_t address, int size,
int mask, int file_offset, uint32_t flags);
extern int rom_init_oddeven(rom_t *rom, wchar_t *fn, uint32_t address, int size,
int mask, int file_offset, uint32_t flags);
extern int rom_init_interleaved(rom_t *rom, wchar_t *fn_low,
wchar_t *fn_high, uint32_t address,
int size, int mask, int file_offset,

View File

@@ -15,7 +15,7 @@ typedef struct ad1848_t
int16_t out_l, out_r;
uint32_t cd_vol_l, cd_vol_r;
double cd_vol_l, cd_vol_r;
int enable;

View File

@@ -34,7 +34,10 @@ extern "C" {
#define MBX_ERROR 2
#define MBX_QUESTION 3
#define MBX_QUESTION_YN 4
#define MBX_FATAL 0x20
#define MBX_QUESTION_OK 8
#define MBX_QMARK 0x10
#define MBX_WARNING 0x20
#define MBX_FATAL 0x40
#define MBX_ANSI 0x80
#define MBX_LINKS 0x100
#define MBX_DONTASK 0x200

View File

@@ -20,7 +20,8 @@
#define FLAG_EXTRA_BANKS 1
#define FLAG_ADDR_BY8 2
#define FLAG_LATCH8 4
#define FLAG_EXT_WRITE 4
#define FLAG_LATCH8 8
typedef struct {

View File

@@ -1733,10 +1733,44 @@ static inline void voodoo_generate(uint8_t *code_block, voodoo_t *voodoo, voodoo
if ((params->fbzMode & FBZ_CHROMAKEY))
{
addbyte(0x66); /*MOVD EAX, XMM0*/
addbyte(0x0f);
addbyte(0x7e);
addbyte(0xc0);
switch (_rgb_sel)
{
case CC_LOCALSELECT_ITER_RGB:
addbyte(0xf3); /*MOVDQU XMM0, ib*/ /* ir, ig and ib must be in same dqword!*/
addbyte(0x0f);
addbyte(0x6f);
addbyte(0x87);
addlong(offsetof(voodoo_state_t, ib));
addbyte(0x66); /*PSRAD XMM0, 12*/
addbyte(0x0f);
addbyte(0x72);
addbyte(0xe0);
addbyte(12);
addbyte(0x66); /*PACKSSDW XMM0, XMM0*/
addbyte(0x0f);
addbyte(0x6b);
addbyte(0xc0);
addbyte(0x66); /*PACKUSWB XMM0, XMM0*/
addbyte(0x0f);
addbyte(0x67);
addbyte(0xc0);
addbyte(0x66); /*MOVD EAX, XMM0*/
addbyte(0x0f);
addbyte(0x7e);
addbyte(0xc0);
break;
case CC_LOCALSELECT_COLOR1:
addbyte(0x8b); /*MOV EAX, params->color1[RSI]*/
addbyte(0x86);
addlong(offsetof(voodoo_params_t, color1));
break;
case CC_LOCALSELECT_TEX:
addbyte(0x66); /*MOVD EAX, XMM0*/
addbyte(0x0f);
addbyte(0x7e);
addbyte(0xc0);
break;
}
addbyte(0x8b); /*MOV EBX, params->chromaKey[ESI]*/
addbyte(0x9e);
addlong(offsetof(voodoo_params_t, chromaKey));

View File

@@ -1668,10 +1668,44 @@ static inline void voodoo_generate(uint8_t *code_block, voodoo_t *voodoo, voodoo
if ((params->fbzMode & FBZ_CHROMAKEY))
{
addbyte(0x66); /*MOVD EAX, XMM0*/
addbyte(0x0f);
addbyte(0x7e);
addbyte(0xc0);
switch (_rgb_sel)
{
case CC_LOCALSELECT_ITER_RGB:
addbyte(0xf3); /*MOVDQU XMM0, ib*/ /* ir, ig and ib must be in same dqword!*/
addbyte(0x0f);
addbyte(0x6f);
addbyte(0x87);
addlong(offsetof(voodoo_state_t, ib));
addbyte(0x66); /*PSRAD XMM0, 12*/
addbyte(0x0f);
addbyte(0x72);
addbyte(0xe0);
addbyte(12);
addbyte(0x66); /*PACKSSDW XMM0, XMM0*/
addbyte(0x0f);
addbyte(0x6b);
addbyte(0xc0);
addbyte(0x66); /*PACKUSWB XMM0, XMM0*/
addbyte(0x0f);
addbyte(0x67);
addbyte(0xc0);
addbyte(0x66); /*MOVD EAX, XMM0*/
addbyte(0x0f);
addbyte(0x7e);
addbyte(0xc0);
break;
case CC_LOCALSELECT_COLOR1:
addbyte(0x8b); /*MOV EAX, params->color1[ESI]*/
addbyte(0x86);
addlong(offsetof(voodoo_params_t, color1));
break;
case CC_LOCALSELECT_TEX:
addbyte(0x66); /*MOVD EAX, XMM0*/
addbyte(0x0f);
addbyte(0x7e);
addbyte(0xc0);
break;
}
addbyte(0x8b); /*MOV EBX, params->chromaKey[ESI]*/
addbyte(0x9e);
addlong(offsetof(voodoo_params_t, chromaKey));

View File

@@ -314,7 +314,8 @@ typedef struct voodoo_t
volatile int params_read_idx[4], params_write_idx;
uint32_t cmdfifo_base, cmdfifo_end, cmdfifo_size;
int cmdfifo_rp;
int cmdfifo_rp, cmdfifo_ret_addr;
int cmdfifo_in_sub;
volatile int cmdfifo_depth_rd, cmdfifo_depth_wr;
volatile int cmdfifo_enabled;
uint32_t cmdfifo_amin, cmdfifo_amax;
@@ -384,6 +385,8 @@ typedef struct voodoo_t
uint32_t dstFormat;
uint32_t dstSize;
uint32_t dstXY;
uint32_t lineStipple;
uint32_t lineStyle;
uint32_t rop;
uint32_t srcBaseAddr;
uint32_t srcFormat;
@@ -431,6 +434,9 @@ typedef struct voodoo_t
int src_stride_src, src_stride_dest;
int src_bpp;
int line_pix_pos, line_bit_pos;
int line_rep_cnt, line_bit_mask_size;
} banshee_blt;
struct

View File

@@ -214,10 +214,8 @@ extern const device_t gd5401_isa_device;
extern const device_t gd5402_isa_device;
extern const device_t gd5402_onboard_device;
extern const device_t gd5420_isa_device;
#if defined(DEV_BRANCH) && defined(USE_CL5422)
extern const device_t gd5422_isa_device;
extern const device_t gd5424_vlb_device;
#endif
extern const device_t gd5426_vlb_device;
extern const device_t gd5426_onboard_device;
extern const device_t gd5428_isa_device;

View File

@@ -55,6 +55,8 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
#define SB_CLASS_NAME L"86BoxStatusBar"
#define SB_MENU_NAME L"StatusBarMenu"
#define FS_CLASS_NAME L"86BoxFullScreen"
#define SDL_CLASS_NAME L"86BoxSDLWnd"
#define SDL_SUB_CLASS_NAME L"86BoxSDLSubWnd"
#define FLOPPY_SUBMENU_NAME L"FloppySubmenu"
#define CDROM_SUBMENU_NAME L"CdromSubmenu"
@@ -83,9 +85,9 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
#define WM_HAS_SHUTDOWN 0x8897
#ifdef USE_VNC
#define RENDERERS_NUM 3
#define RENDERERS_NUM 4
#else
#define RENDERERS_NUM 2
#define RENDERERS_NUM 3
#endif
@@ -100,6 +102,7 @@ extern HANDLE ghMutex;
extern LCID lang_id;
extern HICON hIcon[256];
extern RECT oldclip;
extern int sbar_height;
// extern int status_is_open;
@@ -109,6 +112,7 @@ extern WCHAR wopenfilestring[512];
extern uint8_t filterindex;
extern void ResizeWindowByClientArea(HWND hwnd, int width, int height);
extern void InitCrashDump(void);
extern HICON LoadIconEx(PCTSTR pszIconName);
@@ -155,7 +159,6 @@ extern int hard_disk_was_added(void);
/* Platform UI support functions. */
extern int ui_init(int nCmdShow);
extern void plat_set_input(HWND h);
/* Functions in win_about.c: */
@@ -177,10 +180,11 @@ extern void NewFloppyDialogCreate(HWND hwnd, int id, int part);
#define SETTINGS_PAGE_SOUND 3
#define SETTINGS_PAGE_NETWORK 4
#define SETTINGS_PAGE_PORTS 5
#define SETTINGS_PAGE_PERIPHERALS 6
#define SETTINGS_PAGE_STORAGE 6
#define SETTINGS_PAGE_HARD_DISKS 7
#define SETTINGS_PAGE_FLOPPY_AND_CDROM_DRIVES 8
#define SETTINGS_PAGE_OTHER_REMOVABLE_DEVICES 9
#define SETTINGS_PAGE_PERIPHERALS 10
extern void win_settings_open(HWND hwnd);
extern void win_settings_open_ex(HWND hwnd, int category);
@@ -193,11 +197,12 @@ extern int MediaMenuHandler(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPara
/* Functions in win_dialog.c: */
extern int file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, int save);
extern int file_dlg(HWND hwnd, WCHAR *f, char *fn, int save);
extern int file_dlg_mb(HWND hwnd, char *f, char *fn, int save);
extern int file_dlg_w_st(HWND hwnd, int i, WCHAR *fn, int save);
extern int file_dlg_st(HWND hwnd, int i, char *fn, int save);
/* Pass NULL in the title param to use the default title. */
extern int file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, WCHAR *title, int save);
extern int file_dlg(HWND hwnd, WCHAR *f, char *fn, char *title, int save);
extern int file_dlg_mb(HWND hwnd, char *f, char *fn, char *title, int save);
extern int file_dlg_w_st(HWND hwnd, int i, WCHAR *fn, char *title, int save);
extern int file_dlg_st(HWND hwnd, int i, char *fn, char *title, int save);
extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title);

View File

@@ -53,12 +53,11 @@
extern void sdl_close(void);
extern int sdl_inits(HWND h);
extern int sdl_inith(HWND h);
extern int sdl_inits_fs(HWND h);
extern int sdl_inith_fs(HWND h);
extern int sdl_initho(HWND h);
extern int sdl_pause(void);
extern void sdl_resize(int x, int y);
extern void sdl_enable(int enable);
extern void sdl_reinit_texture();
extern void sdl_set_fs(int fs);
#endif /*WIN_SDL_H*/