Windows 8 strange things and 3d faster in window

Blitz3D Forums/Blitz3D Programming/Windows 8 strange things and 3d faster in window

Wings(Posted 2012) [#1]
I just notice in tiberion game. that playing in window mode is faster on windows 8 than i fullscreen mode.

By acident i notice following.

running game in fullscreen mode 640x480 makes game verry slow. most i got thig to run is 30 fps. even a cube is slow..

but ring game in windowmode 800x600 makes it run 60 fps perfect Always.

i only have about 1.000.000 polys on screen..

Iam investigates this .. must run more tests..


Yue(Posted 2012) [#2]
My development machine is Windows 8 operating system, and I have the best performance, but I can think as I did touch upgrade to the latest graphics drivers Accelerator Card.

Last edited 2012


Wings(Posted 2012) [#3]
I confirm it is so.

runned client at 1280x800 scaled window to 1920x1080 = 60 FPS
runned client at 640x480 mode 1 or 2 makes game run 20 fps.

i will try to find new drivers.. i belive u right. i bougt an upgrade from 7 to 8 just a Little while ago. and perhaps drivers is corrupt


Wings(Posted 2012) [#4]
And i also confirm its driver issue. as i remove nvidia display driver. the window mode now also runs crappy. using internal intel Graphics :)

case close


JohnT(Posted 2012) [#5]
Modern graphics cards are designed to run in high resolutions, 640x480 is not recommended by the makers of many of the latest graphics cards. Maybe for 640x480 Blitz3D is reverting to software acceleration instead of hardware because the cards do not report support for that resolution. This would explain the drastic reduction in performance you are seeing.

Intel graphics systems found on many motherboards do support 640x480 and are actually a combination of software and hardware acceleration for 3D which is why they reduce performance of games as the CPU is doing part of the work taking away CPU time from the game's processing of player, AI, animation, etc.


Wings(Posted 2012) [#6]
thanks JohnT

Yes evem in 1920x1080 its 60 fps in window mode.
but in fullscreen mode its 15 fps as intel gfx card run all fullscreen.
it dint help to update video driver. and this behavior has ben a long time.

i have googled and messed with computer. Even disable intel from windows. but still FPS goes down. Also the CPU goes to som IDLE while the gfx is loading..

This means not only dose i lose FPS to 30 FPS in fullscreen DX7.
the CPU runs verry much slower. this is because Intel gfx video mem reads from RAM. not VRAM.

why a I7 if video is built in ;)

Last edited 2012


yaragad(Posted 2013) [#7]
I have exactly the same problem. I use Windows 8 with a Radeon Graphic card.

Windowed 1920x1080 is about 180 FPS for examples like marioCastle or birdDema.
Full Screen (no matter if it is 1920x1080 or 800x600) is allways 33 PFS and is not smooth (crapy too).

Any idea? Is this solved? I use 1.106 version.


jfk EO-11110(Posted 2013) [#8]
did you try to add a

delay 5

somewhere in the main loop?
getting 30 hz may be caused by windows, forcing a performence hugger process to let the os breath


Wings(Posted 2013) [#9]
Graphics3D 800,600,32,1

SetBuffer BackBuffer()
camera=CreateCamera()
CameraViewport camera,0,0,800,600
light=CreateLight()
box=CreateCube()
PositionEntity box,0,0,10
timer=MilliSecs()
While Not KeyHit(1)

TurnEntity box,0,1,2
UpdateWorld()
RenderWorld()

cfps=cfps+1
If MilliSecs()-timer > 1000
fps=cfps
cfps=0
timer=MilliSecs()
End If
Text 400,0,fps

Flip False
Wend



the code above runs 10700 fps in window mode. (I put the flip to false)
and in fullscreen it runs 34 fps even at flip false.

I have tryed the delay 5 thing yes it worked in windows mode but not in fulscreen mode. fullscreen is Always 30fps. no matter what one try.

Any one know of a old game running on dx7 ? like Blitz3d do ?


yaragad(Posted 2013) [#10]
Lol, very good example Wings.

Same for me. It runs up to 200 FPS in window mode.
Full Screen is always 33 FPS (for 800x600 and for 1920x1080 the same 33FPSs)

No matter if flip is turned to true or false, delay or not, resolution selection, Intel Graphics or Radeon selected...

Also this 33 FPSs are not smooth. I thinks this is a serious problem. Can't release games with this issue.

I think we have to open this issue in Bug Report thread.


Imperium(Posted 2013) [#11]
Not trying to derail the thread by why move to Windows 8 other than for the fancy touchscreen support? It seems like drivers are always an issue. I waited a long time to move from XP to 7. I really like 7 but still use XP on many of my machines. I've seen arguments on both ends but if 8 was better for gaming why do most gamers prefer 7? Also why did the early Xbone systems run 7 instead of 8? Worst of all I've read some blogs that claim Windows 8 dictates what you can and can't install on your computer. I'm starting to feel that 7 and 8 represent the biggest crossroads so far for Microsoft even more than the XP and Vista debacle years ago. Even a long time MS user like myself is finally starting to embrace alternatives like Ubuntu and Linux mint.


Many of the old games I like to play simply command I use a lower resolution like 640x480. Even when playing something like Zdoom the game doesn't look right in high resolution with its low resolution graphics. Are we simply SOL are far as compatibility? Thankfully with solutions like dosbox around I want to say "no" but if our hardware stops supporting backwards compatibility then I see dark days ahead. Unless MS has changed their moto I always though MS strives for compatibility over everything else because of their dominance in the business world.


Wings(Posted 2013) [#12]
To make a story short i bought myself a new pc for 1000$. my laptop was to old for play lol on.

i now testen on anoter machine with same boring results. this machine is designed by hp.

Model: HP 600B (THIS IS A 320$ pc)
Intel(R) Pentium(R) CPU G640T @2.240GHz (64-Bit)
4 GB ram
OS Windows 8 Pro with Media Center (6.2, Build 9200)
Graphics Intel(R) HD Graphics Version 9.17.10.2828 (2012-07-31) 1664mb
Driver model WDDM 1.2
Screen Driver "Ordinary PnP-Screen"
DirectX 11
DirectDraw Yes
Direct3d Yes
AGP Yes

that means blitz3d is having serius compability issues with HP, Asus that runs windows 8. most clearly it runns good on windows 7. i Think i remember that..

(I will probably go over to bmax i just need to Clean my code a lot Before that. funny is that BMAX is running widout any problem at all. Always 60 fps, tested half Life 1 and it has no issue but that is openGL. )

Any one got any game in dx7 ? must be somthing from 2000 ;) Skyrim ?


Wings(Posted 2013) [#13]
I now tryed out the softpixel render. and it works rather nice.

i get 240 fps fulscreen. and offcorse the flip dose nothing at least now its in vsync. Its open GL in windows 8 ;)


;##### Code #######

Include "SoftPixelEngineWrapper.bb"

UseOpenGL
timer=MilliSecs()
Graphics3D(800, 600, 32, 1)

cam = CreateCamera()
PositionEntity(cam, 0, 0, -5)

light = CreateLight()

obj = CreateCube()

While Not KeyDown(1)

TurnEntity(obj, 1, 1, 1)

RenderWorld

Delay 10
cfps=cfps+1
If MilliSecs()-timer > 1000
FPS=cfps
cfps=0
timer=MilliSecs()
End If
Text 400,0,FPS


Flip True

Wend

EndGraphics
End


SLotman(Posted 2013) [#14]
Same here for me. Windows 8, Radeon card (actually laptop with intel + radeon) - fullscreen only 35fps.

I have the latest drivers, and I also have vsync turned off in the driver settings.


Imperium(Posted 2013) [#15]
I wonder if the problem lies with Direct X support for Windows 8?
What you're doing is not the best way to control the frames per second. Try this code with some tweening. Video fps is 60 while the game logic is limited to 30. Let us know the results.




SLotman(Posted 2013) [#16]
This code above runs even slower for me: 21 fps on fullscreen. 58-59 fps on window.


Imperium(Posted 2013) [#17]
Why exactly do you have Vsync off? Other than for testing you should have it on. Try the above code with Vsync forced on. Does Windows 8 have any sort of settings like 7 to run an application in XP mode? Try changing some of the numbers around to this.

Local renderTime = Floor(1000.0 / 120), updateTime# = 1000.0 / 60


Have you also tried the SoftPixelEngineWrapper like Wings did? Blitzmax has the option of using either OpenGL or DirectX APIs. Unlike Blitz3d which in its stock forum uses DX7.


jfk EO-11110(Posted 2013) [#18]
sounds much more like w8 has dx7 issues than b3d has w8 issues... how about other dx7 stuff, same problems?

this whole thing seems to be a w8 vsync issue.

did you try it with 2d? like...
graphics 640,480,32,1
setbuffer backbuffer()
t=millisecs()
for i=0 to 10000
flip 0
next
t2=millisecs()
print (t2-t) / 10000.0
flip 0
waitkey()

??


yaragad(Posted 2013) [#19]
I get 33 FPS too with your example JFK. Im going to try SoftPixel and downloading some DX 7 games.

Nostalgic, we can move to Win7 again, but I cant release games telling the player to move to Win8 to Win7 to play my game :)

Problem is that Microsoft doesn't give very much support to Dx7 anymore, so maybe has't been nearly tested Dx7 on Win8 :) Oldest Dx full supported is Dx9. So now you can see places like Steam.com saying this "Warning: Our games no longer support DirectX 7".

Let see if we can find a simple solution. I dont really care about 33FPSs, I care about I cant get a Smooth 30FPS simple example.


Wings(Posted 2013) [#20]
NostalgicAlgorithms

i tryed that code it gives 21 fps in a windows 8 machine...
i begining to look at wrappers.. and c++


jfk EO-11110(Posted 2013) [#21]
well then now we know it must be the flip 0

probably somebody can do a substitute, using some direct api calls?
although i'd rather want somebody going to redmond and kick some b#tts to get this fixed...


Wings(Posted 2013) [#22]
I tested to render only on frontbuffer()
and if i dont do flip command i get 58 fps.
thoe i hat to use rect over the fps counter. and 3d will not show up obvius as pic is on backbuffer.. hey i can copy it manual.. go live widout flip.


Wings(Posted 2013) [#23]
Confirm it works.. thanks Jfk EO-11110

instead of flip
CopyRect 0,0,800,600,0,0,BackBuffer(),FrontBuffer()
it dose the same... Now blitz3d runns on windows 8 too.


You others please test below.




HidePointer
Graphics3D 800, 600, 0, 1
SetBuffer FrontBuffer()

Local renderTime = Floor(1000.0 / 60), updateTime# = 1000.0 / 30
Local cTime = MilliSecs(), accum#


light=CreateLight()
RotateEntity light,90,0,0

camera=CreateCamera()
CameraViewport camera,0,0,800,600
CameraRange camera,1,800
PositionEntity camera,0,1,0

box=CreateCube()
PositionEntity box,0,0,10

; SET THE FONT
font=LoadFont( "Terminal",14 ) ;Lucida Console
SetFont font
;---------------------------------------------------------------

Global RenderTween# = 1.0
Local DoVsync = False, LimiterOn = True

While Not KeyDown(1) ;Outermost main loop - rendering and all secondary functions
accum = accum + (MilliSecs() - cTime) ;Accumulator for update loop
cTime = MilliSecs() ;"Official" start of loop

;Update loop (for render tweening) - all movement, input and updates happen.
While accum >= updateTime
;! CAPTURE STUFF
CaptureWorld
TurnEntity box,0,1,2

;! VARIOUS OTHER UPDATE FUNCTIONS
UpdateWorld ;!If necessary

accum = accum - updateTime
Wend
RenderTween = accum / updateTime

;! DRAW STUFF
;Render world camera view

RenderWorld RenderTween

;! DRAW OTHER STUFF (e.g. 2D)

;---------------------------------------------------------------
;DISPLAY FPS COUNTER
If MilliSecs()-settime>1000
GetFPS=setfps : setfps=0 : settime=MilliSecs()
Else
setfps=setfps+1
EndIf
Color 0,0,0
Rect 0,0,100,100
Color 255,255,255
Text 5,5,"FPS = "+GetFPS
;---------------------------------------------------------------


If LimiterOn Then Delay (renderTime - (MilliSecs() - cTime)); - 1 ;Free spare CPU time
If DoVsync Then VWait
;Flip False
CopyRect 0,0,800,600,0,0,BackBuffer(),FrontBuffer()
Wend
End


jfk EO-11110(Posted 2013) [#24]
i think that's not an option. what about all those great releases written in Blitz3D? I think MS owes us a bugfix. yeah, lauhgter... but, really.
isn't there some sort of setting in w8, that fixes it?

And is it really only blitz3d, or also other dx7 stuff??!

oh and btw could somebody please try my SMK on w8?
just create some dummy blocks and see if the timeline gui works (like draging blocks, scrolling etc.)

edit... ah, smk is windowed anyway, so, don't panic, tho I never tested it on w8, so, if you want to, i'd be glad anyway.</offtopic>


Imperium(Posted 2013) [#25]
I tried contacting the author of Softpixel to possibly shed more light on this but the email was returned. :(

Is forcing Blitz3d to use Opengl instead of Direct X really as easy as this?
Include "SoftPixelEngineWrapper.bb"
UseOpenGL

As the case with anything Windows its better to wait until they get all the bugs out before upgrading. Still there is not much to Windows 8 that attracts me over 7. The fact it doesn't work well with older games is another notch in my book against it. I don't plan on moving from 7 anytime soon and I would urge my customers to do the same. LOL


SLotman(Posted 2013) [#26]
;Flip False
CopyRect 0,0,800,600,0,0,BackBuffer(),FrontBuffer()

Not a real solution: using copyrect kills the performance on windowed mode!

The strangest thing is that I had tested my games (briefly) on windows 8 and they all used to work... maybe it's a driver issue?


Imperium(Posted 2013) [#27]
Is anyone using Windows 8.1? Technically the first service pack to 8 so I've read. If it worked before updating then that is something to consider.


SLotman(Posted 2013) [#28]
Nope. Not windows 8,1 here.


yaragad(Posted 2013) [#29]
Yep, CopyRect doesn't work on windowed, but I have write a simple If Else in my code using CopyRect only on fullScreen.

I'm trying to test some Dx7 games, but Im not sure about Dx7 games. I have downloaded Quake III and MDK2, wich seem to be Dx7, but Im afraid they seem to be using OpenGL. Do you know for sure any game using only Dx7?
This 2 games worked perfectly (up to 500FPS in fullScreen)


Wings(Posted 2013) [#30]
I Think Elderscroll 3 "Morrowind" is dx 7 not sure..
I tryed the old Halo for pc. released 2002 but it was Dx9 ;)


yaragad(Posted 2013) [#31]
By the way. This solution works for Windows 8, but executing this fix on Windows 7 give me a blinking images (using FastImg and FastExt).

So.. for now, it will be a check for Windows 8 in game config :)


RemiD(Posted 2013) [#32]

Yep, CopyRect doesn't work on windowed,


yaragad>>
Why do you say that ? Is it only a problem on Windows 8 ? Copyrect works on windowed mode on windows 7.
I need it for custom reflections and glow !


Wings(Posted 2013) [#33]
This is only a windows 8 problem.
windows 7 shold not have issue and you shold not need to have copy rect with windows 7.

i wounder if Visual c++ 6.0 is direct x 7 ?


Wings(Posted 2013) [#34]
Here is microsoft respond to DirectX 7 games


We only support the last 3 releases of the DirectX SDK (currently the June, August, and October 2005 releases). DirectX 7 became an unsupported SDK a few years ago.


Wings(Posted 2013) [#35]
I found a DirectX 7.0 SDK from Blackmail.net ;)
anyway examples that direct 3d examples there. have also 30fsp issue in windows 8.
and window mode runns wilde no fps Control at all. exact like blitz3d :D

... I know there is some wrappers that let u run games like RedAlert 2 in windows 7.. perhaps there will come for windows 8 later..

the windows 8 is herby delcared as worst bad written os of all 2013. even worse than windows vista. roumors tells us there is a way for companies to se what you write on computer on keyboard. +se what pics you look on. be warned :D


GaryV(Posted 2013) [#36]
I am curious if this is just a D3D7 issue or also affects DD7?


RemiD(Posted 2013) [#37]
If it is only a problem with windows8, Blitz3d may have a few years left :
http://gs.statcounter.com/#os-ww-monthly-201304-201306-bar


SLotman(Posted 2013) [#38]
Confirmed it's NOT a driver problem - just tried on another machine, with windows 8 and nvidia card, and still 33/35 fps fullscreen.


skidracer(Posted 2013) [#39]
If it is a DD7 issue (not D3D7) removing the Text and Rect commands from the benchmark may help. Will borrow a Win8 machine this weekend to have a play myself.


GaryV(Posted 2013) [#40]
To those having the problem on Windows 8:

I uploaded a test file, more to satisfy my own curiosity than anything else. The test file is NOT written in B3D and only uses DD7, it does NOT used D3D7. It is a 39K download.

*file removed since it has been tested*


SLotman(Posted 2013) [#41]
31 fps here fullscreen.


yaragad(Posted 2013) [#42]
33 FPS here and not smooth movement.


GaryV(Posted 2013) [#43]
Thanks guys. So DD7 and D3D7 are both gooched. *shakes head*

This issue will also likely affect BlitzPlus users who use the default driver, which is DD1. Of course with BlitzPlus, you can use the OpenGL driver, but due to an unfixed bug, it has a problem when exiting an OpenGL graphics window whether windowed or full screen.

I would like to modify my previous comment in another thread where I said I am considering buying B3D. :cD I do not like Microsoft to begin with, but things like this make me dislike them even more. There is no reason they can't provide backwards support for DirectX 7. There is a plethora of DirectX 7 software still out there in wide use and still being actively sold. However, I can see cutting backwards support for something older than DX7.


RemiD(Posted 2013) [#44]
Can some of you who have Windows 8 try a simple code with blitz3d + the xors3d engine ?
The trial version is fully functional but with a time limit. It would be interesting to know if this 3d engine works properly on windows 8.
http://xors3d.com/xors3d

Thanks,


GaryV(Posted 2013) [#45]
Xors3D uses DX9 which is fully supported by Windows 8.


RemiD(Posted 2013) [#46]

Xors3D uses DX9 which is fully supported by Windows 8.


GaryV>>
Ok good to know.

Thanks


Imperium(Posted 2013) [#47]
Well its supported for now... MS has no excuse for this sloppy DX7 emulation. Will DX9 also suffer this same fate years from now? It's quite possible but if you're going to support backwards compatibility either "make it work or not at all" instead of this half-assed approach.

This is why most indie developers have moved away from D3D as an option and instead embraced Opengl. It works on everything and will only get better in time while D3D just keeps getting worse. At least we know this is a OS related issue and not in fact a problem with Blitz.


yaragad(Posted 2013) [#48]
Yes, but the worst part is for Blitz3D. Who is going to buy Blitz3d knowing that Microsoft no longer support DX7? Blitz3D is maybe the best game "engine" for very small teams of development (under Windows), but this "issue" is a big problem for developers.


jfk EO-11110(Posted 2013) [#49]
that's why I'd love to be a writer of books. backwards compatibility a thousand years +...

Well as a conclusion, for now: always let the user choose between windowed and fullscreen. and add a note to the info txt, about w8...

I'd also like to have an api call that allows a window in the size of the desktop, without any borders.

by simply calling a big enough window, i wasn't yet capable of that, the system always forces the start bar or title bar...also, the window has to handle selffocus with some intelligence. any code?


Wings(Posted 2013) [#50]
Hey afk EO-11110 you solved my issue. with a window covering more than display.. i will try it in a cople of hours and put it here. (Windowed fullscreen)

(I have a friend who has a friend that made a wow bot with blitz pluss she moved the wow window and it worked the bot it cold even fly at navpoints.. offcorse i whold not want that but i will ask here later this night. about moving the window with the windows api calls)


GaryV(Posted 2013) [#51]
Will DX9 also suffer this same fate years from now?


It wont be years from now. DX9 is archaic and almost 11 years old.


Wings(Posted 2013) [#52]
;Here folks this almost worked... the problem is windows start bar. its Always on top. i leave for some one else to fix that..
;Also for this to work one have to add those windows decales user and win32

Graphics3D 1930,1100,32,2
AppTitle "Windowfullscreen"

SetBuffer BackBuffer()

hwnd = FindWindowByname (0,"Windowfullscreen")

If hwnd Then
api_MoveWindow hwnd,-5,-26,1930,1100,0
Print hwnd
Else
RuntimeError "Fail"
End If


While Not KeyHit(1)
Flip
Wend


jfk EO-11110(Posted 2013) [#53]
I got the code to check the desktop resolution and to selffocus the blitz window, even to execute a mouseclick, and to check the windows version somewhere floating around. I'll look into this issue the sooner or later and post it.

What's bitter about the whole thing is: old Fullscreen Releases still won't work. :..( But wasn't it the same with the DEP thingie?


Imperium(Posted 2013) [#54]
DEP definitely can cause issues on Windows 7 & 8 machines. Many early XP and win98 games need this turned off to work properly on newer operating systems. Age of Wonders is one game that comes to mind.


jfk EO-11110(Posted 2013) [#55]
yeah but at least users can turn it off.


jfk EO-11110(Posted 2013) [#56]
I have found a substitute for the broken Vwait! Not shure if it works everywhere. See here:
http://www.blitzbasic.com/codearcs/codearcs.php?code=3064
You may need to add support for windowed mode, so the workaround is only used when in fullscreen mode. I wish I could offer you something better, but at least this does allow a smooth rate again. Right now it seems our problems are caused by "HT VM Monitor Enhancement" thing, or something like that, hyperthreading virtual machine somezhing... sounds pretty deep in the system. probably in the bios... of course, can't please the users to first alter their bios :°)


fox95871(Posted 2013) [#57]
James dean said, "Everybody always dies or goes away." Who's gonna stop this? I can always rely on my legs and lungs to keep doing for me what they've been doing for years if I'm lucky. Oh, but Blitz3d? No, we gotta change everything it needs to work. It doesn't matter that I spent all this time getting good at it, or that what I've been making with it's almost done. Urgh! Sorry for the rant. But to be logical about this instead of emotional, is it really too much to ask that certain permanent standards be issued, like oh I don't know, always being able to run Directx7 in 640x480 fullscreen at the very least? It's not like asking for green scanlines to forever be an available option. It's just fast textured 3d and a nice non demanding screensize.


Imperium(Posted 2013) [#58]
Microsoft is who pushed to make DX what is today despite the fact those who originally developed DX (before Microsoft bought it and took it over) said that Windows was horrible platform for Direct X. Much to the horror of Microsoft. :)

I firmly believe that Opengl is the way to go but sadly I'm stuck in a Windows world. I absolutely agree that asking for Dx7 support at minimum of 640x480 in fullscreen is only asking for the absolute bare minimum expectations. Someone at MS was lazy when building Windows 8. This on top of my other criticisms about 8 are quickly making it become the new Vista. Windows 7 will far outlive Windows 8 and XP will never die.


Wings(Posted 2013) [#59]
Issue is ms has some new thing to hinder people for copy bluray and HDMI things. via hardware to capture the signals. i Think thats why its 30 fps. but who knows.. many old games from 1997 was 30fsp.


Imperium(Posted 2013) [#60]
So a modern machine should run DX7 games like my 400mhz Pentium did? Actually that's not fair to my old Pentium since it played the games smoothy.


fox95871(Posted 2013) [#61]
"and XP will never die..." Yeah!


Nexinarus(Posted 2013) [#62]
as for slowness on new machines, have you tried tweening? That may help a bit. It supposed to make the program run at the same speed on all machines.

and yes I still have my XP computer due to the fact the crappy way new systems runs programs now. Heck i am having problems with programs that are 32-bit programed. they wont even work on a 64-bit os.

lots of my editing software i bought can not work now because of that crap.

XP seems to be the last/best os for running programs smoothly.


Yue(Posted 2013) [#63]
XP destined to die ...


Nexinarus(Posted 2013) [#64]
I know. Its sad. Just gotta go with the flow.


Yue(Posted 2013) [#65]
Unfortunately the computer that is making strides all I see is switching tools possible before the ship from sinking.


jackfuste(Posted 2013) [#66]
Microsoft uses some compatibility in Windows 8 and Windows 8.1 for all DirectDraw (DirectX 5-7) applications running in fullscreen mode.
Compatible called DisableMaxWindowedMode, because of this compatibility fullscreen mode does not work properly.
Flip flags are ignored in this mode, but the flip will still occur resulting in low FPS. Because of this, you get no more ~ 33FPS.

There are 3 options how to return the normal FPS in fullscreen mode:

1. Using the Microsoft Application Compatibility Toolkit

• Install Microsoft ACT - http://www.microsoft.com/en-us/download/details.aspx?id=7352
• Run the Compatibility Administrator (32-bit)
• Select New Database (1) and press Fix
• Fill in the vendor name and the program name, as well as the location of the program. Press next.
• Press Next again.
• Select fix DXPrimaryEmulation
• Click Parameters, enter: -DisableMaxWindowedMode and press OK.
• Press Next.
• Press Finish.
• Press Save, select the database name and save location.
• Press File - Install




30 FPS before fix - http://abload.de/img/psychoballs_30i3y10.png
120 FPS after fix - http://abload.de/img/psychoballs_120fmyki.png

2. Use a modified ddraw.dll

I disabled in ddraw.dll problematic compatibility DisableMaxWindowedMode
The archive contains two dll for Windows 8 and Windows 8.1 - Windows_8_8_1_DDRAW_FPS_FIX.zip

Installation: copy ddraw.dll in the game folder.
Note: Fraps does not seem to work with ddraw.dll proxy, use other programs to monitor FPS, such as MSI Afterburner OSD.

31 FPS before fix http://abload.de/img/willrock_31z5yu4.png
60 FPS after fix (Vsync) - http://abload.de/img/willrock_60ymzw7.png
201 FPS after fix (No Vsync) - http://abload.de/img/willrock_201z2air.png


3. Call SetAppCompatData

If you have the source code, you must use the function - SetAppCompatData to disable DisableMaxWindowedMode.
For example:
    {
        HMODULE hDDraw = LoadLibrary(_T("ddraw.dll"));
        if(hDDraw)
        {
            SetAppCompatDataFunc SetAppCompatData = (SetAppCompatDataFunc)GetProcAddress(hDDraw, "SetAppCompatData");
            if(SetAppCompatData)
                SetAppCompatData(12, 0);
            FreeLibrary(hDDraw);
        }
    }

Function SetAppCompatData, must be used before the function SetCooperativeLevel.


Hopefully Microsoft will release an update that will fix this problem.


RGR(Posted 2013) [#67]
This works great!
I am using your solution 2 in connection with GetVersion() from kernel32.dll to delete or copy the right dll into the folder while setting display options before the first start of the game.

Thanks a lot

Very well done, jackfuste :-)


.


Nexinarus(Posted 2013) [#68]
Whoa all that work to get a decent speed in fullscreen... YIKES


Kryzon(Posted 2013) [#69]
That's some first rate information jackfuste, thanks for posting.


xlsior(Posted 2013) [#70]
Whoa all that work to get a decent speed in fullscreen... YIKES


Dropping in the DLL in the game folder seems pretty straightforward though... Very nice find!


xlsior(Posted 2013) [#71]
Anyway, doesn't option #3 mean that BRL could fairly easily fix this problem in Blitzmax for Windows 8?


SLotman(Posted 2013) [#72]
That is definitively a fix! And a EASY one to apply!

Just create a .decls file on your userlibs folder with this:
.lib "ddraw.dll"
CompatData%(val1%, val2%):"SetAppCompatData"

Then, before initializing your game (before the graphics call), call this:
CompatData(12,0)

And there you have it - your DX7 game running full speed on Windows 8!

@jackfuste: may I ask where did you get that information? Even searching for "SetAppCompatData" on Google I got nothing relevant...

@xlsior: on bmax, just use the DX9 driver and you're done... the problem is specific on DX7.


jackfuste(Posted 2013) [#73]
may I ask where did you get that information? Even searching for "SetAppCompatData" on Google I got nothing relevant...

"SetAppCompatData" exported function from ddraw.dll. It is only called from AcGenral.dll, under the compatibility DXPrimaryEmulation in Microsoft ACT.
Parameters for DXPrimaryEmulation not documented anywhere. I found them only with a debugger.
Possible parameters:
1. -LockEmulation
2. -BltEmulation
3. -ForceLockNoWindow
4. -ForceBltNoWindow
5. -LockColorkey:
6. -FullscreenWithDWM
7. -DisableLockEmulation
8. -EnableOverlays
9. -DisableSurfaceLocks
10. -RedirectPrimarySurfBlts
11. -StripBorderStyle
12. -DisableMaxWindowedMode




RGR(Posted 2013) [#74]
Hi SLotman

Thanks for providing that even easier to use fix.

Tested updated games on Windows 8 and Windows 7 and they run.
Without check which OS is installed.
Can someone confirm that games run on XP and other Versions as well if CompatData(12,0) is added?

.


MCP(Posted 2013) [#75]
Parameters for DXPrimaryEmulation not documented anywhere. I found them only with a debugger.


Nice bit of detective work there jackfuste :)


SLotman(Posted 2013) [#76]
I found them only with a debugger.

Even more props to you! Amazing! :)


xlsior(Posted 2013) [#77]
One scary thing of course is that if it's an undocumented API, the chances that it will get removed / changed again in a future update are much larger than with 'official' APIs.


GaryV(Posted 2013) [#78]
That this thread has NOT been stickied is a reflection on the moderators/admins of this forum as this is an issue that will affect all B3D users and a working solution has been provided. BRL would be doing a service to the community to sticky this so that users experiencing the issue can easily find the information they need.


Imperium(Posted 2013) [#79]
jackfuste & SLotman you guys are awesome. Thanks for the fix! Now I hate Windows 8 just a little less. :)


simonh(Posted 2013) [#80]
Mark has released an update that includes jackfuste's excellent fix:

http://www.blitzbasic.com/Community/posts.php?topic=101428


Wings(Posted 2013) [#81]
I can confirm this new patch fixed the issue on windows 8. ty all


Rroff(Posted 2013) [#82]
Props to the people who put the time in to solve this one.


Yue(Posted 2013) [#83]
Hello, I'm on windows XP, my question is whether there is a viable alternative to solve the problem, because the update broke the Fastlibs.

A greeting.


Rroff(Posted 2013) [#84]
Doh hadn't checked to see if fastlibs worked after the update. (EDIT: Yup crashes on set buffer :( )

You can do it with the steps outlined in SLotman's post without messing around with extra dlls, etc.


Yue(Posted 2013) [#85]
@Roff

Try ddraw.dll and dcl but not walk arhichivo says function not found in the lib or something.

.lib "ddraw.dll"
CompatData%(val1%, val2%):"SetAppCompatData"



CompatData(12,0)






Oster(Posted 2013) [#86]
Can anyone help, I'm trying the same thing but without positive results Yue.


Rroff(Posted 2013) [#87]
Simplest way around it might be to compile 2 binaries one with the code enabled for Windows 8 haven't had time yet to investigate it much myself.


Yue(Posted 2013) [#88]
What happens is that with the new update fastlibs are broken, then the idea is that it works with version 1.106 + + Fastlibs ddraw.dll but I can not make it work.


.lib "ddraw.dll"
CompatData%(val1%, val2%):"SetAppCompatData"


CompatData(12,0)




No work!!


Rroff(Posted 2013) [#89]
Dunno if its possible to do something like this:

in_bank=CreateBank(8)
PokeInt in_bank,0,12
PokeInt in_bank,4,0
CallDLL ("ddraw.dll","SetAppCompatData",in_bank)
freebank in_bank


I don't have Windows 8 to test if its doing anything and it fails silently if you get something wrong (not sure if I'm even passing the parameters correctly).


Yue(Posted 2013) [#90]
Well one of my biggest problems is that I do not speak English and the translator does not help me.

Well, all I've done is stick ddraw.dll in the game directory and it seems that it automatically does the job, but I'm under Windows XP and this is the error that throws me. Look.

"Can not find entry point _ftol2_see msvcrt.dll"

Then all would somehow detect if the user has installed Windows 8 or not. But I have no idea how.


Yue(Posted 2013) [#91]
On Windows XP






GaryV(Posted 2013) [#92]
Well, all I've done is stick ddraw.dll in the game directory and it seems that it automatically does the job, but I'm under Windows XP and this is the error that throws me.


Why are you using the DLL if you are on XP? The DLL is only for Windows 8 and is not needed for XP as the issue does NOT exist on XP, and the DLL is NOT made for XP.

The DLL should NOT be needed now, anyway. Just download the new version of B3D, it should fix the issue.


Yue(Posted 2013) [#93]
Is that the problem is with the fastlibs who have broken with the market New version of Blitz3D and so the idea is to use Blitz3D + 1.106 + Fastlibs dddraw.dll, but since the idea is that the game run on different operating systems corretamente to detect Windows 8 will copy it from one directory to the root folder ddraw.dll the game and if the contrary is not no copying windows 8. Continuous Thus using fastlibs I think there will no longer update for Blitz3D more.


Rroff(Posted 2013) [#94]
Problem is GaryV a lot of userlibs are broken with the latest update and many are unlikely to be patched beyond the previous update.

Gonna look at it more when I get some spare time but the easiest way for now for me is to build 2 versions of my binary main.exe and main_win8.exe with the relevant code enabled/disabled. Alternatively If the calldll function works than it would be simple enough to do an if statement based on OS version using that.


Yue(Posted 2013) [#95]
But no need to use draw.dll CallDll and does not work with a file DCLS, just enough to copy to the game directory and now this works, but in xp gives error because the library is for Windows 8.

What occurs to me is to try with an installer, if it detects Windows 8 install Draw.dll.


Kippykip(Posted 2013) [#96]
Add
global frameTimer=CreateTimer(60)
in the main program and add
WaitTimer(frameTimer)
in your main loop

This fixes the super fast windowed mode but doesn't fix fullscreen though
Microsoft said something like making Directx 7 on Windows 8 run at 30FPS in fullscreen


Yue(Posted 2014) [#97]
please where link ddraw.dll