Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Bugs » [NeoPop] The Last Blade
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
[NeoPop] The Last Blade [message #5684] Tue, 09 October 2018 05:30 Go to next message
marc_max  [PM]
I've found a bug in NeoPop.
I didn't know where to report it since the project was abandoned a long time ago. But since Mednafen and Libretro have been keeping it alive, I think this is the place.

The bug can be reproduced in The Last Blade (Europe) and its japanese version Bakumatsu Rouman Tokubetsu Hen - Gekka no Kenshi - Tsuki ni Saku Hana, Chiri Yuku Hana (Japan).

Its savegame starts being 256 bytes (plus the 16 byte header).
Everytime the game saves (completing game, buying scrolls in the shop, changing game options, etc), it appends a new 256 bytes savegame to the existing one, probably for backup purposes just in case the latest savegame gets corrupted somehow. The game will always load the latest valid savegame.

The savegame file, then, will grow at every save point. However...
After it reaches 32528 bytes, the game will freeze when trying to save. Something is telling me it's because because the savegame is trying to become bigger than 32768 bytes, which might be NeoPop's limit (seems like The Last Blade might have a bigger Flash ROM?).
By the way, emulator doesn't crash, the game's music still continues but controls are disabled.


Why is it important to fix this? Because after some hours of playing it I've reached a point that after buying half of the Gallery shop, I cannot play the game anymore because it freezes when trying to save.

Fortunately, I've been able to manipulate the savegame and build a new smaller one, truncating the older ones (and it's compatible). But this is not something everyone could do.

Tested in RetroArch, Mednafen, BizHawk and original NeoPop, all of them have the same issue.
Re: [NeoPop] The Last Blade [message #5817 is a reply to message #5684 ] Mon, 18 March 2019 19:29 Go to previous message
stellarporter  [PM]
Hello,

Bug explanation is here.
https://github.com/libretro/beetle-ngp-libretro/issues/46#issuecomment-474146350

A partial solution has been created.
https://github.com/libretro/beetle-ngp-libretro/pull/56/commits/815ec0be521b7233f8759356b41395b2275c25ba


But there's 2 bullet strikes:
1. Flash writes to "last" 32K sector differs on 4,8,16,32 MBit cartridges. How to access rom length in HLE cpp file?

2. If the rom comes preloaded with save data, it can interfere with the flash reads on a clean game boot. In more detail:

libretro core with HLE patch:
-- no-intro Last Blade (Europe) has save data from 1F0000-1F07FF.
-- game reaches 1F7FFF write limit and orders a bank 31 flash wipe (1F0000-1F7FFF)
-- game now writes to 1F0000-1F00FF. close emulator. flash saved.
-- reload game. flash saves are gone and in-game uses the ones from the rom instead.

I think if the flash save regions overwrote the ngpc rom data, then it'd work. But I don't know for sure. And frankly, I think @Team Mednafen would do a correct job instead of my emergency hackfix.

Thanks!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:PSX Darkstone freezes
Next Topic:[PSX] Rocks'n'gems (net yaroze) don't run, black screen
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 18 05:31:31 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software