PSG register 7 and Joystick in OpenMSX

By santiontanon

Paladin (692)

santiontanon's picture

11-02-2019, 06:02

Hi, I think I noticed something that works differently in OpenMSX 0.15 and on real hardware. The very first release of XRacing (downloadable here: https://github.com/santiontanon/xracing/releases/tag/1.0), has a bug and joystick should not work (it does not work on real hardware). But in OpenMSX, using a keyjoystick, it does work.

The bug is that I'm setting bit 7 of register 7 of the PSG to 0, which should mess up the joystick.

Login or register to post comments

By NYYRIKKI

Enlighted (5124)

NYYRIKKI's picture

11-02-2019, 07:40

santiontanon wrote:

The bug is that I'm setting bit 7 of register 7 of the PSG to 0, which should mess up the joystick.

Hmm... I don't think you have diagnosed the problem correctly... If you really would do that the openMSX would give you a red warning about it on screen and log it to "Status Info"-tab on Catapult... I don't say that you don't try, but MSX-BIOS fixes your error before it reaches the PSG in order to protect the hardware from short circuits. (In case you still use WRTPSG routine) I think there must be now something else wrong in your program.

By santiontanon

Paladin (692)

santiontanon's picture

11-02-2019, 08:28

I indeed use the WRTPSG routine, since I am going for maximum compatibility.

You might be right of course, since I cannot know for sure as I am away from home this year due to work, and I don't have an MSX with me. But people have reported the joystick does not work on that version of XRacing on real hardware, but it does work on OpenMSX. So, there is a difference in behavior there, which is what I wanted to report Smile

But I am now very confused, since after I fixed those PSG values I was mentioning (in this version: https://github.com/santiontanon/xracing/releases/tag/1.0.2), the joystick seems to start working (from what people report to me), so that is definitively related to the problem! but you are right that the BIOS should be fixing those values. So, I am not sure what can explain this behavior then!

By Wlcracks

Master (227)

Wlcracks's picture

11-02-2019, 16:20

I missed out the 1.0.2 but it works on the vg8020/00.
Thanks!

My MSX profile