summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-04-21 00:05:54 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-04-21 00:05:54 +0000
commit9fb86da6459e749e83663518ca3ae082a188051b (patch)
tree16341de18b39ab60e8ceb4de144ea9677ed5f4c3
parent7d9b9885a5dbd061ad50a29a44266ca74c55c12a (diff)
From: Atari Ace
Subject: [patch] Fix 00149: No error report for invalid BIOS setting. Hi mamedev, This small patch makes specifying an invalid bios a fatalerror and removes the need to expose system_bios to the drivers by reworking the code in playch10.c to determine its bios more directly (in other words, it removes an ugly hack). This should resolve bug 00149, although I did not implement the popmessage as suggested. ~aa
-rw-r--r--src/emu/emuopts.c2
-rw-r--r--src/emu/romload.c15
-rw-r--r--src/mame/video/playch10.c8
3 files changed, 15 insertions, 10 deletions
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 630dcf30468..21a39282d57 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -154,7 +154,7 @@ const options_entry mame_core_options[] =
/* misc options */
{ NULL, NULL, OPTION_HEADER, "CORE MISC OPTIONS" },
- { "bios", "default", 0, "select the system BIOS to use" },
+ { "bios", NULL, 0, "select the system BIOS to use" },
{ "cheat;c", "0", OPTION_BOOLEAN, "enable cheat subsystem" },
{ "skip_gameinfo", "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
diff --git a/src/emu/romload.c b/src/emu/romload.c
index 2c2dbb26912..1b15a218d37 100644
--- a/src/emu/romload.c
+++ b/src/emu/romload.c
@@ -48,7 +48,7 @@ static open_chd *chd_list;
static open_chd **chd_list_tailptr;
/* system BIOS */
-int system_bios;
+static int system_bios;
static int total_rom_load_warnings;
@@ -190,9 +190,7 @@ static int determine_bios_rom(const rom_entry *romp)
const char *specbios = options_get_string(mame_options(), OPTION_BIOS);
const rom_entry *rom;
int bios_count = 0;
-
- /* set to default */
- int bios_no = 1;
+ int bios_no = 0;
for (rom = romp;!ROMENTRY_ISEND(rom);rom++)
if (ROMENTRY_ISSYSTEM_BIOS(rom))
@@ -208,8 +206,13 @@ static int determine_bios_rom(const rom_entry *romp)
bios_count++;
}
- if (bios_count == 0)
- bios_no = 0;
+ if (bios_no == 0 && bios_count > 0)
+ {
+ if (specbios[0] != 0)
+ fatalerror("%s: no such bios\n", specbios);
+ /* set to default */
+ bios_no = 1;
+ }
debugload("Using System BIOS: %d\n", bios_no);
diff --git a/src/mame/video/playch10.c b/src/mame/video/playch10.c
index cb9f190a5e1..0b7b3019378 100644
--- a/src/mame/video/playch10.c
+++ b/src/mame/video/playch10.c
@@ -10,8 +10,7 @@ extern int pc10_int_detect;
extern int pc10_game_mode;
extern int pc10_dispmask_old;
-/* from romload.c */
-extern int system_bios;
+static int pc10_bios;
static tilemap *bg_tilemap;
@@ -98,6 +97,9 @@ static TILE_GET_INFO( get_bg_tile_info )
VIDEO_START( playch10 )
{
+ const UINT8 *bios = memory_region(REGION_CPU1);
+ pc10_bios = (bios[3] == 0x2a) ? 1 : 2;
+
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
8, 8, 32, 32);
@@ -113,7 +115,7 @@ VIDEO_START( playch10 )
VIDEO_UPDATE( playch10 )
{
/* Dual monitor version */
- if(system_bios == 1)
+ if (pc10_bios == 1)
{
const device_config *top_screen = device_list_find_by_tag(screen->machine->config->devicelist, VIDEO_SCREEN, "top");