Closed joncampbell123 closed 5 years ago
This issue is also noted on the DOSLIB project as a possible reason I was unable to get the "REMSRV" program to respond over RS-232C on one particular PC-9821 laptop.
A game using the RS-232C clock for delay loops is frankly no weirder than some old IBM PC demoscene stuff I found that uses the PC speaker (muted of course) for the same purpose.
EDIT: It looks PIT 2 does not cycle on the PC-9821Lt2 laptop because the BIOS programs it through 77h and then never writes to 75h, which causes the timer not to cycle (giving me the false impression). Writing anything to 75h allows it to cycle.
According to http://hackipedia.org/browse.cgi/Computer/Platform/PC%2c%20NEC%20PC%2d98/Collections/Undocumented%209801%2c%209821%20Volume%202%20%28webtech.co.jp%29/io%5frs%2etxt
I observed that by default PIT Timer 2 does not cycle on real hardware (one particular PC-9821 laptop).
However @yksoft1 found a PC-98 game "Photo Genic" that upon debugging, uses delay loops that assume PIT Timer 2 is cycling.
Just as DOSBox-X emulates the PC speaker clock gate enable (well, "inhibit bit" on PC-98) port 434h needs to be implemented as the RS-232C clock gate enable.
Until this is done, DOSBox-X will act as if PIT Timer 2 clock is enabled to get the game working.