Re: Gens4All with Z80 Emulation
Posted: Tue Jun 07, 2022 10:10 pm
Thank you for the in-depth response! I'll research what I can but I'm certain most of what's needed to be done will go right over my head lolTapamN wrote:Yeah, I wasn't able to test the 240p mode myself. I looked at the source for the 240p Test Suite, tried to adapt it to Gens4All, and just hoped that I did it right. I normally use a VGA CRT, next to my computer and Dreamcast, that I use to test things with. I have a small 480p LCD TV that I could use to test things with, but that wouldn't be good for testing 240p. I also have a CRT TV from around 1999 or 2000, but that's in another room and it's too big to move to where I keep my computer, so it's very inconvenient to test with. I'll try taking another look at it, but I don't know when.BLEEN wrote:Hi, TapamN! I really appreciate the hard work you've managed to pull off with this release! It works extremely well! I just have one question. Is it possible for you to release a version of this that supports the correct aspect ratio/resolution in 240p thru S-video? A lot of users still use the Dreamcast on CRTs and the Genesis in an emulated 240p state would look amazing! I'm sure everyone who still uses S-video (and RGB and composite) would be super grateful! The Dreamcast on a CRT looks so, so good already! Genesis @ proper 240p would be the icing on the cake! Most, nearly all, CRTs don't have a VGA port and S-video is pretty close to RGB quality-wise and much better than composite.
I've read thru multiple threads and tried multiple releases but pretty much enabling/disabling 'Interlace' mode has no effect. The graphics, while they do look great, you can tell there's a blur because something is not displaying the resolution correctly? Would that be an easy fix?
Or is it possible I can compile this to display correctly myself? I just wouldn't know where to start. Thanks once again!
Getting the aspect ratio correct for 256x224 is tricky. The Dreamcast doesn't really support resolutions other than 640 or 320 wide. (You can kind of fake some of them by doing things by adjusting the overscan or sync signal widths, but that's not well supported by all displays.) The best option for getting aspect correct 256 wide resolution on the DC would be to basically render to a point sampled 512 wide texture, then do a bilinear upscale to 640. This would avoid a lot of the blur from a 256->640 direct bilinear upscale, and limit the shimmering from uneven pixel widths from drawing stretched point sampled to 640.
The vanilla KOS PVR driver isn't capable of doing that; it's render-to-texture is way to basic pull it off at full speed (it only supports rendering to framebuffer sized textures, and that would be too slow). I've written my own driver with better render-to-texture support, but I'd have to convert Gens4All over to using that. The rendering code wouldn't need any major changes, just the initialization and mode/resolution switching. Maybe I'll try working on it at some point, but I've been focusing on other things right now.
Compiling Gens4All from scratch is a bit more tricky than normal KOS programs. Not only do you need a KOS environment, you need DCSDL and the development libraries for GLib installed. When Gens was originally ported by Chui, he used GLib for part of the compilation process (GLib isn't used on the DC itself). The 68K emulator is written in assembly, but not by hand. A C program (or maybe it was C++?) is used to generate the SH-4 assembly for the 68K emulator, and that uses GLib for... something. I don't remember what for.
If you're using Linux or Cygwin, it's easy to install the GLib dev libraries through whatever package manager you use. If you're on another system, I don't know how you'd install it. But if you already have a KOS dev environment, I could upload the object files. Then you wouldn't need to compile the 68K core from scratch and could avoid the GLib dependency, as long as you don't "make clean".
I do appreciate you getting back to me and letting me know the nitty gritties. Cheers!
The 240p Test Suite has been a blessing the past few days! I was able to turn this RCA TruFlat TV I found on the side of the road into pretty much a beautiful looking arcade-like display!MoeFoh wrote:You can test your rig for 240p display with this disc/cdi:BLEEN wrote:Hi, TapamN! I really appreciate the hard work you've managed to pull off with this release! It works extremely well! I just have one question. Is it possible for you to release a version of this that supports the correct aspect ratio/resolution in 240p thru S-video? A lot of users still use the Dreamcast on CRTs and the Genesis in an emulated 240p state would look amazing! I'm sure everyone who still uses S-video (and RGB and composite) would be super grateful! The Dreamcast on a CRT looks so, so good already! Genesis @ proper 240p would be the icing on the cake! Most, nearly all, CRTs don't have a VGA port and S-video is pretty close to RGB quality-wise and much better than composite.TapamN wrote:After seeing some of what was going on in the Gens4Dreams thread, I ended up making another small update. Here are the changes:The rest of the chances are improvments to the game list feature:
- Non-interlaced 240p mode added. I think that on NTSC, ideally, the Dreamcast's interlace mode would match the Genesis's (with an option to force interlaced for displays that don't handle non-interlaced well), but that's more work than I want to do now. I looked at what the 240p Test Suite did when setting the video mode, and tried to replicate it. I haven't actually tested this out on a real TV, so it's off by default. To enable 240p, press Y on the title screen before pressing Start. Interlacing is still enabled in the loader.
- Button map display. Press Y on the controls menu to show the button mappings for the highlighted layout.
The template generator of the game list compiler doesn't support ZIP files. That's more work than I wanted to do, so you'd have to have it run on the BIN files, compress the BIN files into ZIP files with the same name, then do a search and replace on the game list source file to replace .bin with .zip.
- Precompiled Windows game list compiler included in src/glparse. I don't use Windows, but I was able to cross-compile with MinGW.
- Larger game lists are supported. The maximum size of a game list file was originally 100 KB bytes, with 1000 entries. These limits have been raised by 75%.
- Better handling of non-game entries. Pressing A on an entry with no ROM files specified before would cause the loader to try to load a non existent game (which would cause the screen to flicker). Now entries without a ROM file do nothing when A is pressed. So you can add messages to a list like this:
Code: Select all
Game: This is a message Game: Nothing happens if you press A Game: Game: You can add blank lines Game: Game: Altered Beast (This actually loads a game) Rom: abeast.bin
- Links that allow switching between game lists have been added, so it's possible to separate official games, hacks, and homebrew titles or stuff like that. You can add a link with a entry using this format:
The brackets in the "game" title aren't necessary, but currently the loader doesn't do anything to make the link stand out on it's own, so you'll have to make it clear that it does something. There's no way to automatically go back a list, you'll have to add a link that goes back.Code: Select all
Game: [[Go to hacks]] Rom: hackgamelist.bin Switcher
- Added support for a "!" section to the game list index when using the "Letter:" command. It's intended to be used to jump to links to other game lists.
- It's possible to specify line scroll emulation with "Scroll:" entries. Possible settings are line (default), line_a4, line_b4, cell, cell_a4, cell_b4. They match up to the settings in the in-game video menu.
- It's possible to disable shadow emulation with the option "Shadows: off"
Also, the "data" directory in the 7z file doesn't need to be included on a disc, it's only used when compiling Gens4All. The stuff in there gets inserted directly into the 1ST_READ.
I've read thru multiple threads and tried multiple releases but pretty much enabling/disabling 'Interlace' mode has no effect. The graphics, while they do look great, you can tell there's a blur because something is not displaying the resolution correctly? Would that be an easy fix?
Or is it possible I can compile this to display correctly myself? I just wouldn't know where to start. Thanks once again!
https://www.dreamcast-talk.com/forum/vi ... =5&t=15673
That program is the shit. I had updated it as soon as it came out but thank you for the link and anyone else here who may see it.
240p looks absolutely amazing on this CRT. The 10 or so native 240p Dreamcast games are really something else on these old displays when calibrated correctly. Main reason I've been trying to get Gens4 to work with it correctly in terms of display. Alas, I'm not well enough equipped to handle what that entails so I guess I'll live with the resolution being sub-par for now. I may look into a Raspberry Pi with S-video out in the future. For now, I've spent nothing on this set-up (besides donating for the 240p Test Suite heh)!