src/mess/video/isa_svga_cirrus.c
| r0 | r14474 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | ISA SVGA Cirrus Logic wrapper |
| 4 | |
| 5 | ***************************************************************************/ |
| 6 | |
| 7 | #include "emu.h" |
| 8 | #include "isa_svga_cirrus.h" |
| 9 | #include "video/pc_vga.h" |
| 10 | |
| 11 | ROM_START( dm_clgd5430 ) |
| 12 | ROM_REGION(0x8000,"dm_clgd5430", 0) |
| 13 | ROM_LOAD("speedstar_pro_se_v1.00.u2", 0x00000, 0x8000, CRC(ed79572c) SHA1(15131e2b2db7a34971083a250e4a21ab7bd64a9d) ) |
| 14 | ROM_IGNORE( 0x8000 ) |
| 15 | ROM_END |
| 16 | |
| 17 | //************************************************************************** |
| 18 | // GLOBAL VARIABLES |
| 19 | //************************************************************************** |
| 20 | |
| 21 | const device_type ISA8_SVGA_CIRRUS = &device_creator<isa8_svga_cirrus_device>; |
| 22 | |
| 23 | |
| 24 | //------------------------------------------------- |
| 25 | // machine_config_additions - device-specific |
| 26 | // machine configurations |
| 27 | //------------------------------------------------- |
| 28 | |
| 29 | machine_config_constructor isa8_svga_cirrus_device::device_mconfig_additions() const |
| 30 | { |
| 31 | return MACHINE_CONFIG_NAME( pcvideo_vga_isa ); |
| 32 | } |
| 33 | |
| 34 | //------------------------------------------------- |
| 35 | // rom_region - device-specific ROM region |
| 36 | //------------------------------------------------- |
| 37 | |
| 38 | const rom_entry *isa8_svga_cirrus_device::device_rom_region() const |
| 39 | { |
| 40 | return ROM_NAME( dm_clgd5430 ); |
| 41 | } |
| 42 | |
| 43 | //************************************************************************** |
| 44 | // LIVE DEVICE |
| 45 | //************************************************************************** |
| 46 | |
| 47 | //------------------------------------------------- |
| 48 | // isa8_vga_device - constructor |
| 49 | //------------------------------------------------- |
| 50 | |
| 51 | isa8_svga_cirrus_device::isa8_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 52 | device_t(mconfig, ISA8_SVGA_CIRRUS, "ISA8_SVGA_CIRRUS", tag, owner, clock), |
| 53 | device_isa8_card_interface(mconfig, *this) |
| 54 | { |
| 55 | m_shortname = "dm_clgd5430"; |
| 56 | } |
| 57 | |
| 58 | //------------------------------------------------- |
| 59 | // device_start - device-specific startup |
| 60 | //------------------------------------------------- |
| 61 | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return input_port_read(space->machine(), "IN0"); } |
| 62 | |
| 63 | void isa8_svga_cirrus_device::device_start() |
| 64 | { |
| 65 | set_isa_device(); |
| 66 | |
| 67 | video_start_vga( machine() ); |
| 68 | |
| 69 | pc_vga_init(machine(), input_port_0_r, NULL); |
| 70 | |
| 71 | int i; |
| 72 | for (i = 0; i < 0x100; i++) |
| 73 | palette_set_color_rgb(machine(), i, 0, 0, 0); |
| 74 | pc_video_start(machine()); |
| 75 | |
| 76 | m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "dm_clgd5430"); |
| 77 | |
| 78 | m_isa->install_device(0x03b0, 0x03bf, 0, 0, FUNC(vga_port_03b0_r), FUNC(vga_port_03b0_w)); |
| 79 | m_isa->install_device(0x03c0, 0x03cf, 0, 0, FUNC(vga_port_03c0_r), FUNC(vga_port_03c0_w)); |
| 80 | m_isa->install_device(0x03d0, 0x03df, 0, 0, FUNC(vga_port_03d0_r), FUNC(vga_port_03d0_w)); |
| 81 | // m_isa->install_device(0x9ae8, 0x9aeb, 0, 0, FUNC(s3_port_9ae8_r), FUNC(s3_port_9ae8_w)); |
| 82 | |
| 83 | m_isa->install_memory(0xa0000, 0xbffff, 0, 0, FUNC(vga_mem_r), FUNC(vga_mem_w)); |
| 84 | } |
| 85 | |
| 86 | //------------------------------------------------- |
| 87 | // device_reset - device-specific reset |
| 88 | //------------------------------------------------- |
| 89 | |
| 90 | void isa8_svga_cirrus_device::device_reset() |
| 91 | { |
| 92 | pc_vga_reset(machine()); |
| 93 | } |
src/mess/video/isa_svga_cirrus.h
| r0 | r14474 | |
| 1 | #pragma once |
| 2 | |
| 3 | #ifndef __ISA_SVGA_CIRRUS_H__ |
| 4 | #define __ISA_SVGA_CIRRUS_H__ |
| 5 | |
| 6 | #include "emu.h" |
| 7 | #include "machine/isa.h" |
| 8 | |
| 9 | //************************************************************************** |
| 10 | // TYPE DEFINITIONS |
| 11 | //************************************************************************** |
| 12 | |
| 13 | // ======================> isa8_vga_device |
| 14 | |
| 15 | class isa8_svga_cirrus_device : |
| 16 | public device_t, |
| 17 | public device_isa8_card_interface |
| 18 | { |
| 19 | public: |
| 20 | // construction/destruction |
| 21 | isa8_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 22 | |
| 23 | // optional information overrides |
| 24 | virtual machine_config_constructor device_mconfig_additions() const; |
| 25 | virtual const rom_entry *device_rom_region() const; |
| 26 | protected: |
| 27 | // device-level overrides |
| 28 | virtual void device_start(); |
| 29 | virtual void device_reset(); |
| 30 | }; |
| 31 | |
| 32 | |
| 33 | // device type definition |
| 34 | extern const device_type ISA8_SVGA_CIRRUS; |
| 35 | |
| 36 | #endif /* __ISA_VGA_H__ */ |