Bug in Zanac-EX on MSXturboR

ページ 3/4
1 | 2 | | 4

By gdx

Enlighted (5572)

gdx さんの画像

07-01-2022, 01:32

Congratulations and thanks! You are fast.

I found this code (3E 3F ED 79) and replaced it by 3E 1F ED 79 at 1CC2Ah in the original ROM and the version Nandemo SCC, but it's not found in the Enhanced version. This bug may have already been fixed in this version.

By max_iwamoto

Hero (595)

max_iwamoto さんの画像

07-01-2022, 01:36

gdx wrote:

Congratulations and thanks! You are fast.

I found this code (3E 3F ED 79) and replaced it by 3E 1F ED 79 at 1CC2Ah in the original ROM and the version Nandemo SCC, but it's not found in the Enhanced version.

I do not think that changing it just like that is the correct fix. Because 3Fh required in the game to show top 16 pixels with score / weapons / etc.

I am not sure about Enhanced version, I do not have it. But I assume somebody changed some code there to make it "Enhanced" and it is not the same as in original. Is it confirmed that Enchanced version also have this bug?

By gdx

Enlighted (5572)

gdx さんの画像

07-01-2022, 02:32

Okay, but it is already a first step.

Maybe the corresponding code from the enchanced version is 3E 3F D3 99 3E 82 D3 99 at 1BC2Fh in the file.

You can get the enchanced version here:
https://github.com/bladeba/MSX/tree/master/Enhanced%20Games/...

By max_iwamoto

Hero (595)

max_iwamoto さんの画像

07-01-2022, 04:00

gdx wrote:

Okay, but it is already a first step.

Maybe the corresponding code from the enchanced version is 3E 3F D3 99 3E 82 D3 99 at 1BC2Fh in the file.

You can get the enchanced version here:
https://github.com/bladeba/MSX/tree/master/Enhanced%20Games/ZANAC%20EX%20%20-%20enhanced

Thank you for the link.

Yes, this is looks like the right code. For some reason they using direct register access that not really a good practice... (but I am guilty to do it myself sometimes :) ).

By gdx

Enlighted (5572)

gdx さんの画像

07-01-2022, 04:48

This saves time and space. Zanac EX uses also bad practice when it read the 0007h address to read a VDP register. (Even if it have no importance in fact because read ports are always at the same location as write ports.)

Can you try if that patch fixes the game?

https://1fichier.com/?bn5dlfgd386d098im8e7

It replaces all jumps to 419Ah by 4197h in order to call the register initialization routine just before displaying the title screen.

By gdx

Enlighted (5572)

gdx さんの画像

07-01-2022, 16:17

I tried on BlueMSX, it seems works but on OpenMSX the score panel is not displayed.

By max_iwamoto

Hero (595)

max_iwamoto さんの画像

07-01-2022, 17:17

gdx wrote:

I tried on BlueMSX, it seems works but on OpenMSX the score panel is not displayed.

I will check he patch shortly.

But this is why before I was mentioning that just changing to 1Fh would not help, because it would affect the score panel.

I will look more later on today and try to make a patch. But, I would really want to understand WHY this is happening, because then we can have the real fix.

By max_iwamoto

Hero (595)

max_iwamoto さんの画像

07-01-2022, 17:28

gdx wrote:

This saves time and space. Zanac EX uses also bad practice when it read the 0007h address to read a VDP register. (Even if it have no importance in fact because read ports are always at the same location as write ports.)

Can you try if that patch fixes the game?

https://1fichier.com/?bn5dlfgd386d098im8e7

It replaces all jumps to 419Ah by 4197h in order to call the register initialization routine just before displaying the title screen.

I tried patched ROM on BlueMSX. It shows score in the game and glitch again present in the title screen.

I tried on openMSX as well and issue happened on the second restart. First restart was OK.

By Grauw

Ascended (10602)

Grauw さんの画像

07-01-2022, 17:54

The code causing the glitch only triggers when the FH status bit (horizontal line interrupt) is flagged. However, during the title screen line interrupts are disabled (IE1 is 0).

Disabling the line interrupts does not keep FH low at all times though. When the VDP hits the interrupt line, FH goes high for a brief moment (openMSX says: “FH goes up at the start of the right border of IL and goes down at the start of the next left border.”), even though it does not stay latched like it would when IE1 is enabled.

Because of unlucky timing on the turboR GT (or maybe rather, lucky timing on other systems) it sometimes polls FH exactly in this moment. To fix the issue, the interrupt routine should skip the FH check when line interrupts are disabled.

By max_iwamoto

Hero (595)

max_iwamoto さんの画像

07-01-2022, 17:58

Grauw wrote:

The code causing the glitch only triggers when the FH status bit (horizontal line interrupt) is flagged. However, during the title screen line interrupts are disabled (IE1 is 0).

Disabling the line interrupts does not keep FH low at all times though. When the VDP hits the interrupt line, FH goes high for a brief moment (openMSX says: “FH goes up at the start of the right border of IL and goes down at the start of the next left border.”), even though it does not stay latched like it would when IE1 is enabled.

Because of unlucky timing on the turboR GT (or maybe rather, lucky timing on other systems) it sometimes polls FH exactly in this moment. To fix the issue, the interrupt routine should skip the FH check when line interrupts are disabled.

Brilliant! I will make a patch for that.

ページ 3/4
1 | 2 | | 4