Пример #1
0
void set_vh_global_attribute( data_t *addr, data_t data )
{
	if (*addr != data)
	{
		schedule_full_refresh();
		*addr = data;
	}
}
Пример #2
0
int crtc6845_port_w(struct crtc6845 *crtc, int offset, UINT8 data)
{
	struct crtc6845_cursor cursor;
	int idx;
	UINT8 mask;

	if (offset & 1)
	{
		/* write to a 6845 register, if supported */
		idx = crtc->idx & 0x1f;
		if (idx < (sizeof(crtc->reg) / sizeof(crtc->reg[0])))
		{
			mask = crtc6845_reg_mask[crtc->config.personality][idx].store_mask;
			/* Don't zero out bits not covered by the mask. */
			crtc->reg[crtc->idx] &= ~mask;
			crtc->reg[crtc->idx] |= (data & mask);

			/* are there special consequences to writing to this register? */
			switch (idx) {
			case 0xa:
			case 0xb:
			case 0xe:
			case 0xf:
				crtc6845_get_cursor(crtc, &cursor);
				if (crtc->config.cursor_changed)
					crtc->config.cursor_changed(&cursor);
				break;

			default:
				schedule_full_refresh();
				break;
			}

			/* since the PC1512 does not support the number of lines register directly, 
			 * this value is keyed off of register 9
			 */
			if ((crtc->config.personality == M6845_PERSONALITY_PC1512) && (idx == 9))
			{
				UINT8 char_height;
				char_height = crtc6845_get_char_height(crtc);
				crtc6845_set_char_lines(crtc, 200 ); // / char_height);
			}
			return TRUE;
		}
	}
	else
	{
		/* change the idx register */
		crtc->idx = data;
	}
	return FALSE;
}
Пример #3
0
/***************************************************************************

  Calculate the horizontal and vertical offset for the
  current register settings of the 6845 CRTC

***************************************************************************/
static void cgenie_offset_xy(void)
{
	if( crt.horizontal_sync_pos )
		off_x = crt.horizontal_total - crt.horizontal_sync_pos - 14;
	else
		off_x = -15;

	off_y = (crt.vertical_total - crt.vertical_sync_pos) *
		(crt.scan_lines + 1) + crt.vertical_adjust
		- 32;

	if( off_y < 0 )
		off_y = 0;

	if( off_y > 128 )
		off_y = 128;

	schedule_full_refresh();

// logerror("cgenie offset x:%d  y:%d\n", off_x, off_y);
}
Пример #4
0
static void video_pause(int pause)
{
	palette_set_global_brightness_adjust(pause ? options.pause_bright : 1.00);
	schedule_full_refresh();
}
Пример #5
0
void mess_ui_update(void)
{
    static int ui_toggle_key = 0;
    static int ui_display_count = 30;

    char buf[2048];
    int id;
    const struct IODevice *dev;

    /* traditional MESS interface */
    if (Machine->gamedrv->flags & GAME_COMPUTER)
    {
        if( input_ui_pressed(IPT_UI_TOGGLE_UI) )
        {
            if( !ui_toggle_key )
            {
                ui_toggle_key = 1;
                ui_active = !ui_active;
                ui_display_count = 30;
                schedule_full_refresh();
            }
        }
        else
        {
            ui_toggle_key = 0;
        }

        if (ui_active)
        {
            if( ui_display_count > 0 )
            {
                buf[0] = 0;
                strcpy(buf,ui_getstring (UI_keyb1));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb2));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb3));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb5));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb2));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb7));
                strcat(buf,"\n");
                ui_draw_message_window(buf);

                if( --ui_display_count == 0 )
                    schedule_full_refresh();
            }
        }
        else
        {
            if( ui_display_count > 0 )
            {
                buf[0] = 0;
                strcpy(buf,ui_getstring (UI_keyb1));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb2));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb4));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb6));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb2));
                strcat(buf,"\n");
                strcat(buf,ui_getstring (UI_keyb7));
                strcat(buf,"\n");
                ui_draw_message_window(buf);

                if( --ui_display_count == 0 )
                    schedule_full_refresh();
            }
        }
    }

    /* run display routine for device */
    if (devices_inited)
    {
        for (dev = Machine->devices; dev->type < IO_COUNT; dev++)
        {
            if (dev->display)
            {
                for (id = 0; id < device_count(dev->type); id++)
                {
                    mess_image *img = image_from_devtype_and_index(dev->type, id);
                    dev->display(img, NULL);
                }
            }
        }
    }
}
Пример #6
0
void crtc6845_set_clock(struct crtc6845 *crtc, int freq)
{
	assert(crtc);
	crtc->config.freq = freq;
	schedule_full_refresh();
}
Пример #7
0
static void crtc6845_state_postload(void)
{
	schedule_full_refresh();
	if (dirtybuffer && videoram_size)
		memset(dirtybuffer, 1, videoram_size);
}