Fix for ROMs not loading properly on many machines - my bad.

This commit is contained in:
waltje
2017-10-13 02:41:17 -04:00
parent 724e5c44df
commit 97b3ca3430
12 changed files with 10 additions and 34 deletions

View File

@@ -8,7 +8,7 @@
*
* Handling of the emulated machines.
*
* Version: @(#)machine.c 1.0.18 2017/10/07
* Version: @(#)machine.c 1.0.19 2017/10/12
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -140,7 +140,11 @@ machine_init(void)
{
pclog("Initializing as \"%s\"\n", machine_getname());
AMSTRAD = AT = PCI = TANDY = 0;
/* Set up the architecture flags. */
AT = IS_ARCH(machine, MACHINE_AT);
PCI = IS_ARCH(machine, MACHINE_PCI);
AMSTRAD = IS_ARCH(machine, MACHINE_AMSTRAD);
TANDY = 0;
/* Load the machine's ROM BIOS. */
rom_load_bios(romset);

View File

@@ -8,7 +8,7 @@
*
* Handling of the emulated machines.
*
* Version: @(#)machine.h 1.0.6 2017/10/07
* Version: @(#)machine.h 1.0.7 2017/10/12
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -41,6 +41,8 @@
#define MACHINE_OLIM24 0x080000
#define MACHINE_RM 0x100000
#define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0;
typedef struct _machine_ {
char name[64];

View File

@@ -138,11 +138,8 @@ static void amstrad_init(void)
void
machine_amstrad_init(machine_t *model)
{
AMSTRAD = 1;
machine_common_init(model);
mem_add_bios();
amstrad_init();
keyboard_amstrad_init();

View File

@@ -21,8 +21,6 @@
void
machine_at_init(machine_t *model)
{
AT = 1;
machine_common_init(model);
pit_set_out_func(&pit, 1, pit_refresh_timer_at);

View File

@@ -135,7 +135,6 @@ machine_europc_init(machine_t *model)
{
machine_common_init(model);
mem_add_bios();
lpt3_init(0x3bc);
jim_init();
keyboard_xt_init();

View File

@@ -40,7 +40,6 @@ machine_olim24_init(machine_t *model)
{
machine_common_init(model);
mem_add_bios();
keyboard_olim24_init();
/* FIXME: make sure this is correct?? */

View File

@@ -20,7 +20,6 @@
void
machine_pcjr_init(machine_t *model)
{
mem_add_bios();
fdc_add_pcjr();
pic_init();
pit_init();

View File

@@ -338,14 +338,8 @@ static void ps1mb_m2133_init(void)
static void
machine_ps1_common_init(machine_t *model)
{
AT = 1;
machine_common_init(model);
#if 0
/* Already done in machine.c */
mem_add_bios();
#endif
pit_set_out_func(&pit, 1, pit_refresh_timer_at);
dma16_init();
if (romset != ROM_IBMPS1_2011)

View File

@@ -156,14 +156,8 @@ static void ps2board_init(void)
void
machine_ps2_m30_286_init(machine_t *model)
{
AT = 1;
machine_common_init(model);
#if 0
/* Already done in machine.c */
#endif
mem_add_bios();
pit_set_out_func(&pit, 1, pit_refresh_timer_at);
dma16_init();
keyboard_at_init();

View File

@@ -805,14 +805,8 @@ static void ps2_mca_board_model_80_type2_init()
static void
machine_ps2_common_init(machine_t *model)
{
AT = 1;
machine_common_init(model);
#if 1
/* Already done in machine.c. */
mem_add_bios();
#endif
dma16_init();
ps2_dma_init();
keyboard_at_init();

View File

@@ -19,11 +19,10 @@
void
machine_tandy1k_init(machine_t *model)
{
TANDY = 1;
TANDY = 1;
machine_common_init(model);
mem_add_bios();
keyboard_tandy_init();
if (romset == ROM_TANDY)
device_add(&sn76489_device);
@@ -42,7 +41,6 @@ machine_tandy1ksl2_init(machine_t *model)
{
machine_common_init(model);
mem_add_bios();
keyboard_tandy_init();
device_add(&pssj_device);
nmi_init();

View File

@@ -18,8 +18,6 @@ machine_xt_init(machine_t *model)
{
machine_common_init(model);
mem_add_bios();
pit_set_out_func(&pit, 1, pit_refresh_timer_xt);
keyboard_xt_init();