diff --git a/src/mess/drivers/prof80.c b/src/mess/drivers/prof80.c index b8006a8aae4..9a5b110762a 100644 --- a/src/mess/drivers/prof80.c +++ b/src/mess/drivers/prof80.c @@ -605,16 +605,6 @@ static MACHINE_CONFIG_START( prof80, prof80_state ) MCFG_CPU_PROGRAM_MAP(prof80_mem) MCFG_CPU_IO_MAP(prof80_io) - // video hardware - MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate - MCFG_SCREEN_UPDATE_DEVICE(ECBBUS_TAG, ecbbus_device, screen_update) - MCFG_SCREEN_SIZE(640, 480) - MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_PALETTE_LENGTH(2) - MCFG_PALETTE_INIT(black_and_white) - // devices MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, rtc_intf) MCFG_UPD765A_ADD(UPD765_TAG, false, true) diff --git a/src/mess/machine/ecb_grip.c b/src/mess/machine/ecb_grip.c index 2c3c7b973c8..b17b5549c55 100644 --- a/src/mess/machine/ecb_grip.c +++ b/src/mess/machine/ecb_grip.c @@ -224,7 +224,6 @@ ADDRESS_MAP_END void grip_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param) { - const rgb_t *palette = palette_entry_list_raw(bitmap.palette()); int column, bit; for (column = 0; column < x_count; column++) @@ -237,7 +236,7 @@ void grip_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, c int x = (column * 8) + bit; int color = m_flash ? 0 : BIT(data, bit); - bitmap.pix32(y, x) = palette[color]; + bitmap.pix32(y, x) = RGB_MONOCHROME_WHITE[color]; } } } @@ -285,7 +284,7 @@ static const speaker_interface speaker_intf = static const mc6845_interface crtc_intf = { - ":" SCREEN_TAG, + SCREEN_TAG, 8, NULL, grip_update_row, @@ -533,6 +532,14 @@ static MACHINE_CONFIG_FRAGMENT( grip ) MCFG_CPU_PROGRAM_MAP(grip_mem) MCFG_CPU_IO_MAP(grip_io) + // video hardware + MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate + MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update) + MCFG_SCREEN_SIZE(640, 480) + MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) + // sound hardware MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) @@ -662,7 +669,8 @@ grip_device::grip_device(const machine_config &mconfig, const char *tag, device_ m_sti(*this, Z80STI_TAG), m_crtc(*this, MC6845_TAG), m_centronics(*this, CENTRONICS_TAG), - m_speaker(*this, SPEAKER_TAG) + m_speaker(*this, SPEAKER_TAG), + m_video_ram(*this, "video_ram") { } @@ -675,7 +683,7 @@ void grip_device::device_start() m_ecb = machine().device(ECBBUS_TAG); // allocate video RAM - m_video_ram = auto_alloc_array(machine(), UINT8, VIDEORAM_SIZE); + m_video_ram.allocate(VIDEORAM_SIZE); // setup GRIP memory banking membank("videoram")->configure_entries(0, 2, m_video_ram, 0x8000); @@ -690,7 +698,6 @@ void grip_device::device_start() save_item(NAME(m_vol1)); save_item(NAME(m_keydata)); save_item(NAME(m_kbf)); - save_pointer(NAME(m_video_ram), VIDEORAM_SIZE); save_item(NAME(m_lps)); save_item(NAME(m_page)); save_item(NAME(m_flash)); @@ -933,15 +940,3 @@ void grip_device::ecbbus_io_w(offs_t offset, UINT8 data) } } } - - -//------------------------------------------------- -// ecbbus_screen_update - screen update -//------------------------------------------------- - -UINT32 grip_device::ecbbus_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - m_crtc->screen_update(screen, bitmap, cliprect); - - return false; -} diff --git a/src/mess/machine/ecb_grip.h b/src/mess/machine/ecb_grip.h index f05941f6600..275dbfac202 100644 --- a/src/mess/machine/ecb_grip.h +++ b/src/mess/machine/ecb_grip.h @@ -73,7 +73,6 @@ protected: // device_ecbbus_card_interface overrides virtual UINT8 ecbbus_io_r(offs_t offset); virtual void ecbbus_io_w(offs_t offset, UINT8 data); - virtual UINT32 ecbbus_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); private: required_device m_ppi; @@ -93,7 +92,7 @@ private: int m_kbf; // keyboard buffer full // video state - UINT8 *m_video_ram; // video RAM + optional_shared_ptr m_video_ram; // video RAM int m_lps; // light pen sense int m_page; // video page int m_flash; // flash diff --git a/src/mess/machine/ecbbus.c b/src/mess/machine/ecbbus.c index 1b5781a41f0..ab922c401b3 100644 --- a/src/mess/machine/ecbbus.c +++ b/src/mess/machine/ecbbus.c @@ -261,26 +261,3 @@ WRITE_LINE_MEMBER( ecbbus_device::nmi_w ) { m_out_nmi_func(state); } - - -//------------------------------------------------- -// screen_update - -//------------------------------------------------- - -UINT32 ecbbus_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - bool value = false; - - for (int i = 0; i < MAX_ECBBUS_SLOTS; i++) - { - if (m_ecbbus_device[i] != NULL) - { - if (m_ecbbus_device[i]->ecbbus_screen_update(screen, bitmap, cliprect)) - { - value = true; - } - } - } - - return value; -} diff --git a/src/mess/machine/ecbbus.h b/src/mess/machine/ecbbus.h index 96bc575823d..2d633e3fd9e 100644 --- a/src/mess/machine/ecbbus.h +++ b/src/mess/machine/ecbbus.h @@ -113,8 +113,6 @@ public: DECLARE_WRITE_LINE_MEMBER( int_w ); DECLARE_WRITE_LINE_MEMBER( nmi_w ); - UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - protected: // device-level overrides virtual void device_start(); @@ -154,7 +152,6 @@ public: virtual void ecbbus_mem_w(offs_t offset, UINT8 data) { }; virtual UINT8 ecbbus_io_r(offs_t offset) { return 0; }; virtual void ecbbus_io_w(offs_t offset, UINT8 data) { }; - virtual UINT32 ecbbus_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return false; } public: ecbbus_device *m_ecb;