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

Re: wacky game idea :)



In article <4jsboh$4g5@asia.lm.com> mportune@telerama.lm.com (Matt Portune)
writes:
>Doede Boomsma (dboomsma@sci.kun.nl) wrote:
>> It's a cool idea! I like it... Only, eeeh., I can't program :(
>
>I was thinking about how to make the code in BASIC today, and the deeper 
>I got into it, I began to realize I really don't know 3D engine design 
>concepts.  Could anybody help me out on this one?  If we go all out and 
>use the ensoniq chip as well, is there ANY way to access it through 
>Applesoft?  I really wanna do this now.  :)

I'm afraid I can't help with the 3D engine stuff, but I can assure you that
it is entirely possible to access the Ensoniq from Applesoft.  Not always
convenient, but possible.  The Sound GLU registers are in the regular I/O
space, at $C03C, $C03D, $C03E, and $C03F.  You can PEEK and POKE them from
BASIC easily.

But if you're going to do it directly from BASIC, you probably want to
avoid setting the GLU to auto-increment mode, so that you won't run into
problems with "false read" and "false write" cycles caused by BASIC's use
of (ZP),Y addressing to implement the PEEK and POKE commands.  

Aside from that, the only real problem is that the master volume control
bits are write-only, so if you want to maintain the Control Panel volume
setting, you'll have to fetch the volume setting from the BRAM or from bank
$E1 (either method, of course, requires calling a small machine-language
routine).

You'll probably want to use machine language to download your wave table
into the DOC RAM.  I imagine you could probably do it entirely from
Applesoft, but it would be slow.  The Sound Toolset provides a convenient
routine for downloading to the DOC RAM, and on my ROM 1 machine, it
doesn't even require that the Sound Toolset be started up.


Read the Apple IIGS Hardware Reference.  Most of what you need to know
about programming the Ensoniq and the Sound GLU is there.

               - Neil Parker
-- 
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker

     "Evolution is vastly overrated."  -- Ambassador Delenn, _Babylon_5_