[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Attention assembly programmers...
- Subject: Attention assembly programmers...
- From: andrep@balboa.eng.uci.edu (Andre Prellwitz)
- Date: 17 Jan 93 21:20:43 GMT
- Keywords: joystick, DOC, sound, IIGS
- Newsgroups: comp.sys.apple2
- Organization: University of California, Irvine
A while ago someone posted about how to read the joystick on a //gs in native
mode. They said that it was possible to read both paddles at once and there-
fore get much more accurate readings. I don't recall exactly how to do this,
but I've been trying the following: strobe the analog paddle reset ($c070)
and then read locations $c064 and $c065 and wait until both return to zero.
The code I've been using is...
resetin = $e0c070
buttons = $e0c061
joy0 = $e0c064
pad0 dw 0
pad1 dw 0
read_joy sep #$30
stal resetin
rep #$30
stz pad0
stz pad1
]LUP ldal joy0
bit #$ff
beq ~j1
inc pad0
~j1 bit #$ff00
beq allread?
inc pad1
allread? and #$ffff
bne ]LUP
ldal buttons
rts
Can anyone point out my (obvious?) mistake if I have gotten the basic method
correct?
Question #2: Why do oscillators in the DOC need to be paired to output sound?
I have gotten sound out of the DOC by only turning on ONE osc. (albeit a bit
weak) at a time. Aside from the restriction that an osc. cannot be in SWAP or
AM/SYNC mode when playing alone, what other restrictions are there? Also, I
haven't tried this yet, but when a generator (paired osc.) is in SYNC mode but
both output to different channels, which channel does sound go to?
Thanks for any tips...email at: andrep@balboa.eng.uci.edu
----
The University of CA, Irvine has nothing to do with these comments. They are
only responsible for making me a smarter, poorer person.