libretro / px68k-libretro

Portable SHARP X68000 Emulator for Libretro
http://hissorii.blog45.fc2.com
GNU General Public License v2.0
45 stars 41 forks source link

'Star Mobile' Crashes px68k core #163

Closed McRmie closed 1 year ago

McRmie commented 1 year ago

After starting the game, you see a rotating 'MNM' logo, after that the game loads some more from the disk and that's when the crash occurs (crashes the core and RA). Tried different CPU speeds and amount of RAM; same results.

Tried to play the game in MAME but no luck either. Doesn't even reach the spinning logo, just shows a message in Japanese -"バスエラ/basuera"-something ("Bus Error" I guess). The game loads and plays fine in XM6 Pro 68k.

The disk image's sha1 is: 011afd5f444edb8ed7b2a117eb3e4ba4545a504f same as MAME x68k_flop hash file.

edit: update - Got the game working in MAME. Had to disable "Enable Fake Bus Error" in the Machine Configuration (was ON by default).

One thing I noticed is after you see the company's logo animation is that there is a resolution change. During the logo animation MAME indicates the game runs at 256x512 and after that it switches to 512x512. Then after that it goes back to 256x512 once more.

So maybe the crash is related to that resolution switch.

TurtleBazooka commented 1 year ago

Hello,

During the logo animation MAME indicates the game runs at [256x512] (https://i.imgur.com/lzZtKrK.png) and after that it switches to [512x512]

this is big hint. setting CRTC register , 16bit(word) byte and byte. when happen TextDotX was negative value.

/x68k/crtc.c TextDotX = (CRTC_HEND-CRTC_HSTART)8; ↓ if(CRTC_HEND>CRTC_HSTART){ TextDotX = (CRTC_HEND-CRTC_HSTART)8; }

same change as TextDotY.

recompiling......... [Star Mobile] is work fine!! :-)

LibretroAdmin commented 1 year ago

Thanks a lot for this advice @TurtleBazooka -

I have implemented it here and given you credit. Hope that fixes this game and the OP can confirm. https://github.com/libretro/px68k-libretro/commit/b981615516eea8a465c6d060cc19beb11a369b85

Great fork you are running BTW :)

LibretroAdmin commented 1 year ago

@McRmie Can you confirm if the issue is now fixed for you?

McRmie commented 1 year ago

Just tested on the latest build (0.15+ 7d78615) and the issue is indeed resolved. Big thanks to TurtleBazooka for the fix.

LibretroAdmin commented 1 year ago

Awesome to hear! Thanks for helping us @TurtleBazooka .