(Question regarding screen macro)

How do i specify a second, totally independent graphical screen from within the rainbow. driver?

First screen is reserved for the on-board output (vt100 video, text only; working).

The 2nd (new) screen should be driven exclusively by the NEC 7220 display controller (accessed in several drivers like QX10, DMV, IF800 and VT240).

I now have implemented some of the extra logic on the Rainbow color graphics board, as well as the mandatory

UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels );

...and now cant figure out how to "set the screen". Is it

Code:
MCFG_UPD7220_SET_SCREEN("screen2")

 or 

MCFG_VIDEO_SET_SCREEN("screen2")

I'd also like to have a callback to set and clear the video interrupt on VSYNCs, similar to the VT100 (text only) video driver. For the vt100 video driver, it used to be something like

Code:
MCFG_CPU_VBLANK_INT_DRIVER("screen", rainbow_state, vblank_irq)
 MCFG_VT_VIDEO_CLEAR_VIDEO_INTERRUPT_CALLBACK(WRITELINE(rainbow_state, clear_video_interrupt))

Can you help me? Is there something obvious i overlooked?

Thank you very much,
Karl.

Errors i copied over from previous attempts:

Code:
Driver rainbow (file rainbow.cpp): 1 errors, 0 warnings
Errors:
   uPD7220 device 'upd7220': No screen specified for device ':upd7220', but multiple screens found

------------
On another occasion (different macro config):

MCFG_VIDEO_SET_SCREEN called on device ':screen2' with no video interface


Macro code for screen 1 and screen 2 (= preliminary):
Code:
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
MCFG_SCREEN_SIZE(132 * 10, 49 * 10)
MCFG_SCREEN_VISIBLE_AREA(0, 80 * 10 - 1, 0, 48 * 10 - 1)

MCFG_SCREEN_UPDATE_DRIVER(rainbow_state, screen_update_rainbow)
MCFG_SCREEN_PALETTE("vt100_video:palette")
MCFG_GFXDECODE_ADD("gfxdecode", "vt100_video:palette", rainbow)

MCFG_DEVICE_ADD("vt100_video", RAINBOW_VIDEO, 0)
MCFG_VT_SET_SCREEN("screen")
MCFG_VT_CHARGEN("chargen")
MCFG_VT_VIDEO_RAM_CALLBACK(READ8(rainbow_state, read_video_ram_r))
MCFG_VT_VIDEO_CLEAR_VIDEO_INTERRUPT_CALLBACK(WRITELINE(rainbow_state, clear_video_interrupt))

// ************************************************ SECOND video hardware (GDC-NEW) 

/* Devices  (GDC-NEW) */
	MCFG_DEVICE_ADD("upd7220", UPD7220, 8000000/6) // unk clock
//	MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
	MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(rainbow_state, hgdc_display_pixels)

MCFG_SCREEN_ADD("screen2", RASTER)
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate 
MCFG_SCREEN_SIZE(800, 240)
MCFG_SCREEN_VISIBLE_AREA(0, 800-1, 0, 240-1)

MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)

Last edited by Bavarese; 08/15/16 10:01 AM.