home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 10: Diskmags
/
nf_archive_10.iso
/
MAGS
/
HPSOURCE
/
HPSRC_01.MSA
/
DATA_GARY.DAT
< prev
next >
Wrap
Text File
|
1987-04-21
|
5KB
|
127 lines
Source for "Gary The Phantom Sea-Lion of Old London Town" from the
Better Than Life Demo, by Wheee the fibble.
Ok, this is the source to the old version of the screen I had
in the Better Than Life Demo (which, of course, everyone has got).
It isn't quite finished as it stands, but I've lost the new
version (or at least, I found this one and now can't be bothered
hunting for a newer version). So, here it is... (It's a bit of a
mess, sorry...)
5 on error goto 10000
Just set up the error trap.
10 mode 0 : key off : hide : flash off : curs off : auto back off
: update off
Initialise everything.
11 load "p_tale.prg",7
Load the music into bank 7 (this file must be in the same directory
when you run this!)
12 unpack 4,back
Unpack the font (I think it's the font anyway).
13 for T=0 to 15 : colour T,0 : next T : colour 15,$777
Black the palette.
15 reserve as work 10,186000 : fill start(10) to start(10)+length(10),0
: A1=0 : B1=0 : cls physic : wait vbl
Reserve the memory for the font, clear it, set up some vars
and clear the screen.
20 Y=0 : for T=32 to 90 : zoom back,A1,B1,A1+31,B1+18 to physic,17,0,302
,18 : copy physic,physic+19*160 to start(10)+Y*160 : Y=Y+20
: A1=A1+32 : if A1>288 then A1=0 : B1=B1+20
Zoom the font right across the screen, but keep the same Y-
size. Then copy the zoomed font to bank 10 and move the co-
ordinates for the zoom along.
21 next T : Y=0 : P=0 : CUR=start(10) : H=0 : cls physic : wait vbl
Finish the loop and set up some vars.
27 unpack 5,physic : get palette (physic) : wait vbl : H=0
: colour 1,$730 : for T=1 to 9 : colour T,$777 : next T
: colour 11,$777 : colour 13,$777 : colour 15,$777 : call start(7)+28
Unpack the background and get the palette. The call
start(7)+28 will start up the music.
30 repeat : for Y=0 to 19 : for T=0 to 3 : areg(0)=physic : dreg(0)=16
: dreg(1)=3 : dreg(2)=304 : dreg(3)=200 : areg(1)=physic : dreg(4)=16
: dreg(5)=0 : call start(1)+28 : for D=0 to 3 : areg(0)=CUR+P
: dreg(0)=16 : dreg(1)=Y : dreg(2)=304 : dreg(3)=Y+1
: areg(1)=physic : dreg(4)=16 : dreg(5)=197+D : call start(1)+28
: next D : update : doke $FF825C,(psg(8)/2)*256
: doke $FF8258,(psg(9)/2)*16 : doke $FF8254,psg(10)/2 : next T
: next Y
Hmmm, quite a long line... I wonder what it all does...
Hmmmmm... Well, the general gist it that you copy the screen
up by 3 pixels and copy the same 1 pixel high line 3 times at
the bottom of the screen (ie, to 197,198 and 199). You do this
for the 20 lines height of the font 3 times and it looks like your
font is over 200 pixels high! In case you're wondering what
all of the DREG business is about, it's a routine called "Bitcopy"
which lets you copy individual bitplanes of the screen rather
than all four. Phone Colin Watt on 041 779 3868 if you want
more information on it... The doke $ff... will put the colour
value of the volume of the note on each of the voices directly
into the hardware register for that colour.
40 P=(peek(start(9)+H)-32)*20*160 : H=H mod 2196+1 : until inkey$<>""
: call start(7)+28 : end
The peek will read the next letter (ASCII, 32 to 90) from the
bank and mutiply it up so that the program will find it in the
memory bank. The H = H mod 2196+1 will move H along so that
next time round the next character is read from the bank.
The CALL will turn the music off (space's been pressed).
1000 clw : reserve as screen 14 : cls 14 : for T=32 to 90 : home
: print chr$(T) : A$(T)=screen$(physic,0,0 to 16,8) : next T
This seems to be disabled in the program, dunno why. Maybe
it isn't finished yet... Anyway, it isn't very
important so I wont explain it...
1002 home : print " " : wait vbl : S=start(8) : H=0 : A1=0 : B1=0
: P=32 : unpack 5,physic : wait vbl : colour 1,$730
1010 for H=0 to 123 : for X=0 to 1 : screen copy 14,20,0,324,8 to
14,16,0 : screen copy 14,16,0,304,8 to physic,16,0 : wait vbl
: next X : cls 14,0,304,0 to 320,8 : screen$(14,304,0)=A$(P)
: P=peek(S+H)
1012 next H
1020 for T=0 to 60 : screen copy physic,20,0,324,14 to physic,16,0
: wait vbl : next T : erase 14 : for T=32 to 90 : A$(T)=""
: next T : fade 2 : wait 14 : return
10000 flash 0,"(222,3)(000,3)" : print errn,errl : repeat
: until peek($FFFC02)=57 : end
Error trap.
Well, I hope that's clear. Sorry that it isn't the finished
version, but it can't be helped (well I suppose it could be
really, but never mind). It isn't a very good bit of code really,
but I was quite pleased with it when I first wrote it so it still
has some nostalgic value I suppose. Anyway, I'll be off now. Bye
then...
Wheee the fibble. September. 1991.
note from editor: Gary may think he is the 'The Phantom sea-lion
of old London town', but this is a title that has belonged to a
certain J.R.Hartley for the last decade.