pvr_wait_ready: timed out

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
Warmtoe
DC Developer
DC Developer
Posts: 453
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu May 16, 2002 8:29 am
Location: ice88's house
Has thanked: 0
Been thanked: 0
Contact:

pvr_wait_ready: timed out

Post by Warmtoe »

I'm getting 'pvr_wait_ready: timed out' on a regular basis in KOS-1.2.0 - anyone got experience of why? and how to fix it? I don't get this in KOS-1.1.8 which I was using previously.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Weird...

I know that KOS has a different system for handling all the PVR pageflipping, and stuff like that. It uses vblank interrupts instead of... whatever it used before. That might be causing a few problems.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

I can't actually get anything that uses the PVR working under KOS 1.2.0. This is really, really weird.
Rand Linden
bleemcast! Creator
bleemcast! Creator
Posts: 882
Joined: Wed Oct 17, 2001 7:44 pm
Location: Los Angeles, CA
Has thanked: 0
Been thanked: 0
Contact:

Post by Rand Linden »

I've never used KOS, but there *are* bugs in the PVR chipset -- IIRC, one of them will cause the interrupt that's supposed to fire at end of render to NEVER occur.

Rand.
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

BlackAura wrote:I can't actually get anything that uses the PVR working under KOS 1.2.0. This is really, really weird.
I cant ether ive given up on it i emailed dan for help and a few others.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Got it working again. It seems to have some slightly different issues to last time. And I have no idea what I did differently, but it now works.

The pvr_wait_ready timeout could be caused by a bug in the PVR - if it's not firing the end of frame interrupt, pvr_wait_ready will just wait a while for it to happen, then abort.

ice88 - Is that happening all the time, or only under certain circumstances?
Warmtoe
DC Developer
DC Developer
Posts: 453
Joined: Thu May 16, 2002 8:29 am
Location: ice88's house
Has thanked: 0
Been thanked: 0
Contact:

Post by Warmtoe »

Interestingly it only happens at a point after the main emulation engine has ended and I've returned control to my GUI - but as far as the PVR is concerned, nothing has changed... (I haven't re-initialised or anything)

It is odd - you get one good run of the emulation engine then *poof* timeouts.

I could try experimenting with it some more - interesting to hear about possible PVR bugs, but I'm more inclined to believe it's KOS or something I'm doing.
Rand Linden
bleemcast! Creator
bleemcast! Creator
Posts: 882
Joined: Wed Oct 17, 2001 7:44 pm
Location: Los Angeles, CA
Has thanked: 0
Been thanked: 0
Contact:

Post by Rand Linden »

I mentioned the PVR bug only because it's good to know that sometimes the issue isn't of your doing.

The major one that bit me hard is quite complicated to set up, and only occurs rarely -- but if you're not doing anything with general polygons per se, you'll not see it.

If you get a good run once and then subsequently it causes problems, I'd suspect something on your end.

Easiest thing to do is to record your input, and ensure that you play back everything *precisely* as you recorded it. Then you can easily reproduce the situation that causes the bug and track it down rapidly.

If you want a quick fix, though, you could always just reset the PVR and see if that solves it -- that would likely remove HW from the equation and leave you with whatever software setup you are/aren't doing correctly. Don't forget to clear interrupts, etc. etc. back to their reset state as well (otherwise, obviously, you'll end up servicing an interrupt that was from the *previous* frame and not the current one).

Best,

Rand.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Well, there's three things that could be going wrong - the hardware, the PVR drivers in KOS, or the code that's using it. The KOS PVR drivers are fairly stable (probably not as good as Sega's, of course), but I think they still go a little weird from time to time. It's probably the code that's using it that's going wrong.

ice88 - It could be that you've not finished a frame at the end of the emulation, and pvr_wait_ready is waiting for the running frame to finish. I think that'd cause an assertion failure though (debug output appears, DC resets). Shutting down the PVR might actually help, but it's probably overkill. Is that bug present in the MAME 0.71 source you released, or is it in something else?
Viktor
DC Developer
DC Developer
Posts: 30
Joined: Sun Nov 04, 2001 4:47 am
Location: Stockholm, Sweden
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Viktor »

I get the same output everytime I start my game, but I have got it since 1.1.8 I think and it has never caused any problems and I have never looked into what it is.

/Viktor
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Apparently, it's supposed to do that when you first start using it. Or at least, it is in KOS 1.2.0.
Artchi
DC Developer
DC Developer
Posts: 61
Joined: Sun Nov 04, 2001 10:02 am
Location: Wolfsburg (Germany)
Has thanked: 0
Been thanked: 0
Contact:

Post by Artchi »

I'm using KOS 1.1.9 and I get the same problem. I don't know if it's a realy problem but it's not nice.

Did somebody knows how I can disable the console output? Because if I release an end user version I don't want performance losts because of console outputs.
Strapping Scherzo
DC Developer
DC Developer
Posts: 2285
Joined: Fri Feb 21, 2003 7:37 am
Location: Chicago, IL
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Strapping Scherzo »

I get the same pvr timeout right at the begining of things too. It doesn't seem to have any ill effects so I've never worried.
Artchi wrote:Did somebody knows how I can disable the console output? Because if I release an end user version I don't want performance losts because of console outputs.
KOS is able to figure out if you are using dc-load and pipes printf and the like to the console. When you release this on a CD, KOS will just throw any any stdout data and you will lose very little performance. But to be on the safe side, you might want to use a macro that calls printf for debugging, and when you are ready to release, define that macro to be empty.
Image
Artchi
DC Developer
DC Developer
Posts: 61
Joined: Sun Nov 04, 2001 10:02 am
Location: Wolfsburg (Germany)
Has thanked: 0
Been thanked: 0
Contact:

Post by Artchi »

Thanks for this information.

About the time out: I don't get it only on startup. I get it in some situations at runtime. But if this uncontrolled outputs has no effects on end user release it is right for me. Thanks!
Artchi
DC Developer
DC Developer
Posts: 61
Joined: Sun Nov 04, 2001 10:02 am
Location: Wolfsburg (Germany)
Has thanked: 0
Been thanked: 0
Contact:

Post by Artchi »

I have located the time out: it will be showed if I don't end a scene before start it again.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7498
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 10 times
Contact:

Post by Quzar »

Working on a new Duck's Revenge ? :wink:
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
Artchi
DC Developer
DC Developer
Posts: 61
Joined: Sun Nov 04, 2001 10:02 am
Location: Wolfsburg (Germany)
Has thanked: 0
Been thanked: 0
Contact:

Post by Artchi »

Why do everybody remember Ducks Revenge? :o :) It's 2 years ago.:cry:

But I can tell you: it's not a game! 8-) :)
typoEDR
Insane DCEmu
Insane DCEmu
Posts: 117
Joined: Tue Dec 16, 2003 1:46 pm
Has thanked: 0
Been thanked: 0

Post by typoEDR »

Artchi wrote:Why do everybody remember Ducks Revenge? :o :) It's 2 years ago.:cry:

But I can tell you: it's not a game! 8-) :)
Does it make games? :D ... or babies?
Post Reply