Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: FuriousHedgehog on February 26, 2017, 07:29:41 pm

Title: [Help] Earthworm Jim for NES.
Post by: FuriousHedgehog on February 26, 2017, 07:29:41 pm
Well, this is my first post here in the forum (I did the hack called "Final Fight 3 Deluxe" for the NES and that was my first hack to be released to public, it was only text editing, sprites and palette changes, if anyone want to see it here's the link: http://www.romhacking.net/hacks/2948/), so...

I'm working now in a hack of Earthworm Jim 3 (The NES pirate port) by Hummer Team and published by NT, the point of the hack is change the palette of the game to be more accurate to the colors of the Sega Genesis (MegaDrive) version and redraw some sprites in the game and also some tweaks.

Here's a preview:

(http://i.imgur.com/Yg6jAYc.png)

The help that I need is how can I modify the HUD in-game to look more accurate to the original EWJ, and some inaccurate colors in a sprite, (like Jim hanging of a chain, part of his body looks blue like the suit), I made a mock-up how I want to see it:

(http://i.imgur.com/oqgxfhr.png)

A curious thing that I found editing the CHR is the percent sign (%) and the "X" indicating the number of lives and ammo but now unused, in the HUD fix that I want is use those signs to be more aesthetic.

(http://i.imgur.com/VgPc5Bp.png)

I don't know too much about Hex Editing than Text edition and palette change, this a thing that I want to do in some pirate games that can look not bad but with some changes can be a good port, like Sonic 3D Blast 5 that has now a great improvement in graphics and sound, Aladdin too with more responsive controls and more accurate music to the original SNES one, by the way I don't nothing about creating and putting new music to a nes game, I've seen that was too hard but if this game (Earthworm Jim 3) can get a full improvement would be awesome.

That's the things I need to explain, I hope that we can help me, thanks!

(My english can not be that good and it probably has some typos because english is not my first language.)
Title: Re: [Help] Earthworm Jim for NES.
Post by: Bobolicious81 on February 26, 2017, 09:19:50 pm
I'm not really able to help, but I'd just like to point out that whenever I see someone apologizing for English not being their first language, they're usually better than many native English speakers  :laugh:
Title: Re: [Help] Earthworm Jim for NES.
Post by: KingMike on February 26, 2017, 10:39:24 pm
As to "fixing" the HUD, do you know the NES has an 8 tiles per scanline sprite limit? (flickering happens as a necessary consequence of games that swap sprites on different frames to have more than 8 partially-visiable sprites)
Title: Re: [Help] Earthworm Jim for NES.
Post by: FuriousHedgehog on February 26, 2017, 11:08:16 pm
As to "fixing" the HUD, do you know the NES has an 8 tiles per scanline sprite limit? (flickering happens as a necessary consequence of games that swap sprites on different frames to have more than 8 partially-visiable sprites)
So there's another way to put the improved HUD away from this?
I need to know how anyway.
Title: Re: [Help] Earthworm Jim for NES.
Post by: KingMike on February 27, 2017, 12:27:54 am
The only way to do that is with sprites. (so thus 8 tiles (64 pixels) horizontally is your maximum)
To have a graphical HUD (like a status window covering the width of the screen) would require the game be written with that in mind, as it involves complicated shifting of the background layer. Not something you could easily hack in without rewriting the entire game, I think.
(that is NES only has one layer, Genesis and SNES could have a bigger HUD because they had more than one layer, and higher sprite limits as well, I think. SNES I'm pretty sure at least, not as familiar with Genesis.)
Title: Re: [Help] Earthworm Jim for NES.
Post by: FuriousHedgehog on February 27, 2017, 01:31:11 am
Yeah, that's what I'm saying, but I still want to know how can I move the position of any sprite (In this case the HUD uses sprites because is not a part of the background)?
Title: Re: [Help] Earthworm Jim for NES.
Post by: SpiderDave on February 28, 2017, 03:58:01 am
Well I didn't do *all* the work but here's what I did.  This is a "teach a man to fish" kind of thing so you can apply it elsewhere or to other gui elements.  Starting with the lives display:

I load up game in fceux, use the cheat search to find a cheat for the number of lives, It's in the ram at 0x03c5, I freeze lives at 09.
open up the PPU Viewer, see that the tile for 9 is tile 0x64.  I search for that in the cheat search, get a few results, I try freezing
a few of those and one of them makes the lives flicker (0x0251), so I guess it's part of the drawing routine.  I go into the debugger
and add a breakpoint for 0251, write.  It stops in 2 places, I look at them for a bit and see if I can find a reference to the lives, and maybe something that looks like a drawing location (0x20 and 0x50 maybe?).  The breakpoint that stops at 0x03ec49 (I have rom offsets checkbox checked) has some of this close to it, just above.
At 0x03EC34 I see this:
> 03EC34:AC C5 03  LDY $03C5 = #$08
  03EC37:A9 2C     LDA #$2C
  03EC39:9D 1B 02  STA $021B,X @ $0253 = #$68
  03EC3C:A9 28     LDA #$28
  03EC3E:9D 18 02  STA $0218,X @ $0250 = #$F8

The first line has our memory address for lives, the second and fourth lines look like drawing locations to me.  They are!

0x3ec38 x-position of lives
0x3ec3d y-position of lives

Ok, see if you guys can find the rest ;)

note: I'm using "EarthWorm Jim 3 (Unl) [a1].nes"
Title: Re: [Help] Earthworm Jim for NES.
Post by: Midna on February 28, 2017, 03:55:42 pm
Were you also going to redo the music to not sounds like wet farts? There's a hack of Somari, another Hummer Team game, that makes the music actually pleasant to listen to, so it's not that much of a stretch?
Title: Re: [Help] Earthworm Jim for NES.
Post by: FuriousHedgehog on March 10, 2017, 07:06:08 pm
Well I didn't do *all* the work but here's what I did.  This is a "teach a man to fish" kind of thing so you can apply it elsewhere or to other gui elements.  Starting with the lives display:

I load up game in fceux, use the cheat search to find a cheat for the number of lives, It's in the ram at 0x03c5, I freeze lives at 09.
open up the PPU Viewer, see that the tile for 9 is tile 0x64.  I search for that in the cheat search, get a few results, I try freezing
a few of those and one of them makes the lives flicker (0x0251), so I guess it's part of the drawing routine.  I go into the debugger
and add a breakpoint for 0251, write.  It stops in 2 places, I look at them for a bit and see if I can find a reference to the lives, and maybe something that looks like a drawing location (0x20 and 0x50 maybe?).  The breakpoint that stops at 0x03ec49 (I have rom offsets checkbox checked) has some of this close to it, just above.
At 0x03EC34 I see this:
> 03EC34:AC C5 03  LDY $03C5 = #$08
  03EC37:A9 2C     LDA #$2C
  03EC39:9D 1B 02  STA $021B,X @ $0253 = #$68
  03EC3C:A9 28     LDA #$28
  03EC3E:9D 18 02  STA $0218,X @ $0250 = #$F8

The first line has our memory address for lives, the second and fourth lines look like drawing locations to me.  They are!

0x3ec38 x-position of lives
0x3ec3d y-position of lives

Ok, see if you guys can find the rest ;)

note: I'm using "EarthWorm Jim 3 (Unl) [a1].nes"

To be honest I didn't understand a thing, how can I edit the 0x3ec38 and 0x3ec3d anyway?
Can you post some images for guide?
This is like my first time hacking in depth a nes game.

Btw the title screen was changed and the Groovy! screen too, now Jim have his green eye again.

(http://i.imgur.com/wT9YKaN.png)
Title: Re: [Help] Earthworm Jim for NES.
Post by: cartridge_rom on April 07, 2017, 12:42:31 pm
Greetings, I love his work with Earthworm Jim 3 :thumbsup:
You can contact with user "Ti" to make the musical cut of Earthworm Jim 3 and complete the patch, development the best musical cut of Sonic the hedgehog (Nes)
I have his final fight 3 deluxe that is fantastic thank you for your work
I hope you like these idea for your hack project
Title: Re: [Help] Earthworm Jim for NES.
Post by: RainbowDash321 on April 12, 2017, 05:36:53 pm
I see the pictures you a good on it. :) I can't wait to try it. I hope you make controls.
Title: Re: [Help] Earthworm Jim for NES.
Post by: sics on May 30, 2018, 08:37:07 am
 I hope it's not too late, I was researching about the Hummer ports and I came across your post. I attached 2 ips (https://mega.nz/#!mcpFWYwQ!_WmCqXpEgEdJsj3z3HM9H1UHA72yH1-N6iRQBYOlMMM) although they are not exactly the same as what you requested they are very close ;)

(https://orig00.deviantart.net/d31f/f/2018/150/e/6/earthworm_jim_ver_1_by_terwilf-dccydff.png)

I told you what I did, I went to the address that SpiderDave found and since I did not understand anything about his explanation, I replaced all the data with zeros, when the game was unraveled, I loaded a previous game and continued when I had a minimal idea of ​​how It worked alter your values ​​and you're done.

(https://orig00.deviantart.net/1d35/f/2018/150/a/7/cap_56_by_terwilf-dccydl9.png)

 The fundamental number here is the "9D" is next to all the important values. The easiest way to use it is to look for the most constant value in this case the palette that will always be 00, 01, 02, 03 + 9D. Osea "039D" for example, after finding it you modify the supposed value of palette to verify if it is and to which object it belongs, that's what you're looking for again 9D but this time up, to find the coordinates of Y that are just before of 9D, you repeat the same for X, etc ;)