i made a modification for this, to display the frame widescreen, however it seems like performance tanks in certain games, mostly the music, this is present both in your original version and my modified version, its DEFINITIVELY caused by the SDL thread you created in the code, and unfortunately, the problem cannot be fixed by changing the conf file of DOSBox, tried assigning as many resources as possible to DOSBox to no avail
i KNOW its way too much to ask for you to check 5 year old code you wrote for hobby purposes, but still i wanted to know if you have any suggestions on how to improve performance, i hadnt touched C++ since university, this little project reminded me why
I would guess that the reason could be the call to wglSwapIntervalEXT on line 295 of crtemu.h. Try removing that line and see if it works any better. If not, I can take a deeper look at some point
holy shit that actually worked, ill be honest, i didnt expect a response, thats why im only checking now 4 days later
im gonna tweak it a lil bit more before uploading this, maybe then you can check it out, see how much i butchered your code trying to get this dumb idea of mine to work
on the bright side, you can use custom frames now, figuring out how to generate a hex array in the same format as the one in crt_frame.h sure was an interesting detour in my quest to reverse engineer your code
ok is almost ready to publish, still some bugs left but it'll do for a version 1.0, i just wanted to ask you if its ok if i repackage your DOSBOX-CRT folder with the demos, custom menu, etc, and simply replace your .exe with mine, and add some config files for the frame
i added options to toggle the CRT filter, to play only with the custom frame, and an option to have the viewport fill up the screen vertically, its all set in a separate crtemu.conf file
the changes looks alright, nice to have config options as well :)
It is definitely ok to repackage it, demos, menu and all, just a nice thing to make available. Let me know when you've put it up, and I'll link to it from my dosbox-crt page, let people know there's an alternative :)
Hey total DOS newbie here, if I wanted to run GOG DOS games in this program how I would go about doing it? I barely know how to mount stuff for reference
Just replace the dosbox.exe in a GOG game folder with this one. Also make sure to set in the DOSBox config file for every game these parameters:
fullresolution=desktop
output=openglnb
aspect=false
scaler=normal3x
autofit=false
Note that you shouldn't copy the config file provided with DOSBox CRT, as every DOS game on GOG comes with its own optimized config file. You just need to change some of the lines.
I have a question: Considering this is a standalone modified version of DOSBOX, is there a way to insert this game into something like Heroic (or that specifically in this case) for games that come from GOG and use DOSBOX to run?
Or should I then just use this one outside of Heroic, download the game from GOG and run it on this one?
Do note that I'm on Linux-distro, so I'm kinda throwing my hands up there, as I do rely on programs (like Heroic) to do things for me. I'm not sure, if this customized version of DOSBOX is meant to run under Windows, how to use things like Wine to run it separately. It might be simple, but I just don't know as of now.
Still, if anyone happens to know if I can insert this in Heroic to have it use this customized DOSBOX instead of the vanilla one, I'd appreciate it.
I am not familiar with Heroic, but maybe someone else knows. This version of dosbox is for windows only, and I don't know if it is possible to run it with Wine or similar. When I buy DOS games from GOG, to play on windows, it is usually not a problem to locate the bundled dosbox.exe and replace it with my modified one (just rename it)
Hi Mattias, I really love this version of DOSBOX and now use it for most of my GOG DOSBOX games. Games now look so much better. I would love it even more if you would create this CRT shader effect for a more updated version of DOSBOX, like DOSBOX ECE or DOSBOX Staging which have a lot more updated features than the older DOSBOX. Anyway, great work and thanks!
I absolutely love DOSBox-CRT and use it with every DOS game I have on GOG. But one of them, PowerSlave that is, isn't working properly. Namely, the music doesn't work, although it works fine with the bundled DOSBox. Any idea what's causing this? I think I've tried everything.
Dosbox games can be a pain to get working, that's why I now use the excellent DOSBOX frontend DBGL as it makes configuring games so much easier and enables you to test various graphics & sound settings. Check it out on the Vogons forum if you haven't already. :)
hi sir mattias, im a big fan of your shader work on shadertoy with MattiasCrt, im wondering if there is a way to edit it to remove the scanline crawl effect, not the horizontal lines crawling, the ripple effect that goes along with it... i tried myself but i have little experience. on the line 37 where you define the scans float, i tried messing with reducing the factor 0.35 to 0.15, it indeed reduces the visibility of the ripples but it is still there. do you know if it is possible to remove it? thanks really appreciated your work
I've been super bummed that I don't own a real CRT monitor these days (and am meaning to find one on craig's list or something.) I grew up with a 386/486 and really miss the look of all those old games, especially since much of the graphic work was made with CRT pixilation in mind. I'm so pysyched to try this out, as it's a perfect solution to my problem: I've got two or three huge cardboard boxes of old floppies and CD-ROMs from the 90s that I want to play, but that I know won't look or feel the same on my modern LED monitor! Now, they will! Woo!
Amazing filter but my mouse doesn't seem to work at all. When I go to window-mode and hover over the DosBox window, the cursor gets pushed the right side of the window every time. CTRL-F10 doesn't make a difference.
I know this answer is 4 years old, but just in case anyone else has this issue, I figured out how to fix it.
The problem seems to happen if Windows scaling is set to anything higher than 100%. You can either change your scaling back to 100% or you can set compatibility for this program to override Windows scaling. (This also has the benefit of making the CRT effect look better, which looks off when you are scaled higher than 100%).
I haven’t seen any scummvm integrations of the shader. I think it would certainly be possible to do, but I have no idea how much work it would be, and I don’t have any plans to look into it myself. But the source code for the shader is available, so there’s always the hope that someone will implement it sometime.
Just downloaded today, this is exactly what I needed for my retro-pc games. Thank you! Any way to edit that intro menu? I would love to add my games to the menu as well. Great work!
I am not familiar with OBS shaders, but it might well be possible to integrate my shaders with that. It is not something I would do though, but the code is open source so maybe someone else will.
It’s a little more complicated than just a shader though - I use a couple of extra passes and buffers, to do a good gaussian blur with decent performance, and to accumulate pixel values over time, so there can be a visible blur trail when objects move. I don’t know how tricky it would be to recreate that for OBS...
It doesn’t use the extra buffers, it is just a plain pixel shader. So it does not have the blur trail, and it is also very GPU intensive due to the gaussian blur being done on the full resolution rather than on a smaller buffer.
I like it - most other builds come with many experimental parts that only cause compatibility issues. Only thing that I would like, is for the PNG used to be external so you can modify it.
← Return to tool
Comments
Log in with itch.io to leave a comment.
i made a modification for this, to display the frame widescreen, however it seems like performance tanks in certain games, mostly the music, this is present both in your original version and my modified version, its DEFINITIVELY caused by the SDL thread you created in the code, and unfortunately, the problem cannot be fixed by changing the conf file of DOSBox, tried assigning as many resources as possible to DOSBox to no avail
i KNOW its way too much to ask for you to check 5 year old code you wrote for hobby purposes, but still i wanted to know if you have any suggestions on how to improve performance, i hadnt touched C++ since university, this little project reminded me why
I would guess that the reason could be the call to wglSwapIntervalEXT on line 295 of crtemu.h. Try removing that line and see if it works any better. If not, I can take a deeper look at some point
This line here: https://github.com/mattiasgustavsson/dosbox-crt/blob/880995bdb630518cea12c70ea56...
holy shit that actually worked, ill be honest, i didnt expect a response, thats why im only checking now 4 days later
im gonna tweak it a lil bit more before uploading this, maybe then you can check it out, see how much i butchered your code trying to get this dumb idea of mine to work
on the bright side, you can use custom frames now, figuring out how to generate a hex array in the same format as the one in crt_frame.h sure was an interesting detour in my quest to reverse engineer your code
this is what it looks like right now
https://steamcommunity.com/sharedfiles/filedetails/?id=3480691209
https://steamcommunity.com/sharedfiles/filedetails/?id=3480691134
Cool, glad it worked :)
yeah, would be cool to take a look at the changes, feel free to share!
And, reverse engineering things is good for the soul :)
ok is almost ready to publish, still some bugs left but it'll do for a version 1.0, i just wanted to ask you if its ok if i repackage your DOSBOX-CRT folder with the demos, custom menu, etc, and simply replace your .exe with mine, and add some config files for the frame
heres the repo if you want to give it a look
https://github.com/NukeKangaroo/dosbox-crt-widescreen
oh and another preview image
https://steamcommunity.com/sharedfiles/filedetails/?id=3482516312
i added options to toggle the CRT filter, to play only with the custom frame, and an option to have the viewport fill up the screen vertically, its all set in a separate crtemu.conf file
the changes looks alright, nice to have config options as well :)
It is definitely ok to repackage it, demos, menu and all, just a nice thing to make available. Let me know when you've put it up, and I'll link to it from my dosbox-crt page, let people know there's an alternative :)
Hey total DOS newbie here, if I wanted to run GOG DOS games in this program how I would go about doing it? I barely know how to mount stuff for reference
Just replace the dosbox.exe in a GOG game folder with this one. Also make sure to set in the DOSBox config file for every game these parameters:
fullresolution=desktop
output=openglnb
aspect=false
scaler=normal3x
autofit=false
Note that you shouldn't copy the config file provided with DOSBox CRT, as every DOS game on GOG comes with its own optimized config file. You just need to change some of the lines.
I have a question: Considering this is a standalone modified version of DOSBOX, is there a way to insert this game into something like Heroic (or that specifically in this case) for games that come from GOG and use DOSBOX to run?
Or should I then just use this one outside of Heroic, download the game from GOG and run it on this one?
Do note that I'm on Linux-distro, so I'm kinda throwing my hands up there, as I do rely on programs (like Heroic) to do things for me. I'm not sure, if this customized version of DOSBOX is meant to run under Windows, how to use things like Wine to run it separately. It might be simple, but I just don't know as of now.
Still, if anyone happens to know if I can insert this in Heroic to have it use this customized DOSBOX instead of the vanilla one, I'd appreciate it.
I am not familiar with Heroic, but maybe someone else knows. This version of dosbox is for windows only, and I don't know if it is possible to run it with Wine or similar.
When I buy DOS games from GOG, to play on windows, it is usually not a problem to locate the bundled dosbox.exe and replace it with my modified one (just rename it)
Hello, I tried to open a github issue on this but had no success
Trying to compile dosbox-crt on debian 11 returns a million "narrowing conversion" errors
And finishes with a bunch of other errors, not compiling at all
Is there a workaround?
Thanks.
sorry, I only made the modification for windows platform, I don’t know Linux…
Oh, bummer
Thank you anyway, have a nice week.
Hi Mattias, I really love this version of DOSBOX and now use it for most of my GOG DOSBOX games. Games now look so much better. I would love it even more if you would create this CRT shader effect for a more updated version of DOSBOX, like DOSBOX ECE or DOSBOX Staging which have a lot more updated features than the older DOSBOX. Anyway, great work and thanks!
I absolutely love DOSBox-CRT and use it with every DOS game I have on GOG. But one of them, PowerSlave that is, isn't working properly. Namely, the music doesn't work, although it works fine with the bundled DOSBox. Any idea what's causing this? I think I've tried everything.
Dosbox games can be a pain to get working, that's why I now use the excellent DOSBOX frontend DBGL as it makes configuring games so much easier and enables you to test various graphics & sound settings. Check it out on the Vogons forum if you haven't already. :)
https://www.vogons.org/viewtopic.php?f=31&t=12915&start=1780
Latest DBGL Version can be downloaded here:
https://dbgl.org/beta
Does it have a similar CRT shader, though?
Yes! You can configure DBGL to use DOSBOX CRT or any other version of DOSBOX. I've also started using DOSBOX CRT for all my GOG games. :)
hi sir mattias, im a big fan of your shader work on shadertoy with MattiasCrt, im wondering if there is a way to edit it to remove the scanline crawl effect, not the horizontal lines crawling, the ripple effect that goes along with it... i tried myself but i have little experience. on the line 37 where you define the scans float, i tried messing with reducing the factor 0.35 to 0.15, it indeed reduces the visibility of the ripples but it is still there. do you know if it is possible to remove it? thanks really appreciated your work
I've been super bummed that I don't own a real CRT monitor these days (and am meaning to find one on craig's list or something.) I grew up with a 386/486 and really miss the look of all those old games, especially since much of the graphic work was made with CRT pixilation in mind. I'm so pysyched to try this out, as it's a perfect solution to my problem: I've got two or three huge cardboard boxes of old floppies and CD-ROMs from the 90s that I want to play, but that I know won't look or feel the same on my modern LED monitor! Now, they will! Woo!
Amazing filter but my mouse doesn't seem to work at all. When I go to window-mode and hover over the DosBox window, the cursor gets pushed the right side of the window every time. CTRL-F10 doesn't make a difference.
Anyone have any ideas for dealing w this?
I know this answer is 4 years old, but just in case anyone else has this issue, I figured out how to fix it.
The problem seems to happen if Windows scaling is set to anything higher than 100%. You can either change your scaling back to 100% or you can set compatibility for this program to override Windows scaling. (This also has the benefit of making the CRT effect look better, which looks off when you are scaled higher than 100%).
Hope this helps someone.
that's good to know! thanks for posting. I should be able to make it ignore windows scaling, now that I know that's an issue
Any chance to implement this into SCUMMVM? Or is it already?
I haven’t seen any scummvm integrations of the shader. I think it would certainly be possible to do, but I have no idea how much work it would be, and I don’t have any plans to look into it myself. But the source code for the shader is available, so there’s always the hope that someone will implement it sometime.
Reshade now supports Scummvm using opengl, allowing you to use all kinds of CRT shaders and other effects.
https://reshade.me/
Just downloaded today, this is exactly what I needed for my retro-pc games. Thank you! Any way to edit that intro menu? I would love to add my games to the menu as well. Great work!
This looks really well.
Is there any version of this shader to be used with OBS? So it's not only limited to DosBox? :)
i.e. with obs-shaderfilter
Thanks, I’m glad you like it!
I am not familiar with OBS shaders, but it might well be possible to integrate my shaders with that. It is not something I would do though, but the code is open source so maybe someone else will.
I do have a standalone image viewer using the shader, and the code to that can be found here https://github.com/mattiasgustavsson/crtview
It might be a useful reference for anyone trying to use it for something else
It's been 10 years since I touched C for the last time xD but if I had the shader alone (like, vertex and fragment files) I could try something...
too bad I couldn't find them in that repo
yeah, it’s not so straightforward to find them - it’s implemented as a single-file library, so the shader code is embedded in the C code - you can find it here https://github.com/mattiasgustavsson/crtview/blob/de7897958ac1f346ca7fa3dbf5a57dab5fcc5bb3/source/crtemu_pc.h#L57
It’s a little more complicated than just a shader though - I use a couple of extra passes and buffers, to do a good gaussian blur with decent performance, and to accumulate pixel values over time, so there can be a visible blur trail when objects move. I don’t know how tricky it would be to recreate that for OBS...
I do have an earlier version of the shader here:
https://www.shadertoy.com/view/Ms23DR
It doesn’t use the extra buffers, it is just a plain pixel shader. So it does not have the blur trail, and it is also very GPU intensive due to the gaussian blur being done on the full resolution rather than on a smaller buffer.
Thanks for the info. appreciated!
Probably a similar effect can be achieved by combining several simple shaders... I'll try to play with it!
I'd love to see an OBS shader/filter integration as well! If anyone ever does end up doing it, please let me know!
I like it - most other builds come with many experimental parts that only cause compatibility issues. Only thing that I would like, is for the PNG used to be external so you can modify it.
I love this! Is there a way I can replicate this shader as a GLSL, CG, or SLANG? This is the closest to my old monitor from the 90s that I've seen!
Thanks :) I’m glad you like it!
The code for just the shader can be found here https://github.com/mattiasgustavsson/crtview
It is written in OpenGL