Skip to content

Commit

Permalink
Working on High-Res mode
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainYS authored and CaptainYS committed Oct 21, 2020
1 parent 9c390bf commit fe427da
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/towns/crtc/crtc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ unsigned int TownsCRTC::GetPageBitsPerPixel(unsigned char page) const
return 4;
}
}
std::cout << __FUNCTION__ << std::endl;
std::cout << "Unknown color setting." << std::endl;
// std::cout << __FUNCTION__ << std::endl;
// std::cout << "Unknown color setting." << std::endl;
return 4; // What else can I do?
}
unsigned int TownsCRTC::GetPageVRAMAddressOffset(unsigned char page) const
Expand Down Expand Up @@ -1105,6 +1105,17 @@ void TownsCRTC::MEMIOWriteFMRVRAMDisplayMode(unsigned char data)
data|=1;
}
break;
case HIGHRES_REG_VSYNC1:
// Based on TBIOS disassembly.
if(true==InVSYNC(townsPtr->state.townsTime))
{
data=2;
}
else
{
data=0;
}
break;
default:
data=state.highResCrtcReg[state.highResCrtcRegAddrLatch];
break;
Expand All @@ -1122,8 +1133,10 @@ void TownsCRTC::MEMIOWriteFMRVRAMDisplayMode(unsigned char data)
}
break;
case TOWNSIO_MX_IMGOUT_D2:// 0x476,
data=((state.highResCrtcReg[state.highResCrtcRegAddrLatch]>>16)&0xFF);
break;
case TOWNSIO_MX_IMGOUT_D3:// 0x477,
data=((state.highResCrtcReg[state.highResCrtcRegAddrLatch]>>24)&0xFF);
break;

case TOWNSIO_HSYNC_VSYNC:
Expand Down
1 change: 1 addition & 0 deletions src/towns/crtc/crtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class TownsCRTC : public Device
HIGHRES_REG_CTRL1 =0x004, // Read bit0=HighResEnabled bit1=(Initial=1, WriteToBit1->0, HighResoDisabled->1) Write bit1=1->bit0=0

HIGHRES_REG_DISPPAGE=0x005, // Prob
HIGHRES_REG_VSYNC1 =0x006, // Prob
HIGHRES_REG_HSYNC2 =0x100,
HIGHRES_REG_HSYNC3 =0x101,
HIGHRES_REG_VSYNC2 =0x102,
Expand Down
40 changes: 40 additions & 0 deletions symtables/RUNMX.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,46 @@ P
M 0
/end
/begin0
T 1
* 00000110:00001847
#
R
L (Prob)Set High-Res Mode on Initial TMENU Start
P
% 0
M 0
/end
/begin0
T 1
* 00000110:00001874
#
R
L (Prob)Set Normal Resolution Mode
P
% 0
M 0
/end
/begin0
T 1
* 00000110:00001899
#
R
L (Prob)Set High-Res Mode
P
% 0
M 0
/end
/begin0
T 1
* 00000110:000026B0
#
R
L (Prob)High-Res CRTC Wait VSYNC flip
P
% 0
M 0
/end
/begin0
T 0
* 00000F45:0000005A
# IO.SYS:Initialize Real-Mode INT Vector
Expand Down
Binary file modified testdata/CMOS.BIN
Binary file not shown.

0 comments on commit fe427da

Please sign in to comment.