Login
Back to forumSee the full topicGo to last reply

Posted By

JamesC
on 2017-07-22
12:31:11
 Re: Issue with Soccer Boss +4

Luca - Soccer Boss, the C64 conversion.
Soccer Boss

JimmyCoupe - the error in line 3716 masks another error in line 3718. But there are so many other problems in this simulation, that I don't mind my "fix" not being truly accurate. wink

Add the highlighted bit to line 3715:
3715 Y=Y+1 : IF Y = 400 THEN E = INT ( RND(0) * 20 + 1 ) : Y9 = E : GOTO 3718

Add the highlighted bit to line 3718:
3718 AH=0: GOSUB830: A=AS: B=INT(RND(0)*5): XS=B: E = Y9 : X$=T$(DV,E): GOTO3750

The logic behind my "fix":
The code at lines 3690 - 3718 read a data index stored in the "protected" memory of the C64 (the 49152 block) to determine which opponent is being played. However, the 49152 block is not protected on the Plus/4, it's entirely possible that the data stored there is corrupted by other code within the program.

Additionally, there is no test in the code to determine when the end of the data index is reached. This is what causes JimmyCoupe's error at line 3716; Y continues to count upward until we eventually try to PEEK(65536) ... an invalid memory location.

My change to line 3715 limits the search of the data index. If we don't find what we're looking for, we randomly assign an opponent so that gameplay can continue. Additionally, we copy opponent number E to a new variable Y9.

My change to line 3718 is due to E is being pushed over 20 at some other point. Hence the Y9 variable , to restore the previous value of E.

If anyone else wants to dig into this, and possibly come up with a proper fix, these are the variables in question:
X and Y are count indexes
E is the team number of the opponent for this matchup
WK is the week number
AH is the at home flag, 0 for away or 1 for a home game
DV is the division. No matter which team I select, I am always in division 4, so this may contribute to the problem
T$( DV , E ) is the opposing team's name



Back to top


Copyright © Plus/4 World Team, 2001-2024