xboxscene.org forums

OG Xbox Forums => Software Forums => Emulators => Topic started by: slowmaz on March 03, 2005, 01:29:00 AM

Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 03, 2005, 01:29:00 AM
Hi Gogo,

Mamedox Team is working on fixing the v-sync in mameox to match the xbox 15.7khz output...I believe that it was not ported correctly and still has the PC version VGA monitor Sync rates...maybe I am wrong..but I think this is what causes the "tearing" effect seen in "1942 Loopmaster in mameox"  when there is alot of sprites moving on any mameox game you can see that the sync is wrong...could you help us?

Britneypairs is the mamedox project manager you can maybe talk to him about what it should be

Thanx for the Psikyo!!!!

 beerchug.gif

there is NO "tearing" in FBAxxx ...thats why i ask
Title: Need Gogoackman's Expertise...
Post by: Tanas on March 03, 2005, 04:05:00 AM
There doesn't seem to any problem with the vsync in 1944 Loop Masters, the tearing you are talking about in Mamedox is probably due to MAME being more processor intensive than FBAXXX, and if tearing only happens when there is a lot going on, on screen, I can bet you that it can be put down to the xboxes lack of proccesing power.

Title: Need Gogoackman's Expertise...
Post by: TMaul on March 03, 2005, 04:47:00 AM
QUOTE(slowmaz @ Mar 3 2005, 08:28 AM)
Hi Gogo,

Mamedox Team is working on fixing the v-sync in mameox to match the xbox 15.7khz output...I believe that it was not ported correctly and still has the PC version VGA monitor Sync rates...maybe I am wrong..but I think this is what causes the "tearing" effect seen in "1942 Loopmaster in mameox"  when there is alot of sprites moving on any mameox game you can see that the sync is wrong...could you help us?

Britneypairs is the mamedox project manager you can maybe talk to him about what it should be

Thanx for the Psikyo!!!!

 beerchug.gif

there is NO "tearing" in FBAxxx ...thats why i ask
*



IMO, Its probably either one of the following things:
1) Like Tanas says, the xbox is not powerful enough for the way mame is emulating the games. (More than likely)
2) Your frameskip, vsync and possibly other video settings are wrong. (quite likely)
3) If the video init code in mamedox is anything like it is in MAMEoX then its possible that you might be able to improve the situation by messing around with some of the D3DPRESENT_PARAMETERS you are using.

And you would be better off asking for help from Manto and not Gogoackman. Its clear that Manto was the brains behind the decent parts of FBAXXX, thats why it stopped working properly when he left the project.  biggrin.gif
Title: Need Gogoackman's Expertise...
Post by: HK$ on March 03, 2005, 05:07:00 AM
params.FullScreen_RefreshRateInHz = 60;
This line is after D3DPRESENT_PARAMETERS, should it be 60Hz or 30Hz to work on a NTSC TV?
if the framerate is 60, then on the screen the line 1,3,5,7....will be the first frame, line 2,4,6,8...will be the second frame. Will that be the reason cause the tearing?
Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 03, 2005, 05:04:00 AM
TMaul,,,,,


can you chip in on this one?...I know you can do it ...you showed us the way to set flicker and soften!!! that made mameox so much better.  Its not a frameskipping issue its a horizontal line in the center of the screen durring these heavy movement scenes..

for a better example look at Garou MotW on one of the fighting scenes where everything is moving fast...in the background...and other scrolling games ...I know this can be fixed cause it doesnt happen in pc MAME

beerchug.gif

Flicker Filter = 0
Soften = 0

 cool.gif
Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 03, 2005, 05:06:00 AM
WOW!!!

it should be either 15.7 or 32

you got it!!!
test those 2 out beerchug.gif
Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 03, 2005, 05:17:00 AM
im reading here that it should be 31

http://ultimarc.com/monfaq.html

this makes alot of sense also :

 The vertical refresh rate is a simple calculation: Hfreq divided by lines. Therefore as the number of lines is reduced, the vertical refresh rate goes up. So for a vertical resolution of 256, the vertical refresh would be 121Hz

...so how many vertical lines is the xbox outputing?

15.2Khz (xbox output to TV)  \  number of vertical lines in standard NTSC format

The NTSC standard has a fixed vertical resolution of 525 horizontal lines stacked on top of each other, with varying amounts of "lines" making up the horizontal resolution, depending on the electronics and formats involved. There are 59.94 fields displayed per second. A field is a set of even lines, or odd lines. The odd and even fields are displayed sequentially, thus interlacing the full frame. One full frame, therefore, is made of two interlaced fields, and is displayed about every 1/30 of a second.

so that would make it

32Khz
___

525vert lines          =          61HZ  


so try 61 also...maybe that extra 1 is what is missing  :luv:

This post has been edited by slowmaz: Mar 3 2005, 01:28 PM
Title: Need Gogoackman's Expertise...
Post by: TMaul on March 03, 2005, 05:24:00 AM
QUOTE(HK$ @ Mar 3 2005, 12:06 PM)
params.FullScreen_RefreshRateInHz = 60;
This line is after D3DPRESENT_PARAMETERS, should it be 60Hz or 30Hz to work on a NTSC TV?
if the framerate is 60, then on the screen the line 1,3,5,7....will be the first frame, line 2,4,6,8...will be the second frame. Will that be the reason cause the tearing?
*



Well, experimentation is the key but I would have thought that 60hz would be the right setting for NTSC. The XDK docs go over all that tho, so reading those would give you a better idea.

I would suggest messing around with FullScreen_PresentationInterval and SwapEffect as well. For example setting FullScreen_PresentationInterval to D3DPRESENT_INTERVAL_ONE_OR_IMMEDIATE can cause tearing if the hardware cannot finish drawing the frame in the time specifed by the refresh rate. This would happen if the emulation was eating into the cpu time put aside for drawing the image on the tv screen. Setting it to D3DPRESENT_INTERVAL_IMMEDIATE can also cause similar problems but in some cases fixes screen tearing but causes the sound to go out of sync.

Its all a matter of messing around until you find something that helps but it could turn  out that the xbox is not powerful enough, MAMEs frameskipping code is going crazy, etc. in which case no amount of tweaking the display params is going to help you. :)

This post has been edited by TMaul: Mar 3 2005, 01:26 PM
Title: Need Gogoackman's Expertise...
Post by: BritneysPAIRS on March 03, 2005, 05:38:00 AM
hi Tmaul...... your a good man want to help us build MAMEdOX any help would be great EBSay is the coder I put stuff toether and skin and HK$ is a patcher for Ebsay ....... id love if you 2 could write a few patchs for ebsay we are newbes.

If you want add me to MSN [email protected]     or PM me would love to let you help us build a better product your imput might be great as well

Cheers
Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 03, 2005, 06:07:00 AM
after some team discussion we think it would be the best to make a "switch" in settings to change the value of "60" in that one Params line ...but we will have several options in the switch for testing purposes...   61,60,59,32,31,30,29   then we will test and remove the wrong values!!!

GO TEAM!

ps thanx Tmaul....you always know the code points...your a machine! biggrin.gif
Title: Need Gogoackman's Expertise...
Post by: Tulius on March 03, 2005, 07:35:00 AM
ph34r.gif  What about search the video settings in the old MameX source code? That version of mame was perfect with the refresh rate of the TVs...and I'm sure tearing its not related with CPU consuming because MameX played NeoGeo, CPS2 and Midway games without a hitch of tearing.
 What's more, Mameox is the only one Xbox emulator with screen tearing problems, xboyadvance and KI dont run at full speeds but dont suffer from vsync problems...
Title: Need Gogoackman's Expertise...
Post by: lantus on March 03, 2005, 05:14:00 PM
QUOTE(slowmaz @ Mar 3 2005, 11:12 AM)
WOW!!!

it should be either 15.7 or 32

you got it!!!
test those 2 out beerchug.gif
*




except it wont work - valid values are 50/60 only
Title: Need Gogoackman's Expertise...
Post by: TMaul on March 03, 2005, 06:22:00 PM
QUOTE(lantus @ Mar 4 2005, 12:13 AM)
except it wont work - valid values are 50/60 only
*



As I suspected.

I've been thinking a little bit about this today. My first thought was that maybe the Mame drivers were not running at 60fps for the neogeo driver but this line:
CODE

MDRV_FRAMES_PER_SECOND(60) /* verified */


in the neogeo driver rules that out. So if the rendering code is working correctly (as in the display params are working to output at 60 frames per second) then the driver should be in vsync the same way that the xbox FBA ports are. I know for a fact that the FBA ports are fixed to run the games at 60fps for NTSC so this makes sense.

This only really leaves a bug or oversight somewhere in the MAME port code or the xbox is just not fast enough. I would suggest that you make sure you are using the asm version of the 68000 cpu core as from a speed point of view the xbox likes that more than the C 68000 core.

I don't have enough time to spend working on a MAME port at the moment but I do have a copy of the MAMEoX source that mess around with every so often. I'll let you know if/when I get something interesting working that you might find useful but I wouldn't hold your breath or anything.

And i'm sure there was something else but I seem to be a little drunk and have forgotten what it was.


Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 03, 2005, 06:42:00 PM
hmmmm....i see it as more of a global bug than just related to one driver (neogeo)  but neogeo games are good examples because of the many fast moving sprites...at least we have some ideas of where to look...

thanx Lantus and TMaul beerchug.gif
Title: Need Gogoackman's Expertise...
Post by: Ebsy on March 03, 2005, 07:29:00 PM
I remember this issue cropping up a few weeks ago on 1emu. Sammaz requested it there too funnily enough  blink.gif

The first line I looked at when the issue arose was the FullScreen_RefreshRateInHz parameter, but as Lantus says the only valid values are 50 or 60 (or 0 if it's a windowed app...so rules that one out!.)

It could actually just be that the xbox isn't powerful enough to run mame and vsync effectively. I believe MAME-X never had this issue, but mame-x is based on an older mame core than mameox/mamedox, and remember that with every new version of mame released, it means more and more cpu cycles are dedicated to emulating the various systems.

With regards to mameox/mamedox, it's possible the swapeffect or PresentationInterval could be experimented with to get a better vsync rate. It's currently set to D3DSWAPEFFECT_FLIP for swapeffect and the presentationinterval is set to ONE_OR_IMMEDIATE if vsync is off, or 'IMMEDIATE' if vsync is on. Maybe this has something to do with it?.

I've tried with D3DPRESENT_INTERVAL_ONE and D3DSWAPEFFECT_COPY but there's no difference that I could see.

Anyway, I'll include the updated sources with the next release of mamedox.
http://mamedox.blogspot.com  < watch this space wink.gif
Title: Need Gogoackman's Expertise...
Post by: GogoAckman on March 03, 2005, 11:50:00 PM
QUOTE(TMaul @ Mar 3 2005, 11:46 AM)
And you would be better off asking for help from Manto and not Gogoackman. Its clear that Manto was the brains behind the decent parts of FBAXXX, thats why it stopped working properly when he left the project.  biggrin.gif
*



Yep sure  sleeping.gif , it is not working anymore  blink.gif , BTW what could he except when manto is working on the new fbaxb5, probably with you  laugh.gif .
BTW, all I wanted to say, is that you better ask lantus/tmaul because I only took fbaxxx from what it was and there were no problem to begin with wink.gif but apparently it is already done  cool.gif .
Another thing, the ppl who know me as developper from fbaxxx from the beginning know that I have no time to do it (I have only time in the week end and when I have no other things to do because I have day and night's school, that s why I left manto do fbaxxx when I was looking on KIXXX and surrealxxx).
Title: Need Gogoackman's Expertise...
Post by: Iriez on March 04, 2005, 12:23:00 AM
*cracks the whip*

No drama here boys.

Leave your dev wars to PM's.
Title: Need Gogoackman's Expertise...
Post by: BritneysPAIRS on March 04, 2005, 12:29:00 AM
cheers GogoAckman thats a nogo

sorry if theres any trouble
Title: Need Gogoackman's Expertise...
Post by: slowmaz on March 04, 2005, 02:58:00 AM
thanx for the response gogo...I think everyone has put in some great input here and there is alot that can be tested and worked with now...

Thanks for your time! and brainz

 pop.gif

and nice work on the blog spot Ebsy...thats perfect for keeping updates and fixes in order and for news..

eggcelent ph34r.gif
Title: Need Gogoackman's Expertise...
Post by: TMaul on March 04, 2005, 05:28:00 AM
QUOTE(GogoAckman @ Mar 4 2005, 06:49 AM)
Yep sure  sleeping.gif , it is not working anymore  blink.gif , BTW what could he except when manto is working on the new fbaxb5, probably with you  laugh.gif .

Another thing, the ppl who know me as developper from fbaxxx from the beginning know that I have no time to do it (I have only time in the week end and when I have no other things to do because I have day and night's school, that s why I left manto do fbaxxx when I was looking on KIXXX and surrealxxx).
*



Perhaps my comments were a bit harsh. I do use a modified version of FBAXXX on my xbox and the fact that you spend your time working on it dispite being very busy when I clearly cannot be bothered has to be commended. I offer an apology for my comment.

And while its true I did offer Manto a little bit of help last time I was on #cps2shock, from what I have seen he is miles ahead of me when it comes to xbox development so my help (if you can call it that) was not needed.

Now hopefully Iirze will not need to whip us any more. smile.gif
Title: Need Gogoackman's Expertise...
Post by: Carcharius on March 04, 2005, 05:40:00 AM
QUOTE(TMaul @ Mar 4 2005, 12:27 PM)
Now hopefully Iirze will not need to whip us any more. smile.gif
*


Well he might still need to take the whip to you, just for getting his name wrong! wink.gif
Title: Need Gogoackman's Expertise...
Post by: TMaul on March 04, 2005, 05:47:00 AM
QUOTE(Carcharius @ Mar 4 2005, 12:39 PM)
Well he might still need to take the whip to you, just for getting his name wrong! wink.gif
*



 tongue.gif
Title: Need Gogoackman's Expertise...
Post by: devlkore on March 04, 2005, 07:59:00 AM
You tell him, Cacarachicius!

 tongue.gif
Title: Need Gogoackman's Expertise...
Post by: SkmNet on March 04, 2005, 08:23:00 AM
cool, so many devs in one thread!!!
thx for all your work!!!all of u!!!
 tongue.gif
Title: Need Gogoackman's Expertise...
Post by: zero5 on March 04, 2005, 11:42:00 AM
missing xport, lol
Title: Need Gogoackman's Expertise...
Post by: GogoAckman on March 04, 2005, 12:28:00 PM
QUOTE
Perhaps my comments were a bit harsh. I do use a modified version of FBAXXX on my xbox and the fact that you spend your time working on it dispite being very busy when I clearly cannot be bothered has to be commended. I offer an apology for my comment.


No problem, BTW, you re right for one thing, manto is far more talented than me  beerchug.gif .

As for mameox, I asked yoshihiro and bendermike to have their mameox updated where they couldn t find the input problem but they both deleted their work, of I can help on this, I m ok to try, I ll try to see this week end for this Vsync problem, I ll contact britneypairs if I have any news, but I still need to optimise VMM on FBA and need to do a big update on surreal with dave smile.gif (and maeox takes a day or so to compile sad.gif ).
Title: Need Gogoackman's Expertise...
Post by: Iriez on March 04, 2005, 01:27:00 PM
QUOTE(TMaul @ Mar 4 2005, 05:27 AM)
Now hopefully Iirze will not need to whip us any more. smile.gif


wtf?

You'll get the mace for that son.
Title: Need Gogoackman's Expertise...
Post by: Manabyte on March 04, 2005, 02:45:00 PM
QUOTE(zero5 @ Mar 4 2005, 05:41 PM)
missing xport, lol
*




Xport is dead.  He got hit by a train.  His Xbox is still on to this day.
Title: Need Gogoackman's Expertise...
Post by: Ebsy on March 04, 2005, 06:11:00 PM
QUOTE(Manabyte @ Mar 4 2005, 09:44 PM)
Xport is dead.  He got hit by a train.  His Xbox is still on to this day.
*



If that's a joke, it's not a funny one.
Title: Need Gogoackman's Expertise...
Post by: devlkore on March 04, 2005, 06:42:00 PM
It would have been funnier if it had read "Xport is dead. He got hit by a train. His Xbox is on Ebay!".
Title: Need Gogoackman's Expertise...
Post by: dokworm on January 23, 2007, 03:03:00 AM
In VGA mode the xbox puts out 31.5KHz/60Hz
In NTSC mode it puts out 15.7KHz/60Hz.

But anyway, I don't care about the tear I just want it to work in VGA mode without going green  sad.gif
Title: Need Gogoackman's Expertise...
Post by: micbic on January 23, 2007, 03:49:00 AM
Dude, the last post in this thread was nearly two years ago.
Title: Need Gogoackman's Expertise...
Post by: Consoleman! on January 24, 2007, 08:10:00 PM
Yep, this thread is ancient, but the screen tearing issue still persists in Mameox.

From my experience, scrolling graphics in general can cause tearing even in games that are running at a full 60fps.  While I'm no expert on the subject, perhaps triple buffering could provide some help here:

http://en.wikipedia....riple_buffering
Title: Need Gogoackman's Expertise...
Post by: Nemo1985X on January 25, 2007, 01:39:00 AM
Still an tearing issue?  blink.gif  may I ask, tearing in what games?
Title: Need Gogoackman's Expertise...
Post by: Consoleman! on January 25, 2007, 01:21:00 PM
QUOTE(Nemo1985X @ Jan 25 2007, 03:46 AM) View Post

Still an tearing issue?  blink.gif  may I ask, tearing in what games?

In Mamedox, screen tearing is well documented.  IIRC, this issue was inherited from Mameox.

As far as Mameox128 is concerned, the issue is slightly different since an attempt was made to fix screen tearing.

When using Mameox128, the screen stutters in games like Rally X whenever frame skipping and frame rate throttling are enabled.  For some games, like Pacmania, these options are necessary if a user wants the game to play at a playable speed with accurate audio.  Without frame skipping, the game will run too slowly.  Without throttling, the sound will break up the higher the frame skipping is set.  Many of the cpu intensive games experience this effect to one degree or another.

In these situations, maybe triple buffering would help.  In general, it should help any time v-sync is off.  

The problem here is that having v-sync off isn't going to show a significant speed increase in Mameox128 because v-sync off relies on frame skipping and Mameox128's frame skipping relies on the sluggish throttling feature to "help" keep the audio and video synchronized.  The emulator would be better served by having a true A/V synchronization routine like the one used in Virtual Gameboy Advance, which always works perfectly no matter how high you set frame skipping.

Audio synchronization would allow the user to disable throttling altogether, while allowing him to set frame skipping manually.  He could then use triple buffering to reduce screen tearing.
Title: Need Gogoackman's Expertise...
Post by: Consoleman! on January 25, 2007, 02:23:00 PM
Clarification:  

My original take on frame rate throttling seems to be off.  I just ran some tests and it seems to have less impact on playability than I remember.  Auto frame skipping seems to be the culprit.