]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix invaders sound and fix bitrot in balloon-bomber and lunar-rescue
authorChris Double <chris.double@double.co.nz>
Thu, 15 Oct 2009 23:15:10 +0000 (12:15 +1300)
committerChris Double <chris.double@double.co.nz>
Thu, 15 Oct 2009 23:15:10 +0000 (12:15 +1300)
22 files changed:
extra/balloon-bomber/authors.txt [new file with mode: 0644]
extra/balloon-bomber/balloon-bomber-docs.factor [new file with mode: 0644]
extra/balloon-bomber/balloon-bomber.factor [new file with mode: 0644]
extra/balloon-bomber/summary.txt [new file with mode: 0644]
extra/balloon-bomber/tags.txt [new file with mode: 0644]
extra/lunar-rescue/authors.txt [new file with mode: 0644]
extra/lunar-rescue/lunar-rescue-docs.factor [new file with mode: 0644]
extra/lunar-rescue/lunar-rescue.factor [new file with mode: 0644]
extra/lunar-rescue/summary.txt [new file with mode: 0644]
extra/lunar-rescue/tags.txt [new file with mode: 0644]
extra/space-invaders/space-invaders-docs.factor
extra/space-invaders/space-invaders.factor
unmaintained/balloon-bomber/authors.txt [deleted file]
unmaintained/balloon-bomber/balloon-bomber-docs.factor [deleted file]
unmaintained/balloon-bomber/balloon-bomber.factor [deleted file]
unmaintained/balloon-bomber/summary.txt [deleted file]
unmaintained/balloon-bomber/tags.txt [deleted file]
unmaintained/lunar-rescue/authors.txt [deleted file]
unmaintained/lunar-rescue/lunar-rescue-docs.factor [deleted file]
unmaintained/lunar-rescue/lunar-rescue.factor [deleted file]
unmaintained/lunar-rescue/summary.txt [deleted file]
unmaintained/lunar-rescue/tags.txt [deleted file]

diff --git a/extra/balloon-bomber/authors.txt b/extra/balloon-bomber/authors.txt
new file mode 100644 (file)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/balloon-bomber/balloon-bomber-docs.factor b/extra/balloon-bomber/balloon-bomber-docs.factor
new file mode 100644 (file)
index 0000000..e80ccb9
--- /dev/null
@@ -0,0 +1,39 @@
+! Copyright (C) 2007 Chris Double.\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: help.syntax help.markup cpu.8080.emulator ;\r
+IN: balloon-bomber\r
+\r
+HELP: run-balloon\r
+{ $description \r
+"Run the Balloon Bomber emulator in a new window." $nl\r
+{ $link rom-root } " must be set to the directory containing the "\r
+"location of the Balloon Bomber ROM files. See " \r
+{ $link { "balloon-bomber" "balloon-bomber" } } "  for details."\r
+} ;\r
+\r
+ARTICLE: { "balloon-bomber" "balloon-bomber" } "Balloon Bomber Emulator"\r
+"Provides an emulation of the original 8080 Arcade Game 'Balloon Bomber'." $nl\r
+"More information on the arcade game can be obtained from " { $url "http://www.mameworld.net/maws/romset/ballbomb" } "." $nl\r
+"To play the game you need the ROM files for the arcade game. They should "\r
+"be placed in a directory called 'ballbomb' in the location specified by "\r
+"the variable " { $link rom-root } ". The specific files needed are:"\r
+{ $list\r
+  "ballbomb/tn01"\r
+  "ballbomb/tn02"\r
+  "ballbomb/tn03"\r
+  "ballbomb/tn04"\r
+  "ballbomb/tn05-1"\r
+}\r
+"These are the same ROM files as used by MAME. To run the game use the " \r
+{ $link run-balloon } " word." $nl\r
+"Keys:" \r
+{ $table\r
+  { "Backspace" "Insert Coin" }\r
+  { "1" "1 Player" }\r
+  { "2" "2 Player" }\r
+  { "Left" "Move Left" }\r
+  { "Right" "Move Right" }\r
+  { "Up" "Fire" }\r
+}\r
+"If you save the Factor image while a game is running, when you restart "\r
+"the image the game continues where it left off." ;\r
diff --git a/extra/balloon-bomber/balloon-bomber.factor b/extra/balloon-bomber/balloon-bomber.factor
new file mode 100644 (file)
index 0000000..c52c029
--- /dev/null
@@ -0,0 +1,30 @@
+! Copyright (C) 2007 Chris Double.\r
+! See http://factorcode.org/license.txt for BSD license.\r
+!\r
+! Balloon Bomber: http://www.mameworld.net/maws/romset/ballbomb\r
+!\r
+USING: \r
+    cpu.8080\r
+    kernel \r
+    space-invaders\r
+    ui \r
+;\r
+IN: balloon-bomber\r
+\r
+TUPLE: balloon-bomber < space-invaders ; \r
+\r
+: <balloon-bomber> ( -- cpu )\r
+  balloon-bomber new cpu-init ;\r
+\r
+CONSTANT: rom-info {\r
+    { HEX: 0000 "ballbomb/tn01" }\r
+    { HEX: 0800 "ballbomb/tn02" }\r
+    { HEX: 1000 "ballbomb/tn03" }\r
+    { HEX: 1800 "ballbomb/tn04" }\r
+    { HEX: 4000 "ballbomb/tn05-1" }\r
+  }\r
+\r
+: run-balloon ( -- )  \r
+  [ "Balloon Bomber" <balloon-bomber>  rom-info (run) ] with-ui ;\r
+\r
+MAIN: run-balloon\r
diff --git a/extra/balloon-bomber/summary.txt b/extra/balloon-bomber/summary.txt
new file mode 100644 (file)
index 0000000..1009453
--- /dev/null
@@ -0,0 +1 @@
+Intel 8080-based Balloon Bomber arcade machine emulator
diff --git a/extra/balloon-bomber/tags.txt b/extra/balloon-bomber/tags.txt
new file mode 100644 (file)
index 0000000..dfed6b3
--- /dev/null
@@ -0,0 +1,3 @@
+demos
+games
+applications
diff --git a/extra/lunar-rescue/authors.txt b/extra/lunar-rescue/authors.txt
new file mode 100644 (file)
index 0000000..44b06f9
--- /dev/null
@@ -0,0 +1 @@
+Chris Double
diff --git a/extra/lunar-rescue/lunar-rescue-docs.factor b/extra/lunar-rescue/lunar-rescue-docs.factor
new file mode 100644 (file)
index 0000000..c8cdb3b
--- /dev/null
@@ -0,0 +1,40 @@
+! Copyright (C) 2007 Chris Double.\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: help.syntax help.markup cpu.8080.emulator ;\r
+IN: lunar-rescue \r
+\r
+HELP: run-lunar \r
+{ $description \r
+"Run the Lunar Rescue emulator in a new window." $nl\r
+{ $link rom-root } " must be set to the directory containing the "\r
+"location of the Lunar Rescue ROM files. See " \r
+{ $link { "lunar-rescue" "lunar-rescue" } } "  for details."\r
+} ;\r
+\r
+ARTICLE: { "lunar-rescue" "lunar-rescue" } "Lunar Rescue Emulator"\r
+"Provides an emulation of the original 8080 Arcade Game 'Lunar Rescue'." $nl\r
+"More information on the arcade game can be obtained from " { $url "http://www.mameworld.net/maws/romset/lrescue" } "." $nl\r
+"To play the game you need the ROM files for the arcade game. They should "\r
+"be placed in a directory called 'lrescue' in the location specified by "\r
+"the variable " { $link rom-root } ". The specific files needed are:"\r
+{ $list\r
+  "lrescue/lrescue.1"\r
+  "lrescue/lrescue.2"\r
+  "lrescue/lrescue.3"\r
+  "lrescue/lrescue.4"\r
+  "lrescue/lrescue.5"\r
+  "lrescue/lrescue.6"\r
+}\r
+"These are the same ROM files as used by MAME. To run the game use the " \r
+{ $link run-lunar } " word." $nl\r
+"Keys:" \r
+{ $table\r
+  { "Backspace" "Insert Coin" }\r
+  { "1" "1 Player" }\r
+  { "2" "2 Player" }\r
+  { "Left" "Move Left" }\r
+  { "Right" "Move Right" }\r
+  { "Up" "Fire or apply thrusters" }\r
+}\r
+"If you save the Factor image while a game is running, when you restart "\r
+"the image the game continues where it left off." ;\r
diff --git a/extra/lunar-rescue/lunar-rescue.factor b/extra/lunar-rescue/lunar-rescue.factor
new file mode 100644 (file)
index 0000000..1b7ef6b
--- /dev/null
@@ -0,0 +1,31 @@
+! Copyright (C) 2007 Chris Double.\r
+! See http://factorcode.org/license.txt for BSD license.\r
+!\r
+! Lunar Rescue: http://www.mameworld.net/maws/romset/lrescue\r
+!\r
+USING: \r
+    cpu.8080\r
+    kernel \r
+    space-invaders\r
+    ui \r
+;\r
+IN: lunar-rescue\r
+\r
+TUPLE: lunar-rescue < space-invaders ; \r
+\r
+: <lunar-rescue> ( -- cpu )\r
+  lunar-rescue new cpu-init ;\r
+\r
+CONSTANT: rom-info {\r
+    { HEX: 0000 "lrescue/lrescue.1" }\r
+    { HEX: 0800 "lrescue/lrescue.2" }\r
+    { HEX: 1000 "lrescue/lrescue.3" }\r
+    { HEX: 1800 "lrescue/lrescue.4" }\r
+    { HEX: 4000 "lrescue/lrescue.5" }\r
+    { HEX: 4800 "lrescue/lrescue.6" }\r
+  }\r
+\r
+: run-lunar ( -- )  \r
+  [ "Lunar Rescue" <lunar-rescue>  rom-info (run) ] with-ui ;\r
+\r
+MAIN: run-lunar\r
diff --git a/extra/lunar-rescue/summary.txt b/extra/lunar-rescue/summary.txt
new file mode 100644 (file)
index 0000000..9cde8f1
--- /dev/null
@@ -0,0 +1 @@
+Intel 8080-based Lunar Rescue arcade machine emulator
diff --git a/extra/lunar-rescue/tags.txt b/extra/lunar-rescue/tags.txt
new file mode 100644 (file)
index 0000000..4717ffd
--- /dev/null
@@ -0,0 +1,2 @@
+games
+applications
index c4e3a3566800ba5cb007d2cc849583120e9d0630..0c02f8fd4cb19e376d5a6d71b1e51bdf4955d311 100644 (file)
@@ -3,7 +3,7 @@
 USING: help.syntax help.markup cpu.8080.emulator ;\r
 IN: space-invaders \r
 \r
-HELP: run \r
+HELP: run-invaders\r
 { $description \r
 "Run the Space Invaders emulator in a new window." $nl\r
 { $link rom-root } " must be set to the directory containing the "\r
@@ -24,7 +24,7 @@ ARTICLE: { "space-invaders" "space-invaders" } "Space Invaders Emulator"
   "invaders/invaders.h"\r
 }\r
 "These are the same ROM files as used by MAME. To run the game use the " \r
-{ $link run } " word." $nl\r
+{ $link run-invaders } " word." $nl\r
 "Keys:" \r
 { $table\r
   { "Backspace" "Insert Coin" }\r
index 0508f9a31ccd69cdf788deeeb7923159fff62854..cb0f4319d641cb9f800dd3980ff784dd2e5251c4 100755 (executable)
@@ -12,6 +12,7 @@ USING:
     cpu.8080 
     cpu.8080.emulator
     io.files
+    io.pathnames
     kernel 
     math
     openal
@@ -66,7 +67,7 @@ CONSTANT: SOUND-WALK4        7
 CONSTANT: SOUND-UFO-HIT      8 
 
 : init-sound ( index cpu filename  -- )
-  swapd [ sounds>> nth AL_BUFFER ] dip
+  canonicalize-path swapd [ sounds>> nth AL_BUFFER ] dip
   create-buffer-from-wav set-source-param ; 
 
 : init-sounds ( cpu -- )
@@ -76,7 +77,7 @@ CONSTANT: SOUND-UFO-HIT      8
   [ SOUND-UFO         "resource:extra/space-invaders/resources/Ufo.wav" init-sound ] keep 
   [ sounds>> SOUND-UFO swap nth AL_LOOPING AL_TRUE set-source-param ] keep
   [ SOUND-BASE-HIT    "resource:extra/space-invaders/resources/BaseHit.wav" init-sound ] keep 
-  [ SOUND-INVADER-HIT "resource:extra/space-invaders/resources/InvHit.wav" init-sound ] keep 
+  [ SOUND-INVADER-HIT "resource:extra/space-invaders/resources/InvHit.Wav" init-sound ] keep 
   [ SOUND-WALK1       "resource:extra/space-invaders/resources/Walk1.wav" init-sound ] keep 
   [ SOUND-WALK2       "resource:extra/space-invaders/resources/Walk2.wav" init-sound ] keep 
   [ SOUND-WALK3       "resource:extra/space-invaders/resources/Walk3.wav" init-sound ] keep 
@@ -84,12 +85,14 @@ CONSTANT: SOUND-UFO-HIT      8
   [ SOUND-UFO-HIT    "resource:extra/space-invaders/resources/UfoHit.wav" init-sound ] keep
   f swap (>>looping?) ;
 
-: <space-invaders> ( -- cpu )
-  space-invaders new 
+: cpu-init ( cpu -- cpu )
   make-opengl-bitmap over (>>bitmap)
   [ init-sounds ] keep
   [ reset ] keep ;
 
+: <space-invaders> ( -- cpu )
+  space-invaders new cpu-init ;
+
 : play-invaders-sound ( cpu sound -- )
   swap sounds>> nth source-play ;
 
@@ -395,9 +398,9 @@ CONSTANT: rom-info {
       { HEX: 1800 "invaders/invaders.e" }
    }
 
-: run ( -- )  
+: run-invaders ( -- )  
   [
     "Space Invaders" <space-invaders> rom-info (run)
   ] with-ui ;
 
-MAIN: run
+MAIN: run-invaders
diff --git a/unmaintained/balloon-bomber/authors.txt b/unmaintained/balloon-bomber/authors.txt
deleted file mode 100644 (file)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/balloon-bomber/balloon-bomber-docs.factor b/unmaintained/balloon-bomber/balloon-bomber-docs.factor
deleted file mode 100644 (file)
index 694ac18..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-! Copyright (C) 2007 Chris Double.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: help.syntax help.markup cpu.8080.emulator ;\r
-IN: balloon-bomber\r
-\r
-HELP: run \r
-{ $description \r
-"Run the Balloon Bomber emulator in a new window." $nl\r
-{ $link rom-root } " must be set to the directory containing the "\r
-"location of the Balloon Bomber ROM files. See " \r
-{ $link { "balloon-bomber" "balloon-bomber" } } "  for details."\r
-} ;\r
-\r
-ARTICLE: { "balloon-bomber" "balloon-bomber" } "Balloon Bomber Emulator"\r
-"Provides an emulation of the original 8080 Arcade Game 'Balloon Bomber'." $nl\r
-"More information on the arcade game can be obtained from " { $url "http://www.mameworld.net/maws/romset/ballbomb" } "." $nl\r
-"To play the game you need the ROM files for the arcade game. They should "\r
-"be placed in a directory called 'ballbomb' in the location specified by "\r
-"the variable " { $link rom-root } ". The specific files needed are:"\r
-{ $list\r
-  "ballbomb/tn01"\r
-  "ballbomb/tn02"\r
-  "ballbomb/tn03"\r
-  "ballbomb/tn04"\r
-  "ballbomb/tn05-1"\r
-}\r
-"These are the same ROM files as used by MAME. To run the game use the " \r
-{ $link run } " word." $nl\r
-"Keys:" \r
-{ $table\r
-  { "Backspace" "Insert Coin" }\r
-  { "1" "1 Player" }\r
-  { "2" "2 Player" }\r
-  { "Left" "Move Left" }\r
-  { "Right" "Move Right" }\r
-  { "Up" "Fire" }\r
-}\r
-"If you save the Factor image while a game is running, when you restart "\r
-"the image the game continues where it left off." ;\r
diff --git a/unmaintained/balloon-bomber/balloon-bomber.factor b/unmaintained/balloon-bomber/balloon-bomber.factor
deleted file mode 100644 (file)
index 160447d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-! Copyright (C) 2007 Chris Double.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-!\r
-! Balloon Bomber: http://www.mameworld.net/maws/romset/ballbomb\r
-!\r
-USING: kernel space-invaders cpu.8080 ui ;\r
-IN: balloon-bomber\r
-\r
-TUPLE: balloon-bomber ; \r
-\r
-: <balloon-bomber> ( -- cpu )\r
-  <space-invaders> balloon-bomber construct-delegate ;\r
-\r
-: run ( -- )  \r
-  "Balloon Bomber" <balloon-bomber> {\r
-    { HEX: 0000 "ballbomb/tn01" }\r
-    { HEX: 0800 "ballbomb/tn02" }\r
-    { HEX: 1000 "ballbomb/tn03" }\r
-    { HEX: 1800 "ballbomb/tn04" }\r
-    { HEX: 4000 "ballbomb/tn05-1" }\r
-  } [ (run) ] with-ui ;\r
-\r
-MAIN: run\r
diff --git a/unmaintained/balloon-bomber/summary.txt b/unmaintained/balloon-bomber/summary.txt
deleted file mode 100644 (file)
index 1009453..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Intel 8080-based Balloon Bomber arcade machine emulator
diff --git a/unmaintained/balloon-bomber/tags.txt b/unmaintained/balloon-bomber/tags.txt
deleted file mode 100644 (file)
index dfed6b3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-demos
-games
-applications
diff --git a/unmaintained/lunar-rescue/authors.txt b/unmaintained/lunar-rescue/authors.txt
deleted file mode 100644 (file)
index 44b06f9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Chris Double
diff --git a/unmaintained/lunar-rescue/lunar-rescue-docs.factor b/unmaintained/lunar-rescue/lunar-rescue-docs.factor
deleted file mode 100644 (file)
index d54fe7d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-! Copyright (C) 2007 Chris Double.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: help.syntax help.markup cpu.8080.emulator ;\r
-IN: lunar-rescue \r
-\r
-HELP: run \r
-{ $description \r
-"Run the Lunar Rescue emulator in a new window." $nl\r
-{ $link rom-root } " must be set to the directory containing the "\r
-"location of the Lunar Rescue ROM files. See " \r
-{ $link { "lunar-rescue" "lunar-rescue" } } "  for details."\r
-} ;\r
-\r
-ARTICLE: { "lunar-rescue" "lunar-rescue" } "Lunar Rescue Emulator"\r
-"Provides an emulation of the original 8080 Arcade Game 'Lunar Rescue'." $nl\r
-"More information on the arcade game can be obtained from " { $url "http://www.mameworld.net/maws/romset/lrescue" } "." $nl\r
-"To play the game you need the ROM files for the arcade game. They should "\r
-"be placed in a directory called 'lrescue' in the location specified by "\r
-"the variable " { $link rom-root } ". The specific files needed are:"\r
-{ $list\r
-  "lrescue/lrescue.1"\r
-  "lrescue/lrescue.2"\r
-  "lrescue/lrescue.3"\r
-  "lrescue/lrescue.4"\r
-  "lrescue/lrescue.5"\r
-  "lrescue/lrescue.6"\r
-}\r
-"These are the same ROM files as used by MAME. To run the game use the " \r
-{ $link run } " word." $nl\r
-"Keys:" \r
-{ $table\r
-  { "Backspace" "Insert Coin" }\r
-  { "1" "1 Player" }\r
-  { "2" "2 Player" }\r
-  { "Left" "Move Left" }\r
-  { "Right" "Move Right" }\r
-  { "Up" "Fire or apply thrusters" }\r
-}\r
-"If you save the Factor image while a game is running, when you restart "\r
-"the image the game continues where it left off." ;\r
diff --git a/unmaintained/lunar-rescue/lunar-rescue.factor b/unmaintained/lunar-rescue/lunar-rescue.factor
deleted file mode 100644 (file)
index 558b715..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-! Copyright (C) 2007 Chris Double.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-!\r
-! Lunar Rescue: http://www.mameworld.net/maws/romset/lrescue\r
-!\r
-USING: kernel space-invaders cpu.8080 ui ;\r
-IN: lunar-rescue\r
-\r
-TUPLE: lunar-rescue ; \r
-\r
-: <lunar-rescue> ( -- cpu )\r
-  <space-invaders> lunar-rescue construct-delegate ;\r
-\r
-: run ( -- )  \r
-  "Lunar Rescue" <lunar-rescue> {\r
-    { HEX: 0000 "lrescue/lrescue.1" }\r
-    { HEX: 0800 "lrescue/lrescue.2" }\r
-    { HEX: 1000 "lrescue/lrescue.3" }\r
-    { HEX: 1800 "lrescue/lrescue.4" }\r
-    { HEX: 4000 "lrescue/lrescue.5" }\r
-    { HEX: 4800 "lrescue/lrescue.6" }\r
-  } [ (run) ] with-ui ;\r
-\r
-MAIN: run\r
diff --git a/unmaintained/lunar-rescue/summary.txt b/unmaintained/lunar-rescue/summary.txt
deleted file mode 100644 (file)
index 9cde8f1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Intel 8080-based Lunar Rescue arcade machine emulator
diff --git a/unmaintained/lunar-rescue/tags.txt b/unmaintained/lunar-rescue/tags.txt
deleted file mode 100644 (file)
index 4717ffd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-games
-applications