summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/pc_vga_mediagx.cpp
blob: ea1a6a3d6819a110e423d401f56c359e97b991c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// license:BSD-3-Clause
// copyright-holders: Angelo Salese
/**************************************************************************************************

MediaGX VGA virtual interface

TODO:
- Currently cheat around software VGA, MediaGX notoriously triggers SMI for every access to
  VGA legacy ranges, which is horrible both for emulation purposes and for performance.
- A good benchmark about fixing pc_vga infrastructure:
  it connects thru a VGA connector anyway & it has VGA features (DDC, HW cursor, BitBLT)

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

#include "emu.h"
#include "pc_vga_mediagx.h"

#include "screen.h"

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

DEFINE_DEVICE_TYPE(MEDIAGX_VGA,  mediagx_vga_device,  "mediagx_vga",  "MediaGX Virtual VGA i/f")

mediagx_vga_device::mediagx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: svga_device(mconfig, MEDIAGX_VGA, tag, owner, clock)
{
	m_crtc_space_config = address_space_config("crtc_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(mediagx_vga_device::crtc_map), this));
}

void mediagx_vga_device::device_start()
{
	svga_device::device_start();
}

void mediagx_vga_device::device_reset()
{
	svga_device::device_reset();
}

void mediagx_vga_device::crtc_map(address_map &map)
{
	svga_device::crtc_map(map);
	// astropc.cpp read this at boot, DDC?
	map(0x3e, 0x3e).lr8(NAME([] () { return 0xff; }));
}

uint8_t mediagx_vga_device::mem_r(offs_t offset)
{
	return svga_device::mem_r(offset);
}

void mediagx_vga_device::mem_w(offs_t offset, uint8_t data)
{
	svga_device::mem_w(offset, data);
}