From 773183d16835facef7809b159649d46ecc2a1a7b Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 3 Aug 2016 21:36:29 +0200 Subject: [PATCH] Added Phoenix S3 Vision864 emulation. --- src/ibm.h | 1 + src/vid_s3.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++------ src/vid_s3.h | 1 + src/video.c | 1 + 4 files changed, 70 insertions(+), 8 deletions(-) diff --git a/src/ibm.h b/src/ibm.h index b6169ca40..417e00f82 100644 --- a/src/ibm.h +++ b/src/ibm.h @@ -398,6 +398,7 @@ enum GFX_ET4000W32CS, /*Tseng ET4000/W32p (Cardex) (ICS RAMDAC) */ GFX_VGAWONDERXL24, /*Compaq ATI VGA Wonder XL24 (28800-6)*/ GFX_STEALTH64, /*S3 Vision864 (Diamond Stealth 64)*/ + GFX_PHOENIX_VISION864, /*S3 Vision864 (Phoenix)*/ GFX_MAX }; diff --git a/src/vid_s3.c b/src/vid_s3.c index 042d975a4..66751fb9d 100644 --- a/src/vid_s3.c +++ b/src/vid_s3.c @@ -2295,6 +2295,25 @@ int s3_phoenix_trio64_available() return rom_present("roms/86c764x1.bin"); } +void *s3_phoenix_vision864_init() +{ + s3_t *s3 = s3_init("roms/86c864p.bin", S3_VISION864); + + s3->id = 0xc1; /*Vision864P*/ + s3->id_ext = s3->id_ext_pci = 0xc1; + s3->packed_mmio = 0; + + s3->getclock = sdac_getclock; + s3->getclock_p = &s3->ramdac; + + return s3; +} + +int s3_phoenix_vision864_available() +{ + return rom_present("roms/86c864p.BIN"); +} + void *s3_diamond_stealth64_init() { s3_t *s3 = s3_init("roms/STEALT64.BIN", S3_VISION864); @@ -2501,6 +2520,41 @@ static device_config_t s3_phoenix_trio64_config[] = } }; +static device_config_t s3_phoenix_vision864_config[] = +{ + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .selection = + { + { + .description = "512 KB", + .value = 0 + }, + { + .description = "1 MB", + .value = 1 + }, + { + .description = "2 MB", + .value = 2 + }, + { + .description = "4 MB", + .value = 4 + }, + { + .description = "" + } + }, + .default_int = 2 + }, + { + .type = -1 + } +}; + static device_config_t s3_diamond_stealth64_config[] = { { @@ -2529,14 +2583,6 @@ static device_config_t s3_diamond_stealth64_config[] = .description = "4 MB", .value = 4 }, - { - .description = "6 MB", - .value = 6 - }, - { - .description = "8 MB", - .value = 8 - }, { .description = "" } @@ -2644,6 +2690,19 @@ device_t s3_phoenix_trio64_device = s3_phoenix_trio64_config }; +device_t s3_phoenix_vision864_device = +{ + "Phoenix S3 Vision864", + 0, + s3_phoenix_vision864_init, + s3_close, + s3_phoenix_vision864_available, + s3_speed_changed, + s3_force_redraw, + s3_add_status_info, + s3_phoenix_vision864_config +}; + device_t s3_diamond_stealth64_device = { "S3 Vision864 (Diamond Stealth64)", diff --git a/src/vid_s3.h b/src/vid_s3.h index 84d3f9ba3..78d01cd38 100644 --- a/src/vid_s3.h +++ b/src/vid_s3.h @@ -2,5 +2,6 @@ device_t s3_bahamas64_device; device_t s3_9fx_device; device_t s3_phoenix_trio32_device; device_t s3_phoenix_trio64_device; +device_t s3_phoenix_vision864_device; device_t s3_diamond_stealth64_device; device_t s3_miro_vision964_device; diff --git a/src/video.c b/src/video.c index d7f0a5b0e..00fd09a90 100644 --- a/src/video.c +++ b/src/video.c @@ -75,6 +75,7 @@ static VIDEO_CARD video_cards[] = {"OAK OTI-077", &oti077_device, GFX_OTI077}, {"Paradise Bahamas 64 (S3 Vision864)", &s3_bahamas64_device, GFX_BAHAMAS64}, {"Paradise WD90C11", ¶dise_wd90c11_device, GFX_WD90C11}, + {"Phoenix S3 Vision864", &s3_phoenix_vision864_device,GFX_PHOENIX_VISION864}, {"Phoenix S3 Trio32", &s3_phoenix_trio32_device, GFX_PHOENIX_TRIO32}, {"Phoenix S3 Trio64", &s3_phoenix_trio64_device, GFX_PHOENIX_TRIO64}, {"S3 ViRGE/DX", &s3_virge_375_device, GFX_VIRGEDX},