[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: woz' original "brick out" - source code , paddles



On Oct 23, 10:35 am, mad.scientist...@gmail.com wrote:
> Thanks to you both - between the sample code and emulator I learned
> how to make a game for the Apple!

neat!  You can also paste this code into AppleWin emulator.
type your code into wordpad/notepad, etc.
select it,
copy it,
go to emulator basic prompt
NEW
then press SHIFT-INSERT
it will type the code into the emulated basic prompt


> There is no sound or scoring yet (how do you print text in graphics
> mode?)

sc = 983
VTAB 21:print "score= ";sc;" ";

>and for keyboard mode I haven't figured out how to detect if
> two keys are being pressed at once.

you cant.

the only way you can detect two keys:
use SHIFT and open/closed apple.

example:

input a$
if a$ = "a" then print "you pressed the a key"
if a$="A" then print "you pressed SHIFT and the A key"

but it requires you to press A...  you can't detect SHIFT
by itself.

the open/closed apple keys are connected to the paddle
circuits.  read in the apple II reference manual for the
correct peeks

b2utton = -16297
b1utton = -16296  (both values are DEFINITELY not correct)

10 if peek (b2utton) > 128 then print "you pressed button 2"

(or, could be "you pressed open apple")

the only way to play a 2 player game on the keyboard is to have
the players constantly tapping their keys, or use the open/closed
apple keys for one of the players.

Rich