Page 2 of 2

Re: CSB potential update

Posted: Wed Aug 23, 2017 6:52 am
by Sphenx
Same for XP, strange for Win 7 : I get "CSBWin has stopped working" right from the start (Debugger's stack tells it fails on NTDLL)

Re: CSB potential update

Posted: Wed Aug 23, 2017 9:32 am
by Ryan
I used Visual Studio 2017 with the Windows 10 SDK to build it. It definitely won't run in XP. There's no Direct2D in XP, plus need to set Visual Studio to the XP version of the platform tools.

d2d1_1.h is the Direct2D header. Direct2D is available in Windows 7 with the platform update (it was released four years ago).

What version of Visual Studio did you try to build it with?

Re: CSB potential update

Posted: Thu Aug 24, 2017 10:33 am
by cowsmanaut
Just in case anyone is confused.. I haven't been doing the code. Ryan has.. I was just posting for him, because it was more convenient for him at the time.

Re: CSB potential update

Posted: Fri Aug 25, 2017 12:35 am
by Sphenx
Hello Ryan and welcome.
I started with the basis version for CSBWin : MSVC++6. Then tried with VS 2008 and VS 2015 but can't open the solution/project.
Then ... I am now facing again the insanely ridiculous VS 2017 installer :( Took 99% CPU and 10 minutes to reckon I need 6+ GiB to get the C++ environment. I shall try that this week-end.

Re: CSB potential update

Posted: Fri Aug 25, 2017 1:33 am
by Ryan
Haha, the welcome sounds funny as I've been here for ages. After the server move Cowsmo deleted my account while trying to fix it, so my post count was reset. I also don't post much and usually just indirectly post through Cowsmo :)

Yea, the VS 2017 install isn't trivial. The 2015 and 2013 ones were monsters also, but at least now you can complain to them on Reddit and they actually listen and answer back right away! You only need the 'Desktop development with C++' component and the Windows 10 SDK. Just be glad you don't need to install 'Universal Windows Platform development' as that'll install all of the C# and .Net stuff as they haven't separated out C++ yet (they say they will by the end of the year with C++\WinRT).

At least you can download it for free! The other nice part is that with VS 2017 you can use the latest C++ features.

Re: CSB potential update

Posted: Fri Aug 25, 2017 1:47 am
by Sophia
Welcome back Ryan. :mrgreen:

(At least, back to posting directly... or whatever!)

Re: CSB potential update

Posted: Fri Aug 25, 2017 7:17 am
by Sphenx
After the server move Cowsmo deleted my account while trying to fix it, so my post count was reset.
Just in case anyone is confused..
Yes I have been :D :lol:

Now, as Cowsmanaut mentioned the Surface 3 (Win RT ?), I don't actually know what is the minimal requirement IDE for compiling an exe for it ?
Is VS 2017 necessary for that ? Is there a way to make the project buildable under an older version of the IDE ?
I guess that we can also adapt for making the VC++6 project to compile without Direct2D thus still able to build the legacy Win version.

Re: CSB potential update

Posted: Fri Aug 25, 2017 8:19 am
by Ryan
WinRT is the API for UWP (Universal Windows Platform) apps (like the ones that are in the Windows store, and run on XBox and Windows Phone). It's totally separate from regular win32 desktop apps. It wouldn't be too difficult to make CSBWin into a UWP app, but that wasn't something I planned on doing. There are no HWNDs in UWP, or GDI. Is that what you meant?

The Direct2D changes I made are easy to revert, but then you're stuck with the slow GDI functions. The old versions of CSBWin will stay XP compatible, I thought it'd be nice to make it run nicer on Windows 7+. XP is closer in time to the original Dungeon Master release than it is to today!

Re: CSB potential update

Posted: Fri Aug 25, 2017 8:12 pm
by Sphenx
I understand you then built a Win 10 version that can also work on Surface 3, and on older Win 7, is that right ? -- except it doesn't work on Win 7 for me; this is one reason I want to build it myself to check.

Additions are nice and I am certainly not against, quite the contrary. I would rather take the opportunity you've put code on git to leverage the different possibilities we've seen in the past : integrate into one place the modern version, the legacy version, the linux one, maybe Rasmus 3D version ... and similarly do the same for skwin (dm2), why not ?

Re: CSB potential update

Posted: Fri Aug 25, 2017 8:43 pm
by Ryan
Did you install all of the platform updates on your Windows 7? (https://www.microsoft.com/en-us/downloa ... x?id=36805) I can't remember if it was an automatic update but you can always just do a search to see if 'd2d1.dll' is somewhere in your windows directory. That's my first guess as to why it won't run on yours.

I think GitHub is great for making branches of code, so you can always keep the Windows 9x compatible one as a separate branch and backport any changes that work on all systems.

Another issue is what compiler it'll compile on, VC 2017 supports C++14/C++17. I've locally put in some constexpr changes that won't compile on older compilers. I don't really have a need to submit those changes, but things can be simplified a lot with the newer C++ features.

Re: CSB potential update

Posted: Sat Aug 26, 2017 3:48 pm
by Sphenx
I've found d2d1.dll on my Win 7 system.

At least I've made some progress.
I rebuilt the solution from VS 2017 running on Win 7 (64 bit), switching back Win SDK to 10.0.15063.0 (was 8.1 by default), specifically using C++17 as you told, and also setting back predefines _MSVC_INTEL and RGB555 (or RGB655) for the x64 build. I needed all these changes to compile and build properly.
I've built x86 and x64 versions, none of them work on my Win 7 system; only the x86 one works on my Win 10 system.
I don't know yet where is the problem.

Re: CSB potential update

Posted: Sat Aug 26, 2017 8:40 pm
by cowsmanaut
I'm using win7 home premium which has been updated within the last several months (I'm a bit behind but certainly not more than a year)
DX11 is installed and the "d2d1.dll" file is located on my drive deep within the windows folder.
I have installed games and 3D apps which may have updated other things.. (maya, zbrush, steam games.. )

Not sure if that helps.. but that's my system and it runs his last build without issue. Perhaps Ryan has some other insights..

Re: CSB potential update

Posted: Sat Aug 26, 2017 11:52 pm
by Ryan
Oops, I didn't notice I left the 'Windows SDK Version' at 8.1. That must have been what it defaulted to. I have three versions of Visual Studio installed, so that might have been the cause of that.

It won't run on x64, since the DM code does int->pointer conversions. It will compile, but it'll crash in the DM code pretty fast. Looks like I didn't setup any of the preprocessor defines for it. We'd need to ask Paul if he has any thoughts on that, since he knows the assumptions made in the code.

To figure out why it doesn't run, did you look in the event logs? In the 'Windows Logs->Application' you should see an 'Application Error' with more details. It's the same info that older OS's used to show, but hidden now to be less scary I guess. Just saying in case you didn't know.

Re: CSB potential update

Posted: Sun Aug 27, 2017 5:18 am
by Paul Stevens
It won't run on x64
Just to be clear. I think it will run fine on
an X64 system so long as it is compiled
as a 32-bit program. But you cannot compile it as
an x64 application and expect it to run because
the code relies on pointers being 32 bits.

Re: CSB potential update

Posted: Sun Aug 27, 2017 5:29 am
by Ryan
Yeah, I was replying to Sphenx having compiled it as x64 and it not working. I should have said an 'x64 compiled version won't work'.

Paul, do you think it's possible to change the pointer types from int32_t to a pointer type?

Re: CSB potential update

Posted: Sun Aug 27, 2017 6:17 am
by Paul Stevens
Ryan wrote:possible to change the pointer types
Yes. I think you are capable of it. Good luck and
let us know when you have it well tested.

What a tremendous amount of work for trivial
gain.

Wouldn't you be better off starting with DSB?
You are working with code written for a 8 MHz
68000 with 512K (K !) bytes of memory.

Re: CSB potential update

Posted: Sun Aug 27, 2017 9:53 am
by Sphenx
I can't find anything interesting in the logs.

Could you please have a try with that build ? and run it either on Win 7 and Win 10 ?
http://dmbuilder.sphenxmusics.fr/extern ... 26_spx.zip

It it works well for you, that would mean I have something different on my Win 7 system that prevents it to work.

Note:
The exe I've produced is 765 952 bytes against yours of 773 632 bytes.

Re: CSB potential update

Posted: Sun Aug 27, 2017 10:08 am
by cowsmanaut
Works on my win7 desktop just fine.

Re: CSB potential update

Posted: Mon Aug 28, 2017 5:25 am
by Paul Stevens
That executable works fine for me on Win 10 - 64bit.

Re: CSB potential update

Posted: Tue Aug 29, 2017 10:20 pm
by cowsmanaut
Any luck getting it to run yet Sphenx?

Re: CSB potential update

Posted: Wed Aug 30, 2017 7:33 am
by Sphenx
I am still at the same point : I can't run it on Win 7, but it runs correctly on Win 10. Definitively something on my system, it might take me some time to find out what is the cause.
At least I'm statisfied I can build a working exe as Ryan did.

Re: CSB potential update

Posted: Wed Mar 28, 2018 3:29 pm
by zeech
Hello, how is this project going? I was excited to see it, as I wanted something with window scaling and faster mouse updates! Thanks so much for doing this :D
Is this version the latest exe?

https://drive.google.com/file/d/0B0aV40 ... sp=sharing