OpenKh icon indicating copy to clipboard operation
OpenKh copied to clipboard

Adding OpenKh.Research.Pcsx2Kh2Link

Open kenjiuno opened this issue 5 years ago • 4 comments

H>OpenKh.Research.Pcsx2Kh2Link.exe list

System.Diagnostics.Process (pcsx2)
00650C40-00B9FC3F map/jp/eh18.map
00642440-0065043F msg/jp/eh.bar
00650440-00650C3F libretto-eh.bar
004FA440-0053F43F 00effect.bar
0053F440-00551C3F magic/FIRE_3.mag
00551C40-0056CC3F magic/BLIZZARD_3.mag
0056CC40-005A743F magic/THUNDER_3.mag
005A7440-005BFC3F magic/CURE_3.mag
005BFC40-005DDC3F magic/MAGNET_3.mag
005DDC40-0060E43F magic/REFLECT_3.mag
0061F440-00625C3F obj/PRIZE.mdlx
00625C40-0062CC3F obj/PRIZE_BOX_YELLOW.mdl
0062CC40-00633C3F obj/PRIZE_BOX_RED.mdlx
00633C40-0063B43F obj/PRIZE_BOX_BLUE.mdlx
0063B440-0064243F obj/PRIZE_BOX_GREEN.mdlx
00BB0440-00C1B43F obj/P_EX100.mdlx
00C1B440-00CA043F obj/P_EX100.a.fm
00CA0440-00F1E43F obj/P_EX100.mset
00F1E440-00F2F43F obj/W_EX010_N0.mdlx
00F2F440-00F5BC3F obj/W_EX010_N0.a.fm
00F5BC40-00F9DC3F obj/W_EX010.mset
00BA0440-00BA0C3F obj/WORLD_POINT.mdlx
00BA0C40-00BB043F obj/WORLD_POINT.a.fm
00FC9E40-0102863F obj/P_EH000.mdlx
01028640-01032E3F obj/P_EH000_MEMO.mset
01032E40-01094E3F obj/P_EX030.mdlx
01094E40-0109F63F obj/P_EX030_MEMO.mset
0109F640-010FBE3F obj/P_EX020.mdlx
010FBE40-01104E3F obj/P_EX020_MEMO.mset
00B9FC40-00BA043F obj/F_EX000.mdlx
01104E40-0115863F obj/P_EX220_RTN.mdlx
01158640-0117A63F obj/P_EX220_RTN.mset
0117A640-011DFE3F obj/N_EX560_RTN.mdlx
011DFE40-0120BE3F obj/N_EX560_RTN.mset
0120BE40-01267E3F obj/P_EH000_RTN.mdlx
01267E40-0127DE3F obj/P_EH000_RTN.mset
0127DE40-012D8E3F obj/P_EX020_RTN.mdlx
012D8E40-012ED63F obj/P_EX020_RTN.mset
012ED640-0134DE3F obj/P_EX030_RTN.mdlx
0134DE40-01364E3F obj/P_EX030_RTN.mset
01364E40-01399E3F limit/fm/trinity_zz.bar

PS

  • Sample BinaryTemplate is https://gitlab.com/kenjiuno/khkh_xldM/-/blob/master/VisAddrRange/loadedFileList.bt
  • This bt is valid for eeMemory.bin in sstates/SLPM-66675 (F266B00B).00.p2s zip file.

kenjiuno avatar Aug 15 '20 13:08 kenjiuno

The problem of loading .map or something directly from pcsx2 is that some offset values are converted from relative file position to absolute memory pointer. We need binary data converters like MakeRelative/MakeAbsolute as part of load/save procedure.

kenjiuno avatar Aug 16 '20 13:08 kenjiuno

Hi @kenjiuno , I saw this pull request yesterday. Can I have a quick understanding of what this tool is supposed to do?

Xeeynamo avatar Aug 16 '20 13:08 Xeeynamo

This pull request intends to implement easy access to running pcsx2 process, and provide KH2fm specific option.

I have watched discord and some users seem to request online editing feature, because (I guess) it needs longer time cost to find out the usage and meaning of many unknown properties, and it needs to be shorten.

Currently some users are trying to pcsx2 online memory hack by using Cheat Engine or such tool, as many youtube KH2 modders do.

I suppose full read from pcsx2 and full write to pcsx2. But it may be difficult in technical reason (e.g. it needs to be same bytes length before and after editing).

OpenKh.Research.Pcsx2Kh2Link is just command line tool to provide LinkToPcsx2 usage, and useful feature for researching like export file from memory.

kenjiuno avatar Aug 16 '20 14:08 kenjiuno

The dump command added.

OpenKh.Research.Pcsx2Kh2Link.exe dump --help

dump 32MB EE memory

Usage: OpenKh.Research.Pcsx2Kh2Link dump [options] <MemoryDmp>

Arguments:
  MemoryDmp     file path: memory_PID.dmp

Options:
  -?|-h|--help  Show help information
OpenKh.Research.Pcsx2Kh2Link.exe dump

PID=8164, Name=pcsx2
  Saved to: memory_8164.dmp

kenjiuno avatar Dec 04 '20 13:12 kenjiuno