User Tools

Site Tools


oric:hardware:telestrat_joystick_drivers

Notes about the Telestrat Joystick Ports

The Telestrat came with two standard joystick ports on the left and right sides of the machine. The right joystick port was also suitable for the Telestrat Mouse and the left port also had an additional line for some sort of Joystick Doubler (perhaps to allow two joysticks whilst the other port was used for the Telestrat Mouse?).

Note all drivers use a common label list that is found here generic_joystick_drivers

Be careful, on the VIA 6522, if you press something on the joystick, the bit is LOW on port B not HIGH

You can use PC joypad or usb mouse, but you need more hardware to do that. You can buy Tom2 hardware. You can plug a usb mouse, but you will need to code the driver with this mouse.

Hardware Notes

The Telestrat (unlike all its predeccesors) had two joystick Ports positioned on either side of the machine. Both were powered and both supported a second fire button. The Joystick (and second fire) was supported by Pulsoids. Both joysticks were connected to Port B of the second VIA of the Telestrat whilst the second fire was connected to Port A of the Second VIA (Location $032F)

VIA2 PortB Location 0320

B7 Select Right Joystick
B6 Select Left Joystick
B5 -
B4 Up(Inverted)
B3 Down(Inverted)
B2 Fire(Inverted)
B1 Left(Inverted)
B0 Right(Inverted)

Is it possible to read both joysticks by setting both B6 and B7?

Generic Joystick Driver for the Telestrat Joystick Ports

The following code provides a standard output for detection of joystick movements in your own code. The bits corresponding to joystick movement use a look up table to make them comply with the Generic Format.

         GenericReadTelestratJoyPorts 
              LDA #%01000000 ;  PB6 	Select Left Joystick port
              STA via2_portb ; Activate left port
              LDA via2_portb ; Read port B
              AND #%00011111 ; Mask to fetch joysticks bits PB0..PB4 	Joystick ports
              TAX
              LDA TelestratLower5BitJig,X
              STA joy_Left
              LDA #%10000000
              STA via2_portb
              LDA via2_portb
              AND #%00011111
              TAX
              LDA TelestratLower5BitJig,X
              STA joy_Right
              RTS
         TelestratLower5BitJig
          .byt 0,2,1,0,32,34,33,to be continued..

Testing routine for joystick port (Crap routine but it works)

You will need to reset your telestrat (because it shifts portb register) after this routine

#define via2_portb    $0320
#define addr_vid $bb80+40*10+5
*=$1000
;It does not select port (left or right : this means that the routine will work on both port)
;if everything is OK, you will see that on the screen
;      U
;     RXL
;      D
loop
 lda via2_portb
 lsr ; we 'lsr' to have a quicker routine
 bcc right
 lsr
 bcc left
 lsr
 bcc fire
 lsr 
 bcc down
 lsr
 bcc up
 jmp loop
up
 lda #85
 sta addr_vid+1-40
 jmp loop
down
 lda #68
 sta addr_vid+1+40
 jmp loop
fire
 lda #88
 sta addr_vid+1
 jmp loop
right
 lda #82
 sta addr_vid+2
 jmp loop
left
 lda #76
 sta addr_vid
 jmp loop
oric/hardware/telestrat_joystick_drivers.txt · Last modified: 2020/05/12 16:21 by polluks