-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate CRT-Royale or other CRT-emulation shader #54
Comments
I have a build integrating Blargg with multi-threaded shading via boost. I'm trying to get this updated as it was based on 2013 code. My version also fixes the timer sync between countdown and game times (bug in original game). I'm pulling this back out now as the idea is to get this working on RPi 4 to make a mini cab, so the Linux force feedback I will be needing too :) |
@bni in case you were wondering. I've updated the build for SDL2 and it runs on an RPi 4 (at 30fps)... I need to sort out some in-game seg faults and will put in a pull. Multi-threading is via omp (memory fades over 6 years!). |
Looks great J1mbo. I can attempt to build and run it on macOS. Last time I build it I used SDL1.2, so will have to upgrade that. |
@bni Are you able to build the current master on Mac OS with SDL2? |
@J1mbo I tried but failed, my understanding of CMake and SDL is not enough. The Cannonball macosx.cmake seems to be setup to use SDL 1.2 and I was unable to modify it to work with SDL2 |
@J1mbo I tried again and got it to build finally. It runs ok using the default rendersurface.cpp. But if I use rendergl.cpp there is a black window only. I can hear the music and control the game but nothing is displayed. With SDL 1.2 it worked to use OpenGL I guess your CRT shader will require OpenGL ? |
Excellent, can you share the cmake etc? The shaders would be better done in OpenGL, but currently I have just stacked textures in SDL which seems to work well enough for my requirements. SDL is a front to OpenGL incidentally.... strange. |
Sure @J1mbo I have put it in my fork: https://github.com/bni/cannonball Also some other stuff too, like putting the executable in .app container and bundle the SDL2 .dylib correctly. It looks quite bad, as scanlines are disabled since the rendersurface.cpp is used. Hope your shader can fix this :-) |
Thanks. I can't make it work on Mac, it just gets stuck at SDL.h. But anyway, I have also made a fork with the shaders here: https://github.com/J1mbo/cannonball Broadly the functionality is:
This build also fixes the screen ratio and SDL2 sound bug. If you can get it to build and let me know how/if it works that would be great. |
Hi @J1mbo , I have integrated your changes in my fork now. I can report it works great. Performance is great on my 2013 macbook with intel graphics. About your troubles with SDL2, are you using SDL2-2.0.12.tar.gz and compiling form source? The .dmg only works when using xcode it seems. |
Thanks - I finally got it built, by compiling with gcc. I have SDL installed with brew. I think we need some better documentation for Mac, it's a bit of a mystery to me. I was hoping that SDL would see the Mac screen at it's native resolution, but that doesn't seem to be the case. Perhaps that can be controlled somehow. |
Agreed, the build.sh I made tell the story of what is needed to build a self contained "Out Run.app". Using brew the dependencies is easier to get in place of course. I realise integrating this into djyts original repository wont be great, but maybe someone that knows how to do this properly could use some of the ideas. |
@J1mbo what settings do you use for the CRT emulation? Im interested in finding settings so it matches the original arcade hardware as much as possible. If someone out there has the real arcade machine, your view on this would be much appreciated |
@J1mbo about the hiDPI issue, I remembered this: ioquake/ioq3#422 Seems to be controlled from Info.plist: |
Thanks, I got high-DPI working. This shot from the arcade mini cab is a great reference: https://twitter.com/djyt/status/1293109217235275776/photo/4 On the Mac is looks like this (I think mask 7 35%): https://twitter.com/jimbo_4000000/status/1296894217969635330/photo/1 |
I didn't realise before it was possible to select different masks. Selecting 7 made a large difference. I also noticed it essential to have a 4K screen. On a 4K TV the effect looks very good and I think its very close to the reference pictures you linked to. On my 1440p PC monitor the effect is lost and the rgb subpixels is not really seen, its more of a black grid. But maybe this is to be expected and you really need 4K to emulate CRT properly. |
I have re-started my fork to be based on the latest code from djyt. I implemented a renderer based on SDL_gpu and a shader that is based on crt-lottes. No idea if it is close to the vintage arcade, but I think it looks nice on todays screens. |
@bni Update this thread when you're done. Maybe we can integrate into the main codebase this time round. I am likely to have some downtime in the coming weeks. |
@djyt Sure I am done now I think. I have accomplished what my goals was with the fork. There are 3 parts that can be picked more or less independently: |
I’m super looking forward to trying this out :-) |
Does your fork have steering wheel support in Linux? I tried the Ubuntu version from the default software app and steering isn't recognized. |
@Johnreidsilver I have no changes/fixes regarding that. My fork is focused on CRT shader and macOS app bundle. |
Thanks anyway. Hope to enjoy your CRT shader version soon. |
It would be really nice if there was a way to make Cannonball use a CRT shader so it would look as similar as possible to the real arcade cabinet screen.
The text was updated successfully, but these errors were encountered: