News:

RIP GoReds

Main Menu

New RBI Rom

Started by jggames, 02/13/05, 07:46:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jggames

Weird, anybody else having this problem?

nightwulf

Quote from: jggames on 02/16/05, 11:04:04 AM
Nice work nightwulf! I can't remember if RBI measured the distance of the homeruns or not. Anyway in family stadium it measures them, but in meters. Is there a way to convert that? If there is, I can go ahead and change the wall distances on the home run walls on each stadium.

Well, as BeefMaster pointed out, the original RBI did not display homerun distances. RBI 2 and 3 did, and although the games appear vastly different from the original, the codebase is very similar. I started looking in the FS90 ROM to determine how homerun distances are calculated, and all I've got so far is a giant fucking headache. If you're not familiar with binary math, well, it's about as enjoyable as watching Tubgirl. So, I loaded up RBI 3 and I've already noticed some striking similarities as to how homerun distance is displayed, so I may be able to solve this using the time-tested method of "guess-and-check." If I start planting routines from RBI 3 into FS90, eventually I'll find the right one.

Quote from: jggames on 02/16/05, 11:04:04 AM
Is there a way by looking at the ASM code to find out where the one letter team abbrev is located in the rom? When it shows the scoreboard in between innings it still shows the old team letter. I couldn't find out where those damn things were or I would have changed them.

Sorry, I completely forgot about this. Stay tuned, it shouldn't be hard to find ...

Nightwulf

nightwulf

Well, I have an answer regarding the team icons displayed on the scoreboard, but unfortunately I'm sure it's not what you'd like to hear.

This is an image of the contents of the PPU (picture processing unit) of the NES while the scoreboard is displayed on-screen. (It's a relatively large image, so I've linked rather than attached it). You can see the tiles used for the team icons in the lower part of the left-hand side. For most teams, only one tile is used, followed by tile 0xDE (the space below the 'W' tile).

So, really about the best I could recommend is that you redraw those tiles using a tile editor. That'd only give you one 8x8 tile per team icon, which sucks, but that's how it's coded. There also doesn't appear to be any free space to include a second tile for all fourteen (sixteen?) teams. One possible solution would involve using the 26 alphabet tiles shown in the right-hand side of the image. I'll have to do some research about selecting PPU memory banks and see about making those tiles accessible, and possibly changing palette attributes of those tiles to have them displayed correctly on-screen.

Nightwulf

jggames

Nice work. That's how I find alot of the text is by doing that same thing(taking a snapshot of the PPU. I knew those were the tiles being used but couldn't find them because I was just looking for one hex byte(Kind of impossible looking for all the "DE's" in the game and changing them until you find the right one). Now that you gave me the tile it is followed by, I might/should be able to find them. I'll take a look at it tonight.

Last night I took a look at the opening screen trying to change it to say RBI..something and I couldn't even find the hex for that. I did just what you did and looked at the PPU at the opening screen and still could not find it. I thought that would be easy to find. If you come across where that is stored in the rom then please let me know. Also, any thoughts on a rom name are welcomed. Hacking the opening screen is kind of time consuming so once it's done it probably won't be done again.

nightwulf

Even worse ... if you had changed all the 0xDE's in the ROM, you still wouldn't have found the right one. ;)

I went a little further with this, setting breakpoints when the PPU was updated at the exact location of the team icons. Here's what you're looking for:

0x18060> 0A 1E 0B 1E 0C 1E 0D 1E 0F 1E 0E 1E 11 1E 12 16
0x18070> 12 1E 14 1E 13 1E 15 1E 17 1E 10 1E 18 1E 19 1E

This data is used to select the team icon on the scoreboard. The first two bytes (0x18060-1) are used for team 0 ("G " icon), the second (0x18062-3) for team 1 ("C " icon), and so on. The catch? 0xC0 is added to the number stored in ROM to produce the tile number displayed. What a pain in the ass ...

Nightwulf

jggames

Nice work. I would have never found that. I wish I knew some ASM so I could have more fun hacking nes games. VB just doesn't get you too far in the nintendo world.

Gantry

It's never too early to learn my friend.  Someone needs to take my place, since I'm so damn lazy....

nightwulf

Quote from: jggames on 02/17/05, 08:28:47 AM
Last night I took a look at the opening screen trying to change it to say RBI..something and I couldn't even find the hex for that. I did just what you did and looked at the PPU at the opening screen and still could not find it. I thought that would be easy to find. If you come across where that is stored in the rom then please let me know. Also, any thoughts on a rom name are welcomed. Hacking the opening screen is kind of time consuming so once it's done it probably won't be done again.

This time, 0x60 is added to the tiles. The logo itself is 24 tiles wide by 10 tiles high.

0x14128> 00 00 00 01 02 03 04 05 06 00 00 07 08 00 00 00 00 00 00 00 00 00 00 00
0x14140> 00 00 00 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 00 00 00 00 00 00 00 00 00
0x14158> 00 00 00 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 14 00 00 00 00 00 00 00 00
0x14170> 00 00 00 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 00 00 00 00 00 00
0x14188> 00 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 43 00
0x141A0> 00 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 57 59 00
0x141B8> 5A 5B 5C 5D 5E 5F 60 61 00 00 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 00
0x141D0> 00 6F 70 71 72 00 00 00 00 00 00 00 00 73 74 75 76 77 78 79 7A 7B 00 00
0x141E8> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7C 7D 7E 7D 7F 00 00
0x14200> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 81 80 81 00 00 00

You've probably noted this already, but just to be thorough ... the "fade-in" effect of the title screen is accomplished simply by palette swapping, and not by different tiles. You'll want to note this when redrawing tiles.

Nightwulf

jggames

cool. I check it out this weekend.

jggames

I updated the opening screen. I just called it RBI LEAGUE for lack of a better name. If anybody wants to change it, it shouldn't be to hard in TileLayer Pro.

jggames

I have to more road blocks I've run into. The first is that I can't seem to find the pallette  used for the teams on the select pitcher screen(screenshot attached). It's not the same as the select team screen. On the select pitcher screen for Texas it uses "11" for the blue color. On the other screen the blue is "01". I have no idea where it's getting the pallette from.

My second problem is that I can't find the tiles for the team recap screen(screenshot attached). At the top of the team recap it says some japanese word followed by "EGAC". I can't find where these tiles are stored. When I do I'll change it to say something else.

Any help on these two problems would be great.

nightwulf

Quote from: jggames on 02/21/05, 01:05:47 AM
I have to more road blocks I've run into. The first is that I can't seem to find the pallette  used for the teams on the select pitcher screen(screenshot attached). It's not the same as the select team screen. On the select pitcher screen for Texas it uses "11" for the blue color. On the other screen the blue is "01". I have no idea where it's getting the pallette from.

Originally, the palette data is loaded from this location:

0x12E6D> 0F 01 20 10  0F 20 10 00  0F 20 10 00  0F 28 11 01

Now, look at the data at this location:

0x12F7A> 80 26  84 16  88 11  8C 19  94 28  90 11  9C 11  B0 16
0x12F8A> A0 11  A8 19  A4 16  AC 11  B4 14  98 26  B8 14  BC 14

There are 32 bytes here; 2 for each of 16 teams. The second byte of each pairing is which palette color to use for that team. 0x26 for team 0, 0x16 for team 1, and so on. See the two "10 00" sequences in the above palette? The palette color for the visiting (player 1) team is copied over the first, and the palette color for the home (player 2/CPU) team is copied over the second. For example, if player 1 chose team 3, and player 2 chose team 5, the actual palette sent to the PPU would look like this:

0F 01 20 10  0F 20 19 19  0F 20 11 11  0F 28 11 01

The palette for the next screen (what is it, lineup changes? something like that) is similar. The palette data is originally loaded from this location:

0x13322> 0F 01 20 10  0F 0F 24 0F  0F 20 01 29  0F 28 11 01

The palette is then modified in the exact same manner (and using the exact same data) as above.

My only concern here is that some of the data is found twice in the ROM. The "select pitcher" palette is found at both 0x12E6D and 0x137B6. In finding this information (with the help of a 6502 debugger), it definitely was using the data at 0x12E6D. However, the palette at 0x137B6 has to be used somewhere, so any changes you make to one should probably be made to the other.

The information by team was also repeated (almost) at 0x12F7A and 0x180AE. They're not quite exactly the same. The data for the first 14 teams (which is all that can be selected from the team select screen) is identical, but the data for the last two teams is not. Again, although I'm sure the data at 0x12F7A was used in my observations, making changes to both sections is probably the way to go.

Nightwulf

nightwulf

Quote from: jggames on 02/21/05, 01:05:47 AM
My second problem is that I can't find the tiles for the team recap screen(screenshot attached). At the top of the team recap it says some japanese word followed by "EGAC". I can't find where these tiles are stored. When I do I'll change it to say something else.

The Japanese word and what you see as "EGAC" come from two very different areas. I'll tackle them individually ...


The Japanese word is stored and copied verbatim in the ROM. The image itself is 6 tiles wide by 2 tiles high.

D4 D6 D8 DA DC DE
D5 D7 D9 DB DD DF

These are found in the ROM at the following locations:

0x3498> D4 D6 D8 DA DC DE
0x34B8> D5 D7 D9 DB DD DF



The "EGAC" is a huge pain in the ass. The image is 4 tiles wide by 2 tiles high.

C4 C6 C0 C2
C5 C7 C1 C3

There are actually only two bytes in the ROM that can be changed here. The first tile in the top row is located at 0x14621 (default 0xC4), and the third tile in the top row is located at 0x14626 (default 0xC0). The remaining six tile numbers are calculated numerically (the tile directly to the right is (original tile number+2), and each tile in the second row is (tile number directly above it+1)). Yuck.

Nightwulf

jggames

thanks. I fixed the palette on the select pitcher screen and am now working on the japanese word at the top of the recap. While working on that I noticed that the palette for that was off also. Here's a pic of a recap after Boston won. Their logo should be red instead of "11" Blue. Can you see if you can find this if you have time. thanks.

jggames

Also if anybody knows what the number (5 in this screenshot) is after the 30000 then let me know. I'm assuming the 30000 is the attendance since it comes after the field name but it is a static number. I can change it to anything I want. The "5" After it, I thought was the wind or something but it changes even when playing in a dome so it shouldn't have anything to do with wind or temperature. I've seen the number show up as 5,7, and 8. Any ideas are welcome.

nightwulf

Quote from: jggames on 02/21/05, 01:15:59 PM
thanks. I fixed the palette on the select pitcher screen and am now working on the japanese word at the top of the recap. While working on that I noticed that the palette for that was off also. Here's a pic of a recap after Boston won. Their logo should be red instead of "11" Blue. Can you see if you can find this if you have time. thanks.

This palette is done in a similar fashion to the pitcher select screen, where palette data is loaded then modified per team. The original palette data is loaded from the following location:

0x1452B> 0B 10 20 00  0B 20 30 00  0B 01 10 0C  0B 18 08 0C

The 7th number (0x30) is then overwritten based on the winning team, in exactly the same manner as above:

0x180AE> 80 26  84 16  88 11  8C 19  94 28  90 11  9C 11  B0 16
0x180BE> A0 16  A8 19  A4 16  AC 11  B4 14  98 26  B8 28  BC 0F

Nightwulf

nightwulf

Quote from: jggames on 02/21/05, 01:19:11 PM
I've seen the number show up as 5,7, and 8. Any ideas are welcome.

In finding the information above about the end-of-game screen, I "played" a fairly quick 2p game, ending in a 0-10 blowout in the bottom of the first. On my eog screen, I'm seeing "3." Duration of the game in minutes perhaps? I'll see if I can dig up information ...

Nightwulf

jggames

That's possible. I'll play a game and time it to check also.

After inserting these league logos I can't find the palette for them either. Can you check and see if you can find them. I'm wanting to change the yellow and light blue colors to red and dark blue to make the logos look like the real ones.

JoeDirt

You guys are some impressively smart nerds.  :-\
Quote from: BDawk on 10/10/07, 08:16:42 AM
The dee nee tard mixed in with gantry looks a little bit like TBT

nightwulf

#59
Quote from: jggames on 02/21/05, 05:31:12 PM
After inserting these league logos I can't find the palette for them either. Can you check and see if you can find them. I'm wanting to change the yellow and light blue colors to red and dark blue to make the logos look like the real ones.

This one's very strange. It starts as this ...

     No>  0  1  2  3   4  5  6  7   8  9  A  B   C  D  E  F
0x116BC> 0B 11 2A 23  0B 11 20 23  0B 11 20 23  0B 11 20 23

Then, the following changes are made:

  • values 0x1 and 0x9 (0x11) replaced with 0x11824 (0x38)
  • value 0x2 (0x2A) replaced with 0x1182C (0x26)
  • value 0xA (0x20) replaced with 0x11831 (0x21)
  • values 0x3 and 0xB (0x23) replaced with 0x11836 (0x20)

So the palette ends up looking like this before being passed to the PPU:

0B 38 26 20  0B 11 20 23  0B 38 21 20  0B 11 20 23

It's highly possible that the palette data at 0x116BC is used (unmodified) in other places in the game, so modifying it may produce surprising results. I'll look into it further when I have more time.

Nightwulf