Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions hash/sun_sparc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<!--
license:CC0-1.0
-->
<softwarelist name="sun_sparc" description="Sun Microsystems SPARC software">

<!-- Dumped from original Sun CDs with a Plextor and without any reading or C2 error -->
<software name="sol8_10_10_sparc" supported="no">
<description>Solaris 8 10-00 Media - SPARC Platform Edition for Sun Computer Systems</description>
<year>2000</year>
<publisher>Sun Microsystems</publisher>
<part name="cdrom1" interface="cdrom">
<feature name="part_id" value="Solaris 8 Installation - SPARC Platform Edition for Sun Computer Systems 10-00 Revision A"/>
<diskarea name="cdrom">
<disk name="solaris_8_installation_10-00.chd" sha1="c2a783c4a90928eb5e75f031058b15d2516ad609" />
</diskarea>
</part>
<part name="cdrom2" interface="cdrom">
<feature name="part_id" value="Solaris 8 Software - SPARC Platform Edition 10-00 Revision A - 1 of 2"/>
<diskarea name="cdrom">
<disk name="solaris_8_software_10-00_1_of_2.chd" sha1="dabf63ce5b91873da57590d781eb2d33f3f90749" />
</diskarea>
</part>
<part name="cdrom3" interface="cdrom">
<feature name="part_id" value="Solaris 8 Software - SPARC Platform Edition 10-00 Revision A - 2 of 2"/>
<diskarea name="cdrom">
<disk name="solaris_8_software_10-00_2_of_2.chd" sha1="984c8a2d2896fce5f54d735b01d3e0ef7da7c6db" />
</diskarea>
</part>
<part name="cdrom4" interface="cdrom">
<feature name="part_id" value="Solaris 8 Maintenance Update 2 And Installation Guide - SPARC Platform Edition 10-00 Revision A"/>
<diskarea name="cdrom">
<disk name="solaris_8_maintenance_update_2_and_installation_guide_10-00.chd" sha1="4d6ed28882a02579384bb63850539e77c1283030" />
</diskarea>
</part>
<part name="cdrom5" interface="cdrom">
<feature name="part_id" value="Solaris 8 Software Supplement - SPARC Platform Edition for Sun Computer Systems 10-00 Revision A"/>
<diskarea name="cdrom">
<disk name="solaris_8_software_supplement_10-00.chd" sha1="75d8645b7b6840587d37bb1fb7b50085f46d1491" />
</diskarea>
</part>
<part name="cdrom6" interface="cdrom">
<feature name="part_id" value="Solaris 8 Documentation - SPARC / Intel PLatform Edition 10-00 Revision A"/>
<diskarea name="cdrom">
<disk name="solaris_8_documentation_10-00.chd" sha1="56010878650de07a6a844b7ffe2d7b02dd0dcc1a" />
</diskarea>
</part>
<part name="cdrom7" interface="cdrom">
<feature name="part_id" value="Flash PROM Update Multimedia Answerbook - SPARC Platform Edition for Sun Computer Systems 10-00 Revision A"/>
<diskarea name="cdrom">
<disk name="flash_prom_update_multimedia_answerbook_10-00.chd" sha1="2190acf740279dec20be16a5703adc1b6915854f" />
</diskarea>
</part>
</software>

<!-- Dumped from original Sun CD with a Plextor and without any reading or C2 error -->
<software name="smc_2_1_2" supported="no">
<description>Sun Management Center 2.1.1 - February 2000 Revision A</description>
<year>2000</year>
<publisher>Sun Microsystems</publisher>
<part name="cdrom1" interface="cdrom">
<diskarea name="cdrom">
<disk name="sun_management_center_2_1_1.chd" sha1="1a204a0f0ad3d7b34cf577e3d5242eb4f036fb2e" />
</diskarea>
</part>
</software>

<!-- Dumped from original Sun CD with a Plextor and without any reading or C2 error -->
<software name="sunsol_vol1_2000" supported="no">
<description>SunSolutions CD Volume 1 2000</description>
<year>2000</year>
<publisher>Sun Microsystems</publisher>
<part name="cdrom1" interface="cdrom">
<diskarea name="cdrom">
<disk name="sunsolutions_2000_vol_1.chd" sha1="b3b529ba4bc7aa63e58bf99daf1efdfef28762c8" />
</diskarea>
</part>
</software>

<!-- Dumped from original CD with a Plextor and without any reading or C2 error -->
<software name="raptorgfx_2_1" supported="no">
<description>Raptor GFX Open Windows for Solaris - Version 2.1</description>
<year>1999</year>
<publisher>Tech Source Inc.</publisher>
<part name="cdrom1" interface="cdrom">
<diskarea name="cdrom">
<disk name="raptor_gfx_openwindows_for_solaris.chd" sha1="c6e79c454561eb1735bae77058651fcb2a242a05" />
</diskarea>
</part>
</software>

</softwarelist>
2 changes: 2 additions & 0 deletions scripts/src/bus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5891,6 +5891,8 @@ if (BUSES["PCI"]~=null) then
MAME_DIR .. "src/devices/bus/pci/opti82c861.h",
MAME_DIR .. "src/devices/bus/pci/pdc20262.cpp",
MAME_DIR .. "src/devices/bus/pci/pdc20262.h",
MAME_DIR .. "src/devices/bus/pci/permedia2.cpp",
MAME_DIR .. "src/devices/bus/pci/permedia2.h",
MAME_DIR .. "src/devices/bus/pci/promotion.cpp",
MAME_DIR .. "src/devices/bus/pci/promotion.h",
MAME_DIR .. "src/devices/bus/pci/riva128.cpp",
Expand Down
3 changes: 3 additions & 0 deletions src/devices/bus/pci/pci_slot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "opti82c861.h"
#include "oti_spitfire.h"
#include "pdc20262.h"
#include "permedia2.h"
#include "promotion.h"
#include "riva128.h"
#include "rivatnt.h"
Expand Down Expand Up @@ -166,6 +167,8 @@ void pci_cards(device_slot_interface &device)
// assume all natively with class code 03
void agp_cards(device_slot_interface &device)
{
// 3Dlabs
device.option_add("permedia2", PERMEDIA2);
// nVidia
device.option_add("riva128", RIVA128);
device.option_add("riva128zx", RIVA128ZX);
Expand Down
166 changes: 166 additions & 0 deletions src/devices/bus/pci/permedia2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
// license:BSD-3-Clause
// copyright-holders:
/**************************************************************************************************


**************************************************************************************************/

#include "emu.h"
#include "permedia2.h"

#define LOG_WARN (1U << 1)

#define VERBOSE (LOG_GENERAL | LOG_WARN)
//#define LOG_OUTPUT_FUNC osd_printf_info
#include "logmacro.h"

#define LOGWARN(...) LOGMASKED(LOG_WARN, __VA_ARGS__)


DEFINE_DEVICE_TYPE(PERMEDIA2, permedia2_device, "permedia2", "3Dlabs Permedia 2")

permedia2_device::permedia2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: pci_card_device(mconfig, type, tag, owner, clock)
, m_vga(*this, "vga")
, m_vga_rom(*this, "vga_rom")
{
// TODO: can change class code
set_ids(0x104c3d07, 0x01, 0x030100, 0x104c3d07);
}

permedia2_device::permedia2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: permedia2_device(mconfig, PERMEDIA2, tag, owner, clock)

{
}

ROM_START( permedia2 )
ROM_REGION32_LE( 0x20000, "vga_rom", ROMREGION_ERASEFF )
// TODO: 4 other dumps available on VGALegacyMK3, separate Sun versions to own subclass
ROM_SYSTEM_BIOS( 0, "creative", "03/03/98 Creative Graphics Blaster Exxtreme" )
ROMX_LOAD( "creative.vbi", 0x00000, 0x08000, CRC(3e622da7) SHA1(b06f89777badfdb7cd4c76b414ba19fcaed243c9), ROM_BIOS(0) )
// Tech-Source Inc. Raptor GFX
ROM_SYSTEM_BIOS( 1, "sparc_1_60", "18/May/2000 (Rev 1.60) for Solaris SPARC" )
ROMX_LOAD( "raptor160.u10", 0x00000, 0x20000, CRC(8d6706d5) SHA1(6df6719aa8f46176d837b1b05e90f7e541416b4c), ROM_BIOS(1) )
// Tech-Source Inc. Raptor GFX // Half-size ROM?
ROM_SYSTEM_BIOS( 2, "sparc_1_11", "07/Jun/1999 (Rev 1.11) for Solaris SPARC" )
ROMX_LOAD( "raptor111.bin", 0x00000, 0x10000, CRC(ee21d1f4) SHA1(04845a2e0938b9ecd88934c148e637e6f00e2578), ROM_BIOS(2) )
// Tech-Source Inc. Raptor GFX
ROM_SYSTEM_BIOS( 3, "sparc_1_10", "15/Mar/1999 (Rev 1.10) for Solaris SPARC" )
ROMX_LOAD( "raptor110.bin", 0x00000, 0x20000, CRC(6a6f4ba4) SHA1(89df1a7bc52693e34b79587c16f2c2efb30bd3f1), ROM_BIOS(3) )
// Phoenix / 3DLabs generic BIOS for IBM PC Compatible systems
ROM_SYSTEM_BIOS( 4, "pc_99", "25/Feb/1999 for IBM PC Compatible" )
ROMX_LOAD( "permed2pc.bin", 0x00000, 0x20000, CRC(6711ddf8) SHA1(9f02e4d1a64c42e4a17df8428d8cc9a72e78e0d5), ROM_BIOS(4) )

ROM_END

const tiny_rom_entry *permedia2_device::device_rom_region() const
{
return ROM_NAME(permedia2);
}


void permedia2_device::device_add_mconfig(machine_config &config)
{
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480);
screen.set_screen_update(m_vga, FUNC(vga_device::screen_update));

// TODO: bump to TVP4020 core
VGA(config, m_vga, 0);
m_vga->set_screen("screen");
// either 4 or 8MB
m_vga->set_vram_size(8*1024*1024);

}

void permedia2_device::device_start()
{
pci_card_device::device_start();

add_map( 128*1024, M_MEM, FUNC(permedia2_device::control_map));
add_map(8*1024*1024, M_MEM, FUNC(permedia2_device::aperture1_map));
add_map(8*1024*1024, M_MEM, FUNC(permedia2_device::aperture2_map));

add_rom((u8 *)m_vga_rom->base(), 128*1024 );
expansion_rom_base = 0xc0000;

// INTA#
intr_pin = 1;
}

void permedia2_device::device_reset()
{
pci_card_device::device_reset();

// TODO: to be checked
command = 0x0000;
command_mask = 0x0027;
status = 0x0000;

remap_cb();
}

u8 permedia2_device::capptr_r()
{
return 0x40;
}

void permedia2_device::config_map(address_map &map)
{
pci_card_device::config_map(map);
map(0x40, 0x43).lr32(NAME([] { return 0x0010'0002; }));
// AGP 1x + SBA + 31 RQ
map(0x44, 0x47).lr32(NAME([] { return 0x1f00'0201; }));

// map(0xf8, 0xf8) CFGIndirectAddress
// map(0xfc, 0xfc) CFGIndirectData
}

void permedia2_device::control_map(address_map &map)
{

}

void permedia2_device::aperture1_map(address_map &map)
{

}

void permedia2_device::aperture2_map(address_map &map)
{

}

void permedia2_device::legacy_memory_map(address_map &map)
{
map(0xa0000, 0xbffff).rw(FUNC(permedia2_device::vram_r), FUNC(permedia2_device::vram_w));
}

void permedia2_device::legacy_io_map(address_map &map)
{
map(0, 0x02f).m(m_vga, FUNC(vga_device::io_map));
}

uint8_t permedia2_device::vram_r(offs_t offset)
{
return downcast<vga_device *>(m_vga.target())->mem_r(offset);
}

void permedia2_device::vram_w(offs_t offset, uint8_t data)
{
downcast<vga_device *>(m_vga.target())->mem_w(offset, data);
}

void permedia2_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space)
{
if (command & 7)
{
memory_space->install_readwrite_handler(0xa0000, 0xbffff, read8sm_delegate(*this, FUNC(permedia2_device::vram_r)), write8sm_delegate(*this, FUNC(permedia2_device::vram_w)));

io_space->install_device(0x03b0, 0x03df, *this, &permedia2_device::legacy_io_map);
//memory_space->install_rom(0xc0000, 0xcffff, (void *)expansion_rom);
}
}

52 changes: 52 additions & 0 deletions src/devices/bus/pci/permedia2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// license:BSD-3-Clause
// copyright-holders:

#ifndef MAME_BUS_PCI_PERMEDIA2_H
#define MAME_BUS_PCI_PERMEDIA2_H

#pragma once

#include "pci_slot.h"

#include "video/pc_vga.h"

class permedia2_device : public pci_card_device
{
public:
permedia2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

static constexpr feature_type unemulated_features() { return feature::GRAPHICS; }

void legacy_memory_map(address_map &map) ATTR_COLD;
void legacy_io_map(address_map &map) ATTR_COLD;

protected:
permedia2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);

virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;

virtual const tiny_rom_entry *device_rom_region() const override;

virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;

virtual void config_map(address_map &map) override;

virtual u8 capptr_r() override;
private:
required_device<vga_device> m_vga;
required_memory_region m_vga_rom;

u8 vram_r(offs_t offset);
void vram_w(offs_t offset, uint8_t data);

void control_map(address_map &map) ATTR_COLD;
void aperture1_map(address_map &map) ATTR_COLD;
void aperture2_map(address_map &map) ATTR_COLD;
};

DECLARE_DEVICE_TYPE(PERMEDIA2, permedia2_device)

#endif // MAME_BUS_PCI_PERMEDIA2_H
3 changes: 3 additions & 0 deletions src/mame/mame.lst
Original file line number Diff line number Diff line change
Expand Up @@ -44625,6 +44625,9 @@ sothello
@source:success/tonton.cpp
tonton

@source:sun/e250.cpp
e250

@source:sun/sun1.cpp
sun1

Expand Down
Loading
Loading