Essence XWnd Shell[message #336288]
|
Sun, 28 September 2014 20:32
|
|
StaticZ |
|
Messages:27
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: Mon, 22 August 2022 23:56] Report message to a moderator
|
Private 1st Class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Essence XWnd Shell[message #336444]
|
Sat, 04 October 2014 00:10
|
|
StaticZ |
|
Messages:27
Registered:September 2014 Location: Russia |
|
|
RoWa21If 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 Report message to a moderator
|
Private 1st Class
|
|
|
|
Re: Essence XWnd Shell[message #336470]
|
Sun, 05 October 2014 16:11
|
|
StaticZ |
|
Messages:27
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 Report message to a moderator
|
Private 1st Class
|
|
|
|
|
|
|
|
|
|
|
|