Blitz Basic with Windows 10, hiccup running BB

Archives Forums/Win32 Discussion/Blitz Basic with Windows 10, hiccup running BB

c h i e f y(Posted 2015) [#1]
you would think that any Blitz Basic program (compiled) would run without problem in Windows 10, NO!

Upon running the Blitz Basic programme I was immediately informed I need a windows app to do that Direct Play which was an annoying five minutes of downloading/ installing/ restarting/ installing /configuring - didn't see that coming!

but glad to say after getting this "app" Blitz Basic runs fine in W10


therevills(Posted 2015) [#2]
Which Blitz Basic did you get this with? Blitz3D, BlitzPlus or Blitz MAX?


c h i e f y(Posted 2015) [#3]
2D BB I believe


Floyd(Posted 2015) [#4]
BlitzBasic is fifteen years old and DirectPlay was deprecated about a decade ago. It's surprising that the fix was this simple.


Yasha(Posted 2015) [#5]
Yeah this applies to Blitz3D and BlitzPlus. It will kick in for your users as well, but it's a once-per-machine activation. If you're lucky people who play older games might already have it.

Chances are you aren't using the feature anyway (it seems to have been the least popular of the networking options), so hopefully your work will be unaffected by any deprecations within the library itself.


What's more worrying is if you had to manually download and install/configure it yourself (that's a big nuisance barrier for your users, if they experience the same). It's a system component; it's supposed to take care of itself without you needing to do anything except agree to the popup. Shouldn't need a restart or anything.


c h i e f y(Posted 2015) [#6]
Yasha it was a case of clicking on "GO AHEAD" sort of thing, wasn't a "manual download" more of an "auto download" but looking for you to "OK" it first- it needed 2 restarts while it all configured and now it takes something approaching twice as long to boot the computer from power off but as it originally took only 1 minute anyway doubling that to 2 minutes is no big shakes


Rick Nasher(Posted 2015) [#7]
I had the same thing indeed: a popup stating I had to install DirectPlay, I clicked OK and installed by itself. Was more like a 1 minute thing at my side though.


BlitzSupport(Posted 2015) [#8]
Cool, not tried on '10 yet.

Just realised while copying some ancient DVDs to hard drive that it's fifteen years since Blitz Basic PC was released, as Floyd has pointed out!

I should have posted, once again, Mark's old worklog back in May. (Start at the bottom.)

More Blitz web-nostalgia here...

Interesting point: Old BB exes from my early-2000s archives don't seem to run here on 7 anymore, giving an illegal memory access error ("Memory access violation"), yet when I recompile their source (where available), they work perfectly. Wonder what's happening there...


Floyd(Posted 2015) [#9]
Data execution prevention?


xlsior(Posted 2015) [#10]
Interesting point: Old BB exes from my early-2000s archives don't seem to run here on 7 anymore, giving an illegal memory access error ("Memory access violation"), yet when I recompile their source (where available), they work perfectly. Wonder what's happening there...


"Data execution prevention" is a hardware feature or processor chips launched years ago, and enabled by default in Windows at some point, which prevents programs from launching executable code from memory blocks not explicitly allocated as containing executable code -- it's a protection method that helps prevent malicious programs from exploiting memory buffer overflow bugs in random programs. Even if malware manages to write executable code into memory somewhere, DEP makes it a lot harder for the computer to 'accidentally' execute and activate that code.

The older versions of Blitzbasic/Blitzplus/B3D didnt' follow all those rules, so Windows' built-in DEP prevention would keep them from working properly. At one point BRL released an update to their compilers to follow the DEP rules, and the errors went away. (for B3D, that was version 1.88 and up -- code compiled with 1.87 or below likely won't work anymore on most computers)

If you DO have an ancient program that's not DEP compatible, you can make an exception in the windows DEP configuration to tell it not to enforce DEP for tht particular executable. computer properties -> Advanced Settings -> Performance -> Settings -> Data Execution Prevention -> "Turn on DEP for all programs and services except those I select"


BlitzSupport(Posted 2015) [#11]
Good call, guys! I've finally, after 10+ years, rediscovered an old Blitz3D game demo I really loved (the one where you control a dragon, burning villagers, trees, etc, if anyone remembers it).

It was failing to get beyond the memory access violation, but having added to the DEP-ignore list, it now at least opens a screen, but, dang it, then gives another memory access violation... grrr! Must... play... again...


Floyd(Posted 2015) [#12]
Try setting compatibility mode to something old, like Win98.

Does it try to write anything to disk? When you copy from CD/DVD everything may get set set to read-only, even folders. I've been bitten by that one.

But in that case you wouldn't be able to compile old code, assuming the exe goes to the presumably read-only folder. Might be worth a try anyway. I've gotten extra error info about missing images etc. after changing compatibility.


BlitzSupport(Posted 2015) [#13]
Thanks, Floyd -- still no joy with compatibility settings, unfortunately. The files do seem to be copied off the disks with read/write settings these days, so none of them are read-only. It does actually re-write a settings file if it doesn't like what it's found, so the program does 'work'.

Guessing it's down to either display mode or media, but you'd think the latter wouldn't be a problem, given it's all there and it worked once upon a time!

Might have to look at Wine or some other virtual solution -- doesn't work in my XP guest on VirtualBox, but that could just be down to VirtualBox's 3D driver... :/


Floyd(Posted 2015) [#14]
If you feel like doing more investigating maybe you could install a really old Blitz3D and see how that works. The ones archived here in the product updates only go back to 1.85 but you must have older ones.

Installing the oldest might be a challenge. Here's what I had to do with original Blitz Basic.


Rick Nasher(Posted 2015) [#15]
Sounds cool BlitzSupport, burning villagers and all that. Would love to fry a few. :-)


xlsior(Posted 2015) [#16]
Another potential problem is that Windows no longer let's programs create additional files inside the c:/program Files folders after install time - if you haven't already, try sticking it in a folder without that restriction, e.g. C:/game or something.


BlitzSupport(Posted 2015) [#17]
Thanks, all... still no joy so far, though! (Good call on UAC, xlsior, and I've tried B3D 1.64, Floyd, which didn't work even when running from source, but I suppose that's another can of worms, and it looked like a beta version, too).

Been trying to install XP on my PC for real, but that turns out to be way harder than you could possibly imagine these days! (64-bit, SATA drivers, running non-SATA HD from PCI board, etc.)

None of the virtual machines seem to support DX7 (dxdiag tells you the DX7 tests failed, while DX9 and co pass), so I think a real machine is the only option now.

I wonder if this is why some people have appeared to 'whine' about Blitz3D not working on modern OSes, while others of us have no problems at all -- ie. we're either running source from Blitz3D 1.88+, or running applications built in 1.88+, whereas applications built in < 1.88 fail.

Still not quite sure why the latter would fail, given we can apparently bypass DEP problems...


xlsior(Posted 2015) [#18]
Thanks, all... still no joy so far, though! (Good call on UAC, xlsior, and I've tried B3D 1.64, Floyd, which didn't work even when running from source, but I suppose that's another can of worms, and it looked like a beta version, too).

Been trying to install XP on my PC for real, but that turns out to be way harder than you could possibly imagine these days! (64-bit, SATA drivers, running non-SATA HD from PCI board, etc.)

None of the virtual machines seem to support DX7 (dxdiag tells you the DX7 tests failed, while DX9 and co pass), so I think a real machine is the only option now.


Some of the virtual machine solutions do support 3D acceleration, which you may need to explicitly enable in their settings for it to work inside the VM.

Another potential way to figure out what's causing random crashes: Try sysinternal's "procmon". It allows you to monitor any filesystem access, so it the executable is trying to load additional files that don't exist you can see the name and location where it's looking, and possibly fix it. It also shows you write failures and such which may help troubleshoot.
By default it shows pretty much everything that happens on disk/network/registry/etc for all running apps, so you probably need to add some runtime filters to restrict to just the relevant info.


BlitzSupport(Posted 2015) [#19]

Some of the virtual machine solutions do support 3D acceleration, which you may need to explicitly enable in their settings for it to work inside the VM


No, that's what I meant by None of the virtual machines seem to support DX7 (dxdiag tells you the DX7 tests failed, while DX9 and co pass) -- I'd enabled 3D acceleration, but the VirtualBox drivers run the dxdiag DX9+ tests no problem, while the DX7 tests fail. They also show as unaccelerated, unlike DX9+.

I checked a VM 3D compatibility list on Wikipedia, and all of them support only DX9 and above -- I suppose the VM drivers just don't include the DX7 backwards-compatibility.

Good point about Procmon, not really thought about trying the kind of thing... will give it a try, but I'm pretty sure this is going to need a 'real' XP machine with DX7 drivers... :/


Floyd(Posted 2015) [#20]
I tried Dependency Walker on my properly working Blitz3D 1.108, running on Windows 7 64-bit. The only result was to remind me how little I really know about Windows.

The output is ENORMOUS, a seeming endless tree of called things, which in turn call other things...

There were even nine missing DLLs reported, all with names beginning API-MS-WIN.
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL is a typical example.

Googling brought little enlightenment other than the general advice that these can be ignored.

This started with vague memories of ( I think ) BlitzMax at some point needing an updated C runtime for some experimental feature. I wondered what Blitz3D was using, thinking I might investigate an old version. As a first step I analyzed my current version and quickly decided I was unlikely to figure out anything.


Yue(Posted 2015) [#21]
I Download the DirectPlay in less than a minute and was installed correctly , no problem.

My question is, where the DirectxPlay downloaded for Windows 10 to install offline ?


Yue(Posted 2015) [#22]
https://msdn.microsoft.com/en-us/library/windows/desktop/bb153243(v=vs.85).aspx


DirectPlay
Warning: Microsoft DirectPlay has been deprecated. Deprecated components of Microsoft DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
The DirectPlay application programming interface (API) provides developers with the tools to develop multiplayer applications such as games or chat clients. For simplicity, this documentation will refer to all such applications as "games." A multiplayer application has two basic characteristics:
Two or more individual users, each with a game client on their computer.
Network links that enable the users' computers to communicate with each other, perhaps through a centralized server.
DirectPlay provides a layer that largely isolates your application from the underlying network. For most purposes, your application can just use the DirectPlay API, and enable DirectPlay to handle the details of network communication. DirectPlay provides many features that simplify the process of implementing many aspects of a multiplayer application, including:
Creating and managing both peer-to-peer and client/server sessions
Managing users and groups within a session
Managing messaging between the members of a session over different network links and varying network conditions
Enabling applications to interact with lobbies
Enabling users to communicate with each other by voice
This documentation provides a high-level overview of the capabilities of DirectPlay. Subsequent sections will take you into the details of how to use DirectPlay in your multiplayer game.
For more information, see the Microsoft.DirectX.DirectPlay managed code reference documentation.


_PJ_(Posted 2015) [#23]
B3D has calls to the DirectPlay functionality built-in, since when released and subsequently, DirectPlay was still integral to DirectX and Microsoft supported full backwards compatibility with DirectX versions.

Fortunately, the support remains for DirectPlay in the form of this small additional download, but it may be removed entirely in future which can render all B3D products useless.

There may be possibility that the DirectPlay addition may be released as a redistributional format, but that's unlikely.

Those who are "in the know" may be able to edit the B3D source code to simply remove the DirectPlay functionality altogether, which may be a preferred option...


Yue(Posted 2015) [#24]
There is possible to create a DLL library that DirectPlay off in Blitz3D ?


Rick Nasher(Posted 2015) [#25]
As DirectPlay has been fazed out, is there a replacement functionality in DX? If so, how do we address that?

What commands would need to be in a future version of Blitz3d to make it work in a similar way? Does Anybody know?


_PJ_(Posted 2015) [#26]
Rick, in short there is no DirectPlay anymore. It's not replaced.

The functionlaity is essentially present through the networking commands but will require much more work to program.
Alternatively some DNA or Winsock wrapper may be a possibility.

The biggest issue for users of B3D is that once there is no more DirectPlay libraries available at all, I.e the current extraneous download of this topic is finally removed from circulation- then nor only will B3D be unuseable but any pre-ordercompiled executables too will fail.


Rick Nasher(Posted 2015) [#27]
Hmm, that sucks bigtime.


Yue(Posted 2015) [#28]



If DirectPlay is disabled, Blitz3D executables do not work , I think it's the end of Blitz3D .


skidracer(Posted 2015) [#29]
I don't understand, why would anyone disable Direct Play??? If YOU have decided Blitz3D is dead then perhaps it is time for you to move on?

Wow BlitzPlay is now opt-in, wow Blitz3D works flawlessly on Windows 10. I do have problem understanding nihilist posting in this thread.


it needed 2 restarts while it all configured and now it takes something approaching twice as long to boot the computer from power off but as it originally took only 1 minute anyway doubling that to 2 minutes is no big shakes



Wow chiefy, are you proud of your PC performance? My $400 laptop takes less than 4 seconds to boot Windows 10.


Yue(Posted 2015) [#30]
Sorry, I use a translator from Spanish to English and this sometimes does not help me much .


What I mean is that the evidence imply that Blitz3D not work without DirectPlay , and the possibilities as I understand is that desd eel code algorithms can be removed that reference DirectPlay , because without this could possibly work if in the future Microsoft no and it provides support.


Rick Nasher(Posted 2015) [#31]
Hmm, maybe. Let's hope Microsoft does not do such a stupid horrid thing as it will probably cripple a whole lot of other software out there.
Nevertheless, perhaps someone capable of doing so(for instance Ploppy) can remove it from the original code. So that it won't be a requirement anymore for Blitz to work.

Pre-requisites aren't that bad and uncommon for games though, as long as it easy to install them for the user it's all good.


*(Posted 2015) [#32]
Well they work for now with the nag option done, maybe just have a please click yes at the nag screen and running a small exe that kicks win10's installer into gear. If its done in the install section people will be more forgiving.


Yasha(Posted 2015) [#33]
Let's hope Microsoft does not do such a stupid horrid thing as it will probably cripple a whole lot of other software out there


Imma be honest, I really do not understand the fatalism and fascination with the idea that everything is about to end! on this forum.

Microsoft's entire business model is built on making sure software from twenty years previous still works without changes. They fall over themselves to add compatibility modes and emulation layers wherever possible. You notice how it's 2015 and there's still no sign of DirectX7 ever going away? There is literally zero precedent for Microsoft killing off old software like this.

I actually checked recently (well, while doing something else) and this particular feature didn't even need an active internet connection to install itself.


Yue(Posted 2015) [#34]
I am an amateur, it's just that I'm not a programmer, in this case I am ignorant, sorry.


fox95871(Posted 2015) [#35]
I just ran a Blitz3d program on my new computer for the first time, and it said something like "DirectPlay required, do you want to install it now?" which I did, and now it works. I have a Lenovo ideapad, the red two hundred dollar model from around fall 2015. So it looks like this was fixed despite the pseudo auto unstall, anyone else having trouble running Blitz3d games? Also, a better explanation of the memory access violation thing would be greatly appreciated. What games are affected and why? I went from panic to calm in about five seconds reading your post by the way, Yasha.


BlitzSupport(Posted 2015) [#36]
For what it's worth, I actually got the game demo working in the end -- by emailing the author and him still happening to have the 10+ yr old source code around! Turned out to be a LoadSprite flag that needed tweaking in the code... guessing the defaults changed at some point...


Floyd(Posted 2015) [#37]
... guessing the defaults changed at some point...

That's a sneaky one. I remember back in the early days of BlitzPlus the Flip command changed the default as to whether it waited for VSync.

In fact I've often seen this sort of thing over the years. Some programmers seem to use an excessively "verbose" style, specifying things that are already the default. They consider it future proofing.


BlitzSupport(Posted 2015) [#38]
I seem to recall it needed a '1' flag ("Color") to be added to CreateSprite, and it crashed without it. You could be right about needlessly specifying the defaults, though that could also have been down to having to set one of the [,optional] flags and therefore having to fill in those that came before it, as in MakeGame (thing, [,stuff] [,nonsense]) when you need to specify [,nonsense].

I even tried a simple test program calling it the same way it had been called in the source and it worked without the Color flag, so must have been down to some subtle combination of what had gone before in the game's setup, and possibly within DX7, since it used to work, way back when...