English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 07 June 2024, 18:02   #1
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
PCI Stack - new development, and call for feedback

There is a little something I prepared... the new P96 voodoo driver is based on OpenPCI, but unfortunately nobody cares about the (full) version of OpenPCI with mediator support anymore, so we need something. It also not ideal that it is only a wrapper around propietary and (often) undocumented third party libraries, so something needs to be done to clean up in PCI land a little bit. So, I considered, why not offering an API-compatible openPCI library that talks directly to the hardware instead of going through third party libraries?

The attachment is a start, and more a discussion basis. It is an openPCI compatible library that talks directly to the A4000 mediator boards. The API implementation should be pretty complete, including reading the config area, finding boards, reserving cards, reading and writing bytes and allocating interrupts. Needless to say, as this talks to the hardware directly, the Elbox pci.library can go, it is no longer needed. The voodoo driver provided last week runs fine on it (of course, that does not mean that the thing is bug free, but it's a start). What it does not yet offer is the option to reserve DMA bounce buffers on the graphics card because there is still a knot in my brain how to organize this best and what a suitable architecture could be. The current one is... not so great, and suffers from a chicken and egg problem.

There is a also a little bonus: This library implementation not only configures the PCI boards, it also announces them to the expansion.library such that tools like ShowConfig list them, through a dummy vendor ID and a product ID that identifies the type of the resource. The PCI product and vendor ID I could not fit into the ConfigDev structure directly (simply because the PCI product is two bytes, not one as in AmigaOs), but you can still find it there in the serial number information. The vendorID is still in the process of being allocated, but the product ID is taken from the following list:
Quote:
Generic_Bridge EQU 0 ;a PCI bridgeGeneric_PCIConfig EQU 1 ;a PCI config areaGeneric_PCIMem EQU 2 ;a PCI memory areaGeneric_PCIMemReg EQU 3 ;a PCI memory mapped register setGeneric_PCIIO EQU 4 ;a PCI IO mapped regionGeneric_PCIRom EQU 5 ;a PCI expansion ROM
Now, what is the advantage of having this information in expansion? It means that the system no longer needs to build the MMU tables for the entire 512MB (or so) of expansion area reserved by the PCI bridge, but only the areas that are actually populated, which is (typically) less. Thus, if openpci.library is loaded upfront SetPatch (e.g. by making it resident with LoadModule), it will speed up your boot process.

What can you do?

*) The obvious. Testing. This thing is of course another step and a a milestone towards a larger goal, namely having a cleaned up PCI integration of the system.
*) Discussion. Is there anything I miss, I need to integrate (potentially, many things at this stage). Clearly, there should be support for additional PCI bridges. This will take time (and hardware, and testers).
*) Should this possibly also include an emulation layer for other pci-driver libraries or can we settle with OpenPCI as a good common ground for PCI hardware support?

Again, note that this is the beginning, and thus many things are open for discussion. This is mainly posted here to "trigger interest", not so much to provide a product. (But, alas, it already works for the voodoo. Maybe it works for something else, too).
Attached Files
File Type: zip openpci.zip (2.8 KB, 31 views)
Thomas Richter is offline  
Old 07 June 2024, 19:09   #2
Wrangler
Registered User
 
Join Date: Sep 2015
Location: London, UK
Posts: 419
This sounds great! I'll test and report back over the weekend. Can I check that your intention is for this to support Mediators, Altera-based Prometheus and Xilinx-based Prometheus cards? I'm asking as I think we need any new solution to have as broad a base as possible. (Yes, I know there is Grex as well but how many of those actually exist...)
Wrangler is offline  
Old 07 June 2024, 19:37   #3
Mr-Z
Registered User
 
Join Date: Sep 2016
Location: Netherlands
Posts: 85
Too bad I don't have an Amiga with a PCI busboard anymore, but this is a great initiative
Mr-Z is offline  
Old 07 June 2024, 20:10   #4
jasonsbeer
Registered User
 
jasonsbeer's Avatar
 
Join Date: May 2020
Location: Iowa, USA
Posts: 154
This may be relevant to the discussion.

https://github.com/jasonsbeer/AmigaPCI/
jasonsbeer is offline  
Old 07 June 2024, 21:05   #5
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
Quote:
Originally Posted by jasonsbeer View Post
This may be relevant to the discussion.https://github.com/jasonsbeer/AmigaPCI/
Yes, Jason, thank you. I was already attempting to contact you, and I was made aware of this project. Is there anything I can do for you? Is the PCI bridge you are going to use related to the Prometheus board? Then, hopefully, there is nothing extra for me to do, but I do not know.
Thomas Richter is offline  
Old 07 June 2024, 21:06   #6
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
Quote:
Originally Posted by Wrangler View Post
This sounds great! I'll test and report back over the weekend. Can I check that your intention is for this to support Mediators, Altera-based Prometheus and Xilinx-based Prometheus cards? I'm asking as I think we need any new solution to have as broad a base as possible. (Yes, I know there is Grex as well but how many of those actually exist...)
That is the idea, yes. But this will possibly take a while.
Thomas Richter is offline  
Old 08 June 2024, 02:15   #7
jasonsbeer
Registered User
 
jasonsbeer's Avatar
 
Join Date: May 2020
Location: Iowa, USA
Posts: 154
Quote:
Originally Posted by Thomas Richter View Post
Yes, Jason, thank you. I was already attempting to contact you, and I was made aware of this project. Is there anything I can do for you? Is the PCI bridge you are going to use related to the Prometheus board? Then, hopefully, there is nothing extra for me to do, but I do not know.
Hi Thomas - Sending PM now.
jasonsbeer is offline  
Old 08 June 2024, 04:02   #8
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,963
Quote:
Originally Posted by jasonsbeer View Post
This may be relevant to the discussion.https://github.com/jasonsbeer/AmigaPCI/
This looks great too, btw.

As far as the openpci.library, the current initiative is to try openpci versions of drivers on the Mediator, is that the short of it?

Last edited by grelbfarlk; 08 June 2024 at 04:09.
grelbfarlk is offline  
Old 08 June 2024, 09:19   #9
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
That is the current status - or to be precise, the current status is A4000 mediators only. This will hopefully change, the plan is to support more PCI bridges, but this will take a while.
Thomas Richter is offline  
Old 09 June 2024, 13:21   #10
Wrangler
Registered User
 
Join Date: Sep 2015
Location: London, UK
Posts: 419
I'm trying to test out openpci.library and getting stuck. I'm probably doing something dumb:
  • A4000D with Mediator and Voodoo3
  • Removed pci.library from libs:, added openpci.library. Removed old Voodoo.card, added new Voodoo.card from the other thread
  • Copied old Voodoo monitor file. Board type left unchanged as 'Voodoo'
  • In Picasso96Mode, I've attached to the 'Voodoo' board
  • But testing one of the screenmodes doesn't work - it switches out from native Amiga display but then the monitor says no signal

It's possible the problem is with SwitchControl on my Ratte monitor switch? Or have I missed a set-up step?

BTW this is with 2.X of P96. Is v3.X required?
Wrangler is offline  
Old 09 June 2024, 15:09   #11
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
For the voodoo driver, you need indeed a v3. Screen-Dragging is only available for these later versions. Other than that, you are changing too many things at once. First, update P96. Then install the classical OpenPCI version from the source quoted in the driver, keeping the original pci.library. Then try to change to the new openpci.library.
Thomas Richter is offline  
Old 09 June 2024, 15:56   #12
specfreak
Registered User
 
Join Date: Jun 2024
Location: Durham / England
Posts: 2
This could be quite interesting. I've just got my A1200T out of 'storage' and it all worked fine with my BPPC 060@50Mhz/603e@240MHz, then in a week or so it just stopped working :-(. So I sent off my A1200 mobo for recapping and it was confirmed the BPPC is foobar'ed. The mobo is fine although I do get Vertical Lines on my Micronik Scandex scandoubler (via External DB25).

I have a Mediator SX with Voodoo 3/3000 16MB, Sound and Ethernet cards.

So once I get something up and running I might try this out, although you mention its geared towards A4000s at the moment.

I'm just getting back into miggy setup, so will have to explore which Accelerator to get.
Likely a PiStorm 32 Lite or TF1260 or TF1232. So it's gonna be interesting getting my PCI cards backup and running if any of these lack MMU? Booting on stock A1200 moaned about MMU presence.
specfreak is offline  
Old 09 June 2024, 19:55   #13
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
Quote:
Originally Posted by specfreak View Post
I have a Mediator SX with Voodoo 3/3000 16MB, Sound and Ethernet cards.
Note that at the moment the mediators for the A1200 are not yet supported, but I'm on it. There is some prototype code for them already I wrote this weekend, but it is too early to say. So please stay tuned.

Quote:
Originally Posted by specfreak View Post
So it's gonna be interesting getting my PCI cards backup and running if any of these lack MMU? Booting on stock A1200 moaned about MMU presence.
The A1200 mediators suffer from a 4MB or 8MB address window. Thus, without an MMU, only a fraction of the card address space will be available. If you need more, and want to have a larger address space available, you will need a MMU.
Thomas Richter is offline  
Old 09 June 2024, 20:30   #14
Wrangler
Registered User
 
Join Date: Sep 2015
Location: London, UK
Posts: 419
Quote:
Originally Posted by Thomas Richter View Post
For the voodoo driver, you need indeed a v3. Screen-Dragging is only available for these later versions. Other than that, you are changing too many things at once. First, update P96. Then install the classical OpenPCI version from the source quoted in the driver, keeping the original pci.library. Then try to change to the new openpci.library.
OK, updated to P96 v3.4.1. With the new Voodoo.card from the other thread, the "classic" openpci.library and elbox pci.library everything is fine - Voodoo card can switch into an RTG modes. But swapping openpci.library to the version in this thread and going back into P96 Settings to test video modes gives a black (but not "blacker than black") screen, which implies to me that the monitor is getting sync pulses but nothing else.
Wrangler is offline  
Old 09 June 2024, 22:41   #15
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,308
Which kind of mediator is that? Only the A4000 mediators are supported at this moment.
Thomas Richter is offline  
Old 10 June 2024, 01:07   #16
ncafferkey
Registered User
 
Join Date: Sep 2013
Location: Ireland
Posts: 72
This is a great initiative. I was thinking recently about what a pity it is that PCI software is so fragmented on Amiga.

However, IMHO it would be better to use the Prometheus API (i.e. write a prometheus.library for the Mediator hardware). These are my reasons:
  1. prometheus.library has a much more Amiga-like API. As much as I appreciated the idea of a unified Amiga PCI API that OpenPCI offered, AFAIK it basically copied the Linux PCI API. While copying a Linux/Unix API might be useful for porting certain software, it's no advantage here as no Linux PCI-based driver is anywhere near just a recompile to get an Amiga port.
  2. Work could be saved by not having to support Prometheus hardware in your new library, as the original prometheus.library could be used instead.
  3. You'd get immediate support for new network drivers on Mediator hardware: I have five suitable network drivers that already support prometheus.library (two wired and three wireless).
  4. From the little I've read about it, Prometheus hardware seems to be much more open than Mediator, so it seems a good fit to use its API.
  5. prometheus.library has a function to register a driver that's using a PCI card - useful for avoiding conflicts and informing users.

BTW, I have a GRex, so I might be able to help if supporting that becomes a goal.
ncafferkey is offline  
Old 10 June 2024, 04:01   #17
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 676
For GRex, we’d need any available SDK and or documentation (and later testing) There used to be a GRex backend in OpenPCI, but it’s not in the open source anymore.
pipper is offline  
Old 10 June 2024, 19:45   #18
Wrangler
Registered User
 
Join Date: Sep 2015
Location: London, UK
Posts: 419
Quote:
Originally Posted by Thomas Richter View Post
Which kind of mediator is that? Only the A4000 mediators are supported at this moment.
A4000D Mediator - see post 10
Wrangler is offline  
Old 11 June 2024, 01:33   #19
ncafferkey
Registered User
 
Join Date: Sep 2013
Location: Ireland
Posts: 72
Quote:
Originally Posted by pipper View Post
For GRex, we’d need any available SDK and or documentation (and later testing)
I have that too
ncafferkey is offline  
Old 11 June 2024, 02:25   #20
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 676
If you can, please zone it :-)
pipper is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
What do you call yourself if you're not a retrogamer Starglider 2 Retrogaming General Discussion 47 06 February 2018 08:15
WANTED: PCI Sound Card VORTEX2 SuperQuard / SQ2500 or Turtlebeach SantaCruz pci card keropi MarketPlace 12 15 March 2017 02:48
Let's call it karma. Or something. trooper Retrogaming General Discussion 10 19 September 2013 23:44
Ports of Call Josh request.Old Rare Games 9 21 February 2010 23:32
Prometheus PCI & Voodoo 3 PCI GFX Card Slayer support.Hardware 21 05 September 2006 10:57

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:33.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10219 seconds with 14 queries