mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
playch10: fixed crash at start
This commit is contained in:
parent
50c640b472
commit
96a78f81da
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user