Jump to content
IGNORED

How to find colors in Hack o Matic 3.0.3?


yuppicide

Recommended Posts

I've got Hack-o-Matic 3.0.3. I'm a little confused on how I search for a color to change. I read the color tutorial text file that came along with it, but don't understand it.

 

For example, could someone show me how I'd locate say the top green tree color in the beginning of Jungle Hunt?

Link to comment
Share on other sites

There are much better ways to do it than what I do, but I'll share my method anyway.

 

(I use Photoshop by the way).

  • First I take a screenshot of the game. I open that screenshot along with an image of the color palette that I made from a screen cap of the TIA Palette editor in HOM3, (it's the same color palette that I posted here).
  • I use the color picker in Photoshop to get the color I want to change from the screenshot. Then I match up that color with one on the color palette to find the color ID, (because Stella uses a slightly different palette, it's not an exact match, but you can tell the color ID pretty easily in most cases).
  • Now that I have the color ID that I want to look for, I do a Find in HOM3 or a hex editor, (both will accomplish the same thing at this point). HOM3 also has a button called Reading Highlight. If you use this, it will tell you how many instances there are of the value you're searching for. A hex editor such as Hex Workshop will do the same thing.
  • Here's where patience is sometimes required. Now just go through the binary changing the values one at a time and testing in an emu until you find the right one. Once you get used to it, you can usually get a pretty good feel for where the colors will be and you won't have to do much random picking. (I usually find the right place with only a few tries, but sometimes it takes longer). Color tables, on the other hand, are usually very easy to spot.

I've read about using Stella to find the colors rather than matching them up with a color picker, (like Photoshop, Gimp, etc.), but I didn't figure out Stella good enough to do that... and since the method I use works good enough for me, I wasn't too motivated to dig too deeply into Stella.

 

edit: In your example of Jungle Hunt, the color you want to search for is C4. Doing a find in Hex Workshop or a Reading Highlight in HOM3 shows there are 32 instances of this value. Now you just need to find which of those is the one you want to change. You're in luck with this example since there are only 32 to guess from. Some of these are obviously not what you need so it makes the picking much easier. The color you want is located at 0B92. :)

 

I made the top of the trees and the vines the same color as the background. Now our hero is floating in air! I'll let you find the color of the vines. ;)

post-9364-127956729135_thumb.png

Edited by KevinMos3
Link to comment
Share on other sites

Thanks for the information. While waiting for a reply, I did a little more investigative work.

 

I found that you can open Stella, load your game, hit ` key. This will bring up the debugger. Hit the TIA tab and in there it shows you the colors! Hit SCAN+1 and it'll scan for colors. I found that the color I needed was C4 I believe.

 

So, used the reading highlight and found 32 instances of C4 in Jungle Hunt.

 

So, now I'm going to try what you suggest to replace them one by one.

 

At least we know how to find colors easier than the Photoshop method.

Link to comment
Share on other sites

It works!!! I got bored of trying one by one replacing 32 instances, so I changed them all.. it changed the color I needed but added a game bug.. but anyway, I know it works, so now I'll go back to my one by one changing. Thanks a lot!

 

I already changed some of the sprites.

Link to comment
Share on other sites

I'm happy to help when I can. :)

 

You know?... I've done that before -- tried to use the debugger in Stella. I'm looking at the TIA tab right now and don't see where all the colors are listed. I only see 2 of the colors that are used. If I keep bringing up the debugger I get a couple of different colors, but I still don't get all of them (I've yet to get the tree tops color for example). :(

 

What am I missing?

post-9364-127956767858_thumb.png

I'm thinking that maybe the way I've been doing it (with a screenshot) is easier for me.

Link to comment
Share on other sites

Before I saw your post mentioned C4 and what address, I did what I told you.. pulled up debugger.. hit SCAN+1 a few times until the other values showed up. It then showed me C4.

 

I tried changing 0B92 to F4, but it didn't work. I'll keep going down the list.

Edited by yuppicide
Link to comment
Share on other sites

hit SCAN+1 a few times until the other values showed up. It then showed me C4.

Oh, DUH! I didn't realize what was happening when I hit scan +1. I never hit it more than once. Now I see that it's going down the screen and telling you the colors on each scanline. Thanks for pointing that out.

 

I tried changing 0B92 to F4, but it didn't work. I'll keep going down the list.

0B92 is the color of the trees on the first screen in the ROM that I have.

Jungle Hunt.bin

The tree tops in other screens is different though. Make sure you're in the right spot. If it doesn't say C4, you may have a different ROM than me.

Link to comment
Share on other sites

Think I figured it out. When I changed C4 to F4 I needed to click on another line to make the change happen.

 

What I was doing at work was changing to F4, saving, but wasn't really saving anything since I didn't click on a different line.

 

Onwards I go! :)

Link to comment
Share on other sites

There's a couple of spots in the program that expect that color values are within a certian range (so that later unconditional branches function correctly). Running a disassembly reveals all the spots where color values exist.

 

BTW the alternate binaries (including CCE's) for NTSC Jungle Hunt do not code shift (i.e. colors in wrong spots). Only 50hz PAL does. Using a disassembly, you could create a 50hz PAL version that does not code shift.

JngleHnt.zip

Link to comment
Share on other sites

I've changed what I wanted on the first level.. started doing the second level. Changed some stuff already.. am I able to save my state in Stella, go into HOM3 change a value, load state? Will that show differences if I keep doing that over and over?

 

Also, what do I use to compare to bin's.. File Comparison from download.com will not work. It just beeps at me then hangs up.

Link to comment
Share on other sites

I've changed what I wanted on the first level.. started doing the second level. Changed some stuff already.. am I able to save my state in Stella, go into HOM3 change a value, load state? Will that show differences if I keep doing that over and over?

 

Also, what do I use to compare to bin's.. File Comparison from download.com will not work. It just beeps at me then hangs up.

Form the commandline you can just do a binary comparison FC /B <file 1> <file 2>, but of course HOM 3 will allow you to compare the currently loaded binary with another and provide a report with links to the changes. Just go to File->Compare Files.

 

-Jeff

  • Like 1
Link to comment
Share on other sites

Oh snap! Beautiful!

 

 

 

I've changed what I wanted on the first level.. started doing the second level. Changed some stuff already.. am I able to save my state in Stella, go into HOM3 change a value, load state? Will that show differences if I keep doing that over and over?

 

Also, what do I use to compare to bin's.. File Comparison from download.com will not work. It just beeps at me then hangs up.

Form the commandline you can just do a binary comparison FC /B <file 1> <file 2>, but of course HOM 3 will allow you to compare the currently loaded binary with another and provide a report with links to the changes. Just go to File->Compare Files.

 

-Jeff

Link to comment
Share on other sites

Yeah, thanks for pointing that out. I was able to compare my new .bin with the original and find an error I made. Level 2 is now complete.

 

I've changed what I wanted on the first level.. started doing the second level. Changed some stuff already.. am I able to save my state in Stella, go into HOM3 change a value, load state? Will that show differences if I keep doing that over and over?

 

Also, what do I use to compare to bin's.. File Comparison from download.com will not work. It just beeps at me then hangs up.

Form the commandline you can just do a binary comparison FC /B <file 1> <file 2>, but of course HOM 3 will allow you to compare the currently loaded binary with another and provide a report with links to the changes. Just go to File->Compare Files.

 

-Jeff

Link to comment
Share on other sites

I was just about to suggest that. This can be done quick'n'dirty by just editing the equates at the top of a disassembly. Change these:

 

RESM0 = $12
ENAM0 = $1D
HMM0 = $22
CXM0P = $30

 

...to these:

 

RESM0 = $12+2
ENAM0 = $1D+2
HMM0 = $22+2
CXM0P = $30+2

 

Both vines will be solid colors instead of getting the mix from your player.

Edited by Nukey Shay
Link to comment
Share on other sites

I was just about to suggest that. This can be done quick'n'dirty by just editing the equates at the top of a disassembly. Change these:

 

RESM0 = $12
ENAM0 = $1D
HMM0 = $22
CXM0P = $30

 

...to these:

 

RESM0 = $12+2
ENAM0 = $1D+2
HMM0 = $22+2
CXM0P = $30+2

 

Both vines will be solid colors instead of getting the mix from your player.

I just tried these changes on your disassembly, and the vine now seems to be moving around by itself.

 

Edit: I must have missed RESM0, seems to work now.

 

 

I changed a couple of other things in my hack too. I remember hacking some of the gfx so that the Hunter doesn't have his hat bleed it's colors on his toes while he is swinging. I also changed the color in a few places to keep the jungle bush colors (below the vines) the same as the original, and have both vines as the same color. It was a while ago and I had to look at my disassembly to see what I had done.

Link to comment
Share on other sites

Has it been confirmed that storing to hotspots was the reason it crashes on FB2? Seems like quite a number of games do that. :?

 

 

The exact explanation turns out to be something a little different. Batari mentions it here. The storing to hotspots causing bus contention was the original best guess, as a lot of the games that crashed on the FB2 did this (i.e. H.E.R.O.).

Link to comment
Share on other sites

After finding a few colors earlier, I couldn't seem to stop. I always liked the Jungle King hack, so I thought I'd make the colors closer to the arcade. I really prefer the original colors better, but the intent of this hack was to make it more like the arcade. Of course I had to take some license here and there.

 

Thanks Nukey and Omegamatrix for posting about the vine color issue. Those are both good fixes. Nukey, yours makes the color of the vine the player is on share the color of the top layer of the grass for some reason. I don't have a picture to explain what I'm saying, but basically the grass is made up of 4 colors, (two for the upper portion and two for the lower portion). Anyway, the upper portion shared the color of the vine after making your change and I previously had the vine yellow-beige and the upper grass pink. Omegamatrix's fix did not do this, so I used his fix.

 

So anyway, I went back and made the sprite and color edits a second time and here is the result:

Jungle King (VineFix).bin

 

And some screenies:

post-9364-127962032892_thumb.pngpost-9364-127962031468_thumb.pngpost-9364-127962029904_thumb.pngpost-9364-127962028434_thumb.png

 

post-9364-127962043309_thumb.pngpost-9364-127962041308_thumb.pngpost-9364-127962039635_thumb.pngpost-9364-127962038327_thumb.png

 

Note: I combined the girlfriend with the ooga booga screen to save on screenshot real-estate here. She does not actually appear on the same screen in the actual game.

 

A big THANK YOU to both Nukey and Omegamatrix for the vine fix. Also to Jess Ragan for the inspiration for a Jungle King hack in the first place. Now the thing that would make Jungle Hunt perfect is the addition of music, like espire8 did with Moon Patrol. :)

Edited by KevinMos3
Link to comment
Share on other sites

Someone above mentioned the scanline advance button. Just thought I'd mention that while you can continuously click it, there's also a keyboard shortcut for it (for prolonged usage), as well as for the other buttons:

 

Scan+1 -> scanline advance -> Alt-l/Cmd-l

Frame+1 -> frame advance -> Alt-f/Cmd-f

Step+1 -> Step instruction -> Alt-s/Cmd-s

Trace+1 -> Trace instruction -> Alt-t/Cmd-t

 

Also, there's a little 'scanline position' indicator that becomes visible in the TIA output once you advance into the viewable frame area. When you start the debugger, it's likely to be hidden, as it's in the HBLANK area at that point (unless of course you enter the debugger on a conditional breakpoint midstream in a scanline).

Link to comment
Share on other sites

Nukey, yours makes the color of the vine the player is on share the color of the top layer of the grass for some reason.
The ball sprite shares whatever color is currently used for the playfield pixels. This is most noticable in games that feature a vertically-moving sprite made from it (i.e. Adventure, Breakout...)

Omega had saved a few bytes to squeeze in an additional color store to the playfield, which is how the color is able to be altered to the grass color after the vines had already been drawn.

 

And there are plenty more bytes in the program to be saved ;) Maybe enough to be able to hack in the missing monkey if cycle time is OK. The player1 sprite is not used on the screen currently, and a vector to hold the additional sprite is available for use. The vine screen was always too easy as-is IMO.

Link to comment
Share on other sites

Here's another binary. I changed the jumping animation to more closely resemble the arcade. Now he leans slightly forward and has his arms behind him when he jumps. The running animation needs some work. Right now, it's just the stock Jungle Hunt sprite with hair instead of a hat and the belt-line filled in.

 

Oh, by the way... the colors look fine in stella, but they look pretty bad on real hardware. You can hardly see the loincloth in the jumping and running scenes and the waves are almost invisible in the swimming scene. (At least on my TV which I have adjusted to look good with most games).

Jungle King (4-21-2010).bin

Link to comment
Share on other sites

Still looking at this disassembly. I'm currently over 300 bytes saved by using the missile trick to hide the border - to eliminate the necessity for HMOVEs on all lines...with animation added for the rock stage (showing rolling rocks and point values). I'll post it here once all the color locations/values are labelled for easy changing :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...