News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Ninja Gaiden series (NES) Trilogy Upgrade: Graphics Pack for HDNES/Mesen  (Read 4735 times)

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Preface
In 1995, Tecmo released Ninja Gaiden Trilogy for the Super Nintendo Entertainment System. As many other companies had done during that generation, Tecmo ported some of their classic NES games to a more powerful, 16-bit system. Unlike the other companies, though, Tecmo put in as little effort as possible to bring over their games to the newer console. Let's look at the graphical side of the port. They're usually more detailed and better than they are in the original NES versions. However, they have no additional graphics added anywhere. In fact, some graphical effects have been removed from the SNES compilation, leaving less flair than the original games! The graphics we have here appear to have been just painted over the NES tiles and sprites with no additional graphics made.

Funny enough, this actually makes the compilation's graphics prime for extraction and reimplementation into a graphics pack for Mesen. I've been doing just that, and then some.

Graphics Packs

The first game in the NES trilogy. Its combination of solid action-platforming gameplay and then-revelatory storytelling through cinematics made for a special experience back in the day.



I made this pack awhile ago, long before Mesen 0.9.5 came out. The reason I never made a topic for it is because I'm fairly dissatisfied with how it is right now. Stage fade palettes don't really make any sense, and the LSD-like effect that occurs when you get a Game Over is too obnoxious to make hundreds of extra graphics files for. Ideally I'll be able to distribute a patch alongside the pack that standardizes stage fades to work similar to how they do in Ninja Gaiden II and remove the Game Over effect altogether. Until then, the game will display the NES graphics when these palette changes occur.

Regardless, every graphic in the game has been touched in this pack. Alongside porting the graphics from Trilogy, it includes the following changes:
  • Substituted several obvious cases of dithering with additional color.
  • Inserted additional detail into tiles to get graphics to blend together better.
  • Added detail to a few enemy sprites. Some of them were completely unchanged in Trilogy, like the soldier that fires a bazooka.
  • Removed censorship of hexagrams in the final parts of the game.
  • Added rudimentary support of palette fades in cutscenes. The method I use here is outdated and needs to be overhauled, but it's still more than Trilogy does. In the mistranslated words of Keiji Inafune, "It's better than nothing."

The sequel. Refined controls, well-balanced difficulty, neat stage design, and high-end aesthetics for the time make for one of the best games to ever come out for the NES.



I made this pack in tandem with the release of Mesen 0.9.5, so it makes use of extra conditionals included in that version and beyond. I'm incredibly happy with how it's turned out and consider it complete. Every graphic and used palette combination (besides the HUD, which actually has more unique detail in the NES version) should be covered in this pack, making most user changes just a simple touch-up in Paint/Photoshop.

Alongside porting the graphics from Trilogy, it includes the following changes on top of the SNES version's graphics:
  • Substituted several obvious cases of dithering with additional color.
  • Inserted additional detail into tiles to get graphics to blend together better.
  • Added detail to various graphics that were not touched up in Trilogy.
  • Changed many flash palettes that looked rather ugly in Trilogy to something that made more sense.
  • Added palettes for lightning flashes in Stage 3-1. Trilogy does away with lightning altogether and simply makes platforms visible at all times, completely ruining the stage.
  • Added flash palettes that were removed from Stages 4-1, 5-1, 5-2, and 7-4 in Trilogy.
  • Added an extra conditional to make separate graphics for shared tile/palette combinations in Stage 1 cutscene.
  • Fixed examples of wrong or mismatched colors in graphics.
  • Fixed graphics corruption of rock during the ending that occurs in Trilogy.
  • Fixed character graphics in various cutscenes. Ryu's gi and eye color is now consistent throughout the game, and Irene's sclera ("whites of the eyes") has been restored, among other things. Several tiles in the ending have also been fixed.
  • Removed censorship of pentagrams and blood in the final parts of the game.
  • Added full support of palette fades throughout the game. It relies on a lot of conditionals since many graphics fade out to full black before the entire screen is done fading. Fading is smooth and consistent throughout the game.


The red-headed stepchild of the NES trilogy. A ridiculous storyline and imbalanced and impossible difficulty (in the U.S. release) doom its reputation.

I don't know if I'll do a pack for Ninja Gaiden III. Aside from not caring for the game itself, the amount of time and effort it would take to make a pack for this game is significantly longer than for either of the other two games. Stage palette fades are so specific and numerous that it'd triple the amount of code needed to cover those graphics. That, and the fact that the Trilogy version of this game has less effort put into it than the other two games graphics-wise, puts me off of working on it. Never say never, but don't count on it.

Downloads
Ninja Gaiden: Beta 1.0
Ninja Gaiden II: Full Release

Many thanks to Sour for all the work done on Mesen and for applying feedback to it in spectacular fashion. You'll need to use the latest version of Mesen to use these packs. Extract the .zip file for the pack to the HdPacks folder that Mesen creates. If you're using the standalone emulator on Windows, for example, it's under [OS Drive]:/Users/[username]/Documents/Mesen. If you're using the libretro core for Mesen, HdPacks is found in the "system" folder. Make sure the ROM file you load and the graphics pack folder for a given game share the same name.

This pack is designed to work specifically with the U.S. versions of the game. Some graphics won't apply correctly if you try to use it with the Japanese or European versions of the games.

All feedback is appreciated. Enjoy!
« Last Edit: April 22, 2018, 11:09:03 pm by RichterSnipes »

PolishedTurd

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Wow, it looks like a tremendous amount of work went into this. I was always disappointed with the SNES port, specifically its terrible sound effects and music. This looks like a nice upgrade.

I agree the LSD effect is disorienting in NG1, and it doesn't need to be preserved. I can figure out how to disable it without too much effort, if you'd like some assistance creating the patch for this pack. I don't think the fade-outs at the end of stages need to be preserved either.

I have tried to install Mesen and put these files where they need to be, but I haven't succeeded yet. I downloaded version 0.9.5 for Windows, but it did not create a HdPacks folder. So I created the folder myself in the Mesen directory, put your files in the HdPacks folder, in a folder with the same name as my clean ROM, and...  It looks the same as it ever was. What am I doing wrong?

Psyklax

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
    • Psyklax Translations
What am I doing wrong?

Good question, because I've done this with two other games and they worked fine. Haven't tried this yet, but if they've been done properly, they should work.

There is ONE thing... did you go in the options menu and turn on HD packs there?

PolishedTurd

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Thank you Psyklax, that was all I needed to do.  :P It works very well now.

So far, the only artifact I've noticed is some vertical bars in a sprite during a cutscene when the sprite is slowly panning in the frame, such as Ryu's face after beating the first boss, and Walter Smith's face in the scene after the second boss. Not a big deal though. I'll do a full playthrough and let you know what else I find. Loving the vivid colors and shading.

Edit: OK, I played the game start to finish and watched all the cutscenes (haven't seen those in a while!). The only other thing I noticed is that in the ending credits, there is a shot of Malth with his arms folded, and there is a pink square behind him on the left. I don't think the pink square was in the in-game cutscene featuring this particular shot.

Other than that, level 4-3 looked a little odd to me but not significantly so - the wood texture looks more washed out compared to the NES version. Both the bazooka and machine gunner look slightly less enhanced than the other enemies. The final boss (demon statue) looks really good. All in all, it's fun to play my favorite old game with a new skin on it. Thank you for putting the work in!

It's probably unrelated to your graphics pack, but I also hear some digital crackling noise in the audio, as though it is being played on an 8-bit vinyl record player... Maybe that is just Mesen. Edit: I am running a decent machine, 3.2 GHz with 16 GB RAM. Tried fiddling with latency to no avail. Changing sample rate to 22 KHz seems to get rid of the crackling, but of course that kills all the frequencies above 11KHz as well. It's not a big deal anyway, just something I noticed.
« Last Edit: April 15, 2018, 04:46:55 pm by PolishedTurd »

SourMesen

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
I also hear some digital crackling noise in the audio, as though it is being played on an 8-bit vinyl record player... Maybe that is just Mesen.
You can try increasing the "Latency" setting in Options->Audio to see if it helps, some computers might have trouble with the default 50ms latency?  Also, if you're using an old/slow laptop, it's possible the HD Pack is a bit too demanding for it - simplest way to check this would be to disable HD Packs and see if you still hear crackling.

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Wow, it looks like a tremendous amount of work went into this. I was always disappointed with the SNES port, specifically its terrible sound effects and music. This looks like a nice upgrade.

I agree the LSD effect is disorienting in NG1, and it doesn't need to be preserved. I can figure out how to disable it without too much effort, if you'd like some assistance creating the patch for this pack. I don't think the fade-outs at the end of stages need to be preserved either.

Thanks! In all fairness, the fact that Ninja Gaiden Trilogy was close to a straight port helped tremendously with the workflow. All the tiles appeared in VRAM with the same orientation and order they do in the NES games. I was able to look at them with a SNES debugger (via an older, custom build of bsnes) and copy them into the appropriate .png files with any old paint program. Still, it took a long while to do the work. I meticulously organized the files, as well, to help identify everything while working on it on my end. I don't wanna think about how many hours I've invested total into this.

A patch like that actually sounds great! Getting rid of the Game Over effect altogether is definitely my ideal method of dealing with it. I wonder if the work's been done already, though. I know that Nintendo has patched a lot of old games that have appeared on Virtual Console to remove effects that can potentially cause seizures. Maybe the VC release of this game already did that, and it'd be easy to make a patch from that.

As for the stage fade palettes, I'd like for them to exist in some form. The fade-out palettes at least make sense. They're still painful to deal with because only one color in one palette changes each frame (or something like that). The fade-in palettes seem completely arbitrary, along with the one-at-a-time palette color updates. To me, the most ideal method would be to implement the palette fading that's already used in this game for cutscenes.

So far, the only artifact I've noticed is some vertical bars in a sprite during a cutscene when the sprite is slowly panning in the frame, such as Ryu's face after beating the first boss, and Walter Smith's face in the scene after the second boss. Not a big deal though. I'll do a full playthrough and let you know what else I find. Loving the vivid colors and shading.

Edit: OK, I played the game start to finish and watched all the cutscenes (haven't seen those in a while!). The only other thing I noticed is that in the ending credits, there is a shot of Malth with his arms folded, and there is a pink square behind him on the left. I don't think the pink square was in the in-game cutscene featuring this particular shot.

Other than that, level 4-3 looked a little odd to me but not significantly so - the wood texture looks more washed out compared to the NES version. Both the bazooka and machine gunner look slightly less enhanced than the other enemies. The final boss (demon statue) looks really good. All in all, it's fun to play my favorite old game with a new skin on it. Thank you for putting the work in!

I think I recognize the vertical bar issue you're talking about. Those issues seem to only creep up on the edges of the screen that are often hidden due to overscan. However, I don't see any problems with those specific examples on my end. I also couldn't find the pink square during that Malth scene, neither in the cutscene before fighting him or the credits. That sounds like a tile mapping issue. Again, it's not happening for me, so I'm not sure what's going on.

By "wood texture", do you mean the small red platforms? Yeah, they do look a bit odd here. I didn't put much thought into it until I compared the two directly. I'll probably change that up. It wouldn't be the first time that the Trilogy graphics made something look worse! Funny enough, the bazooka character was actually not updated at all in Trilogy. They literally left the sprite looking exactly as it did in the NES version. I touched it up to at least bring it up to spec with its accompanying machine gunner enemy.

Quote
It's probably unrelated to your graphics pack, but I also hear some digital crackling noise in the audio, as though it is being played on an 8-bit vinyl record player... Maybe that is just Mesen. Edit: I am running a decent machine, 3.2 GHz with 16 GB RAM. Tried fiddling with latency to no avail. Changing sample rate to 22 KHz seems to get rid of the crackling, but of course that kills all the frequencies above 11KHz as well. It's not a big deal anyway, just something I noticed.

Like Sour said, using graphics packs in Mesen increases system requirements, especially for larger packs. Since I don't have any custom audio for the graphics packs as it is, that's the only effect they would have on audio. Is the game running at a locked framerate?

AxlRocks

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Still, it took a long while to do the work. I meticulously organized the files, as well, to help identify everything while working on it on my end. I don't wanna think about how many hours I've invested total into this.

It adds up quickly, doesn't it? lol

This is awesome too, definitely something I was hoping to see eventually since the SNES version offered basically no benefits other than graphics and even had drawbacks to the originals. This would be, I think, pretty much the definitive way to play Ninja Gaiden, unless of course you want the 100% pure, original experience.

I can't imagine dealing with the various palette swap effects in these games, and as great as it would be to do so, and as much as I could maybe disagree with patching out/patching-in consistent fading if I were just a player using the pack, having done this stuff myself, I have to agree that it isn't worth it. You'd need to be beyond human to deal with the tedium of capturing every tile and getting it all correct for the Game Over effect plus everything else. At least, I'd certainly consider anyone who could do that a demi-god or something.

Anyway, great work! Hopefully I can try them out soon!

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
It adds up quickly, doesn't it? lol

This is awesome too, definitely something I was hoping to see eventually since the SNES version offered basically no benefits other than graphics and even had drawbacks to the originals. This would be, I think, pretty much the definitive way to play Ninja Gaiden, unless of course you want the 100% pure, original experience.

I can't imagine dealing with the various palette swap effects in these games, and as great as it would be to do so, and as much as I could maybe disagree with patching out/patching-in consistent fading if I were just a player using the pack, having done this stuff myself, I have to agree that it isn't worth it. You'd need to be beyond human to deal with the tedium of capturing every tile and getting it all correct for the Game Over effect plus everything else. At least, I'd certainly consider anyone who could do that a demi-god or something.

Anyway, great work! Hopefully I can try them out soon!

I hear ya. No matter how straightforward most things might feel, actually putting the time in to do it really adds up.

Not only do I fully understand the purist standpoint in terms of graphical updates, I actually side with it more often than not! There's a lot of changes made in enhanced ports and remakes that result in them diverging from the original source games. Even changing graphical effects can adversely affect the tone of a game in ways that make it something different entirely. Personally, I'd be hard-pressed to explain what massive effect removing the Game Over graphical effect and changing the fade style would have on the game. But it wouldn't surprise me for someone to be attached enough to them where removing them would seem sacrilegious. Once you reach that point of thinking, though, you realize that providing this graphics pack in the first place could qualify for that.

The idealist in me wants to add graphics for all of those tiles with all of their extra 30+ palettes per tileset. But then the modder in me sees "extra 30+ palettes per tileset" and thinks "nah." :laugh:

And thank you for the praise! You've done some excellent work on your Mega Man graphics pack, yourself. It feels like a faithful, tasteful upgrade over the original graphics. I personally don't think I'd be able to create those kinds of enhancements myself.

spiiin

  • Jr. Member
  • **
  • Posts: 43
    • View Profile
I am trying to use hd-hack, but emulator was not read it.
I am using later build of mesen (0.9.5), other hd-packs working as expected with it (hd-pack option is enabled), but this is not. I can't find any log messages about why hd-pack does not apply to this game.

I tried different names of the rom file + hd-pack folder, nothing help.


« Last Edit: April 18, 2018, 09:15:33 am by spiiin »

PolishedTurd

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
From your screenshot, it appears that it is working for you!

Note that Ryu has only 3 colors in his palette on the NES, but in your screenshot, there are regions of light and shadow on his legs, his scabbard is brown instead of blue, and his skin is not the same color as his shoes. I briefly opened the ROM with and without the HdPack enabled to verify the difference.

spiiin

  • Jr. Member
  • **
  • Posts: 43
    • View Profile
From your screenshot, it appears that it is working for you!

Note that Ryu has only 3 colors in his palette on the NES, but in your screenshot, there are regions of light and shadow on his legs, his scabbard is brown instead of blue, and his skin is not the same color as his shoes. I briefly opened the ROM with and without the HdPack enabled to verify the difference.

Oh, really. Thanks!

Rodimus Primal

  • Hero Member
  • *****
  • Posts: 811
    • View Profile
I'm loving the idea of better graphics for the NES, I'm going to have to try this out soon when I get some free time.

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
I tried different names of the rom file + hd-pack folder, nothing help.


Yeah, that's what it looks like. The base graphics are the same, they've just been given a newer coat of paint with this pack. They're also native resolution. If you don't know what the original game looks like to begin with or are aware of the limitations of the NES off the top of your head, I can see how you can get confused. I can't imagine what people playing Trilogy back in the day on CRT TVs with composite filtering thought of the graphics. They may not have been able to tell much of a difference at all!

I'm loving the idea of better graphics for the NES, I'm going to have to try this out soon when I get some free time.

It's honestly a fresh and exciting avenue! Hopefully we see more people dip their toes into the graphics pack pool in the future. Mesen has certainly helped increase awareness of them lately.
« Last Edit: April 21, 2018, 02:44:24 pm by RichterSnipes »

TimeCop

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Good work!

I never liked the brown/white font of Trilogy. I found it a very strange color choice. Trilogy has many strange choices like that. The original's pure white is actually more readable.

This should be uploaded to romhacking.net directly for preservation purposes. Once projects are uploaded to cloud-storage, they can easily get forgotten about and lost after a few years. Especially for more obscure games.

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
The Ninja Gaiden II pack is now in a complete state! There's one visual change: I adjusted the colors of part of the final boss to more accurately reflect how they're represented in the original game. Maintenance-wise, I organized the files into proper order in the hires.txt file. I also got rid of separate filler files in lieu of a single, reused filler file. I'm keeping filler space inside it in case I need to add more files to the pack in the future.

I posted a news article for it since I now consider it complete. Also, check out the .gif files I uploaded to the OP for II. They better show off how graphics effects removed from the SNES version look with this graphics pack.

Good work!

I never liked the brown/white font of Trilogy. I found it a very strange color choice. Trilogy has many strange choices like that. The original's pure white is actually more readable.

Thank you!

I agree with you here, it really is an odd choice. I can understand adding an extra shade to give the letters more feel/texture. A more appropriate color could have been chosen, though, like gray or blue. Or they could have not done anything. Several Tecmo games on the SNES just use plain white text.

I kept it these colors simply because that's what they are, and I don't feel that they're "wrong". It's an easy thing to change if you'd like. Open file 00_00.png in a paint editor and recolor the two shades of brown to something else you'd like using a "fill similar colors" option The paint program that comes with modern versions of Windows is terrible and lacks many features, including this bucket fill option. Both GIMP and Paint.NET do this for free. There's also Photoshop, of course.

Quote
This should be uploaded to romhacking.net directly for preservation purposes. Once projects are uploaded to cloud-storage, they can easily get forgotten about and lost after a few years. Especially for more obscure games.

I would upload it here, but I can't. Romhacking.net doesn't support uploads of stuff like this. It's not a hack, tool, or document, so I wouldn't be able to file it under anything. This site really needs a section for emulator mods. There's other HDNES/Mesen graphics packs in this forum that could be put in that kind of section, too.

TimeCop

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
I loved the Famicom Ninja Gaiden games, and I was thrilled to learn it got a re-release. The first thing I noticed was the music was really weird. A lot of odd choices and missing features always bothered me. I was hoping that one day someone would fix them via romhacking. This is pretty much everything that I was hoping for and then some!

Quote
I would upload it here, but I can't. Romhacking.net doesn't support uploads of stuff like this. It's not a hack, tool, or document, so I wouldn't be able to file it under anything. This site really needs a section for emulator mods. There's other HDNES/Mesen graphics packs in this forum that could be put in that kind of section, too.

Yeah, I think there should be a place for pure graphic mods that aren't proper romhacks. I can see things like texture packs being too big for RHDN, but these HDNES projects are pretty small. And I guarantee that these will likely be lost in a few years unless people are specifically archiving them.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 895
    • View Profile
May I ask...
Why are these projects being highlighted?

I mean, don't get me wrong, I know these things require a lot of effort and time, but these are not romhacking related.
Not only are the projects texture/sprite overlays (so to speak), but they are also software dependant, like they depend on a very specific kind of emulator with a very specific set of tools to run, and add to that the fact that this is more of a "mod", not a romhack at all.
This doesn't modify the game/ROMs files at all, but they load texture/sprite overlays over the already existing assets of the ROM.

They should have their own particular place in the site, but this does not fit into the romhacking category.

Again, I don't want to sound harsh, as I know these projects have their fanbase and are impressive on their own, but this is not romhacking, but merely a mod or even re-texture work of the game running through a special emulator.

I suggest to the creator to get in contact with someone from the Staff in here and offer them the suggestion to make graphics packs for specific emulators a section on their own if they want to upload their work here.

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
I've never made any indications that this is a hack. I know it's a mod, and I'd never paint it up as anything else. The reason it's posted here is because of other similar projects that have been put here before. I'll admit that my timing for this release is a bit in lockstep with other graphics pack projects for HDNES/Mesen. It happens to be when I had one of my packs in a release-ready state, but it's also with another purpose.

I feel there should be a conversation regarding finding a place to showcase these kinds of projects. Traditional mod websites aren't suitable; Mod DB and Nexus Mods are for native PC games and current-gen console games that support mods (like Fallout 4). This site is meant for... well, ROM hacks. Emulator-specific boards also aren't a viable option. Emulators for more advanced systems have a strong enough userbase to where projects can be posted to their own dedicated boards (i.e. texture packs for N64 emulators, Dolphin, and Cemu). But for significantly old systems like the NES? That's not realistic. Putting these kind of projects on forums dedicated strictly to emulation of those old systems - or specific to a single emulator - is just sending them to immediate irrelevance.

These kinds of projects have value, however subjective it may be. They need some sort of home and should be able to receive some kind of exposure. I don't know if that home is at RHDN. I realize that fully integrating them here would begin to undo the very nature of this website. But it seems unlikely for them to find a better home. This website is dedicated to user-made modifications to old games. A different kind of modification, but one nonetheless.

If it doesn't sound like I have a single solid opinion as to where they should go, it's because I don't. I just hope that a conversation can be raised regarding this, and that a more concrete solution can be found through that.

Kosayn

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Just want to say thank you. 

This is a fun change for a series of games I've gone back to again and again.  I remember trying to get through the SNES Trilogy in the late 90s to rip out the .SPC files for Zophar's Domain.  That port is rough!  I don't remember if I finished it or just went on to Actraiser 2 instead.

Mesen seems a cool little emulator too, and I wouldn't have come across it without trying out your work.  Cheers.

RichterSnipes

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Once projects are uploaded to cloud-storage, they can easily get forgotten about and lost after a few years. Especially for more obscure games.

Speak of the devil... kind of. My laptop's hard drive just failed. Luckily I backed up everything to a couple of places locally when the warning signs were there. But think about what happens to projects where creators don't have the foresight to do that. Tons of hours of work just vanish.

I'm getting my laptop serviced for free under warranty so I don't have to pay for a new drive. It'll be a few weeks before I have it back. Until then, I'm not gonna be around here much.

Just want to say thank you. 

This is a fun change for a series of games I've gone back to again and again.  I remember trying to get through the SNES Trilogy in the late 90s to rip out the .SPC files for Zophar's Domain.  That port is rough!  I don't remember if I finished it or just went on to Actraiser 2 instead.

Mesen seems a cool little emulator too, and I wouldn't have come across it without trying out your work.  Cheers.

You're very welcome! The SNES versions of these games are indeed rough. Especially for III where the graphics updates are especially minimal. They even removed parallax scrolling from the game! Honestly boggles me how this was considered a good enough update to push out for the system. The SNES was capable of so much more than that.

And yeah, Mesen is amazing. It's easily the best NES emulator I've ever used, even when you exclude HD pack support.