xboxscene.org forums

Pages: [1] 2

Author Topic: Emulators X-box Interlace  (Read 394 times)

alexh

  • Archived User
  • Full Member
  • *
  • Posts: 158
Emulators X-box Interlace
« on: June 26, 2004, 11:16:00 PM »

Bump.

Nobody knows anything about this subject, Xport? Lantus? oDD? Anyone?

That said, I did notice on WinUAEX if you enable hardware anisotropic filtering the interlace effects are considerably reduced but possibly at the expense of sharpness? I've not done any qualitative comparisons. But if it is possible to get an X-box to produce single field images, there will be no need for any filtering smile.gif
Logged

kimota2004

  • Archived User
  • Full Member
  • *
  • Posts: 172
Emulators X-box Interlace
« Reply #1 on: June 26, 2004, 11:44:00 PM »

I think this has to do with the new flicker filter that XPort added to WinUAEX v2, it would help  if you could adjust the flicker filter in stages from 0-5 like in the latest SpeXtrum release.
Logged

alexh

  • Archived User
  • Full Member
  • *
  • Posts: 158
Emulators X-box Interlace
« Reply #2 on: June 27, 2004, 12:05:00 AM »

This is not just a WinUAEX problem it is a problem for all emulators which interpolate the native 240 / 288 (or lower) screen resolutions to the X-box's 480i screen.

The flicker filter is there to try to eliminate interlace flicker on resolutions of 480i. However it has a negative effect of blurring the image. Which, if you have data on every line of a 480i screen is a good idea.

What I am saying is..... As we only have data for 240 / 288 lines... it should be possible to only draw to one field of the screen and then there wont BE any interlace flicker, and you dont get the blurring effect of the Flicker Filter. Operation would be just as it was with the original hardware which could only draw to one field.

Whether you can do that by selecting a screen mode with a vertical resolution of 240? Can you do that with the XDK? I do not know.

Or perhaps by drawing black on alternate scan lines and switching off the flicker filter, which should have the same effect?

I do not know what you can and cannot do, because I am not (currently) an X-box programmer. What I am asking is has anyone ever realised this trick and tried? wink.gif
Logged

Carcharius

  • Archived User
  • Sr. Member
  • *
  • Posts: 304
Emulators X-box Interlace
« Reply #3 on: June 27, 2004, 12:11:00 AM »

There is the facility in the XDK for 'field rendering'. Indeed there is a sample provided to demonstrate it.

How well it works, I don't know. I may have a tinker with it at some point. From what I can make out from reading the docs, the app has to be running at 60hz for it to work.

This may cause a problem when emulating roms/games that were written with 50hz in mind (spectrum games, pal roms etc).

Carch
Logged

desertboy

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Emulators X-box Interlace
« Reply #4 on: June 27, 2004, 01:23:00 AM »

QUOTE (alexh @ Jun 27 2004, 09:05 AM)
Operation would be just as it was with the original hardware which could only draw to one field.

The Amiga did have some interlaced modes for hgh res display.

You used to have to have a special monitor (Multisync) or a flixer fixer & svga to display these modes without flicker.

The Amiga did have some interlaced modes for high res display.

You used to have to have a special monitor (Multisync) or a flixer fixer & svga to display these modes without flicker.
Logged

VooD

  • Archived User
  • Full Member
  • *
  • Posts: 199
Emulators X-box Interlace
« Reply #5 on: June 28, 2004, 04:00:00 PM »

I think xbox cant be able to output non interlaced 15khz signals, mainly ought to the fact we are not getting pure signals from the gpu, but from the video converter, which is not designed to offer that low resolution (to my knowledge). The only way to obtain those resolutions would be to output the rgb signals directly from the gpu rather from the tv converter, so we can get low res modes just as AdvanceMame does on the pc.
I dont know is there is any way to low-level program the video encoder to bypass its enconding and just sending pure vga signals.
About field rendering, I think is not a valid solution for this. Field rendering is not other think that rendering at 1/2 of the vertical resolution each frame at 60/50 fps, so we obtain a complete image with 1/2 of the rendering power needed. But the video output remains hi-res interlaced. (this mode is what many ps2 games uses, for example is clearly noticeable in soul reaver 3, as in the frame rate drops you can notice how vertical resolution is 1/2, and when the game runs at 60fps the image is shown fine).
In normal xbox modes odd and even lines on the tv are alternating, they never are turned on at the same time, so each field is showed 30/25 times at second.
In REAL low res modes we always see the same field, refreshed a 60/50 fps.

If you want to get real video output emulation, build a vga to scart cable and try advance mame...I can assure you cant see the difference between the original arcade monitor and the image output by advance mame on a tv.
Logged

lantus

  • Archived User
  • Sr. Member
  • *
  • Posts: 297
Emulators X-box Interlace
« Reply #6 on: June 28, 2004, 04:27:00 PM »

its an interesting topic - i only really found out about field rendering by accident when i was playing around with the flicker filter.

To clear up any confusion it works fine in both 50 and 60hz. I dont have a HDTV to test any other modes

I think one of the drawbacks of field rendering is that your locked into using 240/288 horizontal lines (again i dont have a HDTV so im not sure if field rendering is applicable in anything higher than 480i). Its a good solution for most emulators, but a SNES for example where some games have higher res modes (512x448) it would not be feasible without some kind of hack.  

Something like C64 or Speccy emulation would give you the best bang for you dollar

Logged

tisurame

  • Archived User
  • Newbie
  • *
  • Posts: 14
Emulators X-box Interlace
« Reply #7 on: June 28, 2004, 08:29:00 PM »

Most SNES games used 256x240 (x224?) pixels; there were tricks to get 512x448 but these were rarely used. There were 512x240 games too. Anyway, you could play a 512x448 game on a 256x240 mode. Maybe it's possible to insert a option to alternate both modes.

One game that it's possible to see most of these interlace errors is Shadowrun, when your character run down the streets, it's possible to see it all over his face.

QUOTE
When you are using a system who's output is a standard TV does it make sense to effectively de-interlace the screen and then output it on an interlaced screen? Creating visual artifacts in the process?


Indeed. Deinterlace is a destructive process. But I don't know if videogames use the same process as interlaced recordings on TV (2 fields are mixed into 1 frame).

Very interesting subject. Since the only thing that emulation on Xbox miss to be "perfect" is this picture issue. Worth a check.
Logged

lantus

  • Archived User
  • Sr. Member
  • *
  • Posts: 297
Emulators X-box Interlace
« Reply #8 on: June 28, 2004, 08:40:00 PM »

not tricks - they are valid screen modes

the problem is some roms switch over to high res mode during gameplay - the mode isnt defined from the beginning.

Stuff like Secret of Mana, Smash Tennis, Seiken Densetsu 3 and many others all change to hi-res then back to normal throughout the game, while others like Madara 2 run at high res throughout the game.

putting in a condition to keep checking for a screenmode change and switch out of field rendering would slow things down a bit.

still, its something i might look at implementing in the next WIP if i can come up with a decent solution
Logged

alexh

  • Archived User
  • Full Member
  • *
  • Posts: 158
Emulators X-box Interlace
« Reply #9 on: June 28, 2004, 09:26:00 PM »

QUOTE (Lantus)
field rendering actually disables the flicker filter as a side effect.


I would have imagined this to be true because the filter works along the lines of  averaging the data on each field to minimise the flicker, a vertical filter. You of course dont need a flicker filter in Field rendering.

QUOTE (VooD)
I think xbox cant be able to output non interlaced 15khz signals, mainly ought to the fact we are not getting pure signals from the gpu, but from the video converter, which is not designed to offer that low resolution (to my knowledge).


Are you sure? Why else would they call it specifically "field rendering" and not just 240i or 288i? I would imagine that the XDK offers full control over the DENC (video converters) in an abstract way as to support all the different versions (Connextant, Focus etc.) As for offering different resolutions, I imagined when all "features" were switched off, what you put in was what you got out?

QUOTE (VooD)
The only way to obtain those resolutions would be to output the rgb signals directly from the gpu rather from the tv converter


Hmmm. The main job of the DENC (tv converter) is as a digital to analog converter DAC. The RGB signals directly from the GPU will be TTL digital signals, which are not compatible with a TV input. I have never used Advanced Mame, but if it does this, I bet you they are still using the DENC, but they have switched off all the "features" and have activated Field Rendering!

QUOTE (VooD)
"I dont know is there is any way to low-level program the video encoder to bypass its enconding and just sending pure vga signals."


The VGA signals also go through an equivalent of the TV converter called the RAMDAC (Digtial to Analog Converter), the DENC inside the X-box also contains a RAMDAC, and the circuitry for creating the composite sync (which you have to do externally with a VGA->SCART cable). It also contains lots of other stuff, (RGB->Y'CbCr conversion for Svideo, Flicker filters etc. etc.) but I imagine you still have limited control.

QUOTE (VooD)
About field rendering, I think is not a valid solution for this. Field rendering is not other think that rendering at 1/2 of the vertical resolution each frame at 60/50 fps, so we obtain a complete image with 1/2 of the rendering power needed. But the video output remains hi-res interlaced.


I dont quite understand. You think that field rendering will give you a half height picture (1/2 resolution each frame)? Or do you think it will be 1/2 resolution but the DENC which scales it up to full size?

QUOTE (VooD)
In normal xbox modes odd and even lines on the tv are alternating, they never are turned on at the same time, so each field is showed 30/25 times at second.


A perfect description of Interlace.

QUOTE (VooD)
In REAL low res modes we always see the same field, refreshed a 60/50 fps.


Absolutely. It's what is called "Single Field". If you understand TV's, you'll know that you have hsync, vsync and field flags. Effectively driving the field flag to the same value for both fields.

QUOTE (Lantus)
I think one of the drawbacks of field rendering is that your locked into using 240/288 horizontal lines


Drawbacks? smile.gif

QUOTE (Lantus)
Its a good solution for most emulators, but a SNES for example where some games have higher res modes (512x448) it would not be feasible without some kind of hack. The problem is some roms switch over to high res mode during gameplay - the mode isnt defined from the beginning


Surely you detect the bit set in the register which enables the higher res mode, and switch to Frame Rendering?

QUOTE
putting in a condition to keep checking for a screenmode change and switch out of field rendering would slow things down a bit.


Yeah? I imagine that when you detect the switch you have to render the screen to a different buffer (Direct Draw Surface?) switch and toggle the field rendering? I wouldnt have imagined that much of a delay, it would depend on how fast the X-box could switch.

Not only would you have to do this for the SNES, but also for the Amiga, which too could use Interlaced modes (but rarely ever did for anything other than still images).

QUOTE
still, its something i might look at implementing in the next WIP if i can come up with a decent solution


I believe in my heart, that unless M$ have screwed up the implementation of "field rendering" then this IS the solution for low res screens for emulators on the X-box if you can get it working.

I've been looking for the XDK documentation to have a read on it, but the usual source on IRC doesnt seem to store the XDK anymore (probably a smart move) so I'll just have to do some more surfing.
Logged

lantus

  • Archived User
  • Sr. Member
  • *
  • Posts: 297
Emulators X-box Interlace
« Reply #10 on: June 28, 2004, 09:43:00 PM »

calling the d3d->Reset() function might be expensive in terms of time as i doubt it was ever meant to be called in this fashion.

but who knows? The best test i can try is with SD3 when the dialog text pops up it switches over to high res and back to low res. If it doesnt appear to affect speed that much ill use it, but i suspect it might get a bit slow.
Logged

alexh

  • Archived User
  • Full Member
  • *
  • Posts: 158
Emulators X-box Interlace
« Reply #11 on: June 28, 2004, 10:03:00 PM »

Would it be possible to set a stored flag next to each game, which says to use field or frame rendering? By default it is set to field, and the first time high-res mode is detected it is permanently set to frame?

i.e. All games that use high-res at any time are drawn in frame mode, all games that never touch high-res are drawn in field mode. Best of both worlds?

Like you are saying though, doubtfull that any 8-bit computer had interlaced modes (they just didnt have the RAM?) and those 16-bit ones that did hardly ever used them. Seems a waste never to use this field rendering (if it works as it says on the tin) at the sacrifice of one or two titles.
Logged

asher

  • Archived User
  • Sr. Member
  • *
  • Posts: 274
Emulators X-box Interlace
« Reply #12 on: June 29, 2004, 05:43:00 AM »

blink.gif
Logged

alexh

  • Archived User
  • Full Member
  • *
  • Posts: 158
Emulators X-box Interlace
« Reply #13 on: June 29, 2004, 08:42:00 AM »

I think I am starting to understand one interpretation of what "field rendering" might mean WRT the XDK. I imagine if you wanted to create a game which had ultra smooth scrolling, you'd want inter-field motion and so might render two slightly different 3D scenes on each field.

Ah.... things are starting to make sense, unfortunately perhaps not good for emulators. Unless there is some way to force which field is being presented.

I hope both yourself and I are proved wrong VooD.
Logged

VooD

  • Archived User
  • Full Member
  • *
  • Posts: 199
Emulators X-box Interlace
« Reply #14 on: June 29, 2004, 09:01:00 AM »

QUOTE (alexh @ Jun 29 2004, 06:22 PM)
Ok, if you have programmed this on a real X-box and seen it working like this I believe you. You have tried it for real haven't you?

I understand what you are saying, but WHY have a field rendering mode in the XDK if what you described is the real behaviour? No-one would ever want to use it... would they?


Do you have the last XDK?, there is a pretty example and documentation about.

"Field rendering is a special video mode where the back buffer size is assumed to be half  the vertical height of the output display and the output format is defined to be interlaced. In this mode, the even lines of the display are rendered during one field and the odd lines are rendered during the next field. When using field rendering, the flicker filter is disabled. Field rendering can reduce the fill-rate and bandwidth requirements of a game substantially; however, since there is no flicker filter, display quality can also be somewhat degraded."

Altought it seems the result is the same than not using field rendering the advantaje of this method is you reduces the proccesing power needed by 1/2.

every odd 1/30 second the buffer has this (which correspond to odd lines of a 640x480 image):
Field 1

and every pair 1/30 second the buffer has this other which correspond to odd lines of the next 640x480 image):
:
Field 2

When every field is synced with the tv beam redraw you got this:
Final Image

Most Xbox games doesnt use this technique and just render complete frames which the video enconder interlaces in two different fields, which is a power waste, but is neccesary if your game is not able to keep 60 fps.

But IN ANY CASE field rendering can setup progressive 15khz low res resolutions, as field rendering is, in fact, only possible is you setup an interlaced resolution with swapping fields.

I hope you finally understand (otherwise go and pick the xdk and test by yourself), I´d like Xbox could setup the modes we are talking about, as then would be the perfect emulation platform...but unless you can completly disable the tv encoder and setup modes directly on the gpu (or maybe the enconder has a mode for that), is not possible.

I´ve using Advance Mame for years, and I have a pretty good knowledge about how low res video modes works and what can and can´t be done, if you want some info, take a look to advance mame configuration, or something, but what you´ll find is exactly what i´ve just typed.
p.d.: after click on the links, push enter on the adress bar.
Logged
Pages: [1] 2