Added IBM Display Adapter II for PS/55 emulation
This commit is contained in:
@@ -27,7 +27,7 @@ add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c
|
||||
vid_tkd8001_ramdac.c vid_att20c49x_ramdac.c vid_s3.c vid_s3_virge.c
|
||||
vid_ibm_rgb528_ramdac.c vid_sdac_ramdac.c vid_ogc.c vid_mga.c vid_nga.c
|
||||
vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c vid_xga.c
|
||||
vid_bochs_vbe.c)
|
||||
vid_bochs_vbe.c vid_ps55da2.c )
|
||||
|
||||
if(G100)
|
||||
target_compile_definitions(vid PRIVATE USE_G100)
|
||||
|
||||
3153
src/video/vid_ps55da2.c
Normal file
3153
src/video/vid_ps55da2.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -431,10 +431,24 @@ svga_in(uint16_t addr, void *priv)
|
||||
ret = svga->attrregs[svga->attraddr];
|
||||
break;
|
||||
case 0x3c2:
|
||||
if ((svga->vgapal[0].r + svga->vgapal[0].g + svga->vgapal[0].b) >= 0x4e)
|
||||
ret = 0;
|
||||
if (svga->cable_connected)
|
||||
{
|
||||
if ((svga->vgapal[0].r + svga->vgapal[0].g + svga->vgapal[0].b) >= 0x4e)
|
||||
ret = 0;
|
||||
else
|
||||
ret = 0x10;
|
||||
}
|
||||
else
|
||||
ret = 0x10;
|
||||
{
|
||||
// The Display Adapter has own Monitor Type Detection bit in the different I/O port (I/O 3E0h, 3E1h).
|
||||
// When the monitor cable is connected to the Display Adapter, this port returns the value as no cable connection.
|
||||
// The Power-on Self Test of PS/55 tries detecting the monitor on the planar VGA.
|
||||
// If it fails, then the POST reads the NVRAM set by the reference diskette, and sets the BIOS Data Area (Mem 487h, 489h).
|
||||
if (svga->vgapal[0].r >= 10 || svga->vgapal[0].g >= 10 || svga->vgapal[0].b >= 10)
|
||||
ret = 0;
|
||||
else
|
||||
ret = 0x10;
|
||||
}
|
||||
break;
|
||||
case 0x3c3:
|
||||
ret = vga_on;
|
||||
@@ -1359,6 +1373,8 @@ svga_init(const device_t *info, svga_t *svga, void *priv, int memsize,
|
||||
svga->dac_hwcursor.cur_xsize = svga->dac_hwcursor.cur_ysize = 32;
|
||||
|
||||
svga->translate_address = NULL;
|
||||
|
||||
svga->cable_connected = 1;
|
||||
svga->ksc5601_english_font_type = 0;
|
||||
|
||||
vga_on = 1;
|
||||
|
||||
@@ -367,6 +367,8 @@ video_post_reset(void)
|
||||
if (xga_standalone_enabled)
|
||||
xga_device_add();
|
||||
|
||||
if (da2_standalone_enabled)
|
||||
da2_device_add();
|
||||
/* Reset the graphics card (or do nothing if it was already done
|
||||
by the machine's init function). */
|
||||
video_reset(gfxcard[0]);
|
||||
|
||||
@@ -103,6 +103,39 @@ vga_in(uint16_t addr, void *priv)
|
||||
return temp;
|
||||
}
|
||||
|
||||
void vga_disable(void* p)
|
||||
{
|
||||
vga_t* vga = (vga_t*)p;
|
||||
svga_t* svga = &vga->svga;
|
||||
|
||||
pclog("vga_disable %04X:%04X\n", cs >> 4, cpu_state.pc);
|
||||
io_removehandler(0x03a0, 0x0040, vga_in, NULL, NULL, vga_out, NULL, NULL, vga);
|
||||
mem_mapping_disable(&svga->mapping);
|
||||
svga->vga_enabled = 0;
|
||||
}
|
||||
|
||||
void vga_enable(void* p)
|
||||
{
|
||||
vga_t* vga = (vga_t*)p;
|
||||
svga_t* svga = &vga->svga;
|
||||
|
||||
pclog("vga_enable %04X:%04X\n", cs >> 4, cpu_state.pc);
|
||||
io_sethandler(0x03c0, 0x0020, vga_in, NULL, NULL, vga_out, NULL, NULL, vga);
|
||||
if (!(svga->miscout & 1))
|
||||
io_sethandler(0x03a0, 0x0020, vga_in, NULL, NULL, vga_out, NULL, NULL, vga);
|
||||
|
||||
mem_mapping_enable(&svga->mapping);
|
||||
svga->vga_enabled = 1;
|
||||
}
|
||||
|
||||
int vga_isenabled(void* p)
|
||||
{
|
||||
vga_t* vga = (vga_t*)p;
|
||||
svga_t* svga = &vga->svga;
|
||||
|
||||
return svga->vga_enabled;
|
||||
}
|
||||
|
||||
static void *
|
||||
vga_init(const device_t *info)
|
||||
{
|
||||
@@ -149,6 +182,7 @@ ps1vga_init(const device_t *info)
|
||||
|
||||
vga->svga.bpp = 8;
|
||||
vga->svga.miscout = 1;
|
||||
vga->svga.vga_enabled = 1;
|
||||
|
||||
return vga;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user