Welcome, Guest. Please login or register.


Author Topic: Joystick Port (Read 1016 times)

Offline Mobsie

  • Beginner
  • *
  • Posts: 27
  • Country: de
  • OS:
  • Mac OS X 10.10.2 Mac OS X 10.10.2
  • Browser:
  • Chrome 40.0.2214.111 Chrome 40.0.2214.111
    • View Profile
Joystick Port
« on: 2015.May.28. 17:44:33 »
Before i search and try to google tramslate the wrong, i want to ask how to access the EP Joystick Port with ASM?

Thank you
Mike

Online Zozosoft

  • EP addict
  • *
  • Posts: 13404
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Joystick Port
« Reply #1 on: 2015.May.28. 18:30:12 »
You select on 0B5h I/O port which direction needed to read, then read it on the 0B6h port.
0B5h values for the two joystick sockets (1/2):
0/5: Fire
1/6: Up
2/7: Down
3/8: Left
4/9: Right

For the standard Ext1/Ext2 joy check the Bit 0 of the readed value from 0B6h. If it is 0 then the selected direction are active.
(Note: also possible to attach two more joysticks to both joystick sockets, these can be checked at Bit 1 and Bit 2 of 0B6h port. Then total 6 joysticks possible :-) or two with very lot of buttons :-) The Boxsoft mouse use this capatibility, one extra bits used for the second mouse button.)