Author Topic: Ling Jie Hu Fa: Level 3 crash issue  (Read 7090 times)

KAGE-008

  • Sr. Member
  • ****
  • Posts: 907
    • View Profile
    • http://www.youtube.com/user/Starlink3854
Ling Jie Hu Fa: Level 3 crash issue
« on: February 20, 2018, 09:55:38 PM »
I bet most people haven't noticed that in Ling Jie Hu Fa, it crashes right before starting the third level. What is curious is that I confirmed this yesterday by testing the original WXN dump on Nintendulator-NRS. I'm guessing there is some part of the PRG that is either corrupted or protected.

In the meantime, using the code 006B:04 lets you access the fourth (and last) level, but it requires disabling it afterwards to make the enemies appear.

NewRisingSun

  • Sr. Member
  • ****
  • Posts: 320
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #1 on: February 21, 2018, 01:30:33 AM »
I would like to investigate, but I already have no idea what I have to accomplish to finish the second level. I also cannot seem to find out how to reliably operate wall switches, assuming that they're not just props.
« Last Edit: February 21, 2018, 01:56:21 AM by NewRisingSun2 »

KAGE-008

  • Sr. Member
  • ****
  • Posts: 907
    • View Profile
    • http://www.youtube.com/user/Starlink3854
Ling Jie Hu Fa: Level 3 crash issue
« Reply #2 on: February 21, 2018, 05:31:54 PM »
NewRisingSun2
Feb 21 2018, 01:30:33 AM
I would like to investigate, but I already have no idea what I have to accomplish to finish the second level. I also cannot seem to find out how to reliably operate wall switches, assuming that they're not just props.[/quote]You just need to kill all enemies in the level to progress. I might send you a savestate if it's required.

ProBoTector23

  • Guest
Ling Jie Hu Fa: Level 3 crash issue
« Reply #3 on: February 21, 2018, 05:41:26 PM »
KAGE-008
Feb 21 2018, 05:31:54 PM
NewRisingSun2
Feb 21 2018, 01:30:33 AM
I would like to investigate, but I already have no idea what I have to accomplish to finish the second level. I also cannot seem to find out how to reliably operate wall switches, assuming that they're not just props.[/quote]You just need to kill all enemies in the level to progress. I might send you a savestate if it's required.[/quote]You can also send me a savestate? :) I tried the code (in FCEUX), but I could not bring forth the third level.

NewRisingSun

  • Sr. Member
  • ****
  • Posts: 320
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #4 on: February 21, 2018, 06:36:40 PM »
No, just setting memory variable $006B to $03, as you mentioned, is enough. But thanks for the offer.

Having investigated the code a little further, it seems to me that the PRG bank order is mixed up, but only slightly. There already is a Waixing Mapper number for that --- Mapper 249 will mix up the PRG banks if register $5000 has bit 1 (value $02) set, which Ling Jie Hu Fa indeed does right at the beginning. Unfortunately, the scrambling pattern seems to be entirely different from the existing Mapper 249 games ...
  • Duo Bao Xiao Ying Hao - Guang Ming yu An Hei Chuan Shuo (Ch)
  • Myth Struggle (Ch)
  • Shui Hu Zhuan (Ch)
... so one would have to find out what the correct pattern is. Those three Mapper 249 games freeze right away when run as Mapper 4 or 176, so to account for the fact that Ling Jie Fu Ha seems to mostly run well, the alternative pattern may invole changing only a single bit. Other games that write $02 to $5000, yet seem to run normally at first, but may crash at a later point for the same reason:
  • Golden Axe
  • M&M Heroes (serial 980100295)
  • Ye Ming Jue
Has anyone played these games to tell me whether they crash at some later point?

There is an alternative version of M&M Heroes with serial 980584 that does not write $02 to $5000, so maybe comparing the two versions can lead to some insights.
« Last Edit: February 21, 2018, 06:37:06 PM by NewRisingSun2 »

KAGE-008

  • Sr. Member
  • ****
  • Posts: 907
    • View Profile
    • http://www.youtube.com/user/Starlink3854
Ling Jie Hu Fa: Level 3 crash issue
« Reply #5 on: February 21, 2018, 11:37:27 PM »
Golden Axe and Ye Ming Zhu (Night Pearl) — I played them through and don't have crashing issues. Btw this reminds me of another game that crashes before the level boss: Journey To The West II. Only changing the video setting to PAL on Chinese builds of VirtuaNES-ex solves it, but that is completely unrelated to the crash being investigated here.

dragon2snow

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #6 on: February 22, 2018, 12:44:44 AM »
这游戏,我有实体卡带,目前我手上的5个版本的卡带,第三关都死机

wanren

  • Newbie
  • *
  • Posts: 13
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #7 on: February 22, 2018, 12:51:36 AM »
dragon2snow
Feb 22 2018, 12:44:44 AM
这游戏,我有实体卡带,目前我手上的5个版本的卡带,第三关都死机[/quote]Oh! Do you own this game box and cartridge different version pictures?
:) < I'm very concerned about that.

NewRisingSun

  • Sr. Member
  • ****
  • Posts: 320
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #8 on: February 22, 2018, 02:24:15 AM »
Yes, the 980340 version of 帝国风暴 Napoleon's War also requires PAL or Dendy timing to not crash before the main game map is shown, while the 980100029 has no such problem. I'm not sure the proper way to interpret that number is to conclude that 980100029 is the later or earlier version of the game.

dragon2snow
 
这游戏,我有实体卡带,目前我手上的5个版本的卡带,第三关都死机[/quote]
I will assume then that we just have (a good dump of) the broken version of the game. The $5000 write may be the result of an earlier version of the respective game using Mapper 249, with the current versions running correctly as Mapper 4, but Waixing not having bothered to remove that one line of code. Maybe the crash even comes from Waixing not properly removing the protection from the earlier version of the game.

I'm just a bit surprised (maybe I shouldn't be...) that of the several versions of the game they have, Waixing would put up the bad one for download. In any case, I have added an entry to the undumped games wiki page. I think the $5000 write of Golden Axe and Ye Ming Jue may indicate that earlier, Mapper-249-using, versions of those games exist as well.
« Last Edit: February 22, 2018, 02:42:29 AM by NewRisingSun2 »

dragon2snow

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #9 on: February 22, 2018, 04:01:34 AM »
我要回去找找,我有上万盘游戏卡。最初的这个ROM,就是我从卡里DUMP的。
最后我测试的是一个单卡。ROM数据都一样。 我一直再找最最初的卡,但一直没有看到过。
包括 猫王等游戏卡
« Last Edit: February 22, 2018, 04:05:11 AM by dragon2snow »

ProBoTector23

  • Guest
Ling Jie Hu Fa: Level 3 crash issue
« Reply #10 on: February 22, 2018, 05:53:21 AM »
KAGE-008
Feb 21 2018, 11:37:27 PM
Golden Axe and Ye Ming Zhu (Night Pearl) — I played them through and don't have crashing issues. Btw this reminds me of another game that crashes before the level boss: Journey To The West II. Only changing the video setting to PAL on Chinese builds of VirtuaNES-ex solves it, but that is completely unrelated to the crash being investigated here.[/quote]The Journey To The West II also works in FCEUX in Dendy mode. If you play in NTSC or PAL mode, then will unfortunately crash before the first boss.
« Last Edit: February 22, 2018, 05:55:43 AM by ProBoTector23 »

NewRisingSun

  • Sr. Member
  • ****
  • Posts: 320
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #11 on: February 23, 2018, 01:28:30 AM »
Are we talking about 真假猴王 (Zhēn jiǎ hóu wáng), headerless CRC32 0xA273590F? I cannot get it to crash before the first level boss in Nintendulator-NRS in either NTSC, PAL or Dendy modes.
Oh wait, there's an actual game called Journey the West II. Sorry, got my Journey to the West games confused. And yes, that one will fail at the first level boss in any mode other then Dendy (or "Hybrid" in older Nintendulator builds).
« Last Edit: February 23, 2018, 03:01:30 AM by NewRisingSun2 »

MLX

  • Sr. Member
  • ****
  • Posts: 719
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #12 on: February 23, 2018, 03:35:42 AM »
Since there are games requiring the Dendy mode to work, wouldn't it be a good time to suggest an update to the NES2.0 header?

NewRisingSun

  • Sr. Member
  • ****
  • Posts: 320
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #13 on: February 23, 2018, 04:00:02 AM »
I have already written a proposal covering Dendy, Vs. Dual System, VT01 STN (suggested by lidnariq), VT03 and VT09, but wanted to wait until more information on the VT3x and VT36x, as discussed in this thread, has become known before I posted it to nesdev.
« Last Edit: February 23, 2018, 07:59:12 AM by NewRisingSun2 »

NewRisingSun

  • Sr. Member
  • ****
  • Posts: 320
    • View Profile
Ling Jie Hu Fa: Level 3 crash issue
« Reply #14 on: February 24, 2018, 05:34:04 PM »
I have further investigated the Ling Jie Hu Fa level 3 issue. The level 3 data is in 8 KiB bank 0x16, or 16 KiB bank 0x0B. Instead of containing the level code and data, 16 KiB bank 0x0B is a duplicate of 16 KiB bank 0x0E. The actual bank 0x0B data is completely missing --- trying to substitute that bank with any of the other banks will not do. This means that no amount of hacking will be able to restore level 3 using the current image, and a redump of a working version is the only way. I suspect that when Waixing ran out of Mapper 249 boards, they used a quickly-written tool to undo Mapper 249's PRG bank order scrambling to use a simple Mapper 4 board, and made a mistake in the process that caused one of the banks to be dropped, and that this version ended up in the downloadable WXN pack.