News: 11 March 2016 - Forum Rules

Author Topic: Hogan's Alley HD Project  (Read 1494 times)

tygerbug

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Hogan's Alley HD Project
« on: June 22, 2021, 02:05:56 am »
Here is a small project, an HD version of Hogan's Alley for NES/Family Computer. (AKA "Sweet Insanity")

https://www.youtube.com/watch?v=ztEqs65U3Io&ab_channel=GarrettGilchrist
https://twitter.com/TygerbugGarrett/status/1407474535432028162

It does involve an IPS patch (I did a Romhack to fix certain things), but is intended to work with HDPacks in the Mesen emulator.

https://www.mediafire.com/?7is4cztvnj9ff2w/

While I just did this for fun, I would like to learn more about conditions in Mesen Hires to be able to polish it a little further.

(The video cheats a few things.)

Right now some of the text has some color problems, and I'd like to extend and alter some of the graphics for the characters using conditions, something I wasn't able to figure out apart from the Title and Character screens. (The Hires text specifies a couple of hair fix conditions which didn't work out.)

I would have liked to add HD music but the game already has some.
« Last Edit: June 23, 2021, 10:22:30 am by tygerbug »

mkwong98

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Hogan's Alley HD Project
« Reply #1 on: June 22, 2021, 11:08:25 am »
Hi tygerbug. If the characters are made of sprite tiles then you can not extend the HD graphics outside the original tiles. The only way is to hack the ROM to place more sprite tiles on to the screen.

Aclectico

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Re: Hogan's Alley HD Project
« Reply #2 on: June 22, 2021, 03:42:16 pm »
I agree - Generally, replacement graphics are limited by the existing tile dimensions (unless you hack the ROM). One other idea did come to me though - I'm not super familiar with the game. But, it looks to be mostly comprised of static screens. If that's the case, you could use full screen backgrounds in combination with spriteAtPosition/tileAtPosition conditions to make a large number of full screen backgrounds (in the same way you did the title screen). But, that approach may be a lot of work and there may be a lot of different possibilities.

I also noticed that some graphics did not have replacement graphics yet. You could either try re-recording with the HD Pack maker or you could try doing it manually. One example is the orange "S" information below.

11C,0F30270F

tygerbug

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Hogan's Alley HD Project
« Reply #3 on: June 22, 2021, 04:52:30 pm »
Let me explain my thoughts here.

I turned some background one-color tiles transparent, and the background behind text letters transparent, so that I could replace the title screen and character gallery background. (I don't know if I can set the fullscreen backgrounds to have priority over the other tiles?) This results in some problems where an expected background color is missing [behind text or otherwise] in the game itself. In mode 1 I could help this with a still image background I suppose.

The six characters appear as sprites. Three of them also appear as background tiles (the ones you aren't supposed to shoot, which in this version are the kids).

The game has two modes- the second one moves around the city- so doing this as replacement backgrounds would get a little complicated (although just Mode 1 would be simpler).

In the original, most of the character faces are mirrored, or have mirrored elements to cut down on tile use. That's not possible here with these photos.

I added twelve tiles to the bottom of the sprite sheet and Romhacked ten of them into the game. I wasn't able to use the last two because the code uses "FD" and "FE" for sprite flipping functions.

I tried to hack these in with conditions but it didn't seem to work. The idea was to replace two mirrored hair tiles with the correct tiles.

<condition>DadHairFix,spriteNearby,-8,0,31,FF30270F
[DadHairFix]<tile>0,FD,FF30270F,416,480,1,N

<condition>JasonHairFix,spriteNearby,-8,0,49,FF303607
[JasonHairFix]<tile>0,FE,FF303607,448,480,1,N

The background font also has no V or W, so Willie becomes Billie. I should look into changing that, depending on what letters aren't used in the hacked game.
« Last Edit: June 22, 2021, 07:26:35 pm by tygerbug »

mkwong98

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Hogan's Alley HD Project
« Reply #4 on: June 22, 2021, 09:43:52 pm »
I turned some background one-color tiles transparent, and the background behind text letters transparent, so that I could replace the title screen and character gallery background. (I don't know if I can set the fullscreen backgrounds to have priority over the other tiles?) This results in some problems where an expected background color is missing [behind text or otherwise] in the game itself. In mode 1 I could help this with a still image background I suppose.
You can use condition to look for specific background tiles at certain location to identify if the game is showing the title screen. Then you can replace all background tiles in that screen with transparent tiles. This way you can show a fullscreen background without background tiles blocking.

In the original, most of the character faces are mirrored, or have mirrored elements to cut down on tile use. That's not possible here with these photos.

I added twelve tiles to the bottom of the sprite sheet and Romhacked ten of them into the game. I wasn't able to use the last two because the code uses "FD" and "FE" for sprite flipping functions.

I tried to hack these in with conditions but it didn't seem to work. The idea was to replace two mirrored hair tiles with the correct tiles.

<condition>DadHairFix,spriteNearby,-8,0,31,FF30270F
[DadHairFix]<tile>0,FD,FF30270F,416,480,1,N

<condition>JasonHairFix,spriteNearby,-8,0,49,FF303607
[JasonHairFix]<tile>0,FE,FF303607,448,480,1,N
I think the spriteNearby condition will not work with a sprite tile next to it horizontally because you need to reverse the sign of the x difference if the sprite is horizontally flipped. And if you reverse the sign then both flipped and non-flipped tile matches it. To solve this you can add an extra condition <hmirror>

The background font also has no V or W, so Willie becomes Billie. I should look into changing that, depending on what letters aren't used in the hacked game.
You can use conditions to check for "illie" and replace the "B" with "W" when it happens

Aclectico

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Re: Hogan's Alley HD Project
« Reply #5 on: June 22, 2021, 10:28:58 pm »
Quote
You can use condition to look for specific background tiles at certain location to identify if the game is showing the title screen. Then you can replace all background tiles in that screen with transparent tiles. This way you can show a fullscreen background without background tiles blocking.

Another strategy that you could think about (in conjunction with the condition approach mentioned above) is using the multi-layer background functionality of the latest version of Mesen. In the example below, the 39 number represents the layered priority of the image you are using. 39 means the image would be placed over all graphics. A value of 1 would be behind everything. You could experiment with values in between.

<background>example.png,1,0,0,39
« Last Edit: June 22, 2021, 10:43:31 pm by Aclectico »

tygerbug

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Hogan's Alley HD Project
« Reply #6 on: June 22, 2021, 11:42:43 pm »
Quote
Then you can replace all background tiles in that screen with transparent tiles

Can that be done all at once?

Thank you both for your input.
« Last Edit: June 23, 2021, 12:03:22 am by tygerbug »

mkwong98

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Hogan's Alley HD Project
« Reply #7 on: June 23, 2021, 01:40:34 am »
Can that be done all at once?

Rename the pack to something else and run the HD pack builder at the title screen. This will give you a list of all the tiles in that screen. Copy the tiles into another file. It may be easier to work with the tiles if you save them into a csv file and edit them with Excel. Rename the pack back to the original and add a 256x240 transparent png to the pack. Then add the conditions and set the replacement to use that png for each of the tiles in the csv file. Finally add the tiles into your pack.

tygerbug

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Hogan's Alley HD Project
« Reply #8 on: June 23, 2021, 09:20:37 am »
  Thank you, it's a lot of code but that did work for the title/character screens.

  I've updated the download, and removed all code for sprites I'm not changing, which is much cleaner.

  Also added a video, which cheats a few things.

  The conditions I put in for fixing some hair sprites still aren't working.

<condition>DadHairFix,[hmirror],spriteNearby,8,0,31,FF30270F
[DadHairFix]<tile>0,FD,FF30270F,416,480,1,N

<condition>JasonHairFix,[hmirror],spriteNearby,8,0,49,FF303607
[JasonHairFix]<tile>0,FE,FF303607,448,480,1,N

 I also attempted a background fix which didn't work; I must be going about this wrong.
 In theory I could fix (the background versions of) Willie and David this way.

<condition>WillieBGFix1,tileNearby,8,0,49,166,01303706
[WillieBGFix1]<tile>5,0190,0F003016,0,288,1,N

<condition>WillieBGFix2,tileNearby,8,0,168,01303706
[WillieBGFix2]<tile>5,0191,0F003016,32,288,1,N

<condition>WillieBGFix3,tileNearby,-8,0,169,01303706
[WillieBGFix3]<tile>5,0192,0F003016,64,288,1,N
« Last Edit: June 23, 2021, 10:22:45 am by tygerbug »

mkwong98

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Hogan's Alley HD Project
« Reply #9 on: June 23, 2021, 10:55:02 am »
The correct way of combining two conditions together is this:

<condition>DadHairFix,spriteNearby,8,0,31,FF30270F
[DadHairFix&hmirror]<tile>0,30,FF30270F,416,480,1,N

I replaced FD with 30 because this is what I see in the PPU viewer When I run the game. And the replacement tile need to be flipped too in the png in order the be flipped back to the correct orientation when rendering.

The fix for Willie should be like this:
<condition>WillieBGFix1,tileNearby,8,0,166,01303706
[WillieBGFix1]<tile>5,1FF,01303706,32,288,1,N

<condition>WillieBGFix2,tileNearby,8,0,168,01303706
[WillieBGFix2]<tile>5,1FF,01303706,0,288,1,N

<condition>WillieBGFix3,tileNearby,-8,0,169,01303706
[WillieBGFix3]<tile>5,1FF,01303706,64,288,1,N
« Last Edit: June 23, 2021, 11:17:42 am by mkwong98 »

tygerbug

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Hogan's Alley HD Project
« Reply #10 on: June 23, 2021, 09:06:14 pm »
   Thank you, that really cleared things up for me!

   Download updated with those fixes.



 EDIT:   Three conditional backgrounds in mode 1 would help for Valerie. I've added that. Could do more but that was the most obvious. (Doing more would involve a lot more conditions.)
« Last Edit: June 24, 2021, 02:01:12 am by tygerbug »

tygerbug

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: Hogan's Alley HD Project
« Reply #11 on: July 16, 2021, 08:14:51 pm »
  I was doing two other Zapper hacks - Duck Hunt and Gumshoe - but did not finish them yet.

  Possibly as just ROMhacks playable on hardware.