joncampbell123 / dosbox-x

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

[PC-9821] EGC raster operator 0xbe is not implemented #3035

Open ykmv opened 3 years ago

ykmv commented 3 years ago

Code of Conduct & Contributing Guidelines

Have you checked that no other similar bug report(s) already exists?

What operating system(s) this bug have occurred on?

Arch Linux

What version(s) of DOSBox-X have this bug?

0.83.18 SDL1

Describe the bug

I wanted to play game called Atomic Punker but it didn't work well. It appears there's an opcode that needs to be implemented. Video showcasing wrong emulation of Atomic Punker

Expected behavior

Video showcasing proper emulation of Atomic Punker

Steps to reproduce the behaviour

  1. Launch Atomic Punker (download link)
  2. See the error

Used configuration

machine pc9821

Emulator log

LOG: EGC ROP 0xbe not impl
LOG: EGC ROP 0xbe not impl
LOG: EGC ROP 0xbe not impl
LOG: EGC ROP 0xbe not impl
...
LOG: EGC ROP 0xbe not impl
LOG: 8251 warning: RX overrun
LOG: 8251 warning: RX overrun
LOG: 8251 warning: RX overrun
LOG: PC-98 INT 18h unknown call AX=1001 BX=97C8 CX=0000 DX=97C8 SI=8866 DI=0FA0 DS=0149 ES=1248

Additional context

No response

joncampbell123 commented 3 years ago

In addition to wrong ROP behavior, I'm noticing that the game is not horizontally scrolling sprites either. Horizontal motion is choppy (as if constrained to a 16x1 grid). I'm aware EGC hardware supports a sort of hardware planar bit delay for scrolling. It's not often used but I've seen it used by at least Touhou Project 3 for the title screen and sprite rendering in-game. Perhaps the game is doing a check to determine if that is supported, that DOSBox-X is failing to fullfill?

ykmv commented 3 years ago

I have compiled dosbox-x from the master branch(latest commit at the moment of compilation c8c61f0) and now Atomic Punker works fine, except sometimes the game freezes(video with freeze,second video with freeze). When the game freezes emulator outputs this in the log:

LOG: 2644251197 ERROR CPU:Illegal Unhandled Interrupt Called 5
LOG: 2644251200 ERROR CPU:Illegal Unhandled Interrupt Called 5
LOG: 2644251218 ERROR CPU:Illegal Unhandled Interrupt Called 5
LOG: 2644251221 ERROR CPU:Illegal Unhandled Interrupt Called 5
LOG: 2644251224 ERROR CPU:Illegal Unhandled Interrupt Called 5
LOG: 2644251227 ERROR CPU:Illegal Unhandled Interrupt Called 5
joncampbell123 commented 3 years ago

Is the game using the BOUND instruction?

I saw it too if I shot and destroyed a particular ship shooting only at the right side of it.

https://www.felixcloutier.com/x86/bound

https://web.archive.org/web/20211101191333/https://wiki.osdev.org/Exceptions