Jump to content

simple mini-helmets question


ren6175

Recommended Posts

I have read through the stickys and threads that talk all about mini-helmets and hex addresses. On a basic level is it possible to "pull" a helmet out of one rom and insert it into another rom using hex editing? It seems from what I've read that this is impossible because each rom has its own tiles.

I want to take some of the college helmets that people have made to use in my college dynasty rom. Do I need to make them myself?

Thanks.

Link to comment
Share on other sites

This is something that I've tried to do - using BAD_AL's TSBTool and the 'SET' command (I made a spreadsheet, of course).

It is possible to pull the graphics (I have pulled mini-helmet graphics from different roms, with success, although sometimes I have seen a couple of glitches that would need to be manually fixed), but the palettes (colors) are another problem that I haven't figured out yet.

If I can figure out where in the mini helmet code the palette info is contained, I can get this mini-helmet-pulling thing going.

Does anybody have the info/addresses for each teams mini helmet 'palette' they use?

Link to comment
Share on other sites

The mini-helmet palette is:

x1A150 to x1A15F and x1A840 to x1A84F

The first offset are the main colors (4 groups) for the teams

The second offset are the special colors (4 groups)

So, what is the order of the teams which use a group? For instance, which teams does x1A150 to x1A153 hold the palette data for? (Same question for the 'special color' groups.)

Link to comment
Share on other sites

So, what is the order of the teams which use a group? For instance, which teams does x1A150 to x1A153 hold the palette data for? (Same question for the 'special color' groups.)

There is no order at all to which teams use which group. Each team's helmet design tells the game which color groups to use. My post below describes how it is setup. Let me know if you need more clarification.

viewtopic.php?f=22&t=4356

Link to comment
Share on other sites

So, if I go to these address x23C61 to x23CE8 in someone else's ROM those should be the designs for the different helmets?

More specifically, I have found several college ROM's with well designed helmets. I want to move some teams around, so I need to move the helmet. I know that the design is already there. So, can if I copy the hex values of the team I want over to the address of the slot I want to move the team to will it look right? (Actually, I will just try this I think)

Getting more detailed would I use a tile editor to pull the tiles out of a different ROM? Say someone has designed a helmet for Boise St. If I look at the ROM to find which team Boise St. is assigned to, then I should be able to find the address of tiles associated with that helmet by looking in the address from x23C61 to x23CE8? Then can I "copy" those tiles somehow? Using a tile editor?

Am I anywhere close to understanding this or am I speaking gibberish?

Link to comment
Share on other sites

from the topic above:

It just isn't that easy to explain. For changing colors, you only have 3 options and none of those are good.

1. You may change the number that affects the palette of the single helmet. Example, NYJ: BC BD 97 8B 3B. If you change the 3B to 38, 39, or 3A then the NYJ mini-helmet will change color and affect no other helmet. However, it only changes between the 4 palettes.

I don't get the 3B, 38, 39, 3A business. From the 'table' the values are 00, 01, 02, 03. BO_FB goes on to talk about :

here are 4 palettes:

00 = pink, silver-blue, and white

01 = grey, orange, and black

02 = white, dark blue, and yellow

03 = green, aqua, and white

So for the Jets, the 3B corresponds to the 03 pallette = green, aqua and white, right? So if I change the 3B to 39 I change the Jets to the 01 pallette = grey, orange and black?

I'm confused... :D how does changing the Jets 3B to 39 like setting their palette to 01?

On another note, about the addresses you listed in a previous post (x1A150, etc) - changing those will actually change the colors in the palette, right? :lol:

Link to comment
Share on other sites

I'm confused... how does changing the Jets 3B to 39 like setting their palette to 01?

the byte is bit packed so look at the binary representation:

7654 3210 = bit#

---------------

0011 1011 ($3B)

0011 1001 ($39)

only bit0 and bit1 are used for the palette index so

11 (bin) = 3 (dec)

01 (bin) = 1 (dec)

Link to comment
Share on other sites

Ok. There are four helmet color groups numbered x00, x01, x02, x03. However, some teams need a color not in those and must use special tiles placed on the screen.

These special tile groups are called upon using x04 to x3B [my post splits them up well for the original rom] instead of x00 to x03. Each special tile group has 4 calls (1 for each color group). So x04, x05, x06, x07 all call the same special tiles and a different color group.

For your question on how they relate to x00 to x03. When used the game ANDs the value with x03 (you can use windows calculator or whatever if you aren't familiar with the programming term).

x04 & x03 = x00

x05 & x03 = x01

x06 & x03 = x02

x07 & x03 = x03

x08 & x03 = x00 ...

Is this of any help? I would suggest altering a single helmet with various color values to see their impact (it isn't hard to see just explain).

On another note, about the addresses you listed in a previous post (x1A150, etc) - changing those will actually change the colors in the palette, right? :D

Yes, changing those will change the colors of the palette

Link to comment
Share on other sites

I answered the first part of my question. Using jstout's awesome table I was able to easily shift the helmets around to the spots I wanted. (I had never used a hex editor before yesterday.)

The special designs are marked at x23C52 to x23C60 and are designed at x23C61 to x23CE8.

Now to the second part of my question. Referencing the above addresses. If I load someone else ROM, should I be able to go to x23C61 to find the special tiles where the logos are stored? Again, say I want to find a helmet for BYU or Boise St. that someone else has made. I am guessing the game "looks" at x23C52 to see where to go to find the special logos. Then "goes" to the logos which are stored from x23C61 to x23CE8.

Is this at all how it works?

Link to comment
Share on other sites

so cxrom: since I'm only going to be editing your new 32 team rom from now on, what are any mini-helmet differences between it and the original?

--

I'm still working on figuring this out - manual labor: plug in byte and test, ad infinitum.

Link to comment
Share on other sites

Changing the 4th hex value won't do anything on the 32 team rom.

It looks like you (cxrom) used attribute tables for each screen where the mini helmets appear.

I have x425A as the team data location in my notes.

Link to comment
Share on other sites

Changing the 4th hex value won't do anything on the 32 team rom.

It looks like you (cxrom) used attribute tables for each screen where the mini helmets appear.

I have x425A as the team data location in my notes.

Yeah, something is weird, because trying to straight-up copy (say, the colts helmet) to an address where the NFC west is listed as being (x3F6C3) does not work right.

So GRG, start at x425A, 5 bytes per team?

Link to comment
Share on other sites

i kinda forgot i used a hardcoded attribute table for Preaseason, Team Control, and Team Data screens. here's what to look for:


TDAttTable:
.hex 000000000000000000000000080A0A02
.hex 3000550050000A00F0005500A500A500
.hex 2000500050000000F000F5005500FA00
.hex 00000200050000000000000000000000

PandTCAttTable:
.hex 000000000000000000005000000BAA02
.hex 0300550055005000FF0005005A005A00
.hex 2000500050000000F000F5005500FA00
.hex 00000200050000000000000000000000

here's a brief explanation on how attribute tables work.

Link to comment
Share on other sites

ok, I brought it up so I'll attempt to explain it

30005500

3-dolphins helmet

0-bills helmet

0-dolphins text

0-bills text

5-browns helmet

5 bengals helmet

0-browns text

0-bengals text

0 for the first 4 colors of the top palette

5 for next 4 colors

A for next 4 colors

F for last 4 colors

so if you change the 3 to a F it will fix the dolphins helmet error in the 32 teamer

the 4th bit in the mini helmets still controls the special tiles and bottom palette

Link to comment
Share on other sites

cxrom, what is it about the new 32 team rom where the mini-helmets look good (colors) on the 'standings' screen but not the others?

I've copied and pasted mini-helmets to move teams around (for a rom I'm working on) and there are serious color issues on the team data and preseason screens, but the conference standing screens are correctly colored...maybe that's what's causing alot of my misunderstanding with these minis - (I've been looking at the preseason team select menu when testing my mini-helmet changes)

Is this a bug that needs to be fixed, or am I possibly still doing something wrong?

Link to comment
Share on other sites

the team data, preseason, and team controls all have a hard coded attribute table. the rest of the screens with mini-helmets generate this attribute table at runtime.

the hardcoded data overwrites the runtime data before it gets copied to vram. i tried removing it and the screens get screwed up, so at this point it'd be easier just to update the attribute table data.

one byte of attribute table corresponds to an 8x8 tile area of the screen. in that byte, 2 bits are used for a 2x2 tile area, as an index into background palettes:


+---+---+---+---+
| a | a | b | b |
+---+---+---+---+
| a | a | b | b |
+---+---+---+---+
| c | c | d | d |
+---+---+---+---+
| c | c | d | d |
+---+---+---+---+

bits: %ddccbbaa

now take that 8x8 tile chunk and arrange them in another 8x8 grid and you have the whole screen.

goto $23C0 - $23FF of PPU memory and play around with the values with the Team Data screen open if you wanna get a better idea of what i'm talking about.

Link to comment
Share on other sites

goto $23C0 - $23FF of PPU memory and play around with the values with the Team Data screen open if you wanna get a better idea of what i'm talking about.

so I'm looking at the x23C0 area in the FCEUXD > Hex Editor > PPU Memory. I can change the bytes and see the effect.

How can I save changes made in this PPU Memory editor window? When I press 'save ROM as' it does nothing...(FCEUXD SP 1.07) - if it's not possible to save the changes from here, how can I mimic these PPU changes in a 'regular' hex editor? (because I don't really know what PPU means.)

I feel like I'm starting to get somewhere. :D

Link to comment
Share on other sites

the PPU is basically the graphics card of the NES.

so to save the changes, look for this data in the actual rom file:


TDAttTable:
.hex 000000000000000000000000080A0A02
.hex 3000550050000A00F0005500A500A500
.hex 2000500050000000F000F5005500FA00
.hex 00000200050000000000000000000000

PandTCAttTable:
.hex 000000000000000000005000000BAA02
.hex 0300550055005000FF0005005A005A00
.hex 2000500050000000F000F5005500FA00
.hex 00000200050000000000000000000000

grg said it was somewhere around 0x00425A.

now you'll wanna copy whatever data you wrote to PPU $23C0-$23FF ($40 bytes in length) over those two tables in the rom file. you'll need two slightly different tables since the the Preseason/Team Control screen is a little bit different then the Team Data screen. after that, save the rom and you should be good to go.

Link to comment
Share on other sites

ok, the preseason screen is looking better!

I'd like to start hacking the Team Data minis - would you mind telling me the PPU address range for the Team Data Screen?

Link to comment
Share on other sites

just open up the Name Table Viewer with whatever screen you wanna edit loaded:

post-4234-13413725152284_thumb.jpg

the red line is a divider i drew and corresponds to this, where in each cell:

top=tile data starting address

bot=attribute data starting address


+-----------+-----------+
| 2000-23BF | 2400-27BF |
| 23C0-23FF | 27C0-27FF |
+-----------+-----------+
| 2800-2BBF | 2C00-2FBF |
| 2BC0-2BFF | 2FC0-2FFF |
+-----------+-----------+

the NES only has enough ram internally to have two of these tables (tile data + att data), so the other two are mirrors of the first two. in this case mirroring = vertical, so $2000 and $2800 represent the same data. same goes for $2400 and $2C00. some carts are free to change mirroring modes at any time (TSB for one), but other cannot and have it hardwired on the cart (Super Mario Bros.).

Link to comment
Share on other sites

thanks man.

is there a way to get the actual ROM addresses (ie $425A, etc) from any info in these screens (instead of having to ask you where stuff is)? Or, is there any relation of a PPU address to a ROM address?

Link to comment
Share on other sites

unfortunately since i assemble the whole thing i don't know exact addresses. i should upload the most recent source so people can look through it to get an idea where certain data is.

you could use the code data logger. it'll highlight what's been accessed as data in blue and code in yellow. basically what i do to find data is start the logger before whatever i'm looking for is accessed. then stop the logger after i know it was accessed and just quickly look over the rom in the hex viewer for blue areas. change some values and see if it effected what i was looking for.

Or, is there any relation of a PPU address to a ROM address?

no the cpu and ppu have totally seperate ram. data gets transfered from CPU rom into the PPU ram by writing the destination address to $2006 (CPU) and writing data to $2007 (CPU). at most you'll find a data structure like this in rom:

[ppu address] [data byte0] [...] [data byteN]

some have the length of the data stream following [ppu address], some are fixed length, and others calculate the length. it really depends on what you looking for.

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.

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.

×
×
  • Create New...