Menu

#1505 [SDLUI] Corrupted graphics with SDL1 only.

v3.6
closed-fixed
dqh
None
SDL1x
2021-12-30
2021-07-16
No

I build VICE with SDLUI interface but I discovered that it shows corrupted graphics.
See attached screenshot.
It is interesting to see that SDL1 produces bad video output, but SDL2 works fine instead.
After I have seen this defect, I deleted all files and I created a new build, but the problem still exists.
Tested with mingw-w64 for x86_64.
Configured with:

configure --enable-silent-rules --host=x86_64-w64-mingw32 --enable-sdlui

Sincerely.

1 Attachments

Discussion

  • gpz

    gpz - 2021-07-16

    it would help if you could go back some revisions and tell when it broke

     
  • gpz

    gpz - 2021-07-16
    • assigned_to: dqh
     
  • Marco van den Heuvel

    currently I cannot reproduce this, xvic sdl1 looks fine on my setup.

    Can you please try to start xvic with -default as the parameter and see if the screen is normal or not.

    Also please give us some more information, what OS is it running on ??

     
    • Greg King

      Greg King - 2021-07-17

      Also, please give us some more information, what OS is it running on??

      "x86_64-w64-mingw32" means 64-bit Windows (I assume version 10).

       

      Last edit: Greg King 2021-07-17
  • Marco van den Heuvel

    I meant which version of windows, because on my windows 7 setup I do not get the wrong looking xvic screen.

     
  • Strobe

    Strobe - 2021-07-17

    WFM with trunk on win10x64 (20h2). We'll need a more info on your setup to replicate.

     
  • Carlo Bramini

    Carlo Bramini - 2021-07-17

    If I configure with --disable-hwscale option before compiling the emulators, the bug disappears.
    I verified that it happens with both i686 and x86_64 toolchains.
    I'm using a notebook Acer Nitro 5, with Windows 10 ver. 21H1 (but I doubt that this is important).
    I tried to replace SDL.DLL included into MinGW-w64 with the precompiled libraries that I downloaded from libsdl.org, but nothing changed.

     
  • Marco van den Heuvel

    can you please try a compile of rev 40334 with hwscale enabled and see if the screen is still wrong.

     
    • Carlo Bramini

      Carlo Bramini - 2021-07-17

      I tested latest stable vice-3.5, which is surely much older and the problem happens here too.
      With this version, I tested only x86_64 since i686 is broken by the error described inside patch #297.

       
  • Marco van den Heuvel

    Is there a reason you want/need to use SDL1 instead of SDL2 ??

     
  • Carlo Bramini

    Carlo Bramini - 2021-07-17

    Hello, after some hours of debugging, I found the cause of the problem.
    Attached patch fixes the bug.
    Sincerely.

     
  • gpz

    gpz - 2021-07-17

    Patch looks OK, i'll leave it to dqh to sanity check and apply :)

     
  • dqh

    dqh - 2021-07-18

    I'm guessing it's the 24 bit color case that you saw the issue with?

     
    • Carlo Bramini

      Carlo Bramini - 2021-07-18

      My display is 32bit, but inside SDL, the cAlphaBits of PIXELFORMATDESCRIPTOR was left to zero and this caused the bad graphic output.

      https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-pixelformatdescriptor

       
      • dqh

        dqh - 2021-07-18

        Then, i'm amazed it hadn't caused issues for others. That said, can't imagine many people use the SDL1 version on Windows.

         
  • dqh

    dqh - 2021-07-18
    • status: open --> closed-fixed
     
  • dqh

    dqh - 2021-07-18

    Applied in r40377, thanks for these patches

     

Log in to post a comment.

MongoDB Logo MongoDB