Jump to content
IGNORED

So... how does one hack colour?


Nateo

Recommended Posts

Perhaps the easiest way is to create a disassembly of the game using Distella...and then use notepad's search function to find areas of the program that modify the color registers (like COLUP0). Generally, the program will be fetching this data from another part of the program (the disassembly will tell you where this is by attaching a label to it). Let's assume that you search for a color register and one of the results points you to this part of a program (this is just an example...not part of a real game):

lda    LF980,x

sta    COLUP0

 

So what is happening here? The first instruction is grabbing a value from label LF980 PLUS whatever is in the X register and putting that value into the accumulator (think of labels as the address...in this case it would be address $F980...you can also search for these labels. If for example the X register contained a 3, it would be loaded from address $F983). Then that value is passed to player 0's color register (store the accumulator at COLUP0). So in this example, the colors are likely to be stored in a table at that address. Scrolling down a bit further to that label, you might see something like this:

LF980  .byte $00, $02, $04, $06, $08, $0A, $0C

 

There is the table that stores the range of colors used for that player object (in this example, from black to white). Keep in mind that the 2600 hardware does not use the first bit for color values...so the values are most likely to be even numbers.

So in our example where X=3, the value loaded into the accumulator would be $06

Link to comment
Share on other sites

You don't need to change X...the program will do that on it's own. You would simply change the byte values in the table (at address $F980 in the above example). So if you wanted dark red instead of grey, you could change that $06 to $40.

The point is that the color information can be anywhere in the game...you need to look at a disassembly to track the bytes down. They are not always in a table...and sometimes the table contains other values. Scroll down to look at the tables in Adventure's disassembly, for example (at The Dig). Other variables like location values, room numbers, etc., are mixed in with the color values.

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