èªãããïŒããžã¥ã¢ã«ããã«ã倧奜ãã§ãã ããããã€ã³ã¿ã©ã¯ãã£ããªæ¬ãªã®ããäž»ã«ããã¹ããèªãããã«å¿ èŠãªã²ãŒã ãªã®ãããŸãã¯äž»ã«æ¥æ¬èªã®ã©ãžãªçªçµã§ããã®ãããããªã人ãããŸãã éå»5幎éãç§ã¯ããããå¥ã®åœ¢åŒã®ãã£ã¯ã·ã§ã³ãæ¬åœã«åãå ¥ããŠããŸãããããžã¥ã¢ã«ããã«ã¯ãçŽã®æ¬ããªãŒãã£ãªããã¯ãããã«ã¯ã·ãªãŒãºã«æ¯ã¹ãŠã¯ããã«æ²¡å ¥ããŠãããããããã¯å®æçã«éåžžã«èå³æ·±ããã®ã§ãã
ãããŠåäŸã®é ãããç©äºãã©ã®ããã«é 眮ãããäœãäžã«ããã®ããç解ããã®ã倧奜ãã§ãã 圌ã¯æåã®å£ããããã¡ãããå§ããå°ããäŒç€Ÿã§ã¯ãªããªããŒã¹ãšã³ãžãã¢ãªã³ã°ãšãŠã€ã«ã¹ã¢ããªã¹ãã«æé·ããŸããã ãããŠãããã¯ç§ã«èµ·ãããŸãã-ãããã®ãã®ãçµåããŠã¿ãŸãããïŒ ãã®ãšã³ãžã³ãŸãã¯ãã®ãšã³ãžã³ã®æ©èœã«åºã¥ããŠãããžã¥ã¢ã«ããã«ã®å éšã«ãããã®ãç解ããç解ããŸããïŒ
ãããŠãããæè¿ã Katai StructãªãªãŒã¹ããªãªãŒã¹ãããŸãã-ããã¯ãã€ããªããŒã¿æ§é ããªããŒã¹ãšã³ãžãã¢ãªã³ã°ããããã®æ°ãããã¬ãŒã ã¯ãŒã¯ã§ãïŒãã ããèè ã¯ç©æ¥µçã«ããã¯ã解é€ãããã¹ãŠãå¹³åçãªç®çã®ããã ãã§ãããšèšããŸãïŒã ã¢ã€ãã¢ã¯å¹³å¡ã§ãããé åçã§ãïŒç¹å®ã®ããŒã¯ã¢ããèšèªã§ããŒã¿æ§é ã宣èšçã«èšè¿°ãããµããŒããããŠããããã°ã©ãã³ã°èšèªã§è§£æããããã®æ¢è£œã®ã¯ã©ã¹ã©ã€ãã©ãªãååŸããŸãã å«ãŸããŠããã®ã¯ãããžã¥ã¢ã©ã€ã¶ãŒïŒãã§ãã¯ããããããããïŒãšãå®éã«ã¯ã³ã³ãã€ã©ãŒã§ãã ããŠãè©ŠããŠã¿ãŸããããããã¯äœã®ããã§ããïŒ
ãŠã©ãŒã ã¢ãããšããŠã§ããããªããŒã¹ãšã³ãžãã¢ãªã³ã°ã§ééããå žåçãªã¢ã¯ã·ã§ã³ã瀺ãããã«ãããããªããšã§ã¯ãªããã€ãŸãçŽ æŽãããããžã¥ã¢ã«ããã«ã æãã島ã®å åäžãããå§ããããšãææ¡ããŸããå éå¥ïŒPeasSoftã®çããµãŒã¯ã«ã§åºãç¥ãããŠããèè ã ããã¯æ¥œãããã¹ãã¬ã¹ã®ãªãããã³ããã¯ãªã³ã¡ãã£ã§ãããPeasSoftã®äŒçµ±çã«çŸããèŠèŠçãªéšåããããŸãã é転ã®èŠ³ç¹ããã圌女ã¯èªåã®ãšã³ãžã³ã䜿çšããŠãããšããäºå®ã«ã倢äžã«ãªããŸãããããã¯ããŸãæ®åããŠãããããŸã æªèžã®ããã§ãã ãããŠãããã¯å°ãªããšãã ããªããªãRen'Pyã®æ£ã§å®å šã«æ·åããçãŸãããã®ãã¶ãã¶ããããããé¢çœãã
ãŸããå¿ èŠãªããŒã«ããªã¹ãããŸãã
- Kaitai Struct-ã³ã³ãã€ã©ãŒããã³ããžã¥ã¢ã©ã€ã¶ãŒ
- Java JRE-æ®å¿µãªãããKaitai Structã¯Scalaã®
Javaã§èšè¿°ãããŠãããJREãŸãã¯node.jsã®ãããããå¿ èŠãšããŸãããnode.jsã§è©Šããããšã¯ãããŸãã - KSããµããŒãããããã°ã©ãã³ã°èšèªïŒçŸåšã¯JavaãJavaScriptãRubyãPythonïŒ-Rubyã䜿çšããŸãããããã»ã©éèŠã§ã¯ãããŸãããæåŸã«ãªã¹ã¿ãŒãšãšã¯ã¹ãã©ã¯ã¿ãŒãäœæããŸã
- ããçš®ã®16é²ãšãã£ã¿-æŠããŠãã©ãã§ãã£ãŠãããããã¯ãã¹ãŠäžå®å šã§ãã ååãšããŠã16é²ãšãã£ã¿ãŒã¯KSããžã¥ã¢ã©ã€ã¶ãŒå ã«ãããŸãããæã䟿å©ã§ããããŸããã ç§ã¯å人çã«oktetaã䜿çšããŠããŸã ïŒåã«äººéã«åªããã³ããŒããŒã¹ããããããã§ãïŒ-ããããã»ãšãã©äœã§ãè¡ãã§ããã-ãã³ããèŠãŠãæå®ãããã¢ãã¬ã¹ã«è¡ããéžæããããŒã¹ãå¥ã®ãã¡ã€ã«ã«ãã°ããã³ããŒããããšãã§ããŸã
次ã«ãç 究補åèªäœãå¿ èŠã§ã-ããžã¥ã¢ã«ããã«é ä¿¡ã ããã§ã幞éã§ãããPeasSoftã®Webãµã€ãã§ã¯ãå®å šã«åæ³çãªç¡æããŠã³ããŒãã®ããã«è©Šçšçãã¢ããããŒãããŠããŸããããã¯ããã©ãŒãããã«æ £ããã®ã«ååã§ãã ãµã€ãã§ã¯ããã®ãããªããŒãžãèŠã€ããå¿ èŠããããŸãã
éã§å²ãŸãã-å®éã«ã¯ããã©ãŒãžã®ãªã³ã¯ïŒãã¹ãŠåãïŒãããŠã³ããŒãããè©ŠçšçãæäŸããŸãã
é åžããããããŠã³ããŒãããŠè§£åããåŸãæ å ±ã®åéããå§ããŸãã ç§ãã¡ã¯ãã§ã«å±ç€ºã«ã€ããŠç¥ã£ãŠãããšæããŸãããã ãŸãããã©ãããã©ãŒã ã å°ãªããšãããµã€ãã§é åžãããŠããããŒãžã§ã³ã¯ãIntelããã»ããµäžã®Windowsã§åäœããŸãïŒäžè¬ã«Androidåãã®ããŒãžã§ã³ããããŸãããå®éã«ã¯ãæ¥æ¬ã®æºåž¯é»è©±äºæ¥è ã®ã¢ããªã±ãŒã·ã§ã³åžå Žã§ã®ã¿è²©å£²ãããŠãããé»è©±ããåãåºãã®ãç°¡åã§ã¯ãããŸããïŒã Windows / Intelã§ãããšããäºå®ãããããã€ãã®éåžžã«ãããããªããšãç¶ããŸãã
- ãã€ããªåœ¢åŒã®æŽæ°ã¯ããªãã«ãšã³ãã£ã¢ã³ã§ãšã³ã³ãŒããããŸã
- æ¥æ¬ã®Windowsããã°ã©ããŒã¯ããŸã ã«Shift-JISãšã³ã³ãŒãã£ã³ã°ã䜿çš
ããŠç³åšæ代ã«äœãã§ããŸã - è¡ã®çµããã¯ãæ瀺çã«ãããã«åºäŒã£ãå Žåãã\ nãã ãã§ãªãã\ r \ nãã§ç€ºãããŸãã
é梱ããã³èšçœ®ããããã®ã®ç°¡åãªæ€æ»ã¯ãçç£ã以äžã§æ§æãããŠããããšã瀺ããŠããŸãã
- data01.ykc-8393294
- data02.ykc-560418878
- data03.ykc-219792804
- sextet.exe-978944
- AVI / op.mpg-122152964
ã€ãŸã ããã«ã¯ã1ã€ã®å°ããªexe-shnikïŒæããã«ãšã³ãžã³ä»ãïŒãããã€ãã®å·šå€§ãª.ykcãã¡ã€ã«ïŒããããã³ã³ãã³ããå«ãã¢ãŒã«ã€ãïŒãããã³op.mpg-ã¹ãã©ãã·ã¥ã¹ã¯ãªãŒã³ä»ãã®ãããªãã¡ã€ã«ïŒãã¬ãŒã€ãŒã§éããšããã«è¡šç€ºãããŸãïŒããããŸãã
16é²ãšãã£ã¿ã§exeãã¡ã€ã«ããã°ããèŠèŠçã«æ€æ»ãããšäŸ¿å©ã§ããçŸä»£ã®éçºè ã§ãååã§ãããç»åãé³å£°ãé³æ¥œãæ±ãããã«æ¢è£œã®ã©ã€ãã©ãªã䜿çšããããšããããããŸãã ãããŠããã®ãããªã©ã€ãã©ãªã¯ãååãšããŠãã³ã³ãã€ã«äžã«èçŒã§èŠããããã€ãã®çœ²åãæ®ããŸãã æ¢ãã¹ããã®ïŒ
- ãlibpngããŒãžã§ã³1.0.8-2000幎7æ24æ¥ã-libpngã䜿çšããããããç»åã¯png圢åŒã«ãªããŸãã
- ãzlibããŒãžã§ã³ãšã©ãŒãããäžæãªzlibãšã©ãŒã-zlibå§çž®ã䜿çšãããããšãæå³ããŸãã å®éã«ã¯åœã®ãã¬ãŒã¹ã§ããå¯èœæ§ããããŸã pngã®ãšã³ã³ãŒãæã«zlibå§çž®ã䜿çšãããŸãã åºç¯å²ã«ãããçµè«ãåºããŸã§
- ãXiph.Org libVorbis I 20020717ãã¯libvorbisã§ããããã¯ãé³æ¥œãé³å£°ãããã³é³å£°ãogg / vorbisã«å«ãŸããŠããå¯èœæ§ãé«ãããšãæå³ããŸãã
- ãJPEGããŒã¿ã®ç ŽæãããJPEGãã¡ã€ã«ã®æ©æçµäºã-libjpegããã®è¡ã ååšããå Žåããšã³ãžã³ã¯ããããjpgç»åã®äœ¿çšæ¹æ³ãç¥ã£ãŠããããšãæå³ããŸã
- ãD3DX8 Shader AssemblerããŒãžã§ã³0.91ã-äœãã®å åŽã®ã©ããã§D3DX8ã·ã§ãŒããŒã䜿çšãããŠãã
- ãMicrosoft Visual C ++ Runtime Libraryããã
local vftable'", "
eh vector constructor iteratorããªã©ã®ãããªã¡ãã»ãŒãžã®æ£ä¹± ããã¯ãMicrosoftã®C ++ã©ã€ãã©ãªã§ã³ã³ãã€ã«ãããŠãããã»ãšãã©ã®å ŽåC ++ã§èšè¿°ãããŠããããšã瀺ããŠããŸãã å¿ èŠã«å¿ããŠãæãäžããŠç¹å®ã®ããŒãžã§ã³ãèŠã€ããããšãã§ããŸãããä»ã¯ç¹ã«å¿ èŠãããŸããããããå解ããããäœããå解ãããããããšã¯ãããŸããã
ãããŒãžã§ã³ãããèäœæš©ãããã³ã³ãã€ã©ããããšã³ãžã³ãããã¹ã¯ãªããããªã©ã®è¡ãæ€çŽ¢ã§ããŸã-ããã«ã ããã¯Windowsãã¡ã€ã«ã§ããUTF16-LEã®ãããª2ãã€ããšã³ã³ãŒãã£ã³ã°ã§è¡ãããšãå¿ããªãã§ãã ãã-ä»ã«ãèå³æ·±ãããšããããããããŸããã äŸãã°ããYuka Compiler ErrorãããYukaWindowClassãããYukaApplicationWindowClassãããYukaSystemRunningããããã³ãstart.yksãããsystem.ykgããžã®åç §ããããŸãã ããããã¹ãŠãããããã°ã©ãèªèº«ããšã³ãžã³ããYukaãã®ãããªãã®ãšåŒã³ãããã«ãã£ãŠäœ¿çšããããã¹ãŠã®ã¿ã€ãã®ãã¡ã€ã«ã¯ãã¹ãŠyk-ykcãyksãykgã§å§ãŸããšä»®å®ããããšã¯è«ççã§ãã ãšã³ãžã³ããªãŒãã£ãªCDãã©ãã¯ããé³æ¥œãåçã§ãããšæ³å®ã§ãããCDPlayModeããšãCDPlayTimeããããã³MIDIã®é³æ¥œã®ãµããŒããæ³å®ã§ãããMIDIStopããšãMIDIPlayãããããŸãã
çç·šå°èª¬ã«ãããšãæçµçµæã¯ããªã楜芳çãªèŠæ¹ã§ãã
- pngããã³jpg圢åŒã®ç»åãããã«ãããã¿ã¹ã¯ãããã«1æ¡ç°¡åã«ãªããŸã-ã»ãšãã©ã®å Žåãã«ã¹ã¿ã ã®ç»åå§çž®åœ¢åŒã調ã¹ãå¿ èŠã¯ãããŸããã
- é³æ¥œãé³å£°ããµãŠã³ã-ã»ãšãã©ã®å Žåoggã«ãããŸãïŒãã ããMIDIãšCDDAã®äž¡æ¹ã䜿çšã§ããŸã-å¯èœæ§ã¯äœãã§ãããç©çã¡ãã£ã¢ããªãããïŒ
åææ å ±ãåéãããŸãã-ããã§ãè¢ããŸããäžããŠãã¡ã€ã«ã«é£ã³èŸŒãããšãã§ããŸãã å®éãããã€ãã®ãã¡ã€ã«ããããŸã-ãããè¯ãã§ãã äžè¬ã«ããªããŒã¹ãšã³ãžãã¢ãªã³ã°ã§ã¯ãããŸããŸãªããªãšãŒã·ã§ã³ã®è€æ°ã®ãªããžã§ã¯ãã調æ»å¯Ÿè±¡ã®ãªããžã§ã¯ãã«ã¢ã¯ã»ã¹ãããããã®éãã確èªã§ããå ŽåãçŽç²ã«çµ±èšçãªè³ªåãéåžžã«éèŠã«ãªãããšããããããŸãã 次ã®7F 02 00 00ãäœãæå³ããã®ããæšæž¬ããã®ã¯ã¯ããã«å°é£ã§ãã
ãã¡ã€ã«ã®åœ¢åŒãåããã©ããã確èªããŠãã ããã ãã¹ãŠãdata * .ykc-oneã§ãããšããäºå®ããå€æããŸãã ãã¡ã€ã«ã®å é ã調ã¹ãŸãããã¹ãŠã¯ãYKC001 \ 0 \ 0ãã§å§ãŸããŸã-éåžžã«è¯ãããšã§ããããããã¯å®éã«ã¯åã圢åŒã®ã¢ãŒã«ã€ãã®ããã§ãã
äœããã®å§çž®ã䜿çšãããŠãããã©ãããããã«çµéšçã«ç¢ºèªããŸãã ã¢ãŒã«ã€ããåãåºãããã¡ã€ã«ãå§çž®ããŠãåãšåŸã®éã確èªããŸãã ç§ã¯æããªzipã䜿çšããŸããïŒ
- ãŸã§-8393294
- åŸ-6758313
çž®ã¿ãŸãããããã»ã©å€§ããã¯ãããŸããã ã»ãšãã©ã®å Žåãå§çž®ããªããããã¹ãŠã®ãã¡ã€ã«ã«å§çž®ãããŠããããã§ã¯ãããŸããã äžæ¹ãã¢ãŒã«ã€ãã«pngãŸãã¯oggãå«ãŸããŠããå Žåããããã¯ãã§ã«å§çž®ãããŠããããããã以äžã®zipã¯å§çž®ãããŸããã
äžè¬çãªçç±ãããã»ãšãã©ãã¹ãŠã®ã¢ãŒã«ã€ãã«ã¯äœããã®çš®é¡ã®èŠåºãããããååãšããŠãã¢ãŒã«ã€ãã³ã³ãã³ãã®ãã£ã¬ã¯ããªãããïŒæ¯èŒçå°ããïŒãã¢ãŒã«ã€ããã¡ã€ã«ã®99ïŒ ãå æãããŠããŸããå®éãã³ã³ãã³ãã¯æ·»ä»ãã¡ã€ã«ãŸãã¯ããŒã¿ãããã¯ã§ãã ã¡ãªã¿ã«ãèŠåºãã¯å¿ ããããã¡ã€ã«ã®å é ããå§ãŸãããã§ã¯ãããŸããããã¡ã€ã«ã®æ«å°Ÿãããããã«é¢ããŠããå Žåããå é ããå°ãïŒéåžžã¯å°ãïŒé¢ããŠããå ŽåããããŸãã ãã¡ã€ã«ãæ¡ç³å Žã®å Žæããå§ãŸããäžå€®ããèªã¿åãããšã¯éåžžã«ãŸãã§ãã
ãã¡ã€ã«ã®å é ãèŠãŸãã ã»ãŒæ¬¡ã®åçã衚瀺ãããŸãã
-
59 4B 43 30 â 30 31 00 00
30â3059 4B 43 30 â 30 31 00 00
ããã¯æããã«åãªããã¡ã€ã«çœ²åã§ãããASCIIã§ã¯ãYKC001ãã§ããã»ãšãã©ã®å ŽåããYuka ContainerãããŒãžã§ã³001ã®ãããªãã®ãæå³ããŸãã -
18 00 00 00 â 00 00 00 00 â 1A 00 80 00 â 34 12 00 00
æããã«ããã¯ã¿ã€ãã«ã§ã - ã¢ãŒã«ã€ãå ã®ãã¡ã€ã«ã®æ¬æãæããã«å§ãŸããŸãã ããã¯ç¹ã«data02.ykcã§æ確ã«èŠãããŸã-äœããã®çš®é¡ã®èšå®ãŸãã¯ã¹ã¯ãªããèšèªã®è¡ããããŸãïŒ "WindowSize = 1280ã800"ã "TransitionWaitType = 2"ãªã©ã ã€ãŸã ããã«ç¡æå³ã«èŠãã
3ã€ã®ãã¡ã€ã«ãã¹ãŠã§ããããŒãã©ã®ããã«èŠãããã確èªããŸãã
- data01.ykcïŒ
18 00 00 00 â 00 00 00 00 â 1A 00 80 00 â 34 12 00 00
00â0018 00 00 00 â 00 00 00 00 â 1A 00 80 00 â 34 12 00 00
00â1A18 00 00 00 â 00 00 00 00 â 1A 00 80 00 â 34 12 00 00
00â3418 00 00 00 â 00 00 00 00 â 1A 00 80 00 â 34 12 00 00
- data02.ykcïŒ
18 00 00 00 â 00 00 00 00 â 4E E1 66 21 â F0 6E 00 00
00â0018 00 00 00 â 00 00 00 00 â 4E E1 66 21 â F0 6E 00 00
00â4E18 00 00 00 â 00 00 00 00 â 4E E1 66 21 â F0 6E 00 00
21âF018 00 00 00 â 00 00 00 00 â 4E E1 66 21 â F0 6E 00 00
- data03.ykcïŒ
18 00 00 00 â 00 00 00 00 â 5C E1 18 0D â 48 E4 00 00
00â0018 00 00 00 â 00 00 00 00 â 5C E1 18 0D â 48 E4 00 00
00â5C18 00 00 00 â 00 00 00 00 â 5C E1 18 0D â 48 E4 00 00
0Dâ4818 00 00 00 â 00 00 00 00 â 5C E1 18 0D â 48 E4 00 00
ã18 00 00 00â00 00 00 00ããšã¯ãŸã æ確ã§ã¯ãããŸããããã©ãã§ãåãã§ãã ä»ã®2ã€ã®ãã£ãŒã«ãã¯ããã«èå³æ·±ã-ãããã¯æããã«2ã€ã®4ãã€ãæŽæ°ã§ãã Kaitai Structãå ¥æããçµæã®æšæž¬ãksy-formatã®åœ¢åŒã§èšè¿°ãå§ããæãæ¥ãããã§ãã
meta: id: ykc application: Yuka Engine endian: le seq: - id: magic contents: ["YKC001", 0, 0] - id: magic2 contents: [0x18, 0, 0, 0, 0, 0, 0, 0] - id: unknown1 type: u4 - id: unknown2 type: u4
è€éãªããšã¯äœããªãããã§ãã ksyã¯å®éã«ã¯éåžžã®YAMLãã¡ã€ã«ã§ãã ãã¡ã¿ãã»ã¯ã·ã§ã³ã§ã¯ãç§ãã¡ãå®éã«åãçµãã§ããããšãããã³äºå調æ»ã®çµæã«åºã¥ããŠåéãããã®ãã€ãŸãã ãykcããã¡ã€ã«ã解æããŸããããããããYuka EngineããšåŒã°ããã¢ããªã±ãŒã·ã§ã³ãåŠçããŸãïŒãapplicationããã£ãŒã«ãã¯äœã«ã圱é¿ããªãããã§ããã³ã¡ã³ãã®ããã§ãïŒãããã©ã«ãã§ã¯ãæŽæ°ã¯ãªãã«ãšã³ãã£ã¢ã³åœ¢åŒïŒãšã³ãã£ã¢ã³ïŒle ïŒ
以äžã¯ããã¡ã€ã«ã®è§£ææ¹æ³ãšããã®äžã«èŠã€ãã£ãããŒã¿æ§é ã®èª¬æã§ããããã¯ããseqãã»ã¯ã·ã§ã³ã®ãã£ãŒã«ãã®é åã«ãã£ãŠèšå®ãããŸãã åãã£ãŒã«ãã«ã¯idïŒããã¯è«ççã§ããããããåãã€ããŠããããšãç解ããããã«åäœããŸãïŒãšã³ã³ãã³ãã®èª¬æãå¿ èŠã§ãã ããã§ã¯ã2ã€ã®ãã¶ã€ã³ã䜿çšããŸããã
- ã¿ã€ãã®
contents: [0x18, 0, 0, 0, 0, 0, 0, 0]
ã¯ãåºå®ã³ã³ãã³ããæã€ãã£ãŒã«ããå®çŸ©ããŸãã ããã¯æ¬¡ã®ããã«æ©èœããŸããé·ãã¯ã³ã³ãã³ãããèªåçã«ç¶ããŸãããŸããKSã¯ããã®ãããªãã£ãŒã«ããèªã¿åããšãã«ãã³ã³ãã³ããäºæãããã®ãšäžèŽããªãå Žåãèªåçã«ãã§ãã¯ããŠäŸå€ãã¹ããŒããŸã -
type: u4
ã¯ãã¿ã€ããæŽæ°ç¬Šå·ãªãïŒ_u_nsignedïŒçªå·ãé·ã4ãã€ããã®ãã£ãŒã«ããå®çŸ©ããŸãã ã¡ã¿ã§æå®ãããšã³ãã£ã¢ã³ãã¹ãšåæã«ã
次ã«ãæ°ããäœæãããã©ãŒããããããžã¥ã¢ã©ã€ã¶ãŒã«ããŒãããŸãã
ksv data01.ykc ykc.ksy
data01.ykcã«è¡šç€ºãããŸãïŒ
ã¯ããããžã¥ã¢ã©ã€ã¶ãŒã¯ã³ã³ãœãŒã«ã§æ©èœããŸããããã«ãŒã®ããã«æããããšãã§ããŸãã ãããä»ãç§ãã¡ã¯æ§é ã®æšã«èå³ãæã£ãŠããŸãã
[-] [root] [.] @magic = 59 4b 43 30 30 31 00 00 [.] @magic2 = 18 00 00 00 00 00 00 00 [.] @unknown1 = 8388634 [.] @unknown2 = 4660
ããžã¥ã¢ã©ã€ã¶ãŒã§ã¯ãç¢å°ã䜿çšããŠãã£ãŒã«ãéã移åã§ããŸããTabããŒãæŒããšã16é²ãã¥ãŒã¢ãŒã«åãæ¿ããããšãã§ããŸãããŸããEnterããŒãæŒããšããã£ãŒã«ãã®å 容ã«ç§»åããã€ã³ã¹ã¿ã³ã¹ãéãïŒä»¥äžã§è©³çŽ°ã説æïŒã16é²ãã³ããå šç»é¢ã§è¡šç€ºã§ããŸã ã¹ããŒã¹ãšæéãç¯çŽããããã«ã以äžã®ããžã¥ã¢ã©ã€ã¶ãŒã®ã¹ã¯ãªãŒã³ã·ã§ããã¯è¡šç€ºãããããªãŒããã¹ãã®ããéšåã®ã¿ã衚瀺ããŸãã
data02.ykcãæ¢ããŸãïŒ
[-] [root] [.] @magic = 59 4b 43 30 30 31 00 00 [.] @magic2 = 18 00 00 00 00 00 00 00 [.] @unknown1 = 560390478 [.] @unknown2 = 28400
data03.ykcã®å ŽåïŒ
[-] [root] [.] @magic = 59 4b 43 30 30 31 00 00 [.] @magic2 = 18 00 00 00 00 00 00 00 [.] @unknown1 = 219734364 [.] @unknown2 = 58440
äžè¬çã«ã¯åããªãã ãã¡ã€ã«ã®ãã£ã¬ã¯ããªã¯ãããŸãããäžèŠãããšãããã©ããæ¢ãã®ãã¯äžæã§ãã ããã§ããããã®ãã¡ã€ã«ãã©ãã ãå æãããŠããããããäžåºŠæãåºãããããã®2ã€ã®æ°å€ã®ãããããä»ã®å Žæã®ãªã³ã¯ã«ãªãå¯èœæ§ããããã©ãããå€æããŸãã
- data01.ykc-8393294 @ unknown1 = 8388634
- data02.ykc-560418878 @ unknown1 = 560390478
- data03.ykc-219792804 @ unknown1 = 219734364
ãªããšãé©ãã¹ãé¡äŒŒç¹ã ãã®ãªãã»ããã«ãããã®ã確èªããŸãããã
meta: id: ykc application: Yuka Engine endian: le seq: - id: magic contents: ["YKC001", 0, 0] - id: magic2 contents: [0x18, 0, 0, 0, 0, 0, 0, 0] - id: unknown_ofs type: u4 - id: unknown2 type: u4 instances: unknown3: pos: unknown_ofs size-eos: true
ãã®ãunknown3ããã£ãŒã«ãã®èª¬æãè¿œå ããŸããã ä»åã¯ãseqãã»ã¯ã·ã§ã³ã§ã¯ãªãããinstancesãã»ã¯ã·ã§ã³ã«é²ã¿ãŸããã å®éããããã¯ãseqãã§èšè¿°ã§ãããã£ãŒã«ããšã»ãŒåãã§ãããé åºã¯å€ãããŸããããããããèªã¿åãå ŽæïŒãªãã»ãããã¹ããªãŒã ãªã©ïŒãæ瀺çã«ç€ºããŠããŸãã ãªãã»ããunknown_ofsïŒ pos: unknown_ofs
ïŒããå§ãŸãããã¡ã€ã«ã®æåŸãŸã§ç¶ãïŒunknown3ïŒïŒäœããããã¯ããããŸããïŒãšãããã£ãŒã«ããå¿
èŠã§ããããšã瀺ããŸããïŒ size-eos: true
ïŒã äœãããã«ããã®ãåãããªãããã«-圌ãã¯ãã ç§ãã¡ã«ãã€ãã®ã¹ããªãŒã ãèªã¿ãŸãã ã¯ãããããŸã§ã®ãšãããŸã°ãã§ããããã§ã«ãããšäžç·ã«çããããšãã§ããŸãã ç§éã¯è©Šã¿ãŸãïŒ
èªãã ãã®ã®é·ããunknown2ãã£ãŒã«ãã®å 容ãšé©ãã»ã©äŒŒãŠãããšããäºå®ã«ããã«æ³šæãåããŸãã ã€ãŸã YKCãã¡ã€ã«ã®å é ã«ã¯ãå®éã®ãã¡ã€ã«ããããŒã®ãªãã»ãããšãµã€ãºã瀺ãããŠããã ãã§ãã ãã®äºæž¬ãåæ ããããã«ãã©ãŒããããã¡ã€ã«ãä¿®æ£ããŸãã
meta: id: ykc application: Yuka Engine endian: le seq: - id: magic contents: ["YKC001", 0, 0] - id: magic2 contents: [0x18, 0, 0, 0, 0, 0, 0, 0] - id: header_ofs type: u4 - id: header_len type: u4 instances: header: pos: header_ofs size: header_len
å€æŽã¯ãã€ããŒã§ãããã¹ãŠã®äžæãªãã£ãŒã«ãã®ååãå€æŽããŠæå³ãåæ ãããsize-eosïŒtrueãïŒãã¡ã€ã«ã®æåŸãŸã§ãã¹ãŠç¡æ¡ä»¶ã«èªã¿åãïŒããsizeïŒheader_lenãã«å€æŽããŸããã ã»ãšãã©ã®å Žåãããã¯ãã®åœ¢åŒãçºæãã人ã®èšç»ãšã»ãŒäžèŽããŠããŸãã å床ããŒããããããããŒããšåŒã°ããããŒã¿ãããã¯ã«éäžããŸãã data01.ykcã®å§ãŸãã¯æ¬¡ã®ãšããã§ãã
000000: 57 e7 7f 00 0a 00 00 00 18 00 00 00 13 02 00 00 | W............... 000010: 00 00 00 00 61 e7 7f 00 0b 00 00 00 2b 02 00 00 | ....a.......+... 000020: db 2a 00 00 00 00 00 00 6c e7 7f 00 11 00 00 00 | .*......l....... 000030: 06 2d 00 00 92 16 00 00 00 00 00 00 7d e7 7f 00 | .-..........}...
data02.ykcã®å ŽåïŒ
000000: d1 2b 66 21 0c 00 00 00 18 00 00 00 5a 04 00 00 | .+f!........Z... 000010: 00 00 00 00 dd 2b 66 21 14 00 00 00 72 04 00 00 | .....+f!....r... 000020: 26 1a 00 00 00 00 00 00 f1 2b 66 21 16 00 00 00 | &........+f!.... 000030: 98 1e 00 00 a8 32 00 00 00 00 00 00 07 2c 66 21 | .....2.......,f!
data03.ykcã®å ŽåïŒ
000000: ec 30 17 0d 26 00 00 00 18 00 00 00 48 fd 00 00 | .0..&.......H... 000010: 00 00 00 00 12 31 17 0d 26 00 00 00 60 fd 00 00 | .....1..&...`... 000020: 0d 82 03 00 00 00 00 00 38 31 17 0d 26 00 00 00 | ........81..&... 000030: 6d 7f 04 00 d0 85 01 00 00 00 00 00 5e 31 17 0d | m...........^1..
äžèŠãæ確ãªãã®ã¯ãªããå
±éç¹ã¯ãããŸããã å®éãäžèŠãããšãç®ã¯ç¹°ãè¿ããããã€ãã®ã·ãŒã±ã³ã¹ã«ããã¿ã€ããŠããŸãã æåã®ãã¡ã€ã«ã§ã¯e7 7f
ã§ã2çªç®ã®2b 66
ã§ã¯3çªç®ã®30 17
ããã³31 17
ã§ãã åºå®é·ã®ç¹°ãè¿ãã¬ã³ãŒããæ±ã£ãŠããå¯èœæ§ãéåžžã«é«ãããã®é·ãã¯0x14ïŒã€ãŸã20ïŒãã€ãã§ãã ã¡ãªã¿ã«ãããã¯3ã€ã®ãã¡ã€ã«ãã¹ãŠã®ããããŒé·ãšããäžèŽããŠããŸãã4660ã28400ãããã³58440ã¯20ã§é€ç®ãããŸãããã®ä»®èª¬ããã¹ãããŠã¿ãŸãããã
meta: id: ykc application: Yuka Engine endian: le seq: - id: magic contents: ["YKC001", 0, 0] - id: magic2 contents: [0x18, 0, 0, 0, 0, 0, 0, 0] - id: header_ofs type: u4 - id: header_len type: u4 instances: header: pos: header_ofs size: header_len type: header types: header: seq: - id: entries size: 0x14 repeat: eos
ã€ã³ã¹ã¿ã³ã¹ãããããŒãã«ãªã£ããã®ã«æ³šæããŠãã ããã header_ofsã§å§ãŸããheader_lenã®é·ãã§ããã type: header
ãè¿œå ãããŸãã u4ïŒæŽæ°ïŒãšã¯ç°ãªããã«ã¹ã¿ã åã宣èšããŠäœ¿çšããããããŒãããã¯å
šäœããã®åã§è§£æãããŸãã 以äžã¯ãã¿ã€ããheaderãã®èª¬æã§ã-ãtypesïŒheaderïŒããåç
§ããŠãã ããã å€èŠ³ãšãseqããšããåèªããæšæž¬ã§ããããã«ããã¡ã€ã«ã®æé«ã¬ãã«ãšãŸã£ããåãæ§æãç¶ããŸãã ã€ãŸã æ°ããã¿ã€ãããããŒå
ã§ããããã¯ã®å
é ããé çªã«èªã¿èŸŒãŸãããã£ãŒã«ãïŒãseqãïŒãç¹å®ã®ãªãã»ããïŒãã€ã³ã¹ã¿ã³ã¹ãïŒã®ãã£ãŒã«ãããµãã¿ã€ãïŒãtypesãïŒãªã©ãèšå®ã§ããŸãã ã
ãããã£ãŠãã¿ã€ããããããŒããèšå®ããŸãããããã¯ããµã€ãºã0x14ãã€ãã®1ã€ã®ãšã³ããªãã£ãŒã«ãã§æ§æãããŠããŸãããã¹ããªãŒã ã®çµãããŸã§ã§ããã ãrepeat: eos
ãŸãïŒ repeat: eos
ïŒã ãšããã§ããã®å ŽåãããããŒãããã¯ã¯ã¹ããªãŒã ãšèŠãªãããŸããããã¯ãheader_ofsã§å§ãŸãheader_lenãã€ãã®ãããã¯ãšããŠæ瀺çã«å®£èšããŸããã ã€ãŸã 圌ã®åŸãã«äœãä»ã®ãã®ãããã°ãããã¯èªãŸããªãã§ãããããã¹ãŠã¯æŽç¶ãšããŠããŸãã
äœãèµ·ãã£ãã®ãèŠãŠã¿ãŸãããïŒ
[-] header [-] @entries (233 = 0xe9 entries) [.] 0 = 57 e7 7f 00|0a 00 00 00|18 00 00 00|13 02 00 00|00 00 00 00 [.] 1 = 61 e7 7f 00|0b 00 00 00|2b 02 00 00|db 2a 00 00|00 00 00 00 [.] 2 = 6c e7 7f 00|11 00 00 00|06 2d 00 00|92 16 00 00|00 00 00 00 [.] 3 = 7d e7 7f 00|14 00 00 00|98 43 00 00|69 25 00 00|00 00 00 00 [.] 4 = 91 e7 7f 00|15 00 00 00|01 69 00 00|d7 12 00 00|00 00 00 00 [.] 5 = a6 e7 7f 00|12 00 00 00|d8 7b 00 00|27 3f 07 00|00 00 00 00
ãŸããæªããªãã èšé²ã®äžéšã®ã³ãã¥ããã£ã¯æããã«è¿œè·¡å¯èœã§ãã ã¹ããŒãã®é¢å¿ããã2çªç®ã®ãã¡ã€ã«ãèŠãŠã¿ãŸãããã
[-] header [-] @entries (1420 = 0x58c entries) [.] 0 = d1 2b 66 21|0c 00 00 00|18 00 00 00|5a 04 00 00|00 00 00 00 [.] 1 = dd 2b 66 21|14 00 00 00|72 04 00 00|26 1a 00 00|00 00 00 00 [.] 2 = f1 2b 66 21|16 00 00 00|98 1e 00 00|a8 32 00 00|00 00 00 00 [.] 3 = 07 2c 66 21|16 00 00 00|40 51 00 00|a2 16 00 00|00 00 00 00 [.] 4 = 1d 2c 66 21|16 00 00 00|e2 67 00 00|89 c4 00 00|00 00 00 00 [.] 5 = 33 2c 66 21|16 00 00 00|6b 2c 01 00|fa f5 00 00|00 00 00 00
ã¡ãªã¿ã«ãã233ããšã1420ãã®ãšã³ããªã¯ãã¢ãŒã«ã€ãå ã®ãã¡ã€ã«ã®æ°ãšéåžžã«äŒŒãŠããŸãã æåã®ã¢ãŒã«ã€ãã¯å°ããïŒ8ã¡ã¬ãã€ãïŒã233ãã¡ã€ã«ããããã¡ã€ã«ãããå¹³å36022ãã€ããååŸãããŸãã ããã¯ãããã€ãã®ã¹ã¯ãªãããæ§æãã¹ã¯ãªãããã¡ã€ã«ãªã©ã«éåžžã«äŒŒãŠããŸãã 2çªç®ã®ã¢ãŒã«ã€ãã¯1420åã®ãã¡ã€ã«ã§æ倧ïŒ560ã¡ã¬ãã€ãïŒã§ãããã¡ã€ã«ããã394661ãã€ãã¯ãé³å£°é²é³ã®ããç»åãŸãã¯ãã¡ã€ã«ã«éåžžã«äŒŒãŠããŸãã
57 e7 7f 00
61 e7 7f 00
6c e7 7f 00
ãªã© -ããã¯æããã«å¢å ããæ°åã®ã·ãŒã±ã³ã¹ã§ããããã¯ã©ãããæå³ã§ããïŒ 2çªç®ã®ãã¡ã€ã«ã§ã¯ãããã¯ããããd1 2b 66 21
ã dd 2b 66 21
ã f1 2b 66 21
ã§ãã ãããŠãã©ããã§ãã§ã«ãããã®æ°åãèŠãŸããã ç§ãã¡ã¯ç 究ã®ãŸãã«å§ãŸããèŠãŠ-確ãã«ã ããã¯ãã¢ãŒã«ã€ããã¡ã€ã«å
šäœã®é·ãã«è¿ãã§ãã ãããã£ãŠããã¡ã€ã«å
ã®äœããžã®ãã€ã³ã¿ãåã³æå³ããŸãã å®éããããã®20ãã€ãã®ã¬ã³ãŒãã®æ§é ã«ã€ããŠã¯æ¢ã«èª¬æããŸãããã å€èŠ³ãããããã5ã€ã®æŽæ°ã§ããããšãæãããªããã§ãã å¥ã®ã¿ã€ãã®ãfile_entryãã«ã€ããŠèª¬æããŸãã ãµã€ã¬ã³ãããŒããã·ã§ã³ã§ãksyãã¡ã€ã«å
šäœãå®å
šã«ãªã¹ãããã®ã§ã¯ãªããå€æŽãããã¿ã€ãã»ã¯ã·ã§ã³ã®ã¿ããªã¹ãããŸãã
types: header: seq: - id: entries repeat: eos type: file_entry file_entry: seq: - id: unknown_ofs type: u4 - id: unknown2 type: u4 - id: unknown3 type: u4 - id: unknown4 type: u4 - id: unknown5 type: u4
æ°ãããã¶ã€ã³ã¯ãªãããã§ãã ãšã³ããªãã£ãŒã«ãã«ãã¿ã€ãããè¿œå ãããã®ã¿ã€ãã5ã€ã®é£ç¶ããæŽæ°ïŒã¿ã€ãu4ïŒãšããŠèª¬æããŸããã äœãèµ·ãã£ãã®ãèŠãŠã¿ãŸãããïŒ
[-] header [-] @entries (233 = 0xe9 entries) [-] 0 [.] @unknown_ofs = 8382295 [.] @unknown2 = 10 [.] @unknown3 = 24 [.] @unknown4 = 531 [.] @unknown5 = 0 [-] 1 [.] @unknown_ofs = 8382305 [.] @unknown2 = 11 [.] @unknown3 = 555 [.] @unknown4 = 10971 [.] @unknown5 = 0 [-] 2 [.] @unknown_ofs = 8382316 [.] @unknown2 = 17 [.] @unknown3 = 11526 [.] @unknown4 = 5778 [.] @unknown5 = 0
å¥ã®ä»®èª¬ãæµ®äžããŠããŸãïŒunknown3ã¯ã¢ãŒã«ã€ãå ã®ãã¡ã€ã«æ¬äœã®å é ãžã®ãã€ã³ã¿ãŒã§ãããunknown4ã¯ãã®é·ãã§ãã çµå±ã24 + 531 = 555ãããã³555 + 10971 = 11526ã§ãã ãããã¯ã¢ãŒã«ã€ãå ã®ãã¡ã€ã«ã§ãé çªã«ãã«ã«ãªããŸãã unknown_ofsããã³unknown2ã«ã€ããŠãåæ§ã®èŠ³å¯ãè¡ãããšãã§ããŸãïŒ8382295 + 10 = 8382305ã8382305 + 11 =8382316ãã€ãŸããunknown2ã¯ãunknown_ofsã§å§ãŸãããã€ãã®ã¬ã³ãŒãã®é·ãã§ãã unknown5ã¯ãåžžã«0ã®ããã§ãã次ã«ãåfile_entryã«ããã«2ã€ã®ãã£ãŒã«ããè¿œå ããŸããã³ã³ãã³ãïŒunknown_ofs; unknown2ïŒãèªã¿åãããã¡ã€ã«æ¬äœïŒunknown3; unknown4ïŒãèªã¿åããŸãã file_entryã®èª¬æã®ã¿ã瀺ããŸãã
file_entry: seq: - id: unknown_ofs type: u4 - id: unknown_len type: u4 - id: body_ofs type: u4 - id: body_len type: u4 - id: unknown5 type: u4 instances: unknown: pos: unknown_ofs size: unknown_len io: _root._io body: pos: body_ofs size: body_len io: _root._io
æ°ãããŠéèŠãªãã®ã®ãã¡ã io: _root._io
æ§é ã¯1ã€ã ãio: _root._io
ã ããããªãå Žåã pos: body_ofs
ãããšãã°ãçŸåšã®ã¹ã¬ããã®body_ofsã®ãªãã»ãããã«ãŠã³ãããŸãã 20ãã€ãã®file_entryã®ã¹ããªãŒã ã ãã¡ããã20åã®ãã¡800äžãã€ããèªã¿åãããšãããšãšã©ãŒã«ãªããŸãã ãããã£ãŠããã®éåžžã«ç¹å¥ãªéæ³ãå¿
èŠã§ããããã¯ãçŸåšã®ã¹ããªãŒã ããã§ã¯ãªãããã¡ã€ã«å
šäœ_root._io
察å¿ããã¹ããªãŒã ããèªã¿åãããšã_root._io
ãŸãã
äœãèµ·ãã£ãïŒ
[-] @entries (233 = 0xe9 entries) [-] 0 [.] @unknown_ofs = 8382295 [.] @unknown_len = 10 [.] @body_ofs = 24 [.] @body_len = 531 [.] @unknown5 = 0 [-] unknown = 73 74 61 72 74 2e 79 6b 73 00 [-] body = 59 4b 53 30 30 31 01 00 30 00 00 00⊠[-] 1 [.] @unknown_ofs = 8382305 [.] @unknown_len = 11 [.] @body_ofs = 555 [.] @body_len = 10971 [.] @unknown5 = 0 [-] unknown = 73 79 73 74 65 6d 2e 79 6b 67 00 [-] body = 59 4b 47 30 30 30 00 00 40 00 00 00âŠ
èçŒã§èŠãŠãã 73 74 61 72 74 2e 79 6b 73 00
ã¯ASCIIæååã§ãããcharè¡šçŸãèŠããšãçµäº0ãã€ãã®ãstart.yksãã§ããã 73 79 73 74 65 6d 2e 79 6b 67 00
ã¯ãsystem.ykgãã§ãã ãã£ããããã¯ãã¡ã€ã«åã®ããã«èŠããã ãããŠãããããæååã§ããããšã¯ç¢ºãã§ãã ãã®äºå®ãåæ ããŠã¿ãŸãããã
file_entry: seq: - id: filename_ofs type: u4 - id: filename_len type: u4 - id: body_ofs type: u4 - id: body_len type: u4 - id: unknown5 type: u4 instances: filename: pos: filename_ofs size: filename_len type: str encoding: ASCII io: _root._io body: pos: body_ofs size: body_len io: _root._io
é©æ°ã®ãã¡- type: str
ïŒãã£ããã£ããããã€ãã¯æååãšããŠè§£éãããå¿
èŠãããããšãæå³ããŸãïŒããã³encoding: ASCII
ïŒãšã³ã³ãŒããäœã§ããããŸã æ£ç¢ºã«ã¯ããããŸããã®ã§ãæãæµæã®å°ãªãçµè·¯ã«æ²¿ã£ãŠé²ã¿ãŸãïŒã ããžã¥ã¢ã©ã€ã¶ãŒã確èªããŸãã
[-] header [-] @entries (233 = 0xe9 entries) [-] 0 [.] @filename_ofs = 8382295 [.] @filename_len = 10 [.] @body_ofs = 24 [.] @body_len = 531 [.] @unknown5 = 0 [-] filename = "start.yks\x00" [-] body = 59 4b 53 30 30 31 01 00 30 00 00 00⊠[-] 1 [.] @filename_ofs = 8382305 [.] @filename_len = 11 [.] @body_ofs = 555 [.] @body_len = 10971 [.] @unknown5 = 0 [-] filename = "system.ykg\x00" [-] body = 59 4b 47 30 30 30 00 00 40 00 00 00⊠[-] 2 [.] @filename_ofs = 8382316 [.] @filename_len = 17 [.] @body_ofs = 11526 [.] @body_len = 5778 [.] @unknown5 = 0 [-] filename = "SYSTEM\\black.PNG\x00" [-] body = 89 50 4e 47 0d 0a 1a 0a 00 00 00 0dâŠ
çŸäºº å®éãããã§ãã¹ãŠã§ããæ¢ã«ã¿ã¹ã¯ãå®äºããŠããŸããããã§ãã¡ã€ã«ãæœåºã§ããŸãã ãããŠä»-ãã¹ãŠãå§ãŸã£ãéæ³ã 1ã€ã®ã¢ãŒã«ã€ããããã¹ãŠã®ãã¡ã€ã«ãã¢ã³ããŒãããã¹ã¯ãªãããäœæããŸãããã ãã®ãããããããã¹ãŠã®ãã£ãŒã«ãã®è§£æãå床èšè¿°ããå¿ èŠã¯ãããŸããã kscã³ã³ãã€ã©ãŒã䜿çšããŠã以äžãå®è¡ããŸãã
ksc -t ruby ykc.ksy
ãããŠãçŸåšã®ãã©ã«ããŒã«ã¯ãçŸããykc.rbãã¡ã€ã«ããããŸããããã¯ãã©ã€ãã©ãªã®ããã«ããã«æ¥ç¶ããŠäœ¿çšã§ããŸãã ã©ããã£ãŠïŒ ãŠã©ãŒã ã¢ããã®ããã«ãã¹ãŠã®ã¢ãŒã«ã€ããã¡ã€ã«ã®ãªã¹ãã衚瀺ããæ¹æ³ã瀺ããŸãããã
require_relative 'ykc' Ykc.from_file('data01.ykc').header.entries.each { |f| puts f.filename }
ã€ã³ã¹ãã¬ãŒã·ã§ã³ïŒ 1è¡ã ãïŒã©ã€ãã©ãªæ¥ç¶ã¯ã«ãŠã³ãããŸããïŒ-ããã§å®äºã§ãã éå§ããŠãå¥å šãªãªã¹ãã確èªããŸãã
start.yks system.ykg SYSTEM\black.PNG SYSTEM\bt_click.ogg SYSTEM\bt_select.ogg SYSTEM\config.yks SYSTEM\Confirmation.yks SYSTEM\confirmation_load.png SYSTEM\confirmation_no.ykg SYSTEM\confirmation_no_load.ykg ...
ããã§äœãèµ·ãããèŠãŠã¿ãŸãããïŒ
-
Ykc.from_file(...)
-ãã£ã¹ã¯äžã®æå®ããããã¡ã€ã«ããã¯ã©ã¹Ykcã®ãªããžã§ã¯ããçæããŸãã ãã®åœ¢åŒã§èšè¿°ãããŠãããã®ã¯ããªããžã§ã¯ãã®ãã£ãŒã«ãã«èªåçã«è§£æãããŸã -
.header
-Ykcã¯ã©ã¹ã®ãheaderããã£ãŒã«ããéžæããYkc :: Headerã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãè¿ããŸã -
.entries
ããããŒã§ãentriesããã£ãŒã«ããéžæããYkc :: FileEntryã¯ã©ã¹ã®èŠçŽ ã®é åãè¿ããŸã -
.each { |f| ... }
.each { |f| ... }
-é åã®åèŠçŽ ã§äœãããã -
puts f.filename
-fãªããžã§ã¯ãïŒã¯ã©ã¹Ykc :: FileEntryïŒã®ããã¡ã€ã«åããã£ãŒã«ãã衚瀺ããŸã
ã¢ãŒã«ã€ããããã¹ãŠã®ãã¡ã€ã«ãæœåºããã³ãŒããèšè¿°ããåã«ãããã€ãã®äºå®ã«æ³šæãæããŸãã
- ãŸãããã¹ã«ãã©ã«ããŒããããŸãã ãã®ã¢ãŒã«ã€ãã¯Windowsã·ã¹ãã ã§äœæããããã®ã§ãããããã¯ã¹ã©ãã·ã¥ïŒã\ãïŒã¯ãã¹èŠçŽ ã®åºåãèšå·ãšããŠäœ¿çšãããŸãã ã©ããã¯ããããŸããããå°ãªããšãRubyã§ã¯ãããã«ããããã¯ã¹ã©ãã·ã¥ãå«ããã©ã«ããŒãäœæãããŸãã ããããçš®é¡ã®mkdir_pãæ£ããæ©èœããã«ã¯ãã\ããã/ãã«å€æŽããå¿ èŠããããŸãã
- 第äºã«ãæåŸã®ãã¡ã€ã«åã«ã¯çµç«¯ã®0ããããŸããããã¯Cã®éãéºç£ã®ããã§ããå°å·æã«ã¯èŠããŸããããåé€ãã䟡å€ã¯ãããŸãã
- 第äžã«ãå®éã«ã¯ãåæ€ã«ãããdata02.ykcã«æ¬¡ã®ãããªãã¡ã€ã«ãããããšã瀺ãããŸããã
"SE\\00050_\x93d\x98b\x82P.ogg\x00" "SE\\00080_\x83J\x81[\x83e\x83\x93.ogg\x00" "SE\\00090_\x83`\x83\x83\x83C\x83\x80.ogg\x00" "SE\\00130_\x83h\x83\x93\x83K\x83`\x83\x83\x82Q.ogg\x00" "SE\\00160_\x91\x96\x82\xE8\x8B\x8E\x82\xE9\x82Q.ogg\x00"
ããã°ã©ããŒã¯æããã«æ¥æ¬äººã§ãããShiftJISã§ããå¯èœæ§ããããšããèšäºã®æåããã®ä»®èª¬ãæãåºããŠããšã³ã³ãŒãã£ã³ã°ããã¡ã€ã«åãããSJISãã«å€æŽãããã¡ã€ã«åã«ASCII以å€ã®æåã䜿çšããŠãã人ã®ããã«ãå°çã®ç¹å¥ãªèŒªã ksy => rbãåã³ã³ãã€ã«ããããšãå¿ããªãã§ãã ãããä»åºŠã¯ãã¹ãŠãæŽããŸããïŒ
SE\00050_é»è©±ïŒ.ogg SE\00080_ã«ãŒãã³.ogg SE\00090_ãã£ã€ã .ogg SE\00130_ãã³ã¬ãã£ïŒ.ogg SE\00160_èµ°ãå»ãïŒ.ogg
ãŸããããã¯å®å šã«æŽç¶ãšããŠããããã§ã¯ãããŸããããæ¥æ¬èªã«éåžžã«äŒŒãŠããŸãã å°ãªããšãGoogleã®ç¿»èš³è ã䜿çšãããšããé»è©±ãããé»è©±ãã§ããããSE \ 00050ããé»è©±åŒã³åºãé³ã®å¹æé³ã§ããããšã確èªã§ããŸãã
æçµçãªã¢ã³ããŒãã¹ã¯ãªããã¯æ¬¡ã®ããã«ãªããŸãã
require 'fileutils' require_relative 'ykc' EXTRACT_PATH = 'extracted' ARGV.each { |ykc_fn| Ykc.from_file(ykc_fn).header.entries.each { |f| filename = f.filename.strip.encode('UTF-8').gsub("\\", '/') dirname = File.dirname(filename) FileUtils::mkdir_p("#{EXTRACT_PATH}/#{dirname}") File.write("#{EXTRACT_PATH}/#{filename}", f.body) } }
ãã¡ããããã§ã«1è¡ã§ã¯ãããŸããããäžæ¹ã§ãããã§ã³ã¡ã³ãããç¹å¥ãªãã®ããããŸããã ã³ãã³ãã©ã€ã³åŒæ°ãããã¢ãŒã«ã€ããå«ããã¡ã€ã«ã®ååãååŸããŸãïŒ./extract-ykc * .ykcã®ãããªãã®ãå®è¡ããããšã¯ããªãå¯èœã§ã-åäœããŸãïŒããã¡ã€ã«åãf.filenameããå¿ èŠãªã¿ã€ãã«ããå¿ èŠã«å¿ããŠãã¹ã«ãã©ã«ããŒãäœæããŸãã f.body .
â , , . , png ( ), â ogg ( ). , , BG :
TA/ , . , , :
. , â yks ykg â , . â . , :)
KS:
- Kaitai Struct , , . â , , - Ruby Python: , , â . - "" 101 Hexinator â ( â ).
- Kaitai Struct â , , , , , . - okteta.
- -, , , . , . + exe-.
- ksy ( , â , , , , ), , , . â , , KS.
io: _root._io
â , . , 1.0 .
UPDATE : . , â . , , .
UPDATE 2 : , , KS â GreyCat â . .
UPDATE 3 : . gem install kaitai-struct-visualizer
.