From 592040cf46c5f136096d6f37d29784b277848f0b Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 26 Jun 2023 23:21:22 +0200 Subject: video/riva128.cpp: add Riva 128ZX variant --- src/devices/video/riva128.cpp | 33 ++++++++++++++++++++++++++++++++- src/devices/video/riva128.h | 12 +++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/devices/video/riva128.cpp b/src/devices/video/riva128.cpp index 748c24f5124..4be3204bf8e 100644 --- a/src/devices/video/riva128.cpp +++ b/src/devices/video/riva128.cpp @@ -28,7 +28,8 @@ References: #define LOGTODO(...) LOGMASKED(LOG_TODO, __VA_ARGS__) -DEFINE_DEVICE_TYPE(RIVA128, riva128_device, "riva128", "SGS-Thompson/nVidia Riva 128 (NV3)") +DEFINE_DEVICE_TYPE(RIVA128, riva128_device, "riva128", "SGS-Thompson/nVidia Riva 128 (NV3)") +DEFINE_DEVICE_TYPE(RIVA128ZX, riva128zx_device, "riva128zx", "SGS-Thompson/nVidia Riva 128 ZX (NV3T)") riva128_device::riva128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, type, tag, owner, clock) @@ -300,3 +301,33 @@ void riva128_device::map_extra(uint64_t memory_window_start, uint64_t memory_win //memory_space->install_rom(0xc0000, 0xcffff, (void *)expansion_rom); } } + +/******************************************** + * + * Riva 128ZX overrides + * + *******************************************/ + +riva128zx_device::riva128zx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : riva128_device(mconfig, RIVA128ZX, tag, owner, clock) +{ + // $54-$57 in ROM for subvendor ID (if FBA[1] config is 1) + set_ids_agp(0x12d20019, 0x00, 0x12d20019); +} + +ROM_START( riva128zx ) + ROM_REGION32_LE( 0x8000, "vga_rom", ROMREGION_ERASEFF ) + ROM_SYSTEM_BIOS( 0, "asus", "ASUS AGP-V3000 ZX TV (V1.70D.03)" ) + ROMX_LOAD( "asus_agp-v3000zx.vbi", 0x000000, 0x008000, CRC(8319de18) SHA1(837fe8afdf03196550c51ff4987e7f25cc75222c), ROM_BIOS(0) ) + // TODO: confirm if this is really a 128ZX + // (underlying ROM PCIR has 0x0018 not 0x0019) + ROM_SYSTEM_BIOS( 1, "elsa", "ELSA VICTORY Erazor/LT (Ver. 1.58.00)" ) + ROMX_LOAD( "elsa.vbi", 0x000000, 0x008000, CRC(8dd4627a) SHA1(cfb10d9a370a951f9ed23719b2c5fa79c9e49668), ROM_BIOS(1) ) + ROM_SYSTEM_BIOS( 2, "creative", "Creative Graphics Blaster Riva 128ZX (V1.72.3D)" ) + ROMX_LOAD( "creative_ct6730.vbi", 0x000000, 0x008000, CRC(72f03a0e) SHA1(7126c4c4d20c48848defc5dd05f0d5b698948015), ROM_BIOS(2) ) +ROM_END + +const tiny_rom_entry *riva128zx_device::device_rom_region() const +{ + return ROM_NAME(riva128zx); +} diff --git a/src/devices/video/riva128.h b/src/devices/video/riva128.h index 2d5f8080b9c..a70bf909c16 100644 --- a/src/devices/video/riva128.h +++ b/src/devices/video/riva128.h @@ -55,6 +55,16 @@ private: u32 m_main_scratchpad_id = 0; }; -DECLARE_DEVICE_TYPE(RIVA128, riva128_device) +class riva128zx_device : public riva128_device +{ +public: + riva128zx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual const tiny_rom_entry *device_rom_region() const override; +}; + +DECLARE_DEVICE_TYPE(RIVA128, riva128_device) +DECLARE_DEVICE_TYPE(RIVA128ZX, riva128zx_device) #endif // MAME_VIDEO_RIVA128_H -- cgit v1.2.3