Jump to content
IGNORED

7800 Commando colors, disassembly?


John Stamos Mullet

Recommended Posts

So now that Concerto carts are making their way into 7800 homes, there something I've had brewing in my mind for a while, but unsure where to start.

 

I'd like to do some color correction (at the very least) on 7800 Commando, so that those of us who game on newer LCD sets can play it with better looking, more arcade accurate color choices. I know it looks better on a CRT once warmed up, but I can't imagine it would look worse on a CRT if the values were changed just a tiny bit.
 

I'm sure this could be done at a very basic level with a HEX editor, and just changing a few Hex values where the colors are defined in code, but I don't know where to look. I don't know the hex value of the "green sand that should be tan/brown" to search for it. 
 

But I would also like to see if the character graphics can be hacked to look better, but not sure if a disassembly app or a hack-o-matic type program even exists for the 7800.

 

I searched a bit, but no commented disassemblies of Commando exist, that I could find.

Link to comment
Share on other sites

14 hours ago, John Stamos Mullet said:

So now that Concerto carts are making their way into 7800 homes, there something I've had brewing in my mind for a while, but unsure where to start.

 

I'd like to do some color correction (at the very least) on 7800 Commando, so that those of us who game on newer LCD sets can play it with better looking, more arcade accurate color choices. I know it looks better on a CRT once warmed up, but I can't imagine it would look worse on a CRT if the values were changed just a tiny bit.
 

I'm sure this could be done at a very basic level with a HEX editor, and just changing a few Hex values where the colors are defined in code, but I don't know where to look. I don't know the hex value of the "green sand that should be tan/brown" to search for it. 
 

But I would also like to see if the character graphics can be hacked to look better, but not sure if a disassembly app or a hack-o-matic type program even exists for the 7800.

 

I searched a bit, but no commented disassemblies of Commando exist, that I could find.

Commando looks best on a CRT from the start.  No warm-up necessary.

 

The issue with Commando is not warm up related which impacts most Hue $FX and $Ex.  A game example where 'warm-up' plays a factor is the ground of Choplifter!  The ground of Ikari Warriors is also another example.

 

The issue for Commando is Hue $1x range (which is not impacted by warm-up at all). On modern displays, the range of Hue $1x tends to lean more green if not completely green.  On a CRT, it displays as the intended gold(en) range, from brown <--> yellow.

 

If everywhere the value range of Hue $1x is changed to Hue $2x, the ground will appear more like NES Commando leaning orange-ish on a CRT, but would certainly be more muted and remove any green on a modern display.

 

As far as I know, no such disassembly of 7800 Commando exists that would help in this regard.

Link to comment
Share on other sites

Just now, Muddyfunster said:

Trebor, on PAL on a LCD I get more of a brown than gold, but not green. I guess that's because it's starting at $2x as PAL tends to be shifted by one range ?

Basically, the ground should be brown with tan 'dots', but brightness and contrast preferences of course will play a part.

 

The issue being mentioned here is referencing NTSC color palette (Sorry, should have made that clear). 

 

A quick glance at the game under PAL region and indeed it appears the $2x range under the PAL palette were leveraged for Commando's ground.

  • Like 1
Link to comment
Share on other sites

A full-blown disassembly isn't required for color hacks, but you do need a beginners grasp of 6502 assembly. The way I'd personally approach this task...

 

1. load up the game in the a7800/mame debugger

2. trap any writes to the Maria color registers, and run the game

3. look what values are being written to the registers, and figure out which ones you want to change. take note of the displayed disassembly and hex code for the load and store of the color you're interested in modifying. (t's possible the load will be from a table. if that's the case, note the table location and modify the desired table bytes instead, in the next step)

4. Open the rom in a hex editor and search for the hex code in question. If it occurs in several places, you likely want to change each one. It's probably duplicated due to the same color being used in different banks or different levels.

5. sign the changed rom using 7800sign.

6. run the modified rom to test it out

 

If anyone (who has basic 6502 assembly knowledge) wants to learn the debugger, taking on this project would be a nice way to start. I'd be willing to mentor.

 

  • Like 3
Link to comment
Share on other sites

6 minutes ago, ChildOfCv said:

Here's a Github that claims to have disassembled source for several games, including Commando.

https://github.com/OpenSourcedGames/Atari-7800

Those were taken from the Atari Museum,  as indicated in the Readme.

Curt Vendel (R.I.P.) recovered the files from disks in a dumpster many years ago. 

 

It's been awhile, but I don't believe that Commando source is complete or for the 7800...or a combination of both.

  • Like 1
Link to comment
Share on other sites

37 minutes ago, Trebor said:

Those were taken from the Atari Museum,  as indicated in the Readme.

Curt Vendel (R.I.P.) recovered the files from disks in a dumpster many years ago. 

 

It's been awhile, but I don't believe that Commando source is complete or for the 7800...or a combination of both.

Yeah, those source files under Commando appear to just be a bunch of program skeletons, and randomish data, without any actual game logic or anything like that. Even if I take the mostly sensibly named data files and search our roms for binary strings within, nothing turns up.

 

I did enjoy this little passive-aggressive tidbit from the included README2.DOC...

Quote

Feel free to telephone John Feagans at Atari (U.S.) at area  code 
(408)  745-4923  any  time you have a question  about  using  the 
software.   He  wrote the download program and the  transfer  rom 
code.   He's the one who did not write any support  documentation 
to go with his software.

 

  • Like 1
Link to comment
Share on other sites

On 12/31/2020 at 8:31 PM, RevEng said:

A full-blown disassembly isn't required for color hacks, but you do need a beginners grasp of 6502 assembly. The way I'd personally approach this task...

 

1. load up the game in the a7800/mame debugger

2. trap any writes to the Maria color registers, and run the game

3. look what values are being written to the registers, and figure out which ones you want to change. take note of the displayed disassembly and hex code for the load and store of the color you're interested in modifying. (t's possible the load will be from a table. if that's the case, note the table location and modify the desired table bytes instead, in the next step)

4. Open the rom in a hex editor and search for the hex code in question. If it occurs in several places, you likely want to change each one. It's probably duplicated due to the same color being used in different banks or different levels.

5. sign the changed rom using 7800sign.

6. run the modified rom to test it out

 

If anyone (who has basic 6502 assembly knowledge) wants to learn the debugger, taking on this project would be a nice way to start. I'd be willing to mentor.

 

I gave this the old college try, but alas, I can't even get the a7800 program to run correctly. I put the rom in the roms folder, I put the bios in the bios folder, I run the exe, and I get... a bunch of stuff that makes no sense. It asks me to choose a hot or cold palette - ok, then it says standard cart or high score cart, I chose standard, and then - I and get red and black rolling bars. No rom selection menu. Nowhere to choose the commando rom. I tried dragging the rom into the application window - nothing. I tried dragging the rom onto the exe file when it wasn't running - nothing.
 

I know this is based on MAME and mess and the file/folder structures in MAME/mess were pretty poorly designed, but this just doesn't seem to do anything. 
 

am I supposed to run it from command line? 
 

what would be the command to

Run commando with the debugger turned on and Maria writes being captured? The a7800 debugger site gives no code examples.

 

if I can get it to spit out the Maria color registers, I can probably find the corresponding values in a HEX editor, but I can't get that far. 
 

thanks.

Link to comment
Share on other sites

36 minutes ago, John Stamos Mullet said:

I and get red and black rolling bars. No rom selection menu

That's MAME for you - TERRIBLE TERRIBLE TERRIBLE ... wait, did I mention it's SHITTY, too? - UI design. A7800 inherits much of this, sadly.

 

Anyway, at the red and black bars, press TAB to bring up the menu to load an .A78 file.

  • Like 1
Link to comment
Share on other sites

3 hours ago, John Stamos Mullet said:

am I supposed to run it from command line? 
what would be the command to Run commando with the debugger turned on and Maria writes being captured? The a7800 debugger site gives no code examples.

Yes, it's easiest to launch the debugger via cli. An example command-line to launch in debugger mode is at the wiki, but I'll repeat it here...

mame64 a7800 -cart1 xm -cart2 digdug.a78 -debug

...or if you're using a7800 proper, then you can use...

a7800 a7800 -cart1 xm -cart2 digdug.a78 -debug

 

If you just want to look at the Maria registers, you can view the memory locations in question as the game runs.

 

You're right that there's no 6502 code examples. The guide assumes that you know 6502 assembly and that you know what registers or memory you're interested in. There are plenty of tutorials on 6502 assembly on the internet, and it's just a generic intro to the debugger for coders, not really how-to for hacking roms.

 

  • Like 2
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...