summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2020-11-24 18:13:26 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2020-11-24 18:13:26 +1100
commit96a78f81dae294dd65a3d490ae895f8a485a55e4 (patch)
tree4214c01bc1af8103a575af30b2912d7d06204828 /src/mame
parent50c640b47283b9695659c3fcce7f71886e29ced2 (diff)
playch10: fixed crash at start
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/machine/playch10.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mame/machine/playch10.cpp b/src/mame/machine/playch10.cpp
index f6e1acc44d8..d8dd31be61d 100644
--- a/src/mame/machine/playch10.cpp
+++ b/src/mame/machine/playch10.cpp
@@ -343,7 +343,11 @@ void playch10_state::pc10_set_videorom_bank( int first, int count, int bank, int
/* yeah, this is probably a horrible assumption to make.*/
/* but the driver is 100% consistant */
- len = memregion("gfx2")->bytes();
+ if (memregion("gfx2")) // playch10 bios doesn't have gfx2
+ len = memregion("gfx2")->bytes();
+ else
+ len = memregion("gfx1")->bytes();
+
len /= 0x400; // convert to KB
len /= size; // convert to bank resolution
len--; // convert to mask