Supermodel r777: run fullscreen with 15khz video

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Supermodel r777: run fullscreen with 15khz video

Postby zanac » Tue Oct 22, 2019 1:47 am

Hi,

i'm going to try to run supermodel in an ancient arcade cab machine with a CRT monitor with 15Khz resolution... This kind of monitor has a great limit, it can display only 240 vertical line, and also most recent video card output 15 khz signal only at "strange" resolution.

The best workaround is run xorg instead of wayland and change at runtime the modeline using xrandr:
xrandr --newmode "MODE_1920_240" 37.778 1920 1977 2154 2376 240 243 245 265 -hsync -vsync
xrandr --addmode $(xrandr | grep ' connected ' | sed "s/^\(.*\) connected.*/\1/") "MODE_1920_240"
xrandr --output $(xrandr | grep ' connected ' | sed "s/^\(.*\) connected.*/\1/") --mode "MODE_1920_240" --scale-from 384x240 --pos 1x1
#xrandr --output $(xrandr | grep ' connected ' | sed "s/^\(.*\) connected.*/\1/") --mode "MODE_1920_240"

With this command CRT become live with a 1920x240 resolution, actually 384x240 using latest commented line ('cause i use a virtual scaling at 384x240 as you can see, i found more readable desktop without 1920 scaling). Yes, my card don't run horizontal resolution lower at 15khz... this is a know issue for who want to use CRT arcade monitor (see with google "crt super resolution" for understand better ;))

Anyway CRT work... but...
Supermodel at fullscreen don't run, i investigated and it seems SDL 1.2 don't find a suitable screen... for now i made a workaround: i "bad-patched" supermodel r777 Src/OSD/Main.cpp:




in CreateGLSCreen:

added: SDL_putenv("SDL_VIDEO_WINDOW_POS=0,0");
changed:
//if (SDL_SetVideoMode(*xResPtr,*yResPtr,0,SDL_OPENGL|(fullScreen?SDL_FULLSCREEN|SDL_HWSURFACE:0)) == NULL)
if (SDL_SetVideoMode(384,240,0,SDL_OPENGL|SDL_NOFRAME|SDL_HWSURFACE) == NULL)


in function Supermodel i forced 384/240 using xRes/totalXRes/yRes/totalYRes:
xRes = 384;
totalXRes = 384;
yRes = 240;
totalYRes = 240;
if (OKAY != CreateGLScreen(baseTitleStr, &xOffset, &yOffset ,&xRes, &yRes, &totalXRes, &totalYRes, !stretch, fullscreen))


As you can see i actually use a window at the sime size of monitor resolution and i removed window manager "decoration" SDL_NOFRAME.
It work fantastic, i show you a screenshot... supermodel resize very well... but this is a bad-patching.

Better solution for run at fullscreen? I think that the best solution can be patch SDL 1.2, or maybe port to SDL 2.0 that i think don't have issue... or... other ideas?

If you don't have ideas, it could be cool to run supermodel in a "resized fullscreen window" with a fixed resolution like i done, i have not enough skill to add parameters... maybe someone can in a future patch the source?

Thank in advance, for your support,
Regards,
Vanni

p.s. i attach an image that show supermodel run at that way :)
Attachments
IMG_20191021_230446.jpg
IMG_20191021_230446.jpg (217.15 KiB) Viewed 259 times
zanac
 
Posts: 6
Joined: Tue Oct 22, 2019 1:23 am

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron