diff options
Diffstat (limited to 'src/devices/bus/wangpc/lvc.cpp')
-rw-r--r-- | src/devices/bus/wangpc/lvc.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/devices/bus/wangpc/lvc.cpp b/src/devices/bus/wangpc/lvc.cpp index 9f6a8d59626..66b86493051 100644 --- a/src/devices/bus/wangpc/lvc.cpp +++ b/src/devices/bus/wangpc/lvc.cpp @@ -62,17 +62,17 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row ) { for (int column = 0; column < x_count; column++) { - offs_t addr = scroll_y + (m_scroll & 0x3f) + ((ma / 80) * 0x480) + (((ra & 0x0f) << 7) | (column & 0x7f)); + offs_t const addr = scroll_y + (m_scroll & 0x3f) + ((ma / 80) * 0x480) + (((ra & 0x0f) << 7) | (column & 0x7f)); uint16_t data = m_video_ram[addr & 0x7fff]; for (int bit = 0; bit < 8; bit++) { - int x = (column * 8) + bit; + int const x = (column * 8) + bit; int color = (BIT(data, 15) << 1) | BIT(data, 7); if (column == cursor_x) color = 0x03; - bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black(); + bitmap.pix(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black(); data <<= 1; } @@ -89,12 +89,12 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row ) for (int bit = 0; bit < 8; bit++) { - int x = (column * 8) + bit; + int const x = (column * 8) + bit; int color = (BIT(data, 31) << 3) | (BIT(data, 23) << 2) | (BIT(data, 15) << 1) | BIT(data, 7); if (column == cursor_x) color = 0x03; - bitmap.pix32(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black(); + bitmap.pix(vbp + y, hbp + x) = de ? m_palette[color] : rgb_t::black(); data <<= 1; } @@ -104,7 +104,7 @@ MC6845_UPDATE_ROW( wangpc_lvc_device::crtc_update_row ) } } -WRITE_LINE_MEMBER( wangpc_lvc_device::vsync_w ) +void wangpc_lvc_device::vsync_w(int state) { if (OPTION_VSYNC && state) { @@ -129,7 +129,7 @@ void wangpc_lvc_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(wangpc_lvc_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(wangpc_lvc_device::crtc_update_row)); m_crtc->out_vsync_callback().set(FUNC(wangpc_lvc_device::vsync_w)); } @@ -164,7 +164,7 @@ wangpc_lvc_device::wangpc_lvc_device(const machine_config &mconfig, const char * device_t(mconfig, WANGPC_LVC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_crtc(*this, MC6845_TAG), - m_video_ram(*this, "video_ram"), + m_video_ram(*this, "video_ram", RAM_SIZE, ENDIANNESS_LITTLE), m_option(0), m_scroll(0), m_irq(CLEAR_LINE) { @@ -177,9 +177,6 @@ wangpc_lvc_device::wangpc_lvc_device(const machine_config &mconfig, const char * void wangpc_lvc_device::device_start() { - // allocate memory - m_video_ram.allocate(RAM_SIZE); - // state saving save_item(NAME(m_option)); save_item(NAME(m_scroll)); |