Skip to content

Commit

Permalink
PC-98: Implement port 9A0h readback used to determine if the GDC is r…
Browse files Browse the repository at this point in the history
…unning at 5MHz or not so that PC-9821 CD-ROM games can then program the correct GDC PITCH value for proper 256-color mode display
  • Loading branch information
joncampbell123 committed Feb 14, 2024
1 parent d53a42c commit b9da9a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Next:
- The reason some PC-9821 games have been giving bad PITCH values (double the
correct value) to the GDC in 256-color mode has been determined. They read
port 9A0h to determine if the GDC is running at 5MHz or not. That port 9A0h
index was not implemented and therefore gave the game the impression it was
running at 5MHz when it was not, therefore the doubled PITCH value. This fix
corrects the squeezed 256-color mode and allows it to appear properly.
(joncampbell123).
- IMGMOUNT: If the file extension is HDI, assume a hard disk image even if the
image file is small enough to qualify as a floppy disk image. There is an
HDI image of PC-98 game "D.O. Doki Doki Disk 8" that is 2.2MB, small enough
Expand Down
3 changes: 3 additions & 0 deletions src/hardware/vga_pc98_crtc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ Bitu pc98_read_9a0(Bitu /*port*/,Bitu /*iolen*/) {
case 0x07: // EGC mode
if (pc98_gdc_vramop & (1 << VOPBIT_EGC)) retval |= 1u;
break;
case 0x09: // GDC clock #0
if (gdc_5mhz_mode) retval |= 1u;
break;
case 0x0A: // Graphics mode + 256-color
if (pc98_gdc_vramop & (1 << VOPBIT_VGA)) retval |= 1u;
break;
Expand Down

0 comments on commit b9da9a5

Please sign in to comment.