summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/crtc_ega.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/crtc_ega.cpp')
-rw-r--r--src/devices/video/crtc_ega.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/video/crtc_ega.cpp b/src/devices/video/crtc_ega.cpp
index f993d883047..b7318d33f99 100644
--- a/src/devices/video/crtc_ega.cpp
+++ b/src/devices/video/crtc_ega.cpp
@@ -13,15 +13,15 @@
#include "screen.h"
+#define VERBOSE 1
+#include "logmacro.h"
-#define LOG (1)
-
-const device_type CRTC_EGA = device_creator<crtc_ega_device>;
+DEFINE_DEVICE_TYPE(CRTC_EGA, crtc_ega_device, "crtc_ega", "IBM EGA CRT Controller")
crtc_ega_device::crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, CRTC_EGA, "crtc_EGA", tag, owner, clock, "crtc_ega", __FILE__), device_video_interface(mconfig, *this, false)
+ : device_t(mconfig, CRTC_EGA, tag, owner, clock), device_video_interface(mconfig, *this, false)
, m_res_out_de_cb(*this), m_res_out_hsync_cb(*this), m_res_out_vsync_cb(*this), m_res_out_vblank_cb(*this)
, m_horiz_char_total(0), m_horiz_disp(0), m_horiz_blank_start(0), m_horiz_blank_end(0)
, m_ena_vert_access(0), m_de_skew(0)
@@ -80,7 +80,7 @@ READ8_MEMBER( crtc_ega_device::register_r )
WRITE8_MEMBER( crtc_ega_device::register_w )
{
- if (LOG) logerror("%s CRTC_EGA: reg 0x%02x = 0x%02x\n", machine().describe_context(), m_register_address_latch, data);
+ LOG("%s CRTC_EGA: reg 0x%02x = 0x%02x\n", machine().describe_context(), m_register_address_latch, data);
switch (m_register_address_latch)
{
@@ -198,7 +198,7 @@ void crtc_ega_device::recompute_parameters(bool postload)
rectangle visarea(0, max_visible_x, 0, max_visible_y);
- if (LOG) logerror("CRTC_EGA config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x Freq: %ffps\n",
+ LOG("CRTC_EGA config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x Freq: %ffps\n",
horiz_pix_total, vert_pix_total, max_visible_x, max_visible_y, hsync_on_pos, hsync_off_pos - 1, vsync_on_pos, vsync_off_pos - 1, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
if ( m_screen != nullptr )
@@ -209,7 +209,7 @@ void crtc_ega_device::recompute_parameters(bool postload)
else
{
m_has_valid_parameters = false;
- if (LOG) logerror("CRTC_EGA bad config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x\n",
+ LOG("CRTC_EGA bad config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x\n",
horiz_pix_total, vert_pix_total, max_visible_x, max_visible_y, hsync_on_pos, hsync_off_pos - 1, vsync_on_pos, vsync_off_pos - 1);
}