~Hakurei Shrine~ > Tech Support
Neko Project II fmgen and PC-98 Touhou (guide now included)
Tengukami:
--- Quote from: Momiji on December 28, 2011, 03:06:15 AM ---I run mine at x32 (78MHz), YMMV depending on the speed of your computer.
--- End quote ---
Full memory and x32, np21nt runs perfectly well for me. I'm going to need to try the sound idea a little upthread, as sound tends to drop out for me, but this might also be due to other apps running and using - yes - PulseAudio. Apart from that, I'd say it runs very well.
Edit: Had some lag issues at busier stages, but dialing it down to x16 seemed to resolve this almost entirely. Lags are now seldom and very brief.
Goldom:
I tried my above idea about doing 1.99x32. It ran marginally better than 2.4x24, and way better than 2.4x32, but still lagged in those same 3 spots.
Now, if I play in original-size windowed mode, I can run 2.4x32 completely smooth. It only gets choppy when trying to fullscreen (CPU usage shoots from 1-2% to 25% (on a 4-core, so that's 100% to the program), and then the lag happens). Problem is, windowed is unplayably tiny. I'm going to say 1.99x32 is the best I can get for an intact LLS disk. I'd test more, but it takes getting to stage 6 to notice the lag, so it takes a while =\.
I'll just go forward with this:
Playing as Reimu - intact disk, Anex86
Playing as Marisa - take out config.sys, 2.4x32 NP21
Anex flickers badly in fullscreen, but lets me stretch the window to near-full and runs basically fine then, minus some music quality. Actually, that makes me wonder... Huh, nope. I thought maybe a stretched NP21 window would similarly behave better than fullscreen. It actually ran even worse (1.99x32 was stuttery in large window right on stage 1, but fine in fullscreen).
Goldom:
So I figured out a solution, and it was staring me in the face all along - really don't know why I didn't think of this. Change the desktop resolution before fullscreen-ing. Dropping it from 1920x1080 down to 1280x800 cut the CPU use of NP21 by about 80%, allowing me to turn the speed back up to x32 on an intact LLS without any stutter - CPU only hits about 10% (so 40% of one core).
For less of a hassle than changing system settings, you can also just uncheck "No change screen resolution" in NP21's Screen Option > FullScreen, but this leaves the game not using the full vertical space on a widescreen monitor.
After a full game, this is definitely the best so far - went through Hard, ReimuB, and this fixed 2 of 4 lag spots from my previous test. Only ones left are when stage 6 fairies shoot blue aimed lines in unison (it fixed the lag from each single shot), and Yuuka's very final spell. I left Performance Monitor running throughout, and it never went over 20% (80% of one), so these are lags due to insufficient emulation speed, not from hitting the processor limit. Unfortunately, even turning the speed up to the next setting (1.99 x48) shot the usage to max and caused CPU lag everywhere, regardless of screen size - even at 640x480.
This is even better on the other games: I can now turn 03 and 05 up to running at 2.4x56 without the CPU passing 5%, completely removing the 0.5-1% slowdown I was having at 2.4x32. (Full game on 05 now has just 0.03% slowdown). Obviously, specific numbers and lag point will vary by CPU - for reference, I have an i5 760, running at 2.8Ghz - but overall, cutting resolution makes a major impact without any visual difference as long as you maintain the same aspect ratio.
Now, because I'm the sort of person who would spend an hour figuring out how to automate a 10 second task, I created a batch file for running NP21 that changes the screen resolution automatically. It requires this command-line resolution changing program to work though. Brackets are notes.
--- Code: ---cd "[directory of that program]"
start dc64.exe -width=1280 -height=800 /wait [change dc64 if you're not using 64bit version]
cd "[directory to NP]"
np21.exe /wait
cd "[first directory again]"
dc64.exe -width=1920 -height=1080 [or whatever your original res was]
--- End code ---
Paste into notepad, make adjustments and save as whatever.bat. Make sure to change file type from "text documents" to "all files." Run that file instead of NP21.exe.
Arcorann:
So, I've just tested an alternative resolution of sorts to the problem. Seeing as I play in windowed mode Goldom's method wouldn't help me, so I searched for an alternative memory manager to replace himem.sys and emm386.exe.
With this in mind, this link contains 3 files: config.sys, np2hma.sys and np2ems.sys. If you extract all three into the root of your TH04 disk, the game should work properly while running significantly faster (in terms of emulated CPU clock) than with himem.sys and emm386.exe. Given that they were designed specifically for NP21, I have no idea if the files will work with Anex86 or Next, so keep that in mind should you feel the need to switch emulators.
Goldom:
Very good. I tried those files out, and it's definitely an improvement even as-is. When combining both the new files AND the resolution change, it runs the best of anything yet. I'll try it through a game and see if it'll now get past the couple lag spots I had.
Oh, and it does still boot in Next and Anex, though I didn't try playing.
Edit: Yep, it's the best yet in a full game with both fixes at once. I moved up to 1.99x48 now, and the only remaining visible lag is those aimed blue shots. Full game on hard shows a 0.49% slowdown. And CPU was doing totally fine, so I could probably even go up to 2.4x48 and reduce it further. [Edit 2: I did, and it did go down to 0.14%.]