Login
Search for:


Previous | Next

From: siz (all posts)
Date: 1999-03-18
Subject: Re: Lightpen
On Thu, 18 Mar 1999 racs@fs2.bdtf.hu wrote:

> Yesterday midnight I checked out the programs for the lightpen. I
> was not able to figure out how horizontal position is being
> measued. Vertical easy, when the sign coming in from the pen
> (joybutton press), then it simply reads $FF1D.

Hm. I didn't use my plusy 4 years ago... So I might remember incorrectly.

There are two TED registers (probably $FF1E and $FF1F) containing the current raster line position.

> There is an other strange feature (or probably I am underinformed):
> writing $FF both $FD30 and $FF08 then reading means both joy

This will not read anything but $FF.

$FD30 selects the row of the keyboard so if you don't want your joystick to be emulated from keyboard you might write $FF here (or somewhere between $FD30 and $FD3F, they are the same register) to disable keyboard.

Writing to $FF08 causes TED to reread its' scan lines to $FF08 and the joystick selects are wired to the bits 2 and 3 as i remember so when you write $FB to $FF08 it selects one of the joystick ports (probably the second, i'm sorry it was too much ago) and $FD selects the other, so $F9
selects both joysticks.

Using this if you write your scan row value to $FD30 and write $FF to
$FF08 then the value read from $FF08 will not contain joystick info. Thus you can make difference between joysticks and keyboard properly.

> button read. (That I heard once.) But: reading $FD0D? Is this some
> kind of mirroring $FF08? Or a direct read from the joy?

>From $FD00 to $FD0F there is the ACIA address range (it's only 4 registers really but they are mirrored to 16). The ACIA is the serial interface in the plus/4 that's available on the user port.

--
Szell Imre (Siz)
siz@adam.hu

Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon