Jump to content

buck

Members
  • Posts

    6,355
  • Joined

  • Last visited

  • Days Won

    12

buck last won the day on January 3

buck had the most liked content!

8 Followers

Profile Information

  • Gender
    Not Telling
  • Location
    Tecmo Super Street

Other

  • Tecmo Titles
    Lincoln V (2015)

Recent Profile Visitors

5,548 profile views
  1. here is a 32-team NES TSB rom I've recently edited, and would like to share: "Champs - Flops" each NFL franchises best team, from 2002 to 2022. At least one team from each year (from 2002 to 2022 season) is represented; but no more than two teams for any given year. Yes, compromises have been made to make the game balanced and follow this format/outline. The teams have been "scaled" so that Super Bowl winners usually have better players or more "balanced" teams than Super Bowl losers, etc. There are no real major hacks, and it plays just like original. PC is completion and PA is target. Quickness does nothing (however, it has been rated for "incompletions", but I did not implement that hack, Interception does everything). RT and SS speed is KR and PR speed. I tried to make team tiers similar to original NES TSB, so you will find "pro bowl" players with 44MS, for example, as well as other players on a Champion team with somewhat "inflated" attributes. If there was a judgement call on ratings (and there were dozens) then the Champion got the better ratings, usually. Yes, there are a few teams that are Over-Powered (2004 Patriots, 2013 Seahawks, for example), like the original. but essentially, the player attributes are distributed and scaled to match original TSB, within reason. for example, the original game had four 44/56/75 RCB, and accordingly there are four here (except there is no 75MS RB or 56MS QB here...), etc. in my opinion, the only big difference from original TSB is that base Hitting Power for RCB/LCB is 13 HP, with all-pro RCB/LCB getting automatic 31HP. enjoy! TSB32 NFL greats 2002-2022 by buck.nes
  2. yeah no big deal, just wondering if that code location had been documented. I will find it.
  3. extreme modified bruddog. most of the players are rated pretty much the same RP scale. heck even all the speed tables are modified
  4. Yeah I know, that's why it's weird that they are so fast. Would you happen to know which chunk of code the "non-recovering" team uses? I'm thinking I need to boost that.
  5. here is what I currently have at BFC5: E100E100E100E100E4DFFEFF so, there shouldn't be any boosts at all right? these are all E1 00, which would reset MS? probably should just set the code to E4DFFEFF, and not mess with the E1's
  6. it just seems like whoever recovers the fumble, MAN or COM, offense or defense, is too fast.
  7. ROM I'm working on...both MAN and COM are way too fast returning fumbles (whether the offense or defense recovers)...I assume that it shares a location with some other speed. Probably also need location of the defenders (team that doesn't have the ball - for both offense and defense) speed after the other team gets the fumble recovery. (because maybe the solution is to Boost this to better match fumble returners speed instead)
  8. yes you did miss something, what you are describing is not the problem that was solved. the name of the thread sheds light as to what was solved...TIE this modification specifically addresses "COM to punt when: 4th quarter, less than 2 minutes left, it's 4th down, the game is tied, and ball is located >= 50 yd line"
  9. if you wonder why there are those 2007-08 teams, it's because that's when the ROM was made - 2008. There is another one I did - a bit more updated - it goes up to the 2013 seahawks, as well as other teams were swapped in/out like 96 GB the playbooks are a bit better (less wonky) in the newer one. but there's nothing wrong with the original. I played tons of games and seasons on it. I need to make a couple of tweaks to it based on recently discovered hacks, but I will post it soon. see below.
  10. bruddog - I went all over this and already fixed it. the logic path leads to loop22. in loop22, after the scores are Compared (A5A0 C59F), there is a BCC (branch if carry clear) to Loop27 if offense winning. then following that another BCC (9003) that won't get used because if the offense is losing or tied, the C flag won't be Clear. finally, it takes you to Loop40 where the offense is bound to run a play. basically, there should have been a "Greater Than (winning) or Equal To (tied)" check. the original programming only has the "greater than" part. Luckily, you can just overwrite that worthless BCC 9003 to an actual BEQ (branch if equal) F035 and jump to Loop27 - the same actions would be taken as if COM were winning (if ball is >= 50 yd line, will punt). I've been testing this for the past 3 days and run multiple tests and scenarios. it works. SET(0x18808, 0xF035)
  11. I'm pretty sure the problem is within Loop22 starting at 0x0187F6. I added a simple BEQ F035 at 0x18808 to Loop27 to fix it.
  12. OK. Thanks to a steady supply of the Banquet Beer (on Christmas eve) and my love for the game (and SBlueman), I took a stab at mapping the COM play-picking logic section (by hand on paper and a spreadsheet) using the info/code pasted at the very bottom of this post . I'm not sure where I got it, maybe jstout or probably cxrom. After an hour or so of chicken scratch and flow charts on multiple sheets of paper, I believe I narrowed the situation that SBlueman describes to "Loop22". Loop22 neglects the option for a "tie" scenario and assumes the COM will run a play if the score is presently tied. Go to 0x0187F6 (this is "Loop22") because I believe that the problem and solution can be found inside this loop. First I will go over what logic brings us to Loop22 and then the way Loop22 works. Then I will offer my solution. To arrive at Loop22, first we start at Loop1 which is located at 0x18714. Since it is 4th Quarter, we end up at Loop3. Then it goes to loop 5 or 10, but eventually Loop5 ends up at Loop10 anyways. Then, since it is 4th Down, we go to Loop16. From here, if the ball is at or beyond the 41 yard line, it heads to Loop22. So, we arrive at Loop22 because: it is the 4th Quarter, it's 4th Down, and the ball is located at or beyond the 41 yard line. Now looking at Loop22, which is located at 0x0187F6: A576, LDA QUARTER C903, CMP FOURTH_QUARTER D011, BNE @Loop23 If NOT 4th Quarter go to Loop23 A56B, LDA QUARTER_MINUTES C902, CMP #$02 B02F, BCS @Loop26 if Time >= 2 minutes, go to Loop26 A5A0, LDA SCORE_DEFENSE C59F, CMP SCORE_OFFENSE 9037, BCC @Loop27 if Offense score > Defense score, go to Loop27 9003, BCC @Loop23 I'm not sure what this is here for, but the C flag won't be clear if the score is tied or def > offense! So this is wasted/useless code, I believe? 4CF1A8 JMP @Loop40 This goes through a quite involved routine that ends up selecting a play - and this is where it will go if the score is tied or offense is losing...it runs a play...good if losing, but bad if tied. See what happens after it loads the scores? It only cares if the offense is "winning" (essentially ignores a "tie") - anyways, Loop27 would eventually Punt in this situation, following the logic/location of ball. However, the COM AI goes on to Loop40...which will always call a play. So, in this scenario (score is tied) we really need to add Offense Score "> or =" Defense Score (with the "equal to" being the emphasis here, since the score is tied). Luckily, we have that extra/wasted 9003 BCC space for an extra branch BEQ command! See below, I overwrote that last 9003 BCC with a new BEQ (branch if equal, ie "tied") f035, jump to Loop27 (which would eventually Punt in this situation). *Note: Loop27 is not the "Punt Subroutine" (that is Loop25). However, following Loop27's progression, COM would end up Punting in the situation described by SBlueman (if the ball is located >= 50 yd line). A576 LDA QUARTER C903 CMP FOURTH_QUARTER D011 BNE @Loop23 A56B LDA QUARTER_MINUTES C902 CMP #$02 B02F BCS @Loop26 A5A0 LDA SCORE_DEFENSE C59F CMP SCORE_OFFENSE 9037 BCC @Loop27 F035 BEQ @Loop27 4CF1A8 JMP @Loop40 In conclusion, to get the COM to punt when: 4th quarter, less than 2 minutes left, it's 4th down, the game is tied, and *ball is located >= 50 yd line (*this is within Loop27): try overwriting 0x018808 to xf035. This will Branch if "Offense Score = Defense Score", to Loop27, which would eventually lead to a Punt in this situation (if ball is >= 50 yd line, see Loop27). I might be wrong on this! But it makes sense to me - and I have play-tested this with some save states, and it seems to work well (game tied, 4th quarter less than 2 min, 4th down = PUNT) but without this "fix", COM would run a play. Try it! peace hex L_12_A6F3: A900 " LDA" #$00 8540 " STA" $40 ; PLAY CALL 8541 " STA" $41 ; BYTE HOLDER 853E " STA" $3E ; BYTE HOLDER 853F " STA" $3F ; BYTE HOLDER A59E " LDA" OFFENSE_DEFENSE_TOGGLE 1003 " BPL" @Loop1 ; Go if Offense 4CEFAA " JMP" @Loop74 ; Go if Defense ; Offensive Code @Loop1: A576 " LDA" QUARTER C900 " CMP" FIRST_QUARTER D003 " BNE" @Loop2 ; Go if not First Quarter 4C9FA7 " JMP" @Loop16 ; Go if First Quarter @Loop2: C902 " CMP" THIRD_QUARTER D003 " BNE" @Loop3 ; Go if not Third Quarter 4C9FA7 " JMP" @Loop16 ; Go if Third Quarter @Loop3: A569 " LDA" CLOCK_STOPPED_OR_RUNNING 1047 " BPL" @Loop10 ; Go if Clock is Stopped A5A1 " LDA" NUMBER_TIMEOUTS F043 " BEQ" @Loop10 ; Go if Out of Time-Outs A576 " LDA" QUARTER C901 " CMP" SECOND_QUARTER D009 " BNE" @Loop5 ; Go if not Second Quarter A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B037 " BCS" @Loop10 ; Go if >= 2 Minutes 901D " BCC" @Loop7 ; Go if < 2 Minutes @Loop4: 60 " RTS" ; Return @Loop5: A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B008 " BCS" @Loop6 ; Go if >= 2 Minutes A5A0 " LDA" SCORE_DEFENSE C59F " CMP" SCORE_OFFENSE 9028 " BCC" @Loop10 ; Go if Offense is > Points B017 " BCS" @Loop8 ; Go if Defense is >= Points @Loop6: A56B " LDA" QUARTER_MINUTES C903 " CMP" #$03 B020 " BCS" @Loop10 ; Go if >= 3 Minutes A5A0 " LDA" SCORE_DEFENSE C59F " CMP" SCORE_OFFENSE 901A " BCC" @Loop10 ; Go if Offense is > Points B000 " BCS" @Loop7 ; Go if Defense is >= Points @Loop7: 209DAB " JSR" L_12_AB9D ; Random C9C0 " CMP" #$C0 B011 " BCS" @Loop10 ; Go if Random >= xC0 (25% Chance) 9007 " BCC" @Loop9 ; Go if Random < xC0 (75% Chance) @Loop8: C09DAB " JSR" L_12_AB9D ; Random C9F0 " CMP" #$F0 B008 " BCS" @Loop10 ; Go if Random >= xF0 (6.25% Chance) @Loop9: A569 " LDA" CLOCK_STOPPED_OR_RUNNING 297F " AND" #$7F 8569 " STA" CLOCK_STOPPED_OR_RUNNING ; Stop Clock C6A1 " DEC" NUMBER_TIMEOUTS ; Call Time-Out @Loop10: A577 " LDA" DOWN C906 " CMP" FOURTH_DOWN F03A " BEQ" @Loop16 ; Go if 4th Down A544 " LDA" CURRENT_YARDLINE_LO C941 " CMP" #$41 A545 " LDA" CURRENT_YARDLINE_HI C901 " SBC" #$01 B050 " BCS" @Loop18 ; Go if >= 40.125 Yard-Line 4C68A9 " JMP" @Loop50 ; Go if < 40.125 Yard-Line @Loop11: A542 " LDA" YARDS_TO_GO_LO C909 " CMP" #$09 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 9003 " BCC" @Loop12 ; Go if < 1.125 Yards to Go 4C56AA " JMP" @Loop65 ; Go if >= 1.125 Yards to Go @Loop12: 4C1BAA " JMP" @Loop62 ; Go @Loop13: A542 " LDA" YARDS_TO_GO_LO C919 " CMP" #$19 A543 " LDA" YARDS_TO_GO_HI C900 " SBC" #$00 B003 " BCS" @Loop14 ; Go if >= 3.125 Yards to Go 4C1BAA " JMP" @Loop62 ; Go if < 3.125 Yards to Go @Loop14: A542 " LDA" YARDS_TO_GO_LO C939 " CMP" #$39 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 B003 " BCS" @Loop15 ; Go if >= 7.125 Yards to Go 4C56AA " JMP" @Loop65 ; Go if < 7.125 Yards to Go @Loop15: 4CE8A9 " JMP" @Loop60 ; Go @Loop16: A577 " LDA" DOWN C903 " CMP" FOURTH_DOWN D00D " BNE" @Loop17 ; Go if not 4th Down A544 " LDA" CURRENT_YARDLINE_LO C948 " CMP" #$48 A545 " LDA" CURRENT_YARDLINE_HI E901 " SBC" #$01 B037 " BCS" @Loop22 ; Go if >= 41 Yard-Line 4C60A8 " JMP" @Loop30 ; Go if < 41 Yard-Line @Loop17: A544 " LDA" CURRENT_YARDLINE_LO C919 " CMP" #$19 A545 " LDA" CURRENT_YARDLINE_HI E900 " SBC" #$00 B003 " BCS" @Loop18 ; Go if >= 3.125 Yard-Line 4CA8A9 " JMP" @Loop57 ; GO if < 3.125 Yard-Line @Loop18: A544 " LDA" CURRENT_YARDLINE_LO C929 " CMP" #$29 A545 " LDA" CURRENT_YARDLINE_HI E900 " SBC" #$00 B003 " BCS" @Loop19 ; Go if >= 5.125 Yard-Line 4C1BAA " JMP" @Loop62 ; Go if < 5.125 Yard-Line @Loop19: A544 " LDA" CURRENT_YARDLINE_LO C9F8 " CMP" #$F8 A545 " LDA" CURRENT_YARDLINE_HI E902 " SBC" #$02 9003 " BCC" @Loop20 ; Go if < 95 Yard-Line 4C1BAA " JMP" @Loop62 ; Go if >= 95 Yard-Line @Loop20: A577 " LDA" DOWN D003 " BNE" @Loop21 ; Go if not 1st Down 4C56AA " JMP" @Loop65 ; Go if 1st Down @Loop21: C901 " CMP" SECOND_DOWN F08E " BEQ" @Loop11 ; Go if 2nd Down D09C " BNE" @Loop13 ; Go if not 2nd Down @Loop22: A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER D011 " BNE" @Loop23 ; Go if not Fourth Quarter A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B02F " BCS" @Loop26 ; Go if >= 2 Minutes A5A0 " LDA" SCORE_DEFENSE C59F " CMP" SCORE_OFFENSE 9037 " BCC" @Loop27 ; Go if Offense > Points 9003 " BCC" @Loop23 ; NEVER GO 4CF1A8 " JMP" @Loop40 ; Go if Defense >= Points @Loop23: A576 " LDA" QUARTER C901 " CMP" SECOND_QUARTER F004 " BEQ" @Loop24 ; Go if Second Quarter C904 " CMP" OVERTIME D028 " BNE" @Loop27 ; Go if not Overtime @Loop24: A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B022 " BCS" @Loop27 ; Go if >= 2 Minutes A544 " LDA" CURRENT_YARDLINE_LO C991 " CMP" #$91 A545 " LDA" CURRENT_YARDLINE_HI C901 " SBC" #$01 B003 " BCS" @Loop25 ; Go if >= 50.125 Yard-Line 4CF1A8 " JMP" @Loop40 ; Go if < 50.125 Yard-Line @Loop25: A908 " LDA" PUNT 8540 " STA" $40 ; Punt Play Call 4C2AA7 " JMP" @Loop4 @Loop26: A5A0 " LDA" SCORE_DEFENSE 38 " SEC" E59F " SBC" SCORE_OFFENSE 9007 " BCC" @Loop27 ; Go if Offense > Points C90A " CMP" #$0A 9003 " BCC" @Loop27 ; Go if < 10 Point Difference 4CF1A8 " JMP" @Loop40 ; Go if >= 10 Point Difference @Loop27: A544 " LDA" CURRENT_YARDLINE_LO C991 " CMP" #$91 A545 " LDA" CURRENT_YARDLINE_HI E901 " SBC" #$01 B0E1 " BCS" @Loop25 ; Go if >= 50.125 Yard-Line A542 " LDA" YARDS_TO_GO_LO C929 " CMP" #$29 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 900C " BCC" @Loop28 ; Go if < 5.125 Yards to Go A576 " LDA" QUARTER C904 " CMP" OVERTIME D0D1 " BNE" @Loop25 ; Go if not Overtime A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 90CB " BCC" @Loop25 ; Go if < 2 Minutes @Loop28: Punt or 20A3AB " JSR" L_12_ABA3 ; Random C980 " CMP" #$80 90C4 " BCC" @Loop25 ; Go if Random < x80 (50% Chance) 4CF1A8 " JMP" @Loop40 ; Go if Random >= x80 (50% Chance) @Loop29: A909 " LDA" FIELD_GOAL 8540 " STA" $40 ; Field Goal Play Call 4C2AA7 " JMP" @Loop4 @Loop30: A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER D04C " BNE" @Loop35 ; Go if not Fourth Quarter A5A0 " LDA" SCORE_DEFENSE 38 " SEC" E59F " SBC" SCORE_OFFENSE 9045 " BCC" @Loop35 ; Go if Offense > Points C904 " CMP" #$04 9041 " BCC" @Loop35 ; Go if < 4 Point Difference A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 900F " BCC" @Loop31 ; Go if < 2 Minutes A542 " LDA" YARDS_TO_GO_LO C911 " CMP" #$11 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 9005 " BCC" @Loop31 ; Go if < 2.125 Yards to Go 9003 " BCC" @Loop31 ; NEVER GO 4C5BA9 " JMP" @Loop48 ; Go if >= 2.125 Yards to Go @Loop31: A544 " LDA" CURRENT_YARDLINE_LO C919 " CMP" #$19 A545 " LDA" CURRENT_YARDLINE_HI E900 " SBC" #$00 B003 " BCS" @Loop32 ; Go if >= 3.125 Yard-Line 4CA8A9 " JMP" @Loop57 ; Go if < 3.125 Yard-Line @Loop32: A544 " LDA" CURRENT_YARDLINE_LO C929 " CMP" #$29 A545 " LDA" CURRENT_YARDLINE_HI E900 " SBC" #$00 B003 " BCS" @Loop33 ; Go if >= 5.125 Yard-Line 4C1BAA " JMP" @Loop62 ; Go if < 5.125 Yard-Line @Loop33: A544 " LDA" CURRENT_YARDLINE_LO C9F8 " CMP" #$F8 A545 " LDA" CURRENT_YARDLINE_HI E902 " SBC" #$02 9003 " BCC" @Loop34 ; Go if < 95 Yard-Line 4C1BAA " JMP" @Loop62 ; Go if >= 95 Yard-Line @Loop34: B003 " BCS" @Loop35 ; NEVER GO 4C82A7 " JMP" @Loop13 ; Go @Loop35: A542 " LDA" YARDS_TO_GO_LO C909 " CMP" #$09 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 B015 " BCS" @Loop36 ; Go if >= 1.125 Yards to Go A5A0 " LDA" SCORE_DEFENSE C59F " CMP" SCORE_OFFENSE 9097 " BCC" @Loop29 ; Go if Offense > Points A544 " LDA" CURRENT_YARDLINE_LO C9A1 " CMP" #$A1 A545 " LDA" CURRENT_YARDLINE_HI E900 " SBC" #$00 B08D " BCS" @Loop29 ; Go if >= 20.125 Yard-Line B003 " BCS" @Loop36 ; NEVER GO 4C5BA9 " JMP" @Loop48 ; Go if < 20.125 Yard-Line @Loop36: A542 " LDA" YARDS_TO_GO_LO C910 " CMP" #$10 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 9003 " BCC" @Loop37 ; Go if < 2 Yards to Go 4C59A8 " JMP" @Loop29 ; Go if >= 2 Yards to Go @Loop37: A5A0 " LDA" SCORE_DEFENSE 38 " SEC" E59F " SBC" SCORE_OFFENSE B003 " BCS" @Loop38 ; Go if Defense >= Points 4C59A8 " JMP" @Loop29 ; Go if Offense > Points @Loop38: C911 " CMP" #$11 B003 " BCS" @Loop39 ; Go if >= 17 Point Difference 4C59A8 " JMP" @Loop29 ; Go if < 17 Point Difference @Loop39: B06A " BCS" @Loop48 ; Go @Loop40: A544 " LDA" CURRENT_YARDLINE_LO C991 " CMP" #$91 A545 " LDA" CURRENT_YARDLINE_HI E901 " SBC" #$01 B037 " BCS" @Loop46 ; Go if >= 50.125 Yard-Line A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER D01C " BNE" @Loop43 ; Go if not Fourth Quarter A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B054 " BCS" @Loop48 ; Go if >= 2 Minutes A5A0 " LDA" SCORE_DEFENSE 38 " SEC" E59F " SBC" SCORE_OFFENSE B003 " BCS" @Loop41 ; Go if Defense >= Points 4C82A7 " JMP" @Loop13 ; Go if Offense > Points @Loop41: C904 " CMP" #$04 B003 " BCS" @Loop42 ; Go if >= 4 Point Difference 4C59A8 " JMP" @Loop29 ; Go if < 4 Point Difference @Loop42: 9003 " BCC" @Loop43 ; NEVER GO 4C82A7 " JMP" @Loop13 ; Go @Loop43: A576 " LDA" QUARTER C901 " CMP" SECOND_QUARTER F004 " BEQ" @Loop44 ; Go if Second Quarter C904 " CMP" OVERTIME D034 " BNE" @Loop48 ; Go if not Overtime @Loop44: A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B003 " BCS" @Loop45 ; Go if >= 2 Minutes 4C59A8 " JMP" @Loop29 ; Go if < 2 Minutes @Loop45: B029 " BCS" @Loop48 ; Go @Loop46: A544 " LDA" CURRENT_YARDLINE_LO C998 " CMP" #$98 A545 " LDA" CURRENT_YARDLINE_HI E901 " SBC" #$01 9003 " BCC" @Loop47 ; Go if < 51 Yard-Line 4C82A7 " JMP" @Loop13 ; Go if >= 51 Yard-Line @Loop47: A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER D016 " BNE" @Loop48 ; Go if not Fourth Quarter A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 D010 " BNE" @Loop48 ; Go if not 2 Minutes A5A0 " LDA" SCORE_DEFENSE 38 " SEC" E59F " SBC" SCORE_OFFENSE 9009 " BCC" @Loop48 ; Go if Offense > Points C904 " CMP" #$04 9005 " BCC" @Loop48 ; Go if < 4 Point Difference 9003 " BCC" @Loop48 ; NEVER GO 4C82A7 " JMP" @Loop13 ; Go if >= 4 Point Difference @Loop48: 20A9AB " JSR" L_12_ABA9 ; Random C980 " CMP" #$80 B003 " BCS" @Loop49 ; Go if Random >= x80 (50% Chance) 4C59A8 " JMP" @Loop29 ; Go if Random < x80 (50% Chance) @Loop49: 4C82A7 " JMP" @Loop13 ; Go @Loop50: A56B " LDA" QUARTER_MINUTES B023 " BNE" @Loop54 ; Go if not 0 Minutes A56A " LDA" QUARTER_SECONDS C930 " CMP" #$30 B01D " BCS" @Loop54 ; Go if >= 30 Seconds A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER F003 " BEQ" @Loop51 ; Go if Fourth Quarter 4C59A8 " JMP" @Loop29 ; Go if not Fourth Quarter @Loop51: A5A0 " LDA" SCORE_DEFENSE 38 " SEC" E59F " SBC" SCORE_OFFENSE B003 " BCS" @Loop52 ; Go if Defense >= Points 4C9FA7 " JMP" @Loop16 ; Go if Offense > Points @Loop52: C904 " CMP" #$04 B003 " BCS" @Loop53 ; Go if >= 4 Point Difference 4C59A8 " JMP" @Loop29 ; Go if < 4 Point Difference @Loop53: 4C9FA7 " JMP" @Loop16 ; Go @Loop54: A576 " LDA" QUARTER C904 " CMP" OVERTIME F003 " BEQ" @Loop55 ; Go if Overtime 4C9FA7 " JMP" @Loop16 ; Go if not Overtime @Loop55: A544 " LDA" CURRENT_YARDLINE_LO C9A1 " CMP" #$A1 A545 " LDA" CURRENT_YARDLINE_HI E900 " SBC" #$00 9003 " BCC" @Loop56 ; Go if < 20.125 Yard-Line 4C9FA7 " JMP" @Loop16 ; Go if >= 20.125 Yard-Line @Loop56: 4C59A8 " JMP" @Loop29 ; Go @Loop57: 20A9AB " JSR" L_12_ABA9 ; Random_A 853F " STA" $3F 209DAB " JSR" L_12_AB9D ; Random_B 18 " CLC" 653F " ADC" $3F ; Random_A + Random_B 853F " STA" $3F 20A3AB " JSR" L_12_ABA3 ; Random_C 853E " STA" $3E 20A9AB " JSR" L_12_ABA9 ; Random_D 18 " CLC" 653E " ADC" $3E ; Random_C + Random_D C9CD " CMP" #$CD B016 " BCS" @Loop59 ; Go if (Random_C + Random_D) >= xCD A53F " LDA" $3F C980 " CMP" #$80 B007 " BCS" @Loop58 ; Go if (Random_A + Random_B) >= x80 A903 " LDA" #$03 ; Run Play x03 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop58: A53F " LDA" $3F ; $3F = Random_A + Random_B 2903 " AND" #$03 ; Between x00-x03 (Run Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop59: A53F " LDA" $3F ; $3F = Random_A + Random_B 290C " AND" #$0C ; Between x00-x0C 4A " LSR" ; /2 (Between x00-x06) 4A " LSR" ; /2 (Between x00-x03) 18 " CLC" 6904 " ADC" #$04 ; 4 (Pass Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop60: 20A9AB " JSR" L_12_ABA9 ; Random_A 853F " STA" $3F 209DAB " JSR" L_12_AB9D ; Random_B 18 " CLC" 653F " ADC" $3F ; Random_A + Random_B 853F " STA" $3F 20A3AB " JSR" L_12_ABA3 ; Random_C 853E " STA" $3E 20A9AB " JSR" L_12_ABA9 ; Random_D 18 " CLC" 653E " ADC" $3E ; Random_C + Random_D C9CD " CMP" #$CD 9009 " BCC" @Loop61 ; Go if (Random_C + Random_D) < xCD A53F " LDA" $3F ; $3F = Random_A + Random_B 2903 " AND" #$03 ; Between x00-x03 (Run Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop61: (only gets called once, by 60) A53F " LDA" $3F ; $3F = Random_A + Random_B 290C " AND" #$0C ; Between x00-x0C 4A " LSR" ; /2 (Between x00-x06) 4A " LSR" ; /2 (Between x00-x03) 18 " CLC" 6904 " ADC" #$04 ; 4 (Pass Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop62: 20A9AB " JSR" L_12_ABA9 ; Random_A 853F " STA" $3F 209DAB " JSR" L_12_AB9D ; Random_B 18 " CLC" 653F " ADC" $3F ; Random_A + Random_B 853F " STA" $3F 20A3AB " JSR" L_12_ABA3 ; Random_C 853E " STA" $3E 20A9AB " JSR" L_12_ABA9 ; Random_D 18 " CLC" 653E " ADC" $3E ; Random_C + Random_D C9CD " CMP" #$CD 900E " BCC" @Loop63 ; Go if (Random_C + Random_D) < xCD A53F " LDA" $3F ; $3F = Random_A + Random_B 290C " AND" #$0C ; Between x00-x0C 4A " LSR" ; /2 (Between x00-x06) 4A " LSR" ; /2 (Between x00-x03) 18 " CLC" 6904 " ADC" #$04 ; 4 (Pass Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop63: A53F " LDA" $3F ; $3F = Random_A + Random_B 2903 " AND" #$03 ; Between x00-x03 (Run Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 95AA9EAAB9AAD4AA "@Loop64: .WORD" @Loop67, @Loop68, @Loop70, @Loop72 ; Offensive Preference Pointers @Loop65: makes decisions 20A3AB " JSR" L_12_ABA3 ; Random_A 8540 " STA" $40 20A9AB " JSR" L_12_ABA9 ; Random_B 18 " CLC" 6540 " ADC" $40 ; Random_A + Random_B 8540 " STA" $40 20A9AB " JSR" L_12_ABA9 ; Random_C 8541 " STA" $41 209DAB " JSR" L_12_AB9D ; Random_D 18 " CLC" 6541 " ADC" $41 ; Random_C + Random_D 8541 " STA" $41 A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER 900E " BCC" @Loop66 ; Go if < Fourth Quarter A56B " LDA" QUARTER_MINUTES C902 " CMP" #$02 B008 " BCS" @Loop66 ; Go if >= 2 Minutes A5A0 " LDA" SCORE_DEFENSE C59F " CMP" SCORE_OFFENSE 901C " BCC" @Loop68 ; Go if Offense > Points B050 " BCS" @Loop72 ; Go if Defense >= Points @Loop66: A5A2 " LDA" OFFENSIVE_PREFERENCE 0A " ASL" AABD " TAX" 4EAA " LDA" @Loop64,X ; Get Lo Byte of Pointer 853E " STA" $3E 4FAA " LDA" @Loop64+1,X ; Get Hi Byte of Pointer 853F " STA" $3F 6C3E " JMP" ($003E) ; Jump to Pointer 00 ; Offensive Preference x00 @Loop67: A540 " LDA" $40 ; $40 = Random_A + Random_B 2907 " AND" #$07 ; Between x00-x07 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 ; return ; Offensive Preference x01 @Loop68: A540 " LDA" $40 ; $40 = Random_A + Random_B C999 " CMP" #$99 900C " BCC" @Loop69 ; Go if $40 < x99 (59.76% Chance) A541 " LDA" $41 ; $41 = Random_C + Random_D 2903 " AND" #$03 ; Between x00-x03 18 " CLC" 6904 " ADC" #$04 ; 4 (Pass Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop69: A541 " LDA" $41 ; $41 = Random_C + Random_D 2903 " AND" #$03 ; Between x00-x03 (Run Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 ; Offensive Preference x02 @Loop70: A540 " LDA" $40 ; $40 = Random_A + Random_B C999 " CMP" #$99 9009 " BCC" @Loop71 ; Go if $40 < x99 (59.76% Chance) A541 " LDA" $41 ; $41 = Random_C + Random_D 2903 " AND" #$03 ; Between x00-x03 (Run Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop71: A541 " LDA" $41 ; $41 = Random_C + Random_D 2903 " AND" #$03 ; Between x00-x03 18 " CLC" 6904 " ADC" #$04 = 4 (Pass Play Call) 8540 " STA" $40 = Save Play Call 4C2AA7 " JMP" @Loop4 ; Offensive Preference x03 @Loop72: A540 " LDA" $40 ; $40 = Random_A + Random_B C9B7 " CMP" #$B3 9009 " BCC" @Loop73 ; Go if $40 < xB3 (69.92% Chance) A541 " LDA" $41 ; $41 = Random_C + Random_D 2903 " AND" #$03 ; Between x00-x03 (Run Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop73: A541 " LDA" $41 ; $41 = Random_C + Random_D 2903 " AND" #$03 ; Between x00-x03 18 " CLC" 6904 " ADC" #$04 ; 4 (Pass Play Call) 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 ; Defensive Code @Loop74: A569 " LDA" CLOCK_STOPPED_OR_RUNNING 1036 " BPL" @Loop78 ; Go if Clock is Stopped A5A1 " LDA" NUMBER_TIMEOUTS F032 " BEQ" @Loop78 ; Go if Out of Time-Outs A576 " LDA" QUARTER C903 " CMP" FOURTH_QUARTER F004 " BEQ" @Loop75 ; Go if Fourth Quarter C904 " CMP" OVERTIME D028 " BNE" @Loop78 ; Go if not Overtime @Loop75: A59F " LDA" SCORE_DEFENSE_A C5A0 " CMP" SCORE_OFFENSE_A B022 " BCS" @Loop78 ; Go if Defense >= Points A56B " LDA" QUARTER_MINUTES C903 " CMP" #$03 B01C " BCS" @Loop78 ; Go if >= 3 Minutes C902 " CMP" #$02 9009 " BCC" @Loop76 ; Go if < 2 Minutes 209DAB " JSR" L_12_AB9D ; Random C9C0 " CMP" #$C0 B011 " BCS" @Loop78 ; Go if Random >= xC0 (25% Chance) 9007 " BCC" @Loop77 ; Go if Random < xC0 (75% Chance) @Loop76: 209DAB " JSR" L_12_AB9D ; Random C9F0 " CMP" #$F0 B008 " BCS" @Loop78 ; Go if Random >= xF0 (6.25% Chance) @Loop77: A569 " LDA" CLOCK_STOPPED_OR_RUNNING 297F " AND" #$7F 8569 " STA" CLOCK_STOPPED_OR_RUNNING ; Stop Clock C6A1 " DEC" NUMBER_TIMEOUTS ; Call Time-Out @Loop78: A900 " LDA" #$00 8540 " STA" $40 A577 " LDA" DOWN C902 " CMP" THIRD_DOWN F00E " BEQ" @Loop80 ; Go if 3rd Down C903 " CMP" FOURTH_DOWN F00A " BEQ" @Loop80 ; Go if 4th Down @Loop79: 20A3AB " JSR" L_12_ABA3 ; Random 2907 " AND" #$07 ; Between x00 and x07 8540 " STA" $40 ; Save Play Call 4C2AA7 " JMP" @Loop4 @Loop80: A542 " LDA" YARDS_TO_GO_LO C919 " CMP" #$19 A543 " LDA" YARDS_TO_GO_HI E900 " SBC" #$00 B003 " BCS" @Loop81 ; Go if >= 3.125 Yards to Go 4C1BAA " JMP" @Loop62 ; Go if < 3.125 Yards to Go @Loop81: C939 " CMP" #$39 ; BAD CODE (Always goes to @Loop82) 9003 " BCC" @Loop82 ; Go if < 7.125 Yards to Go 4CE8A9 " JMP" @Loop60 ; Go if >= 7.125 Yards to Go @Loop82: 90E0 " BCC" @Loop79 ; Go
  13. Thanks! - I took a stab at this logic situation. I will post it in the thread you linked.
  14. copy and paste the text from spreadsheet into TOOL? that's what I've always done. just load up the rom you want to edit in TOOL, then overwrite the text. I don't know how you're making adjustments or what your formatting is, so of course you might have to concatenate and add commas and all that formatting stuff before you paste it in there. You also might need to add the "[" brackets, and etc... here's an example I just took from a similar spreadsheet (this was for QB1) - note: I had already added the [ ] brackets in other cells... =CONCATENATE(A458,",",B458,",",C458,",",D458,",",E458,",",F458,",",G458,",",H458,",",I458,",",J458,",",K458,",",L458,",",U458,",",V458,",",W458,"") in this example I am taking the values from the cells, adding the text "commas" in there (for TOOL). Again, this is just an example and I am a caveman. YMMV.
×
×
  • Create New...