Mega Sg (FPGA Genesis)

The place for all discussion on gaming hardware
User avatar
donluca
Posts: 852
Joined: Sat Feb 28, 2015 8:51 pm
Location: Italy
Contact:

Re: Mega Sg (FPGA Genesis)

Post by donluca »

Out of curiosity, which bug did he encounter in Mickey Mania for MegaCD?

Mine always crashes at the last stage, although not always at the same point. It just starts loading slower and slower and eventually it ends locking up completely.

EDIT: I'm talking about real v1 MegaCD with v1 Mega Drive.
User avatar
BrianC
Posts: 8859
Joined: Wed Jan 26, 2005 1:33 am
Location: MD

Re: Mega Sg (FPGA Genesis)

Post by BrianC »

I didn't notice any glitches with the JP Final Fight CD, but it does look fairly ugly on a LCD thanks to an overuse of dithering. I used a JP Mega CD 2 bios rather than one of the region free hacks.
User avatar
Herr Schatten
Posts: 3259
Joined: Wed Jan 26, 2005 12:14 pm
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Herr Schatten »

So I experimented a bit with the scaling options, but I seem to have some trouble finding the right settings. Basically I want square pixels for Master System mode and Mega Drive H40, and horizontally stretched ones for Game Gear and MD H32.

I think I have SMS and GG down. In SMS mode the preset for „square pixels“ didn‘t actually produce them, but calculating from the visible resolution did. I ended up with 1024x960 for 1080p x4.
GG looks correct if pixels have an aspect ratio of 6:5. This stretches the GG screen to a 4:3 image.

I seem to have trouble calculating the correct scalings for the Mega Drive modes, though. While 240 height is a given, the Mega SG‘s presets seem to calculate with horizontal borders of 10 pixels in H40 and 8 pixels in H32 mode. Where do these numbers come from?
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Fudoh »

If you load up a horizontally scrolling screen (from the 240p test suite or any game with an attraction mode) and disable the horizontal interpolation, then it's dead easy to find your integer scales. The jump from shimmering scrolling with scaling artefacts to a spot on integer is quite obvious.

For MD with 320px witdh, 340 and multiples will give you integer scaling hits, 340, 680, etc...
Seraphic
Posts: 492
Joined: Fri Mar 19, 2010 1:46 pm

Re: Mega Sg (FPGA Genesis)

Post by Seraphic »

Might pick up a SG at some point in the future, but I was wondering about the Sega CD addon.
Beyond the obvious reliability differences between the two, are there any technical reason one is better then the other?

Came across an old archive thread that seems to suggest the Model 1 sounds better then the Model 2. But is that still the case when it feeds into the SG instead?
I saw that the SG allows you enable High Quality audio at 14bit instead of down-sampling to 8bit. A poster in that thread says the Model1 uses 8bit and Model2 uses 9bit?

http://www.sega-16.com/forum/archive/in ... 22691.html
The model 1 Genesis used a YM2612 with 8-bit out and the model 2 used a varient of it with 9-bit out. Techinically the later would sound better. Some games took advantage of the former's defects, others did not. It boils down to what is being produce with it and ultimately the user's preferences. The differences are more noticable here because the output depth is lower than what it considered ideal.
Galgomite
Posts: 197
Joined: Fri May 17, 2013 6:32 pm
Location: Pennsylvania, USA

Re: Mega Sg (FPGA Genesis)

Post by Galgomite »

Fudoh wrote:If you load up a horizontally scrolling screen (from the 240p test suite or any game with an attraction mode) and disable the horizontal interpolation, then it's dead easy to find your integer scales. The jump from shimmering scrolling with scaling artefacts to a spot on integer is quite obvious.

For MD with 320px witdh, 340 and multiples will give you integer scaling hits, 340, 680, etc...
That's helpful, thanks. I would have assumed we wanted multiples of 320. Is it a similar case with the other mode (224 is it)?
copy
Posts: 232
Joined: Fri Apr 29, 2016 10:38 pm

Re: Mega Sg (FPGA Genesis)

Post by copy »

Galgomite wrote:
Fudoh wrote:If you load up a horizontally scrolling screen (from the 240p test suite or any game with an attraction mode) and disable the horizontal interpolation, then it's dead easy to find your integer scales. The jump from shimmering scrolling with scaling artefacts to a spot on integer is quite obvious.

For MD with 320px witdh, 340 and multiples will give you integer scaling hits, 340, 680, etc...
That's helpful, thanks. I would have assumed we wanted multiples of 320. Is it a similar case with the other mode (224 is it)?
The other mode is 256-width, with left/right borders of 8 pixels each, which therefore needs multiples of 272 for integer scale.
copy
Posts: 232
Joined: Fri Apr 29, 2016 10:38 pm

Re: Mega Sg (FPGA Genesis)

Post by copy »

Speaking of width and height settings, does anyone understand how the Mega Sg horizontal presets for 4:3 are calculated?

For example, from the manual:
1080p Options
Horizontal Presets (at 4x Vertical) :
x320 Width – 1224 (4:3 for 16:9)
x256 Width – 1224 (4:3 for 16:9)
Since 4x vertical is 4x240 = 960, shouldn't horizontal for 4:3 be 960/3*4 = 1280?
GameLifter
Posts: 11
Joined: Thu Mar 28, 2019 1:26 am

Re: Mega Sg (FPGA Genesis)

Post by GameLifter »

BrianC wrote:I didn't notice any glitches with the JP Final Fight CD, but it does look fairly ugly on a LCD thanks to an overuse of dithering. I used a JP Mega CD 2 bios rather than one of the region free hacks.
Have you tried turning on dither blending? It works well in games that were designed around it.
User avatar
it290
Posts: 2542
Joined: Thu Mar 17, 2005 1:00 am
Location: polar malortex, illinois

Re: Mega Sg (FPGA Genesis)

Post by it290 »

Seraphic wrote: I saw that the SG allows you enable High Quality audio at 14bit instead of down-sampling to 8bit. A poster in that thread says the Model1 uses 8bit and Model2 uses 9bit?

http://www.sega-16.com/forum/archive/in ... 22691.html
The model 1 Genesis used a YM2612 with 8-bit out and the model 2 used a varient of it with 9-bit out. Techinically the later would sound better. Some games took advantage of the former's defects, others did not. It boils down to what is being produce with it and ultimately the user's preferences. The differences are more noticable here because the output depth is lower than what it considered ideal.
That quote is referring to the FM audio of the console, not the CD unit. Redbook audio is going to sound more or less exactly the same between the two versions of the CD unit, allowing for minor variations with the DACs they use.
Image
We here shall not rest until we have made a drawing-room of your shaft, and if you do not all finally go down to your doom in patent-leather shoes, then you shall not go at all.
User avatar
BrianC
Posts: 8859
Joined: Wed Jan 26, 2005 1:33 am
Location: MD

Re: Mega Sg (FPGA Genesis)

Post by BrianC »

GameLifter wrote:
BrianC wrote:I didn't notice any glitches with the JP Final Fight CD, but it does look fairly ugly on a LCD thanks to an overuse of dithering. I used a JP Mega CD 2 bios rather than one of the region free hacks.
Have you tried turning on dither blending? It works well in games that were designed around it.
I tried it, but it seemed to blur details that weren't supposed to be blurred. I should try and experiment with it more, though.
copy
Posts: 232
Joined: Fri Apr 29, 2016 10:38 pm

Re: Mega Sg (FPGA Genesis)

Post by copy »

Another width & height observation. The Game Gear width preset for 4:3 (at 7x vertical) is 1456. By my calculations the 4:3 width should really be 1344.

Also, when I have it at 1344, it is impossible to center the image horizontally. Even at horizontal position 0, it is still slightly to the right of center.
User avatar
Herr Schatten
Posts: 3259
Joined: Wed Jan 26, 2005 12:14 pm
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Herr Schatten »

copy wrote:Another width & height observation. The Game Gear width preset for 4:3 (at 7x vertical) is 1456. By my calculations the 4:3 width should really be 1344.
1344 should be correct. Some of the presets of the Mega SG seem indeed a bit off.

For my Mega Drive modes I settled for a width of 1244 at 4x and a height of 960. This reproduces the 32:35 pixels of H40 and the 8:7 pixels of H32 sufficiently. I‘d have preferred an integer scaling, but at 1360 width the H32 image looks too stretched.
User avatar
FBX
Posts: 2347
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Mega Sg (FPGA Genesis)

Post by FBX »

Kevtris got the math wrong for 256 mode on the Genesis, but has it correct on SMS. Since he adds in overscan for both axis, the actual mathematically correct values are as follows:

5x:
256: 1553x1200 enable H, disable V

Screen fit:
256: 1497x1152 enable HV

4x:
256: 1243x960 enable H, disable V

3x (720p):
256: 932x720 enable H, disable V


Keep in mind you do NOT stretch 256x224 to a 4:3 area. That is incorrect and not how the signal behaves on a CRT.

Also you should be using integer scales for 320 mode as all artwork in the Genesis library for those games was drawn with that in mind.
copy wrote:Speaking of width and height settings, does anyone understand how the Mega Sg horizontal presets for 4:3 are calculated?

For example, from the manual:
1080p Options
Horizontal Presets (at 4x Vertical) :
x320 Width – 1224 (4:3 for 16:9)
x256 Width – 1224 (4:3 for 16:9)
Since 4x vertical is 4x240 = 960, shouldn't horizontal for 4:3 be 960/3*4 = 1280?
Two points:

1. Kevtris uses overscan resolution in his settings, so that's throwing a lot of people off.

2. You should never base 4:3 AR on the vertical resolution alone (and again, he's adding in overscan at that). As with the NES, SNES, SMS, and ColecoVision, the formula is to scale the horizontal resolution and then multiply that by 8/7. So for example in 4x: 256 * 4 * 8/7 = 1170 (or 1243 due to the overscan and scaling quirks of the Mega Sg)

Here's proof of the formula in action on the SNES:

Image
User avatar
Herr Schatten
Posts: 3259
Joined: Wed Jan 26, 2005 12:14 pm
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Herr Schatten »

FBX wrote:Kevtris got the math wrong for 256 mode on the Genesis, but has it correct on SMS.

Also you should be using integer scales for 320 mode as all artwork in the Genesis library for those games was drawn with that in mind.
Good to know. So it’s actually correct if the 40H image is wider than the 32H one?

Are you sure about the SMS? I‘d argue that all the graphics there have also been drawn with perfectly square pixels in mind. So the best way to enjoy them as intended would be to set the scaling for bith axes to the same value. This actually produces square pixels on the Mega SG, whereas the preset called „square pixels“ does definitely not in SMS mode.
User avatar
FBX
Posts: 2347
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Mega Sg (FPGA Genesis)

Post by FBX »

Herr Schatten wrote:
Are you sure about the SMS? I‘d argue that all the graphics there have also been drawn with perfectly square pixels in mind.
The SMS is 256 pixels wide and definitely needs the same formula applied. Phantasy Star is a good example game, where several areas, NPCs, and enemies will look too skinny at square pixels.
User avatar
Herr Schatten
Posts: 3259
Joined: Wed Jan 26, 2005 12:14 pm
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Herr Schatten »

FBX wrote:The SMS is 256 pixels wide and definitely needs the same formula applied. Phantasy Star is a good example game, where several areas, NPCs, and enemies will look too skinny at square pixels.
That makes sense. I don‘t think I‘ve ever seen graphics on the SMS that have been adjusted to the pixel shape like in your SNES example, though. At least I can‘t remember a single circle that‘s not pefectly round when pixels are square. That probably just shows that artists didn‘t really care all that much.

However, do you know what‘s up with the weird difference between square pixels (same scaling applied to width and height) and „square pixels“?
User avatar
Galdelico
Posts: 257
Joined: Thu Nov 17, 2016 12:58 pm
Location: Italy

Re: Mega Sg (FPGA Genesis)

Post by Galdelico »

FBX wrote:Kevtris got the math wrong for 256 mode on the Genesis, but has it correct on SMS. Since he adds in overscan for both axis, the actual mathematically correct values are as follows:

5x:
256: 1553x1200 enable H, disable V

Screen fit:
256: 1497x1152 enable HV

4x:
256: 1243x960 enable H, disable V

3x (720p):
256: 932x720 enable H, disable V


Keep in mind you do NOT stretch 256x224 to a 4:3 area. That is incorrect and not how the signal behaves on a CRT.
Out of curiosity, does your OSSC optimized profile for 256p Genesis games reflect that and is indeed 'CRT correct'?

The reason why I ask is that there are two games that kinda bug me, when displayed in such mode: Street Fighter II/Super SFII and Fatal Fury 2. The former, I clearly remember playing it on my Japanese MD back then, way before I started to even remotely care about IQ and display settings, and definitely looking (on my CRT TV) not as 'skinny' as it does now, when displayed in 256p optim. mode through the OSSC.
Fatal Fury 2, on the contrary, looked super chunky on my TV and - while it seems to be correct (as in, circles are circles) with your profile - it's interesting to see how it retains the same, wider aspect ratio even on the off screen photos printed on the original manual and the back of the cover (where the circles underneath the life bars appear to be oval without a doubt). This makes me wonder if there is a mode that can be absolutely called 'correct'.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Fudoh »

Out of curiosity, does your OSSC optimized profile for 256p Genesis games reflect that and is indeed 'CRT correct'?
Using the optimized sampling settings on the OSSC doesn't allow you to aim for a specific aspect ratio. You can can only select between fixed integer scaling factors.
The former, I clearly remember playing it on my Japanese MD back then, way before I started to even remotely care about IQ and display settings, and definitely looking (on my CRT TV) not as 'skinny' as it does now, when displayed in 256p optim. mode through the OSSC.
which output resolution do you use on the OSSC? You know that you can select the hoizontal integer factor on your own, right? Resulting in either 1024x960 or 1280x960 (both in 4x mode) or 1536x1080 or 1280x1080 (both in 5x mode).

As for
Keep in mind you do NOT stretch 256x224 to a 4:3 area. That is incorrect and not how the signal behaves on a CRT.
back in the days when I played on a CRT with easy geometry control acces, I would simply adjust the picture to fill the screen eliminating overscan whenever possible, so it was certainly 4:3 for me.
This makes me wonder if there is a mode that can be absolutely called 'correct'.
hardly. Every TV had a different overscan setting with the horizontal overscan oftentimes being applied more aggresively than the vertical one. I also wouldn't follow FBX's argument on 320x224 titles. While the graphics were indeed most often designed with square pixels in mind, setting a visible (any annoying) vertical underscan on a CRT seems counter-intuitive. If anything I would argue that setting the screen the 4:3 for 320x224 content (on a CRT) made sense and then just accepting how the 256x224 turned out by default with the same settings.

The argument for square pixels on 320x224 titles running on digital displays is valid, but argueing for a certain AR (other than 4:3) for 256x224 titles is hard to follow.
User avatar
FBX
Posts: 2347
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Mega Sg (FPGA Genesis)

Post by FBX »

Fudoh wrote:
The argument for square pixels on 320x224 titles running on digital displays is valid, but argueing for a certain AR (other than 4:3) for 256x224 titles is hard to follow.
See the image I posted of the SNES. Note the moon is too skinny with square pixels, too wide when stretched to 4:3, and perfect with the signal AR applied. It's not hard to follow at all. Check out the NESDev topic on overscan for more information on the formula. And yeah, I know you can edit geometry on CRTs to stretch images, but the base signal AR should be honored above all for 256 mode games when upscaling on a digital display.

Edit: And Kevtris knows this formula is the 'correct' formula for 4:3 AR. Just take a look at the SMS mode for 4:3 at 5x make note of the horizontal resolution:

Image

BAM! He also does these same labels on the Super Nt as well.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Fudoh »

You wouldn't happen to have a link to that NESDev discussion thread, would you? (EDIT: if you meant the wiki entry - reading it right now).

And hey, of course I get the idea of aiming at proper proportions on screen, especially now that you have free aspect ratio control.

But above when you stated that 256x224 wouldn't display in 4:3 on a CRT, can you elaborate on that? I mean what you're saying is that on a CRT I was somehow supposed to adjust the vertical overscan to zero, but add in horizontal underscan in favor of better looking proportions on screen?

Given that the majority of MD/GEN titles output in 320x224 I would certainly have adjusted the screen to zero overscan on both axis using a game like this. Do you know how a 256x224 title would display using the same CRT settings? Is the ratio of horizontal unused pixels to active pixels the same on 320px and 256px video output?
copy
Posts: 232
Joined: Fri Apr 29, 2016 10:38 pm

Re: Mega Sg (FPGA Genesis)

Post by copy »

Thanks for the clarifications FBX. So, the formula to arrive at the correct Mega Sg setting for Genesis 4:3 horizontal width is:

(original active horizontal resolution)*(vertical scale)*(pixel aspect ratio)*(overscan amount)

Which, to use 4x vertical as an example, works out to:

256-mode: 256 * 4 * 8/7 * 1.0625
320-mode: 320 * 4 * 32/35 * 1.0625

Which both result in a value of 1243, as you say. (Though I agree with the argument that square pixels are often better for 320-mode games.)

Master System uses the 256-mode formula but without the overscan factor (1.0625).

For the Game Gear, though, the 4:3 presets are still incorrect. It appears to target a 1.44:1 aspect ratio instead of 1.33:1.
User avatar
Harrumph
Posts: 368
Joined: Tue Jan 19, 2016 10:06 pm
Location: Sweden

Re: Mega Sg (FPGA Genesis)

Post by Harrumph »

Fudoh wrote: Is the ratio of horizontal unused pixels to active pixels the same on 320px and 256px video output?
Yes, the horizontal visible area is the same. Compare with the dotclocks of the full line:
320/427=0.75
256/341=0.75

And you were never supposed to adjust anything on your crt TV, because the aspect ratio is derived from that used by a standard broadcast signal (although bastardized). So there should be a lot more overscan from a games console than from the tv broadcast, they are not supposed to be equal in covered visible area.
User avatar
Galdelico
Posts: 257
Joined: Thu Nov 17, 2016 12:58 pm
Location: Italy

Re: Mega Sg (FPGA Genesis)

Post by Galdelico »

Fudoh wrote:Using the optimized sampling settings on the OSSC doesn't allow you to aim for a specific aspect ratio. You can can only select between fixed integer scaling factors.

(...)

hardly. Every TV had a different overscan setting with the horizontal overscan oftentimes being applied more aggresively than the vertical one. I also wouldn't follow FBX's argument on 320x224 titles. While the graphics were indeed most often designed with square pixels in mind, setting a visible (any annoying) vertical underscan on a CRT seems counter-intuitive. If anything I would argue that setting the screen the 4:3 for 320x224 content (on a CRT) made sense and then just accepting how the 256x224 turned out by default with the same settings.

The argument for square pixels on 320x224 titles running on digital displays is valid, but argueing for a certain AR (other than 4:3) for 256x224 titles is hard to follow.
i see, thanks for clarifying!

My specific situation is a bit unusual, I guess. I use a PC monitor as my retro display, and my video mode of choice with the OSSC is still Line2X optimized (perfect blend of clarity and softness, in my opinion, especially with scanlines): I suppose due to my panel's limitations, line doubled optimized 256p looks too narrow in 8:7, compared to the other LineX modes (which I don't/can't use because they produce thin or uneven scanlines on screen), and of course too wide in 4:3. So I was wondering if there was some turnarounds on the OSSC as well, after reading FBX post above.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Fudoh »

And you were never supposed to adjust anything on your crt TV
since my TV back in the early NES days was RF only, I got my first RGB monitor (Commodore 1084) along with my PC Engine in 1988. Adjusting geometry to match my sources was natural. I don't even think that the 1084 had something like a neutral position for most of its controls.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Fudoh »

line doubled optimized 256p looks too narrow in 8:7, compared to the other LineX modes (which I don't/can't use because they produce thin or uneven scanlines on screen), and of course too wide in 4:3.
is that so? In Line x2 mode you have three options. You can go for 512x480 (too narrow), 768x480 (too wide) or 720x480 which might still be a little tad too wide, but do you really feel that it's too wide to be useable? I never felt this way using any linedoubler (and there've been a lot).
User avatar
it290
Posts: 2542
Joined: Thu Mar 17, 2005 1:00 am
Location: polar malortex, illinois

Re: Mega Sg (FPGA Genesis)

Post by it290 »

Fudoh wrote:
And you were never supposed to adjust anything on your crt TV
since my TV back in the early NES days was RF only, I got my first RGB monitor (Commodore 1084) along with my PC Engine in 1988. Adjusting geometry to match my sources was natural. I don't even think that the 1084 had something like a neutral position for most of its controls.
IIRC the knobs had a sort of center divot when the slot in the back was adjusted to be completely vertical, but lord knows those could probably be calibrated all sorts of ways internally.
Image
We here shall not rest until we have made a drawing-room of your shaft, and if you do not all finally go down to your doom in patent-leather shoes, then you shall not go at all.
User avatar
Galdelico
Posts: 257
Joined: Thu Nov 17, 2016 12:58 pm
Location: Italy

Re: Mega Sg (FPGA Genesis)

Post by Galdelico »

Fudoh wrote:is that so? In Line x2 mode you have three options. You can go for 512x480 (too narrow), 768x480 (too wide) or 720x480 which might still be a little tad too wide, but do you really feel that it's too wide to be useable? I never felt this way using any linedoubler (and there've been a lot).
Apologies for sounding like a complete dummy, but what are those 512/768/720 numbers? Are they the x2 value for H active that I should manually set up in optimized 256p mode?
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Mega Sg (FPGA Genesis)

Post by Fudoh »

Apologies for sounding like a complete dummy, but what are those 512/768/720 numbers?
it's the resulting width of the image depending on your OSSC settings.

512 = 2x 256 (optimized sampling width)
768 = 3x 256 (optimized sampling width)
720 = 2x 360 (generic 4:3 sampling width)

512 and 768 are achieveable with the optimized setitng, while 720 is what you get in generic mode.
copy
Posts: 232
Joined: Fri Apr 29, 2016 10:38 pm

Re: Mega Sg (FPGA Genesis)

Post by copy »

My attempts at finding perfectly centered 1080p 4x settings (5x for Game Gear):

Genesis

x320 Width: 1360 (square pixels)
x256 Width: 1243 (4:3)
Horizontal Position: 21 *
Height: 960 (4.0x)
Vertical Position: 50
Disable H Interpolation 320x: checked
Disable H Interpolation 256x: unchecked
Disable V Interpolation: checked

* The horizontal position setting is shared between the 320 and 256 modes and produces different results in each. 21 does not perfectly center either mode, but it is a compromise that brings both fairly close.

Master System and ColecoVision

Width: 1170 (4:3)
Horizontal Position: 19
Height: 960 (4.0x)
Vertical Position: 54
Disable H Interpolation: unchecked
Disable V Interpolation: checked

Game Gear

Width: 960 (4:3)
Horizontal Position: 6
Height: 720 (5.0x)
Vertical Position: 45
Disable H Interpolation: checked
Disable V Interpolation: checked
Post Reply