Jump to content

Photo

Some help needed with a hopefully simple hack.

hack sprite ship help

20 replies to this topic

#1 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sat Jun 10, 2017 11:15 PM

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, Sun Jun 11, 2017 8:21 AM.


#2 CDS Games OFFLINE  

CDS Games

    Moonsweeper

  • 385 posts
  • Location:Pocono Mountains, Pennsylvania

Posted Sun Jun 11, 2017 12:04 PM

Shouldn't be too hard. Are you running the game in Stella?



#3 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sun Jun 11, 2017 12:10 PM

Shouldn't be too hard. Are you running the game in Stella?

No, I'm running it on the Harmony Cart. I can download Stella, though.



#4 CDS Games OFFLINE  

CDS Games

    Moonsweeper

  • 385 posts
  • Location:Pocono Mountains, Pennsylvania

Posted Sun Jun 11, 2017 1:23 PM

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.



#5 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Mon Jun 12, 2017 10:11 PM

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, Tue Jun 13, 2017 9:21 PM.


#6 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sun Jun 18, 2017 9:46 PM

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



#7 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,771 posts
  • Location:The land of Gorch

Posted Mon Jun 19, 2017 5:04 AM

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.

Attached Files

  • Attached File  Sos.bin   4KB   55 downloads


#8 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Mon Jun 19, 2017 9:01 PM

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.



#9 KevinMos3 OFFLINE  

KevinMos3

    Stargunner

  • 1,571 posts
  • Founder of the Timothy Dalton as Bond fan club
  • Location:Behind YOU!

Posted Tue Jun 20, 2017 5:38 PM

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.

 

Save Our Ship (Color & Graphics Hack).png

Attached File  Save Our Ship NTSC (Color & Graphics Hack).bin   4KB   52 downloads


Edited by KevinMos3, Tue Jun 20, 2017 5:40 PM.


#10 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Tue Jun 20, 2017 8:54 PM

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



#11 CDS Games OFFLINE  

CDS Games

    Moonsweeper

  • 385 posts
  • Location:Pocono Mountains, Pennsylvania

Posted Thu Jun 22, 2017 12:24 PM

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.



#12 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,771 posts
  • Location:The land of Gorch

Posted Fri Jun 23, 2017 7:58 PM

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.

Attached Thumbnails

  • picture 1.jpg
  • picture 2.jpg
  • picture 3.jpg
  • picture 4.jpg
  • picture 5.jpg
  • picture 6.jpg
  • picture 7.jpg
  • picture 8.jpg
  • picture 9.jpg
  • picture 10.jpg
  • picture 11.jpg
  • picture 12.jpg
  • picture 13.jpg


#13 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Fri Jun 23, 2017 8:25 PM

Thanks! If I can't manage it with these instructions there's something wrong with me. I'm going to give it a try right after I eat (Low blood sugar and computer screens don't mix well.). Thanks Nukey Shay! :thumbsup:



#14 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,771 posts
  • Location:The land of Gorch

Posted Fri Jun 23, 2017 9:06 PM

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.



#15 CDS Games OFFLINE  

CDS Games

    Moonsweeper

  • 385 posts
  • Location:Pocono Mountains, Pennsylvania

Posted Sat Jun 24, 2017 5:06 AM

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



#16 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sun Jun 25, 2017 12:06 AM

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, Sun Jun 25, 2017 1:44 AM.


#17 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,771 posts
  • Location:The land of Gorch

Posted Sun Jun 25, 2017 11:20 AM

The color for the playfield (COLUPF) is being stored at label LF76B:

Attached Thumbnails

  • picture 8a.jpg


#18 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Sun Jun 25, 2017 8:02 PM

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.  



#19 stephena OFFLINE  

stephena

    River Patroller

  • 3,294 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Sun Jun 25, 2017 8:55 PM

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.



#20 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,771 posts
  • Location:The land of Gorch

Posted Mon Jun 26, 2017 4:26 AM

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.

#21 RamrodHare OFFLINE  

RamrodHare

    Dragonstomper

  • Topic Starter
  • 584 posts
  • Lost in Time.
  • Location:Greeneville TN, USA

Posted Thu Jul 6, 2017 10:57 PM

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







Also tagged with one or more of these keywords: hack, sprite, ship, help

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users