Jump to content
Sign in to follow this  
adscl84

Solving the playoffs code (formerly: "Help needed w/ wild card sorting")

Recommended Posts

I'm working on a 20 team rom based off a 16 team rom I made, which was based off of jstouts CIFL rom.  I copy/pasted most of the code for making the 8 team playoff, and it works just fine on the 16 team rom.  For some reason, having the extra four teams causes the wild cards to be chosen improperly.

 

Often times, a team with a higher record will be left out in lieu of a team with a crappy record.  Also, sometimes, it will pick more than four teams in a conference.  I'm not sure why this is happening since I haven't made any changes to the code regarding the playoffs (except for the byte that determines the first NFC team), but if someone could take a look and tell me what I screwed up I would really appreciate it.

20.nes

Edited by adscl84
new file uploaded

Share this post


Link to post
Share on other sites

According to the code in  This thread there is one byte that sets the first nfc team.  I think it's at x23281 but im not at my computer to verify.  Wherever it is, I set that to 0a since the chiefs are now the first nfc team.

 

Other than adding four teams,  i haven't changed anything from my 16 team rom, so i think the problem has to be somewhere in the playoff junk.

Edited by adscl84

Share this post


Link to post
Share on other sites

I uploaded a new file after tinkering with some of the code.  After simming dozens of seasons, The NFC seems to be working fine, but the AFC is still jacked up.  It consistently omits the AFC west wild card teams with a better record in favor of usually the Bengals and some shitty AFC East team (usually Miami or Indianapolis).

---

Changing x2331b makes the wacky sorting happen less often, but it still gives a crappy team the wild card over a better team every once in a while.  I know this was supposed to be lower if the rom had fewer teams, so I tested everything between x06 and x0b (default).  x08 seemed to work "best", but there's still issues.

 

(The file I had uploaded doesn't reflect a change to this address)

 

Also, as in my 16 team rom, some wild cards get the division champ star.  Looking at the PPU viewer, the byte for the star is 19 and the byte for the wild card symbol is 5f. 

 

I have no clue where in the rom it gets decided which seed gets which symbol, though, so I don't know how to "fix" it other than tile edit the wild card symbol into a star so all playoff teams get a star.  Is the wild card symbol used anywhere else?

Edited by adscl84

Share this post


Link to post
Share on other sites

For the wild card, you have to change which team is the first in each conference but you also have to change how many teams are in each conference or how many are to be sorted or some such thing.  

 

The playoff code works as such. (Each conference is sorted separately and you can have more than 2 conferences if you want)

 

The division winners are determined

The division winners are sorted

The division winners are placed in the brackets

The game takes all of the other teams as determined by the code (this is where your problem is occurring) and sorts them for the wild cards

The wild cards are determined

The wild cards are placed in the brackets

 

Your rom needs some of the parameters for the wild card sorting changed.    I will try to find my notes and take a look at it.   I still plan to make a playoff

editing guide at some point in the future but have not had a chance to yet, but it is in my good intentions pile.

Share this post


Link to post
Share on other sites

Thanks so much for looking into this for me.  

 

I've been comparing roms from pambazos, jstout, and the original as well as some of the threads to look for patterns in the code.. I think I'll look at your afl/nfl roms as well.   Hopefully that will give me the insight i need.

 

I'm beginning to understand a bit of what's going on but not enough to where i could change the playoffs from scratch.  I can get the playoffs to assign just two division winners from the correct divisions, but the wild cards are jacked up and the ones that should be noone become the bills.

 

The other code that puzzles me is that which fixes the first wild card games so that it skips straight to the division round.  The code from the rom from pambazos is way different from what jstout has, and its all xff in the original, so i have no frame of reference for what that stuff is doing.

Edited by adscl84

Share this post


Link to post
Share on other sites

I think it is working properly now.  I made some adjustments that are hard to explain.   There was some messed up code and a few of the numbers in the code for sorting wild cards were off.   Test it out and see if it does what you want now.  

20fixed.nes

Edited by Carther

Share this post


Link to post
Share on other sites

As far as I can tell, it works.  Thanks a lot!!  Still has wild cards getting a star, though.  I wish I knew what that was all about.

 

Now, I'm hoping you (or anyone) can help explain what else I need to do with this other one I'm working on.  After looking at the code from your 1966 rom along with the others, I was able to figure out how to get the proper division winners and wild cards slotted, but I'm stuck with how to get rid of the first round games.

 

My hang up is that your 1966 rom has nothing in the x23ff0 area that pambazos and jstout (and the 10 team playoff hack thread) have entered code that supposedly "fixes" those games.  I noticed this is likely because your 1966 rom just has the division winners play themselves a few times.  How did you handle the wild card round in your later roms when you couldn't do that?

 

I have the bracket showing just 8 teams, but it still wants to play those wild card games.  If I can figure out how to omit those games, I'll be all set.

 

It's fun, but frustrating, figuring out how this works with no knowledge of the programming.  Also, I haven't even begun messing with "removing" the unused teams; I've solely been editing the playoff procedure.

 

Again, thanks so much for the help.

Tecmo Super Bowl (U).nes

Edited by adscl84
fixed bracket in rom

Share this post


Link to post
Share on other sites

I'm getting closer, but I'm still a long way off.  Looking at the code in pambazos' ONEFA2k2 rom, I see stuff like "20e0bf" and "20ecbf" where the original rom has stuff like "8da867".  (These are also mentioned in the 10-team hack thread.)  I think this has to do with the hex at 23ff0 and 23ffc, respectively.  (Somehow, the bf = 23f and the f0 is just e0+x10.)

 

The 10-team hack thread has the following at 23ff0 (fix AFC first game):

8d7767

8d8767

a901

8d7967

60

 

What I think this is doing is taking the team at bracket position 6777 and moving it to 6787.  That is where the winner of 6777 and 6776 end up to play 6786.  The rest of the code must have something to do with how, but I don't know because at 23ffc (fix NFC first game) has this:

 

8d7b67

8d8b67

a901

8d7d67

a902

8d5967

60

 

Again, 677b moves to 678b to play 678a.  The code after this a901 is a bit different (probably because 6779 is two off from 6777, and so 677d is two off from 677b), but then there's another bit of code that isn't present for the AFC game being fixed.

 

pambazos' rom starts at 23fe4 and goes all the way to 2400f.  This must be because he removed all of the wild card games (8 team playoff) instead of just two of them (10 team playoff).  I see he has a 20d4bf, so this explains the code at 23fe4 as well:

 

8da967

8d8f67

a901

8d8167

60

 

There is no bracket position 67a9, but whatever that is moves to 678f (to play 678e).  The 8d8167 is weird to me.

 

jstout's rom is entirely different, but he does explain that the AFC West and NFC East division winners are getting moved.  My rom eliminated the AFC and NFC Wests to avoid moving an AFC conference into the NFC  (I now understand how this works, but it made other stuff easier to do it my way).  Anyway, I put the parts that he explained in bold (at 23ff0), but the rest confuses me:

A900

85A0

A9FF

85A1

4C72B2

 

ADA567

8DA667

ADA467

8DA567

60

 

A58E

C908

F005

 

A908

858F

60

 

A907

858F

60

Share this post


Link to post
Share on other sites

I'VE GOT IT!  Kinda sorta... 

 

I ended up finding some code at 21ffe in pambazos' that fixed the fourth game.  I don't know exactly what all the code is for, but I figured out enough to be able to eliminate the wild card round.

 

Now, I just need to figure out how to fix the appearance of the bracket.  Right now, the first round of the AFC bracket extends to the right if the wild card team wins, so the red line encroaches on the championship round.  Not sure why, since I used the same playoff slots and copied as much bracket code as I knew of from pambazos' rom.  It's correct if the division winner wins.  Also, the NFC side is just fine.  If anyone knows where the hex code that needs to be changed is based on the screen shot, I'll be completely finished and very happy.

 

bracket.jpg

Edited by adscl84

Share this post


Link to post
Share on other sites
On 12/23/2015 at 3:46 PM, Carther said:

The playoff code works as such. (Each conference is sorted separately and you can have more than 2 conferences if you want)

 

The division winners are determined

The division winners are sorted

The division winners are placed in the brackets

The game takes all of the other teams as determined by the code (this is where your problem is occurring) and sorts them for the wild cards

The wild cards are determined

The wild cards are placed in the brackets

 

 

From your comment it sounds like after the division winners are determined and sorted it then loads the teams as wildcards by best record. Is there was a way to eliminate all divisions or the check for division winners that would/could get the game go straight to checking wildcards and therefore place ALL the teams in the playoffs based strictly on record?

 

And from there could you set it so it just chooses the top 4 teams? And get an easy 4 team NCAA playoff?

 

Or am I reading that wrong?

Edited by buckbbuck

Share this post


Link to post
Share on other sites

From what I understand, it may be possible.  You could change the code so that it never checks/forces/sorts the division champs.  I don't know if the game would allow it, though.  Also, I don't know if the game would recognize the division leaders when it comes to wild card sorting, so they might get left out altogether.  I only know how to manipulate the existing code, but someone who can essentially rewrite the code, like jstout, may be able to do it.

 

When I have more time (late night) I'll play around with it and let you know...assuming someone with more knowledge/experience doesn't give a definite answer first.

Share this post


Link to post
Share on other sites
On 12/30/2015 at 0:25 AM, adscl84 said:

I solved my bracket issue, and it turns out I just didn't copy/paste enough code.  2f2c9 and 2f2d1 needed to changed to 6e and ae, respectively.

Do you have any SET Commands for the playoff changes you made? Do you know if they can be made workable for a 32 team rom?

Basically, is there a way to just put the division winner from each division into one of the 8 playoff slots. No wild card.

Share this post


Link to post
Share on other sites

I don't have set commands because i don't use tsbtoolsupreme very often.  Also, the changes depend on how many conferences, divisions, and wild cards you want in your rom so they're not universal.

 

I'm sure the changes could be made to a 32 team rom, since the same process carther described would take place.  You would just need to eliminate all of the wildcards.  I've never tried to edit a 32 team rom though so i don't know how much the code differs.

 

Like carther, i plan to post the notes i made while figuring out how the code worked at some point.  I'm no expert and I'm sure i don't understand it as much as i think, so I'm hoping carther or someone will be able to tell me where I'm wrong.  Regardless, i was at least able to an 8 team playoff with the wild cards sorting properly and getting the correct symbol on the standings screen without copy/pasting anyone elses code.  Making the bracket correct is way over my head though.

Edited by adscl84

Share this post


Link to post
Share on other sites

I copied Carthers 1966 rom from ____ to ____ and I got a 4 team Bowls/Playoffs for my 1970 college rom.

 

I just wish I had written down those blanks.

 

The other weird thing is it made my rom not be able to save seasons so i must have corrupted something else when I pasted from Carthers 66 rom as it does save your season.

Share this post


Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...