Progress on the Sega Dreamcast emulator for Windows.

http://dknute.livejournal.com/

Yesterday I fixed one of the few long outstanding bugs in TA/PVR core. You should have no problems discerning the "before" and "after" from pictures below

http://pics.livejournal.com/dknute/p...ep5b9/s320x240
http://pics.livejournal.com/dknute/p...eq3kz/s320x240
http://pics.livejournal.com/dknute/p...er4x4/s320x240
http://pics.livejournal.com/dknute/p...es4bb/s320x240

There's a new feature in T10/2: degenerated geometry. Usually that is something you'd want to avoid but in this case I'm injecting it into vertex streams on purpose.
Why? On Dreamcast the polygons have to be arranged in short triangle strips for TA/PVR to process them. Very short actually, one strip can have at most 6 triangles in it. If you need to draw something larger you must first partition the data, and then register it as a set of strips. It keeps PVR sorting lists short but for the emulator it means drawing each and every strip as a separate entity. For games with lots of 3D geometry details or objects (like Dead or Alive 2 or Trigger Heart Exelica) that means up to some 8000 Draw calls - per frame! This is very time consuming.
I modified my rendering system - it now creates additional triangles to connect the separate strips together, so they could be drawn all at once with single call. Of course those triangles can't be visible or else the whole scene would become a mess, so I make them degenerated. In the end there's more triangles to process but it all happens faster anyway
This scheme cuts the number of Draw calls down by factor of 2-2.7 for those most intensive 3D scenes. There are still almost 3500 calls per frame in some places but that's more managable than it was up until now. Any further optimizations would require some serious pre-processing of the data, tieing down CPU. I'll think about it but I suspect it's just not worth it.

As for the surprise I promised... here it is (along with some pictures of my new scope). I'd like to thank ElSemi for the help he provided, this would not be possible so soon without him.

http://pics.livejournal.com/dknute/p...etcaa/s320x240
http://pics.livejournal.com/dknute/p...ew94f/s320x240
http://pics.livejournal.com/dknute/p...ex81d/s320x240
http://pics.livejournal.com/dknute/p...ey0gr/s320x240

Now this opens up some new possibilities