Access Parallel and/or Game port
  • Moderator
    Senex
    Posts: 498 from 2003/2/17
    From: Hannover / Ger...
    A fellow Pegasos user approached me for help regarding access of the Pegasos' parallel or game port in C. Being not really a developer myself, I hope someone of you can help Stany regarding his question - he asked already at the MDC but got no reply there yet. Many thanks in advance!

    Here is what Stany told me:

    "At moment I can't use the game port or parallel port on my Pegasos in C.

    For my hobby I want to use these ports, but I need a good example to see how this is done.

    I already asked at the MorphOS developer forum but didn't get a reply yet. But someone else asked for the following, too, which is exactly what I'd like to do as well. He wrote:

    ====================

    Re: how to program the parallel port under AOS/MOS to communicate with
    non-printer hardware in C/C++?

    If the parallel.device driver can access the hardware, other code can do it too of course. I understand that that code might have to run at the OS level, what would require me to write a device driver... I would rather avoid that ;-)

    I need the following features:

    - write access to the 8 data lines (pin 2-9)
    - read/write access to the strobe line (pin 1)
    - read access to the Ack, Busy, PaperEnd, SelectIn and Error lines (pin 10-13 & 15 respectively)
    - read/write access to the EPP/ECP address register
    - read/write access to the EPP/ECP data register
    - some means of control so select a register

    ====================

    So, please, is there any way that someone could provide a good example in C for the Pegasos to use the parallel port i/o (like above) and the game port i/o...?

    If I have a good example, I can find out how it works, and turn my Pegasos into my best computer. ;-) But without such an example, I'm unable to find it out myself. :-("

    So far Stany's question. He did already program these ports on the C64 and the Amiga (as you will be able to read about in the next issue of Amiga Plus ;-)), where he had examples for from a dutch electronics magazine. Again many thanks in advance for providing him also such an example for the Pegasos!
  • »07.05.04 - 10:29
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Bifford
    Posts: 275 from 2003/2/24
    From: Wiltshire, UK
    Hi

    Does the MDC not have anything???
    ========
    Bifford the Youngest

    My Website at: www.whiteharegames.co.uk/
  • »07.05.04 - 10:55
    Profile Visit Website