Exemplo n.º 1
0
void DISPLAY::initialize()
{
	scanline = config.scan_line;
	
	// load rom image
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(emu->bios_path(_T("FONT.ROM")), FILEIO_READ_BINARY)) {
		fio->Fread(font, sizeof(font), 1);
		fio->Fclose();
	}
	delete fio;
	
	// create pc palette
#ifdef _LCD
	for(int i = 1; i < 8; i++) {
		palette_pc[i] = RGB_COLOR(48, 56, 16);
	}
	palette_pc[0] = RGB_COLOR(160, 168, 160);
#else
	for(int i = 0; i < 8; i++) {
		palette_pc[i] = RGB_COLOR((i & 2) ? 255 : 0, (i & 4) ? 255 : 0, (i & 1) ? 255 : 0);
	}
#endif
	
	// initialize
	for(int i = 0; i < 16; i++) {
		pal[i] = i & 7;
	}
	mode = text_page = 0;
	cblink = flash_cnt = 0;
	blink = pal_dis = false;
	
	// register event
	register_frame_event(this);
}
Exemplo n.º 2
0
void DISPLAY::initialize()
{
	// load rom image
	FILEIO* fio = new FILEIO();
	if(fio->Fopen(emu->bios_path(_T("FONT.ROM")), FILEIO_READ_BINARY)) {
		fio->Fread(font, sizeof(font), 1);
		fio->Fclose();
	}
	delete fio;
	
	// create pc palette
	palette_pc[0] = RGB_COLOR(0, 0, 0);
#ifdef _MZ1200
	palette_pc[1] = RGB_COLOR(0, 255, 0);
#else
	palette_pc[1] = RGB_COLOR(255, 255, 255);
#endif
	
	// register event
	register_vline_event(this);
}
Exemplo n.º 3
0
void SUB::draw_screen()
{
	// 640x200, msb->lsb
	scrntype_t cd = RGB_COLOR(48, 56, 16);
	scrntype_t cb = RGB_COLOR(160, 168, 160);
	
	for(int y = 0, ptr = 0; y < 200; y++) {
		scrntype_t *dest = emu->get_screen_buffer(y);
		for(int x = 0; x < 640; x += 8) {
			uint8_t pat = vram[ptr++];
			dest[0] = (pat & 0x80) ? cd : cb;
			dest[1] = (pat & 0x40) ? cd : cb;
			dest[2] = (pat & 0x20) ? cd : cb;
			dest[3] = (pat & 0x10) ? cd : cb;
			dest[4] = (pat & 0x08) ? cd : cb;
			dest[5] = (pat & 0x04) ? cd : cb;
			dest[6] = (pat & 0x02) ? cd : cb;
			dest[7] = (pat & 0x01) ? cd : cb;
			dest += 8;
		}
	}
}
Exemplo n.º 4
0
#define RGB_COLOR(red, green, blue)		\
	{.r = red, .g = green, .b = blue, .a = 255}

struct named_color
{
	const char * name;
	struct color_t color;
};

/*
 * named color list generated from the list of svg color keywords from
 * http://www.w3.org/TR/css3-color/#svg-color
 */
const static struct named_color named_colors[] =
{
	{ "aliceblue", 				RGB_COLOR(240,248,255) },
	{ "antiquewhite", 			RGB_COLOR(250,235,215) },
	{ "aqua", 					RGB_COLOR(0,255,255) },
	{ "aquamarine", 			RGB_COLOR(127,255,212) },
	{ "azure", 					RGB_COLOR(240,255,255) },
	{ "beige", 					RGB_COLOR(245,245,220) },
	{ "bisque", 				RGB_COLOR(255,228,196) },
	{ "black", 					RGB_COLOR(0,0,0) },
	{ "blanchedalmond",			RGB_COLOR(255,235,205) },
	{ "blue", 					RGB_COLOR(0,0,255) },
	{ "blueviolet", 			RGB_COLOR(138,43,226) },
	{ "brown", 					RGB_COLOR(165,42,42) },
	{ "burlywood", 				RGB_COLOR(222,184,135) },
	{ "cadetblue", 				RGB_COLOR(95,158,160) },
	{ "chartreuse", 			RGB_COLOR(127,255,0) },
	{ "chocolate", 				RGB_COLOR(210,105,30) },
Exemplo n.º 5
0
/*
	CASIO PV-1000 Emulator 'ePV-1000'
	Skelton for retropc emulator

	Author : Takeda.Toshiya
	Date   : 2006.11.16 -

	[ video processor ]
*/

#include "vdp.h"

static const scrntype palette_pc[8] = {
	RGB_COLOR(  0,  0,  0), RGB_COLOR(255,  0,  0), RGB_COLOR(  0,255,  0), RGB_COLOR(255,255,  0),
	RGB_COLOR(  0,  0,255), RGB_COLOR(255,  0,255), RGB_COLOR(  0,255,255), RGB_COLOR(255,255,255)
};
static const uint8 plane[4] = {0, 1, 2, 4};

void VDP::initialize()
{
	// register event to interrupt
	register_vline_event(this);
}

void VDP::reset()
{
	force_pattern = false;
}

void VDP::write_io8(uint32 addr, uint32 data)
{