aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Edwards <44756673+KevEdwards@users.noreply.github.com>2019-03-03 21:18:48 +0000
committerGitHub <noreply@github.com>2019-03-03 21:18:48 +0000
commit589d773b6976f60447f40b9c1de8922e60bc716b (patch)
tree721d73fd8ff185710476b245cf7e8d0105f663dd
downloadGalaforce1BBC-master.tar.gz
Galaforce1BBC-master.tar.bz2
Galaforce1BBC-master.zip
Add files via uploadHEADmaster
Initial commit of Galaforce source code for the BBC Micro
-rw-r--r--G1_BLANK.SSDbin0 -> 2560 bytes
-rw-r--r--Master.mak72
-rw-r--r--Prebuild.mak10
-rw-r--r--README.md42
-rw-r--r--bas_extra/LOADER.bas.txt16
-rw-r--r--make.bat7
-rw-r--r--object/O.ALLENV1bin0 -> 646 bytes
-rw-r--r--object/O.DIGITSbin0 -> 240 bytes
-rw-r--r--object/O.DOWNbin0 -> 234 bytes
-rw-r--r--object/O.GRAPHICbin0 -> 1670 bytes
-rw-r--r--object/O.SPFONTbin0 -> 205 bytes
-rw-r--r--screenshot.pngbin0 -> 9562 bytes
-rw-r--r--src/ABSWORK.asm99
-rw-r--r--src/ALIENS1.asm97
-rw-r--r--src/ALIENS2.asm96
-rw-r--r--src/ALIENS3.asm148
-rw-r--r--src/ALIENS4.asm106
-rw-r--r--src/BOMBS1.asm119
-rw-r--r--src/BOMBS2.asm141
-rw-r--r--src/CHARP.asm226
-rw-r--r--src/CONST.asm37
-rw-r--r--src/DOWN.asm87
-rw-r--r--src/FLAGS.asm70
-rw-r--r--src/HIGH.asm163
-rw-r--r--src/INIT.asm224
-rw-r--r--src/MUSIC1.asm154
-rw-r--r--src/MUSIC2.asm148
-rw-r--r--src/MUSIC3.asm69
-rw-r--r--src/PATDAT.asm368
-rw-r--r--src/PATT.asm486
-rw-r--r--src/ROUT1.asm198
-rw-r--r--src/ROUT2.asm191
-rw-r--r--src/ROUT3.asm238
-rw-r--r--src/ROUT4.asm107
-rw-r--r--src/SPRITES.asm136
-rw-r--r--src/STARS.asm68
-rw-r--r--src/TITLE.asm82
-rw-r--r--src/VECTORS.asm208
-rw-r--r--src/WAVE.asm87
-rw-r--r--src/ZPWORK.asm65
40 files changed, 4365 insertions, 0 deletions
diff --git a/G1_BLANK.SSD b/G1_BLANK.SSD
new file mode 100644
index 0000000..62be5dc
--- /dev/null
+++ b/G1_BLANK.SSD
Binary files differ
diff --git a/Master.mak b/Master.mak
new file mode 100644
index 0000000..f67a285
--- /dev/null
+++ b/Master.mak
@@ -0,0 +1,72 @@
+\\
+\\ Galaforce 1 BBC
+\\
+\\ (C) Kevin Edwards 1986-2019
+\\
+
+objstrt% =&B00 \ Start of actual code, data is loaded below this later ( to &900 and &A00 )
+objend% =&3000 \ End of code, where the Downloader is positioned
+objexec% =&4000 \ Execution address when loaded to &1900 rather than &900 ( objend% + &1900 - &900 )
+
+ INCLUDE "src\CONST.asm"
+ INCLUDE "src\ZPWORK.asm"
+ INCLUDE "src\ABSWORK.asm"
+
+ \\ Normal ASCII
+ MAPCHAR ' ','Z', 32
+
+ ORG objstrt% - &200
+ INCBIN "object\O.SPFONT"
+
+ ORG objstrt% - &100
+ INCBIN "object\O.DIGITS"
+
+ \\ Main Code block - source files assembled in the same order as the original
+ ORG objstrt%
+ INCLUDE "src\SPRITES.asm"
+ INCLUDE "src\INIT.asm"
+ INCLUDE "src\ALIENS1.asm"
+ INCLUDE "src\ALIENS2.asm"
+ INCLUDE "src\ALIENS3.asm"
+ INCLUDE "src\ALIENS4.asm"
+ INCLUDE "src\ROUT1.asm"
+ INCLUDE "src\ROUT2.asm"
+ INCLUDE "src\ROUT3.asm"
+ INCLUDE "src\ROUT4.asm"
+ INCLUDE "src\STARS.asm"
+ INCLUDE "src\BOMBS1.asm"
+ INCLUDE "src\BOMBS2.asm"
+ INCLUDE "src\CHARP.asm"
+ INCLUDE "src\FLAGS.asm"
+ INCLUDE "src\MUSIC1.asm"
+ INCLUDE "src\MUSIC2.asm"
+ INCLUDE "src\MUSIC3.asm"
+ INCLUDE "src\TITLE.asm"
+ INCLUDE "src\HIGH.asm"
+ INCLUDE "src\WAVE.asm"
+ INCLUDE "src\PATT.asm"
+ INCLUDE "src\PATDAT.asm"
+ INCLUDE "src\VECTORS.asm"
+
+ objcodeend = P%
+ PRINT"Code start = ",~objstrt%
+ PRINT"End of code = ",~objcodeend-1
+ PRINT"Length = ",~objcodeend-objstrt%," (",objcodeend-objstrt%,") bytes"
+ PRINT"Bytes left = ",~&297A-objcodeend," (",&297A-objcodeend,") bytes"
+
+ \\ Include the graphics object file ( From &297A to &2FFF )
+ ORG &297A
+ INCBIN "object\O.GRAPHIC"
+
+ \\ Include the Downloader binary at its GENUINE load address
+ ORG objend%
+ INCBIN "O.DOWN"
+
+ \\ SAVE out everything
+ PRINT "Saving GAME ", ~objstrt% - &200, ~objend% + &200, ~objexec%, ~&1900
+ SAVE "GAME", objstrt% - &200, objend% + &200, objexec%, &1900
+
+ \\ Save Main Basic Loader ( gets tokenised first )
+ PUTBASIC "bas_extra\LOADER.bas.txt","$.L"
+
+ \ No newline at end of file
diff --git a/Prebuild.mak b/Prebuild.mak
new file mode 100644
index 0000000..c983d67
--- /dev/null
+++ b/Prebuild.mak
@@ -0,0 +1,10 @@
+
+\\ Galaforce 1 BBC Prebuild process
+
+ \\ Build LoadGam - this is the code responsible for loading the main game code
+ INCLUDE "src\DOWN.asm"
+
+ \\ Save to local PC folder - this will be pushed to the final disk image when the 'master.6502' build step runs
+ PRINT"Saving O.DOWN", ~downaddr, ~P%
+ SAVE "O.DOWN", downaddr, P%
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..68308ff
--- /dev/null
+++ b/README.md
@@ -0,0 +1,42 @@
+# Galaforce ( BBC Micro )
+
+**Version V1.00**
+
+(c) Kevin Edwards 1985-2019
+
+![Screenshot](screenshot.png)
+
+In 1985 I began writing a shoot-em-up game for the BBC Micro and Electron home computers. This game was published by Superior Software in 1986 under the name Galaforce.
+
+The game is written entirely in 6502 assembly language. The target computers had only 32K bytes of RAM. Of which 20K bytes was required for the video memory ( BBC Micro ) and 10K bytes on the Electron.
+
+Over 30 years have passed and I have decided to preserve this code for the future by making it public.
+
+Originally, the BBC BASIC in-line assembler was used to build the code. However, I decided to make the codebase assemble using 'beebasm' on a PC. This required me to re-work the original source code. This involved de-tokenizing all of the BBC BASIC files and adapting the code to use beebasm friendly directives / commands. This now allows Visual Code or other IDEs to be used to build the code in a nice development environment.
+
+The code here is for the BBC Micro version of the game. I had slightly different code for the Electron and Master 128 versions. I hope to make these available in the future when I get more spare time.
+
+I hope it is useful to people who have an interest in 6502 assembly language programming and to those who wish to know how games were made in the 1980s.
+
+
+# Build Tools required ( PC )
+
+To build the game you first need to install the following tools:-
+
+* [beebasm](https://github.com/stardot/beebasm)
+
+
+# Build Steps ( PC )
+
+Run 'make.bat' from a command prompt whilst in the project's root folder. This will assemble the code and output 'Galaforce1BBC.ssd' in the same folder. This disk image file can be loaded by many different BBC Micro Emulators, including B-em and BeebEm.
+
+Alternatively, you could use 'Visual Studio Code' with the 'Beeb VSC' extension. I hope to include the required workspace and .json files required to do this.
+
+
+# Additional Notes
+
+You can find me on Twitter @KevEdwardsRetro where I ramble on about all kinds of retro computer and video game things. Please drop by and say hello.
+
+Many thanks to Rich Talbot-Watkins for his great work on BeebAsm.
+
+Thank you for reading this far.
diff --git a/bas_extra/LOADER.bas.txt b/bas_extra/LOADER.bas.txt
new file mode 100644
index 0000000..a52d581
--- /dev/null
+++ b/bas_extra/LOADER.bas.txt
@@ -0,0 +1,16 @@
+ 0REM Galaforce Loader
+ 10REM By Kevin Edwards
+ 20REM (c) 1986
+ 30REM
+ 50
+ 60 ENVELOPE 1,1,-2,0,0,255,0,0,0,0,0,-100,0,0
+ 70 ENVELOPE 2,1,-100,+124,0,12,12,0,126,-2,-1,-10,100,20
+ 80 ENVELOPE 3,6,+8,+8,-16,2,1,1,+126,-5,-2,-6,106,90
+ 90 ENVELOPE 4,2,+1,-1,+1,2,4,2,10,-1,0,-1,106,70
+ 100 ENVELOPE 5,2,+1,-1,+1,2,4,2,126,-1,0,-3,106,80
+ 110 ENVELOPE 6,0,0,0,0,0,0,0,126,-3,0,-10,106,60
+ 120 ENVELOPE 7,5,0,-1,0,7,255,0,126,-4,0,-6,106,40
+ 130 ENVELOPE 8,3,+20,0,-1,1,7,255,126,-5,-1,-2,106,30
+ 140 ENVELOPE 9,3,+12,+16,-28,1,1,1,+126,-3,-3,-10,106,90
+ 150 VDU28,0,31,19,27
+ 170 *RUN GAME
diff --git a/make.bat b/make.bat
new file mode 100644
index 0000000..c617449
--- /dev/null
+++ b/make.bat
@@ -0,0 +1,7 @@
+cls
+
+beebasm -i Prebuild.mak
+
+beebasm -i Master.mak -di G1_BLANK.ssd -do Galaforce1BBC.ssd
+@Echo. Done! .ssd image has been built
+dir *.ssd
diff --git a/object/O.ALLENV1 b/object/O.ALLENV1
new file mode 100644
index 0000000..03eb4ca
--- /dev/null
+++ b/object/O.ALLENV1
Binary files differ
diff --git a/object/O.DIGITS b/object/O.DIGITS
new file mode 100644
index 0000000..f532a71
--- /dev/null
+++ b/object/O.DIGITS
Binary files differ
diff --git a/object/O.DOWN b/object/O.DOWN
new file mode 100644
index 0000000..7db5fc5
--- /dev/null
+++ b/object/O.DOWN
Binary files differ
diff --git a/object/O.GRAPHIC b/object/O.GRAPHIC
new file mode 100644
index 0000000..3164c13
--- /dev/null
+++ b/object/O.GRAPHIC
Binary files differ
diff --git a/object/O.SPFONT b/object/O.SPFONT
new file mode 100644
index 0000000..3d535e6
--- /dev/null
+++ b/object/O.SPFONT
Binary files differ
diff --git a/screenshot.png b/screenshot.png
new file mode 100644
index 0000000..afc71e3
--- /dev/null
+++ b/screenshot.png
Binary files differ
diff --git a/src/ABSWORK.asm b/src/ABSWORK.asm
new file mode 100644
index 0000000..9ac6f9c
--- /dev/null
+++ b/src/ABSWORK.asm
@@ -0,0 +1,99 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ABSWORK"
+\\ P%=&400:BGI%=P%:O%=&3000
+\\ [OPT 6
+
+\\ Map normal ASCII
+MAPCHAR ' ','Z', 32
+
+ORG &400
+
+.alst SKIP maxaliens
+.algra SKIP maxaliens
+.alpatlow SKIP maxaliens
+.alpathigh SKIP maxaliens
+.alpatoff SKIP maxaliens
+.alcount SKIP maxaliens
+.almult SKIP maxaliens
+.aldirect SKIP maxaliens
+.alx SKIP maxaliens
+.aly SKIP maxaliens
+.al_loop_count SKIP maxaliens
+.al_loop_start SKIP maxaliens
+.alpatreflect SKIP maxaliens
+
+.mybullx SKIP mymaxbull
+.mybully SKIP mymaxbull
+.mybullst SKIP mymaxbull
+
+.albullx SKIP almaxbull
+.albully SKIP almaxbull
+.albullst SKIP almaxbull
+.albullspeed SKIP almaxbull
+
+.lives EQUB 0
+.myx EQUB 0
+.myy EQUB 0
+.myst EQUB 0
+.score_base
+.myscore SKIP 7
+.hiscore SKIP 7
+
+.wavoff EQUB 0
+.almove EQUB 0
+.curwave EQUB 0
+.procst EQUB 0
+.mybullact EQUB 0
+.albullact EQUB 0
+.initact EQUB 0
+.bombdel EQUB 0
+.dem_section EQUB 0
+
+.sound_flag EQUB 0
+.key_joy_flag EQUB 0
+.demo_flag EQUB 0
+.demo_count EQUB 0
+.demo_direction EQUB 0
+.counter_sound EQUB 0
+.extra_life_flag EQUB 0
+.sixteen_flag EQUB 0
+.pause_flag EQUB 0
+
+.hstxt
+ EQUS"1234567890"
+ EQUS"1234567890"
+ EQUS"1234567890"
+ EQUS"1234567890"
+ EQUS"1234567890"
+ EQUS"1234567890"
+ EQUS"1234567890"
+ EQUS"1234567890"
+.hsnum
+ EQUS"1234567"
+ EQUS"1234567"
+ EQUS"1234567"
+ EQUS"1234567"
+ EQUS"1234567"
+ EQUS"1234567"
+ EQUS"1234567"
+ EQUS"1234567"
+
+
+\\ PRINT "hstxt ", ~hstxt
+\\ PRINT "hsnum ", ~hsnum
+
+\\ ]
+\\ PRINT"General workspace from &";~BGI%;" to &";~P%-1
+\\ PAGE=&5800
+\\ RETURN
+
+\\ DEFFNres(gap%)
+\\ P%=P%+gap%:O%=O%+gap%
+\\ =6
diff --git a/src/ALIENS1.asm b/src/ALIENS1.asm
new file mode 100644
index 0000000..2535e4c
--- /dev/null
+++ b/src/ALIENS1.asm
@@ -0,0 +1,97 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ALIENS1"
+\\ B%=P%
+\\ [OPT pass
+
+.init_new_aliens
+ LDAmyst:BPLinit_new_al2
+ RTS
+
+.init_new_al2
+
+ LDAinitact:ORAalmove
+ ORAalbullact:BNEalien1
+ LDYwavoff:BNEinital1
+ LDA(wavbase),Y:STAaliens
+ STYprocst:\ start alien=0 !!!
+ SEC:SBC#1
+ STAaliensm1
+ INCwavoff:INY
+
+.inital1
+ INCwavoff
+ LDA(wavbase),Y:BPLalien2
+ JSRflagson
+ INCcurwave
+ LDA#0:STAsixteen_flag
+ JSRflagson
+ BITdemo_flag:BMIinit_snd
+ LDY#7
+ LDAcurwave:BEQnt_zone16
+ AND#&F:BNEnt_zone16
+ LDY#35
+.nt_zone16
+ JSRStartTune
+.init_snd
+ JSRmessage_loop
+ LDAcurwave
+ AND#15:TAY:\ wrap around !!!
+ LDX#0:STXwavoff
+ LDAvecwavl,Y:STAwavbase
+ LDAvecwavh,Y:STAwavbase+1
+.alien1
+ RTS
+
+.alien2
+ CMP#45:BNEspecial
+ LDX#33:STXaliens
+ DEX:STXaliensm1
+.special
+ TAY
+ LDAvecpatl,Y:STAtemp1
+ LDAvecpath,Y:STAtemp1+1
+ LDY#0
+ LDA(temp1),Y:STAtemp2:INY
+.alien4
+ LDX#0
+.alien5
+ LDAinitst,X:BPLalien6
+ INX:CPX#maxpatt:BNEalien5
+ BEQprocess_aliens
+.alien6
+ LDA(temp1),Y:BPLnormal_process
+ AND#&7F:BPLalien2
+.normal_process
+ INY
+ STAinitx,X
+ LDA(temp1),Y:INY
+ STAinity,X
+ LDA(temp1),Y:INY
+ STAinitdel,X
+ STAinitcount,X
+ LDA(temp1),Y:INY
+ STAinitnum,X
+ LDA(temp1),Y:INY
+ STAinitrelx,X
+ LDA(temp1),Y:INY
+ STAinitrely,X
+ LDA(temp1),Y:INY
+ STAinitgra,X
+ LDA(temp1),Y:INY
+ STAinitpnum,X
+ LDA#&80:STAinitst,X
+ INCinitact
+ DECtemp2:BNEalien4
+ RTS
+
+\\ ]
+\\ PRINT"Aliens 1 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ALIENS2.asm b/src/ALIENS2.asm
new file mode 100644
index 0000000..a2fba9f
--- /dev/null
+++ b/src/ALIENS2.asm
@@ -0,0 +1,96 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ALIENS2"
+\\ B%=P%
+\\ [OPT pass
+
+.process_aliens
+ LDAmyst:BPLprocess_ok
+ LDX#12:JMPdelay2
+
+.process_ok
+ LDX#maxpatt-1
+.proc1
+ LDAinitst,X:BPLproc2
+ LDAinitcount,X
+ BEQproc6
+ DECinitcount,X
+.proc2
+ DEX:BPLproc1
+ RTS
+
+.proc6
+ LDAinitdel,X:STAinitcount,X
+ LDYaliensm1
+.proc3
+ LDAalst,Y:BPLproc4
+ DEY:BPLproc3
+ BMIproc2:\ MIGHT PUT ALIENS OUT OF SYNC.
+.proc4
+ LDA#0:STAalpatoff,Y
+ STAalmult,Y
+ LDA#&80:STAalst,Y
+ LDAinitx,X:STAalx,Y
+ PHA
+ LDAinity,X:STAaly,Y
+ LDAinitgra,X:STAalgra,Y
+ STAtemp3
+ SEC:SBC#12:LSRA
+ STXtemp2+1
+ TAX
+ LDAalien_hits,X:STAalcount,Y
+ LDXtemp2+1
+ LDAinitpnum,X
+ STAalpatreflect,Y
+ AND#&7F:TAX
+ LDAvecpatdl,X:STAalpatlow,Y
+ LDAvecpatdh,X:STAalpathigh,Y
+ PLA:TAX
+ JSRrand:AND#31
+ CPX#78:BEQalter_start_x
+ CPX#79:BNEuse_original_x
+ ADC#40
+.alter_start_x
+ STAalx,Y
+.use_original_x
+ LDXtemp2+1
+ INCalmove
+ DECinitnum,X:BNEproc5
+ LDA#0:STAinitst,X
+ DECinitact
+.proc5
+ CLC:LDAinitx,X
+ ADCinitrelx,X
+.chk_xinit_wrap
+ CMP#80:BCCno_initx_wrap
+ SBC#80:JMPchk_xinit_wrap
+.no_initx_wrap
+ STAinitx,X
+ CLC:LDAinity,X
+ ADCinitrely,X:STAinity,X
+
+ LDXalx,Y:LDAaly,Y:TAY
+ JSRalien_on_off
+ LDXtemp2+1
+ JMPproc2
+
+.alien_on_off
+ JSRxycalc
+ STAscreen+1:STXscreen
+ LDA#alheight:STAtemp1+1
+ LDA#&C0:STAscreen2+1
+ LDXtemp3
+ LDAgraph,X:LDYgraph+1,X
+ STYtemp1
+ JMPsprite
+
+\\ ]
+\\ PRINT"Aliens 2 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ALIENS3.asm b/src/ALIENS3.asm
new file mode 100644
index 0000000..9a8d7e3
--- /dev/null
+++ b/src/ALIENS3.asm
@@ -0,0 +1,148 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ALIENS3"
+\\ B%=P%
+\\ [OPT pass
+
+.move_the_aliens
+ LDA#process:STAtemp4
+ LDXprocst
+.move_aliens
+ LDAalst,X:BMImove2
+ JSRdelay
+.move5
+ INCprocst:LDXprocst
+ CPXaliens:BNEmove3
+ JSRprocess_aliens
+ JSRpause
+ LDX#0:STXprocst
+ INCexpldelay
+.move3
+ DECtemp4:BNEmove_aliens
+ RTS
+
+.move2
+ LSRA:BCCmove7
+ JSRexplosion:JMPmove5
+.move7
+ LDAalmult,X:BNEmove4
+ LDAalpatlow,X:STAtemp2
+ LDAalpathigh,X:STAtemp2+1
+ LDYalpatoff,X
+ INCalpatoff,X
+ LDA(temp2),Y
+ BMIbranch_wont_reach
+ JMPmove6
+.branch_wont_reach
+ AND#&7F:STAalmult,X
+ INY:INCalpatoff,X
+ LDA(temp2),Y
+ LDYalpatreflect,X
+ BPLnot_reverse
+ CMP#48:BCSflip_acute_angle
+ TAY
+ AND#&F8:STAtemp1
+ TYA:AND#7:TAY
+ LDAflip_table,Y
+ ORAtemp1
+.flip_acute_angle
+ EOR#7
+.not_reverse
+ STAaldirect,X
+
+.move4
+ LDAalx,X:LDYaly,X:TAX
+ JSRxycalc
+ STAscreen+1:STXscreen
+ LDXprocst:DECalmult,X
+ LDYaldirect,X
+ CPY#&40:BCCmoving_alien
+ JSRdelay
+ JMPmove5
+
+.moving_alien
+ CLC:LDAalx,X
+ ADCaddrelx,Y
+.check_x_wrap
+ CMP#80:BCCx_not_wrapped
+ SBC#80:JMPcheck_x_wrap
+.x_not_wrapped
+ STAalx,X
+ CLC:LDAaly,X
+ ADCaddrely,Y:STAaly,X
+ TAY:LDAalx,X
+.dalg
+ TAX
+ JSRxycalc
+ STAscreen2+1:STXscreen2
+ LDA#alheight:STAtemp1+1
+ LDXprocst
+ LDYalgra,X
+ LDXgraph,Y
+ LDAgraph+1,Y:STAtemp1
+ TAY:TXA
+ JSRsprite
+ JMPmove5
+
+.move6
+ INY:STYtemp3+1:TAY
+ LDAactiontab,Y:STAtemp1
+ LDAactiontab+1,Y:STAtemp1+1
+ LDYtemp3+1
+ JMP(temp1)
+
+.explosion
+ LDAexpldelay:AND#1:BNEexpl4
+ LDAalx,X:LDYaly,X:TAX
+ JSRxycalc
+ STAscreen+1:STXscreen
+ STAscreen2+1:STXscreen2
+ LDA#alheight:STAtemp1+1
+ LDXprocst
+ LDYalgra,X
+ LDAgraph+1,Y:STAtemp1
+ LDAgraph,Y:STAtemp3
+ CPY#12:BCCexpl2
+ LDA#0:STAalgra,X:TAY
+ BEQexpl3
+.expl2
+ INY:INY
+ TYA:STAalgra,X
+ CPY#12:BCCexpl3
+ LDA#&C0:STAscreen2+1
+ LDA#0:STAalst,X
+ DECalmove
+.expl3
+ LDXgraph,Y
+ LDAgraph+1,Y:TAY
+ LDAtemp3
+ JMPsprite
+.expl4
+ RTS
+
+
+\ Flip table for reverse patterns
+\ Values EORed because of EOR#7
+\ which is used after to flip
+\ the acute angled 'climbs'.
+
+.flip_table
+ EQUB 0 EOR 7
+ EQUB 3 EOR 7
+ EQUB 2 EOR 7
+ EQUB 1 EOR 7
+ EQUB 7 EOR 7
+ EQUB 6 EOR 7
+ EQUB 5 EOR 7
+ EQUB 4 EOR 7
+
+\\ ]
+\\ PRINT"Aliens 3 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ALIENS4.asm b/src/ALIENS4.asm
new file mode 100644
index 0000000..f2aa558
--- /dev/null
+++ b/src/ALIENS4.asm
@@ -0,0 +1,106 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ALIENS4"
+\\ B%=P%
+\\ [OPT pass
+
+.actiontab
+ EQUW dat_loop
+ EQUW dat_newpat
+ EQUW dat_newalien
+ EQUW dat_die
+ EQUW dat_dropbomb
+ EQUW dat_for_loop
+ EQUW dat_next
+ EQUW mve
+
+.dat_loop
+ INCalpatoff,X:LDA(temp2),Y
+ STAalpatoff,X
+ JMPmove7
+
+.dat_newpat
+ INCalpatoff,X:LDA(temp2),Y
+ TAY
+ LDAvecpatdl,Y:STAalpatlow,X
+ LDAvecpatdh,Y:STAalpathigh,X
+ LDA#0:STAalpatoff,X
+ JMPmove7
+
+.dat_newalien
+ INCalpatoff,X:LDA(temp2),Y
+ STAtemp1
+ LDYaliensm1
+.dat_newal2
+ LDAalst,Y:BPLdat_newal3
+ DEY:BPLdat_newal2
+ BMIdat_newal4
+
+.dat_newal3
+ LDA#&80:STAalst,Y
+ ASLA:STAalmult,Y
+ STAalpatoff,Y
+ JSRrand:AND#2:STAtemp1+1
+ CLC:ADC#12
+ STAalgra,Y:STAtemp3
+ LDAalpatreflect,X:STAalpatreflect,Y
+ LDAalx,X:PHA:STAalx,Y
+ LDAaly,X:ADC#8:STAaly,Y:PHA
+ LDXtemp1
+ LDAvecpatdl,X:STAalpatlow,Y
+ LDAvecpatdh,X:STAalpathigh,Y
+ LDAtemp1+1:LSRA:TAX
+ LDAalien_hits,X:STAalcount,Y
+ PLA:TAY
+ PLA:TAX
+ INCalmove
+ JSRalien_on_off
+ LDXprocst
+.dat_newal4
+ JMPmove5
+
+.dat_die
+ LDAalst,X
+ ORA#1:STAalst,X
+ JMPmove5
+
+.dat_dropbomb
+ JSRrand:AND#3:BNEnot_allowed
+ JSRinit_bomb
+ LDXprocst
+.not_allowed
+ JMPmove7
+
+.dat_for_loop
+ INCalpatoff,X:LDA(temp2),Y
+ STAal_loop_count,X
+ INY:TYA:STAal_loop_start,X
+ JMPmove7
+
+.dat_next
+ DECal_loop_count,X
+ BMIend_of_loop
+ LDAal_loop_start,X
+ STAalpatoff,X
+.end_of_loop
+ JMPmove7
+
+.mve
+ LDAalx,X:LDYaly,X:TAX
+ JSRxycalc
+ STAscreen+1:STXscreen
+ LDXprocst
+ LDA#72:STAaly,X:TAY
+ LDA#0:STAalx,X
+ JMPdalg
+
+\\ ]
+\\ PRINT"Aliens 4 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/BOMBS1.asm b/src/BOMBS1.asm
new file mode 100644
index 0000000..b0b7b0d
--- /dev/null
+++ b/src/BOMBS1.asm
@@ -0,0 +1,119 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"BOMBS1"
+\\ B%=P%
+\\ [OPT pass
+
+.process_my_bombs
+ LDAbombdel:BEQprocmybmb
+ DECbombdel
+.procmybmb
+ LDAmybullact:BEQbomb10
+ LDX#mymaxbull-1
+.bomb6
+ STXtemp2
+ LDAmybullst,X:BMIbomb7
+.bomb9
+ LDXtemp2
+ DEX:BPLbomb6
+ BMIbomb5
+
+.bomb7
+ LDYmybully,X
+ LDAmybullx,X:TAX
+ JSRmove_bomb
+ LDXtemp2
+ LDAmybully,X
+ SEC:SBC#8:STAmybully,X
+ BNEbomb8
+ DECmybullact
+ LDA#0:STAmybullst,X
+ BEQbomb9
+.bomb8
+ TAY
+ LDAmybullx,X:TAX
+ JSRmove_bomb
+ JMPbomb9
+
+.bomb5
+ LDAmybullact
+.bomb10
+ CMP#mymaxbull:BEQbomb1
+ LDAmyst:BMIbomb1
+ LDAdemo_flag:BMIbomb11
+ BITkey_joy_flag
+ BMIkbd_fire
+ LDA#&80:LDX#0
+ JSRosbyte
+ TXA:LSRA:BCCnot_button
+ BCSbomb11
+.kbd_fire
+ LDX#&B6:JSRcheck_key
+ BEQbomb11
+.not_button
+ LDA#0:STAbombdel
+ BEQbomb1
+.bomb11
+ LDAbombdel:BNEbomb1
+ LDX#mymaxbull-1
+.bomb2
+ LDAmybullst,X:BPLbomb3
+ DEX:BPLbomb2
+
+.bomb1
+ RTS
+
+.bomb3
+ LDA#&FF:STAmybullst,X
+ LDA#7:STAbombdel:\ WAS 3!
+ STXtemp2
+ INCmybullact
+ LDAmyx:CLC:ADC#2
+ STAmybullx,X:STAtemp1
+ LDAmyy:SEC:SBC#23:AND#&F8
+ STAmybully,X
+ TAY:LDXtemp1
+ JSRmove_bomb
+ LDX#firesnd MOD 256
+ LDY#firesnd DIV 256
+ JMPmksound
+
+.move_bomb
+ JSRxycalc2
+ STAscreen+1:STXscreen
+ LDY#7
+.bomb4
+ LDAbombgra,Y
+ EOR(screen),Y
+ STA(screen),Y
+ DEY:BPLbomb4
+ LDA#34:LDY#&E
+ EOR(screen),Y:STA(screen),Y
+.mks2
+ RTS
+
+.bombgra
+ EQUB21:EQUB21:EQUB21:EQUB21:EQUB21:EQUB21
+ EQUB51:EQUB1
+
+.firesnd
+ EQUW &12
+ EQUW 2
+ EQUW 115
+ EQUW 4
+
+.mksound
+ BITsound_flag:BPLmks2
+ BITdemo_flag:BMImks2
+ LDA#7:JMPosword
+
+\\ ]
+\\ PRINT"Bombs 1 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/BOMBS2.asm b/src/BOMBS2.asm
new file mode 100644
index 0000000..4eb1f8f
--- /dev/null
+++ b/src/BOMBS2.asm
@@ -0,0 +1,141 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"BOMBS2"
+\\ B%=P%
+\\ [OPT pass
+
+.process_aliens_bombs
+
+\ Try to init a bomb (random)
+
+ LDAalbullact
+ CMP#almaxbull:BEQnobomb
+ LDAaliensm1:CMP#20:BCCprb2
+ LDAalgra+32
+ CMP#22:BNEprb2
+ LDArand1+1:AND#&F:BNEprb2
+ LDA#32:BNEprb
+.prb2
+ JSRrand
+.bombrate
+ AND#15:BNEnobomb
+ LDArand1+1:AND#63
+ CMPaliens:BCSnobomb
+.prb
+ TAX:LDAalst,X:BPLnobomb
+ LSRA:BCSnobomb
+ JSRinit_bomb
+
+\ Process the alien bombs
+
+.nobomb
+ LDAalbullact:BEQnone_move
+ LDX#almaxbull-1
+.malbomb
+ STXtemp2
+ LDAalbullst,X:BMImalbomb2
+.malbomb3
+ LDXtemp2
+ DEX:BPLmalbomb
+.none_move
+ RTS
+
+.malbomb2
+ LDAalbullspeed,X
+ BMIalways_move
+ LDA#1:BITcounter
+ BNEmalbomb3
+.always_move
+ LDYalbully,X
+ LDAalbullx,X:TAX:STXtemp2+1
+ JSRdisp_bomb
+ LDXtemp2
+ LDAalbully,X
+ CLC:ADC#8
+ STAalbully,X
+ BCCmalbomb4
+ LDA#0:STAalbullst,X
+ DECalbullact
+ JMPmalbomb3
+
+.malbomb4
+ TAY
+ LDAaliensm1
+ CMP#20:BCSmalbomb5
+ LDAcurwave
+ CMP#13:BCCmalbomb5:\ Homing bombs
+ CMP#29:BCShomi1
+ LDAalbullspeed,X
+ BMImalbomb5
+.homi1
+ LDArand1+1:BMImalbomb5
+ LDAmyx:CLC:ADC#2
+ CMPalbullx,X:BEQmalbomb5
+ BCSmalbomb6
+ DECtemp2+1:DECalbullx,X
+ JMPmalbomb5
+.malbomb6
+ INCtemp2+1:INCalbullx,X
+.malbomb5
+ LDXtemp2+1
+ JSRdisp_bomb
+ JMPmalbomb3
+
+\ Subroutine to init a bomb
+\ if possible!
+
+.init_bomb
+ LDAcurwave:CMP#3:BCCno_bomb_allowed
+ LDY#almaxbull-1
+.dropb1
+ LDAalbullst,Y:BPLdropb2
+ DEY:BPLdropb1
+.no_bomb_allowed
+ RTS
+
+.dropb2
+ LDAaly,X
+ CMP#24:BCCno_bomb_allowed
+ CMP#240:BCSno_bomb_allowed
+ ADC#8:AND#&F8
+ STAalbully,Y:STAtemp2
+ CMP#80:BCCany_speed
+ AND#&7F:BCSslow_only
+.any_speed
+ JSRrand
+.slow_only
+ STAalbullspeed,Y
+ LDA#&FF:STAalbullst,Y
+ INCalbullact
+ LDAalx,X:CLC:ADC#2
+ STAalbullx,Y:TAX
+ LDYtemp2
+
+\ Subroutine to display/erase
+\ a bomb.
+
+.disp_bomb
+ JSRxycalc2
+ STAscreen+1:STXscreen
+ LDY#9
+.disp_b2
+ LDAalbomb,Y
+ EOR(screen),Y
+ STA(screen),Y
+ DEY:BPLdisp_b2
+ RTS
+
+.albomb
+ EQUB8:EQUB12:EQUB20:EQUB20:EQUB20:EQUB20:EQUB20:EQUB20
+ EQUB8:EQUB8
+
+\\ ]
+\\ PRINT"Bombs 2 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/CHARP.asm b/src/CHARP.asm
new file mode 100644
index 0000000..64d920b
--- /dev/null
+++ b/src/CHARP.asm
@@ -0,0 +1,226 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"CHARP"
+\\ B%=P%
+\\ [OPT pass
+
+.prnstr LDA strdat,Y:STA data
+ LDA strdat+1,Y:STA data+1:LDY #0
+ LDA (data),Y:STA addres
+ INY:LDA (data),Y:STA addres+1
+ INY:LDA (data),Y:STA length
+ INY:LDA (data),Y:STA colour
+.nxtchr
+ LDA colour:AND #&AA:STA pixcolu+1
+ INY
+
+.prnchr LDA (data),Y:STY savey
+ STA temp:ASLA:ASLA:ADC temp:TAX
+ LDA #5:STA width
+.pixcolum LDY #7
+ LDA &700,X:STA temp:\ Address of character set (spacey)
+
+.pixcolu LDA #0: \ colour bits
+ ASL temp:BCC pixcol0
+ EOR (addres),Y
+ STA (addres),Y
+.pixcol0 DEY:BPL pixcolu
+
+ INX
+ DEC width:BEQ chrdun
+ LDA pixcolu+1:EOR colour:STA pixcolu+1
+ AND #&AA:BEQ pixcolum
+ LDA addres:CLC:ADC #8:STA addres
+ BCC pixcolum:INC addres+1:BNE pixcolum
+
+.chrdun
+ LDA addres:CLC:ADC #8:STA addres
+ BCC lab1:INC addres+1
+.lab1 LDY savey:DEC length:BNE nxtchr
+ RTS
+
+.strdat EQUW paustxt
+ EQUW SCRtext
+ EQUW HItext
+ EQUW entering_wave
+ EQUW gameover
+ EQUW pressspace
+ EQUW galaforce
+ EQUW myname
+ EQUW letter_S_Q
+ EQUW letter_K_J
+ EQUW pressspace2
+ EQUW finish1
+ EQUW finish2
+ EQUW finish3
+ EQUW finish4
+ EQUW copyr
+ EQUW za
+ EQUW zb
+ EQUW zc
+
+.paustxt
+ EQUW &7FE8:EQUB1:EQUB60
+ EQUB25
+
+.SCRtext
+ EQUW &3030:EQUB 3:EQUB 51
+ EQUB28:EQUB12:EQUB27:\ 'SCR'
+
+.HItext
+ EQUW &3150:EQUB 2:EQUB 51
+ EQUB17:EQUB18:\ 'HI'
+
+.entering_wave
+ EQUW &5108:EQUB 16:EQUB 63
+ EQUB14:EQUB23:EQUB29:EQUB14:\ ENTE
+ EQUB27:EQUB18:EQUB23:EQUB16:\ RING
+ EQUB38:EQUB35:EQUB24:EQUB23:\ ZON
+ EQUB14:EQUB38
+.wave_text
+ EQUB38:EQUB38
+.gameover
+ EQUW &4C58:EQUB 9:EQUB 60
+ EQUB16:EQUB10:EQUB22:EQUB14:\ GAME
+ EQUB38:EQUB24:EQUB31:EQUB14:\ OVE
+ EQUB27:\ R
+
+.pressspace
+ EQUW &6760:EQUB 19:EQUB 12
+ EQUB25:EQUB27:EQUB14:EQUB28:\ PRES
+ EQUB28:EQUB38:EQUB28:EQUB25:\ S SP
+ EQUB10:EQUB12:EQUB14:EQUB38:\ ACE
+ EQUB24:EQUB27:EQUB38:EQUB15:\ OR F
+ EQUB18:EQUB27:EQUB14:\ IRE
+
+.pressspace2
+ EQUW &6CF0:EQUB 7:EQUB 12
+ EQUB29:EQUB24:EQUB38:EQUB25:\ TO P
+ EQUB21:EQUB10:EQUB34:\ LAY
+
+.galaforce
+ EQUW &3FD8:EQUB 9:EQUB &F
+ EQUB16:EQUB10:EQUB21:EQUB10:\ GALA
+ EQUB15:EQUB24:EQUB27:EQUB12:EQUB14:\ FORCE
+
+.myname
+ EQUW &4488:EQUB 16:EQUB 60
+ EQUB11:EQUB34:EQUB38:EQUB20:\ BY K
+ EQUB14:EQUB31:EQUB18:EQUB23:\ EVIN
+ EQUB38:EQUB14:EQUB13:EQUB32:\ EDW
+ EQUB10:EQUB27:EQUB13:EQUB28:\ ARDS
+
+.letter_S_Q
+ EQUW &7FD0:EQUB 1:EQUB 3
+.sound_letter
+ EQUB 28
+
+.letter_K_J
+ EQUW &7FB8:EQUB 1:EQUB 60
+.key_joy_letter
+ EQUB 20
+
+.finish1
+ EQUW&5900:EQUB 6:EQUB &C3
+ EQUB28:EQUB10:EQUB29:EQUB30:\ SATU
+ EQUB27:EQUB23:\ RN
+
+.finish2
+ EQUW&58F0:EQUB 7:EQUB &C3
+ EQUB11:EQUB10:EQUB29:EQUB29:\ BATT
+ EQUB14:EQUB27:EQUB34:\ ERY
+
+.finish3
+ EQUW&5910:EQUB 5:EQUB &C3
+ EQUB29:EQUB30:EQUB27:EQUB11:\ TURB
+ EQUB24:\ 0
+
+.finish4
+
+.copyr
+ EQUW&7678:EQUB 17:EQUB 51
+ EQUB28:EQUB30:EQUB25:EQUB14:\SUPE
+ EQUB27:EQUB18:EQUB24:EQUB27:\RIOR
+ EQUB38:EQUB28:EQUB24:EQUB15:\ SOF
+ EQUB29:EQUB32:EQUB10:EQUB27:\TWAR
+ EQUB14:\ E
+
+.za
+ EQUW &FFFF:EQUB 1:EQUB 3
+.zs
+ EQUB &FF
+
+.zb
+ EQUW &FFFF:EQUB 21:EQUB 3
+.zt
+ EQUB 0:\ 1 to 8
+ EQUB 38:\ space
+ EQUS "1234567":\ Score
+ EQUB 38:EQUB38:\ Spaces
+ EQUS "1234567890":\ Name
+
+.zc
+ EQUW &3D00:EQUB 15:EQUB 60
+ EQUB14:EQUB23:EQUB29:EQUB14:EQUB27:EQUB38:\ ENTER
+ EQUB34:EQUB24:EQUB30:EQUB27:EQUB38:\ YOUR
+ EQUB23:EQUB10:EQUB22:EQUB14:\ NAME
+
+\\ ]
+\\ PRINT"Char print from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800:RETURN
+
+\\ REM 012345
+\\ DATA &7F,&41,&41,&79,&7F
+\\ DATA &00,&78,&7F,&00,&00
+\\ DATA &79,&79,&49,&49,&4F
+\\ DATA &63,&49,&49,&7F,&78
+\\ DATA &1F,&11,&71,&7F,&10
+\\ DATA &6F,&49,&49,&79,&79
+\\ REM 6789
+\\ DATA &7F,&49,&49,&49,&7B
+\\ DATA &01,&01,&01,&79,&7F
+\\ DATA &78,&4F,&49,&7F,&78
+\\ DATA &0F,&09,&09,&79,&7F
+\\ REM ABCDEF
+\\ DATA &78,&7F,&09,&0F,&78
+\\ DATA &7F,&79,&49,&4F,&78
+\\ DATA &7F,&79,&41,&41,&63
+\\ DATA &7F,&79,&41,&41,&7F
+\\ DATA &7F,&79,&49,&49,&49
+\\ DATA &7F,&79,&09,&09,&09
+\\ REM GHIJKL
+\\ DATA &7F,&79,&41,&49,&7B
+\\ DATA &7F,&78,&08,&08,&7F
+\\ DATA &00,&7F,&78,&00,&00
+\\ DATA &70,&40,&40,&7F,&78
+\\ DATA &7F,&78,&08,&0F,&78
+\\ DATA &7F,&78,&40,&40,&40
+\\ REM MNOPQR
+\\ DATA &7F,&01,&7F,&01,&7F
+\\ DATA &7F,&79,&01,&01,&7F
+\\ DATA &7F,&41,&41,&43,&7F
+\\ DATA &7F,&79,&09,&09,&0F
+\\ DATA &7F,&41,&61,&61,&7F
+\\ DATA &7F,&79,&09,&0F,&78
+\\ REM STUVWX
+\\ DATA &4F,&49,&49,&79,&79
+\\ DATA &01,&01,&7F,&79,&01
+\\ DATA &7F,&78,&40,&40,&7F
+\\ DATA &0F,&7F,&40,&70,&0F
+\\ DATA &7F,&40,&7F,&40,&7F
+\\ DATA &77,&78,&08,&08,&77
+\\ REM YZ.-(space)
+\\ DATA &0F,&08,&78,&08,&0F
+\\ DATA &7B,&79,&49,&49,&6F
+\\ DATA &00,&00,&60,&00,&00
+\\ DATA &08,&08,&08,&08,&08
+\\ DATA &00,&00,&00,&00,&00
+\\ REM ()
+\\ DATA &00,&18,&66,&81,&00
+\\ DATA &00,&81,&66,&18,&00
diff --git a/src/CONST.asm b/src/CONST.asm
new file mode 100644
index 0000000..aa67704
--- /dev/null
+++ b/src/CONST.asm
@@ -0,0 +1,37 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"CONST"
+
+maxaliens = 40
+maxpatt = 4
+myheight = 16
+
+alheight = 16
+bullheight = 8
+
+mywidth = 6
+alwidth = 6
+
+process = 6
+
+mymaxbull = 3
+almaxbull = 6
+
+xstep = 1
+ystep = 4
+
+graph = &297A
+
+osasci = &FFE3
+osbyte = &FFF4
+oswrch = &FFEE
+osword = &FFF1
+
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/DOWN.asm b/src/DOWN.asm
new file mode 100644
index 0000000..3cbddec
--- /dev/null
+++ b/src/DOWN.asm
@@ -0,0 +1,87 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE":2.DOWN"
+\\ MODE7:HIMEM=&4000
+
+osbyte=&FFF4
+HIMEM = &4000
+downaddr = HIMEM
+
+\\ REM These may change !!
+hstxt = &64D
+hsnum = &69D
+
+\\ FORpass=0TO2STEP2:P%=HIMEM
+\\ B%=P%
+\\ [OPT pass
+
+ORG downaddr
+
+\ download routine
+
+.download
+ LDA#&8C:JSRosbyte
+ LDA#4:LDX#1:JSRosbyte
+ LDX#&9F:LDA#0
+.killzp
+ STA0,X
+ DEX:BNEkillzp
+ STA0
+.dowfont
+ LDA#0
+ STA&400,X
+ STA&500,X
+ STA&600,X
+ LDA&1900,X:STA&700,X
+ INX:BNEdowfont
+ LDY#&27
+.download2
+ LDA&1A00,X:STA&A00,X
+ INX:BNEdownload2
+ INCdownload2+2
+ INCdownload2+5
+ DEY:BNEdownload2
+
+ LDY#8*7-1
+.coph2
+ LDAhighval,Y:STAhsnum,Y
+ DEY:BPLcoph2
+ LDY#8*10-1
+.coph3
+ LDAhighname,Y:STAhstxt,Y
+ DEY:BPLcoph3
+
+ LDX#&F:LDA#0
+.killsroms
+ STA&2A1,X:DEX:BPLkillsroms
+
+ JMP &BEF:\ MAY CHANGE!!
+
+.highval
+ EQUB0:EQUB0:EQUB3:EQUB0:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB2:EQUB5:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB2:EQUB0:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB1:EQUB5:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB1:EQUB0:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB0:EQUB5:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB0:EQUB3:EQUB0:EQUB0:EQUB0
+ EQUB0:EQUB0:EQUB0:EQUB1:EQUB0:EQUB0:EQUB0
+
+.highname
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+ EQUB28:EQUB30:EQUB25:EQUB14:EQUB27:EQUB18:EQUB24:EQUB27:EQUB38:EQUB38
+
+\\ ]NEXT
+\\ PRINT"Down from &";~B%;" to &";~P%-1;" (";P%-B%;")"
diff --git a/src/FLAGS.asm b/src/FLAGS.asm
new file mode 100644
index 0000000..1b6053f
--- /dev/null
+++ b/src/FLAGS.asm
@@ -0,0 +1,70 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"FLAGS"
+\\ B%=P%
+\\ [OPT pass
+
+.liveson LDX lives:BEQ noliveson
+ LDA #&7D:STA addres+1:LDA #&63:STA addres
+.liveon0 LDY #28
+.liveon1 LDA shipgra,Y:EOR(addres),Y:STA(addres),Y:DEY:BPL liveon1
+ LDAaddres:SEC:SBC#32:STAaddres
+ DEX:BNE liveon0
+.noliveson RTS
+
+.flagson LDYcurwave:INY:STYtemp
+ LDA#&7B:STAaddres+1:LDA#0:STAaddres
+ LDA#&7D:STAaddres1+1:LDA#&80:STAaddres1
+
+.flag0 LDAtemp:BEQnomoflags
+ CMP#10:BCCflag1
+ SEC:SBC#10:STAtemp
+ LDX#0
+.flago0 LDY#31
+.flago1 LDAflaggra,X:EOR(addres),Y:STA(addres),Y
+ INX:DEY:CPY#8:BNE flago1
+ LDA#51:EOR(addres1),Y:STA(addres1),Y
+ DEY
+.poleon LDA#1:EOR(addres),Y:STA(addres),Y
+ LDA#1:EOR(addres1),Y:STA(addres1),Y:DEY:BPL poleon
+ LDY#9:LDAflaggra,X:INX:EOR(addres1),Y:STA(addres1),Y
+ LDY#16:LDAflaggra,X:INX:EOR(addres1),Y:STA(addres1),Y:INY
+ LDAflaggra,X:INX:EOR(addres1),Y:STA(addres1),Y
+ LDY#24:LDAflaggra,X:EOR(addres1),Y:STA(addres1),Y
+ LDAaddres:CLC:ADC#32:STAaddres:LDAaddres+1:ADC#0:STAaddres+1
+ LDAaddres1:CLC:ADC#32:STAaddres1:LDAaddres1+1:ADC#0:STAaddres1+1:BNEflag0
+.nomoflags RTS
+
+.flag1 CMP#5:BCCflag2:SEC:SBC#5:STAtemp:LDX#27:BNEflago0
+.flag2 SEC:SBC#1:STAtemp:LDX#54:BNEflago0
+
+.flaggra EQUB49:EQUB49:EQUB49:EQUB49:EQUB49:EQUB34:EQUW0
+ EQUB48:EQUB49:EQUB49:EQUB49:EQUB48:EQUB51:EQUB34:EQUB0
+ EQUB49:EQUB49:EQUB49:EQUB49:EQUB49:EQUB51:EQUB51
+ EQUB51:EQUB51:EQUB34:EQUB34
+
+ EQUB0:EQUB34:EQUB34:EQUB34:EQUD0
+ EQUB49:EQUB49:EQUB49:EQUB51:EQUB49:EQUB34:EQUW0
+ EQUB50:EQUB51:EQUB50:EQUB50:EQUB50:EQUB51:EQUB51
+ EQUB51:EQUB34:EQUW0
+
+ EQUW0:EQUB34:EQUD0:EQUB0
+ EQUB34:EQUB51:EQUB51:EQUB51:EQUB34:EQUW0:EQUB0
+ EQUB50:EQUB50:EQUB50:EQUB50:EQUB50:EQUB51:EQUB34
+ EQUB34:EQUW0:EQUB0
+
+.shipgra EQUB2:EQUB63:EQUB63:EQUB46:EQUB8
+ EQUB17:EQUB21:EQUB30:EQUB56:EQUB60:EQUB60:EQUB15:EQUB10
+ EQUW0:EQUB10:EQUB40:EQUB61:EQUB61:EQUB14:EQUB10
+ EQUW0:EQUB0:EQUB2:EQUB42:EQUB42:EQUB42:EQUB8
+
+\\ ]
+\\ PRINT"Flags etc. from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/HIGH.asm b/src/HIGH.asm
new file mode 100644
index 0000000..7672cfa
--- /dev/null
+++ b/src/HIGH.asm
@@ -0,0 +1,163 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE":2.HIGH"
+\\ B%=P%
+\\ [OPT pass
+
+.ahigh
+ BITdemo_flag:BMIahdem
+ LDX#0:STXtemp1
+.ah1
+ LDAti10,X:STAtemp2
+ LDYti7,X:STYtemp1+1
+ LDX#&FF
+.ah2
+ INY:INX:CPX#7:BEQah4
+ LDAmyscore,X:AND#&7F:CMPhsnum,Y
+ BEQah2
+ BCCah3
+ BNEah4
+.ah3
+ INCtemp1
+ LDXtemp1:CPX#8:BCCah1
+.ahdem
+ RTS
+
+.ah4
+ LDAtemp1+1:CMP#7*7-1:BEQah5
+ LDY#7*7-1
+.ah6
+ LDAhsnum,Y:STAhsnum+7,Y
+ DEY:CPYtemp1+1:BNEah6
+
+ LDY#10*7-1
+.ah7
+ LDAhstxt,Y:STAhstxt+10,Y
+ DEY:CPYtemp2:BNEah7
+
+.ah5
+ LDX#0:LDYtemp1+1:INY
+.ah8
+ LDAmyscore,X:AND#&7F:STAhsnum,Y
+ INY:INX:CPX#7:BNEah8
+ LDX#9:LDYtemp2:INY
+ TYA:PHA
+ LDA#38:\ My space character
+.ah9
+ STAhstxt,Y
+ INY:DEX:BPLah9
+ LDAtemp1
+ ASLA:ASLA:ASLA:ASLA
+ CLC:ADC#9*8:PHA
+ JSRpht
+ LDY#36:JSRprnstr
+ PLA:TAY:LDX#41
+ JSRxycalc2
+ STAza+1:STXza
+ PLA:TAX
+ JSRgnam
+ LDY#36:JSRprnstr
+ JMPpht
+
+.pht
+ LDA#0:STAwavbase
+ LDA#&46:STAzb+1
+ LDA#&C0:STAzb
+.ai1
+ LDXwavbase:INX:STXzt
+ DEX:LDYti7,X:INY
+ LDX#0:STXwavbase+1
+.ai2
+ LDAhsnum,Y:BNEph2
+ CMPwavbase+1:BNEph2
+ LDA#38:BNEph3
+.ph2
+ SEC:RORwavbase+1
+.ph3
+ STAzt+2,X
+ INY:INX:CPX#7:BNEai2
+ LDXwavbase:LDYti10,X:INY
+ LDX#0
+.ai3
+ LDAhstxt,Y:STAzt+11,X
+ INY:INX:CPX#10:BNEai3
+ LDY#34:JSRprnstr
+ LDAzb+1:CLC:ADC#5:STAzb+1
+ INCwavbase
+ LDAwavbase:CMP#8:BCCai1
+ RTS
+
+.gnam
+ LDY#10:BNEgn1
+.gn3
+ LDA#7:JSRoswrch
+.gn1
+ STXwavbase:STYwavbase+1
+ LDA#21:LDX#0:JSRosbyte
+.gn6
+ JSRmovestars
+ LDA#&7E:JSRosbyte
+ LDA#&81:LDX#2:LDY#0:JSRosbyte
+ BCSgn6
+ TXA
+ LDXwavbase:LDYwavbase+1
+ CMP#&D:BEQgn2
+ CMP#&7F:BEQhdel
+ CPY#0:BEQgn3
+ CMP#' ':BNEgn7
+ LDA#38:BNEgn8
+.gn7
+ CMP#'A':BCCgn9
+ CMP#'Z'+1:BCSgn3
+ SBC#54:BNEgn8
+.gn9
+ CMP#'0':BCCgn3
+ CMP#'9'+1:BCSgn3
+ SBC#'0'-1
+.gn8
+ STAzs:STAhstxt,X
+ JSRpit
+ LDAza:CLC:ADC#24:STAza
+ BCCgn4
+ INCza+1
+.gn4
+ INX:DEY:BPLgn1
+.gn2
+ RTS
+
+.hdel
+ CPY#10:BEQgn3
+ LDAza:SEC:SBC#24:STAza
+ BCSgn5
+ DECza+1
+.gn5
+ INY:DEX
+ LDAhstxt,X:STAzs
+ JSRpit
+ LDA#38:\ space
+ STAhstxt,X
+ JMPgn1
+
+.pit
+ TXA:PHA:TYA:PHA
+ LDY#32:JSRprnstr
+ PLA:TAY:PLA:TAX
+ RTS
+
+.ti7
+ EQUB0-1:EQUB7-1:EQUB14-1:EQUB21-1
+ EQUB28-1:EQUB35-1:EQUB42-1:EQUB49-1
+
+.ti10
+ EQUB0-1:EQUB10-1:EQUB20-1:EQUB30-1
+ EQUB40-1:EQUB50-1:EQUB60-1:EQUB70-1
+
+\\ ]
+\\ PRINT"High from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800:RETURN
diff --git a/src/INIT.asm b/src/INIT.asm
new file mode 100644
index 0000000..2922c81
--- /dev/null
+++ b/src/INIT.asm
@@ -0,0 +1,224 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"INIT"
+\\ B%=P%
+\\ [OPT pass
+
+.exec
+ LDX#&FF:TXS
+ JSRStop
+ SEI
+ LDA#dem_sound MOD 256:STA&220
+ LDA#dem_sound DIV 256:STA&221
+ CLI
+ LDY#&E:LDA#0
+.setup_hiscore
+ STAmyscore-1,Y
+ DEY:BNEsetup_hiscore
+ LDA#3:STAhiscore+2
+\ LDA#&90 LDX#0 LDY#1 JSRosbyte
+ LDA#22:JSRoswrch
+ LDA#2:JSRoswrch
+ LDA#10:STA&FE00
+ LDA#32:STA&FE01
+ JSRseed_rnd
+ JSRstarinit
+ LDY#2:JSRprnstr
+ LDY#4:JSRprnstr
+ LDA#&80:STAsound_flag
+ STApause_flag
+ STAkey_joy_flag
+ JSRdisplay_sound_status
+ JSRdisplay_key_joy_status
+
+ JSRinit_score
+ JSRwait_for_space
+ TAY
+
+\ The 'game' loop
+
+.restart
+ LDA#3:STAlives
+ STAsixteen_flag:\ +ve allows it to be printed
+ STAextra_life_flag
+ STYcurwave
+ LDAvecwavl,Y:STAwavbase
+ LDAvecwavh,Y:STAwavbase+1
+ JSRflagson
+ LDA#14:LDX#4:JSRosbyte
+ LDAdemo_flag:BMIno_st_tune
+ LDY#0:JSRStartTune
+.no_st_tune
+ LDA#0:STAwavoff
+ LDY#process:STYaliens
+ DEY:STYaliensm1
+
+ JSRinit_score
+ JMPfirst_life
+
+.next_life
+ JSRliveson
+ LDY#0:LDA(wavbase),Y
+ STAaliens
+ SEC:SBC#1:STAaliensm1
+ DECwavoff
+ DEClives
+ BNEfirst_life
+ LDX#lstman MOD 256
+ LDY#lstman DIV 256
+ JSRmksound
+.first_life
+ JSRliveson
+ JSRrstall
+ JSRpokmypos
+ LDA#&C0:STAscreen2+1
+ LDAgraph+36
+ TAX
+ LDYgraph+37
+ STYtemp1
+ JSRsprite
+ JSRmessage_loop
+
+.main_loop
+ CLI
+ INCcounter
+ JSRescape
+ JSRrand
+ JSRmove_my_base
+ JSRmovestars
+ JSRinit_new_aliens
+ JSRmove_the_aliens
+ JSRprocess_my_bombs
+ JSRprocess_aliens_bombs
+ JSRcollision
+
+ LDAmyst:BPLmain_loop
+ LDAalmove:BPLmain_loop
+ LDAalbullact:ORAmybullact
+ BNEmain_loop
+ JSRdie_loop
+ LDAlives:BNEnext_life
+ JSRcheck_new_high
+ LDA#&31:STAscreen+1
+ JSRpoke_hi_scr
+ JSRgame_over_loop
+ JSRahigh:\ ??? TEST
+ JSRwait_for_space
+ PHA
+ JSRflagson
+ PLA:TAY
+ JMPrestart
+
+.wait_for_space
+ JSRend_message
+ LDA#0:STAcounter
+
+.space_loop
+ JSRsrlp
+ INCcounter:BEQhsclp
+ JSRchk_spc_fire
+ BNEspace_loop
+ PHP
+ JSRend_message
+.jkch
+ JSRdisplay_key_joy_status
+ PLP
+ LDA#0:ADC#19:STAkey_joy_letter
+ LDX#&FF
+ CMP#20:BEQset_kbd_negative
+ INX
+.set_kbd_negative
+ TXA:JSRkey_joy2
+ LDA#0:STAdemo_flag
+ RTS
+
+.hsclp
+ JSRend_message
+ JSRpht
+.hscl2
+ JSRsrlp
+ INCcounter:BEQinto_demo
+ JSRchk_spc_fire
+ BNEhscl2
+ PHP
+ JSRpht
+ JMPjkch
+
+.into_demo
+ JSRpht
+ LDX#&FF:STXdemo_flag
+ STXdemo_count
+ INX:STXdem_section
+ JSRrand:AND#7:\ Random start for demo
+ RTS
+
+.process_demo
+ LDAdemo_flag:BPLnot_in_demo
+ DECdemo_count:BPLnot_in_demo
+ LDArand1+1:STAdemo_direction
+ AND#15:ADC#10:STAdemo_count
+.not_in_demo
+ RTS
+
+\ Event routine for Tune
+\ Refreshing
+
+.dem_sound
+ CMP#4:BNEex_dem2
+ BITpause_flag:BPLex_dem2
+ TXA:PHA:TYA:PHA
+ JSRRefresh
+ JSRMusicTest:BNEex_dem
+ DECdem_section
+ BPLnot_new_tune
+ LDA#7:STAdem_section
+.not_new_tune
+ LDXdem_section:LDYdem_table,X
+ LDAdemo_flag:BPLex_dem
+ JSRStartTune
+ JSRRefresh
+.ex_dem
+ PLA:TAY:PLA:TAX
+.ex_dem2
+ RTS
+
+\ Backwards order for demo
+\ tunes ie 21,21,42,42,..
+
+.dem_table
+ EQUB56:EQUB56:EQUB49:EQUB49
+ EQUB42:EQUB42:EQUB21:EQUB21
+
+.die_loop
+ BITdemo_flag:BMIdl1
+ LDY#28:JSRStartTune
+.dl2
+ JSRmovestars
+ JSRpause
+ LDX#22:JSRdelay2
+ JSRMusicTest
+ BNEdl2
+.dl1
+ RTS
+
+.lstman
+ EQUW &13
+ EQUW 9
+ EQUW 160
+ EQUW 50
+
+.srlp
+ LDX#24:JSRdelay2
+ JSRmovestars
+ JMPpause
+
+\\ ]
+\\ PRINT"Init from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/MUSIC1.asm b/src/MUSIC1.asm
new file mode 100644
index 0000000..82b611a
--- /dev/null
+++ b/src/MUSIC1.asm
@@ -0,0 +1,154 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"MUSIC1"
+\\ B%=P%
+
+ D1=0*64
+ D2=1*64
+ D3=2*64
+ D4=3*64
+ Rest=63
+
+\\ [ OPT pass
+
+ \===================================================================
+ .StartTune
+ SEI
+ STY WK:LDA LT+0,Y:STA get+1:LDA LT+1,Y:STA get+2:LDA #0:STA IX+0
+ LDA LT+2,Y:STA IX+1:LDA LT+3,Y:STA IX+2:LDX LT+4,Y:LDY #3
+ .SL1 LDA SPT,X:STA SPD,Y:DEX:DEY:BPL SL1:LDY WK:LDX LT+5,Y:LDY #2
+ .EL LDA ENVTAB,X:STA ENV,Y:LDA #1:STA CNT,Y:DEX:DEY:BPL EL:LDY WK
+ LDX LT+6,Y:LDY #2
+ .DL LDA DURATAB,X:STA DUR,Y:DEX:DEY:BPL DL
+ CLI:RTS
+
+ .Refresh
+ LDX #2:STX WK
+ .RL LDX WK:DEC CNT,X:BNE NOC:LDY IX,X
+ .get LDA &DDDD,Y:BEQ NOC:INC IX,X:PHA:AND #Rest:CMP #Rest:BEQ ST:PLA:PHA
+ ASL A:ASL A
+ STA SND+4:TXA:CLC:ADC #&11:STA SND+0:LDA ENV,X:STA SND+2:LDA DUR,X
+ STA SND+6
+ BIT sound_flag:BPL ST
+ LDX #SND MOD 256:LDY #SND DIV 256:LDA #7:JSR &FFF1
+ .ST PLA:ROL A:ROL A:ROL A:AND #3:TAX:LDA SPD,X:LDX WK:STA CNT,X
+ .NOC DEC WK:BPL RL
+ RTS
+
+ .MusicTest
+ LDA get+1:STA dat+1:LDA get+2:STA dat+2:LDX #2:LDA #0:PHP
+ .ML LDY IX,X:PLP
+ .dat ORA &FFFF,Y:PHP:DEX:BPL ML:PLP:RTS
+
+ .Stop
+ LDX #HAL MOD 256:LDY #HAL DIV 256:STX get+1:STY get+2:LDA #0:LDX #3
+ .SL2 STA IX-1,X:DEX:BNE SL2:LDA #15:JMP &FFF4
+
+ \====================================================================
+
+ .SND EQUD &00DD00DD:EQUD &00DD00DD
+ .WK EQUB 0
+ .CNT EQUS "012"
+ .IX EQUS "012"
+ .SPD EQUS "0123"
+ .SPT EQUB 5:EQUB 10:EQUB 15:EQUB 20\Lost a Life
+ EQUB 100:EQUB 96:EQUB 93:EQUB 1\In Between Levels
+ EQUB 7:EQUB 14:EQUB 21:EQUB 28\Game Over
+ EQUB 8:EQUB 16:EQUB 24:EQUB 32
+ EQUB 9:EQUB 18:EQUB 27:EQUB 36
+ EQUB 4:EQUB 8:EQUB 12:EQUB 16\Game Start
+ EQUB 3:EQUB 6:EQUB 9:EQUB 12\Demo Music Section "a"
+ .ENV EQUS "012"
+ .ENVTAB
+ EQUB 5:EQUB 6:EQUB 7\Lost a Life
+ EQUB 6:EQUB 6:EQUB 6\Game Start
+ EQUB 4:EQUB 4:EQUB 4\In Between Levels
+ EQUB 8:EQUB 8:EQUB 8\Game Over
+ EQUB 6:EQUB 6:EQUB 5\Demo Music Section "a"
+ .DUR EQUS "012"
+ .DURATAB
+ EQUB 10:EQUB 1:EQUB 1\Lost a Life
+ EQUB 5:EQUB 3:EQUB 2\Game Start, Game Over
+ EQUB 50:EQUB 50:EQUB 50\In Between Levels
+ EQUB 1:EQUB 3:EQUB 10\Demo Music Section "a"
+ EQUB 2:EQUB 3:EQUB 14\Demo Music Section "d"
+
+ \Data Look-up Table
+ \Contains all the gen pertaining to each individual tune.
+
+ \Order is as follows:
+
+ \Address of channel 1 data. 2
+ \Offset from ch. 1 to ch. 2 data. 1
+ \Offset from ch. 1 to ch. 3 data. 1
+ \Index into speeds table 1
+ \Index into envelopes table 1
+ \Index into durations table 1
+
+ \ Addr1 Index2 Index3 Speed Env Dur
+ \Game Over Music & also Lost a Life Music
+
+ .LOST1
+ EQUB 51+D2:EQUB 52+D2:EQUB 51+D2:EQUB 49+D2
+ EQUB 51+D2:EQUB 49+D2:EQUB 47+D2:EQUB 46+D2
+ EQUB 44+D4:EQUB 39+D4:EQUB 32+D1
+ .HAL EQUB 0
+ .OVER1
+ EQUB Rest+D2
+ .OVER2
+ EQUB Rest+D2
+ .OVER3
+ .LOST2
+ EQUB 51+D1:EQUB 47+D1:EQUB 44+D1:EQUB 39+D1
+ EQUB 47+D1:EQUB 44+D1:EQUB 39+D1:EQUB 35+D1
+ EQUB 44+D1:EQUB 39+D1:EQUB 35+D1:EQUB 32+D1
+ EQUB 39+D1:EQUB 35+D1:EQUB 32+D1:EQUB 27+D1
+ EQUB 35+D1:EQUB 32+D1:EQUB 27+D1:EQUB 23+D1
+ EQUB 27+D1:EQUB 25+D1:EQUB 23+D1:EQUB 22+D1
+ EQUB 20+D1:EQUB 8+D1:EQUB 8+D1:EQUB 8+D1:EQUB 8+D1
+ EQUB 0
+ .LOST3
+ EQUB 8+D4:EQUB 20+D4:EQUB 8+D2:EQUB 8+D2:EQUB 20+D4
+ EQUB 8+D2:EQUB 8+D2:EQUB 20+D2:EQUB 8+D2:EQUB 8+D2
+ EQUB 0
+
+ \Between Levels Music
+
+ .BETW1
+ EQUB 00+D4:EQUB 01+D4:EQUB 02+D4:EQUB 03+D4
+ EQUB 04+D4:EQUB 05+D4:EQUB 06+D4:EQUB 07+D4
+ EQUB 08+D4:EQUB 09+D4:EQUB 10+D4:EQUB 11+D4
+ EQUB 12+D4:EQUB 13+D4:EQUB 14+D4:EQUB 15+D4
+ EQUB 16+D4:EQUB 17+D4:EQUB 18+D4:EQUB 19+D4
+ EQUB 20+D1:EQUB 21+D4
+ EQUB 0
+ .BETW2
+ EQUB 00+D4:EQUB 01+D4:EQUB 02+D4:EQUB 03+D4
+ EQUB 04+D4:EQUB 05+D4:EQUB 06+D4:EQUB 07+D4
+ EQUB 08+D4:EQUB 09+D4:EQUB 10+D4:EQUB 11+D4
+ EQUB 12+D4:EQUB 13+D4:EQUB 14+D4:EQUB 15+D4
+ EQUB 16+D4:EQUB 17+D4:EQUB 18+D4:EQUB 19+D4
+ EQUB 20+D4:EQUB 21+D4:EQUB 22+D4:EQUB 23+D4
+ EQUB 24+D2:EQUB 25+D4
+ EQUB 0
+ .BETW3
+ EQUB 00+D4:EQUB 01+D4:EQUB 02+D4:EQUB 03+D4
+ EQUB 04+D4:EQUB 05+D4:EQUB 06+D4:EQUB 07+D4
+ EQUB 08+D4:EQUB 09+D4:EQUB 10+D4:EQUB 11+D4
+ EQUB 12+D4:EQUB 13+D4:EQUB 14+D4:EQUB 15+D4
+ EQUB 16+D4:EQUB 17+D4:EQUB 18+D4:EQUB 19+D4
+ EQUB 20+D4:EQUB 21+D4:EQUB 22+D4:EQUB 23+D4
+ EQUB 24+D4:EQUB 25+D4:EQUB 26+D4
+ EQUB 27+D3:EQUB 28+D4
+ EQUB 0
+
+\\ ]
+\\ PRINT"Music 1 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/MUSIC2.asm b/src/MUSIC2.asm
new file mode 100644
index 0000000..a7ab334
--- /dev/null
+++ b/src/MUSIC2.asm
@@ -0,0 +1,148 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"MUSIC2"
+\\ B%=P%
+\\ [OPT pass
+
+ \Game Start Music
+
+ .STRT1
+ EQUB 8+D3:EQUB 8+D1:EQUB 8+D2
+ EQUB 8+D3:EQUB 8+D1:EQUB 8+D4
+ EQUB 8+D2:EQUB 8+D2:EQUB 8+D2:EQUB 8+D2:EQUB 8+D2
+ EQUB 11+D3:EQUB 11+D1:EQUB 11+D2
+ EQUB 11+D3:EQUB 11+D1:EQUB 11+D4
+ EQUB 13+D2:EQUB 13+D2:EQUB 13+D2:EQUB 13+D2:EQUB 13+D2:EQUB 8+D1
+ EQUB 0
+ .STRT2
+ EQUB 11+D3:EQUB 11+D1:EQUB 11+D2
+ EQUB 11+D3:EQUB 11+D1:EQUB 11+D4
+ EQUB 11+D2:EQUB 11+D2:EQUB 11+D2:EQUB 11+D2:EQUB 11+D2
+ EQUB 15+D3:EQUB 15+D1:EQUB 15+D2
+ EQUB 15+D3:EQUB 15+D1:EQUB 15+D4
+ EQUB 17+D2:EQUB 17+D2:EQUB 17+D2:EQUB 17+D2:EQUB 17+D2:EQUB 11+D1
+ EQUB 0
+ .STRT3
+ EQUB 15+D3:EQUB 15+D1:EQUB 15+D2
+ EQUB 15+D3:EQUB 15+D1:EQUB 15+D4
+ EQUB 15+D2:EQUB 15+D2:EQUB 15+D2:EQUB 15+D2:EQUB 15+D2
+ EQUB 18+D3:EQUB 18+D1:EQUB 18+D2
+ EQUB 18+D3:EQUB 18+D1:EQUB 18+D4
+ EQUB 20+D2:EQUB 20+D2:EQUB 20+D2:EQUB 20+D2:EQUB 20+D2:EQUB 15+D1
+ EQUB 0
+
+
+ .DEMa1
+ EQUB 20+D1:EQUB 20+D1:EQUB 20+D1:EQUB 20+D1
+ EQUB 20+D1:EQUB 20+D1:EQUB 20+D1:EQUB 20+D1
+ EQUB 20+D2:EQUB 20+D2:EQUB 20+D2:EQUB 20+D2
+ EQUB 20+D4:EQUB 20+D2:EQUB 20+D4:EQUB 20+D2:EQUB 20+D4
+ EQUB 32+D1:EQUB 32+D1:EQUB 32+D1:EQUB 32+D1
+ EQUB 32+D1:EQUB 32+D1:EQUB 32+D1:EQUB 32+D1
+ EQUB 32+D2:EQUB 32+D2:EQUB 32+D2:EQUB 32+D2
+ EQUB 32+D4:EQUB 32+D2:EQUB 32+D4:EQUB 32+D2:EQUB 32+D4
+ EQUB 30+D1:EQUB 30+D1:EQUB 30+D1:EQUB 30+D1
+ EQUB 30+D1:EQUB 30+D1:EQUB 30+D1:EQUB 30+D1
+ EQUB 30+D2:EQUB 30+D2:EQUB 30+D2:EQUB 30+D2
+ EQUB 30+D4:EQUB 30+D2:EQUB 27+D4:EQUB 27+D2:EQUB 25+D4
+ EQUB 27+D1:EQUB 27+D1:EQUB 27+D1:EQUB 27+D1
+ EQUB 27+D1:EQUB 27+D1:EQUB 27+D1:EQUB 27+D1
+ EQUB 27+D1:EQUB 27+D1:EQUB 27+D1:EQUB 27+D1
+ EQUB 27+D1:EQUB 27+D1:EQUB 27+D1:EQUB 27+D1
+ EQUB 27+D4:EQUB 27+D4:EQUB 27+D2:EQUB 27+D2:EQUB 27+D4
+ EQUB 0
+ .DEMa2
+ EQUB 8+D4:EQUB Rest+D4:EQUB 15+D4:EQUB Rest+D4
+ EQUB 8+D4:EQUB 8+D4:EQUB 15+D4:EQUB Rest+D4
+ EQUB 16+D4:EQUB Rest+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 16+D4:EQUB 16+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 11+D4:EQUB Rest+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 11+D4:EQUB 11+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 15+D4:EQUB Rest+D4:EQUB 27+D4:EQUB Rest+D4
+ EQUB 15+D2:EQUB 27+D2:EQUB 15+D2:EQUB 13+D2:EQUB 11+D4:EQUB 10+D4
+ EQUB Rest+D1
+ EQUB 0
+ .DEMa3
+ EQUB 20+D4:EQUB Rest+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 27+D4:EQUB Rest+D4:EQUB 30+D4:EQUB Rest+D4
+ EQUB 28+D4:EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4
+ EQUB Rest+D4:EQUB Rest+D4
+ EQUB 30+D2:EQUB 32+D2
+ EQUB 30+D4:EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4
+ EQUB 27+D4:EQUB 25+D4:EQUB 23+D4:EQUB 20+D4:EQUB 22+D4:EQUB Rest+D4
+ EQUB Rest+D4:EQUB Rest+D4
+ EQUB 19+D4:EQUB Rest+D4:EQUB 15+D4
+ EQUB 16+D1:EQUB 17+D1:EQUB 18+D1:EQUB 19+D1:EQUB Rest+D1
+ EQUB 0
+
+
+ .DEMb3
+ EQUB 0
+
+
+ .DEMc1
+ EQUB 0
+
+
+
+ .DEMd1
+ EQUB 44+D1:EQUB 40+D1:EQUB 37+D1:EQUB 32+D1
+ EQUB 40+D1:EQUB 37+D1:EQUB 32+D1:EQUB 28+D1
+ EQUB 37+D1:EQUB 32+D1:EQUB 28+D1:EQUB 25+D1
+ EQUB 32+D1:EQUB 28+D1:EQUB 25+D1:EQUB 20+D1
+ EQUB 28+D1:EQUB 25+D1:EQUB 20+D1:EQUB 16+D1
+ EQUB 25+D1:EQUB 20+D1:EQUB 16+D1:EQUB 13+D1
+ EQUB 20+D1:EQUB 16+D1:EQUB 13+D1:EQUB 8+D1
+ EQUB 16+D1:EQUB 13+D1:EQUB 8+D1:EQUB 4+D1
+ EQUB 6+D1:EQUB 11+D1:EQUB 15+D1:EQUB 18+D1
+ EQUB 11+D1:EQUB 15+D1:EQUB 18+D1:EQUB 23+D1
+ EQUB 15+D1:EQUB 18+D1:EQUB 23+D1:EQUB 27+D1
+ EQUB 18+D1:EQUB 23+D1:EQUB 27+D1:EQUB 30+D1
+ EQUB 23+D1:EQUB 27+D1:EQUB 30+D1:EQUB 35+D1
+ EQUB 27+D1:EQUB 30+D1:EQUB 35+D1:EQUB 39+D1
+ EQUB 30+D1:EQUB 35+D1:EQUB 39+D1:EQUB 42+D1
+ EQUB 35+D1:EQUB 39+D1:EQUB 42+D1:EQUB 47+D1
+ EQUB 45+D1:EQUB 40+D1:EQUB 37+D1:EQUB 33+D1
+ EQUB 40+D1:EQUB 37+D1:EQUB 33+D1:EQUB 28+D1
+ EQUB 37+D1:EQUB 33+D1:EQUB 28+D1:EQUB 25+D1
+ EQUB 33+D1:EQUB 28+D1:EQUB 25+D1:EQUB 21+D1
+ EQUB 28+D1:EQUB 25+D1:EQUB 21+D1:EQUB 16+D1
+ EQUB 25+D1:EQUB 21+D1:EQUB 16+D1:EQUB 13+D1
+ EQUB 21+D1:EQUB 16+D1:EQUB 13+D1:EQUB 9+D1
+ EQUB 16+D1:EQUB 13+D1:EQUB 9+D1:EQUB 4+D1
+ EQUB 40+D4:EQUB 42+D4:EQUB 40+D4:EQUB 39+D4
+ EQUB 40+D4:EQUB 39+D4:EQUB 37+D4:EQUB 35+D4
+ EQUB 0
+ .DEMd3
+ EQUB 25+D4:EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4
+ EQUB Rest+D4:EQUB 27+D4:EQUB 28+D4:EQUB 30+D4
+ EQUB Rest+D4:EQUB 28+D4:EQUB Rest+D4:EQUB 27+D4
+ EQUB Rest+D4:EQUB 23+D4:EQUB Rest+D4:EQUB 25+D4
+ EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4
+ EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4:EQUB Rest+D4
+ EQUB 28+D4:EQUB 30+D4:EQUB Rest+D4:EQUB 32+D4
+ EQUB Rest+D4:EQUB 35+D4:EQUB Rest+D4:EQUB Rest+D4
+ EQUB 0
+ .DEMd2
+ EQUB 13+D4:EQUB Rest+D4:EQUB 25+D4:EQUB Rest+D4
+ EQUB 13+D4:EQUB 13+D4:EQUB 25+D4:EQUB Rest+D4
+ EQUB 11+D4:EQUB Rest+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 11+D4:EQUB 11+D4:EQUB 23+D4:EQUB Rest+D4
+ EQUB 9+D4:EQUB Rest+D4:EQUB 21+D4:EQUB Rest+D4
+ EQUB 9+D4:EQUB 9+D4:EQUB 21+D4:EQUB Rest+D4
+ EQUB 4+D4:EQUB 16+D4:EQUB 5+D4:EQUB 17+D4
+ EQUB 6+D4:EQUB 18+D4:EQUB 7+D4:EQUB 19+D4
+ EQUB Rest+D1
+ EQUB 0
+ .CodeEnd
+
+\\ ]
+\\ PRINT"Music 2 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/MUSIC3.asm b/src/MUSIC3.asm
new file mode 100644
index 0000000..b03fa3f
--- /dev/null
+++ b/src/MUSIC3.asm
@@ -0,0 +1,69 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE":2.MUSIC3"
+\\ B%=P%
+\\ [OPT pass
+
+ \16-Zone Music
+
+ .ZONE1
+ EQUB 8+D2:EQUB 8+D2:EQUB 20+D1:EQUB 8+D2:EQUB 8+D1
+ EQUB 8+D2:EQUB 8+D2:EQUB 20+D1:EQUB 8+D2:EQUB 8+D1
+ EQUB 11+D2:EQUB 11+D2:EQUB 18+D1:EQUB 11+D2:EQUB 11+D1
+ EQUB 11+D2:EQUB 11+D2:EQUB 18+D1:EQUB 11+D2:EQUB 11+D1
+ EQUB 13+D2:EQUB 13+D2:EQUB 20+D1:EQUB 13+D2:EQUB 13+D1
+ EQUB 13+D2:EQUB 13+D2:EQUB 20+D1:EQUB 13+D2:EQUB 13+D1
+ EQUB 16+D2:EQUB 16+D2:EQUB 20+D1:EQUB 16+D2:EQUB 16+D1
+ EQUB 16+D2:EQUB 16+D2:EQUB 20+D1:EQUB 16+D2:EQUB 16+D1
+ EQUB 0
+ .ZONE2
+ EQUB 3+D1:EQUB 8+D1:EQUB 11+D1:EQUB 15+D1
+ EQUB 20+D1:EQUB 15+D1:EQUB 11+D1:EQUB 8+D1
+ EQUB 3+D1:EQUB 8+D1:EQUB 11+D1:EQUB 15+D1
+ EQUB 20+D1:EQUB 15+D1:EQUB 11+D1:EQUB 8+D1
+ EQUB 3+D1:EQUB 6+D1:EQUB 11+D1:EQUB 15+D1
+ EQUB 18+D1:EQUB 15+D1:EQUB 11+D1:EQUB 6+D1
+ EQUB 3+D1:EQUB 6+D1:EQUB 11+D1:EQUB 15+D1
+ EQUB 18+D1:EQUB 15+D1:EQUB 11+D1:EQUB 6+D1
+ EQUB 4+D1:EQUB 8+D1:EQUB 13+D1:EQUB 16+D1
+ EQUB 20+D1:EQUB 16+D1:EQUB 13+D1:EQUB 8+D1
+ EQUB 4+D1:EQUB 8+D1:EQUB 13+D1:EQUB 16+D1
+ EQUB 20+D1:EQUB 16+D1:EQUB 13+D1:EQUB 8+D1
+ EQUB 4+D1:EQUB 8+D1:EQUB 11+D1:EQUB 16+D1
+ EQUB 20+D1:EQUB 16+D1:EQUB 11+D1:EQUB 8+D1
+ EQUB 4+D1:EQUB 8+D1:EQUB 11+D1:EQUB 16+D1
+ EQUB 20+D1:EQUB 16+D1:EQUB 11+D1:EQUB 8+D1:EQUB Rest+D1
+ EQUB 0
+ .ZONE3
+ EQUB 32+D2:EQUB 32+D3:EQUB 32+D2:EQUB 30+D1
+ EQUB 32+D2:EQUB 32+D3:EQUB 27+D1:EQUB 30+D1:EQUB 32+D1
+ EQUB 35+D2:EQUB 35+D3:EQUB 35+D2:EQUB 30+D1
+ EQUB 35+D2:EQUB 35+D3:EQUB 30+D1:EQUB 32+D1:EQUB 35+D1
+ EQUB 37+D2:EQUB 37+D3:EQUB 37+D2:EQUB 37+D1
+ EQUB 37+D2:EQUB 37+D3:EQUB 37+D2:EQUB 36+D1
+ EQUB 35+D2:EQUB 35+D3:EQUB 35+D2:EQUB 34+D1
+ EQUB 35+D2:EQUB 35+D1:EQUB 34+D1
+ EQUB 35+D1:EQUB 37+D1:EQUB 35+D1:EQUB 34+D1
+ EQUB 0
+
+ \ Addr1 Index2 Index3 Speed Env Dur
+ .LT EQUW STRT1:EQUB STRT2-STRT1:EQUB STRT3-STRT1:EQUB 23:EQUB 05:EQUB 05
+ EQUW BETW1:EQUB BETW2-BETW1:EQUB BETW3-BETW1:EQUB 07:EQUB 08:EQUB 08
+ EQUW OVER1:EQUB OVER2-OVER1:EQUB OVER3-OVER1:EQUB 23:EQUB 11:EQUB 05
+ EQUW DEMa1:EQUB DEMa2-DEMa1:EQUB DEMa3-DEMa1:EQUB 27:EQUB 14:EQUB 11
+ EQUW LOST1:EQUB LOST2-LOST1:EQUB LOST3-LOST1:EQUB 03:EQUB 02:EQUB 02
+ EQUW ZONE1:EQUB ZONE2-ZONE1:EQUB ZONE3-ZONE1:EQUB 03:EQUB 05:EQUB 05
+ EQUW DEMa1:EQUB DEMa2-DEMa1:EQUB DEMb3-DEMa1:EQUB 27:EQUB 14:EQUB 11
+ EQUW DEMa2:EQUB DEMa3-DEMa2:EQUB DEMc1-DEMa2:EQUB 27:EQUB 14:EQUB 11
+ EQUW DEMd1:EQUB DEMd2-DEMd1:EQUB DEMd3-DEMd1:EQUB 27:EQUB 14:EQUB 14
+
+\\ ]
+\\ PRINT"Music 3 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/PATDAT.asm b/src/PATDAT.asm
new file mode 100644
index 0000000..7d61cfd
--- /dev/null
+++ b/src/PATDAT.asm
@@ -0,0 +1,368 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"PATDAT"
+\\ B%=P%
+\\ [OPT pass
+
+.patdat0
+ EQUB&86:EQUB9
+ EQUB&83:EQUB12
+ EQUB10:EQUB1
+ EQUB&86:EQUB13
+ EQUB&86:EQUB12
+ EQUB12
+ EQUB&83:EQUB13
+ EQUB6
+
+.patdat1
+ EQUB&97:EQUB13
+ EQUB&94:EQUB11
+ EQUB&98:EQUB12
+ EQUB6
+
+.patdat2
+ EQUB&88:EQUB12
+ EQUB&88:EQUB15
+ EQUB&88:EQUB12
+ EQUB10:EQUB100
+ EQUB&84:EQUB1
+ EQUB4:EQUB3
+ EQUB&84:EQUB3
+ EQUB12
+ EQUB6
+
+.patdat3
+ EQUB&88:EQUB9
+ EQUB&83:EQUB10
+ EQUB&88:EQUB11
+ EQUB&83:EQUB10
+ EQUB0:EQUB0
+
+.patdat4
+ EQUB10:EQUB2
+ EQUB&87:EQUB9
+ EQUB4:EQUB12
+ EQUB12
+ EQUB&87:EQUB9
+ EQUB&87:EQUB11
+ EQUB10:EQUB2
+ EQUB4:EQUB12
+ EQUB&87:EQUB11
+ EQUB12
+ EQUB0:EQUB0
+
+.patdat5
+ EQUB&8D:EQUB12
+ EQUB&88:EQUB0
+ EQUB&84:EQUB3
+ EQUB&88:EQUB6
+ EQUB&88:EQUB5
+ EQUB&8D:EQUB20
+ EQUB6
+
+.patdat6
+ EQUB&84:EQUB18
+ EQUB&85:EQUB9
+ EQUB&86:EQUB18
+ EQUB&88:EQUB9
+ EQUB&85:EQUB18
+ EQUB&86:EQUB9
+ EQUB6
+
+.patdat7
+ EQUB&93:EQUB13
+ EQUB&88:EQUB9
+ EQUB&82:EQUB4
+ EQUB&87:EQUB7
+ EQUB&86:EQUB15
+ EQUB&87:EQUB23
+ EQUB6
+
+.patdat8
+ EQUB&88:EQUB10
+ EQUB&84:EQUB21
+ EQUB&86:EQUB10
+ EQUB&84:EQUB5
+ EQUB&82:EQUB1
+ EQUB&84:EQUB4
+ EQUB&88:EQUB12
+ EQUB&84:EQUB8
+ EQUB&8B:EQUB15
+ EQUB6
+
+.patdat9
+ EQUB&85:EQUB9
+ EQUB&85:EQUB12
+ EQUB&85:EQUB8
+ EQUB&85:EQUB7
+ EQUB&85:EQUB3
+ EQUB&87:EQUB6
+ EQUB&86:EQUB2
+ EQUB&8E:EQUB13
+ EQUB&89:EQUB17
+ EQUB&8A:EQUB13
+ EQUB6
+
+.patdat10
+ EQUB&83:EQUB20
+ EQUB&83:EQUB24
+ EQUB&84:EQUB16
+ EQUB&84:EQUB8
+ EQUB&84:EQUB4
+ EQUB&84:EQUB1
+ EQUB&82:EQUB9
+ EQUB&88:EQUB5
+ EQUB&8A:EQUB13
+ EQUB&87:EQUB21
+ EQUB&85:EQUB10
+ EQUB6
+
+.patdat11
+ EQUB&86:EQUB13
+ EQUB&84:EQUB5
+ EQUB&85:EQUB9
+ EQUB&86:EQUB52
+ EQUB&89:EQUB9
+ EQUB&89:EQUB49
+ EQUB&84:EQUB10
+ EQUB&84:EQUB14
+ EQUB&85:EQUB54
+ EQUB&87:EQUB11
+ EQUB&93:EQUB51
+ EQUB6
+
+.patdat12
+ EQUB&88:EQUB6
+ EQUB&85:EQUB1
+ EQUB&8F:EQUB5
+ EQUB&8F:EQUB6
+ EQUB&88:EQUB5
+ EQUB&85:EQUB3
+ EQUB0:EQUB0
+
+.patdat13
+ EQUB&88:EQUB14
+ EQUB&85:EQUB54
+ EQUB&85:EQUB11
+ EQUB&84:EQUB51
+ EQUB&85:EQUB8
+ EQUB&85:EQUB52
+ EQUB&83:EQUB9
+ EQUB&87:EQUB13
+ EQUB&85:EQUB21
+ EQUB&87:EQUB29
+ EQUB6
+
+.patdat14
+ EQUB10:EQUB1
+ EQUB&8C:EQUB13
+ EQUB&83:EQUB49
+ EQUB&82:EQUB9
+ EQUB&82:EQUB52
+ EQUB&81:EQUB11
+ EQUB&82:EQUB48
+ EQUB&81:EQUB8
+ EQUB&82:EQUB55
+ EQUB&82:EQUB15
+ EQUB&83:EQUB11
+ EQUB&82:EQUB54
+ EQUB&81:EQUB14
+ EQUB&82:EQUB50
+ EQUB&82:EQUB53
+ EQUB12
+ EQUB&87:EQUB13
+ EQUB6
+
+.patdat15
+ EQUB&87:EQUB16
+ EQUB&85:EQUB48
+ EQUB&83:EQUB12
+ EQUB&85:EQUB52
+ EQUB&86:EQUB17
+ EQUB&85:EQUB49
+ EQUB&83:EQUB13
+ EQUB&85:EQUB53
+ EQUB&88:EQUB18
+ EQUB6
+
+.patdat16
+ EQUB&8D:EQUB48
+ EQUB&82:EQUB52
+ EQUB&82:EQUB9
+ EQUB&82:EQUB49
+ EQUB&82:EQUB13
+ EQUB&82:EQUB53
+ EQUB&82:EQUB10
+ EQUB&82:EQUB50
+ EQUB&82:EQUB14
+ EQUB&82:EQUB54
+ EQUB&82:EQUB11
+ EQUB&82:EQUB51
+ EQUB&82:EQUB15
+ EQUB&82:EQUB55
+ EQUB&82:EQUB8
+ EQUB&82:EQUB48
+ EQUB&82:EQUB12
+ EQUB&82:EQUB52
+ EQUB&82:EQUB9
+ EQUB&82:EQUB49
+ EQUB&8E:EQUB53
+ EQUB6
+
+.patdat17
+ EQUB&8D:EQUB21
+ EQUB&83:EQUB49
+ EQUB&84:EQUB9
+ EQUB&85:EQUB12
+ EQUB&84:EQUB8
+ EQUB&83:EQUB15
+ EQUB&83:EQUB23
+ EQUB&84:EQUB15
+ EQUB&83:EQUB11
+ EQUB&84:EQUB14
+ EQUB&83:EQUB22
+ EQUB&83:EQUB14
+ EQUB&84:EQUB10
+ EQUB&85:EQUB13
+ EQUB&84:EQUB9
+ EQUB&83:EQUB52
+ EQUB&8D:EQUB20
+ EQUB&82:EQUB8
+ EQUB6
+
+.patdat18
+ EQUB&86:EQUB13
+ EQUB&86:EQUB14
+ EQUB0:EQUB0
+
+.patdat19
+ EQUB10:EQUB3
+ EQUB&83:EQUB18
+ EQUB&81:EQUB50
+ EQUB12
+ EQUB&85:EQUB54
+ EQUB&84:EQUB11
+ EQUB&96:EQUB&40
+ EQUB10:EQUB1
+ EQUB&85:EQUB15
+ EQUB&84:EQUB8
+ EQUB&84:EQUB12
+ EQUB&83:EQUB52
+ EQUB&83:EQUB9
+ EQUB&83:EQUB13
+ EQUB&83:EQUB10
+ EQUB&83:EQUB14
+ EQUB&84:EQUB54
+ EQUB&88:EQUB11
+ EQUB12
+ EQUB&83:EQUB15
+ EQUB&84:EQUB55
+ EQUB&8C:EQUB8
+ EQUB6
+
+.patdat20
+ EQUB&8C:EQUB10
+ EQUB10:EQUB3
+ EQUB&81:EQUB&40
+ EQUB8
+ EQUB&81:EQUB&40
+ EQUB12
+ EQUB&89:EQUB20
+ EQUB6
+
+.patdat21
+ EQUB&94:EQUB14
+ EQUB&84:EQUB54
+ EQUB&85:EQUB11
+ EQUB&83:EQUB15
+ EQUB&83:EQUB55
+ EQUB&84:EQUB8
+ EQUB&82:EQUB48
+ EQUB&84:EQUB12
+ EQUB&82:EQUB52
+ EQUB&8C:EQUB9
+ EQUB&84:EQUB49
+ EQUB&83:EQUB13
+ EQUB&83:EQUB53
+ EQUB&83:EQUB10
+ EQUB&83:EQUB50
+ EQUB&84:EQUB14
+ EQUB&83:EQUB54
+ EQUB&86:EQUB19
+ EQUB&84:EQUB51
+ EQUB&86:EQUB19
+ EQUB6
+
+.patdat22
+ EQUB&87:EQUB18
+ EQUB&85:EQUB53
+ EQUB&83:EQUB13
+ EQUB&85:EQUB49
+ EQUB&86:EQUB17
+ EQUB&85:EQUB52
+ EQUB&83:EQUB12
+ EQUB&85:EQUB48
+ EQUB&88:EQUB16
+ EQUB6
+
+.patdat23
+ EQUB&9D:EQUB5
+ EQUB&86:EQUB9
+ EQUB&9D:EQUB6
+ EQUB&86:EQUB11
+ EQUB0:EQUB0
+
+.patdat24
+ EQUB&82:EQUB10
+ EQUB&83:EQUB13
+ EQUB&8D:EQUB49
+ EQUB&83:EQUB13
+ EQUB&82:EQUB10
+ EQUB&83:EQUB14
+ EQUB&8D:EQUB54
+ EQUB&83:EQUB14
+ EQUB0:EQUB0
+
+.patdat25
+ EQUB&90:EQUB2
+ EQUB&83:EQUB9
+ EQUB&A0:EQUB2
+ EQUB&8D:EQUB48
+ EQUB6
+
+
+.patdat26
+ EQUB&A5:EQUB5
+ EQUB&90:EQUB6
+ EQUB&84:EQUB1
+ EQUB&90:EQUB4
+ EQUB&A8:EQUB7
+ EQUB6
+
+.patdat27
+EQUB&A4:EQUB9
+EQUB&83:EQUB10
+EQUB&A4:EQUB11
+.patdat28
+EQUB&83:EQUB10
+EQUB&A4:EQUB9
+EQUB&83:EQUB10
+EQUB&A4:EQUB11
+EQUB14
+EQUB2:EQUB27
+
+.patdat29
+EQUB&C5:EQUB1
+EQUB&C5:EQUB3
+EQUB0:EQUB0
+
+\\ ]
+\\ PRINT"Pattern dt from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/PATT.asm b/src/PATT.asm
new file mode 100644
index 0000000..be1e8d5
--- /dev/null
+++ b/src/PATT.asm
@@ -0,0 +1,486 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"PATT"
+\\ B%=P%
+\\ [OPT pass
+
+.patt0
+ EQUB1
+ EQUB0:EQUB50
+ EQUB5
+ EQUB20
+ EQUB0:EQUB5
+ EQUB12
+ EQUB0
+
+.patt1
+ EQUB1
+ EQUB73:EQUB50
+ EQUB5
+ EQUB20
+ EQUB0:EQUB5
+ EQUB12
+ EQUB0+&80
+
+.patt2
+ EQUB1
+ EQUB12:EQUB24
+ EQUB4
+ EQUB30
+ EQUB0:EQUB0
+ EQUB18
+ EQUB1
+
+.patt3
+ EQUB1
+ EQUB62:EQUB24
+ EQUB4
+ EQUB30
+ EQUB0:EQUB0
+ EQUB18
+ EQUB1+&80
+
+.patt4
+ EQUB2:\ init 2 patterns
+ EQUB0:EQUB255
+ EQUB20
+ EQUB2
+ EQUB8:EQUB-24
+ EQUB20
+ EQUB2
+\ 2nd half
+ EQUB74:EQUB255
+ EQUB20
+ EQUB2
+ EQUB-8:EQUB-24
+ EQUB20
+ EQUB2+&80
+
+.patt5
+ EQUB1
+ EQUB6:EQUB40
+ EQUB50
+ EQUB4
+ EQUB0:EQUB16
+ EQUB24
+ EQUB4
+
+.patt6
+ EQUB2
+ EQUB0:EQUB231
+ EQUB8
+ EQUB10
+ EQUB0:EQUB0
+ EQUB24
+ EQUB5
+\ 2nd part
+ EQUB7:EQUB231
+ EQUB8
+ EQUB10
+ EQUB0:EQUB0
+ EQUB20
+ EQUB5
+
+.patt7
+ EQUB2
+ EQUB73:EQUB231
+ EQUB8
+ EQUB10
+ EQUB0:EQUB0
+ EQUB24
+ EQUB5+&80
+\ 2nd part
+ EQUB66:EQUB231
+ EQUB8
+ EQUB10
+ EQUB0:EQUB0
+ EQUB20
+ EQUB5+&80
+
+.patt8
+ EQUB1
+ EQUB36:EQUB32
+ EQUB6
+ EQUB15
+ EQUB0:EQUB0
+ EQUB20
+ EQUB6
+
+.patt9
+ EQUB1
+ EQUB38:EQUB32
+ EQUB6
+ EQUB15
+ EQUB0:EQUB0
+ EQUB20
+ EQUB6+&80
+
+.patt10
+ EQUB1
+ EQUB0:EQUB32
+ EQUB5
+ EQUB8
+ EQUB0:EQUB0
+ EQUB16
+ EQUB7
+
+.patt11
+ EQUB1
+ EQUB73:EQUB32
+ EQUB5
+ EQUB8
+ EQUB0:EQUB0
+ EQUB16
+ EQUB7+&80
+
+.patt12
+ EQUB2
+ EQUB33:EQUB32
+ EQUB6
+ EQUB12
+ EQUB0:EQUB0
+ EQUB30:\ WAS 20
+ EQUB8
+\ 2nd part
+ EQUB41:EQUB32
+ EQUB6
+ EQUB12
+ EQUB0:EQUB0
+ EQUB30:\ WAS 20
+ EQUB8+&80
+
+.patt13
+ EQUB1
+ EQUB0:EQUB130
+ EQUB6
+ EQUB16
+ EQUB0:EQUB0
+ EQUB12
+ EQUB9
+
+.patt14
+ EQUB1
+ EQUB74:EQUB130
+ EQUB6
+ EQUB16
+ EQUB0:EQUB0
+ EQUB12
+ EQUB9+&80
+
+.patt15
+ EQUB1
+ EQUB0:EQUB210
+ EQUB5
+ EQUB12
+ EQUB0:EQUB0
+ EQUB18
+ EQUB10
+
+.patt16
+ EQUB1
+ EQUB74:EQUB210
+ EQUB5
+ EQUB12
+ EQUB0:EQUB0
+ EQUB18
+ EQUB10+&80
+
+.patt17
+ EQUB1
+ EQUB0:EQUB32
+ EQUB7
+ EQUB12
+ EQUB0:EQUB0
+ EQUB14
+ EQUB11
+
+.patt18
+ EQUB1
+ EQUB74:EQUB32
+ EQUB7
+ EQUB12
+ EQUB0:EQUB0
+ EQUB14
+ EQUB11+&80
+
+.patt19
+ EQUB1
+ EQUB48:EQUB32
+ EQUB5
+ EQUB10
+ EQUB0:EQUB0
+ EQUB16
+ EQUB13
+
+.patt20
+ EQUB1
+ EQUB27:EQUB32
+ EQUB5
+ EQUB10
+ EQUB0:EQUB0
+ EQUB16
+ EQUB13+&80
+
+.patt21
+ EQUB1
+ EQUB0:EQUB32
+ EQUB5
+ EQUB8
+ EQUB0:EQUB0
+ EQUB20
+ EQUB14
+
+.patt22
+ EQUB1
+ EQUB74:EQUB32
+ EQUB5
+ EQUB8
+ EQUB0:EQUB0
+ EQUB20
+ EQUB14+&80
+
+.patt23
+ EQUB1
+ EQUB2:EQUB255
+ EQUB3
+ EQUB20
+ EQUB0:EQUB0
+ EQUB20
+ EQUB15
+
+.patt24
+ EQUB1
+ EQUB72:EQUB255
+ EQUB3
+ EQUB20
+ EQUB0:EQUB0
+ EQUB20
+ EQUB15+&80
+
+.patt25
+ EQUB1
+ EQUB6:EQUB255
+ EQUB3
+ EQUB16
+ EQUB0:EQUB0
+ EQUB16
+ EQUB16
+
+.patt26
+ EQUB1
+ EQUB69:EQUB255
+ EQUB3
+ EQUB16
+ EQUB0:EQUB0
+ EQUB16
+ EQUB16+&80
+
+.patt27
+ EQUB1
+ EQUB0:EQUB32
+ EQUB4
+ EQUB14
+ EQUB0:EQUB0
+ EQUB18
+ EQUB17
+
+.patt28
+ EQUB1
+ EQUB74:EQUB32
+ EQUB4
+ EQUB14
+ EQUB0:EQUB0
+ EQUB18
+ EQUB17+&80
+
+.patt29
+ EQUB1
+ EQUB0:EQUB32
+ EQUB2
+ EQUB21
+ EQUB3:EQUB0
+ EQUB20
+ EQUB18
+
+.patt30
+ EQUB1
+ EQUB74:EQUB32
+ EQUB2
+ EQUB21
+ EQUB-3:EQUB0
+ EQUB20
+ EQUB18+&80
+
+.patt31
+ EQUB1
+ EQUB73:EQUB32
+ EQUB4
+ EQUB12
+ EQUB0:EQUB0
+ EQUB32
+ EQUB19
+
+.patt32
+ EQUB1
+ EQUB1:EQUB32
+ EQUB4
+ EQUB12
+ EQUB0:EQUB0
+ EQUB32
+ EQUB19+&80
+
+.patt33
+ EQUB1
+ EQUB78:EQUB32
+ EQUB8
+ EQUB20
+ EQUB0:EQUB0
+ EQUB18
+ EQUB20
+
+.patt34
+ EQUB1
+ EQUB79:EQUB32
+ EQUB8
+ EQUB20
+ EQUB0:EQUB0
+ EQUB18
+ EQUB20+&80
+
+.patt35
+ EQUB1
+ EQUB74:EQUB32
+ EQUB4
+ EQUB14
+ EQUB0:EQUB0
+ EQUB34
+ EQUB21
+
+.patt36
+ EQUB1
+ EQUB0:EQUB32
+ EQUB4
+ EQUB14
+ EQUB0:EQUB0
+ EQUB34
+ EQUB21+&80
+
+.patt37
+ EQUB1
+ EQUB2:EQUB32
+ EQUB4
+ EQUB18
+ EQUB0:EQUB0
+ EQUB16
+ EQUB22
+
+.patt38
+ EQUB1
+ EQUB72:EQUB32
+ EQUB4
+ EQUB18
+ EQUB0:EQUB0
+ EQUB16
+ EQUB22+&80
+
+.patt39
+ EQUB1
+ EQUB78:EQUB32
+ EQUB5
+ EQUB12
+ EQUB0:EQUB0
+ EQUB20
+ EQUB23
+
+.patt40
+ EQUB1
+ EQUB79:EQUB32
+ EQUB5
+ EQUB12
+ EQUB0:EQUB0
+ EQUB20
+ EQUB23+&80
+
+.patt41
+ EQUB1
+ EQUB0:EQUB32
+ EQUB4
+ EQUB19
+ EQUB2:EQUB0
+ EQUB12
+ EQUB24
+
+.patt42
+ EQUB1
+ EQUB74:EQUB32
+ EQUB4
+ EQUB19
+ EQUB-2:EQUB0
+ EQUB12
+ EQUB24+&80
+
+.patt43
+ EQUB2
+ EQUB78:EQUB32
+ EQUB16
+ EQUB20
+ EQUB0:EQUB0
+ EQUB16
+ EQUB25
+\ 2nd part
+ EQUB79:EQUB32
+ EQUB14
+ EQUB20
+ EQUB0:EQUB0
+ EQUB16
+ EQUB25+&80
+
+.patt44
+ EQUB2
+ EQUB78:EQUB32
+ EQUB8
+ EQUB20
+ EQUB0:EQUB0
+ EQUB18
+ EQUB26
+\ part2
+ EQUB79:EQUB32
+ EQUB8
+ EQUB20
+ EQUB0:EQUB0
+ EQUB18
+ EQUB26+&80
+
+.patt45
+EQUB3
+EQUB0:EQUB40
+EQUB1
+EQUB1
+EQUB0:EQUB0
+EQUB22
+EQUB29
+\ part 2
+EQUB0:EQUB72
+EQUB4
+EQUB16
+EQUB0:EQUB0
+EQUB26
+EQUB27
+\ part 3
+EQUB0:EQUB96
+EQUB4
+EQUB15
+EQUB0:EQUB0
+EQUB28
+EQUB28
+
+\\ ]
+\\ PRINT"Patterns from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ROUT1.asm b/src/ROUT1.asm
new file mode 100644
index 0000000..13347f7
--- /dev/null
+++ b/src/ROUT1.asm
@@ -0,0 +1,198 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ROUT1"
+\\ B%=P%
+\\ [OPT pass
+
+.check_joy
+ LDA#&80
+ JSRosbyte
+ CPY#&C0:\ was &FF then &E0
+ RTS
+
+.check_joy2
+ LDA#&80
+ JSRosbyte
+ CPY#&40:\ was 1 then &20
+ RORA
+ EOR#&80
+ ROLA
+ RTS
+
+.pause4
+ LDX#200
+
+.check_key
+ LDA#&81
+ LDY#&FF
+ JSRosbyte
+ CPY#&FF
+ RTS
+
+.delay
+ LDX#3
+.delay2
+ LDY#0
+.delay3
+ DEY:BNEdelay3
+ DEX:BNEdelay2
+.nopause
+ RTS
+
+.pause
+ JSRsound_on_off
+ JSRpause4:BNEnopause
+ CLC:RORpause_flag
+ LDA#15:LDX#0:JSRosbyte
+.pause1
+ JSRpause4:BEQpause1
+ LDY#0:JSRprnstr
+.pause2
+ JSRpause4:BNEpause2
+.pause3
+ JSRpause4:BEQpause3
+ SEC:RORpause_flag
+ LDY#0:JMPprnstr
+
+.rstall
+ \LDY#process STYaliens TEST!!
+ \DEY STYaliensm1 TEST!!
+ LDA#0
+ STAmyst
+ STAalmove
+ \STAwavoff TEST !!!!
+ STAprocst
+ STAmybullact
+ STAalbullact
+ STAbombdel
+ STAinitact
+ LDY#maxaliens-1
+.rst1
+ STAalst,Y
+ DEY:BPLrst1
+ LDX#maxpatt-1
+.rst2
+ STAinitst,X:DEX:BPLrst2
+ LDY#mymaxbull-1
+.rst3
+ STAmybullst,Y:DEY:BPLrst3
+ LDY#almaxbull-1
+.rst4
+ STAalbullst,Y:DEY:BPLrst4
+ LDA#38:STAmyx
+ LDA#227:STAmyy
+.seed_rnd
+ LDA&FE44:ORA#1:STArand1
+ LDA&240:ORA#1:STArand1+1
+ LDA&FC:ORA#1:STArand1+2
+ RTS
+
+.xycalc
+ TXA
+.xycalc4
+ CMP#80:BCCxycalc3
+ SBC#80:JMPxycalc4
+.xycalc3
+ TAX
+ CPY#23:BCSxycalc2
+ LDA#&C0:RTS
+.xycalc2
+ LDA#0:STAtemp1+1
+ TYA:AND#7:STAtemp1
+ TYA:LSRA:LSRA:LSRA:TAY
+ TXA:ASLA:ROLtemp1+1:ASLA:ROLtemp1+1
+ ASLA:ROLtemp1+1
+ ORAtemp1:ADCline_start,Y:TAX
+ LDAtemp1+1:ADCline_starth,Y
+ RTS
+
+.pokmypos
+ LDXmyx:LDYmyy:JSRxycalc
+ STXscreen:STAscreen+1
+ LDY#myheight:STYtemp1+1
+.sound_exit
+ RTS
+
+.sound_on_off
+ INCcounter_sound
+ LDAcounter_sound
+ AND#&F:BNEsound_exit
+ JSRkey_joy
+ LDX#&AE:\ S key
+ JSRcheck_key
+ BNEsound_exit
+ JSRdisplay_sound_status
+ LDAsound_letter
+ EOR#(28 EOR 26)
+ STAsound_letter
+ LDAsound_flag:EOR#&80
+ STAsound_flag
+ LDA#15:LDX#0:JSRosbyte
+.display_sound_status
+ LDY#16:\ display 'S' or 'Q'
+ JMPprnstr
+
+.key_joy
+ LDX#&B9:\ K key
+ JSRcheck_key:BNEsound_exit
+ JSRdisplay_key_joy_status
+ LDAkey_joy_letter
+ EOR#(19 EOR 20)
+ STAkey_joy_letter
+ LDAkey_joy_flag:EOR#&80
+.key_joy2
+ STAkey_joy_flag
+.display_key_joy_status
+ LDY#18:\ display 'K' or 'J'
+ JMPprnstr
+
+.addrelx
+ EQUB0:EQUBxstep:EQUB0:EQUB-xstep
+ EQUBxstep:EQUBxstep:EQUB-xstep:EQUB-xstep
+ EQUB0:EQUB2*xstep:EQUB0:EQUB-2*xstep
+ EQUB2*xstep:EQUB2*xstep:EQUB-2*xstep:EQUB-2*xstep
+ EQUB0:EQUB3*xstep:EQUB0:EQUB-3*xstep
+ EQUB3*xstep:EQUB3*xstep:EQUB-3*xstep:EQUB-3*xstep
+ EQUB0:EQUB4*xstep:EQUB0:EQUB-4*xstep
+ EQUB4*xstep:EQUB4*xstep:EQUB-4*xstep:EQUB-4*xstep
+ EQUB0:EQUB5*xstep:EQUB0:EQUB-5*xstep
+ EQUB5*xstep:EQUB5*xstep:EQUB-5*xstep:EQUB-5*xstep
+ EQUB0:EQUB6*xstep:EQUB0:EQUB-6*xstep
+ EQUB6*xstep:EQUB6*xstep:EQUB-6*xstep:EQUB-6*xstep
+ EQUB2:EQUB2:EQUB-2:EQUB-2
+ EQUB2:EQUB2:EQUB-2:EQUB-2
+.addrely
+ EQUB-ystep:EQUB0:EQUBystep:EQUB0
+ EQUB-ystep:EQUBystep:EQUBystep:EQUB-ystep
+ EQUB-2*ystep:EQUB0:EQUB2*ystep:EQUB0
+ EQUB-2*ystep:EQUB2*ystep:EQUB2*ystep:EQUB-2*ystep
+ EQUB-3*ystep:EQUB0:EQUB3*ystep:EQUB0
+ EQUB-3*ystep:EQUB3*ystep:EQUB3*ystep:EQUB-3*ystep
+ EQUB-4*ystep:EQUB0:EQUB4*ystep:EQUB0
+ EQUB-4*ystep:EQUB4*ystep:EQUB4*ystep:EQUB-4*ystep
+ EQUB-5*ystep:EQUB0:EQUB5*ystep:EQUB0
+ EQUB-5*ystep:EQUB5*ystep:EQUB5*ystep:EQUB-5*ystep
+ EQUB-6*ystep:EQUB0:EQUB6*ystep:EQUB0
+ EQUB-6*ystep:EQUB6*ystep:EQUB6*ystep:EQUB-6*ystep
+ EQUB-16:EQUB4:EQUB16:EQUB-4
+ EQUB-4:EQUB16:EQUB4:EQUB-16
+
+
+.line_start
+EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80:EQUB0:EQUB&80
+
+.line_starth
+EQUB&30:EQUB&32:EQUB&35:EQUB&37
+EQUB&3A:EQUB&3C:EQUB&3F:EQUB&41:EQUB&44:EQUB&46:EQUB&49:EQUB&4B:EQUB&4E:EQUB&50:EQUB&53:EQUB&55:EQUB&58:EQUB&5A:EQUB&5D:EQUB&5F:EQUB&62
+EQUB&64:EQUB&67:EQUB&69:EQUB&6C:EQUB&6E:EQUB&71:EQUB&73:EQUB&76:EQUB&78:EQUB&7B:EQUB&7D
+
+\\ ]
+\\ PRINT"Routine 1 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ROUT2.asm b/src/ROUT2.asm
new file mode 100644
index 0000000..d55e93a
--- /dev/null
+++ b/src/ROUT2.asm
@@ -0,0 +1,191 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ROUT2"
+
+\\ B%=P%
+\\ [OPT pass
+
+.collision
+ LDAmyst:BPLcollis2
+ RTS
+
+.collis2
+ LDXaliensm1
+.coll1
+ STXtemp4
+ LDAalst,X:BMIcoll2
+.coll3
+ LDXtemp4
+ DEX:BPLcoll1
+ JMPaliensbombs
+
+\ Check if an alien has hit me
+
+.coll2
+ LSRA:BCScoll3
+ LDAaly,X
+ CMPmyy
+ BCCcoll4
+ SBCmyy
+ CMP#alheight:BCScheck_bomb
+ BCCcoll_xcoord
+.coll4
+ LDAmyy:ADC#1:SEC
+ SBCaly,X
+ CMP#myheight:BCScheck_bomb
+
+.coll_xcoord
+ LDAalx,X
+ CMPmyx
+ BCCcoll5
+ SBCmyx
+ CMP#mywidth:BCScheck_bomb
+ BCCcrash
+.coll5
+ LDAmyx
+ SBCalx,X
+ CMP#alwidth:BCScheck_bomb
+
+.crash
+ SEC:RORmyst
+ LDY#maxaliens-1
+.iym_dead1
+ LDAalst,Y:ORA#1:STAalst,Y
+ DEY:BPLiym_dead1
+ INCaliens:INCaliensm1
+ LDYaliensm1
+ LDA#&81:STAalst,Y
+ LDAmyy:STAaly,Y
+ LDAmyx:STAalx,Y
+ LDA#36:STAalgra,Y
+ JMPexpsnd
+
+\ Now check if an alien has hit one of my bullets
+
+.check_bomb
+ LDAalst,X
+ LSRA:BCScoll3
+ LDY#mymaxbull-1
+.chkalbull
+ STYtemp4+1
+ LDXtemp4
+ LDAmybullst,Y:BMIcab1
+.cab2
+ LDYtemp4+1
+ DEY:BPLchkalbull
+ JMPcoll3
+
+.cab1
+ LDAaly,X
+ CMPmybully,Y:BCCcab2
+ SBCmybully,Y
+ CMP#alheight:BCScab2:\ +bullheight
+
+.cab4
+ LDAalx,X
+ CMPmybullx,Y:BCCcab5
+ SBCmybullx,Y:BNEcab2
+ BEQcrash2
+.cab5
+ LDAmybullx,Y
+ SEC:SBCalx,X
+ CMP#alwidth:BCScab2
+
+.crash2
+ LDA#0:STAmybullst,Y
+ DECalcount,X:PHP:BNEnot_dead
+ LDAalst,X:ORA#1:STAalst,X
+.not_dead
+ LDYtemp4+1
+ LDXmybullx,Y
+ LDAmybully,Y:TAY
+ JSRmove_bomb
+ DECmybullact
+ PLP:BNEnot_dead2
+ LDXtemp4:JSRadd_to_score
+ JSRexpsnd
+.not_dead2
+ JMPcab2
+
+\ Now check if the alien's bombs have hit my ship
+
+.aliensbombs
+ LDY#almaxbull-1
+.albom1
+ STYtemp4+1
+ LDAalbullst,Y:BMIalbom3
+.albom2
+ LDYtemp4+1
+ DEY:BPLalbom1
+
+\ These lines are the protection
+\ part of the code!!!
+
+ \ LDA &FE66
+ \ EOR #&DD BEQ keok
+ \ JMP crash
+ \ keok
+ RTS:\ This is always required!!
+
+.albom3
+ LDAmyy
+ CMPalbully,Y:BCCalbom2
+ SBCalbully,Y
+ CMP#myheight:BCSalbom2:\ +bullheight
+
+ LDAmyx
+ CMPalbullx,Y:BCCalbom4
+ SBCalbullx,Y:BNEalbom2
+ BEQcrash3
+.albom4
+ LDAalbullx,Y
+ SEC:SBCmyx
+ CMP#mywidth:BCSalbom2
+
+.crash3
+ LDA#0:STAalbullst,Y
+ LDXalbullx,Y
+ LDAalbully,Y:TAY
+ JSRdisp_bomb
+ DECalbullact
+ JMPcrash
+
+.alien_hits
+ EQUB1:EQUB1:EQUB1:EQUB1:EQUB1
+ EQUB10:EQUB2:EQUB5:EQUB5
+ EQUB2:EQUB2
+ EQUB2
+
+
+.expsnd
+ LDX#exps1 MOD 256
+ LDY#exps1 DIV 256
+ JSRmksound
+ LDX#exps2 MOD 256
+ LDY#exps2 DIV 256
+ JMPmksound
+
+\ SOUND data for explosion!
+
+.exps1
+ EQUW &10
+ EQUW -15
+ EQUW 7
+ EQUW 4
+
+.exps2
+ EQUW &11
+ EQUW 1
+ EQUW 150:\ 200
+ EQUW 4
+
+\\ ]
+\\ PRINT"Routine 2 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ROUT3.asm b/src/ROUT3.asm
new file mode 100644
index 0000000..16c7234
--- /dev/null
+++ b/src/ROUT3.asm
@@ -0,0 +1,238 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ROUT3"
+\\ B%=P%
+\\ [OPT pass
+
+.move_my_base
+ LDAmyst:BPLok_to_move
+ RTS
+
+.ok_to_move
+ JSRprocess_demo
+ LDY#0:STYtemp3+1:STYtemp3
+ BITdemo_flag:BPLmanual_control
+ INY
+ BITdemo_direction:BPLdem_right
+ INY
+.dem_right
+ STYtemp3
+ JMPpossible_move
+
+.manual_control
+
+\ Protection code follows
+
+ \ LDA &FE67 CLC ADC #&A2
+ \ BEQ keo2
+ \ JMP ship_hasnt_moved
+ \ keo2
+
+ BITkey_joy_flag
+ BMIuse_keyboard
+
+ LDX#1:JSRcheck_joy
+ ROLtemp3
+ LDX#1:JSRcheck_joy2
+ ROLtemp3
+ LDX#2:JSRcheck_joy
+ ROLtemp3+1
+ LDX#2:JSRcheck_joy2
+ ROLtemp3+1
+ JMPpossible_move
+
+.use_keyboard
+ LDX#&9E:JSRcheck_key:\ Z key
+ ROLtemp3
+ LDX#&BD:JSRcheck_key:\ X key
+ ROLtemp3
+ LDX#&B7:JSRcheck_key:\ colon key
+ ROLtemp3+1
+ LDX#&97:JSRcheck_key:\ / key
+ ROLtemp3+1
+
+.possible_move
+ JSRpokmypos
+ LDYtemp3
+ LDAkey_press_relx,Y
+ CLC:ADCmyx
+ CMP#75:BCSbad_x_position
+ STAmyx
+.bad_x_position
+ LDYtemp3+1
+ LDAkey_press_rely,Y
+ CLC:ADCmyy
+ CMP#165:BCCbad_y_pos
+ CMP#235:BCSbad_y_pos
+.good_y_pos
+ STAmyy
+.bad_y_pos
+ LDYmyy:LDXmyx
+ JSRxycalc
+ STAscreen2+1
+ STXscreen2
+ EORscreen+1
+ BNEship_has_moved
+ TXA:EORscreen
+ BEQship_hasnt_moved
+.ship_has_moved
+ LDA#myheight:STAtemp1+1
+ LDAgraph+36
+ TAX
+ LDYgraph+37
+ STYtemp1
+ JMPsprite
+
+.ship_hasnt_moved
+ LDAdemo_direction
+ EOR#&80
+ STAdemo_direction
+ JMPdelay
+
+.key_press_rely
+ EQUB0:EQUB3:EQUB-3:EQUB0
+.key_press_relx
+ EQUB0:EQUB1:EQUB&FF:EQUB0
+
+\------------------------------
+
+
+.print_scores
+ STXtemp1
+.pscore3
+ LDYscore_base,X
+ LDXmult24tab,Y
+ STXpscore1+1
+ LDY#23
+.pscore1
+ LDA&A00,Y:\ Digit graphics
+ STA(screen),Y
+ DEY:BPLpscore1
+ LDXtemp1
+ RTS
+
+.init_score
+ JSRreset_score_to_0
+.poke_hi_scr
+ LDA#&98:STAscreen
+ LDX#7:STXtemp2
+.inscr1
+ LDAscore_base,X:BNEinscr2
+ LDYtemp2:BNEinscr3
+.inscr2
+ LDA#0:STAtemp2
+ JSRprint_scores
+.inscr3
+ LDAscreen
+ CLC:ADC#24:STAscreen
+ BCCinscr4
+ INCscreen+1
+.inscr4
+ INX:CPX#14:BNEinscr1
+ RTS
+
+.add_to_score
+ LDA#&20:STAscreen
+ LDA#&31:STAscreen+1
+ LDAalgra,X:SEC:SBC#12
+ LSRA:TAX
+ LDAalien_score,X
+ LDX#5
+.addscr2
+ STAtemp1
+ LDAscreen:SEC:SBC#24:STAscreen
+ BCSaddscr4
+ DECscreen+1
+.addscr4
+ LDAtemp1
+ CLC
+ ADCmyscore,X
+ CMP#10:BCCaddscr3
+ SBC#10
+ STAmyscore,X
+ JSRprint_scores
+ LDA#1
+ DEX:BPLaddscr2
+ JMPreset_score_to_0
+.addscr3
+ STAmyscore,X
+ CPX#2:BNEnot_ten_thousands
+ BITextra_life_flag
+ BMInot_ten_thousands
+ CMP#2:BNEnot_ten_thousands:\ extra life at >=20000
+ SEC:RORextra_life_flag
+ TXA:PHA
+ JSRliveson
+ INClives
+ JSRliveson
+ LDX#xlife MOD 256
+ LDY#xlife DIV 256
+ JSRmksound
+ PLA:TAX
+.not_ten_thousands
+ JMPprint_scores
+
+.xlife
+ EQUW &13
+ EQUW 3
+ EQUW 129
+ EQUW 30
+
+.mult24tab
+ EQUB 0*24:EQUB 1*24:EQUB 2*24
+ EQUB 3*24:EQUB 4*24:EQUB 5*24
+ EQUB 6*24:EQUB 7*24:EQUB 8*24
+ EQUB 9*24
+
+.check_new_high
+ BITdemo_flag:BMInot_new_high
+ LDX#&FF
+.new_high1
+ INX:CPX#7:BEQnot_new_high
+.new_high2
+ LDAmyscore,X:CMPhiscore,X
+ BEQnew_high1
+ BCCnot_new_high
+.copy_to_high
+ LDAmyscore,X:STAhiscore,X
+ INX:CPX#7:BCCcopy_to_high
+.not_new_high
+ RTS
+
+.reset_score_to_0
+ LDY#6:LDA#0
+.zero_my_score
+ STAmyscore,Y
+ DEY:BPLzero_my_score
+ LDX#24*6+1
+.clr_score_screen
+ STA&308F,X
+ DEX:BNEclr_score_screen
+ LDA#&20:STAscreen
+ LDA#&31:STAscreen+1
+ LDX#6:JMPprint_scores
+
+.toggle_demo_direct
+ LDAdemo_direction:EOR#&80
+ STAdemo_direction
+ RTS
+
+\ Points awarded for aliens
+\ (divided by ten)
+
+.alien_score
+ EQUB2:EQUB2:EQUB2:EQUB2
+ EQUB4:EQUB8:EQUB4:EQUB4
+ EQUB6:EQUB8
+ EQUB8:EQUB8
+
+\\ ]
+\\ PRINT"Routine 3 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/ROUT4.asm b/src/ROUT4.asm
new file mode 100644
index 0000000..28fcdb5
--- /dev/null
+++ b/src/ROUT4.asm
@@ -0,0 +1,107 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"ROUT4"
+\\ B%=P%
+\\ [OPT pass
+
+.message_loop
+ LDY#&FF
+ LDA#0:STAtemp4
+ SEC:LDXcurwave:INX:TXA
+.sub10
+ INY
+ CMP#10:BCCsave_wave_text
+ SBC#10:BCSsub10
+.save_wave_text
+ STYwave_text:STAwave_text+1
+ LDY#6:JSRprnstr
+ CLC:JSRcompletion_message
+
+.wait_loop
+ JSRescape
+ LDAmyst:BMIesc_exit
+ JSRmove_my_base
+ JSRmovestars
+ JSRrand
+ JSRprocess_my_bombs
+ JSRpause
+ LDX#20:JSRdelay2
+ DECtemp4:BNEwait_loop
+.esc_exit
+ SEC:JSRcompletion_message
+ LDY#6:JMPprnstr
+
+.end_message
+ \LDY#12 JSRprnstr
+ JSRtitle
+ LDY#14:JSRprnstr
+ LDY#10:JSRprnstr
+ LDY#30:JSRprnstr
+ LDY#20:JMPprnstr
+
+.escape
+ LDAdemo_flag:BPLnot_demomode
+ JSRchk_spc_fire
+ BEQtest_if_already_dead
+ RTS
+.not_demomode
+ LDX#&8F
+ JSRcheck_key:BNEno_escape
+.test_if_already_dead
+ LDAmyst:BMIno_escape
+ JSRliveson
+ LDA#0:STAlives
+ JMPcrash
+.no_escape
+ RTS
+
+.game_over_loop
+ BITdemo_flag:BMIno_escape
+ LDY#14:JSRStartTune
+ LDY#8:JSRprnstr
+ \LDA#90 STAcounter
+.game_over2
+ JSRmovestars
+ JSRpause
+ LDX#25:JSRdelay2
+ JSRMusicTest:BNEgame_over2
+ \DECcounter BNEgame_over2
+ LDY#8:JMPprnstr
+
+.chk_spc_fire
+ LDX#&9D:JSRcheck_key
+ BEQspc_pressed
+ LDX#0:LDA#&80:JSRosbyte
+ CLC
+ TXA:AND#1:EOR#1
+.spc_pressed
+ RTS
+
+
+.completion_message
+ PHP
+ LDAcurwave:TAX
+ AND#&F:BNEexit_compl
+ TXA
+ LSRA:LSRA:LSRA
+ BEQexit_compl
+ BITsixteen_flag:BMIexit_compl
+ CLC:ADC#20:TAY
+ CPY#28:BCSexit_compl
+ PLP:BCCnot_second_call
+ LDA#&FF:STAsixteen_flag
+.not_second_call
+ JMPprnstr
+.exit_compl
+ PLP:RTS
+
+\\ ]
+\\ PRINT"Routine 4 from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/SPRITES.asm b/src/SPRITES.asm
new file mode 100644
index 0000000..4e5c8a2
--- /dev/null
+++ b/src/SPRITES.asm
@@ -0,0 +1,136 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"SPRITES"
+\\ B%=P%
+\\ [OPT pass
+
+.sprite
+STAgra1+1
+STAgra2+1
+STAgra3+1
+STAgra4+1
+STAgra5+1
+STAgra6+1
+STXgra21+1
+STXgra22+1
+STXgra23+1
+STXgra24+1
+STXgra25+1
+STXgra26+1
+LDAtemp1
+STAgra1+2
+STAgra2+2
+STAgra3+2
+STAgra4+2
+STAgra5+2
+STAgra6+2
+STYgra21+2
+STYgra22+2
+STYgra23+2
+STYgra24+2
+STYgra25+2
+STYgra26+2
+LDX#0
+.display
+LDY#0
+.gra1
+LDA&FFFF,X
+EOR(screen),Y
+STA(screen),Y
+.gra21
+LDA&FFFF,X
+EOR(screen2),Y
+STA(screen2),Y
+INX
+LDY#8
+.gra2
+LDA&FFFF,X
+EOR(screen),Y
+STA(screen),Y
+.gra22
+LDA&FFFF,X
+EOR(screen2),Y
+STA(screen2),Y
+INX
+LDY#&10
+.gra3
+LDA&FFFF,X
+EOR(screen),Y
+STA(screen),Y
+.gra23
+LDA&FFFF,X
+EOR(screen2),Y
+STA(screen2),Y
+INX
+LDY#&18
+.gra4
+LDA&FFFF,X
+EOR(screen),Y
+STA(screen),Y
+.gra24
+LDA&FFFF,X
+EOR(screen2),Y
+STA(screen2),Y
+INX
+LDY#&20
+.gra5
+LDA&FFFF,X
+EOR(screen),Y
+STA(screen),Y
+.gra25
+LDA&FFFF,X
+EOR(screen2),Y
+STA(screen2),Y
+INX
+LDY#&28
+.gra6
+LDA&FFFF,X
+EOR(screen),Y
+STA(screen),Y
+.gra26
+LDA&FFFF,X
+EOR(screen2),Y
+STA(screen2),Y
+INX
+LDAscreen
+AND#7:BEQnxt_char_row
+DECscreen
+.check_second
+LDAscreen2
+AND#7:BEQnxt_char_row2
+DECscreen2
+DECtemp1+1:BNEdisplay
+JMPthe_end
+RTS
+.nxt_char_row
+SEC
+LDAscreen
+SBC#&79
+STAscreen
+LDAscreen+1
+SBC#2
+STAscreen+1
+JMPcheck_second
+.nxt_char_row2
+SEC
+LDAscreen2
+SBC#&79
+STAscreen2
+LDAscreen2+1
+SBC#2
+STAscreen2+1
+DECtemp1+1:BEQthe_end
+JMPdisplay
+.the_end
+RTS
+
+\\ ]
+\\ PRINT"Sprites from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/STARS.asm b/src/STARS.asm
new file mode 100644
index 0000000..a112345
--- /dev/null
+++ b/src/STARS.asm
@@ -0,0 +1,68 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"STARS"
+\\ B%=P%
+\\ [OPT pass
+
+.starinit
+ LDX #90:LDY #30
+ LDA #0:STA addres:STA addres+1:STA whichstar
+.starin0
+ JSR starpos
+ JSR rand:AND #4:ORA addres:CLC:ADC stardat,X:STA stardat,X
+ LDA addres+1:ADC stardat+1,X:STA stardat+1,X
+ LDA addres:CLC:ADC #&80:STA addres
+ LDA addres+1:ADC #2:STA addres+1
+.gcol JSR rand:AND #&15:BEQ gcol
+ STA stardat+2,X
+ EOR (stardat,X):STA (stardat,X)
+ DEX:DEX:DEX:DEY:BPL starin0
+ RTS
+
+
+.movestars
+ LDY #16:LDX whichstar
+ BEQ movestar:DEY
+.movestar LDA stardat+2,X
+ EOR (stardat,X):STA (stardat,X)
+ LDA stardat,X:AND #7:CMP #7:BNE doapix
+.notofb LDA stardat,X
+ EOR#&40:ADC#&79:AND #&F8:STAstardat,X
+ LDA stardat+1,X:EOR#1
+ ADC #2:STA stardat+1,X
+ BPL staron
+
+.offbot
+ JSR starpos
+ JMP staron
+
+.doapix INC stardat,X
+.staron LDA stardat+2,X
+ EOR (stardat,X):STA (stardat,X)
+ INX:INX:INX:DEY:BNE movestar
+ LDA whichstar:CLC:ADC #48
+ CMP #96:BNE whstarin:LDA #0
+.whstarin STA whichstar:RTS
+
+.starpos JSR rand:AND #3:CMP #3:BEQstarpos
+ CLC:ADC #&32:STA stardat+1,X
+ CMP #&32:BEQ offb2
+ JSR rand:AND #&F8:JMP offb3
+.offb2 JSR rand:AND #&78:ORA #&80
+.offb3 STA stardat,X:RTS
+
+.rand LDA rand1:AND #&48:EOR&FC:ADC #&38
+ ASLA:ASLA:ROL rand1+2:ROL rand1+1
+ ROL rand1:LDA rand1:RTS
+
+
+\\ ]
+\\ PRINT"Stars from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/TITLE.asm b/src/TITLE.asm
new file mode 100644
index 0000000..ba921a0
--- /dev/null
+++ b/src/TITLE.asm
@@ -0,0 +1,82 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE":2.TITLE"
+\\ B%=P%
+
+titcol=3
+
+\\ [OPT pass
+
+.title
+ LDA#&70:STAtemp2
+ LDA#&F0:STAtemp3
+ LDA#&3A:STAtemp2+1
+ LDA#&3C:STAtemp3+1
+ LDX#0:STXtemp4+1
+.gchr
+ LDXtemp4+1
+ LDAtitnam,X:BMItit6
+ STAtemp1
+ ASLA:ASLA:CLC:ADCtemp1
+ TAX
+ LDA#5:STAtemp4
+.tit1
+ LDA&700,X:STAtemp1
+ LDA#4:STAtemp1+1
+ LDY#0
+.tit2
+ LSRtemp1:BCCtit3
+ LDA#titcol
+ EOR(temp2),Y
+ STA(temp2),Y
+ INY
+ LDA#titcol
+ EOR(temp2),Y
+ STA(temp2),Y
+ DEY
+.tit3
+ LDA#8:ANDtemp1
+ BEQtit4
+ LDA#titcol
+ EOR(temp3),Y
+ STA(temp3),Y
+ INY
+ LDA#titcol
+ EOR(temp3),Y
+ STA(temp3),Y
+ DEY
+.tit4
+ INY:INY
+ DECtemp1+1:BNEtit2
+ JSRtitrig:INX
+ DECtemp4:BNEtit1
+ JSRtitrig
+ INCtemp4+1:BNEgchr:\ always
+
+.titrig
+ LDAtemp2
+ CLC:ADC#8:STAtemp2
+ BCCtit5
+ INCtemp2+1
+.tit5
+ LDAtemp3
+ CLC:ADC#8:STAtemp3
+ BCCtit6
+ INCtemp3+1
+.tit6
+ RTS
+
+.titnam
+ EQUB16:EQUB10:EQUB21:EQUB10:\GALA
+ EQUB15:EQUB24:EQUB27:EQUB12:\FORC
+ EQUB14:EQUB&FF:\E
+
+\\ ]
+\\ PRINT"Title from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800:RETURN
diff --git a/src/VECTORS.asm b/src/VECTORS.asm
new file mode 100644
index 0000000..7c5f56e
--- /dev/null
+++ b/src/VECTORS.asm
@@ -0,0 +1,208 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\ REM SAVE"VECTORS"
+\\ B%=P%
+\\ [OPT pass
+
+.vecwavl
+ EQUB wave0 MOD 256
+ EQUB wave1 MOD 256
+ EQUB wave2 MOD 256
+ EQUB wave3 MOD 256
+ EQUB wave4 MOD 256
+ EQUB wave5 MOD 256
+ EQUB wave6 MOD 256
+ EQUB wave7 MOD 256
+ EQUB wave8 MOD 256
+ EQUB wave9 MOD 256
+ EQUB wave10 MOD 256
+ EQUB wave11 MOD 256
+ EQUB wave12 MOD 256
+ EQUB wave13 MOD 256
+ EQUB wave14 MOD 256
+ EQUB wave15 MOD 256
+.vecwavh
+ EQUB wave0 DIV 256
+ EQUB wave1 DIV 256
+ EQUB wave2 DIV 256
+ EQUB wave3 DIV 256
+ EQUB wave4 DIV 256
+ EQUB wave5 DIV 256
+ EQUB wave6 DIV 256
+ EQUB wave7 DIV 256
+ EQUB wave8 DIV 256
+ EQUB wave9 DIV 256
+ EQUB wave10 DIV 256
+ EQUB wave11 DIV 256
+ EQUB wave12 DIV 256
+ EQUB wave13 DIV 256
+ EQUB wave14 DIV 256
+ EQUB wave15 DIV 256
+.vecpatl
+ EQUB patt0 MOD 256
+ EQUB patt1 MOD 256
+ EQUB patt2 MOD 256
+ EQUB patt3 MOD 256
+ EQUB patt4 MOD 256
+ EQUB patt5 MOD 256
+ EQUB patt6 MOD 256
+ EQUB patt7 MOD 256
+ EQUB patt8 MOD 256
+ EQUB patt9 MOD 256
+ EQUB patt10 MOD 256
+ EQUB patt11 MOD 256
+ EQUB patt12 MOD 256
+ EQUB patt13 MOD 256
+ EQUB patt14 MOD 256
+ EQUB patt15 MOD 256
+ EQUB patt16 MOD 256
+ EQUB patt17 MOD 256
+ EQUB patt18 MOD 256
+ EQUB patt19 MOD 256
+ EQUB patt20 MOD 256
+ EQUB patt21 MOD 256
+ EQUB patt22 MOD 256
+ EQUB patt23 MOD 256
+ EQUB patt24 MOD 256
+ EQUB patt25 MOD 256
+ EQUB patt26 MOD 256
+ EQUB patt27 MOD 256
+ EQUB patt28 MOD 256
+ EQUB patt29 MOD 256
+ EQUB patt30 MOD 256
+ EQUB patt31 MOD 256
+ EQUB patt32 MOD 256
+ EQUB patt33 MOD 256
+ EQUB patt34 MOD 256
+ EQUB patt35 MOD 256
+ EQUB patt36 MOD 256
+ EQUB patt37 MOD 256
+ EQUB patt38 MOD 256
+ EQUB patt39 MOD 256
+ EQUB patt40 MOD 256
+ EQUB patt41 MOD 256
+ EQUB patt42 MOD 256
+ EQUB patt43 MOD 256
+ EQUB patt44 MOD 256
+ EQUB patt45 MOD 256
+.vecpath
+ EQUB patt0 DIV 256
+ EQUB patt1 DIV 256
+ EQUB patt2 DIV 256
+ EQUB patt3 DIV 256
+ EQUB patt4 DIV 256
+ EQUB patt5 DIV 256
+ EQUB patt6 DIV 256
+ EQUB patt7 DIV 256
+ EQUB patt8 DIV 256
+ EQUB patt9 DIV 256
+ EQUB patt10 DIV 256
+ EQUB patt11 DIV 256
+ EQUB patt12 DIV 256
+ EQUB patt13 DIV 256
+ EQUB patt14 DIV 256
+ EQUB patt15 DIV 256
+ EQUB patt16 DIV 256
+ EQUB patt17 DIV 256
+ EQUB patt18 DIV 256
+ EQUB patt19 DIV 256
+ EQUB patt20 DIV 256
+ EQUB patt21 DIV 256
+ EQUB patt22 DIV 256
+ EQUB patt23 DIV 256
+ EQUB patt24 DIV 256
+ EQUB patt25 DIV 256
+ EQUB patt26 DIV 256
+ EQUB patt27 DIV 256
+ EQUB patt28 DIV 256
+ EQUB patt29 DIV 256
+ EQUB patt30 DIV 256
+ EQUB patt31 DIV 256
+ EQUB patt32 DIV 256
+ EQUB patt33 DIV 256
+ EQUB patt34 DIV 256
+ EQUB patt35 DIV 256
+ EQUB patt36 DIV 256
+ EQUB patt37 DIV 256
+ EQUB patt38 DIV 256
+ EQUB patt39 DIV 256
+ EQUB patt40 DIV 256
+ EQUB patt41 DIV 256
+ EQUB patt42 DIV 256
+ EQUB patt43 DIV 256
+ EQUB patt44 DIV 256
+ EQUB patt45 DIV 256
+.vecpatdl
+ EQUB patdat0 MOD 256
+ EQUB patdat1 MOD 256
+ EQUB patdat2 MOD 256
+ EQUB patdat3 MOD 256
+ EQUB patdat4 MOD 256
+ EQUB patdat5 MOD 256
+ EQUB patdat6 MOD 256
+ EQUB patdat7 MOD 256
+ EQUB patdat8 MOD 256
+ EQUB patdat9 MOD 256
+ EQUB patdat10 MOD 256
+ EQUB patdat11 MOD 256
+ EQUB patdat12 MOD 256
+ EQUB patdat13 MOD 256
+ EQUB patdat14 MOD 256
+ EQUB patdat15 MOD 256
+ EQUB patdat16 MOD 256
+ EQUB patdat17 MOD 256
+ EQUB patdat18 MOD 256
+ EQUB patdat19 MOD 256
+ EQUB patdat20 MOD 256
+ EQUB patdat21 MOD 256
+ EQUB patdat22 MOD 256
+ EQUB patdat23 MOD 256
+ EQUB patdat24 MOD 256
+ EQUB patdat25 MOD 256
+ EQUB patdat26 MOD 256
+ EQUB patdat27 MOD 256
+ EQUB patdat28 MOD 256
+ EQUB patdat29 MOD 256
+.vecpatdh
+ EQUB patdat0 DIV 256
+ EQUB patdat1 DIV 256
+ EQUB patdat2 DIV 256
+ EQUB patdat3 DIV 256
+ EQUB patdat4 DIV 256
+ EQUB patdat5 DIV 256
+ EQUB patdat6 DIV 256
+ EQUB patdat7 DIV 256
+ EQUB patdat8 DIV 256
+ EQUB patdat9 DIV 256
+ EQUB patdat10 DIV 256
+ EQUB patdat11 DIV 256
+ EQUB patdat12 DIV 256
+ EQUB patdat13 DIV 256
+ EQUB patdat14 DIV 256
+ EQUB patdat15 DIV 256
+ EQUB patdat16 DIV 256
+ EQUB patdat17 DIV 256
+ EQUB patdat18 DIV 256
+ EQUB patdat19 DIV 256
+ EQUB patdat20 DIV 256
+ EQUB patdat21 DIV 256
+ EQUB patdat22 DIV 256
+ EQUB patdat23 DIV 256
+ EQUB patdat24 DIV 256
+ EQUB patdat25 DIV 256
+ EQUB patdat26 DIV 256
+ EQUB patdat27 DIV 256
+ EQUB patdat28 DIV 256
+ EQUB patdat29 DIV 256
+
+
+\\ ]
+\\ PRINT"Vectors from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\ RETURN
diff --git a/src/WAVE.asm b/src/WAVE.asm
new file mode 100644
index 0000000..76db930
--- /dev/null
+++ b/src/WAVE.asm
@@ -0,0 +1,87 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\REM SAVE"WAVE"
+
+\\B%=P%
+
+\\[OPT pass
+
+.wave0
+ EQUB10
+ EQUB0:EQUB2:EQUB43:EQUB1:EQUB11:EQUB10
+ EQUB&FF
+.wave1
+ EQUB8
+ EQUB6:EQUB7:EQUB6:EQUB7:EQUB4
+ EQUB&FF
+.wave2
+ EQUB10
+ EQUB5:EQUB8:EQUB9:EQUB13:EQUB14
+ EQUB&FF
+.wave3
+ EQUB8
+ EQUB10:EQUB11:EQUB23:EQUB24:EQUB2:EQUB3
+ EQUB45
+ EQUB&FF
+.wave4
+ EQUB10
+ EQUB16:EQUB17:EQUB18:EQUB15:EQUB5:EQUB27
+ EQUB&FF
+.wave5
+ EQUB10
+ EQUB6:EQUB7:EQUB6:EQUB7:EQUB12:EQUB19:EQUB20
+ EQUB&FF
+.wave6
+ EQUB8
+ EQUB10:EQUB11:EQUB10:EQUB11:EQUB2:EQUB3
+ EQUB&FF
+.wave7
+ EQUB8
+ EQUB13:EQUB14:EQUB21:EQUB22:EQUB23:EQUB24
+ EQUB45
+ EQUB&FF
+.wave8
+ EQUB10
+ EQUB4:EQUB4:EQUB0:EQUB1:EQUB5:EQUB17:EQUB18
+ EQUB&FF
+.wave9
+ EQUB7
+ EQUB8:EQUB9:EQUB12:EQUB44:EQUB2
+ EQUB&FF
+.wave10
+ EQUB8
+ EQUB25:EQUB26:EQUB15:EQUB16:EQUB29
+ EQUB&FF
+.wave11
+ EQUB10
+ EQUB27:EQUB28:EQUB12:EQUB37:EQUB38:EQUB28
+ EQUB45
+ EQUB&FF
+.wave12
+ EQUB10
+ EQUB29:EQUB30:EQUB8:EQUB9:EQUB31:EQUB32
+ EQUB&FF
+.wave13
+ EQUB8
+ EQUB33:EQUB34:EQUB15:EQUB16:EQUB25:EQUB26
+ EQUB&FF
+.wave14
+ EQUB8
+ EQUB23:EQUB24:EQUB35:EQUB36:EQUB21:EQUB22
+ EQUB&FF
+.wave15
+ EQUB8
+ EQUB39:EQUB40:EQUB3:EQUB10:EQUB11:EQUB41:EQUB42
+ EQUB45
+ EQUB&FF
+
+\\]
+\\ PRINT"Wave from &";~B%;" to &";~P%-1;" (";P%-B%;")"
+\\ PAGE=&5800
+\\RETURN
diff --git a/src/ZPWORK.asm b/src/ZPWORK.asm
new file mode 100644
index 0000000..f1c3693
--- /dev/null
+++ b/src/ZPWORK.asm
@@ -0,0 +1,65 @@
+\\
+\\ Galaforce 1 ( BBC Micro ) from the original 6502 source code, adapted to assemble using beebasm
+\\
+\\ (c) Kevin Edwards 1986-2019
+\\
+\\ Twitter @KevEdwardsRetro
+\\
+
+\\REM SAVE"ZPWORK"
+
+\\P%=0:O%=&3000
+
+\\[OPT 6
+
+ORG 0
+
+.colour
+.screen EQUB 0
+.savey
+ EQUB 0
+
+.data
+.screen2 EQUB 0
+ EQUB 0
+.temp
+.temp1 EQUB 0
+.length
+ EQUB 0
+
+.width
+.temp2 EQUW 0
+
+.addres
+.temp3 EQUW0
+.addres1
+.temp4 EQUW 0
+.wavbase EQUW 0
+.stardat SKIP 3 * 31
+.rand1 SKIP 3
+.whichstar EQUB 0
+.counter EQUB0
+.expldelay EQUB0
+
+.initst SKIP maxpatt
+.initx SKIP maxpatt
+.inity SKIP maxpatt
+.initdel SKIP maxpatt
+.initcount SKIP maxpatt
+.initnum SKIP maxpatt
+.initrelx SKIP maxpatt
+.initrely SKIP maxpatt
+.initgra SKIP maxpatt
+.initpnum SKIP maxpatt
+
+.aliens EQUB 0
+.aliensm1 EQUB 0
+
+\\ ]
+\\ PRINT'"Zero page from 0 to &";~P%-1
+\\ PAGE=&5800
+\\RETURN
+
+\\ DEFFNres2(gap%)
+\\ P%=P%+gap%:O%=O%+gap%
+\\ =6