Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harvest Moon - A new Life: Executes LS.dat and SaveCount.dat via Ineluki Key Patch #1367

Closed
Ghabry opened this issue May 25, 2018 · 7 comments

Comments

@Ghabry
Copy link
Member

Ghabry commented May 25, 2018

Today in "Abusing RPG_RT": Harvest Moon a new Live

Describe the issue in detail and how to reproduce it:

This game uses ExecProgram of Inelukis Key Patch to invoke the two programs LS.dat and SaveCount.dat.

LS.dat (UPX compressed):
This program takes one argument (a memory address, always 0x46f16c), uses FindWindow for getting a handle to RPG_RT and then uses WriteProcessMemory to write a single byte (0x75) to that address.

No idea what the purpose of this write is but it changes
push offset 0x46F189 to
push offset 0x467589

Maybe @CherryDT can help ^^. Probably related to automatic savegame loading.

SaveCount.dat:

This program counts the number of files that end on "lsd" and writes the following text in Sounds/Saves.script.wav:

[execute]
Action = MidiTickFunction
Command = output
next=Saves

[Saves]
Action = AddOutPut
Value = X
next=

;by Stephan Fischer

Where X is the amount of Savegames found.

The script is later used to decide wheter a "load game" option shall be displayed.

@stavrossk
Copy link

I wish this game was translated into English...

@carstene1ns
Copy link
Member

Tried this game some year(s) ago, it was item switching all the time (because of unimplemented Ineluki), so unplayable.

@CherryDT
Copy link

CherryDT commented Jul 5, 2018

This is one of the later versions of Mirokus original auto enter patch if I'm not mistaken. Sonic Party 2 by Simon does the same thing.

I am not totally sure but as far as I remember, LS.dat is used to make the "load game" option selected by default on the title screen. The game is then reset and the "auto enter" on the title screen will therefore open the load menu. But I never fully explored this. I believe there is a wrapper EXE (?) which listens to F12 and resets this patch then, possibly.

@CherryDT
Copy link

CherryDT commented Jul 5, 2018

But the instruction change that you wrote doesn't seem right, I'd expect it to change a 74 to a 75.

@Ghabry
Copy link
Member Author

Ghabry commented Aug 20, 2020

Well the auto enter patch doesn't work obviously but my Ineluki branch has now an "emulation" for this, so in the menu you see now a "Load game" or no "Load game" depending on whether a save is there.

https://github.com/Ghabry/easyrpg-player/blob/ineluki/src/game_ineluki.cpp#L32-L38

@CherryDT
Copy link

https://github.com/Ghabry/easyrpg-player/blob/9421fb306699e4343f4e82c0cac77fbcc5a2d1b5/src/game_ineluki.cpp#L73

This should probably say that MCI commands are not supported.

@Ghabry
Copy link
Member Author

Ghabry commented Aug 20, 2020

right, thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants