Closed hdk1983 closed 6 years ago
I see why I missed it... the Undocumented PC-98 reference lists it under "PRN" (printer).
(the link to Hackipedia is to the Wayback machine because GoDaddy's CGI script handling seems to have broken)
It seems to be common in PC-98 architecture to put a 8255 somewhere for a primary purpose, then use the unused ports for unrelated status and control.
Port B for the 8255 used for the printer in this case for example.
Or the unused 8255 port on the mouse interface.
Hold on, the list refers to 40h-46h even twice.
Either 42h in is the printer status, or 42h in is unrelated system status. It can't be both.
The second part of the undocumented_mem/io_prn.txt is for ハイレゾ (hairezo, high-resolution) mode. The games that read the port for detecting system clock are for normal mode.
@hdk1983 Following up with our prior discussion of "high resolution" vs "super high resolution", does port 42h follow the PRN status definition in "super high resolution" or just "high resolution".
This is following the definitions where:
normal mode = 15khz 200-line mode high resolution = 24/31khz 400/480-line mode super high resolution = ?khz 1120x750 mode
If port 42h is normal PRN status in "high resolution" mode, then the same games will fail on normal PC-9801/9821 hardware because they will misread printer port status lines as bits that indicate system configuration.
Unless, there is some other bit elsewhere to select between both meanings of port 42h.
According to the documentation here:
PC-98 "high resolution" (not super high resolution, right?) makes port 42h normal PRN status.
I may have to make port 42h selectable as a dosbox.conf option, between PRN status and system config, to accomodate those games.
PC-98 "high resolution" (not super high resolution, right?) makes port 42h normal PRN status.
It's "ハイレゾ", its resolution is super high resolution...
normal mode = 15khz 200-line mode high resolution = 24/31khz 400/480-line mode super high resolution = ?khz 1120x750 mode
Modes are named as:
However resolution of the high resolution mode is super high resolution, that term is normally not used, but only used in Wikipedia for describing it is different from the 高解像度, high resolution, of the normal mode. When ハイレゾモード was released, ハイレゾ term might be used only for PC-98 series in Japan, so many Japanese speakers using the ハイレゾ term might not think about that ハイレゾ was a abbreviation for high resolution and the same meaning as 高解像度. So if you find ハイレゾ in documentation, normally it means the 750 lines mode. If you use a translator, maybe you need to look at the original sentense of "high resolution".
A display for 15kHz is called as 標準ディスプレイ、a standard display. The 15kHz mode was normally not used. That might be used in early 1980s, because its display might compatible with other PCs like Sharp X1 and Fujitsu FM-7, but I've never seen PC-98 systems that are connected with such displays in 1990s.
Printer 8255 interface added to ports 40h-46h even, including port 42h with system configuration.
The printer part is not yet functional, but port 42h is there for any game that reads it.
Can you pull the latest commit and compile from source to verify this?
Yes. It looks working properly. Tested on commit 2da77892c5f36486ab078adc97d1e10527e378e7.
I/O port 0x42 is not implemented. The port is currently always read as 0xff but it should be status including system type and system clock. Because of this bug, BGM speed and tone in the following freeware games are incorrect if 5MHz of PIT master clock is selected: