Starscream the 2nd wrote:
I've been out of the loop regarding this, but apparently due to some new developments in the last years, it's in theory possible to hook all kinds of emulators.
See this thread with Tyr's posts, there is e.g. a picture of a hooked Playstation game linked.
Haha, never thought my name would come up here ^^
Well, I just want to add some things which weren't mentioned yet and I think would enhance the hooking experience quite a bit.
First of all: Don't use
AGTH.
Yes, we often mention "AGTH" when we talk about hooking Japanese characters but most of the time, we don't mean the actual "tool" only the concept behind it. AGTH was the first tool as far as I know but is now outdated and superseded.
(Well, that's actually not really true. Latest version of AGTH has some unique functions enhancing it capabilities in theory but as far as I know nobody ever used them because they are not very user friendly. So practically speaking, there is no reason to use the original AGTH.)Even if you want to use AGTH for whatever reason, you can always use the inbuilt version of AGTH inside Translation Aggregator. You're using TA for parsing/translating anyway.
Instead of AGTH, use ITH. There are different versions (original, Andys' version and ITHVNR), but for the purpose of hooking a PC98 game it's irrelevant which you use, because they all have the Anex Hook and the WinAPI hook
NPTH uses. (I recommend Andys' ITH, though.)
ITH can do nearly everything AGTH can do, but it's much easier and handier to use. It has also some essential features AGTH lacks like linking threads (though again this is not really relevant for PC98 games).
The only feature it misses is the suppression of endless loops. There are some PC98 games doing this, especially RPGs. In those rare case, it may be a good idea to use the internal hooker of TA (or AGTH, but I personally like the internal hooker more).
Now about
NPTH:
As far as I understand it, the NP2 source code
NPTH is compiled from was changed in a way that every time the emulator uses some basic PC98 routine for text output it will call the WinAPi strlen function with the string which shall be outputted which can then be hooked by every text hooker tool.
This will work in most cases. I only encountered two cases where
NPTH fails.
- A very rare case is when the game in question uses a custom font and does not rely on the basic text output routine. The only games I encountered doing this were very late games which also had a windows port so I just played and hooked the windows version instead.
So in my experience this isn't really a problem.
- The other case is when NPTH is only outputting garbage characters. I think this is the problem peonybloomer had. (It has nothing to do with HDI-images, though.)
Sadly I'm not familiar with the hardware and the internal text processing of the PC98, but I think this has something to do with expanded memory.
There is nothing you can do to fix this in NPTH. Good news however is that in my experience every line having this problem can be hooked by the Anex Hook. So if you encounter a game with this behavior in NPTH, just play this particular game with Anex.
Sadly, the Anex Hook is in some cases a little buggy. There are some games where the Anex Hook will not capture the repetition of a character. For example "ここは" will only be hooked as "こは". Whether this is a small problem or a hugh problem is depending on the writing of the game.
Again, I don't know why this happens because I have no idea how the Anex hook works so I don't know how to fix this. Maybe there is some font caching in place or repetition characters are coded differently, but I haven't researched in this direction and probably will not because I don't know anything about the PC98 architecture.
I hope I could be of help.