1
0
Fork 0

use different scanline length detection for cga4 putpixel;

fix doublewidth for tandy2 modes


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2413
This commit is contained in:
Sebastian Strohhäcker 2005-12-15 20:53:05 +00:00
parent a93c252133
commit d817b8df8c
2 changed files with 3 additions and 4 deletions

View file

@ -524,8 +524,8 @@ void VGA_SetupDrawing(Bitu val) {
case M_TANDY2:
aspect_ratio=1.2;
doubleheight=true;
if (machine==MCH_TANDY) doublewidth=(vga.tandy.mode_control & 0x10)==0;
else doublewidth=(vga.tandy.gfx_control & 0x8)==0x00;
if (machine==MCH_PCJR) doublewidth=(vga.tandy.gfx_control & 0x8)==0x00;
else doublewidth=(vga.tandy.mode_control & 0x10)==0;
vga.draw.blocks=width * (doublewidth ? 4:8);
width=vga.draw.blocks*2;
VGA_DrawLine=VGA_Draw_1BPP_Line;

View file

@ -28,8 +28,7 @@ void INT10_PutPixel(Bit16u x,Bit16u y,Bit8u page,Bit8u color) {
switch (CurMode->type) {
case M_CGA4:
{
IO_Write(0x3d4,0x09);
if (IO_Read(0x3d5)==1) {
if (real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE)<=5) {
Bit16u off=(y>>1)*80+(x>>2);
if (y&1) off+=8*1024;