mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge pull request #3099 from jriwanek-forks/machine
Machine table updates
This commit is contained in:
@@ -748,7 +748,7 @@ device_is_valid(const device_t *device, int m)
|
||||
int
|
||||
machine_get_config_int(char *s)
|
||||
{
|
||||
const device_t *d = machine_getdevice(machine);
|
||||
const device_t *d = machine_get_device(machine);
|
||||
const device_config_t *c;
|
||||
|
||||
if (d == NULL)
|
||||
@@ -768,7 +768,7 @@ machine_get_config_int(char *s)
|
||||
char *
|
||||
machine_get_config_string(char *s)
|
||||
{
|
||||
const device_t *d = machine_getdevice(machine);
|
||||
const device_t *d = machine_get_device(machine);
|
||||
const device_config_t *c;
|
||||
|
||||
if (d == NULL)
|
||||
|
||||
@@ -39,8 +39,6 @@ typedef struct {
|
||||
#define RSHIFT_OFF 0x105
|
||||
|
||||
/* KBC #define's */
|
||||
#define KBC_UNKNOWN 0x0000 /* As yet unknown keyboard */
|
||||
|
||||
/* IBM-style controllers */
|
||||
#define KBC_IBM_PC_XT 0x0000 /* IBM PC/XT */
|
||||
#define KBC_IBM_PCJR 0x0001 /* IBM PCjr */
|
||||
|
||||
@@ -288,7 +288,11 @@ typedef struct _machine_ {
|
||||
const machine_memory_t ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
uint16_t kbc;
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *kbc_device;
|
||||
#else
|
||||
void *kbc_device;
|
||||
#endif /* EMU_DEVICE_H */
|
||||
/* Bits:
|
||||
7-0 Set bits are forced set on P1 (no forced set = 0x00);
|
||||
15-8 Clear bits are forced clear on P1 (no foced clear = 0xff). */
|
||||
@@ -297,11 +301,15 @@ typedef struct _machine_ {
|
||||
uint32_t gpio_acpi;
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *device;
|
||||
const device_t *fdc_device;
|
||||
const device_t *sio_device;
|
||||
const device_t *vid_device;
|
||||
const device_t *snd_device;
|
||||
const device_t *net_device;
|
||||
#else
|
||||
void *device;
|
||||
void *fdc_device;
|
||||
void *sio_device;
|
||||
void *vid_device;
|
||||
void *snd_device;
|
||||
void *net_device;
|
||||
@@ -324,10 +332,13 @@ extern char *machine_get_internal_name(void);
|
||||
extern int machine_get_machine_from_internal_name(char *s);
|
||||
extern void machine_init(void);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *machine_getdevice(int m);
|
||||
extern const device_t *machine_getviddevice(int m);
|
||||
extern const device_t *machine_getsnddevice(int m);
|
||||
extern const device_t *machine_getnetdevice(int m);
|
||||
extern const device_t *machine_get_kbc_device(int m);
|
||||
extern const device_t *machine_get_device(int m);
|
||||
extern const device_t *machine_get_fdc_device(int m);
|
||||
extern const device_t *machine_get_sio_device(int m);
|
||||
extern const device_t *machine_get_vid_device(int m);
|
||||
extern const device_t *machine_get_snd_device(int m);
|
||||
extern const device_t *machine_get_net_device(int m);
|
||||
#endif
|
||||
extern char *machine_get_internal_name_ex(int m);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
|
||||
@@ -138,7 +138,7 @@ int
|
||||
machine_available(int m)
|
||||
{
|
||||
int ret;
|
||||
device_t *d = (device_t *) machine_getdevice(m);
|
||||
device_t *d = (device_t *) machine_get_device(m);
|
||||
|
||||
bios_only = 1;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -169,7 +169,7 @@ SettingsMachine::on_comboBoxMachine_currentIndexChanged(int index)
|
||||
}
|
||||
|
||||
int machineId = ui->comboBoxMachine->currentData().toInt();
|
||||
const auto *device = machine_getdevice(machineId);
|
||||
const auto *device = machine_get_device(machineId);
|
||||
ui->pushButtonConfigure->setEnabled((device != nullptr) && (device->config != nullptr));
|
||||
|
||||
auto *modelCpu = ui->comboBoxCPU->model();
|
||||
@@ -304,6 +304,6 @@ SettingsMachine::on_pushButtonConfigure_clicked()
|
||||
{
|
||||
// deviceconfig_inst_open
|
||||
int machineId = ui->comboBoxMachine->currentData().toInt();
|
||||
const auto *device = machine_getdevice(machineId);
|
||||
const auto *device = machine_get_device(machineId);
|
||||
DeviceConfig::ConfigureDevice(device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ win_settings_machine_recalc_machine(HWND hdlg)
|
||||
|
||||
lptsTemp = (LPTSTR) malloc(512 * sizeof(WCHAR));
|
||||
|
||||
d = (device_t *) machine_getdevice(temp_machine);
|
||||
d = (device_t *) machine_get_device(temp_machine);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_MACHINE, d && d->config);
|
||||
|
||||
settings_reset_content(hdlg, IDC_COMBO_CPU_TYPE);
|
||||
@@ -987,7 +987,7 @@ win_settings_machine_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
case IDC_CONFIGURE_MACHINE:
|
||||
temp_machine = listtomachine[settings_get_cur_sel(hdlg, IDC_COMBO_MACHINE)];
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, (void *) machine_getdevice(temp_machine));
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, (void *) machine_get_device(temp_machine));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user