Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » All about modding JA2 » Essence XWnd Shell
Essence XWnd Shell[message #336288] Sun, 28 September 2014 20:32 Go to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
"Essence XWnd Shell" aka ExShell is hook based application for force running old games (or ant other full screen applications) in windowed mode with different graphic filters (for example upscalers like 2xSaI). ExShell also provide some other abilities, like setting FPS limit or lowing CPU usage (see config for more details).


Tested with original JA2 version, mods 1.13 and Metavira, in theory must work with any JA2 version or moddification. In future will be comptible with most other games.


Supported filters at this moment: None, GrayScale, Simple (2x, 3x, 4x), Pixelate (2x, 3x, 4x), Scanlines (2x), ScanlinesTV (2x), MotionBlur (2x), 2xSaI (2x), SuperEagle (2x), Super2xSaI (2x), EPX (2x), AdMame (2x), LQ (2x), HQ (2x), XBRa (2x, 3x, 4x), XBRb (2x, 3x, 4x), XBRc (2x, 3x, 4x).


Change Log:

(2014.09.28) ver 0.01 rev 011 build 14271
------------------------------------------
* Intial realise


(2014.10.09) ver 0.02 rev 018 build 14282
------------------------------------------

* Fixed: FPS limit ignored after minimize\restore application
* Fixed: SuperEagle filter crashed application.
* Fixed: Related paths for $StartPEPath: don't work.
* Change startup initialization for more safety
* Change using instruction sets: MMX, SSE, SSE2, AVX
* Added: EPX upscale filter
* Added: info about selected filters and game mode in OSD
* Added: saving screenshots by PrntScr hotkey (Ctrl+PrntScr to save original image)
* Added: separating FPS limit for focused and unfocused application window
* Added: sending customise keyboard keys scancode at lose and get focus.
* Added: minor checks and validations





Download links:

[Updated on: Fri, 10 October 2014 06:58] by Moderator

Re: Essence XWnd Shell[message #336289] Sun, 28 September 2014 20:33 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
post reserved for future
Re: Essence XWnd Shell[message #336290] Sun, 28 September 2014 20:33 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
post reserved for future
Re: Essence XWnd Shell[message #336299] Sun, 28 September 2014 23:08 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
Differences beetween upscalers:

2xSimple:
http://download.uoquint.ru/ja2/filters/JA2_2xSimple.png

2xPixelate:
http://download.uoquint.ru/ja2/filters/JA2_2xPixelate.png

2xScanlines:
http://download.uoquint.ru/ja2/filters/JA2_2xScanlines.png

2xScanlinesTV:
http://download.uoquint.ru/ja2/filters/JA2_2xScanlinesTV.png

2xSaI:
http://download.uoquint.ru/ja2/filters/JA2_2xSaI.png

Super2xSaI:
http://download.uoquint.ru/ja2/filters/JA2_Super2xSaI.png

2xAdMame:
http://download.uoquint.ru/ja2/filters/JA2_2xAdMame.png

2xLQ:
http://download.uoquint.ru/ja2/filters/JA2_2xLQ.png

2xHQ:
http://download.uoquint.ru/ja2/filters/JA2_2xHQ.png

2xXBRa:
http://download.uoquint.ru/ja2/filters/JA2_2xXBRa.png

2xXBRb:
http://download.uoquint.ru/ja2/filters/JA2_2xXBRb.png

2xXBRc:
http://download.uoquint.ru/ja2/filters/JA2_2xXBRc.png

So as you see, XBR have small problems with transparency. Best of all with transparency give result 2xSaI. AdMame give more smooth screen and good reading text, but makes transparency less.
Re: Essence XWnd Shell[message #336302] Sun, 28 September 2014 23:44 Go to previous messageGo to next message
Slax

 
Messages:1438
Registered:July 2006
Location: People riding polar bears...
Does 3x-4x handle transparency any better?

Re: Essence XWnd Shell[message #336303] Sun, 28 September 2014 23:58 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
Sure, but scaling 640x480 for 4x you will get 2560x1920. I don't think you have such monitor. Scaling 640x480 for 3x will get 1920x1440, probably yes it can be used on 2560x1440 screen, but I think most prefer larger resolution especialy with 1.13 on such big screens )
Re: Essence XWnd Shell[message #336314] Mon, 29 September 2014 17:33 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
http://download.uoquint.ru/ja2/filters/JA2_2xXBRb.png

optimal ...

FOX - on the head reading better than other var.

(XBRb)

http://110.imagebam.com/download/LboX2qEJdVVgq1IKbFs2aw/35442/354411071/Untitled-1.jpg

[Updated on: Mon, 29 September 2014 17:38] by Moderator

Re: Essence XWnd Shell[message #336316] Mon, 29 September 2014 17:44 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
http://download.uoquint.ru/ja2/filters/JA2_2xLQ.png

vs

HQ - can't see difference, BUT smoothing of angles
is worse than in XBR ...

http://download.uoquint.ru/ja2/filters/JA2_2xXBRb.png


===
but .. for font ...(text) optimal use hq\lq ..

but only if put it filter on font as font is
independent layer in game ...

but probably it impossible ...

[Updated on: Mon, 29 September 2014 17:48] by Moderator

Re: Essence XWnd Shell[message #336317] Mon, 29 September 2014 17:57 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010

may be use tahoma or arial ? Smile

http://110.imagebam.com/download/cgsjA-uRUXbYozQlY6srwA/35442/354415689/Untitled-1.jpg

[Updated on: Mon, 29 September 2014 17:58] by Moderator

Re: Essence XWnd Shell[message #336318] Mon, 29 September 2014 18:31 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
Kirill
http://download.uoquint.ru/ja2/filters/JA2_2xLQ.png
but .. for font ...(text) optimal use hq\lq ..

but only if put it filter on font as font is
independent layer in game ...

but probably it impossible ...
Sure, first of all using twice such slow filters will be pain even for evry good hradware. Other problem is detecting this layer, and even we do this - game use color key for mixing 16 bit layers, and we will get good text for color key backgound. I.e. to mix such layers we will need to modify alpha chanel depending on fon't color for 32 bit images and then manualy combine such images. It's very very crazy concept to be implemented )



Kirill

may be use tahoma or arial ? Smile
there where generated, from wiki.

[Updated on: Mon, 29 September 2014 18:38] by Moderator

Re: Essence XWnd Shell[message #336322] Mon, 29 September 2014 21:41 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
How to inprove performance for rendering:

StaticZ

- Perfomance dependes first of all on game resolution and applying filters. So try to change them, you can disbale upscalers at all if you choose None filter. See redme for perfomance tests of filters (result was getted from my PC, results can differe on other hardware)
- Try to decreese FPS limit, many old games don't update screen often so even with 20-40 FPS you can see same as with 60+
- Turn off console and OSD that willn't give much, but will little increse perfomance.
- Also disable strectching for blitter will give litle increase performance, but not such large as disabling filters.
- If you are Win8 user, then possibly problem can be related with problems of compatibility DirectDraw on Win8. As I'm not win8 user I don't know much about this.

In any cases try and look on OSD to see curent value of FPS and CPU load (for most easy 100% means loading not all CPU, but only 1 core. As old games don't use severall CPU 100% is limit, if they can use sevaral CPU don't be surprised to see 200%). To make your game working good you need to get such options for recive CPU load below 80-100% with FPS that satisfy you.


Re: Essence XWnd Shell[message #336323] Mon, 29 September 2014 21:46 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
I use g-chrome for PDF & all now is ok with font ...

thanks ..

but better make some easy-loader - chose EXE & run ja2 with scaler ...

Smile)

for non-professional users ..
Smile)
Re: Essence XWnd Shell[message #336325] Mon, 29 September 2014 22:03 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
I really like the XBR filters, but they are unplayable on my laptop. The CPU load is about 99% and the framerate is between 5 and 10 frames (game screen resolution 640x480 upscaled to 1280x960). It seems you need a high end pc to get the game playable with the XBR filter...


Re: Essence XWnd Shell[message #336326] Mon, 29 September 2014 22:29 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
RoWa21
I really like the XBR filters, but they are unplayable on my laptop. The CPU load is about 99% and the framerate is between 5 and 10 frames (game screen resolution 640x480 upscaled to 1280x960). It seems you need a high end pc to get the game playable with the XBR filter...
Sure, but also important is that this filters not good coded. Such things must be written in assembler with using different exstensions like MMX and so on to work as fast as possible (just imagine that this code is working for procesing over 18,000,000 times each second for resolution 640x480). As for me I willn't rewrite it to assembler myself, but if someone knowns where can be get such code I will try to update it.

Other way is to use cuda but it will also require good video card and nvidio one )
Re: Essence XWnd Shell[message #336327] Mon, 29 September 2014 22:34 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
@StaticZ: is it possible to use the XBR filter without upscaling the resolution?


Re: Essence XWnd Shell[message #336331] Mon, 29 September 2014 23:11 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
@RoWa21: yes, with stretching it will downscale upscaled image. But as for now GDI blitter gave very bad result for downscale. As for XBR i'm not it's author and don't made it's implementation myself so i don't know much about it's theory maybe there are some algorithms that allows filter image without scaled. As i understand this resolution is rather wet, but I don't found any others...
Re: Essence XWnd Shell[message #336338] Tue, 30 September 2014 16:19 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
RoWa21
I really like the XBR filters, but they are unplayable on my laptop. The CPU load is about 99% and the framerate is between 5 and 10 frames (game screen resolution 640x480 upscaled to 1280x960). It seems you need a high end pc to get the game playable with the XBR filter...


or CUDA optimization ... Smile

or other like mmx\sse instructions set ...


yes XBR is good ... but VERY high load of CPU .. & don't support multi-core ...


____
Re: Essence XWnd Shell[message #336339] Tue, 30 September 2014 16:23 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
RoWa21
@StaticZ: is it possible to use the XBR filter
without upscaling the resolution?


As I know - you don't get any progress in image quality if
use less than 2x scale or more ..

this is main base in any scalers ...
Re: Essence XWnd Shell[message #336350] Tue, 30 September 2014 21:28 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010

http://112.imagebam.com/download/5yH-ZQBP0fZ5z4dE_x6g2g/35478/354772132/Untitled-1.png

no native support of 960*540 ?!

only 960*600 in custom mode ?!

for real 1920*1080 need 960*540 ... no 600 !
Re: Essence XWnd Shell[message #336432] Fri, 03 October 2014 13:24 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
@all: I just added the "ExShell" to the svn development GameDir.


Re: Essence XWnd Shell[message #336437] Fri, 03 October 2014 19:09 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
RoWa21
@all: I just added the "ExShell" to the svn development GameDir.


big thanks !!


please add native support of 960*540 in EXE for normal scaling in 2x to 1920*1080 !!


960*540 work in window mode but not in full-screen.


*Scaler need full-screen mod for run & work....
Re: Essence XWnd Shell[message #336439] Fri, 03 October 2014 20:27 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
Kirill
RoWa21
@all: I just added the "ExShell" to the svn development GameDir.


big thanks !!


please add native support of 960*540 in EXE for normal scaling in 2x to 1920*1080 !!


960*540 work in window mode but not in full-screen.


*Scaler need full-screen mod for run & work....


If 960x540 does not work in Fullscreen, but in Windowed mode, than the there is nothing I can do. Some special resolutions do not work in Fullscreen by the Drawing-Engine JA2 uses.


Re: Essence XWnd Shell[message #336444] Sat, 04 October 2014 00:10 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
RoWa21
If 960x540 does not work in Fullscreen, but in Windowed mode, than the there is nothing I can do. Some special resolutions do not work in Fullscreen by the Drawing-Engine JA2 uses.
Why? I can understand why it don't work in fullscreen mode as it's not supported resolution for devices, but EXShell don't allow application to run in fullscreen mode, when it asked for fullscreen mode it says to game OK, but change request for windowed mode, and when it asks screen surface it give offscreen surface, so any resolution can be used with EXShell, even that doesn't exists and can't work in fullscreen mode.

The main problem is that in code resolution is limited (sgp.cpp line: 1617):

<?php
case _CustomRes:

iResX max( (int)oProps.getIntProperty(L"Ja2 Settings"L"CUSTOM_SCREEN_RESOLUTION_X", -1), 800 );
iResY max( (int)oProps.getIntProperty(L"Ja2 Settings"L"CUSTOM_SCREEN_RESOLUTION_Y", -1), 600 );
if ( 
iResX 1024 || iResY 768 )
{
    
// Buggler: hack to use 800x600 interface
    
iResolution _1280x720;
}
break;
?>


So in fact when you set 960x540 it changing to 960x600

[Updated on: Sat, 04 October 2014 00:12] by Moderator

Re: Essence XWnd Shell[message #336452] Sat, 04 October 2014 11:45 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
ok, I will check the source again and see if we can support the resolution.

EDIT: I added the new resolution to the development source trunk and the stable trunk. I also updated the ini editor in the svn gamedir.

[Updated on: Sat, 04 October 2014 18:56] by Moderator



Re: Essence XWnd Shell[message #336470] Sun, 05 October 2014 16:11 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
I need some help - I whant to use optimized MMX implementation for 2xSai, SuperEagle, Super2xSai upscalers that is written in assembler to make them faster. Unfortunately I have no experience with asm and don't found any information how to use and compile this code. The author of this algorithm gave very dirty sources it looks like C\C++ part of them is outdate and don't update for a long time (it even don't use Super2xSai asm code that seems was added later), besides they even can't be compiled as they used some code from other projects (alegro). As I understand upscaler was written for ZSNES project, but even there they used differ code without alegro and not latest version.

Any way as you can see withthout MMX optimisation all works fine, so the problem in fact how to use asm code. As for C\C++ part it's even easy then whithout MMX - we just call 1 function for each line of ower image. But her begins problems: DirectDraw Flip method always return error DDERR_SURFACEBUSY (0x887601AE), sure all surfaces are offscreen and located in system memory. It looks like this code ither tryes to work parralel or cause some problems with memory managment, possibly it can be realated with stack errors throw calling this code... So this are my quastions:

1. How to compile this code? I used this options:
nasm.exe -O0 -D__DJGPP__ -Xvc -f win32 -o "2xSaImmx.obj"  --  2xSaImmx.asm


Again, original code can't be compiled as few definitions are missed (I'm note sure that it's valid, but looking throw ZSNES sources and previos versions of ASM code it seems me correct):
%imacro NEWSYM 1
%ifdef __DJGPP__
GLOBAL __%1
__%1:
%else
GLOBAL _%1
_%1:
%1:
%endif
%endmacro


Then I make static library from *.obj that is added to linker:
lib /out:2xSaImmx.lib 2xSaImmx.obj


2. What does __DJGPP__ definition do? I suppose that it required for Windows ("-f win32") code, and not required for Linux ("-f elf"). Is it right?

3. What declaration is used in expoting functions? __cdecl or not? I tried otheres (__stdcall, __fastcall) and got linker errors, but I whant be sure in this.

4. And main thing that cause problems are methods arguments, as I undertand they are (again as for me it looks correct, but I'm not sure in this):
1: (Uint8*) Src DIB array
2: (Uint8*) Buffer DIB array (same size of source visible area)
3: (Uint32) Src DIB Pitch
4: (Uint32) Src width in pixels
5: (Uint32) Dst DIB array
6: (Uint32) Dst Pitch
7: (Uint16) Dst Segment ?? (only use with djgpp).


5. As 5th argument isn't pointer and called offset, I doubt is this pointer or some offset from other pointer?

6. But most crazy make me last argument - "Dst Segment", what is this? I have no any idea. Maybe it means memory page segments?


I tried to found some examples, but all projects ither not use MMX optimisation ither are focused on Linux platform and other compilers and often, like ZSNES, are ASM hell (i.e. all this is called throw other asm code).

ZSNES code: http://sourceforge.net/projects/zsnes/
2xSai latest code: http://vdnoort.home.xs4all.nl/emulation/2xsai/

(I'm using latest version from original site).

[Updated on: Sun, 05 October 2014 16:28] by Moderator

Re: Essence XWnd Shell[message #336479] Mon, 06 October 2014 17:07 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
RoWa21
ok, I will check the source again and see if we can support the resolution.

EDIT: I added the new resolution to the development source trunk and the stable trunk. I also updated the ini editor in the svn gamedir.


good !!!

now 960x540 work with scaler ?


can you post here EXE & ini file ?
for testing ...

thanks for work !!!
Re: Essence XWnd Shell[message #336527] Thu, 09 October 2014 20:52 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010

4\6\8k res on standard HD monitor -

http://www.neogaf.com/forum/showthread.php?t=509076


___
Re: Essence XWnd Shell[message #336529] Thu, 09 October 2014 21:15 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
New version available - 0.02(018.14282):
Quote:

[Updated on: Fri, 10 October 2014 06:57] by Moderator

Re: Essence XWnd Shell[message #336577] Sat, 11 October 2014 19:33 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
@StaticZ: Thanks for the update. I just added it to the svn development GameDir.


Re: Essence XWnd Shell[message #336699] Wed, 15 October 2014 15:44 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
StaticZ
New version available - 0.02(018.14282):
Quote:

Re: Essence XWnd Shell[message #337304] Tue, 28 October 2014 18:31 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
0.03

with no AVX support for old-processors like core-duo ?

any news ?

Smile

[Updated on: Sat, 01 November 2014 19:21] by Moderator

Re: Essence XWnd Shell[message #337835] Wed, 19 November 2014 04:40 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010


===
bug .. - game detect 960*540 as 640*480 - & write that new inventory don't work,

& not want to load save ...


new inventory can work with 540 pix or need 600 min ?
Re: Essence XWnd Shell[message #337864] Thu, 20 November 2014 07:21 Go to previous messageGo to next message
RoWa21

 
Messages:2046
Registered:October 2005
Location: Austria
Kirill


===
bug .. - game detect 960*540 as 640*480 - & write that new inventory don't work,

& not want to load save ...


new inventory can work with 540 pix or need 600 min ?


You have to update your ja2.ini. There are new resolutions added.


Re: Essence XWnd Shell[message #337877] Thu, 20 November 2014 17:54 Go to previous messageGo to next message
StaticZ

 
Messages:28
Registered:September 2014
Location: Russia
Kirill
new inventory can work with 540 pix or need 600 min ?
No... By the way is it possible to make old inventory with new weapon attachments?

Other bug - in 960*540 - possible to change party size more then 6 mercs, thow it can't correct show all of them. And is it hard to make ability change this option not at creating new game? it's not nice when you can't continue your game on other resolution...
Re: Essence XWnd Shell[message #338945 is a reply to message #337877] Mon, 12 January 2015 12:18 Go to previous messageGo to next message
silversurfer

 
Messages:2112
Registered:May 2009
exshell.exe is reported as Trojan/Malware by several anti virus products. What does this file do to be categorized as such?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Essence XWnd Shell[message #338947 is a reply to message #338945] Mon, 12 January 2015 12:55 Go to previous message
Shanga

 
Messages:3512
Registered:January 2000
Location: Danubia
silversurfer wrote on Mon, 12 January 2015 12:18
exshell.exe is reported as Trojan/Malware by several anti virus products. What does this file do to be categorized as such?


Any runtime hooks will be classified as malware, because they attach to a running process and modify it. That's what some viruses do, too. The end-result is different though (hopefully).

[Updated on: Mon, 12 January 2015 12:56]



Previous Topic: FAQ: How to get your mod featured on BP frontpage
Next Topic: Glossary of JA terms & abbreviations
Goto Forum:
  


Current Time: Sat Jun 24 06:37:39 EEST 2017

Total time taken to generate the page: 0.01019 seconds