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

Re: Addressing 2GS slots with Orca Pascal?



Ok, the situation so far is:
a) i/o address is located in first 64 kb memory segment in GS memory map
b) a byte pointer could be used to access I/O address, thanks to ORCA Pascal pointer arithmetics. Depending on i/o hardware restriction (pseudo-slotting) and PASCAL pointer implementation, it may or may not work. To write a GS/OS device driver for TI chip, I will have to go deep into GS system programming.

The first test I will try is to tick the speaker at $C050 in a delay loop to see if it actually works. If it does then I'll start messing up with TMS9918A registers.

I'll be away for the next two days: I will be on a Java course! Thanks for the pointers, guys (no pun intended ;)

Yves

Jalapeno wrote:

In article <pHsE9.1077$l45.358588@news20.bellglobal.com>,
 Yves McDonald <""yves.mcdonald\"@NO SPAM sympatico.ca> wrote:


Hello Apple 2 fans,

I'm an experienced Apple ][+, //e programmer but a newbie when it comes to Apple 2GS 16-bit mode. I whish to experiment with a sprite card based on TI's TMS9918A chip. I'd like to use Orca PASCAL for this instead of fiddling with PEEKs and POKES and their negative decimal addresses and data or using assembler which is tedious to use for a first try. I'll use assembler later on to write a more efficient device driver. Anyway, here's my question: is there a PASCAL programming trick to access memory space dedicated to slot 1-7? On the same line of thought, are there online reference on GS hardware architecture? I have the Toolbox reference books vol. 1 and 2 but I miss the rest of official Apple 2gs book collection.

Thanks,

Yves




Try declaring a pointer type and then use the Pointer function to turn the integer representation of the slot address into a pointer. There is an example in the ORCA Pascal manual under the ORD(4) function that is close.

Let us know if that works because it would be most handy (if I ever write another Pascal program. The last one I wrote was in 1989 and before that from 1982-1984 when Pascal was the Java of its time ;)