Galactic Intruder by Cosma

having trouble with an archived file? post in here!
Post Reply
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Galactic Intruder by Cosma

Post by Michael Brown »

Some time back a game called Galactic Intruder got posted on the forum.
It was a uef image but only worked on b-em with OS1.0 selected.
You had to load it in at &BF0 and then type page=&E00, OLD and RUN to get it to work.

Under OS1.2 it made a right mess with the graphics and didn't work.

Has anyone been able to amend this game yet?

Here is a disc image with a disc hack and also a copy of the game taken directly from the uef image saved as T.INTRUDE.
GalacticIntruder.zip
(5.55 KiB) Downloaded 180 times
Mick.
User avatar
richardtoohey
Posts: 4075
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Galactic Intruder by Cosma

Post by richardtoohey »

Oh, I might give this a whirl to get me back into things ... :D

But no promises (and 15 other interesting things on *.!)

Think this will be the same as the other OS 0.1 games - the VDU call that checks the character at the current position, and one of the positioning calls works differently in OS 1.2. Have to go back and look at our discussions about the previous games that were like this (Airlift? Feels like years ago but I know only a few months!) The Master OS restores the same functionality for those calls, so if you try it in Master mode, things appear a bit better initially (but then other issues stop it working properly on a Master.)

This will get you a listing of the BASIC part of the program:

Code: Select all

*LOAD INTRUDE
?&403C=&60
CALL &4000
PAGE=&E00
L.

    1MODE7:PRINTTAB(9,5)"�Galactic Intruders"TAB(8,10)"�(C) Software For All":A$=INKEY$200:CLS:PRINT''''"INSTRUCTIONS:-"''TAB(14)"A - LEFT"'TAB(14)"S - RIGHT"'TAB(14)"O - FIRE":A$=INKEY$200
   25 DIMD(8):FORI=0 TO 23:FORJ%=0 TO 7:D(J%+1)=?(&1D00+I*8+J%):NEXT:VDU 23,(224+I),D(1),D(2),D(3),D(4),D(5),D(6),D(7),D(8):NEXT
   30B$="NO ONE":C$="NO ONE":D$="NO ONE ":C1=0:C2=0:C3=0:ONERRORMODE2:PROCCR
   35MODE2:HIMEM=&1E00:PROCCR:TR1=&2DE0:POTR=TR1+220:NORM=TR1+420:MVNO=TR1+460:BOX=TR1+515:BOY=TR1
13618
   50IBO=&2248:ISH=&2262:IG=&229D:ISS=&22C0:I%=&21FC:L%=&220C:B%=&221E:T%=&2230:G1=&202A:CSH=&209C:SP=&205A:F=&20F6:E1=&1E9A:E2=&1EBC:GD=&1EE4:BD=&1F17:BN=&1F7A:FO=&1E6E:FF=&1E86
   60?(MVNO+27)=1:?(MVNO+28)=3
  130VDU23;8202;0;0;0,4,17,131,28,0,3,19,0,12,28,0,31,19,0,5,18,0,6,25,4,0;1005:PRINTTAB(2);STRING$(8,CHR$(248)):VDU18,2,1,25,4,0;1005;:PRINT"  HI SCORE  SCORE":VDU4,17,132:PRINTTAB(11,2);"       ";TAB(2,2);"        "
  140PRINTTAB(4,2);C1:VDU17,128,18,3,9,5,25,4,0;906;:PRINTSTRING$(4,"^^*^^"):VDU4,17,128
  150!(POTR+22)=&00010031:!(POTR+26)=&00030070:!(POTR+30)=&FFF10010:!(POTR+34)=&000F000C
  160?&6E=10:CALLG1
  170CALLFF:LV=1
  190*FX9,7
  200*FX10,7
  210GOSUB480:RESTORE:LV=1:?(MVNO+28)=3:X=0:REPEATREADA:CALLE1:CALLA:X%=X:CALLGD:X=X+6:GOSUB230:LV=((?(MVNO+38)DIV16))+1:IFLV>3THENLV=3
  211UNTILX=132:GOTO210
  230CALL&2B25:CALLCSH:GOSUB470:LI=235:GOTO500
  235CALLE2:CALL&2B25:CALLCSH
  240GOSUB470:LI=300:GOTO500
  300RETURN
  465DATA&25C4,&23A2,&2406,&25C4,&25C4,&255F,&255F,&2624,&25C4,&23A2,&25C4,&2624,&25C4,&22E6,&255F,&2406,&25C4,&25C4,&2406,&23A2,&22E6,&23A2
  470 *FX15,0
  480SOUND2,1,100,&FF:SOUND3,1,30,&FF
  485CALLBD:IF?(MVNO+22)=0THENCOLOUR3:?(MVNO+28)=4-LV:PRINTTAB(5,14);"PERFECT SHOT";TAB(8,12);"BONUS";TAB(7,16);"LEVEL ";LV:FORZ=0TO20:SOUND1,1,RND(200),1:NEXT:CALLBD:CALLBN:RETURN ELSE RETURN
  500IF?(MVNO+23)=0THENCOLOUR11:COLOUR129:CLS:PRINTTAB(6,15);"GAME OVER":CALLFO:A=INKEY(200):PROCH:GOTO700 ELSEGOTOLI
  600DEFPROCH:W=?(MVNO+37)+?(MVNO+38)*256:IFW>C1 THEN C3=C2:C2=C1:C1=W:PROCNM:D$=C$:C$=B$:B$=W$:ENDPROC ELSEIFW>C2 THEN C3=C2:C2=W:PROCNM:D$=C$:C$=W$:ENDPROC ELSEIFW>C3 THEN C3=W:PROCNM:D$=W$:ENDPROC ELSEENDPROC
  605DEFPROCNM:CLS:COLOUR3:PRINTTAB(3,10);"CONGRATULATIONS";TAB(3,12);"Your name please";TAB(4,15);
  606CALLFO
  608INPUTW$:IFLEN(W$)>=12THENPRINT"Too long";TAB(6);:GOTO608 ELSEENDPROC
  610DEFPROCRE:FORZ=4TO24:PRINTTAB(0,Z);CHR$129CHR$157;STRING$(37," "):NEXT:PRINTTAB(13,6);CHR$141CHR$134;"TOP THREE";TAB(13,7);CHR$141CHR$135;"TOP THREE"
  611FORZ=0TO1:PRINTTAB(3,9+Z);CHR$(141)CHR$136CHR$135;"1 ";B$;" ";TAB(17);C1;TAB(23);" POINTS":PRINTTAB(4,12+Z);CHR$(141)CHR$131;"2 ";C$;" ";TAB(16);C2;TAB(22);" POINTS":PRINTTAB(4,15+Z);CHR$(141)CHR$131;"3 ";D$;" ";
  612PRINTTAB(16);C3;TAB(22);" POINTS"
  614NEXT:PRINTTAB(0,0);CHR$128;:ENDPROC
  700MODE7:HIMEM=&1E00:PROCRE:CALLFO:A$=INKEY$(800):MODE2:HIMEM=&1E00:PROCCR:GOTO130
  800DEFPROCCR:VDU17,132,12,28,2,27,17,7,17,128,12,26,17,132,17,9:PRINTTAB(6,3);"GALACTIC":VDU17,10,5:PRINTTAB(6,5);"INTRUDER":RESTORE900:FORO%=0TO8:READQ1,Q2,Q3,Q4,Q5:VDU18,0,Q1:PRINTTAB(4,9+O%*2);CHR$Q3;:VDU18,0,Q2
  801PRINTTAB(4,9+O%*2);CHR$Q4:GCOL0,6:PRINTTAB(4,9+O%*2);"   ";Q5;" ";"Points":NEXT:GCOL0,10:PRINTTAB(5,29);"GOOD LUCK":A=INKEY(1000)
  802VDU4:PRINTTAB(3,29)"Sound Effects ?";:a$=GET$:IFa$="Y"THENENVELOPE 1,5,100,-3,3,20,20,20,129,0,-127,-127,126,0 ELSEENVELOPE1,0,0,0,0,0,0,0,0,0,0,0,0,0
  805CLS:ENDPROC
  900DATA 1,3,227,228,10,3,10,227,228,10,2,12,239,240,20,9,0,242,250,25,1,3,233,234,30,3,9,237,238,30,2,12,229,230,40,1,1,247,250,50,8,0,243,250,60
User avatar
richardtoohey
Posts: 4075
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Galactic Intruder by Cosma

Post by richardtoohey »

The mangled instructions page is down to behaviour after VDU 5 - same as RoboSwamp:

viewtopic.php?f=6&t=9615#p113162

PROCCR prints the points for each intruder

800DEFPROCCR:VDU17,132,12,28,2,27,17,7,17,128,12,26,17,132,17,9:PRINTTAB(6,3);"GALACTIC":VDU17,10,5:PRINTTAB(6,5);"INTRUDER":

So it uses VDU 5, and then assumes the writing will go at position 6,5 (as it would on OS 0.1). Unfortunately on OS 1.2, the text is printed at the graphics cursor (which is 0,0) - so that's why you just just see the top set of pixels of the word INTRUDER at the bottom left of the screen.

If you knock out the VDU 5, then the text appears correctly (but the aliens no longer do.)

I'll come back to this - want to have a look at the next issue(s) first.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Again, many thanks for taking a look at this.

regards,
Mick.
User avatar
richardtoohey
Posts: 4075
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Galactic Intruder by Cosma

Post by richardtoohey »

Can see what is happening, but don't have any brilliant ideas yet about how to fix it - particularly the m/c parts.

If we work through the BASIC code, you'll see what the problem is.

So PROCCR draws the start screen, with the invaders and their scores/point values.

Code: Select all

800DEFPROCCR:VDU17,132,12,28,2,27,17,7,17,128,12,26,17,132,17,9:PRINTTAB(6,3);"GALACTIC":VDU17,10, 5:PRINTTAB(6,5);"INTRUDER":RESTORE900:FORO%=0TO8:READQ1,Q2,Q3,Q4,Q5:VDU18,0,Q1:PRINTTAB(4,9+O%*2);CHR$Q3;:VDU18,0,Q2

  801PRINTTAB(4,9+O%*2);CHR$Q4:GCOL0,6:PRINTTAB(4,9+O%*2);"   ";Q5;" ";"Points":NEXT:GCOL0,10:PRINTTAB(5,29);"GOOD LUCK":A=INKEY(1000)

  802VDU4:PRINTTAB(3,29)"Sound Effects ?";:a$=GET$:IFa$="Y"THENENVELOPE 1,5,100,-3,3,20,20,20,129,0,-127,-127,126,0 ELSEENVELOPE1,0,0,0,0,0,0,0,0,0,0,0,0,0
  900DATA 1,3,227,228,10,3,10,227,228,10,2,12,239,240,20,9,0,242,250,25,1,3,233,234,30,3,9,237,238,30,2,12,229,230,40,1,1,247,250,50,8,0,243,250,60
  
So line 800 prints GALACTIC at 6,3, then changes colour, and calls the fatal VDU 5.

So at this point, text/VDU characters should go to the graphics cursor, but the programmer carries on using text cursor movement (PRINT TAB, which calls VDU 31.) Works fine on OS 0.1, not on OS 1.2.

So INTRUDER (as previously discussed) appears right at the bottom, almost entirely off-screen (at graphics co-ordinates 0,0).

It then reads values from line 900 - first value is alien 1 colour 1, second value is alien 1 colour 2, third is alien 1 character 1, fourth is alien 1 character 2, fifth is alien 1 score, and then it prints them using PRINT TAB.

So, for this BASIC part, we could change the X,Y stuff to MOVE co-ordinates, and it will work a treat, hurrah.

BUT - for all the machine code parts ... there's lots of VDU 31 code along the lines of

Code: Select all

LDA #&1F
JSR &FFEE
LDA <x of thing to plot>
JSR &FFEE
LDA <y of thing to plot>
JSR &FFEE
You can mirror what MOVE does, with VDU 25, but it is VDU 25,4,<x low>,<x high>,<y low>,<y high>

So you'd have to try and cram all that in PLUS work out the low/high values.

The moving code I've seen adds 1 to X to move left, or 1 to Y to move down ... but that won't work when using MOVE (so you'll have more m/c maths.)

I'm sure it's all doable, but not sure I've got the time/energy ...

Anyone got any bright ideas?

As I've previously discovered, MOS 3.2 restores the OS 0.1 behaviour, so the characters on the score sheet do display correctly on a Master, but then you can't play the game (some error bounces it back to the score screen.)

I'll have a look at that behaviour - if I can fix that then at least it will work on a Master ...

EDIT: it trashes page &0D, and the Master is more sensitive (seen that before too, must search the archives) - so the first * command in the BASIC code (line 190) causes it to fail.
User avatar
Rich Talbot-Watkins
Posts: 2054
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Galactic Intruder by Cosma

Post by Rich Talbot-Watkins »

Yep, we've definitely been here before! :)
viewtopic.php?p=96728#p96728
User avatar
richardtoohey
Posts: 4075
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Galactic Intruder by Cosma

Post by richardtoohey »

richardtoohey wrote:(seen that before too, must search the archives)
Rich Talbot-Watkins wrote:Yep, we've definitely been here before! :)
viewtopic.php?p=96728#p96728
Wow, in the last upgrade *. has gained a bot that searches for stuff in the archives when I'm too lazy! :wink: :lol:

Thank you. :D

(Now to read it and remind myself where I got to, if I actually got anywhere, or just got distracted and wandered off ... again ... [-X :oops: )
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Hi all,

Did anything ever come of converting this game to OS1.2?

regards,
Mick.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Looking through the code there is a strange command at &2A33 which is JSR&98F1.
Does anyone know what the code at &98F1 is under OS1.0 and what the correct jump should be for OS1.2.
Removing this jump by putting in EAEAEA at &2A33 allows the game to play without messing up the screen with all that Blue, but still does not print the score.
Getting closer, but could really do with an explanation of what that jump is for.

regards,
Mick.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: Galactic Intruder by Cosma

Post by Pernod »

Michael Brown wrote: Fri Oct 23, 2020 5:56 pm Looking through the code there is a strange command at &2A33 which is JSR&98F1.
Does anyone know what the code at &98F1 is under OS1.0 and what the correct jump should be for OS1.2.
&98F1 would be in BASIC not the OS, so is the main requirement BASIC1 and not OS1.0?
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Hi,
All I know is that the game works under b-em when you load it with the OS1.0 version, so I thought OS1.0 was the problem.
Not sure if this game got re-released later for the OS1.2 with BASIC 2 as there is another MIA title from Software For All called Galaxians, so would that be a re-issue of this game for OS1.2 and BASIC 2? Or would that have been an even earlier version of this game and possibly had to have its name changed for legal reasons?. Or just a completely different game altogether? Need to find that game to check!

The problem seems to be when you fire and your bullet hits an alien then the SCORE should increment and print in the space at the top right, but it does not and instead it makes the screen go Blue.

If anyone has any suggestions then I would be greatful.
This is one of the last remaining MIA games we have found that currently does not work as it should.

Mick.
Last edited by Michael Brown on Wed Nov 11, 2020 9:41 am, edited 3 times in total.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Just re-loaded the uef into b-em with OS1.0
This time did a ?&2A33=&EA ?&2A34=&EA and ?&2A35=&EA to see what happens.
This time the game plays but the score is not displayed so the call to &98F1 must do this.
Also there is no graphic distortion at the top as far as I could see so maybe this is something else, don't know.

I did a CALL&98F1 to see what happens and it prints 39153 on the screen.
So just wondering if there is a call in OS1.2 that returns the same value?
Or am I on the wrong track?

Mick.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Looking the code in OS1.2 I have found a match of sorts for &98F1 at &991F.
Changing the jump to this address now prints the score in the box, but there now seems to be CHR228 (E4) getting printed across and down the screen starting in the top left. Could this graphics error be that VDU5 / VDU31 issue which is at &2BA2 onwards where things get printed at 0,0 (that Richard mentioned some time back)?

If anyone can help?

Mick.
Last edited by Michael Brown on Thu Nov 12, 2020 9:17 am, edited 5 times in total.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: Galactic Intruder by Cosma

Post by Pernod »

Michael Brown wrote: Sat Oct 24, 2020 9:03 am All I know is that the game works under b-em when you load it with the OS1.0 version, so I thought OS1.0 was the problem.
Not sure if this game got re-released later for the OS1.2.
b-em gives the option of running OS0.1, not OS1.0. And if you choose OS0.1 it also loads BASIC1, and not BASIC2. At startup do REPORT and *FX0 to confirm what's actually being used.

You really should be looking for equivalent routines in BASIC1 vs BASIC2 as all the code locations you are referencing are in BASIC, not the OS.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Not too sure what i'm getting into here.

Anyway, here's a test disc with just the game part on it.
That call at &2A33 is changed from &98F1 to &991F.
The keys are A left S right and O to fire.

Really want to get this running properly as its my last game I have left that isn't working right.

If anyone can help.
Mick.
GALACTICINTRUDERTEST.zip
(4.59 KiB) Downloaded 69 times
Last edited by Michael Brown on Tue Nov 10, 2020 11:58 am, edited 2 times in total.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

Looking at how the games works under b-em in OS1.0 with BASIC 1 - it looks like the point where the graphics glitch is in OS 1.2 with BASIC 2 is caused by the VDU5 / VDU 31 commands trying to print 2 lots of invader graphics at the same time (as previously mentioned by Richard in an earlier post above).
Looks like the machine code bits at the routine from &2BA2 onwards may need a complete re-write.
Anyone any good at that?

Mick.
Last edited by Michael Brown on Thu Nov 12, 2020 9:15 am, edited 6 times in total.
Michael Brown
Posts: 2608
Joined: Sat Apr 03, 2010 1:54 pm
Location: Nottingham
Contact:

Re: Galactic Intruder by Cosma

Post by Michael Brown »

I have now copied my newest hack to the Intruder disc below.
This hack simply bypasses the VDU5 / VDU31 double printing of the aliens on the screen as I have not been able to figure out how to change the code from BASIC 1 to BASIC 2, so in the meantime this is the best version of the game.

Included is the original game T.INTRUDE (which is untouched except for the downloader part and just needs *RUN etc)
and my latest hack $.INTRUDE (full details below)
also $.TEST (see below)
also $.CHEAT (see below)
and $.GALINST which are brand new instructions taken from the inlay.
Just press SHIFT and BREAK to load $.GALINST which then *RUNs $.INTRUDE.

So for $.INTRUDE
I have now been able to sort the VDU5 routine at lines 800 and 801 with some MOVEX,Y commands so that at the start of the game it now prints the aliens and their points in the right place under BASIC 2 as it should have under BASIC 1. I have removed the part that double prints them with VDU5 so that they now match what is seen on the screen during the amended gameplay.
Also, for cosmetic purposes, I have added some VDU23;8202;0;0;0; commands to the MODE7 parts.
Also I have changed all INKEY200 to INKEY500 to allow longer reading of the text.
Also changed the INKEY value at GAME OVER so you get more time to remove your fingers from the keyboard before typing your name.
Also I have amended line 610 to FORZ=2TO22 instead of 4TO24 to make the high score table more central.
The call at &2A33 is changed from &98F1 to &991F (for BASIC 2).
I have joined both sets of CHR$227 and CHR$228, CHR$229 and CHR$230, CHR$233 and CHR$234, CHR$237 and CHR$238, and lastly CHR$239 and CHR$240 together in order to print both alien characters on the screen together, but overlapping each other. This is as close to what the game should look like but without the VDU5 / VDU 31 alien overlay effect.
I have added a *FX225 (LDA#&E1) routine to prevent *KEY issues at the high score.
Also, I have amended the "Sound Effects ?" routine at line 802 onwards so you have to press Y or N to continue (Y for sound or N for no sound). Better than having to press Y for sound or getting a strange sound if you press any other key than Y.
Lastly, the VDU5 at &2BD4 is now changed to VDU4 and the STA&72 at &2BD2 is changed to &70 to keep the graphics the same so that all the above changes work.
I have played the game and it seems OK and it works.

NOTE: There is a file called $.TEST which can be *RUN which now has the correct VDU5 printout for the aliens and points at the start showing how the aliens should look. I did this by adding some X and Y variables and then simple MOVE X,Y commands that then change in value to print the characters in the right place during VDU5 moments. This TEST file is ready for when (or if) the game graphics get properly sorted.

There is also a file called $.CHEAT which can also be *RUN which is simply $.INTRUDE with the "game over" routine at line 500 taken out so you don't die. This allows the game to play along so that you can see all the characters involved on the screen at some point. It's just a test for those of us who can't play with just 3 lives, like myself!

I have now made this the best I can, so until someone can sort out the machine code (VDU5 / VDU31 issues) in the routine from &2BA2 onwards properly, this is it!
If anyone can help?

regards,
Mick.
GalacticIntruder.zip
(6.49 KiB) Downloaded 59 times
Post Reply

Return to “archive issues”