BBC games that don't run properly on a BBC B

having trouble with an archived file or want to correct something? report it here!
User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: BBC games that don't run properly on a BBC B

Postby richardtoohey » Sun Jun 14, 2015 8:51 am

You can see in the Advanced User Guide page 399 - that's why I chose &FE44 instead of &FE41.

&FE41 is IRA - Input Register A, so maybe it doesn't change very often, so the aliens don't seem that "random" any more.

&FE48 is (when reading) Timer 2 Low Order Counter (T2L-C), so I just tried &FE44 - which is (when reading) Timer 1 Low Order Counter (T1L-C).

&FE45 is Timer 1 High Order Counter (T1H-C), so the value in there will also be changing as the counter ticks down.

I think that because the value is used to "randomly" assign the start location of the alien, it might not matter what is in the counter - just that it changes. So the fact that &FE44 is already being used to count down doesn't matter - it's just a "random" value that we can use.

In using &FE45 you are still using part of the same timer (Timer 1), but again, it possibly doesn't matter - it's just being used as a "random" seed for the alien's X position.

Under OS 0.1, Timer 2 is in the same count-down mode as Timer 1, so the game works. Under OS 1.2, Timer 2 is in a different mode, and the value at &FE48 doesn't change, so no "randomness".

That's my theory, anyway!

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Sun Jun 14, 2015 11:02 am

Sounds Good to me!

Thanks for all your help with this title.
I have now amended my version of the game.

regards,
Mick.

PS one down, a few more to go.
Any joy with Airlift. I noticed that if you fly to the top of the screen, strange things happen. This happens under b-em in OS 1.0 using the tape image as well, so may be either a bug in the program or is it supposed to do it?

User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: BBC games that don't run properly on a BBC B

Postby richardtoohey » Tue Jun 16, 2015 4:36 am

Hi, Mick.

What issues (apart from this new one) do you see with Airlift?

Col said it didn't work for him, but it works for me (haven't tried on a real BBC yet, though.)

I'll try and see if I can survive long enough to get to the top of the screen. I suspect it is more likely to be a game issue (it's not the finest!) but will have a look see.

I'll also look at the other game - Galactic Intruder.

Thanks,
Richard.

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Tue Jun 16, 2015 9:20 am

Hi Rich,

Airlift seems fine to me except for that mess if you go to the top of the screen.

Can only suggest adding some sort of detection code to stop you going that high (if you don't need to for any unknown reason).

Mick.

User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: BBC games that don't run properly on a BBC B

Postby richardtoohey » Tue Jun 16, 2015 9:27 am

This is the helicopter routine - I can't see any code checking for the top of the screen - it is more concerned with detecting what characters are where.

Code: Select all

  170DEF PROCheli:LOCAL I%:COLOUR 3
  180I%=INSTR(CK$,CHR$(?&EC))-1:IF I%<0 THEN PROCwait(5):GOTO 260
  190X1%=X0%+D%(I%,0):Y1%=Y0%+D%(I%,1)
  200HP%=FNasc(X1%,Y1%):IF HP%<>32ANDNOT(HP%=153ANDI%=2)THENHT%=1:GOTO260
  210 IF TC%=0 THEN PROCwait(3):GOTO240
  220TP%=FNasc(X1%,Y1%+1):IF TP%=32ORTP%=154 THEN PRINTTAB(X0%,Y0%+1);" ";TAB(X1%,Y1%+1);CHR$(249);:GOTO240
  230IF TP%=156 THEN TC%=0:PROCscore:ELSE 260
  240PRINTTAB(X0%,Y0%);" ";TAB(X1%,Y1%);CHR$(250);:X0%=X1%:Y0%=Y1%
  250IFFNasc(X0%,Y0%+1)=153 THEN TC%=1
  260ENDPROC
I can have a look at it sometime but it's been a long day already and what's left of the brain has faded.

Doesn't this count as fixing original bugs (part of the game's charm) as opposed to a compatibility issue? :-k Not fussed either way, just wondering. :D

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Thu Jun 18, 2015 9:19 am

Hi Rich,

If you add line 171
IFY0%<1 THEN PRINTTAB(X0%,Y0%);" ":Y0%=1:PRINTTAB(X0%,Y0%);CHR$250

then the helicopter will bounce off the top off the screen from line 0 to line 1.

However, I have noticed that the same error occurs if once at the top end of the screen, if you move the helicopter off screen the left or the right.

to stop going off to the left...
172IFX0%<1 THEN PRINTTAB(X0%,Y0%);" ":X0%=1:PRINTTAB(X0%,Y0%);CHR$250

to stop going off to the right...
173IFX0%>38 THEN PRINTTAB(X0%,Y0%);" ":X0%=38:PRINTTAB(X0%,Y0%);CHR$250

I think this may be solution to the problem, but if anyone has any better, easier solutions then please let me know.

regards,
Mick.

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Thu Jun 18, 2015 6:31 pm

Hi All,

Now taken a last look (hopefully) at Airlift by Bug-Byte.
Ran the game with the additonal data at lines 171,172 and 173 and all seems fine.
I have corrected the spelling mistake in the instructions.
I have added a MOVE0,375 routine to line 1490 to make the text appear in the same place on the screen as it does under b-em with OS0.1 to avoid the text getting lost being the helicopter display.

Lastly, I have removed some of the unnecessary gaps in the listing in order to get the game back down to the same size as it was before all the amendments were added to the text.

Hopefully, we now have a full working copy that runs under OS 1.2 and better still... one that doesn't say "at line 150" when you fly off the top of the screen.

regards,
Mick.

PS my AIRLIFT file uses that usual downloader and moves the data at &1A00 down to &E00 and then runs it.

User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: BBC games that don't run properly on a BBC B

Postby richardtoohey » Fri Jun 19, 2015 4:44 am

Michael Brown wrote:Now taken a last look (hopefully) at Airlift by Bug-Byte.
=D> :D
Michael Brown wrote:I have added a MOVE0,375 routine to line 1490 to make the text appear in the same place on the screen as it does under b-em with OS0.1 to avoid the text getting lost being the helicopter display.
Good catch - I noticed it and thought "what a strange place to put the text" - didn't twig it needed to be moved. :roll:

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Fri Jun 19, 2015 9:10 am

Here is the finished game on a single sided disc.

Airliftrepaired.zip
(4.07 KiB) Downloaded 160 times


It will need plenty testing for any other faults.

If anyone can come up with a better solution to my bouncing off the top and sides routine, then please let me know.
This is because the helicopter is drawn say at line 1 then when moved to line 0 line 1 gets blanked out. What I do is blank out line 0 and move the helicopter back to line 1 and re-draw it there. The same with the sides.

regards,
Mick.

User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: BBC games that don't run properly on a BBC B

Postby richardtoohey » Fri Jun 19, 2015 9:16 am

The only thing I could suggest re. the sides - on some games you can fly off the left and re-appear on the right (and vice versa.)

But not saying that is any better than what you've done; just putting it out there.

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Fri Jun 19, 2015 2:20 pm

Will take another look over the next week or so.

regards,
Mick.

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Sat Jun 20, 2015 7:42 am

Hi Rich,
Taken a another look at Airlift.
Yes... If you alter the code again at lines 172 and 173 and make x0%=38 when it reaches 0 and make it 0 when it reaches 38 then you can fly off the left and re-appear on the right and visa versa. Simple so far, but...

If you are carrying an Urn when you do this then a duplicate of it gets dumped on the far left or right above the white border and stays there eventually blocking your way. Not yet looked at seeing if I can get around this, but I will take a look later.

Mick.

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Sun Jun 21, 2015 5:46 am

Hi Rich,
Taken a yet another look at Airlift.

I have moved my new code from lines 171-173 to lines 191-193 and altered it considerably...

191IFY1%<1 THEN Y0%=1:Y1%=1
192IFX1%<0 THEN X1%=39
193IFX1%>39 THEN X1%=0

Line 191 will allow you to fly up to 1 line below the top of the screen. Altering the 1 to 0 will allow you to fly up to the top, but funny things can happen to you when the storm comes (which I am sure the author did not intend - or did he even bother about it?)
The new code at lines 192 and 193 not only allows you to move off the left side and re-appear on the right (and vice-versa), but also allow you to take a urn with you (if you have collected one).

I think this is the best I am going to get it.
Also I have added some *FX21,0 statements to the instructions to stop the pages flashing by if you repeatedly press a key several times. This fx also keeps the tune in tact where *FX15 breaks it.

Again, if anyone has any suggestions on how to improve it more, then please let me know.

Here's the disc image again.

Airliftrepaired.zip
(4.79 KiB) Downloaded 76 times


Mick.

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Sun Jan 24, 2016 4:48 pm

Another game that doesn't work on a BBC B (although the cover says Model A/B) is World Cup Manager by Cosma.
It does work ok under b-em in OS 1.0 mode so is another OS issue.
Line 9018 seems to be the problem with JMP&E1BB. Is there a OS1.2 equivilant?

Mick.
PS The game stalls after it asks if you want to type in the opposition players.

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: BBC games that don't run properly on a BBC B

Postby jgharston » Sun Jan 24, 2016 5:21 pm

Michael Brown wrote:Another game that doesn't work on a BBC B (although the cover says Model A/B) is World Cup Manager by Cosma.
...
Line 9018 seems to be the problem with JMP&E1BB. Is there a OS1.2 equivilant?

&E1BB is the default destination of WRCH in OS 0.10 (link). If WRCHV hasn't been changed, then just JMP &FFEE. If WRCHV has been changed then whatever was the old value of WRCHV. If the program is redirecting WRCHV it should do something like (the equvilant of) oldwrchv=!&20C:!&20C=whatever and then later do JMP oldwrchv.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Sun Jan 24, 2016 6:07 pm

thanks for that.
I will take a look during the week!

regards,
Mick.

User avatar
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: BBC games that don't run properly on a BBC B

Postby richardtoohey » Mon Jan 25, 2016 8:07 am

I just fudged the call to E0A4 and it works (well, it gets past the crash point you identified).

Line 9018 is below (with a few breaks to improve readability):

Code: Select all

 9018U1=0:FORCC=1TO2:P%=&D00:[OPT2:PHA:TXA:PHA:TYA:PHA:
LDX#4:LDY#0:LDA#129:JSR&FFF4:
PLA:TAY:PLA:TAX:PLA:
JMP&E1BB:]NEXT:
BB=!&20E:?&20E=0:?&20F=&D

So it changes WRCHV to have a delay (4 hundredths of a second?), so the text gets printed out in spurts like they used to do in the old days.

So the old routine's address (plus extra) gets stored in BB.

It points WRCHV to the a new routine at &D00 that slows down the printing of each character, by a short delay, then calling the routine at E1BB (as you've all said, the OS 0.1 WRCH routine.)

User avatar
jgharston
Posts: 2756
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: BBC games that don't run properly on a BBC B

Postby jgharston » Mon Jan 25, 2016 10:25 am

richardtoohey wrote:It points WRCHV to the a new routine at &D00 that slows down the printing of each character, by a short delay, then calling the routine at E1BB (as you've all said, the OS 0.1 WRCH routine.)

...and as soon as an NMI flies past, BNAG! Better to do:

Code: Select all

 9018U1=0:BB=!&20E :REM Save old WRCHV
P%=&D00
[OPT2:RTI:PHA:TXA:PHA:TYA:PHA :\ Save everything
LDX#4:LDY#0:LDA#129:JSR&FFF4  :\ Pause for 4cs
PLA:TAY:PLA:TAX:PLA:JMP BB    :\ Jump to original WRCH handler
]
?&20E=1:?&20F=&D   :REM Point to new WRCH handler

Note the extra RTI and the redirection to &D01 instead of &D00. There are no forwards references in the code, so no need to do two passes.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

Michael Brown
Posts: 1893
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: BBC games that don't run properly on a BBC B

Postby Michael Brown » Mon Jan 25, 2016 12:03 pm

Thanks again for all your help.
New code added to game and it now runs perfect.
Another old game restored and working fine under OS 1.2
(PS Not the best game written, but still a commercial release that deserves a place in the archieve).
I will now add the game to one of my newer games discs and post it at some point.

regards,
Mick.


Return to “archive issues”

Who is online

Users browsing this forum: No registered users and 1 guest