Jump to content
IGNORED

Some help needed with a hopefully simple hack.


RamrodHare

Recommended Posts

Hi guys,

 

Let me start off by saying, I have no idea how to even begin doing a hack. (if that didn't scare you away from this thread, them maybe you can help me.) :)

 

What I'm looking to do is change the color of the ship in Save Our Ship (NTSC version). The NTSC versions have a very bright and colorful ship. I would rather it be more of a brown color like the PAL versions, so that it's easier on my eyes and looks more like a wooden ship.

What I'd like to do, is get information on how to go about this with the least amount of knowledge (right now, being zero).

Of course, if someone thinks it would be easier to do this for me, than to explain to an idiot how to do it, then that's fine too... So,is there a simple way to show an idiot how to change the color? Then by all means, share your knowledge. If on the other hand, it's too complicated and you are feeling generous, I'd be very happy with someone else doing the work for me. It's up to you. :-D

Edited by RamrodHare
Link to comment
Share on other sites

For me, Stella is the easiest hacking platform, but plenty of others may disagree.

 

If you want to have at a go at hacking it yourself, download Stella and have the game file ready and I'll show you how to find where the colors are set and change them to whatever you want.

Link to comment
Share on other sites

Currently the only computer I have availible is my tablet. I can't find an Android version of Stella.

 

Update, I now have my old Windows XP laptop up and running, but I'm not sure for how long. it has a very noisy hard drive and I don't think the fan is working anymore, LOL :P

I'm installing Stella right now. :-D We'll see if it runs long enough to accomplish anything.

Edited by RamrodHare
Link to comment
Share on other sites

OK, I couldn't make and progress on my own. Would anyone be kind enough to work on the colors for me? My issue is that the boat and background are too bright and it gives me a migraine when I try to play it for more than a few minutes. If someone could make the boat shades of brown and possibly do something with the sky, it would be great. If the promise of a couple of dollars by Paypal will help, I can do that. I just have to run to the bank and deposit some cash in the morning. Also, if anyone is interested in making a few bucks here and there, I might have some other games I need the colors tweaked a bit. :-D

I'm guessing most people either have the rom or can download it easily. If not, let me know and I can send it to you. :)

Link to comment
Share on other sites

This? I have a detailed explanation on how easily this was done (right inside Stella itself, I even save the hacked rom from there)...but I won't go into it if you are not interested and just want to play the thing.

Thank you for hacking the colors for me. I am VERY interested in being able to do this myself. Stella is completely new to me. I'm eager to learn though. There are quite a few games that I would really like to change the colors on. If it's not too much trouble, I'd really appreciate any info on the process that you can give me.

Link to comment
Share on other sites

I tinkered with it a bit. Didn't know what to do with those symbols on the sails, so I left those colors as-is.

 

Thanks! That looks NICE! I think it was really just the boat that was giving me a headache. I've got a bunch of games you hacked and they all look SO much better than the originals.

I really like this game, but I feel like it needed a few tweaks. The colors being the worst complaint. I really want to learn how to do some simple hacks myself, like changing colors, modding player shapes (your pirate, or whatever he is) and tweaking collision detection (like expanding the "HIT" area on this game to make it a little more forgiving). I'm just using this game as my starting point, since it's one I like. Right now though, I just want to focus on learning how to change the colors. I'd like to eventually have the knowledge to program a simple game (or at least hack an existing one.) Before I joined the forums at AA, I had an idea about hacking Berserk into a Dr. Who game. Of course once I started doing some searching, it turned out it had already been done (and quite well I might add).

 

Do you use Stella for your hacking or something else? I'm interested in learning how to do things with Stella, but I'd never even used it until a couple of days ago (after CDS mentioned it) and I have no clue where to start. I hope to hear back from Nukey or CDS, but my online hours don't overlap theirs, so if you have any pointers, I'd be interested in reading them. Thanks again for the color fix! :thumbsup:

 

Someone has probably posted a "How to" on changing colors and stuff, but my searches haven't pulled anything up, so if anyone has a link to them, that would be helpful too. ;-)

Link to comment
Share on other sites

Sounds like Nukey has detailed instructions to post, so I'll just cover some general basics in the meantime. Open the ROM in Stella and switch to "debugger" mode (on my Mac it's the tilde key). Select the TIA tab so you can watch all the graphics registers, and use the Scan button on the top right to advance through the screen.

 

Basically, you are going to advance through the screen and keep an eye on the color registers (COLUP0, COLUP1, COLUPF, COLUBK). Those tell you what the registers are currently set to.

 

When you get close to the color you want to change, watch those registers carefully for when it shows up. Back up one scanline, and then use the Step key to slowly work your way through the code and find out what is changing the color. The register itself will be set by the corresponding COLU command, but then you have to figure where that value came from to begin with. It gets a little complicated depending on the programming tricks used, but generally there's a data table with the color values in it.

 

Once you find that table then you can change the values however you like.

  • Like 1
Link to comment
Share on other sites

Locating color changes using Stella:

 

Load the game ROM. You may choose to play through it a bit so that Stella has a more-detailed disassembly built in its memory - program code and data tables are labelled as the emulator initially encounters them.

 

Open the debugger window by hitting the tilde key (~). First you must figure out what screen elements are used to create the image you want to recolor. Stella has a "fixed color mode" so that each is shown with a specific color (HMOVE lines are white, background is light grey, playfield pixels are dark purple, etc). Right-click the screen image and choose "Toggle fixed debug colors" (picture 1).

 

Use the "Frame +1" button on the right border for the change to appear (picture 2). You can see that nearly all of the "sky" area uses the background register (COLUBK), while the ship and sails are using the playfield register (COLUPF). Toggle the fixed colors off and advance another frame to restore the original colors.

 

Move the pointer to the spot where you want to replace the color...right-click and choose "Fill to scanline" (picture 3). The program code window will show you the kernel instructions that are being executed currently at that point of the image...anything below this point will be shown in monochrome color. You can use the "step" button to zero in on the exact scanline that the color change is desired (picture 4). NOTE: the little white dot in the image represents the current location of the electron gun that would be building the image on a television screen. Notice that COLUBK is getting its value from label LFF80. The ",X" indicates that the X register is being used as an index (CPU registers are displayed in the top center of the debugger). X currently holds the value of $15...so the background color for this specific scanline is coming from address $FF95 ($FF80 + $15).

 

Use the sidebar in the program code window to scroll to the address (picture 5). Double-click the values to change them one-by-one (picture 6). You must use the primary enter key on your keyboard for the value change to be accepted, the keypad enter key does not. In this example, $FFA0 is the start of a new label, so I did not change those values.

 

Hit the "Frame +1" button to advance the program to begin using the new values you entered (picture 7).

 

Next, do the same procedure with the ship. It's solely made up of playfield pixels, so you will be looking for COLUPF changes. Right-click the image at the start of the ship area and fill to scanline (picture 8).

This one is a bit tricky...it's showing you the color store in the program window, but not where that value was coming from. So use Frame +1 to advance a screen and try again (this time slightly higher of where the color change is due). Use the Step button to slowly follow the program flow to where LF76B was branched to. In this case, it was a loop...the color value is coming from address LFC2E + the X index of $05, or $FC33 (picture 9).

 

As before, scroll using the sidebar to the color values to change them (pictures 10 & 11). Use the Frame +1 button to examine your edits (picture 12).

 

The game ROM can then be saved by right-clicking the program area window and choosing "Save ROM" (picture 13). This creates a new file...the original will not be altered.

post-222-0-16451900-1498269328_thumb.jpg

post-222-0-36261400-1498269354_thumb.jpg

post-222-0-65477600-1498269374_thumb.jpg

post-222-0-92456600-1498269383_thumb.jpg

post-222-0-86424500-1498269402_thumb.jpg

post-222-0-97069100-1498269409_thumb.jpg

post-222-0-15874500-1498269427_thumb.jpg

post-222-0-82181300-1498269441_thumb.jpg

post-222-0-02960900-1498269452_thumb.jpg

post-222-0-04489200-1498269469_thumb.jpg

post-222-0-79333800-1498269480_thumb.jpg

post-222-0-26549900-1498269492_thumb.jpg

post-222-0-16051500-1498269511_thumb.jpg

  • Like 4
Link to comment
Share on other sites

Once you find that table then you can change the values however you like.

Not always possible (data tables sharing values, a loop counter or something equally critical being used as a color value, etc). Color values coming from RAM addresses, especially via indirect(Y), can take a lot of effort to figure out. Fortunately, the game above is rather straightforward under the hood.

Link to comment
Share on other sites

Not always possible (data tables sharing values, a loop counter or something equally critical being used as a color value, etc). Color values coming from RAM addresses, especially via indirect(Y), can take a lot of effort to figure out.

 

For sure. Like where the color is set to black after a whole bunch of other stuff zeroed out at the same time:

 

LDA #00

STA NUSIZ0

STA NUSIZ1

STA COLUBK

Link to comment
Share on other sites

OK, I'm happy to report that, while I don't have much of a grasp on what's going on, I was able to follow along with the instructions to get the desired results. I think my issue is just the fact that I'm not 100% sure what's happening, since I'm not familiar with the code or how it works. What I did figure out, purely by accident, is how to change the symbols on the sails, so that's something, I guess. I understand the concept of the colors and I understand changing the number. The part that confuses me is

 

"Use the Step button to slowly follow the program flow to where LF76B was branched to. In this case, it was a loop...the color value is coming from address LFC2E + the X index of $05, or $FC33 (picture 9)".

 

Where or how, did we come to LF76B? I have a feeling that I'm just not looking at the right thing on Stella. Also, I'm using a newer version 4.7.3, in case that matters. OK. I think what I'm missing is what I'm looking for in the top right corner there. If I keep messing with it, I'll probably figure it out, but if someone wants to add a bit of detail as to how to use what's being shown there, that will probably help me along. I know I'm missing something simple and I'll probably slap myself once I notice it or someone points it out.

 

I just hit another snag. My version of Stella isn't giving me the option to save the rom.... :(

 

​* OK, figured it out, you have to use the command prompt on this version.

Edited by RamrodHare
Link to comment
Share on other sites

OK. Thanks Nukey Shay! I've got a lot to learn, but I feel a little less intimidated by it now. I at least have a basic understanding of the colors and how to find and change them.

I have been working on editing the symbols on the sails too. I just haven't been able to decide what to change them to. That part is really straight forward, so I don't think I need any help there..

My question now is, how does collision detection work on this game? For instance, if I make the top row of pixels, "the enemies Hats", wider (just like editing the sail symbols), does the collision detection also change with this, or is there more to it than that? ( I've already tried it, but I'm not sure if it did anything or not, that's why I'm asking..) I also changed the pixels on the enemies so that they climb- "left hand, right hand", as they go up the ladders. Since they aren't centered on the ladders, it's not a huge improvement.

Link to comment
Share on other sites

Make two items collide, and then look at the 15 collision registers in the TIA tab. If the relevant one is activated, then the game is using hardware collisions, and after modifying the graphics, the collisions should still work. If the game isn't using hardware collisions, then it's much more complicated.

Link to comment
Share on other sites

It's using hardware collisions (CXPPMM)...so changing sprite shapes can make things easier or more difficult, depending on the new size of the shapes. Following the bad press certain games received for unforgiving collision-detection (as hardware detection tends to be), it seems that more and more games began to rely on relative positioning instead - subtracting the character's X/Y position with that of the opponent and registering a hit only when it's within the hitbox size the game allowed.

Link to comment
Share on other sites

  • 2 weeks later...

I 'm trying to help out another forum member, using what I learned here to change the player color on Aquaventure. Unfortunately, I'm a horrible student, because I can't find the player color location. I know the color is 86 and I want to change it to 00, but I can't track it down. Any tips on what I'm not doing correctly? :? Also, is there any kind of manual that I can use to learn this stuff without having to bug other members here all the time? :P

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...