Added Screen Raw Params hook-up to the ST-V driver, fixes some of the current issues [Angelo Salese]

This commit is contained in:
Angelo Salese 2009-07-23 23:36:44 +00:00
parent d66257f047
commit 6539174c6d
2 changed files with 8 additions and 15 deletions

View File

@ -180,6 +180,7 @@ ToDo / Notes:
#define MASTER_CLOCK_352 57272800
#define MASTER_CLOCK_320 53748200
#define PIXEL_CLOCK MASTER_CLOCK_352/4
/**************************************************************************************/
/*to be added into a stv Header file,remember to remove all the static...*/
@ -2752,11 +2753,8 @@ static MACHINE_DRIVER_START( stv )
MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(192)) // guess, needed to force video update after V-Blank OUT interrupt
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
MDRV_SCREEN_SIZE(704*2, 512*2)
MDRV_SCREEN_VISIBLE_AREA(0*8, 703, 0*8, 511) // we need to use a resolution as high as the max size it can change to
MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 704, 0, 703, 512, 0, 511) // we need to use a resolution as high as the max size it can change to
MDRV_PALETTE_LENGTH(2048+(2048*2))//standard palette + extra memory for rgb brightness.
MDRV_GFXDECODE(stv)

View File

@ -5295,26 +5295,21 @@ UINT8 stv_get_vblank(running_machine *machine)
/*some vblank lines measurements (according to Charles MacDonald)*/
static int get_vblank_duration(running_machine *machine)
{
/* TODO: +64 is probably due of missing pixel clock/screen raw params hook-up.
Problem is, I don't know if it's possible to handle that in MAME with
all this dynamic resolution babblecrap...
*/
if(STV_VDP2_HRES & 4)
{
switch(STV_VDP2_HRES & 1)
{
case 0: return 45+64; //31kHz Monitor
case 1: return 82+64; //Hi-Vision Monitor
case 0: return 45; //31kHz Monitor
case 1: return 82; //Hi-Vision Monitor
}
}
switch(STV_VDP2_VRES & 3)
{
case 0: return 39+64; //263-224
case 1: return 23+64; //263-240
case 2: return 7+64; //263-256
case 3: return 7+64; //263-256
case 0: return 39; //263-224
case 1: return 23; //263-240
case 2: return 7; //263-256
case 3: return 7; //263-256
}
return 0;