Jump to content

How can you edit logic so COM doesn't go for it on 4th down in a tie when inside their own end of the field?


SBlueman
 Share

Recommended Posts

Is it at all possible to edit the COM logic so when it's a tie game in the 4th quarter they don't go for it on 4th down and instead punt? I hate when you end up with a cheap win because they went for it on 4th and 12 inside their own 20. @TheRaja shared this in the past in the SET Command thread:

 

 

#COM kicks FG only on 4th Down in Regulation Time
#https://tecmobowl.org/forums/topic/69338-set-command-list-use-with-nes-tsb-tsbtool/?do=findComment&comment=498958
SET (0x1897f,0x00)

So I didn't know if there was a way to pull off fixing that annoying 4th down error. Anyone out there know if this can be done and if so, could we accomplish this with a set command that others can use too if they want? 

Link to comment
Share on other sites

  • 6 months later...

Someone posted a link to a TecmoBowl fansite on my site and the author had some ground rules he was using in play testing his game:

 

https://stevenvbrown.wordpress.com/mytbmod/

Quote

 

The only ground rules I had with respect to playcalling were the following:
(Quarters 1 – 3):

IF THE OFFENSE HAS THE BALL INSIDE IT’S OWN 40 AND IT’S 4TH DOWN – PUNT.

IF THE OFFENSE HAS THE BALL INSIDE THE OPPONENT’S 25 AND IT’S 4TH DOWN – FG.

IF THE OFFENSE HAS THE BALL BETWEEN THE OPPONENT’S 25 AND 40 AND IT’S 4TH DOWN AND 3 OR LESS – GO FOR IT, OTHERWISE

IF IT’S 4TH DOWN AND > 3 – FG.

(4th Quarter & OT):

IF THE OFFENSE HAS THE BALL TRAILING BY 7 OR FEWER AND TIME REMAINING > 1:00…INSIDE IT’S OWN 40 AND IT’S 4TH DOWN – PUNT, OTHERWISE…

IF TIME REMAINING < 1:00 OR TRAILING BY > 7 – GO FOR IT.

IF THE OFFENSE HAS THE BALL TRAILING BY 4 – 7 AND TIME REMAINING > 1:00…INSIDE THE OPPONENT’S 25 AND IT’S 4TH DOWN AND > 4 – GO FOR IT, OTHERWISE…

IF IT’S 4TH DOWN AND > 3 – FG.

 

 

Is there any way possible to edit the COM logic in Tecmo Super Bowl for the 28 and/or 32 team roms to these rules?

Link to comment
Share on other sites

  • 10 months later...
On 7/26/2020 at 1:54 AM, SBlueman said:

Is it at all possible to edit the COM logic so when it's a tie game in the 4th quarter they don't go for it on 4th down and instead punt? I hate when you end up with a cheap win because they went for it on 4th and 12 inside their own 20. 

 

So I didn't know if there was a way to pull off fixing that annoying 4th down error. Anyone out there know if this can be done and if so, could we accomplish this with a set command that others can use too if they want? 

 

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						

 

Edited by buck
clarification
Link to comment
Share on other sites

40 minutes ago, bruddog said:

I have this fully mapped out…can take a look when I have time.

 

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.

Link to comment
Share on other sites

I have it all in words now so that doesn't help me much. It's such a convoluted mess that its hard to see. Seems like a unintended programming error to go for it when tied 

 

CHECK_FOR_COM_PUNT:                                                                        ; CHECK FOR PUNT
    LDA QUARTER                                                                            ; IS QTR = FOURTH QTR ?
    CMP #FOURTH_QUARTER                                                                    ;
    BNE @check_for_2nd_4th_qtr_overtime_punt                                                ; NO->CHECK FOR 2ND QTR OVERTIME PUNT
    

@check_2_minutes_or_less_in_4th_quarter                                                    ; CHECK FOR PUNT 4TH QUARTER
    LDA CLOCK_MINUTES                                                                    ; IS MINUTES LEFT >= 2
    CMP #$02                                                                            ;
    BCS DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY_AND_AHEAD_OR_TRAIL_LESS_10                ; YES->NORMAL PUNT CHECKS    
    LDA CPU_OPP_SCORE                                                                     ; IS OPPONENT SCORE < COM TEAM SCORE
    CMP CPU_OFF_SCORE                                                                     ;  
    BCC DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY                                            ; YES-> CHECK FOR FIELD GOAL OR GO FOR IT IF TRAILING BY 10 OR MORE
    BCC @check_for_2nd_4th_qtr_overtime_punt                                            ; *** IMPOSSIBLE
    JMP COM_ALTERNATE_FG_OR_GO_CHECK                                                    ; NO->CHECK FOR FIELD GOAL, OR GO FOR IT

@check_for_2nd_4th_qtr_overtime_punt:                                                    ; CHECK FOR 2ND QTR OVERTIME PUNT
    LDA QUARTER                                                                            ; IS QTR = 2ND QTR ?
    CMP #SECOND_QUARTER                                                                    ;
    BEQ CHECK_FOR_COM_PUNT_2nd_QUARTER_OR_OVERTIME                                        ; YES->2ND QTR OR OVERTIME PUNT, FG OR GO FOR IT
    CMP #OVERTIME_QUARTER                                                                ; IS QTR = OVERTIME ?
    BNE DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY                                            ; NO->NORMAL PUNT CHECKS


CHECK_FOR_COM_PUNT_2nd_QUARTER_OR_OVERTIME:                                                ; 2ND QTR PUNT, FG, GO FOR IT CHECKS
    
@check_2_minutes_or_less_in_2nd_quarter        
    LDA CLOCK_MINUTES                                                                    ; IS MINUTES LEFT >= 2
    CMP #$02                                                                            ;
    BCS DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY                                            ; YES->NORMAL PUNT CHECKS

@check_yards_from_endzone
    IF_YARDS_FROM_ENDZONE_LESS_THAN[amount_true] 50, COM_ALTERNATE_FG_OR_GO_CHECK    


SET_COM_PLAY_CALL_TO_PUNT:                                                                                ; SET COM PLAY CALL = PUNT
    LDA #PUNT_PLAY_CALL_ID                                                                ; SET PLAY CALL = PUNT
    STA com_play_call                                                                    ;
    JMP EXIT_COM_PLAY_CALL                                                                ; JUMP-> EXIT COM LOGIC

DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY_AND_AHEAD_OR_TRAIL_LESS_10:                        ; CHECK FOR FIELD GOAL OR GO FOR IT IF TRAILING BY 10 OR MORE
    LDA CPU_OPP_SCORE                                                                     ; =  OPPONENT SCORE
    SEC                                                                                    ;
    SBC CPU_OFF_SCORE                                                                     ; -  COM TEAM SCORE
    BCC DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY                                            ; OPP TRAILING? YES->NORMAL PUNT CHECKS
    CMP #$0A                                                                            ; OPP AHEAD BY < 10 
    BCC DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY                                            ; YES->NORMAL PUNT CHECKS
    JMP COM_ALTERNATE_FG_OR_GO_CHECK                                                    ; NO->CHECK FOR FIELD GOAL, OR GO FOR IT

DO_COM_PUNT_IF_MORE_THAN_50_YARDS_AWAY:                                                ; NORMAL PUNT CHECKS
    LDA yards_from_endzone                                                                 ; IS YARDS FROM ENDZONE > 50
    CMP #$91                                                                            ;
    LDA yards_from_endzone + 1                                                             ; 
    SBC #$01                                                                            ;
    BCS SET_COM_PLAY_CALL_TO_PUNT                                                        ; YES-> SET COM PLAY CALL = PUNT
    
    LDA yards_to_go                                                                        ; YARDS TO GO <=5
    CMP #$29                                                                            ;
    LDA yards_to_go + 1                                                                    ;
    SBC #$00                                                                            ;
    BCC COM_50PCT_PUNT_CHANCE                                                            ; YES->50% PUNT CHANCE
    
    LDA QUARTER                                                                            ; IS QUARTER = 4
    CMP #OVERTIME_QUARTER                                                                            ; 
    BNE SET_COM_PLAY_CALL_TO_PUNT                                                                            ; YES-> SET COM PLAY CALL = PUNT
    LDA CLOCK_MINUTES                                                                                ; MINUTES LEFT < 2?
    CMP #$02                                                                            ;
    BCC SET_COM_PLAY_CALL_TO_PUNT                                                                            ; YES-> SET COM PLAY CALL = PUNT

COM_50PCT_PUNT_CHANCE:                                                                    ; 50% PUNT CHANCE
    JSR UPDATE_ALL_RANDOMS_SIM_LOAD_RANDOM_TWO                                            ; EXTENSIVE RANDOM NUMBER UPDATE(), RET= RAND_3C
    CMP #$80                                                                            ;
    BCC SET_COM_PLAY_CALL_TO_PUNT                                                                            ; YES-> SET COM PLAY CALL = PUNT
    JMP COM_ALTERNATE_FG_OR_GO_CHECK                                                                            ; NO-> CHECK FOR FIELD GOAL, OR GO FOR IT

 

Link to comment
Share on other sites

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)

 

Edited by buck
Link to comment
Share on other sites

7 hours ago, buck said:

I've been testing this for the past 3 days and run multiple tests and scenarios.  it works. 

 

SET(0x18808, 0xF035)

 

 

Wow, it works! Thank you for the work @buck! I'll add this to the set command thread:

 

#4th Qtr COM Punt Logic Fix
#https://tecmobowl.org/forums/topic/71605-how-can-you-edit-logic-so-com-doesnt-go-for-it-on-4th-down-in-a-tie-when-inside-their-own-end-of-the-field/?do=findComment&comment=510430
SET(0x18808, 0xF035)

 

One step closer to making the COM less idiotic. Gotta love it.

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...