Merge pull request #3050 from Allofich/cga

Fix CGA to always use 8-pixel-height characters
This commit is contained in:
Jonathan Campbell
2021-11-08 23:24:54 +00:00
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -38,6 +38,10 @@
apply when REP or REPZ is used. (Allofich)
- Fixed 0x0F opcode being valid on 80186 core when
it should be invalid. (Allofich)
- Fixed CGA modes to always use a character height
of 8, rather than reading it from address 485h.
Fixes corrupt graphics in the PC Booter version
of Apple Panic. (Allofich)
- Fixed possible crash with printing. (jamesbond3142)
- Video emulation for PC-98 mode (for 400-line modes)
is now 16:10 instead of 4:3. 480-line PC-98 modes

View File

@@ -1140,7 +1140,7 @@ static void INT10_Seg40Init(void) {
}
else {
real_writeb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL,0x00);
if (machine == MCH_TANDY || machine == MCH_CGA || machine == MCH_PCJR)
if (machine == MCH_TANDY || machine == MCH_PCJR)
real_writeb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT,8); /* FIXME: INT 10h teletext routines depend on this */
else
real_writeb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT,0);

View File

@@ -1529,7 +1529,7 @@ void WriteChar(uint16_t col,uint16_t row,uint8_t page,uint16_t chr,uint8_t attr,
/* Externally used by the mouse routine */
PhysPt fontdata;
uint16_t cols = real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS);
uint8_t back, cheight = IS_PC98_ARCH ? 16 : real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
uint8_t back, cheight = IS_PC98_ARCH ? 16 : machine == MCH_CGA ? 8 : real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
if (CurMode->type != M_PC98)
chr &= 0xFF;