VOGONS


PowerVR Fun Thread

Topic actions

Reply 540 of 1096, by Scali

User metadata
Rank l33t
Rank
l33t

I got SGL to work in Windows, and wrote some simple code with it: https://www.youtube.com/watch?v=azfQHgUKOrk
Do you have the SDK? I believe it is posted here on Vogons somewhere.
I can give you my code, so you can play around with it (Visual C++ 6.0): https://www.dropbox.com/s/2ir10zpnbp27lj5/SGL.zip?dl=0

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 541 of 1096, by Tuxality

User metadata
Rank Newbie
Rank
Newbie
Scali wrote:

I got SGL to work in Windows, and wrote some simple code with it: https://www.youtube.com/watch?v=azfQHgUKOrk
Do you have the SDK? I believe it is posted here on Vogons somewhere.
I can give you my code, so you can play around with it (Visual C++ 6.0): https://www.dropbox.com/s/2ir10zpnbp27lj5/SGL.zip?dl=0

Ah, you misunderstood my previous post. I've written some code for SGL Direct including MiniGL (OpenGL DLL reimplementation which wraps using SGL Direct) which I mentioned here in my previous post by using SDK posted on VOGONS under both VC++6.0 and MinGW.

The problem is that I can't make SGL to run (execute) under Windows on my emulated PCX2 card in PCem. 😀 It works on real card, but on emulated even if I respond correctly to all registers, initialize correctly IO memory mapped region they still don't work - executing any SGL application crashes with message that SGL.dll wasn't loaded. It's the problem in DllMain in SGL.dll that loads dynamically PVROS which gives SGL interface with use of SGLMID5, it seems that I'm missing some early register and it makes driver go to different code path that makes SGL not working. SGL for DOS (Tomb Raider) is more simple and is working good, because writes to good registers and populates VRAM with texture data, waits for "is render completed" command and then continues etc. Haven't tried Direct3D on emulated PCX2 under PCem though.

Reply 542 of 1096, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Thanks for the status update, always nice to hear from you Tuxality 😀

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 543 of 1096, by leileilol

User metadata
Rank l33t++
Rank
l33t++

I couldn't get my emulation to get the driver to work either (not even with debug drivers), and plus pressing the alt-key sends me into a bsod hell for some odd reason

apsosig.png
long live PCem

Reply 544 of 1096, by Tuxality

User metadata
Rank Newbie
Rank
Newbie

It behaves like that because you did not emulated this card, only faked that it exist... anyway:

I managed to get SGL and Direct3D to work on my emulated NEC PowerVR PCX2 card! 😀 😀 😀

I mean, holy shit - it works! Driver no longer rejects my card, null rendering for now (shows only garbage from host card VRAM), but at least SGL is working and now I can proceed with reverse engineering more serious PCX registers. 😉

Reply 545 of 1096, by Scali

User metadata
Rank l33t
Rank
l33t
Tuxality wrote:

I managed to get SGL and Direct3D to work on my emulated NEC PowerVR PCX2 card! 😀 😀 😀

Ossom!
So what did you have to do to make it detect the card? Was it trying to read some special kind of identification string or such?

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 546 of 1096, by Tuxality

User metadata
Rank Newbie
Rank
Newbie

Nah, I just made a byte order typo in only one of the PCI configuration space header field, so lame of me. 😁

Actually, apart from PCI configuration space it detects which type of card is it by reading two R/O registers which are used by driver before initializing card. After detecting which PowerVR card is it and which revision/programming interface it has, initializes basic registers and soft resets the chip. I've written in the past some code for direct PowerVR CLX2 programming on Sega Dreamcast, basic registers are quite similar but the rest is quite different sadly.

Reply 547 of 1096, by Scali

User metadata
Rank l33t
Rank
l33t

And how do you do the emulation? Are you building a software renderer that works exactly like the PowerVR? Or are you using VRAM and the registers to sniff out drawing commands and geometry/texture data, and feed that to OpenGL/D3D/Vulkan or such?

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 548 of 1096, by Tuxality

User metadata
Rank Newbie
Rank
Newbie

It's not done yet, but I'll just implement software rasterizer from scratch that works like PCX2 after reverse engineering meaningful registers.

There is no point in using OpenGL or another API combined with host GPU as a renderer (although it's of course possible), for this I have my wrappers that allows to make games working on modern systems and look a little better.

Reply 549 of 1096, by Scali

User metadata
Rank l33t
Rank
l33t
Tuxality wrote:

It's not done yet, but I'll just implement software rasterizer from scratch that works like PCX2 after reverse engineering meaningful registers.

Yea, would be great if it actually renders with the same quality as a real PCX2.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 550 of 1096, by Myloch

User metadata
Rank Oldbie
Rank
Oldbie

I'm more into wrappers than real emulation. I'm not a purist. I love wrappers like dgvoodoo or nglide, you can obtain amazing results with some old games, using some fancy effects of modern graphic cards.

"Gamer & collector for passion, I firmly believe in the preservation and the diffusion of old/rare software, against all personal egoisms"

Reply 551 of 1096, by Tuxality

User metadata
Rank Newbie
Rank
Newbie

New registers discovered, this time including target framebuffer phys addr and other important things. A few, simple tiles blitting test shown on image, click for full size:

PCem_SGL_1_small.png

Dimensions might not be correct, because it's blitted in wrong color space, but it's not that important for now. 😀

Reply 552 of 1096, by leileilol

User metadata
Rank l33t++
Rank
l33t++
Myloch wrote:

I'm more into wrappers than real emulation.

PCem's the kind of project that can't have wrappers. Everything is an internal cpu crunch.

also powervr has some crazy depth and alpha sorting which wouldn't be easy to be accurate unless it's a wrapper done in Vulkan. The DX11 renderer in Demul is very interesting but that became closed source unfortunately, and that's the closest PowerVR-looking anything i've seen in hardware emulation to date.

apsosig.png
long live PCem

Reply 553 of 1096, by Dreamer_of_the_past

User metadata
Rank Oldbie
Rank
Oldbie

My brain seeks answers...
One elderly gentleman told me that it's possible to run two Matrox m3D cards in SLI through the PCI bus and that it increases fps in games. Has anybody actually tried it? And what is the difference between Matrox m3D revisions 001A and 002?

Reply 554 of 1096, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
Dreamer_of_the_past wrote:

My brain seeks answers...
One elderly gentleman told me that it's possible to run two Matrox m3D cards in SLI through the PCI bus and that it increases fps in games. Has anybody actually tried it? And what is the difference between Matrox m3D revisions 001A and 002?

I don't believe PowerVR ever developed technology like that.

All hail the Great Capacitor Brand Finder

Reply 555 of 1096, by vetz

User metadata
Rank l33t
Rank
l33t
gdjacobs wrote:
Dreamer_of_the_past wrote:

I don't believe PowerVR ever developed technology like that.

Fun fact: It was actually planned for the PowerVR based arcade board (which never came to marked).

But no, you can't link two PCX2 cards together.

3D Accelerated Games List (Proprietary APIs - No 3DFX/Direct3D)
3D Acceleration Comparison Episodes

Reply 557 of 1096, by Scali

User metadata
Rank l33t
Rank
l33t
vetz wrote:

But no, you can't link two PCX2 cards together.

You wouldn't need to.
They just render one tile at a time, and then send the tile to the VRAM of another video card via a DMA bus transfer.
You could easily do this with as many PCX2 cards as you like in parallel, but of course the PCI bus would become a bottleneck at some point.

Perhaps their idea for the arcade machine was to use a different type of bus.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 559 of 1096, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
elianda wrote:
I put my driver installation approach there: ftp://78.46.141.148/driver/Matrox/m3D/ read howtoinstall.txt I did this because th […]
Show full quote

I put my driver installation approach there:
ftp://78.46.141.148/driver/Matrox/m3D/
read howtoinstall.txt
I did this because the default install was rather troublesome with incompatibilities to certain games.
The dll replacing and registry settings fixed this. I don't know how other cards behave though.

The original drivers worked for me. Can you go into detail what your "installation process" fixed.

Thx!

Retro-Gamer 😀 ...on different machines