News:

RIP GoReds

Main Menu

Long team names hack

Started by Turd, 05/09/09, 09:51:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Turd

Can someone explain to me how the long  team names hack works? I've searched the forum, couldn't find anything explaining it...

I'm writing to the 96k rom...tried using some of the info I got from Nightwulf in a text file:


# Long team names, overwrites existing code, offset 63338, 151 bytes
@asm_ltn1= ( 0x90, 0x2E, 0xF0, 0x52, 0xC9, 0x08, 0x90, 0x74,
             0xB0, 0x75, 0x20, 0x5C, 0xF3,
             0x22, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFE,
             0x31, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFF,
             0x4C, 0xF1, 0xF7, 0x20, 0x5C, 0xF3,
             0x22, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFE,
             0x31, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFF,
             0x4C, 0xF1, 0xF7, 0x20, 0x5C, 0xF3,
             0x22, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFE,
             0x31, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFF,
             0x4C, 0xF1, 0xF7, 0x4C, 0xC4, 0xEE, 0x4C, 0xEA,
             0xEE, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA,
             0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA,
             0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA );

# Long team names, additional code, offset 61140, 76 bytes
@asm_ltn2= ( 0x20, 0x5C, 0xF3,
             0x22, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFE,
             0x31, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFF,
             0x4C, 0xF1, 0xF7, 0x20, 0x5C, 0xF3,
             0x22, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFE,
             0x31, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xFF,
             0x4C, 0xF1, 0xF7 );


and writing to the given offsets, but then when I visit what I think is supposed to be the correct offset for team names at xF779 and attempt to write names to it, only the first two work, and the after that, the letters are all over the place...

I assumed xF779 is where the team names start and goes 13 bytes per team, padding on the left by spaces if it's less than 13.  So as a test, I attempted to write 13 x3B for team 1 and then 13 x3C, and 13 x3D...if I just write the first two teams, works fine, but after that, explosion.

If anyone can provide insight, that'd be spectacular.  My attempts to do binary compares on the original vs. one with the LTN hack applied also yielded some different results.

Turd

#1
Seems like the team locations don't go in order like I assumed and they are separated by different number of bytes in between:

Here's what I found:
Team 1:
Name = xF779

Team 2:
Name = xF789

Team 3:
Name = xF79F

Team 4:
Name = xF7AF

Team 5:
Name = xF7C5

Team 6:
Name = xF7D5

Team 7:
Name = xEED9

Team 8:
Name = xEEE9

Team 9:
Name = xEEFE

Team 10:
Name = xEF0F

I'm stumped, as I tried writing each team to these locations and it generates a bad rom, so any help would be appreciated.

Re-Peat

#2
NERD ALERT!

Seriously though, I have no clue how this shit works.
Quote from: TecmoBowl Terror on 12/29/10, 07:51:27 PM
anyone ever notice that if you drop a deuce on someones windshield in sub-freezing temperatures, its pretty damn hard to get off once it freezes.

nightwulf

Quote from: tecmoturd on 05/09/09, 10:18:15 AM
I'm stumped, as I tried writing each team to these locations and it generates a bad rom, so any help would be appreciated.

Send me the bad ROM and I'll see where it's crashing. Looking at the Perl module ...

    @atrteamoffsets= ( 0xF779, 0xF789, 0xF79F, 0xF7AF, 0xF7C5,
                       0xF7D5, 0xEED9, 0xEEE9, 0xEEFF, 0xEF0F );
    @atrteamlens= ( 13, 13, 13, 13, 13, 13, 13, 13, 13, 13 );


... the offsets are right. Are you going over 13 characters?

Turd

I don't think I'm going over 13, as I actually tried hand-coding them in XVI32 and was still getting garbage. It's probably something lame I'm doing...

You've got mail...

nightwulf

The file you sent me had an invalid NES header, which is why it wouldn't load in any emulator. Remember in the iNES file format (which accounts for the vast majority of NES ROMs) the first sixteen bytes of the ROM is the iNES header. Unless you're doing some serious dicking with the ROM, the header for a 96k ROM will look like this:

4e 45 53 1a 04 04 41 00 00 00 00 00 00 00 00 00

Yours was ...

01 0c 03 2f 28 39 28 2a 3b 2c 39 01 00 00 00 00

... which is far from a valid iNES header. Fix the header and the ROM works fine. No idea why the header was mangled ...

Turd

Very odd...currently I'm creating the new rom from a master rom which HAS the correct header.  I wonder if something in my script is overwriting something.

In fact, I wonder if I'm seeking to a spot using a variable and the variable is 0, so in essence, it's seeking to offset 0 and then writing stuff. That'd explain it...

Turd

#7
Just checked, that's exactly what I'm doing.  I also had the 9th team's offset incorrect. Sorry for wasting your time with my noobish error...

It's a good thing I don't code professionally for a living...oh, wait... :o

nomaaa

perfect use of the emoticon. well done
Quote from: GDavis on 10/13/17, 11:29:39 AM
Congrats Nomaaa.  Dee-Nee's new Sandwich King.