R.I.P.

My dog just passed away this morning, due long and exhausting fight against cancer. It was very strong dog, 12 years old, and still had so much life in her, but unfortunately, she had many health problems, and there was no hope she would get better any soon, so we had to put her to sleep.

 

It was also very extraordinary, clever and humane dog, and she was like a sister to me. Ironically, I was 12 years old when she was born and we got her.

 

Anyway, this was my second and last dog, as she is irreplaceable, and I have many health problem too, so it's more likely that I will pass away sooner than the new pet, if I had one.

 

Besina

 

Rest in peace, my beloved friend... and hold on there, we will see each other again one day...

Categories: Background

DxEmu - Preview

Just to remind you, DxEmu (formely DDrawEmu), is the DirectDraw/X emulator I'm currently working on. I've managed to implement the OpenGL-based renderer, and here is first preview:

 

 

DxEmu Preview

 

It's only a two screenshots of main menu, but as you can see, it's running in windowed mode, which is one of the most requested mods for fullscreen-only games, like Arcanum :) It's also possible (thru config file) to force any windowed game to run in fullscreen, and force display resolution, window geometry, etc.

 

Now I'm going to implement support for palettes, color keys and other misc stuff. Hopefully, I'll have it finished before end of this week.

 

Edit: Open those screenshots in new window, if you want to see them in full resolution.

 

Categories: ArcanumAlive

A one huge "bug" in game Arcanum: Of Steamworks and Magick Obscura

As you probably already know, this game is using "standard" 256 color palettes, where every color is saved in X8R8G8B8 pixel format. What you probably also know, is that Arcanum is using DirectDraw for the rendering, and there is no support for windowed mode in Arcanum.

 

Anyway, I just found out that there are a huge design flaws regarding the color palettes and DirectDraw usage.

 

First of all, Arcanum isn't using IDirectDrawPalette interface at all, and all the color index to pixel conversions are done on CPU. This slows down whole level loading process, but that's still okay, no big deal.

 

Secondly, the game is running in 16bit fullscreen mode. Yes, you read that correctly, 16 bit color depth, not a 24bit! What does it means? It means, that 8 (or even 9 bits) are removed from every color from the color palletes in pixel format conversion, so the range of possible color shades is significantly reduced, from 16 777 216 to 65 536 (or even 32 768), thus the overall graphics quality is reduced significantly as well.

 

It's 16bit color depth, but it doesn't mean that it's R5G6B5 pixel format. The DirectDraw also supports X1R5G5G5 pixel format, and it's up to driver which pixel format it chooses for 16bit color depth.

 

Anyway, few year back, I made a mod for Arcanum, that forces the game to run in windowed mode, which was disabled in Arcanum in release version, because it wasn't finished and fully working feature.

 

What's surprising, is that when the game is running in windowed mode, there are no pixel format conversions, and game uses a full 24 bit color depth range. That's great, because it means that it's possible to force the Arcanum to run in 24 bit fullscreen mode.

 

If my time allows it, I'll fix this problem in January, and release it as .exe patch. I found this issue thanks to my DirectDraw emulator, and hopefully it will be useful for finding bugs in other games as well :)

Categories: ArcanumAlive

DirectDraw vs Old Games

Have you ever tried to play any DirectDraw based game on Win7? If you haven't experienced any visual glitches or even crashes, then you're a lucky guy, because those games often don't work on newer systems (Vista+).

Call me paranoid, but it's possible that the support for DirectDraw is going to be dropped completely in near future (Win8?), and provided compatibility modes often don't work as they're supposed, so it's on us - fans of those games - to fix all the problems, so we can enjoy playing those games forever and ever.

Anyway, why I'm talking about this? Recently, a friend of mine, has recommended me a game called Wing Commander. I was aware of this game, but I never played it before. So I decided to buy this game, third episode to be exact, as I didn't liked the graphics of previous episodes (judging from the screenshots).

What was surprising is that the game is running in DosBox. After a bit of searching, I've found out that it's mainly because of DirectDraw related problems.

What I also found is a webpage, which is dedicated to fixing DirectDraw related problems in the Wing Commander series. The author of that website - Jari Komppa (AKA sol), also wrote a library as replacement for DirectDraw, to fix all the problems.

I've noticed that the guy has already abandoned the development of that library, and made source code public, and because I really liked the idea of such library, as I also know a few games that don't work properly on Win7 (e.g. Arcanum and it's WorldEd), I've decided to continue with the development.

Well, I was very enthusiastic about it, until I looked at the source code. It was really hacky for my taste, and I didn't liked a lot of design-related decisions in it (I'm really such perfectionist :)).

 

So after that, I rather decided to write my own library, which will be able not only to log all the calls, parameters and other stuff, but it will be also able to redirect all calls to original library, so it'll serve also as proxy library. Most importantly, it will be also able to emulate all the DirectDraw features.


That was the plan, but after two weeks working on it (well, in free time only), the only thing I've managed to implement is - all the DirectDraw interfaces and it's versions  (i.e. DirectDraw/Surface/Clipper/Palette - 1-7) , proxy calls and functions/methods & parameters logging. It's kinda powerful tool already, but something important is missing...

 

What's missing? the emulation part :) on which I just started working. I chose Direct3D9 for the rendering and stuff, but if I manage to make everything working, I'll also add support for OpenGL, if needed.

 

Anyway, I'm testing the library on Arcanum, and you can see the debug output here: http://pastebin.me/2582666d95f3f39b81a49edb8d00aee0

 

Kinda cool, right? I call this library DDrawEmu :)

 

Categories: Projects

Long time no see...

It's been a while since I posted here... well almost 5 months :) I was really busy the whole time, and I also (almost completely) forgot about this blog, because of all that busyness.


Well, guess what... I'm still pretty busy, as I just started to work for two unnamed companies, so I got two jobs, and also I'll be preparing myself for final exams, for at least next 3 months, because I have to take the exams next semester (I can't delay them anymore, as I've already delayed them for 3 semesters).


Why I'm talking about this? Well, I've promised to post a long development report for the OpenArcanum project before the end of this year. Also, I've promised to fix the source code, and then release at least part of it.


Unfortunately, it seems that I won't be able to fulfill all these promises... so I'm really sorry guys! :(


I'll try my best to post at least something, however I was planning to post very detailed information about the engine, plans, and tasks, so it'll be nothing against what I was initially planning.


I wish I could split myself into two...


Categories: ArcanumAlive