joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.76k stars 381 forks source link

PC-98: Text layer anomalies in Dragon Slayer: Legend of Heroes II #683

Closed yksoft1 closed 6 years ago

yksoft1 commented 6 years ago

Dragon Slayer: Legend of Heroes II is Falcom's RPG released in 1992. It won't start in Dosbox-X's DOS, and if you boot it from HDI, you would see some wrong graphics in text layer. Vertical lines in overall graphics. guest os_000 guest os_001 guest os_003

Masks drawn in text layer displays incorrectly. guest os_002 guest os_005

The anomalies look very similar to Carat's bug (#345) recently fixed. A fact is that if you first start and exit Carat in Dosbox-X's DOS and imgmount/boot Legend of Heroes II, everything looks correct.

joncampbell123 commented 6 years ago

The game is probably using bit 4 to signal "Simple Graphics", but unlike Carat, may be using a BIOS call to do it (where Carat just writes to the I/O port directly to trigger it).

yksoft1 commented 6 years ago

Uploaded the HDI. (link removed)

BTW Could you also inspect why this game won't start in Dosbox-X DOS? This game requires DOS 3.3 but will not start (hangs with a black screen) even if you run VER SET 3 30.

joncampbell123 commented 6 years ago

It's calling INT 18h AH=0A to set text layer parameters, which is not yet implemented in DOSBox-X.

Right away in the log, it's calling INT 18h AX=0A00 to set up a normal text mode, then AX=0A04 to switch on the "simple graphics" interpretation of attribute bit 4.

Carat doesn't use the BIOS, it just writes 0x01 to port 68h to accomplish the same effect.

"Angelus" has the same problem with vertical lines, it seems.

EDIT: Yes, Angelus is also calling INT 18h AX=0A04 to switch on Simple Graphics interpretation of attribute bit 4.

yksoft1 commented 6 years ago

Resolved this myself in pull request #684.

yksoft1 commented 6 years ago

I think this issue could be closed at least for now.

joncampbell123 commented 6 years ago

Looks good, thanks!