Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Baseball Stars hacking | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Heian-794

Red Super Koopa
Level: 44

Posts: 585/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 01-03-05 11:56 AM Link | Quote
While taking a break from hacking Bases Loaded, I thought I'd have a go at hacking Baseball Stars, another of the great baseball games on the NES. Baseball Stars lets you create your own team and develop the players by powering them up after earning money; it's a neat system.

This game's not without its flaws -- graphically it's far inferior to Bases Loaded, and the balance is skewed in favor of the hitters. Also, you only get 5 pitchers and 13 position players; not enough.

Stuff I've done so far:

* Edited team names, player names, stats, uniform colors and logos

* Edited text in the game; "HITTING" and "BATTING" have been changed to the less-ambiguous "CONTACT" and "POWER"

* Edited the font; it looks more like the Japanese version now

Stuff I'd like to do and would really appreciate comments on:

* Editing how much money each team has. I've been searching every which way on FCEUXD for this, but I suspect that money is a 2- or 3-byte variable.(of the form "$xxx,xxx,x00"). So far no one has ever come up with a Game Genie code for this, which makes me think that the in-game values are really well-hidden. It should be possible to find this in the memory, though.

* Editing how far the ball goes in relation to the hitter's "power" stat. In this game, players with maximum power (15, or F in single-byte hex) can hit home runs almost every time up, which makes the game a lot less fun. I want to tone down the power a bit.

* Displaying more than just batting average and home runs on the gameplay screen. I'd like to show all the player's stats.

* Displaying stats for more than just the top 10 in each category. I suspect that this and the previous one would require some serious ASM hacking.

* Using twelve 8x16 characters for the player's name instead of six 16x16 characters. This would probably mean that the names would have to be stored somewhere else in the rom, where there's enough space, with a pointer to the name inserted.

I also haven't quite worked out where the players' faces are stored and in what format. Male players have 00, 01, 02 (right handers), 80, 81, 82 (left handers) as the code for batting stance; female players have 03, 04, 83, and 84. Player names are stored in basic ASCII so you don't even need a table file to read them in a hex editor.

I'll post some screenshots when I've made more progress. So far I've got a revamped league going with the 1907-08 Cubs, 1869 Reds, and a collection of All-American Girls' Professional Base Ball League stars from the 1940s.
dan

Snap Dragon
Level: 43

Posts: 324/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 01-03-05 04:11 PM Link | Quote
Originally posted by Heian-794

I also haven't quite worked out where the players' faces are stored and in what format. Male players have 00, 01, 02 (right handers), 80, 81, 82 (left handers) as the code for batting stance; female players have 03, 04, 83, and 84. Player names are stored in basic ASCII so you don't even need a table file to read them in a hex editor.


At first, I thought the players faces should be easy enough to find using FCEUXD's nametable viewer, but apparently the game stores the faces as sprites. If you look at the memory viewer, the faces graphics are stored at $2B5 in RAM.

They seem to start at $246B in ROM, for the top left corner. The rest of the tiles are around there.

Oh, the players face was for this particular player:



Edit - I found the money in RAM that each team seems to have. It's at $6839.


(edited by dan on 01-03-05 07:22 AM)
Heian-794

Red Super Koopa
Level: 44

Posts: 587/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 01-03-05 06:38 PM Link | Quote
Dan, thanks for finding the money! I'm going to load up FCEUXD and fool around with that now. I'd been wondering about that for so long! (How did you spot it?)

As for the faces, my post was a bit misleading. The face graphics are easy enough to find in the ROM; rather, I can't figure out where the game keeps track of which players have which faces. At one point I thought that the value that ranged between 00 and 84 was the face, but it turns out that that's the batting stance. Another complication with the faces is that there are a number of different foreheads, then eyes, then mouths, so I had been imagining that the game might allocate three bytes per face, or maybe three hex digits. (so "forehead #7, eyes #12, mouth #4" might be 07 0B 04 or maybe 7B4x (where x is some other value). In addition to basic male and female faces, there are the "star" player faces which seem to only occur when signing those high-priced, sunglass-wearing elite guys.
dan

Snap Dragon
Level: 43

Posts: 326/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 01-03-05 06:59 PM Link | Quote
Well, I found the money by locating the nametable address of where the money is displayed on screen, and when there was a write to that I address, I looked back using FCEUXD's trace logger, to see where it got the values. It took a bit to find it, as it copied the tiles to $300, so I had to put a write on those memory locations also.

I'll take a look and see if I can find which players get what faces.

Well, I found some bytes that seem to control what face you get. I'm not sure how it works but at $2653, there is two bytes that control the face of this player:



By changing the values to 0D 72, I get:



Edit- Well, those two bytes are actually 4 distinct nibbles that control 4 features probably.


(edited by dan on 01-03-05 10:18 AM)
(edited by dan on 01-03-05 10:36 AM)
Heian-794

Red Super Koopa
Level: 44

Posts: 588/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 01-03-05 08:51 PM Link | Quote
Dan, I'm a complete beginner when it comes to using the advanced features of FCEUXD and am just beginning to learn assembly. So I've been scouring the ROM and the in-game memory to find stuff. Here are some of the player stats/data in the rom, which may be helpful:

These are the first three batters for the Ninja Black Sox (around 0x0116c4):

4B4F5A4F20207F0881B6FF8F03010600
4B554E4F20200A078394DA6C02930400
594149434849810581AAA87803170F00


For the first batter, the "4B4F5A4F2020" corresponds to "KOZO__" (two spaces at the end). Then we've got 7F, which seems to be a player ID number of some kind (all the members of his team have numbers close to this; could it point to the face somewhere?). After this comes 08, his position (center field), then 81 (type 1 batter; hits lefty), then B6FF8F, which corresponds to his hitting (11), batting (6), running (15), defense (15), luck (8), and prestige (15) respectively. Then we've got 0301, which his his "displayed" batting average, and then 0F, his home run total (15) in hex. Then comes a mysterious 00 which is the same for all players.

Actual screenshots including a few of my graphical modifications; the data is intact:
(Hopefully this image isn't too wide)



So I'm guessing that that 7F in the beginning is linked to his face somewhere.

Editing faces isn't that important gameplay-wise, but it would be a great addition to an editor.

Dan, thanks again for your help! And advice you can offer, especially on ASM/"difficult" stuff, is very much appreciated!



(edited by Heian-794 on 01-03-05 11:53 AM)
(edited by Heian-794 on 01-03-05 11:53 AM)
(edited by Heian-794 on 01-03-05 11:55 AM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Baseball Stars hacking | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.013 seconds.