AZO234 / NP2kai

Neko Project II kai
http://domisan.sakura.ne.jp/article/np2kai/np2kai.html
MIT License
246 stars 61 forks source link

Access violation crash when attempting to save state #95

Closed BBAlpert closed 4 years ago

BBAlpert commented 4 years ago

Starting a few days ago, attempting to save or load a state in most PC-98 games results in an access violation that crashes RetroArch. It happens with the most updated versions of RetroArch and of the NP2kai cores, and it even happens on completely fresh installs of both.

Those same games using the same BIOS were able to save states without any problem up until a few days ago. Save states still work fine with other cores, and the PC-98 games still run fine with NP2kai, it's just the save state that crashes the program.

I've noticed that it only seems to happen with games that display the "V E M 4 8 6 Virtural XMS / EMS / VCPI Memory Server Version 1.29N" thing when booting up, and even then, saving states only crashes the program after that bootup screen. You can still save during the few seconds of bootup before the VEM screen.

I managed to capture a screenshot of the log window RIGHT before the program crashes, and it says that it's attempting to execute data at address 0x0000000000000 access violation

"retroarch_debug.exe caused an Access Violation at location 0000000000000000 DEP violation at location 0000000000000000."

A sample crash log: https://pastebin.com/q1VBZqMc A log of the session when this crash happened: https://pastebin.com/NJ9dw0KR

I'm new to using GitHub, so if there is any other information you need from me, please just ask.

Thanks!

AZO234 commented 4 years ago

Thanks your reporting! Yes, I hear about access violation recently. Perhaps, it is ascribed to enable slept many functions.

Among them, I enabled serial communication function incorrectly. I fixed it.

And i tried state save & load with 'AD&D EOB2'. It worked.

Another, I don't recommend ZIP contents for NP2kai (and other PC core). FD and HD images aren't ROM. It should be extracted.

Regard.

BBAlpert commented 4 years ago

Thanks for responding so quickly. I assume the fixes you made will be in the next release, correct? I'm very excited.

And thanks for the advice about using ZIP files. I really need to go and extract those files.

BBAlpert commented 4 years ago

I downloaded the latest update of the core and I'm still having some issues. However, the issues may be due to me trying to run the games improperly. If I load up just the HD image in RetroArch, the game loads up fine, but it still crashes when I try to save state. This is what I had done before the serial communication function was implemented and it worked fine then.

If I load up the HD image, then hit F12 to go in and manually set the "system disk" image to FDD1 and "disk 1" image to FDD2, then hit F1 to reboot the emulation, the game loads up fine and save states also work fine.

In other words, it seems like there's still an issue when there is an HDI file loaded but no HDM files. At least that's what has been happening for me.

AZO234 commented 4 years ago

Great report!😳 Thank you! I investigate up.

AZO234 commented 4 years ago

DOS setting in this HD image is peaky... Almost PC98 games don't need 'special' memory driver. When use VEM486.EXE, user has to know PC98's structure well.

But it's lucky that this HD image has normal memory drivers and text editor! You can custom DOS environment. And I want to know how it works. Please try follow method.

  1. RetroArch's 'Input' -> 'Hotkey Binds’ -> 'Hotkeys' -> press RCtrl (example).
    • You can use keyboard typing by this setting.
    • But to use all hotkey, you need RCtrl+hotkey.
  2. Run HD image.
  3. Select 'DOSへ戻る(Back to DOS)' of EOTB2 title menu.
  4. You'll show 'A:¥EOB2>', DOS command prompt.
  5. Input 'CD ..' (lowercase OK), then display 'A:¥>'
  6. Input 'SEDIT CONFIG.SYS', then run text editor and display text in CONFIG.SYS.
  7. Edit like this fig. eob2hdi
    • Remove 'REM' of 'HIMEM.SYS' and 'EMM386.EXE'. And remove everything after that.
    • You need mash delete key!?
    • Press F10(範囲選択, select text region), and press Enter at select start, then move to end point, press F7(切取, cut).
  8. Press F1(ファイル, file), and press 'E'(ファイルのセーブと編集終了, save file and quit).
    • 'S' is 'save file'.
    • 'Q' is 'quit without save file'.
    • 'R' is 'rename file'.
  9. It'll be back to DOS prompt.
  10. (If you hacker, you can edit 'AUTOEXEC.BAT' better.)

That's all. Close NP2kai. Plus one.

  1. RetroArch's 'Input' -> 'Hotkey Binds’ -> 'Hotkeys' -> press Delete.

Then run HD image again. How?

BBAlpert commented 4 years ago

It's working! Thank you so so much!