From a0d853ff1ff1aab82b7a22d7da99c437cc463b66 Mon Sep 17 00:00:00 2001 From: luennix Date: Fri, 17 Feb 2023 22:09:17 +0300 Subject: [PATCH] Actually implement on-board ViRGE/DX for Infinia 7200 and TC430HX --- src/video/vid_s3_virge.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index 376abb68c..e2ecf8ae5 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -4181,10 +4181,13 @@ s3_virge_init(const device_t *info) s3_virge_overlay_draw); virge->svga.hwcursor.cur_ysize = 64; - if (info->local == S3_VIRGE_GX2) - rom_init(&virge->bios_rom, (char *) bios_fn, 0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL); - else - rom_init(&virge->bios_rom, (char *) bios_fn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); + if (bios_fn != NULL) + { + if (info->local == S3_VIRGE_GX2) + rom_init(&virge->bios_rom, (char *) bios_fn, 0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL); + else + rom_init(&virge->bios_rom, (char *) bios_fn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); + } mem_mapping_disable(&virge->bios_rom.mapping);