The Pravetz keyboard and video are now properly implemented.
This commit is contained in:
@@ -117,6 +117,22 @@ cga_in(uint16_t addr, void *p)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
cga_pravetz_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
cga_t *cga = (cga_t *) p;
|
||||
|
||||
cga->fontbase = (((unsigned int) val) << 8);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
cga_pravetz_in(uint16_t addr, void *p)
|
||||
{
|
||||
cga_t *cga = (cga_t *) p;
|
||||
|
||||
return (cga->fontbase >> 8);
|
||||
}
|
||||
|
||||
void
|
||||
cga_waitstates(void *p)
|
||||
{
|
||||
@@ -524,6 +540,21 @@ cga_standalone_init(const device_t *info)
|
||||
return cga;
|
||||
}
|
||||
|
||||
void *
|
||||
cga_pravetz_init(const device_t *info)
|
||||
{
|
||||
cga_t *cga = cga_standalone_init(info);
|
||||
|
||||
loadfont("roms/video/cga/CGA - PRAVETZ.BIN", 10);
|
||||
|
||||
io_removehandler(0x03dd, 0x0001, cga_in, NULL, NULL, cga_out, NULL, NULL, cga);
|
||||
io_sethandler(0x03dd, 0x0001, cga_pravetz_in, NULL, NULL, cga_pravetz_out, NULL, NULL, cga);
|
||||
|
||||
cga->fontbase = 0x0300;
|
||||
|
||||
return cga;
|
||||
}
|
||||
|
||||
void
|
||||
cga_close(void *p)
|
||||
{
|
||||
@@ -637,3 +668,17 @@ const device_t cga_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = cga_config
|
||||
};
|
||||
|
||||
const device_t cga_pravetz_device = {
|
||||
.name = "Pravetz VDC-2",
|
||||
.internal_name = "cga_pravetz",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = 0,
|
||||
.init = cga_pravetz_init,
|
||||
.close = cga_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = cga_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = cga_config
|
||||
};
|
||||
|
||||
@@ -127,6 +127,7 @@ video_cards[] = {
|
||||
{ ¶dise_wd90c30_device },
|
||||
{ &colorplus_device },
|
||||
{ &pgc_device },
|
||||
{ &cga_pravetz_device },
|
||||
{ &radius_svga_multiview_isa_device },
|
||||
{ &realtek_rtg3106_device },
|
||||
{ &s3_diamond_stealth_vram_isa_device },
|
||||
|
||||
@@ -1083,6 +1083,13 @@ loadfont_common(FILE *f, int format)
|
||||
for (c = 0; c < 256; c++)
|
||||
(void) !fread(&fontdat12x18[c][0], 1, 36, f);
|
||||
break;
|
||||
|
||||
case 10: /* Pravetz */
|
||||
for (c = 0; c < 1024; c++) /* Allow up to 1024 chars */
|
||||
for (d = 0; d < 8; d++)
|
||||
fontdat[c][d] = fgetc(f) & 0xff;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
(void) fclose(f);
|
||||
|
||||
Reference in New Issue
Block a user