Blizzardã®The Lost Vikingsã²ãŒã ïŒåœæã¯SiliconãšSynapseãšåŒã°ããŠããŸããïŒã¯ããªããŒã¹ãšã³ãžãã¢ãªã³ã°ãçå£ã«è©Šã¿ãŠããªãã£ãããã§ãã ãã®ã²ãŒã ã¯DOSæ代ã®çµããã«1993幎ã«ãªãªãŒã¹ãããŸããã Lost Vikingsã¯ããã¬ã€ã€ãŒãããããç¬èªã®ã¹ãã«ãæã€3ã€ã®Vikingãå¶åŸ¡ãããã©ãããã©ãŒã ããºã«ã²ãŒã ã§ãã ãŽã¡ã€ãã³ã°ã¯ãå®å®è¹ãå å²æ代ãå€ä»£ãšãžãããªã©ã®ããŸããŸãªãããã¯ã§ããºã«ã解ããã¬ãã«ãã¯ãªã¢ããããã«åãåãããå¿ èŠããããŸãã 以äžã®ç»åã¯ãã²ãŒã ã®æåã®ã¬ãã«ã瀺ããŠããŸãïŒãœãŒã¹ïŒ Strategy Wiki ïŒïŒ
ãã®ã²ãŒã ã¯ããªãç°¡åã«äœæã§ãããšæãããŸããã ã¬ãã«ã¯ã¿ã€ã«ãããã«åºã¥ããŠããããªããžã§ã¯ãã®ãªã³/ãªããåãæ¿ãããã¿ã³ãã¢ãã€ã«ããã¯ãŒããªããžã§ã¯ããæã¡äžããã¯ã¬ãŒã³ãªã©ã®ã·ã³ãã«ãªããºã«ãå«ãŸããŠããŸãã å®éããªããŒã¹ãšã³ãžãã¢ãªã³ã°ãããžã§ã¯ãã®ã»ãšãã©ã¯éåžžã«ç°¡åã§ããã ã²ãŒã ã«ã¯ããã¡ã€ã«ã®å§çž®ãããã¯ãå«ã1ã€ã®ãããããŒã¿ãã¡ã€ã«ããããŸãã ãããã¯ã¯ãã¹ãã©ã€ãããããããµãŠã³ããªã©ã®ããŸããŸãªã²ãŒã ãªãœãŒã¹ããšã³ã³ãŒãããŸãã ã²ãŒã ãªãœãŒã¹ã®è¡šç€ºã«äœ¿çšã§ãããŠãŒãã£ãªãã£ãããã€ãäœæããŸãããTheLost Vikings Toolsã§ãã
ä»®æ³ãã·ã³
ãšã³ãžã³ã®åäœã®èå³æ·±ãåŽé¢ã¯ãã²ãŒã å ã®ãªããžã§ã¯ããã¯ã©ã¹ã®ãã³ãã¬ãŒãã·ã¹ãã ã䜿çšããããšã§ãã äžçããšã«ããªããžã§ã¯ãã®ã¯ã©ã¹ã®ã»ãããå®çŸ©ãããããã¯ãããŒã¿ãã¡ã€ã«ã«ãããŸãã ããšãã°ãäžèšã®æåã®ã¬ãã«ã§ã¯ãäž¡æ¹ã®éåžžå£ãã¢ã®ã¿ã€ãã¯ã¯ã©ã¹0x4fã§ãã ãªããžã§ã¯ãã¯ã©ã¹ã®ã³ãŒãã®ãªããŒã¹ãšã³ãžãã¢ãªã³ã°ã¯ã次ã®æ©èœããããããŸããã
ã¢ãã¬ã¹0x142a2ãžã®ä»£æ¿ãã¹ãã¹ãããããéããã®ã³ãŒãã¯ãªããžã§ã¯ãã¯ã©ã¹ã®é åã®æ§é ã§ã€ã³ããã¯ã¹ãšããŠsiã䜿çšããŸãïŒåã¯ã©ã¹ãã³ãã¬ãŒãã¯0x15ãã€ãã§æ§æãããŸãïŒã ãªãã»ãã0x3ã®ã¯ãŒãã¯ãESã»ã°ã¡ã³ãã®ã¢ãã¬ã¹ãšããŠäœ¿çšãããæ§é ã§ãã ESã»ã°ã¡ã³ãã«ã¯ããªããžã§ã¯ãã¯ã©ã¹ã®ãã³ãã¬ãŒããããã¯ã®ãã¹ãŠã®ããŒã¿ãå«ãŸããŸãã 次ã«ãã³ãŒãã¯ã¢ãã¬ã¹0x142a6ã§ã«ãŒãã«å ¥ããŸãã ãã®ã«ãŒãã¯ãESã»ã°ã¡ã³ããã次ã®ãã€ããååŸãããããé¢æ°ããŒãã«ã®ã€ã³ããã¯ã¹ãšããŠäœ¿çšããŸãã ãµã€ã¯ã«ã®åã¹ãããã§ãbxã«ã¯ESã»ã°ã¡ã³ãã®ã¢ãã¬ã¹ãå«ãŸããsiã«ã¯çŸåšã®ãªãã¬ãŒã·ã§ã³ã³ãŒãïŒopcodeïŒãå«ãŸããŸãã
ã«ãŒãã¯ç¡æ¡ä»¶ãžã£ã³ãã䜿çšãããããå®äºããªãããšã«æ³šæããŠãã ããã å°ãªããšãéåžžã®ããã°ã©ã å®è¡äžã ãªããžã§ã¯ãã®åã¯ã©ã¹ã«ã¯ããªãã³ãŒãã«åºã¥ããäœããã®çš®é¡ã®é¢é£ããã°ã©ã ãããããã®é¢æ°ã«ãã£ãŠè§£éãããããã§ãã æåã¯ãåŒã³åºãããŒãã«ã®é¢æ°ã®ããã€ãã調ã¹ãŸããã IDAã°ã©ãã¢ãŒãã§æåã®ãã®ã¯æ¬¡ã®ããã«ãªããŸãã
ããã§ã®IDAã¹ã¿ãã¯ã®åæã¯å€±æããããã«ã¯çç±ããããŸãã æåã®é¢æ°ã³ãã³ããšããŠã®ãããã¢ãã¯ã¹ã¯ããªãå¥åŠãªåäœã§ãã x86åŒã³åºãã³ãã³ãã¯ã³ãã³ããã€ã³ã¿ãŒïŒipïŒãã¹ã¿ãã¯ã«ããã·ã¥ããretã³ãã³ãã¯ãããããã·ã¥ããŠåŒã³åºãé¢æ°ãè¿ããŸãã ããã®popã³ãã³ãã¯ãå®éã«ã¯æ»ãã¢ãã¬ã¹ãç Žæ£ããŸãã ããã¯ã次ã®retã³ãã³ãã1ã€ã§ã¯ãªã2ã€ã®ã¹ã¿ãã¯ãã¬ãŒã ã«æ»ãããšãæå³ããŸãã ãã®ãªãã³ãŒãã¯ãã€ã³ã¿ãŒããªã¿ãŒã®ç¡éã«ãŒããçµäºããŸãã
ãªãã³ãŒãã®å®éã®å®è£ æ¹æ³ãç解ããã«ã¯ãç·åœ¢IDAã¢ãŒãã«åãæ¿ããå¿ èŠããããŸãã
ã³ãŒãã®ãã®éšåãããç解ããããããã«ã察å¿ãããªãã³ãŒãçªå·ãšãšãã«é¢æ°åã«ã€ããŠã³ã¡ã³ãããŸããã ããã§ã¯ãã³ãŒãã®åå©çšã¯éåžžã«è³¢æã§ãã éå§ããæãç°¡åãªæ¹æ³ã¯ã0x03ãªãã³ãŒãã調ã¹ãããšã§ãã ãªãã³ãŒãã®åŠçãµã€ã¯ã«ã§ã¯ãESã»ã°ã¡ã³ãã«ããŒãããããªããžã§ã¯ãã¯ã©ã¹ã®ãããã¯ããã®ããŒã¿ããããbxã¯ä»®æ³ãã·ã³ã³ãã³ããžã®ãã€ã³ã¿ãŒãšããŠäœ¿çšãããããšãæãåºããŠãã ããã ãããã£ãŠã0x03ãªãã³ãŒãã¯ç¡æ¡ä»¶ã®ãžã£ã³ãã³ãã³ãã§ãã çŸåšã®åœä»€ãã€ã³ã¿ã®ã¢ãã¬ã¹ã«ããã¯ãŒããããŒãããããã«åœä»€ãã€ã³ã¿ãèšå®ããŠããããªãã³ãŒãåŠçãµã€ã¯ã«ã«æ»ããŸãã
éã®é åºã§åäœãã0x05ãªãã³ãŒãã¯ã次ã®ãªãã©ã³ãã¯ãŒããã¹ããããã次ã®ã¢ãã¬ã¹ãé åã«æ ŒçŽããŸãã ä»ã®é¢æ°ã®éã¯ãword_28522ããªããžã§ã¯ãã®çŸåšã®ã€ã³ã¹ã¿ã³ã¹ã®ã€ã³ããã¯ã¹ã§ããããšã瀺ããŠããŸããã€ãŸãããã®ãªãã³ãŒãã¯ãã¬ãã«ã®åãªããžã§ã¯ãã«å¯ŸããŠ1ã€ã®ã¢ãã¬ã¹ãæ ŒçŽããŸãã 次ã«ãbxã®å€ã埩å ããã³ãŒãããªãã³ãŒã0x03ïŒé·ç§»ïŒã«æž¡ããŸãã ãããã£ãŠããã®ãªãã³ãŒãã¯ãã¹ã¿ãã¯ã¬ãã«ã1ã€ã ãã®éåžžã«éå®ãããåŒã³åºãã³ãã³ãã®ããã§ãã
ãªãã³ãŒã0x00ã¯ãçŸåšã®é¢æ°ãã€ã³ã¿ãŒãã°ããŒãã«é åã«æ ŒçŽããŸãã åŒã³åºãã¢ãã¬ã¹ãªãã©ã³ãã®åŸã«ã¢ãã¬ã¹ãä¿åãã0x05ãªãã³ãŒããšã¯ç°ãªãããšã«æ³šæããŠãã ããã 次ã«ã圌ã¯ã³ãŒã«ãªãã³ãŒããã³ãã©ãŒã«é²ã¿ãŸãã ãã ããæåã®popã³ãã³ãã®ãããã³ãã³ãã¯å®è¡ãããŸããã 代ããã«ãåŒã³åºãã«ãŒããçµäºããŸãã ãã®ã³ãã³ãã§ä¿åãããã¢ãã¬ã¹ã¯ãé¢æ°åŒã³åºãã«ãŒããžã®ä»£æ¿ãšã³ããªãã¹ãšããŠäœ¿çšãããŸãããäžèšã§ã¯èæ ®ããŸããã§ããã ããã§ã0x00ãªãã³ãŒãã¯ãã³ã«ãŒãã³ãçµäºãããããªãã®ãšããŠäœ¿çšãããŸãã ããã°ã©ã å ã®çŸåšäœçœ®ãä¿åãããªãã³ãŒãåŠçãµã€ã¯ã«ãçµäºããã²ãŒã ãšã³ãžã³ãä»ã®ã¿ã¹ã¯ïŒã¹ã±ãžã¥ãŒã«ã®æŽæ°ããŠãŒã¶ãŒå ¥åã®ååŸãªã©ïŒãå®è¡ã§ããããã«ããä»®æ³ãã·ã³ããã°ã©ã ã®å ã«æ»ããŸãã ããã«ãããä»®æ³ãã·ã³ããã°ã©ã ã¯ãã²ãŒã ãšã³ãžã³ã®æ®ãã®éšåã®ããŠã³ã¿ã€ã ãªãã§è€éãªã¿ã¹ã¯ãå®è¡ã§ããŸãã
ãªãã³ãŒãã®å解
ãã®æ®µéã§ãä»®æ³ãã·ã³ã®ãªãã³ãŒããã³ãã©ãŒãã©ã®ããã«æ©èœãããã«ã€ããŠã®äžè¬çãªèãã¯æ¢ã«ãããŸããã é¢æ°åŒã³åºãã®ããŒãã«ã調ã¹ããšãããçŽ215åã®å®è£ ããããªãã³ãŒããèŠã€ãã£ããããããããçŽæ¥ãªããŒã¹ãšã³ãžãã¢ãªã³ã°ãã代ããã«ãç®çã®ã¯ã©ã¹ã®ãªããžã§ã¯ãçšã«ããã°ã©ã ãéã³ã³ãã€ã«ããç°¡åãªã¹ã¯ãªãããæžãå§ããŸããã ãããã£ãŠã第1ã¬ãã«ã®ãªããžã§ã¯ãã«ãã£ãŠåŒã³åºããããªãã³ãŒãã«ã®ã¿çŠç¹ãåœãŠãããšãã§ããŸããã
ãã®æç¹ã§ãç§ã¯äž»ã«ãªãã³ãŒããæã€ãªãã©ã³ãã®æ°ãšãã®äž»ãªã¿ã¹ã¯ã決å®ããããšããŠããŸããã ãªãã³ãŒããã³ãã©ãŒãçãã£ãå Žåãç§ã¯éåžžããããäœãããŠããããå®å šã«ææ¡ããããšããŸããã ã³ãŒãã®ãããã¯ãæ°ãããã¯ãè¶ ããå Žåã¯ããªãã©ã³ãã®æ°ãšãæ¡ä»¶ä»ããžã£ã³ããŸãã¯åŒã³åºããå®è¡ãããã©ããã確èªããããšããŸããã ãªãã³ãŒãã®ç®çããéã¢ã»ã³ãã«ãããããã°ã©ã ã®åšå²ã®ã³ã³ããã¹ãããæããã«ãªãããšãããããã§ãã
ç°¡åãªãªãã³ãŒãã®äŸã次ã«ç€ºããŸãã
ãã®ãªãã³ãŒãã¯ãªãã©ã³ãã¯ãŒããåãåãããããã°ããŒãã«å€æ°ã«æ ŒçŽããŸãã ä»ã®é¢æ°ãéã«ãããšããã®ã°ããŒãã«å€æ°ãäžæã¹ãã¬ãŒãžãŸãã¯æ±çšã¬ãžã¹ã¿ãŒã§ããããšã瀺ããŸãã ä»®æ³ãã·ã³ã«ã¯ãã®ãããªã¬ãžã¹ã¿ã¯1ã€ãããããŸãããããã®ãªãã³ãŒãããããŸãã
ãã®ãªãã³ãŒãã¯ãã¯ãŒããªãã©ã³ãã§ç€ºãããããŒã¿ã»ã°ã¡ã³ãïŒDSïŒã®ã¢ãã¬ã¹ã«æ±çšã¬ãžã¹ã¿ã®çŸåšã®å€ãæ ŒçŽããŸãã ã²ãŒã ããŒã¿ãã¡ã€ã«å ã®ããã°ã©ã ã¯ããã®ãªãã³ãŒãã䜿çšããŠããã€ãã³ã°ã€ã³ãã³ããªã¹ããããªã©ãã²ãŒã ããŒã¿ã®ç¹å®ã®éšåã«æžã蟌ã¿ãŸãã è€æ°ã®DSãªãã»ããã¯ãè€æ°ã®æéãå¿ èŠãªå Žåã®è¿œå ã®æéå€ãšããŠã䜿çšãããŸãã ããšãã°ããªãã»ãã0x0206ããã³0x0208ã¯ãå€ãã®å Žåããªããžã§ã¯ãã®æé座æšxããã³yãšããŠäœ¿çšãããŸãã
ãã®ãªãã³ãŒããšãDSããæ±çšã¬ãžã¹ã¿ãŒã«èªã¿èŸŒãå察ã®ãªãã³ãŒã0x53ã¯ãå ã®ã²ãŒã ã®äœæè ã«ãã£ãŠå²ãåœãŠããããã®ã ãã§ãªããããããã²ãŒã ããŒã¿ãDSã«èªã¿æžãã§ãããšããç¹ã§èå³æ·±ãã§ãã ããã«ãããå ã®ã²ãŒã ãæ¡å€§ããããã®èå³æ·±ãèŠéããåŸãããŸãã
ããè€éãªã®ã¯0x14ãªãã³ãŒãã§ãïŒ
äžèŠãããšããã®å転ã¯åé¡ãåŒãèµ·ãããªãã¯ãã§ãã ãã€ããªãã©ã³ããåãåãããµãé¢æ°ã®ãã¢ãåŒã³åºããŸãã 次ã«ãå¥ã®ãã€ããªãã©ã³ããåãåããåããµãé¢æ°ãå床åŒã³åºããŸãã ããããæåã®ãµãé¢æ°ïŒsub_15473ïŒãèŠããšãå°ãè€éã«ãªããŸãïŒ
IDAã¹ã¿ãã¯åæã¯åã³å€±æãããã®ãããã¯ããã®4ã€ã®åºå£ã衚瀺ãããŸããããããã¯ãã¹ãŠééã£ãŠããããåãæšãŠãŸããã å®éããããèµ·ããããšã§ããæåã®ãã€ããªãã©ã³ããaxã§ãã®é¢æ°ã«æž¡ããããžã£ã³ãããŒãã«ã®ã€ã³ããã¯ã¹ãšããŠäœ¿çšãããŸãã ANDæŒç®ã¯7ã®xã§å®è¡ãããŸãããå®éã«ã¯ããžã£ã³ãããŒãã«ã«ã¯å®éã®å€ã¯4ã€ãããããŸããã é·ç§»è¡šã®ã¿ã€ã0ãèŠããšã次ã®ããšãããããŸãã
å³å€ãªãã©ã³ãã¯ãŒããããã«ããŒããããŸãã é¢æ°ã®ãã®ãã©ã°ã¡ã³ãã¯retnã«ãã£ãŠå®è¡ãããŸããretnã¯ããããã¬ãã«ã®ãªãã³ãŒããã³ãã©ãŒ0x14ããè¿ãããŸãã IDAããã®ã³ãŒããé©åã«å解ããã®ã«åé¡ãããçç±ã¯ç°¡åã«ããããŸãã
ãžã£ã³ãããŒãã«ã®ãã®ä»ã®ãšã³ããªã¯ãããŸããŸãªæ¹æ³ã§å€ãããŒããããããããåã³ååŸãããŸãã ã¿ã€ã1ã¯ããªããžã§ã¯ããã£ãŒã«ãã®ã€ã³ããã¯ã¹ãšããŠäœ¿çšããããã€ããªãã©ã³ããåããŸãã ãªããžã§ã¯ãã«ã¯ãxããã³yãªãã»ããããã©ã°ãªã©ã®å€ã®ãã£ãŒã«ãããããŸãã ã¿ã€ã2ã¯ã¯ãŒããªãã©ã³ããåãåããDSããå€ãããŒãããŸãïŒäžèšã®äŸã®ãªãã³ãŒã0x53ãšããŠïŒã ã¿ã€ã3ã¯ããã€ããªãã©ã³ããåãåããã¿ãŒã²ãããã£ãŒã«ããããŒãããŠãè¡çªãæ€åºãããªã©ã®ã¢ã¯ã·ã§ã³ãå®è¡ããŸãã
ãããã¬ãã«ã®ãªãã³ãŒããã³ãã©ãŒ0x14ã«æ»ããŸãããã ããã§ã次ã®sub_15470ãåŒã³åºãããŸãã åŒã³åºãããæåã®ãµãé¢æ°ã®3ãã€ãå ã ãã§ãã ãããŠåã³ãã¹ããŒããªã³ãŒãæé©åããããŸãã ãã®ãµãé¢æ°ã¯ãåã«axã3ã ãå³ã«ã·ããããŠãããäžèšã§å転ããã³ãŒãã«ç§»åããŸãã ãã®ããã0x14ãªãã³ãŒãã®æåã®ãã€ããªãã©ã³ãã¯ã次ã®2ã€ã®åŒæ°ã®ååŸæ¹æ³ããšã³ã³ãŒãããããã«äœ¿çšãããŸãã 2çªç®ã®ãã€ããªãã©ã³ãã®åŠçãéã«ãããšãåãããã«æ©èœããããšã瀺ããŸãã
ãã¹ãŠã®ãªãã©ã³ãïŒå¯å€é·ïŒãåãåã£ãåŸã0x14ãªãã³ãŒããã³ãã©ãŒã¯sub_13809ãåŒã³åºããŸãã é¢æ°ã¯éåžžã«å€§ãããä»ã®å€ãã®ãµãé¢æ°ãåŒã³åºããããããã§ã¯ã³ãŒããæ¿å ¥ããŸãããåãµãé¢æ°ãèšå€§ã§ãã ããã¯ãåŸããã³ã³ããã¹ãããæããã«ãªãã®ã§ãé¢æ°ã®ã¢ã¯ã·ã§ã³ãéã«ããããšã«ç ©ããããªãã£ãã±ãŒã¹ã®1ã€ã§ãã
CISCä»®æ³ãã·ã³
The Lost Vikingsä»®æ³ãã·ã³ã®ã³ãã³ãã®é·ãã¯å¯å€ã§ãã 0x14ãªãã³ãŒãããã³ä»ã®åæ§ã®ãªãã³ãŒãã®å Žåãé·ãã決å®ããã«ã¯ããã€ãã®ãªãã©ã³ãããã³ãŒãããå¿ èŠããããŸãã å¯å€é·åœä»€ã®ååšã¯ãããã°ã©ã ãå埩çã«éã¢ã»ã³ãã«ããå°ãªããšãããã°ã©ã å ã®æ°ãããªãã³ãŒãããšã«ãªãã©ã³ãã®æ°ã決å®ããå¿ èŠãããããšãæå³ããŸãã ãã¹ãŠã®ãªãã³ãŒãã®é·ããåºå®ãããŠããå Žåãæªç¥ã®ãªãã³ãŒãã¯ã¹ããããããŸãã
å€ãã®ããã°ã©ã ã§äœ¿çšãããæšæºæäœãå®è¡ããã³ãã³ãããããŸãã ããšãã°ãå€ãã®ããã°ã©ã ã§ã¯ããªããžã§ã¯ãã®æ¹åã«åºã¥ããŠãªããžã§ã¯ãã®çŸåšã®äœçœ®ãå ç®ãŸãã¯æžç®ããŸãã ããã¯è€æ°ã®ã³ãã³ããšããŠãšã³ã³ãŒãã§ããŸããã0x91ãªãã³ãŒãã¯DSã®ãªãã»ãããšããŠåäžã®ãªãã©ã³ãã¯ãŒããåãåãããªããžã§ã¯ãã®çŸåšã®æ°Žå¹³æ¹åã«åºã¥ããŠäžæã¬ãžã¹ã¿ã®çŸåšã®å€ãå ç®ãŸãã¯æžç®ããŸãïŒãã©ã°0x0040ïŒã 次ã®æ¬äŒŒã³ãŒãã¯ã0x90ãªãã³ãŒãã®æäœã瀺ããŠããŸãã
if (this.flags & 0x0040) DS[operand] -= var; else DS[operand] += var;
ãã®ãããç¹ã«ãã®æäœã¯è€æ°ã®ããã°ã©ã ã«ãã£ãŠå®è¡ãããããããšã³ã³ãŒãã«å¿ èŠãªãã€ãæ°ã¯ã¯ããã«å°ãªããªããŸãã DOSã§ã¯ããã£ã¹ã¯ã¹ããŒã¹ãšåŠçèœåãäžè¶³ããŠãããšããããã¯éåžžã«çã«ããªã£ãŠããŸããã çŸä»£ã®ãªããŒã¹éçºè ã«ãšã£ãŠãããã¯åã«ç解ããå¿ èŠãããããã€ãã®æ°ãããªãã³ãŒããè¿œå ããã ãã§ãã
éã¢ã»ã³ãã©ãŒ
ä»®æ³ãã·ã³ããã°ã©ã ãCã«æŒ ç¶ãšäŒŒããã®ã«å解ã§ããåçŽãªPythonã¹ã¯ãªãããäœæããŸãããããã°ã©ã ã®ã³ãã³ããç·åœ¢ã«ãã³ãŒããããžã£ã³ãã¢ãã¬ã¹ãšåŒã³åºãã¢ãã¬ã¹ãä¿åããŸãã ã³ãŒãã®å®è¡ãåæ¢ãŸãã¯ãªãã€ã¬ã¯ãããé¢æ°ïŒãªã¿ãŒã³ãç¡æ¡ä»¶ãžã£ã³ããªã©ïŒã«ééãããšãããã°ã©ã å ã®ä»ã®æªèšªåã¢ãã¬ã¹ãåæ¢ããŠãã§ãã¯ããŸãã
ä»®æ³ãã·ã³ããã°ã©ã ã¯ãã²ãŒã ã®ãã€ããªã³ãŒãã§äœ¿çšããããã®ãšåæ§ã®æé©åã®ããªãã¯ã䜿çšããŸããã ããšãã°ãä»®æ³ãã·ã³ããã°ã©ã ã§ãµãããã·ãŒãžã£ãçµäºããããã€ãã®æ¹æ³ã¯ãä»ã®ãµãããã·ãŒãžã£ãããµãããã·ãŒãžã£ã«ããã²ãŒãããããšã«ããåå©çšãããŸãã éã¢ã»ã³ãã©ã¯ãåœä»€ã2åãã³ãŒãããããšã§ãããè¡ããŸãããã®ããã2ã€ã®ãµãããã·ãŒãžã£ãåãã¢ãã¬ã¹ã®ã³ãŒããæã€ããšãã§ããŸãã
éã¢ã»ã³ãã©ã¯ãäžæçãªã¬ãžã¹ã¿ã¢ã¯ã»ã¹æäœãåãæšãŠãŠãæçµçãªã³ãŒããèªã¿ãããããããšãã§ããŸãã ããšãã°ãä»®æ³ãã·ã³ããã°ã©ã ã¯ãå€ãã®å Žåã次ã®ã·ãŒã±ã³ã¹ã䜿çšããŸãã
var = 0x1000; obj->field_10 = var;
éã¢ã»ã³ãã©ãŒã¯ã次ã®ããã«åç·šæããŸãã
obj->field_10 = 0x1000;
éã¢ã»ã³ãã©ã¯ãã³ãŒããããã¯ãifãwhileãªã©ã®æ§é ã«åæ§ç¯ããããšããªããããçµæã®ããã°ã©ã ã¯ã¹ãã²ããã£ã³ãŒãã®ããã«èŠããŸãã ããã€ãã®å€§ããªããã°ã©ã èªäœã¯ããªããŒã¹éçºã®ããã®æ¬æ Œçãªãããžã§ã¯ãã«ããããšãã§ããŸãã
ãã«ããã°ã©ã
æåã®ã¬ãã«ã®å·Šäžã®éšå±ã«éãæã€å¡ã®ããã°ã©ã ããå§ããŸããïŒãªããžã§ã¯ãã¯ã©ã¹0x04ïŒã ããã¯ããªãåçŽãªããã°ã©ã ã§ããããã«æããŸããã å€§ç ²ã®ããå¡ã¯äžå®ã®ééã§ç ²åŒŸãçºå°ãããã€ãã³ã°ã¯ãããç Žå£ããããšã¯ã§ããŸããã 以äžã¯ãéã¢ã»ã³ãã©ãŒã«ããåŠçåŸã«åãåã£ãããã°ã©ã ã§ãã åãªãã³ãŒãã®äžã«ãè§æ¬åŒ§ã§å²ãŸããã¢ãã¬ã¹ãåŒçšç¬Šã§å²ãŸãããªãã³ãŒãããªãã©ã³ããç¶ãã³ã¡ã³ãããããŸãã
ã¿ã¯ãŒããã°ã©ã ã¯æ¬¡ã®ããã«ãªããŸãã
main_374d: { // [374d] (19) 37bc this.field_21 = 0x37bc; this.field_22 = 0x0001; // [3750] (97) 00 01 if (0x0001 & (1 << 0)) var = 0x0001; // [3753] (00) this.save_state(); // [3754] (9c) 18 08 if (!(var)) this.db_flags &= ~(1 << 12); label_3757: // [3757] (2f) vm_func_2f(); // [3758] (00) this.save_state(); // [3759] (01) nop(); // [375a] (51) 0000 // [375d] (8c) 30 3798 if (this.field_30 != 0x0000) call sub_3798; // [3761] (52) 1c // [3763] (77) 0000 3757 if (this.update_time != 0x0000) jump label_3757; // [3768] (19) 37c8 this.field_21 = 0x37c8; this.field_22 = 0x0001; // [376b] (52) 1e // [376d] (57) 0206 g_tmp_a = this.xoff; // [3770] (51) 0004 // [3773] (91) 0206 if (this.flags & 0x0040) g_tmp_a -= 0x0004; else g_tmp_a += 0x0004; // [3776] (52) 20 // [3778] (57) 0208 g_tmp_b = this.yoff; // [377b] (51) fff8 // [377e] (5a) 0208 g_tmp_b += 0xfff8; // [3781] (51) 001e // [3784] (56) 1c this.update_time = 0x001e; // [3786] (02) 3030 vm_func_02(0x3030); // [3789] (14) 12 0206 0208 00 0000 0000 05 new.x = g_tmp_a; new.y = g_tmp_b; new.unknown_a = 0x0000; new.unknown_b = 0x0000; new.unknown_c &= 0x801; new.type = 0x05; spawn_obj(new); // [3795] (03) 3757 jump label_3757; } sub_3798: { // [3798] (51) 000a // [379b] (73) 30 37a5 if (this.field_30 == 0x000a) jump label_37a5; // [379f] (51) 0000 // [37a2] (56) 30 this.field_30 = 0x0000; // [37a4] (06) return; label_37a5: // [37a5] (52) 32 // [37a7] (69) 0a 37ba if (this.argument < this.field_32) jump label_37ba; // [37ab] (52) 32 // [37ad] (5c) 0a this.argument -= this.field_32; // [37af] (51) 0000 // [37b2] (56) 30 this.field_30 = 0x0000; // [37b4] (51) 0000 // [37b7] (56) 32 this.field_32 = 0x0000; // [37b9] (06) return; label_37ba: // [37ba] (0e) vm_func_0e(); // [37bb] (10) this.update(); }
ããã§æ¬¡ã®ããšãããããŸãã
- é¢æ°this.save_stateïŒïŒã¯0x00ãªãã³ãŒãã§ãã çµæãšããŠäœ¿çšãããããã°ã©ã ã¯ããã眮ãããå Žæãä¿åããã²ãŒã ãšã³ãžã³ã³ãŒãã«æ»ãããšãã§ããŸãã
- ç§ã®éã¢ã»ã³ãã©ã¯ããªããžã§ã¯ãã®ããã€ãã®ãã£ãŒã«ãã«ãç§ãçºæããååãå²ãåœãŠãŸãã ãã®ããã°ã©ã ã§ã¯ãååxoffãyoffãflagsãããã³update_timeã衚瀺ãããŸãã
- æ¢ç¥ã®DSãªãã»ããã«ãååãä»ããããŠããŸãã g_tmp_aããã³g_tmp_bã¯DSãªãã»ãã0x0206ããã³0x0208ã§ãã
- ããã§ã¯ããªãã³ãŒã0x14ã䜿çšãããŸãã ã¢ããªã±ãŒã·ã§ã³ã®ã³ã³ããã¹ããããã¿ã¯ãŒã®åã·ã§ããã§æ°ãã匟䞞ãªããžã§ã¯ããäœæããããã«äœ¿çšãããããšãæããã§ãããããspawn_objïŒïŒãšããååãä»ããŸããã
- ãªãã³ãŒã0x19ã¯ããªããžã§ã¯ãã®0x21ããã³0x22ãã£ãŒã«ãã«å€ãå²ãåœãŠãŸãã å€0x21ãããã°ã©ã ã¢ãã¬ã¹ã«äŒŒãå€ã«èšå®ãããŠããããšã¯æ³šç®ã«å€ããŸãã ã³ãŒããèªãã§å®éšããŠã¿ããšããã®ã¢ãã¬ã¹ã¯ãå®éã«ã¯ãªããžã§ã¯ãã°ã©ãã£ãã¯ã¹ã®è¡šç€ºãå¶åŸ¡ããå°ããªã»ã«ã³ããªä»®æ³ãã·ã³ã®ã³ãã³ãã®ãªãã»ããã§ããããšãããããŸããã ãããŸã§ã®ãšãããç§ã¯ãã®ã³ãŒããå転ããŠããŸããã
ããã°ã©ã ã®ãªãã¡ã¯ã¿ãªã³ã°ã¯ãããã°ã©ã ã§äœãèµ·ãã£ãŠããã®ããç解ããã®ã«åœ¹ç«ã¡ãŸãã
main_374d: { /* */ this.set_graphics_prog(0x37bc); if (0x0001 & (1 << 0)) var = 0x0001; this.save_state(); if (!(var)) this.db_flags &= ~(1 << 12); label_3757: /* * . * . */ while (1) { vm_func_2f(); this.save_state(); /* * . this.argument * * . , * . */ if (this.field_30 != 0x0000) { if (this.field_30 != 0x000a) { this.field_30 = 0x0000; } else { if (this.argument < this.field_32) { vm_func_0e(); this.update(); } else { this.argument -= this.field_32; this.field_30 = 0x0000; this.field_32 = 0x0000; } } } /* update_time , */ if (this.update_time == 0x0000) { this.set_graphics_prog(0x37c8); /* */ this.update_time = 0x001e; vm_func_02(0x3030); /* * * . */ if (this.flags & OBJ_FLAG_FLIP_HORIZONTAL) new.x -= 4; else new.x += 4; new->y = this.yoff - 8; new->unknown_a = 0x0000; new->unknown_b = 0x0000; new->unknown_c &= 0x801; new->type_d = 0x05; spawn_obj(new); } } }
ããã°ã©ã ã«ã¯ãŸã ããŒããšãªãã³ãŒããããããã®ç®çã¯ç§ã決å®ããŠããŸããããã¿ã¯ãŒã®åäœã¯éåžžã«æ確ã§ããããšã«æ³šæããŠãã ããã ãªããžã§ã¯ãã®update_timeãã£ãŒã«ãã¯ãç ²å¡ã®çºå°é床ããšã³ã³ãŒãããããã«äœ¿çšãããŸãã ããã°ã©ã èªäœã¯ãã®å€ãïŒå°ãªããšãæçœãªæ¹æ³ã§ïŒæžãããŸããã ããããããã®ã¿ã¹ã¯ã¯æªç¥ã®ãªãã³ãŒãã®1ã€ãŸãã¯ã¡ã€ã³ã²ãŒã ãšã³ãžã³ã®äžéšã«ãã£ãŠå®è¡ãããŸãã
ãããã³ã°ã²ãŒã
ãã¡ãããã²ãŒã ã§äœ¿çšããããœãŒã¹ããã°ã©ã ãç 究ããæ©äŒã¯ããèªäœèå³æ·±ããã®ã§ãã ããããä»®æ³ãã·ã³ããªããžã§ã¯ãã®åäœãã©ã®ããã«å®è£ ãããã«ã€ããŠæãèå³æ·±ãã®ã¯ããªããžã§ã¯ããå€æŽããããæ°ããããã°ã©ã ãäœæã§ããããšã§ãã ã³ã³ãã€ã©ãæžããšãã£ãšç°¡åã«ãªããŸãïŒä»¥äžã§èª¬æããŸãïŒããçŸæç¹ã§ã¯16é²ãšãã£ã¿ã§å€ãæåã§ããå€æŽã§ããŸããã
ç§ã¯ç¹°ãè¿ããŸã-ããã¯éåžžã«ç°¡åãªã®ã§ãä¿®æ£ã®ããã«éãæã€ã¿ã¬ããã®ããã°ã©ã ãéžã³ãŸããã æåã«ãç§ã¯å¡ãæã£ãŠãããªããžã§ã¯ãã®ã¿ã€ããå€æŽããããšã«ããŸããã æåã¯ããŸããŸã§ããã ç·è²ã®ãšã€ãªã¢ã³ãªã©ã®1ã€ã®ãªããžã§ã¯ãã®ã·ã¥ãŒãã£ã³ã°ãå®çŸããããšãããšãã²ãŒã ã®ããã©ãŒã«ã¢ãŠãããŸãã¯ããªãŒãºãçºçããŸããã ä»ã®ãªããžã§ã¯ãã®éžæã¯ãã¿ã¯ãŒãæããªãã£ããšããäºå®ã«ã€ãªãããŸããã ç§ã¯åœŒå¥³ã«ãã¡ã€ã¢ã¢ããŒãçºå°ãããããšãã§ããŸããïŒéåžžã®ã²ãŒã ã§ã¯ãããã¯ãã€ãã³ã°ã®1人ã䜿çšã§ããããŒãã¹ã§ãïŒã ãŸããupdate_timeãã£ãŒã«ãã®å€ãå°ããããããšã«ãããéã®çºå°çãäžããããšãéåžžã«ç°¡åã§ãã
2çªç®ã®ä¿®æ£ã¯ãããå°ãéå¿çãªãã®ã«ãªããŸãããçºå°ãã代ããã«ã¿ã¯ãŒã移åãããŸããã 匟䞞ãäœæããããã®ãªãã³ãŒãïŒ0x14ïŒã¯éåžžã«é·ãã§ãã
14 12 0206 0208 00 0000 0000 05
ä»®æ³ãã·ã³ã¯ããã®ã³ãã³ãã眮ãæããããã«äœ¿çšã§ããã·ã³ã°ã«ãã€ãã³ãã³ãnopïŒ0x01ïŒïŒããã¯éåžžã«é«è²Žã§ãïŒã䜿çšããæ©èœãæäŸããŸãã äžèšã®ããŒã ã¯ãDSã®æ¹åã«å¿ããŠãã¿ã¯ãŒã®x軞ã®ãã©ã¹ãŸãã¯ãã€ãã¹4ã®çŸåšäœçœ®ã«DS [0x0206]ããã§ã«èšå®ããŠããŸãã ãããã£ãŠããã®å€ãçŸåšã®xäœçœ®ã«å²ãåœãŠãã³ãã³ããè¿œå ããã ãã§ãã ããã«ã¯2ã€ã®ããŒã ã®ã¿ãå¿ èŠã§ãã
53 0206 // var = DS[0x0206]; 56 1e // this.x = var;
ãã®å€æŽã«ãããã¿ã¯ãŒã¯ç§»åã§ããŸãããåæ¢ãããã®ã¯ãããŸããã è¡çªèªèãå®è£ ããŠåŒãè¿ããããšããŸããããé©åãªæäœãã§ããŸããã§ããã ããæ·±ããªããŒã¹ãšã³ãžãã¢ãªã³ã°ãå¿ èŠã§ãã
å€æŽã®çããããªããŸãšããŸããã
ãŸããéã¢ã»ã³ãã©ãŒããªãŒãã³ã¢ã¯ã»ã¹ã§å ¬éããŸããã
https://github.com/RyanMallon/TheLostVikingsTools/blob/master/dissassembler/lv_vm_disasm.py
ã²ãŒã ã®åã³ã³ãã€ã«
åã®ã»ã¯ã·ã§ã³ã§ã¯ãLost Vikingsã§ãªããžã§ã¯ããå®è£ ããããã«äœ¿çšãããä»®æ³ãã·ã³ã®ãªããŒã¹ãšã³ãžãã¢ãªã³ã°ã«ã€ããŠèª¬æããŸããã
以åã¯ã16é²ãšãã£ã¿ãŒã§ãœãŒã¹ããŒã¿ãããã¯ã«æåã§ããããé©çšããããšã«ãããããã€ãã®ãªãã³ãŒããçµéšçã«ãã¹ãããŠããŸããã ãã®ã¢ãããŒãã¯æ©èœããŸããããéåžžã«å調ã§ããã倧èŠæš¡ãªããã°ã©ã ãã«ãŒããé·ç§»ãå«ãããã°ã©ã ã§ã®å®éšã«ã¯ããŸãããŸãã¹ã±ãŒã«ããŸããã§ããã äžèšã§ãåçŽãªèšèªãšã³ã³ãã€ã©ãäœæããããšããä»®æ³ãã·ã³ã®ãããªããªããŒã¹ãšã³ãžãã¢ãªã³ã°ã«åœ¹ç«ã€ããšãææ¡ããŸããã ã ããç§ã¯ãããæžããã
ã³ã³ãã€ã©ã®æ§ç¯
ä»®æ³ãã·ã³ã®ééçºãšæ°ããããã°ã©ã ã®äœæã®å©äŸ¿æ§ãæ¯æŽããããã«ãã³ã³ãã€ã©ãŒãäœæããããšã«ããŸããã è€éã«ãªããªãããã«ãååž°éäžã®ã·ã³ã°ã«ãã¹æ¹åŒãéžæããŸããã
ã³ã³ãã€ã©ã®èšèšã¯ãäž»ã«PL / 0ãªã©ã®ã³ã³ãã€ã©ããåçšãããŠããŸããPL/ 0ã¯ãã³ã³ãã€ã©ã«é¢ãã倧åŠã®ã³ãŒã¹ã§ããæããããŸãïŒ PL / 0ãåç §ïŒã ã€ã³ã¿ãŒãããã«ã¯ããã«é¢ããååãªæ å ±ããããããåºæ¬çãªã³ã³ãã€ã©ã®äœæã®è©³çŽ°ã«ã¯è§ŠããŸããã æ¬è³ªçã«ãã³ã³ãã€ã©ã¯ãœãŒã¹ããã°ã©ã ãååŸããåå¥è§£æãå®è¡ããŠããŒã¯ã³ã®ã¹ããªãŒã ãäœæããããã°ã©ã ã解æããŠã³ãŒããçæããŸãã
倱ããããã€ãã³ã°C
ãªããžã§ã¯ãããã°ã©ã ãå®è£ ããããã®éåžžã«åçŽãªCã®ãããªèšèªãäœæããŸããã Cèšèªã«äŒŒãèšèªã䜿çšããå©ç¹ã®1ã€ã¯ãæ¢åã®Cããªããã»ããµã䜿çšããŠå®æ°ãšãã¯ãã®å®çŸ©ããµããŒãã§ããããšã§ãã ãã®èšèªã§ã¯å€æ°ãå®çŸ©ã§ããŸãããããã°ã©ãã¯ãä»®æ³ãã·ã³ã«ãã£ãŠå®çŸ©ããããªããžã§ã¯ãããã³ã°ããŒãã«å€æ°ã®ãã£ãŒã«ãã«å¶éãããŸãã çµã¿èŸŒã¿é¢æ°ã¯ãçµæãååŸããŠãªããžã§ã¯ããäœæããæäœã®ãªãã³ãŒããçæããããã®ãµããŒããæäŸããŸãã ãã®èšèªã¯ãåå¥è§£æãšæ§æ解æãåçŽã«ããããã«ãCãšã¯å°ãç°ãªããŸãã
ç¹°ãè¿ããŸãããããšãã°ãäžã§ä¿®æ£ãã第1ã¬ãã«ã®éãæã€å¡ã®ãªããžã§ã¯ããåãäžããŸãã 次ã®ããã«ããã¹ããã€ãã³ã°Cã«ç¢ã®å°æå¡ãå®è£ ã§ããŸãã
#include "vikings.h" #define timer field_30 #define DELAY_TIME 40 function main { call set_gfx_prog(0x37bc); this.timer = 0; while (this.timer != 0xffff) { call update_obj(); call yield(); if (this.timer != 0) { this.timer = this.timer - 1; } else { // // . if (this.flags & OBJ_FLAG_FLIP_HORIZ) { g_tmp_a = this.x - 12; } else { g_tmp_a = this.x + 12; } g_tmp_b = this.y - 12; // call set_gfx_prog(0x37c8); // call spawn_obj(g_tmp_a, g_tmp_b, 0, 0, 7); // this.timer = DELAY_TIME; } } }
åãªããžã§ã¯ãã«ã¯ãçµäºããªãã¡ã€ã³ã«ãŒããå¿ èŠã§ãã ã¡ã€ã³ã«ãŒãã¯yieldïŒïŒé¢æ°ãåŒã³åºããŠãä»®æ³ãã·ã³ã®åŠçã«ãŒããçµäºããå¿ èŠããããŸãã ããããªããšãã²ãŒã ãšã³ãžã³ãããªãŒãºããŸãã update_objïŒïŒãåŒã³åºããšããã®ååã瀺ããšããã«åäœããŸãã
å€ãã®ãªããžã§ã¯ããã£ãŒã«ãã®äœ¿çšã¯ãç¹å®ã®ãªããžã§ã¯ããæããŸãã ç§ãã¡ã®å Žåããã£ãŒã«ãfield_30ãã¿ã¬ããã®çºå°é床ãå¶åŸ¡ããã¿ã€ããŒãšããŠäœ¿çšããŸããã ã¿ã€ããŒããŒãã«éãããšãã¿ã¯ãŒãèµ·åããã¿ã€ããŒããªã»ãããããŸãã
æ®ã£ãŠããã®ã¯ããã®ããã°ã©ã ã®ã³ãŒããçæããããšã ãã§ãã
ã³ãŒãçæ
Lost Vikingsä»®æ³ãã·ã³ã¯ãåçŽãªã³ã³ãã€ã©ãŒã«ãšã£ãŠçæ³çãªç°å¢ã§ã¯ãããŸããã ã¿ã€ãPL / 0ã®ã³ã³ãã€ã©ã¯ãéåžžãæœè±¡ã¹ã¿ãã¯ãã·ã³çšã®ã³ãŒããçæããããã次ã®ãããªåçŽãªåŒã§ãã
this.x = this.y + 1;
ãã®ã³ãŒãã¯ä»¥äžãçæããŸãïŒ
push this.y ; this.y push 1 ; 1 add ; , pop this.x ; this.x
ãã ããLost Vikingsä»®æ³ãã·ã³ã«ã¯ã¹ã¿ãã¯ããããŸããã åçŽãªäžæã¬ãžã¹ã¿ããªããžã§ã¯ããã£ãŒã«ããã°ããŒãã«å€æ°ããããŸãã äžèšã®ããã°ã©ã ã¯ã次ã®ããã«Lost Vikingsä»®æ³ãã·ã³ã«å€æãããŸãã
52 20 ; var = this.y 56 1e ; this.x = var 51 0001 ; var = 0x0001 59 1e ; this.y += var
æ±çšèšèªããã³ã³ãã€ã«ããå Žåã圌女ãã³ãŒããçæããããšã¯ã¯ããã«å°é£ã§ãã æåã®ãã¹ã§äžéãã¥ãŒãçæãã2çªç®ã®ãã¹ã§ã³ãã³ãã®é åºãªã©ãå€æŽããå¿ èŠãããå ŽåããããŸãã æçµã³ãŒããçæããŸãã
æœè±¡ãã·ã³
ç§ã¯æ¬¡ã®è§£æ±ºçãèŠã€ããŸãããLostVikingsä»®æ³ãã·ã³äžã§äŸ¿å©ã«ã³ã³ãã€ã«ã§ããæœè±¡ã¹ã¿ãã¯ãã·ã³ãäœæããŸãã ããã¯ãã°ããŒãã«å€æ°ãããŒãããã³ä¿åããããã®ãªãã³ãŒãã®ãããã§å¯èœã§ãã ãããã®ãªãã³ãŒãã¯ãã²ãŒã ã®ããŒã¿ã»ã°ã¡ã³ãïŒDSïŒã®ãªãã©ã³ããšããŠãªãã»ãããåãåããŸãã ããã«ããããªãã³ãŒãã䜿çšããŠãDSã®ä»»æã®ã¢ãã¬ã¹ãããŒãããã³ä¿åã§ããŸãã
ã³ã³ãã€ã©ã¯ãããŒã¿ã»ã°ã¡ã³ãã®æäžéšïŒ0xf004ïŒã«åœã®ã¹ã¿ãã¯ãé 眮ããããšã§ã³ãŒããçæããŸãã åœã®ã¹ã¿ãã¯ã®ããŒã¹ã«ãã2ã€ã®ã¢ãã¬ã¹ã¯ãç¹æ®ã¬ãžã¹ã¿ãŒçšã«äºçŽãããŠããŸãïŒ0xf000ã¯ãŒãã¬ãžã¹ã¿ãŒã§ããã0xf002ã¯æ¯èŒã«äœ¿çšããããã©ã°ã¬ãžã¹ã¿ãŒã§ãã äžèšã®åŒã¯ã次ã®ããã«ã³ã³ãã€ã«ã§ããŸãã
52 20 ; var = this.x 57 f004 ; ds[f004] = var 51 0001 ; var = 0x0001 57 f006 ; ds[f006] = var 53 f006 ; var = ds[f006] 5a f004 ; ds[f004] += var 53 f004 ; var = ds[f004] 56 1e ; this.y = var
ããã©ãŒãã³ã¹ã¯ããã»ã©é«ããããŸãããããã®ã³ãŒãã¯éåžžã«ç°¡åã«çæã§ããŸãã ç§ã®ç®æšã¯ãå°ããªããã°ã©ã ããã¹ãããŠããªãã³ãŒããŸãã¯ãã®çµã¿åãããäœãããããå€æããããã®ã³ã³ãã€ã©ãäœæããããšã§ãã ãããŸã§ã®ãšãããæéãšã³ãŒããµã€ãºã®äž¡æ¹ã®ç¹ã§ãå¹çã«ã€ããŠã¯ããŸãå¿é ããŠããŸããã
å ã®ä»®æ³ãã·ã³çšã®èšèªãäœæããå Žåã®2çªç®ã®åé¡ã¯ãå€ãã®ãªãã³ãŒããæ¡ä»¶ä»ãé¢æ°åŒã³åºããå®è¡ããããšã§ãã ããšãã°ããªãã³ãŒã0x1aã¯ãçŸåšã®ãªããžã§ã¯ãããã€ãã³ã°ã«ééãããã©ããããã§ãã¯ããééããå ŽåãåŒã³åºãã³ãã³ããå®è¡ããŸãã ããã°ã©ããŒã¯ãåŒã³åºãã䜿çšãããé·ç§»ã䜿çšãããïŒäŸãã°ãifã䜿çšããæ§æïŒãèªåã§æ±ºå®ã§ããããšãæãŸããã§ãã
ãããå®è£ ããã«ã¯ããã©ã°ãèšå®ããŠãªã¿ãŒã³ãå®è¡ããæšæºãã«ããŒé¢æ°ã®ã³ãŒããçæããŸãã æ¡ä»¶ä»ãåŒã³åºããå®è¡ãããªãã³ãŒãã®ã³ãŒããçæãããšãæåã«ãã©ã°ã¬ãžã¹ã¿ããªã»ãããããŸãã ãªãã³ãŒããåŒã³åºããè¡ã£ãŠããå Žåããã©ã°ã¬ãžã¹ã¿ãèšå®ãããŸãã ãã®åŸããã©ã°ããã§ãã¯ããŠãžã£ã³ãåŒã³åºããè¡ãããšãã§ããŸãã ããšãã°ã次ã®ã³ãŒãïŒ
if (call collided_with_viking(0x01)) { this.x = 1; }
次ã®ã³ãŒããçæããŸãã
[c009] 51 0000 ; var = 0x0000 [c00c] 57 f002 ; ds[f002] = var, [c00f] 1a 01 c0a5 ; if (collided_with_viking(0x01)) call c0a5 [c013] 53 f002 ; var = ds[f002] [c016] 74 f000 c026 ; if (var == ds[f000]) goto c026 [c01b] 51 0001 ; var = 0x0001 [c01e] 57 f004 ; ds[f004] = var [c021] 53 f004 ; var = ds[f004] [c024] 56 1e ; this.field_x = var [c026] ... ; if ; [c0a5] 51 0001 ; var = 0x0001 [c0a8] 57 f002 ; ds[f002] = var, [c0ab] 06 ; return
ããã§ã¯ããŒãå€ã䜿çšããŠãã©ã°å€ãšæ¯èŒããŸãã åããã°ã©ã ã®éå§æã«ãã³ã³ãã€ã©ãŒã¯ãã±ãŒã¹ããŒãã«ãªã»ããããåœä»€ãçæããŸãã
ãããããã°ã©ã
åã²ãŒã ã¯ãŒã«ãã®ä»®æ³ãã·ã³ããã°ã©ã ã¯ãããŒã¿ãã¡ã€ã«ã®åå¥ã®ãããã¯ã«ãŸãšããããŠããŸãã ã³ã³ãã€ã©ã¯åçŽãªã¢ãããŒãã䜿çšããŸããçæãããã³ãŒãããããã¯ã®æåŸã«è¿œå ãããªããžã§ã¯ãã®ããã°ã©ã ããããŒãå€æŽããŠããã°ã©ã ã®ããããæãããã«ããŸãã
ããã¯ãã¹ãŠçè«çã«ã¯æ©èœããŸãããå®éã«ã¯1ã€ã®å°ããªåé¡ããããŸãã ã²ãŒã ã¯ãDOSã¡ã¢ãªå²ãåœãŠAPIã§æå®ãããå Žæã®è¿œå ã»ã°ã¡ã³ãïŒESïŒã«ä»®æ³ãã·ã³ããã°ã©ã ãæ ŒçŽããŸãã ã¡ã¢ãªå²ãåœãŠé¢æ°ã¯æ¬¡ã®ããã«ãªããŸãã
ä»®æ³ãã·ã³ã®ã¡ã¢ãªå²ãåœãŠåŒã³åºãã¯æ¬¡ã®ããã«ãªããŸãã
ã€ãŸãã0xc000ãã€ãïŒ48 KBïŒãããã°ã©ã ã«å²ãåœãŠãããŸãã åé¡ã¯ãå®å®è¹ã®äžçã®ããã°ã©ã ã®ãããã¯ããã§ã«48,972ãã€ããå æããŠããããšã§ããã€ãŸããæ°ããããã°ã©ã ã®ãããã«ã¯ãæçµçã«180ãã€ããããããŸããã éåžžã«åé·ãªã³ãŒããçæããã³ã³ãã€ã©ã䜿çšãããšãã¯ããã»ã©å€ãã¯ãããŸããã
倧ããªããã°ã©ã ãã³ã³ãã€ã«ããããšãããšãã«ããã®åé¡ãçºèŠããŸããã ã²ãŒã ã¯äžèŠåã«åäœãå§ããããã³ã°ãããããéã®ããå¡ãã©ã³ãã ã«æ¶ããŸããã ãã®ãããªãšã©ãŒã¯ãã³ã³ãã€ã©ãŸãã¯çæãããã³ãŒãã®ãã°ããªãã³ãŒãã®åäœåçã誀解ããåé¡ããŸãã¯å ã®ã²ãŒã ã®ãã°/å¶éã§ããå¯èœæ§ãããããã远跡ãéåžžã«å°é£ã§ãã
ç°¡åãªè§£æ±ºçã¯ãã²ãŒã ã®ãã€ããªã³ãŒãã«ããããé©çšããŠãããã°ã©ã ã«å²ãåœãŠãããã¡ã¢ãªã®ãµã€ãºãæ¡åŒµããããšã§ãã å²ãåœãŠããããµã€ãºã0xd000ãã€ãïŒ52 KBïŒã«å¢ãããŠãåé¡ã¯çºçãããåçŽãªããã°ã©ã ã§ã®å®éšã«ååãªã¹ããŒã¹ãäžããããŸãã ãã®ããã®ã³ãã³ããã³ã³ãã€ã©ã«è¿œå ããŸããã
çµéšçå転
ã³ã³ãã€ã©ã®ç®çã¯ãä»®æ³ãã·ã³ã®ãªããŒã¹éçºãç°¡çŽ åããããšã§ããã æ°ãããªãã³ãŒãããã¹ãããã«ã¯ãã³ãŒããžã§ãã¬ãŒã¿ãŒã¯ã©ã¹ã®é¢æ°èŸæžã«ãšã³ããªãè¿œå ãããªãã³ãŒãã®ã³ãã³ãçæé¢æ°ãäœæããå¿ èŠããããŸãã ããšãã°ãæåã®å®éšã®1ã€ã¯ãçå笊ã®ä»ãããã¿ã³/ã¢ã€ã³ã³ãªããžã§ã¯ããªã©ãããã€ãã®éã¢ã»ã³ãã«ãããããã°ã©ã ã§äœ¿çšããã0x41ã§åäœããŠããŸããã
ã³ã³ãã€ã©ã®åœŒã®èŸæžãšã³ããªã¯ãæåã¯æ¬¡ã®ããã«èŠããŸããã
"vm_func_41" : (False, 4, emit_builtin_vm_func_41),
ã¿ãã«ã¯ãé¢æ°ãå€ãè¿ããã©ãããæž¡ãããåŒæ°ã®æ°ãããã³ã³ãŒããžã§ãã¬ãŒã¿ãŒã®é¢æ°ã瀺ããŸãã ãªãã³ãŒããæ¡ä»¶ä»ãåŒã³åºããŸãã¯ãžã£ã³ããè¡ãå Žåãé¢æ°ã¯æ»ããšããŠããŒã¯ãããŸãã
IDAã§ãªãã³ãŒãã調ã¹ãåŸã0x41ãªãã³ãŒããç¡æ¡ä»¶ã«å®è¡ããã4ã€ã®åŒæ°ãåãåãããšãããããŸããã 圌ã®è°è«ã¯å¯å€åãšã³ã³ãŒãã£ã³ã°ã䜿çšããŠããŸããããã«ã€ããŠã¯ãèšäºã®åé ã§èª¬æããŸããã 次ã®é¢æ°ãçæããŸãã
def emit_builtin_vm_func_41(self, reg_list): operands = self.pack_args(reg_list, 4) self.emit(0x41, *operands)
pack_argsãã«ããŒé¢æ°ã¯ãå€æ°åã®åŒæ°ã®ããã±ãŒãžåãæäŸããŸãã
ããã§ãçããã¹ãããã°ã©ã ã§åŒã³åºãããšãã§ããŸãã ãã¹ãã«ã¯ãcollided_with_vikingé¢æ°ïŒopcode 0x1aïŒã䜿çšããããããã€ãã³ã°ãã¿ã¯ãŒã«è§Šãããšãã«ã®ã¿ãã¹ããããopcodeãéå§ãããŸãã collided_with_vikingé¢æ°ã¯1ãã€ãã®ãªãã©ã³ããåãåããŸããããã®ç®çã¯ããããŸããããå€0x01ã¯éåžžã«é©ããŠããŸãã ãŸãããªããžã§ã¯ãã®ãã£ãŒã«ããã£ãŒã«ããã£ãŒã«ãã1åéãã®ããªã¬ãŒãšããŠäœ¿çšããããããã¹ããããªãã³ãŒãã¯ããã€ãã³ã°ãæåã«ãªããžã§ã¯ãã«è§Šãããšãã«ã®ã¿æ©èœããŸãã
ç§ã®ãã¹ãããã°ã©ã ã¯æ¬¡ã®ããã«ãªããŸãã
function main { call set_gfx_prog(0x37bc); this.field_32 = 0; while (this.field_32 != 0xffff) { call update_obj(); call yield(); if (call collided_with_viking(0x01)) { if (this.field_32 == 0) { call vm_func_41(1, 1, 1, 1); this.field_32 = 1; } } } }
ãã®çµæããã®ã°ã©ãã£ãã¯ãã°ãªããã
ãã²ãŒã ã«è¡šç€ºãããŸãããªãã³ãŒãããã€ã¢ãã°ããã¯ã¹ã®è¡šç€ºã«äœ¿çšãããŠããããã§ããããã®ã°ã©ãã£ãã¯ãšã©ãŒãçºçããçç±ã¯æããã§ã¯ãããŸãããå ã®ã²ãŒã ã®éã¢ã»ã³ãã«ãããããã°ã©ã ãèŠããšãéåžžã0x41ãªãã³ãŒãã®åŸã«ââãäžæãª0xcbãªãã³ãŒããš0x42ãªãã³ãŒããç¶ããŸãããããããåŒæ°ãåãåããŸããããããã®ãªãã³ãŒãçšã®ãã¡ãŒã ãŠã§ã¢ãã³ã³ãã€ã©ã«è¿œå ããŠã²ãŒã ãåèµ·åãããšããã¿ã³ãæŒãããã®ãåŸ ã€ãã€ã¢ãã°ããã¯ã¹ã衚瀺ããããŠã£ã³ããŠãéããŸãããã®ããã0x41ãªãã³ãŒãã¯ãã€ã¢ãã°ããã¯ã¹ã衚瀺ãã0xcbãªãã³ãŒãã¯ãã¿ã³ãæŒããããŸã§åŸ æ©ãã0x42ãªãã³ãŒãã¯ãŠã£ã³ããŠãåé€ããŸãã
0x41ãªãã³ãŒãã䜿çšãããããªãå®éšã§ã¯ãæåã®åŒæ°ããã€ã¢ãã°ã©ã€ã³ã®ã€ã³ããã¯ã¹ã§ããããšã瀺ããŠããŸããè¡ã¯ã²ãŒã ã®ãã€ããªãã¡ã€ã«ã«ä¿åããããããæ¹é ã«ã¯äžäŸ¿ã§ãã 2çªç®ã®åŒæ°ã¯ãŸã äžæã§ããã3çªç®ãš4çªç®ã¯ããã€ã¢ãã°ããã¯ã¹ãéããªããžã§ã¯ãã®é£ã®ãªããžã§ã¯ãã«å¯Ÿããxãšyã®ãªãã»ãããå¶åŸ¡ããŸãã
ãã®ãããªå®éšçãªå転ãæçšã§ããçç±ã®è¯ãäŸã¯ãIDAã§èª¬æãããŠãã0xcbãªãã³ãŒãã§ãã
ãã®é¢æ°ã¯ãµã€ãºãå°ããããã®ç®çã¯æ確ã§ãïŒã°ããŒãã«å€æ°ãå€æŽããŸãïŒããã²ãŒã ãšã³ãžã³ã«ã©ã®ãããªåœ±é¿ããããã¯ãŸã£ããæããã§ã¯ãããŸãããIDAã®åã°ããŒãã«å€æ°ã®çžäºåç §ã調ã¹ãããšãããŸã圹ã«ç«ã¡ãŸããããããã®ã°ããŒãã«å€æ°ã¯ããããå€ãã®å Žæã§äœ¿çšãããŠããããããã®ç®çã§ãããã«ã¯æããã«ãªããŸããããããã®ã°ããŒãã«å€æ°ãå€æŽãããšãã²ãŒã ãšã³ãžã³ã次ã®ã²ãŒã ã«ãŒãã§ãã¿ã³ãæŒãããã®ãåŸ ã€ããã«ãªãããšãç解ããããšããŠãIDAã§å€ãã®æéãè²»ããããšãã§ããŸãããå®èšŒè©Šéšã«ãããããã¯éåžžã«è¿ éã«æããã«ãªããŸãããæ¬ ç¹ã¯ãé¢æ°å ã®åã°ããŒãã«å€æ°ã®æ£ç¢ºãªç®çããŸã ããããªãããšã§ãã
èå³æ·±ãåé
ã³ã³ãã€ã©ã§å®éšãããšãã«çºèŠããèå³æ·±ãæ©èœã®1ã€ã¯ããªããžã§ã¯ããçžäºã«åç §ããæ¹æ³ã§ããæåã®åæãããã³ãŒãå ã®ãªã³ã¯ããµããŒããããŠããããšã¯æ¢ã«ç¥ã£ãŠããŸããããã³ã³ãã€ã©ã¯è©³çŽ°ããã°ããææ¡ããã®ã«åœ¹ç«ã¡ãŸããã
åãªããžã§ã¯ãã®ãã£ãŒã«ã0x3cã¯ãçŸåšã®ã¿ãŒã²ãããªããžã§ã¯ããå®çŸ©ããŸããcollided_with_vikingïŒ0x1aïŒãªã©ã®äžéšã®ãªãã³ãŒãã¯ããã®ãã£ãŒã«ãã«å€ãèªåçã«å²ãåœãŠãŸãããæåã§æå®ããããšãã§ããŸãããã€ãã³ã°ã¯åžžã«ãªããžã§ã¯ã0ïŒBaleogïŒã1ïŒEricïŒãããã³2ïŒOlafïŒã§ããã¿ãŒã²ãããå²ãåœãŠãåŸãã¿ãŒã²ãããã£ãŒã«ããä»ããŠå¶åŸ¡ã§ããŸããåãªãã³ãŒãã«ã¯ãçŸåšã®ãªããžã§ã¯ãã®ãã£ãŒã«ãïŒã¿ãŒã²ãããã£ãŒã«ãïŒãå€æŽããããã®ç¬èªã®ãªãã·ã§ã³ããããŸããããšãã°ã0x59ãªãã³ãŒãã¯çŸåšã®ãªããžã§ã¯ãã®ãã£ãŒã«ãã«äžæã¬ãžã¹ã¿ãè¿œå ãã0x5bãªãã³ãŒãã¯ã¿ãŒã²ããã®ãã£ãŒã«ãã«äžæã¬ãžã¹ã¿ãè¿œå ããŸãã
ä»ã®ãªããžã§ã¯ãã¯ãVikingãªããžã§ã¯ãã®ãã£ãŒã«ããå¶åŸ¡ããŠåäœãå¶åŸ¡ã§ããŸããããšãã°ãVikingsã®0x32ãã£ãŒã«ãã¯äºæ³ããããã¡ãŒãžã®éã§ãããªããžã§ã¯ãã¯ãã€ãã³ã°ã«ãã¡ãŒãžãäžãããã®ãã£ãŒã«ãã«å€ãè¿œå ããŸãããã€ãã³ã°èªäœã¯ãä»®æ³ãã·ã³ã®ããã°ã©ã ã«ãã£ãŠéšåçã«å®è£ ãããŸãã次åã®ãã€ãã³ã°ããã°ã©ã ã®èµ·åæã«ãäºæ³ãããæå·ãã£ãŒã«ãããã§ãã¯ãã察å¿ããæå·ãåŠçããŸãã
ãŸããxãšyã®ãã¹ãŠã®ãªããžã§ã¯ãã®é床ã§ãã0x12ãš0x14ãéèŠã§ããã³ã³ãã€ã©ãæžãåã«ããªããžã§ã¯ãã¯ãã£ãŒã«ãããxããã³yãªãã»ãããã£ãŒã«ãïŒ0x1eããã³0x20ïŒãå ç®/æžç®ãããããŸãã¯ãªãã³ãŒãã«äŒŒãé¢æ°ã䜿çšããããšã§ç§»åããããšèããŸããããã ããã²ãŒã ã¯ããã€ãã®é床ãã£ãŒã«ãã䜿çšããŸãããã€ãã³ã°ãªã©ã®äžéšã®ãªããžã§ã¯ãã¯ãé床ãèªåçã«å€æŽããŸãããããã£ãŠãããšãã°ããªããžã§ã¯ãããã€ãã³ã°ã«é床ãå²ãåœãŠãŠäžããå Žåããã®åŸã®ã²ãŒã ãµã€ã¯ã«ã§ãã€ãã³ã°ã¯ããã«å¿ããŠé床ãå€æŽããåã³äœäžããŸãã
ãã€ãã³ã°ãªããžã§ã¯ãã«ã¯ãã¹ãŠãä¿åããã®ã«ååãªãã£ãŒã«ãããªãããã4ã€ã®ãã€ãã³ã°ã€ã³ãã³ããªã¹ãããã¯ããããã°ããŒãã«å€æ°ã§ãããªããžã§ã¯ãã¯ã察å¿ããã°ããŒãã«å€æ°ããŒãã«çãããã©ããã確èªããå€ãã€ã³ãã³ããªã¹ãããã®ã°ããŒãã«å€æ°ã«çŽæ¥å²ãåœãŠãããšã«ããããã€ãã³ã°ã«ã¢ã€ãã ãäžããããšãã§ããŸãã
é«åºŠãªãããã³ã°ã²ãŒã
ä»®æ³ãã·ã³ã§å®éšãããã®æè»æ§ãå®èšŒããããã«ã第1ã¬ãã«ã®éãåããã¿ã¯ãŒçšã®ããå°ãè€éãªããã°ã©ã ãäœæããŸãããã¿ã¯ãŒã¯ãã©ã®ãã€ãã³ã°ãããã«è§Šãããããã§ãã¯ããç°ãªãåå¿ãããŸãããšãªãã¯ãå¡ã«è§Šãããšã圌女ã¯åœŒã«ã¢ã€ãã ãæž¡ããŸãããªã©ãã觊ãããšã圌ã¯ç©ºäžã«æŒãåºãããŸãããã¬ãªã°ã«é¢ããŠã¯ãã¿ã¯ãŒã®æ¹åãå€ãããŸããå®éã®åäœã¯æ¬¡ã®ãšããã§ãã
90幎代ååã«äœæãããã²ãŒã ã®ãã®ã¬ãã«ã®æè»æ§ã¯ãéåžžã«å°è±¡çã§ãããã®ããã°ã©ã ã®ãœãŒã¹ã³ãŒããã³ã³ãã€ã©ã®ãµã³ãã«ãã©ã«ããŒã«è¿œå ããŸããã
æªæ¥ã®ããã«åã
ãªãã³ãŒãããã£ãŒã«ããã°ããŒãã«å€æ°ã¯ãŸã ãããããããŸããããã®ç®çã¯ç§ã«ã¯ããããŸãããããšãã°ãã³ã³ãã€ã©ã«ã¯ããã€ãã®é¢æ°ããããŸããããæ¯èŒæŒç®å==ããã³ïŒ=ã®ã¿ããµããŒãããŠããŸãããã»ãšãã©ã®ãããæŒç®åã¯å«ãŸããŠããŸãããå ã®ããã°ã©ã ã®ãããã¯ãã²ãŒã ããŒã¿ãã¡ã€ã«ããåå¥ã«ã¢ã³ããã¯ããããŒã¿ãã¡ã€ã«ã«ããããé©çšããŠåããã¯ããå¿ èŠããããããäœæ¥ãå°ãé¢åã§ãã
ãã¹ãŠã®ããŒã«ã¯ãããªãã¯ãã¡ã€ã³ïŒãããªãã¯ãã¡ã€ã³ïŒã§ããããã®ãªãŒãã³ãœãŒã¹ã³ãŒãã¯githubïŒhttps://github.com/RyanMallon/TheLostVikingsToolsïŒã«æçš¿ãããŠããŸãã
Old School BlizzardïŒã¹ãã©ã€ããããããããã³ãã¬ãã
ç§ã¯2ã€ã®åæã®Blizzard DOSã²ãŒã ãThe Lost VikingsãšBlackthorneããªããŒã¹ãšã³ãžãã¢ãªã³ã°ããŠããŸãããäžèšã§ã¯ãThe Lost Vikingsã§ã²ãŒã ãªããžã§ã¯ããå®è£ ããããã«äœ¿çšãããä»®æ³ãã·ã³ã«ã€ããŠæžããŸãããBlizzardã¯ãThe Lost VikingsãšBlackthorneãBattle.netã§ç¡æã§å ¬éããŸãããBlizzardãSilicon and Synapseãšããååã§The Lost Vikingsãå«ã圌女ã®åæã®ã²ãŒã ãäœæããããšã¯æ³šç®ã«å€ããŸããBlackthorneã¯Blizzardãã©ã³ãã§ãªãªãŒã¹ãããæåã®ã²ãŒã ã§ããã
ãã®ã»ã¯ã·ã§ã³ã§ã¯ã2ã€ã®ã²ãŒã ã§ã¹ãã©ã€ã圢åŒãšã¿ã€ã«ãšã³ãžã³ãå®è£ ããæ¹æ³ã«ã€ããŠèª¬æããŸãããããã®2ã€ã®ã²ãŒã ã¯éåžžã«ãã䌌ããšã³ãžã³ãåããŠãããThe Lost Vikingsã®åŸã«Blackthorneã«ããã€ãã®æ¹è¯ãå ããããŠããŸããå°æ¥çã«ã¯ãäž¡æ¹ã®ã²ãŒã ã®ã²ãŒã ãšã³ãžã³ããããªã¶ãŒããšã³ãžã³ããšåŒã³ãŸãã
ã²ãŒã ã¯ããã¹ãŠã®ããŒã¿ãDATA.DATãšããåäžã®ãããããŒã¿ãã¡ã€ã«ã«ä¿åããŸããããããã¡ã€ã«ã¯ãã¹ãã©ã€ããã¬ãã«ããµãŠã³ããªã©ã®ãããã¯ãå«ãã¢ãŒã«ã€ãã§ããã»ãšãã©ã®ããããã¡ã€ã«ãããã¯ã¯ãLZSSå§çž®ã¢ã«ãŽãªãºã ã®ããªãšãŒã·ã§ã³ã§å§çž®ãããŠããŸãã
ã¹ãã©ã€ããã¬ãã«ãªã©ã衚瀺ããããã«äœ¿çšã§ããããã€ãã®ç°¡åãªãŠãŒãã£ãªãã£ãäœæããŸããããã¹ããã€ãã³ã°ãšãã©ãã¯ãœãŒã³ããããããã®ãŠãŒãã£ãªãã£ã¯ãGitHubïŒäžèšã®ãªã³ã¯ïŒããããŠã³ããŒãã§ããŸãããã®ã»ã¯ã·ã§ã³ã«ã³ãŒãäŸãè¿œå ããŸããããã®ã»ã¯ã·ã§ã³ã®ãã¹ãŠã®ã¹ã¯ãªãŒã³ã·ã§ããã¯ããããã®ãŠãŒãã£ãªãã£ã䜿çšããŠäœæãããŸããã
./sprite_view DATA.DAT -fraw -s -u -w344 -p 0x17b 0x17c ./level_view --blackthorne DATA.DAT 1 -h0x6e
ã°ã©ãã£ãã¯ã¢ãŒã
ã©ã¡ãã®ã²ãŒã ããäžè¬çãªVGAã¢ãŒãXã¢ãŒãã䜿çšããŸãã¢ãŒãXã¯ã解å床320Ã240ã®256è²ã®å¹³é¢ã°ã©ãã£ãã¯ã¢ãŒãã§ããããã©ããããšã¯ã解å床320Ã200ã®VGAã¢ãŒã13hã®ããã«ãã¯ã»ã«ãçŽç·çã«é 眮ãã代ããã«ãäžé£ã®ãã¬ãŒã³ã«åå²ããããšãæå³ããŸãããã©ããã°ã©ãã£ãã¯ã¹ã¯å ã ãã°ã©ãã£ãã¯ã¹åŠçãé«éåããããã«èšèšãããŸãããããã«ãããè€æ°ã®ã¡ã¢ãªããããå¥ã ã®ãã¬ãŒã³ãä¿åãããããã䞊è¡ããŠéä¿¡ã§ããŸããShikadi.netã®ãã®èšäºã¯ããã©ãããªã°ã©ãã£ãã¯ã¹ãã©ã®ããã«æ©èœãããã«ã€ããŠã®è¯ã説æãããŠããŸãã
ã¢ãŒãXã¯4ã€ã®å¹³é¢ã䜿çšããŸããæåã®ãã¬ãŒã³ã«ã¯ããã¯ã»ã«0ã4ã8ãªã©ãæ ŒçŽãããŸãã2çªç®ã®ãã¬ãŒã³ã«ã¯ããã¯ã»ã«1ã5ã9ãªã©ãæ ŒçŽãããŸãããã®ããã8Ã2ã¹ãã©ã€ãã¯ãã¯ã»ã«ã®ããã«çŽç·çã«ä¿åãããŸããã
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
ãã©ããã¢ãŒãã¢ãŒãXã¯ããããã次ã®ããã«ä¿åããŸãã
0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15
åºæ¬çã«ã¹ãã©ã€ã圢åŒã®éã®éçºãè¡ããIDAã®ã¬ã³ããªã³ã°ã³ãŒãã§ã¯ãªããããããã¡ã€ã«ã®ãããã¯å ã®ããŒã¿ã調ã¹ãŸãããç§ã¯DOSãšVGAã®ããã°ã©ãã³ã°ã«ã€ããŠéåžžã«åæ©çãªç解ããããå€ãã²ãŒã ã®ã¬ã³ããªã³ã°ã³ãŒãã«ã¯éåžžãã¢ã»ã³ãã©ãŒã®æé©åãšå·§åŠãªã¢ããªã±ãŒã·ã§ã³ã®ããã®å€ãã®ããªãã¯ãå«ãŸããŠããŸããããããã¯ç解ããã®ãå°é£ã§ãã
çã®ã¹ãã©ã€ã圢åŒ
ã²ãŒã ã§äœ¿çšãããæåã®ã¹ãã©ã€ã圢åŒã¯ãåçŽã«çã®ãšã³ã³ãŒããããå¹³é¢ããŒã¿ã§ããçã®ã¹ãã©ã€ãã¯ã4ã§å²ãåããå¹ ãšé«ããæã€ããšãã§ããŸããçã®ã¹ãã©ã€ãã®æç»ã¯ç°¡åã§ãïŒ
for (plane = 0; plane < 4; plane++) { for (i = 0; i < (sprite_width * sprite_height) / 4; i++) { offset = (i * 4) + plane; y = offset / sprite_width; x = offset % sprite_width; pixel = *sprite++; dst[((dst_y + y) * dst_width) + (dst_x + x)] = pixel; } }
ããã«ãéæãšããŠäœ¿çšãããè²ã®ã€ã³ããã¯ã¹ãéžæã§ããŸããåãå¹ ãšé«ãã®çã®ã¹ãã©ã€ãã¯åžžã«åãéã®ããŒã¿ãæã¡ãŸããããã®å Žæãéåžžã«å¹ççã«äœ¿çšããŸãããããã¯ãBlizzardã²ãŒã ãšã³ãžã³ã®å Žåã«ç¹ã«åœãŠã¯ãŸããŸããã¹ãã©ã€ãã¯16è²ïŒåžžã«0x0ã0xfã®å€ïŒãã䜿çšããªãããããã¯ã»ã«ããã4ãã€ããç¡é§ã«ãªã£ãŠããããã§ããã¹ãã©ã€ãããšã«16è²ã䜿çšãããã®ã¯ã以äžã§èª¬æããããªãããŒãªãã¬ããããªãã¯ãé©çšã§ããããã§ãã
ããã¯ãããŠããªãã¹ãã©ã€ã/ãã¹ã¯ä»ãã¹ãã©ã€ãã®åœ¢åŒ
2çªç®ã®ã¹ãã©ã€ã圢åŒã§ã¯ãã«ã©ãŒã€ã³ããã¯ã¹ãç ç²ã«ããããšãªãéæ床ã䜿çšã§ããŸãããäŸ¡æ Œã¯ããè€éãªã¬ã³ããªã³ã°ã¢ã«ãŽãªãºã ã§ãããããŒã¿ãµã€ãºããããã«å€§ãããªããŸããç§ãéçºãããŠãŒãã£ãªãã£ã§ã¯ããã®ãã©ãŒãããããã¢ã³ããã¯ããšåŒã³ãŸããããããã¹ã¯ä»ãããšåŒã¶æ¹ãè¯ããããããŸããã
ãã®ã¹ãã©ã€ã圢åŒã§ã¯ã8ãã¯ã»ã«ã®åã»ããã®åã«ãæç»ãããã¯ã»ã«ã瀺ããã¹ã¯ãã€ãããããŸããéæãªãã¯ã»ã«ã¯0x0ã®å€ã§ãšã³ã³ãŒããããŸãããã¬ã³ããªã³ã°äžã¯ã¹ããããããŸããããã«ãããè£è²ãšããŠã«ã©ãŒã€ã³ããã¯ã¹0x0ã䜿çšã§ããŸãã
ãã®ãããªã¹ãã©ã€ããã¬ã³ããªã³ã°ããããã®ã¢ã«ãŽãªãºã ã¯æ¬¡ã®ãšããã§ãã
for (plane = 0; plane < 4; plane++) { x = plane; y = 0; for (i = 0; i < (sprite_width * sprite_height) / 4 / 8; i++) { mask = *sprite++; for (bit = 7; bit >= 0; bit--) { pixel = *sprite++; if (mask & (1 << bit)) dst[((dst_y + y) * dst_width) + (dst_x + x)] = pixel; x += 4; if (x >= sprite_width) { y++; x = plane; } } } }
Lost Vikingsã®ããŸããŸãªåéåã¯ã16Ã16ã®ãã¹ã¯ãä»ããããã¯ãããŠããªãã¹ãã©ã€ã/ã¹ãã©ã€ãã§ãã以äžã䜿çšããŠè¡šç€ºã§ããŸãã
./sprite_view DATA.DAT -l2 -funpacked -w16 -h16 0x12f
ããã¯ãã¹ãã©ã€ã32Ã32
åŸè ã®ã¹ãã©ã€ã圢åŒã¯The Lost Vikingsã§ã®ã¿äœ¿çšããã32Ã32ã¹ãã©ã€ãã®ã¬ã³ããªã³ã°ã«æé©åãããŠããŸããã¢ã³ããã¯åœ¢åŒãšåæ§ã«ãåãã¯ã»ã«ã»ããã®åã«ã¯ãæç»ãããã¯ã»ã«ãå®çŸ©ãããã¹ã¯ãã€ãããããŸãããã ããããã¯åœ¢åŒã§ã¯éæãã¯ã»ã«ãä¿åãããã16ãã€ãã®ã¿ã䜿çšããããããåãã€ãã«2ãã¯ã»ã«ãããã¯ãããŸããã¬ã³ããªã³ã°ããããã¯ã»ã«ã®æ°ãå¥æ°ã®å ŽåãæåŸã®ããã«ã¯ãŒãã§ãã
ãã®åœ¢åŒã¯ãåã®2ã€ãããå¹ççã«ã¹ããŒã¹ã䜿çšããŸãããããè€éãªã¬ã³ããªã³ã°ã¢ã«ãŽãªãºã ãšå¯å€é·ã®ã¹ãã©ã€ãã䜿çšããŸããããã±ãŒãžåœ¢åŒã®ã¹ãã©ã€ããå«ãããããã¡ã€ã«ã®ãããã¯ã¯ãåã¹ãã©ã€ãã®ãªãã»ãããå®çŸ©ãã16ãããããããŒã§å§ãŸããŸãã
ããã¯ãããã¹ãã©ã€ããã¬ã³ããªã³ã°ããããã®ã¢ã«ãŽãªãºã ã¯æ¬¡ã®ãšããã§ãã
for (plane = 0; plane < 4; plane++) { for (y = 0; y < 32; y++) { num_pixels = 0; mask = *sprite++; for (bit = 7; bit >= 0; bit--) { if (mask & (1 << bit)) { pixel = *sprite; if (num_pixels & 1) sprite++; else pixel >>= 4; pixel &= 0xf; x = ((7 - bit) * 4) + plane; dst[((dst_y + y) * dst_width) + (dst_x + x)] = pixel; num_pixels++; } } if (num_pixels & 1) sprite++; } }
æçš¿ãæžãéçšã§ãThe Lost Vikingsã®ç¬¬2ã¬ãã«ã®èŠåºãã«æ¬¡ã®ã¹ãã©ã€ããèŠã€ããŸãããããã¯ããã32Ã32圢åŒã䜿çšããŸãããã²ãŒã ã§èŠãã®ãèŠããŠããŸããã誰ããç¥ã£ãŠãããããããŸããããããã¯ç§å¯ã®ãªãœãŒã¹ãŸãã¯æªäœ¿çšã®ãªãœãŒã¹ã§ããïŒæ¬¡ã®ããã«è¡šç€ºã§ããŸãã
./sprite_view DATA.DAT -l2 -fpacked32 0xec -b0x10
è€æ°ã®ã¹ãã©ã€ã圢åŒã䜿çšããçç±
ãã®è³ªåã«å¯Ÿããæ£ç¢ºãªçãã¯ãããŸãããç§ã¯ãVGAãæé©åããããã®è€éãªããã°ã©ãã³ã°ã®å°é家ã§ã¯ãããŸããããããããããŸããŸãªãã©ãŒãããã䜿çšãããŠãã¹ãã©ã€ãã®ã¬ã³ããªã³ã°é床ãåäžããŸããããã«ã¯ãç°ãªããªãã¬ãã·ã¥ã¬ãŒããå¿ èŠã§ããã«ãŒãã®ã¿ã€ã«ã«ã¯ãåžžã«ãçã®ã圢åŒããããŸããçã®ãã©ãŒãããã¯ãäžéšã®ã€ã³ã¿ãŒãã§ã€ã¹ã¹ãã©ã€ãã«ã䜿çšãããŸããããã¯ããã32Ã32圢åŒã®ã¹ãã©ã€ãã¯ãã€ãã³ã°ã§ãããå€ãã®æµã§ããã¢ã³ããã¯åœ¢åŒã¯ãéãæã£ãå¡ããã®ä»ã®ãªããžã§ã¯ãïŒã¹ã€ããããšã¬ããŒã¿ãŒãªã©ïŒãªã©ãåãã®åŒ±ãæµã«äœ¿çšãããŸãã
Blackthorneã¯32x32ããã¯åœ¢åŒããŸã£ãã䜿çšããŠããªãããã§ãããããããå€ãã®ãã©ãã¯ãœãŒã³ã¹ãã©ã€ãã32Ã32ãã倧ããããã§ãã詳现ãªã¢ãã¡ãŒã·ã§ã³ãæã€ã»ãšãã©ã®ã¹ãã©ã€ãã¯ãçã®åœ¢åŒã䜿çšããŸãããã©ãã¯ãœãŒã³ã«ã¯ã¹ã¯ããŒã«ã¬ãã«ããªãïŒå ã®ããªã³ã¹ãªããã«ã·ã£ã®ããã«ïŒãã¬ã³ããªã³ã°ãé«éåããŸãã
ç§ã¯å¥ã®è³ªåãç解ããŠããŸããã§ããïŒBlizzardãšã³ãžã³ã¯ãåãªããžã§ã¯ãã®æç»ã«äœ¿çšãããã¹ãã©ã€ãã®åœ¢åŒãšãµã€ãºãã©ã®ããã«ç解ããŸããïŒã¬ãã«ã®èŠåºãã«ã¯éšåçãªé¢é£æ å ±ãå«ãŸããŠããŸããããã¹ãŠã®ãªããžã§ã¯ããæ£ããã¬ã³ããªã³ã°ããã«ã¯äžååã§ãããããã®ã¬ã³ããªã³ã°æ å ±ã¯ä»®æ³ãã·ã³ã«ãã£ãŠç®¡çãããŠãããšæãããŸãã
ã¹ãã©ã€ãã®ã¬ã€ã¢ãŠã
åè¿°ããããã«ãBlackthorneã¯The Lost Vikingsããã倧ããªã¹ãã©ã€ãã䜿çšããŸããä»»æã®ãµã€ãºã®çã®ã¹ãã©ã€ããã¬ã³ããªã³ã°ããã¢ã«ãŽãªãºã ãäœæã§ãããšããäºå®ã«ãããããããããªã¶ãŒããšã³ãžã³ã¯ç°ãªãã¢ãããŒããæ¡çšããŠããŸãã倧ããªã¹ãã©ã€ãã¯ãå€æŽãããŠããªããã¿ãŒã³ã§ããã€ãã®å°ããªã¹ãã©ã€ããçµã¿åãããããšã«ããã¬ã³ããªã³ã°ãããŸããããšãã°ãBlackthorneã®ã¡ã€ã³ãã£ã©ã¯ã¿ãŒã¯ãé éšã«2ã€ã®16Ã16ã¹ãã©ã€ãã身äœã«1ã€ã®32Ã32ã¹ãã©ã€ãããæã32Ã48ã¹ãã©ã€ãã
䜿çšããŸããã²ãŒã ã§ã¯éæè²ãšèŠãªãããŸãããã©ãã¯ãœãŒã³ãã£ã©ã¯ã¿ãŒã¹ãã©ã€ãã®ã»ããå šäœã¯ã次ã®ããã«è¡šç€ºã§ããŸãã
./sprite_view --blackthorne DATA.DAT -fraw -w32 -h48 -l2 -b0x80 0x42
ãããããã®ã¢ãããŒããéžæãããã®ã¯ãBlizzardéçºè ã16Ã16ããã³32Ã32ã¹ãã©ã€ãçšã«æé©åãããã¬ã³ããªã³ã°ãµã€ã¯ã«ããã§ã«äœæããŠããã倧ããªã¹ãã©ã€ãã倧ããªãã®ãšããŠã§ã¯ãªãå°ããªãã®ãšããŠã¬ã³ããªã³ã°ããæ¹ãé«éã ã£ãããã§ãã
ã¿ã€ã«ã«ãŒãã¬ãã«
The Lost VikingsãšBlackthorneã®äž¡æ¹ã§ãã¬ãã«ã¯16Ã16ã¿ã€ã«ã®ã¿ã€ã«ãããããäœæãããŸãïŒèè ã¯ãã®æèŠãé²ãããã«äž¡æ¹ã®ã²ãŒã ã§æžåœã«åªåããããã«æããŸããïŒãã¿ã€ã«ã«äœ¿çšãããã¹ãã©ã€ãã®ãµã€ãºã¯ãå®éã«ã¯8Ã8ã§ããåã¿ã€ã«ã«ã¯ãããã¬ããããšåŒã°ããæ§é ãå«ãŸããŠããŸãã16Ã16ã¿ã€ã«ãã8Ã8ã¹ãã©ã€ãã®ã»ãããäœæããæ¹æ³ãå®çŸ©ããŸããã³ã³ããŒãã³ãã®åéšåãæ°Žå¹³/åçŽã«å転ãããããšãã§ãããããããŸããŸãªå Žæã§ã³ã³ããŒãã³ãã¿ã€ã«ã䜿çšã§ããŸãã
ããšãã°ãThe Lost Vikingsã®æåã®ã¬ãã«ã®ã¿ã€ã«ã®å®å šãªã»ããïŒã¿ã€ã«ã»ããïŒã«ã¯ããã©ãŒããŒãžã§ã³ã®é段ãªã©ã®ããã€ãã®ã¿ã€ã«ãšãåãã³ãŒããŒãã©ã°ã¡ã³ããè€æ°å䜿çšããå€ãã®ã¿ã€ã«ïŒãªãããä»ãã®éãããã«ãªã©ïŒããããŸãã
ãã®äžé£ã®ã¿ã€ã«ã¯æ¬¡ã®ããã«è¡šç€ºã§ããŸãã
./tileset_view DATA.DAT 1
ããããã¡ã€ã«ã«ã¯ãã¿ã€ã«ã®ã»ããããšã«ãã¯ãŒã¯ããŒã¹ãèšè¿°ãããããã¯ãå«ãŸããŠããŸããåã¯ãŒã¯ããŒã¹ã®é·ãã¯8ãã€ãã§ãåã¿ã€ã«ã¯16ãããå€ãšããŠãšã³ã³ãŒããããŸããå16ãããå€ã«ã€ããŠãã¹ãã©ã€ãã€ã³ããã¯ã¹ã¯10ãããå€ãšããŠãšã³ã³ãŒããããæ®ãã®6ãããã¯ãã©ã°ãšããŠäœ¿çšãããŸãããã©ã°ã¯ãã¹ãã©ã€ãã®åçŽããã³/ãŸãã¯æ°Žå¹³ãã©ãŒãªã³ã°ãããã³ãã®ã¿ã€ã«ã³ã³ããŒãã³ãã®å ŽæïŒæ£é¢ãŸãã¯èæ¯ïŒã決å®ããŸããã¯ãŒã¯ããŒã¹ã®ããã³ã/ããã¯ã°ã©ãŠã³ããããã®ã³ãŒãã£ã³ã°ã«ãããBlizzardãšã³ãžã³ã¯å ±éã®ã¿ã€ã«ãããã䜿çšããŠäž¡æ¹ã®ã¬ã€ã€ãŒãã¬ã³ããªã³ã°ã§ããŸãã
Blackthoneã¯ããšã³ãžã³ã§ã®ã¯ãŒã¯ã®äœ¿çšã2ã€ã®æ¹æ³ã§æ¡å€§ããŸãããŸãã3ã€ã®æªäœ¿çšãã©ã°ããããã«ã©ãŒããŒã¹ãšããŠäœ¿çšãããŸãã Lost Vikingsã¯ããã¹ãŠã®ãããã¿ã€ã«ã«16è²ã®ã¿ãæ·»ä»ããŸããã«ã©ãŒããŒã¹ã«ããããè¿œå ããããšã«ãããBlackthorneã¯ã¿ã€ã«ã«128è²ã䜿çšã§ããŸãããåã ã®ã³ã³ããŒãã³ãã®ã¹ãã©ã€ãã¯ãŸã 16è²ã«å¶éãããŠããŸãã
次ã«ãBlackthorneã¯ãããã«èæ¯ã¬ã€ã€ãŒãè¿œå ããŸãããããã«ãããã²ãŒã ã¯ããã詳现ãªèæ¯ãšãåã®ã¿ã€ã«ã®ééãã空ãç §ããããšãã§ããŸããç°¡åã«ããããã«ãã»ã«ã³ããªèæ¯ã¬ã€ã€ãŒã空ã®ã¬ã€ã€ãŒãšåŒã³ãã¡ã€ã³ã¿ã€ã«ããããããã³ãã¬ã€ã€ãŒãšèæ¯ã¬ã€ã€ãŒãšåŒã³ãŸãã空ã®ã¬ã€ã€ãŒã¯åé¢/èæ¯ãã©ã°ãããã䜿çšããªããããåäžã®ã¬ã€ã€ãŒãšèããããšãã§ããŸãã
äžã®å³ã¯ãBlackthorneã®æåã®ã¬ãã«ã®ã¿ã€ã«ããããã©ã®ããã«çµã¿ç«ãŠããããã瀺ããŠããŸãã
å·Šããå³ãäžããäžïŒç©º/èæ¯ãåé¢ã¿ã€ã«ãèæ¯ã¿ã€ã«ããã¹ãŠã®ã¬ã€ã€ãŒ
次ã®ããã«ã¿ã€ã«ãããã衚瀺ã§ããŸãïŒã¬ãã«ã¯3 1ããã³2-ããã¯æåã®ã¢ãã¡ãŒã·ã§ã³ã¹ã¯ãªãŒã³ã»ãŒããŒããã³ãã¬ãŒãã³ã°ã¬ãã«ã§ãïŒïŒ
./level_view --blackthorne DATA.DAT 3
ããã§ãããã€ãã®èå³æ·±ãç¹ã«æ°ä»ãããšãã§ããŸãã
- 空ã¬ã€ã€ãŒã®äžéšã¯ãåé¢ã¬ã€ã€ãŒã§å®å
šã«èŠãããŠããŸããããã¯ãããããéçºããã»ã¹ãŸãã¯BlizzardããŒã«ãåå ã§çºçãããã®ã§ãã
- , â . , . , , . - /.
- . , . , Blackthorne , . . , . , Blizzard , , The Lost Vikings.
ãã¹ãŠãã¬ãã«ã§ã
ããªã¶ãŒãã¯ãã1ã€ã®è³¢æãªäžæ©ãèžã¿åºããŸãããã²ãŒã å ã®ãã¹ãŠïŒäžéç»é¢ãã¢ãã¡ãŒã·ã§ã³ã¹ã¯ãªãŒã³ã»ãŒããŒãã¡ãã¥ãŒïŒã¯ã¬ãã«ã§ããééããªããããã«ããå€ãã®éçºæéãç¯çŽãããŸãããã¢ãã¡ãŒã·ã§ã³ãšãªããžã§ã¯ãã®ç§»åã䌎ãã²ãŒã ã¬ãã«ã®ã³ãŒããå®è£ ããããã®ãã¹ãŠã®ããŒãã¯ãŒã¯ã¯æ¢ã«è¡ãããŠãããããã¹ã¯ãªãŒã³ã»ãŒããŒãšã¡ãã¥ãŒã管çããããã«åã³äœ¿çšããããšã¯éåžžã«è«ççã§ããã²ãŒã ãšã³ãžã³ã¯åã³ä»®æ³ãã·ã³ã䜿çšããŠãã¢ãã¡ãŒã·ã§ã³åãããã¹ã¯ãªãŒã³ã»ãŒããŒã®ã¬ãã«ã§ã¢ãã¡ãŒã·ã§ã³ãå®è£ ãããšèããããŸããå¯äžã®æ³šç®ãã¹ãäŸå€ã¯ããã®ã»ã¯ã·ã§ã³ã®æåããã®The Lost Vikingsã®åæç»é¢ã§ãããã¯å§çž®ãããŠããªã倧ããªãçã®ãã¹ãã©ã€ããšããŠãšã³ã³ãŒããããŠããŸãã
ããšãã°ãã²ãŒã ãéå§ããããšãããã€ãã®åæç»é¢ã衚瀺ãããŸãããããã®ãã¡ã®2ã€ã¯ïŒ2ã€ã®éšå±ã®ïŒåäžã¬ãã«ãšããŠãšã³ã³ãŒããããŸããäžã®ç»åã®å·ŠåŽã«ã¯ã¬ãã«ã®ã¿ã€ã«ã®ã»ããããããå³åŽã«ã¯ã¬ãã«èªäœããããŸããã²ãŒã ã§ã¯ããã£ã©ã¯ã¿ãŒã®ã·ã«ãšãããæåã«è¡šç€ºãããŸãïŒããã¯å ããŸãããåŸã§è©³ãã説æããŸãïŒããã©ãã¯ãœãŒã³ã®ããŽã¯ãã¡ã€ã³ã¡ãã¥ãŒã®äžã«è¡šç€ºãããŸãã
ãã©ãã¯ãœãŒã³ã®ããŽã¿ã€ã«ã®ããã2ã€ã®ã³ããŒãå¿ èŠãªçç±ã¯æ£ç¢ºã«ã¯ããããŸããããããã¯ãããã«ç°ãªãè²ãæã£ãŠããããšã«æ³šæããŠãã ãããããšãã°ãäžã®ã»ããã§ã¯ãTMã¢ã€ã³ã³ã¯é»ã§ããŽã®å åŽã«ãããäžã®ã»ããã§ã¯çœã§å€åŽã«ãããŸããããããããã®ã¿ã€ã«ã®ã»ããã¯ãã²ãŒã ã®çµäºæã«å¥ã®ç»é¢ã«åã³äœ¿çšãããã®ã§ããããïŒ
ã¿ã€ã«ã®ã»ãããšãã®ç»é¢ã®ã¬ãã«ã¯ã次ã®ããã«è¡šç€ºã§ããŸãã
./tileset_view --blackthorne DATA.DAT 1 -c 0x6e ./level_view --blackthorne DATA.DAT 1 -h0x6e
ãã¬ãã管ç
äžèšã§è¿°ã¹ãããã«ãåã¹ãã©ã€ãã§ã¯16è²ã䜿çšãããå€ã¯åžžã«0x0-0xfãšããŠãšã³ã³ãŒããããŸããããã«ãããåã¬ãã«ã¯ãç°ãªãã¬ãã«ã§ã¹ãã©ã€ããåå©çšããããã®ç¬èªã®ãã¬ãããå²ãåœãŠãããšãã§ããŸãã
Lost Vikingsã«ã¯ãå®å®ãå å²æ代ãã¯ã¬ã€ãžãŒãªãã£ã³ãã£ã®äžçãªã©ãããã€ãã®äžçããããŸããããããã«ç¬èªã®é è²ãšæµãããŸãããã¬ã€ã€ãŒãå¶åŸ¡ãããã€ãã³ã°ã¯ã16è²ã®ãã¬ããã2ã»ããã®ã¿äœ¿çšããŸãïŒOlafãšBaleogã¯äž¡æ¹ãšãåãç·ãšé»è²ã®é è²ã䜿çšããEricã¯èµ€ãšéã®é è²ã䜿çšããŸãïŒãã€ã³ã¿ãŒãã§ã€ã¹ã¯16è²ã®å¥ã®ã»ããã䜿çšããå¥ã®1ã€ã¯ãã¹ãŠã®äžçã«ããããŒããã«ã¹è£å ãªã©ã®ã¢ã€ãã ã«äœ¿çšãããŸããããã«ãããã¬ãã«ã«ãã£ãŠæ±ºå®ããã256è²ã®ãã¬ããã®é©åãªéšåãæ®ããŸããã»ãšãã©ã®ã¬ãã«ã§ã¯ãããŒã¹ã®128è²ãã¬ãããããŒãããŠããã8ã€ã®16è²ãã¬ããã®ã»ãããããŒãããŸãã
åã ã®ã¬ãã«ãã¬ããã䜿çšãããšãã¹ãã©ã€ããç°ãªãã«ã©ãŒã¹ããŒã ã§åå©çšã§ããŸããããã¯ã8ãããã«ã©ãŒãšéããããã£ã¹ã¯ã¹ããŒã¹ã®æ代ã«ãã䜿ãããŠããŸããããåç¥ã®ããã«ãMortal Kombatã²ãŒã ã«ã¯ãå¿è ãã£ã©ã¯ã¿ãŒã®å€èŠ³ãå€æŽããããã€ãã®ãã¬ããããããŸãã以äžã®å³ã¯ãç°ãªãã¬ãã«ã®ãã¬ããèšå®ãæã€åãæç«ã¹ãã©ã€ãã瀺ããŠããŸãã
ãã®ããã«æç«ã¹ãã©ã€ãã®2ã€ã®ç°ãªãããŒãžã§ã³ã衚瀺ã§ããŸãã
./sprite_view DATA.DAT -fpacked32 -b0xc0 -l5 0xf8 ./sprite_view DATA.DAT -fpacked32 -b0xc0 -l10 0xf8
ã¹ãã©ã€ããã¥ãŒã¢ã«ã¯ãã¬ãã«çªå·ã®åŒæ°ïŒ-lïŒãšããŒã¹ãã¬ãããªãã»ããã®ãªãã»ããïŒ-bïŒãæž¡ãããããšã«æ³šæããŠãã ãããã¬ãã«çªå·ã¯ãã¬ãã«ããããŒãããã¯ãåæãããšãã«èªã¿èŸŒããã¬ãããããã¯ã決å®ããããã«äœ¿çšãããŸããç§ãå®éšçã«æ±ºå®ããããŒã¹ãã¬ããã®ã€ã³ããã¯ã¹ãç¹°ãè¿ããŸãããããªã¶ãŒããšã³ãžã³ã®ãã®éšåãå®å šã«ã¯ç解ããŠããŸããã§ãããç¹°ãè¿ããŸãããããŒã¹ãã¬ããã®ã€ã³ããã¯ã¹ã¯ãä»®æ³ãã·ã³ãªããžã§ã¯ãããã°ã©ã ã®ã³ãã³ãã«ãã£ãŠç€ºããããšæãããŸãã
ãã¬ããã¢ãã¡ãŒã·ã§ã³
DOSæ代ã®ãã1ã€ã®äžè¬çãªããªãã¯ã¯ããã¬ããã®è²ãå€æŽããããšã«ããã°ã©ãã£ãã¯ã¹ã®ã¢ãã¡ãŒã·ã§ã³ã§ãããã¯ã»ã«ã®åæç»ã«ãããªããžã§ã¯ãã®ã¢ãã¡ãŒã·ã§ã³åã¯ãç¹ã«é »ç¹ã«æŽæ°ããå¿ èŠããã倧ããªéšåãããšãã°ããã©ãã¯ãœãŒã³ã®èæ¯ã®æ»ãªã©ã§ã¯éåžžã«é«äŸ¡ã§ãããã¯ã»ã«èªäœãå€æŽãã代ããã«ããã¬ããã®è²ãå€æŽããæ¹ãã¯ããã«çµæžçã§ããåæã«ã察å¿ããè²ã®ãã¹ãŠã®ãã¯ã»ã«ãå³åº§ã«æŽæ°ãããŸãããã®ææ³ã¯ãäž»ã«ãThe Lost Vikingsã®å®å®ã¬ãã«ã§ã®æ»ãéå ãªã©ã®åçŽãªã«ãŒãã¢ãã¡ãŒã·ã§ã³ã«åœ¹ç«ã¡ãŸããåè¿°ããããã«ããã©ãã¯ãœãŒã³ã§ã¯ãããŒã ç»é¢ã«ã·ã«ãšããã®ã°ããŒå¹æãäœæããããã«ãã¬ããã¢ãã¡ãŒã·ã§ã³ã䜿çšãããŸãã
Blizzardãšã³ãžã³ã¯ãã¬ãã«ããããŒã«ãã¬ããã¢ãã¡ãŒã·ã§ã³ãå®è£ ããŸããåãã¬ããã¢ãã¡ãŒã¿ãŒã«ã¯ã8ãããã®é床å€ãš2ã€ã®8ãããã«ã©ãŒã€ã³ããã¯ã¹å€ããããŸãã 2ã€ã®ã€ã³ããã¯ã¹ãçãããªãå Žåãã¢ãã¡ãŒã·ã§ã³ã¯ããã2ã€ã®ã€ã³ããã¯ã¹ãåšæçã«åãæ¿ããŸãããã®åœ¢åŒã¯ããã¿ãŒã³å ã®åããªããžã§ã¯ãã®ã¢ãã¡ãŒã·ã§ã³ã«é©ããŠããŸãã
2ã€ã®ã€ã³ããã¯ã¹ãçããå Žåããã¬ããã¢ãã¡ãŒã·ã§ã³ã¯åãè²ã«äœ¿çšãããã¬ãã«ããããŒã¯ã¢ãã¡ãŒã·ã§ã³ã®16ãããå€ã®ãªã¹ãã瀺ããŸããå16ãããå€ã¯ãRGB-555圢åŒã§è²ã®å€ããšã³ã³ãŒãããŸãïŒè²ããšã«5ããããã€ãŸã1ããããç¡é§ã«ãªããŸãïŒãéåžžã®VGAãã¬ãããšBlizzardãšã³ãžã³ã¯ãè²ããšã«6ãããã衚瀺ã§ããŸãããã¬ããã¢ãã¡ãŒã·ã§ã³ã¯ãåã«ã©ãŒå€ã1ã€å·Šã«ã·ããããããšã«ãããæäžäœãã€ãã倱ããŸãããã®ãã¬ããã¢ãã¡ãŒã·ã§ã³åœ¢åŒã¯ãå ã®èåãªã©ã®ã¢ãã¡ãŒã·ã§ã³ã«åœ¹ç«ã¡ãŸãã
ã¬ãã«ãã¥ãŒã¢ã§ãAããã¯ãªãã¯ããŠããã¬ããã¢ãã¡ãŒã·ã§ã³ã衚瀺ã§ããŸãã
ã²ãŒã ãªãŒããŒ
ããã§ãã¹ãŠã§ãã
./level_view DATA.DAT 48 ./level_view --blackthorne DATA.DAT 23
TwitterïŒ@ryironã§ç§ãèªãããšãã§ããŸãã