Author Topic: Ninja Ryukenden/Gaiden  (Read 1386 times)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Ninja Ryukenden/Gaiden
« on: September 09, 2015, 04:54:56 AM »
I just finally got my own place, and pulled the PCE stuffs out of storage (yay!). So to warm up to PCE stuffs, in which I hadn't done for quite some time, I decided to look at Ninja Gaiden for the PCE (my son was playing the NES one over the weekend).

 Specifically, how to turn off the fake scrolling. That part was easy; just change one opcode from a BEQ to a BRA (@ $8153... I forget the bank number). But the problem lies with the maps. Except for the first level, all the maps have black tiles where the faux BG layer is supposed to be (after first map draw). The maps don't appear to be uncompressed (they are 16x16 metatiles, horizontal row format, and 13 meta tiles tall). I was able to easy find one, but removing the rom header and loading the rom into photoshop as a RAW 8bit grayscale image (64 pixels wide) and visually identifying some of the maps (not all maps can be identified this was single they might have different tile widths). But I hadn't figured out the pointer table to the maps for extraction.

 I'm not sure if I'm gonna continue with this for now, but I did want to at least post what I had found. If you're a hacker and interested, have at it! :)

Dicer

  • Hero Member
  • *****
  • Posts: 1905
Re: Ninja Ryukenden/Gaiden
« Reply #1 on: September 09, 2015, 04:59:04 AM »
Stopping it is the first step, reversing it is the key step...


Punch

  • Hero Member
  • *****
  • Posts: 3278
Re: Ninja Ryukenden/Gaiden
« Reply #2 on: September 09, 2015, 08:44:32 AM »
Please do continue your research on Ninja Gaiden. If you could make improvements in the parallax code it would make the pce version the definitive one.

lukester

  • Guest
Re: Ninja Ryukenden/Gaiden
« Reply #3 on: September 09, 2015, 03:21:58 PM »
This thread motivated me to finally beat Ninja Gaiden.

I had a great time tonight! I didn't know I had the ability to beat it, though it took a couple hours.

I have also played the nes version and prefer the pce music overall, but I never got past stage 3-2
« Last Edit: September 09, 2015, 03:24:02 PM by lukester »

seieienbu

  • Hero Member
  • *****
  • Posts: 1989
Re: Ninja Ryukenden/Gaiden
« Reply #4 on: September 10, 2015, 11:19:07 AM »
...you never fail to impress, Bonknuts.  Good luck with this.
Current want list:  Bomberman 93

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Ninja Ryukenden/Gaiden
« Reply #5 on: September 10, 2015, 01:09:02 PM »
Stopping it is the first step, reversing it is the key step...

 What step is the SGX version? Heh.

Dicer

  • Hero Member
  • *****
  • Posts: 1905
Re: Ninja Ryukenden/Gaiden
« Reply #6 on: September 10, 2015, 01:09:34 PM »
That step can wait for me to get a sgx...

Sent from my LG-D851 using Tapatalk


ParanoiaDragon

  • Hero Member
  • *****
  • Posts: 4619
Re: Ninja Ryukenden/Gaiden
« Reply #7 on: September 10, 2015, 04:30:07 PM »
Is it possible to make the static BG(if I'm using the right terminology) completely static instead of jerky? Or would that be a matter of rewriting the game from scratch or having the source code?

esteban

  • Hero Member
  • *****
  • Posts: 24063
Re: Ninja Ryukenden/Gaiden
« Reply #8 on: September 11, 2015, 04:59:17 AM »

That step can wait for me to get a sgx...

Sent from my LG-D851 using Tapatalk

Hell no. I don't mind if Ninja Gaiden SGX exists before I own another SupahGrafxx. 
  |    | 

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Ninja Ryukenden/Gaiden
« Reply #9 on: September 11, 2015, 07:08:51 AM »
Is it possible to make the static BG(if I'm using the right terminology) completely static instead of jerky? Or would that be a matter of rewriting the game from scratch or having the source code?

 Yes, that's completely possible. That's the first step, actually. I was able to disable the faux scrolling, but the BG maps need to be altered because all the faux scrolling parts are just black tiles (16x16 areas) - the game overwrites these blank tiles every so many scrolling periods. So no code, but it does mean sorting out the map data and altering it. The map data is not compressed, which is great, but I do need to figure out where the pointer table is (assuming there is one).

 Another interesting note: The back ground is updated in three screen refreshes (if there's a lot), because the update routine they use is pretty slow.

 The game also loads the entire game sprites into vram. Even the ones that don't get used for that level. It's sort of emulating NES sprite banks. It's a bit of a waste, and they could have used that extra space in vram for a smoother dynamic tile scrolling of the fake BG layer.

 One other interesting thing is the sprite animation. They created one more frame of animation for most enemies. Not sure about the bosses.
« Last Edit: September 11, 2015, 07:14:40 AM by Bonknuts »

seieienbu

  • Hero Member
  • *****
  • Posts: 1989
Re: Ninja Ryukenden/Gaiden
« Reply #10 on: September 11, 2015, 09:30:44 AM »


 One other interesting thing is the sprite animation. They created one more frame of animation for most enemies. Not sure about the bosses.

Hold up, are you saying ever enemy has a frame of animation that's not used?
Current want list:  Bomberman 93

esteban

  • Hero Member
  • *****
  • Posts: 24063
Ninja Ryukenden/Gaiden
« Reply #11 on: September 11, 2015, 09:47:21 AM »

 One other interesting thing is the sprite animation. They created one more frame of animation for most enemies. Not sure about the bosses.

Ha!

Could we see an example?
  |    | 

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Ninja Ryukenden/Gaiden
« Reply #12 on: September 11, 2015, 11:04:10 AM »


 One other interesting thing is the sprite animation. They created one more frame of animation for most enemies. Not sure about the bosses.

Hold up, are you saying ever enemy has a frame of animation that's not used?
They use it. It's one more than the original NES one. It's not very noticeable. I only noticed it myself when comparing NES sprite sheets to the sprites in vram, and then the animation itself. I'll post an example in a bit...

 And... I'm too lazy to post pics. But yeah, the leg animation for enemies is 3 frames (nes version has 2). And the attack frames have one more frames of animation over the NES enemies. The first boss has more frames of animation too, so I'm just going to assuming they all do.
« Last Edit: September 11, 2015, 11:36:34 AM by Bonknuts »

ParanoiaDragon

  • Hero Member
  • *****
  • Posts: 4619
Re: Ninja Ryukenden/Gaiden
« Reply #13 on: September 11, 2015, 07:09:47 PM »
One wonders about what was happening when building some of these games.  Perhaps the scrolling & wastefulness of the vram is a result of rushed product to get a game out on schedule.  Or the coder didn't totally know what we was doing?  As I've wondered in the past, I wonder if the coder who did this also did Ys 1-3(I don't recall if 4 had any jerky parallax). 

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: Ninja Ryukenden/Gaiden
« Reply #14 on: September 11, 2015, 07:29:18 PM »
Ninja Ryuukenden was made by a new Hudson startup in Hong Kong... so yeah, we can easily imagine that they might have been inexperienced and a bit inept.  Luckily, they smartened up and went on to do (partial?) work on Cotton CD.