devmiyax / yabause

Yabause is a Sega Saturn emulator and took over as Yaba Sanshiro
http://www.uoyabause.org
GNU General Public License v2.0
210 stars 35 forks source link

shining force 3 scenario 2 tree battle glitch it crashes. #782

Closed devmiyax closed 3 years ago

devmiyax commented 3 years ago

Hello Yaba Sanshiro Developer.

I love your app and have the paid version. I would donate if you could please fix the shining force 3 scenario 2 tree battle glitch it crashes.

I've seen others report it on play and the compatibility site so I hope someday it can be fixed I tried all graphics options in my galaxy s8+ and really like this app.

I can't finish this game but still check back for any updates on the future.

Thank you for all your hard work.

samoht442 commented 3 years ago

Hello, please find my save state files and memory.ram for this game attached.

Load the game, play the hero and 3 characters while inside the tree, its fine, go through the tree, fight the bats and zombies to the right, then go through the door to the outside of tree part of battle

This works okay too, but now if playing hero, and fight enemy while outside of tree, and it exits the battle scene, the cursor shows up, it moves automatically to the next enemy, and freezes right there spinning the outside of the 3D tree level.

My guess is its some weird texture or rending glitch as this is the only spiral level I have played yet on SF3.

Great app, and I don't want to have to start over using a PC and BizHawk, so hoping this can be fixed. I tried every combination of graphics options, but can't get past this battle level, loading the game from start screen, or save state, all the same.

Using Galaxy S8+ app is up to date Pro version.

Files attached.

Thank you~ YabaSF3S2-TreeGlitchFreeze09232020.zip

devmiyax commented 3 years ago

Reproduced

image

devmiyax commented 3 years ago

Interpreter CPU has texture bad freeze image

devmiyax commented 3 years ago

Error log . it seems that SCUDSP writes wrong address.

BiosHandleFunc 85
BiosHandleScuInterrupt
scu: wrote 000080FC to DSP Program Control Port
scu: DSP set pc = FC
scu: wrote 000080FC to DSP Program Control Port
scu: DSP set pc = FC
scu: wrote 00010000 to DSP Program Control Port
scu: DSP executing: PC = FC
BiosHandleFunc A0
BiosHandleScuInterruptReturn
Unhandled long read 0612B62C

Unhandled long read 0612B630

Unhandled long read 0612B634

Unhandled long read 0612B62C

Unhandled long read 0612B630

Unhandled long read 0612B634

Unhandled long read 0612B62C

Unhandled long read 0612B630

Unhandled long read 0612B634

Unhandled long read 0612B62C

Unhandled long read 0612B630

Unhandled long read 0612B634

dsp has ended
devmiyax commented 3 years ago

Master 0x0601D75A: mov.l @r6, r1 0x25818000 0x0601D75C: add #0x01, r2 0x0601D75E: cmp/ge r3, r2 0x0601D760: mov.l r1, @r4 r1 = 0x3fff2100, r4 = 0x002d0e04

Master DMA dmac->SAR 0x002d0e04 unsigned int dmac->DAR 0x060aa148 unsigned int *dmac->TCR 0x0000046b unsigned int

Slave 0x06015EEC: mov.w @(0x008, r7), r0 : addr = 060AA148 val = 00003FFF 0x06015EF0: exts.w r0, r1 0x06015EF2: shll2 r1 0x06015EFA: shll2 r1 0x06015F08: add r10, r1 : r10 = 060EB638 0x06015F0C: mov #0x04, r4 0x06015F14: add r1, r4 0x06015F36: mac.l @r4+, @R5+: R[4] = 0612B62C, R[5] = 06001DE0

Unhandled long read 0612B62C

devmiyax commented 3 years ago

R[4] = 060EB62C, R[5] = 06001DE0, 06001DF0 = FFFFFFFF wrong counter!

image

devmiyax commented 3 years ago
0x06015ECE: mov.l r3, @-r15  <= r3 should not be 0xFFFFFFFF
0x06015ECC: mov.l @(0x06C, gbr), r0
0x06015ECA: mov.l r0, @-r15
0x06015EC8: add #0x04, r0
0x06015EC6: mov.l r4, @-r15
0x06015EC4: mov.l @(0x03C, gbr), r0
0x06015EC2: mov r0, r11
0x06015EC0: mov.l @r4+, r8
0x06015EBE: mov.l @r4+, r7
0x06015EBC: mov.l @r4+, r3
0x06015EBA: mov.l @(0x034, gbr), r0
0x06015EB8: mov.b r0, @(0x0A9, gbr)
0x06015EB6: or r1, r0
0x06015EB4: mov #0x10, r1
0x06015EB2: mov #0x20, r1
0x06015EB0: bf/s 0x06015EB6
0x06015EAE: tst #0x01, r0
0x06015EAC: mov.b @(0x0A9, gbr), r0
0x06015E72: add #0xE0, r6
0x06015E70: bra 0x06015EAC
0x06015E6E: mov.l @r15+, r4
0x06015E6C: add #0x08, r15
0x06015E6A: mov r11, r10
0x06015E68: mov.l r5, @(0x000, r11)
0x06015E66: xtrct r2, r5
0x06015E64: shll16 r5
samoht442 commented 3 years ago

Yes, that is the exact problem.

I cannot find a way around it to continue the game. I eagerly await a future fix and thank you very much for looking into it!

devmiyax commented 3 years ago

Proceed image

devmiyax commented 3 years ago

This is the timinng issue between Master CPU and DMA.

[SH2-M] DMA 0 CHCR Write: CHCR=0x5601(type=1) SAR=0x002c6cbc DAR=0x060a0000 TCR=0x550f Should be finished before Write byte PC=06048B18 Addr=002CE200 Val=000000FF

devmiyax commented 3 years ago

fixed by https://github.com/devmiyax/yabause/pull/783