Page 1 of 1

GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Fri Mar 06, 2020 2:13 pm
by H215
So I have this up and running on my Intel NUC 8i7BEH on Ubuntu 18.04.4

To get the new3d engine working I have to set a GL Version override 3.3+
for example:

Code: Select all
#!/bin/bash

cd /opt/retropie/emulators/supermodel/
MESA_GL_VERSION_OVERRIDE=4.6 ./supermodel
/opt/retropie/emulators/supermodel/von254g.zip


Now most games run fine with this override except Virtua On, which just black screens at boot.
Problem is that I don't receive an error. So I'm stuck using the legacy engine. Here is the log:

Code: Select all
Supermodel v0.3a-WIP Error Log
------------------------------

Started as:
  argv[0] = ./supermodel
  argv[1] = /opt/retropie/emulators/supermodel/von254g.zip
  argv[2] = -ppc-frequency=100

Opened /opt/retropie/emulators/supermodel/von254g.zip.
von254g:
  banked_crom: stride=8, chunk size=2, byte swap=1
    mpr-20650.4, crc32=0x81f96649, offset=0x00000000
    mpr-20649.3, crc32=0xb8fd56ba, offset=0x00000002
    mpr-20648.2, crc32=0x107309e0, offset=0x00000004
    mpr-20647.1, crc32=0xe8586380, offset=0x00000006
    mpr-20654.8, crc32=0x763ef905, offset=0x01000000
    mpr-20653.7, crc32=0x858e6bba, offset=0x01000002
    mpr-20652.6, crc32=0x64c6fbb6, offset=0x01000004
    mpr-20651.5, crc32=0x8373cab3, offset=0x01000006
    mpr-20658.12, crc32=0xb80175b9, offset=0x02000000
    mpr-20657.11, crc32=0x14bf8964, offset=0x02000002
    mpr-20656.10, crc32=0x466bee13, offset=0x02000004
    mpr-20655.9, crc32=0xf0a471e9, offset=0x02000006
    mpr-20662.16, crc32=0x7130cb61, offset=0x03000000
    mpr-20661.15, crc32=0x50e6189e, offset=0x03000002
    mpr-20660.14, crc32=0xd961d385, offset=0x03000004
    mpr-20659.13, crc32=0xedb63e7b, offset=0x03000006
  crom: stride=8, chunk size=2, byte swap=1
    epr-21791.20, crc32=0xd0bb3ca3, offset=0x00000000
    epr-21790.19, crc32=0x2ae1efd3, offset=0x00000002
    epr-21789.18, crc32=0x3069108f, offset=0x00000004
    epr-21788.17, crc32=0x97066bcf, offset=0x00000006
  sound_program: stride=1, chunk size=1, byte swap=1
    epr-20687.21, crc32=0xfa084de5, offset=0x00000000
  sound_samples: stride=1, chunk size=1, byte swap=1
    mpr-20663.22, crc32=0x977eb6a4, offset=0x00000000
    mpr-20665.24, crc32=0x0efc0ca8, offset=0x00400000
    mpr-20664.23, crc32=0x89220782, offset=0x00800000
    mpr-20666.25, crc32=0x3ecb2606, offset=0x00c00000
  vrom: stride=32, chunk size=2, byte swap=0
    mpr-20667.26, crc32=0x321e006f, offset=0x00000000
    mpr-20668.27, crc32=0xc2dd8053, offset=0x00000002
    mpr-20669.28, crc32=0x63432497, offset=0x00000004
    mpr-20670.29, crc32=0xf7b554fd, offset=0x00000006
    mpr-20671.30, crc32=0xfee1a49b, offset=0x00000008
    mpr-20672.31, crc32=0xe4b8c6e6, offset=0x0000000a
    mpr-20673.32, crc32=0xe7b6403b, offset=0x0000000c
    mpr-20674.33, crc32=0x9be22e13, offset=0x0000000e
    mpr-20675.34, crc32=0x6a7c3862, offset=0x00000010
    mpr-20676.35, crc32=0xdd299648, offset=0x00000012
    mpr-20677.36, crc32=0x3fc5f330, offset=0x00000014
    mpr-20678.37, crc32=0x62f794a1, offset=0x00000016
    mpr-20679.38, crc32=0x35a37c53, offset=0x00000018
    mpr-20680.39, crc32=0x81fec46e, offset=0x0000001a
    mpr-20681.40, crc32=0xd517873b, offset=0x0000001c
    mpr-20682.41, crc32=0x5b43250c, offset=0x0000001e
Runtime configuration:
  GameXMLFile=Config/Games.xml
  InitStateFile=
  MultiThreaded=1
  GPUMultiThreaded=1
  PowerPCFrequency=100
  MultiTexture=0
  VertexShader=
  FragmentShader=
  VertexShaderFog=
  FragmentShaderFog=
  VertexShader2D=
  FragmentShader2D=
  EmulateSound=1
  Balance=0
  EmulateDSB=1
  SoundVolume=100
  MusicVolume=100
  New3DEngine=1
  QuadRendering=1
  XResolution=1920
  YResolution=1080
  FullScreen=1
  WideScreen=0
  Stretch=0
  VSync=1
  Throttle=0
  ShowFrameRate=0
  Crosshairs=1
  FlipStereo=0
  InputSystem=sdl
  Outputs=none
  EmulateNet=0
  ForceFeedback=0

OpenGL information:
  Vendor                   : Intel Open Source Technology Center
  Renderer                 : Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT3)
  Version                  : 4.6 (Compatibility Profile) Mesa 20.0.0-devel - padoka PPA
  Shading Language Version : 4.60
  Maximum Vertex Array Size: 3000 vertices
  Maximum Texture Size     : 16384 texels
  Maximum Vertex Attributes: 16
  Maximum Vertex Uniforms  : 16384
  Maximum Texture Img Units: 32

Audio device information:
    Frequency: 44100
     Channels: 2
Sample Format: 32784

Program terminated normally.


This is what I get when I dont use GL Version override:

Code: Select all
Supermodel: A Sega Model 3 Arcade Emulator (Version 0.3a-WIP)
Copyright 2011-2019 by Bart Trzynadlowski, Nik Henson, Ian Curtis,
                       Harry Tuttle, and Spindizzi

    Title:          Virtual On 2: Oratorio Tangram (Ver 5.4g)
    ROM Set:        von254g
    Developer:      Sega
    Year:           1998
    Stepping:       2.0
    Extra Hardware: Security Board

error: vertex shader lacks `main'


Also, Star Wars has two problems.
One I found a fix for concerning the Death Star II unshaded interior, although its kind of glitchy..

Code: Select all
if (!m_shadeIsSigned) {

Change to

if (true) {


The other is rainbow speckles on the Death Star planet in the Yavin stage.

Any ideas on whats going on or edits I can make before compiling?

Some info about my NUC:

Code: Select all
Supermodel: A Sega Model 3 Arcade Emulator (Version 0.3a-WIP)
Copyright 2011-2019 by Bart Trzynadlowski, Nik Henson, Ian Curtis,
                       Harry Tuttle, and Spindizzi

OpenGL information:

  Vendor                   : Intel Open Source Technology Center
  Renderer                 : Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT3)
  Version                  : 3.0 Mesa 20.0.0-devel - padoka PPA
  Shading Language Version : 1.30
  Maximum Vertex Array Size: 3000 vertices
  Maximum Texture Size     : 16384 texels
  Maximum Vertex Attributes: 16
  Maximum Vertex Uniforms  : 16384
  Maximum Texture Img Units: 32


Code: Select all
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT3)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.0-devel - padoka PPA
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 20.0.0-devel - padoka PPA
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.0-devel - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:



Thanks for the emu and any info I may use.

Re: GLSL, Ubuntu 18.04 and Latest Commit

PostPosted: Sat Mar 07, 2020 1:18 am
by Bart
Can you share photos of the problems? Commenting out the signed shading code isn't really a fix -- that code is there for a reason. The question is whether the Death Star is actually being rendered incorrectly or whether this an issue with your particular graphics chipset and drivers.

Re: GLSL, Ubuntu 18.04 and Latest Commit

PostPosted: Sat Mar 07, 2020 8:04 am
by H215
Well the Virtua On problem is a black screen at boot, not much to show.
I'm just stuck using -legacy3d for that one.

Here goes the Deathstar II without the fix:

https://imgur.com/HIGjzgn
Image

Here goes the Deathstar on Yavin:

https://imgur.com/9eCHa9G
Image

I have reverted to ubuntu's default graphics, padokas stable and padokas bleeding edge (which Im back on)
It doesn't seem to make a difference.

I also tried changing texture2DLoad to textureLod before building too.

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Sun Mar 08, 2020 4:16 pm
by Bart
I see and can confirm this bug is indeed happening. Unfortunately, we don't know how to fix it or what causes it. Coincidentally, I have a save state just prior to this tunnel sequence. The pipes look correct during the cinematic transition sequence but as soon as the game switches to the first person perspective, it is broken. Our hypothesis has been that some special Real3D registers are written to enable signed shading mode. But none of these are accessed by Star Wars Trilogy. So we aren't sure what's going on.

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Mon Mar 09, 2020 8:03 am
by H215
Bart wrote:I see and can confirm this bug is indeed happening. Unfortunately, we don't know how to fix it or what causes it. Coincidentally, I have a save state just prior to this tunnel sequence. The pipes look correct during the cinematic transition sequence but as soon as the game switches to the first person perspective, it is broken. Our hypothesis has been that some special Real3D registers are written to enable signed shading mode. But none of these are accessed by Star Wars Trilogy. So we aren't sure what's going on.


What about the rainbow speckles on the Deathstar in Yavin on the second image above?
At first I thought they were lights but I watched videos of the game and saw that, their not there.

Do you know which commit this shader problem happened around? I can always use an earlier build just for Star Wars Trilogy.

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Tue Mar 10, 2020 6:03 am
by Ian
The rainbow speckles might appear on the original hw but are so low res we don't see them?
You are rendering at HD resolutions.

I'll checkout the lighting issue when I had some time

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Sat Mar 14, 2020 10:40 am
by Ian
Just had a few minutes .. had a look at this star wars thing. The gfx engine is working as expected, but the jtag values are never updated. Not sure why. Only thing I can think of is those patches that were applied

<!-- Additional patches from MAME for test menu -->
<patch region="crom" bits="32" offset="0xf776c" value="0x60000000" /> <!-- unemulated JTAG stuff -->
<patch region="crom" bits="32" offset="0xf7770" value="0x60000000" /> <!-- "" -->
<patch region="crom" bits="32" offset="0xf7774" value="0x60000000" /> <!-- "" -->
</patches>

If you tested with a save game before. You have to start the game from a fresh boot and play all the way through to that point. Simply unpatching it and loading the save state doesn't work I don't think.

If you could test this and get back to me it would be helpful.

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Sun Mar 15, 2020 9:45 pm
by H215
It didn't change anything. I did a full run, no save states with a fresh nvram too.

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Mon Mar 16, 2020 3:08 am
by Ian
Did you try removing the patches?
they are in the games.xml file

Re: GL Version, Ubuntu 18.04 and Latest Commit

PostPosted: Mon Mar 16, 2020 12:47 pm
by H215
Yes, I deleted those patches from out of the games.xml Then I did a full run with no save states and the tunnel is still dark..

Now when I apply the code from my first post above, the tunnel is fine. Strange..

I'll just keep two versions of supermodel executables with one named supermodel_swt just for star wars for now.