Galactic Intruder by Cosma

having trouble with an archived file or want to correct something? report it here!
Michael Brown
Posts: 1860
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Galactic Intruder by Cosma

Postby Michael Brown » Wed Oct 14, 2015 8:41 am

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 39 times


Mick.

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

Re: Galactic Intruder by Cosma

Postby richardtoohey » Thu Oct 15, 2015 5:02 am

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: 3354
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Galactic Intruder by Cosma

Postby richardtoohey » Tue Nov 10, 2015 8:40 am

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: 1860
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: Galactic Intruder by Cosma

Postby Michael Brown » Tue Nov 10, 2015 1:44 pm

Again, many thanks for taking a look at this.

regards,
Mick.

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

Re: Galactic Intruder by Cosma

Postby richardtoohey » Tue Nov 17, 2015 8:57 am

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: 1090
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca

Re: Galactic Intruder by Cosma

Postby Rich Talbot-Watkins » Tue Nov 17, 2015 2:12 pm

Yep, we've definitely been here before! :)
viewtopic.php?p=96728#p96728

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

Re: Galactic Intruder by Cosma

Postby richardtoohey » Tue Nov 17, 2015 7:00 pm

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: 1860
Joined: Sat Apr 03, 2010 12:54 pm
Location: Nottingham

Re: Galactic Intruder by Cosma

Postby Michael Brown » Sun Jun 12, 2016 11:22 am

Hi all,

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

regards,
Mick.


Return to “archive issues”

Who is online

Users browsing this forum: No registered users and 1 guest