PCI handling under MorphOS
  • Caterpillar
    Caterpillar
    spirantho
    Posts: 23 from 2003/4/25
    Hi everyone,

    as some of you may know I'm going to try and port my Catweasel driver to MorphOS - but I'm not sure what PCI library to use. AROS and AOS 4 (which I'm porting from) both have their own PCI APIs, and while I know MorphOS has openpci.library, I'm not sure if it's supported on all MOS machines (it said "requires Pegasos II" on the website).

    What PCI subsystem should I use, and is there anywhere I can find a good example of how to use it please?

    Thanks!
    Ian Gledhill
    ian.gledhill@btinternit.com (but it's a nEt, not a nIt)
  • »15.11.10 - 07:34
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3204 from 2003/3/5
    From: Canada
    openpci.library is just a wrapper for pcix.library on MorphOS. It'd probably be best if you used pcix.library directly, but I'm afraid there's no doc for it in the SDK at the moment.
  • »15.11.10 - 08:51
    Profile Visit Website
  • Caterpillar
    Caterpillar
    spirantho
    Posts: 23 from 2003/4/25
    Are there any examples you can recommend? I can probably work it out from an example. A doc would definitely by handy, though... not going to be easy porting drivers to MorphOS if there's no documentation!

    Edit: Ah! I found a pcix.doc autodoc. That should be enough. :)

    [ Edited by spirantho on 2010/11/15 11:02 ]
    Ian Gledhill
    ian.gledhill@btinternit.com (but it's a nEt, not a nIt)
  • »15.11.10 - 08:56
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    On the other hand openpci based driver works on OS3, too, at least on some PCI expansion systems.
    1 + 1 = 3 with very large values of 1
  • »15.11.10 - 09:25
    Profile
  • Caterpillar
    Caterpillar
    spirantho
    Posts: 23 from 2003/4/25
    I've got most of my Catweasel drivers working now.. except that they don't do anything. At all. The code is running, it's reading/writing to an address which tallies with the CW.. but no signs of life from the CW.

    Is there any source code relating to using pcix.library I can use? I just need to know if it's doing what I think it's doing. I have the address, it's writing and reading from the address, but absolutely nothing is happening. Same code (same reads/writes) works under AOS and AROS.
    The pcix documentation I have only covers a few functions.. beyond the grabbing of the device it's useless. I noticed my AllocDMA call failed, I figured that's because the CW doesn't use DMA. Perhaps there's something amiss there though?

    Can anyone help? ANY example code I could use which uses pcix.library would be great. At the moment I'm feeling what's really letting MorphOS down is the lack of docs.... I'm having to trawl through SDK includes to find flags and commands that should be documented.

    Any help gratefully received!
    Ian Gledhill
    ian.gledhill@btinternit.com (but it's a nEt, not a nIt)
  • »16.11.10 - 15:45
    Profile