VOGONS


graphics optimization & autocycle patches

Topic actions

First post, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

graphics optimizations:
bitumove: 128 bit blit
modeoperation: skips calculation if same as last pixel (this speeds up this function 3x in wolf3d for example)
writehandler: inlining of the first invocation

http://sourceforge.net/tracker/index.php?func … 551&atid=467234

autocycle:
no more skips or lag from cycle transitions(prior, wasn't usable on my system)
displays current cycles(instead of "auto") & framerate once a second
for cycles set to a specific count, cycles auto adjust up to that count.
use for programs that need a specfic cycle setting so as to not run too fast but still adjusts cycles downward when cpu load is exceeded or to reduce cpu load. Set large enough it essentially mimics autocycle.

http://sourceforge.net/tracker/index.php?func … 551&atid=467234

edit: added autocycle patch.
edit: grab graphicsopt2.diff to avoid issue discussed in the thread. But if you want to check out the buggy changes, knock yourself out with graphicsopt.diff;)
edit: cleaned up autocycle.diff, it had a part of the graphicsopt changes ini it. attached is autocycledlean.diff

Last edited by ih8registrations on 2006-06-04, 20:47. Edited 4 times in total.

Reply 1 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

Executable for those who want a look-see without compiling.

Reply 2 of 44, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Thanks! I am going to try it.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 3 of 44, by Spooon69

User metadata
Rank Newbie
Rank
Newbie

I downloaded this for the autocycle feature (max limit and display) because of the sound problems in the official version. This patch definitely helps as long as you set the limit correctly. Thanks and I hope this gets integrated into official!

Reply 4 of 44, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

I found a serious bug.
Your patch breaks scalers. Playing with advinterp2x/3x crashes.

Reply 5 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

If you're using the exe, it may be some other changes that are in the build I'm working on that's not in the patch. But perhaps bitumove.

Last edited by ih8registrations on 2006-06-04, 17:23. Edited 1 time in total.

Reply 6 of 44, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

I applied it to my source, then the bug still remain. For example, using hq2x/hq3x/advinterp2x/advinterp3x crashes. I will try it with a clean cvs some time.

Reply 7 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

Actually those changes did sneak into the patch, and are the cause of the bug. If you replace render_loops.h with that from cvs, you should be good to go.

I've attached a diff sans changes to render_loops.h

That said, I did find one game that has trouble with the modeop optimization; tornado. More bug squashing to do.

Reply 8 of 44, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

With graphicsopt2.diff, seems that the problem was solved. 😀

Reply 9 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

Just to clarify for Spooon69, auto is still there. If you don't want to think about cycles, just set as auto.

Reply 10 of 44, by kekko

User metadata
Rank Oldbie
Rank
Oldbie

> no more skips or lag from cycle transitions
that's very useful, thanks!

Reply 11 of 44, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

Screen becomes distorted in Prehistorik 2 and bumpy.

Reply 12 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

I figured it out; needed to include vga.latch.d in the dirty check.

Fixed tornado. Check it against Prehistorik 2 and bumpy.

Reply 13 of 44, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Any big games that you tested the graphicsopt with? As most of those
(like Quake) use linear access to the graphics memory (mode13/vesa),
i didn't notice any speed gain. Suppose mode12-like games would
benefit from it, or tweaked-mode?

Reply 14 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

If you look at vga_memory, you'll notice modeoperation is only used by unchained vga(aka tweaked vga at mobygames), and chained/unchained ega modes. Even though wolf3d isn't one of the big games, it runs like a dog and modeoperation is one of its big-o calls, which is what led me to optimizing it. The most efficient is LFB, which does straight array accesses. I think games like quake use the map handler if not LFB. Just to reiterate, it's a 3x speed up just for that function(as shown by gprof), for wolf3d. For other games it will vary. Feh, I still get lost with c++'s inheritance so others may be using the writehandlers that call modeoperation.

Last edited by ih8registrations on 2006-06-06, 15:25. Edited 4 times in total.

Reply 15 of 44, by SysGOD

User metadata
Rank Member
Rank
Member

ive tested some SVGA games (Z, Quarantine 2, Exhumed, Hioctane, Rise of the Robots...) with your optimizations for some days now.

Z runs like a dream on my system, no sound stuttering with dynamic core above 60000 cycles anymore. also hioctane seems to benefit from the optimizations.

but quarantine 2 is unplayable. gamespeed goes from high to very slow all the time in hires. screen tearing and sound stuttering also. ive tryed many different settings without any better results.

Last edited by SysGOD on 2006-06-06, 15:46. Edited 1 time in total.

Reply 16 of 44, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

SysGOD, if I am right, you applied svga patch, right?
Did you modify some lines in graphicsopt patch against SVGA patch?

ih8registrations, the third patch made the screen of prehistorik 2 much worse. There's still a bug in bumpy.

Reply 17 of 44, by SysGOD

User metadata
Rank Member
Rank
Member

SysGOD, if I am right, you applied svga patch, right?

no iam only using the precompiled dosbox.exe for now.
dont have any compilers on my system yet...

maybe ih8registrations has some other things changed in his .exe, i dont know.

Reply 18 of 44, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

Where in and prehistorik 2 and bumpy do the corruptions/bugs show up?

Reply 19 of 44, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

Here is a screenshot.