This file contains the archives of the rec.games.vectrex NetNews group for the month of Aug-1994 (This date range is approximate as article dates are determined based on arrival time and not the date in the article header). The Vextrex archives, which include game code, technical specifications, the rec.games.vectrex archive and a host of additional information, is available at: ftp://ftp.csus.edu/pub/vectrex/ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!lll-winken.llnl.gov!overload.lbl.gov!agate!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!not-for-mail From: ratnuts@panix.com (Peter Mui) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 31 Jul 1994 17:18:17 -0400 Organization: PANIX Public Access Internet and Unix, NYC Lines: 22 Distribution: inet Message-ID: <31h4ep$guo@panix2.panix.com> References: <319v0o$ltv@ankh.iia.org> NNTP-Posting-Host: panix2.panix.com In <319v0o$ltv@ankh.iia.org> stessej@iia.org (Jay) writes: > Could someone please recommend a vectrex Multi-cart other than >Woodward's one? I'm very interested in buying one of these carts in the >near future, but I'd prefer not to wait the months to get the Woodward >cart. I'd be happy with one that used dip-switches, and my only real >requirement is that it includes ALL of the games, and that they all >work. Any names of people who sell them, or other information would be >appreciated. >-Jay I purchased a Vectrex multi-cart a while ago from Sean Kelly. I'm not sure if he still makes them but it uses five dip switches to pick the games. It works great and I suppose I'm lucky I bought it from Sean rather than Woodward. All the games are in there and they all work fine. My favorites are Armor Attack and Star Castle, both of which I could spend hours on. Berzerk is nice but it gets too frenetic after a couple of rounds, and its hell on the eyes (a lot of flickering on screen) Pete + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!math.ohio-state.edu!news.acns.nwu.edu!usenet From: dorsett@merle.acns.nwu.edu (B. Dorsett) Newsgroups: rec.games.vectrex Subject: Vectrex For Sale->$100 + Shipping Date: 1 Aug 1994 17:02:56 GMT Organization: Northwestern University Lines: 4 Distribution: inet Message-ID: <31j9s1$9fi@news.acns.nwu.edu> NNTP-Posting-Host: 129.105.139.109 X-Newsreader: WinVN 0.90.5 Mint Condition Vectrex w/1 controller and the game Mine Field. $100 + shipping. Please respond to my E-Mail address if interested. B. Dorsett + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!math.ohio-state.edu!news.acns.nwu.edu!news.eecs.nwu.edu!tellab5!obdient!quake.xnet.com!bbs!skelly From: skelly@bbs.xnet.com (Sean Kelly) Message-ID: Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? References: <319v0o$ltv@ankh.iia.org> <31h4ep$guo@panix2.panix.com> Date: 1 Aug 94 15:51:57 CST Organization: XNet Public Access Internet, Naperville, IL (708-983-6435) Lines: 14 > I purchased a Vectrex multi-cart a while ago from Sean Kelly. I'm not >sure if he still makes them but it uses five dip switches to pick the games. >It works great and I suppose I'm lucky I bought it from Sean rather than >Woodward. All the games are in there and they all work fine. My favorites >are Armor Attack and Star Castle, both of which I could spend hours on. >Berzerk is nice but it gets too frenetic after a couple of rounds, and >its hell on the eyes (a lot of flickering on screen) > Yea, I still make them.... Sean Kelly skelly@bbs.xnet.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!netcom.com!netcomsv!decwrl!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!dw901 From: dw901@cleveland.Freenet.Edu (Michael J. Novak Jr.) Newsgroups: rec.games.vectrex Subject: Vectrex game auction -- LAST CHANCE TO BID! Date: 2 Aug 1994 06:49:22 GMT Organization: Case Western Reserve University, Cleveland, Ohio (USA) Lines: 71 Distribution: inet Message-ID: <31kq9i$2ot@usenet.INS.CWRU.Edu> NNTP-Posting-Host: piglet.ins.cwru.edu SIXTH UPDATE! People are still dropping out. When this has happened, I have gone back to the previous high bid, if there was one. I just want to remind you all that this is it, your last chance to place a bid. If you really want a game, you should bid accordingly. I will notify all winners by E-mail on Wednesday. If any of them back out, the last high bidder will be notified, and so on. Good luck, and thanks for all the response. Mike ----------------------------------------------------------------------------- SOFTWARE: VECTREX: -------- SPIKE CARTRIDGE WITH ORIGINAL BOX AND MANUAL (SORRY, NO OVERLAY). $20 L.C.A. E-mail if you want a copy of the complete latest update. Other systems and/or games included in this auction include: ATARI 2600 ATARI 5200 ATARI 7800 ATARI LYNX COLECOVISION INTELLIVISION ODYSSEY2 SEGA MASTER SYSTEM AUCTION RULES: 1) THE DEADLINE FOR BIDDING IS 11:59 P.M. EST, ON TUESDAY, AUGUST 2ND. 2) MINIMUM BID ON GAMES IS $1, MINIMUM INCREMENTS OF $0.50. 3) NO PACKAGE DEALS ON GAMES OR SYSTEMS. 4) TRADE OFFERS WILL BE ENTERTAINED, BUT CASH OFFERS ARE GIVEN PRIORITY. 5) ATARI LYNX GAMES AND ALL SYSTEMS HAVE A MINIMUM BID LISTED. 6) EVERYTHING IS SOLD AS IS. UNLESS SPECIFIED, ALL GAMES AND SYSTEMS HAVE BEEN TESTED AND ARE IN WORKING ORDER. 7) BUYER PAYS ALL SHIPPING COSTS. 8) IN CASE OF TIES, FIRST BID RECEIVED WINS. 9) IF HIGHEST BIDDER BACKS OUT, THEN NEXT HIGHEST BID WINS, AND SO ON. 10) ALL ORDERS MUST BE PAID IN U.S. DOLLARS. NOTE: ALL CARTRIDGES ARE LOOSE (IE. WITHOUT BOX AND MANUAL), UNLESS SPECIFIED. ***** Send all bids to: dw901@cleveland.freenet.edu Michael J. Novak Jr. -- Are you interested in BUYING/SELLING/TRADING personally owned video games for: SEGA GENESIS, SEGA CD, SUPER NINTENDO, and ATARI JAGUAR??? For a copy of my current list, or to be placed on my e-mail list, please leave E-Mail at -=+> dw901@cleveland.Freenet.Edu + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!sdd.hp.com!apollo.hp.com!hpwin055.uksr!rsquire From: rsquire@br.itc.hp.com (#roger squire ) Newsgroups: rec.games.vectrex Subject: Re: VECTREX WANTED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Date: 2 Aug 1994 14:42:59 GMT Organization: Hewlett-Packard Lines: 9 Distribution: inet Message-ID: <31lm1j$k3o@hpwin055.uksr.hp.com> References: <310jb2$dr8@search01.news.aol.com> NNTP-Posting-Host: troll.br.itc.hp.com X-Newsreader: TIN [version 1.2 PL2] BUTHEAD499 (buthead499@aol.com) wrote: : If you have a VECTREX with some games etc... please respond to me I would : prefer ovarlays and the machine new. Hmmm more than 4 letters in words, and semi-poilte, but he still seems to be talking nonsense.. (and the machine new)... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!gatech!udel!news.sprintlink.net!nwnexus!krel.iea.com!comtch!pgage From: pgage@comtch.iea.com (Peter Gage) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 2 Aug 1994 21:11:04 GMT Organization: CompuTech, Spokane WA Lines: 11 Distribution: inet Message-ID: <31mcp8$oe0@krel.iea.com> References: <319v0o$ltv@ankh.iia.org> <31h4ep$guo@panix2.panix.com> NNTP-Posting-Host: comtch.iea.com X-Newsreader: TIN [version 1.2 PL1] Sean Kelly (skelly@bbs.xnet.com) wrote: : : Yea, I still make them.... : Sean Kelly : skelly@bbs.xnet.com What do you charge for one...and whats the estimated turnaround time pgage@iea.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!usenet.ins.cwru.edu!cleveland.Freenet.Edu!dw901 From: dw901@cleveland.Freenet.Edu (Michael J. Novak Jr.) Newsgroups: rec.games.vectrex Subject: MASSIVE AUCTION -- IT'S OVER! Date: 3 Aug 1994 10:33:03 GMT Organization: Case Western Reserve University, Cleveland, Ohio (USA) Lines: 11 Distribution: inet Message-ID: <31nrov$kbu@usenet.INS.CWRU.Edu> NNTP-Posting-Host: eeyore.ins.cwru.edu Thanks to all who placed bids. If you received E-mail from me, then you were a high bidder. Mike -- Are you interested in BUYING/SELLING/TRADING personally owned video games for: SEGA GENESIS, SEGA CD, SUPER NINTENDO, and ATARI JAGUAR??? For a copy of my current list, or to be placed on my e-mail list, please leave E-Mail at -=+> dw901@cleveland.Freenet.Edu + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!sdd.hp.com!apollo.hp.com!hpwin055.uksr!rsquire From: rsquire@br.itc.hp.com (#roger squire ) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 3 Aug 1994 08:48:18 GMT Organization: Hewlett-Packard Lines: 20 Distribution: inet Message-ID: <31nlki$5r6@hpwin055.uksr.hp.com> References: <319v0o$ltv@ankh.iia.org> <31c7vt$9ng@sundog.tiac.net> NNTP-Posting-Host: troll.br.itc.hp.com X-Newsreader: TIN [version 1.2 PL2] Glenn M. Saunders (krishna@max.tiac.net) wrote: : Jay (stessej@iia.org) wrote: : : Could someone please recommend a vectrex Multi-cart other than : : Woodward's one? I'm very interested in buying one of these carts in the : : near future, but I'd prefer not to wait the months to get the Woodward : : cart. I'd be happy with one that used dip-switches, and my only real : : requirement is that it includes ALL of the games, and that they all : : work. Any names of people who sell them, or other information would be : : appreciated. : One nagging question I have is whether the "bugs" have been : fixed, and if not, why not? If Smith Engineering was concerned, I'm sure : they would have released the source to games like Minestorm and Berzerk : which have bugs in certain levels. After all these years it seems we : should get the friggen bugs fixed for posterity, don't you? BTW, the US version of Minestorm is the only one with the level 13 bug, we don;t have the bug in the UK version :-) + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!sdd.hp.com!apollo.hp.com!hpwin055.uksr!rsquire From: rsquire@br.itc.hp.com (#roger squire ) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 3 Aug 1994 08:49:21 GMT Organization: Hewlett-Packard Lines: 13 Distribution: inet Message-ID: <31nlmh$5r6@hpwin055.uksr.hp.com> References: <319v0o$ltv@ankh.iia.org> <31c7vt$9ng@sundog.tiac.net> <31clag$cia@u.cc.utah.edu> NNTP-Posting-Host: troll.br.itc.hp.com X-Newsreader: TIN [version 1.2 PL2] jason barkdull (jnichola@cadesm34.eng.utah.edu) wrote: : HERE, HERE!!! : isn't there some hackers out there fixing these bugs? : It should be fixed for us to enjoy now. Jees, what happened to asking politely, if you're that concerned, why don't YOU fix them... Sheesh.... + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!sdd.hp.com!hpscit.sc.hp.com!news.dtc.hp.com!hplextra!hplb!hpwin055.uksr!rsquire From: rsquire@br.itc.hp.com (#roger squire ) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 3 Aug 1994 08:51:13 GMT Organization: Hewlett-Packard Lines: 35 Distribution: inet Message-ID: <31nlq1$5r6@hpwin055.uksr.hp.com> References: <319v0o$ltv@ankh.iia.org> <31c7vt$9ng@sundog.tiac.net> <31clag$cia@u.cc.utah.edu> <31cohs$f3t@sundog.tiac.net> NNTP-Posting-Host: troll.br.itc.hp.com X-Newsreader: TIN [version 1.2 PL2] Glenn M. Saunders (krishna@max.tiac.net) wrote: : jason barkdull (jnichola@cadesm34.eng.utah.edu) wrote: : : HERE, HERE!!! : : isn't there some hackers out there fixing these bugs? : : It should be fixed for us to enjoy now. : The only reason I can THINK of that the bugs might be hard to fix is that : the games use up EVERY SINGLE ROM BYTE and there is no room to fix the : bug (i.e. to fix the bug would require more code). : More likely: the lack of commented source-code. : It's rather surprising that the bugs were still in the carts when they : were released. I know of no other commercial carts sold by any company : that had some kind of fatal lockup bug in it. They just don't do that. : However, by all accounts the parties involved in the Vectrex were : small-fry compared to the biggies and they were probably under strict : timetables and had to make tough decisions. : I hope I'm not opening a can of worms here, what if they Do get fixed? : Then a bunch of people will be whining about updating their multicarts!!! I guess you wern't around in the early '80's, and yes other big companies did release games with bugs in the, look at Pac-Man on the VCS2600, and other games at the time... There are still bugs in todays games, you just have to find them... Nobodies perfect... + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!library.ucla.edu!agate!howland.reston.ans.net!europa.eng.gtefsd.com!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 3 Aug 1994 11:14:50 GMT Organization: The Internet Access Company Lines: 18 Distribution: inet Message-ID: <31nu7a$qgb@sundog.tiac.net> References: <319v0o$ltv@ankh.iia.org> <31c7vt$9ng@sundog.tiac.net> <31clag$cia@u.cc.utah.edu> <31cohs$f3t@sundog.tiac.net> <31nlq1$5r6@hpwin055.uksr.hp.com> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] #roger squire (rsquire@br.itc.hp.com) wrote: : I guess you wern't around in the early '80's, and yes other big companies : did release games with bugs in the, look at Pac-Man on the VCS2600, : and other games at the time... : There are still bugs in todays games, you just have to find them... : Nobodies perfect... Could you be more specific? There is a difference between a bug and an easter egg. With the 2600, frying techniques and the like could produce random effects, but otherwise, all games I've ever had have been playable without lockups. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!cs.utexas.edu!swrinde!emory!europa.eng.gtefsd.com!swiss.ans.net!malgudi.oar.net!utnetw.utoledo.edu!uoft02.utoledo.edu!SMTC104 From: smtc104@uoft02.utoledo.edu (LINDA B. SEE) Subject: Correction on Rotary Controller Plans Message-ID: Sender: news@utnetw.utoledo.edu (News Manager) Reply-To: smtc104@uoft02.utoledo.edu Organization: University Of Toledo Date: Thu, 4 Aug 1994 19:31:23 GMT Lines: 8 I would like to correct myself. In an earlier posting I discussed how to alter an Atari 2600 Driving controller to work as a rotary controller for the Vectrex. I checked some Driving Controllers that I had and found that the two wires needing alteration were simply ommited from the controller. As a result I have come up with a new set of plans for conversion. If you'd like a copy, E-Mail me (Subj:Conversion plans). Now all this controller needs is some software. Besides possibly Woodward, who out there is in a position to make or convert software for use with this controller? Sincerely, Joshua See + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!nic-nac.CSU.net!gopher.sdsc.edu!news.tc.cornell.edu!news.cac.psu.edu!howland.reston.ans.net!gatech!swiss.ans.net!malgudi.oar.net!utnetw.utoledo.edu!news From: pbardis@uoft02.utoledo.edu Subject: Ripoff 4 Sale Message-ID: Lines: 5 Sender: news@utnetw.utoledo.edu (News Manager) Organization: University of Toledo Date: Fri, 5 Aug 1994 11:17:08 GMT For sale, Vectrex Ripoff cart, no manual, no overlay. Send offers via e-mail please. Thanks. -Jason + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex,rec.games.video.classic,rec.games.video.marketplace,rec.games.video.arcade,rec.games.video.misc,alt.games.video.classic,misc.forsale Subject: Vectrex cartridges for sale or trade Date: 6 Aug 1994 03:16:24 GMT Organization: The University of Western Ontario, London, Ont. Canada Lines: 72 Distribution: inet Message-ID: <31uva8$4vj@falcon.ccs.uwo.ca> NNTP-Posting-Host: asterix.gaul.csd.uwo.ca Xref: csus.edu rec.games.vectrex:1984 rec.games.video.classic:8605 rec.games.video.marketplace:12444 rec.games.video.arcade:41622 rec.games.video.misc:17680 alt.games.video.classic:4673 misc.forsale:126584 I have these vectrex cartridges for sale. All are brand new in boxes with overlays and instructions. Armor..Attack $15 Berzerk $12 Blitz! $12 Cosmic Chasm $12 Rip Off $35 Scramble $12 Star Trek $12 I also have a few cartridges that are used, without overlays or manuals. Cosmic Chasm $6 Hyperchase $6 Scramble $6 Solar Quest $10 Shipping ( Post Office ) includes insurance. 1-2 $5 3+ $6 I am open to trades of all kinds. I am currently looking for the following vectrex stuff Space Wars manual, overlay, box Star Castle overlay Heads up soccer everything Melody Master box in perfect condition Web Warp box ( not web wars ) 3D Narrow box 3D Crazy manual, box 3D minestorm manual, box, cart 3D imager box Polar Rescue everything Multi cartridge Joystick I am also interested in amiga, mac and ibm hard/software as trades Nubus Video cards for the Mac 2" 1M floppies simm's. Hard drives I am also interested in also Mac/Amiga/IBM hardware/software. Not interested in games. john macdonald magundi@uwo.ca (519) 432-9697 feel free to leave a message on the machine, but I can't really afford to call back long distance. PS If you responded to a previous posting in the last few months and did not get a reply it was mostly like due to account and mail problems. Sorry. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!newstf01.cr1.aol.com!search01.news.aol.com!not-for-mail From: tallibeth@aol.com (Tallibeth) Newsgroups: rec.games.vectrex Subject: Wanted: Vectrex & carts Date: 6 Aug 1994 13:10:02 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 6 Sender: root@search01.news.aol.com Distribution: inet Message-ID: <320g5a$d0k@search01.news.aol.com> NNTP-Posting-Host: search01.news.aol.com I'd like to pick up a Vectrex & some carts as a present for a video gaming friend. Please let me know if you have these items. Thanks + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!charnel.ecst.csuchico.edu!yeshua.marcam.com!zip.eecs.umich.edu!newsxfer.itd.umich.edu!gatech!news-feed-1.peachnet.edu!ukma!mik.uky.edu!kenneth From: kenneth@mik.uky.edu (kenneth e trainor) Newsgroups: rec.games.vectrex,rec.games.video.marketplace Subject: Vectrex system for sale Date: 8 Aug 94 05:29:26 GMT Organization: University of Kentucky, Dept. of Math Sciences Lines: 19 Distribution: usa Message-ID: NNTP-Posting-Host: nx10.mik.uky.edu Xref: csus.edu rec.games.vectrex:1986 rec.games.video.marketplace:12494 Vectrex in excellent condition for sale; includes Berzerk, Solar Quest, Scramble, Star Castle, Fortress of Narzod, Web Wars, Armor Attack, Starhawk, Rip Off, Bedlam, Cosmic Chasm, Star Trek, and Mine Storm, of course. Second control panel included; the stick is bent about five degrees half way up, and should be easily fixed. Otherwise, it has no other damage and works flawlessly. All overlays and all original documentation is included. Sorry, I will only sell this as a set. This will be the only posting about this system. Please include a note with your offer if you would or would not like to know what the highest offer is if yours is not. Ken kenneth@mik.uky.edu + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: To the person that wrote me about a vectrex for sale. Date: 8 Aug 1994 14:46:30 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 8 Distribution: inet Message-ID: <325gg6$50v@falcon.ccs.uwo.ca> NNTP-Posting-Host: asterix.gaul.csd.uwo.ca A couple months back someone wrote me wanted a Vectrex. I have lost your e-mail address. Please write back as I have one. thanks, john + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!sgiblab!darwin.sura.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!uunet!newstf01.cr1.aol.com!search01.news.aol.com!not-for-mail From: tallibeth@aol.com (Tallibeth) Newsgroups: rec.games.vectrex Subject: Re: To the person that wrote me about a vectrex for sale. Date: 8 Aug 1994 13:54:02 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 3 Sender: news@search01.news.aol.com Distribution: inet Message-ID: <325rfq$gpp@search01.news.aol.com> References: <325gg6$50v@falcon.ccs.uwo.ca> NNTP-Posting-Host: search01.news.aol.com I've been looking for one. Please email me if yours is not too expensive. Talli + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!umbc2.umbc.edu!noel From: noel@umbc2.umbc.edu (Noel Tominack, ACS, X3861) Newsgroups: rec.games.vectrex Subject: How do I adjust the screen? Date: 8 AUG 94 22:23:42 GMT Organization: University of Maryland Baltimore County Lines: 15 Distribution: inet Message-ID: <8AUG94.22234283@umbc2.umbc.edu> NNTP-Posting-Host: umbc2.umbc.edu Well, over this weekend my sister brought me Vectrex #4 from a flea market in Missouri. The case is a little dusty but very little scratches, the controller is in great shape, and the sound is *perfect*! But there is always a downside... When I used the test cartridge to check out it, it showed with the cross-hair screen that the vectors were not lining up, and it needed focusing. Does anyone know how I can fix that problem? __________________________________________ * Noel J. Tominack (noel@umbc2.umbc.edu) | * University of Maryland Baltimore County | * All opinions are mine mine mine! | * ________________________________________| + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!ames!news.Hawaii.Edu!uhunix.uhcc.Hawaii.Edu!jperez From: jperez@uhunix.uhcc.Hawaii.Edu (John Perez) Subject: Vectrex Doom Message-ID: Sender: news@news.Hawaii.Edu Organization: University of Hawaii X-Newsreader: TIN [version 1.2 PL2] Date: Mon, 8 Aug 1994 22:48:48 GMT Lines: 6 I heard a rumor that the guys over at id software are big Vectrex fans and are doing a version of Doom for the Vectrex. I know it sounds like a joke, but who knows. Anybody hear anything? Borg + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!att-out!cbnewsj!cbnewsi!gw1!news.bu.edu!olivea!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!uunet!news.sprintlink.net!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Vectrex Doom Date: 9 Aug 1994 00:40:33 GMT Organization: The Internet Access Company Lines: 6 Distribution: inet Message-ID: <326ja1$dqk@sundog.tiac.net> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Those idiots ad Id don't seem to know how to program assembly, only Ansi C. So don't get your hopes up that they'd roll up their sleeves and attempt real programming on the 6809. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex From: Alan@alanog.demon.co.uk (Alan O'Grady) Path: csus.edu!uop!pacbell.com!att-out!rutgers!newsserver.jvnc.net!yale.edu!spool.mu.edu!howland.reston.ans.net!pipex!demon!alanog.demon.co.uk!Alan Subject: Got a Vectrex (Finally!), What Now?..... Organization: a PC near you SOON!.... :) Reply-To: alan@alanog.demon.co.uk X-Newsreader: Demon Internet Simple News v1.27 Lines: 9 Date: Mon, 8 Aug 1994 00:50:04 +0000 Message-ID: <776307004snz@alanog.demon.co.uk> Sender: usenet@demon.co.uk -- Alan.... Smoke me a kipper!... I'll be back for breakfast ********************************* ** alan@alanog.demon.co.uk ** ********************************* + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex From: Alan@alanog.demon.co.uk (Alan O'Grady) Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!cs.utexas.edu!howland.reston.ans.net!pipex!demon!alanog.demon.co.uk!Alan Subject: Re: Got a Vectrex (Finally!), What Now?..... References: <776307004snz@alanog.demon.co.uk> Organization: a PC near you SOON!.... :) Reply-To: alan@alanog.demon.co.uk X-Newsreader: Demon Internet Simple News v1.27 Lines: 81 Date: Mon, 8 Aug 1994 02:04:22 +0000 Message-ID: <776311462snz@alanog.demon.co.uk> Sender: usenet@demon.co.uk Greetings all, I'm sure some of you out there will remember my desperate plea for a Vectrex a few weeks ago. Well I'm now pleased to announce that I'm now the proud owner of not one but TWO! systems. Why two you may be thinking. Well, it's a long story but basicly I'd arranged to go and see one down in Sussex (some 260 miles from home) and buy it depending on it being in good condition. Two days before going down there I noticed one for sale locally and went to see it. I decided to buy it just in case the other one sucked (I needn't of worried though....). The system I bought locally is is in good working order but has a few marks on the case (I suppose that's to be expected given its age), it came with 3 game cassettes (Berzerk, Star Ship and Rip Off) but unfortunatley no overlays. The second system was well worth the effort to get. It's in mint condition and came with the manual and minestorm overlay. 6 game cassettes were thrown in as well (Armour Attack, Berzerk, Scramble, Spike, Starhawk and Star Ship) and whats more they were all boxed and included manuals and overlays - Cool. As you can probably tell I'm thrilled to bits with it and have had to pull myself away from it to post this. Before I bought it a few of my fellow gamers said I was mad to consider buying one, now they've played it they can see what the attraction of the system is all about. I've played video games since the age of seven (Atari's PONG was my first) and although I've owned various systems over the years (I've currently also got a SNES....), none of them deliver that expeirence that you get from a vectored game. Anyway, what next?....... I've read the FAQ and found it both interesting and informative and I've also raided the Vectrex archives and intend to study the stuff downloaded from there soon. But there's a few questions I'd like to ask and hope someone will be able to help. Game Cassettes?. I'd like to know if they are tied to the country of issue rather like SNES games (i.e. A game bought in the UK will not work on a US system). Obviously if they are I can't try and aquire any for sale in this area unless they're of UK origin. Multicarts?. A bit of a sore subject if reading some of the comments in this group is anything to go by. Rather than burn my own ROM's I'd rather get a multicart. I know Mark Woodward makes the best but it seems that he's a bit snowed under with the volume of carts he's having to produce. Does anyone else out there produce 'em?. If so let me know as I need two. (If your reading this Mark, please E-mail me as I'd like to have a chat with not only about your multicart but about programming the dammn thing and the sort of kit you used to do it.) The 3D Viewer?. This little baby was never released in the UK (as far as I know...), so I suppose I'd have to build one if possible. The FAQ hinted at the possibility of being able to convert a pair of Sega 3D glasses to do the job but then made no further mention of the subject. Has anyone got anywhere on this?, if so let me know. Finally, the address of Smith Engineering. Does anyone have this so I can contact 'em should I need to (if they have an E-mail address that would be even better). Phew!, thats it for the moment. Now I've got a system I feel I really belong to this group and hope I'll be able to contribute on a regular basis. Apologies if I've asked a few FAQ's, but I hope you'll all forgive me and indulge me with a few answers. Thanks in advance.... Alan. PS: I think I've already got a buyer for the system with the 3 carts but its not definate. If anyone wants to e-mail me to see if its still available, feel free to do so - I'll reply even if it's been sold. Smoke me a kipper!... I'll be back for breakfast ********************************* ** alan@alanog.demon.co.uk ** ********************************* + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!charnel.ecst.csuchico.edu!yeshua.marcam.com!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex,rec.games.video.classic,rec.games.video.marketplace,rec.games.video.arcade,rec.games.video.misc,alt.games.video.classic,misc.forsale Subject: Massive Vectrex trade off Date: 9 Aug 1994 14:19:41 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 18 Distribution: inet Message-ID: <32839t$5kc@falcon.ccs.uwo.ca> NNTP-Posting-Host: asterix.gaul.csd.uwo.ca Xref: csus.edu rec.games.vectrex:1994 rec.games.video.classic:8674 rec.games.video.marketplace:12552 rec.games.video.arcade:41786 rec.games.video.misc:17702 alt.games.video.classic:4684 misc.forsale:127100 This is not an auction. I have several vectrex and 30 or so cartridges for sale 13 or 14 different games. I haven't put a complete list together and it would be rather long so I won't post it. If you are interested please send me e-mail and I will send a list on Thursday. I am mostly interested in trades but will have prices. If I am offered my asking price I will take it. None of this month long auction crap around here. :-) john macdonald magundi@Uwo.ca + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!att-out!rutgers!netnews.upenn.edu!dsinc!spool.mu.edu!howland.reston.ans.net!math.ohio-state.edu!usc!news.service.uci.edu!cafws2.eng.uci.edu!dan From: dan@cafws2.eng.uci.edu (Dan Harkless) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 9 Aug 1994 23:55:54 GMT Organization: University of California, Irvine Lines: 18 Distribution: inet Message-ID: <32952a$bp8@news.service.uci.edu> References: <319v0o$ltv@ankh.iia.org> <31cohs$f3t@sundog.tiac.net> <31nlq1$5r6@hpwin055.uksr.hp.com> <31nu7a$qgb@sundog.tiac.net> NNTP-Posting-Host: cafws2.eng.uci.edu Glenn M. Saunders writes: > >: There are still bugs in todays games, you just have to find them... > >Could you be more specific? There is a difference between a bug and an >easter egg. With the 2600, frying techniques and the like could produce >random effects, but otherwise, all games I've ever had have been >playable without lockups. Just to take a totally random example, the Strider arcade game will sometimes lock up on the last level for no reason. The music plays on, but the graphics freeze. ------------------------------------------------------------------------------ | Dan Harkless | "The sore in my soul | | dan@cafws1.eng.uci.edu | The mark in my heart -> Front 242, | | dharkles@bonnie.ics.uci.edu | Her acid reign..." Tragedy >For You< | ------------------------------------------------------------------------------ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!att-out!rutgers!newsserver.jvnc.net!howland.reston.ans.net!usc!news.service.uci.edu!cafws2.eng.uci.edu!dan From: dan@cafws2.eng.uci.edu (Dan Harkless) Newsgroups: rec.games.vectrex Subject: Re: Got a Vectrex (Finally!), What Now?..... Date: 10 Aug 1994 00:01:38 GMT Organization: University of California, Irvine Lines: 20 Distribution: inet Message-ID: <3295d2$btp@news.service.uci.edu> References: <776307004snz@alanog.demon.co.uk> <776311462snz@alanog.demon.co.uk> NNTP-Posting-Host: cafws2.eng.uci.edu Alan O'Grady writes: > >Game Cassettes?. I'd like to know if they are tied to the country of issue >rather like SNES games (i.e. A game bought in the UK will not work on a US >system). Obviously if they are I can't try and aquire any for sale in this >area unless they're of UK origin. Actually, SNES games will work on any system regardless of country of origin. It's just that they put hardware restraints on the cartridge manufacture (which are defeatable if you know how) to prevent the actual insertion of foreign-origin carts. AFAIK, Vectrex carts work on any of the Vectrex machines, and have neither firmware nor physical hardware incompatibilities. I'm sure someone will refute me if they have more details than I do... ------------------------------------------------------------------------------ | Dan Harkless | "The sore in my soul | | dan@cafws1.eng.uci.edu | The mark in my heart -> Front 242, | | dharkles@bonnie.ics.uci.edu | Her acid reign..." Tragedy >For You< | ------------------------------------------------------------------------------ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!att-out!cbnewsj!cbnewsi!gw1!news.bu.edu!olivea!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!apollo!orion.it.luc.edu!ebrunne From: ebrunne@orion.it.luc.edu (Edward A. Brunner) Newsgroups: rec.games.vectrex Subject: Vectrex FAQ req. Date: 9 Aug 1994 17:45:07 GMT Organization: Loyola University of Chicago Lines: 13 Distribution: inet Message-ID: <328fb3$90k@apollo.it.luc.edu> NNTP-Posting-Host: orion.it.luc.edu X-Newsreader: TIN [version 1.2 PL2] It only took me three days (after finding this group) to get my hands on a vectrex. I know how lucky i am!! Now there's just a few things i need to do -- get a multicart, fix my joystick and get a second joystick. My problem is, i can't seem to find the faq now. Maybe my usenet reader deleted it or something. Could someone either repost it or mail it to me at ebrunne@orion.it.luc.edu? Thank you so much. Ted B. p.s. don't bother mailing B. Dorsett anymore about his vectrex, i got it. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!news.service.uci.edu!cafws2.eng.uci.edu!dan From: dan@cafws2.eng.uci.edu (Dan Harkless) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 10 Aug 1994 02:01:48 GMT Organization: University of California, Irvine Lines: 34 Distribution: inet Message-ID: <329cec$gub@news.service.uci.edu> References: <319v0o$ltv@ankh.iia.org> <31nu7a$qgb@sundog.tiac.net> <32952a$bp8@news.service.uci.edu> <329bge$he5@sundog.tiac.net> NNTP-Posting-Host: cafws2.eng.uci.edu Glenn M. Saunders writes: >Dan Harkless (dan@cafws2.eng.uci.edu) wrote: > >: Just to take a totally random example, the Strider arcade game will >: sometimes lock up on the last level for no reason. The music plays on, but >: the graphics freeze. > >Are you sure this is due to software? I've seen lots of flaky arcade >machines and most of those have hardware problems. I mean, they ARE run >for long periods of time. Two different Strider machines I played did this, and it was only at the last level. Doesn't sound like a hardware problem to me. >Anyway, my point is that it is wholly unprofessional to have bugs in game >software. No doubt SOME leak through but it is by far not as common as >it is in the complex application software industry (where you'd expect >there to have to be revisions and bug fixes). Consumers should not be >expected to tolerate lockup bugs such as those in the Vectrex games and >chalk it up to "shit happens". It doesn't take as long to debug 8K of >ROM (if you know your shit) than a huge computer app. I can definitely understand how the programmers would miss a bug that makes it unable to pass a certain level. One would not expect that levels that progress algorithmically, like the MineStorm levels do, would have a mysterious problem at level N. I'm sure the authors tested the game out by playing it, and no one had time or inclination to get to as high levels as some fanatical players. ------------------------------------------------------------------------------ | Dan Harkless | "The sore in my soul | | dan@cafws1.eng.uci.edu | The mark in my heart -> Front 242, | | dharkles@bonnie.ics.uci.edu | Her acid reign..." Tragedy >For You< | ------------------------------------------------------------------------------ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!att-out!cbnewsj!cbnewsi!gw1!news.bu.edu!olivea!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 10 Aug 1994 01:45:50 GMT Organization: The Internet Access Company Lines: 20 Distribution: inet Message-ID: <329bge$he5@sundog.tiac.net> References: <319v0o$ltv@ankh.iia.org> <31cohs$f3t@sundog.tiac.net> <31nlq1$5r6@hpwin055.uksr.hp.com> <31nu7a$qgb@sundog.tiac.net> <32952a$bp8@news.service.uci.edu> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Dan Harkless (dan@cafws2.eng.uci.edu) wrote: : Just to take a totally random example, the Strider arcade game will : sometimes lock up on the last level for no reason. The music plays on, but : the graphics freeze. Are you sure this is due to software? I've seen lots of flaky arcade machines and most of those have hardware problems. I mean, they ARE run for long periods of time. Anyway, my point is that it is wholly unprofessional to have bugs in game software. No doubt SOME leak through but it is by far not as common as it is in the complex application software industry (where you'd expect there to have to be revisions and bug fixes). Consumers should not be expected to tolerate lockup bugs such as those in the Vectrex games and chalk it up to "shit happens". It doesn't take as long to debug 8K of ROM (if you know your shit) than a huge computer app. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!library.ucla.edu!agate!msuinfo!harbinger.cc.monash.edu.au!news.uwa.edu.au!multi.multiline.com.au!not-for-mail From: stranogs@cougar.multiline.com.au (Gerry Strano) Newsgroups: rec.games.vectrex Subject: Wanted... Vectrex games and Joystick Date: 10 Aug 1994 10:55:37 +0800 Organization: 1990 Multiline BBS Lines: 26 Distribution: world Message-ID: <329fj9$lrt@cougar.multiline.com.au> NNTP-Posting-Host: cougar.multiline.com.au X-Newsreader: TIN [version 1.2 PL2] Hi there all you gaming dudes... Does anybody remember the MB Vectrex Game System. I know it is extinct for almost ten years now, but does anybody still own one. I'm interested in buying if you're willing to sell. Needs to be in perfect working order! I'm only really after the joystick keypad and other games cartridges if anybody has any???? Cheers Gerry.... +-------------+----------+------------------------------------------+ | __ |\ | __O | | | / \_| `\ | ( \| | Multiline - BBS - Perth W.A. | |/ `\ | \<,_ |E-Mail : stranogs@cougar.multiline.com.au | | | | (*)/ (*) | | |\* .. / |==========| | | \../ \_/ |----------| | | v | | | \-------------+----------+------------------------------------------/ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!decwrl!parc!barrnet.net!agate!howland.reston.ans.net!europa.eng.gtefsd.com!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 10 Aug 1994 03:56:25 GMT Organization: The Internet Access Company Lines: 13 Distribution: inet Message-ID: <329j59$kta@sundog.tiac.net> References: <319v0o$ltv@ankh.iia.org> <31nu7a$qgb@sundog.tiac.net> <32952a$bp8@news.service.uci.edu> <329bge$he5@sundog.tiac.net> <329cec$gub@news.service.uci.edu> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Dan Harkless (dan@cafws2.eng.uci.edu) wrote: : I can definitely understand how the programmers would miss a bug that : makes it unable to pass a certain level. One would not expect that levels : that progress algorithmically, like the MineStorm levels do, would have a : mysterious problem at level N. I'm sure the authors tested the game out by : playing it, and no one had time or inclination to get to as high levels as : some fanatical players. The initial point of this thread was that BY NOW you'd think the bug would get solved. It's not exactly a mystery. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!netcom.com!psteffen From: psteffen@netcom.com (Paul G. Steffen) Subject: Re: Vectrex Doom Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] References: <326ja1$dqk@sundog.tiac.net> Distribution: inet Date: Wed, 10 Aug 1994 09:22:00 GMT Lines: 15 Glenn M. Saunders (krishna@max.tiac.net) wrote: : Those idiots ad Id don't seem to know how to program assembly, only Ansi : C. So don't get your hopes up that they'd roll up their sleeves and : attempt real programming on the 6809. Actually, they do know how to program in assembly... They just probably aren't very good at it. DOOM on the Vectrex? Not very likely... d;^) -- _______________________________________________________________________ Paul G. Steffen | 31 Bayview Road, Elkhorn, Ca 95012 psteffn@gnu.ai.mit.edu | From The Center of the Sanctuary psteffen@netcom.com | (Sun/Apollo/Amiga/Atari Hardware Hacker) ----STratoHAK of Tibetan Peach Pie Inc. 680x0 Developers From Hell---- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!gatech!newsfeed.pitt.edu!godot.cc.duq.edu!ddsw1!news.kei.com!uhog.mit.edu!news.mtholyoke.edu!news.amherst.edu!news.umass.edu!nic.umass.edu!k12.ucs.umass.edu!hanechak From: hanechak@k12.ucs.umass.edu (Brian Hanechak (Chicopee HS)) Newsgroups: rec.games.vectrex Subject: Re: Vectrex Doom Date: 11 Aug 1994 00:18:32 GMT Organization: University of Massachusetts K-12 Outreach Lines: 13 Distribution: inet Message-ID: <32bqoo$4mg@nic.umass.edu> References: NNTP-Posting-Host: k12.ucs.umass.edu X-Newsreader: TIN [version 1.2 PL2] John Perez (jperez@uhunix.uhcc.Hawaii.Edu) wrote: : I heard a rumor that the guys over at id software are big Vectrex fans : and are doing a version of Doom for the Vectrex. I know it sounds like a : joke, but who knows. Anybody hear anything? I haven't heard, but if they do it, I hope they use the 3d glasses! That'd be cool! Of course, the 8k RAM limit might get in the way, but I'm SURE they could find a way around it :) Maybe they can make a special 256 color wheel for the glasses too? + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!decwrl!portal.com!uunet!ankh.iia.org!stessej From: stessej@iia.org (Jay) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 11 Aug 1994 03:54:31 GMT Organization: International Internet Association. Lines: 26 Distribution: inet Message-ID: <32c7dn$3rc@ankh.iia.org> References: <319v0o$ltv@ankh.iia.org> <31nu7a$qgb@sundog.tiac.net> <32952a$bp8@news.service.uci.edu> <329bge$he5@sundog.tiac.net> <329cec$gub@news.service.uci.edu> <329j59$kta@sundog.tiac.net> NNTP-Posting-Host: mary.iia.org X-Newsreader: TIN [version 1.2 PL2] Glenn M. Saunders (krishna@max.tiac.net) wrote: : Dan Harkless (dan@cafws2.eng.uci.edu) wrote: : : I can definitely understand how the programmers would miss a bug that : : makes it unable to pass a certain level. One would not expect that levels : : that progress algorithmically, like the MineStorm levels do, would have a : : mysterious problem at level N. I'm sure the authors tested the game out by : : playing it, and no one had time or inclination to get to as high levels as : : some fanatical players. : The initial point of this thread was that BY NOW you'd think the bug : would get solved. It's not exactly a mystery. Acutally it was about multicarts, but who cares. BTW, what exactly is the "BUG" in Minestorm? I have the US version and the other day decided to play it as long as I could to try to find the bug. The only wierd thing I noticed is that after level 13, when it just finished positioning my ship in the center of the screen, GAME OVER flashed, and the game skipped a level. It kept doing this ever other level or so until I died on level 22. Is this the infamous bug? BTW - What is the HIGH score for that game? Is 630,000 low, moderate, or pretty good? -Jay + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!decwrl!portal.com!uunet!ankh.iia.org!stessej From: stessej@iia.org (Jay) Newsgroups: rec.games.vectrex Subject: General Vectrex Questions... Date: 11 Aug 1994 03:55:42 GMT Organization: International Internet Association. Lines: 20 Distribution: inet Message-ID: <32c7fu$3rc@ankh.iia.org> NNTP-Posting-Host: mary.iia.org X-Newsreader: TIN [version 1.2 PL2] I have three questions for you Vectrex Masters out there: 1. Can you MAKE a Vectrex light pen? If so, how? 2. Will we ever get a hold of the games marked NR(Not Released) in the FAQ? I mean, if they were completed, wouldn't one of the programmers have a copy of it somewhere? 3. Has anyone attempted to program a game or demo for the Vectrex? Or is it just not possible? -Jay -- T / / / / \ \ |stessej@iia.org| -----[Jay Stess#####] R / /___ / /___ \ \ ----------------- / |%%%%%\[Of New Jersey] S /_____/ /_____/ \ \____ ____ | |%%%%%%\[Hockey Playr] O O O O O O O O \_____\ <____> | |%%%%%%%\[6/5/94sig##] + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!elroy.jpl.nasa.gov!lll-winken.llnl.gov!overload.lbl.gov!dog.ee.lbl.gov!news.cs.utah.edu!u.cc.utah.edu!cadehp2.eng.utah.edu!jnichola From: jnichola@cadehp2.eng.utah.edu (jason barkdull) Newsgroups: rec.games.vectrex Subject: Re: Vectrex Doom Date: 11 Aug 1994 14:31:09 GMT Organization: University of Utah College of Engineering Lines: 13 Distribution: inet Message-ID: <32dcnd$bso@u.cc.utah.edu> References: <32bqoo$4mg@nic.umass.edu> NNTP-Posting-Host: cadehp2.eng.utah.edu i've read or seen mentions of this color wheel before and the 3D glasses. Could someone explain how they work? ________ ________ - _ \ / _ - ~ \ _ / ~ the @@ \ jaybird }'}'||\ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!news From: sandhoff@csus.edu (John F Sandhoff) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 11 Aug 1994 18:02:44 GMT Organization: California State University Sacramento Lines: 50 Distribution: inet Message-ID: <32dp44$fs5@news.csus.edu> References: <32c7fu$3rc@ankh.iia.org> NNTP-Posting-Host: syscube.ccs.csus.edu Keywords: light pen, bugs In article <32c7fu$3rc@ankh.iia.org> stessej@iia.org (Jay) writes: > > 1. Can you MAKE a Vectrex light pen? If so, how? > It shouldn't be hard - the circuit is simply a phototransistor backed by a three-transistor waveform shaping circuit. It plugs into the second controller port. Maybe someday the schematics and PC board layout will get posted (gee, my ears are ringing...) > 2. Will we ever get a hold of the games marked NR(Not Released) in the > FAQ? I mean, if they were completed, wouldn't one of the programmers > have a copy of it somewhere? Think about this... First, the original programmer has to still have the game. They have to be aware of this newsgroup and our continuing interest. They have to be willing to give away any future interest in it (and if they contracted with some company, they probably don't own the rights). And if it was never released, perhaps maybe it never worked? Smith Engineering generously released rights to the games they owned; but that doesn't apply to every piece of code ever written for the machine; just the stuff Smith Engineering controlled. > 3. Has anyone attempted to program a game or demo for the Vectrex? Or > is it just not possible? Sure it's possible. In fact, it was done. Mark Woodward's multicart has a fron-end menu selection program that was custom-written. But a comment here: there's been talk of late inquiring why people aren't programming the Vectrex, and why the known bugs haven't been fixed yet. Let's step back into reality here: are *you* willing to construct a prototyping system, and write and debug code for a machine that has dozens and dozens of eager fans, all of which expect you to 1) give it away, and b) support it against the flames of 'hey, I found a bug at level 4,732. Fix it!!!" And as long as I'm on a roll, here's another comment: Those that have read this group for a long time have learned some of the history of the development. This machine was brought to market in the midst of the game wars - either product was delivered, or you died. In the case of the Vectrex, they delivered *and* died... The point is, there were real, solid deadlines involved: "Space Zombies IV ships this Thursday. PERIOD.". So whatever the code looked like Wednesday night, that's what shipped. Period. Bugs be damned - that product HAD to get to market. Well, enough for now... John F. Sandhoff, University Network Support (and keeper of the Archives: ftp://ftp.csus.edu) California State University Sacramento sandhoff@csus.edu + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!well!nigel.msen.com!spool.mu.edu!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex,rec.games.video.classic,rec.games.video.marketplace,rec.games.video.arcade,rec.games.video.misc,alt.games.video.classic,misc.forsale Subject: Re: Massive Vectrex trade off - List available Date: 11 Aug 1994 17:02:47 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 13 Distribution: inet Message-ID: <32dljn$h61@falcon.ccs.uwo.ca> References: <32839t$5kc@falcon.ccs.uwo.ca> NNTP-Posting-Host: asterix.gaul.csd.uwo.ca Xref: csus.edu rec.games.vectrex:2009 rec.games.video.classic:8734 rec.games.video.marketplace:12624 rec.games.video.arcade:41907 rec.games.video.misc:17722 alt.games.video.classic:4707 misc.forsale:127483 This list is now available and has been sent off to everyone that has requested it. If you haven't got it and have requested it, please send me a note and I will resend the list. thanks, john macdonald magundi@Uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!decwrl!murky.apple.com!trib.apple.com!agate!tcsi.tcs.com!mira!keith From: keith@mira.tcs.com (Keith Jarett) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 11 Aug 1994 17:56:53 GMT Organization: Teknekron Communications Inc. Lines: 28 Distribution: inet Message-ID: <32dop5$2jv@tcsi.tcs.com> References: <329cec$gub@news.service.uci.edu> <329j59$kta@sundog.tiac.net> <32c7dn$3rc@ankh.iia.org> NNTP-Posting-Host: mira.tcs.com In article <32c7dn$3rc@ankh.iia.org> stessej@iia.org (Jay) writes: > > Acutally it was about multicarts, but who cares. BTW, what exactly is >the "BUG" in Minestorm? I have the US version and the other day decided >to play it as long as I could to try to find the bug. The only wierd >thing I noticed is that after level 13, when it just finished positioning >my ship in the center of the screen, GAME OVER flashed, and the game >skipped a level. It kept doing this ever other level or so until I died >on level 22. Is this the infamous bug? > I believe that the Level 13 bug is that sometimes when you clear level 13 the machine ends the game and puts you back at level 1 with 0 points. This appears to happen when your shots are in flight and wrapping around an edge of the display when you clear the last mine or fireball. >BTW - What is the HIGH score for that game? Is 630,000 low, moderate, or >pretty good? High score is just over 4 million. At level 89 there is a mine whose successors do not "hatch", thus blocking further progress. keith@tcs.com Keith Jarett + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!lll-winken.llnl.gov!overload.lbl.gov!dog.ee.lbl.gov!agate!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!news.sprintlink.net!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: Vectrex Doom Date: 11 Aug 1994 23:08:37 GMT Organization: The Internet Access Company Lines: 19 Distribution: inet Message-ID: <32eb1l$hkk@sundog.tiac.net> References: <32bqoo$4mg@nic.umass.edu> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Brian Hanechak (Chicopee HS) (hanechak@k12.ucs.umass.edu) wrote: : Of course, the 8k RAM limit might get in the way, but I'm SURE they could : find a way around it :) According to my sources, the cart addressing is not limited by 8K but 32K which is more than enough for vector games (not as much screen overhead as Raster games). In the early 80s RAM/ROM was still expensive so they never made anything beyond 8K games. It's also possible to put RAM on the carts (animaction has it I think) so you could design a "SuperVec cart" as a development standard (if anyone wanted to make new games) with like 24K of ROM and 8K of RAM on board for a total of 12K? RAM and 24K ROM which is more than enough for just about any Vectrex project you can imagine. If you wanted to get into BANKED ROM then the sky is the limit of course. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!lll-winken.llnl.gov!overload.lbl.gov!agate!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!news.sprintlink.net!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: Good Multi-carts? Date: 11 Aug 1994 23:10:29 GMT Organization: The Internet Access Company Lines: 15 Distribution: inet Message-ID: <32eb55$hkk@sundog.tiac.net> References: <319v0o$ltv@ankh.iia.org> <31nu7a$qgb@sundog.tiac.net> <32952a$bp8@news.service.uci.edu> <329bge$he5@sundog.tiac.net> <329cec$gub@news.service.uci.edu> <329j59$kta@sundog.tiac.net> <32c7dn$3rc@ankh.iia.org> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Jay (stessej@iia.org) wrote: : Acutally it was about multicarts, but who cares. BTW, what exactly is : the "BUG" in Minestorm? I have the US version and the other day decided : to play it as long as I could to try to find the bug. The only wierd : thing I noticed is that after level 13, when it just finished positioning : my ship in the center of the screen, GAME OVER flashed, and the game : skipped a level. It kept doing this ever other level or so until I died : on level 22. Is this the infamous bug? I think that the Minestorm but was eventually fixed but since it was internal it's still something you'll see on older units. Minestorm II being the "fix" more like Minestorm Rev. 2 than a sequel. But Berzerk and maybe another supposedly has a lockup bug. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!lll-winken.llnl.gov!overload.lbl.gov!agate!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!usenet.elf.com!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Developing for the Vectrex Date: 12 Aug 1994 01:00:42 GMT Organization: The Internet Access Company Lines: 11 Distribution: inet Message-ID: <32ehjq$ilm@sundog.tiac.net> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Yeah, it's not easy without some form of interface to another machine and later a burner to make carts. Woodward and such could just as easily make new carts rather than multicarts. It could be a combined effort. If there is enough info on the OS and other techniques it's possible to cross assemble some games. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!charnel.ecst.csuchico.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex,rec.games.video.classic,rec.games.video.marketplace,rec.games.video.arcade,rec.games.video.misc,alt.games.video.classic,misc.forsale Subject: Vectrex & cartridges for sale or trade. Date: 12 Aug 1994 04:51:18 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 186 Distribution: inet Message-ID: <32ev46$14v@falcon.ccs.uwo.ca> NNTP-Posting-Host: asterix.gaul.csd.uwo.ca Xref: csus.edu rec.games.vectrex:2014 rec.games.video.classic:8748 rec.games.video.marketplace:12642 rec.games.video.arcade:41940 rec.games.video.misc:17730 alt.games.video.classic:4709 misc.forsale:127606 Massive Vectrex Trade List ( well maybe not that massive ) August 12 1994 First, what I don't have. I do have any 3-D stuff or Light Pen stuff that I am willing to part with. Unless you have $1000 burning a hole in your pocket. What I do have. Several Vectrex, extra controllers. Armor..Attack, Berzerk, Blitz, Cosmic Chasm, Hyperchase, Scramble, Solar Quest, Star Trek, Spike, WebWars, Star Hawk. finger magundi@asterix.gaul.csd.uwo.ca to see updated list +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I have a couple of Vectrex for sale. Each is in good working condition, has a good working joystick and has the MineStorm Overlay They do not come with MineStorm manual, Original box, or Vectrex manual. $150 Since I don't have boxes, minestorm or vectrex manuals for either of the vectrex I am selling them separately. Vectrex box $10 Not in perfect shape. Missing flap or two Minestorm $5 Excellent shape Vectrex manuals $5 Excellent shape Extra controller $40 Both are in excellent condition. Extra controller $40 Repaired controller $25 Assuming I can fix it. Missing or damaged vinyl label ( from taking it apart ) Cartridges Cartridge package #1 Armor Attack,Berzerk,Blitz!,Clean Sweep,Cosmic Chasm,Hyperchase,Scramble Solar Quest,Star Trek. Each cartridge includes the original box, overlay, in good-fair condition. The boxes are in excellent shape, except some moron has wrapped 1/2" tape once around the boxes. With the right solvent it might come off prefectly without ripping the boxes. No manuals for any of the games. $100 New, unused cartridges. Complete with manuals, overlays, boxes. Everything in mint condition. Armor..Attack $15 Berzerk $12 Blitz! $12 Cosmic Chasm $12 Clean Sweep $15 Hyperchase $20 Scramble $12 Star Trek $15 Used cartridges Armor Attack $8 overlay Armor Attack $10 overlay, manual Berzerk $8 overlay, manual Blitz! $6 overlay, manual Cosmic Chasm $6 overlay, manual Hyperchase $8 overlay, manual Solar Quest $8 cartridge only Solar Quest $12 overlay, manual Star Trek $8 overlay Spike $15 cartridge only Star Hawk $30 Box ( slight tear in flap ), overlay, manual There is a possibility that I may have the following available Bedlam box damaged, overlay, manual Space Wars maybe complete or just cartridge Flipper Pinball cartridge only +++++++++++++++++++++++++++++++++++++++++++++++++ Details, details. This is not an auction. I will not accept offers higher than on the list. I may accept offers less. Payment must be made in advance in the form of a Money Order. US Postal money order is preferred, bank money orders acceptable. Shipping $20 for each Vectrex. no extra cost for shipping cartridges with a vectrex (20 is for anywhere in Canada or the US ) Cartridges 1-2 $5 3+ $6 All vectrex items will be sent Canada Post insured. It is not possible to send things COD to the States from Canada. ++++++++++++++++++++++++++++++++++++++++++++++ Trade information I would prefer trades, but to avoid the auction crap, the first cash offer for equipment at my asking price will get it. Offers of trade or less cash than my asking price I will think about. I am interested in trades of most kinds. Mostly computer/electronics equipment. I am not interested in computer games in general, or other video game systems, especially older systems. If you are interested in trading please indicate what you want to trade for what. An approximiate value of the items you are offering as trades would be greatly appreciated. Things that I am interested in. SouthWestern Bell Freedom Phone ( Model FT383 ) Need 2-3. Pentax Super Program camera. CD Player ( ghetto, diskman type or car ) SCSI CD-ROM SCSI hard drives. Mac Hardware SE/30 Motherboards MAC II 68040 accelerator 1024x768 75Hz Video card NuBus or SE/30 Nubus card and monitor Simm's. 1Mx8/9 4Mx8/9 100ns or 120ns Last couple of times I have bought slow simm's I have paid $10-12 /meg. If you are interested in trading simm's for equipment, I will expect 1M of simm's for every $10-$12 of my asking price for equipment. ( example 1 vectrex I would trade for around 15 1 meg simm's ) Faster simm's. Make offer Other Mac/IBM hardware. Amiga hardware ( A1200 would be nice. :-) I am currently looking for the following vectrex stuff: Space Wars box in perfect condition Star Castle overlay Heads Up Soccer everything Flipper Pinball box, overlay in perfect condition Star Ship everything Melody Master box in perfect condition Web Warp box ( not web wars ) 3D Narrow box 3D Crazy manual, box 3D minestorm manual, box, cart 3D imager box Polar Rescue everything Multi cartridges Joystick box in perfect condition john macdonald magundi@uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csulb.edu!library.ucla.edu!agate!ames!news.Hawaii.Edu!uhunix.uhcc.Hawaii.Edu!jperez From: jperez@uhunix.uhcc.Hawaii.Edu (John Perez) Subject: Vectrex 3-D Goggles Wanted Message-ID: Sender: news@news.Hawaii.Edu Organization: University of Hawaii X-Newsreader: TIN [version 1.2 PL2] Date: Sat, 13 Aug 1994 11:45:23 GMT Lines: 11 If there is anyone out there who has the Vectrex 3-D goggles and wouln't mind parting with them, please send me e-mail. I've never actually seen them or anything but I have always wished I could find a pair. I don't know what they are worth so name your price and I'll check my pockets. Hardware available for trade if you so desire (what are you looking for?) The Borg jperez@uhunix.uhcc.hawaii.edu President - Atari Computer Enthusiasts of Hawaii (ACE-HI) Mega STE - STacy - Portfolio -- Lynx - Jaguar - 400 - 800 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!library.ucla.edu!europa.eng.gtefsd.com!emory!swrinde!pipex!sunic!trane.uninett.no!eunet.no!nuug!EU.net!uunet!news.delphi.com!usenet From: robbwoldman@delphi.com Newsgroups: rec.games.vectrex Subject: Looking to buy Space War, Star Castle Date: Sun, 14 Aug 94 13:57:23 -0500 Organization: Delphi (info@delphi.com email, 800-695-4005 voice) Lines: 7 Distribution: inet Message-ID: NNTP-Posting-Host: bos1c.delphi.com Hi! If you have it, I want it. E-Mail me with your price and I'll work out arrangements with you... Thanx in advance! Robb Woldman RobbWoldman@Delphi.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!gatech!asuvax!chnews!ornews.intel.com!news.jf.intel.com!news.jf.intel.com!brianh From: brianh@pdx031.intel.com (Brian Holscher) Newsgroups: rec.games.vectrex Subject: Sega Controllers with Vectrex (updated post) Date: 14 Aug 1994 22:13:39 GMT Organization: Intel Corp., Hillsboro, Oregon Lines: 405 Distribution: world Message-ID: NNTP-Posting-Host: pdx031.intel.com I made some minor changes including fixing a mistake on one of the schematics. I am also offering converted Sega Genesis controllers without the microcontroller for $30. If I can get enough people to order adaptors, I can get circuit boards made and reduce the price to $35. So if you are thinking of ordering an adaptor, let me know ASAP so I can decide if it worth having circuit boards made. I saw a posting about making overlays for Vectrex. If somebody will make up a set for me, I'll trade a controller or an adaptor for them. This post including schematics is copyright 1994 by Brian Holscher. This information is free for distribution as long as its not used for commercial purposes. Using Sega Genesis Controllers with Vectrex (Revision 3.0) This Posting explains: 1. How to convert a Sega Genesis Controller to work with Vectrex. 1. How to make a Sega Genesis Controller to Vectrex Adaptor. 2. Where to purchase a converted Sega Genesis Controller. 3. Where to purchase a Sega to Vectrex controller adapter. BACKGROUND Since my Vectrex controller is flaky, I bought a cheap Sega Controller and converted it to work on the Vectrex. From there I added some nice features like autofire and re-programmable buttons. I decided to post schematics for those who want to make Vectrex controllers. After talking with others on the net, I decided to build a Sega to Vectrex adapter. This is a little harder than converting controllers, but I got one to work. This posting includes info and schematics for both. For those who don't want the hassle of making your own controllers, I'm offering converted controllers and adapters for sale. I'm also offering a preprogrammed micro-controller for sale. LIMITATIONS The Sega Genesis Controller is a digital controller. The Vectrex joystick is an analog controller. Games like Minestorm don't look at the analog values of the joystick and only look to see what direction the joystick is moved. Games like Minestorm work with these converted Sega Genesis Controllers. Games like HyperChase look at how far the joystick moves in a direction and are not fun to play with these converted controllers. All (known) games work with these converted controllers and adaptors with 2 exceptions. Hyperchase (all game variations) and Starhawk (game variation #2 only) are completely unplayable due to the need for analog controller data. Thanks to Gregg Woodcock for this info. FEATURES This design incorporates a micro-controller for additional functionality. The micro-controller allows the user to program which Sega Controller button maps to which Vectrex button. This is useful since the 4th button (called Start) on the Sega Genesis Controller is a smaller and inconveniently located since it is normally reserved for starting games on Sega systems. The micro-controller even allows reprogramming of the button assignments in the middle of a game. Another feature is auto-fire. Any button can be set to auto-fire. This means that the micro-controller presses the button over and over again instead of the player. CONTROLLERS VRS ADAPTERS Adapters give you the advantage of using any Sega Genesis Controller with Vectrex and still be able to use it on the Sega system. If you don't have a Sega Genesis Controller, a converted controller is less cost than an adaptor plus the cost of a Sega Genesis Controller. Another slight advantage is that the LED thats informs the user during button reprogramming and auto-fire is easier to see on a converted controller. The micro-controller is optional if you are converting your own Sega Genesis Controller. However, the micro-controller is required for the adapter. BUYING CONVERTED CONTROLLERS If your don't want to convert a controller or make an adapter yourself, you can purchase them from me. You can also purchase a preprogrammed micro-controller from me. Source Code for Micro-controller ---------- Free if you ask nicely. Preprogrammed Micro-controller ----------- $15 (The includes Xtal and Xtal capacitors) Converted Sega Genesis Controller -------- $45 Converted Sega Genesis Controller -------- $30 ( No microcontroller ) Sega to Vectrex Adaptor ---------------- $45 Shipping is included. Send email to brianh@ichips.intel.com and we will work out the details. DOING IT YOURSELF First the Disclaimer. I am not responsible for: 1. Any damage done to your Vectrex. 2. Any damage done to the Sega Genesis Controller. 3. Any errors in these instructions. I'm not going to give step by step instructions. I'm going to assume that the reader has some basic knowledge of electronics and can figure out what to do with the schematics and info presented here. I will, however, answer questions if asked. Now that I covered my backside, here is how to do it yourself: CONVERTING A Sega Genesis Controller The micro-controller is optional. If you don't care about button re-programmability or auto-fire, then just connect the button to the connector pins as shown. Parts List: 1 PIC16C54-LP Microcontroller - Optional 1 32.768 Khz Crystal - Optional 2 15pf Capacitor - Optional 4 3.3K Resistor 4 10K Resistor 1 470 Resistor Schematic: Direction Control: +5V (Pin 7) ^ | 10K .__|__/\/\/\/\___. | | Right Button -| 3.3K | | ._____/\/\/\/\___| | | |-------- X Direction 3.3K | (Pin 5) ._____/\/\/\/\___| | | Left Button -| | | ._____/\/\/\/\___| | 10K | -5V (Pin 9) +5V (Pin 7) ^ | 10K .__|__/\/\/\/\___. | | Up Button -| 3.3K | | ._____/\/\/\/\___| | | |-------- Y Direction 3.3K | (Pin 6) ._____/\/\/\/\___| | | Down Button -| | | ._____/\/\/\/\___| | 10K | -5V (Pin 9) Button Schematic if not using microcontroller Same for Button B,C, and Start except: Button B -> Pin 3 .__________ (Pin 2) Button C -> Pin 4 | Button Start -> Pin 1 Button A -| | .___ | | GND (Pin 8) Button Schematic if using a microcontroller. 5V (Pin 7) ^ | > Same for Button B,C, and Start > 47K except: > Button B -> PIC 12 .__|_______ (Pic 13) Button C -> PIC 11 | Button Start -> PIC 10 Button A -| | .___ 47K not critical. | Anything from 1K to 100K | should work. The controller GND (Pin 8) should already have something connected. Micro-controller Option: +5V (Pin 7) ^ _______ | 15 pF 16 | | 14 |---------| |---||---------|-----| |-----| | | Xtal | | | | 4 | < | 32.768 kHz | | | |-----| < 470 Ohms | | | 15 | | < |---||---------|-----| P | 1 | | 15 pF | I |--------|<-----| | 5 | C | LED |--------------------| 1 | GND (Pin 8) | 6 | 13 | C | 6 from Button A ---------| 5 |----- Pin 1 12 | 4 | 7 from Button B ---------| - |----- Pin 2 11 | L | 8 from Button C ---------| P |----- Pin 3 10 | | 9 from Button Start -----| |----- Pin 4 |_______| Notes: 1. Pins listed are those of the 9 pin connector. 2. I personally used a controller made by QuickShot since it was only $12.87 at K-mart. I've seen ones made by Sega for about $15. Depending upon which brand and type, the might be minor differences between these instructions and your controller. 3. On the Sega circuit board, you will need to remove the IC, pull-up resistors for directions. If you are not using a microcontroller, remove the pull-up resistors for the buttons. Otherwise leave the pull-up resistors for the buttons. 4. Normally, pressing the direction pad on a Sega Genesis Controller grounds that direction input. You will need to cut traces on the Sega circuit board to isolate the UP and RIGHT ground from the the LEFT and DOWN ground. You will also need to isolate these two grounds from the button ground. This is because instead of grounding UP and RIGHT, you will need to connect it to 5V. Also, instead of grounding LEFT and DOWN, you will need to connect it to -5V. 5. Thanks to David Vanderbyl for his suggestion of using 3.3K resistors instead of a pots. MAKING AN ADAPTOR An adaptor allows a Sega Genesis Controller to be used without modification with the Vectrex. A micro-controller is used to decode the output of the Sega Genesis Controller. Sega multiplexes LEFT, RIGHT, and the buttons on only 4 lines. Since the Vectrex needs negative voltage for Left and Down, two Optoisolators are used to switch the negative voltage. Parts List: 1 PIC16C54-LP Microcontroller 2 NTE3084 Photo-Darlington Optoisolator 2 3906 PNP Transistor 1 32.768 Khz Crystal 6 1K Resistor 2 2.2K Resistor 4 10K Resistor 1 470 Resistor 2 15pf Capacitor 1 9 pin Male Subminiature D connector 1 9 pin Female Subminiature D Connector Schematic: Direction Control: +5V (Vectrex 7) ^ | 10K __|___/\/\/\/\___. 1K | / | Right from PIC __/\/\/\/\___|V PNP | |\ 3906 2.2K | |______/\/\/\/\___| | +5V | ^ | | |------- X Direction < 1K | (Vectrex 5) < 1K | < 1 ._______. 5 ._/\/\/\/\___| |___| |___| | | NTE | | Left from PIC _________| 3084 |___. 10K | 2 |_______| 4 |__/\/\/\/\__| | | | -5V (Vectrex 9) +5V (Vectrex 7) ^ | 10K __|___/\/\/\/\___. 1K | / | Up from Sega ___/\/\/\/\___|V PNP | (Sega 1) |\ 3906 2.2K | |______/\/\/\/\___| | +5V | ^ | | |------- Y Direction < 1K | (Vectrex 6) < 1K | < 1 ._______. 5 ._/\/\/\/\___| |___| |___| | | NTE | | Down from Sega ________| 3084 |___. 10K | (Sega 2) 2 |_______| 4 |__/\/\/\/\__| | | | +5V -5V (Vectrex 9) ^ | Sega 5 ___| Sega 8 ___ Gnd Micro-controller: +5V (Vectrex 7) ^ _______ | 15 pF 16 | | 14 |---------| |---||---------|-----| |-----| | | Xtal | | | | 4 | < | 32.768 kHz | | | |-----| < 470 Ohms | | | 15 | | < |---||---------|-----| | 18 | | 15 pF | |--------|<-----| | 5 | P | LED |--------------------| I | 1 GND (Vectrex 8) | C |------- Left Output | 1 | Sega 17 | 6 | 2 Select -------| C |------- Right Output (Sega 7) | 5 | | 4 | 13 | - | 6 Sega 9 ------------| L |----- Vectrex 1 12 | P | 7 Sega 6 ------------| |----- Vectrex 2 11 | | 8 Sega 4 ------------| |----- Vectrex 3 10 | | 9 Sega 3 ------------| |----- Vectrex 4 |_______| Notes: 1. Pins listed as Sega refer to the 9 pin male connector that the Sega Controller plugs into. Pins listed as Vectrex refer to the 9 pin female connector that plugs in the Vectrex. 2. Any Photo-Darlington Output Optoisolator should work. Digi-Key 4N31IS-ND will work. You can also get two optoisolators in one package. Thats all. Enjoy! Brian Holscher brianh@ichips.intel.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!europa.eng.gtefsd.com!swiss.ans.net!newstf01.cr1.aol.com!search01.news.aol.com!not-for-mail From: jschappert@aol.com (JSchappert) Newsgroups: rec.games.vectrex Subject: Re: [Vectrex] HW and SW for auction! Date: 16 Aug 1994 01:12:07 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 9 Sender: news@search01.news.aol.com Distribution: inet Message-ID: <32phr7$f0e@search01.news.aol.com> References: <2sou4g$pjb@ns1.unicomp.net> NNTP-Posting-Host: search01.news.aol.com In article <2sou4g$pjb@ns1.unicomp.net>, woodcock@ns1.unicomp.net (Gregg Woodcock) writes: Is there any Vectrex h/w or s/w still left? Let me know, I'm currently a cart. developer and have fond memories of the Vectrex (as well as one myself w/18 games). -- John + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!lll-winken.llnl.gov!overload.lbl.gov!agate!howland.reston.ans.net!europa.eng.gtefsd.com!swiss.ans.net!newstf01.cr1.aol.com!search01.news.aol.com!not-for-mail From: jschappert@aol.com (JSchappert) Newsgroups: rec.games.vectrex Subject: Re: Vectrex cartridges for sale or trade Date: 16 Aug 1994 01:15:02 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 9 Sender: news@search01.news.aol.com Distribution: inet Message-ID: <32pi0m$f23@search01.news.aol.com> References: <2t9re3$hm9@falcon.ccs.uwo.ca> NNTP-Posting-Host: search01.news.aol.com In article <2t9re3$hm9@falcon.ccs.uwo.ca>, magundi@gaul.csd.uwo.ca (john macdonald) writes: Do you have any Vectrex stuff left? I'm a Nintendo developer and have fond memories of the Vectrex (as well as one myself, lacking some games). -- John + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!wupost!ukma!usenet From: paul@acus1.cc.uky.edu (paul linton) Newsgroups: rec.games.vectrex Subject: Overlays - creating them, a request for higher resolution Date: 16 Aug 1994 14:14:37 GMT Organization: University of Kentucky Lines: 15 Distribution: usa Message-ID: <32qhkd$gc4@s.ms.uky.edu> NNTP-Posting-Host: acus1.cc.uky.edu I grabbed the overlays off the ftp site and noticed they were 72dpi. I went ahead and "created" one with less than positive results. Is there anyone with access to a scanner that would be willing to scan me say Scramble at 300dpi? This would create a 15M file, uncompressed....but thats fine with me. I'd be willing to send someone a copy of what I can get to print out. Thanks, Paul -- Paul Linton paul@acus1.cc.uky.edu UofK Computing Center plinton@ukcc.uky.edu (606) 257-5295 paul@ukpr.uky.edu + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!sol.ctr.columbia.edu!news.kei.com!hookup!news.umbc.edu!haven.umd.edu!umd5.umd.edu!jjarray.umd.edu!fcawth From: fcawth@jjarray.umd.edu (Fred Cawthorne) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 17 Aug 1994 13:02:20 GMT Organization: Center for Superconductivity Research - Univ. of Maryland Lines: 41 Distribution: inet Message-ID: <32t1os$jnb@umd5.umd.edu> References: <32dp44$fs5@news.csus.edu> NNTP-Posting-Host: jjarray.umd.edu X-Newsreader: Tin 1.1 PL4 : : Smith Engineering generously released rights to the games they owned; : but that doesn't apply to every piece of code ever written for the : machine; just the stuff Smith Engineering controlled. : Have they released any source code??? : But a comment here: there's been talk of late inquiring why people aren't : programming the Vectrex, and why the known bugs haven't been fixed yet. : Let's step back into reality here: are *you* willing to construct a : prototyping system, and write and debug code for a machine that has : dozens and dozens of eager fans, all of which expect you to 1) give it : away, and b) support it against the flames of 'hey, I found a bug at : level 4,732. Fix it!!!" A prototyping system would be the easy part. A 6811 8K ram and a few tri-state buffers should do the trick. The problem is that you have to learn about the hardware stuff without much documentation. Granted, we could develop some of our own routines for graphics, sound, etc... It would be really nice to see the source for some of the games. Cross-compiling wouldn't be that bad either. There's 6809 assemblers around for just about every platform. We could even use gcc, although that would probably not be fast enough code. I guess someone could sit down and write up a hardware doc. with detailed programming information about how to do stuff, and then we would have a nice starting point. I'll see if I can whip up a development system if someone else can do the above. The simplest thing would be a card with a serial port, that you unplug, program, and plug in to the vectrex to try out your program. If you add 3 more buffer chips, you could leave it plugged in. I guess one could also use a dual ported ram, but 8k ones are pretty expensive if I remember right. Something like the xmodem protocol should fit into the 512 bytes of internal eeprom on the 6811. Or, we could just send in motorola HEX records that most compilers generate. The total cost would be under $40 or so... With the 6811, you don't even need an eprom programmer to program it for something like this. Well, enough rambling for now... How many people are interested in messing with this sort of thing?? Fred. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!cs.utexas.edu!chpc.utexas.edu!news.utdallas.edu!corpgate!crchh327.bnr.ca!woodcock From: woodcock@bnr.ca (Gregg Woodcock) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 17 Aug 1994 13:30:55 GMT Organization: Bell-Northern Research; Richardson, Texas, USA Lines: 17 Distribution: inet Message-ID: <32t3ef$d2g@crchh327.bnr.ca> References: <32dp44$fs5@news.csus.edu> <32t1os$jnb@umd5.umd.edu> Reply-To: woodcock@unicomp.net (Gregg Woodcock) NNTP-Posting-Host: crchh75b.bnr.ca X-Newsreader: TIN [version 1.2 PL2] Fred Cawthorne (fcawth@jjarray.umd.edu) wrote: > : > : Smith Engineering generously released rights to the games they owned; > : but that doesn't apply to every piece of code ever written for the > : machine; just the stuff Smith Engineering controlled. > : > Have they released any source code??? No and they probably won't. The release was fairly specific; *ONLY* unmodified object code. I guess that would mean that if anybody did patch Berzerk that it would still be a violation of the copyright... -- THANX...Gregg day 214.684.7380 night UNLIST/PUBL TEXAS NOT CANADA! woodcock@bnr.ca or woodcock@nt.com or bn202@cleveland.freenet.edu *CLASSIC VIDEOGAME COLLECTOR BUY/SELL/TRADE PRE-NINTENDO (ARCADE/HOME)* "If you quote me on this I'll have to deny it; I won't remember because I have such a bad memory. Not only that, but my memory is *terrible*." + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!howland.reston.ans.net!vixen.cso.uiuc.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!cis.ksu.edu!mac From: mac@cis.ksu.edu (Myron A. Calhoun) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 17 Aug 94 18:36:40 GMT Organization: Kansas State University Lines: 82 Distribution: world Message-ID: References: <32dp44$fs5@news.csus.edu> <32t1os$jnb@umd5.umd.edu> <32t3ef$d2g@crchh327.bnr.ca> NNTP-Posting-Host: depot.cis.ksu.edu X-Newsreader: NN version 6.5.0 #5 (NOV) woodcock@bnr.ca (Gregg Woodcock) writes: >Fred Cawthorne (fcawth@jjarray.umd.edu) wrote: >> : >> : Smith Engineering generously released rights to the games they owned; >> : but that doesn't apply to every piece of code ever written for the >> : machine; just the stuff Smith Engineering controlled. >> : >> Have they released any source code??? >No and they probably won't. The release was fairly specific; *ONLY* >unmodified object code. I guess that would mean that if anybody did >patch Berzerk that it would still be a violation of the copyright... Maybe it's time to post Smith engineering's letter again: ------------ cut here ------------ cut here ------------ cut here ------------ Smith Engineering 12057 Jefferson Boulevard Culver City, CA 90230 (310) 821-7880 FAX (310) 306-1739 October 27, 1992 Dr. Myron A. Calhoun Associate Professor of Computer Science 2001 Dunbar Road Manhattan, KS 66502-3907 Dear Dr. Calhoun: I recently received a copy of your letter of September 14th to Milton Bradley regarding the Vectrex Arcade System. I am proud to say that Smith Engineering is the original developer of the Vectrex system and programmed a number of the original cartridges. The rights to the system have been returned to us after production ceased at the Milton Bradley Company. It is a great pleasure to hear from a group of dedicated Vectrex users. Obviously, it is a great favorite of ours and has a significant place in our Hall of Fame of toy and game products. We are happy to grant you the right to continue your personal hobby of using and enhancing the game system, as long as it is for your personal use and not a commercial enterprise; in fact, we would be anxious to see your improvements. This permission extends to the right to copy and distribute the instruction booklets and service manuals, and to duplicate and/or create game ROM's for your personal use. When the opportunity arises, please send us a ROM sample of your work. At some point in the future I would be happy to discuss the history of Vectrex and some of the stillborn ideas to further enhance the system. At one time we had considered a color version and there were even plans for a handheld version. Unfortunately, neither came to fruition. I look forward to hearing of your progress. Sincerely yours, [signature of Jay Smith] Jay Smith /df cc: Ms. Eileen Mooney Hasbro,Inc., Legal Department ------------ cut here ------------ cut here ------------ cut here ------------ The only restriction I see is that "you" can do anything "you" want as long as it is for "your" personal use and not a commercial enterprise. Since the letter specifically referred to a "group", I interpret "you" and "your" as "we" and "our". The only hint of "only unmodified object code" I can detect might be in the words "duplicate and/or create game ROM's", but "duplicating" a game ROM and then "creating" some new stuff for it would seem to be within the granted permissions. --Myron. -- # Five boxes preserve our freedoms: soap, ballot, jury, witness, and cartridge. # Myron A. Calhoun, PhD EE; Assoc. Prof. (913) 532-6350 work, 532-7353 fax # Amateur packet radio: W0PBV@N0ARY.#NOCAL.CA.USA.NOAM 539-4448 home # NRA Life Member and Certified Instructor (Home Firearm Safety, Rifle, Pistol) + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!att-out!nntpa!gw1.att.com!news.bu.edu!olivea!nntp.msstate.edu!gatech!howland.reston.ans.net!torn!newshost.uwo.ca!gateway!mail From: john macdonald Newsgroups: rec.games.vectrex Subject: Vectrex cartridges for sale or trade. Date: 17 Aug 1994 23:09:14 GMT Organization: The University of Western Ontario, London, Ont. Canada Lines: 13 Distribution: inet Message-ID: <9408172306.AA03572@gaul.csd.uwo.ca> NNTP-Posting-Host: julian.uwo.ca X-Date: Wed, 17 Aug 94 19:06:47 -0400 Originator: daemon@julian.uwo.ca I still have a Vectrex and some cartridges left. Unfortuneately my mail is not working at the moment, so if you have sent mail to me in the last day or so and I have answered it, I probably didn't get it. Hopefully tomorrow I will be able to receive e-mail again. The host computer I am using was replaced and there are bugs that have to be worked out. john macdonald magundi@Uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!news.kei.com!news.byu.edu!cwis.isu.edu!u.cc.utah.edu!xmission!xmission!not-for-mail From: insanitr@xmission.com (Insanitor) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 17 Aug 1994 17:15:00 -0600 Organization: XMission Public Access Internet (801-539-0900) Lines: 15 Distribution: inet Message-ID: <32u5lk$fuj@xmission.xmission.com> References: <32dp44$fs5@news.csus.edu> <32t1os$jnb@umd5.umd.edu> <32t3ef$d2g@crchh327.bnr.ca> NNTP-Posting-Host: xmission X-Newsreader: TIN [version 1.2 PL2] Gregg Woodcock (woodcock@bnr.ca) wrote: : No and they probably won't. The release was fairly specific; *ONLY* : unmodified object code. I guess that would mean that if anybody did : patch Berzerk that it would still be a violation of the copyright... How do I go about programming my Vectrex? I've never tried it before, and I thought Vectrex was pretty dead. But I saw this newsgroup, and remembered my trusty Vectrex, and decided to check it out... Is there a special machine I need to attach, or what? -- ,-----------------------,-------------------------------------------------, | iNSANITOR [OgreHorn] | Don't drink and park, accidents cause people. | | insanitr@xmission.com | | `-----------------------'-------------------------------------[Anonymous]-' + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!howland.reston.ans.net!europa.eng.gtefsd.com!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 18 Aug 1994 00:56:51 GMT Organization: The Internet Access Company Lines: 17 Distribution: world Message-ID: <32ubkj$63i@sundog.tiac.net> References: <32dp44$fs5@news.csus.edu> <32t1os$jnb@umd5.umd.edu> <32t3ef$d2g@crchh327.bnr.ca> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Myron A. Calhoun (mac@cis.ksu.edu) wrote: : The only restriction I see is that "you" can do anything "you" want as : long as it is for "your" personal use and not a commercial enterprise. : Since the letter specifically referred to a "group", I interpret "you" : and "your" as "we" and "our". The only hint of "only unmodified object : code" I can detect might be in the words "duplicate and/or create game : ROM's", but "duplicating" a game ROM and then "creating" some new stuff : for it would seem to be within the granted permissions. Yeah, patching berzerk would seem legal to me as long as it's all no-profit. Same for new games. If all one is conerned with is FIXING a bug, it would seem ludicrous to try to prevent people from doing what they should have done years ago. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!decwrl!ames!agate!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!spstimes.sps.mot.com!mogate!newsgate!seneca!jeffh From: jeffh@oakhill-csic.sps.mot.com (Jeff Hunsinger) Subject: Re: General Vectrex Questions... Message-ID: <1994Aug18.134934.4002@newsgate.sps.mot.com> Sender: news@newsgate.sps.mot.com Nntp-Posting-Host: seneca.sps.mot.com Reply-To: jeffh@oakhill-csic.sps.mot.com Organization: Motorola Semiconductor Products Sector References: <32t1os$jnb@umd5.umd.edu> Date: Thu, 18 Aug 1994 13:49:34 GMT Lines: 10 You are going into a little overkill with the dual ported RAM and HC11. Just use an EPROM emulator. You can buy one starting at about $100 or build your own for $20-$30. Use your computer to write and assemble your code, then dump it to the emulator. My emulator is messed at the moment, so I haven't been able to use it with my Vectrex yet. I did use it to create autostarting cartridges for the C64, though. Jeff + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!EU.net!sun4nl!ruuinf!ruu.nl!zeist From: zeist@serc.nl (Bob van Zeist) Subject: Bought Vectrex, games for trade... Message-ID: <1994Aug18.140804.3561@cc.ruu.nl> Sender: usenet@cc.ruu.nl Organization: Software Engineering Research Centre - Netherlands X-Newsreader: TIN [version 1.2 PL2] Date: Thu, 18 Aug 1994 14:08:04 GMT Lines: 37 Ok, I finally found one! Just bought a Vectrex! After placing an add I only got _1_ offer! This is what I bought: - the Vectrex, of course. - the joystick panel - the following games: 1) Fortress of Nazord 2) Rip Off 3) Cosmis Chasm 4) Clean Sweep - an overlay of Berzerk All items are used quite a lot, but everything still functions perfectly. This is what I'm still missing/was hoping to buy: - the overlays of the games I bought - boxes, manuals original packings etc. - the games: 1) Bedlam (Is it any good, or is there another Tempest clone?) 2) Scramble I paid, with current rates, about $ 65,- for it. Some questions for r.g.v. readers: Q1) Was this a good buy? Q2) Anyone in for a game trade? Anyone got a spare Bedlam or Scramble (or on an EPROM)? Greetings! -- ============================================================================== Bob van Zeist | SERC (Software Engineering Research Centre) E-mail: zeist@serc.nl | P.O. Box 424, 3500 AK Utrecht, The Netherlands WWW : http://www.serc.nl | TEL: +31-30-545412, FAX: +31-30-545948 ============================================================================== + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!spool.mu.edu!torn!nott!bnrgate!corpgate!crchh327.bnr.ca!woodcock From: woodcock@bnr.ca (Gregg Woodcock) Newsgroups: rec.games.vectrex Subject: Vectrex for sale Date: 18 Aug 1994 14:18:43 GMT Organization: Bell-Northern Research; Richardson, Texas, USA Lines: 17 Distribution: inet Message-ID: <32vqk3$5fp@crchh327.bnr.ca> Reply-To: art.chan@onlinesys.com NNTP-Posting-Host: crchh75b.bnr.ca X-Newsreader: TIN [version 1.2 PL2] Thought you guys might be interested; DO NOT EMAIL ME!!! [ Article crossposted from rec.games.video.marketplace ] [ Author was Art Chan ] [ Posted on Wed, 17 Aug 94 19:20:44 -0500 ] I have a Vectrex for sale. It's in good condition with the built in game Minestorm and 1 controller. E-mail me with your offer at art.chan@onlinesys.com -- THANX...Gregg day 214.684.7380 night UNLIST/PUBL TEXAS NOT CANADA! woodcock@bnr.ca or woodcock@nt.com or bn202@cleveland.freenet.edu *CLASSIC VIDEOGAME COLLECTOR BUY/SELL/TRADE PRE-NINTENDO (ARCADE/HOME)* "If you quote me on this I'll have to deny it; I won't remember because I have such a bad memory. Not only that, but my memory is *terrible*." + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!umd5.umd.edu!jjarray.umd.edu!fcawth From: fcawth@jjarray.umd.edu (Fred Cawthorne) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 18 Aug 1994 14:53:37 GMT Organization: Center for Superconductivity Research - Univ. of Maryland Lines: 40 Distribution: inet Message-ID: <32vslh$ki3@umd5.umd.edu> References: <1994Aug18.134934.4002@newsgate.sps.mot.com> NNTP-Posting-Host: jjarray.umd.edu X-Newsreader: Tin 1.1 PL4 jeffh@oakhill-csic.sps.mot.com (Jeff Hunsinger) writes: : You are going into a little overkill with the dual ported RAM and HC11. Just use : an EPROM emulator. You can buy one starting at about $100 or build your own for : $20-$30. Use your computer to write and assemble your code, then dump it to the : emulator. My emulator is messed at the moment, so I haven't been able to use it : with my Vectrex yet. I did use it to create autostarting cartridges for the C64, : though. : : Jeff : That's exactly what I am saying I will build... HC11=$12 ram=$4 board=$10 or so... Cheap, right?? The reason I like 6811 is that you can program it with a serial port, and you can use its serial port to program the ram from the PC. You do need some sort of buffers to isolate the 6811 from the ram so the vectrex can use it though. I do have an eprom programmer, but that's much more of a pain for development, since you have to erase the thing each time, plug it in, etc... I used to do it that way, but now I use a monitor rom in a 6811 to dump the program to ram, then put it in eprom once it is reasonably stable. Anyway, I guess one could go and buy a programmer (maybe that's what you meant...) instead. It would be nice, though, if the thing required no extra hardware for the pc, so people could do development on any computer they want using the same hardware. (All you need is a cross compiler and a serial port) The development process would be something like: 1. Write your code. 2. Assemble on your unix workstation, pc, mac, hp calculator, or whatever... 3. Turn on vectrex... Mine storm comes up... 4. go to another window where a terminal program is running. 5. send over the hex records your assembler generated. 6. push reset on the vectrex, your program is now running. 7. find your next bug 8. turn off vectrex 9. goto 1 Anyway, like I said, that's the easy part. The hard part is writing programs for hardware we really don't know how to use. Suggestions/comments?? Anybody want to REALLY write vectrex programs??? (If it is just me, I'll shut up, because I don't want to deal with it alone) Fred. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gateway!mail From: john macdonald Newsgroups: rec.games.vectrex Subject: Vectrex for sale or trade. Date: 18 Aug 1994 15:31:19 GMT Organization: The University of Western Ontario, London, Ont. Canada Lines: 7 Distribution: inet Message-ID: <9408181528.AA11399@gaul.csd.uwo.ca> NNTP-Posting-Host: julian.uwo.ca X-Date: Thu, 18 Aug 94 11:28:49 -0400 Originator: daemon@julian.uwo.ca My account is back up. Sorry for an inconvience this may have caused anyone. john macdonald magundi@uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!decwrl!pa.dec.com!src.dec.com!crl.dec.com!crl.dec.com!bloom-beacon.mit.edu!usenet.elf.com!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: italics Date: 18 Aug 1994 23:17:58 GMT Organization: The Internet Access Company Lines: 9 Distribution: inet Message-ID: <330q76$8pi@sundog.tiac.net> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] My Vectrex has slight italics and some humming during Minestorm. It isn't that bad, though. I suppose it isn't supposed to do this. The italics are only slightly noticeable as such, and the humming is like RF interference. It's acceptable. The game rocks. I can't get beyond level 3 right now... + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!decwrl!parc!barrnet.net!agate!dog.ee.lbl.gov!news.cs.utah.edu!u.cc.utah.edu!xmission!xmission!not-for-mail From: insanitr@xmission.com (Insanitor) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 18 Aug 1994 20:11:15 -0600 Organization: XMission Public Access Internet (801-539-0900) Lines: 14 Distribution: inet Message-ID: <3314c3$3i9@xmission.xmission.com> References: <1994Aug18.134934.4002@newsgate.sps.mot.com> <32vslh$ki3@umd5.umd.edu> NNTP-Posting-Host: xmission X-Newsreader: TIN [version 1.2 PL2] Fred Cawthorne (fcawth@jjarray.umd.edu) wrote: : Anyway, like I said, that's the easy part. The hard part is writing programs : for hardware we really don't know how to use. : Suggestions/comments?? Anybody want to REALLY write vectrex programs??? : (If it is just me, I'll shut up, because I don't want to deal with it alone) I sure do.. Vectrex rocks.. What language do you use to program a Vectrex? Assembler? -- ,-----------------------,-------------------------------------------------, | iNSANITOR [OgreHorn] | Don't drink and park, accidents cause people. | | insanitr@xmission.com | | `-----------------------'-------------------------------------[Anonymous]-' + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!portal.com!portal!cup.portal.com!jharris From: jharris@cup.portal.com (John D Harris) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Message-ID: <120308@cup.portal.com> Date: Fri, 19 Aug 94 00:35:25 PDT Organization: The Portal System (TM) Distribution: world References: <32dp44$fs5@news.csus.edu> <32t1os$jnb@umd5.umd.edu> <32t3ef$d2g@crchh327.bnr.ca> <32ubkj$63i@sundog.tiac.net> Lines: 13 I think that the materials available from csus.edu are definitely complete enough to learn Vectrex programming. They even include diagrams for different types of development hardware. I even have a 6809 cross assembler, but the critical piece I am missing is a 6809 Disassembler. If anyone can help me out here, please let me know. I definitely would love to clean up bugs and joystick control improvements in several existing games. It's really disappointing how many of the games could have made great use of the Vectrex's analog stick, but process it just like a digital. Even simple things like craft rotation could be really nice if it were analog based. John Harris - jharris@cup.portal.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!elroy.jpl.nasa.gov!sdd.hp.com!hp-pcd!hpcvusn!hpcvlx!fred From: fred@hpcvlx (Fred Taft) Subject: 6809 Disassembler Message-ID: <1994Aug19.160048.328@hpcvusn.cv.hp.com> Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999) Nntp-Posting-Host: hpcvlx.cv.hp.com Organization: Hewlett-Packard Company, Corvallis, Oregon USA X-Newsreader: Tin 1.1 PL5 Date: Fri, 19 Aug 1994 16:00:48 GMT Lines: 40 Funny ... I never realized there was still so much interest in the Vectrex! I bought one when they first became available, and my kids are still having a great time with it. Since I just today stumbled onto this news group, can someone point me to the FAQ? Also, is there an archive anywhere of past postings? I'd like to catch up on what's been said. When I first got my Vectrex, I spent Thanksgiving weekend writing a disassembler for the 6809. I then dumped the contents of several of the games (including the built-in OS/minestorm rom), and ran them through the disassembler; worked like a champ! Then I began the task of interpreting what I saw. I actually succeeded in reverse engineering the following games: Art Master Mine Storm Star Castle OS and utilities Memory map of OS and Mine Storm usage I even went so far as building a plug-in card for my HP Integral Computer, which also attached to the Vectrex. I could compile my tests on the Integral, download the bits to the card, and then turn on the Vectrex; worked great! The assembler I was using I picked up for free off of the net, and it had a few bugs. Unfortunately, none of this stuff has been touched for probably 8 years. What is the extent of knowledge regarding other games? Has anyone attempted to reverse engineer them? If so, is this information available? Has anyone made an attempt to develop new games? I can make the information I have available if anyone is interested; I just need to track it down, and then make sure the disassembler still works. If interested, drop me an email message, and when I get the cycles to track it all down, I'll pass it along. Thanks to anyone who can point me to the FAQ. Fred Taft fred@hp-pcd.cv.hp.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!nic-nac.CSU.net!gopher.sdsc.edu!news.tc.cornell.edu!travelers.mail.cornell.edu!news.kei.com!eff!news.umbc.edu!europa.eng.gtefsd.com!howland.reston.ans.net!swrinde!ihnp4.ucsd.edu!news.service.uci.edu!cafws2.eng.uci.edu!dan From: dan@cafws2.eng.uci.edu (Dan Harkless) Newsgroups: rec.games.vectrex Subject: Re: 6809 Disassembler Date: 19 Aug 1994 20:15:19 GMT Organization: University of California, Irvine Lines: 17 Distribution: inet Message-ID: <3333sn$kvt@news.service.uci.edu> References: <1994Aug19.160048.328@hpcvusn.cv.hp.com> NNTP-Posting-Host: cafws2.eng.uci.edu Fred Taft writes: >I actually succeeded in reverse engineering the following games: > > Art Master > Mine Storm > Star Castle > OS and utilities > Memory map of OS and Mine Storm usage Glad to hear about your successes, Fred. What does "reverse engineering" mean in this context, though? ------------------------------------------------------------------------------ | Dan Harkless | "The sore in my soul | | dan@cafws1.eng.uci.edu | The mark in my heart -> Front 242, | | dharkles@bonnie.ics.uci.edu | Her acid reign..." Tragedy >For You< | ------------------------------------------------------------------------------ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!wupost!psuvax1!news.pop.psu.edu!news.cac.psu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!ceylon!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... Date: 19 Aug 1994 23:16:34 GMT Organization: The Internet Access Company Lines: 29 Distribution: inet Message-ID: <333egi$krf@sundog.tiac.net> References: <1994Aug18.134934.4002@newsgate.sps.mot.com> <32vslh$ki3@umd5.umd.edu> <3314c3$3i9@xmission.xmission.com> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] Insanitor (insanitr@xmission.com) wrote: : I sure do.. Vectrex rocks.. What language do you use to program a : Vectrex? Assembler? Any language you want as long as it winds up as ML in the end. That's pretty much common sense don't you think? The vectrex has a 32K ROM address space so you could theoretically use a more memory-hogging language like C and get away with it but if you program for the standard 4K or 8K that the old games used you'd probably not have enough space to be able to work with C or Pascal or anything. Essentially, since the Vectrex has its own OS routines to draw on, assembly is best because you'd simply poke into the OS routines to get most things done. A high-level C for the Vectrex would merely be making this process more readable but would simply be doing the same thing with probably more overhead involved. Another problem is the fact that the Vextrex has only 2K of RAM (I think) which means careful use of memory, reusing that RAM window carefully, etc... Computer programs usually reside in RAM so its a very different process developing in RAM from developing in ROM (with scratchpad RAM). However, if you made (as I've discussed) a special cartridge with a mixture of RAM and ROM you could make things easier. For instance, 24K ROM and 8K RAM. That would make 10K RAM total and 24K ROM which is more comfortable to work in and would require less hassle. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!wupost!crcnis1.unl.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!newstf01.cr1.aol.com!search01.news.aol.com!not-for-mail From: mouser2387@aol.com (MOUSEr2387) Newsgroups: rec.games.vectrex Subject: VECTREX WANTED Date: 20 Aug 1994 14:21:09 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 7 Sender: news@search01.news.aol.com Distribution: inet Message-ID: <335hil$3ej@search01.news.aol.com> NNTP-Posting-Host: search01.news.aol.com I am looking for a Vectrex system and a game. Please E-mail me if you have an extra for sale. Just so you know in avance, I only have $50.00 to spend. Michael + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!decwrl!hookup!news.kei.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!psgrain!nntp.cs.ubc.ca!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex,rec.games.video.classic,rec.games.video.marketplace,rec.games.video.arcade,rec.games.video.misc,alt.games.video.classic,misc.forsale Subject: Vectrex cartridges and stuff wanted. Date: 20 Aug 1994 22:12:46 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 37 Distribution: inet Message-ID: <335v4u$oil@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca Xref: csus.edu rec.games.vectrex:2039 rec.games.video.classic:8919 rec.games.video.marketplace:12878 rec.games.video.arcade:42317 rec.games.video.misc:17815 alt.games.video.classic:4753 misc.forsale:129064 I am currently looking for the following vectrex stuff I need complete ( cartridge, overlay, manual, box ) Heads up Soccer Polar Rescue I need bits and pieces. Star Castle overlay Melody Master box in perfect condition Web Warp box ( not web wars ) 3D Narrow box 3D Crazy manual, box 3D minestorm manual, box, cart 3D imager box Multi-cartridges. I have some vectrex cartridges for trade against the above vectrex stuff. I also have a vectrex or two that I would trade for all of the above in perfect condition. Finger magundi@gaul.csd.uwo.ca for list of stuff I have for sale or trade. john macdonald magundi@uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!decwrl!hookup!europa.eng.gtefsd.com!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex,rec.games.video.classic,rec.games.video.marketplace,rec.games.video.arcade,rec.games.video.misc,alt.games.video.classic,misc.forsale Subject: Vectrex carts needed: Polar Rescue, Heads-up, 3d Minestorm. Date: 20 Aug 1994 22:15:17 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 19 Distribution: inet Message-ID: <335v9l$ouf@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca Xref: csus.edu rec.games.vectrex:2040 rec.games.video.classic:8920 rec.games.video.marketplace:12879 rec.games.video.arcade:42318 rec.games.video.misc:17816 alt.games.video.classic:4754 misc.forsale:129066 I am looking for Polar Rescue complete, Headsup complete 3d Minestorm, Cartridge, box, manual. If you have these and are willing to sell or trade them, please let me know thanks, john macdonald magundi@uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!library.ucla.edu!europa.eng.gtefsd.com!ulowell!cs.uml.edu!rbarbaga From: rbarbaga@cs.uml.edu (Ralph Barbagallo) Newsgroups: rec.games.vectrex Subject: Extra Star Trek Date: 21 Aug 1994 06:10:20 GMT Organization: UMass-Lowell Computer Science Lines: 24 Distribution: inet Message-ID: <336r4c$r6p@ulowell.uml.edu> NNTP-Posting-Host: cs.uml.edu Hey, I picked up an extra copy of Star Trek today at a flea market (what a day, I found Spike, Solar Quest, Star Castle, Armor..Attack, Star Trek, and Cosmic Chasm all for $1 each!) So, I'm looking to trade it for a game I don't have... or I'd also maybe trade it for a stack of overlays or something. Anyway, how do you play Solar Quest? I notice that if you pick up too many of those little stars left behind after an enemy ship has been destroyed you die. Why? What are those things? And what's the object of the game? It seems that you just fly around blasting stuff. Also, what's the deal with Cosmic Chasm. Do you have to clear ALL of those caves before you can blow up the big generator thingie in the center of the map. Spike is really cool. Speech, and a great-looking angled perspective on the playing field. I have yet to see a platform game like it. (granted, it's a bit simplistic...but it's a nice looking game) And, Star Castle is WAY too hard. It's a bit harder than the arcade version, I think. -- Ralph A. Barbagallo III --- rbarbaga@cs.uml.edu --- Only AMIGA makes it Possible... R.I.P. Jay Miner: June 20th 1994 Father of the 2600, Atari 8bit, Amiga -=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex From: Colin@colb.demon.co.uk (Colin Bailey) Path: csus.edu!wupost!udel!news.sprintlink.net!demon!colb.demon.co.uk!Colin Subject: wanted:vectrex games Organization: Myorganisation Reply-To: Colin@colb.demon.co.uk X-Newsreader: Demon Internet Simple News v1.29 Lines: 13 Date: Sat, 20 Aug 1994 10:09:31 +0000 Message-ID: <777377371snz@colb.demon.co.uk> Sender: usenet@demon.co.uk Anybody in the UK (or world infact) with vectrex games to sell I have, cosic chasm (yeuck) scramble and minestorm of course!!! any tempest like ones would be esp. cool any of any genre basically! -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =- Colin Bailey -=-=- Beer, PCs, Bikes, gifs, jpgs -= -= Colin@colb.demon.co.uk -=-=- more beer, a SNES, some Simpsons =- =- THE UK, ENGLAND!!! -=-=- figures, and a video, or something.. -= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!wupost!udel!news.sprintlink.net!sundog.tiac.net!max.tiac.net!krishna From: krishna@max.tiac.net (Glenn M. Saunders) Newsgroups: rec.games.vectrex Subject: Re: Extra Star Trek Date: 21 Aug 1994 15:15:04 GMT Organization: The Internet Access Company Lines: 4 Distribution: inet Message-ID: <337r1o$djq@sundog.tiac.net> References: <336r4c$r6p@ulowell.uml.edu> NNTP-Posting-Host: max.tiac.net X-Newsreader: TIN [version 1.2 PL2] My fading memory tells me that Star Castle used a horizontally opposed monitor. This makes it a little easier to visualize I think. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!spool.mu.edu!mnemosyne.cs.du.edu!nyx10.cs.du.edu!not-for-mail From: dgraham@nyx10.cs.du.edu (Doug Graham) Newsgroups: rec.games.vectrex Subject: Vectrex for sale Date: 21 Aug 1994 18:06:49 -0600 Organization: University of Denver, Math/CS Dept. Lines: 11 Distribution: inet Message-ID: <338q6p$ks0@nyx10.cs.du.edu> NNTP-Posting-Host: nyx10.cs.du.edu Keywords: Vectrex console Vectrex console with controller and built in Minestorm game. Everything is in good condition. Email offers to: graham@intellicorp.com -- Doug s + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!wupost!udel!news.sprintlink.net!redstone.interpath.net!mercury!heavyd From: heavyd@mercury.interpath.net (Darren Hensel) Newsgroups: rec.games.vectrex Subject: Tailgunner? Date: 22 Aug 1994 01:50:55 GMT Organization: Interpath -- An Internet access provider Lines: 11 Distribution: inet Message-ID: <33909v$bda@redstone.interpath.net> NNTP-Posting-Host: mercury.interpath.net X-Newsreader: TIN [version 1.2 PL2] Was Tailgunner ever released? Man, did that one ever eat the quarters...so long, long ago. Another thing, did Omega Race ever get released, this is a topic of a very,very long argument. I say no, but I have heard rumors to the contrary. Anybody? Darren I pulled the Vec out just this morning. Mine Storm really was good huh? + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!uop!pacbell.com!ames!agate!spool.mu.edu!sdd.hp.com!hp-pcd!hpcvusn!hpcvlx!fred From: fred@hpcvlx (Fred Taft) Subject: 6809 Disassembler Message-ID: <1994Aug22.145416.29290@hpcvusn.cv.hp.com> Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999) Nntp-Posting-Host: hpcvlx.cv.hp.com Organization: Hewlett-Packard Company, Corvallis, Oregon USA X-Newsreader: Tin 1.1 PL5 Date: Mon, 22 Aug 1994 14:54:16 GMT Lines: 42 Dan, By 'reverse engineering' I meant that I downloaded the cartridge into a file, ran it through my disassembler, and then using: 1) my knowledge of the entry points in the built-in ROM, 2) my knowledge of how the game was supposed to run I determined what the code was doing, and added comments. It was sort of like putting a jigsaw puzzle together :-) The goal was to understand how the games worked, and to learn what utilities were available in the built-in ROM. Here is an example: /* Update the position of all active bullets. */ 0137 BDF2A9 P0137: jsr $intensity_to_7F; 013A 8EC9C8 ldx #0xC9C8; /* Address of bullet buffer. */ 013D E600 P013D: ldb 0,x; /* Check if bullet is active. */ 013F 274F beq P0190; /* Bullet is inactive, so skip. */ 0141 2A26 bpl P0169; /* Bullet is exploding. */ 0143 6A09 dec 9,x; /* Decrement life span, and continue */ 0145 2747 beq P018E; /* only if bullet is still 'alive'. */ 0147 EC05 ldd 5,x; /* Get original y position. */ 0149 1E89 exg a,b; 014B E301 addd 1,x; /* Add the delta to it. */ 014D 1E89 exg a,b; 014F ED05 std 5,x; /* Update bullet's y position. */ 0151 EC07 ldd 7,x; /* Get original x position. */ 0153 E303 addd 3,x; /* Add the delta to it. */ 0155 ED07 std 7,x; /* Update bullet's x position. */ 0157 3410 pshs x; 0159 3006 leax 6,x; /* Draw a dot at the bullet's new */ 015B 867F lda #0x7F; /* position. */ 015D 9704 sta 0x04; 015F BDF2C1 jsr $dotix; 0162 BDF354 jsr $reset0ref; Hope this help! Fred + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!library.ucla.edu!europa.eng.gtefsd.com!uhog.mit.edu!news.mtholyoke.edu!news.amherst.edu!news.umass.edu!nic.umass.edu!k12.ucs.umass.edu!hanechak From: hanechak@k12.ucs.umass.edu (Brian Hanechak (Chicopee HS)) Newsgroups: rec.games.vectrex Subject: Looking for 3d games Date: 22 Aug 1994 16:35:28 GMT Organization: University of Massachusetts K-12 Outreach Lines: 10 Distribution: inet Message-ID: <33ak4g$nn3@nic.umass.edu> NNTP-Posting-Host: k12.ucs.umass.edu X-Newsreader: TIN [version 1.2 PL2] I have a 3d imager and the manual to 3d Narrow Escape, and BOTH color wheels, but I don't have any 3d games. Does anyone have any they would like to trade/sell? I have a Star Trek complete package and a Scramble cart-only for trade. Also, I'm looking for a few other games: Space War, Spinball/Flipper Pinball, Pole Position, Starhawk -- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!dog.ee.lbl.gov!agate!howland.reston.ans.net!EU.net!Germany.EU.net!news.dfn.de!news.belwue.de!dakeeper!reutter From: reutter@dakeeper.igd.fhg.de (H.J.-L.Reutter) Newsgroups: rec.games.vectrex Subject: Need pinouts of the Vectrex - Thanks! Date: 22 Aug 1994 17:10:01 GMT Organization: Haus der Graphischen Datenverarbeitung, 64283 Darmstadt, Germany Lines: 15 Sender: reutter@dakeeper (H.J.-L.Reutter) Distribution: world Message-ID: <33am59$qej@news.belwue.de> Reply-To: reutter@igd.fhg.de NNTP-Posting-Host: dakeeper.igd.fhg.de I got the pinout file from the archive but what I miss is a drawing of the VEctrex cart port that goes along with it. Something like: first pin [===============] last pin SO how does the pinout look? Where are the Data-lines, where are the address lines? Any help would be greatly appreciated! Thanks! Jean-Luc -- H.J.-L.Reutter,reutter@igd.fhg.de,ZGDV,Wilhelminenstrasse7,Darmstadt,64283 Germany,@work+49(0)6151/155-205,CybrRoach@IRC,hreutte@andy.bgsu.edu(UseAtO wnRisk),goforthandliveasartthebeatlesfascistbastardsgotohellillusionsthedo orintosummerbowlinggreenstateuniversitytrekstuffaimeemanngroundsforthought + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!sdd.hp.com!spool.mu.edu!howland.reston.ans.net!paladin.american.edu!zombie.ncsc.mil!news.duke.edu!solaris.cc.vt.edu!uunet!ankh.iia.org!stessej From: stessej@iia.org (Jay) Newsgroups: rec.games.vectrex Subject: Creating a Light Pen... Date: 22 Aug 1994 18:18:29 GMT Organization: International Internet Association. Lines: 10 Distribution: inet Message-ID: <33aq5l$qlc@ankh.iia.org> NNTP-Posting-Host: iia.org X-Newsreader: TIN [version 1.2 PL2] Is it possible to make a Vectrex light pen? The FAQ says it's possible but never gets into details. Has anyone done this? -- T / / / / \ \ |stessej@iia.org| -----[Jay Stess#####] R / /___ / /___ \ \ ----------------- / |%%%%%\[Of New Jersey] S /_____/ /_____/ \ \____ ____ | |%%%%%%\[Hockey Playr] O O O O O O O O \_____\ <____> | |%%%%%%%\[6/5/94sig##] + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!galaxy.ucr.edu!library.ucla.edu!europa.eng.gtefsd.com!ulowell!cs.uml.edu!rbarbaga From: rbarbaga@cs.uml.edu (Ralph Barbagallo) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 22 Aug 1994 21:57:58 GMT Organization: UMass-Lowell Computer Science Lines: 11 Distribution: inet Message-ID: <33b716$jkg@ulowell.uml.edu> References: <33ak4g$nn3@nic.umass.edu> NNTP-Posting-Host: cs.uml.edu Can anyone tell me how the Vectrex 3D Imager works? Everyone mentions these colorwheels, but what are they for? If it doesn't use shutters, and you can't use the filtered color lenses...what does it use? Polarized light? -- Ralph A. Barbagallo III --- rbarbaga@cs.uml.edu --- Only AMIGA makes it Possible... R.I.P. Jay Miner: June 20th 1994 Father of the 2600, Atari 8bit, Amiga -=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!netcom.com!eduard From: eduard@netcom.com (Eduard Marghidan) Subject: Vectrex with 8 cartridges for sale Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] Date: Tue, 23 Aug 1994 05:34:22 GMT Lines: 9 I'm posting this for a friend. She has a Vectrex system with joystick and 8 cartridges + screens. It's in good condition, make an offer via e-mail only. Eduard -- /******************************************** * Eduard Marghidan 88 * eduard@netcom.com 88 *******************************************/ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!elroy.jpl.nasa.gov!ames!decwrl!svc.portal.com!portal!cup.portal.com!jharris From: jharris@cup.portal.com (John D Harris) Newsgroups: rec.games.vectrex Subject: Re: 6809 Disassembler Message-ID: <120594@cup.portal.com> Date: Mon, 22 Aug 94 23:21:14 PDT Organization: The Portal System (TM) References: <1994Aug19.160048.328@hpcvusn.cv.hp.com> Lines: 686 Enclosed, find the Vectrex FAQ. I am thrilled to hear that you may have the 6809 disassembler I have been looking for. I would also be interested in obtaining the MineStorm commented disassembly. I want to work on its joystick control routines. Thanks, John Harris - jharris@cup.portal.com +-----------+ |Vectrex====| | +-------+ | Vectrex "Frequently Asked Questions" List! Created: 9/1/92 | | # + *| | version 2.0 Copyright worldwide (c) 1994 | | : X | | Created and maintained by Gregg Woodcock (woodcock@bnr.ca) | | : . .| | | | A <=>| | This list will be reposted on the first day of every month. | | . | | | | X + | | @@@ | | * x | | @@ @@@ | +-------+ @@@ +---@----+ | ### # Q@@ / ! oooo / | ### OO | +--------+ +-----------+ This file is copyrighted (c) 1994 by Gregg Woodcock but may be distributed in part or in whole by anyone for any purpose (commercial or otherwise) provided proper credit is given to me and the individual contributors. If you do use the FAQ, I would appreciate it if you send me a copy of whatever you are doing with it. My plan is to have a 'newbie' part and a 'techie' part. I still need some more information about the following questions for it: Can a pause switch be built? (YES) Can the overlays be reproduced (MAYBE) Can a 3D color disk be made? (MAYBE; I am going to try with "shrinky-dinks" ) How do the control panels work and can one be built? (YES) How does the light pen work and can one be built? (YES) How does the 3D imager work and can a Sega imager be converted? (MAYBE) =============================================================================== = Q. What is Vectrex? Here it is in layman's terms: Vectrex is one of the most inspired video game machines ever produced (but similar things were said about the Edsel and Titanic). Its point of distinction is the fact that it uses vector "line" graphics (as opposed to raster "pixel" graphics). This is the same type of screen used in such arcade classics as Space Wars, Asteroids, Battlezone and Tempest. The machine has a 9 x 11 inch black and white screen and comes with a built-in Asteroids clone called Minestorm. The games come with plastic overlays that slide over the screen to cut down on flicker and give some illusion of color. It uses one of the most advanced 8 bit processors, the 68A09 (6809 with 1.5MHz clock speed), and a popular and excellent sound chip, General Instruments AY-3-8192, which can produce a wide range of noises. Also included is a 1.5 inch, self-centering, joystick with 4 buttons on the right. It uses an analog/potentiometer system allowing differing degrees of directional input. The machine's footprint takes up a little less than a square foot of a desk (in fact, it quite resembles a jet black Macintosh SE sans mouse and keyboard), and can be operated easily in that area. The joystick is connected via a springy telephone-like cord and can be folded into the base of the machine for portability. The machine is moderately transportable and very well constructed but, alas, very much extinct. It made its debut late in 1982 and was quite scarce by the end of 1984 due to the Great Video Game Depression of '82 which forced Milton Bradley (who bought the rights to the Vectrex from General Consumer Electronics (GCE)) to discontinue production due to to poor sales. After this, the rights to the Vectrex and all related materials were returned to the original developers, Smith Engineering. Smith Engineering has graciously condoned the not-for-profit circulation of any duplicatable materials including games and manuals and is happy to see it is still 'alive' in certain circles. Here are some more detailed snippets from the service manual: As a general description, the HP3OOO is a self-contained video game system intended for home use. The system includes its own 9" B&W monitor screen and 3" permanent magnet speaker. Plug-in ROM type cartridges are available offering arcade type video and sound game play. No external TV receiver hookup is needed or provided for. A front panel storable controller allows control over the game via joystick and push button action switches. For two player operation a second controller identical to the single player controller is available as an accessory product. Both controllers attach to the main game console through nine wire coiled telephone style cables. There is a consumer power switch/volume control on the front panel as well as a game reset button. A consumer adjustable brightness control is located on the main console rear housing. For the technical description which follows, the reader is encouraged to refer to the block diagram and schematic [not included here]. The HP3OOO is a microprocessor based, vector scan system using a standard 9" black & white CRT as its video display device. The microprocessor (MPU) is the Motorola 68A09 device. The MPU operates at 1.6 MHz from a 6 MHz external Xtal. An internal divide by 4 circuit generates the MPU 1.6 MHz "E" clock signal used in the system. Program memory is stored in the 8K x 8 bit 2363 type ROM. This ROM contains common subroutines, the "executive" or assembler instructions plus one complete game. Two 1K x 4 bit 2114 type static RAMS provide storage locations for data indicative of locations of objects, game status, and various other information needed by the microprocessor during game operation. Peripheral Interface Adaptor (PIA) Chip, has two 8 bit peripheral ports which interfaces the MPU with peripheral devices and external signals. One of the PIA ports interfaces the General Instrument AY-3-8912 sound-I.O. chip with the MPU and also drives the digital to analog converter chip MC1408. The other PIA port is used as control lines for the sound chip, selector control for the multiplex chip and as a means to read the A/D comparator that's used in the joystick successive approximation circuitry. Sound is either MPU generated directly or by use of the AY-3-8912 sound chip. The AY-3-8912 sound chip is a programmable sound generator containing 3 tone generators and wave shaping circuitry. This chip also has a single 8 bit I.O. port used to read the status of each of the hand controller's 4 action switches. The standard TTL device types 74LS00 and 74LS32 are used as control line decoders to allow the MPU to select the appropriate circuit element to be addressed at any particular time. The analog processing section includes digital to analog converter (DAC) chip type MC1408, dual 4 channel multiplexer/demultiplexer chip type CD4052, and dual channel op-amps types LF353 and LF347. DAC chip MC1408 receives an 8 bit word at data terminals D0-D7. DAC output (pin 4) is current source. One section of IC LF353 is used to change this current to a voltage representative of the 8 bit digital word received by the DAC chip. The LF353 voltage is applied to an input of the dual 4 channel multiplexer (MUX) chip CD4052. This same voltage (designated "DAC" on the schematic) is the X-axis drive signal. The CD4052 MUX chip serves two purposes: it selectively couples, under MPU control, the output of the DAC current/voltage converter to one of 4 places and is used to selectively couple the inputs from the joystick pots to the voltage comparator IC LF353. =============================================================================== = Q. What games were released or on the drawing board before Vectrex died? Production # Name (Notes) [Size or NR=Not Released] ------------ ---------------------------------------------------------- VT 3000 Minestorm (built-in game; Asteroids clone) [4K] VT 3101 Cosmic Chasm (1st home game ported to arcade) [4K] VT 3102 Rip Off (Cinematronics arcade port) [4K] VT 3103 Scramble (Konami arcade port) [4K] VT 3104 Solar Quest (Cinematronics arcade port) [4K] VT 3105 Space Wars (Cinematronics arcade port) [4K] VT 3106 Starhawk (Cinematronics arcade port) [4K] VT 3107 Star Trek (AKA Star Ship in Europe) [4K] VT 3108 Web Wars (AKA Web Warp in ?????) (best game?) [8K] VT 3109 Star Castle (Cinematronics arcade port) [4K] VT 3201 Hyperchase (very bad driving game) [4K] VT 3202 Blitz! Action Football [8K] VT 3203 Heads-Up Action Soccer (AKA Soccer in Europe) [8K] VT 3204 Spinball (AKA Flipper in Europe) (has PAUSE!) [8K] VT 3205 Pitcher's Duel -OR- Batter Up Action Baseball [NR] VT 3206 Pole Position (Atari/Namco arcade port) [8K] VT 3301 Armor Attack (Cinematronics arcade port) [4K] VT 3302 Berzerk (Stern arcade port; high levels crash)[4K] VT 3303 Clean Sweep (PacMan clone) [4K] VT 3304 Fortress of Narzod (great shooter) [8K] VT 3305 Bedlam (Tempest clone) [4K] VT 3306 Spike (It talks! Originally called Buster?) [8K] VT 3307 Dark Tower (does anybody have this?) [??] VT 3308 Polar Rescue (Good subhunt game) (has PAUSE!) [8K] VT 3600 Light Pen (Hardware; required for 360X games) VT 3601 Art Master (light pen) (pack-in game) [4K] VT 3602 Melody Master (light pen) [8K] VT 3603 Mail Plane (light pen) (completed???) [NR] VT 3604 Animaction (light pen) [8K+2K RAM] VT 3630 3-D Imager (Hardware; required for 363X games) VT 3631 3-D Pole Position (3-D) (completed?) [NR] VT 3632 3D Minestorm (3-D) (pack-in game) [8K] VT 3633 Narrow Escape (3-D) (same color disk as CC) [8K] VT 3634 Crazy Coaster (3-D) (same color disk as NE) [8K] VT ???? Test Cartridge (issued to repair centers only)[??] The following games and accessories were planned but never released: Cartridges: Art Master II Art Master III Art Master IV Basic Science Create-A-Game/Maze Exploring the Solar System Flipout Mail Plane Pitcher's Duel Pole Position (for 3D imager) Power Trip Sock It Tour de France Accessories: Touch-Sensitive Screen Computer Adaptor with BASIC (prototypes rumored to exist) Computer Keyboard Printer Disk Driver/Wafer Tape Drive Modem Computer Software: Create Your Own Video Game Music Maestro Art Program in LOGO Basic Science Solar System Word Processing =============================================================================== = Q. Where is the Vectrex ftp archive and what is there? The ftp Vectrex information archive is at ftp.csus.edu (130.86.90.1) and is maintained by John F. Sandhoff (sandhoff@csus.edu). There are binary listings (2 flavors; pure binary from the ROMs, and Intel "S-format" dumps) for most of the games along with instructions on how to burn Eproms. There are several commented examples of code demonstrating how to write both music and graphics. There is also a copy of the service manual and much more. Almost all of the stuff is bundled into a compressed file called "vectrex.tar.Z". There are plenty of experiments to keep an eager hacker busy. Recently, some GIF/JPEG files were added showing some of the screen overlays (there are also GIFs of the 2 color wheels). Also, text files of the manuals for most, if not all, of the games are there. David Wright (davewt@NCoast.ORG) will be putting the vectrex stuff up his email server. If you don't have FTP access, this may work for you. If you want to try and get at it, the email server is at "impinfo@Prism1.COM". If your site doesn't like that, try "prism1!impinfo@NCoast.ORG". To receive a list of the files available place "send vect.index" in the message body. You can also add "send help" to get a complete set of instructions. Be aware that some of these files are huge and may push you over your mailbox or disk space quota immediately. =============================================================================== = Q. Isn't copying the games by burning EPROMs stealing or violating a copyright? If the system is "dead" then no money is lost by making copies of something which otherwise would never be available. Even so, it is a fuzzy matter and technically the answer should probably be, "YES." Fortunately, Smith Engineering has given Usenetters permission to make copies of all Vectrex related materials (manuals, games, overlays, etc.) as long as it is for distribution to members of the group and as long as it is not for profit. =============================================================================== = Q. Do I have to make my own multi-cart; can't I just buy one from somebody? No; I mean, Yes, err... There are at least 5 people making multi-carts for resale on the net but the best ones (by far) are being made by Mark Woodward (woodward@Newbridge.com). If you do not have email, you can reach him by phone at 613/591-3600 during the day time (EDT zone).. He is making multi-carts which don't require an old cart to be cannibalized since he is getting PCBs made up for the job. His carts allow you to select the games via a menu on the Vectrex screen instead of by flipping dip switches as all the others do. The carts support the RAM for Animaction and include a 'pause' button allowing you to pause any of the games (my idea; thank you :). They contain all the released games plus the Test Cart and 2 hacked versions of Minestorm (infinite lives and more shots). The price breakdown is as follows... $30 PCB + S/W selection $20 EPROM (unless you can send me one) $5 RAM (Optional) If he builds it for you then there is $5 charge for miscellaneous parts and you are obligated donate $10 to a local charity to cover his time. This is in the spirit of the Smith Engineering agreement for 'not-for-profit' duplication. The only 'profit' he get is from the s/w selection code which he deserves and is entitled to because he wrote (owns) it. The games have been generously donated Smith Engineering and the parts are sold at cost (with a little to cover shipping). To 1 complete, ready-to-play multicart costs $60. The PCBs are made at a professional manufacturer and include plated through holes, etc. No hack and slash job here :> If you want to build it yourself he can provide you with the PCB, a programmed EPROM (or disk if you can blast your own) and a parts list. =============================================================================== = Q. How do I play ? Simple, read the manual. WHAT; you don't have a manual? OK then, read the screen overlay (it lists the functions of all the buttons). You don't have the screen overlay either? In that case most (maybe all by now) of the manuals have been transcribed into text files and made available via ftp. YOU DON'T HAVE FTP EITHER? OK, I'll tell you what; in the spirit of Smith Engineering's generosity, I will volunteer my services as Vectrex copy shop. I have all of the overlays and manuals (as well as some extra stuff like the service manual, "Passport" magazine, the "Triton" and "Passport" catalog pamphlets, and the "High Performance Machine" pamphlet) and am willing to make copies for free to anybody that is willing to play by my "rules". You must send a Self-Addressed, Stamped Envelope (SASE) along with a listing of everything that you want photocopies of (black and white copies only; if you want color overlay copies, send $2.50 for each one since color copies cost $$$). You will receive double sided copies unless you specifically request single sided ones. I will fill the orders only about once a month so don't hold your breath for a quick return. Please note that these will not be replicas in any particular sense. I will be copying them as you would a book (I WILL NOT REMOVE THE STAPLES TO REPLICATE THE SHEETS TO FACILITATE MAKING EXACT DUPLICATES). If you want exact duplicates, you will need to modify the copies I send you (I am trying to keep my effort to a minimum). If I need to fold something to fit it in your SASE, then I will, so keep that in mind if you want unfolded stuff. The amount of postage is left up to you to figure out; I am just going to copy, stuff, and send; I will not verify sufficient postage. Tips are appreciated (particularly if you are asking for a *lot* of copying) but not neccesary nor required; this is a free service. Send SASE to: Gregg Woodcock 2930 Dukeswood Drive Garland, TX 75040-8770 U.S.A P.S. If you take advantage of either of these services, it would be nice if you would "pay the community back" by transcribing at least one document that is not currently at the ftp site and uploading it (or emailing it to me and I will get it there). I am pretty sure none of the "extra" stuff I have has been transcribed yet. P.P.S. If you have an original service manual, please contact me so I can get an copy of it (or buy it from you). The copy I have is Nth generation and is very hard to read... =============================================================================== = Q. How can I make a copy of a screen overlay? With the advances made in the past 2 years in color scanners, copiers and priners, it is now possible to make a near exact duplicate with the push of a (few) button(s). 0. First you need an original overlay, prefereably one with little fading. 1. If you want a "rough" copy, simply get a good high end color photocopy onto acetate (those overhead projector plastic sheets). 2. If you want a better copy, you scan the image, preferably in color. I think 150 dpi is okay though some people may want to go for maximum resolution. 3. Then you need a good paint program, I used Adobe Photoshop to do some preliminary clean-up work, but I have a feeling it would take quite a bit of work to make a perfect overlay. 4. Prining--the critical part. You need a color printer that can do acetate (animation cel) printouts. Unfortunately, no color printer can work on thick sheets, which brings us to 5. 5. You need go to to a hobby shop and get a piece of .045 thick clear sheet of [poly]styrene. Its prtty cheap. 6. The only part I haven't worked out, bonding the acetate overlay to the styrene. It is probable that there are some mucho expensive color printers that professional print shops use that can print onto any thickness sheets but I haven't done much looking. Thanks to Noel for this info. =============================================================================== = Q. My Vectrex is very noisy; is there anything I can do to make it any quieter? Here is what Daniel A Muntz (dmuntz@quip.eecs.umich.edu) said helped him: The noise isn't digital in nature and it closely follows the video. It also isn't a power supply problem; isolating the audio input of the amplifier from the sound circuit revealed no noise at all. It seems the noise is generated in two ways: 1: By induction; Moving the audio cable around makes the noise less or more prominent. It is at minimum when the cable is placed in its original manufactured groove. Good design since that's farthest from the CRT yoke. 2: By ground impedance; Although all supplies are clean the hum is still present in the modulated dc difference between the two boards. A definite improvement can be achieved by doing the following: 1: Rewiring the ground between the digital and video board. 2: Shielding audio circuit and changing cable to volume pot to a better shielded one. =============================================================================== = Q. My joystick wont auto-center anymore; can I fix it? You can't make it "good-as-new", but you can repair it so that is is usable again. You must first mangle the sticker on the back of the joystick to get at the 2 screws that hold it together. Just feel around and you should be able to see where the holes are. You can either try to peel back the sticker (very bad idea) or simply punch 2 holes in it so you can remove the screws (leaving most of the sticker intact). Now that you have the joystick open, remove the broken spring that used to center the joystick. Use the core from the largest available guitar string to replace the spring you just removed. If you snip off one end you can remove the (usually gold) wire wrapped around a core wire by pulling on the gold wire. Credit goes to Dan Muntz once again for this clever solution. =============================================================================== = Q. Are there tricks or cheats for any Vectrex games? YES! (Vectrex had cheats back when they were still known as bugs): ARMOR ATTACK: If you crank the brightness all the way up, you are able to see the helicopter's position as soon as you hear it (even thought it is off the screen). Blitz!: If you get a 1st and inches (1 and 0 to go), as long as you stay on the 0 yd line, you keep getting first downs. - adamfox@super.org FORTRESS OF NARZOD: If you can somehow manage to kill the gorilla (AKA the "Mystic Hurler") at the same time he kills you, your lives remaining will turn into the infinity sign (oo) and you will have 255 lives. It is not known for sure if your lives in reserve value has to be zero for this to work (probably so). MINESTORM: The brightness trick allows you to see the "invisible" mines. SPACE WARS: Either ship is invincible after being hit, while pieces are in the air. This may not sound like much, or maybe this was intentional, but I've played against people who make this their entire strategy. They skim the edge of the Star in the middle, just to knock off a tail section or something, and then while they are invincible, they fly right into you. Not nice, but it works very well. The time window is surprisingly long. SCRAMBLE: A quote from Paul Allen Newell, developer of the game: I remember going thru long discussions with management about giving the programmers credit on the games. Western Technologies and/or GCE didn't approve it and most of the programmers hide their names somewhere in the games. My "Easter Egg" can be located in "Scramble" by doing the following. If you have two controllers with joystick and buttons, put them both in; otherwise, use the single one in the usual position. While "Scramble" is displaying its "game # player #" section, move the joystick so it is "down". When "Scramble" starts, keep it in this down position so your plane crashes on the floor BEFORE THE MOUNTAINS START. Do this for all you ships, DO NOT PUSH ANY BUTTONS TO FIRE BOMBS OR BULLETS. When it is over, the display "end" will come up. WITHOUT TOUCHING ANY BUTTONS, unplug the main controller and move it to the "player two" plug (if you have two controllers, this step is not necessary). Then, with the "player two" controller, PUSH ALL FOUR BUTTONS SIMULTANEOUSLY. They must all go down at the same time. Repeat until you get all four down at the same time. You'll know when you see the word "end" change into something else. This is the first time I have documented the method, having only mentioned it to friends or hinted to others. Enjoy! (Thanks a LOT to Stefan Herr for digging up this one-of-a-kind jem!) SPIKE: If you position the door ALMOST all the way to the right of the screen, then jump into it, so as to be jammed between the door, and the little space that is left; the game freaks out, you will be pushed forward about 47,000 points, and the difficulty will be increased proportionally. =============================================================================== = Q. What is the history of the Vectrex? A. Thanks a lot to Stefan Herr (steve@lioness.okapi.sub.org) for the following information he dug up while researching an article for a European gaming magazine. If you have any additions or corrections, please contact both of us. VECTREX TIMETABLE ----------------- End 1980/Spring 1981: The development of Vectrex starts with an idea by Jay Smith, head of Western Technologies/Smith Engineering, and his talented staff for a small, vector scan table top game they call "Mini Arcade". Spring 1981: The Vectrex idea is optioned to Kenner (known for their "Star Wars", "Care Bears", "Batman" and "Batman Returns" figures). Vectrex planned to have a 5" black and white tube. 06/1981: Paul A. Newell is hired by Western Technologies to join the "Atari reverse engineering project" group (aim: be able to write games for the VCS 2600) which at that point consisted of Mark Indictor and John Hall. 07/1981: Kenner declines to pursue the Vectrex. 08 or 09/1981: The Vectrex concept is licensed by GCE (General Consumer Electronics). GCE's president Ed Krakauer had the vision to see the great potential of the system. To enhance its appeal, GCE asks that the screen be increased to 9-inches. Autumn 1981: The Atari project is cancelled and the three Atari people (M.I., P.N., J.H.) start work on the Vectrex project. John Ross designs the hardware, Gerry Karr works together with John Hall on the system ROM (called "The Executive"). In the beginning it is planned to use a 6502 processor which turns out to be too slow. For this reason the 6809 is used finally. ??: A strict timetable demands that the first 12 games and the hardware should be ready in June 1982. ??: John Hall later exclusively works on "Mine Storm" while Gerry Karr works on The Executive alone. 04/1982: Paul Newell finishes "Scramble". 06/1982: The Vectrex is introduced to the public on the Summer-CES in Chicago. Summer 1982: Mark Indictor, John Hall and others are directly hired by GCE to write more games. Paul Newell leaves Western Technologies to join Simutrek, a company developing arcade laser disc games ("Cube Quest"). ??: Mark Indictor and his family move about two hours out of Los Angeles and he writes games in the seclusion of a pine forest at 5,000 ft. He even has an NBC news crew come up and interview him for a news show on weird computer hackers and their life styles. Late summer 82: Start of mass production. 11/1982: Vectrex is available in the USA for $199. Very positive reviews in the magazines. Paul Newell's "Scramble" gets the "Arcade Award" of the "Electronic Games" magazine for the best "Mini-Arcade game" (a category which is founded exclusively for the Vectrex). Spring 1983: GCE is acquired by Milton Bradley (MB). 03/1983: Vectrex is announced in the German "Telematch" magazine for the first time in Germany. Summer 1983: Distribution begins in Germany and many other west European countries by Milton BradleyB (German office located in Fuerth). 1983: Several efforts fail in developing a color Vectrex. One obvious project is to use a color TV tube; however, this is always too expensive. Another is to use a projection TV with three vector scan tubes. It works well but is commercially impractical. Yet another effort is to use two layers of color phosphor on a black and white type TV tube. By varying the high voltage level, the electron beam would excite the bottom layer or the top layer. However the high voltage cannot be changed rapidly enough to keep up with the scan. 02/1984: "Artmaster Lightpen", "Star Castle", "Polar Rescue", "Animaction" and "Pole Position" presented on the "Nuernberger Spielwarenmesse" (Germany's most important show for the toy industry). around 02/84: 3D-Imager is presented at the Winter-CES in Las Vegas. 31/03/1984: End of Vectrex in Germany: MB in Fuerth announces stop of sales on this date. Rest of 1984: Vectrex is phased out as Hasbro buys Milton Bradley and video game fever comes crashing down (probable reason: home computer fever). Rummage sales in Germany (mainly in stores of the METRO-chain, which had bought the rest of MB's stock) close out Vectrex equipment at bargain prices. 1988: Western Technologie/Smith Enginerring tries to resurrect Vectrex as a handheld unit. It is to be based on the Sinclair flat TV tube, which has fast static deflection at low power consumption and low cost. However, the impending introduction of GameBoy causes the idea to be scrapped. 10/1993: A feature about the 10th anniversary of the Vectrex is published in the German "Video Games" magazine. Contains technical descriptions, pictures of Jay Smith and Mark Indictor, a Vectrex history and a list of games and accessories. The article is based on information collected by the author (Stefan Herr) from the Usenet Vectrex newsgroup, various FTP archives, many emails from several former Vectrex developers and a historical overiew about the development by Jay Smith. There are not very many evidences of the existance of a computer keyboard with a BASIC cartridge (or something similar) for the Vectrex. The only hint known is an article in an old issue of "Creative Computing" magazine. In the first couple of pages they do a ranking of computers' speed based on some simple benchmark. There is an entry for the vectrex in it using Vectrex basic. It is the issue that reviewed the original Macintosh (1984?). LIST OF PERSONS INVOLVED IN THE VECTREX DEVELOPMENT --------------------------------------------------- Mark Indictor (*) First duties during development: Software for communication with the ICE (In-Circuit-Emulator) Star Trek Games: for Western Technologies: Star Trek for GCE Spinball Polar Rescue Mail Plane (not published, for use with Lightpen) Tour de France (not published) Paul Allen Newell (*) Sole author of Scramble John Hall (*) Worked on The Executive Author of Mine Storm Gerry Karr Took over The Executive project, after John Hall concentrated on Mine Storm John Ross Developer of the hardware Chris King Author of Berzerk Author of Hyperchase Duncan Muirhead Joined WT at the end of 1981 (or beginning of 82) Author of Armor...Attack Ronald J. Logsdon Author of Melody Master for the Lightpen Jay Smith Founder and president of Western Technologies/Smith Engineering Kim Martin Digitized the Scramble landscapes Beta-tester (mainly for Scramble) (*): These persons worked on the "Atari reverse engineering" project. Only one of the three games that were created by that group was released (the one written by Paul Newell). Anyway, the whole project was cancelled later because the competition (e.g. Activision) was too big. Other people involved (this list does not claim to be complete) were David Blair, Alan Cobb, Jeff Corsiglia, Ed Faris, Joel Hassell, Bill Hawkins, Don Herndon, Ed Horton, Bill Hudson, Kevin Hudson, Nolan Johnson, Patrick King, Steve Marking, Richard Moskowski, Walter Nakano, Gary Niles, Lori Pearsall, Mike Purvis, Bob Rutowski, Tom Sloper, Ed Smith, and Colin Vowels. Sources: Electronic mails from Mark Indictor, Paul Newell, Chris King, Ronald J. Logsdon, personal letter from Jay Smith, several articles from "Electronic Games" magazine (provided by Paul Newell), article from "Creative Computing" magazine (provided by Dion Dock). =============================================================================== = Send corrections, suggestions, additions, ect. to woodcock@bnr.ca + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!wupost!uhog.mit.edu!news.mtholyoke.edu!news.amherst.edu!news.umass.edu!nic.umass.edu!k12.ucs.umass.edu!hanechak From: hanechak@k12.ucs.umass.edu (Brian Hanechak (Chicopee HS)) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 12:14:40 GMT Organization: University of Massachusetts K-12 Outreach Lines: 11 Distribution: inet Message-ID: <33cp7g$icf@nic.umass.edu> References: <33ak4g$nn3@nic.umass.edu> <33b716$jkg@ulowell.uml.edu> NNTP-Posting-Host: k12.ucs.umass.edu X-Newsreader: TIN [version 1.2 PL2] Ralph Barbagallo (rbarbaga@cs.uml.edu) wrote: : Can anyone tell me how the Vectrex 3D Imager works? Everyone : mentions these colorwheels, but what are they for? If it doesn't use shutters, : and you can't use the filtered color lenses...what does it use? Polarized : light? The color wheels are divided in half first --- one half is black and opaque, so it "shutters" out one eye. The other half is divided into thirds, which are translucent colors, usually red, green, blue, but in a different order on each wheel. (I don't know why they didn't just make one.) + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 14:07:31 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 43 Distribution: inet Message-ID: <33cvr3$j68@falcon.ccs.uwo.ca> References: <33ak4g$nn3@nic.umass.edu> <33b716$jkg@ulowell.uml.edu> <33cp7g$icf@nic.umass.edu> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca In article <33cp7g$icf@nic.umass.edu>, Brian Hanechak (Chicopee HS) wrote: >Ralph Barbagallo (rbarbaga@cs.uml.edu) wrote: > >: Can anyone tell me how the Vectrex 3D Imager works? Everyone >: mentions these colorwheels, but what are they for? If it doesn't use shutters, >: and you can't use the filtered color lenses...what does it use? Polarized >: light? > >The color wheels are divided in half first --- one half is black and opaque, >so it "shutters" out one eye. The other half is divided into thirds, which >are translucent colors, usually red, green, blue, but in a different order >on each wheel. (I don't know why they didn't just make one.) They used different colours so different objects are different colours. In Narrow Escape, the right wall is one colour, the left wall is a second colour, and your ship is the third. In 3-D minestorm the whell is divided diffently. Your ship is blue, the mines are all green, and the score is supposed to be red. Especially with 3-D Minestorm, the effect is great! It adds so much more to the game that it is in colour. john macdonald magundi@uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!decwrl!ames!agate!howland.reston.ans.net!wupost!news.utdallas.edu!corpgate!crchh327.bnr.ca!woodcock From: woodcock@bnr.ca (Gregg Woodcock) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 14:02:15 GMT Organization: Bell-Northern Research; Richardson, Texas, USA Lines: 33 Distribution: inet Message-ID: <33cvh7$s58@crchh327.bnr.ca> References: <33ak4g$nn3@nic.umass.edu> <33b716$jkg@ulowell.uml.edu> <33cp7g$icf@nic.umass.edu> Reply-To: woodcock@unicomp.net (Gregg Woodcock) NNTP-Posting-Host: crchh75b.bnr.ca X-Newsreader: TIN [version 1.2 PL2] Brian Hanechak (Chicopee HS) (hanechak@k12.ucs.umass.edu) wrote: > The color wheels are divided in half first --- one half is black and opaque, > so it "shutters" out one eye. The other half is divided into thirds, which > are translucent colors, usually red, green, blue, but in a different order This is correct. > on each wheel. (I don't know why they didn't just make one.) They didn't make just one becuase the amount of sector area devoted to a color is directly proportional to the amount of vectors you are going to draw in that color (as compared to the other colors). For example, the only thing that is red in 3DMS is the door on the ship that lays the mines and it only appears once a wave for a few seconds. Therefore red is a VERY tiny arc on the color wheel. The mines take up the most vectors by far and they are green so a large majority of the semi-circle of color is green. The rest is blue which is used for your spaceship, the minelaying mother ship and, I think, the starburst between waves (but that might be green, too). If you want to use a particular color a lot, you need a bigger arc. All games will not require the same proportions of colors so they need different color wheels. Just a little footnote; the 3D effects of the imager are pretty poor but the coloring of the vectors is OUTSTANDING!!! They should have used the entire color wheel and marketed the device as a color Vectrex enhancment and it would have probably sold better since it does a better job at doing the color. -- THANX...Gregg day 214.684.7380 night UNLIST/PUBL TEXAS NOT CANADA! woodcock@bnr.ca or woodcock@nt.com or bn202@cleveland.freenet.edu *CLASSIC VIDEOGAME COLLECTOR BUY/SELL/TRADE PRE-NINTENDO (ARCADE/HOME)* "If you quote me on this I'll have to deny it; I won't remember because I have such a bad memory. Not only that, but my memory is *terrible*." + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!uop!pacbell.com!well!barrnet.net!agate!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvusn!hpcvlx!fred From: fred@hpcvlx (Fred Taft) Subject: Commented sources Message-ID: <1994Aug23.172807.5698@hpcvusn.cv.hp.com> Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999) Nntp-Posting-Host: hpcvlx.cv.hp.com Organization: Hewlett-Packard Company, Corvallis, Oregon USA X-Newsreader: Tin 1.1 PL5 Date: Tue, 23 Aug 1994 17:28:07 GMT Lines: 7 Well ... our news reader is not letting me post the sources! It is rejecting each of the source files, even when I try to break them up into smaller pieces. Our system administrator is looking into it. Sorry for the delay. Fred + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!decwrl!envoy.wl.com!caen!math.ohio-state.edu!usc!howland.reston.ans.net!europa.eng.gtefsd.com!ulowell!cs.uml.edu!rbarbaga From: rbarbaga@cs.uml.edu (Ralph Barbagallo) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 18:44:05 GMT Organization: UMass-Lowell Computer Science Lines: 22 Distribution: inet Message-ID: <33dg1l$1ej@ulowell.uml.edu> References: <33ak4g$nn3@nic.umass.edu> <33b716$jkg@ulowell.uml.edu> <33cp7g$icf@nic.umass.edu> NNTP-Posting-Host: cs.uml.edu In article <33cp7g$icf@nic.umass.edu> hanechak@k12.ucs.umass.edu (Brian Hanechak (Chicopee HS)) writes: >The color wheels are divided in half first --- one half is black and opaque, >so it "shutters" out one eye. The other half is divided into thirds, which >are translucent colors, usually red, green, blue, but in a different order >on each wheel. (I don't know why they didn't just make one.) So, the Vectrex toggles between the left/right views in sync with the colorwheel, right? If so, what are the 3 colors for? Wouldn't you get some sort of rainbow effect? Or does it also toggle between red, green,blue vectors in sync with the colors on the translucent side? Geesh, wouldn't that really cut down the frame rate? But then again, what was the frame rate of the Vectrex? (average...I notice a lot of games like Berzerk and Spike flicker with a lot of objects on the screen) -- Ralph A. Barbagallo III --- rbarbaga@cs.uml.edu --- Only AMIGA makes it Possible... R.I.P. Jay Miner: June 20th 1994 Father of the 2600, Atari 8bit, Amiga -=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!dog.ee.lbl.gov!news.cs.utah.edu!u.cc.utah.edu!cadesm34.eng.utah.edu!jnichola From: jnichola@cadesm34.eng.utah.edu (jason barkdull) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 18:46:13 GMT Organization: University of Utah Lines: 6 Distribution: inet Message-ID: <33dg5l$r59@u.cc.utah.edu> References: <33ak4g$nn3@nic.umass.edu> <33b716$jkg@ulowell.uml.edu> <33cp7g$icf@nic.umass.edu> NNTP-Posting-Host: cadesm34.eng.utah.edu Ok, we know what the color wheel looks like. BUT how does it work???????!!!!!!!!!!!! + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!agate!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 21:33:04 GMT Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada Lines: 44 Distribution: inet Message-ID: <33dpug$i51@falcon.ccs.uwo.ca> References: <33ak4g$nn3@nic.umass.edu> <33b716$jkg@ulowell.uml.edu> <33cp7g$icf@nic.umass.edu> <33dg5l$r59@u.cc.utah.edu> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca In article <33dg5l$r59@u.cc.utah.edu>, jason barkdull wrote: > > >Ok, we know what the color wheel looks like. >BUT how does it work???????!!!!!!!!!!!! THe Colour wheel is half opaque so you can only see out of one eye at a time. In 3D Minestorm to draw a 3D ship, the vectrex draws two ships side by side. Your brain decides that it isn't really seeing two ships so it tells your eyes to focus as if it was really one ship, but with a more distant focal plane than the minestorm screen really is. With 3-D minestorm the vectrex will first draw a ship for your right eye. At that point in time you have the blue part of the colour wheel in front of your right eye, and you can't see out of your left eye. It then draws the minefield and by that time you have green in front of your right eye. Now the colour wheel has turned farther and you have the opaque side in front of your right eye. In front of your left eye the colour wheel is blue and the vectrex is drawing the ship, but offset to one side. THen the colour wheel turns farther and is now green and the vectrex starts drawing the minefield but offset to one side. Depending on lighting conditions you will actually see two images because off the after-glow of the phosphors. The effect is much more noticeable in 3-D Narrow Escape because there is so much depth of field you have to change focus considerable ( for a 3-D video image ) between your ship and the objects you are trying to shoot. Hope this help's somewhat. john macdonald magundi@uwo.ca (519) 432-9697 + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!sdd.hp.com!hp-pcd!hpcvusn!hpcvlx!fred From: fred@hpcvlx (Fred Taft) Subject: Commented sources Message-ID: <1994Aug23.230315.16216@hpcvusn.cv.hp.com> Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999) Nntp-Posting-Host: hpcvlx.cv.hp.com Organization: Hewlett-Packard Company, Corvallis, Oregon USA X-Newsreader: Tin 1.1 PL5 Date: Tue, 23 Aug 1994 23:03:15 GMT Lines: 10 Ok ... I give up. I've tried breaking up the code into pieces, compressing and uuencoding the files, but the 'news' reader still rejects them. If you want the 4 source files, simply mail me a request and I'll mail it to you directly. For now, that's easier than figuring out why 'news' is being such a pain :-( I'll try to ship out the sources the same day I receive the request (starting Wednesday, since I'm leaving now). Fred Taft fred@hp-pcd.cv.hp.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!decwrl!envoy.wl.com!caen!newsxfer.itd.umich.edu!europa.eng.gtefsd.com!howland.reston.ans.net!agate!tcsi.tcs.com!mira!keith From: keith@mira.tcs.com (Keith Jarett) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 23 Aug 1994 21:44:50 GMT Organization: Teknekron Communications Inc. Lines: 28 Distribution: inet Message-ID: <33dqki$gig@tcsi.tcs.com> References: <33b716$jkg@ulowell.uml.edu> <33cp7g$icf@nic.umass.edu> <33dg5l$r59@u.cc.utah.edu> NNTP-Posting-Host: mira.tcs.com In article <33dg5l$r59@u.cc.utah.edu> jnichola@cadesm34.eng.utah.edu (jason barkdull) writes: > > >Ok, we know what the color wheel looks like. >BUT how does it work???????!!!!!!!!!!!! One side (180 degrees) of the wheel is black. The other side is divided into angular sections of various colors. The view from one eye is always blocked by the black side when the other side has a view through one of the colored sections. The display shows a "left eye" view when the right eye is covered, and then a "right eye" view" when the left eye is covered. There is a brief time when both eye holes are partly uncovered, and this causes a bit of ghosting (left eye sees faint right eye view in the wrong color, and vice versa). I don't know what the rotation frequency of the disk is, but with the noticeable flicker it must be under 25 Hz. If the RPMs get too low, the game shuts down and you have to reset. This can happen if you abruptly move the Imager and cause the color wheel to rub against the inside of the Imager. I hope the preceding was sufficiently clear. keith@tcs.com Keith Jarett + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!usc!news.service.uci.edu!cafws2.eng.uci.edu!dan From: dan@cafws2.eng.uci.edu (Dan Harkless) Newsgroups: rec.games.vectrex Subject: Re: Extra Star Trek Date: 24 Aug 1994 02:31:39 GMT Organization: University of California, Irvine Lines: 12 Distribution: inet Message-ID: <33ebeb$9ua@news.service.uci.edu> References: <336r4c$r6p@ulowell.uml.edu> NNTP-Posting-Host: cafws2.eng.uci.edu Ralph Barbagallo writes: > Also, what's the deal with Cosmic Chasm. Do you have to clear ALL >of those caves before you can blow up the big generator thingie in the center >of the map. No. Take the shortest route. ------------------------------------------------------------------------------ | Dan Harkless | "The sore in my soul | | dan@cafws1.eng.uci.edu | The mark in my heart -> Front 242, | | dharkles@bonnie.ics.uci.edu | Her acid reign..." Tragedy >For You< | ------------------------------------------------------------------------------ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!usc!news.service.uci.edu!cafws2.eng.uci.edu!dan From: dan@cafws2.eng.uci.edu (Dan Harkless) Newsgroups: rec.games.vectrex Subject: Re: Extra Star Trek Date: 24 Aug 1994 02:32:20 GMT Organization: University of California, Irvine Lines: 11 Distribution: inet Message-ID: <33ebfk$9uf@news.service.uci.edu> References: <336r4c$r6p@ulowell.uml.edu> <337r1o$djq@sundog.tiac.net> NNTP-Posting-Host: cafws2.eng.uci.edu Glenn M. Saunders writes: > My fading memory tells me that Star Castle used a horizontally >opposed monitor. This makes it a little easier to visualize I think. What does "horizontally opposed" mean? ------------------------------------------------------------------------------ | Dan Harkless | "The sore in my soul | | dan@cafws1.eng.uci.edu | The mark in my heart -> Front 242, | | dharkles@bonnie.ics.uci.edu | Her acid reign..." Tragedy >For You< | ------------------------------------------------------------------------------ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!agate!dog.ee.lbl.gov!news.cs.utah.edu!u.cc.utah.edu!cadesm34.eng.utah.edu!jnichola From: jnichola@cadesm34.eng.utah.edu (jason barkdull) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 24 Aug 1994 01:39:00 GMT Organization: University of Utah Lines: 6 Distribution: inet Message-ID: <33e8bk$lvn@u.cc.utah.edu> References: <33cp7g$icf@nic.umass.edu> <33dg5l$r59@u.cc.utah.edu> <33dpug$i51@falcon.ccs.uwo.ca> NNTP-Posting-Host: cadesm34.eng.utah.edu that helps alot! so how does the wheel turn? how fast? how's it syncronized? do you need the goggles? + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!xnet!quake.xnet.com!bbs!skelly From: skelly@bbs.xnet.com (Sean Kelly) Message-ID: Newsgroups: rec.games.vectrex Subject: Vectrex Games For Sale! Date: 23 Aug 94 21:59:31 CST Organization: XNet Public Access Internet, Naperville, IL (708-983-6435) Lines: 35 Here's a list of some Vectrex carts I have available. The prices listed are for the CART ONLY. Any additional components such as docs & overlays are a buck each. Carts listed as "NEW" are available complete at the price listed. All carts, docs, & overlays listed are ORIGINALS! Where "NO CARTS" is specified, the individual components of that particular game are available separately for a buck each. Z/////Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z Z//// Z Z/// Vectrex Z Z// Z Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z Armor Attack $7.00 Berzerk $7.00 Blitz $7.00 Clean Sweep $9.00 NEW! Cosmic Chasm $8.00 Hyperchase $8.00 O Minestorm I O (NO CARTS) Rip Off $8.00 I O B Scramble I O B (NO CARTS) Solar Quest $8.00 I O B Space Wars $12.00 B Spike $12.00 Star Hawk $12.00 Star Trek $7.00 NEW! I also make Vectrex MULTI-CARTS! They include all games except for AnimAction, have a pause switch, power light, and four demos. $50 each. Sean Kelly skelly@bbs.xnet.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Subject: Re: General Vectrex Questions... From: shain.klammer@canrem.com (Shain Klammer) Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!math.ohio-state.edu!cs.utexas.edu!utnut!torn!uunet.ca!uunet.ca!portnoy!canrem.com!shain.klammer Distribution: world Message-ID: <60.2133.4196.0N1ABA32@canrem.com> References: <120308@cup.portal.com> Date: Wed, 24 Aug 94 00:42:00 -0400 Organization: CRS Online (Toronto, Ontario) Lines: 17 I might just as well jump in here as well... I too wouldn't mind getting my hands dirty with the 6809 again, and can provide you with a disassembler (from my COCO days), even one compatible with QBASIC on an IBM.... What I would like is someone to email me some of the FTP developer info/schematics since I've only got Email access and not the FTP... I would assume that any "new" development for the Vectrex could for sold for a nominal (cheap) fee and not contrevene the "intent" from Smith Engineering. And to the fellow wanting a 300 dpi scan for the Scramble overlay... why not just clean up the 72 dpi version. I mean, they're not that complex a piece of artwork; a couple of hours on CorelDraw or something and you'll have a perfect rendition... + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Subject: 6809 Disassembler From: shain.klammer@canrem.com (Shain Klammer) Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!math.ohio-state.edu!cs.utexas.edu!utnut!torn!uunet.ca!uunet.ca!portnoy!canrem.com!shain.klammer Distribution: world Message-ID: <60.2134.4196.0N1ABA33@canrem.com> References: <1994Aug19.160048.328@hpcvusn.cv.hp.com> Date: Wed, 24 Aug 94 00:46:00 -0400 Organization: CRS Online (Toronto, Ontario) Lines: 6 A FAQ appears monthly within the message base and hopefully someone can point you to the FTP site for direct access if you are able to reach it... I'd be interested in getting your information of the reversing of the carts etc.... thanks.... + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!cs.utexas.edu!chpc.utexas.edu!news.utdallas.edu!feenix.metronet.com!rik From: rik@metronet.com (RiK) Subject: Re: Extra Star Trek Message-ID: Date: Wed, 24 Aug 1994 06:32:25 GMT Distribution: inet References: <336r4c$r6p@ulowell.uml.edu> <337r1o$djq@sundog.tiac.net> <33ebfk$9uf@news.service.uci.edu> Organization: Texas Metronet, Internet for the Individual 214-705-2901 (info) X-Newsreader: TIN [version 1.2 PL2] Lines: 27 Dan Harkless (dan@cafws2.eng.uci.edu) wrote: : Glenn M. Saunders writes: : > My fading memory tells me that Star Castle used a horizontally : >opposed monitor. This makes it a little easier to visualize I think. : What does "horizontally opposed" mean? What he meant was that the monitor in the arcade game lays sideways like a TV, not vertically like the Vectrex. Doesn't make that much difference on this game though. The best way I found to play Star Castle is to position yourself in the center of the screen vertically, and about half way between the edge of the screen and the force fields. Turn your ship so you are facing away from the enemy, and thrust. as soon as you change from one side of the screen to the other (you should now be pointing right at the enemy), start firing, but don't slow down. You should get off 4 or 5 shots, slam into the force field, and bunch back almost the way you came. quickly aim back at the enemy, and do the same thing facing the other direction. This is the most affective way to kill the ship after you have a hole in the force field (that I've found anyway). It takes a little practice (and I hope that the description isn'ttoo confusing :), but after several games of getting killed on the first level, a friend showed me this, and I can now easily get through several without even being killed. Makes the game more fun if you can actually get somewhere... :) Rik + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!csulb.edu!nic-nac.CSU.net!usc!cs.utexas.edu!chpc.utexas.edu!news.utdallas.edu!feenix.metronet.com!rik From: rik@metronet.com (RiK) Subject: Re: Looking for 3d games Message-ID: Date: Wed, 24 Aug 1994 06:44:30 GMT Distribution: inet References: <33cp7g$icf@nic.umass.edu> <33dg5l$r59@u.cc.utah.edu> <33dpug$i51@falcon.ccs.uwo.ca> <33e8bk$lvn@u.cc.utah.edu> Organization: Texas Metronet, Internet for the Individual 214-705-2901 (info) X-Newsreader: TIN [version 1.2 PL2] Lines: 42 jason barkdull (jnichola@cadesm34.eng.utah.edu) wrote: : that helps alot! OK, I'll jump in and help a little here... : so how does the wheel turn? A motor! :) It basically clamps onto a motor inside of the goggles. : how fast? Can't help you there, but it's pretty fast.. :) : how's it syncronized? It has a wee bit of circuitry in it and it receives a signal from the Vectrex to tell how fast to go. The game will not start until it is syncornized. There is a small hole on the hub of the wheel that is detected by the goggles to determine how fast it is. The Vectrex archive has .GIF drawings of the two color wheels, if you haven't seen a wheel before, these might make it a little more clear... (csus.edu pub/vectrex (then /goggles I think) : do you need the goggles? To do what? Either way the answer is yes. You can't play the game without the goggles, becuase the machine just sits there and waits for the wheel to get in sync. If you don't have the goggles hooked up with a wheel in it, the game never starts. The Imager (what the whole thing is called) is one piece, the color wheel fits inside of it. It's a big clunky thing that is kind of unconfortable to wear. If you move your head, the wheel scraps against things inside it (gyro effect...), and it gives me a headache after a while - but then all of those quickly-cover- one-eye-at-a-time 3D goggles do that to me... :) Did that help any? Probably not... Over labor day weekend I'll take a pic of my Imager and wheel, scan it and send it to the archive so everyone can see what these things look like. (Unless someone beats me to it...) Rik + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Memory Map Source Date: 24 Aug 1994 14:23:47 GMT Organization: Computer Science Dept., Univ. of Western Ontario, London, Canada Lines: 798 Distribution: world Message-ID: <33fl5j$1g7@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca From fred@hpcvusc.cv.hp.com Wed Aug 24 09:46 EDT 1994 Date: Wed, 24 Aug 1994 06:47:24 -0700 From: Fred Taft To: magundi@uwo.ca Subject: Memory Map source Status: RO The following document will attempt to identify those RAM locations for which I have been able to identify their use. At the present time, only the following games are covered: 1) Main OS ROM 2) Minestorm game Other games will follow, as I find time. A short note on RAM usage: It appears that the area C800 - C87F are reserved for use by the OS ROM code. Games can use some of these locations to pass information on to OS routines, but they should not be used for arbitrary data storage. The area made up of addresses C880 - CBBF are available for use by any of the games. It is the game's responsibility to initialize the block of memory which it will be using. The area made up of addresses CBC0 - CBEA is reserved for the stack; this is a very small area, so be careful!! The area made up of addresses CBEB - CBFF are also reserved for use only by the OS ROM code. The area made up of addresses D000 - D00F are used to talk to the PIA hardware, and indirectly, to the sound chip and other pieces of hardware. If people come up with additions to this list, please let me know, so that I can integrate these into my master copy. Fred Taft hp-pcd!fred Hewlett-Packard Corvallis, OR 97330 ========================================================================= MAIN OS ROM ----------- C800-C80D This block of memory is used to save a copy of the last set of values written to the sound chip. C800 = reg 0 (Channel A fine tune) C801 = reg 1 (Channel A course tune) C802 = reg 2 (Channel B fine tune) C803 = reg 3 (Channel B course tune) C804 = reg 4 (Channel C fine tune) C805 = reg 5 (Channel C course tune) C806 = reg 6 (Noise Period) C807 = reg 7 (Mixer Control/IO enables) C808 = reg 8 (Channel A amplitude) C809 = reg 9 (Channel B amplitude) C80A = reg A (Channel C amplitude) C80B = reg B (Fine tune E) C80C = reg C (Course tune E) C80D = reg D (Envelope (E) shape cycle) C80E = reg E (Port A data) C80F-C811 These are used by the button handler, and should be left alone. C812-C819 These locations are used to return the current state of the buttons on the 2 consoles. The values are returned as follows: console 1, button 1: C812 button 2: C813 button 3: C814 button 4: C815 console 2, button 1: C816 button 2: C817 button 3: C818 button 4: C819 Before you make a call to the button handling routine, you must first set up a mask in the 'a' register, having the following meaning: bit 0 = console 1, button 1 bit 1 = console 1, button 2 etc.... If a bit is 0, then the current state of the switch is to be returned in the appropriate ram location (0 = up, 1 = down). If a bit is 1, then the appropriate RAM location is set to 1 only on the depression transition of the button; additional calls will return 0, until the button is released and then depressed again. C81A This contains a 1 byte conversion resolution value used during successive approximation reading of a joystick pot. 0x80 is least accurate, while 0x00 is most accurate. It may need to be a power of two. C81B-C81E These contain the joystick position values returned by the joystick handler. The values returned depend upon how you set up the joystick enable flags (see explanation for C81F-C822), and the mode (C823). The possible values are: if mode (C823) >= 0, then return value is < 0 if joystick is left or down = 0 if joystick is centered > 0 if joystick is right or up if mode (C823) < 0, then return value is a successive approximation value, which is a calculation of the actual pot value. This is a signed value. When using this this type of joystick reading, the resolution value, in C81A, must first be set before calling the joystick handler. C81F-C822 These serve as the enable flags for the 2 pots on each of the 2 controllers. The state of the joystick pots are returned in C81B-C81E. Each of these enable flags must be set to one of the following values: 0 ignore 1 pot 0 (console 1 left/right) 2 pot 1 (console 1 up/down) 3 pot 2 (console 2 left/right) 4 pot 3 (console 3 up/down) The value associated with each flag is returned as follows: For flag in value is returned in =========== ==================== C81F C81B C820 C81C C821 C81D C822 C81E C823 This is a flag to the joystick routine, which indicates how the joystick state should be returned. If this value is less than 0, then a successive approximation algorithm is used, and the value returned will indicate how far the joystick is positioned in a given direction. If this value is >= 0, then a simple value, indicating up/down/left/right will be returned. C824 This is an enable flag to the check0ref() routine. If it is zero, then check0ref() will return without doing anything; if it is non-zero, then the integrators will be reset to the origin. C825-C826 Keeps track of the number of time the waitrecal() routine has been called. waitrecal() waits for the refresh timer to time out, and then moves the pen back to the origin. Some routines in the OS ROM use this value to as a loop counter, so that a string will be diplayed for a certain amount of time: i.e. 20 msec * loop counter = duration. C827 Current z-axis value (intensity). 0xFF = maximum intensity. 0x00 = minimum intensity. C828 Dot dwell time. C829 Line pattern (blanking pattern). 0xFF = solid line 0x00 = invisible line (move) C82A-C82B Used by several of the print routines, to store the height and width of the string to be displayed. C82C-C82D Used by several of the print routines, to store the pointer to the beginning of the string to be displayed. C82E-C833 Used to hold counter values. C834-C835 Not used. C836 Used by the rotation routines. C837-C838 During powerup, this is used to point to the beginning of the music block/cartridge name information. The object pointed to has the following format: ptr to music block (2 bytes) height (1 byte) width (1 byte) rel y (1 byte) rel x (1 byte) cartridge title string, 0x80, 0x00 This area is also used by the rotation routines. C839-C83A During powerup, this is used to point to the gce copyright string. If a cartridge is being used, then it will point to the cardtridge's copyright string. This area is also used by the rotation routines. C83B Flags whether or not a high score value should be displayed during the boot up process. If non-zero, then don't display a high score; if zero, then do display the hi score. For the initial cold start, this will be set non-zero. After a game is started, the game can clear this, if it wants to. C83C Used by the point transformation routines. C83D-C83E Used to save the refresh timer value (t2). The refresh value is calculated as follows: refresh value = (C83E)(C83D)/1.5mhz 20 msec = (0x75)(0x30)/1.5mhz = (30000/1.5mhz = .02 sec C83F-C84C This block of memory is used to save the register values which should be next written to the sound chip. See the above definition for the register usages. C83F = reg D C840 = reg C C841 = reg B C842 = reg A C843 = reg 9 C844 = reg 8 C845 = reg 7 C846 = reg 6 C847 = reg 5 C848 = reg 4 C849 = reg 3 C84A = reg 2 C84B = reg 1 C84C = reg 0 C84D-C84E Used to point to a block of data used by the music routines. C84F-C850 Pointer to the first music block parameter, specified as the first 2 bytes in a music block. Has a second use, during the startup of a game; used by the OS routine, which allows the user to specify a game and number of players, to store (C84F):Maximum number of players allowed, and (C850): Maximum number of game options allowed. C851-C852 Pointer to the second music block parameter, specified as the second 2 bytes in a music block. A music block has the following format: ptr to first parameter block (2 bytes) ptr to second parameter block (2 bytes) list of note/duration pairs C853-C854 Pointer to the list of note/duration pairs. C855 Index used by music routines; have value 0, 1, or 2. C856 Flags used by music routines. Must be set to 0 when you want to start a new sound. The sound routine will set it to 0x80 while a sound is in progress, and will then set it to 0 when the sound is complete. C857 Used by the music routines to save the current duration masked with 0x3F. C858-C85D Work area used by the music routine. C85E C85F C860 Used by the music routine when calculating the amplitude values for channels A, B and C. The byte used is determined by the index value in C855. C861-C862 C863-C864 C865-C866 Used by the music routines. The pair used is determined by the index in C855. C867-C878 Used by the sound routines. C879 Contains the number of players, as selected by the user. C87A Contains the game number selected by the user; used for games which allow the user to select different game options. C87B-C87C Contains a seed, which is used by the random number generator. C87D-C87E Incremented at boot time. Used to generate the above mentioned random number generator seed. CBEA Stack pointer is set to here at reset time. CBEB-CBF1 This 7 byte buffer contains the current hi score for which ever game is being played. This is the string which is displayed each time the reset button is pressed. The format for this string is: " 0",0x80 CBF2 CBF3-CBF4 CBF2 has been specified by the OS ROM as the location to vector to whenever a swi2 or swi3 interrupt occurs; these are 2 of the software interrupts. Normally, when a game plans to use these, they will write a 'jmp' instruction into CBF2, and then write the address of the real handler routine into CBF3-CBF4. CBF5 CBF6-CBF7 CBF5 has been specified by the OS ROM as the location to vector to whenever a FIRQ interrupt occurs. Normally, when a game plans to use this, it will write a 'jmp' instruction into CBF5, and then write the address of the real handler routine into CBF6-CBF7. A FIRQ can be generated by button 4 on console 1. CBF8 CBF9-CBFA CBF8 has been specified by the OS ROM as the location to vector to whenever a IRQ interrupt occurs. Normally, when a game plans to use this, it will write a 'jmp' instruction into CBF8, and then write the address of the real handler routine into CBF9-CBFA. A IRQ can be generated by button 4 on console 2. CBFB CBFC-CBFD CBFB has been specified by the OS ROM as the location to vector to whenever a swi1 or NMI interrupt occurs. Normally, when a game plans to use this, it will write a 'jmp' instruction into CBFB, and then write the address of the real handler routine into CBFC-CBFD. CBFE-CBFF Set to the value 0x7321 after the system is first powered up. This serves as a flag to determine whether or not a complete cold start needs to be performed. If this location does not equal 0x7321 (as it won't when the system is powered up the first time), then a cold start is done. ============================================================================ MINESTORM --------- C880 This contains the enable mask used when Minestorm wants to read the console buttons. C881-C882 This contains the mask used by Minestorm when it wants to read the joystick state. This mask will be used for both the console 1 & 2 pots; the console 2 ones are ignored. C883 Used when calculating the angle at which a magnetic mine will travel, as it is drawn toward the command ship. It will end up holding the new angle value. C884-C886 Not used. C887-C888 Used when calculating the value of a mine; contains any bonus for the mine size. C889-C88A Used when calculating the value of a mine; contains the base value for the mine type; the mine size bonus is later added in. C88B Work variable. C88C-C88E Not used. C88F This is used as a loop counter during bullet processing. C890-C891 Work variables. C892-C89A Not used. C89B This indicates which players turn it is: 0 -> Player 1 2 -> Player 2 C89C C89D-C89E These locations are used as an indirect jump pointer and counter pair. The address of the routine to be called is placed in C89D-C89E, and a value is placed in C89C. Each time through the main loop, the counter is decremented. When the value finally reaches 0, the routine will be called. By using random counters, you can make things behave differently each time. C89F C8A0-C8A1 These locations are used as an indirect jump pointer and counter pair. The address of the routine to be called is placed in C8A0-C8A1, and a value is placed in C89F. Each time through the main loop, the counter is decremented. When the value finally reaches 0, the routine will be called. By using random counters, you can make things behave differently each time. C8A2 C8A3-C8A4 These locations are used as an indirect jump pointer and counter pair. The address of the routine to be called is placed in C8A3-C8A4, and a value is placed in C8A2. Each time through the main loop, the counter is decremented. When the value finally reaches 0, the routine will be called. By using random counters, you can make things behave differently each time. C8A5 C8A6-C8A7 These locations are used as an indirect jump pointer and counter pair. The address of the routine to be called is placed in C8A6-C8A7, and a value is placed in C8A5. Each time through the main loop, the counter is decremented. When the value finally reaches 0, the routine will be called. By using random counters, you can make things behave differently each time. C8A8-C8AE This is a 7 byte buffer, used to contain player 1's score string. The string has the following format: " 0",0x80 C8AF-C8B5 This is a 7 byte buffer, used to contain player 2's score string. The string has the following format: " 0",0x80 C8B6 Flags that a bullet sound should be made. C8B7 Used as a loop counter during initial screen seeding. C8B8 Used as a temporary variable in several places. Saves number of mines, during screen re-seeding. C8B9-C8BA Points to an entry in the mine buffer; used during screen re-seeding. C8BB-C8BC Not used. C8BD Flags that the command ship has been disabled. C8BE Set when the active player has no more command ships to play with. C8BF During a screen re-seed operation (when the user has cleared all but small mines), this keeps track of the number of mines which still need to be re-seeded by the mother ship. C8C0 This flags that a new mine has been made visible, during screen re-seeding. C8C1 Used as a loop counter during mine re-seeding. C8C2-C8C3 This contains a pointer into the structure describing which mines are visible at the level the active player is at. C8C4-C8C5 This contains a pointer into the structure describing which mines are visible at the level that player 1 is at. C8C6-C8C7 This contains a pointer into the structure describing which mines are visible at the level that player 2 is at. C8C8-C8C9 This contains the y coordinate of the command ship. when drawing the command ship, only the upper byte (C8C8) is used. The lower byte is there only to make motion graceful; i.e. when the ship is moving, the motion delta is added into the lower byte (C8C9), and the ship will only end up moving, when the lower byte overflows into the upper byte. C8CA-C8CB This contains the x coordinate of the command ship. when drawing the command ship, only the upper byte (C8CA) is used. The lower byte is there only to make motion graceful; i.e. when the ship is moving, the motion delta is added into the lower byte (C8CB), and the ship will only end up moving, when the lower byte overflows into the upper byte. C8CC-C8CD C8CE-C8CF C8D0-C8D1 C8D2-C8D3 Used when calculating ship movement. C8D4 This contains the rotation value for the command ship. C8D5 This contains the velocity of the command ship. C8D6 C8D7 C8D8 These are used when calculating the x and y position for the command ship, while it is moving. C8D9 This contains the extra ship count for the active player. C8DA This contains the extra ship count for player 1. C8DB This contains the extra ship count for player 2. C8DC-C8DD Contains the position (y,x) at which the enemy mother ship is to be drawn. C8DE-C8DF Used to calculate the y coordinate of the enemy mother ship, during screen re-seeding. C8E0-C8E1 Used to calculate the x coordinate of the enemy mother ship, during screen re-seeding. C8E2-C8E3 Used to calculate the y coordinate of the enemy mother ship, during screen re-seeding. C8E4-C8E5 Used to calculate the x coordinate of the enemy mother ship, during screen re-seeding. C8E6 This contains the value which indicates at what angle a re-seeded mine will drift. C8E7 Flags that the enemy mother ship is out re-seeding the screen, because the user has cleared all but some small mines. C8E8-C8E9 Use as temporary storage for a pointer. C8EA This contains the number of active bullets. C8EB This is used to keep track of the number of active (those which are floating around) mines. C8EC This is set after the command ship has started exploding, and is cleared when the command ship explosion has completed. C8ED This contains the number of unused mines; i.e. those which are still dots. C8EE Flags that a hyperspace is active. C8EF This contains the scale factor to be used the next time the hyperspace dots are drawn. This value is decremented by 4 each time throught the loop, until the lower limit is reached; at that point, the hyperspace is complete. C8F0-C8F1 This serves as the end of game loop counter; after a game is over, the system waits awhile (unless you press a button) before it starts a new game automatically. When this value decrements to 0, the new game starts. C8F2 Flags that the command ship movement sound should be made. C8F3 Flags that an explosion sound should be made. C8F4 Flags that a sound for a new mine 'popping' up should be made. C8F5 Not used. C8F6 Flags that the hyperspace sound should be made. C8F7 Used as a counter, while the command ship is being destroyed. C8F8 Contains the scale factor which is used to draw the enemy mother ship, as it is being destroyed. This is incremented, to give the effect of the ship being destroyed, and the parts separating. C8F9-C8FF This is a 7 byte buffer, used to contain player 1's level string. The string has the following format: " 0",0x80 C900-C906 This is a 7 byte buffer, used to contain player 2's level string. The string has the following format: " 0",0x80 C907-C908 C909-C90A These are used to contain some calculated values, which are used to transform the command ships coordinates. These values pertain to rotation, and could possibly be sin & cos values. Actually, I think they are rise run values. C90B-C932 This is a 40 byte buffer, used to keep track of active bullets. The buffer is composed of 4 entries, each of 10 bytes. Upto 4 bullets may be active at any moment. See the section on Data Structures, for an explanation of how this buffer is used. C933-CB2A This is a 504 byte buffer, used to keep track of all of the mines (both active, inactive & dead). The buffer is composed of 28 entries, each of 18 bytes. See the section on Data Structures, for an explanation of how this buffer is used. CB2B-CB70 This is a 70 byte buffer, used to keep track of explosions which are currently being displayed. The buffer is composed of 14 entries, each of 5 bytes. Obviously, only upto 14 explosions can be displayed at any one time. See the section on Data Structures, for an explanation of how this buffer is used. CB71-CB80 This is an array of 8 pointers. Each of these pointers point to a set of motion dots, which are drawn as the ship (and user) move to the next mine level. They are meant to simulate ship motion. CB81-CB88 This is an array of 8 scale factors. The scale factors are used when the corresponding set of motion dots (see above entry) are drawn. CB89-CBA2 This is a 26 byte buffer, used to hold the transformated points which make up the command ship. The values here are produced by taking the command ship points, and running them through a rotation transformation. CBA3-CBA6 Not used. CBA7-CBB3 This is a 13 byte buffer, used to hold the transformated points which make up a fire ball. These are re-transformed every so often, to give the fireball the effect of rotating. ========================================================================== DATA STRUCTURES --------------- Bullet Structure Each entry in the bullet structure is composed of 10 bytes. The format for an entry is as follows: ------------------- 0 | in-use flag | 0 = not in use; 1 = in use ------------------- 1 | Rise | - - 2 | Value | ------------------- 3 | Run | - - 4 | Value | ------------------- 5 | Bullet y | - - 6 | Coordinate | ------------------- 7 | Bullet x | - - 8 | Coordinate | ------------------- 9 | Life span | Amount of time (iterations) until bullet ------------------- dies (disappears) Mine Structure Each entry in the mine structure is 18 bytes, and has the following format: ------------------- 0 | State flag | (see note 1) ------------------- 1 | Mine type | (see note 2) ------------------- 2 | Scale Factor | ------------------- 3 | Generation # | (see note 3) ------------------- 4 | Mine y | - - 5 | Coordinate | ------------------- 6 | Mine x | - - 7 | Coordinate | ------------------- 8 | Rise | - - 9 | Value | ------------------- 10 | Run | - - 11 | Value | ------------------- 12 | Width of mine/2 | ------------------- 13 | Height of mine/2| ------------------- 14 | Value of | - - 15 | Mine (BCD) | ------------------- 16 | (see note 4) | ------------------- 17 | final x postion | ------------------- note1 : The state flag is used to indicate what the state of this mine is. It can take on one of the following values: 0x00 There is no mine defined by this entry. 0x01 This mine is in the process of being destroyed. 0x08 This mine is visible, and moving. 0x10 This mine is visible, but not yet moving. 0x20 This mine is just becoming visible. 0x40 This mine is still a dot. 0x80 This mine is still moving to its final x position. The life of a mine follows the story presented below. Before a mine is defined, the state is 0x00. When a mine is first being seeded, a final x position is calculated, and the mine is 'dropped' from the mother ship; the state is now 0x80. It will drift off in the x direction, until it reaches its final x position; the state is now 0x40. As the mine is first made visble, the state will become 0x20. Once a mine is visible, it does not immediately start moving; the state is now 0x10. Once the mine starts moving, the state becomes 0x08. When (if) the mine is ever destroyed, the state will be 0x01 while the explosion pattern is displayed. When the explosion pattern is complete, the state will revert back to 0x00. note2 : The mine type can take on any of the following 5 values: 0 dumb mine 1 magnetic mine 2 fireball mine 3 magnetic fireball 4 fireball note3 : The generation number indicates whether the mine is a large (3), medium (2) or small (1) mine. note4 : Depending upon the state of the mine, this field can mean 1 of 3 things: 1) When the mine is a dot, moving towards its final resting place, this contains the delta x value; i.e. how much it should move each time, until it reaches its final resting place. 2) If this is a large mine, then when the mine first 'pops' up, it doesn't go right from a dot to a large mine; rather, it goes from a dot to a small mine, to a medium mine, and then to a large mine. It this case, this field contains the scale factor which is used to draw the large mine as it 'pops' up. 3) Once a mine becomes visible, it does not immediately begin to move; it stays stationary for a short amount of time. In this case, this field contains a counter value, which says how long the mine should remain stationary. Explosion Buffer Each entry in the explosion buffer is 5 bytes long, and has the following format: ----------------------- 0 | Type of explosion | (see note 5) ----------------------- 1 | Max scale factor | ----------------------- 2 | Y coordinate | ----------------------- 3 | X coordinate | ----------------------- 4 |Current scale factor | ----------------------- note5: The type field can assume any of the following values: 0 = This does not define an active explosion. 0x81 = This is a command ship explosion. all other = This is a mine/enemy ship explosion. + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!elroy.jpl.nasa.gov!swrinde!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Exec Rom source Date: 24 Aug 1994 14:24:53 GMT Organization: Computer Science Dept., Univ. of Western Ontario, London, Canada Lines: 4966 Distribution: world Message-ID: <33fl7l$1go@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca From fred@hpcvusc.cv.hp.com Wed Aug 24 09:48 EDT 1994 Date: Wed, 24 Aug 1994 06:47:26 -0700 From: Fred Taft To: magundi@uwo.ca Subject: Exec Rom source Status: O /* * This work was originally done by Fred Taft (fred@hp-pcd.cv.hp.com). * Please forward any comments, corrections or additions back to Fred. * * Exec Rom */ .org 0xF000 /* * The executive OS code starts running here, each time * the system is reset or powered up. */ start_of_OS_ROM: F000 10CECBEA lds #0xCBEA; /* Set up stack pointer. */ F004 BDF18B jsr $reinit; F007 CC7321 ldd #0x7321; F00A 10B3CBFE cmpd $CBFE; /* See if cold start is necessary. */ F00E 275C beq PF06C; F010 FDCBFE std $CBFE; F013 7CC83B inc $C83B; F016 8ECBEB ldx #0xCBEB; F019 BDF84F jsr $set_dft_score; /* Start of initial powerup loop */ powerup_loop: F01C BDF1AF jsr $dptoC8; F01F DC25 ldd 0x25; F021 10830101 cmpd #0x0101; /* Once we have looped 257 time, */ F025 2602 bne PF029; /* flag that it is alright to start */ F027 D756 stb 0x56; /* playing the intro music. */ /* Load the line pattern used for drawing boundary lines */ F029 57 PF029: asrb; F02A C403 andb #0x03; F02C 8EF0FD ldx #line_patterns; F02F E685 ldb b,x; F031 D729 stb 0x29; F033 C602 ldb #0x02; F035 D724 stb 0x24; /* Play the introductory song */ F037 CEFD0D ldu #intro_music_block; F03A BDF687 jsr $init_sound; F03D BDF192 jsr $waitrecal; F040 BDF289 jsr $do_sound; /* Display the Vectrex power-up message */ F043 BDF2A9 jsr $intensity_to_7F; F046 B6C826 lda $C826; F049 CEF10C ldu #vectrex_string; F04C 8520 bita #0x20; /* Determine if double or single */ F04E 2702 beq PF052; /* Vectrex string should be shown. */ F050 334C leau 12,u; F052 BDF385 PF052: jsr $printu; /* Draw the edge boundary boxes */ F055 8EF0E9 ldx #intro_box; F058 BDF308 PF058: jsr $move_penFF; F05B 8603 lda #0x03; F05D BDF434 jsr $dwp_with_count; F060 7AC824 dec $C824; F063 26F3 bne PF058; F065 B6C825 lda $C825; F068 8101 cmpa #0x01; F06A 23B0 bls powerup_loop; /* End of initial powerup loop */ /* Prepare to check to see if a valid ROM is installed */ F06C BDF1AF PF06C: jsr $dptoC8; F06F 86CC lda #0xCC; F071 9729 sta 0x29; F073 CCF101 ldd #gce_copyright_string; F076 DD39 std 0x39; F078 0F25 clr 0x25; F07A 0F26 clr 0x26; /* Check to see if a valid game ROM is installed */ F07C CE0000 ldu #0x0000; F07F 8EF101 ldx #gce_copyright_string; F082 C60B ldb #0x0B; F084 A6C0 PF084: lda ,u+; F086 A180 cmpa ,x+; F088 270D beq PF097; F08A C101 cmpb #0x01; F08C 2704 beq PF092; F08E C105 cmpb #0x05; F090 2305 bls PF097; F092 CEE000 PF092: ldu #0xE000; F095 2007 bra PF09E; F097 5A PF097: decb; F098 26EA bne PF084; F09A D739 stb 0x39; /* Save address of game cartridge's */ F09C D73A stb 0x3A; /* copyright string. */ /* Prepare to play the game's introductory tune */ F09E 0C56 PF09E: inc 0x56; F0A0 DF37 stu 0x37; F0A2 EEC4 ldu ,u; /* Start of second powerup loop */ powerup_loop2: F0A4 BDF1AF jsr $dptoC8; F0A7 CCF848 ldd #0xF848; F0AA DD2A std 0x2A; /* Start playing the tune */ F0AC BDF687 jsr $init_sound; F0AF BDF192 jsr $waitrecal; F0B2 BDF289 jsr $do_sound; /* Display cartridges 'gce' copyright string */ F0B5 BDF2A9 jsr $intensity_to_7F; F0B8 CCC0C0 ldd #0xC0C0; F0BB FEC839 ldu $C839; F0BE BDF37A jsr $print_at_d; /* Display the current high score, if any */ F0C1 B6C83B lda $C83B; F0C4 260C bne PF0D2; F0C6 4A deca; F0C7 CECBEB ldu #0xCBEB; F0CA A746 sta 6,u; F0CC CC68D0 ldd #0x68D0; F0CF BDF37A jsr $print_at_d; /* Display the name of the game cartridge */ F0D2 FEC837 PF0D2: ldu $C837; F0D5 3342 leau 2,u; F0D7 BDF385 jsr $printu; F0DA B6C856 lda $C856; F0DD 26C5 bne powerup_loop2; F0DF BEC825 ldx $C825; F0E2 8C007D cmpx #0x007D; F0E5 23BD bls powerup_loop2; /* End of second powerup loop */ /* Jump to the start of the current game */ F0E7 6E41 jmp 1,u; /* Vector list (y,x) for outer boundary box */ intro_box: F0E9 40 .byte 0x40,0xD6; F0EB 00 .byte 0x00,0x56; F0ED 81 .byte 0x81,0x00; F0EF 00 .byte 0x00,0xA9; F0F1 7E .byte 0x7E,0x00; /* Vector list (y,x) for inner boundary box */ intro_box2: F0F3 39 .byte 0x39,0xDC; F0F5 8E .byte 0x8E,0x00; F0F7 00 .byte 0x00,0x4A; F0F9 72 .byte 0x72,0x00; F0FB 00 .byte 0x00,0xB6; /* Line patterns used when drawing boundary boxes */ line_patterns: F0FD E0 .byte 0xE0; /* Pattern = 11100000 */ F0FE 38 .byte 0x38; /* Pattern = 00111000 */ F0FF 0E .byte 0x0E; /* Pattern = 00001110 */ F100 03 .byte 0x03; /* Pattern = 00000011 */ /* Copyright string used to check for valid game ROM */ gce_copyright_string: F101 67 .byte "g GCE 1982",0x80; /* Introductory Vectrex title string */ vectrex_string: F10C F1 .byte 0xF1; /* height */ F10D 60 .byte 0x60; /* width */ F10E 27 .byte 0x27; /* rel y */ F10F CF .byte 0xCF; /* rel x */ F110 56 .byte "VECTREX",0x80; F118 F3 .byte 0xF3; /* height */ F119 60 .byte 0x60; /* width */ F11A 26 .byte 0x26; /* rel y */ F11B CF .byte 0xCF; /* rel x */ F11C 56 .byte "VECTREX",0x80; F124 FC .byte 0xFC; /* height */ F125 60 .byte 0x60; /* width */ F126 DF .byte 0xDF; /* rel y */ F127 E9 .byte 0xE9; /* rel x */ F128 47 .byte "GCE",0x80; F12C FC .byte 0xFC; /* height */ F12D 38 .byte 0x38; /* width */ F12E CC .byte 0xCC; /* rel y */ F12F D1 .byte 0xD1; /* rel x */ F130 45 .byte "ENTERTAINING",0x80; F13D FC .byte 0xFC; /* height */ F13E 38 .byte 0x38; /* width */ F13F BC .byte 0xBC; /* rel y */ F140 DC .byte 0xDC; /* rel x */ F141 4E .byte "NEW IDEAS",0x80, 0x00; /* * init_PIA_chip() * * This routine is invoked during powerup, to initialize * the PIA chip. Among other things, it initializes the * scale factor to 0x7F, and set the direction for the * A and B data lines. * * At exit: * Dp will be set to D0. */ init_PIA_chip: F14C 8D5C bsr dptoD0; F14E CC9FFF ldd #0x9FFF; F151 DD02 std 0x02; F153 CC0100 ldd #0x0100; F156 DD00 std 0x00; F158 CC987F ldd #0x987F; F15B 970B sta 0x0B; F15D D704 stb 0x04; F15F BDF354 jsr $reset0ref; F162 203E bra set_refresh; /* * initialize_OS_RAM() * * This routine first clears the block of RAM in the * range C800 to C87A, and then it initializes the * dot dwell time, the refresh time, and the joystick * enable flags. * * At exit: * Dp will be set to C8. */ initialize_OS_RAM: F164 8D49 bsr dptoC8; F166 C67A ldb #0x7A; F168 8EC800 ldx #0xC800; F16B BDF53F jsr $clear_blockxb; F16E CCC87D ldd #0xC87D; F171 DD7B std 0x7B; init_flags1: F173 0C7D inc 0x7D; F175 27FC beq init_flags1; F177 8605 lda #0x05; F179 9728 sta 0x28; F17B CC3075 ldd #0x3075; F17E DD3D std 0x3D; F180 CC0103 ldd #0x0103; F183 DD1F std 0x1F; F185 CC0507 ldd #0x0507; F188 DD21 std 0x21; F18A 39 rts; /* * reinit() * * This routine is responsible for setting up the initial * system state, each time the system is either reset or * powered up. It will initialize the OS RAM area, * initialize the PIA chip, and then clear out all the * registers on the sound chip. * * At exit: * Dp will be set to D0. */ reinit: F18B 8DD7 bsr initialize_OS_RAM; F18D 8DBD bsr init_PIA_chip; F18F 7EF272 jmp $clear_sound_chip; /* * waitrecal() * * Wait for t2 (the refresh timer) to timeout, then restart * it using the value ic C83D. then, recalibrate the * vector generators to the origin (0,0). This routine * MUST be called once every refresh cycle, or your vectors * will get out of whack. This routine calls reset0ref, * so the integrators are left in zero mode. * * At exit: * Dp will be set to D0. */ waitrecal: F192 BEC825 ldx $C825; F195 3001 leax 1,x; /* Increment loop counter. */ F197 BFC825 stx $C825; F19A 8D0E bsr dptoD0; F19C 8620 lda #0x20; F19E 950D PF19E: bita 0x0D; F1A0 27FC beq PF19E; /* * set_refresh() * * This routine loads the refresh timer (t2) with the value * in C83D-C83E, and recalibrates the vector generators, * thus causing the pen to be left at the origin (0,0). * The high order byte for the timer is loaded from C83E, * and the low order byte is loaded from C83D. The * refresh rate is calculated as follows: * * rate = (C83E)(C83D) / 1.5 mhz * * At entry: * Dp must be D0. */ set_refresh: F1A2 FCC83D ldd $C83D; F1A5 DD08 std 0x08; F1A7 7EF2E6 jmp $PF2E6; /* * dptoD0() * * Sets the dp register to D0, so that all direct addresses * will start at D000 (the hardware I/O area). * * At exit: * Dp will be set to D0. * 'a' will be trashed. */ dptoD0: F1AA 86D0 lda #0xD0; F1AC 1F8B tfr a,dp; F1AE 39 rts; /* * dptoC8() * * Sets the Dp register to C8, so that all direct addresses * start at C800 (OS RAM area). * * At exit: * Dp will be set to C8. * 'a' will be trashed. */ dptoC8: F1AF 86C8 lda #0xC8; F1B1 1F8B tfr a,dp; F1B3 39 rts; /* * read_switches() * read_switches2() * * Both of these routines read the button states on the * two consoles, and return their state in the following * RAM locations: * * console 1, button 1: C812 * button 2: C813 * button 3: C814 * button 4: C815 * console 2, button 1: C816 * button 2: C817 * button 3: C818 * button 4: C819 * * Also, these routines provide several other pieces of * information which are useful: * * C80F: Contains current state of all buttons; * 1 = depressed, 0 = not depressed * * C810: Contains state of all buttons from LAST * time these routines were called; if read_switches * was invoked, then this is AND'ed with the * passed in mask. * * For the above 2 bytes, bit 1 is console1:button1. * * If read_switches2() is called, then the current state * of all the buttons will be returned. * * If read_switches() is called, then a mask, passed in * in the 'a' register and having the following format, * will be used to determine how the buttons state info * is returned: * * bit 0 = console1:button1 * bit 1 = console1:button2 * etc * * If a bit is 0, then the current state of the button is * to be returned in the appropriate RAM location; * 0 = not pressed, and 1 = pressed. * * If a bit is 1, then the appropriate RAM location is set * to 1 only on the depression transition of the button; * additional calls will return 0, until the button is * released and then depressed again. * * At entry: * Dp must be set to D0. * 'a' must contain mask (for read_switches only) */ read_switches: F1B4 B4C80F anda $C80F; F1B7 B7C80F sta $C80F; read_switches2: F1BA 8EC812 ldx #0xC812; F1BD A61D lda -3,x; F1BF A71E sta -2,x; F1C1 860E lda #0x0E; F1C3 9701 sta 0x01; F1C5 CC1901 ldd #0x1901; F1C8 9700 sta 0x00; F1CA 12 nop; F1CB D700 stb 0x00; F1CD 0F03 clr 0x03; F1CF CC0901 ldd #0x0901; F1D2 9700 sta 0x00; F1D4 12 nop; F1D5 9601 lda 0x01; F1D7 43 coma; F1D8 A71D sta -3,x; F1DA D700 stb 0x00; F1DC C6FF ldb #0xFF; F1DE D703 stb 0x03; F1E0 43 coma; F1E1 AA1E ora -2,x; F1E3 43 coma; F1E4 A71F sta -1,x; F1E6 3402 pshs a; F1E8 C601 ldb #0x01; F1EA 1F98 PF1EA: tfr b,a; F1EC A4E4 anda ,s; F1EE A780 sta ,x+; F1F0 58 aslb; F1F1 26F7 bne PF1EA; F1F3 3582 puls a,pc; F1F5 7AC823 PF1F5: dec $C823; /* * read_jstick() * * This routine reads the current positions of the joysticks * on the two consoles. Before calling this routine, some * prior setup is required. Firstly, the joystick enable * flags (C81F-C822) must be initialized to one of the * following values: * * 0 - ignore; return no value. * 1 - return state of console 1 left/right position. * 3 - return state of console 1 up/down position. * 5 - return state of console 2 left/right position. * 7 - return state of console 2 up/down position. * * The joystick values are returned in C81B-C81E, where the * value returned in C81B corresponds to the mask set in * in C81F, and so on and so forth. * * Location C823 is used to determine what kind of input * conversion should be performed, and how the data should * be returned to the calling procedure. Valid choices are: * * >= 0 The return value will be: * < 0 if joystick is left of down of center. * = 0 if joystick is centered. * > 0 if joystick is right or up of center. * * < 0 A successive approximation algorithm is used * read the actual value of the joystick pot, a * signed value. In this case, C81A must be set * to a power of 2, to control conversion * resolution; 0x80 is least accurate, and 0x00 * is most accurate. * * At entry: * Dp must be set to D0. * * At exit: * C823 is cleared. */ read_jstick: F1F8 8EC81F ldx #0xC81F; next_pot: F1FB A680 lda ,x+; F1FD 260C bne process_a_pot; check_4_done: F1FF 8CC823 cmpx #0xC823; F202 26F7 bne next_pot; F204 6F84 clr ,x; F206 8601 lda #0x01; F208 9700 sta 0x00; F20A 39 rts; process_a_pot: F20B 9700 sta 0x00; F20D 0F01 clr 0x01; F20F 0A00 dec 0x00; F211 C660 ldb #0x60; /* "`" */ F213 5C PF213: incb; F214 2AFD bpl PF213; F216 B6C823 lda $C823; F219 2B25 bmi use_approx; F21B 8620 lda #0x20; /* " " */ F21D 0C00 inc 0x00; F21F 9500 bita 0x00; F221 270A beq left_or_down; F223 C640 ldb #0x40; /* "@" */ F225 D701 stb 0x01; F227 9500 bita 0x00; F229 260B bne save_jstick_state; F22B 2008 bra centered; left_or_down: F22D C6C0 ldb #0xC0; F22F D701 stb 0x01; F231 9500 bita 0x00; F233 2701 beq save_jstick_state; centered: F235 5F clrb; save_jstick_state: F236 E71B stb -5,x; F238 20C5 bra check_4_done; try_again: F23A 1F98 tfr b,a; F23C 9A01 ora 0x01; F23E 9701 sta 0x01; use_approx: F240 8620 lda #0x20; F242 9500 bita 0x00; F244 2606 bne check_resolution; F246 1F98 tfr b,a; F248 9801 eora 0x01; F24A 9701 sta 0x01; check_resolution: F24C 54 lsrb; F24D F1C81A cmpb $C81A; F250 26E8 bne try_again; F252 D601 ldb 0x01; F254 20E0 bra save_jstick_state; /* * byte_2_sound_chip() * byte_2_sound_chip2() * * Both of these routines cause a byte of music data to * be written to the music chip, and also stored in the * the appropriate RAM location in the range C800-C80E. * * At entry: (both) * 'a' = indicates which one of the 15 music registers * is to be modified. * 'b' = the byte of music data. * * At entry: (byte_2_sound_chip2 only) * 'x' = base address of RAM area where a copy of music * data is to be stored. * * For byte_2_sound_chip(), the base address is forced to * be C800. * * At entry, Dp must be set to D0. */ byte_2_sound_chip: F256 8EC800 ldx #0xC800; byte_2_sound_chip2: F259 E786 stb a,x; F25B 9701 sta 0x01; F25D 8619 lda #0x19; F25F 9700 sta 0x00; F261 8601 lda #0x01; F263 9700 sta 0x00; F265 9601 lda 0x01; F267 D701 stb 0x01; F269 C611 ldb #0x11; F26B D700 stb 0x00; F26D C601 ldb #0x01; F26F D700 stb 0x00; F271 39 rts; /* * clear_sound_chip() * * This routine clears the 15 registers on the music chip * and the soft copy of their values (C800-C80E), by writing * a byte of 0 to each register. This causes the sound chip * to not make any sounds. * * At entry: * Dp must be set to D0. */ clear_sound_chip: F272 CC0E00 ldd #0x0E00; F275 8DDF PF275: bsr byte_2_sound_chip; F277 4A deca; F278 2AFB bpl PF275; F27A 7EF533 jmp $init_music_buf; /* * copy_bytes_2_sound_chip() * * This routine copies a block of sound information into * the sound chip buffer (at C800-C80E) and into the * registers on the music chip. The format for the block * of sound data is as follows: * * (register number), (music data), * (register number), (music data), * . . * . . * 0xFF * * As long as the register number is >= 0, then the music * data will be copied; however, as soon as a register * number < 0 is encountered, the copy will stop. * * At entry: * 'u' contains a pointer to the block of sound data. * * Dp must be set to D0. */ copy_bytes_2_sound_chip: F27D 8EC800 ldx #0xC800; F280 2002 bra PF284; F282 8DD5 PF282: bsr byte_2_sound_chip2; F284 ECC1 PF284: ldd ,u++; F286 2AFA bpl PF282; F288 39 rts; /* * do_sound() * * This routine will start/continue making the sound which * was first set up by your call to init_sound(). This * routine should normally be called right after your call * to waitrecal(). It takes the next music information, * contained in the music buffer C83F-C84C, and updates only * those registers which differ from the last data written * to the sound chip. * * At entry, Dp must be set to D0. */ do_sound: F289 8EC800 ldx #0xC800; F28C CEC83F ldu #0xC83F; F28F 860D lda #0x0D; F291 E6C0 PF291: ldb ,u+; F293 E186 cmpb a,x; F295 2702 beq PF299; F297 8DC0 bsr byte_2_sound_chip2; F299 4A PF299: deca; F29A 2AF5 bpl PF291; F29C 39 rts; /* * intensity_to_1F() * intensity_to_3F() * intensity_to_5F() * intensity_to_7F() * intensity_to_a() * * Each of these routines are responsible for setting the * vector/dot intensity (commonly used to denote the z axis) * to a specific value. 0x00 is the lowest intensity, and * 0xFF is the brightest intensity. The intensity must * be reset to the desired value after each call to * waitrecal(); however, it can also be changed at any other * time. A copy of the new intensity value is saved in * C827. * * At entry: (for intensity_to_a() only) * 'a' must contain the new intensity value. * * Dp must be set to D0. */ intensity_to_1F: F29D 861F lda #0x1F; F29F 200A bra intensity_to_a; intensity_to_3F: F2A1 863F lda #0x3F; F2A3 2006 bra intensity_to_a; intensity_to_5F: F2A5 865F lda #0x5F; F2A7 2002 bra intensity_to_a; intensity_to_7F: F2A9 867F lda #0x7F; intensity_to_a: F2AB 9701 sta 0x01; F2AD B7C827 sta $C827; F2B0 CC0504 ldd #0x0504; F2B3 9700 sta 0x00; F2B5 D700 stb 0x00; F2B7 D700 stb 0x00; F2B9 C601 ldb #0x01; F2BB D700 stb 0x00; F2BD 39 rts; /* * dotixb() * * This routine draws a dot at the relative y and * relative x position pointed to by the 'x' register. * Afterwards, the 'x' register is incremented by 2. * The intensity to be used is passed in in the 'b' * register, and this value is saved in C828. * * At entry: * 'x' points to the (y,x) coordinate pair. * 'b' contains intensity. * * At exit: * 'x' has been incremented by 2. * * Dp must be set to D0. */ dotixb: F2BE F7C828 stb $C828; /* * dotix() * * This routine draws a dot at the relative y and * relative x position pointed to by the 'x' register. * Afterwards, the 'x' register is incremented by 2. * The intensity used is the value already stored in C828. * * At entry: * 'x' points to the (y,x) coordinate pair. * * At exit: * 'x' has been incremented by 2. * * Dp must be set to D0. */ dotix: F2C1 EC81 ldd ,x++; /* * dot_at_d() * * This routine draws a dot at the relative y and * relative x position contained in the 'd' register. * The intensity used is the value already stored in C828. * * At entry: * 'a' contains the relative y coordinate. * 'b' contains the relative x coordinate. * * Dp must be set to D0. */ dot_at_d: F2C3 8D4D bsr move_pen_d; /* * dot_at_current_position() * * This routine draws a dot at the current pen position. * The intensity used is the value already stored in C828. * * Dp must be set to D0. */ dot_at_current_position: F2C5 86FF lda #0xFF; F2C7 970A sta 0x0A; F2C9 F6C828 ldb $C828; F2CC 5A PF2CC: decb; F2CD 26FD bne PF2CC; F2CF 0F0A clr 0x0A; F2D1 39 rts; /* * dot_list() * * This routine draws a series of dots, using the intensity * already set up in C828. The format for the dot list, which * is pointed to by the 'x' register, is: * * ( rel y, rel x), (rel y, rel x), ..... * * The number of dots to draw is specified in C823. * * At entry: * 'x' points to the list of dot coordinates. * C823 specifies the number of dots to draw. * * Dp must be set to D0. */ next_dot: F2D2 7AC823 dec $C823; dot_list: F2D5 8DEA bsr PF2C1; F2D7 B6C823 lda $C823; F2DA 26F6 bne next_dot; F2DC 2076 bra reset0ref; /* * dotix_then_reset() * * This routine draws a series of dots, specified by the * list pointed to by the 'x' register. The list has the * following format: * * mode, relative y, relative x, * mode, relative y, relative x, * . . . * . . . * mode, relative y, relative x * * This routine will continue to traverse the list, until * a mode > 0 is encountered; at that point, it will reset * the 0 reference (the integrators). * * At entry: * 'x' points to the dot list. * * At exit: * 'x' will point to the relative y coordinate associated * with the mode which cause the routine to stop. * * Dp must be set to D0. */ dotix_then_reset: F2DE A680 lda ,x+; F2E0 2E72 bgt reset0ref; F2E2 8DDD bsr PF2C1; F2E4 20F8 bra dotix_then_reset; F2E6 8EF9F0 PF2E6: ldx #0xF9F0; F2E9 8D1D bsr move_penFF; F2EB BDF36B jsr $PF36B; F2EE 8D20 bsr move_pen; F2F0 2062 bra reset0ref; /* * move_pen_7F_no_inc() * * This routine forces the scale factor to 0x7F, and then * moves the pen to the location pointed to by the 'x' * register. The relative y and relative x coordinates * are both 2 byte quantities; however, only the most signicant * byte of each is of any interest. The values pointed to * by the 'x' register have the following format: * * 'x' => (rel y hi),(rel y lo), (rel x hi), (rel x lo) * * The position moved to is obtained by y=(0,x) & x=(2,x). * * At entry: * 'x' points to double sized coordinate pair. * * Dp must be set to D0. */ move_pen7F_no_inc: F2F2 C67F ldb #0x7F; F2F4 D704 stb 0x04; F2F6 A684 lda ,x; F2F8 E602 ldb 2,x; F2FA 2016 bra move_pen_d; /* * move_pen7F_to_d() * * This routine forces the scale factor to 0x7F, and then * moves the pen to the position specified in the 'd' * register. * * At entry: * 'a' must contain the relative y coordinate. * 'b' must contain the relative x coordinate. * * Dp must be set to D0. */ move_pen7F_to_d: F2FC 9701 sta 0x01; F2FE 3406 pshs a,b; F300 867F lda #0x7F; F302 9704 sta 0x04; F304 0F00 clr 0x00; F306 2010 bra PF318; /* * move_penFF() * * This routine forces the scale factor to 0xFF, and then * moves the pen to the (y,x) position pointed to by the * 'x' register. The 'x' register is then incremented by 2. * * At entry: * 'x' points to the (y,x) coordinate pair. * * At exit: * 'x' has been incremented by 2. * * Dp must be set to D0. */ move_penFF: F308 C6FF ldb #0xFF; F30A 2002 bra set_scale_factor; /* * move_pen7F() * * This routine forces the scale factor to 0x7F, and then * moves the pen to the (y,x) position pointed to by the * 'x' register. The 'x' register is then incremented by 2. * * At entry: * 'x' points to the (y,x) coordinate pair. * * At exit: * 'x' has been incremented by 2. * * Dp must be set to D0. */ move_pen7F: F30C C67F ldb #0x7F; set_scale_factor: F30E D704 stb 0x04; /* * This routine uses the current scale factor, and * moves the pen to the (y,x) position pointed to by the * 'x' register. The 'x' register is then incremented by 2. * * At entry: * 'x' points to the (y,x) coordinate pair. * * At exit: * 'x' has been incremented by 2. * * Dp must be set to D0. */ move_pen: F310 EC81 ldd ,x++; /* move_pen_d() * * This routine uses the current scale factor, and * moves the pen to the (y,x) position specified in the * 'd' register. 'a' contains the y coordinate, and 'b' * contains the x coordinate. * * At entry: * 'a' contains the y coordinate. * 'b' contains the x coordinate. * * Dp must be set to D0. */ move_pen_d: F312 9701 sta 0x01; F314 0F00 clr 0x00; F316 3406 pshs a,b; F318 86CE PF318: lda #0xCE; F31A 970C sta 0x0C; F31C 0F0A clr 0x0A; F31E 0C00 inc 0x00; F320 D701 stb 0x01; F322 0F05 clr 0x05; F324 3506 puls a,b; F326 BDF584 jsr $get_absolute_value_of_ab; F329 E77F stb -1,s; F32B AA7F ora -1,s; F32D C640 ldb #0x40; F32F 8140 cmpa #0x40; F331 2312 bls PF345; F333 8164 cmpa #0x64; F335 2304 bls PF33B; F337 8608 lda #0x08; F339 2002 bra PF33D; F33B 8604 PF33B: lda #0x04; F33D D50D PF33D: bitb 0x0D; F33F 27FC beq PF33D; F341 4A PF341: deca; F342 26FD bne PF341; F344 39 rts; F345 D50D PF345: bitb 0x0D; F347 27FC beq PF345; F349 39 rts; /* * set_dp_and_reset0ref() * * This routine sets the Dp register to D0, and then * resets the integrators. * * At exit: * Dp will be set to D0. */ set_dp_and_reset0ref: F34A BDF1AA jsr $dptoD0; F34D 2005 bra reset0ref; /* * check0ref() * * This routine will check to see if the reset0ref enable * flag (C824) is set, and if it is, then it will reset the * integrators, by calling reset0ref(). * * At entry: * Dp must be set to D0. */ check0ref: F34F B6C824 lda $C824; F352 2716 beq PF36A; /* * reset0ref() * * This routine zeros the integrators, and resets the pen * back to the origin. It leaves the integrators in zero * mode, so nothing can be drawn until a move is done, or * D00C is set to 0xCE. This routine must be called every * so often, to prevent your vectors from getting out of * whack. * * At entry: * Dp must be set to D0. */ reset0ref: F354 CC00CC ldd #0x00CC; F357 D70C stb 0x0C; F359 970A sta 0x0A; F35B CC0302 ldd #0x0302; F35E 0F01 clr 0x01; F360 9700 sta 0x00; F362 D700 stb 0x00; F364 D700 stb 0x00; F366 C601 ldb #0x01; F368 D700 stb 0x00; F36A 39 PF36A: rts; F36B CC00CC PF36B: ldd #0x00CC; F36E D70C stb 0x0C; F370 970A sta 0x0A; F372 39 rts; /* * print_1_string() * * This routine prints a single string (upto a 0x80). * The parameter block describing the string is pointed * to by the 'u' register. The format for the parameter * block is as follows: * * height, width, rel y, rel x, string, 0x80 * * At entry: * 'u' points to the string parameter block. * * At exit: * 'u' points to byte after terminating 0x80. * * Dp must be set to D0. */ print_1_string: F373 ECC1 ldd ,u++; /* Save height & width */ F375 FDC82A std $C82A; /* * print_with_dft_hw() * * This routine prints a single string (upto a 0x80), * using the default height and width, as stored in C82A. * The parameter block describing the string is pointed * to by the 'u' register. The format for the parameter * block is as follows: * * rel y, rel x, string, 0x80 * * At entry: * 'u' points to the string parameter block. * * At exit: * 'u' points to byte after the terminating 0x80. * * Dp must be set to D0. */ print_with_dft_hw: F378 ECC1 ldd ,u++; /* Get (y,x) position. */ /* * print_at_d() * * This routine prints a single string (upto a 0x80), * using the default height and width, as stored in C82A, * and at the pen position specified in the 'd' register. * The parameter block describing the string is pointed * to by the 'u' register. The format for the parameter * block is as follows: * * string, 0x80 * * At entry: * 'u' points to the string parameter block. * 'a' contains relative y position. * 'b' contains relative x position. * * At exit: * 'u' points to byte after the terminating 0x80. * * Dp must be set to D0. */ print_at_d: F37A BDF2FC jsr $move_pen7F_to_d; F37D BDF575 jsr $delay_b_1; F380 7EF495 jmp $display_string; /* * printu() * * This displays the group of strings described by the * parameter block which is pointed to by the 'u' register. * The string parameter block has the following format: * * height, width, rel y, rel x, string, 0x80, * height, width, rel y, rel x, string, 0x80, * 0x00 * * At entry: * 'u' points to string parameter block. * * Dp must be set to D0. */ initiate_printing: F383 8DEE bsr print_1_string; printu: F385 A6C4 lda ,u; F387 26FA bne initiate_printing; F389 39 rts; /* * printu2() * * This displays the group of strings described by the * parameter block which is pointed to by the 'u' register. * The string parameter block has the following format: * * rel y, rel x, string, 0x80, * rel y, rel x, string, 0x80, * 0x00 * * The current string height and width to which the hardware * is set will be used. * * This routine will first print the passed-in string, and * THEN check for the end of the string block. * * At entry: * 'u' points to string parameter block. * * Dp must be set to D0. */ printu2: F38A 8DEC bsr print_with_dft_hw; /* * printu3() * * This displays the group of strings described by the * parameter block which is pointed to by the 'u' register. * The string parameter block has the following format: * * rel y, rel x, string, 0x80, * rel y, rel x, string, 0x80, * 0x00 * * The current string height and width to which the hardware * is set will be used. * * This routine will first check for the end of the string * block, and THEN will print the string if the end of the * string block was not reached. * * At entry: * 'u' points to string parameter block. * * Dp must be set to D0. */ printu3: F38C A6C4 lda ,u; F38E 26FA bne printu2; F390 39 rts; /* * print_b_minus_a() * * This routine displays one of the following strings, * depending upon the passed in value in the 'b' register, * using the current string height and width values: * * value of 'b' "-" value of 'a' * * If 'b' > 9, then the infinity symbol is displayed. * The 'x' register points to the (y,x) coordinates * for where the string is to be displayed. * * At entry: * 'x' points to string coordinates. * 'a' contains a printable digit. * 'b' contains any value. * * Dp must be set to D0. */ print_b_minus_a: F391 AE84 ldx ,x; /* * print_b_minus_a2() * * This routine displays one of the following strings, * depending upon the passed in value in the 'b' register, * using the current string height and width values: * * value of 'b' "-" value of 'a' * * If 'b' > 9, then the infinity symbol is displayed. * The 'x' register contains the (y,x) coordinates * for where the string is to be displayed. * * At entry: * 'x' contains the string coordinates. * 'a' contains a printable digit. * 'b' contains any value. * * Dp must be set to D0. */ print_b_minus_a2: F393 3404 pshs b; F395 C680 ldb #0x80; F397 3378 leau -8,s; F399 3606 pshu a,b; F39B 3502 puls a; F39D 8109 cmpa #0x09; F39F 2302 bls PF3A3; F3A1 863C lda #0x3C; /* "<" */ F3A3 8B30 PF3A3: adda #0x30; /* "0" */ F3A5 C62D ldb #0x2D; /* "-" */ F3A7 3606 pshu a,b; F3A9 3610 pshu x; F3AB 20CB bra print_with_dft_hw; /* * move_then_draw_VL_with_count1() * * This routine moves to the first location specified in * vector list, and then draws lines between the rest of * coordinates in the list. The number of vectors to draw * is specified as the first byte in the vector list. The * current scale factor is used. The vector list must have * the following format: * * count, rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * * Dp must be set to D0. */ move_then_draw_VL_with_count1: F3AD A680 lda ,x+; F3AF 2008 bra move_then_draw_VL_with_count6; /* * move_then_draw_VL_with_count2() * * This routine moves to the first location specified in * vector list, and then draws lines between the rest of * coordinates in the list. The number of vectors to draw * must already be specified in C823. The scale factor to * use is specified in the 'b' register. The vector list * must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * 'b' contains the scale factor. * * Dp must be set to D0. */ move_then_draw_VL_with_count2: F3B1 D704 stb 0x04; F3B3 2007 bra move_then_draw_VL_with_count5; /* * move_then_draw_VL_with_count3() * * This routine moves to the first location specified in * vector list, and then draws lines between the rest of * coordinates in the list. The number of vectors to draw * is specified as the first byte in the vector list, and the * scale factor is the second byte in teh vector list. The * vector list must have the following format: * * count, scale, rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * * Dp must be set to D0. */ move_then_draw_VL_with_count3: F3B5 EC81 ldd ,x++; /* * move_then_draw_VL_with_count4() * * This routine moves to the first location specified in * vector list, and then draws lines between the rest of * coordinates in the list. The number of vectors to draw * is specified in the 'a' register, and the scale factor is * specified in the 'b' register. The vector list must have * the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * 'a' contains the number of vectors to draw. * 'b' contains the scale factor to use. * * Dp must be set to D0. */ move_then_draw_VL_with_count4: F3B7 D704 stb 0x04; /* * move_then_draw_VL_with_count6() * * This routine moves to the first location specified in * vector list, and then draws lines between the rest of * coordinates in the list. The number of vectors to draw * is specified in the 'a' register; the current scale factor * is used. The vector list must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * 'a' contains the number of vectors to draw. * * Dp must be set to D0. */ move_then_draw_VL_with_count6: F3B9 B7C823 sta $C823; /* * move_then_draw_VL_with_count5() * * This routine moves to the first location specified in * vector list, and then draws lines between the rest of * coordinates in the list. The number of vectors to draw * must be specified C823, and the current scale factor is * used. The vector list must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * * Dp must be set to D0. */ move_then_draw_VL_with_count5: F3BC EC84 ldd ,x; F3BE 9701 sta 0x01; F3C0 0F00 clr 0x00; F3C2 3002 leax 2,x; F3C4 12 nop; F3C5 0C00 inc 0x00; F3C7 D701 stb 0x01; F3C9 CC0000 ldd #0x0000; /* Set line pattern to invisible. */ F3CC 201F bra PF3ED; /* * draw_VL_with_count4() * * This routine draws vectors between the set of (y,x) * points pointed to by the 'x' register. The number * of vectors to draw is specified as the first byte * in the vector list. The current scale factor is used. * The vector list must have the following format: * * count, rel y, rel x, rel y, rel x, ... * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ draw_VL_with_count4: F3CE A680 lda ,x+; F3D0 2008 bra draw_VL_with_count5; /* * draw_VL_with_count3() * * This routine draws vectors between the set of (y,x) * points pointed to by the 'x' register. The number * of vectors to draw must already be specified in C823. * The scale factor to be used must be in the 'b' register. * The vector list must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' must point to the vector list. * 'b' contains the scale factor. * * Dp must be set to D0. */ draw_VL_with_count3: F3D2 D704 stb 0x04; F3D4 2007 bra draw_VL_with_count1; /* * draw_VL_with_count2() * * This routine draws vectors between the set of (y,x) * points pointed to by the 'x' register. The number * of vectors to draw is specified as the first byte * in the vector list. The scale factor is specified as * the second byte in the vector list. * The vector list must have the following format: * * count, scale, rel y, rel x, rel y, rel x, ... * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ draw_VL_with_count2: F3D6 EC81 ldd ,x++; /* * draw_VL_with_count6() * * This routine draws vectors between the set of (y,x) * points pointed to by the 'x' register. The number * of vectors to draw is specified in the 'a' register. * The scale factor is specified in the 'b' register. * The vector list must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' must point to the vector list. * 'a' must contain the number of vectors to draw. * 'b' contains the scale factor to use. * * Dp must be set to D0. */ draw_VL_with_count6: F3D8 D704 stb 0x04; /* * draw_VL_with_count5() * * This routine draws vectors between the set of (y,x) * points pointed to by the 'x' register. The number * of vectors to draw is specified in the 'a' register. * The current scale factor is used. * The vector list must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' must point to the vector list. * 'a' contains the number of vectors to draw. * * Dp must be set to D0. */ draw_VL_with_count5: F3DA B7C823 sta $C823; /* * draw_VL_with_count1() * * This routine draws vectors between the set of (y,x) * points pointed to by the 'x' register. The number * of vectors to draw must already be specified in C823. * The current scale factor is used. * The vector list must have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ draw_VL_with_count1: F3DD EC84 ldd ,x; /* * draw_to_d() * * This routine will draw a line from the current pen * position, to the point specified by the (y,x) pair * specified in the 'd' register. The current scale * factor is used. Before calling this routine, you * should set C823 to 0, so that only the one vector * will be drawn. * * At entry: * 'a' contains relative y position. * 'b' contains relative x position. * * Dp must be set to D0. */ draw_to_d: F3DF 9701 sta 0x01; F3E1 0F00 clr 0x00; F3E3 3002 leax 2,x; F3E5 12 nop; F3E6 0C00 inc 0x00; F3E8 D701 stb 0x01; F3EA CCFF00 ldd #0xFF00; /* Set up a solid line pattern. */ F3ED 970A PF3ED: sta 0x0A; F3EF D705 stb 0x05; F3F1 CC0040 ldd #0x0040; F3F4 D50D PF3F4: bitb 0x0D; F3F6 27FC beq PF3F4; F3F8 12 nop; F3F9 970A sta 0x0A; F3FB B6C823 lda $C823; F3FE 4A deca; F3FF 2AD9 bpl draw_VL_with_count5; F401 7EF34F jmp $check0ref; /* * drawl1_scale_FF() * * This routine forces the scale factor to 0xFF, and then * processes the vector list pointed to by the 'x' register. * The vector list must have the following format: * * mode, rel y, rel x * mode, rel y, rel x * . . . * . . . * mode, rel y, rel x * 0x01 * * where mode can mean one of the following: * * < 0 draw a line to the specified point. * = 0 move to the specified point. * > 0 end of vector list * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ drawl1_scale_FF: F404 C6FF ldb #0xFF; F406 2006 bra drawl1b; /* * drawl1_scale_7F() * * This routine forces the scale factor to 0x7F, and then * processes the vector list pointed to by the 'x' register. * The vector list must have the following format: * * mode, rel y, rel x * mode, rel y, rel x * . . . * . . . * mode, rel y, rel x * 0x01 * * where mode can mean one of the following: * * < 0 draw a line to the specified point. * = 0 move to the specified point. * > 0 end of vector list * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ drawl1_scale_7F: F408 C67F ldb #0x7F; F40A 2002 bra drawl1b; /* * drawl1() * * This routine processes the vector list pointed to by the * 'x' register. The first byte in the vector list is the * scale factor. The vector list must have the following * format: * * scale factor, * mode, rel y, rel x * mode, rel y, rel x * . . . * . . . * mode, rel y, rel x * 0x01 * * where mode can mean one of the following: * * < 0 draw a line to the specified point. * = 0 move to the specified point. * > 0 end of vector list * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ drawl1: F40C E680 ldb ,x+; /* * drawl1b() * * This routine processes the vector list pointed to by the * 'x' register. The scale factor to use is passed in in the * 'b' register. The vector list must have the following * format: * * mode, rel y, rel x * mode, rel y, rel x * . . . * . . . * mode, rel y, rel x * 0x01 * * where mode can mean one of the following: * * < 0 draw a line to the specified point. * = 0 move to the specified point. * > 0 end of vector list * * At entry: * 'x' must point to the vector list. * 'b' contains scale factor to use. * * Dp must be set to D0. */ drawl1b: F40E D704 stb 0x04; /* * next_pt() * * This routine processes the vector list pointed to by the * 'x' register. The current scale factor is used. * The vector list must have the following format: * * mode, rel y, rel x * mode, rel y, rel x * . . . * . . . * mode, rel y, rel x * 0x01 * * where mode can mean one of the following: * * < 0 draw a line to the specified point. * = 0 move to the specified point. * > 0 end of vector list * * At entry: * 'x' must point to the vector list. * * Dp must be set to D0. */ next_pt: F410 EC01 ldd 1,x; F412 9701 sta 0x01; F414 0F00 clr 0x00; F416 A684 lda ,x; F418 3003 leax 3,x; F41A 0C00 inc 0x00; F41C D701 stb 0x01; F41E 970A sta 0x0A; F420 0F05 clr 0x05; F422 CC0040 ldd #0x0040; F425 D50D PF425: bitb 0x0D; F427 27FC beq PF425; F429 12 nop; F42A 970A sta 0x0A; F42C A684 lda ,x; F42E 2FE0 ble next_pt; F430 7EF34F jmp $check0ref; /* * dwp_with_count() * draw_with_pattern() * * Both of these routines draw a series of patterned * vectors. The pattern to use must already be specified * in C829. When using draw_with_pattern(), the number * of vectors to draw (minus 1) must be specified in C823; * when using dwp_with_count(), the number of vectors to * draw (minus 1) must be passed in in the 'a' register. * The vector list, pointed to by the 'x' register, must * have the following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to the vector list. * 'a' specifies number of vectors (dwp_with_count() only). * * Dp must be set to D0. */ dwp_loop: F433 4A deca; dwp_with_count: F434 B7C823 sta $C823; draw_with_pattern: F437 EC84 ldd ,x; F439 9701 sta 0x01; F43B 0F00 clr 0x00; F43D 3002 leax 2,x; F43F 0C00 inc 0x00; F441 D701 stb 0x01; F443 B6C829 lda $C829; F446 C640 ldb #0x40; F448 970A sta 0x0A; F44A 0F05 clr 0x05; F44C F5D00D bitb $D00D; F44F 270B beq PF45C; F451 0F0A clr 0x0A; F453 B6C823 lda $C823; F456 26DB bne dwp_loop; F458 39 rts; F459 B6C829 PF459: lda $C829; F45C 970A PF45C: sta 0x0A; F45E 12 nop; F45F D50D bitb 0x0D; F461 27F6 beq PF459; F463 B6C823 lda $C823; F466 0F0A clr 0x0A; F468 4D tsta; F469 26C8 bne dwp_loop; F46B 7EF34F jmp $check0ref; /* * drawl2() * * This routine processes the vector list pointed to by * the 'x' register. The current scale factor is used. * The vector list must have the following format: * * mode, rel y, rel x, * mode, rel y, rel x, * . . . * . . . * mode, rel y, rel x, * 0x01 * * where mode has the following meaning: * * < 0 use the pattern in C829. * = 0 move to specified endpoint. * = 1 end of list, so return. * > 1 draw to specified endpoint. * * At entry: * 'x' points to the vector list. * C829 may need to be set up with a line pattern. * * Dp must be set to D0. */ drawl2: F46E B6C824 lda $C824; F471 3402 pshs a; F473 7FC824 clr $C824; F476 A680 PF476: lda ,x+; F478 2A04 bpl PF47E; F47A 8DBB bsr draw_with_pattern; F47C 20F8 bra PF476; F47E 2605 PF47E: bne PF485; F480 BDF3BC jsr $move_then_draw_VL_with_count5; F483 20F1 bra PF476; F485 4A PF485: deca; F486 2705 beq PF48D; F488 BDF3DD jsr $draw_VL_with_count1; F48B 20E9 bra PF476; F48D 3502 PF48D: puls a; F48F B7C824 sta $C824; F492 7EF34F jmp $check0ref; /* * display_string() * * This is the routine which does the actual printing of a * string. The 'u' register points to the start of the * string, while C82A contains the height of the character, * cell, and C82B contains the width of the character cell. * The end of the string must be terminated with a 0x80. * * The string is displayed by drawing 6 horizontal rows of * dots. The first row is drawn for each character, then * the second, etc. The character generation table is * located at (0xF9D4 + 0x20). Only characters 0x20-0x6F * (upper case) are defined; the lower case character a-o * produce special icons. * * At entry: * 'u' points to the start of the string. * C82A contains character cell height. * C82B contains character cell width. */ display_string: F495 FFC82C stu $C82C; /* Save pointer to start of string. */ F498 8EF9D4 ldx #0xF9D4; F49B CC1883 ldd #0x1883; F49E 0F01 clr 0x01; F4A0 970B sta 0x0B; F4A2 8EF9D4 ldx #0xF9D4; F4A5 D700 PF4A5: stb 0x00; F4A7 0A00 dec 0x00; F4A9 CC8081 ldd #0x8081; F4AC 12 nop; F4AD 0C00 inc 0x00; F4AF D700 stb 0x00; F4B1 9700 sta 0x00; F4B3 7DC800 tst $C800; F4B6 0C00 inc 0x00; F4B8 B6C82B lda $C82B; /* Get the string width. */ F4BB 9701 sta 0x01; F4BD CC0100 ldd #0x0100; F4C0 FEC82C ldu $C82C; F4C3 9700 sta 0x00; F4C5 2004 bra PF4CB; F4C7 A686 PF4C7: lda a,x; F4C9 970A sta 0x0A; F4CB A6C0 PF4CB: lda ,u+; F4CD 2AF8 bpl PF4C7; /* Display next row of pixels. */ F4CF 8681 lda #0x81; F4D1 9700 sta 0x00; F4D3 0001 neg 0x01; F4D5 8601 lda #0x01; F4D7 9700 sta 0x00; F4D9 8CFBB4 cmpx #0xFBB4; /* If not at end of char table, then */ F4DC 272C beq PF50A; /* proceed to next row of pixels. */ F4DE 308850 leax 0x50,x; F4E1 1F30 tfr u,d; F4E3 B3C82C subd $C82C; /* Point back to first character. */ F4E6 C002 subb #0x02; F4E8 58 aslb; F4E9 2100 brn PF4EB; F4EB 8681 PF4EB: lda #0x81; F4ED 12 nop; F4EE 5A decb; F4EF 26FA bne PF4EB; F4F1 9700 sta 0x00; F4F3 F6C82A ldb $C82A; F4F6 D701 stb 0x01; F4F8 0A00 dec 0x00; F4FA CC8101 ldd #0x8101; F4FD 12 nop; F4FE 9700 sta 0x00; F500 0F01 clr 0x01; F502 D700 stb 0x00; F504 9700 sta 0x00; F506 C603 ldb #0x03; F508 209B bra PF4A5; F50A 8698 PF50A: lda #0x98; F50C 970B sta 0x0B; F50E 7EF354 jmp $reset0ref; /* * get_random_a2() * * This routine generates a random 1-byte number, and places * it in the 'a' register. This uses a seed of 2 for the * random number generator. * * At exit: * 'a' contains the generated random number. */ get_random_a2: F511 3414 pshs b,x; F513 C602 ldb #0x02; F515 2003 bra ran_start; /* * get_random_a() * * This routine generates a random 1-byte number, and places * it in the 'a' register. This uses a seed of 0 for the * random number generator. * * At exit: * 'a' contains the generated random number. */ get_random_a: F517 3414 pshs b,x; F519 5F clrb; ran_start: F51A BEC87B ldx $C87B; ran_loop: F51D A601 lda 1,x; F51F 49 rola; F520 49 rola; F521 49 rola; F522 49 rola; F523 A802 eora 2,x; F525 46 rora; F526 6984 rol ,x; F528 6901 rol 1,x; F52A 6902 rol 2,x; F52C 5A decb; F52D 2AEE bpl ran_loop; F52F A684 lda ,x; F531 3594 puls b,x,pc; /* * init_music_buf() * * This routine clears out the music work buffer, located * at C83F-C84C. * */ init_music_buf: F533 C60D ldb #0x0D; F535 8EC83F ldx #0xC83F; F538 8D05 bsr clear_blockxb; F53A 863F lda #0x3F; F53C A706 sta 6,x; F53E 39 rts; /* * clear_blockxb() * * This routine clears to 0 the block of memory starting * at the address contained in the 'x' register, and * continuing for the number of bytes specified by 'b'+1. * * At entry: * 'x' points to the start of the RAM to be cleared. * 'b' specifies number of bytes (minus 1) to clear. */ clear_blockxb: F53F 4F clra; F540 2006 bra clear_block; /* * clear_C8_ram() * * This routine clears to 0 the block of memory in the * range C800-C8FF. */ clear_C8_ram: F542 8EC800 ldx #0xC800; /* * clear_256_bytes() * * This routine clears to 0 the 256 byte block of memory * starting at the address contained in the 'x' register. * * At entry: * 'x' points to the start of the RAM to be cleared. */ clear_256_bytes: F545 CC00FF ldd #0x00FF; clear_block: F548 6F8B clr d,x; F54A 830001 subd #0x0001; F54D 2AF9 bpl clear_block; F54F 39 rts; /* * clear_block_to_0x80() * * This routine xsets to 0x80 the block of memory pointed to by * the 'x' register. The 'b' register specifies the number of * bytes (minus 1) to be modified. * * At entry: * 'x' specifies the start of the memory block. * 'b' specifies the number of bytes (minus 1) to modify. */ clear_block_to_0x80: F550 8680 lda #0x80; /* * clear_block_to_a() * * This routine sets to the value specified in the 'a' * register, the block of memory pointed to by the 'x' * register. The 'b' register specifies the number of * bytes (minus 1) to be modified. * * At entry: * 'x' specifies the start of the memory block. * 'b' specifies the number of bytes (minus 1) to modify. * 'a' specifies value to be written to the memory block. */ clear_block_to_a: F552 A785 sta b,x; F554 5A decb; F555 26FB bne clear_block_to_a; F557 A784 sta ,x; F559 39 rts; /* * decrement_counters_C82E_C830() * * This routine checks each of the 3 counters, and * decrements those which are not already zero. */ decrement_counters_C82E_C830: F55A C602 ldb #0x02; F55C 2002 bra PF560; /* * decrement_counters_C82E_C833() * * This routine checks each of the 6 counters, and * decrements those which are not already zero. */ decrement_counters_C82E_C833: F55E C605 ldb #0x05; F560 8EC82E PF560: ldx #0xC82E; F563 6D85 PF563: tst b,x; F565 2702 beq PF569; F567 6A85 dec b,x; F569 5A PF569: decb; F56A 2AF7 bpl PF563; F56C 39 rts; /* * delay_b_3() * delay_b_2() * delay_b_1() * delay_b_0() * * Each of these routines loads the 'b' register with * the indicated value, and then loops until the 'b' * register value has decremented below zero. */ delay_b_3: F56D C603 ldb #0x03; F56F 2009 bra start_b_delay; delay_b_2: F571 C602 ldb #0x02; F573 2005 bra start_b_delay; delay_b_1: F575 C601 ldb #0x01; F577 2001 bra start_b_delay; delay_b_0: F579 5F clrb; start_b_delay: F57A 5A decb; F57B 2AFD bpl start_b_delay; F57D 39 rts; /* * get_bit_mask() * * This routine takes a bit number, specified in the 'a' * register, and returns a bit mask with only the specified * bit set. This is shown in the table below: * * Entry Exit * ----- ----- * 0 0x01 * 1 0x02 * etc etc * * At entry: * 'a' contains the bit number. * * At exit: * 'a' contains the bit mask. */ get_bit_mask: F57E 8EF9DC ldx #bit_masks; F581 A686 lda a,x; F583 39 rts; /* * get_absolute_value_of_ab() * * This routine returns the absolute value of the two * single byte numbers passed in in the 'a' and 'b' register. * There is a special case: 0x80 is returned as 0x7F. * * At entry: * 'a' contains value 1. * 'b' contains value 2. * * At exit: * 'a' contains absolute value of value 1. * 'b' contains absolute value of value 2. */ get_absolute_value_of_ab: F584 4D tsta; F585 2A04 bpl PF58B; F587 40 nega; F588 2801 bvc PF58B; F58A 4A deca; F58B 5D PF58B: tstb; F58C 2A04 bpl PF592; F58E 50 negb; F58F 2801 bvc PF592; F591 5A decb; F592 39 PF592: rts; /* * convert_rise_run_to_angle() * * Given a (rise,run) pair, this routine calculates the * angle which corresponds to that (rise,run) pair. The * returned angle is relative to the x-axis (+ is CCW), so * to convert it to a Vectrex angle (relative to the y-axis, * + is CCW), you must subtract the number 0x10 (90 degrees) * from the returned value. * * At entry: * 'a' contains the rise value. * 'b' contains the run value. * * At exit: * 'a' contains the angle from the x-axis. * 'b' contains the angle from the x-axis. * * Dp must be set to C8. */ convert_rise_run_to_angle: F593 3410 pshs x; F595 DD34 std 0x34; F597 59 rolb; F598 C600 ldb #0x00; F59A 59 rolb; F59B 49 rola; F59C 59 rolb; F59D 58 aslb; F59E D736 stb 0x36; F5A0 DC34 ldd 0x34; F5A2 8DE0 bsr get_absolute_value_of_ab; F5A4 9734 sta 0x34; F5A6 D134 cmpb 0x34; F5A8 2308 bls PF5B2; F5AA 0C36 inc 0x36; F5AC 1E89 exg a,b; F5AE 2002 bra PF5B2; F5B0 44 PF5B0: lsra; F5B1 54 lsrb; F5B2 8109 PF5B2: cmpa #0x09; F5B4 22FA bhi PF5B0; F5B6 DD34 std 0x34; F5B8 D636 ldb 0x36; F5BA 8EFC24 ldx #angle_data1; F5BD E685 ldb b,x; F5BF 8EFC2C ldx #angle_data2; F5C2 A686 lda a,x; F5C4 9B35 adda 0x35; F5C6 8B0A adda #0x0A; F5C8 C501 bitb #0x01; F5CA 2604 bne PF5D0; F5CC EB86 addb a,x; F5CE 2003 bra PF5D3; F5D0 5A PF5D0: decb; F5D1 E086 subb a,x; F5D3 D736 PF5D3: stb 0x36; F5D5 9636 lda 0x36; F5D7 3590 puls x,pc; /* * get_2nd_index_pair() * get_1st_index_pair() * * These routines are responsible for generating the * two index pairs which are required by the rest of * the rotation routines. Each index pair is two bytes * long, and has the following format: * * The high byte is obtained by masking the angle * with 0x1F (this forces the angle to be between * 0 and 180 degrees), and then using this value to * index into the multiplier table. * * The lower byte contains information about whether * the angle lies along either the x or y axis, and * whether the rise/run will be positive or negative. * * 0 => positive rise, not on an axis, or * negative run, not on an axis. * 0x80 => negative rise, not on an axis, or * positive run, not on an axis. * 0x81 => negative rise, on an axis, or * positive run, on an axis. * 1 => positive rise, on an axis, or * negative run, on an axis. * * get_1st_index_pair() returns the value for the run. * get_2nd_index_pair() returns the value for the rise. * * At entry: * 'a' must contain the angle value. */ get_2nd_index_pair: F5D9 8B10 adda #0x10; get_1st_index_pair: F5DB 8EFC6D ldx #rotation_pair_table; F5DE 5F clrb; F5DF 8520 bita #0x20; F5E1 2702 beq PF5E5; F5E3 C680 ldb #0x80; F5E5 841F PF5E5: anda #0x1F; F5E7 8110 cmpa #0x10; F5E9 2601 bne PF5EC; F5EB 5C incb; F5EC A686 PF5EC: lda a,x; F5EE 39 rts; /* * get_rotation_index_pairs() * * This routine gets the index pair for both the * rise and run, using the passed-in angle value. * * At entry: * C836 must contain the angle value. * * At exit: * C837-C838 contains the index pair for the run. * C839-C83A contains the index pair for the rise. * * Dp must be set to C8. */ get_rotation_index_pairs: F5EF 3410 pshs x; F5F1 9636 lda 0x36; F5F3 8DE6 bsr get_1st_index_pair; F5F5 DD37 std 0x37; F5F7 9636 lda 0x36; F5F9 8DDE bsr get_2nd_index_pair; F5FB DD39 std 0x39; F5FD 3590 puls x,pc; /* * convert_abs_angle_to_rise_run() * * This routine takes an angle value which is relative to * the x-axis, converts it to an angle relative to the * y-axis (by subtracting 0x10 [90 degrees] from the value), * and then calculates the rise and run for that angle. * * At entry: * 'b' contains the absolute angle value. * 'a' contains the scalar velocity value. * * At exit: * 'a' contains the rise value. * 'b' contains the run value. * * Dp must be set to C8. */ convert_abs_angle_to_rise_run: F5FF C010 subb #0x10; /* * convert_angle_to_rise_run() * * This routine takes an angle value which is relative to * the y-axis, and calculates the rise and run for that angle, * relative to a passed-in scalar velocity value. A large * scalar value will cause an object to move quickly, while * a small scalar value will cause an object to move more * slowly. * * Keep in mind that most games store x & y coordinates as * 2 bytes each, with the upper byte being the actual * coordinate, and the lower byte being that which is * usually added to the rise/run value; when the lower * byte overflows into the hi byte, then the object will * 'move'. The rise/run values returned here are meant * to be added to the low byte -- NOT the hi byte!! * * At entry: * 'b' contains the Vectrex angle value. * 'a' contains the scalar velocity value. * * At exit: * 'a' contains the rise value. * 'b' contains the run value. * * Dp must be set to C8. */ convert_angle_to_rise_run: F601 D736 stb 0x36; F603 973B sta 0x3B; F605 8DE8 bsr get_rotation_index_pairs; F607 8D54 bsr xform_a1; F609 40 nega; F60A 3402 pshs a; F60C 8D55 bsr xform_2a; F60E 3584 puls b,pc; /* * rotate_vector_list2() * * This routine rotates a vector list of length 'n+1', where * 'n' is specified by the value in the 'b' register. The * 'a' register contains the rotation value, and the 'x' * contains a pointer to the vector list. The 'u' register * contains a pointer to a buffer into which the transformed * points are to be saved. The vector list must have the * following format: * * rel y, rel x, rel y, rel x, ... * * At entry: * 'x' points to vector list. * 'u' points to buffer to hold transformed points. * 'a' contains the rotation angle value. * 'b' contains the number of points (minus 1). */ rotate_vector_list2: F610 B7C836 sta $C836; F613 F7C823 stb $C823; F616 3408 pshs dp; F618 BDF1AF jsr $dptoC8; F61B 8DD2 bsr get_rotation_index_pairs; F61D 2018 bra transform_next_point; /* * rotate_vector_list1() * * This routine is responsible for rotation a vector list * having the following format: * * mode, rel y, rel x, * mode, rel y, rel x, * . . . * . . . * mode, rel y, rel x, * 0x01 * * The 'a' register contains the rotation value, and the 'x' * contains a pointer to the vector list. The 'u' register * contains a pointer to a buffer into which the transformed * points are to be saved. * * At entry: * 'x' points to vector list. * 'u' points to buffer to hold transformed points. * 'a' contains the rotation angle value. */ rotate_vector_list1: F61F B7C836 sta $C836; F622 3408 pshs dp; F624 BDF1AF jsr $dptoC8; F627 9723 sta 0x23; F629 8DC4 bsr get_rotation_index_pairs; rotate_vl1_loop: F62B A680 lda ,x+; /* Copy the mode byte. */ F62D A7C0 sta ,u+; F62F 2F06 ble transform_next_point; F631 0F23 clr 0x23; F633 3588 puls dp,pc; /* * transform_next_point() * * This routine does the actual transformation of the * endpoint pointed to by the 'x' register. After the * point has been transformed, and save in the buffer * pointed to by the 'u' register, a check will be made * to see if there are any more endpoints left. If C823 * is 0, then we are done; if C823 > 0, then we were called * by rotate_vector_list2(), so we should transform the * next point; however, if C823 < 0, then we were called * by rotate_vector_list1(), and so we should return control * to that procedure, so that it can look at the mode for * the next endpoint, and thus decide whether to continue * or stop. * * At entry: * C823 indicates both endpoint count & who called us. * 'x' points to next set of endpoints. * 'u' points to transformation buffer. */ decrement_vl_counter: F635 0A23 dec 0x23; transform_next_point: F637 A680 lda ,x+; /* Get the y coordinate. */ F639 8D26 bsr xform_2; F63B A7C4 sta ,u; F63D A684 lda ,x; /* Get the x coordinate. */ F63F 8D1A bsr xform_1; F641 ABC4 adda ,u; F643 A7C0 sta ,u+; /* Save transformed y coordinate. */ F645 A61F lda -1,x; /* Get the y coordinate. */ F647 8D12 bsr xform_1; F649 A7C4 sta ,u; F64B A680 lda ,x+; /* Get the x coordinate. */ F64D 8D12 bsr xform_2; F64F A0C4 suba ,u; F651 A7C0 sta ,u+; /* Save transformed x coordinate. */ F653 9623 lda 0x23; F655 2BD4 bmi rotate_vl1_loop; F657 26DC bne decrement_vl_counter; F659 3588 puls dp,pc; /* * xform_1() * xform_1a() * * These two routines generate a rise/run value, using * the index pair in C837-C838. For xform_1() the scalar * value is passed-in in the 'a' register, while for * xform_1a(), the scalar value must already be in C83B. * The transformed value is return in the 'a' register. * * Dp must be set to C8. */ xform_1: F65B 973B sta 0x3B; xform_1a: F65D DC37 ldd 0x37; F65F 2004 bra PF665; /* * xform_2() * xform_2a() * * These two routines generate a rise/run value, using * the index pair in C839-C83A. For xform_2() the scalar * value is passed-in in the 'a' register, while for * xform_2a(), the scalar value must already be in C83B. * The transformed value is return in the 'a' register. * * Dp must be set to C8. */ xform_2: F661 973B sta 0x3B; xform_2a: F663 DC39 ldd 0x39; F665 D73C PF665: stb 0x3C; F667 C501 bitb #0x01; F669 2704 beq PF66F; F66B 963B lda 0x3B; F66D 200A bra PF679; F66F D63B PF66F: ldb 0x3B; F671 2A03 bpl PF676; F673 033C com 0x3C; F675 50 negb; F676 3D PF676: mul; F677 8900 adca #0x00; F679 D63C PF679: ldb 0x3C; F67B 2A01 bpl PF67E; F67D 40 nega; F67E 39 PF67E: rts; /* * move_block() * * This routine copies a block of memory, starting at the * hi address, and working down to the low address. The * base of the source address is specified in the 'u' * register, and the base of the destination address is * specified in the 'x' register. The 'a' register contains * the number of bytes to copy (minus 1); 0x80 is the * maximum value which can be specified. * * At entry: * 'u' points to the source base. * 'x' points to the destination base. * 'a' contains the byte count (minus 1). */ move_block: F67F E6C6 ldb a,u; F681 E786 stb a,x; /* * move_block2() * * This routine copies a block of memory, starting at the * hi address, and working down to the low address. The * base of the source address is specified in the 'u' * register, and the base of the destination address is * specified in the 'x' register. The 'a' register contains * the number of bytes to copy; 0x80 is the * maximum value which can be specified. * * At entry: * 'u' points to the source base. * 'x' points to the destination base. * 'a' contains the byte count. */ move_block2: F683 4A deca; F684 2AF9 bpl move_block; F686 39 PF686: rts; /* * init_sound() * init_sound2() * * These routines are responsible for filling the music work * buffer while a sound is being made. It should be called * once during each refresh cycle. If you want to start a * new sound, then you must set C856 to 0x01, and point the * 'u' register to the sound block. If no sound is in * progress (C856 = 0), then it returns immediately (unless * you called init_sound2(), which does not make this check). * When a sound is in progress, C856 will be set to 0x80. * * These routines process a single note at a time, and * calculate the amplitude and course/fine tuning values for * the 3 sound channels. The values calculated stored in * the music work buffer, at C83F-C84C. * * At entry: * C856 may need to be set. * 'u' should point to the start of a music block. * * Dp must be set to C8. */ init_sound: F687 9656 lda 0x56; F689 2B28 bmi continue_sound; F68B 27F9 beq PF686; init_sound2: F68D 8EFC8D ldx #music_routine_data; F690 9F4D stx 0x4D; F692 8680 lda #0x80; F694 9756 sta 0x56; F696 ECC1 ldd ,u++; F698 DD4F std 0x4F; F69A ECC1 ldd ,u++; F69C DD51 std 0x51; F69E DF53 stu 0x53; F6A0 BDF533 jsr $init_music_buf; F6A3 CC1F1F ldd #0x1F1F; F6A6 DD5F std 0x5F; F6A8 CC0000 ldd #0x0000; F6AB DD63 std 0x63; F6AD DD65 std 0x65; F6AF 9755 sta 0x55; F6B1 2039 bra PF6EC; continue_sound: F6B3 CEC85E ldu #0xC85E; F6B6 C602 ldb #0x02; F6B8 A6C5 PF6B8: lda b,u; F6BA 811F cmpa #0x1F; F6BC 2702 beq PF6C0; F6BE 6CC5 inc b,u; F6C0 5A PF6C0: decb; F6C1 2AF5 bpl PF6B8; F6C3 9E51 ldx 0x51; F6C5 CEC858 ldu #0xC858; F6C8 8607 lda #0x07; F6CA 6CC4 PF6CA: inc ,u; F6CC A1C4 cmpa ,u; F6CE 2C02 bge PF6D2; F6D0 6FC4 clr ,u; F6D2 E6C0 PF6D2: ldb ,u+; F6D4 C407 andb #0x07; F6D6 E685 ldb b,x; F6D8 E7C0 stb ,u+; F6DA 4C inca; F6DB 8109 cmpa #0x09; F6DD 23EB bls PF6CA; F6DF 0A57 dec 0x57; F6E1 266B bne PF74E; F6E3 9655 PF6E3: lda 0x55; /* This is changing octaves, or */ F6E5 4A deca; /* something like that. */ F6E6 2A02 bpl PF6EA; F6E8 8602 lda #0x02; F6EA 9755 PF6EA: sta 0x55; F6EC E69FC853 PF6EC: ldb [0xC853]; /* Grab the music note. */ F6F0 CEC85E ldu #0xC85E; F6F3 6FC6 clr a,u; F6F5 C540 bitb #0x40; /* "@" */ F6F7 2719 beq PF712; F6F9 8EF9E4 ldx #music_stuff1; F6FC A686 lda a,x; F6FE 9445 anda 0x45; F700 9745 sta 0x45; F702 9655 lda 0x55; F704 8B03 adda #0x03; F706 A686 lda a,x; F708 9A45 ora 0x45; F70A 9745 sta 0x45; F70C C41F andb #0x1F; F70E D746 stb 0x46; F710 2023 bra PF735; F712 8EF9EA PF712: ldx #music_stuff2; F715 A686 lda a,x; F717 9445 anda 0x45; F719 9745 sta 0x45; F71B 9655 lda 0x55; F71D 8B03 adda #0x03; F71F A686 lda a,x; F721 9A45 ora 0x45; F723 9745 sta 0x45; F725 9655 lda 0x55; F727 48 asla; F728 8B03 adda #0x03; F72A 33C6 leau a,u; F72C C43F andb #0x3F; /* "?" */ F72E 58 aslb; F72F 9E4D ldx 0x4D; F731 EC85 ldd b,x; F733 EDC4 std ,u; F735 9E53 PF735: ldx 0x53; F737 E680 ldb ,x+; F739 9F53 stx 0x53; F73B 5D tstb; F73C 2BA5 bmi PF6E3; F73E E680 ldb ,x+; F740 2A06 bpl PF748; F742 BDF533 jsr $init_music_buf; F745 0F56 clr 0x56; F747 39 rts; F748 9F53 PF748: stx 0x53; F74A C43F andb #0x3F; /* "?" */ F74C D757 stb 0x57; F74E 109E4F PF74E: ldy 0x4F; F751 CEC85E ldu #0xC85E; F754 8EC842 ldx #0xC842; F757 8602 lda #0x02; F759 E6C0 PF759: ldb ,u+; F75B C501 bitb #0x01; F75D 2707 beq PF766; F75F 54 lsrb; F760 E6A5 ldb b,y; F762 C40F andb #0x0F; F764 2007 bra PF76D; F766 54 PF766: lsrb; F767 E6A5 ldb b,y; F769 54 lsrb; F76A 54 lsrb; F76B 54 lsrb; F76C 54 lsrb; F76D E786 PF76D: stb a,x; F76F 4A deca; F770 2AE7 bpl PF759; F772 CEC867 ldu #0xC867; F775 8EC847 ldx #0xC847; F778 ECC3 PF778: ldd ,--u; F77A 6D58 tst -8,u; F77C 2A0A bpl PF788; F77E 6058 neg -8,u; F780 E058 subb -8,u; F782 8200 sbca #0x00; F784 6058 neg -8,u; F786 2004 bra PF78C; F788 EB58 PF788: addb -8,u; F78A 8900 adca #0x00; F78C ED81 PF78C: std ,x++; F78E 8CC84D cmpx #0xC84D; F791 26E5 bne PF778; /* Temporarily stop when the work */ F793 39 PF793: rts; /* buffer has been filled. */ player_string: F794 20 .byte 0x20; /* rel y for player number */ F795 C0 .byte 0xC0; /* rel x for player number */ F796 40 .byte 0x40; /* rel y for player string */ F797 C0 .byte 0xC0; /* rel x for player string */ F798 50 .byte "PLAYER",0x80; game_string: F79F E0 .byte 0xE0; /* rel y for game number */ F7A0 C0 .byte 0xC0; /* rel x for game number */ F7A1 01 .byte 0x01; /* rel y for game string */ F7A2 C0 .byte 0xC0; /* rel x for game string */ F7A3 20 .byte " GAME",0x80; /* * get_players_game() * * This routine provides a game with the means for allowing * the player to choose the game number he would like to * play, and the number of players. The game indicates * the number of game versions available, by placing the * value in the 'b' register. The number of players allowed * is specified in the 'a' register. If a parameter is * passed in with a value of 0, then the corresponding * question will not be asked. The number of players * selected is returned in C879, while the game number * selected is returned in C87A. * * At entry: * 'a' indicates maximum number of players allowed. * 'b' indicates the number of game versions available. * * At exit: * C879 contains number of players selected. * C87A contains the game version selected. * * Dp must be set to C8. */ get_players_game: F7A9 FDC84F std $C84F; F7AC 4D tsta; F7AD 2702 beq PF7B1; F7AF 8601 lda #0x01; F7B1 5D PF7B1: tstb; F7B2 2702 beq PF7B6; F7B4 C601 ldb #0x01; F7B6 FDC879 PF7B6: std $C879; F7B9 BDF1AF jsr $dptoC8; F7BC CCF850 ldd #0xF850; F7BF DD2A std 0x2A; F7C1 973C sta 0x3C; F7C3 2067 bra handle_buttons; /* * handle_buttons() * * This routine performs most of the work involved in * allowing the player to select a game version and the * number of players. It displays the game # and player * options, and allows the player a certain amount of time * to modify their values. Anytime one of the buttons is * to modify a value, the timer will be restarted. When * a button is pressed, the associated value is modified, * and then redisplayed on the screen. This routine will * return when either the timer expires, or button 4 is * pressed. * * At entry: * C879 contains maximum number of players allowed. * C87A contains number of game versions available. * * At exit: * C879 contains the number of players selected. * C87A contains the game version selected. */ button_handler_loop: F7C5 BDF192 jsr $waitrecal; F7C8 4F clra; F7C9 BDF1B4 jsr $read_switches; F7CC BDF55A jsr $decrement_counters_C82E_C830; F7CF BDF2A9 jsr $intensity_to_7F; F7D2 B6C879 lda $C879; F7D5 108EF794 ldy #player_string; F7D9 8D5A bsr display_option_string; F7DB B6C87A lda $C87A; F7DE 108EF79F ldy #game_string; F7E2 8D51 bsr display_option_string; F7E4 BDF1AF jsr $dptoC8; F7E7 963C lda 0x3C; F7E9 2706 beq check_loop_counter; F7EB 960F lda 0x0F; F7ED 263D bne handle_buttons; F7EF 0F3C clr 0x3C; check_loop_counter: F7F1 962F lda 0x2F; F7F3 279E beq PF793; F7F5 962E lda 0x2E; F7F7 26CC bne button_handler_loop; F7F9 9615 lda 0x15; /* Start game if button 4 pressed. */ F7FB 2696 bne PF793; F7FD 9612 lda 0x12; /* Check button 1. */ F7FF 270F beq PF810; F801 9679 lda 0x79; F803 270B beq PF810; F805 4C inca; /* Increment player count. */ F806 914F cmpa 0x4F; F808 2302 bls PF80C; F80A 8601 lda #0x01; F80C 9779 PF80C: sta 0x79; F80E 201C bra handle_buttons; F810 967A PF810: lda 0x7A; F812 27B1 beq button_handler_loop; F814 D613 ldb 0x13; /* Check button 2. */ F816 2709 beq PF821; F818 4C inca; /* Increment game number. */ F819 9150 cmpa 0x50; F81B 230D bls PF82A; F81D 8601 lda #0x01; F81F 2009 bra PF82A; F821 D614 PF821: ldb 0x14; /* Check button 3. */ F823 27A0 beq button_handler_loop; F825 4A deca; /* Decrement game number. */ F826 2602 bne PF82A; F828 9650 lda 0x50; F82A 977A PF82A: sta 0x7A; handle_buttons: F82C 86F3 lda #0xF3; /* Reset loop counters. */ F82E 972F sta 0x2F; F830 43 coma; F831 972E sta 0x2E; F833 2090 bra button_handler_loop; /* * display_option_string() * * This routine displays the player or game option * string, along with the current value for that * option. The 'a' register contains the value of * the option, while the 'y' register must point * to a block of the following form: * * rel y, rel x, ( for value ) * rel y, rel x, ( for option string) * option string, * 0x80 * * At entry: * 'a' must contain option value. * 'y' must point to string block. */ display_option_string: F835 8EC85E ldx #0xC85E; F838 3402 pshs a; F83A 8D13 bsr set_dft_score; F83C A6E0 lda ,s+; F83E 270E beq PF84E; F840 8D1C bsr convert_a_to_bcd_and_add; F842 1F13 tfr x,u; F844 ECA1 ldd ,y++; F846 BDF37A jsr $print_at_d; F849 1F23 tfr y,u; F84B BDF378 jsr $print_with_dft_hw; F84E 39 PF84E: rts; /* * set_dft_score() * * This routine will initialize the passed-in score string * (pointed to by the 'x' register) to the following value: * * " 0",0x80 * * At entry: * 'x' points to the string to be initialized. */ set_dft_score: F84F CC2020 ldd #0x2020; F852 ED84 std ,x; F854 ED02 std 2,x; F856 A704 sta 4,x; F858 CC3080 ldd #0x3080; F85B ED05 std 5,x; F85D 39 rts; /* * convert_a_to_bcd_and_add() * * This routine takes the binary value specified in the * 'a' register, and converts it to a BCD representation. * This BCD value is then added to the BCD value which * is in the buffer pointed to by the 'x' register. * * At entry: * 'a' contains value to be converted. * 'x' points to BCD to which new value is to be added. */ convert_a_to_bcd_and_add: F85E CE0000 ldu #0x0000; F861 8163 PF861: cmpa #0x63; /* 99 */ F863 2308 bls PF86D; F865 8064 suba #0x64; /* 100 */ F867 33C90100 leau 0x0100,u; F86B 20F4 bra PF861; F86D 8109 PF86D: cmpa #0x09; /* 9 */ F86F 2307 bls PF878; F871 800A suba #0x0A; /* 10 */ F873 33C810 leau 0x10,u; F876 20F5 bra PF86D; F878 33C6 PF878: leau a,u; F87A 1F30 tfr u,d; /* * add_d_to_x_in_bcd() * * This routine takes the BCD value in the 'd' register, * and adds it to the BCD value pointed by the 'x' register. * The result is store in the location pointed to by the * 'x' register. * * At entry: * 'd' contains a BCD value. * 'x' points to a second BCD value. */ add_d_to_x_in_bcd: F87C 3402 pshs a; F87E 3404 pshs b; F880 C605 ldb #0x05; F882 4F PF882: clra; F883 C101 cmpb #0x01; F885 2310 bls PF897; F887 C501 bitb #0x01; F889 2704 beq PF88F; F88B A6E4 lda ,s; F88D 2006 bra PF895; F88F A6E0 PF88F: lda ,s+; F891 44 lsra; F892 44 lsra; F893 44 lsra; F894 44 lsra; F895 840F PF895: anda #0x0F; F897 BBC823 PF897: adda $C823; F89A 7FC823 clr $C823; F89D AB85 adda b,x; F89F 812F cmpa #0x2F; F8A1 2E02 bgt PF8A5; F8A3 8B10 adda #0x10; F8A5 8139 PF8A5: cmpa #0x39; /* Check for digit overflow. */ F8A7 2305 bls PF8AE; F8A9 800A suba #0x0A; F8AB 7CC823 inc $C823; F8AE A785 PF8AE: sta b,x; F8B0 5A decb; F8B1 2ACF bpl PF882; F8B3 7FC823 clr $C823; F8B6 5F clrb; F8B7 A685 PF8B7: lda b,x; /* Strip leading zero's. */ F8B9 8130 cmpa #0x30; /* "0" */ F8BB 2609 bne PF8C6; F8BD 8620 lda #0x20; F8BF A785 sta b,x; F8C1 5C incb; F8C2 C105 cmpb #0x05; F8C4 2DF1 blt PF8B7; F8C6 39 PF8C6: rts; /* * compare_scores() * * This routine will compare two BCD score strings, to * determine which one is higher. The two strings are * pointed to by the 'u' and 'x' registers. Depending * upon how the scores compare, one of the following * values will be returned in the 'a' register: * * 1) The scores are the same: a = 0 * 2) 'x' score > 'u' score: a = 1 * 3) 'u' score > 'x' score: a = 2 * * At entry: * 'x' points to first score string. * 'u' points to second score string. * * At exit: * 'a' returns result of the compare. */ compare_scores: F8C7 3450 pshs x,u; F8C9 4F clra; F8CA E680 PF8CA: ldb ,x+; F8CC 2B08 bmi PF8D6; F8CE E1C0 cmpb ,u+; F8D0 27F8 beq PF8CA; F8D2 2201 bhi PF8D5; F8D4 4C inca; F8D5 4C PF8D5: inca; F8D6 35D0 PF8D6: puls x,u,pc; /* * check_4_new_hi_score() * * This routine compares a players score string, pointed * to by the 'x' register, to the current hi score, pointed * by the 'u' register. If the player's score is higher * than the currently saved hi score, then the player's * score will be copied into the hi score buffer pointed * to by the 'u' register. * * At entry: * 'x' points to a players BCD score string. * 'u' points to the current hi score for the game. */ check_4_new_hi_score: F8D8 8DED bsr compare_scores; F8DA 8101 cmpa #0x01; F8DC 2606 bne PF8E4; F8DE A680 PF8DE: lda ,x+; F8E0 A7C0 sta ,u+; F8E2 2AFA bpl PF8DE; F8E4 39 PF8E4: rts; /* * modify_target_and_check_4_hit1() * * This routine first modifies the position of the target, * and then it checks to see if the bullet has hit the * target. The 'y' register contains the (y,x) position * of the target, the 'u' register contains a pointer to * the (y,x) modification values, the 'x' register contains * the bullet (y,x) position, and the 'd' register contains * the (height/2, width/2) of the target. * * (0,u) is added to the y position of the target, and (1,u) * is added to the x position. * * At entry: * 'y' contains position of the target. * 'x' contains position of the bullet. * 'u' points to target modification values. * 'd' contains (h/2, w/2) size of target. * * At exit: * Carry bit set if the target & bullet have collided, * otherwise, the carry bit will be cleared. */ modify_target_and_check_4_hit1: F8E5 3420 pshs y; F8E7 3436 pshs a,b,x,y; F8E9 EC64 ldd 4,s; F8EB ABC4 adda ,u; F8ED EB41 addb 1,u; F8EF ED64 PF8EF: std 4,s; F8F1 2010 bra check_bullet_for_hit2; /* * modify_target_and_check_4_hit2() * * This routine first modifies the position of the target, * and then it checks to see if the bullet has hit the * target. The 'y' register contains the (y,x) position * of the target, the 'u' register contains the (y,x) * modification values, the 'x' register contains the * bullet (y,x) position, and the 'd' register contains * the (height/2, width/2) of the target. * * u(hi) is added to the y position of the target, and u(lo) * is added to the x position. * * At entry: * 'y' contains position of the target. * 'x' contains position of the bullet. * 'u' contains target modification values. * 'd' contains (h/2, w/2) size of target. * * At exit: * Carry bit set if the target & bullet have collided, * otherwise, the carry bit will be cleared. */ modify_target_and_check_4_hit2: F8F3 3420 pshs y; F8F5 3436 pshs a,b,x,y; F8F7 1F30 tfr u,d; F8F9 AB64 adda 4,s; F8FB EB65 addb 5,s; F8FD 20F0 bra PF8EF; /* * check_bullet_for_hit() * check_bullet_for_hit2() * * These routines check to see if a bullet has bit a target. * If the bulet has hit the target, then the carry bit will * be set; otherwise, the carry bit will be cleared. A hit * is checked for in the following fashion: * * if (target y-height/2) <= bullet y <= (target y+height/2) * and * (target x-width/2) <= bullet x <= (target x+width/x) * * then the bulet hist, otherwise it missed. * * At entry: * 'x' contains the bullet position. * 'y' contains the target position. * 'd' contains the (height/2, width/2) of target. * * At exit: * Carry bit will be set if the bullet hit the target; * otherwise, the carry bit will be cleared. */ check_bullet_for_hit: F8FF 3420 pshs y; F901 3436 pshs a,b,x,y; check_bullet_for_hit2: F903 1F41 tfr sp,x; F905 5F clrb; /* Start with the y coordinate. */ check_bullet_loop: F906 3A abx; F907 A604 lda 4,x; /* Target y + height/2, or */ F909 AB84 adda ,x; /* Target x + width/2 */ F90B 2802 bvc check_bullet_pt1; F90D 867F lda #0x7F; /* Only goto edge of screen. */ check_bullet_pt1: F90F A102 cmpa 2,x; F911 2D15 blt flag_a_miss; F913 A604 lda 4,x; F915 A084 suba ,x; F917 2802 bvc check_bullet_pt2; F919 8680 lda #0x80; check_bullet_pt2: F91B A102 cmpa 2,x; F91D 2E09 bgt flag_a_miss; F91F 5C incb; F920 C102 cmpb #0x02; /* Now, check x coordinate. */ F922 25E2 blo check_bullet_loop; F924 1A01 orcc #0x01; /* A hit; so set carry bit. */ F926 2002 bra PF92A; flag_a_miss: F928 1CFE andcc #0xFE; /* A miss; so clear carry bit. */ F92A 3536 PF92A: puls a,b,x,y; F92C 35A0 puls y,pc; /* * generate_explosion_sound() * * This routine appears to generate some type of an * explosion sound, dependent upon the 4 bytes which * are pointed to by the 'u' register. * * At entry: * 'u' must point to a block of 4 bytes of data, which * somehow describe the type of sound to make. * * Dp must be set to C8. */ generate_explosion_sound: F92E 9667 lda 0x67; F930 2A29 bpl PF95B; F932 847F anda #0x7F; F934 9767 sta 0x67; F936 8EC858 ldx #0xC858; F939 8604 lda #0x04; F93B BDF683 jsr $move_block2; F93E 54 lsrb; F93F 54 lsrb; F940 54 lsrb; F941 DA58 orb 0x58; F943 C407 andb #0x07; F945 D754 stb 0x54; F947 D658 ldb 0x58; F949 C438 andb #0x38; /* "8" */ F94B D753 stb 0x53; F94D D658 ldb 0x58; F94F C407 andb #0x07; F951 D75D stb 0x5D; F953 C602 ldb #0x02; F955 D75C stb 0x5C; F957 867F lda #0x7F; F959 200D bra PF968; F95B 9677 PF95B: lda 0x77; F95D 276A beq PF9C9; F95F 905B suba 0x5B; F961 2A05 bpl PF968; F963 5F clrb; F964 D777 stb 0x77; F966 2062 bra PF9CA; F968 9777 PF968: sta 0x77; F96A 44 lsra; F96B 44 lsra; F96C D653 ldb 0x53; F96E 270D beq PF97D; F970 9746 sta 0x46; F972 D659 ldb 0x59; F974 2B05 bmi PF97B; F976 2705 beq PF97D; F978 1F89 tfr a,b; F97A 53 comb; F97B D746 PF97B: stb 0x46; F97D 44 PF97D: lsra; F97E 8107 cmpa #0x07; F980 2305 bls PF987; F982 810F cmpa #0x0F; F984 2701 beq PF987; F986 4C inca; F987 D65A PF987: ldb 0x5A; F989 2B06 bmi PF991; F98B 2702 beq PF98F; F98D 880F eora #0x0F; F98F 1F89 PF98F: tfr a,b; F991 8D37 PF991: bsr PF9CA; F993 D65D ldb 0x5D; F995 272B beq PF9C2; F997 965C PF997: lda 0x5C; F999 4A deca; F99A 2A02 bpl PF99E; F99C 8602 lda #0x02; F99E 975C PF99E: sta 0x5C; F9A0 BDF57E jsr $get_bit_mask; F9A3 955D bita 0x5D; F9A5 27F0 beq PF997; F9A7 D65C ldb 0x5C; F9A9 58 aslb; F9AA 50 negb; F9AB 8EC84B ldx #0xC84B; F9AE 3085 leax b,x; F9B0 BDF517 jsr $get_random_a; F9B3 840F anda #0x0F; F9B5 8105 cmpa #0x05; F9B7 2203 bhi PF9BC; F9B9 48 asla; F9BA 8B05 adda #0x05; F9BC A784 PF9BC: sta ,x; F9BE 967E lda 0x7E; F9C0 A701 sta 1,x; F9C2 9658 PF9C2: lda 0x58; F9C4 43 coma; F9C5 9445 anda 0x45; F9C7 9745 sta 0x45; F9C9 39 PF9C9: rts; F9CA 9654 PF9CA: lda 0x54; F9CC 8EC845 ldx #0xC845; F9CF 4D PF9CF: tsta; F9D0 2709 beq PF9DB; F9D2 301F leax -1,x; F9D4 44 PF9D4: lsra; F9D5 24F8 bhs PF9CF; F9D7 E784 stb ,x; F9D9 20F4 bra PF9CF; F9DB 39 PF9DB: rts; bit_masks: F9DC 01 .byte 0x01; F9DD 02 .byte 0x02; F9DE 04 .byte 0x04; F9DF 08 .byte 0x08; F9E0 10 .byte 0x10; F9E1 20 .byte 0x20; F9E2 40 .byte 0x40; F9E3 80 .byte 0x80; music_stuff1: F9E4 F7 .byte 0xF7; F9E5 EF .byte 0xEF; F9E6 DF .byte 0xDF; F9E7 01 .byte 0x01; F9E8 02 .byte 0x02; F9E9 04 .byte 0x04; music_stuff2: F9EA FE .byte 0xFE; F9EB FD .byte 0xFD; F9EC FB .byte 0xFB; F9ED 08 .byte 0x08; F9EE 10 .byte 0x10; F9EF 20 .byte 0x20; F9F0 7F SF9F0: .byte 0x7F; F9F1 7F .byte 0x7F; F9F2 80 .byte 0x80; F9F3 80 .byte 0x80; /* * This is the start of the character generation table used * by the string printing routine. The table starts at * F9F4, and goes for the next 480 bytes. */ character_table: F9F4 00 .byte 0x00; F9F5 20 .byte 0x20; F9F6 50 .byte 0x50; F9F7 50 .byte 0x50; F9F8 20 .byte 0x20; F9F9 C8 .byte 0xC8; F9FA 20 .byte 0x20; F9FB 10 .byte 0x10; F9FC 10 .byte 0x10; F9FD 40 .byte 0x40; F9FE 20 .byte 0x20; F9FF 00 .byte 0x00; FA00 00 .byte 0x00; FA01 00 .byte 0x00; FA02 00 .byte 0x00; FA03 08 .byte 0x08; FA04 30 .byte 0x30; FA05 20 .byte 0x20; FA06 70 .byte 0x70; FA07 70 .byte 0x70; FA08 10 .byte 0x10; FA09 F8 .byte 0xF8; FA0A 30 .byte 0x30; FA0B F8 .byte 0xF8; FA0C 70 .byte 0x70; FA0D 70 .byte 0x70; FA0E 00 .byte 0x00; FA0F 60 .byte 0x60; FA10 00 .byte 0x00; FA11 00 .byte 0x00; FA12 00 .byte 0x00; FA13 70 .byte 0x70; FA14 70 .byte 0x70; FA15 20 .byte 0x20; FA16 F0 .byte 0xF0; FA17 70 .byte 0x70; FA18 F0 .byte 0xF0; FA19 F8 .byte 0xF8; FA1A F8 .byte 0xF8; FA1B 78 .byte 0x78; FA1C 88 .byte 0x88; FA1D 70 .byte 0x70; FA1E 08 .byte 0x08; FA1F 88 .byte 0x88; FA20 80 .byte 0x80; FA21 88 .byte 0x88; FA22 88 .byte 0x88; FA23 F8 .byte 0xF8; FA24 F0 .byte 0xF0; FA25 70 .byte 0x70; FA26 F0 .byte 0xF0; FA27 70 .byte 0x70; FA28 F8 .byte 0xF8; FA29 88 .byte 0x88; FA2A 88 .byte 0x88; FA2B 88 .byte 0x88; FA2C 88 .byte 0x88; FA2D 88 .byte 0x88; FA2E F8 .byte 0xF8; FA2F 70 .byte 0x70; FA30 80 .byte 0x80; FA31 70 .byte 0x70; FA32 20 .byte 0x20; FA33 00 .byte 0x00; FA34 00 .byte 0x00; FA35 20 .byte 0x20; FA36 08 .byte 0x08; FA37 20 .byte 0x20; FA38 00 .byte 0x00; FA39 00 .byte 0x00; FA3A 00 .byte 0x00; FA3B 38 .byte 0x38; FA3C 10 .byte 0x10; FA3D 20 .byte 0x20; FA3E 44 .byte 0x44; FA3F 44 .byte 0x44; FA40 00 .byte 0x00; FA41 FE .byte 0xFE; FA42 FF .byte 0xFF; FA43 FE .byte 0xFE; FA44 00 .byte 0x00; FA45 70 .byte 0x70; FA46 50 .byte 0x50; FA47 50 .byte 0x50; FA48 78 .byte 0x78; FA49 C8 .byte 0xC8; FA4A 50 .byte 0x50; FA4B 20 .byte 0x20; FA4C 20 .byte 0x20; FA4D 20 .byte 0x20; FA4E A8 .byte 0xA8; FA4F 20 .byte 0x20; FA50 00 .byte 0x00; FA51 00 .byte 0x00; FA52 00 .byte 0x00; FA53 08 .byte 0x08; FA54 48 .byte 0x48; FA55 60 .byte 0x60; FA56 88 .byte 0x88; FA57 88 .byte 0x88; FA58 30 .byte 0x30; FA59 80 .byte 0x80; FA5A 40 .byte 0x40; FA5B 08 .byte 0x08; FA5C 88 .byte 0x88; FA5D 88 .byte 0x88; FA5E 60 .byte 0x60; FA5F 60 .byte 0x60; FA60 10 .byte 0x10; FA61 00 .byte 0x00; FA62 40 .byte 0x40; FA63 88 .byte 0x88; FA64 88 .byte 0x88; FA65 50 .byte 0x50; FA66 48 .byte 0x48; FA67 88 .byte 0x88; FA68 48 .byte 0x48; FA69 80 .byte 0x80; FA6A 80 .byte 0x80; FA6B 80 .byte 0x80; FA6C 88 .byte 0x88; FA6D 20 .byte 0x20; FA6E 08 .byte 0x08; FA6F 90 .byte 0x90; FA70 80 .byte 0x80; FA71 D8 .byte 0xD8; FA72 C8 .byte 0xC8; FA73 88 .byte 0x88; FA74 88 .byte 0x88; FA75 88 .byte 0x88; FA76 88 .byte 0x88; FA77 88 .byte 0x88; FA78 A8 .byte 0xA8; FA79 88 .byte 0x88; FA7A 88 .byte 0x88; FA7B 88 .byte 0x88; FA7C 88 .byte 0x88; FA7D 88 .byte 0x88; FA7E 08 .byte 0x08; FA7F 40 .byte 0x40; FA80 80 .byte 0x80; FA81 08 .byte 0x08; FA82 50 .byte 0x50; FA83 00 .byte 0x00; FA84 00 .byte 0x00; FA85 70 .byte 0x70; FA86 0C .byte 0x0C; FA87 20 .byte 0x20; FA88 70 .byte 0x70; FA89 70 .byte 0x70; FA8A 00 .byte 0x00; FA8B 44 .byte 0x44; FA8C 10 .byte 0x10; FA8D 70 .byte 0x70; FA8E 00 .byte 0x00; FA8F 00 .byte 0x00; FA90 6C .byte 0x6C; FA91 82 .byte 0x82; FA92 FF .byte 0xFF; FA93 FE .byte 0xFE; FA94 00 .byte 0x00; FA95 70 .byte 0x70; FA96 50 .byte 0x50; FA97 F8 .byte 0xF8; FA98 A0 .byte 0xA0; FA99 10 .byte 0x10; FA9A 50 .byte 0x50; FA9B 40 .byte 0x40; FA9C 40 .byte 0x40; FA9D 10 .byte 0x10; FA9E 70 .byte 0x70; FA9F 20 .byte 0x20; FAA0 00 .byte 0x00; FAA1 00 .byte 0x00; FAA2 00 .byte 0x00; FAA3 10 .byte 0x10; FAA4 48 .byte 0x48; FAA5 20 .byte 0x20; FAA6 08 .byte 0x08; FAA7 08 .byte 0x08; FAA8 50 .byte 0x50; FAA9 F0 .byte 0xF0; FAAA 80 .byte 0x80; FAAB 10 .byte 0x10; FAAC 88 .byte 0x88; FAAD 88 .byte 0x88; FAAE 60 .byte 0x60; FAAF 00 .byte 0x00; FAB0 20 .byte 0x20; FAB1 78 .byte 0x78; FAB2 20 .byte 0x20; FAB3 08 .byte 0x08; FAB4 A8 .byte 0xA8; FAB5 88 .byte 0x88; FAB6 48 .byte 0x48; FAB7 80 .byte 0x80; FAB8 48 .byte 0x48; FAB9 80 .byte 0x80; FABA 80 .byte 0x80; FABB 80 .byte 0x80; FABC 88 .byte 0x88; FABD 20 .byte 0x20; FABE 08 .byte 0x08; FABF A0 .byte 0xA0; FAC0 80 .byte 0x80; FAC1 A8 .byte 0xA8; FAC2 A8 .byte 0xA8; FAC3 88 .byte 0x88; FAC4 88 .byte 0x88; FAC5 88 .byte 0x88; FAC6 88 .byte 0x88; FAC7 40 .byte 0x40; FAC8 20 .byte 0x20; FAC9 88 .byte 0x88; FACA 88 .byte 0x88; FACB 88 .byte 0x88; FACC 50 .byte 0x50; FACD 50 .byte 0x50; FACE 10 .byte 0x10; FACF 40 .byte 0x40; FAD0 40 .byte 0x40; FAD1 08 .byte 0x08; FAD2 88 .byte 0x88; FAD3 00 .byte 0x00; FAD4 70 .byte 0x70; FAD5 A8 .byte 0xA8; FAD6 0A .byte 0x0A; FAD7 20 .byte 0x20; FAD8 88 .byte 0x88; FAD9 F8 .byte 0xF8; FADA 60 .byte 0x60; FADB BA .byte 0xBA; FADC 38 .byte 0x38; FADD 20 .byte 0x20; FADE 00 .byte 0x00; FADF 00 .byte 0x00; FAE0 92 .byte 0x92; FAE1 82 .byte 0x82; FAE2 FF .byte 0xFF; FAE3 FE .byte 0xFE; FAE4 00 .byte 0x00; FAE5 20 .byte 0x20; FAE6 00 .byte 0x00; FAE7 50 .byte 0x50; FAE8 70 .byte 0x70; FAE9 20 .byte 0x20; FAEA 60 .byte 0x60; FAEB 00 .byte 0x00; FAEC 40 .byte 0x40; FAED 10 .byte 0x10; FAEE A8 .byte 0xA8; FAEF F8 .byte 0xF8; FAF0 00 .byte 0x00; FAF1 70 .byte 0x70; FAF2 00 .byte 0x00; FAF3 20 .byte 0x20; FAF4 48 .byte 0x48; FAF5 20 .byte 0x20; FAF6 70 .byte 0x70; FAF7 30 .byte 0x30; FAF8 90 .byte 0x90; FAF9 08 .byte 0x08; FAFA F0 .byte 0xF0; FAFB 20 .byte 0x20; FAFC 70 .byte 0x70; FAFD 78 .byte 0x78; FAFE 00 .byte 0x00; FAFF 60 .byte 0x60; FB00 40 .byte 0x40; FB01 00 .byte 0x00; FB02 10 .byte 0x10; FB03 10 .byte 0x10; FB04 B8 .byte 0xB8; FB05 88 .byte 0x88; FB06 70 .byte 0x70; FB07 80 .byte 0x80; FB08 48 .byte 0x48; FB09 E0 .byte 0xE0; FB0A E0 .byte 0xE0; FB0B 98 .byte 0x98; FB0C F8 .byte 0xF8; FB0D 20 .byte 0x20; FB0E 08 .byte 0x08; FB0F C0 .byte 0xC0; FB10 80 .byte 0x80; FB11 A8 .byte 0xA8; FB12 98 .byte 0x98; FB13 88 .byte 0x88; FB14 F0 .byte 0xF0; FB15 88 .byte 0x88; FB16 F0 .byte 0xF0; FB17 20 .byte 0x20; FB18 20 .byte 0x20; FB19 88 .byte 0x88; FB1A 50 .byte 0x50; FB1B A8 .byte 0xA8; FB1C 20 .byte 0x20; FB1D 20 .byte 0x20; FB1E 20 .byte 0x20; FB1F 40 .byte 0x40; FB20 20 .byte 0x20; FB21 08 .byte 0x08; FB22 00 .byte 0x00; FB23 00 .byte 0x00; FB24 FE .byte 0xFE; FB25 20 .byte 0x20; FB26 08 .byte 0x08; FB27 20 .byte 0x20; FB28 88 .byte 0x88; FB29 F8 .byte 0xF8; FB2A F0 .byte 0xF0; FB2B A2 .byte 0xA2; FB2C 38 .byte 0x38; FB2D F8 .byte 0xF8; FB2E 82 .byte 0x82; FB2F 38 .byte 0x38; FB30 92 .byte 0x92; FB31 82 .byte 0x82; FB32 FF .byte 0xFF; FB33 FE .byte 0xFE; FB34 00 .byte 0x00; FB35 00 .byte 0x00; FB36 00 .byte 0x00; FB37 F8 .byte 0xF8; FB38 70 .byte 0x70; FB39 40 .byte 0x40; FB3A A8 .byte 0xA8; FB3B 00 .byte 0x00; FB3C 40 .byte 0x40; FB3D 10 .byte 0x10; FB3E A8 .byte 0xA8; FB3F 20 .byte 0x20; FB40 40 .byte 0x40; FB41 00 .byte 0x00; FB42 00 .byte 0x00; FB43 40 .byte 0x40; FB44 48 .byte 0x48; FB45 20 .byte 0x20; FB46 80 .byte 0x80; FB47 08 .byte 0x08; FB48 F8 .byte 0xF8; FB49 08 .byte 0x08; FB4A 88 .byte 0x88; FB4B 40 .byte 0x40; FB4C 88 .byte 0x88; FB4D 08 .byte 0x08; FB4E 60 .byte 0x60; FB4F 60 .byte 0x60; FB50 20 .byte 0x20; FB51 78 .byte 0x78; FB52 20 .byte 0x20; FB53 20 .byte 0x20; FB54 B0 .byte 0xB0; FB55 F8 .byte 0xF8; FB56 48 .byte 0x48; FB57 80 .byte 0x80; FB58 48 .byte 0x48; FB59 80 .byte 0x80; FB5A 80 .byte 0x80; FB5B 88 .byte 0x88; FB5C 88 .byte 0x88; FB5D 20 .byte 0x20; FB5E 08 .byte 0x08; FB5F A0 .byte 0xA0; FB60 80 .byte 0x80; FB61 88 .byte 0x88; FB62 88 .byte 0x88; FB63 88 .byte 0x88; FB64 80 .byte 0x80; FB65 A8 .byte 0xA8; FB66 A0 .byte 0xA0; FB67 10 .byte 0x10; FB68 20 .byte 0x20; FB69 88 .byte 0x88; FB6A 50 .byte 0x50; FB6B A8 .byte 0xA8; FB6C 50 .byte 0x50; FB6D 20 .byte 0x20; FB6E 40 .byte 0x40; FB6F 40 .byte 0x40; FB70 10 .byte 0x10; FB71 08 .byte 0x08; FB72 00 .byte 0x00; FB73 00 .byte 0x00; FB74 FE .byte 0xFE; FB75 20 .byte 0x20; FB76 78 .byte 0x78; FB77 A8 .byte 0xA8; FB78 88 .byte 0x88; FB79 F8 .byte 0xF8; FB7A F0 .byte 0xF0; FB7B BA .byte 0xBA; FB7C 7C .byte 0x7C; FB7D 20 .byte 0x20; FB7E 44 .byte 0x44; FB7F 44 .byte 0x44; FB80 6C .byte 0x6C; FB81 82 .byte 0x82; FB82 FF .byte 0xFF; FB83 FE .byte 0xFE; FB84 00 .byte 0x00; FB85 00 .byte 0x00; FB86 00 .byte 0x00; FB87 50 .byte 0x50; FB88 28 .byte 0x28; FB89 98 .byte 0x98; FB8A 90 .byte 0x90; FB8B 00 .byte 0x00; FB8C 20 .byte 0x20; FB8D 20 .byte 0x20; FB8E 00 .byte 0x00; FB8F 20 .byte 0x20; FB90 40 .byte 0x40; FB91 00 .byte 0x00; FB92 00 .byte 0x00; FB93 80 .byte 0x80; FB94 48 .byte 0x48; FB95 20 .byte 0x20; FB96 80 .byte 0x80; FB97 88 .byte 0x88; FB98 10 .byte 0x10; FB99 88 .byte 0x88; FB9A 88 .byte 0x88; FB9B 80 .byte 0x80; FB9C 88 .byte 0x88; FB9D 10 .byte 0x10; FB9E 60 .byte 0x60; FB9F 20 .byte 0x20; FBA0 10 .byte 0x10; FBA1 00 .byte 0x00; FBA2 40 .byte 0x40; FBA3 00 .byte 0x00; FBA4 80 .byte 0x80; FBA5 88 .byte 0x88; FBA6 48 .byte 0x48; FBA7 88 .byte 0x88; FBA8 48 .byte 0x48; FBA9 80 .byte 0x80; FBAA 80 .byte 0x80; FBAB 88 .byte 0x88; FBAC 88 .byte 0x88; FBAD 20 .byte 0x20; FBAE 88 .byte 0x88; FBAF 90 .byte 0x90; FBB0 88 .byte 0x88; FBB1 88 .byte 0x88; FBB2 88 .byte 0x88; FBB3 88 .byte 0x88; FBB4 80 .byte 0x80; FBB5 90 .byte 0x90; FBB6 90 .byte 0x90; FBB7 88 .byte 0x88; FBB8 20 .byte 0x20; FBB9 88 .byte 0x88; FBBA 20 .byte 0x20; FBBB A8 .byte 0xA8; FBBC 88 .byte 0x88; FBBD 20 .byte 0x20; FBBE 80 .byte 0x80; FBBF 40 .byte 0x40; FBC0 08 .byte 0x08; FBC1 08 .byte 0x08; FBC2 00 .byte 0x00; FBC3 00 .byte 0x00; FBC4 48 .byte 0x48; FBC5 20 .byte 0x20; FBC6 F0 .byte 0xF0; FBC7 70 .byte 0x70; FBC8 70 .byte 0x70; FBC9 70 .byte 0x70; FBCA 60 .byte 0x60; FBCB 44 .byte 0x44; FBCC 6C .byte 0x6C; FBCD 50 .byte 0x50; FBCE 38 .byte 0x38; FBCF 82 .byte 0x82; FBD0 00 .byte 0x00; FBD1 82 .byte 0x82; FBD2 FF .byte 0xFF; FBD3 FE .byte 0xFE; FBD4 00 .byte 0x00; FBD5 20 .byte 0x20; FBD6 00 .byte 0x00; FBD7 50 .byte 0x50; FBD8 F8 .byte 0xF8; FBD9 98 .byte 0x98; FBDA 68 .byte 0x68; FBDB 00 .byte 0x00; FBDC 10 .byte 0x10; FBDD 40 .byte 0x40; FBDE 00 .byte 0x00; FBDF 00 .byte 0x00; FBE0 80 .byte 0x80; FBE1 00 .byte 0x00; FBE2 80 .byte 0x80; FBE3 80 .byte 0x80; FBE4 30 .byte 0x30; FBE5 70 .byte 0x70; FBE6 F8 .byte 0xF8; FBE7 70 .byte 0x70; FBE8 10 .byte 0x10; FBE9 70 .byte 0x70; FBEA 70 .byte 0x70; FBEB 80 .byte 0x80; FBEC 70 .byte 0x70; FBED 60 .byte 0x60; FBEE 00 .byte 0x00; FBEF 40 .byte 0x40; FBF0 00 .byte 0x00; FBF1 00 .byte 0x00; FBF2 00 .byte 0x00; FBF3 20 .byte 0x20; FBF4 78 .byte 0x78; FBF5 88 .byte 0x88; FBF6 F0 .byte 0xF0; FBF7 70 .byte 0x70; FBF8 F0 .byte 0xF0; FBF9 F8 .byte 0xF8; FBFA 80 .byte 0x80; FBFB 78 .byte 0x78; FBFC 88 .byte 0x88; FBFD 70 .byte 0x70; FBFE 70 .byte 0x70; FBFF 88 .byte 0x88; FC00 F8 .byte 0xF8; FC01 88 .byte 0x88; FC02 88 .byte 0x88; FC03 F8 .byte 0xF8; FC04 80 .byte 0x80; FC05 68 .byte 0x68; FC06 88 .byte 0x88; FC07 70 .byte 0x70; FC08 20 .byte 0x20; FC09 70 .byte 0x70; FC0A 20 .byte 0x20; FC0B 50 .byte 0x50; FC0C 88 .byte 0x88; FC0D 20 .byte 0x20; FC0E F8 .byte 0xF8; FC0F 70 .byte 0x70; FC10 08 .byte 0x08; FC11 70 .byte 0x70; FC12 00 .byte 0x00; FC13 F8 .byte 0xF8; FC14 00 .byte 0x00; FC15 20 .byte 0x20; FC16 60 .byte 0x60; FC17 20 .byte 0x20; FC18 00 .byte 0x00; FC19 00 .byte 0x00; FC1A 00 .byte 0x00; FC1B 38 .byte 0x38; FC1C 82 .byte 0x82; FC1D 88 .byte 0x88; FC1E 00 .byte 0x00; FC1F 00 .byte 0x00; FC20 00 .byte 0x00; FC21 FE .byte 0xFE; FC22 FF .byte 0xFF; FC23 FE .byte 0xFE; angle_data1: FC24 00 .byte 0x00; FC25 11 .byte 0x11; FC26 41 .byte 0x41; FC27 30 .byte 0x30; FC28 21 .byte 0x21; FC29 10 .byte 0x10; FC2A 20 .byte 0x20; FC2B 31 .byte 0x31; angle_data2: FC2C 00 .byte 0x00; FC2D 01 .byte 0x01; FC2E 03 .byte 0x03; FC2F 06 .byte 0x06; FC30 0A .byte 0x0A; FC31 0F .byte 0x0F; FC32 15 .byte 0x15; FC33 1C .byte 0x1C; FC34 24 .byte 0x24; FC35 2D .byte 0x2D; FC36 08 .byte 0x08; FC37 10 .byte 0x10; FC38 08 SFC38: .byte 0x08; FC39 10 .byte 0x10; FC3A 0B .byte 0x0B; FC3B 08 .byte 0x08; FC3C 10 .byte 0x10; FC3D 0D .byte 0x0D; FC3E 0A .byte 0x0A; FC3F 08 .byte 0x08; FC40 10 .byte 0x10; FC41 0E .byte 0x0E; FC42 0B .byte 0x0B; FC43 09 .byte 0x09; FC44 08 .byte 0x08; FC45 10 .byte 0x10; FC46 0E .byte 0x0E; FC47 0C .byte 0x0C; FC48 0A .byte 0x0A; FC49 09 .byte 0x09; FC4A 08 .byte 0x08; FC4B 10 .byte 0x10; FC4C 0E .byte 0x0E; FC4D 0D .byte 0x0D; FC4E 0B .byte 0x0B; FC4F 0A .byte 0x0A; FC50 09 .byte 0x09; FC51 08 .byte 0x08; FC52 10 .byte 0x10; FC53 0F .byte 0x0F; FC54 0D .byte 0x0D; FC55 0C .byte 0x0C; FC56 0B .byte 0x0B; FC57 0A .byte 0x0A; FC58 09 .byte 0x09; FC59 08 .byte 0x08; FC5A 10 .byte 0x10; FC5B 0F .byte 0x0F; FC5C 0E .byte 0x0E; FC5D 0C .byte 0x0C; FC5E 0B .byte 0x0B; FC5F 0A .byte 0x0A; FC60 09 .byte 0x09; FC61 09 .byte 0x09; FC62 08 .byte 0x08; FC63 10 .byte 0x10; FC64 0F .byte 0x0F; FC65 0E .byte 0x0E; FC66 0D .byte 0x0D; FC67 0C .byte 0x0C; FC68 0B .byte 0x0B; FC69 0A .byte 0x0A; FC6A 09 .byte 0x09; FC6B 09 .byte 0x09; FC6C 08 .byte 0x08; rotation_pair_table: FC6D 00 .byte 0x00; FC6E 19 .byte 0x19; FC6F 32 .byte 0x32; FC70 4A .byte 0x4A; FC71 62 .byte 0x62; FC72 79 .byte 0x79; FC73 8E .byte 0x8E; FC74 A2 .byte 0xA2; FC75 B5 .byte 0xB5; FC76 C6 .byte 0xC6; FC77 D5 .byte 0xD5; FC78 E2 .byte 0xE2; FC79 ED .byte 0xED; FC7A F5 .byte 0xF5; FC7B FB .byte 0xFB; FC7C FF .byte 0xFF; FC7D FF .byte 0xFF; FC7E FF .byte 0xFF; FC7F FB .byte 0xFB; FC80 F5 .byte 0xF5; FC81 ED .byte 0xED; FC82 E2 .byte 0xE2; FC83 D5 .byte 0xD5; FC84 C6 .byte 0xC6; FC85 B5 .byte 0xB5; FC86 A2 .byte 0xA2; FC87 8E .byte 0x8E; FC88 79 .byte 0x79; FC89 62 .byte 0x62; FC8A 4A .byte 0x4A; FC8B 32 .byte 0x32; FC8C 19 .byte 0x19; music_routine_data: FC8D 03 .byte 0x03; FC8E BD .byte 0xBD; FC8F 03 .byte 0x03; FC90 87 .byte 0x87; FC91 03 .byte 0x03; FC92 54 .byte 0x54; FC93 03 .byte 0x03; FC94 24 .byte 0x24; FC95 02 .byte 0x02; FC96 F7 .byte 0xF7; FC97 02 .byte 0x02; FC98 CD .byte 0xCD; FC99 02 .byte 0x02; FC9A A4 .byte 0xA4; FC9B 02 .byte 0x02; FC9C 7E .byte 0x7E; FC9D 02 .byte 0x02; FC9E 5B .byte 0x5B; FC9F 02 .byte 0x02; FCA0 39 .byte 0x39; FCA1 02 .byte 0x02; FCA2 19 .byte 0x19; FCA3 01 .byte 0x01; FCA4 FB .byte 0xFB; FCA5 01 .byte 0x01; FCA6 DE .byte 0xDE; FCA7 01 .byte 0x01; FCA8 C3 .byte 0xC3; FCA9 01 .byte 0x01; FCAA AA .byte 0xAA; FCAB 01 .byte 0x01; FCAC 92 .byte 0x92; FCAD 01 .byte 0x01; FCAE 7C .byte 0x7C; FCAF 01 .byte 0x01; FCB0 66 .byte 0x66; FCB1 01 .byte 0x01; FCB2 52 .byte 0x52; FCB3 01 .byte 0x01; FCB4 3F .byte 0x3F; FCB5 01 .byte 0x01; FCB6 2D .byte 0x2D; FCB7 01 .byte 0x01; FCB8 1C .byte 0x1C; FCB9 01 .byte 0x01; FCBA 0C .byte 0x0C; FCBB 00 .byte 0x00; FCBC FD .byte 0xFD; FCBD 00 .byte 0x00; FCBE EF .byte 0xEF; FCBF 00 .byte 0x00; FCC0 E2 .byte 0xE2; FCC1 00 .byte 0x00; FCC2 D5 .byte 0xD5; FCC3 00 .byte 0x00; FCC4 C9 .byte 0xC9; FCC5 00 .byte 0x00; FCC6 BE .byte 0xBE; FCC7 00 .byte 0x00; FCC8 B3 .byte 0xB3; FCC9 00 .byte 0x00; FCCA A9 .byte 0xA9; FCCB 00 .byte 0x00; FCCC A0 .byte 0xA0; FCCD 00 .byte 0x00; FCCE 97 .byte 0x97; FCCF 00 .byte 0x00; FCD0 8E .byte 0x8E; FCD1 00 .byte 0x00; FCD2 86 .byte 0x86; FCD3 00 .byte 0x00; FCD4 7F .byte 0x7F; FCD5 00 .byte 0x00; FCD6 78 .byte 0x78; FCD7 00 .byte 0x00; FCD8 71 .byte 0x71; FCD9 00 .byte 0x00; FCDA 6B .byte 0x6B; FCDB 00 .byte 0x00; FCDC 65 .byte 0x65; FCDD 00 .byte 0x00; FCDE 5F .byte 0x5F; FCDF 00 .byte 0x00; FCE0 5A .byte 0x5A; FCE1 00 .byte 0x00; FCE2 55 .byte 0x55; FCE3 00 .byte 0x00; FCE4 50 .byte 0x50; FCE5 00 .byte 0x00; FCE6 4B .byte 0x4B; FCE7 00 .byte 0x00; FCE8 47 .byte 0x47; FCE9 00 .byte 0x00; FCEA 43 .byte 0x43; FCEB 00 .byte 0x00; FCEC 3F .byte 0x3F; FCED 00 .byte 0x00; FCEE 3C .byte 0x3C; FCEF 00 .byte 0x00; FCF0 38 .byte 0x38; FCF1 00 .byte 0x00; FCF2 35 .byte 0x35; FCF3 00 .byte 0x00; FCF4 32 .byte 0x32; FCF5 00 .byte 0x00; FCF6 2F .byte 0x2F; FCF7 00 .byte 0x00; FCF8 2D .byte 0x2D; FCF9 00 .byte 0x00; FCFA 2A .byte 0x2A; FCFB 00 .byte 0x00; FCFC 28 .byte 0x28; FCFD 00 .byte 0x00; FCFE 26 .byte 0x26; FCFF 00 .byte 0x00; FD00 24 .byte 0x24; FD01 00 .byte 0x00; FD02 22 .byte 0x22; FD03 00 .byte 0x00; FD04 20 .byte 0x20; FD05 00 .byte 0x00; FD06 1E .byte 0x1E; FD07 00 .byte 0x00; FD08 1C .byte 0x1C; FD09 00 .byte 0x00; FD0A 1B .byte 0x1B; FD0B 00 .byte 0x00; FD0C 00 .byte 0x00; intro_music_block: FD0D FEE8 .word music_header1b; FD0F FEB6 .word music_header2a; FD11 93 .byte 0x93; FD12 1F .byte 0x1F; FD13 0C .byte 0x0C; FD14 93 .byte 0x93; FD15 1F .byte 0x1F; FD16 06 .byte 0x06; FD17 98 .byte 0x98; FD18 9F .byte 0x9F; FD19 24 .byte 0x24; FD1A 3C .byte 0x3C; FD1B 11 .byte 0x11; FD1C 80 .byte 0x80; berzerk_music_block: FD1D FD69 .word music_header1a; FD1F FD79 .word music_header2b; FD21 21 .byte 0x21; FD22 07 .byte 0x07; FD23 21 .byte 0x21; FD24 07 .byte 0x07; FD25 21 .byte 0x21; FD26 07 .byte 0x07; FD27 21 .byte 0x21; FD28 07 .byte 0x07; FD29 21 .byte 0x21; FD2A 07 .byte 0x07; FD2B 21 .byte 0x21; FD2C 07 .byte 0x07; FD2D 21 .byte 0x21; FD2E 0E .byte 0x0E; FD2F 99 .byte 0x99; FD30 9F .byte 0x9F; FD31 24 .byte 0x24; FD32 0E .byte 0x0E; FD33 95 .byte 0x95; FD34 9B .byte 0x9B; FD35 20 .byte 0x20; FD36 0E .byte 0x0E; FD37 21 .byte 0x21; FD38 07 .byte 0x07; FD39 21 .byte 0x21; FD3A 07 .byte 0x07; FD3B 21 .byte 0x21; FD3C 07 .byte 0x07; FD3D 21 .byte 0x21; FD3E 07 .byte 0x07; FD3F 21 .byte 0x21; FD40 07 .byte 0x07; FD41 21 .byte 0x21; FD42 07 .byte 0x07; FD43 9D .byte 0x9D; FD44 A3 .byte 0xA3; FD45 28 .byte 0x28; FD46 0E .byte 0x0E; FD47 A0 .byte 0xA0; FD48 A6 .byte 0xA6; FD49 2B .byte 0x2B; FD4A 0E .byte 0x0E; FD4B 22 .byte 0x22; FD4C 02 .byte 0x02; FD4D 28 .byte 0x28; FD4E 02 .byte 0x02; FD4F 2D .byte 0x2D; FD50 02 .byte 0x02; FD51 28 .byte 0x28; FD52 02 .byte 0x02; FD53 22 .byte 0x22; FD54 02 .byte 0x02; FD55 28 .byte 0x28; FD56 02 .byte 0x02; FD57 2D .byte 0x2D; FD58 02 .byte 0x02; FD59 28 .byte 0x28; FD5A 02 .byte 0x02; FD5B 22 .byte 0x22; FD5C 02 .byte 0x02; FD5D 28 .byte 0x28; FD5E 02 .byte 0x02; FD5F 2D .byte 0x2D; FD60 02 .byte 0x02; FD61 28 .byte 0x28; FD62 02 .byte 0x02; FD63 2E .byte 0x2E; FD64 02 .byte 0x02; FD65 2D .byte 0x2D; FD66 28 .byte 0x28; FD67 21 .byte 0x21; FD68 80 .byte 0x80; music_header1a: FD69 EF .byte 0xEF; FD6A FF .byte 0xFF; FD6B FE .byte 0xFE; FD6C DC .byte 0xDC; FD6D BA .byte 0xBA; FD6E 00 .byte 0x00; FD6F 00 .byte 0x00; FD70 00 .byte 0x00; FD71 00 .byte 0x00; FD72 00 .byte 0x00; FD73 00 .byte 0x00; FD74 00 .byte 0x00; FD75 00 .byte 0x00; FD76 00 .byte 0x00; FD77 00 .byte 0x00; FD78 00 .byte 0x00; music_header2b: FD79 00 .byte 0x00; FD7A 01 .byte 0x01; FD7B 02 .byte 0x02; FD7C 01 .byte 0x01; FD7D 00 .byte 0x00; FD7E FF .byte 0xFF; FD7F FE .byte 0xFE; FD80 FF .byte 0xFF; FD81 FD .byte 0xFD; FD82 C3 .byte 0xC3; FD83 FE .byte 0xFE; FD84 B6 .byte 0xB6; FD85 51 .byte 0x51; FD86 24 .byte 0x24; FD87 50 .byte 0x50; FD88 06 .byte 0x06; FD89 50 .byte 0x50; FD8A 06 .byte 0x06; FD8B 50 .byte 0x50; FD8C 0C .byte 0x0C; FD8D 50 .byte 0x50; FD8E 06 .byte 0x06; FD8F 50 .byte 0x50; FD90 06 .byte 0x06; FD91 50 .byte 0x50; FD92 04 .byte 0x04; FD93 50 .byte 0x50; FD94 04 .byte 0x04; FD95 50 .byte 0x50; FD96 04 .byte 0x04; FD97 50 .byte 0x50; FD98 18 .byte 0x18; FD99 50 .byte 0x50; FD9A 04 .byte 0x04; FD9B 50 .byte 0x50; FD9C 04 .byte 0x04; FD9D 50 .byte 0x50; FD9E 04 .byte 0x04; FD9F 50 .byte 0x50; FDA0 0C .byte 0x0C; FDA1 50 .byte 0x50; FDA2 0C .byte 0x0C; FDA3 50 .byte 0x50; FDA4 24 .byte 0x24; FDA5 50 .byte 0x50; FDA6 06 .byte 0x06; FDA7 50 .byte 0x50; FDA8 06 .byte 0x06; FDA9 50 .byte 0x50; FDAA 0C .byte 0x0C; FDAB 50 .byte 0x50; FDAC 06 .byte 0x06; FDAD 50 .byte 0x50; FDAE 06 .byte 0x06; FDAF 50 .byte 0x50; FDB0 04 .byte 0x04; FDB1 50 .byte 0x50; FDB2 04 .byte 0x04; FDB3 50 .byte 0x50; FDB4 04 .byte 0x04; FDB5 50 .byte 0x50; FDB6 18 .byte 0x18; FDB7 50 .byte 0x50; FDB8 04 .byte 0x04; FDB9 50 .byte 0x50; FDBA 04 .byte 0x04; FDBB 50 .byte 0x50; FDBC 04 .byte 0x04; FDBD 50 .byte 0x50; FDBE 0C .byte 0x0C; FDBF 50 .byte 0x50; FDC0 18 .byte 0x18; FDC1 26 .byte 0x26; FDC2 80 .byte 0x80; FDC3 FD .byte 0xFD; FDC4 BA .byte 0xBA; FDC5 98 .byte 0x98; FDC6 76 .byte 0x76; FDC7 55 .byte 0x55; FDC8 44 .byte 0x44; FDC9 33 .byte 0x33; FDCA 22 .byte 0x22; FDCB 11 .byte 0x11; FDCC 00 .byte 0x00; FDCD 00 .byte 0x00; FDCE 00 .byte 0x00; FDCF 00 .byte 0x00; FDD0 00 .byte 0x00; FDD1 00 .byte 0x00; FDD2 00 .byte 0x00; FDD3 FE .byte 0xFE; FDD4 28 .byte 0x28; FDD5 FD .byte 0xFD; FDD6 79 .byte 0x79; FDD7 98 .byte 0x98; FDD8 1C .byte 0x1C; FDD9 10 .byte 0x10; FDDA 3F .byte 0x3F; FDDB 08 .byte 0x08; FDDC 98 .byte 0x98; FDDD 1C .byte 0x1C; FDDE 04 .byte 0x04; FDDF 98 .byte 0x98; FDE0 1C .byte 0x1C; FDE1 04 .byte 0x04; FDE2 98 .byte 0x98; FDE3 1C .byte 0x1C; FDE4 10 .byte 0x10; FDE5 3F .byte 0x3F; FDE6 08 .byte 0x08; FDE7 98 .byte 0x98; FDE8 1C .byte 0x1C; FDE9 04 .byte 0x04; FDEA 98 .byte 0x98; FDEB 1C .byte 0x1C; FDEC 04 .byte 0x04; FDED 98 .byte 0x98; FDEE 1C .byte 0x1C; FDEF 08 .byte 0x08; FDF0 93 .byte 0x93; FDF1 18 .byte 0x18; FDF2 08 .byte 0x08; FDF3 98 .byte 0x98; FDF4 1C .byte 0x1C; FDF5 08 .byte 0x08; FDF6 9C .byte 0x9C; FDF7 1F .byte 0x1F; FDF8 08 .byte 0x08; FDF9 98 .byte 0x98; FDFA 1C .byte 0x1C; FDFB 08 .byte 0x08; FDFC 93 .byte 0x93; FDFD 18 .byte 0x18; FDFE 08 .byte 0x08; FDFF 98 .byte 0x98; FE00 1C .byte 0x1C; FE01 08 .byte 0x08; FE02 93 .byte 0x93; FE03 18 .byte 0x18; FE04 08 .byte 0x08; FE05 98 .byte 0x98; FE06 1C .byte 0x1C; FE07 08 .byte 0x08; FE08 9C .byte 0x9C; FE09 1F .byte 0x1F; FE0A 08 .byte 0x08; FE0B 98 .byte 0x98; FE0C 1C .byte 0x1C; FE0D 08 .byte 0x08; FE0E 93 .byte 0x93; FE0F 18 .byte 0x18; FE10 08 .byte 0x08; FE11 98 .byte 0x98; FE12 1C .byte 0x1C; FE13 08 .byte 0x08; FE14 93 .byte 0x93; FE15 18 .byte 0x18; FE16 08 .byte 0x08; FE17 98 .byte 0x98; FE18 1C .byte 0x1C; FE19 08 .byte 0x08; FE1A 9C .byte 0x9C; FE1B 1F .byte 0x1F; FE1C 08 .byte 0x08; FE1D 98 .byte 0x98; FE1E 1C .byte 0x1C; FE1F 08 .byte 0x08; FE20 93 .byte 0x93; FE21 18 .byte 0x18; FE22 08 .byte 0x08; FE23 9C .byte 0x9C; FE24 1F .byte 0x1F; FE25 30 .byte 0x30; FE26 1A .byte 0x1A; FE27 80 .byte 0x80; FE28 FF .byte 0xFF; FE29 FE .byte 0xFE; FE2A DC .byte 0xDC; FE2B BA .byte 0xBA; FE2C 98 .byte 0x98; FE2D 76 .byte 0x76; FE2E 54 .byte 0x54; FE2F 32 .byte 0x32; FE30 10 .byte 0x10; FE31 00 .byte 0x00; FE32 00 .byte 0x00; FE33 00 .byte 0x00; FE34 00 .byte 0x00; FE35 00 .byte 0x00; FE36 00 .byte 0x00; FE37 00 .byte 0x00; FE38 FE .byte 0xFE; FE39 66 .byte 0x66; FE3A FE .byte 0xFE; FE3B B6 .byte 0xB6; FE3C 0C .byte 0x0C; FE3D 18 .byte 0x18; FE3E 11 .byte 0x11; FE3F 18 .byte 0x18; FE40 0C .byte 0x0C; FE41 18 .byte 0x18; FE42 11 .byte 0x11; FE43 18 .byte 0x18; FE44 0C .byte 0x0C; FE45 18 .byte 0x18; FE46 11 .byte 0x11; FE47 18 .byte 0x18; FE48 0C .byte 0x0C; FE49 12 .byte 0x12; FE4A 0C .byte 0x0C; FE4B 06 .byte 0x06; FE4C 11 .byte 0x11; FE4D 18 .byte 0x18; FE4E 9D .byte 0x9D; FE4F 21 .byte 0x21; FE50 18 .byte 0x18; FE51 9F .byte 0x9F; FE52 23 .byte 0x23; FE53 18 .byte 0x18; FE54 A1 .byte 0xA1; FE55 24 .byte 0x24; FE56 18 .byte 0x18; FE57 A3 .byte 0xA3; FE58 26 .byte 0x26; FE59 18 .byte 0x18; FE5A 9F .byte 0x9F; FE5B A4 .byte 0xA4; FE5C 28 .byte 0x28; FE5D 18 .byte 0x18; FE5E 07 .byte 0x07; FE5F 12 .byte 0x12; FE60 07 .byte 0x07; FE61 06 .byte 0x06; FE62 00 .byte 0x00; FE63 3C .byte 0x3C; FE64 18 .byte 0x18; FE65 80 .byte 0x80; FE66 DE .byte 0xDE; FE67 EF .byte 0xEF; FE68 FE .byte 0xFE; FE69 DC .byte 0xDC; FE6A BA .byte 0xBA; FE6B 00 .byte 0x00; FE6C 00 .byte 0x00; FE6D 00 .byte 0x00; FE6E 00 .byte 0x00; FE6F 00 .byte 0x00; FE70 00 .byte 0x00; FE71 00 .byte 0x00; FE72 00 .byte 0x00; FE73 00 .byte 0x00; FE74 00 .byte 0x00; FE75 00 .byte 0x00; FE76 FE .byte 0xFE; FE77 B2 .byte 0xB2; FE78 FE .byte 0xFE; FE79 B6 .byte 0xB6; FE7A 18 .byte 0x18; FE7B 06 .byte 0x06; FE7C 1A .byte 0x1A; FE7D 06 .byte 0x06; FE7E 1C .byte 0x1C; FE7F 0C .byte 0x0C; FE80 18 .byte 0x18; FE81 0C .byte 0x0C; FE82 1A .byte 0x1A; FE83 24 .byte 0x24; FE84 23 .byte 0x23; FE85 18 .byte 0x18; FE86 17 .byte 0x17; FE87 06 .byte 0x06; FE88 18 .byte 0x18; FE89 06 .byte 0x06; FE8A 1A .byte 0x1A; FE8B 0C .byte 0x0C; FE8C 17 .byte 0x17; FE8D 0C .byte 0x0C; FE8E 18 .byte 0x18; FE8F 24 .byte 0x24; FE90 24 .byte 0x24; FE91 18 .byte 0x18; FE92 A4 .byte 0xA4; FE93 28 .byte 0x28; FE94 0C .byte 0x0C; FE95 A3 .byte 0xA3; FE96 26 .byte 0x26; FE97 0C .byte 0x0C; FE98 A1 .byte 0xA1; FE99 24 .byte 0x24; FE9A 0C .byte 0x0C; FE9B 9F .byte 0x9F; FE9C 23 .byte 0x23; FE9D 0C .byte 0x0C; FE9E 9D .byte 0x9D; FE9F 21 .byte 0x21; FEA0 18 .byte 0x18; FEA1 9A .byte 0x9A; FEA2 1F .byte 0x1F; FEA3 18 .byte 0x18; FEA4 17 .byte 0x17; FEA5 06 .byte 0x06; FEA6 18 .byte 0x18; FEA7 06 .byte 0x06; FEA8 1A .byte 0x1A; FEA9 0C .byte 0x0C; FEAA 17 .byte 0x17; FEAB 0C .byte 0x0C; FEAC 18 .byte 0x18; FEAD 24 .byte 0x24; FEAE 24 .byte 0x24; FEAF 24 .byte 0x24; FEB0 18 .byte 0x18; FEB1 80 .byte 0x80; FEB2 FF .byte 0xFF; FEB3 EE .byte 0xEE; FEB4 DD .byte 0xDD; FEB5 CC .byte 0xCC; music_header2a: FEB6 00 .byte 0x00; FEB7 00 .byte 0x00; FEB8 00 .byte 0x00; FEB9 00 .byte 0x00; FEBA 00 .byte 0x00; FEBB 00 .byte 0x00; FEBC 00 .byte 0x00; FEBD 00 .byte 0x00; FEBE 00 .byte 0x00; FEBF 00 .byte 0x00; FEC0 00 .byte 0x00; FEC1 00 .byte 0x00; FEC2 00 .byte 0x00; FEC3 00 .byte 0x00; FEC4 00 .byte 0x00; FEC5 00 .byte 0x00; FEC6 FE .byte 0xFE; FEC7 E8 .byte 0xE8; FEC8 FE .byte 0xFE; FEC9 B6 .byte 0xB6; FECA 96 .byte 0x96; FECB 9A .byte 0x9A; FECC 1D .byte 0x1D; FECD 1E .byte 0x1E; FECE 91 .byte 0x91; FECF 95 .byte 0x95; FED0 18 .byte 0x18; FED1 1E .byte 0x1E; FED2 94 .byte 0x94; FED3 98 .byte 0x98; FED4 1B .byte 0x1B; FED5 1E .byte 0x1E; FED6 8F .byte 0x8F; FED7 94 .byte 0x94; FED8 18 .byte 0x18; FED9 14 .byte 0x14; FEDA 16 .byte 0x16; FEDB 0A .byte 0x0A; FEDC 8C .byte 0x8C; FEDD 91 .byte 0x91; FEDE 15 .byte 0x15; FEDF 14 .byte 0x14; FEE0 16 .byte 0x16; FEE1 0A .byte 0x0A; FEE2 91 .byte 0x91; FEE3 95 .byte 0x95; FEE4 18 .byte 0x18; FEE5 32 .byte 0x32; FEE6 18 .byte 0x18; FEE7 80 .byte 0x80; music_header1b: FEE8 EE .byte 0xEE; FEE9 FF .byte 0xFF; FEEA FF .byte 0xFF; FEEB EE .byte 0xEE; FEEC EE .byte 0xEE; FEED DD .byte 0xDD; FEEE CC .byte 0xCC; FEEF BB .byte 0xBB; FEF0 AA .byte 0xAA; FEF1 99 .byte 0x99; FEF2 88 .byte 0x88; FEF3 88 .byte 0x88; FEF4 88 .byte 0x88; FEF5 88 .byte 0x88; FEF6 88 .byte 0x88; FEF7 88 .byte 0x88; FEF8 FF .byte 0xFF; FEF9 16 .byte 0x16; FEFA FE .byte 0xFE; FEFB B6 .byte 0xB6; FEFC 1C .byte 0x1C; FEFD 06 .byte 0x06; FEFE 1F .byte 0x1F; FEFF 06 .byte 0x06; FF00 1C .byte 0x1C; FF01 06 .byte 0x06; FF02 18 .byte 0x18; FF03 06 .byte 0x06; FF04 1A .byte 0x1A; FF05 06 .byte 0x06; FF06 18 .byte 0x18; FF07 06 .byte 0x06; FF08 15 .byte 0x15; FF09 06 .byte 0x06; FF0A 13 .byte 0x13; FF0B 06 .byte 0x06; FF0C 18 .byte 0x18; FF0D 06 .byte 0x06; FF0E 13 .byte 0x13; FF0F 06 .byte 0x06; FF10 17 .byte 0x17; FF11 06 .byte 0x06; FF12 18 .byte 0x18; FF13 1E .byte 0x1E; FF14 18 .byte 0x18; FF15 80 .byte 0x80; FF16 FF .byte 0xFF; FF17 FF .byte 0xFF; FF18 EE .byte 0xEE; FF19 EE .byte 0xEE; FF1A DD .byte 0xDD; FF1B DD .byte 0xDD; FF1C CC .byte 0xCC; FF1D CC .byte 0xCC; FF1E 00 .byte 0x00; FF1F 00 .byte 0x00; FF20 00 .byte 0x00; FF21 00 .byte 0x00; FF22 00 .byte 0x00; FF23 00 .byte 0x00; FF24 00 .byte 0x00; FF25 00 .byte 0x00; FF26 FE .byte 0xFE; FF27 28 .byte 0x28; FF28 FE .byte 0xFE; FF29 B6 .byte 0xB6; FF2A 16 .byte 0x16; FF2B 0F .byte 0x0F; FF2C 16 .byte 0x16; FF2D 05 .byte 0x05; FF2E 16 .byte 0x16; FF2F 05 .byte 0x05; FF30 16 .byte 0x16; FF31 05 .byte 0x05; FF32 1A .byte 0x1A; FF33 0F .byte 0x0F; FF34 16 .byte 0x16; FF35 0F .byte 0x0F; FF36 1D .byte 0x1D; FF37 0F .byte 0x0F; FF38 1D .byte 0x1D; FF39 05 .byte 0x05; FF3A 1D .byte 0x1D; FF3B 05 .byte 0x05; FF3C 1D .byte 0x1D; FF3D 05 .byte 0x05; FF3E 21 .byte 0x21; FF3F 0F .byte 0x0F; FF40 1D .byte 0x1D; FF41 32 .byte 0x32; FF42 1D .byte 0x1D; FF43 80 .byte 0x80; FF44 FE .byte 0xFE; FF45 28 .byte 0x28; FF46 FE .byte 0xFE; FF47 B6 .byte 0xB6; FF48 16 .byte 0x16; FF49 06 .byte 0x06; FF4A 16 .byte 0x16; FF4B 02 .byte 0x02; FF4C 16 .byte 0x16; FF4D 02 .byte 0x02; FF4E 16 .byte 0x16; FF4F 02 .byte 0x02; FF50 1A .byte 0x1A; FF51 06 .byte 0x06; FF52 16 .byte 0x16; FF53 06 .byte 0x06; FF54 1D .byte 0x1D; FF55 06 .byte 0x06; FF56 1D .byte 0x1D; FF57 02 .byte 0x02; FF58 1D .byte 0x1D; FF59 02 .byte 0x02; FF5A 1D .byte 0x1D; FF5B 02 .byte 0x02; FF5C 21 .byte 0x21; FF5D 06 .byte 0x06; FF5E 1D .byte 0x1D; FF5F 32 .byte 0x32; FF60 11 .byte 0x11; FF61 80 .byte 0x80; FF62 FE .byte 0xFE; FF63 28 .byte 0x28; FF64 FE .byte 0xFE; FF65 B6 .byte 0xB6; FF66 1B .byte 0x1B; FF67 0F .byte 0x0F; FF68 16 .byte 0x16; FF69 05 .byte 0x05; FF6A 16 .byte 0x16; FF6B 05 .byte 0x05; FF6C 16 .byte 0x16; FF6D 05 .byte 0x05; FF6E 17 .byte 0x17; FF6F 30 .byte 0x30; FF70 16 .byte 0x16; FF71 05 .byte 0x05; FF72 16 .byte 0x16; FF73 05 .byte 0x05; FF74 16 .byte 0x16; FF75 05 .byte 0x05; FF76 17 .byte 0x17; FF77 30 .byte 0x30; FF78 16 .byte 0x16; FF79 80 .byte 0x80; FF7A FD .byte 0xFD; FF7B 69 .byte 0x69; FF7C FE .byte 0xFE; FF7D B6 .byte 0xB6; FF7E A0 .byte 0xA0; FF7F 23 .byte 0x23; FF80 12 .byte 0x12; FF81 A0 .byte 0xA0; FF82 23 .byte 0x23; FF83 0C .byte 0x0C; FF84 9C .byte 0x9C; FF85 20 .byte 0x20; FF86 06 .byte 0x06; FF87 9E .byte 0x9E; FF88 21 .byte 0x21; FF89 12 .byte 0x12; FF8A 9C .byte 0x9C; FF8B 20 .byte 0x20; FF8C 32 .byte 0x32; FF8D 13 .byte 0x13; FF8E 80 .byte 0x80; FF8F FD .byte 0xFD; FF90 C3 .byte 0xC3; FF91 FE .byte 0xFE; FF92 B6 .byte 0xB6; FF93 16 .byte 0x16; FF94 04 .byte 0x04; FF95 16 .byte 0x16; FF96 04 .byte 0x04; FF97 16 .byte 0x16; FF98 04 .byte 0x04; FF99 16 .byte 0x16; FF9A 04 .byte 0x04; FF9B 1A .byte 0x1A; FF9C 08 .byte 0x08; FF9D 1C .byte 0x1C; FF9E 80 .byte 0x80; FF9F A6 .byte 0xA6; FFA0 A0 .byte 0xA0; FFA1 20 .byte 0x20; FFA2 08 .byte 0x08; FFA3 BD .byte 0xBD; FFA4 F3 .byte 0xF3; FFA5 BE .byte 0xBE; FFA6 B6 .byte 0xB6; FFA7 C8 .byte 0xC8; FFA8 80 .byte 0x80; FFA9 84 .byte 0x84; FFAA 7F .byte 0x7F; FFAB B7 .byte 0xB7; FFAC C8 .byte 0xC8; FFAD 80 .byte 0x80; FFAE 7A .byte 0x7A; FFAF C8 .byte 0xC8; FFB0 80 .byte 0x80; FFB1 A6 .byte 0xA6; FFB2 A4 .byte 0xA4; FFB3 47 .byte 0x47; FFB4 84 .byte 0x84; FFB5 F8 .byte 0xF8; FFB6 E6 .byte 0xE6; FFB7 A0 .byte 0xA0; FFB8 58 .byte 0x58; FFB9 58 .byte 0x58; FFBA 58 .byte 0x58; FFBB 58 .byte 0x58; FFBC 57 .byte 0x57; FFBD C4 .byte 0xC4; FFBE F8 .byte 0xF8; FFBF 7D .byte 0x7D; FFC0 C8 .byte 0xC8; FFC1 80 .byte 0x80; FFC2 2B .byte 0x2B; FFC3 DF .byte 0xDF; FFC4 BD .byte 0xBD; FFC5 F3 .byte 0xF3; FFC6 DF .byte 0xDF; FFC7 B6 .byte 0xB6; FFC8 C8 .byte 0xC8; FFC9 80 .byte 0x80; FFCA 85 .byte 0x85; FFCB 0F .byte 0x0F; FFCC 26 .byte 0x26; FFCD E0 .byte 0xE0; FFCE 85 .byte 0x85; FFCF 20 .byte 0x20; FFD0 27 .byte 0x27; FFD1 CD .byte 0xCD; FFD2 39 .byte 0x39; /* "9" */ FFD3 4B .byte 0x4B; /* "K" */ FFD4 41 .byte 0x41; /* "A" */ FFD5 52 .byte 0x52; /* "R" */ FFD6 52 .byte 0x52; /* "R" */ FFD7 53 .byte 0x53; /* "S" */ FFD8 4F .byte 0x4F; /* "O" */ FFD9 46 .byte 0x46; /* "F" */ FFDA 54 .byte 0x54; /* "T" */ FFDB 38 .byte 0x38; /* "8" */ FFDC 32 .byte 0x32; /* "2" */ FFDD 4C .byte 0x4C; /* "L" */ FFDE 44 .byte 0x44; /* "D" */ FFDF 4D .byte 0x4D; /* "M" */ FFE0 43 .byte 0x43; /* "C" */ FFE1 42 .byte 0x42; /* "B" */ FFE2 43 .byte 0x43; /* "C" */ FFE3 4A .byte 0x4A; /* "J" */ FFE4 54 .byte 0x54; /* "T" */ FFE5 38 .byte 0x38; /* "8" */ FFE6 32 .byte 0x32; /* "2" */ FFE7 4C .byte 0x4C; /* "L" */ FFE8 44 .byte 0x44; /* "D" */ FFE9 4D .byte 0x4D; /* "M" */ FFEA 43 .byte 0x43; /* "C" */ FFEB 42 .byte 0x42; /* "B" */ FFEC 43 .byte 0x43; /* "C" */ FFED 4A .byte 0x4A; /* "J" */ /* 6809 interrupt and startup vectors */ FFEE 0000 .word 0x0000; FFF0 0000 .word 0x0000; FFF2 CBF2 .word 0xCBF2; /* SW3 */ FFF4 CBF2 .word 0xCBF2; /* SW2 */ FFF6 CBF5 .word 0xCBF5; /* FIRQ */ FFF8 CBF8 .word 0xCBF8; /* IRQ */ FFFA CBFB .word 0xCBFB; /* SW1 */ FFFC CBFB .word 0xCBFB; /* NMI */ FFFE F000 .word start_of_OS_ROM; /* RESET */ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Mine Storm Source Date: 24 Aug 1994 14:26:17 GMT Organization: Computer Science Dept., Univ. of Western Ontario, London, Canada Lines: 6657 Distribution: world Message-ID: <33fla9$1ij@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca From fred@hpcvusc.cv.hp.com Wed Aug 24 09:49 EDT 1994 Date: Wed, 24 Aug 1994 06:47:23 -0700 From: Fred Taft To: magundi@uwo.ca Subject: Mine Storm source Status: O /* * This work was originally done by Fred Taft (fred@hp-pcd.cv.hp.com). * Please forward any comments, corrections or additions back to Fred. * * Mine Storm */ .org 0xE000; MS_header: .word #MS_music; /* Mine Storm music block pointer */ .byte 0xF8; /* height = -8 */ .byte 0x50; /* width = 80 */ .byte 0x30; /* rel y = 48 */ .byte 0xE8; /* rel x = -24 */ .byte "MINE",0x80; .byte 0xF8; /* height = -8 */ .byte 0x50; /* width = 80 */ .byte 0x00; /* rel y = 0 */ .byte 0xDE; /* rel x = -34 */ .byte "STORM",0x80,0x00; /* Start of the Mine Storm game */ MS_start: ldx #0xC883; /* Clear C883 - CBC5 */ PE019: clr ,x+; cmpx #0xCBC5; bne PE019; jsr $init_motion_dots; inc $C824; lda #0xBB; sta $C880; /* Store console enable flags in C880 */ ldx #0x0101; stx $C881; /* Store jstick mak in C881 */ restart_game: ldx #0xC883; /* Clear C883 - CB70 */ PE034: clr ,x+; cmpx #0xCB70; bne PE034; bra PE03D; PE03D: jsr $dptoC8; ldd #0x0200; /* Ask for number of players */ jsr $get_players_game; dec 0x79; /* C879 contains # of players selected */ clr 0x56; clr 0x9B; /* C89B specifies which player is active */ ldx #0xC8A8; jsr $set_dft_score; /* Initialize player 1 score */ ldx #0xC8AF; jsr $set_dft_score; /* Initialize player 2 score */ ldx #0xC8F9; jsr $set_dft_score; /* Initialize mine field # for player 1 */ ldd #0x0001; jsr $add_d_to_x_in_bcd; ldx #0xC900; jsr $set_dft_score; /* Initialize mine field # for player 2 */ ldd #0x0001; jsr $add_d_to_x_in_bcd; ldx #mines_at_level_x; /* Initialize player 1 & 2's pointers */ stx 0xC4; /* into the structure describing which */ stx 0xC6; /* mines are at which level. */ lda #0x05; sta 0xD9; /* Initialize # of ships for active player */ sta 0xDA; /* Initialize # of ships for player 1 */ sta 0xDB; /* Initialize # of ships for player 2 */ bra restart_same_level; start_next_mine_level: jsr $bring_ship_to_center; ldy #0xC8C4; /* Increment the pointer into the struct */ lda 0x9B; /* describing which mines are at which */ ldx a,y; /* level, for the active player. */ leax 4,x; stx a,y; ldx #mine_field_level_pointers; lda 0x9B; /* Check the mine field level for */ ldx a,x; /* the active player, and if it is */ lda 5,x; /* a multiple of 4, then award that */ anda #0x03; /* player a bonus ship. */ bne goto_next_mine_level; inc 0xD9; goto_next_mine_level: ldd #0x0001; /* Increment active players mine */ jsr $add_d_to_x_in_bcd; /* field level indicator. */ restart_same_level: jsr $init_RAM_for_new_level; ldx #0xC8C4; /* Use the pointer in C8C4 (player 1) */ lda 0x9B; /* or C8C6 (player 2) to determine */ ldx a,x; /* which mines are at this level. */ lda ,x; bmi check_4_end_of_game; /* After level 13, skip any level whose */ jsr $seed_the_screen; /* first byte is negative. */ bra main_loop; check_4_end_of_game: ldd 0xF0; /* If C8F0 counts down to 0, then */ subd #0x0001; /* start a new game; used as a delay */ std 0xF0; /* after a game is over. */ beq start_a_new_game; /* Display 'game over' string, & both scores */ pshs dp; jsr $dptoD0; jsr $display_both_scores; ldu #game_over; jsr $MS_print_1_string7F; puls dp; lda 0x0F; /* If no buttons pressed, then see if */ beq main_loop; /* we should goto advanced levels. */ /* * Find out if a new hi score is available, * and then start up a new game. */ start_a_new_game: ldx #0xC8A8; /* See if player 1 has new hi score */ ldu #0xCBEB; jsr $check_4_new_hi_score; ldx #0xC8AF; /* See if player 2 has new hi score */ ldu #0xCBEB; jsr $check_4_new_hi_score; ldd 0xF0; lbne restart_game; /* Just start a new game */ jsr $reinit; clr 0x3B; /* Flag that a hi score should be displayed */ lds #0xCBEA; jmp $powerup_loop; /* Go thru a complete reset sequence */ /* * This is the main loop during a players turn. Control will * remain in this loop, until either a player clears a level, * or has his ship destroyed. */ main_loop: pshs dp; jsr $process_indirect_jumps; jsr $draw_non_dead_mines; jsr $process_jstick_and_buttons; jsr $process_bullets; jsr $reseed_screen; puls dp; jsr $check_bullets_for_hits; jsr $check_ship_4_mine_collision; jsr $check_ship_4_enemy_collision; jsr $display_explosion_pattern; blo main_loop; lda 0xBD; /* See if cmd ship is disabled */ lbeq start_next_mine_level; lda 0xBE; /* See if the game is over */ lbne check_4_end_of_game; jmp $restart_same_level; /* * This block of code is responsible for seeding the screen * at the beginning of play. It will draw the enemy ship * as it moves from the top of the screen to the bottom. * After the field has been completely seeded, the mine * field number will be displayed. * I think that the x register, at entry, points to a * structure describing the types of mines for this level. */ seed_the_screen: stx 0xC2; /* Save pointer to mine info */ ldd #0x7F00; std 0xDC; /* C8DC contains enemy ship coords */ sta 0xB7; /* C8B7 is used as loop cntr (0x7F) */ lda #0x20; sta 0x9C; /* Set up 1 of the indirect */ ldx #generate_mine_coords; /* jump ptrs, to generate some */ stx 0x9D; /* mine coordinates. */ ldx #0xC933; /* Load mine buf addr into C8B9-C8BA */ stx 0xB9; lda #0x1D; /* Load # of mines into C8B8 */ sta 0xB8; clr 0x56; ldu #MS_music; jsr $init_sound2; continue_seeding_screen: pshs dp; jsr $PE711; /* Draw active players ship count */ jsr $init_sound; lda 0x26; /* Decrement our loop counter, C8B7 */ bita #0x01; /* every other pass. */ bne PE15C; dec 0xB7; PE15C: jsr $process_indirect_jumps; /* This block draws the enemy ship */ jsr $display_both_scores; jsr $do_sound; jsr $draw_non_dead_mines; jsr $intensity_to_5F; ldb $C8B7; /* Wait until screen is seeded, */ beq activate_4_mines; /* then activate 1st 4 mines. */ ldx #enemy_ship_pt1; ldy $C8DC; jsr $move_y_draw_x; /* Draw the enemy ship */ ldx #enemy_ship_pt2; jsr $move_y_draw_x; ldx #enemy_ship_pt3; jsr $move_y_draw_x; puls dp; dec 0xDC; /* Decrement y coord for enemy ship */ bra continue_seeding_screen; /* * This routine is called at the beginning of a turn for the * active player. It will activate the first 4 mines for * the level. The type of mines activated are controlled * by the array whose pointer is contained in C8C2. */ activate_4_mines: puls dp; clr 0x9C; lda #0x04; /* Use C8B7 as a loop counter */ sta 0xB7; /* Use C8B8 as a delay counter; when it */ lda #0x7F; /* = 0, stop displaying the mine field */ sta 0xB8; /* level, and activate 1st 4 mine. */ PE198: lda 0xB7; beq PE1E6; /* Exit when loop counter = 0 */ ldb 0xB8; beq PE1A4; /* Don't activate the mines until the */ dec 0xB8; /* counter in C8B8 = 0; this allows the */ bra PE1B6; /* mine field level to stay displayed awhile */ PE1A4: ldb 0x26; andb #0x1F; /* After every 31 times thru waitrecal(), */ bne PE1B6; /* activate another mine. */ deca; sta 0xB7; /* Decrement loop counter */ ldx 0xC2; lda a,x; /* Determine what type mine this should be */ ldb #0x03; /* Set generation number to 'largest'. */ jsr $activate_a_mine; PE1B6: pshs dp; jsr $process_indirect_jumps; /* Tell user what mine field number this is */ jsr $intensity_to_7F; ldu #mine_field; jsr $MS_print_1_string7F; ldy #0xE0F8; ldu #mine_field_level_pointers; lda $C89B; ldu a,u; jsr $move_y_print_string; jsr $draw_non_dead_mines; jsr $process_jstick_and_buttons; jsr $process_bullets; puls dp; jsr $check_bullets_for_hits; jsr $display_explosion_pattern; bra PE198; PE1E6: rts; /* * This block of code generates random coordinates * for a single mine. C8B9 contains a pointer to * the appropriate entry in the mine structure. * Before exiting, this routine will update the * pointer in C8B9 to point to the next entry. */ generate_mine_coords: dec 0xB8; /* Decrement the mine counter (C8B8) */ beq PE239; /* and exit when it equals 0. */ inc 0xED; /* Inc mine dot counter */ jsr $get_random_a; anda #0x07; /* Reset the ind jump counter, to */ adda #0x04; /* generate the next set of mine */ sta 0x9C; /* coordinates. */ ldu 0xB9; /* Load u register w/ mine structure ptr */ lda #0x80; /* Flag that a mine is in this slot */ sta ,u; /* Get the coordinates of enemy ship */ ldd 0xDC; adda #0x08; sta 4,u; /* Save y coordinate in 4th slot */ clr 5,u; stb 6,u; /* Save x coordinate in 6th slot */ clr 7,u; generate_final_x_for_mine: jsr $get_random_a; /* Generate the final x position for */ tsta; /* this mine. */ bmi PE21A; cmpa #0x10; bge PE214; adda #0x0C; PE214: cmpa #0x60; ble PE226; bra generate_final_x_for_mine; PE21A: cmpa #0xF0; ble PE220; suba #0x0C; PE220: cmpa #0xA0; bge PE226; bra generate_final_x_for_mine; PE226: sta 0x11,u; tfr a,b; /* Determine what the delta movement */ sex; /* value will be for this mine: -1 or 1 */ ora #0x01; sta 0x10,u; clr 2,u; /* Start with a scale factor of 0 */ leay 0x12,u; /* Update C8B9 to point to next entry */ sty 0xB9; PE239: rts; final_mine_scale_factor: .byte 0x00; .byte 0x02; /* Small */ .byte 0x07; /* Medium */ .byte 0x10; /* Large */ mine_velocity: .byte 0x00; .byte 0x20; /* Small */ .byte 0x18; /* Medium */ .byte 0x10; /* Large */ mine_values: .byte 0x01; /* dumb mine = BCD 100 */ .byte 0x00; .byte 0x05; /* magnetic mine = BCD 500 */ .byte 0x00; .byte 0x03; /* fireball mine = BCD 325 */ .byte 0x25; .byte 0x07; /* magnetic fireball mine = BCD 750 */ .byte 0x50; extra_mine_value: .byte 0x00; .byte 0x00; .byte 0x01; /* Small (100) */ .byte 0x00; .byte 0x00; /* Medium (35) */ .byte 0x35; .byte 0x00; /* Large (0) */ .byte 0x00; mine_sizes: .byte 0x00; .byte 0x00; .byte 0x04; /* Small */ .byte 0x04; .byte 0x08; /* Medium */ .byte 0x08; .byte 0x0D; /* Large */ .byte 0x0D; /* Table of pointers to mine vectors */ mine_vector_ptrs: .word #dumb_mine; .word #magnetic_mine; .word #fireball_mine; .word #magnetic_fireball_mine; /* * This block of code processe the hyperspace and move * buttons. It also checks the state of the joystick, * and updates the command ship rotation value, kept * in C8D4, if the joystick is not centered. If the * joystick is left, then the rotation value is * incremented; if it is to the right, then the rotation * value is decremented. After updating the rotation * value, the command ship will be redrawn at its * current position (specified in C8C8-C8C9). */ process_jstick_and_buttons: pshs dp; lda #0xC8; tfr a,dp; lda 0xBD; /* Skip if cmd ship disabled */ lbne PE30A; lda 0xEE; /* Continue hyperspace, if active */ lbne continue_hyperspace; lda 0x13; /* Check the hyperspace button (2) */ lbne hyperspace; lda 0x14; /* Check the move button (3) */ beq no_ship_movement; /* * The following block of code takes care of * generating the new command coordinates, * because it is moving. It attempts to make * all turns into smooth motion. */ lda 0xD4; cmpa 0xD6; beq PE2A0; cmpa 0xD8; beq PE290; lda 0xD5; beq PE2A0; lda 0xD7; bne no_ship_movement; PE290: lda 0xD7; adda #0x0C; cmpa #0x7F; bhi no_ship_movement; sta 0xD7; lda 0xD4; sta 0xD8; bra PE2AE; PE2A0: lda 0xD5; adda #0x0C; cmpa #0x7F; bhi no_ship_movement; sta 0xD5; lda 0xD4; sta 0xD6; PE2AE: inc 0xF2; /* Flag that a sound should be made */ no_ship_movement: lda 0xD5; beq PE2C2; suba #0x02; sta 0xD5; ldb 0xD6; jsr $calc_rise_run1; sty 0xCC; stx 0xCE; PE2C2: lda 0xD7; beq PE2D4; suba #0x02; sta 0xD7; ldb 0xD8; jsr $calc_rise_run1; /* Generate new rise & run */ sty 0xD0; stx 0xD2; PE2D4: ldd 0xC8; /* Update cmd ships y coord */ addd 0xCC; addd 0xD0; std 0xC8; ldd 0xCA; /* Update cmd ships x coord */ addd 0xCE; addd 0xD2; std 0xCA; /* Check joystick state (in C81B) */ lda 0x1B; beq draw_cmd_ship1; /* Joystick is centered */ bmi PE2EE; dec 0xD4; /* Joystick to right */ bra draw_cmd_ship2; PE2EE: inc 0xD4; /* Joystick to left */ bra draw_cmd_ship2; PE2F2: pshs dp; /* * draw_cmd_ship2() runs the command ships coordinates * thru a rotation transformation, and then draws the * command ship using the transforms coordinates. * draw_cmd_ship1() draws the command ship using the * current transformed ship coordinates. */ draw_cmd_ship2: jsr $rotate_cmd_ship; /* Rotate the command ship */ draw_cmd_ship1: lda #0xD0; tfr a,dp; jsr $intensity_to_5F; ldb #0x0C; ldy #0xC8C8; /* Draw the xformed command ship */ ldx #0xCB89; jsr $move_y_draw_x2; PE30A: puls dp,pc; /* This routine handles the hyperspace request */ hyperspace: lda #0x80; sta 0xEE; jsr $get_random_a; anda #0x03; adda #0x03; sta 0xEF; inc 0xF6; continue_hyperspace: lda 0xEE; bpl process_hyperspace_dots; dec 0xEF; beq PE330; jsr $MS_get_2_random_nums; sta 0xC8; clr 0xC9; /* Generate new coordinates */ stb 0xCA; /* for the command ship. */ clr 0xCB; puls dp,pc; PE330: lsr 0xEE; lda #0x1F; sta 0xEF; puls dp,pc; /* * This code draws the ever decreasing hyperspace dots * during an active hyperspace. The scale factor for * the hyperspace dots, stored in C8EF, is decremented, * and when it finally reaches a minimum value, the * hyperspace is complete. */ process_hyperspace_dots: ldb 0xEF; /* See if scale factor has reached */ cmpb #0xE0; /* the limit. */ ble hyperspace_complete; lda 0xEF; suba #0x04; /* Decrement the scale factor */ sta 0xEF; clra; jsr $draw_hyperspace_motion_dots; puls dp,pc; hyperspace_complete: clr 0xEF; clr 0xEE; jsr $clear_cmd_ship_xformation; puls dp,pc; /* * After the player has cleared all but the small mines * from a layer, the enemy ship will again appear, and * attempt to reseed the screen. This code checks to * see if the enemy ship is visible (C8E7), and if it * is, then it generates new coordinates for it, and * then moves it. */ reseed_screen: lda $C8E7; beq PE383; /* Do only if ship is visible */ pshs dp; lda #0xC8; tfr a,dp; lda 0xE7; beq PE383; ldd 0xDE; addd 0xE2; std 0xDE; sta 0xDC; /* New y coordinate */ ldd 0xE0; addd 0xE4; std 0xE0; sta 0xDD; /* New x coordinate */ puls dp; jsr $intensity_to_5F; ldb #0x08; ldy $C8DC; ldx #simple_enemy_ship; jsr $move_y_draw_x; /* Draw the enemy ship */ PE383: rts; /* * This procedure is invoked only through the indirect jump * pointers. After only small mines are left, this routine * will eventually be called. It will determine which way * the enemy ship will move, and will also set up another * indirect jump to the routine which does the actual * reseeding of the screen. */ ind_init_screen_reseeding: ldx #ind_reseed_screen; stx 0xA3; /* Set up next indirect jump ptr */ jsr $get_random_a; ldx #0xE448; /* Determine where enemy ship will move */ anda #0x06; ldx a,x; ldd ,x++; std 0xDC; /* Save enemy ships new coordinates */ sta 0xDE; clr 0xDF; stb 0xE0; clr 0xE1; bra PE3F9; /* * This routine is invoked only through the indirect jump * mechanism. It will continue to be called, until either * the enemy ship is destroyed, or until the screen has * been reseeded. It will reseed upto 7 new mines. */ ind_reseed_screen: lda 0xBF; /* See if all mines have been seeded */ bne PE3BE; PE3A5: jsr $get_random_a; anda #0x7F; adda #0x30; /* Set up the indirect jump counter 4 */ sta 0xA2; /* the next pass. */ jsr $get_random_a; anda #0x3F; sta 0xE6; jsr $get_random_a; adda #0x10; sta 0xE7; bra PE407; PE3BE: lda 0xBD; bne PE3A5; /* * Load the b register with the number of mines (28), * and load the u register with the pointer to the * mine structure. Then look through the mine structure * for an available slot, and fill it with the newly * seeded mine. */ ldb #0x1C; ldu #0xC933; PE3C7: lda ,u; /* Look for an unused mine */ beq found_avail_mine; leau 0x12,u; decb; bne PE3C7; bra PE407; found_avail_mine: inc 0xED; /* Incr the # of mines which R dots */ dec 0xBF; /* Decrement the reseed counter */ ldx 0xDE; stx 4,u; /* Set y coordinate for mine */ ldx 0xE0; stx 6,u; /* Set x coordinate for mine */ lda #0x40; sta ,u; /* Flag that mine is a stationary dot. */ lda 0xC0; /* See if this is 1st mine activated. */ bne PE3F7; ldx #ind_start_large_mine; stx 0x9D; /* Set things up to eventually */ jsr $get_random_a; /* activate 1 large mine. */ anda #0x7F; adda #0x40; sta 0x9C; inc 0xC0; /* Flag that 1st mine has been activated */ PE3F7: ldx 0xE8; PE3F9: lda ,x+; sta 0xA2; lda ,x+; sta 0xE6; lda ,x+; sta 0xE7; stx 0xE8; PE407: ldb 0xE6; jsr $calc_rise_run1; /* Generate rise & run for mine */ sty 0xE2; stx 0xE4; rts; /* * This routine is called only thru the indirect jump * handler. It is responsible for activating a single * large mine. The type of mine is indicated by the * first entry in the table of mines for this level. */ ind_start_large_mine: ldu #0xC8C4; lda 0x9B; ldu a,u; lda ,u; /* Determine the type of mine */ ldb #0x03; /* Set generation to 'largest' */ jsr $activate_a_mine; ldx #ind_activate_rangen_mine; stx 0x9D; rts; /* * This routine decrements the counter in C8C1, and if * it equal 0, then it activates a mine with a random * generation number; else, it sets the indirect counter * in C89C to -1, and returns. This routine is called * only thru the indirect jump handler. */ ind_activate_rangen_mine: dec 0xC1; beq PE430; lda #0xFF; sta 0x9C; bra PE447; PE430: jsr $get_random_a; tfr a,b; andb #0x03; bne PE43B; addb #0x01; PE43B: ldu #0xC8C4; lda 0x9B; ldu a,u; lda ,u; jsr $activate_a_mine; PE447: rts; /* Some sort of pointer table */ SE448: .word #SE450; .word #SE46A; .word #SE484; .word #SE49E; SE450: .byte 0x7F; .byte 0x00; .byte 0x28; .byte 0x20; .byte 0x30; .byte 0x40; .byte 0x28; .byte 0x30; .byte 0x28; .byte 0x00; .byte 0x10; .byte 0x30; .byte 0x10; .byte 0x40; .byte 0x18; .byte 0x20; .byte 0x50; .byte 0x40; .byte 0x30; .byte 0x28; .byte 0x30; .byte 0x08; .byte 0x60; .byte 0x7F; .byte 0x38; .byte 0x70; SE46A: .byte 0x80; .byte 0x00; .byte 0x40; .byte 0x00; .byte 0x30; .byte 0x20; .byte 0x10; .byte 0x50; .byte 0x20; .byte 0x28; .byte 0x40; .byte 0x30; .byte 0x3E; .byte 0x70; .byte 0x18; .byte 0x30; .byte 0x60; .byte 0x20; .byte 0x18; .byte 0x40; .byte 0x30; .byte 0x24; .byte 0x50; .byte 0x7F; .byte 0x06; .byte 0x70; SE484: .byte 0x00; .byte 0x7F; .byte 0x40; .byte 0x10; .byte 0x60; .byte 0x28; .byte 0x38; .byte 0x30; .byte 0x28; .byte 0x08; .byte 0x40; .byte 0x30; .byte 0x28; .byte 0x7F; .byte 0x20; .byte 0x18; .byte 0x30; .byte 0x30; .byte 0x08; .byte 0x68; .byte 0x40; .byte 0x20; .byte 0x50; .byte 0x7F; .byte 0x38; .byte 0x70; SE49E: .byte 0x00; .byte 0x80; .byte 0x40; .byte 0x30; .byte 0x60; .byte 0x38; .byte 0x18; .byte 0x30; .byte 0x30; .byte 0x20; .byte 0x18; .byte 0x20; .byte 0x38; .byte 0x40; .byte 0x28; .byte 0x10; .byte 0x60; .byte 0x20; .byte 0x00; .byte 0x30; .byte 0x40; .byte 0x38; .byte 0x50; .byte 0x7F; .byte 0x1C; .byte 0x70; /* * This routine is responsible for displaying any active * bullets, and also for firing new bullets, when an * available spot in the bullet structure becomes available. * The maximum number of active bullets is 4. The 40 byte * bullet structure starts at C90B. A bullet will remain * 'active' for at most 0x18 passes thru this routine. */ process_bullets: lda #0x04; /* Loop counter = 4 */ ldu #0xC90B; /* Bullet buffer */ ldx #0xC815; /* State of fire button (4) */ sta $C88F; jsr $intensity_to_7F; next_bullet: lda ,u; /* If the current spot is empty, then */ beq check_fire_button; /* see if a new bullet should be fired */ dec 9,u; /* Decrement the cycle counter for the */ beq erase_bullet; /* and erase bullet if it = 0. */ ldd 5,u; addd 1,u; /* y */ std 5,u; /* Increment bullet coordinates */ ldd 7,u; addd 3,u; /* x */ std 7,u; leay 5,u; jsr $draw_dot7F_ptr_in_y; /* Draw bullet */ update_bufr_ptr: leau 10,u; dec $C88F; /* Point to next entry */ bne next_bullet; rts; erase_bullet: clr ,u; dec $C8EA; /* Decrement active bullet counter */ check_fire_button: lda $C8BD; bne update_bufr_ptr; lda $C8EE; bne update_bufr_ptr; lda ,x; /* Check the 'fire' button state */ beq update_bufr_ptr; /* * This code 'fires' a new bullet, and fills the * available spot in the bullet structure. */ clr ,x; inc $C8B6; /* Flag that a bullet sound should be made */ inc ,u; ldd $C8C8; /* Get ships coordinates */ std 5,u; ldd $C8CA; std 7,u; ldd $C907; /* Get ship rise */ std 1,u; ldd $C909; /* Get ship run */ std 3,u; lda #0x18; /* # of passes before bullet expires */ sta 9,u; inc $C8EA; /* Increment active bullet counter */ bra update_bufr_ptr; /* * This procedure processes each mine which has not been * destroyed. If the mine is a moving dot, then its position * is updated; if the mine is a dot, then it is draw in its * appropriate place; if the mine is active, then the appropriate * mine is drawn; if it is a fireball, then the fireball is drawn. * The state of the mine is determined by the first byte in the * mine structure. The following values are valid: * * 0x00 - Mine is dead. * 0x01 - Mine is in process of being destroyed. * 0x08 - Mine is visible and moving. * 0x10 - Mine is visible, but not moving. * 0x20 - Mine is just becoming visible. * 0x40 - Mine is a stationary dot. * 0x80 - Mine is still moving to final resting place. * */ draw_non_dead_mines: lda #0x1C; sta $C88F; /* Use C88F as a loop counter */ ldu #0xC933; /* Put mine pointer into u register */ PE526: lda ,u; bne non_dead_mine; update_mine_ptr: leau 0x12,u; dec $C88F; bne PE526; rts; non_dead_mine: lbmi move_mine_dot; bita #0x40; lbne draw_mine_as_dot; bita #0x20; lbne mine_becoming_visible; bita #0x10; lbne delay_B4_moving_mine; bita #0x01; lbne process_destroyed_mine; lda 1,u; cmpa #0x04; /* See if this is a fireball */ beq process_fireball; bita #0x01; /* Code below moves visible mine */ beq non_magnetic_mine; lda $C8EE; /* Skip below if hyperspace active */ bne non_magnetic_mine; lda $C8BD; /* Skip below if cmd ship disabled */ bne non_magnetic_mine; pshs dp; jsr $dptoC8; lda 0xC8; /* Draw the mine towards the cmd ship */ suba 4,u; ldb 0xCA; subb 6,u; jsr $PF593; suba #0x10; sta 0x83; ldx #mine_velocity; ldb 3,u; lda b,x; ldb 0x83; jsr $calc_rise_run1; /* Calculate new rise and run values */ sty 8,u; stx 10,u; puls dp; non_magnetic_mine: ldd 4,u; /* This block update mine coordinates */ addd 8,u; std 4,u; ldd 6,u; addd 10,u; std 6,u; /* * This block of code draws a mine, using information in * the mine structure element pointed to by the u register. */ draw_a_visible_mine: jsr $intensity_to_5F; ldx #mine_vector_ptrs; lda 1,u; /* byte 1 = mine type */ asla; ldx a,x; /* Set x = ptr to mine vector list */ leay 4,u; /* Set y = mine coordinates. */ ldb 2,u; /* Set b = scale factor. */ jsr $move_y_draw_x2; jmp $update_mine_ptr; /* * This routine appears to be processing a fireball. * It checks to see if the fireball has reached the * edge of the display, and if it has, then the * fireball is removed; else, the fireball is drawn * on the display. */ process_fireball: ldd 4,u; /* See if the fireball has */ addd 8,u; /* reached the edge of the */ bvs remove_fireball; /* display. */ std 4,u; ldd 6,u; addd 10,u; bvs remove_fireball; std 6,u; jsr $intensity_to_7F; leay 4,u; /* Draw the fireball */ ldx #0xCBA7; ldb #0x04; jsr $move_y_draw_x2; jmp $update_mine_ptr; remove_fireball: clr ,u; /* Flag that the fireball has */ dec $C8EB; /* been removed. */ jmp $update_mine_ptr; /* * move_mine_dot () does some sort of processing on the * mine's coordinates, and then draws the mine as * a dot. I believe that the processing being done * is the movement of the dot in the x direction, * after the mine field has been seeded, but before * the mine dot has reached it's final place. * draw_mine_as_dot() draws a mine as a dot. * * For both these routines, the u register must * point to a structure element describing the * mine. */ move_mine_dot: lda 6,u; /* Update the mines x coordinate, */ adda 0x10,u; /* and check to see if it has reached */ sta 6,u; /* its final resting place. */ cmpa 0x11,u; bne draw_mine_as_dot; /* Flag that the mine dot is at its */ lsr ,u; /* final resting place. */ draw_mine_as_dot: jsr $intensity_to_5F; leay 4,u; jsr $draw_dot7F_ptr_in_y; jmp $update_mine_ptr; /* * This procedure is called when a mine first becomes visible. * If the mine is not a large mine, then the mine is drawn at * full scale factor; otherwise, if the mine is a large mine, * then it will be drawn with a steadily increasing scale factor. * This gives the effect of the mine 'popping' up. */ mine_becoming_visible: lda 3,u; cmpa #0x03; /* See if this is a large mine */ bne use_max_scale_factor; lda 2,u; cmpa 0x10,u; bge use_max_scale_factor; adda #0x08; sta 2,u; /* Increment the scale factor */ bra PE61A; use_max_scale_factor: lsr ,u; /* Flag that mine is full size & visible */ lda 0x10,u; sta 2,u; /* Set final scale factor */ lda #0x18; sta 0x10,u; /* Set up a delay */ lda $C8ED; bne PE61A; /* Check to see if any more mine dots left */ lda $C8C0; bne PE61A; /* See if re-seeding already in progress. */ lda #0x7F; /* Set up indirect counter for reseeding */ sta $C8A2; /* since only small mines are left. */ PE61A: jmp $draw_a_visible_mine; /* * This procedure is used to delay the movement of a mine * right after it become visible. After the delay is over, * the mine will start moving. */ delay_B4_moving_mine: dec 0x10,u; /* Decrement delay counter */ bne PE624; lsr ,u; PE624: jmp $draw_a_visible_mine; /* * This procedure processes the activation of 2 new mines * after a mine has been destroyed. If the destroyed mine * was a small mine, or a fireball, then 2 new mines will * not be activated. At entry time, the 'a' register must * contain the type of mine to be started up. */ process_destroyed_mine: clr ,u; /* Flag that this mine is gone */ lda 1,u; cmpa #0x04; /* If this was a fireball, then don't */ beq PE644; /* start up 2 new mines. */ ldb 3,u; decb; /* If this was a small mine, then don't */ beq PE644; /* start up 2 new mines. */ pshs a,dp; lda #0xC8; tfr a,dp; lda ,s; /* Get the type of mine */ jsr $activate_a_mine; jsr $activate_a_mine; puls a,dp; PE644: jmp $update_mine_ptr; /* * This routine is responsible for displaying the explosion * pattern for all active explosions. If the command ship * is sexploding, then it will also switch over to the * next player (eventually). */ display_explosion_pattern: pshs dp; jsr $dptoD0; jsr $intensity_to_7F; ldu #0xCB2B; /* Get pointer to the explosion struct */ lda #0x0E; sta $C88F; /* Use C88F as a loop counter */ check_next_explosion: lda ,u; lbeq inc_expl_ptr; ldb 4,u; /* If the scale factor for the explosion */ cmpb 1,u; /* has not surpassed the max value, then */ bhs chk_4_cmd_ship_explosion; /* increment it. */ addb #0x03; stb 4,u; ldy 2,u; ldx #explosion; /* Draw the explosion pattern */ jsr $move_y_draw_x; chk_4_cmd_ship_explosion: tsta; /* This is a cmd ship explosion if bit */ lbpl check_4_expired_explosion; /* 0x80 is set. */ dec $C8F7; /* Stop displaying explosion when C8F7 */ lbeq dead_ship; /* reaches zero. */ lda $C826; anda #0x01; /* Every other pass through the loop, */ bne draw_expl_cmd_ship; /* increment the scale factor used to */ inc $C8F8; /* draw the destroyed command ship. */ draw_expl_cmd_ship: lda $C8F8; /* Draw the cmd ship in pieces. */ ldy #0x7F00; ldx #cmd_ship_pt1; jsr $draw_cmd_ship_fragment; ldy #0x6080; ldx #cmd_ship_pt2; jsr $draw_cmd_ship_fragment; ldy #0x8050; ldx #cmd_ship_pt3; jsr $draw_cmd_ship_fragment; ldy #0xA080; ldx #cmd_ship_pt4; jsr $draw_cmd_ship_fragment; bra inc_expl_ptr; /* * This routine is called after a ship has been destroyed. * The number of ships for the active player, kept in C8D9, * will be decremented. If more than one player is playing, * then save the active players ship count in a memory * location (C8DA for player 1, and C8DB for player 2), * and then determine who's turn it now is. */ dead_ship: dec $C8D9; /* Decrement the number of ships */ clr $C8EB; clr $C8ED; lda $C879; /* If more than 1 player is playing, */ beq check_ship_count; /* then save the active players ship */ lda $C89B; /* ship count in RAM. */ lsra; ldx #0xC8DA; ldb $C8D9; stb a,x; lda $C8DA; /* See who's turn it is. Skip a player */ bne next_player; /* if he has no more ships. */ lda $C8DB; beq flag_no_ships_left; next_player: lda $C89B; /* Increment active player indicator */ adda #0x02; anda #0x02; sta $C89B; lsra; /* Load the ship count for new player */ ldx #0xC8DA; ldb a,x; stb $C8D9; beq next_player; /* * This routine checks to see if the active player has any ships * left, after the command ship has exploded. */ check_ship_count: lda $C8D9; bne explosion_expired; flag_no_ships_left: lda #0x01; sta $C8BE; /* Set C8BE when no ships left */ bra explosion_expired; /* * This routine checks to see if the explosion has expired. * An explosion expires when its scale factor surpasses a * preset maximum value. */ check_4_expired_explosion: ldb 4,u; /* See if scale factor has reached */ cmpb 1,u; /* the maximum value allowed. */ blo inc_expl_ptr; explosion_expired: clr ,u; dec $C8EC; /* Flag completion of cmd ship explosion */ inc_expl_ptr: leau 5,u; dec $C88F; lbne check_next_explosion; jsr $make_misc_sounds; bra draw_tiny_ships; /* Draw the tiny ships in lower righthand corner */ PE711: pshs dp; jsr $dptoD0; draw_tiny_ship: jsr $intensity_to_5F; ldx #0x8038; stx $C890; /* Position for first ship */ lda $C8D9; /* Don't bother, if the active */ beq rotate_fireball_vectors; /* player has no ships left. */ sta $C88F; PE727: dec $C88F; beq rotate_fireball_vectors; /* Exit when all ships drawn */ lda $C891; adda #0x06; /* Increment x coordinate */ sta $C891; ldb #0x04; ldy $C890; ldx #command_ship; jsr $move_y_draw_x; /* Draw the tiny command ship */ bra PE727; /* * This routine rotates the fireball vector list. Also, * it checks to see whether this level has been cleared. */ rotate_fireball_vectors: puls dp; lda 0x26; anda #0x01; asla; asla; asla; ldx #fireball; ldu #0xCBA7; jsr $rotate_vector_list1; /* * This block of code determines whether or not the main * loop should be exited. If the cmd ship is disabled, or * if the player has cleared the level, then the main loop * will be exited (this is flagged by clearing the carry bit. */ ldb 0xEC; /* See if cmd ship is being exploded */ bne PE767; lda 0xBD; /* See if cmd ship is disabled */ bne PE764; ldb 0xEB; /* check # of active mines */ bne PE767; ldb 0xED; /* check # of dot mines */ bne PE767; PE764: andcc #0xFE; /* Says 'exit main loop' */ rts; PE767: orcc #0x01; /* Says 'do not exit main loop' */ rts; /* * This routine is responsible for drawing a single fragment * of the exploding command ship. At entry, 'a' = scale factor, * 'y' = pen position, and 'x' = ptr to vector list. */ draw_cmd_ship_fragment: pshs a,x,y; ldx #0xC8C8; /* Move pen to cmd ships location */ jsr $move_pen7F_no_inc; lda ,s; sta 0x04; /* Set scale factor = a register */ tfr y,d; jsr $move_pen_d; /* Move pen to position in y register */ ldb #0x0C; ldx 1,s; jsr $drawl1b; /* Draw vector list pointed to by x reg */ puls a,x,y,pc; /* * This routine is called after a bullet has hit something, * or the command ship collides with something. It will * search through the explosion structure, looking for an * empty slot. When it finds one, it will fill it with the * information passed in. At entry time, 'a' = type of explosion * and the scale factor to use, 'b' = the max scale factor to * be used, and 'x' contains the position for the explosion. * If the hi bit of 'a' is set, then that flags that it is the * command ship exploding; the lower 7 bits are used to specify * the initial scale factor. */ add_an_explosion: : pshs a,b,x; ldx #0xCB2B; lda #0x0E; PE78B: ldb ,x; /* Find an empty spot in structure */ beq found_empty_exp_slot; leax 5,x; deca; bne PE78B; bra PE7B3; found_empty_exp_slot: lda ,s; /* Save the explosion type */ anda #0x80; inca; sta ,x; /* See if this is a cmd ship explosion */ bpl PE7A1; inc 0xBD; /* Flag that cmd ship is disabled */ PE7A1: lda ,s; anda #0x7F; sta 4,x; /* Save starting scale factor */ lda 1,s; sta 1,x; ldd 2,s; std 2,x; /* Save maximum scale factor */ inc 0xEC; /* Flag that cmd ship is exploding */ inc 0xF3; /* Flag that explosion sound should be made */ PE7B3: puls a,b,x,pc; /* * This routine is responsible for calculating a rise and run * for an object whose angle of travel is in the 'b' register, * and whose velocity is in the 'a' register. * The rise is returned in the 'y' register, and the run is * returned in the 'x' register. */ calc_rise_run1: pshs a,b,x,y; jsr $rotate_1_coordinate; sta 4,s; sex; aslb; rola; aslb; rola; aslb; rola; std 2,s; ldb 4,s; sex; aslb; rola; aslb; rola; aslb; rola; std 4,s; puls a,b,x,y,pc; /* * This routine also calculates some sort of rise & run pair. * The same parameters are expected at entry time, and the * values are returned in the same registers. */ calc_rise_run2: pshs a,b,x,y; bsr calc_rise_run1; ldd -4,s; aslb; rola; std 4,s; ldd -6,s; aslb; rola; std 2,s; puls a,b,x,y,pc; /* * This routine is called each time a new mine level is * started. It initializes everything necessary. */ init_RAM_for_new_level: lda #0xD0; tfr a,dp; jsr $clear_sound_chip; lda #0xC8; tfr a,dp; clr 0x9C; /* Clear all 4 indirect jump counters */ clr 0x9F; clr 0xA2; clr 0xA5; ldx #0xC90B; /* Clear C90B - CB71 */ PE7FA: clr ,x+; cmpx #0xCB71; bne PE7FA; ldd #0x0000; std 0xDE; std 0xE0; std 0xE2; std 0xE4; sta 0xE7; sta 0xBD; /* Clear cmd ship disabled flag */ sta 0xBE; /* Clear 'no more ships' flag */ sta 0xEA; /* Clear active bullet counter */ sta 0xEB; sta 0xEC; /* Clear cmd ship exploding flag */ sta 0xF8; /* Clear destroyed cmd ship scale factor */ ldb #0x40; stb 0xF7; /* Init cmd ship exploding loop counter */ sta 0xED; /* Clear # of dot mines */ sta 0xC0; /* Clear mine activated during reseeding flag */ ldx #0x0800; stx 0xF0; /* Set end of game loop counter */ lda #0x07; sta 0xBF; /* Init # of mines to be reseeded */ ldx #ind_init_screen_seeding; stx 0xA3; /* Init indirect jump location for reseeding */ ldd #0x0000; std 0xC8; /* Clear the command ship's */ std 0xCA; /* position indicators. */ clear_cmd_ship_xformation: ldd #0x0000; sta 0xD4; /* Clear rotation counter */ std 0xCC; std 0xCE; sta 0xD5; /* Clear cmd ships velocity */ sta 0xD6; std 0xD0; std 0xD2; sta 0xD7; sta 0xD8; /* * This block of code takes the vector list describing the * command ship, and applies a rotation transformation to * them. The current rotation value is in C8D4, and the * transformed vector list is stored in the buffer * starting at CB89. */ rotate_cmd_ship: lda 0xD4; ldx #command_ship; ldu #0xCB89; jsr $rotate_vector_list1; lda #0x7F; ldb 0xD4; jsr $calc_rise_run2; sty $C907; stx $C909; rts; /* * This routine is called after the active player clears * a mine field level. This routine will slowly bring the * command ship back to the center of the screen. As this * is being done, a series of dots will be drawn to simulate * motion. */ bring_ship_to_center: pshs x,y; pshs dp; jsr $dptoD0; jsr $clear_sound_chip; puls dp; lda #0xA0; sta 0x8F; /* Use C88F as a loop counter */ PE876: lda 0xC8; beq PE884; /* Modify the y coordinate for the */ bmi PE87F; /* command ship, in an effort to */ deca; /* force it back to 0. */ bra PE880; PE87F: inca; PE880: sta 0xC8; clr 0xC9; PE884: lda 0xCA; /* Modify the x coordinate for the */ beq PE892; /* command ship, in an effort to */ bmi PE88D; /* force it back to 0. */ deca; bra PE88E; PE88D: inca; PE88E: sta 0xCA; clr 0xCB; PE892: lda 0xD4; /* Modify the rotation value for the */ beq PE8A2; /* command ship, in an effort to */ cmpa #0x1F; /* force it back to 0. */ bgt PE89D; deca; bra PE89E; PE89D: inca; PE89E: anda #0x3F; sta 0xD4; PE8A2: jsr $PE2F2; /* This loop, repeated 8 times (once */ ldx #0xCB81; /* for each scale factor in the array) */ ldb #0x08; /* increments each of the scale factors */ PE8AA: lda ,x; /* for the motion dots, by 3. */ adda #0x03; sta ,x+; decb; bne PE8AA; pshs dp; jsr $dptoD0; jsr $display_both_scores; clrb; lda #0x20; /* " " */ jsr $simulate_motion1; jsr $modify_motion_scales; puls dp; /* Repeat the above until the ship is centered. */ lda 0xC8; lbne PE876; lda 0xCA; lbne PE876; lda 0xD4; lbne PE876; dec 0x8F; lbne PE876; jsr $init_RAM_for_new_level; puls x,y,pc; /* * This routine initializes the two arrays * (CB71 and CB81) which contain the data * needed to produce the motion dots (the * dots displayed as the ship moves from * one level to the next). The 8 entries * in CB71 are pointers to the 8 sets of * required dots. The 8 entries in CB81 * are the corresponding scale factors. */ init_motion_dots: ldx #motion_dots; ldy #0xCB71; ldu #0xCB81; ldb #0x08; lda #0x16; PE8F1: stx ,y++; leax 8,x; sta ,u+; adda #0x0F; decb; bne PE8F1; rts; /* * modify_motion_scales() increments each of the 8 motion * scale factors, and then draws the new motion dots. * simulate_motion1() and simulate_motion2() both * draw the current motion dots. The motion dots will * only be drawn if the scale factor is > the value specified * in the 'a' register, and if (scale - 'b') > 0. */ modify_motion_scales: pshs a,b,dp,x; ldx #0xCB81; lda #0x08; PE904: inc ,x+; /* Increment each of the scale factors */ deca; bne PE904; bra simulate_motion2; simulate_motion1: pshs a,b,dp,x; simulate_motion2: lda #0xD0; tfr a,dp; lda #0x09; /* Use 'a' as a loop counter */ pshs a; PE915: dec ,s; bne PE920; jsr $reset0ref; puls a; puls a,b,dp,x,pc; PE920: jsr $reset0ref; lda #0x03; /* Use C823 to hold # of dots */ sta $C823; /* to be drawn (4). */ lda ,s; deca; ldx #0xCB81; ldb a,x; andb #0x7F; cmpb 1,s; /* Make sure scale factor is */ bls PE915; /* within the specified range */ subb 2,s; ble PE915; stb 0x04; /* Set the hardware scale factor */ ldx #0xCB71; /* Draw the dot list */ asla; /* Convert loop cntr to a word offset */ ldx a,x; jsr $intensity_to_7F; jsr $dot_list; bra PE915; /* * This routine is responsible for drawing the hyperspace dot * during a hyperspace. It draws the 8 sets of motion dots, * using a decreasing scale factor. At entry, the 'b' register * contains the minimum scale factor to be used. */ draw_hyperspace_motion_dots: pshs a,b,dp,x; lda #0xD0; tfr a,dp; lda #0x09; /* Push the loop cntr on the stack */ pshs a; next_set_of_dots: dec ,s; bne draw_the_dots; jsr $reset0ref; puls a; puls a,b,dp,x,pc; draw_the_dots: jsr $reset0ref; lda #0x03; sta $C823; /* Use C823 to hold # of dots to draw */ ldx #0xC8C8; jsr $move_pen7F_no_inc; ldb ,s; aslb; aslb; addb 2,s; /* Calculate the scale factor */ ble next_set_of_dots; andb #0x7F; stb 0x04; /* Set scale factor */ ldx #0xCB71; lda ,s; /* Draw the appropriate set of dots */ deca; asla; ldx a,x; jsr $intensity_to_7F; jsr $dot_list; bra next_set_of_dots; /* * Generate 2 random numbers (1 byte each), and return * them in a and b. The range for the two numbers is: * * 0x80 <= first # <= 0x7F (a register) * 0xA0 <= second # <= 0x60 (b register) */ MS_get_2_random_nums: pshs a,b; jsr $get_random_a; sta ,s; PE991: jsr $get_random_a; cmpa #0x60; bgt PE991; cmpa #0xA0; blt PE991; sta 1,s; puls a,b; rts; /* * This routine randomly activates a single mine. * At entry, the 'a' register must contain the * type of mine to be activated, while the 'b' * register must contain the generation number * for the mine (i.e. large, medium, or small). */ activate_a_mine: pshs a,b,x,y,u; lda 0xED; /* Check C8ED to see if there are any */ lbeq PEA3C; /* dot mines; if not, then return. */ dec 0xED; jsr $get_random_a; /* Generate a random index into the */ anda #0x1F; /* mine array. */ PE9B0: sta 0x8B; cmpa #0x1B; bls PE9BA; suba #0x04; bra PE9B0; PE9BA: ldb #0x12; /* Multiple offset by element size */ mul; addd #0xC933; tfr d,u; lda ,u; /* Check to see if this mine is already */ anda #0xC0; /* being used. If it is, then check */ bne init_a_visible_mine; /* the next mine in the structure; else */ inc 0x8B; /* use this mine. */ lda 0x8B; cmpa #0x1B; ble PE9BA; clr 0x8B; clra; bra PE9BA; init_a_visible_mine: lda ,s; /* Store the mine type */ sta 1,u; ldx #mine_values; asla; ldy a,x; sty 0x89; /* Store mine's value in C889 */ ldb #0x20; stb ,u; ldx #mine_velocity; lda 1,s; /* Save mine's velocity */ ldb a,x; stb 0x8B; ldx #final_mine_scale_factor; ldb a,x; stb 0x10,u; /* Save mine's max scale factor */ sta 3,u; /* Save mine's generation number */ ldx #mine_sizes; asla; ldy a,x; sty 0x12,u; /* Save mine's size */ ldx #extra_mine_value; ldy a,x; sty 0x87; /* Get any extra value for mine's size */ cmpa #0x06; bne PEA13; inc 0xF4; /* Flag that a sound should be made */ PEA13: lda 0x88; adda 0x8A; daa; sta 0x15,u; /* Generate lo byte of score */ lda 0x87; adca 0x89; daa; sta 0x14,u; /* Generate hi byte of score */ lda 0x8B; jsr $MS_random_num_4_to_3C; jsr $calc_rise_run1; sty 8,u; /* Save the rise */ stx 10,u; /* Save the run */ inc 0xEB; /* Increment 'active mine' counter */ lda 0xC0; beq PEA3C; lda #0xFF; sta 0x9C; lda #0x03; sta 0xC1; PEA3C: puls a,b,x,y,u,pc; /* * Generate a random number between 4 and 0x3C. The * result is returned in the b register. */ MS_random_num_4_to_3C: pshs a,b; jsr $get_random_a; tfr a,b; anda #0x30; /* "0" */ sta 1,s; andb #0x0F; cmpb #0x04; bhs PEA51; addb #0x04; PEA51: cmpb #0x0C; bls PEA57; subb #0x04; PEA57: addb 1,s; stb 1,s; puls a,b,pc; /* * Force the scale factor to 0x7F, then * draw a dot at the position contained * in the y register. */ draw_dot7F_at_y: pshs a,b; lda #0x7F; sta 0x04; tfr y,d; jsr $dot; jsr $reset0ref; puls a,b,pc; /* * Force the scale factor to 0x7F, then draw a * dot at the position pointed to by the y * register (y coord = (0,y), x coord = (2,y)). */ draw_dot7F_ptr_in_y: pshs a,b; lda #0x7F; sta 0x04; lda ,y; ldb 2,y; jsr $dot; jsr $reset0ref; puls a,b,pc; /* * Move the pen to the position specified * in the y register, then draw the vector * list pointed to by the x register; the * scale factor is in the b register. */ move_y_draw_x: pshs a,b,x; tfr y,d; jsr $move_pen7F_to_d; ldb 1,s; jsr $drawl1b; puls a,b,x,pc; /* * Move the pen to the position specified in the y * register, and draw the list of vectors pointed to * by the x register; the scale factor to be used is * in the b register. (y coord = (0,y), x coord = (x,y)) */ move_y_draw_x2: pshs a,b,x; tfr y,x; jsr $move_pen7F_no_inc; ldb 1,s; ldx 2,s; jsr $drawl1b; puls a,b,x,pc; /* * Force the scale factor to 0x7F, then print * a single string (upto a 0x80). The pointer * to the string block is contained in the * u register. */ MS_print_1_string7F: pshs a,b,x,u; lda #0x7F; sta 0x04; jsr $print_1_string; puls a,b,x,u,pc; /* * Move the pen to the position specified in the * y register, then print a string. The pointer * to the string (not a string block) is in the * u register. */ move_y_print_string: pshs a,b,x,u; tfr y,d; jsr $move_pen7F_to_d; jsr $display_string; puls a,b,x,y,pc; /* * Use the value in C89B (the active player) to * determine which players score to display, * and then display the score string. */ display_active_players_score: jsr $intensity_to_7F; ldd #0xFC38; std $C82A; /* Specify height and width */ lda $C89B; ldy #score_string_positions; ldy a,y; /* Load string position into y */ ldu #score_string_pointers; ldu a,u; /* Load score string into u */ bsr move_y_print_string; rts; /* * Display the score for both players */ display_both_scores: jsr $intensity_to_7F; ldd #0xFC38; std $C82A; /* Specify height and width */ ldy #0x7FA0; /* Load y with y&x positions */ ldu #0xC8A8; /* Load u with player 1 score */ bsr move_y_print_string; lda $C879; /* See if we need to display player 2 score */ beq PEAEF; ldy #0x7F10; /* Load y with y&x positions */ ldu #0xC8AF; /* Load u with player 2 score */ bsr move_y_print_string; PEAEF: rts; /* * This routine is responsible for reading the current * states of the joystick and buttons. Next, it will * check each of the four indirect jump counters, and * if any of them equal 0 after being decremented, then * the appropriate indirect handling routine will be * called. The four indirect counters, and their corresponding * handler routines are shown below: * * counter handler * ------- ------- * C89C C89D-C89E * C89F C8A0-C8A1 * C8A2 C8A3-C8A4 * C8A5 C8A6-C8A7 * */ process_indirect_jumps: jsr $waitrecal; pshs dp; jsr $PF2E6; jsr $display_active_players_score; /* Set mask (in C880) and read the switches */ lda $C880; jsr $read_switches; /* Set enable flags (in C881) and read joystick */ ldd $C881; std $C81F; std $C821; jsr $read_jstick; lda #0xC8; tfr a,dp; lda 0x9C; beq PEB1D; dec 0x9C; bne PEB1D; jsr [C89D]; /* (UNKNOWN JUMP) */ PEB1D: lda 0x9F; beq PEB29; dec 0x9F; bne PEB29; jsr [C8A0]; /* (UNKNOWN JUMP) */ PEB29: lda 0xA2; beq PEB35; dec 0xA2; bne PEB35; jsr [C8A3]; /* (UNKNOWN JUMP) */ PEB35: lda 0xA5; beq PEB41; dec 0xA5; bne PEB41; jsr [C8A6]; /* (UNKNOWN JUMP) */ PEB41: puls dp,pc; /* * This routine check to see if any of the * bullets have hit a mine or a fireball or * the enemy ship. If something is hit, then * the active player's score will be modified. */ check_bullets_for_hits: lda 0xEA; /* Don't bother checking if there are */ beq PEB59; /* no active bullets. (C8EA = 0) */ ldy #0xC90B; lda #0x04; sta 0x8F; /* Use C88F as a loop counter */ check_for_active_bullet: tst ,y; /* See if this bullet is active */ bne check_enemy_ship_4_hit; inc_bullet_ptr2: leay 10,y; /* Increment ptr to next bullet */ dec 0x8F; bne check_for_active_bullet; PEB59: rts; check_enemy_ship_4_hit: lda 0xE7; /* Only check for a hit on the enemy */ beq check_mines_for_hits; /* ship if it is showing (C8E7 > 0). */ pshs y; lda 5,y; ldb 7,y; tfr d,x; /* bullets position */ ldd #0x0616; /* height/2 and width/2 of enemy ship */ ldy 0xDC; /* position of enemy ship */ jsr $check_bullet_for_hit; /* See if the enemy ship was hit */ puls y; bhs check_mines_for_hits; clr ,y; /* HIT - flag that bullet is dead */ clr 0xE7; /* Flag that enemy ship no longer there */ clr 0xA2; /* Clear 1 indirect jump counter */ ldx #score_string_pointers; lda 0x9B; ldx a,x; ldd #0x1000; /* Inc players score by 1000 */ jsr $add_d_to_x_in_bcd; lda #0x30; ldb #0x70; ldx 0xDC; jsr $add_an_explosion; dec 0xEA; /* Decrement the # of active bullets */ bra PEB59; /* * This routine checks to see if a bullet hit * any of the active mines or fireballs. */ check_mines_for_hit: ldu #0xC933; /* Load 'u' with ptr to mine info */ lda #0x1C; sta 0x90; /* Use C890 as a counter */ check_for_active_mine: lda ,u; anda #0x3F; /* Make sure mine is active */ bne check_this_mine; inc_mine_ptr2: leau 0x12,u; /* Inc ptr into mine structure */ dec 0x90; bne check_for_active_mine; bra inc_bullet_ptr2; check_this_mine: pshs y; lda 5,y; ldb 7,y; tfr d,x; /* bullet coordinates */ lda 4,u; ldb 6,u; /* mine coordinates */ tfr d,y; ldd 12,u; /* height & width of mine */ jsr $check_bullet_for_hit; /* returns: carry set = hit, else miss */ puls y; bhs inc_mine_ptr2; lda 1,u; /* Check if this is a fireball mine */ anda #0x02; beq not_a_fireball_mine; ldx #score_string_pointers; lda 0x9B; ldx a,x; ldd 14,u; /* Add mines value to players score */ jsr $add_d_to_x_in_bcd; inc 0xF5; lda 4,u; ldb 6,u; tfr d,x; lda 2,u; ldb #0x20; jsr $add_an_explosion; ldd #0x0110; /* Init score for the fireball */ std 14,u; lda 0xC8; suba 4,u; ldb 0xCA; subb 6,u; jsr $PF593; suba #0x10; tfr a,b; pshs y; lda #0x3F; jsr $calc_rise_run1; sty 8,u; /* Calculate rise & run for fireball */ stx 10,u; puls y; clr ,y; /* Flag that the bullet is dead */ ldd #0x0404; std 12,u; /* Set height/2 & width/2 for fireball */ lda 1,u; ldb 3,u; /* Decrement the generation for this mine */ decb; /* and don't start any more if it = 0 */ beq start_a_fireball; jsr $activate_a_mine; jsr $activate_a_mine; start_a_fireball: lda #0x04; /* Flag that this is a fireball */ sta 1,u; dec 0xEA; /* Decrement active bullet counter */ jmp $inc_bullet_ptr2; /* * This processes a hit on a non-fireball type mine. */ not_a_fireball_mine: lda #0x01; sta ,u; clr ,y; /* Flag that the bullet is dead */ ldx #score_string_pointers; lda 0x9B; ldx a,x; /* Add mines value to players score */ ldd 14,u; jsr $add_d_to_x_in_bcd; lda 4,u; ldb 6,u; tfr d,x; lda 2,u; ldb #0x40; jsr $add_an_explosion; dec 0xEB; /* Decrement active mine counter */ dec 0xEA; /* Decrement the active bullet counter */ jmp $inc_bullet_ptr2; /* * This routine check each active mine to see if it has * collided with the command ship. */ check_ship_4_mine_collision: lda 0xBD; bne PEC63; /* Do only if cmd ship not already dead */ lda 0xEE; bne PEC63; /* Do only if hyperspace not active */ ldy #0xC933; lda #0x1C; sta 0x8F; /* Set up a loop counter */ PEC56: lda ,y; anda #0x3F; bne check_this_active_mine; inc_mine_ptr3: leay 0x12,y; dec 0x8F; bne PEC56; PEC63: rts; check_this_active_mine: pshs y; lda 0xC8; ldb 0xCA; tfr d,x; /* Load cmd ship's position */ lda 4,y; ldb 6,y; ldy 12,y; /* Load mine's position */ exg y,d; jsr $check_bullet_for_hit; puls y; bhs inc_mine_ptr3; clr ,y; /* Flag that the mine is dead */ clr 0xED; lda 0xC8; ldb 0xCA; tfr d,x; lda 2,y; ora #0x80; ldb #0x30; jsr $add_an_explosion; inc 0xF3; /* Flag for an explosion sound */ dec 0xEB; /* Decrement active mine counter */ bra PEC63; /* * This routine checks to see if the command ship has collided * with the enemy ship during reseeding. */ check_ship_4_enemy_collision: lda 0xBD; /* Do only if cmd ship not disabled */ bne PECB2; lda 0xEE; /* Don't do if hyperspace active */ bne PECB2; lda 0xE7; /* Check only if enemy ship visible */ beq PECB2; lda 0xC8; ldb 0xCA; tfr d,x; /* Command ship location */ ldd #0x0616; /* Size of enemy ship */ ldy 0xDC; /* Enemy ship's location */ jsr $check_bullet_for_hit; blo cmd_and_enemy_ship_collision; PECB2: rts; cmd_and_enemy_ship_collision: clr 0xE7; /* Flag that enemy ship no longer visible */ clr 0xA2; lda 0xC8; ldb 0xCA; tfr d,x; lda #0x08; ora #0x80; ldb #0x30; jsr $add_an_explosion; inc 0xF3; /* Enable explosion sound */ rts; /* * This routine is responsible for making miscellaneous sound, * such as when an explosion occurs, or a bullet is fired. */ make_misc_sounds: PECC9: lda $C8F2; beq PECD6; clr $C8F2; ldu #cmd_ship_movement_sound; /* Make cmd ship movement sound */ bra make_the_misc_sound; PECD6: lda $C8F3; beq PECE3; clr $C8F3; ldu #explosion_sound; /* Make explosion sound */ bra make_the_misc_sound; PECE3: lda $C8B6; beq PECF0; clr $C8B6; ldu #bullet_sound; /* Make bullet firing sound */ bra make_the_misc_sound; PECF0: lda $C8F4; beq PED00; PECF5: clr $C8F4; clr $C8F6; ldu #mine_pop_sound; /* Make sound of mine 'popping' up */ bra make_the_misc_sound; PED00: lda $C8F6; bne PECF5; /* Make hyperspace sound */ bra PED0A; make_the_misc_sound: jsr $copy_bytes_2_sound_chip; PED0A: ldb $C800; addb #0x10; cmpb #0xA0; bhs PED1A; lda #0x00; jsr $byte_to_sound_chip; bra PED20; PED1A: ldd #0x0800; jsr $byte_to_sound_chip; PED20: ldb $C802; addb #0x20; cmpb #0xF0; bhs PED30; lda #0x02; jsr $byte_to_sound_chip; bra PED36; PED30: ldd #0x0900; jsr $byte_to_sound_chip; PED36: rts; cmd_ship_movement_sound: .byte 0x00; .byte 0x10; .byte 0x01; .byte 0x00; .byte 0x06; .byte 0x1F; .byte 0x07; .byte 0x06; .byte 0x08; .byte 0x0F; .byte 0xFF; bullet_sound: .byte 0x02; .byte 0x39; /* "9" */ .byte 0x03; .byte 0x00; .byte 0x06; .byte 0x1F; .byte 0x07; .byte 0x05; .byte 0x09; .byte 0x0F; .byte 0xFF; explosion_sound: .byte 0x06; .byte 0x1F; .byte 0x07; .byte 0x07; .byte 0x0A; .byte 0x10; .byte 0x0B; .byte 0x00; .byte 0x0C; .byte 0x38; /* "8" */ .byte 0x0D; .byte 0x00; .byte 0xFF; mine_pop_sound: SED5A: .byte 0x00; .byte 0x00; .byte 0x01; .byte 0x00; .byte 0x02; .byte 0x30; /* "0" */ .byte 0x03; .byte 0x00; .byte 0x04; .byte 0x00; .byte 0x05; .byte 0x00; .byte 0x06; .byte 0x1F; .byte 0x07; .byte 0x3D; /* "=" */ .byte 0x08; .byte 0x00; .byte 0x09; .byte 0x0F; .byte 0x0A; .byte 0x00; .byte 0x0B; .byte 0x00; .byte 0x0C; .byte 0x00; .byte 0x0D; .byte 0x00; .byte 0xFF; /* Start of Mine Storm music block */ MS_music: .word MS_music_header1; .word music_header2_a; .byte 0x00; .byte 0x19; .byte 0x01; .byte 0x19; .byte 0x00; .byte 0x19; .byte 0x01; .byte 0x32; .byte 0x00; .byte 0x19; .byte 0x01; .byte 0x19; .byte 0x00; .byte 0x19; .byte 0x06; .byte 0x19; .byte 0x05; .byte 0x19; .byte 0x00; .byte 0x80; MS_music_header1: .byte 0xFF; .byte 0xEE; .byte 0xDD; .byte 0xCC; .byte 0xBB; .byte 0xAA; .byte 0x99; .byte 0x88; .byte 0x77; .byte 0x77; .byte 0x77; .byte 0x77; .byte 0x77; .byte 0x77; .byte 0x77; .byte 0x77; score_string_pointers: .word 0xC8A8; /* Pointer to player 1 score string */ .word 0xC8AF; /* Pointer to player 2 score string */ score_string_positions: .byte 0x7F; /* Player 1 rel y score position */ .byte 0xA0; /* Player 1 rel x score position */ .byte 0x7F; /* Player 2 rel y score position */ .byte 0x10; /* Player 2 rel x score position */ mine_field_level_pointers: .word 0xC8F9; /* Pointer to player 1 mine field # string */ .word 0xC900; /* Pointer to player 2 mine field # string */ /* * This contains the information describing which mines * are to appear at the first 13 mine field levels. The * values map a follows: * * 0 = dumb mine * 1 = magnetic mine * 2 = fireball mine * 3 = magnetic fireball mine * */ mines_at_level_x: .byte 0x00; /* level 1 */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x02; /* level 2 */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x01; /* level 3 */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x03; /* level 4 */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x02; /* level 5 */ .byte 0x01; .byte 0x00; .byte 0x00; .byte 0x02; /* level 6 */ .byte 0x03; .byte 0x00; .byte 0x00; .byte 0x01; /* level 7 */ .byte 0x03; .byte 0x00; .byte 0x00; .byte 0x02; /* level 8 */ .byte 0x02; .byte 0x00; .byte 0x00; .byte 0x01; /* level 9 */ .byte 0x01; .byte 0x00; .byte 0x00; .byte 0x03; /* level 10 */ .byte 0x03; .byte 0x00; .byte 0x00; .byte 0x02; /* level 11 */ .byte 0x02; .byte 0x02; .byte 0x00; .byte 0x01; /* level 12 */ .byte 0x01; .byte 0x01; .byte 0x00; .byte 0x03; /* level 13 */ .byte 0x03; .byte 0x03; .byte 0x00; .byte 0x80; motion_dots: .byte 0xC8; .byte 0x40; .byte 0x3F; .byte 0x00; .byte 0x20; .byte 0x80; .byte 0x10; .byte 0x1F; .byte 0x3F; .byte 0x3F; .byte 0x00; .byte 0xBF; .byte 0xBF; .byte 0xBF; .byte 0xC0; .byte 0x20; .byte 0x48; .byte 0x08; .byte 0xF8; .byte 0x30; .byte 0xA8; .byte 0x10; .byte 0xD0; .byte 0xA0; .byte 0xBF; .byte 0xBF; .byte 0x00; .byte 0x3F; .byte 0x3F; .byte 0x48; .byte 0x20; .byte 0x80; .byte 0x00; .byte 0xB0; .byte 0x48; .byte 0x38; .byte 0xFB; .byte 0x38; .byte 0x80; .byte 0x28; .byte 0x30; .byte 0x48; .byte 0x80; .byte 0x80; .byte 0x45; .byte 0xF0; .byte 0x28; .byte 0x7F; .byte 0x3F; .byte 0xBF; .byte 0xA5; .byte 0x00; .byte 0xD0; .byte 0x60; .byte 0x20; .byte 0x28; .byte 0xB8; .byte 0x40; .byte 0x15; .byte 0x80; .byte 0x40; .byte 0xF8; .byte 0x40; .byte 0x18; mine_field: .byte 0xFA; /* height = -6 */ .byte 0x38; /* width = 56 */ .byte 0xE0; /* rel y = -32 */ .byte 0xC8; /* rel x = */ .byte "MINE FIELD", 0x80; game_over: .byte 0xFA; /* height = -6 */ .byte 0x38; /* width = 56 */ .byte 0xE0; /* rel y = -32 */ .byte 0xD8; /* rel x = */ .byte "GAME OVER",0x80; dumb_mine: .byte 0x00; .byte 0x10; .byte 0x00; .byte 0xFF; .byte 0x20; .byte 0xA0; .byte 0xFF; .byte 0xC0; .byte 0x40; .byte 0xFF; .byte 0x90; .byte 0x20; .byte 0xFF; .byte 0x70; .byte 0x20; .byte 0xFF; .byte 0x50; .byte 0x50; .byte 0xFF; .byte 0xD0; .byte 0x90; .byte 0x01; magnetic_mine: .byte 0x00; .byte 0x20; .byte 0x00; .byte 0xFF; .byte 0x30; .byte 0xB0; .byte 0xFF; .byte 0xB0; .byte 0x30; .byte 0xFF; .byte 0xB0; .byte 0xD0; .byte 0xFF; .byte 0x30; .byte 0x50; .byte 0xFF; .byte 0xD0; .byte 0x50; .byte 0xFF; .byte 0x50; .byte 0xD0; .byte 0xFF; .byte 0x50; .byte 0x30; .byte 0xFF; .byte 0xD0; .byte 0xB0; .byte 0x01; fireball_mine: .byte 0xFF; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x30; .byte 0x00; .byte 0xFF; .byte 0x10; .byte 0xC0; .byte 0xFF; .byte 0xC0; .byte 0x10; .byte 0xFF; .byte 0xC0; .byte 0xF0; .byte 0xFF; .byte 0x10; .byte 0x40; .byte 0xFF; .byte 0xF0; .byte 0x40; .byte 0xFF; .byte 0x40; .byte 0xF0; .byte 0xFF; .byte 0x40; .byte 0x10; .byte 0xFF; .byte 0xF0; .byte 0xC0; .byte 0x01; magnetic_fireball_mine: .byte 0xFF; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xF0; .byte 0xD0; .byte 0xFF; .byte 0xC0; .byte 0x40; .byte 0xFF; .byte 0x20; .byte 0x00; .byte 0xFF; .byte 0x40; .byte 0x40; .byte 0xFF; .byte 0x00; .byte 0xE0; .byte 0xFF; .byte 0x40; .byte 0xC0; .byte 0xFF; .byte 0xE0; .byte 0x00; .byte 0xFF; .byte 0xC0; .byte 0xC0; .byte 0xFF; .byte 0x00; .byte 0x20; .byte 0x01; fireball: .byte 0x00; .byte 0x3F; .byte 0x00; .byte 0xFF; .byte 0x80; .byte 0x00; .byte 0x00; .byte 0x3F; .byte 0x3F; .byte 0xFF; .byte 0x00; .byte 0x80; .byte 0x01; explosion: .byte 0xFF; .byte 0x7F; .byte 0x20; .byte 0x00; .byte 0xC0; .byte 0x10; .byte 0xFF; .byte 0xC0; .byte 0xD0; .byte 0xFF; .byte 0x20; .byte 0x7F; .byte 0x00; .byte 0xE0; .byte 0xC0; .byte 0xFF; .byte 0x00; .byte 0xC0; .byte 0xFF; .byte 0xE0; .byte 0x30; .byte 0x00; .byte 0xC0; .byte 0x00; .byte 0xFF; .byte 0x60; .byte 0xCD; .byte 0xFF; .byte 0xA0; .byte 0x00; .byte 0x00; .byte 0x20; .byte 0xD0; .byte 0xFF; .byte 0x3C; .byte 0x30; .byte 0xFF; .byte 0x00; .byte 0x82; .byte 0x00; .byte 0x30; .byte 0x30; .byte 0xFF; .byte 0xD0; .byte 0x50; .byte 0xFF; .byte 0x20; .byte 0xF0; .byte 0x01; command_ship: .byte 0x00; .byte 0x3F; .byte 0x00; .byte 0xFF; .byte 0xC4; .byte 0x08; .byte 0xFF; .byte 0xD8; .byte 0xD8; .byte 0xFF; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x40; .byte 0xFF; .byte 0xE0; .byte 0x00; .byte 0xFF; .byte 0x28; .byte 0xD8; .byte 0xFF; .byte 0x3C; .byte 0x08; .byte 0x01; cmd_ship_pt1: .byte 0x00; .byte 0x3F; .byte 0x00; .byte 0xFF; .byte 0xC4; .byte 0x08; .byte 0x01; cmd_ship_pt2: .byte 0x00; .byte 0x04; .byte 0x08; .byte 0xFF; .byte 0xD8; .byte 0xD8; .byte 0xFF; .byte 0x20; .byte 0x00; .byte 0x01; cmd_ship_pt3: .byte 0x00; .byte 0x3F; .byte 0x00; .byte 0xFF; .byte 0xC4; .byte 0xF8; .byte 0x01; cmd_ship_pt4: .byte 0x00; .byte 0x04; .byte 0xF8; .byte 0xFF; .byte 0xD8; .byte 0x28; .byte 0xFF; .byte 0x20; .byte 0x00; .byte 0x01; enemy_ship_pt1: .byte 0x00; .byte 0x20; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0xD8; .byte 0xFF; .byte 0xD0; .byte 0xA8; .byte 0xFF; .byte 0xF0; .byte 0x40; .byte 0xFF; .byte 0x08; .byte 0x18; .byte 0xFF; .byte 0x18; .byte 0xF0; .byte 0xFF; .byte 0xF0; .byte 0xB8; .byte 0x00; .byte 0x10; .byte 0x48; .byte 0xFF; .byte 0x08; .byte 0x00; .byte 0xFF; .byte 0xE8; .byte 0x10; .byte 0xFF; .byte 0xF8; .byte 0x00; .byte 0x00; .byte 0x08; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0x06; .byte 0x00; .byte 0x10; .byte 0xFA; .byte 0xFF; .byte 0x08; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0xF0; .byte 0x00; .byte 0x10; .byte 0x18; .byte 0xFF; .byte 0xF0; .byte 0x08; .byte 0x01; enemy_ship_pt2: .byte 0x00; .byte 0x20; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0x28; .byte 0xFF; .byte 0xD0; .byte 0x58; .byte 0xFF; .byte 0xF0; .byte 0xC0; .byte 0xFF; .byte 0x08; .byte 0xE8; .byte 0xFF; .byte 0x18; .byte 0x10; .byte 0xFF; .byte 0xF0; .byte 0x48; .byte 0x00; .byte 0x10; .byte 0xB8; .byte 0xFF; .byte 0x08; .byte 0x00; .byte 0xFF; .byte 0xE8; .byte 0xF0; .byte 0xFF; .byte 0xF8; .byte 0x00; .byte 0xFF; .byte 0x08; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0xFA; .byte 0x00; .byte 0x10; .byte 0x06; .byte 0xFF; .byte 0x08; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0x10; .byte 0x00; .byte 0x10; .byte 0xE8; .byte 0xFF; .byte 0xF0; .byte 0xF8; .byte 0x01; enemy_ship_pt3: .byte 0xFF; .byte 0x00; .byte 0xD8; .byte 0xFF; .byte 0xE8; .byte 0x08; .byte 0xFF; .byte 0x00; .byte 0x40; .byte 0xFF; .byte 0x18; .byte 0x08; .byte 0xFF; .byte 0x00; .byte 0xD8; .byte 0x00; .byte 0x08; .byte 0xE0; .byte 0xFF; .byte 0x10; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0x40; .byte 0xFF; .byte 0xF0; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0xC0; .byte 0x01; simple_enemy_ship: .byte 0x00; .byte 0x18; .byte 0x00; .byte 0xFF; .byte 0x00; .byte 0x20; .byte 0xFF; .byte 0xC8; .byte 0x70; .byte 0xFF; .byte 0x10; .byte 0xA0; .byte 0xFF; .byte 0x00; .byte 0xA0; .byte 0xFF; .byte 0xEC; .byte 0xA4; .byte 0xFF; .byte 0x39; .byte 0x6D; .byte 0xFF; .byte 0x00; .byte 0x20; .byte 0x01; /* The following is spare space in the ROM */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; /* * The executive starts executing here, each time the system is reset * or powered up. */ start: lds #0xCBEA; /* Set up the stack pointer */ jsr $reinit; ldd #0x7321; /* Cold start only if CBFE != 0x7321 */ cmpd $CBFE; beq PF06C; std $CBFE; /* Start the cold start here */ inc $C83B; /* Flag not to display score */ ldx #0xCBEB; jsr $set_dft_score; /* Initialize the score string */ powerup_loop: jsr $dptoC8; ldd 0x25; /* Signal that it is OK to start playing */ cmpd #0x0101; /* the music (set C856), after waitrecal() */ bne PF029; /* has been called 257 times. */ stb 0x56; PF029: asrb; /* Determine which line pattern to use */ andb #0x03; /* for drawing the boundary lines. */ /* Load the line drawing pattern */ ldx #line_patterns; ldb b,x; stb 0x29; ldb #0x02; stb 0x24; /*Set intro box redraw count to 2 */ /* Play the introductory song */ ldu #intro_music; jsr $init_sound; jsr $waitrecal; jsr $do_sound; jsr $intensity_to_7F; /* Display the power-up Vectrex message */ lda $C826; ldu #vectrex_string; /* Determine if we should show the double */ bita #0x20; /* or single high VECTREX message. Double */ beq PF052; /* if bit 0x20 of waitrecal() counter is 0 */ leau 12,u; PF052: jsr $printu; ldx #intro_box; /* Draw a 4 sided box */ PF058: jsr $move_penFF; lda #0x03; jsr $dwp_with_count; dec $C824; bne PF058; /* Keep drawing box, until C824 = 0 */ lda $C825; /* Keep performing the above, as long as */ cmpa #0x01; /* the lower byte of the waitrecal() counter */ bls powerup_loop; /* is <= 0. */ PF06C: jsr $dptoC8; lda #0xCC; sta 0x29; /* Set line blanking pattern to 11001100 */ ldd #gce_string; std 0x39; /* Save pointer to gce string in C839 */ clr 0x25; clr 0x26; /* Clear the waitrecal() counter. */ /* See if a valid rom is installed */ ldu #0x0000; ldx #gce_string; ldb #0x0B; PF084: lda ,u+; cmpa ,x+; beq PF097; cmpb #0x01; beq PF092; cmpb #0x05; bls PF097; /* Boot with the MineStorm rom */ PF092: ldu #MS_header; bra PF09E; PF097: decb; bne PF084; stb 0x39; /* Clear C839-C83A, if using a plug-in */ stb 0x3A; /* Prepare to start a new sound (C856 = 1) */ /* Load music block pointer for game into u register */ PF09E: inc 0x56; stu 0x37; ldu ,u; PF0A4: jsr $dptoC8; ldd #0xF848; std 0x2A; /* Produce the specified tune */ jsr $init_sound; jsr $waitrecal; jsr $do_sound; /* Print the 'gce' copyright message */ jsr $intensity_to_7F; ldd #0xC0C0; ldu $C839; jsr $print_at_d; /* Display the current high score, if any */ lda $C83B; bne PF0D2; deca; ldu #0xCBEB; sta 6,u; ldd #0x68D0; jsr $print_at_d; /* Display the name of the game cartridge */ PF0D2: ldu $C837; leau 2,u; jsr $printu; /* Keep playing,until C856 is cleared */ lda $C856; bne PF0A4; ldx $C825; cmpx #0x007D; bls PF0A4; /* Jump to the start of the game */ jmp 1,u; /* (UNKNOWN JUMP) */ intro_box: .byte 0x40; /* "@" */ .byte 0xD6; .byte 0x00; .byte 0x56; /* "V" */ .byte 0x81; .byte 0x00; .byte 0x00; .byte 0xA9; .byte 0x7E; /* "~" */ .byte 0x00; box2: .byte 0x39; /* "9" */ .byte 0xDC; .byte 0x8E; .byte 0x00; .byte 0x00; .byte 0x4A; /* "J" */ .byte 0x72; /* "r" */ .byte 0x00; .byte 0x00; .byte 0xB6; /* Line patterns */ line_patterns: .byte 0xE0; /* Dashes = 11100000 */ .byte 0x38; /* Dashes = 00111000 */ .byte 0x0E; /* Dashes = 00001110 */ .byte 0x03; /* Dashes = 00000011 */ gce_string: .byte "g GCE 1982",0x80; vectrex_string: .byte 0xF1; /* height = -15 */ .byte 0x60; /* width = 96 */ .byte 0x27; /* rel y = 39 */ .byte 0xCF; /* rel x = */ .byte "VECTREX",0x80; .byte 0xF3; /* height = -13 */ .byte 0x60; /* width = 96 */ .byte 0x26; /* rel y = 38 */ .byte 0xCF; /* rel x = */ .byte "VECTREX",0x80; .byte 0xFC; /* height = -4 */ .byte 0x60; /* width = 96 */ .byte 0xDF; /* rel y = */ .byte 0xE9; /* rel x = */ .byte "GCE",0x80; .byte 0xFC; /* height = -4 */ .byte 0x38; /* width = 56 */ .byte 0xCC; /* rel y = */ .byte 0xD1; /* rel x = */ .byte "ENTERTAINING",0x80; .byte 0xFC; /* height = -4 */ .byte 0x38; /* width = 56 */ .byte 0xBC; /* rel y = */ .byte 0xDC; /* rel x = */ .byte "NEW IDEAS",0x80,0x00; init_PIA_chip: bsr dptoD0; ldd #0x9FFF; std 0x02; ldd #0x0100; std 0x00; ldd #0x987F; sta 0x0B; stb 0x04; jsr $reset0ref; bra set_refresh; /* Clear RAM locations C800-C87A */ clear_C800_C87A: bsr dptoC8; ldb #0x7A; /* "z" */ ldx #0xC800; jsr $clear_blockxb; ldd #0xC87D; std 0x7B; /* * Delay until contents of C87D = 0, then * Initialize dot dwell time, refresh timer & joystick enable flags */ init_flags1: inc 0x7D; /* Delay */ beq PF173; lda #0x05; sta 0x28; /* Set dot dwell time to 5 */ ldd #0x3075; std 0x3D; /* Set refresh time to 0x3075 */ ldd #0x0103; std 0x1F; /* Set joystick enable flags */ ldd #0x0507; std 0x21; /* Set joystick enable flags */ rts; reinit: bsr clear_C800_C87A; bsr init_PIA_chip; jmp $clear_sound_chip; /* * Wait for t2 (the refresh timer) to timeout, then restart * it using the value in C83D. Then, recalibrate the vector * generators to the origin (0,0). This routine MUST be called * once every refresh cycle, or your vectors will get out of * whack. This routine calls reset0ref, so the integrators * are left in zero mode. Dp will be set to D0. */ waitrecal: ldx $C825; leax 1,x; stx $C825; /* Increment the waitrecal() call counter */ bsr dptoD0; lda #0x20; PF19E: bita 0x0D; /* Wait for the refresh timer to expire */ beq PF19E; /* * This routine loads the refresh timer (t2), with the value in * C83D-C83E, and recalibrates the vector generators, thus * causing the pen to be left at the origin (0,0). The high * order byte for the timer is loaded from C83E, and the low * order byte is loaded from C83D. The refresh rate is calculated * as follows: rate = 1.5 mhz * (C83E)(C83D). * Dp must be D0. */ set_refresh: ldd $C83D; std 0x08; jmp $PF2E6; /* * Sets the dp register to D0, so that all direct addresses * will start at D000 (the hardware I/O area). The a * register is trashed. */ dptoD0: lda #0xD0; tfr a,dp; rts; /* * Sets the Dp register to C8, so that all direct addresses * start at C800. The a register is trashed. */ dptoC8: lda #0xC8; tfr a,dp; rts; /* * Read the switch values for the two consoles. The switch values * are returned in the following locations: * * console 1, switch 1: C812 * switch 2: C813 * switch 3: C814 * switch 4: C815 * console 2, switch 1: C816 * switch 2: C817 * switch 3: C818 * switch 4: C819 * * Before this routine is called, the a register must be set to * contain a mask, having the following format: * * bit 0 = console 1, switch1; etc. * * If a bit is 0, then the current state of the switch is to be * returned in the appropriate ram location (0 = up, 1 = down). * * If a bit is 1, then the appropriate ram location is set to 1 * only on the depression transition of the button; additional * calls will return 0, until the switch is release and then * depressed again. * * Dp must be set to D0. */ read_switches: anda $C80F; sta $C80F; ldx #0xC812; lda -3,x; sta -2,x; lda #0x0E; sta 0x01; ldd #0x1901; sta 0x00; nop; stb 0x00; clr 0x03; ldd #0x0901; sta 0x00; nop; lda 0x01; coma; sta -3,x; stb 0x00; ldb #0xFF; stb 0x03; coma; ora -2,x; coma; sta -1,x; pshs a; ldb #0x01; PF1EA: tfr b,a; anda ,s; sta ,x+; aslb; bne PF1EA; puls a,pc; PF1F5: dec $C823; /* * Read the joystick positions of the two consoles. This routine * requires some setup before it should be called. First, C81F-C822 * are enable flags, and all must be set to one of the following: * * 0 ignore. * 1 pot 0 (console 1 left/right) * 3 pot 1 (console 1 up/down) * 5 pot 2 (console 2 left/right) * 7 pot 3 (console 2 up/down) * * Locations C81B-C81E will be set with the pot values corresponding * to the enable flags. * * Location C823 is used to determine what kind of input conversion * should be performed. The valid choices are: * * >= 0 The return value will be: * < 0 if joystick is left or down of center. * = 0 if joystick is centered. * > 0 if joystick is right or up of center. * * < 0 A successive approximation algorithm is used to * read the actual value of the joystick pot, a * signed value. In this case, C81A must be set to * power of 2, to control conversion resolution; * 0x80 i sleast accurate, and 0x00 is most accurate. * * Dp must be set to D0. * C823 is cleared before this routine returns. * */ read_jstick: ldx #0xC81F; next_pot: lda ,x+; bne process_a_pot; check_4_done: cmpx #0xC823; bne next_pot; clr ,x; lda #0x01; sta 0x00; rts; process_a_pot: sta 0x00; clr 0x01; dec 0x00; ldb #0x60; PF213: incb; bpl PF213; /* Delay */ lda $C823; /* Get the joystick mode */ bmi use_approx; /* Use successive approximation */ lda #0x20; inc 0x00; bita 0x00; beq l_or_d; ldb #0x40; stb 0x01; bita 0x00; bne save_jstick_state; /* joystick is right or up */ bra centered; /* joystick is centered */ l_or_d: ldb #0xC0; stb 0x01; bita 0x00; beq save_jstick_state; /* joystick is left or down */ centered: clrb; save_jstick_state: stb -5,x; bra check_4_done; try_again: tfr b,a; ora 0x01; sta 0x01; use_approx: lda #0x20; bita 0x00; bne check_resolution; tfr b,a; eora 0x01; sta 0x01; check_resolution: lsrb; cmpb $C81A; /* Get the approximation resolution */ bne try_again; ldb 0x01; bra save_jstick_state; /* * These routines cause a byte to be added to a sound * buffer. At entry, 'x' = base address of RAM area of where to * store the sound byte. 'a' = offset into the 'x' register as * to where to store the byte. 'b' = byte to be processed. */ byte_2_sound_chip: ldx #0xC800; byte_2_sound_chip2: stb a,x; sta 0x01; lda #0x19; sta 0x00; lda #0x01; sta 0x00; lda 0x01; stb 0x01; ldb #0x11; stb 0x00; ldb #0x01; stb 0x00; rts; /* * This routine clear out the 15 byte sound buffer. */ clear_sound_chip: ldd #0x0E00; PF275: bsr byte_to_sound_chip; deca; bpl PF275; jmp $init_music_buf; /* * This routine copies a group of sound information into the * sound chip buffer, at C800. At entry, 'u' = a pointer to * a list of sound pairs. If the first byte >= 0, then it is * used as an index into the sound chip buffer as to where to * save the 2nd byte (the sound data). If the 1st byte is < 0, * then the copy stops; dp must by D0. */ copy_bytes_2_sound_chip: ldx #0xC800; bra PF284; PF282: bsr byte_2_sound_chip2; PF284: ldd ,u++; bpl PF282; rts; /* * This will start making the sound which was set up by your * call to init_sound(). This should be called right after * your call to waitrecal(). */ do_sound: ldx #0xC800; ldu #0xC83F; lda #0x0D; PF291: ldb ,u+; cmpb a,x; beq PF299; bsr byte_2_sound_chip2; PF299: deca; bpl PF291; rts; /* * Sets the intensity (the z axis) to 1F, 3F, 5F or 7F, depending * upon which entry point is called. The intensity must be * reloaded at least every refresh cycle. However, it may be * changed on the fly, if desired. The current intensity value * is saved in C827. Dp must be D0. */ intensity_to_1F: lda #0x1F; bra intensity_to_a; intensity_to_3F: lda #0x3F; /* "?" */ bra intensity_to_a; intensity_to_5F: lda #0x5F; /* "_" */ bra intensity_to_a; intensity_to_7F: lda #0x7F; intensity_to_a: sta 0x01; sta $C827; ldd #0x0504; sta 0x00; stb 0x00; stb 0x00; ldb #0x01; stb 0x00; rts; /* * Draw a dot at the relative y and relative x coordinates pointed * to by the x register, with an intensity proportional to the * value in the b register. The x register is incremented by 2 * afterwards. The Dp must be D0. */ dotixb: stb $C828; dotix: ldd ,x++; /* Use current intensity value */ dot: bsr move_pen_d; /* Use x&y already in d reg */ lda #0xFF; sta 0x0A; ldb $C828; PF2CC: decb; /* Use b (intensity) as loop counter */ bne PF2CC; clr 0x0A; rts; /* * Draw a series of dots. The x register points to a list of * relative y and relative x location pairs. The number of * dots to be drawn is specified in RAM location C823. */ next_dot: dec $C823; dot_list: bsr dotix; lda $C823; bne next_dot; bra reset0ref; /* Draw a series of dots. The x register points to the array * of points. The array has the following format: * * mode, relative y position, relative x position * * If mode > 0, then the drawing ceases, and the integrators are reset. */ dotix_then_reset: lda ,x+; bgt reset0ref; bsr dotix; bra dotix_then_reset; PF2E6: ldx #0xF9F0; bsr move_penFF; jsr $PF36B; bsr move_pen; bra reset0ref; /* * Set the scale factor to 0x7F, then move the pen to the location * pointed to by the x register (y coord = (0,x) x coord = (2,x)). * The x register is not incremented afterwards. */ move_pen7F_no_inc: ldb #0x7F; stb 0x04; lda ,x; ldb 2,x; bra move_pen_d; /* * Force the scale factor to 0x7F, then move the pen to the * position specified in the d register. */ move_pen7F_to_d: sta 0x01; /* Set height for string */ pshs a,b; lda #0x7F; sta 0x04; /* Set scale factor to 0x7F */ clr 0x00; bra PF318; /* * Move the pen to the relative y and relative x positions * pointed to by the x register. The scale factor is set to * 0xFF (170 usec), and then left at this value at exit time. * Dp must be D0. The x register is incremented by 2 before * exiting. */ move_penFF: ldb #0xFF; bra set_scale_factor; /* Same as above, except scale factor is set to 0x7F (85 usec). */ move_pen7F: ldb #0x7F; set_scale_factor: stb 0x04; /* Same as above, except the scale factor is not changed */ move_pen: ldd ,x++; /* Move pen to relative y (in a) and relative x (in b) */ move_pen_d: sta 0x01; clr 0x00; pshs a,b; PF318: lda #0xCE; sta 0x0C; clr 0x0A; inc 0x00; stb 0x01; clr 0x05; puls a,b; jsr $check_ab_for_overflow; stb -1,s; ora -1,s; ldb #0x40; /* "@" */ cmpa #0x40; /* "@" */ bls PF345; cmpa #0x64; /* "d" */ bls PF33B; lda #0x08; bra PF33D; PF33B: lda #0x04; PF33D: bitb 0x0D; beq PF33D; PF341: deca; bne PF341; rts; PF345: bitb 0x0D; beq PF345; rts; /* Set the dp to D0, then reset the integrators */ set_dp_and_reset0ref: jsr $dptoD0; bra reset0ref; /* * If 0xC824 is non-zero, call reset0ref, else return. * Dp must be D0. */ check0ref: lda $C824; beq rtn1; /* * This routine zeros the integrators. It resets the origin to * (0,0). This routine leaves the integrators in zero mode, so * nothing can be drawn until a move is done, or 0xD00C is set * to 0xCE. Dp must be D0. This routine should be called * every once in awhile, to make sure your vectors don't get off. */ reset0ref: ldd #0x00CC; stb 0x0C; sta 0x0A; ldd #0x0302; clr 0x01; sta 0x00; stb 0x00; stb 0x00; ldb #0x01; stb 0x00; rtn1: rts; PF36B: ldd #0x00CC; stb 0x0C; sta 0x0A; rts; /* * The following are a series of subroutines which may be used to * accomplish several different methods of printing a string. * Each one expects the string (and parameter block) to be pointed * to by the u register. * * print_1_string() - Prints a string (upto a 0x80). The * header for the string must include the * height and width for the string, and * also the relative y & x positions. * * print_with_dft_hw()- Prints a string (upto a 0x80). The * header for the string must include * only the relative y & x positions. The * current height & width is used. * * print_at_d() -Prints a string (upto a 0x80). The * string contains no header. The current * height & width are used. The rely & rel x * are specified in the d register. */ print_1_string: ldd ,u++; /* Save height and width */ std $C82A; print_with_dft_hw: ldd ,u++; /* Get the rel y & rel x positions */ print_at_d: jsr $move_pen7F_to_d; /* Move pen to starting positions */ jsr $delay_b_1; jmp $display_string;/* Print string, until 0x80 encountered */ initiate_printing: bsr print_1_string; /* * Display the string whose block is pointed to by the u register. * Dp must be D0. The block for the string must have the following * format: * * string height, string width, * rel y, rel x, STRING, 0x80, * rel y, rel x, STRING, 0x80, * 0x00 */ printu: lda ,u; bne initiate_printing; /* Keep printing till 0x00 found */ rts; /* * Display the string whose block is pointed to by the u register. * Dp must be D0. The current height and width values for which * the hardware is set are used. The block for the string must * have the following format: * * rel y, rel x, STRING, 0x80, * rel y, rel x, STRING, 0x80, * 0x00 */ printu2: bsr print_with_dft_hw: lda ,u; /* Stop when 0x00 encountered */ bne printu2; rts; PF391: ldx ,x; pshs b; ldb #0x80; leau -8,s; pshu a,b; puls a; cmpa #0x09; bls PF3A3; lda #0x3C; /* "<" */ PF3A3: adda #0x30; /* "0" */ ldb #0x2D; /* "-" */ pshu a,b; pshu x; bra print_with_dft_hw: PF3AD: lda ,x+; bra PF3B9; PF3B1: stb 0x04; bra move_to_pt; PF3B5: ldd ,x++; stb 0x04; PF3B9: sta $C823; move_to_pt: ldd ,x; sta 0x01; clr 0x00; leax 2,x; nop; inc 0x00; stb 0x01; ldd #0x0000; /* Set line pattern to invisible */ bra PF3ED; PF3CE: lda ,x+; bra PF3DA; PF3D2: stb 0x04; bra draw_to_pt; PF3D6: ldd ,x++; stb 0x04; PF3DA: sta $C823; draw_to_pt: ldd ,x; sta 0x01; clr 0x00; leax 2,x; nop; inc 0x00; stb 0x01; ldd #0xFF00; /* Set line pattern to solid line */ PF3ED: sta 0x0A; stb 0x05; ldd #0x0040; PF3F4: bitb 0x0D; beq PF3F4; nop; sta 0x0A; lda $C823; deca; bpl PF3DA; jmp $check0ref; PF404: ldb #0xFF; bra drawl1b; PF408: ldb #0x7F; bra drawl1b; /* * Draw a list of vectors. The x register contains the pointer * to the vector list. The form for the vector list is a follows: * * .byte scale factor * .byte mode, relative y, relative x * . * . * .byte mode, relative y, relative x * * where mode means the following: * * < 0 visible vector. * = 0 invissible vector. * > 0 end of list. * */ drawl1: ldb ,x+; /* Same as drawl1, except scale factor is in b register */ drawl1b: stb 0x04; next_pt: ldd 1,x; /* Load d register with endpoints */ sta 0x01; clr 0x00; lda ,x; /* Get the mode for this vector */ leax 3,x; /* Increment pointer to next pair */ inc 0x00; stb 0x01; sta 0x0A; clr 0x05; ldd #0x0040; PF425: bitb 0x0D; beq PF425; nop; sta 0x0A; lda ,x; ble next_pt; jmp $check0ref; /* * Draw a series of patterned vectors. The x register points to * the list of endpoints, and the list has the following format: * * relative y, relative x * * dwp_with_count() uses the value in the a register to determine * how many vectors to draw (number = a + 1), while draw_with_pattern() * uses the value in RAM location C823 to determine this. */ dwp_loop: deca; dwp_with_count: sta $C823; draw_with_pattern: ldd ,x; sta 0x01; clr 0x00; leax 2,x; inc 0x00; stb 0x01; lda $C829; /* Retrieve the line pattern */ ldb #0x40; sta 0x0A; clr 0x05; bitb $D00D; beq PF45C; clr 0x0A; lda $C823; bne dwp_loop; rts; PF459: lda $C829; PF45C: sta 0x0A; nop; bitb 0x0D; beq PF459; lda $C823; clr 0x0A; tsta; bne dwp_loop; jmp $check0ref; /* * Draw a list of vectors, pointed to by the x register. * The scale factor is not changed, and whatever the current * value is is used. The list is organized as follows: * * .byte mode, relative y, relative x; * * where mode has the following meaning: * * < 0 use mode value in 0xC829 ( 0 = invis; 0xFF is visible). * = 0 invisible vector. * = 1 end of list, so return. * > 1 visible vector. * */ drawl2: lda $C824; pshs a; clr $C824; /* Temporarily clear check0ref() enable flag */ PF476: lda ,x+; /* Grab the drawing mode desired */ bpl move_or_draw; bsr draw_with_pattern; bra PF476; move_or_draw: bne draw_or_end; jsr $move_to_pt; bra PF476; draw_or_end: deca; beq end_drawl2; jsr $draw_to_pt; bra PF476; end_drawl2: puls a; sta $C824; /* Restore the check0ref() enable flag */ jmp $check0ref; /* * This is the routine which does the actual printing of a string * onto the display. The u register points to the start of the * string. The end of the string is designated by the 0x80 byte. * The string is displayed by drawing 6 horizontal rows of dots. * The first row is drawn for each character, then the second, etc. * The character generation table is located at 0xF9D4 + 0x20. * NOTE: only characters 0x20 - 0x6F are defined, and lower case * characters a-o produce special icons. */ display_string: stu $C82C; /* Save pointer to start of string */ ldx #0xF9D4; /* Actual character table is at F9F4 */ ldd #0x1883; clr 0x01; sta 0x0B; ldx #0xF9D4; PF4A5: stb 0x00; dec 0x00; ldd #0x8081; nop; inc 0x00; stb 0x00; sta 0x00; tst $C800; inc 0x00; lda $C82B; /* Set the width */ sta 0x01; ldd #0x0100; ldu $C82C; /* Set u to point to 1st char */ sta 0x00; bra PF4CB; PF4C7: lda a,x; sta 0x0A; PF4CB: lda ,u+; bpl PF4C7; /* Display next row of pixels */ lda #0x81; sta 0x00; neg 0x01; lda #0x01; sta 0x00; cmpx #0xFBB4; /* If we have not reached the end of the char */ beq PF50A; /* table, then proceed to next row of pixels. */ leax 0x50,x; tfr u,d; subd $C82C; /* Point u back to the 1st character */ subb #0x02; aslb; brn PF4EB; PF4EB: lda #0x81; /* Timing loop */ nop; decb; bne PF4EB; sta 0x00; ldb $C82A; /* Grab the height */ stb 0x01; dec 0x00; ldd #0x8101; nop; sta 0x00; clr 0x01; stb 0x00; sta 0x00; ldb #0x03; bra PF4A5; /* Repeat, using next row pixel patterns */ PF50A: lda #0x98; sta 0x0B; /* Done with this string */ jmp $reset0ref; /* * Generate a random number, and place it into the a register. * This uses a different seed (contained in register b) than * get_random_a(). */ get_random_a2: pshs b,x; ldb #0x02; bra ran_start; /* * Generate a random number, and place it into the a register. */ get_random_a: pshs b,x; clrb; ran_start: ldx $C87B; ran_loop: lda 1,x; rola; rola; rola; rola; eora 2,x; rora; rol ,x; rol 1,x; rol 2,x; decb; bpl ran_loop; lda ,x; puls b,x,pc; /* Clear the block of memory C83F - C84C, then set C845 = 0x3F */ init_music_buf: ldb #0x0D; ldx #0xC83F; bsr clear_blockxb; lda #0x3F; sta 6,x; rts; /* * Clear a block of memory. The x register points to the * start of the memory block to be cleared, while the b * register specifies the number of bytes to be cleared. * The a register is altered. */ clear_blockxb: clra; bra clear_block; clear_C8_ram: ldx #0xC800; ldd #0x00FF; clear_block: clr d,x; subd #0x0001; bpl PF548; rts; /* * Set the block of memory pointed to by the x register to 0x80. * The number of memory locations to be set is specified by the * b register + 1. */ clear_block_to_0x80: lda #0x80; PF552: sta b,x; decb; bne PF552; sta ,x; rts; /* * Decrement the specified counters */ decrement_counters_C82E_C830: ldb #0x02; bra PF560; decrement_counters_C82E_C833: ldb #0x05; PF560: ldx #0xC82E; PF563: tst b,x; beq PF569; dec b,x; PF569: decb; bpl PF563; rts; /* Delay until the b register < 0 */ delay_b_3: ldb #0x03; bra start_b_delay; delay_b_2: ldb #0x02; bra start_b_delay; delay_b_1: ldb #0x01; bra start_b_delay; delay_b_0: clrb; start_b_delay: decb; bpl start_b_delay; rts; /* * On entry, the a register equals the bits number for which * a mask is desired. On exit, the a register equals the * requested bit mask. For example: * * Entry Exit * ----- ---- * 0 0x01 * 1 0x02 * etc etc */ get_bit_mask: ldx #bit_masks; lda a,x; rts; /* * If a is negative, then negate it and check to see if the * overflow bit is set; if it is, then decrement a. Repeat for * the b register. ( Overflow is set only if the # = 0x80). */ check_ab_for_overflow: tsta; bpl PF58B; nega; bvc PF58B; deca; PF58B: tstb; bpl PF592; negb; bvc PF592; decb; PF592: rts; PF593: pshs x; std 0x34; rolb; ldb #0x00; rolb; rola; rolb; aslb; stb 0x36; ldd 0x34; bsr check_ab_for_overflow; sta 0x34; cmpb 0x34; bls PF5B2; inc 0x36; exg a,b; bra PF5B2; PF5B0: lsra; lsrb; PF5B2: cmpa #0x09; bhi PF5B0; std 0x34; ldb 0x36; ldx #0xFC24; ldb b,x; ldx #0xFC2C; lda a,x; adda 0x35; adda #0x0A; bitb #0x01; bne PF5D0; addb a,x; bra PF5D3; PF5D0: decb; subb a,x; PF5D3: stb 0x36; lda 0x36; puls x,pc; /* * get_2nd_index_pair() and get_1st_index_pair() are used * by the rotation algorithm. They expect the rotation * value to be specified in the 'a' register. Upon exit, * the rotation index pair is returned in the 'd' register. */ get_2nd_index_pair: adda #0x10; get_1st_index_pair: ldx #0xFC6D; clrb; bita #0x20; beq PF5E5; ldb #0x80; PF5E5: anda #0x1F; cmpa #0x10; bne PF5EC; incb; PF5EC: lda a,x; rts; /* * This routine is called at at the beginning of the * rotation transformation process. It is responsible * for generating the 2 rotation index pairs. The * first rotation pair is saved in C837-C838, and the * second pair is aved in C839-C83A. This routine * expects the rotation value to be stored in C836. */ get_rotation_index_pairs: pshs x; lda 0x36; /* get rotation value */ bsr get_1st_index_pair; std 0x37; /* Save first rotation index pair */ lda 0x36; /* get rotation value */ bsr get_2nd_index_pair; std 0x39; /* Save second rotation index pair */ puls x,pc; /* * This routine is responsible for rotating a single * coordinate. At entry, the 'b' register must contain * the rotation value, and the 'a' register must contain * the coordinate. The value is returned in the 'd' register. */ PF5FF: subb #0x10; rotate_1_coordinate: stb 0x36; /* Save rotation value */ sta 0x3B; /* Save the coordinate */ bsr get_rotation_index_pairs; bsr xform_1a; nega; pshs a; bsr xform_2a; puls b,pc; /* * This routine rotates a vector list of length 'n', where * 'n' is specified by the 'b' register. The 'a' register * contains the rotation value; the 'x' register contains * a pointer to the vector list to be transformed; and * the 'u' register containss a pointer to a buffer into * which the transformed points are to be saved. * The vector list is composed of only y,x pairs. */ rotate_vector_list2: sta $C836; /* Save the rotation value */ stb $C823; /* Save the byte counter */ pshs dp; jsr $dptoC8; bsr get_rotation_index_pairs; bra rotate_a_pt: /* Process the vector list */ /* * This procedure is responible for rotating a vector list * having the following format: * * mode, relative y, relative x, * . * . * 1 * * At entry, the 'a' register must contain the rotation value, * the 'x' register must point to the vector list to be * transformed, and the 'u' register must point to a buffer * which is to be used to store the transformed coordinates. */ rotate_vector_list1: sta $C836; /* Save rotation value */ pshs dp; jsr $dptoC8; sta 0x23; bsr get_rotation_index_pairs; process_next_point: lda ,x+; /* Copy the mode, and process the */ sta ,u+; /* next point if mode <= 0. */ ble rotate_a_pt: clr 0x23; puls dp,pc; dec_vl_counter: dec 0x23; /* Decrement the vector list counter */ rotate_a_pt: lda ,x+; /* Load 'a' reg with the y coord */ bsr xform_2; sta ,u; lda ,x; /* Load 'a' reg with the x coord */ bsr xform_1; adda ,u; /* Save transformed y coord */ sta ,u+; lda -1,x; /* Load 'a' reg with the y coord */ bsr xform_1; sta ,u; lda ,x+; /* Load 'a' reg with the x coord */ bsr xform_2; suba ,u; sta ,u+; /* Save transformed x coord */ lda 0x23; bmi process_next_point; bne dec_vl_counter; puls dp,pc; /* * The following routines all do a transformation of a * point. xform_1() and xform_2() expect the coordinate * to be specified in the 'a' register. xform_1a() and * xform_2a() expect the coordinate to already be stored * in C83B. */ xform_1: sta 0x3B; xform_1a: ldd 0x37; /* Use table index values 1 */ bra PF665; xform_2: sta 0x3B; xform_2a: ldd 0x39; /* Use table index values 2 */ PF665: stb 0x3C; bitb #0x01; beq PF66F; lda 0x3B; bra PF679; PF66F: ldb 0x3B; bpl PF676; com 0x3C; negb; PF676: mul; adca #0x00; PF679: ldb 0x3C; bpl PF67E; nega; PF67E: rts; /* * Move a block of memory, starting at hi memory, and * working down to low memory. The source address is * specified in the u register, and the destination is * specified in the x register. The number of bytes * moved is equal to the value in the a register + 1. * The maximum value which can be specified in the a * register is 0x80. */ move_block: ldb a,u; stb a,x; deca; bpl move_block; rtn2: rts; /* * This should be called before you attempt to make a sound. * It should be called every refresh cycle, just before you * call waitrecal(). If you want to start a new sound, then * you must set C856 to 1, and point the u register to the * sound block. If no sound is in progress (C856 = 0), then * it returns immediately. While a sound is in progress, C856 * will be set to 0x80. * This routine processes a single note at a time, and calculates * the amplitude and course/fine tuning values for the 3 sound * channels. The values calculated are stored in the array located * at C83F-C84C; C83F = reg D, C840 = regC, C841 = regB, etc.... * Dp must be set to C8. */ init_sound: lda 0x56; /* See if a sound is in progress */ bmi continue_sound; /* or if we should start a new one */ beq rtn2; init_sound2: ldx #music_stuff3; stx 0x4D; lda #0x80; sta 0x56; /* Flag that init_sound was called */ ldd ,u++; std 0x4F; /* Save 1st param in music block */ ldd ,u++; std 0x51; /* Save 2nd param in music block */ stu 0x53; /* Save ptr to block of music */ jsr $init_music_buf; ldd #0x1F1F; std 0x5F; ldd #0x0000; std 0x63; std 0x65; sta 0x55; bra PF6EC; continue_sound: ldu #0xC85E; /* Continue current sound */ ldb #0x02; PF6B8: lda b,u; cmpa #0x1F; beq PF6C0; inc b,u; PF6C0: decb; bpl PF6B8; ldx 0x51; ldu #0xC858; lda #0x07; PF6CA: inc ,u; cmpa ,u; bge PF6D2; clr ,u; PF6D2: ldb ,u+; andb #0x07; ldb b,x; stb ,u+; inca; cmpa #0x09; bls PF6CA; dec 0x57; bne PF74E; music_delay: lda 0x55; /* This does something like changing */ deca; /* octives! I really am quessing */ bpl PF6EA; lda #0x02; PF6EA: sta 0x55; PF6EC: ldb [C853]; /* Load the next music note */ ldu #0xC85E; clr a,u; bitb #0x40; /* "@" */ beq PF712; ldx #music_stuff1; lda a,x; anda 0x45; sta 0x45; lda 0x55; adda #0x03; lda a,x; ora 0x45; sta 0x45; andb #0x1F; stb 0x46; bra PF735; PF712: ldx #music_stuff2; lda a,x; anda 0x45; sta 0x45; lda 0x55; adda #0x03; lda a,x; ora 0x45; sta 0x45; lda 0x55; asla; adda #0x03; leau a,u; andb #0x3F; /* "?" */ aslb; ldx 0x4D; ldd b,x; std ,u; PF735: ldx 0x53; /* Grab next note, & update ptr */ ldb ,x+; stx 0x53; tstb; bmi music_delay; /* Negative note = ?? */ ldb ,x+; /* Grab the duration */ bpl PF748; jsr $init_music_buf; clr 0x56; /* All done when duration = 0x80 */ rts; PF748: stx 0x53; andb #0x3F; /* "?" */ stb 0x57; PF74E: ldy 0x4F; ldu #0xC85E; ldx #0xC842; lda #0x02; PF759: ldb ,u+; bitb #0x01; beq PF766; lsrb; ldb b,y; andb #0x0F; bra PF76D; PF766: lsrb; ldb b,y; lsrb; lsrb; lsrb; lsrb; PF76D: stb a,x; deca; bpl PF759; ldu #0xC867; ldx #0xC847; PF778: ldd ,--u; tst -8,u; bpl PF788; neg -8,u; subb -8,u; sbca #0x00; neg -8,u; bra PF78C; PF788: addb -8,u; adca #0x00; PF78C: std ,x++; cmpx #0xC84D; /* Temporarily stop when we have filled */ bne PF778; /* the music buffer completely. */ PF793: rts; player_string: .byte 0x20; /* rel y = 32 (for score) */ .byte 0xC0; /* rel x = -64 (for score) */ .byte 0x40; /* rel y = 64 (player string) */ .byte 0xC0; /* rel x = -64 (player string) */ .byte "PLAYER",0x80; game_string: .byte 0xE0; /* rel y = -32 (for game #) */ .byte 0xC0; /* rel x = -64 (for game #) */ .byte 0x01; /* rel y = 1 (for game string) */ .byte 0xC0; /* rel x = -64 (for game string) */ .byte " GAME",0x80; /* * Ask the player for the number of players, and the game * desired to play. The maximum number of players allowed * should be specified in the a register, and the maximum * game number should be specified in the b register. If * either a or b is zero, then that question will not be * asked. The number of players selected is returned in * C879, and the game number selected is returned in C87A. */ get_players_game: std $C84F; tsta; beq PF7B1; lda #0x01; PF7B1: tstb; beq PF7B6; ldb #0x01; PF7B6: std $C879; jsr $dptoC8; ldd #0xF850; std 0x2A; /* Set string height & width */ sta 0x3C; bra handle_buttons; /* * This routine allows the user a given amount of time to modiy * the game # and number of players. Each time a button is pressed, * the timer will be reset. Control will be relinquished when the * timer finally expires. */ button_handler_loop: jsr $waitrecal; clra; jsr $read_switches; /* Read switches, & decrement loop counter */ jsr $decrement_counters_C82E_C830; jsr $intensity_to_7F; lda $C879; ldy #player_string; bsr display_option_string; /* Ask user for the number of players */ lda $C87A; ldy #game_string; bsr display_option_string; /* Ask user for the game number */ jsr $dptoC8; lda 0x3C; beq check_loop_counter; lda 0x0F; bne handle_buttons; clr 0x3C; /* Reset loop counter when button pressed */ check_loop_counter: lda 0x2F; /* Check counter in C82F and exit */ beq PF793; /* when it reaches zero. */ lda 0x2E; bne button_handler_loop; lda 0x15; /* Start the game, if switch 4 has */ bne PF793; /* been presses. */ lda 0x12; beq check_button2; /* Increment the number of players */ lda 0x79; /* if switch 1 has been pressed. Be*/ beq check_button2; /* sure to handle wrap. */ inca; cmpa 0x4F; bls PF80C; lda #0x01; PF80C: sta 0x79; bra handle_buttons; check_button2: lda 0x7A; /* If multiple games can be selected, */ beq button_handler_loop; /* then increment the game number if */ ldb 0x13; /* switch 2 has been pressed. */ beq check_button3; inca; cmpa 0x50; bls PF82A; lda #0x01; bra PF82A; check_button3: ldb 0x14; /* Decrement the game number, if */ beq button_handler_loop; /* switch 3 has been pressed. */ deca; bne PF82A; lda 0x50; PF82A: sta 0x7A; handle_buttons: lda #0xF3; /* Reset the loop counters. */ sta 0x2F; coma; sta 0x2E; bra button_handler_loop; /* Go back to start of loop. */ /* * Display the player or game string, and the current * value for that option. The a register must contain * the value of the option, and the y register must * point to a block of the following form: * * rel y and rel x for value string * rel y and rel x for player/game string * player/game string * 0x80 */ display_option_string: ldx #0xC85E; /* C85E is a temp work variable */ pshs a; bsr set_dft_score; lda ,s+; beq dos_rtn; bsr convert_a_to_bcd_and_add; tfr x,u; ldd ,y++; jsr $print_at_d; tfr y,u; jsr $print_with_dft_hw: dos_rtn: rts; /* * Initialize the score string, pointed to by the x register, * to the string " 0",0x80 . */ set_dft_score: ldd #0x2020; std ,x; std 2,x; sta 4,x; ldd #0x3080; std 5,x; rts; /* * convert_a_to_bcd_and_add() takes the value in the a register, and * converts it to a string of BCD characters, which are then * added to the BCD string in the buffer pointed to by the x register. */ convert_a_to_bcd_and_add: ldu #0x0000; PF861: cmpa #0x63; /* 99 */ bls PF86D; suba #0x64; /* 100 */ leau 0x0100,u; bra PF861; PF86D: cmpa #0x09; /* 9 */ bls PF878; suba #0x0A; /* 10 */ leau 0x10,u; bra PF86D; PF878: leau a,u; tfr u,d; /* Add the BCD value in d register to ascii string stored in x reg */ add_d_to_x_in_bcd: pshs a; pshs b; ldb #0x05; PF882: clra; cmpb #0x01; bls PF897; bitb #0x01; beq PF88F; lda ,s; bra PF895; PF88F: lda ,s+; lsra; lsra; lsra; lsra; PF895: anda #0x0F; PF897: adda $C823; clr $C823; adda b,x; cmpa #0x2F; /* "/" */ bgt PF8A5; adda #0x10; PF8A5: cmpa #0x39; /* "9" */ bls PF8AE; suba #0x0A; inc $C823; PF8AE: sta b,x; /* Strip leading 0's */ decb; bpl PF882; clr $C823; clrb; PF8B7: lda b,x; cmpa #0x30; /* Replace leading 0 with */ bne PF8C6; /* a space. */ lda #0x20; sta b,x; incb; cmpb #0x05; blt PF8B7; PF8C6: rts; /* * This procedure compares the two score strings pointed to by the * x and u registers. It returns one of the following values, * depending upon which score was higher: * * 1) The scores are the same: a = 0; * 2) x score > u score: a = 1; * 3) x score <= u score: a = 2; */ compare_scores: pshs x,u; clra; PF8CA: ldb ,x+; bmi PF8D6; cmpb ,u+; beq PF8CA; bhi PF8D5; inca; PF8D5: inca; PF8D6: puls x,u,pc; /* * This procedure compares the two score string arrays pointed to * by the u and x registers. The u register points to the current * hi score. If the score pointed to by the x register is greater * than the current hi score, then it will be copies into the * array pointed to by the u register. */ check_4_new_hi_score: bsr compare_scores; cmpa #0x01; bne PF8E4; PF8DE: lda ,x+; sta ,u+; bpl PF8DE; PF8E4: rts; /* * This routine modifies the position of the target, * before it checks to see if a bullet has hit it. * It takes the position of the target, in 'y', and * adds 0,u to the y position, and 1,u to the x position. * At entry, 'y' should contain the targets (y,x) position, * 'x' should contain the bullets (y,x) position, and 'd' * should contain the (height/2,width/2) of the target. * 'u' points to the modification values. */ PF8E5: pshs y; pshs a,b,x,y; ldd 4,s; adda ,u; addb 1,u; PF8EF: std 4,s; bra check_bullet_for_hit2; /* * This routine modifies the position of the target, * before it checks to see if a bullet has hit it. * It takes the position of the target, in 'y', and * adds to it the value in the 'u' register. * At entry, 'y' should contain the targets (y,x) position, * 'x' should contain the bullets (y,x) position, and 'd' * should contain the (height/2,width/2) of the target. * 'u' contains the modification values. */ PF8F3: pshs y; pshs a,b,x,y; tfr u,d; adda 4,s; addb 5,s; bra PF8EF; /* * This routine checks to see if a bullet has hit a * target. If the bullet has hit the target, then * the carry bit will be set; else, the carry bit * will be cleared. A hit is checked for in the * following fashion: * * if (target y - height/2) <= bullet y <= (target y + height/2) * and * (target x - width/2) <= bullet x <= (target x + width/2) * * then the bullet hit, else it missed. * * At entry, 'x' must contain the bullet position, 'y' must contain * the target position, and 'd' must contain the (height/2,width/2) * pair. */ check_bullet_for_hit: pshs y; pshs a,b,x,y; check_bullet_for_hit2: tfr sp,x; clrb; /* Start by checking the y coordinate */ check_bullet_loop: abx; lda 4,x; /* Add target y to height/2 (if b = 0) */ adda ,x; /* Add target x to width/2 (if b = 1) */ bvc check_bullet_pt1; lda #0x7F; /* Only goto edge of screen */ check_bullet_pt1: cmpa 2,x; /* See if bullet is close enough */ blt flag_a_miss; lda 4,x; suba ,x; bvc check_bullet_pt2; lda #0x80; /* Only goto edge of screen */ check_bullet_pt2: cmpa 2,x; bgt flag_a_miss; incb; /* go back and check the x coordinate */ cmpb #0x02; blo check_bullet_loop; orcc #0x01; /* Flag a hit; set carry bit */ bra PF92A; flag_a_miss: andcc #0xFE; /* Flag a miss; clear carry bit */ PF92A: puls a,b,x,y; puls y,pc; PF92E: lda 0x67; bpl PF95B; anda #0x7F; sta 0x67; ldx #0xC858; lda #0x04; jsr $PF683; lsrb; lsrb; lsrb; orb 0x58; andb #0x07; stb 0x54; ldb 0x58; andb #0x38; /* "8" */ stb 0x53; ldb 0x58; andb #0x07; stb 0x5D; ldb #0x02; stb 0x5C; lda #0x7F; bra PF968; PF95B: lda 0x77; beq PF9C9; suba 0x5B; bpl PF968; clrb; stb 0x77; bra PF9CA; PF968: sta 0x77; lsra; lsra; ldb 0x53; beq PF97D; sta 0x46; ldb 0x59; bmi PF97B; beq PF97D; tfr a,b; coma; PF97B: stb 0x46; PF97D: lsra; cmpa #0x07; bls PF987; cmpa #0x0F; beq PF987; inca; PF987: ldb 0x5A; bmi PF991; beq PF98F; eora #0x0F; PF98F: tfr a,b; PF991: bsr PF9CA; ldb 0x5D; beq PF9C2; PF997: lda 0x5C; deca; bpl PF99E; lda #0x02; PF99E: sta 0x5C; jsr $get_bit_mask; bita 0x5D; beq PF997; ldb 0x5C; aslb; negb; ldx #0xC84B; leax b,x; jsr $PF517; anda #0x0F; cmpa #0x05; bhi PF9BC; asla; adda #0x05; PF9BC: sta ,x; lda 0x7E; sta 1,x; PF9C2: lda 0x58; coma; anda 0x45; sta 0x45; PF9C9: rts; PF9CA: lda 0x54; ldx #0xC845; PF9CF: tsta; beq PF9DB; leax -1,x; PF9D4: lsra; bhs PF9CF; stb ,x; bra PF9CF; PF9DB: rts; bit_masks: .byte 0x01; .byte 0x02; .byte 0x04; .byte 0x08; .byte 0x10; .byte 0x20; .byte 0x40; .byte 0x80; music_stuff1: .byte 0xF7; .byte 0xEF; .byte 0xDF; .byte 0x01; .byte 0x02; .byte 0x04; music_stuff2: .byte 0xFE; .byte 0xFD; .byte 0xFB; .byte 0x08; .byte 0x10; .byte 0x20; SF9F0: .byte 0x7F; .byte 0x7F; .byte 0x80; .byte 0x80; /* This is the start of the character generation table used by * the string printing routine. The table starts at F9F4, * and goes for the next 480 bytes. */ character_table: .byte 0x00; .byte 0x20; .byte 0x50; .byte 0x50; .byte 0x20; .byte 0xC8; .byte 0x20; .byte 0x10; .byte 0x10; .byte 0x40; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x08; .byte 0x30; .byte 0x20; .byte 0x70; .byte 0x70; .byte 0x10; .byte 0xF8; .byte 0x30; .byte 0xF8; .byte 0x70; .byte 0x70; .byte 0x00; .byte 0x60; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x70; .byte 0x70; .byte 0x20; .byte 0xF0; .byte 0x70; .byte 0xF0; .byte 0xF8; .byte 0xF8; .byte 0x78; .byte 0x88; .byte 0x70; .byte 0x08; .byte 0x88; .byte 0x80; .byte 0x88; .byte 0x88; .byte 0xF8; .byte 0xF0; .byte 0x70; .byte 0xF0; .byte 0x70; .byte 0xF8; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0xF8; .byte 0x70; .byte 0x80; .byte 0x70; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x20; .byte 0x08; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x38; .byte 0x10; .byte 0x20; .byte 0x44; .byte 0x44; .byte 0x00; .byte 0xFE; .byte 0xFF; .byte 0xFE; .byte 0x00; .byte 0x70; .byte 0x50; .byte 0x50; .byte 0x78; .byte 0xC8; .byte 0x50; .byte 0x20; .byte 0x20; .byte 0x20; .byte 0xA8; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x08; .byte 0x48; .byte 0x60; .byte 0x88; .byte 0x88; .byte 0x30; .byte 0x80; .byte 0x40; .byte 0x08; .byte 0x88; .byte 0x88; .byte 0x60; .byte 0x60; .byte 0x10; .byte 0x00; .byte 0x40; .byte 0x88; .byte 0x88; .byte 0x50; .byte 0x48; .byte 0x88; .byte 0x48; .byte 0x80; .byte 0x80; .byte 0x80; .byte 0x88; .byte 0x20; .byte 0x08; .byte 0x90; .byte 0x80; .byte 0xD8; .byte 0xC8; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0xA8; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x08; .byte 0x40; .byte 0x80; .byte 0x08; .byte 0x50; .byte 0x00; .byte 0x00; .byte 0x70; .byte 0x0C; .byte 0x20; .byte 0x70; .byte 0x70; .byte 0x00; .byte 0x44; .byte 0x10; .byte 0x70; .byte 0x00; .byte 0x00; .byte 0x6C; .byte 0x82; .byte 0xFF; .byte 0xFE; .byte 0x00; .byte 0x70; .byte 0x50; .byte 0xF8; .byte 0xA0; .byte 0x10; .byte 0x50; .byte 0x40; .byte 0x40; .byte 0x10; .byte 0x70; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x10; .byte 0x48; .byte 0x20; .byte 0x08; .byte 0x08; .byte 0x50; .byte 0xF0; .byte 0x80; .byte 0x10; .byte 0x88; .byte 0x88; .byte 0x60; .byte 0x00; .byte 0x20; .byte 0x78; .byte 0x20; .byte 0x08; .byte 0xA8; .byte 0x88; .byte 0x48; .byte 0x80; .byte 0x48; .byte 0x80; .byte 0x80; .byte 0x80; .byte 0x88; .byte 0x20; .byte 0x08; .byte 0xA0; .byte 0x80; .byte 0xA8; .byte 0xA8; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x40; .byte 0x20; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x50; .byte 0x50; .byte 0x10; .byte 0x40; .byte 0x40; .byte 0x08; .byte 0x88; .byte 0x00; .byte 0x70; .byte 0xA8; .byte 0x0A; .byte 0x20; .byte 0x88; .byte 0xF8; .byte 0x60; .byte 0xBA; .byte 0x38; .byte 0x20; .byte 0x00; .byte 0x00; .byte 0x92; .byte 0x82; .byte 0xFF; .byte 0xFE; .byte 0x00; .byte 0x20; .byte 0x00; .byte 0x50; .byte 0x70; .byte 0x20; .byte 0x60; .byte 0x00; .byte 0x40; .byte 0x10; .byte 0xA8; .byte 0xF8; .byte 0x00; .byte 0x70; .byte 0x00; .byte 0x20; .byte 0x48; .byte 0x20; .byte 0x70; .byte 0x30; .byte 0x90; .byte 0x08; .byte 0xF0; .byte 0x20; .byte 0x70; .byte 0x78; .byte 0x00; .byte 0x60; .byte 0x40; .byte 0x00; .byte 0x10; .byte 0x10; .byte 0xB8; .byte 0x88; .byte 0x70; .byte 0x80; .byte 0x48; .byte 0xE0; .byte 0xE0; .byte 0x98; .byte 0xF8; .byte 0x20; .byte 0x08; .byte 0xC0; .byte 0x80; .byte 0xA8; .byte 0x98; .byte 0x88; .byte 0xF0; .byte 0x88; .byte 0xF0; .byte 0x20; .byte 0x20; .byte 0x88; .byte 0x50; .byte 0xA8; .byte 0x20; .byte 0x20; .byte 0x20; .byte 0x40; .byte 0x20; .byte 0x08; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0x20; .byte 0x08; .byte 0x20; .byte 0x88; .byte 0xF8; .byte 0xF0; .byte 0xA2; .byte 0x38; .byte 0xF8; .byte 0x82; .byte 0x38; .byte 0x92; .byte 0x82; .byte 0xFF; .byte 0xFE; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xF8; .byte 0x70; .byte 0x40; .byte 0xA8; .byte 0x00; .byte 0x40; .byte 0x10; .byte 0xA8; .byte 0x20; .byte 0x40; .byte 0x00; .byte 0x00; .byte 0x40; .byte 0x48; .byte 0x20; .byte 0x80; .byte 0x08; .byte 0xF8; .byte 0x08; .byte 0x88; .byte 0x40; .byte 0x88; .byte 0x08; .byte 0x60; .byte 0x60; .byte 0x20; .byte 0x78; .byte 0x20; .byte 0x20; .byte 0xB0; .byte 0xF8; .byte 0x48; .byte 0x80; .byte 0x48; .byte 0x80; .byte 0x80; .byte 0x88; .byte 0x88; .byte 0x20; .byte 0x08; .byte 0xA0; .byte 0x80; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x80; .byte 0xA8; .byte 0xA0; .byte 0x10; .byte 0x20; .byte 0x88; .byte 0x50; .byte 0xA8; .byte 0x50; .byte 0x20; .byte 0x40; .byte 0x40; .byte 0x10; .byte 0x08; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0x20; .byte 0x78; .byte 0xA8; .byte 0x88; .byte 0xF8; .byte 0xF0; .byte 0xBA; .byte 0x7C; .byte 0x20; .byte 0x44; .byte 0x44; .byte 0x6C; .byte 0x82; .byte 0xFF; .byte 0xFE; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x50; .byte 0x28; .byte 0x98; .byte 0x90; .byte 0x00; .byte 0x20; .byte 0x20; .byte 0x00; .byte 0x20; .byte 0x40; .byte 0x00; .byte 0x00; .byte 0x80; .byte 0x48; .byte 0x20; .byte 0x80; .byte 0x88; .byte 0x10; .byte 0x88; .byte 0x88; .byte 0x80; .byte 0x88; .byte 0x10; .byte 0x60; .byte 0x20; .byte 0x10; .byte 0x00; .byte 0x40; .byte 0x00; .byte 0x80; .byte 0x88; .byte 0x48; .byte 0x88; .byte 0x48; .byte 0x80; .byte 0x80; .byte 0x88; .byte 0x88; .byte 0x20; .byte 0x88; .byte 0x90; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x80; .byte 0x90; .byte 0x90; .byte 0x88; .byte 0x20; .byte 0x88; .byte 0x20; .byte 0xA8; .byte 0x88; .byte 0x20; .byte 0x80; .byte 0x40; .byte 0x08; .byte 0x08; .byte 0x00; .byte 0x00; .byte 0x48; .byte 0x20; .byte 0xF0; .byte 0x70; .byte 0x70; .byte 0x70; .byte 0x60; .byte 0x44; .byte 0x6C; .byte 0x50; .byte 0x38; .byte 0x82; .byte 0x00; .byte 0x82; .byte 0xFF; .byte 0xFE; /* End of character generation table */ .byte 0x00; .byte 0x20; /* " " */ .byte 0x00; .byte 0x50; /* "P" */ .byte 0xF8; .byte 0x98; .byte 0x68; /* "h" */ .byte 0x00; .byte 0x10; .byte 0x40; /* "@" */ .byte 0x00; .byte 0x00; .byte 0x80; .byte 0x00; .byte 0x80; .byte 0x80; .byte 0x30; /* "0" */ .byte 0x70; /* "p" */ .byte 0xF8; .byte 0x70; /* "p" */ .byte 0x10; .byte 0x70; /* "p" */ .byte 0x70; /* "p" */ .byte 0x80; .byte 0x70; /* "p" */ .byte 0x60; /* "`" */ .byte 0x00; .byte 0x40; /* "@" */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x20; /* " " */ .byte 0x78; /* "x" */ .byte 0x88; .byte 0xF0; .byte 0x70; /* "p" */ .byte 0xF0; .byte 0xF8; .byte 0x80; .byte 0x78; /* "x" */ .byte 0x88; .byte 0x70; /* "p" */ .byte 0x70; /* "p" */ .byte 0x88; .byte 0xF8; .byte 0x88; .byte 0x88; .byte 0xF8; .byte 0x80; .byte 0x68; /* "h" */ .byte 0x88; .byte 0x70; /* "p" */ .byte 0x20; /* " " */ .byte 0x70; /* "p" */ .byte 0x20; /* " " */ .byte 0x50; /* "P" */ .byte 0x88; .byte 0x20; /* " " */ .byte 0xF8; .byte 0x70; /* "p" */ .byte 0x08; .byte 0x70; /* "p" */ .byte 0x00; .byte 0xF8; .byte 0x00; .byte 0x20; /* " " */ .byte 0x60; /* "`" */ .byte 0x20; /* " " */ .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x38; /* "8" */ .byte 0x82; .byte 0x88; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0xFF; .byte 0xFE; SFC24: .byte 0x00; .byte 0x11; .byte 0x41; /* "A" */ .byte 0x30; /* "0" */ .byte 0x21; /* "!" */ .byte 0x10; .byte 0x20; /* " " */ .byte 0x31; /* "1" */ SFC2C: .byte 0x00; .byte 0x01; .byte 0x03; .byte 0x06; .byte 0x0A; .byte 0x0F; .byte 0x15; .byte 0x1C; .byte 0x24; /* "$" */ .byte 0x2D; /* "-" */ .byte 0x08; .byte 0x10; SFC38: .byte 0x08; .byte 0x10; .byte 0x0B; .byte 0x08; .byte 0x10; .byte 0x0D; .byte 0x0A; .byte 0x08; .byte 0x10; .byte 0x0E; .byte 0x0B; .byte 0x09; .byte 0x08; .byte 0x10; .byte 0x0E; .byte 0x0C; .byte 0x0A; .byte 0x09; .byte 0x08; .byte 0x10; .byte 0x0E; .byte 0x0D; .byte 0x0B; .byte 0x0A; .byte 0x09; .byte 0x08; .byte 0x10; .byte 0x0F; .byte 0x0D; .byte 0x0C; .byte 0x0B; .byte 0x0A; .byte 0x09; .byte 0x08; .byte 0x10; .byte 0x0F; .byte 0x0E; .byte 0x0C; .byte 0x0B; .byte 0x0A; .byte 0x09; .byte 0x09; .byte 0x08; .byte 0x10; .byte 0x0F; .byte 0x0E; .byte 0x0D; .byte 0x0C; .byte 0x0B; .byte 0x0A; .byte 0x09; .byte 0x09; .byte 0x08; SFC6D: .byte 0x00; .byte 0x19; .byte 0x32; /* "2" */ .byte 0x4A; /* "J" */ .byte 0x62; /* "b" */ .byte 0x79; /* "y" */ .byte 0x8E; .byte 0xA2; .byte 0xB5; .byte 0xC6; .byte 0xD5; .byte 0xE2; .byte 0xED; .byte 0xF5; .byte 0xFB; .byte 0xFF; .byte 0xFF; .byte 0xFF; .byte 0xFB; .byte 0xF5; .byte 0xED; .byte 0xE2; .byte 0xD5; .byte 0xC6; .byte 0xB5; .byte 0xA2; .byte 0x8E; .byte 0x79; /* "y" */ .byte 0x62; /* "b" */ .byte 0x4A; /* "J" */ .byte 0x32; /* "2" */ .byte 0x19; music_stuff3; SFC8D: .byte 0x03; .byte 0xBD; .byte 0x03; .byte 0x87; .byte 0x03; .byte 0x54; /* "T" */ .byte 0x03; .byte 0x24; /* "$" */ .byte 0x02; .byte 0xF7; .byte 0x02; .byte 0xCD; .byte 0x02; .byte 0xA4; .byte 0x02; .byte 0x7E; /* "~" */ .byte 0x02; .byte 0x5B; /* "[" */ .byte 0x02; .byte 0x39; /* "9" */ .byte 0x02; .byte 0x19; .byte 0x01; .byte 0xFB; .byte 0x01; .byte 0xDE; .byte 0x01; .byte 0xC3; .byte 0x01; .byte 0xAA; .byte 0x01; .byte 0x92; .byte 0x01; .byte 0x7C; /* "|" */ .byte 0x01; .byte 0x66; /* "f" */ .byte 0x01; .byte 0x52; /* "R" */ .byte 0x01; .byte 0x3F; /* "?" */ .byte 0x01; .byte 0x2D; /* "-" */ .byte 0x01; .byte 0x1C; .byte 0x01; .byte 0x0C; .byte 0x00; .byte 0xFD; .byte 0x00; .byte 0xEF; .byte 0x00; .byte 0xE2; .byte 0x00; .byte 0xD5; .byte 0x00; .byte 0xC9; .byte 0x00; .byte 0xBE; .byte 0x00; .byte 0xB3; .byte 0x00; .byte 0xA9; .byte 0x00; .byte 0xA0; .byte 0x00; .byte 0x97; .byte 0x00; .byte 0x8E; .byte 0x00; .byte 0x86; .byte 0x00; .byte 0x7F; .byte 0x00; .byte 0x78; /* "x" */ .byte 0x00; .byte 0x71; /* "q" */ .byte 0x00; .byte 0x6B; /* "k" */ .byte 0x00; .byte 0x65; /* "e" */ .byte 0x00; .byte 0x5F; /* "_" */ .byte 0x00; .byte 0x5A; /* "Z" */ .byte 0x00; .byte 0x55; /* "U" */ .byte 0x00; .byte 0x50; /* "P" */ .byte 0x00; .byte 0x4B; /* "K" */ .byte 0x00; .byte 0x47; /* "G" */ .byte 0x00; .byte 0x43; /* "C" */ .byte 0x00; .byte 0x3F; /* "?" */ .byte 0x00; .byte 0x3C; /* "<" */ .byte 0x00; .byte 0x38; /* "8" */ .byte 0x00; .byte 0x35; /* "5" */ .byte 0x00; .byte 0x32; /* "2" */ .byte 0x00; .byte 0x2F; /* "/" */ .byte 0x00; .byte 0x2D; /* "-" */ .byte 0x00; .byte 0x2A; /* "*" */ .byte 0x00; .byte 0x28; /* "(" */ .byte 0x00; .byte 0x26; /* "&" */ .byte 0x00; .byte 0x24; /* "$" */ .byte 0x00; .byte 0x22; /* """ */ .byte 0x00; .byte 0x20; /* " " */ .byte 0x00; .byte 0x1E; .byte 0x00; .byte 0x1C; .byte 0x00; .byte 0x1B; .byte 0x00; .byte 0x00; /* Vectrex introduction music */ intro_music: .word #intro_header_1; .word #music_header2_a; .byte 0x93; /* delay */ .byte 0x1F; .byte 0x0C; .byte 0x93; /* delay */ .byte 0x1F; .byte 0x06; .byte 0x98; /* delay */ .byte 0x9F; /* delay */ .byte 0x24; .byte 0x3C; .byte 0x11; .byte 0x80; /* end of music block */ .byte 0xFD; .byte 0x69; /* "i" */ .byte 0xFD; .byte 0x79; /* "y" */ .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x0E; .byte 0x99; .byte 0x9F; .byte 0x24; /* "$" */ .byte 0x0E; .byte 0x95; .byte 0x9B; .byte 0x20; /* " " */ .byte 0x0E; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x21; /* "!" */ .byte 0x07; .byte 0x9D; .byte 0xA3; .byte 0x28; /* "(" */ .byte 0x0E; .byte 0xA0; .byte 0xA6; .byte 0x2B; /* "+" */ .byte 0x0E; .byte 0x22; /* """ */ .byte 0x02; .byte 0x28; /* "(" */ .byte 0x02; .byte 0x2D; /* "-" */ .byte 0x02; .byte 0x28; /* "(" */ .byte 0x02; .byte 0x22; /* """ */ .byte 0x02; .byte 0x28; /* "(" */ .byte 0x02; .byte 0x2D; /* "-" */ .byte 0x02; .byte 0x28; /* "(" */ .byte 0x02; .byte 0x22; /* """ */ .byte 0x02; .byte 0x28; /* "(" */ .byte 0x02; .byte 0x2D; /* "-" */ .byte 0x02; .byte 0x28; /* "(" */ .byte 0x02; .byte 0x2E; /* "." */ .byte 0x02; .byte 0x2D; /* "-" */ .byte 0x28; /* "(" */ .byte 0x21; /* "!" */ .byte 0x80; .byte 0xEF; .byte 0xFF; .byte 0xFE; .byte 0xDC; .byte 0xBA; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x01; .byte 0x02; .byte 0x01; .byte 0x00; .byte 0xFF; .byte 0xFE; .byte 0xFF; .byte 0xFD; .byte 0xC3; .byte 0xFE; .byte 0xB6; .byte 0x51; /* "Q" */ .byte 0x24; /* "$" */ .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x0C; .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x18; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x0C; .byte 0x50; /* "P" */ .byte 0x0C; .byte 0x50; /* "P" */ .byte 0x24; /* "$" */ .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x0C; .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x06; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x18; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x04; .byte 0x50; /* "P" */ .byte 0x0C; .byte 0x50; /* "P" */ .byte 0x18; .byte 0x26; /* "&" */ .byte 0x80; .byte 0xFD; .byte 0xBA; .byte 0x98; .byte 0x76; /* "v" */ .byte 0x55; /* "U" */ .byte 0x44; /* "D" */ .byte 0x33; /* "3" */ .byte 0x22; /* """ */ .byte 0x11; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0x28; /* "(" */ .byte 0xFD; .byte 0x79; /* "y" */ .byte 0x98; .byte 0x1C; .byte 0x10; .byte 0x3F; /* "?" */ .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x04; .byte 0x98; .byte 0x1C; .byte 0x04; .byte 0x98; .byte 0x1C; .byte 0x10; .byte 0x3F; /* "?" */ .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x04; .byte 0x98; .byte 0x1C; .byte 0x04; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x93; .byte 0x18; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x9C; .byte 0x1F; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x93; .byte 0x18; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x93; .byte 0x18; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x9C; .byte 0x1F; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x93; .byte 0x18; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x93; .byte 0x18; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x9C; .byte 0x1F; .byte 0x08; .byte 0x98; .byte 0x1C; .byte 0x08; .byte 0x93; .byte 0x18; .byte 0x08; .byte 0x9C; .byte 0x1F; .byte 0x30; /* "0" */ .byte 0x1A; .byte 0x80; .byte 0xFF; .byte 0xFE; .byte 0xDC; .byte 0xBA; .byte 0x98; .byte 0x76; /* "v" */ .byte 0x54; /* "T" */ .byte 0x32; /* "2" */ .byte 0x10; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0x66; /* "f" */ .byte 0xFE; .byte 0xB6; .byte 0x0C; .byte 0x18; .byte 0x11; .byte 0x18; .byte 0x0C; .byte 0x18; .byte 0x11; .byte 0x18; .byte 0x0C; .byte 0x18; .byte 0x11; .byte 0x18; .byte 0x0C; .byte 0x12; .byte 0x0C; .byte 0x06; .byte 0x11; .byte 0x18; .byte 0x9D; .byte 0x21; /* "!" */ .byte 0x18; .byte 0x9F; .byte 0x23; /* "#" */ .byte 0x18; .byte 0xA1; .byte 0x24; /* "$" */ .byte 0x18; .byte 0xA3; .byte 0x26; /* "&" */ .byte 0x18; .byte 0x9F; .byte 0xA4; .byte 0x28; /* "(" */ .byte 0x18; .byte 0x07; .byte 0x12; .byte 0x07; .byte 0x06; .byte 0x00; .byte 0x3C; /* "<" */ .byte 0x18; .byte 0x80; .byte 0xDE; .byte 0xEF; .byte 0xFE; .byte 0xDC; .byte 0xBA; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0xB2; .byte 0xFE; .byte 0xB6; .byte 0x18; .byte 0x06; .byte 0x1A; .byte 0x06; .byte 0x1C; .byte 0x0C; .byte 0x18; .byte 0x0C; .byte 0x1A; .byte 0x24; /* "$" */ .byte 0x23; /* "#" */ .byte 0x18; .byte 0x17; .byte 0x06; .byte 0x18; .byte 0x06; .byte 0x1A; .byte 0x0C; .byte 0x17; .byte 0x0C; .byte 0x18; .byte 0x24; /* "$" */ .byte 0x24; /* "$" */ .byte 0x18; .byte 0xA4; .byte 0x28; /* "(" */ .byte 0x0C; .byte 0xA3; .byte 0x26; /* "&" */ .byte 0x0C; .byte 0xA1; .byte 0x24; /* "$" */ .byte 0x0C; .byte 0x9F; .byte 0x23; /* "#" */ .byte 0x0C; .byte 0x9D; .byte 0x21; /* "!" */ .byte 0x18; .byte 0x9A; .byte 0x1F; .byte 0x18; .byte 0x17; .byte 0x06; .byte 0x18; .byte 0x06; .byte 0x1A; .byte 0x0C; .byte 0x17; .byte 0x0C; .byte 0x18; .byte 0x24; /* "$" */ .byte 0x24; /* "$" */ .byte 0x24; /* "$" */ .byte 0x18; .byte 0x80; .byte 0xFF; .byte 0xEE; .byte 0xDD; .byte 0xCC; music_header2_a: .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0xE8; .byte 0xFE; .byte 0xB6; .byte 0x96; .byte 0x9A; .byte 0x1D; .byte 0x1E; .byte 0x91; .byte 0x95; .byte 0x18; .byte 0x1E; .byte 0x94; .byte 0x98; .byte 0x1B; .byte 0x1E; .byte 0x8F; .byte 0x94; .byte 0x18; .byte 0x14; .byte 0x16; .byte 0x0A; .byte 0x8C; .byte 0x91; .byte 0x15; .byte 0x14; .byte 0x16; .byte 0x0A; .byte 0x91; .byte 0x95; .byte 0x18; .byte 0x32; /* "2" */ .byte 0x18; .byte 0x80; intro_header1: .byte 0xEE; .byte 0xFF; .byte 0xFF; .byte 0xEE; .byte 0xEE; .byte 0xDD; .byte 0xCC; .byte 0xBB; .byte 0xAA; .byte 0x99; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0x88; .byte 0xFF; .byte 0x16; .byte 0xFE; .byte 0xB6; .byte 0x1C; .byte 0x06; .byte 0x1F; .byte 0x06; SFF00: .byte 0x1C; .byte 0x06; .byte 0x18; .byte 0x06; .byte 0x1A; .byte 0x06; .byte 0x18; .byte 0x06; .byte 0x15; .byte 0x06; .byte 0x13; .byte 0x06; .byte 0x18; .byte 0x06; .byte 0x13; .byte 0x06; .byte 0x17; .byte 0x06; .byte 0x18; .byte 0x1E; .byte 0x18; .byte 0x80; .byte 0xFF; .byte 0xFF; .byte 0xEE; .byte 0xEE; .byte 0xDD; .byte 0xDD; .byte 0xCC; .byte 0xCC; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0x00; .byte 0xFE; .byte 0x28; /* "(" */ .byte 0xFE; .byte 0xB6; .byte 0x16; .byte 0x0F; .byte 0x16; .byte 0x05; .byte 0x16; .byte 0x05; .byte 0x16; .byte 0x05; .byte 0x1A; .byte 0x0F; .byte 0x16; .byte 0x0F; .byte 0x1D; .byte 0x0F; .byte 0x1D; .byte 0x05; .byte 0x1D; .byte 0x05; .byte 0x1D; .byte 0x05; .byte 0x21; /* "!" */ .byte 0x0F; .byte 0x1D; .byte 0x32; /* "2" */ .byte 0x1D; .byte 0x80; .byte 0xFE; .byte 0x28; /* "(" */ .byte 0xFE; .byte 0xB6; .byte 0x16; .byte 0x06; .byte 0x16; .byte 0x02; .byte 0x16; .byte 0x02; .byte 0x16; .byte 0x02; .byte 0x1A; .byte 0x06; .byte 0x16; .byte 0x06; .byte 0x1D; .byte 0x06; .byte 0x1D; .byte 0x02; .byte 0x1D; .byte 0x02; .byte 0x1D; .byte 0x02; .byte 0x21; /* "!" */ .byte 0x06; .byte 0x1D; .byte 0x32; /* "2" */ .byte 0x11; .byte 0x80; .byte 0xFE; .byte 0x28; /* "(" */ .byte 0xFE; .byte 0xB6; .byte 0x1B; .byte 0x0F; .byte 0x16; .byte 0x05; .byte 0x16; .byte 0x05; .byte 0x16; .byte 0x05; .byte 0x17; .byte 0x30; /* "0" */ .byte 0x16; .byte 0x05; .byte 0x16; .byte 0x05; .byte 0x16; .byte 0x05; .byte 0x17; .byte 0x30; /* "0" */ .byte 0x16; .byte 0x80; .byte 0xFD; .byte 0x69; /* "i" */ .byte 0xFE; .byte 0xB6; .byte 0xA0; .byte 0x23; /* "#" */ .byte 0x12; .byte 0xA0; .byte 0x23; /* "#" */ .byte 0x0C; .byte 0x9C; .byte 0x20; /* " " */ .byte 0x06; .byte 0x9E; .byte 0x21; /* "!" */ .byte 0x12; .byte 0x9C; .byte 0x20; /* " " */ .byte 0x32; /* "2" */ .byte 0x13; .byte 0x80; .byte 0xFD; .byte 0xC3; .byte 0xFE; .byte 0xB6; .byte 0x16; .byte 0x04; .byte 0x16; .byte 0x04; .byte 0x16; .byte 0x04; .byte 0x16; .byte 0x04; .byte 0x1A; .byte 0x08; .byte 0x1C; .byte 0x80; .byte 0xA6; .byte 0xA0; .byte 0x20; /* " " */ .byte 0x08; .byte 0xBD; .byte 0xF3; .byte 0xBE; .byte 0xB6; .byte 0xC8; .byte 0x80; .byte 0x84; .byte 0x7F; .byte 0xB7; .byte 0xC8; .byte 0x80; .byte 0x7A; /* "z" */ .byte 0xC8; .byte 0x80; .byte 0xA6; .byte 0xA4; .byte 0x47; /* "G" */ .byte 0x84; .byte 0xF8; .byte 0xE6; .byte 0xA0; .byte 0x58; /* "X" */ .byte 0x58; /* "X" */ .byte 0x58; /* "X" */ .byte 0x58; /* "X" */ .byte 0x57; /* "W" */ .byte 0xC4; .byte 0xF8; .byte 0x7D; /* "}" */ .byte 0xC8; .byte 0x80; .byte 0x2B; /* "+" */ .byte 0xDF; .byte 0xBD; .byte 0xF3; .byte 0xDF; .byte 0xB6; .byte 0xC8; .byte 0x80; .byte 0x85; .byte 0x0F; .byte 0x26; /* "&" */ .byte 0xE0; .byte 0x85; .byte 0x20; .byte 0x27; /* "'" */ .byte 0xCD; .byte 0x39; /* "9" */ .byte 0x4B; /* "K" */ .byte 0x41; /* "A" */ .byte 0x52; /* "R" */ .byte 0x52; /* "R" */ .byte 0x53; /* "S" */ .byte 0x4F; /* "O" */ .byte 0x46; /* "F" */ .byte 0x54; /* "T" */ .byte 0x38; /* "8" */ .byte 0x32; /* "2" */ .byte 0x4C; /* "L" */ .byte 0x44; /* "D" */ .byte 0x4D; /* "M" */ .byte 0x43; /* "C" */ .byte 0x42; /* "B" */ .byte 0x43; /* "C" */ .byte 0x4A; /* "J" */ .byte 0x54; /* "T" */ .byte 0x38; /* "8" */ .byte 0x32; /* "2" */ .byte 0x4C; /* "L" */ .byte 0x44; /* "D" */ .byte 0x4D; /* "M" */ .byte 0x43; /* "C" */ .byte 0x42; /* "B" */ .byte 0x43; /* "C" */ .byte 0x4A; /* "J" */ /* 6809 interrupt and startup vectors */ .word 0x0000; .word 0x0000; .word 0xCBF2; .word 0xCBF2; .word 0xCBF5; .word 0xCBF8; .word 0xCBFB; .word 0xCBFB; .word #start; + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Art Master Source Date: 24 Aug 1994 14:28:07 GMT Organization: Computer Science Dept., Univ. of Western Ontario, London, Canada Lines: 3413 Distribution: world Message-ID: <33fldn$1n1@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca From fred@hpcvusc.cv.hp.com Wed Aug 24 09:48 EDT 1994 Date: Wed, 24 Aug 1994 06:47:22 -0700 From: Fred Taft To: magundi@uwo.ca Subject: Art Master source Status: O /* * This work was originally done by Fred Taft (fred@hp-pcd.cv.hp.com). * Please forward any comments, corrections or additions back to Fred. * * Art Master */ .org 0x0000; 0000 67 .byte "g GCE 1983",0x80; 000B 0EEE .word #AM_music; 000D F8 .byte 0xF8;/* height */ 000E 40 .byte 0x40;/* width */ 000F 20 .byte 0x20;/* rel y */ 0010 EC .byte 0xEC;/* rel x */ 0011 41 .byte "ART", 0x80; 0015 F8 .byte 0xF8;/* height */ 0016 40 .byte 0x40;/* width */ 0017 04 .byte 0x04;/* rel y */ 0018 E0 .byte 0xE0;/* rel x */ 0019 4D .byte "MASTER", 0x80, 0x00; /* * Art Master * * This is the entry point for the Art Master game. * It initializes the RAM area used by the game, initializes * the music buffer, sets up the indirect jump location * in C8A7, and lastly, passes control to the main loop. */ 0021 12 start: nop; 0022 BD01A2 jsr $am_clear_game_RAM; 0025 BDF18B jsr $reinit; 0028 BDF533 jsr $init_music_buf; 002B 7FC856 clr $C856; 002E BDF289 jsr $do_sound; 0031 8E009B ldx #display_main_menu; 0034 BFC8A7 stx $C8A7; 0037 7FC81E clr $C81E; /* * main_loop() * * This main loop is responsible for reading the buttons * on the primary console, continuing any sounds which * are in progress, and then calling whichever handling * routine has been set up in the indirect jump location. * After this, it recalibrates the integraters, and then * repeats the above. */ main_loop: 003A BDF1BA jsr $read_switches2; 003D BD0ECB jsr $check_for_end_of_sound; 0040 BDF289 P0040: jsr $do_sound; 0043 B6C81B lda $C81B; /* Keep track of the fact that */ 0046 B7C81E sta $C81E; /* a string was picked last pass */ 0049 7FC81B clr $C81B; /* thru the main loop. */ 004C AD9FC8A7 jsr [0xC8A7]; 0050 BDF192 P0050: jsr $waitrecal; 0053 7E003A jmp $main_loop; SM_ERASE_STR: 0056 E8 .byte 0xE8; 0057 20 .byte 0x20; 0058 80 .byte 0x80; 0059 30 .byte 0x30; 005A 00 .word 0x005C; 005C 45 .byte "ERASE",0x80; SM_MENU_STR: 0062 E8 .byte 0xE8; 0063 20 .byte 0x20; 0064 80 .byte 0x80; 0065 50 .byte 0x50; 0066 00 .word 0x0068; 0068 4D .byte "MENU", 0x80; SM_NEXT_STR: 006D E8 .byte 0xE8; 006E 20 .byte 0x20; 006F 80 .byte 0x80; 0070 A0 .byte 0xA0; 0071 00 .word 0x0073; 0073 4E .byte "NEXT", 0x80; SM_LAST_STR: 0078 E8 .byte 0xE8; 0079 20 .byte 0x20; 007A 80 .byte 0x80; 007B C0 .byte 0xC0; 007C 00 .word 0x007E; 007E 4C .byte "LAST", 0x80; SM_PLAY_STR: 0083 E8 .byte 0xE8; 0084 20 .byte 0x20; 0085 80 .byte 0x80; 0086 E0 .byte 0xE0; 0087 00 .word 0x0089; 0089 50 .byte "PLAY", 0x80; SM_CREATE_STR: 008E E8 .byte 0xE8; 008F 20 .byte 0x20; 0090 80 .byte 0x80; 0091 28 .byte 0x28; 0092 00 .word 0x0094; 0094 43 .byte "CREATE", 0x80; /* * The next 3 blocks of code cause the three main * menu items (sketch, connect and animate) to be * displayed, until one of them is picked by the * lightpen (a pick is indicated by C89E != 0). * When a pick occurs, the counter in C888 * is set, and the jump location (C8A7) is set so that * only the picked option is displayed. */ display_main_menu: 009B BDF2A9 jsr $intensity_to_7F; 009E CE0169 ldu #MM_SKETCH_STR; 00A1 BD0ACF jsr $print_with_pick_check; 00A4 7DC89E tst $C89E; 00A7 270C beq disp_mm_connect_str; 00A9 860A lda #0x0A; 00AB B7C888 sta $C888; 00AE 8E0102 ldx #disp_only_mm_sketch_str; 00B1 BFC8A7 stx $C8A7; 00B4 39 rts; disp_mm_connect_str: 00B5 CE0176 ldu #MM_CONNECT_STR; 00B8 BD0ACF jsr $print_with_pick_check; 00BB 7DC89E tst $C89E; 00BE 270C beq disp_mm_animate_str; 00C0 860A lda #0x0A; 00C2 B7C888 sta $C888; 00C5 8E0127 ldx #disp_only_mm_connect_str; 00C8 BFC8A7 stx $C8A7; 00CB 39 rts; disp_mm_animate_str: 00CC CE0184 ldu #MM_ANIMATE_STR; 00CF BD0ACF jsr $print_with_pick_check; 00D2 7DC89E tst $C89E; 00D5 270C beq P00E3; 00D7 8E00E4 ldx #disp_only_mm_animate_str; 00DA BFC8A7 stx $C8A7; 00DD 860A lda #0x0A; 00DF B7C888 sta $C888; 00E2 39 rts; 00E3 39 P00E3: rts; /* * Continue to display the ANIMATE main menu item, * until either the loop counter (C888) decrements * to zero (at which point the ANIMATE activity starts), * or the string is no longer picked (then display the * main menu again). */ disp_only_mm_animate_str: 00E4 BDF2A9 jsr $intensity_to_7F; 00E7 CE0184 ldu #MM_ANIMATE_STR; 00EA BD0ACF jsr $print_with_pick_check; 00ED 7DC89E tst $C89E; 00F0 2607 bne P00F9; 00F2 8E009B ldx #display_main_menu; 00F5 BFC8A7 stx $C8A7; 00F8 39 rts; 00F9 7AC888 P00F9: dec $C888; 00FC 2701 beq P00FF; 00FE 39 rts; 00FF 7E01D6 P00FF: jmp $start_of_animate; /* * Continue to display the SKETCH main menu item, * until either the loop counter (C888) decrements * to zero (at which point the SKETCH activity starts), * or the string is no longer picked (then display the * main menu again). */ disp_only_mm_sketch_str: 0102 BDF2A9 jsr $intensity_to_7F; 0105 CE0169 ldu #MM_SKETCH_STR; 0108 BD0ACF jsr $print_with_pick_check; 010B 7DC89E tst $C89E; 010E 2607 bne P0117; 0110 8E009B ldx #display_main_menu; 0113 BFC8A7 stx $C8A7; 0116 39 rts; 0117 7AC888 P0117: dec $C888; 011A 2701 beq P011D; 011C 39 rts; 011D 7FC8A6 P011D: clr $C8A6; /* Flag this is sketch mode */ 0120 8E0BCF ldx #start_of_sketch_connect; 0123 BFC8A7 stx $C8A7; 0126 39 rts; /* * Continue to display the CONNECT main menu item, * until either the loop counter (C888) decrements * to zero (at which point the CONNECT activity starts), * or the string is no longer picked (then display the * main menu again). */ disp_only_mm_connect_str: 0127 BDF2A9 jsr $intensity_to_7F; 012A CE0176 ldu #MM_CONNECT_STR; 012D BD0ACF jsr $print_with_pick_check; 0130 7DC89E tst $C89E; 0133 2607 bne P013C; 0135 8E009B ldx #display_main_menu; 0138 BFC8A7 stx $C8A7; 013B 39 rts; 013C 7AC888 P013C: dec $C888; 013F 2701 beq P0142; 0141 39 rts; 0142 86FF P0142: lda #0xFF; 0144 B7C8A6 sta $C8A6; /* CONNECT option */ 0147 B7C8A5 sta $C8A5; /* Do dots first */ 014A 8E0BCF ldx #start_of_sketch_connect; 014D BFC8A7 stx $C8A7; 0150 39 rts; HDR_CREATE_STR: 0151 E8 .byte 0xE8; 0152 40 .byte 0x40; 0153 7F .byte 0x7F; 0154 E8 .byte 0xE8; 0155 01 .word 0x0157; 0157 43 .byte "CREATE", 0x80; HDR_EDIT_STR: 015E E8 .byte 0xE8; 015F 40 .byte 0x40; 0160 7F .byte 0x7F; 0161 F0 .byte 0xF0; 0162 01 .word 0x0164; 0164 45 .byte "EDIT", 0x80; MM_SKETCH_STR: 0169 E0 .byte 0xE0; 016A 40 .byte 0x40; 016B 40 .byte 0x40; 016C E0 .byte 0xE0; 016D 01 .word 0x016F; 016F 53 .byte "SKETCH", 0x80; MM_CONNECT_STR: 0176 E0 .byte 0xE0; 0177 40 .byte 0x40; 0178 00 .byte 0x00; 0179 DC .byte 0xDC; 017A 01 .word 0x017C; 017C 43 .byte "CONNECT", 0x80; MM_ANIMATE_STR: 0184 E0 .byte 0xE0; 0185 40 .byte 0x40; 0186 C0 .byte 0xC0; 0187 DC .byte 0xDC; 0188 01 .word 0x018A; 018A 41 .byte "ANIMATE", 0x80; /* * This is the vector list which describes the box * which is sometimes drawn around a selected point. * The list has the following format: * * line pattern, rel y, rel x * * A line pattern of 1 signals the end. */ box: 0192 00 .byte 0x00; 0193 20 .byte 0x20; 0194 20 .byte 0x20; 0195 FF .byte 0xFF; 0196 00 .byte 0x00; 0197 C0 .byte 0xC0; 0198 FF .byte 0xFF; 0199 C0 .byte 0xC0; 019A 00 .byte 0x00; 019B FF .byte 0xFF; 019C 00 .byte 0x00; 019D 40 .byte 0x40; 019E FF .byte 0xFF; 019F 40 .byte 0x40; 01A0 00 .byte 0x00; 01A1 01 .byte 0x01; /* * am_clear_game_RAM() * * Clear to zero, the block of RAM which is used * by the Art Master game: C880 - CB7F */ am_clear_game_RAM: 01A2 8EC880 ldx #0xC880; 01A5 6F80 P01A5: clr ,x+; 01A7 8CCB80 cmpx #0xCB80; 01AA 26F9 bne P01A5; 01AC 39 rts; /* * draw_previous_frame() * * This routine gets information for the previous frame * during ANIMATE mode. It will then use the new * frame number to index into the structure starting * at C977 (the vectors for this frame), using the * following formula: * * C917 = (previous_frame_num * 64) + C977 * * Afterwards, it will draw the vectors associated with * this frame, using a small intensity, thus allowing the * user to see the previous frame he made. */ draw_previous_frame: 01AD B6C8A5 lda $C8A5; 01B0 2601 bne P01B3; 01B2 39 rts; 01B3 4A P01B3: deca; 01B4 C620 ldb #0x20; 01B6 58 aslb; 01B7 3D mul; 01B8 8EC977 ldx #0xC977; 01BB 308B leax d,x; 01BD BFC917 stx $C917; 01C0 8648 lda #0x48; 01C2 BDF2AB jsr $intensity_to_a; 01C5 BD053C jsr $draw_all_visible_lines; 01C8 BD0507 jsr $draw_points_without_pick; 01CB 39 rts; /* * select_a_frame (frame_num) * * This procedure selects a particular frame * as the active frame, and returns a pointer * to the vector list associated with that frame * in the 'x' register. At entry, the 'b' register * specifies which frame is to be selected. */ select_a_frame: 01CC 58 aslb; 01CD 8620 lda #0x20; /* " " */ 01CF 3D mul; 01D0 8EC977 ldx #0xC977; 01D3 308B leax d,x; 01D5 39 rts; /* * This is the starting point for the * ANIMATE main menu option. */ start_of_animate: 01D6 BD01A2 jsr $am_clear_game_RAM; 01D9 BD056F jsr $init_animate_variables; 01DC 7FC8A3 clr $C8A3; 01DF 7FC8A6 clr $C8A6; return_to_frame1: 01E2 7FC8A5 clr $C8A5; 01E5 CCFFFF ldd #0xFFFF; 01E8 FDC910 std $C910; 01EB 8E0224 ldx #animate_handler; 01EE BFC8A7 stx $C8A7; 01F1 39 rts; /* * advance_to_next_frame() * * This procedure first checks to see if we will be * entering a virgin frame (C8A5 == C8A6), and if we * are, then it copies the data in the current frames * vector list area into the area associated with the * next frame. In any case, the frame counter is * incremented, and if this is a virgin frame, then * C8A6 is updated to reflect the fact that we have * now advanced into a new frame. */ advance_to_next_frame: 01F2 F6C8A5 ldb $C8A5; /* If C8A5 == C8A6, then init */ 01F5 F1C8A6 cmpb $C8A6; /* the new vector list area. */ 01F8 2615 bne P020F; 01FA BD01CC jsr $select_a_frame; 01FD 5F clrb; 01FE A600 P01FE: lda 0,x; /* Copy vector list info from */ 0200 A78840 sta 0x40,x; /* current frame to new frame. */ 0203 A601 lda 1,x; 0205 A78841 sta 0x41,x; 0208 3002 leax 2,x; 020A 5C incb; 020B C120 cmpb #0x20; 020D 26EF bne P01FE; 020F 7CC8A5 P020F: inc $C8A5; /* Increment the frame counter, and */ 0212 B6C8A5 lda $C8A5; /* update C8A6 if this is a virgin */ 0215 B1C8A6 cmpa $C8A6; /* frame being entered. */ 0218 2F03 ble P021D; 021A B7C8A6 sta $C8A6; 021D 8E02C7 P021D: ldx #edit_handler; 0220 BFC8A7 stx $C8A7; 0223 39 rts; /* * animate_handler() * * This procedure is responsible for overseeing the * work done by the ANIMATE command. It is invoked * through the indirect jump location. */ animate_handler: 0224 BD0306 jsr $display_frame_num; 0227 BDF354 jsr $reset0ref; 022A 8EC977 ldx #0xC977; /* Reset pointer to the */ 022D BFC917 stx $C917; /* first frame. */ 0230 7FC914 clr $C914; 0233 BDF2A9 jsr $intensity_to_7F; 0236 BD048C jsr $find_lightpen_pick; 0239 BD053C jsr $draw_all_visible_lines; 023C BDF354 jsr $reset0ref; 023F CE0151 ldu #HDR_CREATE_STR; 0242 BD0B19 jsr $am_print_string; 0245 FCC915 ldd $C915; /* If a vector was picked, then */ 0248 1083FFFF cmpd #0xFFFF; /* highlight it, by redrawing */ 024C 271B beq P0269; /* it several times. */ 024E 1F03 tfr d,u; 0250 BD055B jsr $draw_line_between_2_points; 0253 BD055B jsr $draw_line_between_2_points; 0256 BD055B jsr $draw_line_between_2_points; 0259 7DC815 tst $C815; /* If button 4 (delete) is */ 025C 270B beq P0269; /* pressed, then remove the */ 025E 1F31 tfr u,x; /* indexes for this line from */ 0260 EC02 P0260: ldd 2,x; /* the line array. */ 0262 ED81 std ,x++; 0264 8CC90D cmpx #0xC90D; 0267 26F7 bne P0260; 0269 BD042D P0269: jsr $process_button1_and_2; 026C 4D tsta; 026D 270B beq disp_sm_erase_str; /* If button 2 was pressed, */ 026F 7DC813 tst $C813; /* then add the indexes for */ 0272 2706 beq disp_sm_erase_str; /* the line endpoints to the*/ 0274 FCC910 ldd $C910; /* line array (C8A9-C90E). */ 0277 BD057C jsr $add_a_new_line; /* * disp_sm_erase_str() * * Display the ERASE sub-menu string, while the * ANIMATE option is in CREATE mode. If the * string is picked (C89E != 0) while button 3 * is pressed (C814 != 0), then jump to the routine * which re_initializes the animate buffers and * variables; this erases the all current frames. */ disp_sm_erase_str: 027A BD03C2 jsr $check_for_move_request; 027D CE0056 ldu #SM_ERASE_STR; 0280 BD0ACF jsr $print_with_pick_check; 0283 7DC814 tst $C814; 0286 2708 beq disp_sm_next_str; 0288 7DC89E tst $C89E; 028B 2703 beq disp_sm_next_str; 028D 7E01D6 jmp $start_of_animate; /* * disp_sm_next_str() * * Display the NEXT sub-menu string, while the * ANIMATE option is in CREATE mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then advance to the next ANIMATE frame. */ disp_sm_next_str: 0290 CE006D ldu #SM_NEXT_STR; 0293 BD0ACF jsr $print_with_pick_check; 0296 7DC814 tst $C814; 0299 270F beq disp_sm_menu_str; 029B 7DC89E tst $C89E; 029E 270A beq disp_sm_menu_str; 02A0 BD01F2 jsr $advance_to_next_frame; 02A3 7FC913 clr $C913; 02A6 BD0ED8 jsr $set_up_a_misc_sound1; 02A9 39 rts; /* * disp_sm_menu_str() * * Display the MENU sub-menu string, while the * ANIMATE option is in CREATE mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then exit from ANIMATE mode, and return * to the main menu. */ disp_sm_menu_str: 02AA CE0062 ldu #SM_MENU_STR; 02AD BD0ACF jsr $print_with_pick_check; 02B0 7DC814 tst $C814; 02B3 270B beq P02C0; 02B5 7DC89E tst $C89E; 02B8 2706 beq P02C0; 02BA 8E009B ldx #display_main_menu; 02BD BFC8A7 stx $C8A7; 02C0 39 P02C0: rts; 02C1 E8 .byte 0xE8; /* height of FR string */ 02C2 40 .byte 0x40; /* width of FR string */ 02C3 7F .byte 0x7F; /* rel y of FR string */ 02C4 40 .byte 0x40; /* rel x of FR string */ 02C5 C92A .word 0xC92A; /* pointer to start of FR string */ /* * edit_handler() * * This procedure is responsible for processing the * buttons during the EDIT portion of ANIMATE mode. * It also displays the EDIT header, and the sub-menu * items (if they have not bee disabled). This is * invoked only through the indirect jump location. */ edit_handler: 02C7 7DC913 tst $C913; /* See if a background image */ 02CA 2703 beq P02CF; /* needs to be displayed. */ 02CC BD01AD jsr $draw_previous_frame; 02CF F6C8A5 P02CF: ldb $C8A5; 02D2 BD01CC jsr $select_a_frame; 02D5 BFC917 stx $C917; 02D8 BDF2A9 jsr $intensity_to_7F; 02DB F6C8A5 ldb $C8A5; 02DE BD048C jsr $find_lightpen_pick; 02E1 BD053C jsr $draw_all_visible_lines; 02E4 BD03C2 jsr $check_for_move_request; 02E7 7DC815 tst $C815; /* Check button 4 (background) */ 02EA 2703 beq P02EF; 02EC 73C913 com $C913; /* Toggle state of background flag */ 02EF 7DC812 P02EF: tst $C812; /* Check button 1 (foreground) */ 02F2 2703 beq P02F7; 02F4 73C914 com $C914; /* Toggle state of foreground flag */ 02F7 BDF354 P02F7: jsr $reset0ref; 02FA CE015E ldu #HDR_EDIT_STR; /* Display EDIT screen header */ 02FD BD0B19 jsr $am_print_string; 0300 7DC914 tst $C914; /* See if sub-menu should be displayed */ 0303 2727 beq disp_sm_menu_str2; 0305 39 rts; /* * display_frame_num() * * Display the frame number string: * * "FR #",0x80 */ display_frame_num: 0306 8646 lda #0x46; /* "F" */ 0308 C652 ldb #0x52; /* "R" */ 030A FDC92A std $C92A; 030D 8620 lda #0x20; /* " " */ 030F B7C92C sta $C92C; 0312 8680 lda #0x80; 0314 B7C92E sta $C92E; 0317 B6C8A5 lda $C8A5; 031A 8B31 adda #0x31; /* "1" */ 031C B7C92D sta $C92D; 031F CE02C1 ldu #0x02C1; 0322 BDF354 jsr $reset0ref; 0325 BDF56D jsr $delay_b_3; 0328 BD0B19 jsr $am_print_string; 032B 39 rts; /* * disp_sm_menu_str2() * * Display the MENU sub-menu string, while the * ANIMATE option is in EDIT mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then exit from ANIMATE mode, and return * to the main menu. */ disp_sm_menu_str2: 032C BD0306 jsr $display_frame_num; 032F CE0062 ldu #SM_MENU_STR; 0332 BD0ACF jsr $print_with_pick_check; 0335 7DC814 tst $C814; 0338 270C beq disp_sm_create_str; 033A 7DC89E tst $C89E; 033D 2707 beq disp_sm_create_str; 033F 8E009B ldx #display_main_menu; 0342 BFC8A7 stx $C8A7; 0345 39 P0345: rts; /* * disp_sm_create_str() * * Display the CREATE sub-menu string, while the * ANIMATE option is in EDIT mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then exit from EDIT mode, and return * to CREATE mode. */ disp_sm_create_str: 0346 CE008E ldu #SM_CREATE_STR; 0349 BD0ACF jsr $print_with_pick_check; 034C 7DC814 tst $C814; 034F 270E beq disp_sm_next_str2; 0351 7DC89E tst $C89E; 0354 2709 beq disp_sm_next_str2; 0356 CE0056 ldu #SM_ERASE_STR; 0359 FFC81C stu $C81C; 035C 7E01E2 jmp $return_to_frame1; /* * disp_sm_next_str2() * * Display the NEXT sub-menu string, while the * ANIMATE option is in EDIT mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then advance to the next frame, and * make a sound also. */ disp_sm_next_str2: 035F B6C8A5 lda $C8A5; /* Only display this label if we */ 0362 8108 cmpa #0x08; /* are not already at last frame */ 0364 271E beq disp_sm_last_str; 0366 CE006D ldu #SM_NEXT_STR; 0369 BD0ACF jsr $print_with_pick_check; 036C 7DC814 tst $C814; 036F 2713 beq disp_sm_last_str; 0371 7DC89E tst $C89E; 0374 270E beq disp_sm_last_str; 0376 B6C8A5 lda $C8A5; /* Increment the frame counter */ 0379 8108 cmpa #0x08; 037B 2707 beq disp_sm_last_str; 037D BD01F2 jsr $advance_to_next_frame; 0380 BD0ED8 jsr $set_up_a_misc_sound1; 0383 39 rts; /* * disp_sm_last_str() * * Display the LAST sub-menu string, while the * ANIMATE option is in EDIT mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then display the previous frame, and * make a sound also. */ disp_sm_last_str: 0384 7DC8A5 tst $C8A5; /* Only display this label if not */ 0387 271F beq disp_sm_play_str; /* already at first frame. */ 0389 CE0078 ldu #SM_LAST_STR; 038C BD0ACF jsr $print_with_pick_check; 038F 7DC814 tst $C814; 0392 2714 beq disp_sm_play_str; 0394 7DC89E tst $C89E; 0397 270F beq disp_sm_play_str; 0399 7DC8A5 tst $C8A5; 039C 270A beq disp_sm_play_str; 039E 7AC8A5 dec $C8A5; /* Decrement frame counter */ 03A1 CC0040 ldd #0x0040; 03A4 BD0EDB jsr $set_up_a_misc_sound2; 03A7 39 rts; /* * disp_sm_play_str() * * Display the PLAY sub-menu string, while the * ANIMATE option is in EDIT mode. If the string * is picked (C89E != 0) while button 3 is pressed * (C814 != 0), then prepare to start playing through * the current set of defined frames. */ disp_sm_play_str: 03A8 CE0083 ldu #SM_PLAY_STR; 03AB BD0ACF jsr $print_with_pick_check; 03AE 7DC814 tst $C814; 03B1 270E beq P03C1; 03B3 7DC89E tst $C89E; 03B6 2709 beq P03C1; 03B8 BD05D3 jsr $init_play_variables; 03BB 8E059C ldx #play_handler; 03BE BFC8A7 stx $C8A7; 03C1 39 P03C1: rts; /* * check_for_move_request() * * This routine is responsible for checking the state * of button 3 (move a point) during ANIMATE mode. This * is called by the CREATE and EDIT handlers, for each * pass through the handler loop. * * C912 indicates if a move request is currently active. * C90F contains index of currently picked point. * C917 points to the beginning of the vector list. * */ check_for_move_request: 03C2 B6C80F lda $C80F; /* Check for button 3 transition */ 03C5 8404 anda #0x04; /* Button 3 = move a point. */ 03C7 2604 bne process_move; 03C9 7FC912 clr $C912; 03CC 39 rts; process_move: 03CD 7DC814 tst $C814; /* See if button 3 is now pressed */ 03D0 2733 beq continue_moving_point; 03D2 7DC90F tst $C90F; /* Make sure a point is picked */ 03D5 2A04 bpl start_moving_point; 03D7 7FC912 clr $C912; 03DA 39 rts; start_moving_point: 03DB 86FF lda #0xFF; 03DD B7C912 sta $C912; /* Flag that move is active */ 03E0 CC7F81 ldd #0x7F81; 03E3 FDC897 std $C897; /* Set up new cursor movement */ 03E6 CC887F ldd #0x887F; /* limits. */ 03E9 FDC899 std $C899; 03EC F6C90F ldb $C90F; 03EF 58 aslb; 03F0 F7C89D stb $C89D; /* Save index of moving point */ 03F3 BEC917 ldx $C917; 03F6 EC85 ldd b,x; /* Get point's coordinates */ 03F8 FDC895 std $C895; 03FB CEC889 ldu #0xC889; /* Move cursor to this point */ 03FE 8EC895 ldx #0xC895; 0401 BD08ED jsr $set_cursor_structure; 0404 39 rts; continue_moving_point: 0405 7DC912 tst $C912; 0408 2601 bne update_moving_point; 040A 39 rts; update_moving_point: 040B CEC889 ldu #0xC889; /* Replace the location of */ 040E BD0901 jsr $update_cursor_position; /* the picked point */ 0411 F6C89D ldb $C89D; /* in the vector list. */ 0414 BEC917 ldx $C917; 0417 FEC889 ldu $C889; 041A EF85 stu b,x; 041C BDF354 jsr $reset0ref; 041F 1F30 tfr u,d; 0421 BD0EB2 jsr $am_move_to_d; 0424 8E0192 ldx #box; /* Draw the lightpen box */ 0427 C610 ldb #0x10; /* around the picked point */ 0429 BD07D6 jsr $draw_with_pick_check; 042C 39 rts; /* * process_button1_and_2() * * This procedure checks to see if buttons 1 or 2 are * during animate mode. If neither button is pressed, * then this routine returns without doing anything. * However, if either button is pressed, then this routine * attempts to 'locate' the lightpen. If C90F != 0xFF, * then this implies that the lightpen is already at a * known place (on an existing point); if C90F == 0xFF, * then a series of horizontal scan lines will be drawn, * until the lightpen is located, or the whole screen is * scanned. * * At entry: * (C8A3)-1 contains index of next available spot * in the vector list. * * At exit time: * 'a' register = 0 => lightpen not located. * 'a' register = FF => lightpen located, and * C910 is set to index of current point, and * C911 is set to index of previous point. */ process_button1_and_2: 042D B6C812 lda $C812; /* Check if either button 1 or */ 0430 BAC813 ora $C813; /* button 2 is pressed. */ 0433 2602 bne P0437; 0435 4F clra; /* Lightpen not located */ 0436 39 rts; 0437 B6C90F P0437: lda $C90F; /* See if the lightpen is on an */ 043A 2B0C bmi P0448; /* existing point. */ 043C F6C910 ldb $C910; /* YES it is, so save the index */ 043F F7C911 stb $C911; /* this point, and the previous */ 0442 B7C910 sta $C910; /* point the lightpen picked. */ 0445 86FF lda #0xFF; 0447 39 rts; 0448 BD0460 P0448: jsr $scan_screen_for_lightpen; 044B 4D tsta; 044C 2602 bne P0450; 044E 4F clra; /* Lightpen not located. */ 044F 39 rts; 0450 B6C910 P0450: lda $C910; /* Lightpen located, so save new */ 0453 B7C911 sta $C911; /* cursor position index, and the */ 0456 B6C8A3 lda $C8A3; /* previous lightpen position. */ 0459 4A deca; 045A B7C910 sta $C910; 045D 86FF lda #0xFF; /* Lightpen located */ 045F 39 rts; /* * scan_screen_for_lightpen() * * If the current frame is not filled, then this routine * will perform a full screen scan, in an attempt to * locate the lightpen. If the lightpen is located, then * its position is saved in the next location in the vector * list for all 9 frames. * * At entry: * C917 points to the start of the vector list. * C8A3 contains index into next available place * in the vector list. * * At exit: * 'a' = 0 if lightpen was not located. * 'a' = 0xFF if lightpen was located. */ scan_screen_for_lightpen: 0460 B6C8A3 lda $C8A3; /* See if this frame is already full */ 0463 8120 cmpa #0x20; 0465 2602 bne P0469; 0467 4F clra; 0468 39 rts; 0469 BD0721 P0469: jsr $search_screen_for_lightpen; 046C 4D tsta; 046D 2602 bne P0471; 046F 4F clra; /* Lightpen not found */ 0470 39 rts; 0471 FEC917 P0471: ldu $C917; /* Lightpen was found */ 0474 F6C8A3 ldb $C8A3; 0477 58 aslb; 0478 AFC5 stx b,u; /* Save lightpen location. */ 047A 7CC8A3 inc $C8A3; /* Increment vector list index. */ 047D 8608 lda #0x08; 047F 33C5 leau b,u; 0481 33C840 P0481: leau 0x40,u; /* Add this point to each of the */ 0484 AF40 stx 0,u; /* 8 other frames. */ 0486 4A deca; 0487 26F8 bne P0481; 0489 86FF lda #0xFF; /* Lightpen was found */ 048B 39 rts; /* * find_lightpen_pick() * * This routine draws a dot at each endpoint for every * vector currently defined in the frame vector list. * if a lightpen pick is detected when a dot is drawn, * box will be drawn around that endpoint. The cross * will be drawn at the last known cursor position. * * At entry: * C8A3 contains index of next available spot in * the vector list. * C910 contains index of last known cursor position. * * At exit: * C90F contains index of picked point; 0xFF if * no point was picked. * * Work variables: * C915 flags if a point was already picked. * C880 contains index into the vector list for the * next endpoint to check. * C881 contains index of picked point. */ find_lightpen_pick: 048C 7FC915 clr $C915; /* Clear 'point picked' flag */ 048F BDF2A9 jsr $intensity_to_7F; 0492 7FC880 clr $C880; /* Init vector list index to 0 */ 0495 86FF lda #0xFF; 0497 B7C881 sta $C881; /* Init picked point index to 0 */ 049A B6C880 P049A: lda $C880; 049D B1C8A3 cmpa $C8A3; /* See if we're at end of list */ 04A0 2607 bne check_next_endpoint; 04A2 B6C881 lda $C881; 04A5 B7C90F sta $C90F; /* Return index of picked point */ 04A8 39 rts; check_next_endpoint: 04A9 FEC917 ldu $C917; 04AC BDF354 jsr $reset0ref; 04AF F6C880 ldb $C880; 04B2 F1C910 cmpb $C910; /* Get the index for the next point */ 04B5 2619 bne P04D0; /* to be checked, and see if it equals */ 04B7 BEC8A7 ldx $C8A7; /* the index of the cursor position. */ 04BA 8C0224 cmpx #animate_handler; 04BD 2611 bne P04D0; /* If so, then draw the cross at this */ 04BF 58 aslb; /* location. */ 04C0 ECC5 ldd b,u; 04C2 BD0EB2 jsr $am_move_to_d; 04C5 8E052F ldx #cross; 04C8 C610 ldb #0x10; 04CA BD07D6 jsr $draw_with_pick_check; 04CD BDF354 jsr $reset0ref; 04D0 F6C880 P04D0: ldb $C880; 04D3 58 aslb; /* Draw dot at this endpoint, and see */ 04D4 ECC5 ldd b,u; /* if it was picked by the lightpen */ 04D6 FDC882 std $C882; 04D9 BD0EB2 jsr $am_move_to_d; 04DC 8E0A50 ldx #dot_pattern; 04DF C608 ldb #0x08; 04E1 BD07D6 jsr $draw_with_pick_check; 04E4 4D tsta; /* Check for a lightpen pick */ 04E5 261B bne P0502; 04E7 7DC915 tst $C915; /* Ignore, if previous pick occurred */ 04EA 2616 bne P0502; 04EC 7DC912 tst $C912; /* Ignore, if a move is active */ 04EF 2611 bne P0502; 04F1 8E0192 ldx #box; /* Draw a box around this endpoint */ 04F4 C610 ldb #0x10; 04F6 BD07D6 jsr $draw_with_pick_check; 04F9 F6C880 ldb $C880; 04FC F7C881 stb $C881; /* Save index of picked point. */ 04FF 7CC915 inc $C915; /* Flag that a pick occurred. */ 0502 7CC880 P0502: inc $C880; 0505 2093 bra P049A; /* Loop to next point */ /* * draw_points_without_pick() * * This routine goes through the vector list for the * current frame, and draws a dot at each endpoint. * Lightpen picks are ignored. */ draw_points_without_pick: 0507 7FC880 clr $C880; 050A B6C880 P050A: lda $C880; /* Keep processing, until we reach */ 050D B1C8A3 cmpa $C8A3; /* the end of the vector list. */ 0510 2601 bne P0513; 0512 39 rts; 0513 FEC917 P0513: ldu $C917; 0516 BDF354 jsr $reset0ref; 0519 F6C880 ldb $C880; 051C 58 aslb; 051D ECC5 ldd b,u; 051F BD0EB2 jsr $am_move_to_d; /* Move to next endpoint, and */ 0522 8E0A50 ldx #dot_pattern; /* draw a dot there. */ 0525 C608 ldb #0x08; 0527 BD07D6 jsr $draw_with_pick_check; 052A 7CC880 inc $C880; 052D 20DB bra P050A; /* * This is a set of move and draw instructions, * which result in a cross being displayed. */ cross: 052F 00 .byte 0x00; /* move */ 0530 20 .byte 0x20; 0531 00 .byte 0x00; 0532 FF .byte 0xFF; /* draw */ 0533 C0 .byte 0xC0; 0534 00 .byte 0x00; 0535 00 .byte 0x00; /* move */ 0536 20 .byte 0x20; 0537 E0 .byte 0xE0; 0538 FF .byte 0xFF; /* draw */ 0539 00 .byte 0x00; 053A 40 .byte 0x40; 053B 01 .byte 0x01; /* end of list */ /* * draw_all_visible_lines() * * This routine draws all of the visible lines in * the current animate frame. While these lines are * being drawn, any lightpen picks are saved for later * use. * * C8A9 is start of array containing indexes of * endpoints for each visible line. * * At exit: * C915 points to the index pair, in the line array * (C8A9), of the vector which was picked; 0xFFFF * if none were picked. */ draw_all_visible_lines: 053C CEC8A9 ldu #0xC8A9; /* Load addr of line index array */ 053F 8EFFFF ldx #0xFFFF; 0542 BFC915 stx $C915; /* Init picked vector pointer */ 0545 E640 P0545: ldb 0,u; 0547 2A01 bpl P054A; 0549 39 rts; 054A C17F P054A: cmpb #0x7F; 054C 2709 beq P0557; 054E BD055B jsr $draw_line_between_2_points; 0551 4D tsta; /* Check to see if a pick occurred, */ 0552 2703 beq P0557; /* and save a pointer to the endpt */ 0554 FFC915 stu $C915; /* index pair in C915, if so. */ 0557 3342 P0557: leau 2,u; 0559 20EA bra P0545; /* * draw_line_between_2_points() * * Draw a line between the 2 endpoints whose index are * pointed to by the 'u' registe. These 2 indexes are then * then used to index into the vector list array. While * drawing the line, check for a lightpen pick. * * At entry: * 'u' points to the index pairs describing the * starting and ending points for this line. * The indexes are in the following format: * (ending pt index, starting pt index) * * At exit: * 'a' = 0 => vector was not picked. * otherwise, the vector was picked. */ draw_line_between_2_points: 055B E640 ldb 0,u; 055D 58 aslb; 055E BEC917 ldx $C917; /* Load 'y' with coordinates for */ 0561 3185 leay b,x; /* line's endpoint. */ 0563 E641 ldb 1,u; 0565 58 aslb; 0566 BEC917 ldx $C917; /* Load 'x' with coordinates for */ 0569 3085 leax b,x; /* line's starting point. */ 056B BD0840 jsr $draw_vector_with_pick_check; 056E 39 rts; /* * init_animate_variables() * * This procedure initializes the block of memory * in the range C8A9-C90E to 0xFF. It is called * when ANIMATE mode is first entered. This block * of memory contains the line endpoint index pairs * for all visible lines. */ init_animate_variables: 056F 8EC8A9 ldx #0xC8A9; 0572 86FF lda #0xFF; 0574 A780 P0574: sta ,x+; 0576 8CC90F cmpx #0xC90F; 0579 26F9 bne P0574; 057B 39 rts; /* * add_a_new_line() * * This routine adds the index pairs describing the * starting and ending points for a line, to the line * endpoint array, at C8A9-C90C. If either of the * indexes is 0xFF, or if the indexes are the same, then * this point is not added to the array. The indexes are * added to the next available location. * * At entry: * a = ending point index * b = starting point index * */ add_a_new_line: 057C 8EC8A9 ldx #0xC8A9; 057F 8CC90D P057F: cmpx #0xC90D; /* Don't bother, if array */ 0582 2601 bne P0585; /* is full. */ 0584 39 P0584: rts; 0585 4D P0585: tsta; /* Verify that this is a */ 0586 2BFC bmi P0584; /* valid set of endpoint */ 0588 5D tstb; /* indexes. */ 0589 2BF9 bmi P0584; 058B 3404 pshs b; 058D A1E0 cmpa ,s+; 058F 27F3 beq P0584; 0591 6D00 tst 0,x; /* See if spot is empty */ 0593 2A03 bpl P0598; 0595 ED00 std 0,x; 0597 39 rts; 0598 3002 P0598: leax 2,x; /* Spot is taken, go onto */ 059A 20E3 bra P057F; /* next entry location. */ /* * play_handler() * * This is the start of the PLAY command handler. * It will cause all currently defined ANIMATE * frames to be played in succession. */ play_handler: 059C B6C91D lda $C91D; /* See if the current frame's */ 059F B1C91E cmpa $C91E; /* display duration has been */ 05A2 2606 bne P05AA; /* reached. */ 05A4 7FC91D clr $C91D; /* Reset duration counter, & goto */ 05A7 BD064A jsr $get_ptrs_to_playback_frames; /* next frame. */ 05AA BD06A9 P05AA: jsr $fill_playback_buffer; /* Display playback buf. */ 05AD 8EC933 ldx #0xC933; 05B0 BFC917 stx $C917; 05B3 BDF2A9 jsr $intensity_to_7F; 05B6 BD053C jsr $draw_all_visible_lines; 05B9 BD0507 jsr $draw_points_without_pick; 05BC 7CC91D inc $C91D; /* Increment duration counter */ 05BF BD05E8 jsr $check_playback_speed_buttons; 05C2 BDF354 jsr $reset0ref; 05C5 B6C80F lda $C80F; /* If button 1 or 2 is pressed, */ 05C8 8403 anda #0x03; /* then enter the EDIT portion */ 05CA 2706 beq P05D2; /* of the ANIMATE code. */ 05CC 8E02C7 ldx #edit_handler; 05CF BFC8A7 stx $C8A7; 05D2 39 P05D2: rts; /* * init_play_variables() * * This routine is invoked when the user initiates * an animate 'PLAY' request. It will initialize * some of the globals used by the PLAY routines. */ init_play_variables: 05D3 7FC91D clr $C91D; /* Clear frame duration counter. */ 05D6 8604 lda #0x04; 05D8 B7C929 sta $C929; /* Set default playback speed. */ 05DB BD061D jsr $update_playback_variables; 05DE 7FC920 clr $C920; /* Set up to display 1st frame. */ 05E1 7FC921 clr $C921; /* Direction flag:0=>frwd,1=>bckwd */ 05E4 BD064A jsr $get_ptrs_to_playback_frames; 05E7 39 rts; /* * check_playback_speed_buttons() * * This routine monitors buttons 3 (slow) and * 4 (fast) during the PLAY mode portion of the * animate option. The current playback speed is * kept in C929; 0 = fastest, 7 = slowest. */ check_playback_speed_buttons: 05E8 7DC814 tst $C814; 05EB 2606 bne decrease_playback_speed; 05ED 7DC815 tst $C815; 05F0 2617 bne increase_playback_speed; 05F2 39 rts; /* * decrease_playback_speed() * * Decrease the playback speed (by incrementing C929) */ decrease_playback_speed: 05F3 B6C929 lda $C929; 05F6 8107 cmpa #0x07; 05F8 2601 bne P05FB; 05FA 39 rts; 05FB 7CC929 P05FB: inc $C929; 05FE B6C91D lda $C91D; 0601 48 asla; /* Increase duration counter for */ 0602 B7C91D sta $C91D; /* this frame. */ 0605 BD061D jsr $update_playback_variables; 0608 39 rts; /* * increase_playback_speed() * * Increase the playback speed (by decrementing C929) */ increase_playback_speed: 0609 7DC929 tst $C929; 060C 2601 bne P060F; 060E 39 rts; 060F 7AC929 P060F: dec $C929; 0612 B6C91D lda $C91D; 0615 47 ASRA; /* Decrease duration counter */ 0616 B7C91D sta $C91D; /* for this frame. */ 0619 BD061D jsr $update_playback_variables; 061C 39 rts; /* * update_playback_variables() * * This routine uses the current playback speed, in C929, * to index into the structure at 0632 (playback_speed_info). * From this structure, two values are obtained: a 1 byte bit * pattern, and a two byte jump address. These two * values are used by the playback routines. */ update_playback_variables: 061D 8E0632 ldx #playback_speed_info; 0620 F6C929 ldb $C929; 0623 8603 lda #0x03; 0625 3D mul; 0626 3A abx; 0627 A680 lda ,x+; 0629 B7C91E sta $C91E; 062C EC81 ldd ,x++; 062E FDC922 std $C922; 0631 39 rts; /* * Table with the following format: * * 1 byte value * 2 byte subroutine address. * * The information here is used during the PLAY * mode of ANIMATE. The playback speed (in C929) * is used to index into this structure. An index * of 7 is for slowest playback, and an index of 0 * is for fastest playback. */ playback_speed_info: 0632 01 .byte 0x01; 0633 07 .word 0x0720; 0635 02 .byte 0x02; 0636 07 .word 0x071E; 0638 04 .byte 0x04; 0639 07 .word 0x071C; 063B 08 .byte 0x08; 063C 07 .word 0x071A; 063E 10 .byte 0x10; 063F 07 .word 0x0718; 0641 20 .byte 0x20; 0642 07 .word 0x0716; 0644 40 .byte 0x40; 0645 07 .word 0x0714; 0647 80 .byte 0x80; 0648 07 .word 0x0712; /* * get_ptrs_to_playback_frames() * * This routine is used during the playback mode portion * of animate. If loads C924 with a pointer to the * frame buffer for the current buffer, and C926 with a * a pointer to the frame buffer for the next buffer to * be displayed. It will then increment the buffer index, * in C920. * * At entry: * C920 contains the index of the current frame. * * At exit: * C920 is incremented to index next frame. * C924 points to frame buffer for current frame. * C926 points to frame buffer for next frame. * */ get_ptrs_to_playback_frames: 064A B6C920 lda $C920; /* Load index of current frame. */ 064D B7C91F sta $C91F; 0650 BD067F jsr $update_play_index_to_next_frame; 0653 8E0669 ldx #frame_buf_pointers; 0656 B6C91F lda $C91F; 0659 48 asla; 065A EC86 ldd a,x; /* Load C924 with ptr to frame buf */ 065C FDC924 std $C924; /* for the current frame. */ 065F B6C920 lda $C920; 0662 48 asla; 0663 EC86 ldd a,x; /* Load C926 with ptr to frame buf */ 0665 FDC926 std $C926; /* for the next frame. */ 0668 39 rts; /* * This is an array of word pointers. These point * to the beginning of the buffer area associated * with each of the animate frames. Each frame is * 64 bytes long. */ frame_buf_pointers: 0669 C9 .word 0xC977; 066B C9 .word 0xC9B7; 066D C9 .word 0xC9F7; 066F CA .word 0xCA37; 0671 CA .word 0xCA77; 0673 CA .word 0xCAB7; 0675 CA .word 0xCAF7; 0677 CB .word 0xCB37; 0679 CB .word 0xCB77; 067B CB .word 0xCBB7; 067D CB .word 0xCBF7; /* * update_play_index_to_next_frame() * * This routine updates the frame index (C920), * to index the next frame to be displayed. If we * are currently displaying in the forward direction, * then this will be incremented. If we are currently * displaying in the backward direction, then this will * be decremented. If we reach the first/last frame, * then the direction will be changed. */ update_play_index_to_next_frame: 067F 7DC921 tst $C921; /* Check 4 frwd/bkwd display order. */ 0682 2615 bne backward_order; 0684 B6C920 lda $C920; /* Increment, if not at last frame. */ 0687 B1C8A6 cmpa $C8A6; 068A 2704 beq start_backwards; 068C 7CC920 inc $C920; 068F 39 rts; start_backwards: 0690 86FF lda #0xFF; /* Set direction flag to 'backwards'. */ 0692 B7C921 sta $C921; 0695 7AC920 dec $C920; /* Decrement to previous frame. */ 0698 39 rts; backward_order: 0699 7DC920 tst $C920; /* Decrement, if not at first frame. */ 069C 2704 beq start_forward; 069E 7AC920 dec $C920; 06A1 39 rts; start_forward 06A2 7FC921 clr $C921; /* Set direction flag to 'forwards'. */ 06A5 7CC920 inc $C920; /* Increment to next frame. */ 06A8 39 rts; /* * fill_playback_buffer() * * This routine fills the playback buffer (C933-????) * with the (y,x) coordinate pairs for the currently * visible frame. It does this by taking each coordinate * in the current frame, and the corresponding coordinate * in the next frame, and doing some sort of extrapolation * on them, to end up with the final endpoint. * * At entry: * C924 points to frame buffer for current frame. * C926 points to frame buffer for next frame. * C933 is start of playback buffer. * C8A3 specifies number of defined points in a frame. * */ fill_playback_buffer: 06A9 BEC924 ldx $C924; /* Pointer to current frame. */ 06AC 10BEC926 ldy $C926; /* Ptr to next (transition) frame. */ 06B0 CEC933 ldu #0xC933; /* Addr of playback buffer. */ 06B3 B6C8A3 lda $C8A3; /* # of points in frame buffer. */ 06B6 B7C880 sta $C880; 06B9 7DC880 P06B9: tst $C880; 06BC 271D beq P06DB; 06BE A680 lda ,x+; /* Load both 'y' coordinates. */ 06C0 E6A0 ldb ,y+; 06C2 FDC82E std $C82E; 06C5 BD06DC jsr $merge_coordinates; 06C8 E7C0 stb ,u+; /* Save final 'y' coordinate. */ 06CA A680 lda ,x+; /* Load both 'x' coordinates. */ 06CC E6A0 ldb ,y+; 06CE FDC82E std $C82E; 06D1 BD06DC jsr $merge_coordinates; 06D4 E7C0 stb ,u+; /* Save final 'x' coordinate. */ 06D6 7AC880 dec $C880; 06D9 20DE bra P06B9; 06DB 39 P06DB: rts; /* * merge_coordinates() * * This routine takes a pair of coordinates (2 'x' or * 2 'y') and extrapolates a new value. This new coordinate * is what is displayed by the playback routine. * * At entry: * C82E has coordinate for current frame. * C82F has coordinate for next frame. * * At exit: * 'b' contains modified coordinate. */ merge_coordinates: 06DC F6C82E ldb $C82E; /* Get coord for current frame. */ 06DF 1D sex; 06E0 3406 pshs a,b; 06E2 F6C82F ldb $C82F; /* Get coord for next frame. */ 06E5 1D sex; 06E6 A3E1 subd ,s++; 06E8 2A17 bpl P0701; 06EA 50 negb; 06EB B6C91D lda $C91D; 06EE 3D mul; 06EF AD9FC922 jsr [0xC922]; 06F3 43 coma; 06F4 53 comb; 06F5 C30001 addd #0x0001; 06F8 3406 pshs a,b; 06FA F6C82E ldb $C82E; 06FD 1D sex; 06FE E3E1 addd ,s++; 0700 39 rts; 0701 B6C91D P0701: lda $C91D; 0704 3D mul; 0705 AD9FC922 jsr [0xC922]; 0709 3406 pshs a,b; 070B F6C82E ldb $C82E; 070E 1D sex; 070F E3E1 addd ,s++; 0711 39 rts; 0712 47 P0712: ASRA; 0713 56 rorb; 0714 47 P0714: ASRA; 0715 56 rorb; 0716 47 P0716: ASRA; 0717 56 rorb; 0718 47 P0718: ASRA; 0719 56 rorb; 071A 47 P071A: ASRA; 071B 56 rorb; 071C 47 P071C: ASRA; 071D 56 rorb; 071E 47 P071E: ASRA; 071F 56 rorb; 0720 39 P0720: rts; /* * search_screen_for_lightpen() * * This routine attempts to locate the location of the * lightpen, by drawing a series of horizontal scan lines. * Starting from the bottom of the display, a series of * lines are drawn, until either a lightpen pick occurs, * or the last scan line is drawn. If a lightpen pick * occurs, then that particular scan line will again be * drawn, only this time, interrupts will be enabled, so * that the exact location of the pick can be determined. * * At exit: * 'a' = 0 if lightpen was not located. * 'a' = 0xFF if lightpen was located. * * Work variables: * C881 contains the number of scan lines left to draw. * C882-C883 contain starting point for next scan line. */ search_screen_for_lightpen: 0721 867A lda #0x7A; 0723 B7C881 sta $C881; /* Init # of scan lines to draw */ 0726 CC8880 ldd #0x8880; 0729 FDC882 std $C882; /* Init start pt for first scan line */ 072C 7DC881 P072C: tst $C881; 072F 2605 bne draw_scan_line; 0731 BDF354 jsr $reset0ref; 0734 4F clra; /* If we make it to here, then the */ 0735 39 rts; /* lightpen was not found. */ draw_scan_line: 0736 BDF354 jsr $reset0ref; 0739 FCC882 ldd $C882; /* Move to start of scan line */ 073C BDF2FC jsr $move_pen7F_to_d; 073F 0F01 clr 0x01; 0741 0F00 clr 0x00; 0743 C6FF ldb #0xFF; 0745 D704 stb 0x04; 0747 0C00 inc 0x00; 0749 867F lda #0x7F; 074B 9701 sta 0x01; 074D CCFF40 ldd #0xFF40; 0750 970A sta 0x0A; /* Use solid line pattern. */ 0752 0F05 clr 0x05; 0754 D50D P0754: bitb 0x0D; 0756 27FC beq P0754; 0758 0F0A clr 0x0A; 075A 8602 lda #0x02; /* Check for a lightpen pick */ 075C 950D bita 0x0D; 075E 260D bne find_point_of_intersection; 0760 7AC881 dec $C881; /* No lightpen pick, so continue */ 0763 B6C882 lda $C882; /* to draw the next scan line. */ 0766 8B02 adda #0x02; /* Draw on everyother horz line. */ 0768 B7C882 sta $C882; 076B 20BF bra P072C; /* * find_point_of_intersection() * * This routine is responsible for locating the exact * location of the lightpen, after a pick has occurred * while a scan line was being drawn. It does this in * the following manner: * * The pen is moved back to the start of the previous * scan line, and lightpen interrupts are enabled. * Next, the scan line is redrawn; while this is going * on, a timing (counter) loop is executed. If the * timing loop completes, then it implies that the * lightpen was not located; interrupts will be disabled, * and control will return to the procedure which had * originally invoked the scan line routine. * However, if the lightpen interrupts, then the timing * loop is interrupted, and the ISR handling routine is * called. This handler will calculate the exact location * of the lightpen, using the value in the counter. If * an interrupt occurs, control will never return to * this routine; control returns directly to the routine * which had invoked the scan line routine. The location * of the 'pick' is returned in the 'x' register. */ find_point_of_intersection: 076D BDF354 jsr $reset0ref; 0770 FCC882 ldd $C882; /* Move to start of scan line */ 0773 BDF2FC jsr $move_pen7F_to_d; 0776 1CEF andcc #0xEF; /* Enable IRQ on 6809 */ 0778 8682 lda #0x82; /* Enable CA1 on PIA */ 077A 970E sta 0x0E; 077C 867E lda #0x7E; /* Set up IRQ handler */ 077E B7CBF8 sta $CBF8; 0781 CC07CE ldd #ISR_handler; 0784 FDCBF9 std $CBF9; 0787 0F01 clr 0x01; /* Redraw the scan line */ 0789 0F00 clr 0x00; 078B 0F04 clr 0x04; 078D 12 nop; 078E 0C00 inc 0x00; 0790 8620 lda #0x20; 0792 9701 sta 0x01; 0794 86FF lda #0xFF; 0796 970A sta 0x0A; 0798 C67F ldb #0x7F; 079A 8605 lda #0x05; 079C 9705 sta 0x05; 079E 5A P079E: decb; /* Wait for interrupt; counter loop */ 079F 21FD brn P079E; 07A1 26FB bne P079E; 07A3 0F05 clr 0x05; 07A5 BD07AA jsr $disable_interrupts; 07A8 4F clra; /* Lightpen not found */ 07A9 39 rts; /* * disable_interrupts() * * This routine is responsible for disabling lightpen * interrupts. */ 07AA 4F clra; 07AB 970E sta 0x0E; /* Disable CA1 on PIA */ 07AD 9701 sta 0x01; 07AF 970D sta 0x0D; 07B1 1A10 orcc #0x10; /* Disable IRQ on 6809 */ 07B3 BDF354 jsr $reset0ref; 07B6 39 rts; /* * process_ISR() * * This procedure performs most of the work involved, * whenever the lightpen generates an interrupt. It * uses the counter value, in the 'b' register, to * calculate the x coordinate of the lightpen. The * intersection point is returned in the 'x' register. * This routine returns to the routine which invoked * the scan line search routine. */ process_ISR: 07B7 030A com 0x0A; 07B9 0F05 clr 0x05; 07BB C07F subb #0x7F; /* Calculate x coordinate */ 07BD 50 negb; 07BE 58 aslb; 07BF 1D sex; 07C0 830080 subd #0x0080; 07C3 B6C882 lda $C882; /* Retrieve y coordinate */ 07C6 1F01 tfr d,x; 07C8 BD07AA jsr $disable_interrupts; 07CB 86FF lda #0xFF; /* Lightpen found */ 07CD 39 rts; /* * ISR_handler() * * This is the entry point called by the OS, whenever the * lightpen generates an IRQ interrupt. This procedure * discards the 12 bytes of saved state information * placed on the stack by the 6809, including the return * address for the interrupted routine. Then it calls the * process_ISR() routine, to process the IRQ request. */ ISR_handler: 07CE 030A com 0x0A; 07D0 326C leas 12,s; 07D2 7E07B7 jmp $process_ISR; 07D5 12 .byte 0x12; /* * draw_with_pick_check(vector_list, scale) * * This procedure will perform a series of move and * draw requests, as specified in the passed in vector * list. The vector list must have the following format: * * mode, rel y, rel x * | | | * | | relative x position * | relative y positon * FF - draw * 0 - move * 1 - end o list * * NOTE: the mode also acts as the line pattern. * * At entry: 'x' contains pointer to the vector list. * 'b' contains the scale factor to be used. * * At exit: 'a' contains the index of the point being * drawn when the lightpen detected a pick. * 0xFF if no pick occurred. */ draw_with_pick_check: 07D6 6F7F clr -1,s; /* Temporary storage of current pt # */ 07D8 86FF lda #0xFF; 07DA A77E sta -2,s; /* Temporary storage of last pt picked */ 07DC D704 stb 0x04; 07DE EC01 P07DE: ldd 1,x; 07E0 9701 sta 0x01; /* Set rel y position. */ 07E2 0F00 clr 0x00; 07E4 A600 lda 0,x; /* Get the mode. */ 07E6 3003 leax 3,x; /* Increment ptr to next entry. */ 07E8 0C00 inc 0x00; 07EA D701 stb 0x01; /* Set rel x position. */ 07EC 970A sta 0x0A; /* Set line pattern. */ 07EE 0F05 clr 0x05; 07F0 CC0040 ldd #0x0040; 07F3 D50D P07F3: bitb 0x0D; 07F5 27FC beq P07F3; 07F7 1E11 exg x,x; 07F9 970A sta 0x0A; 07FB 960D lda 0x0D; /* Check for a lightpen pick */ 07FD 8402 anda #0x02; 07FF 2704 beq P0805; 0801 A67F lda -1,s; 0803 A77E sta -2,s; /* Save the current pt #. */ 0805 6C7F P0805: inc -1,s; /* Increment the current pt # */ 0807 A600 lda 0,x; 0809 2FD3 ble P07DE; 080B A67E lda -2,s; /* Return index if any pt picked. */ 080D 39 rts; /* * This routine appears to not be used anywhere!! */ 080E A77E P080E: sta -2,s; 0810 6F7F clr -1,s; 0812 D704 stb 0x04; 0814 EC01 P0814: ldd 1,x; 0816 9701 sta 0x01; 0818 0F00 clr 0x00; 081A A600 lda 0,x; 081C 3003 leax 3,x; 081E 0C00 inc 0x00; 0820 D701 stb 0x01; 0822 E67E ldb -2,s; 0824 E17F cmpb -1,s; 0826 2702 beq P082A; 0828 5F clrb; 0829 4F clra; 082A 970A P082A: sta 0x0A; 082C 0F05 clr 0x05; 082E CC0040 ldd #0x0040; 0831 D50D P0831: bitb 0x0D; 0833 27FC beq P0831; 0835 1E11 exg x,x; 0837 970A sta 0x0A; 0839 6C7F inc -1,s; 083B A600 lda 0,x; 083D 2FD5 ble P0814; 083F 39 rts; /* * draw_vector_with_pick_check() * * This routine draws a vector, starting at (y,x) endpoint * pointed to by the 'x' register, to the (y,x) endpoint * pointed to by the 'y' register. A value is returned * which indicates whether or not a lightpen pick occurred * while the vector was being drawn. * * At entry: * 'x' points to (y,x) pair for starting point. * 'y' points to (y,x) pair for ending point. * * At exit: * 'a' = 0 => no pick * otherwise a pick occurred. */ draw_vector_with_pick_check: 0840 BDF354 jsr $reset0ref; 0843 86FF lda #0xFF; 0845 B7C880 sta $C880; 0848 8601 lda #0x01; 084A B7C883 sta $C883; 084D A600 lda 0,x; /* Move to starting point */ 084F 9701 sta 0x01; 0851 0F00 clr 0x00; 0853 A601 lda 1,x; 0855 C67F ldb #0x7F; 0857 D704 stb 0x04; 0859 C6CE ldb #0xCE; 085B D70C stb 0x0C; 085D 0C00 inc 0x00; 085F 9701 sta 0x01; 0861 0F05 clr 0x05; 0863 BD0879 jsr $calculate_vector_endpoint; 0866 8E08E7 ldx #am_scale_factors; 0869 E685 ldb b,x; 086B 8640 lda #0x40; 086D 950D P086D: bita 0x0D; 086F 27FC beq P086D; 0871 8EC880 ldx #0xC880; 0874 BD07D6 jsr $draw_with_pick_check; 0877 43 coma; 0878 39 rts; /* * calculate_vector_endpoint() * * This routine takes an absolute starting point, and an * absolute ending point, and calculates the relative * (y,x) pair for the vector between these two points. * It also returns an index into the scale factor array, * indicating which scale factor should be used when * drawing the vector. * * At entry: * 'y' points to (y,x) endpoint. * 'x' points to (y,x) starting point. * * At exit: * C881-C882 contain relative (y,x) endpoint. * 'b' contains the index of the scale factor to use. */ calculate_vector_endpoint: 0879 A620 lda 0,y; /* Determine delta y. */ 087B A000 suba 0,x; 087D 10290039 lbvs P08BA; 0881 E621 ldb 1,y; /* Determine delta x. */ 0883 E001 subb 1,x; 0885 10290031 lbvs P08BA; 0889 FDC881 std $C881; 088C BDF584 jsr $get_absolute_value_of_ab; 088F 3404 pshs b; 0891 A1E0 cmpa ,s+; 0893 2402 bhs P0897; 0895 1F98 tfr b,a; 0897 813F P0897: cmpa #0x3F; 0899 2303 bls P089E; 089B C602 ldb #0x02; 089D 39 rts; 089E 811F P089E: cmpa #0x1F; 08A0 230B bls P08AD; 08A2 FCC881 ldd $C881; 08A5 48 asla; 08A6 58 aslb; 08A7 FDC881 std $C881; 08AA C603 ldb #0x03; 08AC 39 rts; 08AD FCC881 P08AD: ldd $C881; 08B0 48 asla; 08B1 48 asla; 08B2 58 aslb; 08B3 58 aslb; 08B4 FDC881 std $C881; 08B7 C604 ldb #0x04; 08B9 39 rts; 08BA E600 P08BA: ldb 0,x; 08BC 1D sex; 08BD 3406 pshs a,b; 08BF E620 ldb 0,y; 08C1 1D sex; 08C2 A3E1 subd ,s++; 08C4 3406 pshs a,b; 08C6 E601 ldb 1,x; 08C8 1D sex; 08C9 3406 pshs a,b; 08CB E621 ldb 1,y; 08CD 1D sex; 08CE A3E1 subd ,s++; 08D0 44 lsra; 08D1 56 rorb; 08D2 1F01 tfr d,x; 08D4 3506 puls a,b; 08D6 44 lsra; 08D7 56 rorb; 08D8 1F02 tfr d,y; 08DA 1F20 tfr y,d; 08DC F7C881 stb $C881; 08DF 1F10 tfr x,d; 08E1 F7C882 stb $C882; 08E4 C601 ldb #0x01; 08E6 39 rts; am_scale_factors: 08E7 00 .byte 0x00; 08E8 FF .byte 0xFF; 08E9 7F .byte 0x7F; 08EA 3E .byte 0x3E; 08EB 1E .byte 0x1E; 08EC 0D .byte 0x0D; /* * set_cursor_structure (cursor_ptr, data_ptr) * * This routine appears to copy the data pointer to * by the 'x' register into the cursor structure, which * is pointed to by the 'u' register. * The cursor struct is 12 bytes long, and is laid out * as follows: * * ************************ * * cursor rel y pos * * ************************ * * cursor rel x pos * * ************************ * * found this pass flag * * ************************\ * * cursor y delta * \ * ************************ > Used when moving cursor * * cursor x delta * / to follow light pen * ************************/ * * found last pass flag * * ************************ * * max y position * * ************************ * * min x position * * ************************ * * min y position * * ************************ * * max x position * * ************************ * * ptr to line pattern * * ** array used when ** * * drawing search webs * * ************************ */ set_cursor_structure: 08ED EC81 ldd ,x++; 08EF ED40 std 0,u; 08F1 EC81 ldd ,x++; 08F3 ED46 std 6,u; 08F5 EC81 ldd ,x++; 08F7 ED48 std 8,u; 08F9 CC0A54 ldd #whole_search_pattern; 08FC ED4A std 10,u; 08FE 6F45 clr 5,u; 0900 39 rts; /* * update_cursor_position() * * This routine attempts to move the cursor so that * it 'stays' with the lightpen. First, it sees if * the lightpen is still within 'sight' of the cursor. * This is done by draw a series of 'spider web' patterns, * until the lightpen is found, or the max web is drawn. * Then it takes the deltas calculated by the search routine, * adds them to the current cursor position, performs some * bounds checks, and updates the line patterns used when * drawing the search webs. */ update_cursor_position: 0901 BD0984 jsr $find_lightpen; /* Try to find lightpen. */ 0904 A642 lda 2,u; /* Proceed only if the lightpen */ 0906 81FF cmpa #0xFF; /* is currently at the cursor. */ 0908 2679 bne P0983; 090A E640 ldb 0,u; /* Get y position, & extend to 16 bits */ 090C 1D sex; 090D 3406 pshs a,b; 090F E643 ldb 3,u; /* Get new y delta */ 0911 1D sex; 0912 E3E1 addd ,s++; /* Add together */ 0914 3406 pshs a,b; 0916 E646 ldb 6,u; /* Compare new coordinate to max y */ 0918 1D sex; /* value. Use max y value, if new */ 0919 10A360 cmpd 0,s; /* coordinate is too big. */ 091C 2E0D bgt P092B; 091E 3262 leas 2,s; 0920 8E0A5E ldx #lower_search_pattern; 0923 AF4A stx 10,u; /* Use lower search pattern */ 0925 A646 lda 6,u; 0927 A740 sta 0,u; 0929 201E bra P0949; 092B E648 P092B: ldb 8,u; /* Compare new coordinate to min y */ 092D 1D sex; /* value. Use min y value if new */ 092E 10A360 cmpd 0,s; /* cordinate is too small. */ 0931 2D0D blt P0940; 0933 3262 leas 2,s; 0935 8E0A68 ldx #upper_search_pattern; 0938 AF4A stx 10,u; /* Use upper search pattern */ 093A A648 lda 8,u; 093C A740 sta 0,u; 093E 2009 bra P0949; 0940 ECE1 P0940: ldd ,s++; /* Save new y coordinate in the */ 0942 E740 stb 0,u; /* cursor structure. */ 0944 8E0A54 ldx #whole_search_pattern; 0947 AF4A stx 10,u; /* Use whole search pattern. */ 0949 E641 P0949: ldb 1,u; /* Load current x coordinate, and */ 094B 1D sex; /* extend it to 16 bits. */ 094C 3406 pshs a,b; 094E E644 ldb 4,u; 0950 1D sex; 0951 E3E1 addd ,s++; /* Add the new x delta. */ 0953 3406 pshs a,b; 0955 E649 ldb 9,u; /* Compare new x coordinate to max x */ 0957 1D sex; /* value. Use max value if new coord */ 0958 10A360 cmpd 0,s; /* is too big. */ 095B 2E0D bgt P096A; 095D 3262 leas 2,s; 095F 8E0A7C ldx #left_search_pattern; 0962 AF4A stx 10,u; /* Use left search pattern */ 0964 A649 lda 9,u; 0966 A741 sta 1,u; 0968 2019 bra P0983; 096A E647 P096A: ldb 7,u; /* Compare new coordinate to min x */ 096C 1D sex; /* value. Use min value, if new */ 096D 10A360 cmpd 0,s; /* coordinate is too small. */ 0970 2D0D blt P097F; 0972 3262 leas 2,s; 0974 8E0A72 ldx #right_search_pattern; 0977 AF4A stx 10,u; /* Use right search pattern */ 0979 A647 lda 7,u; 097B A741 sta 1,u; 097D 2004 bra P0983; 097F ECE1 P097F: ldd ,s++; /* Save new x coordinate */ 0981 E741 stb 1,u; 0983 39 P0983: rts; /* * find_lightpen() * * This routine is used by a portion of the animate code * to locate the lightpen, so that the cursor may track * it. It does this in the following manner: * * Firstly, it moves to the last known location of * the cursor, and draws a dot. It a lightpen pick * occurs, then no further searching is needed; the * lightpen has not moved. However, if the lightpen * has moved, then we must perform a more extensive * search. However, if the lightpen was not found * the last time we searched for it, then we won't * bother searching for it now; we don't want to * continually clutter the screen with our search * patterns! * * Secondly, we will draw a series of ever increasing * 8 sided spider webs. If, while drawing one of these * search patterns, a lightpen pick is detected, then * we will determine which vector of the pattern was * picked, and we will calculate a cursor movement * delta dependent upon the scale factor used and the * vector picked. * * Depending upon the vector picked, the base delta * value will be either -1, 0, or +1. This will then * be multiplied by a scale value, which is obtained * by using the scale factor index to index into a * multiplier array. The new deltas are saved in the * cursor structure. */ find_lightpen: 0984 6F42 clr 2,u; /* Clear "found this pass" flag */ 0986 BDF2A9 jsr $intensity_to_7F; 0989 BDF354 jsr $reset0ref; 098C EC40 ldd 0,u; /* Move to last known location */ 098E BDF2FC jsr $move_pen7F_to_d; 0991 8E0A50 ldx #dot_pattern; /* Draw a dot; check for pick */ 0994 C604 ldb #0x04; 0996 BD07D6 jsr $draw_with_pick_check; 0999 4D tsta; 099A 2607 bne search_4_lightpen; 099C 6C42 inc 2,u; /* Lightpen was found */ 099E 86FF lda #0xFF; 09A0 A745 sta 5,u; 09A2 39 rts; search_4_lightpen: 09A3 6D45 tst 5,u; /* Don't bother searching if lightpen */ 09A5 2601 bne continue_lightpen_search; /* wasn't found */ 09A7 39 rts; /* last pass. */ continue_lightpen_search: 09A8 BDF354 jsr $reset0ref; /* Draw the spider web, with an */ 09AB 8E0A86 ldx #small_search_pattern_vl; /* increasing scale */ 09AE A642 lda 2,u; /* factor, until either the light */ 09B0 8104 cmpa #0x04; /* pen is found, or the last scale */ 09B2 2D03 blt P09B7; /* factor is reached. */ 09B4 8E0A98 ldx #large_search_pattern_vl; 09B7 EC40 P09B7: ldd 0,u; 09B9 BDF2FC jsr $move_pen7F_to_d; 09BC 108E0AC4 ldy #search_pattern_scale_factors; 09C0 A642 lda 2,u; 09C2 E6A6 ldb a,y; 09C4 2608 bne draw_search_pattern; 09C6 BDF354 jsr $reset0ref; 09C9 6F42 clr 2,u; /* Flag that cursor is 'lost' */ 09CB 6F45 clr 5,u; /* to the lightpen. */ 09CD 39 rts; draw_search_pattern: 09CE 10AE4A ldy 10,u; /* Get line pattern array pointer */ 09D1 BD0A13 jsr $display_search_pattern; 09D4 81FF cmpa #0xFF; /* Check for a pick. */ 09D6 2604 bne lightpen_found; 09D8 6C42 inc 2,u; /* Increment the scale factor. */ 09DA 20C7 bra search_4_lightpen; lightpen_found: 09DC 8E0AAA ldx #cursor_deltas; 09DF 4A deca; /* Decrement the index of the picked */ 09E0 48 asla; /* point, & convert to word index. */ 09E1 EC86 ldd a,x; /* Load x & y delta values, and save */ 09E3 ED43 std 3,u; /* in the cursor structure. */ 09E5 8E0ABA ldx #delta_multipliers; 09E8 E642 ldb 2,u; /* Use the scale factor index to get */ 09EA A685 lda b,x; /* the correct delta multiplier. */ 09EC 3402 pshs a; 09EE E643 ldb 3,u; /* Generate new y delta. */ 09F0 BD0A05 jsr $generate_new_cursor_coordinate; 09F3 E743 stb 3,u; 09F5 3502 puls a; 09F7 E644 ldb 4,u; /* Generate new x delta. */ 09F9 BD0A05 jsr $generate_new_cursor_coordinate; 09FC E744 stb 4,u; 09FE 86FF lda #0xFF; /* Flag that the cursor is picked */ 0A00 A742 sta 2,u; 0A02 A745 sta 5,u; 0A04 39 rts; /* * generate_new_cursor_coordinate() * * This routine calulates the new cursor delta, * by multiplying a delta value (-1, 0, +1) by * a scale multiplier. * * At entry: * 'b' = coordinate delta. * 'a' = scale multiplier. */ generate_new_cursor_coordinate: 0A05 3404 pshs b; 0A07 5D tstb; 0A08 2A01 bpl P0A0B; 0A0A 50 negb; 0A0B 3D P0A0B: mul; 0A0C 3502 puls a; 0A0E 4D tsta; 0A0F 2A01 bpl P0A12; 0A11 50 negb; 0A12 39 P0A12: rts; /* * display_search_pattern() * * This routine draws the series of vectors, specified in * the structure pointed to by they 'x' register. The 'y' * 'y' register points to an array of line patterns * associated with each vector. The scale factor to be used * is specified in 'b'. A pattern of '1' terminates this * routine. If a pick is detected, then the index of the * vector being drawn is returned in the 'a' register; * if no pick occurred, then 0xFF is returned. This is used * when drawing the spider web search patterns. * * At entry: * 'b' = scale factor * 'x' = vector list ptr (rel y, rel x) * 'y' = line pattern array ptr * * At exit: * 'a' = 0xFF => no pick occurred. * otherwise, indicates which vector was picked. */ display_search_pattern: 0A13 86FF lda #0xFF; 0A15 B70000 sta $0000; 0A18 6F7F clr -1,s; /* Keeps track of current vector index */ 0A1A 86FF lda #0xFF; 0A1C A77E sta -2,s; /* Keeps index of picked vector */ 0A1E D704 stb 0x04; 0A20 EC00 P0A20: ldd 0,x; 0A22 9701 sta 0x01; 0A24 0F00 clr 0x00; 0A26 3002 leax 2,x; 0A28 0C00 inc 0x00; 0A2A D701 stb 0x01; 0A2C A6A0 lda ,y+; 0A2E 970A sta 0x0A; 0A30 0F05 clr 0x05; 0A32 CC0040 ldd #0x0040; 0A35 D50D P0A35: bitb 0x0D; 0A37 27FC beq P0A35; 0A39 1E11 exg x,x; 0A3B 970A sta 0x0A; 0A3D 960D lda 0x0D; /* Check for a lightpen pick */ 0A3F 8402 anda #0x02; 0A41 2704 beq P0A47; 0A43 A67F lda -1,s; 0A45 A77E sta -2,s; /* Save index of picked vector. */ 0A47 6C7F P0A47: inc -1,s; /* Increment index. */ 0A49 A620 lda 0,y; 0A4B 2FD3 ble P0A20; 0A4D A67E lda -2,s; /* Return index of picked vector. */ 0A4F 39 rts; dot_pattern: 0A50 FF .byte 0xFF; 0A51 00 .byte 0x00; 0A52 00 .byte 0x00; 0A53 01 .byte 0x01; /* * The following 5 arrays contain the line patterns * used when drawing the spider web search pattern. * Depending upon which set of line patterns are used, * either the whole pattern, the left side, or right side, * or upper portion, or lower portion will be drawn. */ whole_search_pattern: 0A54 00 .byte 0x00; 0A55 FF .byte 0xFF; 0A56 FF .byte 0xFF; 0A57 FF .byte 0xFF; 0A58 FF .byte 0xFF; 0A59 FF .byte 0xFF; 0A5A FF .byte 0xFF; 0A5B FF .byte 0xFF; 0A5C FF .byte 0xFF; 0A5D 01 .byte 0x01; lower_search_pattern: 0A5E 00 .byte 0x00; 0A5F 00 .byte 0x00; 0A60 FF .byte 0xFF; 0A61 FF .byte 0xFF; 0A62 FF .byte 0xFF; 0A63 FF .byte 0xFF; 0A64 FF .byte 0xFF; 0A65 00 .byte 0x00; 0A66 00 .byte 0x00; 0A67 01 .byte 0x01; upper_search_pattern: 0A68 00 .byte 0x00; 0A69 FF .byte 0xFF; 0A6A FF .byte 0xFF; 0A6B 00 .byte 0x00; 0A6C 00 .byte 0x00; 0A6D 00 .byte 0x00; 0A6E FF .byte 0xFF; 0A6F FF .byte 0xFF; 0A70 FF .byte 0xFF; 0A71 01 .byte 0x01; right_search_pattern: 0A72 00 .byte 0x00; 0A73 FF .byte 0xFF; 0A74 FF .byte 0xFF; 0A75 FF .byte 0xFF; 0A76 FF .byte 0xFF; 0A77 00 .byte 0x00; 0A78 00 .byte 0x00; 0A79 00 .byte 0x00; 0A7A FF .byte 0xFF; 0A7B 01 .byte 0x01; left_search_pattern: 0A7C 00 .byte 0x00; 0A7D 00 .byte 0x00; 0A7E 00 .byte 0x00; 0A7F 00 .byte 0x00; 0A80 FF .byte 0xFF; 0A81 FF .byte 0xFF; 0A82 FF .byte 0xFF; 0A83 FF .byte 0xFF; 0A84 FF .byte 0xFF; 0A85 01 .byte 0x01; small_search_pattern_vl: 0A86 10 .byte 0x10; 0A87 08 .byte 0x08; 0A88 F8 .byte 0xF8; 0A89 08 .byte 0x08; 0A8A F0 .byte 0xF0; 0A8B 00 .byte 0x00; 0A8C F8 .byte 0xF8; 0A8D F8 .byte 0xF8; 0A8E 00 .byte 0x00; 0A8F F0 .byte 0xF0; 0A90 08 .byte 0x08; 0A91 F8 .byte 0xF8; 0A92 10 .byte 0x10; 0A93 00 .byte 0x00; 0A94 08 .byte 0x08; 0A95 08 .byte 0x08; 0A96 00 .byte 0x00; 0A97 10 .byte 0x10; large_search_pattern_vl: 0A98 40 .byte 0x40; 0A99 20 .byte 0x20; 0A9A E0 .byte 0xE0; 0A9B 20 .byte 0x20; 0A9C C0 .byte 0xC0; 0A9D 00 .byte 0x00; 0A9E E0 .byte 0xE0; 0A9F E0 .byte 0xE0; 0AA0 00 .byte 0x00; 0AA1 C0 .byte 0xC0; 0AA2 20 .byte 0x20; 0AA3 E0 .byte 0xE0; 0AA4 40 .byte 0x40; 0AA5 00 .byte 0x00; 0AA6 20 .byte 0x20; 0AA7 20 .byte 0x20; 0AA8 00 .byte 0x00; 0AA9 40 .byte 0x40; /* * These are (y,x) delta pairs, which are added * to the cursor position, to line the cursor up * with the lightpen. The pair used depends upon * which vector of the search pattern was picked. */ cursor_deltas: 0AAA 01 .byte 0x01; 0AAB 01 .byte 0x01; 0AAC 00 .byte 0x00; 0AAD 01 .byte 0x01; 0AAE FF .byte 0xFF; 0AAF 01 .byte 0x01; 0AB0 FF .byte 0xFF; 0AB1 00 .byte 0x00; 0AB2 FF .byte 0xFF; 0AB3 FF .byte 0xFF; 0AB4 00 .byte 0x00; 0AB5 FF .byte 0xFF; 0AB6 01 .byte 0x01; 0AB7 FF .byte 0xFF; 0AB8 01 .byte 0x01; 0AB9 00 .byte 0x00; /* * This is an array of multiplier values, used when * updating the cursors position so that is tracks * the lightpen. The scale factor index used to * draw the search pattern is also used to index into * this byte array. As the scale factor increases, so * does the multiplier value. */ delta_multipliers: 0ABA 01 .byte 0x01; 0ABB 02 .byte 0x02; 0ABC 03 .byte 0x03; 0ABD 05 .byte 0x05; 0ABE 08 .byte 0x08; 0ABF 0B .byte 0x0B; 0AC0 0E .byte 0x0E; 0AC1 12 .byte 0x12; 0AC2 16 .byte 0x16; 0AC3 1C .byte 0x1C; /* * This array contains the scale factors to be used * when drawing the search patterns. */ search_pattern_scale_factors: 0AC4 08 .byte 0x08; 0AC5 12 .byte 0x12; 0AC6 1E .byte 0x1E; 0AC7 2C .byte 0x2C; 0AC8 0E .byte 0x0E; 0AC9 14 .byte 0x14; 0ACA 1A .byte 0x1A; 0ACB 22 .byte 0x22; 0ACC 2C .byte 0x2C; 0ACD 38 .byte 0x38; 0ACE 00 .byte 0x00; /* * print_with_pick_check(string_ptr) * * This procedure checks to see if a pick occurred * on the previous pass through the main loop (C81E != 0). * If a pick did not occur, then the passed in string * is displayed. However, if a pick did occur on the * previous pass, then a check is made to see if this * is the string which was picked (the string address * is compared against that which was saved in C81C). * If this is not the string which was last picked, then * this string will not be displayed. If this was the * string which was picked, then we will display it. * If we do display the string, then afterwards, we will * check to see if a pick occurred, and if so, then we * will hi-light the string, and save its address in C81C. * * This routine is useful for display menus with multiple * choices. When one choice is selected, the others will * not be displayed. Once a string is no longer selected, * then all of the choices will once again be displayed. * * At entry: 'u' must point to the string block. */ print_with_pick_check: 0ACF 7CC820 inc $C820; 0AD2 BDF354 jsr $reset0ref; 0AD5 FFC880 stu $C880; 0AD8 7DC81E tst $C81E; 0ADB 2707 beq P0AE4; 0ADD 1F31 tfr u,x; 0ADF BCC81C cmpx $C81C; 0AE2 2608 bne P0AEC; 0AE4 BD0B19 P0AE4: jsr $am_print_string; 0AE7 7DC89E tst $C89E; 0AEA 2601 bne hilite_string; 0AEC 39 P0AEC: rts; /* * hilite_string() * * This routine is used by print_with_pick_check() to * hi-lite a string once it is picked, and to set several * globals, so that other routine will know a pick occurred. * The address of the string block is in C880. A copy of * this address will then be saved in C81C, and C89E and * C81B will be set to one (to flag that a pick occurred). */ hilite_string: 0AED FFC882 stu $C882; 0AF0 FEC880 ldu $C880; 0AF3 FFC81C stu $C81C; 0AF6 BD0B19 jsr $am_print_string; 0AF9 FEC880 ldu $C880; 0AFC BD0B19 jsr $am_print_string; 0AFF FEC880 ldu $C880; 0B02 BD0B19 jsr $am_print_string; 0B05 FEC880 ldu $C880; 0B08 BD0B19 jsr $am_print_string; 0B0B 8601 lda #0x01; 0B0D B7C89E sta $C89E; 0B10 B7C81B sta $C81B; 0B13 FEC882 ldu $C882; 0B16 1F31 tfr u,x; 0B18 39 rts; /* * am_print_string() * * Prints a string of character, terminated by 0x80. * At entry, the 'u' register must point to a block * having the following format: * * 1 byte height of string * 1 byte width of string * 1 byte rel y location * 1 byte rel x location * 2 byte pointer to start of string * * At exit: C89E will be set if a pick occurred. */ am_print_string: 0B19 ECC1 ldd ,u++; 0B1B FDC82A std $C82A; 0B1E ECC1 ldd ,u++; 0B20 BDF2FC jsr $move_pen7F_to_d; 0B23 EE40 ldu 0,u; 0B25 FFC82C stu $C82C; 0B28 335F leau -1,u; 0B2A FFC84F stu $C84F; 0B2D 0F0D clr 0x0D; 0B2F 7FC89E clr $C89E; 0B32 8EF9D4 ldx #0xF9D4; 0B35 CC1883 ldd #0x1883; 0B38 0F01 clr 0x01; 0B3A 970B sta 0x0B; 0B3C D700 P0B3C: stb 0x00; 0B3E 0A00 dec 0x00; 0B40 CC8081 ldd #0x8081; 0B43 12 nop; 0B44 0C00 inc 0x00; 0B46 D700 stb 0x00; 0B48 9700 sta 0x00; 0B4A 7DC800 tst $C800; 0B4D 0C00 inc 0x00; 0B4F B6C82B lda $C82B; 0B52 9701 sta 0x01; 0B54 CC0100 ldd #0x0100; 0B57 FEC82C ldu $C82C; 0B5A 9700 sta 0x00; 0B5C 2004 bra P0B62; 0B5E A686 P0B5E: lda a,x; 0B60 970A sta 0x0A; 0B62 A6C0 P0B62: lda ,u+; 0B64 2AF8 bpl P0B5E; 0B66 960D lda 0x0D; /* Record any picks. */ 0B68 8402 anda #0x02; 0B6A BAC89E ora $C89E; 0B6D B7C89E sta $C89E; 0B70 12 nop; 0B71 8681 lda #0x81; 0B73 9700 sta 0x00; 0B75 0001 neg 0x01; 0B77 8601 lda #0x01; 0B79 9700 sta 0x00; 0B7B 8CFBB4 cmpx #0xFBB4; 0B7E 272D beq P0BAD; 0B80 308850 leax 0x50,x; 0B83 1F30 tfr u,d; 0B85 B3C84F subd $C84F; 0B88 C002 subb #0x02; 0B8A 58 aslb; 0B8B 2100 brn P0B8D; 0B8D 8681 P0B8D: lda #0x81; 0B8F 12 nop; 0B90 5A decb; 0B91 26FA bne P0B8D; 0B93 9700 sta 0x00; 0B95 F6C82A ldb $C82A; 0B98 D701 stb 0x01; 0B9A 0A00 dec 0x00; 0B9C CC8101 ldd #0x8101; 0B9F 12 nop; 0BA0 9700 sta 0x00; 0BA2 0F01 clr 0x01; 0BA4 D700 stb 0x00; 0BA6 9700 sta 0x00; 0BA8 C683 ldb #0x83; 0BAA 7E0B3C jmp $P0B3C; 0BAD 8698 P0BAD: lda #0x98; 0BAF 970B sta 0x0B; 0BB1 7EF354 jmp $reset0ref; SM_DOT_STR: 0BB4 E8 .byte 0xE8; 0BB5 20 .byte 0x20; 0BB6 80 .byte 0x80; 0BB7 C0 .byte 0xC0; 0BB8 0B .byte 0x0B; 0BB9 BA .byte 0xBA; 0BBA 44 .byte "DOT", 0x80; SM_LINE_STR: 0BBE E8 .byte 0xE8; 0BBF 20 .byte 0x20; 0BC0 80 .byte 0x80; 0BC1 C0 .byte 0xC0; 0BC2 0B .byte 0x0B; 0BC3 C4 .byte 0xC4; 0BC4 4C .byte LINE", 0x80; /* * This describes the initial cursor state. */ initial_cursor_state: 0BC9 00 .byte 0x00; 0BCA 00 .byte 0x00; 0BCB 78 .byte 0x78; 0BCC 88 .byte 0x88; 0BCD 90 .byte 0x90; 0BCE 78 .byte 0x78; /* * start_of_sketch_connect() * * This is the starting point for the SKETCH and * the CONNECT main menu items. */ start_of_sketch_connect: 0BCF BD0E1F jsr $init_sketch_connect_variables; 0BD2 CEC889 ldu #0xC889; 0BD5 8E0BC9 ldx #initial_cursor_state; 0BD8 BD08ED jsr $set_cursor_structure; 0BDB 8E0BE1 ldx #sketch_connect_handler; 0BDE BFC8A7 stx $C8A7; /* * sketch_connect_handler() * * This is the real main loop routine for the sketch * and connect operatons. It takes care of reading * the buttons, and calling any button handlers, as * needed. It is invoked only through the indirect * jump location, by the main loop. */ sketch_connect_handler: 0BE1 7FC82E clr $C82E; 0BE4 7DC8A6 tst $C8A6; /* Check button 4, iff in connect mode */ 0BE7 2708 beq P0BF1; 0BE9 7DC815 tst $C815; /* Check button 4;(dot/lines) */ 0BEC 2703 beq P0BF1; 0BEE 73C8A5 com $C8A5; /* Complement dot/connect flag */ 0BF1 BD0D27 P0BF1: jsr $display_sc_menu; 0BF4 BD0E38 jsr $sketch_connect_draw_vector_list; 0BF7 8E0C95 ldx #fan_handler; 0BFA 7DC812 tst $C812; /* Check button 1;(draw) */ 0BFD 2610 bne sc_start_draw; 0BFF 7DC8A6 tst $C8A6; /* Check button 4, iff in sketch mode */ 0C02 2605 bne P0C09; 0C04 7DC815 tst $C815; /* Check button 4;(fan) */ 0C07 2609 bne sc_start_fan; 0C09 7DC813 P0C09: tst $C813; /* Check button 2;(rubber band line) */ 0C0C 2638 bne sc_start_rubber_band_line; 0C0E 39 rts; /* * sc_start_draw() * sc_start_fan() * * These two entry points are responsible for initializing * things when either button 1 (draw) or button 4 (fan) * are pressed during SKETCH or CONNECT modes. They will * set up a new indirect jump handler, save the current * cursor position, and initialize some variables. */ sc_start_draw: 0C0F 8E0C5B ldx #sc_draw_handler; sc_start_fan: 0C12 B6C8A3 lda $C8A3; /* Don't bother, if the vector */ 0C15 81FB cmpa #0xFB; /* list is already full. */ 0C17 2501 blo P0C1A; 0C19 39 rts; 0C1A BFC8A7 P0C1A: stx $C8A7; /* Save new indirect jump handler. */ 0C1D C603 ldb #0x03; 0C1F 8EC8A9 ldx #0xC8A9; /* Load 'x' with pointer to next */ 0C22 3D mul; /* free spot in the vector list */ 0C23 308B leax d,x; /* buffer. */ 0C25 6F00 clr 0,x; 0C27 FCC889 ldd $C889; /* Fill this spot, using the current */ 0C2A ED01 std 1,x; /* cursor position. */ 0C2C 7CC8A3 inc $C8A3; /* Increment the vector counter. */ 0C2F 8605 lda #0x05; /* # of pts to draw relative 2 starting*/ 0C31 B7C8A4 sta $C8A4; /* pt, be4 forcing new absolute ref pt.*/ 0C34 FCC889 ldd $C889; /* Save current cursor position. */ 0C37 FDC89B std $C89B; 0C3A FDC82F std $C82F; 0C3D 8608 lda #0x08; 0C3F B7C896 sta $C896; /* Stores reset value for counter. */ 0C42 B7C895 sta $C895; /* Active counter; endpoint is fixed */ 0C45 39 rts; /* when this goes to 0. */ /* * sc_start_rubber_band_line() * * This entry point is responsible for setting up the * indirect jump location, and initializing variables * when button 2 (rubber band line) is pressed during * either SKETCH or CONNECT mode. */ sc_start_rubber_band_line: 0C46 FCC889 ldd $C889; /* Save current cursor position. */ 0C49 FDC89B std $C89B; 0C4C 8E0CDA ldx #rubber_band_line_handler; 0C4F B6C8A3 lda $C8A3; /* Don't bother if the vector list */ 0C52 81FB cmpa #0xFB; /* is already full. */ 0C54 2501 blo P0C57; 0C56 39 rts; 0C57 BFC8A7 P0C57: stx $C8A7; /* Save new indirect jump handler. */ 0C5A 39 rts; /* * sc_draw_handler() * * This is the routine which draws lines/dots when * button 1 is depressed. It is invoked only through * the indirect jump location. It is used only when * either SKETCH or CONNECT modes are active. */ sc_draw_handler: 0C5B BD0D27 jsr $display_sc_menu; 0C5E BD0E38 jsr $sketch_connect_draw_vector_list; 0C61 B6C80F lda $C80F; /* Check if button 1 is still pressed. */ 0C64 8401 anda #0x01; 0C66 260A bne P0C72; 0C68 BD0DFA jsr $get_new_endpoint; 0C6B 8E0BE1 ldx #sketch_connect_handler; 0C6E BFC8A7 stx $C8A7; 0C71 39 rts; 0C72 FCC89B P0C72: ldd $C89B; /* Don't continue, if the cursor has */ 0C75 10B3C889 cmpd $C889; /* not moved since last point. */ 0C79 2601 bne fix_endpoint; 0C7B 39 rts; fix_endpoint: 0C7C 7DC895 tst $C895; /* Wait for counter (C895) to decrement */ 0C7F 2704 beq P0C85; /* to zero, before fixing endpoint. */ 0C81 7AC895 dec $C895; 0C84 39 rts; 0C85 BD0DFA P0C85: jsr $get_new_endpoint; 0C88 FCC889 ldd $C889; /* Move the starting point for next */ 0C8B FDC89B std $C89B; /* vector to previous vectors endpt.*/ 0C8E B6C896 lda $C896; 0C91 B7C895 sta $C895; /* Reset 'fix endpoint' counter. */ 0C94 39 rts; /* * fan_handler() * * As long as the user has button 4 pressed, a fan * pattern will be drawn. Once button 4 is released, * control will return to the sketch/connect handler. */ fan_handler: 0C95 86FF lda #0xFF; /* Flag that 'fan' is being done. */ 0C97 B7C82E sta $C82E; 0C9A 7FC8A4 clr $C8A4; 0C9D BD0D27 jsr $display_sc_menu; 0CA0 BD0E38 jsr $sketch_connect_draw_vector_list; 0CA3 B6C80F lda $C80F; /* Check if button 4 is still pressed */ 0CA6 8408 anda #0x08; 0CA8 260D bne continue_drawing_fan; 0CAA BD0DFA jsr $get_new_endpoint; 0CAD 8E0BE1 ldx #sketch_connect_handler; 0CB0 BFC8A7 stx $C8A7; 0CB3 7FC82E clr $C82E; 0CB6 39 rts; continue_drawing_fan: 0CB7 FCC89B ldd $C89B; /* Don't add a new line, unless */ 0CBA 10B3C889 cmpd $C889; /* the cursor position has changed. */ 0CBE 2601 bne P0CC1; 0CC0 39 rts; 0CC1 7DC895 P0CC1: tst $C895; /* Don't fix next fan endpt, until */ 0CC4 2704 beq P0CCA; /* 'fix point' counter has decremented */ 0CC6 7AC895 dec $C895; /* to zero. */ 0CC9 39 rts; 0CCA BD0DFA P0CCA: jsr $get_new_endpoint; 0CCD FCC889 ldd $C889; /* Set starting point for next vector */ 0CD0 FDC89B std $C89B; /* equal to last vectors endpoint. */ 0CD3 B6C896 lda $C896; 0CD6 B7C895 sta $C895; /* Reset 'fix endpoint' counter. */ 0CD9 39 rts; /* * rubber_band_line_handler() * * This is the handler routine while the user is * drawing a rubber band line during sketch or connect * modes. The rubber band line will continue until the * user stops pressing button 2. This routine is only * invoked through the indirect jump location. */ rubber_band_line_handler: 0CDA BD0D27 jsr $display_sc_menu; 0CDD BD0E38 jsr $sketch_connect_draw_vector_list; 0CE0 B6C80F lda $C80F; /* See if button 2 still depressed */ 0CE3 8402 anda #0x02; 0CE5 260D bne continue_rb_line; 0CE7 7FC8A4 clr $C8A4; /* Clear the relative point counter. */ 0CEA BD0DFA jsr $get_new_endpoint; 0CED 8E0BE1 ldx #sketch_connect_handler; 0CF0 BFC8A7 stx $C8A7; 0CF3 39 rts; continue_rb_line: 0CF4 7DC8A6 tst $C8A6; /* Draw the rubber band line from the */ 0CF7 2705 beq P0CFE; /* originat point to the current cursor */ 0CF9 7DC8A5 tst $C8A5; /* position, unless in DOT mode. */ 0CFC 260D bne P0D0B; 0CFE BDF2A9 P0CFE: jsr $intensity_to_7F; 0D01 8EC89B ldx #0xC89B; 0D04 108EC889 ldy #0xC889; 0D08 BD0840 jsr $draw_vector_with_pick_check; 0D0B 39 P0D0B: rts; HDR_CONNECT_STR: 0D0C E8 .byte 0xE8; 0D0D 40 .byte 0x40; 0D0E 7F .byte 0x7F; 0D0F E8 .byte 0xE8; 0D10 0D .byte 0x0D; 0D11 12 .byte 0x12; 0D12 43 .byte "CONNECT", 0x80; HDR_SKETCH_STR: 0D1A E8 .byte 0xE8; 0D1B 40 .byte 0x40; 0D1C 7F .byte 0x7F; 0D1D E8 .byte 0xE8; 0D1E 0D .byte 0x0D; 0D1F 20 .byte 0x20; 0D20 53 .byte "SKETCH", 0x80; /* * display_sc_menu() * * This procedure displays either the SKETCH or CONNECT * header (as an unpickable string), and then also displays * the ERASE, MENU and DOT/LINE sub-items (as pickable strings) * It then checks to see if any of these items were picked, * and handles them is they were. Also displays the cursor. */ display_sc_menu: 0D27 BDF2A9 jsr $intensity_to_7F; 0D2A BDF354 jsr $reset0ref; 0D2D 7DC8A6 tst $C8A6; /* See if in sketch or connect mode */ 0D30 2716 beq P0D48; 0D32 CE0D0C ldu #HDR_CONNECT_STR; /* CONNECT mode */ 0D35 BD0B19 jsr $am_print_string; 0D38 CE0BB4 ldu #SM_DOT_STR; /* Display DOT or LINE item */ 0D3B 7DC8A5 tst $C8A5; 0D3E 2603 bne P0D43; 0D40 CE0BBE ldu #SM_LINE_STR; 0D43 BD0B19 P0D43: jsr $am_print_string; 0D46 2006 bra P0D4E; 0D48 CE0D1A P0D48: ldu #HDR_SKETCH_STR; /* SKETCH mode */ 0D4B BD0B19 jsr $am_print_string; 0D4E 8660 P0D4E: lda #0x60; /* Draw cursor at current */ 0D50 BDF2AB jsr $intensity_to_a; /* position. */ 0D53 FCC889 ldd $C889; 0D56 BD0EB2 jsr $am_move_to_d; 0D59 8E052F ldx #cross; 0D5C C60A ldb #0x0A; 0D5E BD07D6 jsr $draw_with_pick_check; 0D61 BDF2A9 jsr $intensity_to_7F; 0D64 CEC889 ldu #0xC889; /* If cursor is picked, then */ 0D67 6D42 tst 2,u; /* draw it brighter. */ 0D69 2711 beq P0D7C; 0D6B BDF354 jsr $reset0ref; 0D6E FCC889 ldd $C889; 0D71 BD0EB2 jsr $am_move_to_d; 0D74 C60A ldb #0x0A; 0D76 8E052F ldx #cross; 0D79 BD07D6 jsr $draw_with_pick_check; 0D7C BD0901 P0D7C: jsr $update_cursor_position; 0D7F CE0056 ldu #SM_ERASE_STR; /* Print ERASE item */ 0D82 BD0ACF jsr $print_with_pick_check; 0D85 B6C80F lda $C80F; /* Check if button 3 */ 0D88 8404 anda #0x04; /* is pressed and item is */ 0D8A 270C beq P0D98; /* picked. */ 0D8C 7DC89E tst $C89E; 0D8F 2707 beq P0D98; 0D91 8E0BCF ldx #start_of_sketch_connect; 0D94 BFC8A7 stx $C8A7; 0D97 39 rts; 0D98 CE0062 P0D98: ldu #SM_MENU_STR; /* Print MENU item */ 0D9B BD0ACF jsr $print_with_pick_check; 0D9E B6C80F lda $C80F; /* Check if button 3 is */ 0DA1 8404 anda #0x04; /* pressed and item is picked */ 0DA3 270B beq P0DB0; 0DA5 7DC89E tst $C89E; 0DA8 2706 beq P0DB0; 0DAA 8E009B ldx #display_main_menu; 0DAD BFC8A7 stx $C8A7; 0DB0 39 P0DB0: rts; 0DB1 39 .byte 0x39; /* "9" */ /* * generate_vector_endpoint_and_recalibrate() * * This routine generates an endpoint for a vector. * If the relative point counter (C8A4) has decremented * to zero, then we will add an absolute reference point * to the vector list, to prevent our vectors from getting * too far out of whack; this is done after every 5 points. * * At entry: * C8A4 contains the relative point counter. * 'a' has index of next available spot in vector list. * C89B contains starting point for this vector. * C82F contains starting point for the fan. * C82E flags DRAW .vs. FAN mode. * C8A3 has index of next available spot in vector list. * * At exit: * C881-C882 contains new vector endpoint. * 'u' points to next available spot in vector list. */ generate_vector_endpoint_and_recalibrate: 0DB2 7DC8A4 tst $C8A4; /* If the relative pt counter has gone */ 0DB5 261F bne P0DD6; /* to zero, then force another absolute*/ 0DB7 C603 ldb #0x03; /* ref point. */ 0DB9 8EC8A9 ldx #0xC8A9; 0DBC 3D mul; 0DBD 308B leax d,x; 0DBF 6F00 clr 0,x; /* Flag an absolute reference point. */ 0DC1 FCC89B ldd $C89B; /* Get starting pt for this vector; if */ 0DC4 7DC82E tst $C82E; /* DRAW mode, then use last cursor */ 0DC7 2703 beq P0DCC; /* position; else, use cursor position */ 0DC9 FCC82F ldd $C82F; /* for beginning of fan. */ 0DCC ED01 P0DCC: std 1,x; /* Save abs ref point. */ 0DCE 7CC8A3 inc $C8A3; /* Increment vector counter. */ 0DD1 8605 lda #0x05; /* Reset the relative point counter. */ 0DD3 B7C8A4 sta $C8A4; 0DD6 CEC8A9 P0DD6: ldu #0xC8A9; 0DD9 B6C8A3 lda $C8A3; /* Load 'u' with pointer to current */ 0DDC C603 ldb #0x03; /* work spot in the vector list. */ 0DDE 3D mul; 0DDF 33CB leau d,u; 0DE1 8EC89B ldx #0xC89B; /* Calculate endpt for this vector. */ 0DE4 108EC889 ldy #0xC889; 0DE8 7DC82E tst $C82E; 0DEB 2703 beq P0DF0; 0DED 8EC82F ldx #0xC82F; 0DF0 BD0879 P0DF0: jsr $calculate_vector_endpoint; 0DF3 7CC8A3 inc $C8A3; /* Increment vector list counter. */ 0DF6 7AC8A4 dec $C8A4; /* Decrement relative point counter. */ 0DF9 39 rts; /* * get_new_endpoint() * * This routine checks to see how many vectors or dots * we have available for use. The current number of * vectors or dots drawn is stored in C8A3. If we * have already reached the limit, then return without * doing anything. Otherwise, if we are close to the * limit, then make a sound, and flag that we are close, * by setting C829; this flag will prevent us from making * the sound more than once. Also, it will generate the * scale factor and coordinates for the current vector. * These pieces of information are then stored in the * vector list. */ get_new_endpoint: 0DFA B6C8A3 lda $C8A3; /* See if we have surpassed limit */ 0DFD 81FD cmpa #0xFD; 0DFF 2501 blo P0E02; 0E01 39 rts; 0E02 7DC829 P0E02: tst $C829; /* Don't make sound more than once */ 0E05 260D bne P0E14; 0E07 81EE cmpa #0xEE; /* See if we're near limit */ 0E09 2509 blo P0E14; 0E0B 7CC829 inc $C829; 0E0E BD0ED8 jsr $set_up_a_misc_sound1; 0E11 B6C8A3 lda $C8A3; 0E14 BD0DB2 P0E14: jsr $generate_vector_endpoint_and_recalibrate; 0E17 E740 stb 0,u; /* Save scale factor. */ 0E19 FCC881 ldd $C881; 0E1C ED41 std 1,u; /* Save vector endpoints. */ 0E1E 39 rts; /* * init_sketch_connect_variables() * * This routine is invoked when the sketch/connect * handler is first called. It is responsible for * initializing the vector list residing in RAM at * C8A9-CBA5 to 0xFF. It also initializes some RAM * locations to 0. */ init_sketch_connect_variables: 0E1F 8EC8A9 ldx #0xC8A9; 0E22 86FF lda #0xFF; 0E24 A780 P0E24: sta ,x+; 0E26 8CCBA6 cmpx #0xCBA6; 0E29 26F9 bne P0E24; 0E2B 7FC8A3 clr $C8A3; /* Vector counter. */ 0E2E 7FC8A4 clr $C8A4; /* Relative point counter. */ 0E31 7FC829 clr $C829; /* Buffer almost full flag. */ 0E34 7FC856 clr $C856; /* Sound duration. */ 0E37 39 rts; /* * sketch_connect_draw_vector_list() * * This routine goes through the vector list, performing * all of the move and draw requests currently therein. * It does this by drawing all of the points relative to * to the last absolute reference point, until a new * absolute reference point is encountered. At this point * it will recalibrate things, and then move to the new * absolute reference point, and continue drawing. This * will continue until the end of the vector list is * encountered. The vector list has the following format: * * scale, rel y, rel x * * If 'scale' is 0xFF, then this is the end of the list. * If 'scale' is 0x00, then the corresponding (y,x) are * really a new absolute reference point, not relative * points. * If 'scale' is positive, then draw to new point. * If 'scale' is negative, then move to new point. */ sketch_connect_draw_vector_list: 0E38 8660 lda #0x60; /* Set up vector intensity. */ 0E3A BDF2AB jsr $intensity_to_a; 0E3D 8EC8A9 ldx #0xC8A9; /* Start drawing vector list. */ 0E40 BD0E54 P0E40: jsr $draw_relative_points; 0E43 4D tsta; 0E44 2704 beq move_to_abs_ref_point; 0E46 BDF354 jsr $reset0ref; 0E49 39 rts; move_to_abs_ref_point: 0E4A BDF354 jsr $reset0ref; /* Reset zero reference. */ 0E4D EC81 ldd ,x++; /* Move to abs ref point. */ 0E4F BD0EB2 jsr $am_move_to_d; 0E52 20EC bra P0E40; /* * draw_relative_points() * * This routine draw all of the vector in the vector * list, which are relative to the current absolute * reference point. When the end of the vector list * or a new absolute reference point is encountered, * this routine will return. * * At entry: * 'x' points to the vector list. * * At exit: * 'a' contains scale factor for terminating point. */ draw_relative_points: 0E54 A680 lda ,x+; /* Load scale factor; return if it */ 0E56 2601 bne P0E59; /* flags a new abs reference point.*/ 0E58 39 rts; 0E59 81FF P0E59: cmpa #0xFF; /* Check 4 the end of the vector list. */ 0E5B 2601 bne P0E5E; 0E5D 39 rts; 0E5E 7DC8A6 P0E5E: tst $C8A6; /* Check for LINE or DOT mode. */ 0E61 2705 beq sc_draw_to_point; 0E63 7DC8A5 tst $C8A5; 0E66 260D bne sc_move_to_point; sc_draw_to_point: 0E68 4D tsta; /* Check for move/draw operation. */ 0E69 2B0A bmi sc_move_to_point; 0E6B C6FF ldb #0xFF; 0E6D F7C880 stb $C880; 0E70 BD0E8F jsr $am_draw_with_pattern; 0E73 20DF bra draw_relative_points; sc_move_to_point: 0E75 030A com 0x0A; 0E77 1E11 exg x,x; 0E79 1E11 exg x,x; 0E7B 030A com 0x0A; 0E7D 847F anda #0x7F; 0E7F 7FC880 clr $C880; /* Clear vector pattern. */ 0E82 BD0E8F jsr $am_draw_with_pattern; 0E85 030A com 0x0A; 0E87 1E11 exg x,x; 0E89 1E11 exg x,x; 0E8B 0F0A clr 0x0A; 0E8D 20C5 bra draw_relative_points; /* * am_draw_with_pattern (point, scale_index, pattern) * * This moves the cursor to a particular point, * using one of several scale factors, and a line * pattern specified in C880. * At entry: 'x' points to vector list of rel y, relx. * 'a' has index into scale factor array. * C880 has line pattern. */ am_draw_with_pattern: 0E8F CE08E7 ldu #am_scale_factors; 0E92 A6C6 lda a,u; /* Load the scale factor */ 0E94 9704 sta 0x04; 0E96 EC81 ldd ,x++; /* Load vector endpoints */ 0E98 9701 sta 0x01; 0E9A 0F00 clr 0x00; 0E9C B6C880 lda $C880; /* Load line pattern from C880 */ 0E9F 0C00 inc 0x00; 0EA1 D701 stb 0x01; 0EA3 0F05 clr 0x05; 0EA5 970A sta 0x0A; 0EA7 8640 lda #0x40; 0EA9 950D P0EA9: bita 0x0D; 0EAB 27FC beq P0EA9; 0EAD 12 nop; 0EAE 12 nop; 0EAF 0F0A clr 0x0A; /* Clear the line pattern */ 0EB1 39 rts; /* * am_move_to_d() * * This routine does a quick move to the point * specified in the 'd' register (a = rel y, * b = rel x). A scale factor of 0x7F is used. */ am_move_to_d: 0EB2 9701 sta 0x01; 0EB4 0F00 clr 0x00; 0EB6 867F lda #0x7F; 0EB8 9704 sta 0x04; 0EBA 86CE lda #0xCE; 0EBC 970C sta 0x0C; 0EBE 8640 lda #0x40; /* "@" */ 0EC0 0C00 inc 0x00; 0EC2 D701 stb 0x01; 0EC4 0F05 clr 0x05; 0EC6 950D P0EC6: bita 0x0D; 0EC8 27FC beq P0EC6; 0ECA 39 rts; /* * check_for_end_of_sound() * * This routine checks to see if the current * miscellaneous sound has completed, by checking * the value in C856. When it reaches zero, the * sound is done. */ check_for_end_of_sound: 0ECB 7DC856 tst $C856; 0ECE 2604 bne P0ED4; 0ED0 BDF533 jsr $init_music_buf; 0ED3 39 rts; 0ED4 7AC856 P0ED4: dec $C856; 0ED7 39 rts; /* * set_up_a_misc_sound1() * set_up_a_misc_sound2(sound) * * Both of these routines cause a sound to be * made. If set_up_a_misc_sound1() is used, * then the sound to be made is defined by * writing the value 0x0050 to reg 0 & reg 1 * on the sound chip. If set_up_a_misc_sound2() * is used, then the value passed in in the 'd' * register defines the sound. The duration of * the sound is stored in C856. */ set_up_a_misc_sound1: 0ED8 CC0050 ldd #0x0050; set_up_a_misc_sound2: 0EDB FDC84B std $C84B; 0EDE 863E lda #0x3E; /* ">" */ 0EE0 B7C845 sta $C845; 0EE3 860A lda #0x0A; 0EE5 B7C844 sta $C844; 0EE8 8605 lda #0x05; 0EEA B7C856 sta $C856; 0EED 39 rts; AM_music: 0EEE FE .word 0xFE28; 0EF0 FE .word 0xFEB6; 0EF2 A6 .byte 0xA6; 0EF3 0A .byte 0x0A; 0EF4 10 .byte 0x10; 0EF5 98 .byte 0x98; 0EF6 0A .byte 0x0A; 0EF7 0C .byte 0x0C; 0EF8 96 .byte 0x96; 0EF9 0A .byte 0x0A; 0EFA 04 .byte 0x04; 0EFB 98 .byte 0x98; 0EFC 0C .byte 0x0C; 0EFD 10 .byte 0x10; 0EFE 96 .byte 0x96; 0EFF 0C .byte 0x0C; 0F00 0C .byte 0x0C; 0F01 95 .byte 0x95; 0F02 0C .byte 0x0C; 0F03 04 .byte 0x04; 0F04 96 .byte 0x96; 0F05 07 .byte 0x07; 0F06 10 .byte 0x10; 0F07 95 .byte 0x95; 0F08 07 .byte 0x07; 0F09 0C .byte 0x0C; 0F0A 93 .byte 0x93; 0F0B 07 .byte 0x07; 0F0C 04 .byte 0x04; 0F0D 95 .byte 0x95; 0F0E 1A .byte 0x1A; 0F0F 10 .byte 0x10; 0F10 92 .byte 0x92; 0F11 1A .byte 0x1A; 0F12 10 .byte 0x10; 0F13 3F .byte 0x3F; /* "?" */ 0F14 80 .byte 0x80; 0F15 3B .byte 0x3B; /* ";" */ 0F16 00 .byte 0x00; 0F17 3B .byte 0x3B; /* ";" */ 0F18 00 .byte 0x00; 0F19 3B .byte 0x3B; /* ";" */ 0F1A 00 .byte 0x00; 0F1B 3B .byte 0x3B; /* ";" */ 0F1C 00 .byte 0x00; 0F1D 3B .byte 0x3B; /* ";" */ 0F1E 00 .byte 0x00; 0F1F 3B .byte 0x3B; /* ";" */ 0F20 00 .byte 0x00; 0F21 3B .byte 0x3B; /* ";" */ 0F22 00 .byte 0x00; 0F23 3B .byte 0x3B; /* ";" */ 0F24 00 .byte 0x00; 0F25 3B .byte 0x3B; /* ";" */ 0F26 00 .byte 0x00; 0F27 3B .byte 0x3B; /* ";" */ 0F28 00 .byte 0x00; 0F29 3B .byte 0x3B; /* ";" */ 0F2A 00 .byte 0x00; 0F2B 3B .byte 0x3B; /* ";" */ 0F2C 00 .byte 0x00; 0F2D 3B .byte 0x3B; /* ";" */ 0F2E 00 .byte 0x00; 0F2F 3B .byte 0x3B; /* ";" */ 0F30 00 .byte 0x00; 0F31 3B .byte 0x3B; /* ";" */ 0F32 00 .byte 0x00; 0F33 3B .byte 0x3B; /* ";" */ 0F34 00 .byte 0x00; 0F35 3B .byte 0x3B; /* ";" */ 0F36 00 .byte 0x00; 0F37 3B .byte 0x3B; /* ";" */ 0F38 00 .byte 0x00; 0F39 3B .byte 0x3B; /* ";" */ 0F3A 00 .byte 0x00; 0F3B 3B .byte 0x3B; /* ";" */ 0F3C 00 .byte 0x00; 0F3D 3B .byte 0x3B; /* ";" */ 0F3E 00 .byte 0x00; 0F3F 3B .byte 0x3B; /* ";" */ 0F40 00 .byte 0x00; 0F41 3B .byte 0x3B; /* ";" */ 0F42 00 .byte 0x00; 0F43 3B .byte 0x3B; /* ";" */ 0F44 00 .byte 0x00; 0F45 3B .byte 0x3B; /* ";" */ 0F46 00 .byte 0x00; 0F47 3B .byte 0x3B; /* ";" */ 0F48 00 .byte 0x00; 0F49 3B .byte 0x3B; /* ";" */ 0F4A 00 .byte 0x00; 0F4B 3B .byte 0x3B; /* ";" */ 0F4C 00 .byte 0x00; 0F4D 3B .byte 0x3B; /* ";" */ 0F4E 00 .byte 0x00; 0F4F 3B .byte 0x3B; /* ";" */ 0F50 00 .byte 0x00; 0F51 3B .byte 0x3B; /* ";" */ 0F52 00 .byte 0x00; 0F53 3B .byte 0x3B; /* ";" */ 0F54 00 .byte 0x00; 0F55 3B .byte 0x3B; /* ";" */ 0F56 00 .byte 0x00; 0F57 3B .byte 0x3B; /* ";" */ 0F58 00 .byte 0x00; 0F59 3B .byte 0x3B; /* ";" */ 0F5A 00 .byte 0x00; 0F5B 3B .byte 0x3B; /* ";" */ 0F5C 00 .byte 0x00; 0F5D 3B .byte 0x3B; /* ";" */ 0F5E 00 .byte 0x00; 0F5F 3B .byte 0x3B; /* ";" */ 0F60 00 .byte 0x00; 0F61 3B .byte 0x3B; /* ";" */ 0F62 00 .byte 0x00; 0F63 3B .byte 0x3B; /* ";" */ 0F64 00 .byte 0x00; 0F65 3B .byte 0x3B; /* ";" */ 0F66 00 .byte 0x00; 0F67 3B .byte 0x3B; /* ";" */ 0F68 00 .byte 0x00; 0F69 3B .byte 0x3B; /* ";" */ 0F6A 00 .byte 0x00; 0F6B 3B .byte 0x3B; /* ";" */ 0F6C 00 .byte 0x00; 0F6D 3B .byte 0x3B; /* ";" */ 0F6E 00 .byte 0x00; 0F6F 3B .byte 0x3B; /* ";" */ 0F70 00 .byte 0x00; 0F71 3B .byte 0x3B; /* ";" */ 0F72 00 .byte 0x00; 0F73 3B .byte 0x3B; /* ";" */ 0F74 00 .byte 0x00; 0F75 3B .byte 0x3B; /* ";" */ 0F76 00 .byte 0x00; 0F77 3B .byte 0x3B; /* ";" */ 0F78 00 .byte 0x00; 0F79 3B .byte 0x3B; /* ";" */ 0F7A 00 .byte 0x00; 0F7B 3B .byte 0x3B; /* ";" */ 0F7C 00 .byte 0x00; 0F7D 3B .byte 0x3B; /* ";" */ 0F7E 33 .byte 0x33; /* "3" */ 0F7F 00 .byte 0x00; 0F80 69 .byte 0x69; /* "i" */ 0F81 84 .byte 0x84; 0F82 00 .byte 0x00; 0F83 69 .byte 0x69; /* "i" */ 0F84 84 .byte 0x84; 0F85 3B .byte 0x3B; /* ";" */ 0F86 00 .byte 0x00; 0F87 3B .byte 0x3B; /* ";" */ 0F88 00 .byte 0x00; 0F89 3B .byte 0x3B; /* ";" */ 0F8A 00 .byte 0x00; 0F8B 3B .byte 0x3B; /* ";" */ 0F8C 00 .byte 0x00; 0F8D 3B .byte 0x3B; /* ";" */ 0F8E 00 .byte 0x00; 0F8F 3B .byte 0x3B; /* ";" */ 0F90 00 .byte 0x00; 0F91 3B .byte 0x3B; /* ";" */ 0F92 00 .byte 0x00; 0F93 3B .byte 0x3B; /* ";" */ 0F94 00 .byte 0x00; 0F95 3B .byte 0x3B; /* ";" */ 0F96 00 .byte 0x00; 0F97 3B .byte 0x3B; /* ";" */ 0F98 00 .byte 0x00; 0F99 3B .byte 0x3B; /* ";" */ 0F9A 00 .byte 0x00; 0F9B 3B .byte 0x3B; /* ";" */ 0F9C 00 .byte 0x00; 0F9D 3B .byte 0x3B; /* ";" */ 0F9E 00 .byte 0x00; 0F9F 3B .byte 0x3B; /* ";" */ 0FA0 00 .byte 0x00; 0FA1 3B .byte 0x3B; /* ";" */ 0FA2 00 .byte 0x00; 0FA3 3B .byte 0x3B; /* ";" */ 0FA4 00 .byte 0x00; 0FA5 3B .byte 0x3B; /* ";" */ 0FA6 00 .byte 0x00; 0FA7 3B .byte 0x3B; /* ";" */ 0FA8 00 .byte 0x00; 0FA9 3B .byte 0x3B; /* ";" */ 0FAA 00 .byte 0x00; 0FAB 3B .byte 0x3B; /* ";" */ 0FAC 00 .byte 0x00; 0FAD 3B .byte 0x3B; /* ";" */ 0FAE 00 .byte 0x00; 0FAF 3B .byte 0x3B; /* ";" */ 0FB0 00 .byte 0x00; 0FB1 3B .byte 0x3B; /* ";" */ 0FB2 00 .byte 0x00; 0FB3 3B .byte 0x3B; /* ";" */ 0FB4 00 .byte 0x00; 0FB5 3B .byte 0x3B; /* ";" */ 0FB6 00 .byte 0x00; 0FB7 3B .byte 0x3B; /* ";" */ 0FB8 00 .byte 0x00; 0FB9 3B .byte 0x3B; /* ";" */ 0FBA 00 .byte 0x00; 0FBB 3B .byte 0x3B; /* ";" */ 0FBC 00 .byte 0x00; 0FBD 3B .byte 0x3B; /* ";" */ 0FBE 00 .byte 0x00; 0FBF 3B .byte 0x3B; /* ";" */ 0FC0 00 .byte 0x00; 0FC1 3B .byte 0x3B; /* ";" */ 0FC2 00 .byte 0x00; 0FC3 3B .byte 0x3B; /* ";" */ 0FC4 00 .byte 0x00; 0FC5 3B .byte 0x3B; /* ";" */ 0FC6 00 .byte 0x00; 0FC7 3B .byte 0x3B; /* ";" */ 0FC8 00 .byte 0x00; 0FC9 3B .byte 0x3B; /* ";" */ 0FCA 00 .byte 0x00; 0FCB 3B .byte 0x3B; /* ";" */ 0FCC 00 .byte 0x00; 0FCD 3B .byte 0x3B; /* ";" */ 0FCE 00 .byte 0x00; 0FCF 3B .byte 0x3B; /* ";" */ 0FD0 00 .byte 0x00; 0FD1 3B .byte 0x3B; /* ";" */ 0FD2 00 .byte 0x00; 0FD3 3B .byte 0x3B; /* ";" */ 0FD4 00 .byte 0x00; 0FD5 3B .byte 0x3B; /* ";" */ 0FD6 00 .byte 0x00; 0FD7 3B .byte 0x3B; /* ";" */ 0FD8 00 .byte 0x00; 0FD9 3B .byte 0x3B; /* ";" */ 0FDA 00 .byte 0x00; 0FDB 3B .byte 0x3B; /* ";" */ 0FDC 00 .byte 0x00; 0FDD 3B .byte 0x3B; /* ";" */ 0FDE 00 .byte 0x00; 0FDF 3B .byte 0x3B; /* ";" */ 0FE0 00 .byte 0x00; 0FE1 3B .byte 0x3B; /* ";" */ 0FE2 00 .byte 0x00; 0FE3 3B .byte 0x3B; /* ";" */ 0FE4 00 .byte 0x00; 0FE5 3B .byte 0x3B; /* ";" */ 0FE6 00 .byte 0x00; 0FE7 3B .byte 0x3B; /* ";" */ 0FE8 00 .byte 0x00; 0FE9 3B .byte 0x3B; /* ";" */ 0FEA 00 .byte 0x00; 0FEB 3B .byte 0x3B; /* ";" */ 0FEC 00 .byte 0x00; 0FED 3B .byte 0x3B; /* ";" */ 0FEE 00 .byte 0x00; 0FEF 3B .byte 0x3B; /* ";" */ 0FF0 00 .byte 0x00; 0FF1 3B .byte 0x3B; /* ";" */ 0FF2 00 .byte 0x00; 0FF3 3B .byte 0x3B; /* ";" */ 0FF4 00 .byte 0x00; 0FF5 3B .byte 0x3B; /* ";" */ 0FF6 00 .byte 0x00; 0FF7 3B .byte 0x3B; /* ";" */ 0FF8 00 .byte 0x00; 0FF9 3B .byte 0x3B; /* ";" */ 0FFA 00 .byte 0x00; 0FFB 3B .byte 0x3B; /* ";" */ 0FFC 00 .byte 0x00; 0FFD 3B .byte 0x3B; /* ";" */ 0FFE 00 .byte 0x00; 0FFF 3B .byte 0x3B; /* ";" */ + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!elroy.jpl.nasa.gov!swrinde!howland.reston.ans.net!torn!newshost.uwo.ca!gaul.csd.uwo.ca!magundi From: magundi@gaul.csd.uwo.ca (john macdonald) Newsgroups: rec.games.vectrex Subject: Star Castle source Date: 24 Aug 1994 14:29:07 GMT Organization: Computer Science Dept., Univ. of Western Ontario, London, Canada Lines: 2262 Distribution: world Message-ID: <33flfj$1n4@falcon.ccs.uwo.ca> NNTP-Posting-Host: obelix.gaul.csd.uwo.ca From fred@hpcvusc.cv.hp.com Wed Aug 24 09:47 EDT 1994 Date: Wed, 24 Aug 1994 06:47:27 -0700 From: Fred Taft To: magundi@uwo.ca Subject: Star Castle source Status: O /* * This work was originally done by Fred Taft (fred@hp-pcd.cv.hp.com). * Please forward any comments, corrections or additions back to Fred. * * Star Castle */ .org 0x0000; 0000 67 .byte "g GCE 1983",0x80; 000B 0D .word star_castle_music; 000D F8 .byte 0xF8; /* height */ 000E 50 .byte 0x50; /* width */ 000F 00 .byte 0x00; /* rel y */ 0010 B0 .byte 0xB0; /* rel x */ 0011 53 .byte "STAR CASTLE",0x80,0x00; star_castle: 001E 7DC83B tst $C83B; /* The following block of code is */ 0021 2724 beq restart_game;/* called only the first time the */ 0023 BDF1AA jsr $dptoD0; /* game is powered up, and only if*/ 0026 BDF1BA jsr $read_switches2; /* buttons 1,2 & 4 are all*/ 0029 B6C80F lda $C80F; /* simultaneously pressed. This */ 002C 810B cmpa #0x0B; /* code will display the name of the */ 002E 2617 bne restart_game;/* programmer, until either the*/ 0030 CCFB40 ldd #0xFB40; /* counter at C88A decrements to 0*/ 0033 FDC82A std $C82A; /* or the buttons are no longer */ 0036 CE0FA4 P0036: ldu #author; /* pressed. */ 0039 BDF38A jsr $printu2; 003C BDF192 jsr $waitrecal; 003F BDF2A5 jsr $intensity_to_5F; 0042 7AC88A dec $C88A; 0045 26EF bne P0036; /* * Initialize variables, and set the users score string * to its default values. */ restart_game: 0047 8EC880 ldx #0xC880; /* Initialize RAM area. / 004A BDF545 jsr $clear_256_bytes; 004D BDF1AF jsr $dptoC8; 0050 8605 lda #0x05; /* Set player 1's ship count. */ 0052 979D sta 0x9D; 0054 8EC8B0 ldx #0xC8B0; /* Init player 1's score string. */ 0057 BDF84F jsr $set_dft_score; 005A 8EC8D0 ldx #0xC8D0; /* Init player 2's score string. */ 005D BDF84F jsr $set_dft_score; /* Fill in the user's data area to its initial values. */ 0060 8EC8CC ldx #0xC8CC; /* Address of user 2's data area. */ 0063 8680 lda #0x80; 0065 A71D sta -3,x; /* Set player 2 state to "inactive". */ 0067 CCE090 ldd #0xE090; 006A ED13 std -13,x; /* Set initial (y,x) location. */ 006C 8630 lda #0x30; 006E A710 sta -16,x; /* Set initial cruiser rotation. */ 0070 8EC8AC ldx #0xC8AC; /* Address of user 1's data area. */ 0073 CC1070 ldd #0x1070; 0076 ED13 std -13,x; /* Set initial (y,x) location. */ 0078 8610 lda #0x10; 007A A710 sta -16,x; /* Set initial cruiser rotation. */ /* Ask user for the game #, and number of players. */ 007C CC0060 ldd #0x0060; /* Set initial ring rotation deltas. */ 007F FDC930 std $C930; 0082 CC0202 ldd #0x0202; /*At first, allow 2 games & 2 players.*/ 0085 0F91 clr 0x91; 0087 DD92 std 0x92; 0089 BDF7A9 jsr $get_players_game; 008C 047A lsr 0x7A; /* Check which game was selected. */ 008E 2503 blo P0093; 0090 74C931 P0090: lsr $C931; /* Game 2;use slower rotation deltas. */ 0093 0F7A P0093: clr 0x7A; 0095 0479 lsr 0x79; /* If 2 players were selected, then */ 0097 2715 beq P00AE; /* allow the user to select one of 3*/ 0099 8605 lda #0x05; /* 2 person games. */ 009B 97BD sta 0xBD; /* Init ship count for player 2. */ 009D CC0003 ldd #0x0003; /* Allow 3 games. */ 00A0 BDF7A9 jsr $get_players_game; 00A3 0C79 inc 0x79; 00A5 0A7A dec 0x7A; /* Determine if 2 person, simultaneous */ 00A7 967A lda 0x7A; /* play was chosen; i.e. if game 3 was */ 00A9 44 lsra; /* selected. */ 00AA 2702 beq P00AE; 00AC 0FC9 clr 0xC9; /* Flag simultaneous play. */ 00AE 0C24 P00AE: inc 0x24; 00B0 CCC9C8 ldd #0xC9C8; /* Address of player 1 bullet buffer. */ 00B3 DDAC std 0xAC; 00B5 CCC9F4 ldd #0xC9F4; /* Address of player 2 bullet buffer. */ 00B8 DDAE std 0xAE; 00BA DDCC std 0xCC; 00BC CCCA20 ldd #0xCA20; 00BF DDCE std 0xCE; 00C1 0A8F dec 0x8F; /* Backup both players info data areas.*/ 00C3 BD0BD1 jsr $change_player; 00C6 0A8F dec 0x8F; 00C8 FCCA62 ldd $CA62; 00CB FDC930 std $C930; 00CE BD0BD1 jsr $change_player; 00D1 0FE1 clr 0xE1; 00D3 BDF192 P00D3: jsr $waitrecal; 00D6 BDF289 jsr $do_sound; 00D9 8688 lda #0x88; /* Set the button mask required */ 00DB F6C88D ldb $C88D; /* by the read_switches routine.*/ 00DE 2701 beq P00E1; 00E0 43 coma; 00E1 BDF1B4 P00E1: jsr $read_switches; 00E4 BDF1F8 jsr $read_jstick; 00E7 BDF2A1 jsr $intensity_to_3F; 00EA B6C88D lda $C88D; /* Check if the game is over. */ 00ED 10260397 lbne P0488; /* * If player 1 is still alive, then transform his star * cruiser, and draw it. */ 00F1 108EC8AC ldy #0xC8AC; 00F5 A63D lda -3,y; /* Check if player 1 is alive. */ 00F7 2B1B bmi P0114; 00F9 A630 lda -16,y; /* Get cruiser's rotation value. */ 00FB C608 ldb #0x08; /* Load the number of points (9).*/ 00FD 8E0E1F ldx #star_cruiser1; /* Addr of cruiser 1's V list.*/ 0100 CEC932 ldu #0xC932; /* Addr of transformation buffer.*/ 0103 BDF610 jsr $rotate_vector_list2; 0106 EC33 ldd -13,y; /* Location of player 1's cruiser.*/ 0108 BDF2FC jsr $move_pen7F_to_d; 010B CC080D ldd #0x080D; /* (number of pts, scale factor).*/ 010E 8EC932 ldx #0xC932; 0111 BDF3B7 jsr $move_then_draw_VL_with_count4; /* * If player 2 is still alive, then transform his star * cruiser, and draw it. */ 0114 108EC8CC P0114: ldy #0xC8CC; 0118 A63D lda -3,y; /* Check if player 2 is alive. */ 011A 2B1B bmi P0137; 011C A630 lda -16,y; /* Get cruiser's rotation value. */ 011E C60A ldb #0x0A; /* Load the number of points (11).*/ 0120 8E0E31 ldx #star_cruiser2; /* Addr of cruiser 2's V list.*/ 0123 CEC932 ldu #0xC932; /* Addr of transformation buffer.*/ 0126 BDF610 jsr $rotate_vector_list2; 0129 EC33 ldd -13,y; /* Location of player 2's cruiser.*/ 012B BDF2FC jsr $move_pen7F_to_d; 012E CC0A0D ldd #0x0A0D; /* (number of pts, scale factor).*/ 0131 8EC932 ldx #0xC932; 0134 BDF3B7 jsr $move_then_draw_VL_with_count4; /* Update the position of all active bullets. */ 0137 BDF2A9 P0137: jsr $intensity_to_7F; 013A 8EC9C8 ldx #0xC9C8; /* Address of bullet buffer. */ 013D E600 P013D: ldb 0,x; /* Check if bullet is active. */ 013F 274F beq P0190; /* Bullet is inactive, so skip. */ 0141 2A26 bpl P0169; /* Bullet is exploding. */ 0143 6A09 dec 9,x; /* Decrement life span, and continue */ 0145 2747 beq P018E; /* only if bullet is still 'alive'. */ 0147 EC05 ldd 5,x; /* Get original y position. */ 0149 1E89 exg a,b; 014B E301 addd 1,x; /* Add the delta to it. */ 014D 1E89 exg a,b; 014F ED05 std 5,x; /* Update bullet's y position. */ 0151 EC07 ldd 7,x; /* Get original x position. */ 0153 E303 addd 3,x; /* Add the delta to it. */ 0155 ED07 std 7,x; /* Update bullet's x position. */ 0157 3410 pshs x; 0159 3006 leax 6,x; /* Draw a dot at the bullet's new */ 015B 867F lda #0x7F; /* position. */ 015D 9704 sta 0x04; 015F BDF2C1 jsr $dotix; 0162 BDF354 jsr $reset0ref; 0165 3510 puls x; 0167 2027 bra P0190; /* Bullet is exploding; so draw an explosion pattern */ 0169 EC06 P0169: ldd 6,x; /* Move to bullets position. */ 016B BDF2FC jsr $move_pen7F_to_d; 016E E60A ldb 10,x; 0170 CB25 addb #0x25; /* Increment the explosion scale */ 0172 E70A stb 10,x; /* factor. */ 0174 2515 blo P018B; 0176 2A01 bpl P0179; 0178 50 negb; 0179 54 P0179: lsrb; /* Use the upper nibble of this */ 017A 54 lsrb; /* value as the scale factor. */ 017B 54 lsrb; 017C 54 lsrb; 017D D704 stb 0x04; 017F 3410 pshs x; 0181 8E0F55 ldx #explosion_star; 0184 BDF46E jsr $drawl2; /* Draw the explosion pattern. */ 0187 3510 puls x; 0189 2005 bra P0190; 018B BDF354 P018B: jsr $reset0ref; 018E 6F00 P018E: clr 0,x; /* Flag that bullet is now inactive. */ 0190 300B P0190: leax 11,x; /* Advance ptr to next bullet, and */ 0192 8CCA20 cmpx #0xCA20; /* continue, if not at end of buffer.*/ 0195 26A6 bne P013D; /* Transform and draw the energy cannon */ 0197 B6C88E lda $C88E; /* Skip next block if energy cannon */ 019A 2628 bne P01C4; /* has exploded, or a new screen is */ 019C B6C88F lda $C88F; /* being set up. */ 019F 102600B4 lbne P0257; 01A3 BDF2A1 jsr $intensity_to_3F; 01A6 B6C8DE lda $C8DE; /* Transform the energy cannon's */ 01A9 C60C ldb #0x0C; /* vector list. */ 01AB 8E0E47 ldx #energy_cannon; 01AE CEC932 ldu #0xC932; 01B1 BDF610 jsr $rotate_vector_list2; 01B4 86CE lda #0xCE; 01B6 970C sta 0x0C; 01B8 CC0C0E ldd #0x0C0E; /* Move to the origin, and then draw */ 01BB 8EC932 ldx #0xC932; /* the transformed energy cannon.*/ 01BE BDF3B7 jsr $move_then_draw_VL_with_count4; 01C1 7E0257 jmp $P0257; /* Draw the energy cannon exploding */ 01C4 8501 P01C4: bita #0x01; 01C6 2724 beq P01EC; 01C8 86CE lda #0xCE; 01CA 970C sta 0x0C; 01CC F6C8DD ldb $C8DD; /* Increment the scale factor used */ 01CF CB19 addb #0x19; /* when drawing the explosion pattern.*/ 01D1 F7C8DD stb $C8DD; 01D4 250D blo P01E3; 01D6 2A01 bpl P01D9; 01D8 50 negb; 01D9 D704 P01D9: stb 0x04; 01DB 8E0F55 ldx #explosion_star; 01DE BDF46E jsr $drawl2; /* Draw the explosion pattern. */ 01E1 2074 bra P0257; /* Flag that the explosion is over */ 01E3 7FC8DD P01E3: clr $C8DD; 01E6 78C88E asl $C88E; 01E9 BDF354 jsr $reset0ref; /* Collapse the 3 walls inward */ 01EC 8EC8F3 P01EC: ldx #0xC8F3; 01EF 7FC882 clr $C882; 01F2 A684 P01F2: lda ,x; /* When a rings scale factor reaches */ 01F4 8104 cmpa #0x04; /* 4, flag that the ring has completely*/ 01F6 221A bhi P0212; /* collapsed, by incrementing C882. */ 01F8 7CC882 inc $C882; 01FB 8104 cmpa #0x04; 01FD 261A bne P0219; 01FF 3410 pshs x; /* Now clear all the patterns for this */ 0201 3002 leax 2,x; /* ring, so it will disappear. */ 0203 C607 ldb #0x07; 0205 BDF53F jsr $clear_blockxb; 0208 30881E leax 0x1E,x; 020B C607 ldb #0x07; 020D BDF53F jsr $clear_blockxb; 0210 3510 puls x; 0212 33881E P0212: leau 0x1E,x; /* Decrement the scale factor used */ 0215 6AC4 dec ,u; /* to draw this ring. */ 0217 6A84 dec ,x; 0219 300A P0219: leax 10,x; /* Go onto the next ring. */ 021B 8CC908 cmpx #0xC908; 021E 25D2 blo P01F2; /* See if all 3 rings have finally collapsed inward */ 0220 B6C882 lda $C882; /* If all 3 rings have collapsed, */ 0223 8103 cmpa #0x03; /* then force an explosion sound, */ 0225 2630 bne P0257; /* and have another explosion */ 0227 B6C877 lda $C877; /* pattern displayed. */ 022A 2708 beq P0234; 022C B6C890 lda $C890; 022F 8A80 ora #0x80; 0231 B7C890 sta $C890; 0234 F6C8DD P0234: ldb $C8DD; /* Calculate the scale factor to use */ 0237 CB0A addb #0x0A; /* when drawing the explosion pattern.*/ 0239 F7C8DD stb $C8DD; 023C 2513 blo P0251; 023E D704 stb 0x04; 0240 86CE lda #0xCE; 0242 970C sta 0x0C; 0244 860E lda #0x0E; 0246 B7C823 sta $C823; 0249 8E0F86 ldx #explosion_dots; 024C BDF2D5 jsr $dot_list; /* Draw the explosion pattern. */ 024F 2006 bra P0257; /* Flag that the level was cleared */ 0251 7FC88E P0251: clr $C88E; 0254 7AC88F dec $C88F; /* Process the fireball, if active */ 0257 BDF2A1 P0257: jsr $intensity_to_3F; 025A B6C8E1 lda $C8E1; 025D 10270076 lbeq P02D7; /* Fireball not active. */ 0261 2A39 bpl P029C; /* Fireball exploding. */ 0263 B6C890 lda $C890; /* Fireball moving. */ 0266 8A40 ora #0x40; 0268 B7C890 sta $C890; /* Force a fireball sound. */ 026B FCC8E6 ldd $C8E6; 026E 1E89 exg a,b; /* Update y position of fireball, */ 0270 F3C8E2 addd $C8E2; /* and check to see if it went off*/ 0273 295F bvs P02D4; /* the screen. */ 0275 1E89 exg a,b; 0277 FDC8E6 std $C8E6; 027A FCC8E8 ldd $C8E8; /* Update x position of fireball, */ 027D F3C8E4 addd $C8E4; /* and check to see if it went off*/ 0280 2952 bvs P02D4; /* the screen. */ 0282 FDC8E8 std $C8E8; 0285 FCC8E7 ldd $C8E7; /* Move to fireball's position. */ 0288 BDF2FC jsr $move_pen7F_to_d; 028B 8608 lda #0x08; 028D F6C8E0 ldb $C8E0; /* Draw the fireball. */ 0290 54 lsrb; 0291 8E0E61 ldx #fireball; 0294 BDF3B7 jsr $move_then_draw_VL_with_count4; 0297 7CC8E0 inc $C8E0; /* Increment the scale factor. */ 029A 203B bra P02D7; /* Process the exploding firebal */ 029C FCC8E7 P029C: ldd $C8E7; /* Move to fireball's position. */ 029F BDF2FC jsr $move_pen7F_to_d; 02A2 F6C8EA ldb $C8EA; 02A5 CB14 addb #0x14; /* Increment explosion's scale factor.*/ 02A7 F7C8EA stb $C8EA; 02AA 2512 blo P02BE; 02AC 54 lsrb; 02AD 54 lsrb; 02AE 54 lsrb; 02AF D704 stb 0x04; /* Set scale factor. */ 02B1 860E lda #0x0E; 02B3 B7C823 sta $C823; 02B6 8E0F86 ldx #explosion_dots; 02B9 BDF2D5 jsr $dot_list; /* Draw the explostion pattern. */ 02BC 2019 bra P02D7; /* Clean up after the fireball explosion has finished */ 02BE BDF354 P02BE: jsr $reset0ref; 02C1 7FC8EA clr $C8EA; /* Clear explosion scale factor.*/ 02C4 B6C89D lda $C89D; /* If both player 1 & 2 are out */ 02C7 BAC8BD ora $C8BD; /* of cruisers, then set the */ 02CA 2605 bne P02D1; /* 'game over' flag (C88D). */ 02CC 7AC88D dec $C88D; 02CF 2003 bra P02D4; /* Get ready for the next player */ 02D1 BD0382 P02D1: jsr $P0382; 02D4 7FC8E1 P02D4: clr $C8E1; /* Disable the fireball. */ /* Transform the 3 rotating rings */ 02D7 C608 P02D7: ldb #0x08; /* Number of vectors (9). */ 02D9 B6C8ED lda $C8ED; /* Ring 1's rotation value. */ 02DC 8E0F33 ldx #ring; /* Ptr to ring vector list. */ 02DF CEC932 ldu #0xC932; /* Ptr to xformation buffer.*/ 02E2 BDF610 jsr $rotate_vector_list2; 02E5 C608 ldb #0x08; /* Number of vectors (9). */ 02E7 B6C8EF lda $C8EF; /* Ring 2's rotation value. */ 02EA 8E0F33 ldx #ring; /* Ptr to ring vector list. */ 02ED BDF610 jsr $rotate_vector_list2; 02F0 C608 ldb #0x08; /* Number of vectors (9). */ 02F2 B6C8F1 lda $C8F1; /* Ring 3's rotation value. */ 02F5 8E0F33 ldx #ring; /* Ptr to ring vector list. */ 02F8 BDF610 jsr $rotate_vector_list2; /* Draw the 3 rotating rings */ 02FB CEC8F3 ldu #0xC8F3; /* Ptr to scales & line patterns. */ 02FE 8EC932 ldx #0xC932; /* Ptr to transformation buffer. */ 0301 BD0C4C jsr $draw_1_ring; /* Draw ring 1. */ 0304 BD0C4C jsr $draw_1_ring; /* Draw ring 2. */ 0307 BD0C4C jsr $draw_1_ring; /* Draw ring 3. */ 030A BDF2A9 jsr $intensity_to_7F; 030D 8EC932 ldx #0xC932; /* Hi-lite rings hit with 1 bullet. */ 0310 BD0C4C jsr $draw_1_ring; /* Draw ring 1. */ 0313 BD0C4C jsr $draw_1_ring; /* Draw ring 2. */ 0316 BD0C4C jsr $draw_1_ring; /* Draw ring 3. */ 0319 BDF2A1 jsr $intensity_to_3F; /* START OF ENERGY BOMB PROCESSING LOOP */ /* Process energy bombs */ 031C CEC978 ldu #0xC978; /* Addr of energy bomb buffer. */ 031F BDF517 P031F: jsr $get_random_a; 0322 8407 anda #0x07; /* Randomly select 1 of 8 vector */ 0324 8E0E73 ldx #energy_bomb_VL_table; 0327 48 asla; /* lists to be used when drawing */ 0328 AE86 ldx a,x; /* this energy bomb. */ 032A A65D lda -3,u; /* See if we should draw energy bomb */ 032C 8540 bita #0x40; /* or an explosion pattern. */ 032E 2616 bne P0346; 0330 4D tsta; 0331 102B00D5 lbmi P040A; /* Energy bomb is not in use. */ 0335 8117 cmpa #0x17; 0337 235E bls P0397; /* Energy bomb is still on a ring. */ /* Energy bomb is moving; draw its vector list */ 0339 EC53 ldd -13,u; /* Move to position of energy bomb. */ 033B BDF2FC jsr $move_pen7F_to_d; 033E C60B ldb #0x0B; 0340 BDF40E jsr $drawl1b; /* Draw the energy bomb. */ 0343 7E040A jmp $P040A; /* Draw an explosion pattern at position of energy bomb */ 0346 EC53 P0346: ldd -13,u; /* Move to position of energy bomb. */ 0348 BDF2FC jsr $move_pen7F_to_d; 034B E65E ldb -2,u; 034D CB14 addb #0x14; /* Increment explosion scale factor */ 034F E75E stb -2,u; /* and stop when it overflows. */ 0351 2513 blo P0366; 0353 54 lsrb; 0354 54 lsrb; 0355 54 lsrb; 0356 D704 stb 0x04; /* Set the scale factor. */ 0358 860E lda #0x0E; 035A B7C823 sta $C823; /* Number of dots to draw. */ 035D 8E0F86 ldx #explosion_dots; 0360 BDF2D5 jsr $dot_list; /* Draw the explosion dots. */ 0363 7E040A jmp $P040A; /* Clean up after an energy bomb explosion */ 0366 BDF354 P0366: jsr $reset0ref; 0369 6F5E clr -2,u; 036B 8680 lda #0x80; /* Flag that this slot is no longer */ 036D A75D sta -3,u; /* in use. */ 036F B6C89D lda $C89D; 0372 BAC8BD ora $C8BD; /* See if either player has any */ 0375 2606 bne P037D; /* cruisers left. */ 0377 7AC88D dec $C88D; 037A 7E040A jmp $P040A; /* Flag that game is over. */ /* See if "PLAYER X" string needs to be displayed */ 037D 8E0394 P037D: ldx #P0394; 0380 3410 P0380: pshs x; 0382 B6C879 P0382: lda $C879; /* If a 2 person, non-simultaneous */ 0385 270C beq P0393; /* game is being played, then force*/ 0387 B6C87A lda $C87A; /* the "PLAYER X" string to be shown by*/ 038A 44 lsra; /* setting the 'change player' counter*/ 038B 2606 bne P0393; 038D 7FC88B clr $C88B; /* Set 'change player' loop counter. */ 0390 7AC88B dec $C88B; 0393 39 P0393: rts; 0394 7E040A P0394: jmp $P040A; /* Draw the energy bomb on one of the rings */ 0397 7FC824 P0397: clr $C824; /* Temporarily disable reset of 0ref. */ 039A BFC880 stx $C880; /* Save pointer to vector list. */ 039D C6CE ldb #0xCE; 039F D70C stb 0x0C; 03A1 108EC8F3 ldy #0xC8F3; /* Addr of ring line patterns. */ 03A5 8EC932 ldx #0xC932; /* Addr of xformed ring vectors.*/ 03A8 44 lsra; 03A9 44 lsra; /* Use lower 4 bits of the bomb state */ 03AA 44 lsra; /* to determine which ring the bomb */ 03AB B7C885 sta $C885; /* is on, & then point 'y' to the */ 03AE 2708 P03AE: beq P03B8; /* patterns for the ring, and 'x' */ 03B0 312A leay 10,y; /* to the vector list for the ring.*/ 03B2 308812 leax 0x12,x; 03B5 4A deca; 03B6 20F6 bra P03AE; 03B8 A6A4 P03B8: lda ,y; /* Use the ring's scale factor. */ 03BA 9704 sta 0x04; 03BC B7C882 sta $C882; 03BF A65D lda -3,u; /* Determine which ring section to */ 03C1 8407 anda #0x07; /* put the energy bomb on. */ 03C3 B7C883 sta $C883; 03C6 B7C884 sta $C884; 03C9 BDF3BC P03C9: jsr $move_to_pt; 03CC 7AC883 dec $C883; /* Move to starting point for section.*/ 03CF 2CF8 bge P03C9; 03D1 B6C882 lda $C882; 03D4 44 lsra; 03D5 9704 sta 0x04; /* Now, move to center of section. */ 03D7 BDF3BC jsr $move_to_pt; 03DA BEC880 ldx $C880; 03DD 7CC824 inc $C824; /* Draw the energy bomb here. */ 03E0 C60B ldb #0x0B; 03E2 BDF40E jsr $drawl1b; 03E5 8EC8ED ldx #0xC8ED; 03E8 B6C885 lda $C885; 03EB 4A P03EB: deca; /* Now, determine what the (y,x) */ 03EC 2D04 blt P03F2; /* position is of this energy bomb. */ 03EE 3002 leax 2,x; 03F0 20F9 bra P03EB; 03F2 E684 P03F2: ldb ,x; 03F4 86C8 lda #0xC8; 03F6 1F8B tfr a,dp; 03F8 9684 lda 0x84; 03FA CB08 P03FA: addb #0x08; 03FC 4A deca; 03FD 2CFB bge P03FA; 03FF 9682 lda 0x82; 0401 BDF5FF jsr $convert_abs_angle_to_rise_run; 0404 ED53 P0404: std -13,u; /* Save the calculated position. */ 0406 86D0 lda #0xD0; 0408 1F8B tfr a,dp; 040A 33C820 P040A: leau 0x20,u; /* Process the next energy bomb */ 040D 1183C9B8 cmpu #0xC9B8; /* entry, until no more left. */ 0411 1023FF0A lbls P031F; /* END OF THE ENERGY BOMB PROCESSING LOOP */ 0415 BDF2A9 jsr $intensity_to_7F; 0418 B6C88C lda $C88C; 041B 272A beq P0447; 041D 81FF cmpa #0xFF; 041F 2600 bne P0421; /* Display "GAME OVER PLAYER 1/2" */ 0421 CCF950 P0421: ldd #0xF950; /* Set height & width of string. */ 0424 FDC82A std $C82A; 0427 CE0FD4 ldu #game_over; 042A BDF378 jsr $print_with_dft_hw; 042D CE0FE0 ldu #player1; 0430 8EC8AC ldx #0xC8AC; /* Determine if player 1 or 2. */ 0433 A611 lda -15,x; 0435 2703 beq P043A; 0437 CE0FEB ldu #player2; 043A BDF378 P043A: jsr $print_with_dft_hw; 043D 7AC88C dec $C88C; 0440 10260083 lbne display_scores; 0444 160080 lbra display_scores; /* Prepare for the next player to start playing */ 0447 B6C88E P0447: lda $C88E; /* Skip if energy cannon exploding. */ 044A 267B bne display_scores; 044C B6C88B lda $C88B; /* Display "PLAYER X" only if (while) */ 044F 2776 beq display_scores; /* loop counter != 0. */ 0451 81FF cmpa #0xFF; 0453 2615 bne P046A; 0455 BD0BD1 jsr $change_player; /* Backup dead players info. */ 0458 8EC8AC ldx #0xC8AC; 045B B6C8DC lda $C8DC; /* Get pointer to data area for */ 045E 2703 beq P0463; /* the next player. */ 0460 8EC8CC ldx #0xC8CC; 0463 A611 P0463: lda -15,x; /* If new player has no ships, then go */ 0465 2E03 bgt P046A; /* back to the user who just died. */ 0467 BD0BD1 jsr $change_player; 046A CCF950 P046A: ldd #0xF950; 046D FDC82A std $C82A; /* Display "PLAYER X" string. */ 0470 CE0FE0 ldu #player1; 0473 B6C8DC lda $C8DC; 0476 2703 beq P047B; 0478 CE0FEB ldu #player2; 047B BDF378 P047B: jsr $print_with_dft_hw; 047E 7AC88B dec $C88B; 0481 2744 beq display_scores; /* Decr the 'change player' */ 0483 7AC88B dec $C88B; /* counter. Stop displaying "PLAYER X"*/ 0486 203F bra display_scores; /* string when it decrs to 0. */ /* Display "GAME OVER" & see if user wants a new game */ 0488 BDF2A9 P0488: jsr $intensity_to_7F; 048B CCF950 ldd #0xF950; /* Set height & width of string. */ 048E FDC82A std $C82A; 0491 CE0FD6 ldu #game_over2; 0494 CC00D0 ldd #0x00D0; /* Position for displaying string. */ 0497 BDF2FC jsr $move_pen7F_to_d; 049A BDF495 jsr $display_string; 049D B6C879 lda $C879; /* Force both players scores to */ 04A0 2705 beq P04A7; /* be displayed. */ 04A2 8602 lda #0x02; 04A4 B7C87A sta $C87A; 04A7 7AC88A P04A7: dec $C88A; 04AA 260D bne P04B9; 04AC 7CC88A inc $C88A; 04AF B6C811 lda $C811; /* Restart new game if either button */ 04B2 8477 anda #0x77; /* 1, 2 or 3 is pressed on either */ 04B4 2703 beq P04B9; /* console. */ 04B6 7E0047 jmp $restart_game; /* If a new game is not eventually started, go to OS ROM */ 04B9 B6C826 P04B9: lda $C826; 04BC 44 lsra; /* Everyother pass thru loop */ 04BD 2408 bhs display_scores; /* decr counter; if it goes */ 04BF 7AC88D dec $C88D; /* to 0, then pass control */ 04C2 2603 bne display_scores; /* back to OS ROM. */ 04C4 7EF000 jmp $start_of_OS_ROM; /* Display the individual or simultaneous player scores */ display_scores: 04C7 CCFC47 ldd #0xFC47; /* Set height & width of string. */ 04CA FDC82A std $C82A; 04CD B6C879 lda $C879; /* Determine if both player's scores */ 04D0 2735 beq display_player1_score; /* are to be displayed */ 04D2 B6C87A lda $C87A; /* (simul play) or if only a single */ 04D5 44 lsra; /* players score is to be displayed. */ 04D6 2605 bne display_player2_score; 04D8 B6C8DC lda $C8DC; /* C8DC says who's turn it is. */ 04DB 272A beq display_player1_score; /* Display player 2's score */ display_player2_score: 04DD CC7F80 ldd #0x7F80; /* Position of score string. */ 04E0 BDF2FC jsr $move_pen7F_to_d; 04E3 CEC8D0 ldu #0xC8D0; /* Addr of player 2's score string. */ 04E6 BDF495 jsr $display_string; /* Display player 2's ship count */ 04E9 BD0C0F jsr $init_ship_count_buffer; 04EC B6C8BD lda $C8BD; /* Get the ship count. */ 04EF BD0C20 jsr $fill_ship_count_buffer; 04F2 CEC932 ldu #0xC932; /* Addr of ship count buffer. */ 04F5 CCFD30 ldd #0xFD30; /* Height & width to use. */ 04F8 FDC82A std $C82A; 04FB CC6F90 ldd #0x6F90; /* Position for displaying. */ 04FE BDF37A jsr $print_at_d; 0501 B6C87A lda $C87A; /* Display player 1's score only if */ 0504 44 lsra; /* game is over, or simultaneous play.*/ 0505 272A beq P0531; /* Display player 1's score */ display_player1_score: 0507 CC7F20 ldd #0x7F20; /* Position for displaying. */ 050A BDF2FC jsr $move_pen7F_to_d; 050D CEC8B0 ldu #0xC8B0; /* Addr of player 1's score string. */ 0510 CCFC47 ldd #0xFC47; /* Height & width to use. */ 0513 FDC82A std $C82A; 0516 BDF495 jsr $display_string; /* Display player 1's ship count */ 0519 BD0C0F jsr $init_ship_count_buffer; 051C B6C89D lda $C89D; /* Get the ship count. */ 051F BD0C20 jsr $fill_ship_count_buffer; 0522 CEC932 ldu #0xC932; /* Addr of ship count buffer. */ 0525 CCFD30 ldd #0xFD30; /* Height & width to use. */ 0528 FDC82A std $C82A; 052B CC6F20 ldd #0x6F20; /* Position for displaying. */ 052E BDF37A jsr $print_at_d; /* Make game sounds */ 0531 BDF1AF P0531: jsr $dptoC8; 0534 BD0C88 jsr $make_game_sounds; /* Don't process joystick or buttons if game is over */ 0537 968D lda 0x8D; 0539 1026FB96 lbne P00D3; /* Read joystick and buttons, for player 1 */ 053D CEC8AC ldu #0xC8AC; 0540 9611 lda 0x11; /* Get console 1 button states. */ 0542 D61B ldb 0x1B; /* Get joystick 1 state. */ 0544 2708 beq P054E; 0546 2B04 bmi P054C; 0548 8A02 ora #0x02; /* Convert joystick movements */ 054A 2002 bra P054E; /* into button presses, to make */ 054C 8A01 P054C: ora #0x01; /* processing easier. */ 054E A75B P054E: sta -5,u; /* Save user 1's button states. */ /* Read joystick and buttons, for player 2 */ 0550 9611 lda 0x11; /* Get console 1 button states. */ 0552 D61B ldb 0x1B; /* Get joystick 1 state. */ 0554 0D7A tst 0x7A; 0556 2706 beq P055E; /* If simultaneous play, then use */ 0558 44 lsra; /* the buttons on console 2 and */ 0559 44 lsra; /* and read the joystick state on */ 055A 44 lsra; /* console 2 also. */ 055B 44 lsra; 055C D61D ldb 0x1D; 055E 5D P055E: tstb; 055F 2708 beq P0569; 0561 2B04 bmi P0567; /* Convert joystick movements to */ 0563 8A02 ora #0x02; /* button presses, to help make */ 0565 2002 bra P0569; /* processing easier. */ 0567 8A01 P0567: ora #0x01; 0569 A7C81B P0569: sta 0x1B,u; /* Save player 2's button states.*/ /* Once a player is dead, delay awhile before restarting him */ 056C A65D P056C: lda -3,u; 056E 2A37 bpl P05A7; 0570 A651 lda -15,u; /* Check the user's ship count. */ 0572 1027010C lbeq P0682; 0576 6A5F dec -1,u; /* Reset player's data area once */ 0578 2715 beq P058F; /* the restart counter goes to 0.*/ 057A 6A5F dec -1,u; 057C 2711 beq P058F; 057E A65F lda -1,u; 0580 81F0 cmpa #0xF0; 0582 102200FC lbhi P0682; 0586 9690 lda 0x90; 0588 8A02 ora #0x02; 058A 9790 sta 0x90; 058C 7E0682 jmp $P0682; /* Reset the data area for this user */ 058F 6F5D P058F: clr -3,u; 0591 8E1070 ldx #0x1070; /* Player 1 initial position. */ 0594 8610 lda #0x10; /* Player 1 rotation value. */ 0596 1183C8CC cmpu #0xC8CC; /* Is this player 2? */ 059A 2505 blo P05A1; 059C 8EE090 ldx #0xE090; /* Player 2 initial position. */ 059F 8630 lda #0x30; /* Player 2 rotation value. */ 05A1 AF53 P05A1: stx -13,u; /* Set cruiser's position. */ 05A3 A750 sta -16,u; /* Set cruiser's rotation. */ 05A5 6F5A clr -6,u; 05A7 86FF P05A7: lda #0xFF; 05A9 A75F sta -1,u; /* Process the button states now */ /* Check for rotate left command */ 05AB A65B lda -5,u; 05AD 8501 bita #0x01; /* If button 1 was pressed, then */ 05AF 2702 beq P05B3; /* rotate the cruiser to the left. */ 05B1 6C50 inc -16,u; /* Check for rotate right command */ 05B3 8502 P05B3: bita #0x02; /* If button 2 was pressed, then */ 05B5 2702 beq P05B9; /* rotate the cruiser to the right.*/ 05B7 6A50 dec -16,u; /* Check for a bullet fire request */ 05B9 8508 P05B9: bita #0x08; /* If button 4 was pressed, then */ 05BB 2741 beq P05FE; /* search the bullet buffer for an */ 05BD D68E ldb 0x8E; /* available spot. */ 05BF DA8F orb 0x8F; 05C1 263B bne P05FE; /* Ignore, if energy cannon destroyed.*/ 05C3 AE40 ldx 0,u; 05C5 E600 P05C5: ldb 0,x; /* Find an available spot in buffer.*/ 05C7 2708 beq P05D1; 05C9 300B leax 11,x; 05CB AC42 cmpx 2,u; 05CD 26F6 bne P05C5; 05CF 202D bra P05FE; 05D1 9690 P05D1: lda 0x90; 05D3 8A20 ora #0x20; 05D5 9790 sta 0x90; 05D7 EC52 ldd -14,u; /* Use ship's y position as bullet's */ 05D9 ED05 std 5,x; /* initial y position. */ 05DB EC54 ldd -12,u; /* Use ship's x position as bullet's */ 05DD ED07 std 7,x; /* initial x position. */ 05DF E650 ldb -16,u; /* Calculate rise & run for the bullet.*/ 05E1 867F lda #0x7F; 05E3 BDF601 jsr $convert_angle_to_rise_run; 05E6 DD85 std 0x85; 05E8 D685 ldb 0x85; 05EA BD0C31 jsr $mult_rise_run_by_9; 05ED ED01 std 1,x; /* Save the rise. */ 05EF D686 ldb 0x86; 05F1 BD0C31 jsr $mult_rise_run_by_9; 05F4 ED03 std 3,x; /* Save the run. */ 05F6 8630 lda #0x30; 05F8 A709 sta 9,x; /* Set bullet's life span value. */ 05FA 6300 com 0,x; /* Flag that buffer spot is in use. */ /* Check for a thrust request */ 05FC A65B lda -5,u; 05FE 8504 P05FE: bita #0x04; /* If button 3 was pressed, then */ 0600 271F beq P0621; /* update the cruiser's velocity, and */ 0602 9690 lda 0x90; /* update the cruiser's position.*/ 0604 8A04 ora #0x04; 0606 9790 sta 0x90; /* Force a ship movement sound. */ 0608 A65A lda -6,u; 060A 810F cmpa #0x0F; 060C 2413 bhs P0621; 060E 6C5A inc -6,u; /* Increment cruisers velocity. */ 0610 D626 ldb 0x26; 0612 54 lsrb; 0613 54 lsrb; 0614 2402 bhs P0618; 0616 6C5A inc -6,u; 0618 E650 P0618: ldb -16,u; /* Calulate new rise & run values. */ 061A 867F lda #0x7F; 061C BDF601 jsr $convert_angle_to_rise_run; 061F ED57 std -9,u; 0621 9626 P0621: lda 0x26; /* Decrement velocity every so ofter. */ 0623 8503 bita #0x03; 0625 2602 bne P0629; 0627 6A5A dec -6,u; /* Modify cruiser position, if velocity > 0 */ 0629 A65A P0629: lda -6,u; /* Calculate new y position. */ 062B 2F53 ble P0680; 062D 44 lsra; 062E E657 ldb -9,u; 0630 BD0C33 jsr $mult_rise_run_by_a; 0633 EC52 ldd -14,u; /* Multiply velocity * rise, and */ 0635 1E89 exg a,b; /* add it to old y position. */ 0637 D380 addd 0x80; 0639 1E89 exg a,b; 063B ED52 std -14,u; /* Save new y position. */ 063D A65A lda -6,u; /* Calculate new x position. */ 063F E658 ldb -8,u; 0641 44 lsra; 0642 BD0C33 jsr $mult_rise_run_by_a; 0645 EC54 ldd -12,u; /* Multiply velocity * run, and */ 0647 D380 addd 0x80; /* add it to old x position. */ 0649 ED54 std -12,u; /* Save new x position. */ /* See if the cruiser is trying to enter the ring area */ 064B EC53 ldd -13,u; 064D BDF584 jsr $get_absolute_value_of_ab; 0650 DD80 std 0x80; 0652 D680 ldb 0x80; /* Calculate x*x + y*y. */ 0654 3D mul; 0655 DD82 std 0x82; 0657 9681 lda 0x81; 0659 D681 ldb 0x81; 065B 3D mul; 065C D382 addd 0x82; /* Compare absolute ship position */ 065E 10830384 cmpd #0x0384; /* to the outer ring dimensions. */ 0662 221E bhi P0682; /* Cruise has attempted to enter ring area; turn it around */ 0664 EC53 ldd -13,u; /* Calc angle of cruiser from origin. */ 0666 BDF593 jsr $convert_rise_run_to_angle; 0669 C00A subb #0x0A; /* Convert angle to Vectrex reference.*/ 066B E750 stb -16,u; /* Set new angle for cruiser. */ 066D 867F lda #0x7F; 066F BDF601 jsr $convert_angle_to_rise_run; 0672 ED57 std -9,u; /* Save rise & run deltas. */ 0674 8606 lda #0x06; 0676 A75A sta -6,u; /* Force velocity to 6. */ 0678 9690 lda 0x90; 067A 8A10 ora #0x10; /* Force a sound. */ 067C 9790 sta 0x90; 067E 2002 bra P0682; /* Force ships velocity to 0 */ 0680 6F5A P0680: clr -6,u; /* See if the fireball has hit a star cruiser */ 0682 AE53 P0682: ldx -13,u; 0684 A65D lda -3,u; 0686 2B70 bmi P06F8; 0688 96E1 lda 0xE1; 068A 2A0E bpl P069A; 068C 109EE7 ldy 0xE7; /* Fireball position. */ 068F 96E0 lda 0xE0; /* Use scale * 2 as the size */ 0691 D6E0 ldb 0xE0; /* of the fireball. */ 0693 44 lsra; 0694 54 lsrb; 0695 BDF8FF jsr $check_bullet_for_hit; 0698 252B blo P06C5; /* Check to see if an energy bomb has hit a star cruiser */ 069A 3440 P069A: pshs u; 069C CEC978 ldu #0xC978; /* Addr of energy bomb buffer. */ 069F A65D P069F: lda -3,u; 06A1 8520 bita #0x20; 06A3 270B beq P06B0; 06A5 10AE53 ldy -13,u; /* Position of energy bomb. */ 06A8 CC0404 ldd #0x0404; 06AB BDF8FF jsr $check_bullet_for_hit; 06AE 250D blo P06BD; /* Branch, if a hit. */ 06B0 33C820 P06B0: leau 0x20,u; /* Check next energy bomb. */ 06B3 1183C9B8 cmpu #0xC9B8; /* Stop, when last bomb checked. */ 06B7 23E6 bls P069F; 06B9 3540 puls u; 06BB 203B bra P06F8; /* Star cruiser was hit by an energy bomb */ 06BD 86C0 P06BD: lda #0xC0; 06BF A75D sta -3,u; 06C1 3540 puls u; 06C3 2002 bra P06C7; 06C5 97E1 P06C5: sta 0xE1; /* Force explosion at fireball (y,x). */ 06C7 635D P06C7: com -3,u; /* Flag player as dead. */ 06C9 9690 lda 0x90; 06CB 8A80 ora #0x80; /* Force an explosion sound. */ 06CD 9790 sta 0x90; 06CF 8602 lda #0x02; 06D1 979B sta 0x9B; 06D3 6A5F dec -1,u; /* Set the restart timer. */ 06D5 6A51 dec -15,u; /* Decrement players cruiser count. */ 06D7 2618 bne P06F1; 06D9 3440 pshs u; /* Game over for this player, so see */ 06DB 3044 leax 4,u; /* if his score is a new hi score. */ 06DD CECBEB ldu #0xCBEB; 06E0 BDF8D8 jsr $check_4_new_hi_score; 06E3 3540 puls u; 06E5 9679 lda 0x79; 06E7 2708 beq P06F1; /* If neither player has any cruisers */ 06E9 969D lda 0x9D; /* left, then flag that the game is */ 06EB 9ABD ora 0xBD; /* over. */ 06ED 2702 beq P06F1; 06EF 0A8C dec 0x8C; 06F1 AE40 P06F1: ldx 0,u; /* Clear out users bullet buffer. */ 06F3 C62B ldb #0x2B; 06F5 BDF53F jsr $clear_blockxb; 06F8 33C820 P06F8: leau 0x20,u; /* Process next player. */ 06FB 1183C8CC cmpu #0xC8CC; 06FF 1023FE69 lbls P056C; /* START OF ENERGY BOMB STATE AND POSITION PROCESSING LOOP */ /* Update the position and states of all energy bombs */ 0703 96AB lda 0xAB; 0705 9795 sta 0x95; /* Determine which player has the */ 0707 96CB lda 0xCB; /* slower ring rotation delta. */ 0709 9195 cmpa 0x95; /* Save it in C895. */ 070B 2202 bhi P070F; 070D 9795 sta 0x95; 070F 967A P070F: lda 0x7A; /* If not simultaneous play, then */ 0711 44 lsra; /* determine who the next player is */ 0712 260E bne P0722; /* and set up his restart counter. */ 0714 8EC8AC ldx #0xC8AC; 0717 96DC lda 0xDC; 0719 2603 bne P071E; 071B 8EC8CC ldx #0xC8CC; 071E 86FF P071E: lda #0xFF; /* Restart counter is set here. */ 0720 A71F sta -1,x; 0722 8EC978 P0722: ldx #0xC978; 0725 968E lda 0x8E; /* Make sure the game is not in */ 0727 9A8F ora 0x8F; /* the middle of setting up a */ 0729 2703 beq P072E; /* new level. */ 072B 7E0912 jmp $P0912; /* Determine state of energy bomb, and handle accordingly */ 072E A61D P072E: lda -3,x; 0730 102B018E lbmi P08C2; /* Bomb is not in use. */ 0734 8117 cmpa #0x17; 0736 102301A8 lbls P08E2; /* Bomb is still on a ring. */ /* Energy bomb is moving; so draw it towards a cruiser */ 073A EC13 ldd -13,x; 073C 47 ASRA; 073D 57 asrb; 073E DD80 std 0x80; 0740 DC9F ldd 0x9F; /* Determine the delta between player */ 0742 47 ASRA; /* 1's cruiser, and the energy bomb. */ 0743 57 asrb; 0744 9080 suba 0x80; 0746 D081 subb 0x81; 0748 DD82 std 0x82; 074A DCBF ldd 0xBF; /* Determine the delta between player */ 074C 47 ASRA; /* 2's cruiser, and the energy bomb. */ 074D 57 asrb; 074E 9080 suba 0x80; 0750 D081 subb 0x81; 0752 DD84 std 0x84; 0754 96A9 lda 0xA9; /* If both players are dead, then */ 0756 95C9 bita 0xC9; /* draw the energy bomb back towards */ 0758 2A08 bpl P0762; /* the rings. */ 075A DC80 ldd 0x80; 075C 40 nega; 075D 50 negb; 075E DD82 std 0x82; 0760 2038 bra P079A; /* The following block is for simultaneous play only */ /* Determine which cruiser is closer to the energy bomb */ 0762 4D P0762: tsta; 0763 2B31 bmi P0796; /* See if player 1 is alive. */ 0765 96C9 lda 0xC9; 0767 2B31 bmi P079A; /* See if player 2 is alive. */ 0769 DC82 ldd 0x82; 076B BDF584 jsr $get_absolute_value_of_ab; 076E DD80 std 0x80; 0770 D680 ldb 0x80; 0772 3D mul; 0773 DD86 std 0x86; 0775 9681 lda 0x81; 0777 D681 ldb 0x81; 0779 3D mul; 077A D386 addd 0x86; 077C DD86 std 0x86; 077E DC84 ldd 0x84; 0780 BDF584 jsr $get_absolute_value_of_ab; 0783 DD80 std 0x80; 0785 D680 ldb 0x80; 0787 3D mul; 0788 DD88 std 0x88; 078A 9681 lda 0x81; 078C D681 ldb 0x81; 078E 3D mul; 078F D388 addd 0x88; 0791 109386 cmpd 0x86; 0794 2204 bhi P079A; 0796 DC84 P0796: ldd 0x84; /* Use player 2's position. */ 0798 DD82 std 0x82; /* Determine the angle between energy bomb & cruiser */ 079A DC82 P079A: ldd 0x82; 079C BDF593 jsr $convert_rise_run_to_angle; 079F 9780 sta 0x80; 07A1 A610 lda -16,x; 07A3 843F anda #0x3F; 07A5 9080 suba 0x80; 07A7 9781 sta 0x81; 07A9 BDF584 jsr $get_absolute_value_of_ab; 07AC 843F anda #0x3F; 07AE 9782 sta 0x82; 07B0 9783 sta 0x83; 07B2 40 nega; 07B3 843F anda #0x3F; 07B5 9182 cmpa 0x82; 07B7 2402 bhs P07BB; 07B9 9782 sta 0x82; /* If small delta, then aim bomb at cruiser */ 07BB B6C930 P07BB: lda $C930; 07BE 9182 cmpa 0x82; /* If delta is < ring rotation, */ 07C0 2506 blo P07C8; /* set energy bombs angle of travel */ 07C2 9680 lda 0x80; /* equal to delta angle. */ 07C4 A710 sta -16,x; 07C6 201A bra P07E2; /* If large delta, then gradually draw bomb towards cruiser */ 07C8 8620 P07C8: lda #0x20; 07CA 9181 cmpa 0x81; /* If delta is > ring rotation, */ 07CC 230A bls P07D8; /* draw the energy bomb towards */ 07CE EC10 ldd -16,x; /* the cruiser, by modifying its*/ 07D0 B3C930 subd $C930; /* angle of travel by +- the ring */ 07D3 B3C930 subd $C930; /* rotation delta. */ 07D6 2008 bra P07E0; 07D8 EC10 P07D8: ldd -16,x; 07DA F3C930 addd $C930; 07DD F3C930 addd $C930; 07E0 ED10 P07E0: std -16,x; /* Now, update position, and position delta for the bomb */ 07E2 B6C931 P07E2: lda $C931; 07E5 43 coma; 07E6 A71C sta -4,x; 07E8 863F lda #0x3F; 07EA E610 ldb -16,x; /* Calculate rise & run. */ 07EC BDF5FF jsr $convert_abs_angle_to_rise_run; 07EF ED17 std -9,x; 07F1 B6C931 lda $C931; /* Scale rise & run by ring rotation */ 07F4 44 lsra; /* value; as ring rotates faster, the*/ 07F5 44 lsra; /* energy bombs will also travel */ 07F6 44 lsra; /* faster. */ 07F7 44 lsra; 07F8 9786 sta 0x86; 07FA BD0C33 jsr $mult_rise_run_by_a; 07FD EC14 ldd -12,x; /* Update the x position, and check */ 07FF D380 addd 0x80; /* for screen wrap. */ 0801 102900BD lbvs P08C2; 0805 ED14 std -12,x; 0807 9686 lda 0x86; 0809 E617 ldb -9,x; 080B BD0C33 jsr $mult_rise_run_by_a; 080E EC12 ldd -14,x; /* Update the y position, and check */ 0810 1E89 exg a,b; /* for screen wrap. */ 0812 D380 addd 0x80; 0814 102900AA lbvs P08C2; 0818 1E89 exg a,b; 081A ED12 std -14,x; /* If bomb is back in ring area, then reattach it */ 081C EC13 ldd -13,x; 081E BDF584 jsr $get_absolute_value_of_ab; 0821 DD86 std 0x86; 0823 D686 ldb 0x86; 0825 3D mul; 0826 DD84 std 0x84; 0828 9687 lda 0x87; 082A D687 ldb 0x87; 082C 3D mul; 082D D384 addd 0x84; 082F DD84 std 0x84; 0831 10830384 cmpd #0x0384; /* See if the bomb is within the */ 0835 2515 blo P084C; /* confines of the center ring area. */ 0837 6A00 dec 0,x; 0839 270D beq P0848; /* If bomb is still moving, then make */ 083B 9690 lda 0x90; /* a sound, and decrement it's life */ 083D 8A08 ora #0x08; /* span counter. */ 083F 9790 sta 0x90; 0841 8620 lda #0x20; /* Flag that bomb is still moving. */ 0843 A71D P0843: sta -3,x; 0845 7E0908 jmp $P0908; /* Flag that bomb is no longer in use; lifespan expired */ 0848 8680 P0848: lda #0x80; 084A 20F7 bra P0843; /* Determine which ring to attach energy bomb to */ 084C CEC8F3 P084C: ldu #0xC8F3; 084F 108EC8ED ldy #0xC8ED; 0853 0F80 clr 0x80; 0855 A6C4 P0855: lda ,u; /* Determine if the energy bomb is */ 0857 4A deca; /* within the confines of the ring */ 0858 1F89 tfr a,b; /* being checked. */ 085A 3D mul; 085B 109384 cmpd 0x84; 085E 2550 blo P08B0; 0860 A6C4 lda ,u; 0862 8008 suba #0x08; 0864 1F89 tfr a,b; 0866 3D mul; 0867 109384 cmpd 0x84; 086A 2244 bhi P08B0; /* Determine which ring section to energy attach bomb to */ 086C EC13 ldd -13,x; 086E BDF593 jsr $convert_rise_run_to_angle; 0871 A0A4 suba ,y; 0873 44 lsra; 0874 44 lsra; 0875 840F anda #0x0F; 0877 3410 pshs x; 0879 8E0F45 ldx #0x0F45; 087C A686 lda a,x; /* Determine if this section still exists. */ 087E 30C81E leax 0x1E,u; 0881 E6C6 ldb a,u; 0883 EA86 orb a,x; 0885 3510 puls x; 0887 2727 beq P08B0; /* See if any other bomb is already on this section */ 0889 8002 suba #0x02; 088B 9A80 ora 0x80; 088D 9781 sta 0x81; 088F F6C975 ldb $C975; /* Check bomb 1. */ 0892 C41F andb #0x1F; 0894 D181 cmpb 0x81; 0896 2718 beq P08B0; 0898 F6C995 ldb $C995; /* Check bomb 2. */ 089B C41F andb #0x1F; 089D D181 cmpb 0x81; 089F 270F beq P08B0; 08A1 F6C9B5 ldb $C9B5; /* Check bomb 3. */ 08A4 C41F andb #0x1F; 08A6 D181 cmpb 0x81; 08A8 2706 beq P08B0; 08AA A71D sta -3,x; /* Available; place bomb here. */ 08AC 6F00 clr 0,x; 08AE 2058 bra P0908; /* Section not available or occupied, so check next ring */ 08B0 9680 P08B0: lda 0x80; 08B2 8B08 adda #0x08; 08B4 9780 sta 0x80; 08B6 334A leau 10,u; 08B8 3122 leay 2,y; 08BA 108CC8F1 cmpy #0xC8F1; 08BE 2395 bls P0855; 08C0 2046 bra P0908; /* See if we need to start up another energy bomb */ 08C2 A61D P08C2: lda -3,x; 08C4 8540 bita #0x40; 08C6 2640 bne P0908; 08C8 0AEB dec 0xEB; /* Decrement reseed counter. */ 08CA 263C bne P0908; /* Restart new bomb when it goes to 0. */ 08CC F6C931 ldb $C931; 08CF 54 lsrb; 08D0 D7EB stb 0xEB; /* Reset the reseed counter. */ 08D2 8620 lda #0x20; 08D4 A71D sta -3,x; /* Flag bomb state as 'moving'. */ 08D6 96DE lda 0xDE; 08D8 A710 sta -16,x; /* Use energy cannons angle. */ 08DA 4F clra; 08DB 5F clrb; 08DC ED13 std -13,x; /* Start bomb from origin. */ 08DE A700 sta 0,x; /* Clear lifespan. */ 08E0 2026 bra P0908; /* See if time to force energy bomb off a ring */ 08E2 CEC8F3 P08E2: ldu #0xC8F3; 08E5 44 lsra; /* Use state/8 to determine which */ 08E6 44 lsra; /* ring energy bomb is attached to.*/ 08E7 44 lsra; 08E8 2705 P08E8: beq P08EF; 08EA 334A leau 10,u; 08EC 4A deca; 08ED 20F9 bra P08E8; 08EF 3342 P08EF: leau 2,u; /* If the ring no longer exists, or if */ 08F1 31C81E leay 0x1E,u; /* the 'time to move' counter has gone */ 08F4 A61D lda -3,x; /* to 0, then force the energy bomb to */ 08F6 8407 anda #0x07; /* start moving outwards, until it */ 08F8 E6A6 ldb a,y; /* hits a cruiser, or comes within the */ 08FA EAC6 orb a,u; /* confines of another ring. */ 08FC 2704 beq P0902; 08FE 6A1C dec -4,x; /* Update 'time to move' counter. */ 0900 2606 bne P0908; 0902 A61D P0902: lda -3,x; 0904 8A20 ora #0x20; /* Force energy bomb to start moving. */ 0906 A71D sta -3,x; 0908 308820 P0908: leax 0x20,x; /* Advance pointer to next energy */ 090B 8CC9B8 cmpx #0xC9B8; /* bomb. Stop when last on processed.*/ 090E 1023FE1C lbls P072E; /* END OF ENERGY BOMB STATE & POSITION PROCESSING LOOP */ /* Determin the confines of a given ring */ 0912 108EC8F3 P0912: ldy #0xC8F3; /* Ptr to ring line patterns. */ 0916 8EC8ED ldx #0xC8ED; /* Addr of ring 1 rotation value. */ 0919 0F91 clr 0x91; 091B 968E lda 0x8E; 091D 9A8F ora 0x8F; 091F 1026011D lbne P0A40; 0923 9690 lda 0x90; 0925 8A01 ora #0x01; 0927 9790 sta 0x90; 0929 A6A4 P0929: lda ,y; 092B 4A deca; 092C 1F89 tfr a,b; 092E 3D mul; 092F DD80 std 0x80; 0931 A6A4 lda ,y; 0933 8008 suba #0x08; 0935 1F89 tfr a,b; 0937 3D mul; 0938 DD82 std 0x82; /* Check each bullet for a hit on the energy cannon */ 093A CEC9C8 ldu #0xC9C8; /* Addr of player 1's bullet buffer. */ 093D A640 P093D: lda 0,u; /* See if bullet is active. */ 093F 102A00E8 lbpl P0A2B; 0943 3430 pshs x,y; 0945 AE46 ldx 6,u; /* Bullet's position. */ 0947 108E0000 ldy #0x0000; /* Energy cannon's position. */ 094B CC0303 ldd #0x0303; /* Size of energy cannon. */ 094E BDF8FF jsr $check_bullet_for_hit; 0951 3530 puls x,y; 0953 242E bhs P0983; /* Energy cannon destroyed by a bullet */ 0955 8680 lda #0x80; /* Energy cannon destroyed. */ 0957 B7C975 sta $C975; /* Disable energy bomb 1. */ 095A B7C995 sta $C995; /* Disable energy bomb 2. */ 095D B7C9B5 sta $C9B5; /* Disable energy bomb 3. */ 0960 9A90 ora 0x90; 0962 9790 sta 0x90; /* Force an explosion sound. */ 0964 8602 lda #0x02; 0966 979B sta 0x9B; 0968 0A8E dec 0x8E; /* Flag energy cannon is exploding. */ 096A 6F40 clr 0,u; /* Flag that bullet no longer in use.*/ 096C B6C931 lda $C931; /* Slightly increase ring rotation */ 096F 8B10 adda #0x10; /* value. */ 0971 2503 blo P0976; 0973 B7C931 sta $C931; 0976 CC1400 P0976: ldd #0x1400; /* Score a cannon hit for the player. */ 0979 BD0C77 jsr $update_players_score; 097C 301C leax -4,x; 097E 6C11 inc -15,x; /* Give the player another cruiser. */ 0980 7E0A85 jmp $P0A85; /* See if the bullet hit one of the energy bombs */ 0983 3420 P0983: pshs y; 0985 108EC978 ldy #0xC978; /* Addr of energy bomb buffer. */ 0989 A63D P0989: lda -3,y; 098B 8520 bita #0x20; 098D 2711 beq P09A0; 098F 3430 pshs x,y; 0991 AE46 ldx 6,u; /* Position of bullet. */ 0993 10AE33 ldy -13,y; /* Position of energy bomb. */ 0996 CC0202 ldd #0x0202; /* Size of energy bomb. */ 0999 BDF8FF jsr $check_bullet_for_hit; 099C 3530 puls x,y; 099E 250D blo P09AD; 09A0 31A820 P09A0: leay 0x20,y; /* Check next energy bomb. */ 09A3 108CC9B8 cmpy #0xC9B8; 09A7 23E0 bls P0989; 09A9 3520 puls y; 09AB 2014 bra P09C1; /* Energy bomb was destroyed by a bullet */ 09AD 8680 P09AD: lda #0x80; 09AF A73D sta -3,y; /* Flag bullet no longer in use. */ 09B1 9A90 ora 0x90; 09B3 9790 sta 0x90; /* Force an explosion sound. */ 09B5 8603 lda #0x03; 09B7 979B sta 0x9B; 09B9 8601 lda #0x01; /* Force an explosion pattern to be */ 09BB A740 sta 0,u; /* displayed at bullet's position. */ 09BD 3520 puls y; 09BF 206A bra P0A2B; /* See if the bullet hit a wall section */ 09C1 EC46 P09C1: ldd 6,u; 09C3 BDF584 jsr $get_absolute_value_of_ab; 09C6 D786 stb 0x86; 09C8 1F89 tfr a,b; /* See if the bullet is within the */ 09CA 3D mul; /* confines of a ring. */ 09CB DD84 std 0x84; 09CD 9686 lda 0x86; 09CF D686 ldb 0x86; 09D1 3D mul; 09D2 D384 addd 0x84; 09D4 109380 cmpd 0x80; 09D7 2252 bhi P0A2B; 09D9 109382 cmpd 0x82; 09DC 254D blo P0A2B; /* Determine which section of the wall we are at */ 09DE EC46 ldd 6,u; /* Bullet position. */ 09E0 BDF593 jsr $convert_rise_run_to_angle; 09E3 A084 suba ,x; 09E5 44 lsra; 09E6 44 lsra; 09E7 840F anda #0x0F; 09E9 3410 pshs x; 09EB 8E0F45 ldx #0x0F45; 09EE A686 lda a,x; /* Determine if this section exists or is already destroyed */ 09F0 30A81E leax 0x1E,y; 09F3 E6A6 ldb a,y; 09F5 EA86 orb a,x; 09F7 2730 beq P0A29; /* Add value of wall section to players score */ 09F9 3412 pshs a,x; 09FB 8EC8F3 ldx #0xC8F3; /* Addr of ring pattern arrays. */ 09FE C610 ldb #0x10; /* Value of outer wall section. */ 0A00 A6A4 lda ,y; 0A02 A184 P0A02: cmpa ,x; /* This loop calculates the value */ 0A04 2402 bhs P0A08; /* of the wall section hit. */ 0A06 CB10 addb #0x10; 0A08 300A P0A08: leax 10,x; 0A0A 8CC908 cmpx #0xC908; 0A0D 25F3 P0A0D: blo P0A02; 0A0F 4F clra; 0A10 BD0C77 jsr $update_players_score; 0A13 3512 puls a,x; 0A15 6F40 clr 0,u; /* Flag bullet no longer in use. */ 0A17 6FA6 clr a,y; /* Clear pattern for section hit(0 hit).*/ 0A19 6386 com a,x; /* Clr/set pattern 4 section hit(1 hit). */ 0A1B 260C bne P0A29; 0A1D 6C40 inc 0,u; 0A1F 8680 lda #0x80; /* Section destroyed, so force an */ 0A21 9A90 ora 0x90; /* explosion sound. (hit 2 times) */ 0A23 9790 sta 0x90; 0A25 8603 lda #0x03; 0A27 979B sta 0x9B; 0A29 3510 P0A29: puls x; 0A2B 334B P0A2B: leau 11,u; /* Advance ptr to next bullet. */ 0A2D 1183CA20 cmpu #0xCA20; /* Stop when last bullet processed. */ 0A31 1025FF08 lblo P093D; 0A35 312A leay 10,y; /* Get ptr to next ring's patterns. */ 0A37 3002 leax 2,x; /* Get ptr to next ring's rotation. */ 0A39 8CC8F1 cmpx #0xC8F1; /* Stop when last ring processed. */ 0A3C 1023FEE9 lbls P0929; /* A certain amount of time after the energy cannon was */ /* destroyed, reset the ring scale/pattern structure */ 0A40 8620 P0A40: lda #0x20; 0A42 918F cmpa 0x8F; 0A44 253F blo P0A85; 0A46 2203 bhi P0A4B; 0A48 BD0BA6 jsr $init_ring_scale_factors; /* See if we need to expand the inner walls */ 0A4B 8EC8F3 P0A4B: ldx #0xC8F3; /* Search the scale/pattern array, */ 0A4E 861E lda #0x1E; /* and find out which entry is for */ 0A50 A184 cmpa ,x; /* the outermost wall; it will have*/ 0A52 270C beq P0A60; /* a scale factor of 0x1E. The 'x'*/ 0A54 300A leax 10,x; /* register will point to the entry*/ 0A56 A184 cmpa ,x; /* once it is found. */ 0A58 2706 beq P0A60; 0A5A 300A leax 10,x; 0A5C A184 cmpa ,x; 0A5E 2625 bne P0A85; 0A60 3002 P0A60: leax 2,x; /* Skip over the scale factor and the */ 0A62 33881E leau 0x1E,x; /* first line pattern for this ring. */ 0A65 C607 ldb #0x07; 0A67 A685 P0A67: lda b,x; /* This loop counts the number of */ 0A69 AAC5 ora b,u; /* visible sections still left on */ 0A6B 2702 beq P0A6F; /* the outermost ring. The number*/ 0A6D 0C91 inc 0x91; /* of visible sections is saved in*/ 0A6F 5A P0A6F: decb; /* C891. */ 0A70 2CF5 bge P0A67; 0A72 9691 lda 0x91; /* See if any sections were left. */ 0A74 260F bne P0A85; /* Branch, if sections are still left.*/ 0A76 8606 lda #0x06; /* Set up a new scale factor for this */ 0A78 A71E sta -2,x; /* ring (6), and make it the inner */ 0A7A A75E sta -2,u; /* most ring. */ 0A7C 86FF lda #0xFF; /* Reset all the line patterns for */ 0A7E C607 ldb #0x07; /* this ring to 0xFF. */ 0A80 BDF552 jsr $clear_block_to_a; 0A83 97EC sta 0xEC; /* Set the 'wall expanding' flag. */ /* Update rotation value, so each ring rotates faster */ 0A85 FCC930 P0A85: ldd $C930; 0A88 D3F1 addd 0xF1; /* Update rotation for ring 1. */ 0A8A DDF1 std 0xF1; 0A8C FCC930 ldd $C930; 0A8F 43 coma; 0A90 53 comb; 0A91 D3EF addd 0xEF; /* Update rotation for ring 2. */ 0A93 DDEF std 0xEF; 0A95 FCC930 ldd $C930; 0A98 58 aslb; 0A99 49 rola; 0A9A D3ED addd 0xED; /* Update rotation for ring 3. */ 0A9C DDED std 0xED; 0A9E 9626 lda 0x26; /* Expand rings everyother pass. */ 0AA0 44 lsra; 0AA1 242E bhs P0AD1; /* Continue expanding rings, if necessary */ 0AA3 D6EC ldb 0xEC; /* If the 'expanding wall' flag */ 0AA5 272A beq P0AD1; /* (C8EC) is set, then increment the */ 0AA7 861E lda #0x1E; /* scale factor for each of the 3 */ 0AA9 8EC8F3 ldx #0xC8F3; /* rings, until the outermost one */ 0AAC 6C84 inc ,x; /* has a scale actor of 0x1E; at */ 0AAE 6C881E inc 0x1E,x; /* that point, clear the 'expanding */ 0AB1 A184 cmpa ,x; /* wall' flag. */ 0AB3 2602 bne P0AB7; 0AB5 0FEC clr 0xEC; 0AB7 300A P0AB7: leax 10,x; /* Increment the scale for the */ 0AB9 6C84 inc ,x; /* next ring. */ 0ABB 6C881E inc 0x1E,x; 0ABE A184 cmpa ,x; 0AC0 2602 bne P0AC4; 0AC2 0FEC clr 0xEC; /* Clear the 'expanding walls' flag. */ 0AC4 300A P0AC4: leax 10,x; /* Increment the scale for the */ 0AC6 6C84 inc ,x; /* next ring. */ 0AC8 6C881E inc 0x1E,x; 0ACB A184 cmpa ,x; 0ACD 2602 bne P0AD1; 0ACF 0FEC clr 0xEC; /* Clear the 'expanding walls' flag. */ 0AD1 968E P0AD1: lda 0x8E; /* Don't continue, if the energy cannon */ 0AD3 1026F5FC lbne P00D3; /* is being destroyed, or a new screen */ 0AD7 968F lda 0x8F; /* is being displayed. */ 0AD9 2705 beq P0AE0; 0ADB 0A8F dec 0x8F; 0ADD 7E00D3 jmp $P00D3; /* Have the energy cannon track one of the cruiser */ 0AE0 DC9F P0AE0: ldd 0x9F; /* Player 1 cruiser position. */ 0AE2 BDF593 jsr $convert_rise_run_to_angle; 0AE5 9780 sta 0x80; 0AE7 DCBF ldd 0xBF; /* Player 2 cruiser position. */ 0AE9 BDF593 jsr $convert_rise_run_to_angle; 0AEC 9781 sta 0x81; 0AEE 96DE lda 0xDE; /* Determine angle delta between */ 0AF0 843F anda #0x3F; /* cannon and cruiser 1. */ 0AF2 9080 suba 0x80; 0AF4 843F anda #0x3F; 0AF6 9782 sta 0x82; 0AF8 96DE lda 0xDE; /* Determine angle delta between */ 0AFA 843F anda #0x3F; /* cannon and cruiser 2. */ 0AFC 9081 suba 0x81; 0AFE 843F anda #0x3F; 0B00 D6A9 ldb 0xA9; /* If game is over, then just rotate */ 0B02 D5C9 bitb 0xC9; /* cannon around. */ 0B04 2A06 bpl P0B0C; 0B06 8605 lda #0x05; 0B08 9782 sta 0x82; 0B0A 2013 bra P0B1F; /* Determine which cruiser to track */ 0B0C 5D P0B0C: tstb; /* One player is dead, so determine */ 0B0D 2608 bne P0B17; /* which one is still alive, so we */ 0B0F D6C9 ldb 0xC9; /* can track him. */ 0B11 260A bne P0B1D; 0B13 9182 cmpa 0x82; 0B15 2E06 bgt P0B1D; 0B17 9782 P0B17: sta 0x82; 0B19 9681 lda 0x81; 0B1B 2002 bra P0B1F; 0B1D 9680 P0B1D: lda 0x80; /* Determine how to track one of the cruiser */ 0B1F D682 P0B1F: ldb 0x82; 0B21 9780 sta 0x80; 0B23 BDF584 jsr $get_absolute_value_of_ab; 0B26 C43F andb #0x3F; 0B28 D781 stb 0x81; 0B2A D783 stb 0x83; 0B2C 50 negb; 0B2D C43F andb #0x3F; 0B2F D181 cmpb 0x81; 0B31 2402 bhs P0B35; 0B33 D781 stb 0x81; /* Determine speed at which to track the cruiser */ 0B35 B6C930 P0B35: lda $C930; /* Ring rotation delta. */ 0B38 9181 cmpa 0x81; 0B3A 2553 blo P0B8F; 0B3C 9680 lda 0x80; 0B3E 843F anda #0x3F; /* Small delta; so track quickly. */ 0B40 97DE sta 0xDE; /* See if opening exists in the 3 rings in front of cannon */ 0B42 CEC8F3 ldu #0xC8F3; /* Addr of ring pattern array. */ 0B45 8EC8ED ldx #0xC8ED; /* Addr of ring 1 rotation value. */ 0B48 96DE P0B48: lda 0xDE; 0B4A A081 suba ,x++; 0B4C 44 lsra; 0B4D 44 lsra; 0B4E 840F anda #0x0F; /* Determine which segment of the */ 0B50 108E0F45 ldy #0x0F45; /* ring is faced by the cannon. */ 0B54 A6A6 lda a,y; 0B56 31C81E leay 0x1E,u; /* If both patterns are 0, then the */ 0B59 E6C6 ldb a,u; /* segment is open. */ 0B5B EAA6 orb a,y; 0B5D 2644 bne P0BA3; /* No opening exists. */ 0B5F 334A leau 10,u; /* Opening exists in this ring; go */ 0B61 8CC8F1 cmpx #0xC8F1; /* check the next one also. */ 0B64 23E2 bls P0B48; /* Fire a fireball at one of the star cruisers */ 0B66 96E1 lda 0xE1; 0B68 2639 bne P0BA3; /* See if fireball is already in use. */ 0B6A 03E1 com 0xE1; 0B6C 4F clra; 0B6D 5F clrb; 0B6E DDE6 std 0xE6; /* Set initial y position to 0. */ 0B70 DDE8 std 0xE8; /* Set initial x position to 0. */ 0B72 D6DE ldb 0xDE; 0B74 867F lda #0x7F; 0B76 BDF5FF jsr $convert_abs_angle_to_rise_run; 0B79 DD85 std 0x85; 0B7B D685 ldb 0x85; 0B7D BD0C31 jsr $mult_rise_run_by_9; 0B80 DDE2 std 0xE2; /* Save rise value. */ 0B82 D686 ldb 0x86; 0B84 BD0C31 jsr $mult_rise_run_by_9; 0B87 DDE4 std 0xE4; /* Save run value. */ 0B89 8606 lda #0x06; 0B8B 97E0 sta 0xE0; /* Set initial scale factor. */ 0B8D 2014 bra P0BA3; /* Slowly turn energy cannon, to track a cruiser */ 0B8F 8620 P0B8F: lda #0x20; 0B91 9182 cmpa 0x82; /* If the delta between the cannon */ 0B93 2307 bls P0B9C; /* and the cruiser is > the ring */ 0B95 DCDE ldd 0xDE; /* rotation delta, then update the */ 0B97 B3C930 subd $C930; /* cannons angle by the ring rotation */ 0B9A 2005 bra P0BA1; /* delta only; as this increases, so */ 0B9C DCDE P0B9C: ldd 0xDE; /* will the tracking speed of the */ 0B9E F3C930 addd $C930; /* energy cannon. */ 0BA1 DDDE P0BA1: std 0xDE; 0BA3 7E00D3 P0BA3: jmp $P00D3; /* * init_ring_scale_factors() * * This routine clears the scale/pattern buffer used * to describe the 3 rings, and then sets the initial * scale factors (0x0E, 0x16, 0x1E) for each of the rings. * * The pattern buffer is 60 bytes long (6 x 10 bytes), * and uses RAM locations C8F3-C92F. The first 3 entries * describe those ring sections which have no hits on them, * while the second 3 entries describe those ring sections * which have 1 hit on them (and are thus hi-lited). * * The format of the pattern buffer is as follows: * * scale, < 9 line patterns>, [Ring 1, no hits] * scale, < 9 line patterns>, [Ring 2, no hits] * scale, < 9 line patterns>, [Ring 3, no hits] * scale, < 9 line patterns>, [Ring 1, 1 hit] * scale, < 9 line patterns>, [Ring 2, 1 hit] * scale, < 9 line patterns> [Ring 3, 1 hit] */ init_ring_scale_factors: 0BA6 8EC8F3 ldx #0xC8F3; /* Clear the pattern buffer. */ 0BA9 C63C ldb #0x3C; 0BAB BDF53F jsr $clear_blockxb; 0BAE 8EC8F3 ldx #0xC8F3; 0BB1 CC0E00 ldd #0x0E00; /* Set ring 1's scale factor. */ 0BB4 ED84 std ,x; 0BB6 ED881E std 0x1E,x; 0BB9 300A leax 10,x; 0BBB CC1600 ldd #0x1600; /* Set ring 2's scale factor. */ 0BBE ED84 std ,x; 0BC0 ED881E std 0x1E,x; 0BC3 300A leax 10,x; 0BC5 CC1E00 ldd #0x1E00; /* Set ring 3's scale factor. */ 0BC8 ED84 std ,x; 0BCA ED881E std 0x1E,x; 0BCD A78828 sta 0x28,x; 0BD0 39 rts; /* * change_player() * * This routine is called after a players cruiser has * been destroyed. It will disable of of the energy * bombs and bullets. It will also save a copy of the * dead players game information in his backup area. * Lastly, it will switch the active player indicator * (C8DC), and copy the other players game info out * of his backup area and into the active player area. * The info backed up and restored is the ring patterns * and rotation values. */ change_player: 0BD1 8680 lda #0x80; 0BD3 B7C975 sta $C975; /* Disable energy bomb 1 */ 0BD6 B7C995 sta $C995; /* Disable energy bomb 2 */ 0BD9 B7C9B5 sta $C9B5; /* Disable energy bomb 3 */ 0BDC B6C88F lda $C88F; /* Re-init ring patterns, if energy */ 0BDF 2702 beq P0BE3; /* cannon was destroyed. */ 0BE1 8DC3 bsr init_ring_scale_factors; 0BE3 7FC88F P0BE3: clr $C88F; 0BE6 8EC9C8 ldx #0xC9C8; /* Clear the bullet buffer. */ 0BE9 C658 ldb #0x58; 0BEB BDF53F jsr $clear_blockxb; 0BEE 8D0D bsr prepare_for_backup; 0BF0 F7C8DC stb $C8DC; /* Save next player indicator. */ 0BF3 BDF683 jsr $move_block2; 0BF6 8D05 bsr prepare_for_backup; 0BF8 1E31 exg u,x; 0BFA 7EF683 jmp $move_block2; /* * prepare_for_backup() * * This procedure initializes the 'a' register with the * count of the number of bytes to backup, the 'u' register * with the address of the active players ring pattern array, * and the 'x' register with the address of the backup area * associated with the player being backed up; C8DC indicates * which player is being backed up. */ prepare_for_backup: 0BFD CEC8F3 ldu #0xC8F3; /* Load 'u' w/ ptr to ring patterns.*/ 0C00 8ECA25 ldx #0xCA25; 0C03 863F lda #0x3F; 0C05 F6C8DC ldb $C8DC; 0C08 2703 beq P0C0D; 0C0A 8ECA64 ldx #0xCA64; 0C0D 53 P0C0D: comb; /* Switch flag to show other user */ 0C0E 39 P0C0E: rts; /* is now active. */ /* * init_ship_count_buffer() * * Initialize the buffer used to display the number of * ships left for a user to the following: * * " ",0x80,0x80,0x80,0x80,0x80,0x80,0x80 * * The buffer starts at C932 */ init_ship_count_buffer: 0C0F 8EC932 ldx #0xC932; 0C12 C609 ldb #0x09; 0C14 BDF550 jsr $clear_block_to_0x80; 0C17 8620 lda #0x20; 0C19 A784 sta ,x; 0C1B A701 sta 1,x; 0C1D A702 sta 2,x; 0C1F 39 P0C1F: rts; /* * fill_ship_count_buffer() * * Fill the ship count buffer with a little spaceship * figure, one for each ship the user has left. If he * has more than 9 ships left, then display "X" instead * of the spaceship. * * At entry: * 'a' = number of ships. */ fill_ship_count_buffer: 0C20 C668 ldb #0x68; /* Code for small spaceship figure. */ 0C22 8109 cmpa #0x09; 0C24 2304 bls P0C2A; 0C26 8609 lda #0x09; 0C28 C010 subb #0x10; /* Use "X" instead. */ 0C2A 4A P0C2A: deca; 0C2B 2FF2 ble P0C1F; 0C2D E780 stb ,x+; /* Fill the buffer. */ 0C2F 20F9 bra P0C2A; /* * mult_rise_run_by_9() * mult_rise_run_by_a() * * This routine takes a rise or run value (in 'b') * and either multiples it by 9 or by the value in * the 'a' register. * * At entry: * 'b' = rise or run value. * 'a' = multiplier (for mult_rise_run_by_a only). * * At exit: * 'd' contains the result of the multiplication, * and so does C880. */ mult_rise_run_by_9: 0C31 8609 lda #0x09; mult_rise_run_by_a: 0C33 0F83 clr 0x83; 0C35 5D tstb; 0C36 2A02 bpl P0C3A; 0C38 0C83 inc 0x83; /* Keep track if value is negative. */ 0C3A BDF584 P0C3A: jsr $get_absolute_value_of_ab; 0C3D 3D mul; 0C3E DD80 std 0x80; 0C40 0483 lsr 0x83; 0C42 2407 bhs P0C4B; 0C44 43 coma; /* If the rise/run value was negative */ 0C45 53 comb; /* then take twos complement, to make */ 0C46 C30001 addd #0x0001; /* the result negative also. */ 0C49 DD80 std 0x80; 0C4B 39 P0C4B: rts; /* * draw_1_ring() * * This routine will draw one of the 3 rings (castle walls). * * At entry: * 'x' points to (y,x) vector list for this ring. * 'u' points to scale/pattern buffer for this ring. * * Drawing will cease when a pattern > 0 is encountered. */ draw_1_ring: 0C4C 86CE lda #0xCE; 0C4E 970C sta 0x0C; 0C50 E6C0 ldb ,u+; /* Grab the scale factor. */ 0C52 D704 stb 0x04; 0C54 EC84 P0C54: ldd ,x; /* Grab the vector endpoint. */ 0C56 9701 sta 0x01; 0C58 0F00 clr 0x00; 0C5A A6C0 lda ,u+; /* Grab the line pattern to use. */ 0C5C 3002 leax 2,x; 0C5E 0C00 inc 0x00; 0C60 D701 stb 0x01; 0C62 970A sta 0x0A; 0C64 0F05 clr 0x05; 0C66 CC0040 ldd #0x0040; 0C69 D50D P0C69: bitb 0x0D; 0C6B 27FC beq P0C69; 0C6D 12 nop; 0C6E 970A sta 0x0A; 0C70 A6C4 lda ,u; /* Stop, when end of pattern list is */ 0C72 2FE0 ble P0C54; /* reached (pattern > 0). */ 0C74 7EF34F jmp $check0ref; /* * update_players_score() * * This routine takes a value, and adds it to the * appropriate user's score string. * * At entry: * 'd' contains the BCD value to be added to a score. * 'u' points to bullet entry which scored a hit. * * The address of the bullet entry is used to determine * whether to add the BCD value to player 1 or 2's score. */ update_players_score: 0C77 8EC8AC ldx #0xC8AC; 0C7A 1183C9F4 cmpu #0xC9F4; /* Determine which player to credit */ 0C7E 2503 blo P0C83; /* with the hit. */ 0C80 8EC8CC ldx #0xC8CC; 0C83 3004 P0C83: leax 4,x; /* Get addr of player's score string. */ 0C85 7EF87C jmp $add_d_to_x_in_bcd; /* * make_game_sounds() * * This routine is responsible for making all of the * sound associated with the game. It uses a bit mask * in C890 to decide which sounds to make at any given * moment. */ make_game_sounds: 0C88 BDF533 jsr $init_music_buf; 0C8B 0F45 clr 0x45; 0C8D 108ECAA3 ldy #0xCAA3; 0C91 CE0CE0 ldu #0x0CE0; 0C94 CC0380 ldd #0x0380; 0C97 DD96 std 0x96; 0C99 86B1 lda #0xB1; 0C9B 9499 anda 0x99; 0C9D 9799 sta 0x99; 0C9F 968D lda 0x8D; 0CA1 9798 sta 0x98; 0CA3 2634 bne P0CD9; 0CA5 9690 lda 0x90; 0CA7 9A99 ora 0x99; 0CA9 979A sta 0x9A; 0CAB 9697 P0CAB: lda 0x97; 0CAD 949A anda 0x9A; 0CAF 2720 beq P0CD1; 0CB1 1F89 tfr a,b; 0CB3 9A98 ora 0x98; 0CB5 9798 sta 0x98; 0CB7 D590 bitb 0x90; 0CB9 2604 bne P0CBF; 0CBB D499 andb 0x99; 0CBD 2608 bne P0CC7; 0CBF EC42 P0CBF: ldd 2,u; 0CC1 EDA4 std ,y; 0CC3 EC44 ldd 4,u; 0CC5 ED22 std 2,y; 0CC7 ADD4 P0CC7: jsr [,u];/* (UNKNOWN JUMP) */ 0CC9 9696 lda 0x96; 0CCB 270C beq P0CD9; 0CCD 8608 lda #0x08; 0CCF 9746 sta 0x46; 0CD1 3347 P0CD1: leau 7,u; 0CD3 3124 leay 4,y; 0CD5 0497 lsr 0x97; 0CD7 26D2 bne P0CAB; 0CD9 9698 P0CD9: lda 0x98; 0CDB 9799 sta 0x99; 0CDD 0F90 clr 0x90; 0CDF 39 rts; /* * Table of sound routine addresses, and data * * 2 byte subroutine address. * 5 bytes of data. */ 0CE0 0D S0CE0: .word 0x0DBF; 0CE2 00 .byte 0x00,0x00,0x00,x000,0xFF; 0CE7 0D .word 0x0D93; 0CE9 0A .byte 0x0A,0x00,0x0E,0x08,0xFF; 0CEE 0D .word 0x0D6C; 0CF0 02 .byte 0x02,0x80,0x0C,0x0B,0x00; 0CF5 0D .word 0x0D85; 0CF7 00 .byte 0x00,0x90,0x0E,0x08,0xFF; 0CFC 0D .word 0x0D60; 0CFE 00 .byte 0x00,0x90,0x09,0x00,0x00; 0D03 0D .word 0x0D93; 0D05 00 .byte 0x00,0x00,0x09,0x00,0x03; 0D0A 0D .word 0x0D54; 0D0C 00 .byte 0x00,0x90,0x0C,0x08,0x00; 0D11 0D .word 0x0D18; 0D13 08 .byte 0x08,0x80,0x0D,0x60,0x00; 0D18 9E92 P0D18: ldx 0x92; 0D1A AFA4 stx ,y; 0D1C 3440 pshs u; 0D1E 9691 lda 0x91; 0D20 4A deca; 0D21 8406 anda #0x06; 0D23 CE0DEE ldu #0x0DEE; 0D26 ECC6 ldd a,u; 0D28 10A3A4 cmpd ,y; 0D2B 2206 bhi P0D33; 0D2D 0F94 clr 0x94; 0D2F 301C leax -4,x; 0D31 2019 bra P0D4C; 0D33 830080 P0D33: subd #0x0080; 0D36 10A3A4 cmpd ,y; 0D39 220B bhi P0D46; 0D3B 8604 lda #0x04; 0D3D D694 ldb 0x94; 0D3F 2B01 bmi P0D42; 0D41 40 nega; 0D42 3086 P0D42: leax a,x; 0D44 2006 bra P0D4C; 0D46 4F P0D46: clra; 0D47 43 coma; 0D48 9794 sta 0x94; 0D4A 3004 leax 4,x; 0D4C AFA4 P0D4C: stx ,y; 0D4E 9F92 stx 0x92; 0D50 3540 puls u; 0D52 203F bra P0D93; 0D54 4F P0D54: clra; 0D55 D695 ldb 0x95; 0D57 8E0090 ldx #0x0090; 0D5A 308B leax d,x; 0D5C AFA4 stx ,y; 0D5E 2033 bra P0D93; 0D60 9626 P0D60: lda 0x26; 0D62 841E anda #0x1E; 0D64 8A14 ora #0x14; 0D66 48 asla; 0D67 48 asla; 0D68 A721 sta 1,y; 0D6A 2027 bra P0D93; 0D6C AEA4 P0D6C: ldx ,y; 0D6E 6A23 dec 3,y; 0D70 2745 beq P0DB7; 0D72 A623 lda 3,y; 0D74 810A cmpa #0x0A; 0D76 2409 bhs P0D81; 0D78 8107 cmpa #0x07; 0D7A 2603 bne P0D7F; 0D7C 8E0080 ldx #0x0080; 0D7F 300A P0D7F: leax 10,x; 0D81 AFA4 P0D81: stx ,y; 0D83 200E bra P0D93; 0D85 AEA4 P0D85: ldx ,y; 0D87 6A23 dec 3,y; 0D89 272C beq P0DB7; 0D8B 4F clra; 0D8C 9746 sta 0x46; 0D8E 308810 leax 0x10,x; 0D91 AFA4 stx ,y; 0D93 8EC842 P0D93: ldx #0xC842; 0D96 0A96 dec 0x96; 0D98 9696 lda 0x96; 0D9A E622 ldb 2,y; 0D9C E786 stb a,x; 0D9E 48 asla; 0D9F 8B05 adda #0x05; 0DA1 3086 leax a,x; 0DA3 ECA4 ldd ,y; 0DA5 ED84 std ,x; 0DA7 8E0DF6 ldx #0x0DF6; 0DAA A646 lda 6,u; 0DAC 2B08 bmi P0DB6; 0DAE 9B96 adda 0x96; 0DB0 A686 lda a,x; 0DB2 9A45 ora 0x45; 0DB4 9745 sta 0x45; 0DB6 39 P0DB6: rts; 0DB7 9697 P0DB7: lda 0x97; 0DB9 43 coma; 0DBA 9498 anda 0x98; 0DBC 9798 sta 0x98; 0DBE 39 rts; 0DBF 9690 P0DBF: lda 0x90; 0DC1 9497 anda 0x97; 0DC3 2702 beq P0DC7; 0DC5 9767 sta 0x67; 0DC7 3440 P0DC7: pshs u; 0DC9 8603 lda #0x03; 0DCB 9746 sta 0x46; 0DCD 969B lda 0x9B; 0DCF CE0DDE ldu #0x0DDE; 0DD2 48 asla; 0DD3 48 asla; 0DD4 33C6 leau a,u; 0DD6 BDF92E jsr $generate_explosion_sound; 0DD9 0F96 clr 0x96; 0DDB 3540 puls u; 0DDD 9677 lda 0x77; 0DDF 27D6 beq P0DB7; 0DE1 39 rts; /* Data describing the explosion sounds */ 0DE2 38 .byte 0x38, 0x3F, 0x00, 0x01; 0DE6 19 .byte 0x19, 0x3F, 0x00, 0x02; 0DEA 38 .byte 0x38, 0x3F, 0x00, 0x10; 0DEE 04 S0DEE: .byte 0x04; 0DEF 00 .byte 0x00; 0DF0 07 .byte 0x07; 0DF1 00 .byte 0x00; 0DF2 09 .byte 0x09; 0DF3 00 .byte 0x00; 0DF4 0A .byte 0x0A; 0DF5 00 .byte 0x00; 0DF6 20 S0DF6: .byte 0x20; 0DF7 10 .byte 0x10; 0DF8 08 .byte 0x08; 0DF9 04 .byte 0x04; 0DFA 02 .byte 0x02; 0DFB 01 .byte 0x01; star_castle_music: 0DFC FE .word 0xFEE8; 0DFE FE .word 0xFEB6; 0E00 90 .byte 0x90; 0E01 18 .byte 0x18; 0E02 12 .byte 0x12; 0E03 18 .byte 0x18; 0E04 06 .byte 0x06; 0E05 93 .byte 0x93; 0E06 18 .byte 0x18; 0E07 06 .byte 0x06; 0E08 90 .byte 0x90; 0E09 18 .byte 0x18; 0E0A 06 .byte 0x06; 0E0B 84 .byte 0x84; 0E0C 87 .byte 0x87; 0E0D 18 .byte 0x18; 0E0E 12 .byte 0x12; 0E0F 80 .byte 0x80; 0E10 90 .byte 0x90; 0E11 13 .byte 0x13; 0E12 12 .byte 0x12; 0E13 87 .byte 0x87; 0E14 17 .byte 0x17; 0E15 0C .byte 0x0C; 0E16 85 .byte 0x85; 0E17 15 .byte 0x15; 0E18 06 .byte 0x06; 0E19 84 .byte 0x84; 0E1A 8C .byte 0x8C; 0E1B 13 .byte 0x13; 0E1C 30 .byte 0x30; 0E1D 07 .byte 0x07; 0E1E 80 .byte 0x80; /* Vector list for player 1's star cruiser */ star_cruiser1: 0E1F 1C .byte 0x1C,0xF8; 0E21 CE .byte 0xCE,0xFC; 0E23 1C .byte 0x1C,0x08; 0E25 DC .byte 0xDC,0xE8; 0E27 14 .byte 0x14,0x1C; 0E29 EC .byte 0xEC,0x1C; 0E2B 24 .byte 0x24,0xE8; 0E2D E4 .byte 0xE4,0x08; 0E2F 32 .byte 0x32,0xFC; /* Vector list for player 2's star cruiser */ star_cruiser2: 0E31 1C .byte 0x1C,0xF8; 0E33 CE .byte 0xCE,0xFC; 0E35 1C .byte 0x1C,0x08; 0E37 EC .byte 0xEC,0xE8; 0E39 F8 .byte 0xF8,0x0C; 0E3B 0C .byte 0x0C,0x10; 0E3D F4 .byte 0xF4,0x10; 0E3F 08 .byte 0x08,0x0C; 0E41 14 .byte 0x14,0xE8; 0E43 E4 .byte 0xE4,0x04; 0E45 32 .byte 0x32,0xFC; /* Vector list for the energy cannon */ energy_cannon: 0E47 04 .byte 0x04,0x18; 0E49 04 .byte 0x04,0xE0; 0E4B 14 .byte 0x14,0xF8; 0E4D FC .byte 0xFC,0x14; 0E4F F4 .byte 0xF4,0x08; 0E51 08 .byte 0x08,0xDC; 0E53 EC .byte 0xEC,0x0C; 0E55 EC .byte 0xEC,0xF4; 0E57 08 .byte 0x08,0x24; 0E59 F4 .byte 0xF4,0xF8; 0E5B FC .byte 0xFC,0xEC; 0E5D 14 .byte 0x14,0x08; 0E5F 04 .byte 0x04,0x20; fireball: 0E61 EC .byte 0xEC,0xEC; 0E63 30 .byte 0x30,0x14; 0E65 D0 .byte 0xD0,0x14; 0E67 14 .byte 0x14,0xD0; 0E69 14 .byte 0x14,0x30; 0E6B D0 .byte 0xD0,0xEC; 0E6D 30 .byte 0x30,0xEC; 0E6F EC .byte 0xEC,0x30; 0E71 EC .byte 0xEC,0xD0; /* * Table of pointers to vector lists, having the * following format: * * line pattern, rel y, rel x, * line pattern, rel y, rel x, * . * . * 0x01 * * These look like they are vector lists for the energy * bombs. By displaying these various patterns, you * get the impression that the bomb is twinkling. */ energy_bomb_VL_table: 0E73 0E .word 0x0E83; 0E75 0E .word 0x0E99; 0E77 0E .word 0x0EAF; 0E79 0E .word 0x0EC5; 0E7B 0E .word 0x0EDB; 0E7D 0E .word 0x0EF1; 0E7F 0F .word 0x0F07; 0E81 0F .word 0x0F1D; 0E83 FF S0E83: .byte 0xFF,0x0A,0xF6; 0E86 00 .byte 0x00,0x00,0x14; 0E89 FF .byte 0xFF,0xEC,0xEC; 0E8C 00 .byte 0x00,0x00,0x14; 0E8F FF .byte 0xFF,0x0A,0xF6; 0E92 00 .byte 0x00,0x0C,0xF4; 0E95 FF .byte 0xFF,0x04,0xFC; 0E98 01 .byte 0x01; 0E99 FF S0E99: .byte 0xFF,0x0A,0xF6; 0E9C 00 .byte 0x00,0x00,0x14; 0E9F FF .byte 0xFF,0xEC,0xEC; 0EA2 00 .byte 0x00,0x00,0x14; 0EA5 FF .byte 0xFF,0x0A,0xF6; 0EA8 00 .byte 0x00,0x0A,0x06; 0EAB FF .byte 0xFF,0x0C,0x08; 0EAE 01 .byte 0x01; 0EAF FF S0EAF: .byte 0xFF,0x0A,0xF6; 0EB2 00 .byte 0x00,0x00,0x14; 0EB5 FF .byte 0xFF,0xEC,0xEC; 0EB8 00 .byte 0x00,0x00,0x14; 0EBB FF .byte 0xFF,0x0A,0xF6; 0EBE 00 .byte 0x00,0xFE,0x06; 0EC1 FF .byte 0xFF,0x04,0x0C; 0EC4 01 .byte 0x01; 0EC5 FF S0EC5: .byte 0xFF,0x0A,0xF6; 0EC8 00 .byte 0x00,0x00,0x14; 0ECB FF .byte 0xFF,0xEC,0xEC; 0ECE 00 .byte 0x00,0x00,0x14; 0ED1 FF .byte 0xFF,0x0A,0xF6; 0ED4 00 .byte 0x00,0xFA,0x08; 0ED7 FF .byte 0xFF,0x04,0x04; 0EDA 01 .byte 0x01; 0EDB FF S0EDB: .byte 0xFF,0x0A,0xF6; 0EDE 00 .byte 0x00,0x00,0x14; 0EE1 FF .byte 0xFF,0xEC,0xEC; 0EE4 00 .byte 0x00,0x00,0x14; 0EE7 FF .byte 0xFF,0x0A,0xF6; 0EEA 00 .byte 0x00,0xF6,0x06; 0EED FF .byte 0xFF,0xF8,0x04; 0EF0 01 .byte 0x01; 0EF1 FF S0EF1: .byte 0xFF,0x0A,0xF6; 0EF4 00 .byte 0x00,0x00,0x14; 0EF7 FF .byte 0xFF,0xEC,0xEC; 0EFA 00 .byte 0x00,0x00,0x14; 0EFD FF .byte 0xFF,0x0A,0xF6; 0F00 00 .byte 0x00,0xF4,0xF8; 0F03 FF .byte 0xFF,0xFC,0x08; 0F06 01 .byte 0x01; 0F07 FF S0F07: .byte 0xFF,0x0A,0xF6; 0F0A 00 .byte 0x00,0x00,0x14; 0F0D FF .byte 0xFF,0xEC,0xEC; 0F10 00 .byte 0x00,0x00,0x14; 0F13 FF .byte 0xFF,0x0A,0xF6; 0F16 00 .byte 0x00,0xF4,0xF4; 0F19 FF .byte 0xFF,0xF8,0xF8; 0F1C 01 .byte 0x01; 0F1D FF S0F1D: .byte 0xFF,0x0A,0xF6; 0F20 00 .byte 0x00,0x00,0x14; 0F23 FF .byte 0xFF,0xEC,0xEC; 0F26 00 .byte 0x00,0x00,0x14; 0F29 FF .byte 0xFF,0x0A,0xF6; 0F2C 00 .byte 0x00,0x06,0xF4; 0F2F FF .byte 0xFF,0xFC,0xFC; 0F32 01 .byte 0x01; /* Vector list for a ring (castle wall) */ ring: 0F33 28 .byte 0x28,0x64; 0F35 3C .byte 0x3C,0xC4; 0F37 00 .byte 0x00,0xB0; 0F39 C4 .byte 0xC4,0xC4; 0F3B B0 .byte 0xB0,0x00; 0F3D C4 .byte 0xC4,0x3C; 0F3F 00 .byte 0x00,0x50; 0F41 3C .byte 0x3C,0x3C; 0F43 50 .byte 0x50,0x00; 0F45 09 S0F45: .byte 0x09; 0F46 02 .byte 0x02; 0F47 02 .byte 0x02; 0F48 03 .byte 0x03; 0F49 03 .byte 0x03; 0F4A 04 .byte 0x04; 0F4B 04 .byte 0x04; 0F4C 05 .byte 0x05; 0F4D 05 .byte 0x05; 0F4E 06 .byte 0x06; 0F4F 06 .byte 0x06; 0F50 07 .byte 0x07; 0F51 07 .byte 0x07; 0F52 08 .byte 0x08; 0F53 08 .byte 0x08; 0F54 09 .byte 0x09; explosion_star: 0F55 FF .byte 0xFF,0x40,0x00; 0F58 00 .byte 0x00,0xC0,0x00; 0F5B FF .byte 0xFF,0x00,0x40; 0F5E 00 .byte 0x00,0x00,0xC0; 0F61 FF .byte 0xFF,0xC0,0x00; 0F64 00 .byte 0x00,0x40,0x00; 0F67 FF .byte 0xFF,0x00,0xC0; 0F6A 00 .byte 0x00,0x00,0x40; 0F6D FF .byte 0xFF,0x40,0x40; 0F70 00 .byte 0x00,0xC0,0xC0; 0F73 FF .byte 0xFF,0xC0,0x40; 0F76 00 .byte 0x00,0x40,0xC0; 0F79 FF .byte 0xFF,0xC0,0xC0; 0F7C 00 .byte 0x00,0x40,0x40; 0F7F FF .byte 0xFF,0x40,0xC0; 0F82 00 .byte 0x00,0xC0,0x40; 0F85 01 .byte 0x01; explosion_dots: 0F86 35 .byte 0x35,0x00; 0F88 F3 .byte 0xF3,0x0D; 0F8A F3 .byte 0xF3,0xFF; 0F8C E1 .byte 0xE1,0x26; 0F8E EC .byte 0xEC,0x03; 0F90 F3 .byte 0xF3,0xE6; 0F92 EB .byte 0xEB,0x00; 0F94 F1 .byte 0xF1,0xEC; 0F96 10 .byte 0x10,0xF1; 0F98 FA .byte 0xFA,0xEE; 0F9A 1D .byte 0x1D,0xF8; 0F9C 0F .byte 0x0F,0xE4; 0F9E 0F .byte 0x0F,0x12; 0FA0 19 .byte 0x19,0xF7; 0FA2 06 .byte 0x06,0x1A; author: 0FA4 20 .byte 0x20; 0FA5 90 .byte 0x90; 0FA6 50 .byte "PROGRAMMED BY",0x80; 0FB4 E0 .byte 0xE0; 0FB5 90 .byte 0x90; 0FB6 57 .byte "WILLIAM HAWKINS",0x80; 0FC6 90 .byte 0x90; 0FC7 C0 .byte 0xC0; 0FC8 47 .byte "GT 1983 ",0x80,0x00; game_over: 0FD4 58 .byte 0x58; 0FD5 D0 .byte 0xD0; game_over2: 0FD6 47 .byte "GAME OVER",0x80; player1: 0FE0 48 .byte 0x48; 0FE1 D0 .byte 0xD0; 0FE2 50 .byte "PLAYER 1",0x80; player2: 0FEB 48 .byte 0x48; 0FEC D0 .byte 0xD0; 0FED 50 .byte "PLAYER 2",0x80; 0FF6 00 .byte 0x00; 0FF7 00 .byte 0x00; 0FF8 00 .byte 0x00; 0FF9 00 .byte 0x00; 0FFA 00 .byte 0x00; 0FFB 00 .byte 0x00; 0FFC 00 .byte 0x00; 0FFD 00 .byte 0x00; 0FFE 00 .byte 0x00; 0FFF 00 .byte 0x00; + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!dog.ee.lbl.gov!news.cs.utah.edu!u.cc.utah.edu!cadehp8.eng.utah.edu!jnichola From: jnichola@cadehp8.eng.utah.edu (jason barkdull) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 24 Aug 1994 14:52:01 GMT Organization: University of Utah College of Engineering Lines: 19 Distribution: inet Message-ID: <33fmqh$l6k@u.cc.utah.edu> References: <33dpug$i51@falcon.ccs.uwo.ca> <33e8bk$lvn@u.cc.utah.edu> NNTP-Posting-Host: cadehp8.eng.utah.edu >: so how does the wheel turn? > >A motor! :) It basically clamps onto a motor inside of the goggles. i figured it was a motor, but where is it located. you answered that, thanks. >Did that help any? Probably not... Over labor day weekend I'll take a >pic of my Imager and wheel, scan it and send it to the archive so >everyone can see what these things look like. (Unless someone beats me >to it...) > >Rik > yes this helped but i'll be looking forward to seeing the pic. so, you have these goggles on with a 6 inch wheel buzzing away? do the goggles plug into one of the control ports? + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!netcom.com!netcomsv!dms!villagran From: villagran@agames.agames.com (Alex Villagran) Subject: FAQ wanted... Message-ID: <1994Aug24.152313.10374@dms.agames.com> Sender: news@dms.agames.com (Net News Admin) Organization: Atari Games Corporation X-Newsreader: TIN [version 1.2 PL2] Date: Wed, 24 Aug 1994 15:23:13 GMT Lines: 8 I have been following this group, but I have not been able to see the FAQ. Where can I find a copy of the FAQ, and what is the address of the vectrex data site? Alex Villagran villagran@agames.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!chpc.utexas.edu!news.utdallas.edu!corpgate!crchh327.bnr.ca!woodcock From: woodcock@bnr.ca (Gregg Woodcock) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 24 Aug 1994 17:05:52 GMT Organization: Bell-Northern Research; Richardson, Texas, USA Lines: 35 Distribution: inet Message-ID: <33fulg$1p8@crchh327.bnr.ca> References: <33cp7g$icf@nic.umass.edu> <33dg5l$r59@u.cc.utah.edu> <33dpug$i51@falcon.ccs.uwo.ca> <33e8bk$lvn@u.cc.utah.edu> Reply-To: woodcock@unicomp.net (Gregg Woodcock) NNTP-Posting-Host: crchh75b.bnr.ca X-Newsreader: TIN [version 1.2 PL2] jason barkdull (jnichola@cadesm34.eng.utah.edu) wrote: > that helps alot! > so how does the wheel turn? A tiny motor like we all used to toy with when we were kids. > how fast? Don't know the frequency but it is directly proprotional to the voltage supplied to the power pin which... > how's it syncronized? There is a tiny hole towards the hub of the disk and on either side of the disk are opto-LEDs which can sense when the hole is between them. If the frequency is too slow, the voltage is bumped up; too fast and it is dropped. If it cannot speed the wheel up with maximum voltage (i.e. if you hold the disk with your finger or something), it will slow the vectors down and sync the picture that way. If the vector refresh falls too low (i.e. the disk is stopped or VERY slow even at maximum voltage), the game will abort. This is why you get nothing when you run a 3D game w/o the goggles, there is no sync signal so the game aborts continuously and you get nothing on the screen. If *I* had programmed it, I would have put a non-3D error message on the screen in this case but.... > do you need the goggles? Yes, the cart will do absolutely nothing w/o them as described above. -- THANX...Gregg day 214.684.7380 night UNLIST/PUBL TEXAS NOT CANADA! woodcock@bnr.ca or woodcock@nt.com or bn202@cleveland.freenet.edu *CLASSIC VIDEOGAME COLLECTOR BUY/SELL/TRADE PRE-NINTENDO (ARCADE/HOME)* "If you quote me on this I'll have to deny it; I won't remember because I have such a bad memory. Not only that, but my memory is *terrible*." + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!tcsi.tcs.com!mira!keith From: keith@mira.tcs.com (Keith Jarett) Newsgroups: rec.games.vectrex Subject: Re: Looking for 3d games Date: 24 Aug 1994 17:45:57 GMT Organization: Teknekron Communications Inc. Lines: 16 Distribution: inet Message-ID: <33g10l$nge@tcsi.tcs.com> References: <33e8bk$lvn@u.cc.utah.edu> <33fmqh$l6k@u.cc.utah.edu> NNTP-Posting-Host: mira.tcs.com In article <33fmqh$l6k@u.cc.utah.edu> jnichola@cadehp8.eng.utah.edu (jason barkdull) writes: > >so, you have these goggles on with a 6 inch wheel buzzing away? More like 4 inches. It is pretty quiet unless you move your head, causing the wheel to scrape against the cavity. >do the goggles plug into one of the control ports? Yes. There wouldn't be room close enough to the screen for 2 players anyway. keith@tcs.com Keith Jarett + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex From: Colin@colb.demon.co.uk (Colin Bailey) Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!news.sprintlink.net!demon!colb.demon.co.uk!Colin Subject: does any one have any games? Organization: Myorganisation Reply-To: Colin@colb.demon.co.uk X-Newsreader: Demon Internet Simple News v1.29 Lines: 13 Date: Wed, 24 Aug 1994 18:40:35 +0000 Message-ID: <777753635snz@colb.demon.co.uk> Sender: usenet@demon.co.uk Does anyone on here, particularly in the UK have any Vactrex games for sale? I have scramble and Cosmic chasm already. Please Email me, wherever you may be!!!!! -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =- Colin Bailey -=-=- Beer, PCs, Bikes, gifs, jpgs -= -= Colin@colb.demon.co.uk -=-=- more beer, a SNES, some Simpsons =- =- THE UK, ENGLAND!!! -=-=- figures, and a video, or something.. -= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!csusac!zimmer!nic-nac.CSU.net!usc!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!scsing.switch.ch!news.belwue.de!dakeeper!reutter From: reutter@dakeeper.igd.fhg.de (H.J.-L.Reutter) Newsgroups: rec.games.vectrex Subject: Pinout needed, please Date: 24 Aug 1994 20:29:45 GMT Organization: Haus der Graphischen Datenverarbeitung, 64283 Darmstadt, Germany Lines: 63 Sender: reutter@dakeeper (H.J.-L.Reutter) Distribution: world Message-ID: <33gajp$6cv@news.belwue.de> Reply-To: reutter@igd.fhg.de NNTP-Posting-Host: dakeeper.igd.fhg.de Please somebody help me out on this, I have a list of the pins of the Vectrex cart port: (from the archive) Pin # info source designation ----- ----------- ----------- 1 Ohm HALT* (MPU 40) 2 Ohm Vcc (MPU 7) 3 cart A7 (ROM 1) 4 Ohm Vcc (MPU 7) 5 cart A6 (ROM 2) 6 cart A8 (ROM 23) 7 cart A5 (ROM 3) 8 cart A9 (ROM 22) 9 cart A4 (ROM 4) 10 cart A11 (ROM 21) 11 cart A3 (ROM 5) 12 cart OE*/Vpp (ROM 20) (LS32 1) 13 cart A2 (ROM 6) 14 cart A10 (ROM 19) 15 cart A1 (ROM 7) 16 cart CE* (ROM 18) A15 (MPU 23) (LS32 2) 17 cart A0 (ROM 8) 18 cart D7 (ROM 17) 19 cart D0 (ROM 9) 20 cart D6 (ROM 16) 21 cart D1 (ROM 10) 22 cart D5 (ROM 15) 23 cart D2 (ROM 11) 24 cart D4 (ROM 14) 25 cart GND 26 cart D3 (ROM 13) 27 cart GND 28 cart GND (ROM 12) 29 Ohm A12 (MPU 20) 30 Ohm (PIA 22) (35 Ohms to R/W* (MPU 32)) 31 Ohm A13 (MPU 21) 32 Ohm (LS32 3) 33 Ohm A14 (MPU 22) 34 Ohm NMI* (MPU 2) 35 Ohm (PIA 16) 36 Ohm IRQ* (MPU 3) But now the big question? Which pin in this list goes together with which pin on the port: port: [====================] Is it: 1 13 [====================] 14 36 or ??? I'm not an electronics expert and I don't want to blow up my Vectrex by poking around at the port. So if somebody knows the asnwer, please send me a mail or post it here - thanks a lot! Greetings Jean-Luc -- H.J.-L.Reutter,reutter@igd.fhg.de,ZGDV,Wilhelminenstrasse7,Darmstadt,64283 Germany,@work+49(0)6151/155-205,CybrRoach@IRC,hreutte@andy.bgsu.edu(UseAtO wnRisk),goforthandliveasartthebeatlesfascistbastardsgotohellillusionsthedo orintosummerbowlinggreenstateuniversitytrekstuffaimeemanngroundsforthought + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ames!agate!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!uunet!george.inhouse.compuserve.com!news.inhouse.compuserve.com!compuserve.com!news From: Bronson Trevor III <72560.2035@CompuServe.COM> Newsgroups: rec.games.vectrex Subject: Re: Need Second Controller Date: 25 Aug 1994 15:44:57 GMT Organization: - Lines: 8 Distribution: inet Message-ID: <33ie9p$5nr$1@mhadf.inhouse.compuserve.com> I have a vectrex and about 16 games, but my second controller was broken and lost awhile back. Does anyone have an extra controller lying around. I can trade for a few 3d games I have or for an extra copy of "scramble" that I have - thanx! -- Bronson Trevor III 72560.2035@compuserve.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!agate!howland.reston.ans.net!cs.utexas.edu!uunet!fonorola!interlog.com!mharrop From: daves@interlog.com Newsgroups: rec.games.vectrex Subject: Re: Commented sources Date: Thu, 25 Aug 94 23:27:46 PDT Organization: Interlog Internet Services -Voice (416) 975-2655 -Data 515-1414 Lines: 18 Distribution: inet Message-ID: <33jpcr$pvc@steel.interlog.com> References: <1994Aug23.230315.16216@hpcvusn.cv.hp.com> NNTP-Posting-Host: 198.53.146.34 Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage In article <1994Aug23.230315.16216@hpcvusn.cv.hp.com>, writes: > Ok ... I give up. I've tried breaking up the code into pieces, compressing > and uuencoding the files, but the 'news' reader still rejects them. If you > want the 4 source files, simply mail me a request and I'll mail it to > you directly. For now, that's easier than figuring out why 'news' is > being such a pain :-( I'll try to ship out the sources the same day > I receive the request (starting Wednesday, since I'm leaving now). > > Fred Taft > fred@hp-pcd.cv.hp.com Surely some kind soul can house these on an anonymous FTP server, can't they ? (The vectrex archives already live in one, don't they still ?) - Dave + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Newsgroups: rec.games.vectrex Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!sdd.hp.com!hp-pcd!hpcvusn!hpcvlx!fred From: fred@hpcvlx (Fred Taft) Subject: 6809 Assembler Needed Message-ID: <1994Aug31.160932.11651@hpcvusn.cv.hp.com> Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999) Nntp-Posting-Host: hpcvlx.cv.hp.com Organization: Hewlett-Packard Company, Corvallis, Oregon USA X-Newsreader: Tin 1.1 PL5 Date: Wed, 31 Aug 1994 16:09:32 GMT Lines: 12 Now that I've dug my 6809 disassembler out of the moth balls, I'd really like to get my hands on a 6809 assembler which I can compile on my HP-UX box. Does anyone have such a beast? Once I have an assembler, I want to modify my disassembler so that it generates compatible code; at that point, I will make the disassembler available to anyone wanting it. Thanks! Fred Taft fred@hp-pcd.cv.hp.com + - - - - Next Article - - - - - - - - - - - - - - - - - - - - - - - - + Path: csus.edu!uop!pacbell.com!ihnp4.ucsd.edu!dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!gatech!news.byu.edu!cwis.isu.edu!u.cc.utah.edu!cadehp8.eng.utah.edu!jnichola From: jnichola@cadehp8.eng.utah.edu (jason barkdull) Newsgroups: rec.games.vectrex Subject: Re: 6809 Assembler Needed Date: 1 Sep 1994 00:02:08 GMT Organization: University of Utah College of Engineering Lines: 76 Sender: jnichola@cadehp0.eng.utah.edu Distribution: inet Message-ID: <3435m0$p6b@u.cc.utah.edu> References: <1994Aug31.160932.11651@hpcvusn.cv.hp.com> NNTP-Posting-Host: cadehp8.eng.utah.edu hey fred: i've tried mailing you this. but it keeps bouncing so... I got this from the alt.comp.sys.m6809. the assembler described here in is just the .exe files for a PC, HOWEVER, there are other files at this same site and directory containing C source for 6809 cross assembler. Also try using archie to find others. *************************************** I have uploaded to the SimTel Software Repository (available by anonymous ftp from the primary mirror site OAK.Oakland.Edu and its mirrors): SimTel/msdos/crossasm/ as09_105.zip Assembler for M6809/H6309 [1.05] AS09 [1.05] - Assembler for M6809/H6309 microprocessor. Features: - fast two-pass assembly. - supports binary, s-records or intel-hex output file formats. - three segments (code, data, bss) for ROM-based programs. - 'struct' keyword for easy declarations. - instruction cycle count in listing (including 6309 differences). - full conditional assembly with CPU identifying defines. - C-style expressions, accept base 2...36, using either % and $ prefixes or # format, 32-bit calculations. - accepts full 6309 instruction set extensions to the M6809 (can be enabled from the commandline using -x option) - runs under MS-DOG 3.x or higher, or AmigaDos 1.2 or higher. New in version [1.05] - cosmetic changes - now allows - to specify stdout for listing - fixed instruction cycle count for NOP on the 6309 - fixed small bug that first showed up in Amiga version. - added option to set infinite page length Uploaded by the author. Frank A. Vorstenbosch +31-70-355 5241 P.O. Box 85800 Kingswood Software Fax/Modem +31-70-355 8674 2508 CM The Hague prompt@hacktic.nl The Netherlands *********************************** ________ ________ - _ \ / _ - ~ \ _ / ~ the @@ \ jaybird }'}'||\ + - - - - End of Archive File - - - - - - - - - - - - - - - - - - - - +