ptitSeb / Eldritch

Eldritch port to the OpenPandora (meaning Arm / GLES2 / OpenAL): Status Working (with latest data file from Steam)
https://boards.openpandora.org/topic/18323-eldritch/
Other
4 stars 2 forks source link

amigaos4 build #1

Closed kas1e closed 4 years ago

kas1e commented 5 years ago

And there is another one :)

So i start to compile objects, they give me some warnings: quite a bit, but one is repeaded pretty offten about core/src/Color.h:

http://kas1e.mikendezign.com/aos4/gl4es/games/Eldricht/warnings1.txt

Then, im doing some other os4 fixes (that for later) till the moment when trying to compile 3D/src/GL2/gl2pixelshader.cpp, it bring that error:

/amiga/Eldritch-master/code/Libraries/3D/src/GL2/gl2pixelshader.cpp:33:19: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ [-fpermissive] Length = strlen(pBuffer);

The same kind of errors (but more) are in 3D/src/GL2/gl2vertexshader.cpp, there is: http://kas1e.mikendezign.com/aos4/gl4es/games/Eldricht/vertexerrors.txt

At this point it says it already compile about 22% of files, so chances that there will be lots of other errors are low (i hope)

kas1e commented 5 years ago

I going futher by just commenting out problematic parts in those files (so to see what other errors it will brings), and everything else compiles till 100% ! And i was able to linkg Eldricht binary ! yeah !

Through, next it want to link some binary called "Checksumm" i do not know if it need it at all ?

ptitSeb commented 5 years ago

Ah I don't remember. I think it's not usefull to launch the game, juust for mod to create new data file.

I'll start working on this one probably tomorrow.

ptitSeb commented 5 years ago

I have pushed a commit with some fixes. It should build (almost) cleanly now.

There are still some multi char warning and a few other string warning... I'll see if I fix them or not latter.

kas1e commented 5 years ago

Yeah, thanks ! Through that warning about Core/src/color.h as i show in first post, popup when compile any object, but as far as it compiles..

Now i got the build 388update1 of Eldricht, put the *.cpk filels to the root directory where i have binary, so layout looks like this now:

Eldritch eldritch-audio.cpk eldritch-base.cpk eldritch-meshes.cpk eldritch-textures.cpk eldritch-world.cpk

And after setting stack 1000000 and running it i have:

4/0.Work:Eldritch> Eldritch Assertion failed: "NewPackageFile.m_Header.m_MagicID == 'KPCD'" () in unknown function in /amiga/Eldritch-master/code/Libraries/Core/src/packstream.cpp at line 115 Warn failed: "false" () in unknown function in /amiga/Eldritch-master/code/Libraries/Core/src/packstream.cpp at line 120 Couldn't open file: Config/default.ccf Warn failed: "false" () in unknown function in /amiga/Eldritch-master/code/Libraries/Core/src/filestream.cpp at line 27

Probably those "packstream" and "filestream" again not big-endian aware ?:( Also should be Config/default.ccf be gotten from somewhere, or, its autogenerated, or can be just skipped ?

ptitSeb commented 5 years ago

I'll see what I can do for that color.h warning.

About the error you have, yeah, that is typically a BigEndian issue.

kas1e commented 5 years ago

Damn, all the time those issues with Endianes .. Sadly there is no way to have some automatic conversion..

kas1e commented 5 years ago

Seeing line 115 of packsteam.cpp, it fail at:

ASSERT(NewPackageFile.m_Header.m_MagicID == 'KPCD');

So seems it didn't read header properly, maybe it enough to just swap KPCD on DCPK or so..

kas1e commented 5 years ago

Found some fread() in use (one in filestream.cpp): , in line 37:

int FileStream::Read(int NumBytes, void* Buffer) const { ASSERT(m_FileMode == EFM_Read); return (int)fread(Buffer, NumBytes, 1, m_TheFile); }

Probabaly there is first fail

ptitSeb commented 5 years ago

I have just pushed some changes. Maybe it will go further now.

kas1e commented 5 years ago

Thanks ! Through:

idatastream.h:50:60: error: ‘i’ was not declared in this scope idatastream.h:126:22: error: ‘i’ was not declared in this scope

ptitSeb commented 5 years ago

Ah ok. It's fixed now.

kas1e commented 5 years ago

Oh it going much futher ! There is current output:

4/0.Work:Eldritch> Eldritch ReverseHash: Hash collision detected between "UI" and "Si"! ReverseHash: Hash collision detected between "Ir" and "LB"! ReverseHash: Hash collision detected between "Si" and "UI"! Version: 388 Initializing factories... Initializing SDP factories. Initializing UI factories. Initializing anim event factories. Initializing PE factories. Initializing action factories. Initializing BT factories. Initializing component factories. Factories initialized. Initializing input system. Random seed is 1546713116 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 Using display mode 1280x720 Assertion failed: "BitCount == 32" () in unknown function in /amiga/Eldritch-master/code/Libraries/2D/src/surface.cpp at line 371 Assertion failed: "m_Surface" () in unknown function in /amiga/Eldritch-master/code/Libraries/2D/src/surface.cpp at line 239

ptitSeb commented 5 years ago

Ok, I think that was the BMP files loader. It should load surfaces now.

kas1e commented 5 years ago

Yeah, going futher. Now it show me some title image (which seems should be transparent, but it's black), there is screenshot:

http://kas1e.mikendezign.com/aos4/gl4es/games/Eldricht/Eld_screen1.jpg

And then it crashes with that output:

4/0.Work:Eldritch> Eldritch ReverseHash: Hash collision detected between "UI" and "Si"! ReverseHash: Hash collision detected between "Ir" and "LB"! ReverseHash: Hash collision detected between "Si" and "UI"! Version: 388 Initializing factories... Initializing SDP factories. Initializing UI factories. Initializing anim event factories. Initializing PE factories. Initializing action factories. Initializing BT factories. Initializing component factories. Factories initialized. Initializing input system. Random seed is 1546715206 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 Using display mode 1280x720 OpenALAudioSystem::SetReverbParams() STUB, doing nothing. Using OpenGL renderer. Assertion failed: "OutARGBImage" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/texturecommon.cpp at line 68 Creating vertex declaration for signature 9 Assertion failed: "LanguageIter.IsValid()" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/font.cpp at line 89 Assertion failed: "m_Node" () in unknown function in /amiga/Eldritch-master/code/Libraries/Core/src/map.h at line 81

kas1e commented 5 years ago

Tested win32 version, and that title logo of Eldritch, the same black background. Strange why authors doing it like this, but whatever if it expected to be like this.

And probabaly crash now happens because of "LoadTGA" ?

kas1e commented 5 years ago

Btw, is that warnings at top of output:

ReverseHash: Hash collision detected between "UI" and "Si"! ReverseHash: Hash collision detected between "Ir" and "LB"! ReverseHash: Hash collision detected between "Si" and "UI"!

Harmless or can bring issues ? I didn't see them in win32's log , dunno if it anyhow need it to worry about ?

Also in win32's log, i can see that after words:

Initializing input system.

They have :

Input system initialized.

I checked source code and we don't have such words, so i think that one also no problems, just no printf.

ptitSeb commented 5 years ago

I have just pushed a new fix on texture loading (there are code for loading files in multiple places).

I think I had the ReverseHash warning on my side too. I'm not sure, I cannot test right now.

kas1e commented 5 years ago

Hm, nope, still the same error.. I rechecked twice , i complied new version of texturecommon.cpp for sure ..

ptitSeb commented 5 years ago

Ah yes, there was another test. It should be better now.

kas1e commented 5 years ago

Now those errors at top about "ReverseHash: Hash collision detected between" are gone, but then it now can't find suitable display mode anymore, as well at very top didn't have now version number (just an emptuy string) , and crashes at end, there is output:

4/0.Work:Eldritch> Eldritch Version: Initializing factories... Initializing SDP factories. Initializing UI factories. Initializing anim event factories. Initializing PE factories. Initializing action factories. Initializing BT factories. Initializing component factories. Factories initialized. Initializing input system. Random seed is 1546738428 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 Could not find a more suitable display mode. Using display mode 0x0 OpenALAudioSystem::SetReverbParams() STUB, doing nothing. Using OpenGL renderer. Assertion failed: "FrameBufferStatus == 0x8CD5" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/GL2/gl2rendertarget.cpp at line 160 Assertion failed: "pMirrorScreen" () in unknown function in /amiga/Eldritch-master/code/Projects/Eldritch/src/eldritchgame.cpp at line 725

kas1e commented 5 years ago

It is changes in the hashedstring.cpp caused that , if i revert them back, then those warning at top appears again, but version showsn 388, display mode founds and title image appear , and crash in texturecommon.cpp at line 68 are gone, through crash from font.cpp / map.h keeps

ptitSeb commented 5 years ago

Ok, I'll revert those hashedstring changes. For the font issue. I have to search what could be the cause (initialy, I thought it was a bad hashedstring, it seems it isn't).

ptitSeb commented 5 years ago

And now, is this better?

kas1e commented 5 years ago

Probabaly yeah, dunno thorugh if it errors now before those fonts errors, or after, but that what i have now:

4/0.Work:Eldritch> Eldritch ReverseHash: Hash collision detected between "UI" and "Si"! ReverseHash: Hash collision detected between "Ir" and "LB"! ReverseHash: Hash collision detected between "Si" and "UI"! Version: 388 Initializing factories... Initializing SDP factories. Initializing UI factories. Initializing anim event factories. Initializing PE factories. Initializing action factories. Initializing BT factories. Initializing component factories. Factories initialized. Initializing input system. Random seed is 1546808889 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 Using display mode 1280x720 OpenALAudioSystem::SetReverbParams() STUB, doing nothing. Using OpenGL renderer. Creating vertex declaration for signature 9 Assertion failed: "DDSFormat.m_Size == sizeof(SDDSurfaceFormat)" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/GL2/gl2texture.cpp at line 187 Assertion failed: "DDSFormat.m_PixelFormat.m_ID == 0x31545844 || DDSFormat.m_PixelFormat.m_ID == 0x33545844 || DDSFormat.m_PixelFormat.m_ID == 0x35545844" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/GL2/gl2texture.cpp at line 192

Probabaly we going futher ?

ptitSeb commented 5 years ago

Ah yes, of course, the DDS reader also need some BigEndian changes (it's more or less same sources used in gl4es, so I should probably backport some of the changes here to gl4es handling of DXT textures)

ptitSeb commented 5 years ago

Should be fixed now.

kas1e commented 5 years ago

Yeah, the more fixes to gl4es , the better of course :)

As for last change : we for sure go futher now. That what i have in output before it crashes :

ReverseHash: Hash collision detected between "UI" and "Si"! ReverseHash: Hash collision detected between "Ir" and "LB"! ReverseHash: Hash collision detected between "Si" and "UI"! Version: 388 Initializing factories... Initializing SDP factories. Initializing UI factories. Initializing anim event factories. Initializing PE factories. Initializing action factories. Initializing BT factories. Initializing component factories. Factories initialized. Initializing input system. Random seed is 1546815050 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 Using display mode 1280x720 OpenALAudioSystem::SetReverbParams() STUB, doing nothing. Using OpenGL renderer. Creating vertex declaration for signature 9 Assertion failed: "DDSFormat.m_PixelFormat.m_ID == 0x31545844 || DDSFormat.m_PixelFormat.m_ID == 0x33545844 || DDSFormat.m_PixelFormat.m_ID == 0x35545844" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/GL2/gl2texture.cpp at line 211 Assertion failed: "m_Size == 0 || m_Offset + NumBytes <= m_Size" () in unknown function in /amiga/Eldritch-master/code/Libraries/Core/src/memorystream.cpp at line 14 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 UIScreenEldSetRes info: ScreenWidth: 1920 ScreenHeight: 1080 Skipping mode 1920x1200: Skipping mode 1600x1200: Invalid type requested for UIScreen LeaderboardsScreen. Warn failed: "false" (Invalid UIScreen type requested.) in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/uifactory.cpp at line 50 Assertion failed: "pUIScreen" () in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/Common/uimanagercommon.cpp at line 43 Assertion failed: "Header.m_MagicID == 'SMCD'" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp at line 1400

kas1e commented 5 years ago

Yeah with last commit about more DSS fixes they gone , there is output:

4/0.Work:Eldritch> Eldritch ReverseHash: Hash collision detected between "UI" and "Si"! ReverseHash: Hash collision detected between "Ir" and "LB"! ReverseHash: Hash collision detected between "Si" and "UI"! Version: 388 Initializing factories... Initializing SDP factories. Initializing UI factories. Initializing anim event factories. Initializing PE factories. Initializing action factories. Initializing BT factories. Initializing component factories. Factories initialized. Initializing input system. Random seed is 1546816187 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 Using display mode 1280x720 OpenALAudioSystem::SetReverbParams() STUB, doing nothing. Using OpenGL renderer. Creating vertex declaration for signature 9 Enumerating SDL display modes... Enumerated mode 1920x1200 Enumerated mode 1920x1080 Enumerated mode 1600x1200 Enumerated mode 1440x900 Enumerated mode 1280x720 Enumerated mode 1024x768 Enumerated mode 800x600 Enumerated mode 640x512 Enumerated mode 640x480 UIScreenEldSetRes info: ScreenWidth: 1920 ScreenHeight: 1080 Skipping mode 1920x1200: Skipping mode 1600x1200: Invalid type requested for UIScreen LeaderboardsScreen. Warn failed: "false" (Invalid UIScreen type requested.) in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/uifactory.cpp at line 50 Assertion failed: "pUIScreen" () in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/Common/uimanagercommon.cpp at line 43 Assertion failed: "Header.m_MagicID == 'SMCD'" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp at line 1400 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc AL lib: (EE) alc_cleanup: 2 devices not closed ***Command 'Eldritch' returned with unfreed signals 1C000000!

Through, maybe you note : UIScreenEldSetRes info: are empty (and give Invalid type requested for UIScreen LeaderboardsScreen. later). Maybe it expected to be like this through ..

ptitSeb commented 5 years ago

Yeah, I had that Leaderboard issue if I remember correctly too. For the mesh, I should have fixed it (if it build, as you can see, there are a lot of changes).

kas1e commented 5 years ago

for idatasteam.h: idatastream.h:53:28: error: expected primary-expression before ‘.’ token

for meshfactory.cpp:

/amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1552:39: error: ‘class Animation’ has no member named ‘m_Quat’ littleBigEndian(&Animations[ii].m_Quat.w); ^~ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1553:39: error: ‘class Animation’ has no member named ‘m_Quat’ littleBigEndian(&Animations[ii].m_Quat.x); ^~ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1554:39: error: ‘class Animation’ has no member named ‘m_Quat’ littleBigEndian(&Animations[ii].m_Quat.y); ^~ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1555:39: error: ‘class Animation’ has no member named ‘m_Quat’ littleBigEndian(&Animations[ii].m_Quat.z); ^~ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1557:41: error: ‘class Animation’ has no member named ‘m_Vector’ littleBigEndian(&Animations[ii].m_Vector.v[jj]); ^~~~ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1565:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] Stream.Read(88, &Animations[animIndex]); ^ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1577:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint’ {aka ‘unsigned int’} [-Wsign-compare] for(int ii=0; ii<Header.m_NumCollisionTris; ++ii) { ^~~~~~~~ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1593:32: error: ‘class AABB’ has no member named ‘m_AABB’; did you mean ‘AABB’? littleBigEndian(&BoundAABB.m_AABB.m_Min.v[jj]); ^~ AABB /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1594:32: error: ‘class AABB’ has no member named ‘m_AABB’; did you mean ‘AABB’? littleBigEndian(&BoundAABB.m_AABB.m_Max.v[jj]); ^~ AABB

ptitSeb commented 5 years ago

Should compile now.

kas1e commented 5 years ago

Damn need to go for about 2 hours, only phone there, so cant test at moment, but i feel we very close :)

Btw, is Eldricht use any shaders coming with game, or its all internal shaders to make GLES2 works like in gl4es ?

ptitSeb commented 5 years ago

Eldritch use complex shaders, used for Bones animation mainly, so it's not spectacular on screen, but: lots of matrixes and array used in shaders, that will make a hard test for the shader compiler on the Amiga side!

kas1e commented 5 years ago

Tested, some more errors in meshfactory:

/amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1471:35: error: request for member ‘v’ in ‘FloatColors1’, which is of pointer type ‘Vector4’ (maybe you meant to use ‘->’ ?) littleBigEndian(&FloatColors1.v[jj]); ^ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1472:35: error: request for member ‘v’ in ‘FloatColors2’, which is of pointer type ‘Vector4’ (maybe you meant to use ‘->’ ?) littleBigEndian(&FloatColors2.v[jj]); ^ /amiga/Eldritch-master/code/Libraries/3D/src/meshfactory.cpp:1473:35: error: request for member ‘v’ in ‘FloatColors3’, which is of pointer type ‘Vector4*’ (maybe you meant to use ‘->’ ?) littleBigEndian(&FloatColors3.v[jj]); ^

kas1e commented 5 years ago

Changing . to -> make it compiles, through dunno if it expected to be like this of course :)

ptitSeb commented 5 years ago

It should be fixed.

kas1e commented 5 years ago

Yeah, its better and better , there is last errors (i didn't post those at top anymore, all seems the same all the time, there is last part of log):

UIScreenEldSetRes info: ScreenWidth: 1920 ScreenHeight: 1080 Skipping mode 1920x1200: Skipping mode 1600x1200: Invalid type requested for UIScreen LeaderboardsScreen. Warn failed: "false" (Invalid UIScreen type requested.) in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/uifactory.cpp at line 50 Assertion failed: "pUIScreen" () in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/Common/uimanagercommon.cpp at line 43 Creating vertex declaration for signature 211 Assertion failed: "FrameBufferStatus == 0x8CD5" () in unknown function in /amiga/Eldritch-master/code/Libraries/3D/src/GL2/gl2rendertarget.cpp at line 160

ptitSeb commented 5 years ago

Mmm, that's not a BigEndian error this time I'm afraid. Looks like a framebuffer is not correctly initialized. You should printf that return value (wich is not 0x8CD5 obviously), that may help diagnose the error.

kas1e commented 5 years ago

It is 8cd6 instead , dunno what is it mean.. didn't found that in the includes of gles at all..

kas1e commented 5 years ago

Ah found, in gles incldues that : GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6

kas1e commented 5 years ago

I also see there in the gl2rendertarget.cpp, at line 151, there is #ifdef PANDORA, where you change m_DepthStencilRenderBufferObject on m_StencilRenderBufferObject , maybe it is somehow related ?

kas1e commented 5 years ago

Maybe gles2 parts was changed for Pandora that way that it didnt works for non-Pandora ?

ptitSeb commented 5 years ago

I'm unsure. You can try by changing the #ifdef PANDORA with #if //def PANDORA in line 131 and line 150 to see if the attachment is complete. If it works, I'll add some better ifdef were needed.

kas1e commented 5 years ago

It then says error: ‘m_StencilRenderBufferObject’ was not declared in this scope, so i had to change also pandora ifdef in the 3d/src/gl2/gl2rendertarget.h, Also i had to change pandora ifdef in the same gl2rendertarget.cpp at top : lines 57 and 66.

Then all compiles without warnings, and yes ! It give me 0x8cd5, which mean it creates fine now. Do you remember why you change it for Pandora like this ?

Now, only those 2 errors keeps:

UIScreenEldSetRes info: ScreenWidth: 1920 ScreenHeight: 1080 Skipping mode 1920x1200: Skipping mode 1600x1200: Invalid type requested for UIScreen LeaderboardsScreen. Warn failed: "false" (Invalid UIScreen type requested.) in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/uifactory.cpp at line 50 Assertion failed: "pUIScreen" () in unknown function in /amiga/Eldritch-master/code/Libraries/UI/src/Common/uimanagercommon.cpp at line 43

Probabaly that related to that "invalid type requested for UIScreen". I checke win32's version logs, and there they have :

UIScreenEldSetRes info:

Also empty, but then, no errors about "invalid type" and no warning of this kind with assertions.

ptitSeb commented 5 years ago

I changed like that on the Pandora because the driver didn't like Renderbuffer in STENCIL8_DEPTH24 format. I have put PANDORA ifdef because I assumed it was a Pandora only limit. I'll add amigaos define also for this mecanism, no problem.

Now, does it run? (because I think LeaderboardsScreen warning is ok).

kas1e commented 5 years ago

I changed like that on the Pandora because the driver didn't like Renderbuffer in STENCIL8_DEPTH24 format. I have put PANDORA ifdef because I assumed it was a Pandora only limit. I'll add amigaos define also for this mecanism, no problem.

Oh, is it some implementation limitation, or some usuall one in all gles2 drives ? I mean, i can report it so it can be implemented by Daniel, just in case for future.

Now, does it run? (because I think LeaderboardsScreen warning is ok).

Well, there is full current output of eldrich-log.txt:

http://kas1e.mikendezign.com/aos4/gl4es/games/Eldricht/eldritch-log1.txt

From what i can see that there is no errors about vertex shaders , but there is errors about fragment shaders, which on our part seems didn't have SampledImage() implemented (or something like that, as while log says so, i still can't see on Kronos site SampledImage() function).

Also there is bunch of errors about Invalid type requested for WBAction Award_ACH_Lore., which imho not related to shaders ? There is also at some stage phrase Error: Unknown file extension for sample loading! , which probabaly also related to that WBAction thing ?

At the end of log, i have about 1.5GB of memory filled out, and nothing happens (it crashes of course, just i can't see crashlog, but can see probabaly on serial).

We probably need to deal with that WBAction thing, then i need probabaly unpack *.cpk files to search for shaders, and then to see what ones cause issues, etc. But for that need to make big-endian changes in the Code/Tools/FilePacker/src/filepacker.cpp file, to make it works on big-endian, so i can unpack datafiles (i already tried to build it, it builds, but its not big-endian aware, so bad-allocs and stuff).

kas1e commented 5 years ago

Maybe for time being, just return to all fragment shaders something like void main(){} , so there will be no fails, and at least we can check if it all other things works as expected , and once all fine, we can back to shaders?

kas1e commented 5 years ago

I also see, that for Pandora, you made some simple fragment shaders (like all the time the same ?)

kas1e commented 5 years ago

So some progress. That what i do:

in 3D/src/GL2/gl2vertexshader.cpp i add those parts:

#ifdef __amigaos4__ const char* SimplePixelShader = "#version 100\n\ \n\ void main()\n\ {\n\ }"; #endif

And at end when shader conversion done, and where you do check on pandora's as well, that:

#ifdef __amigaos4__ if (strstr((char *)Tmp, "gl_FragColor")) { strcpy((char *)Tmp, SimplePixelShader); } #endif

So every shader which have gl_FragColor (so fragment one), will be just empty at moment.

Everything runs and compiles fine, no shaders errors, and log looks like before , just without shaders problems:

http://kas1e.mikendezign.com/aos4/gl4es/games/Eldricht/eldritch-log2.txt

See there same Invalid type requested for WBAction Award_ACH_Lore. as well as Error: Unknown file extension for sample loading!

And at end it also crashes with eating up 1.5gb of memory, and crashlog point out on OpenAL generating sounds. Which is probably this time again big-endian related (that explain also eaten memory). There is crashlog:

http://kas1e.mikendezign.com/aos4/gl4es/games/Eldricht/Crashlog_Eldritch_2019-01-07_21-31-22.txt

Seeing stacktrace, it probabaly CreateSampleFromOGG() are not big-endian aware or function from which that one called ? Also that Error: Unknown file extension for sample loading! coming from that function.

ptitSeb commented 5 years ago

Should be a bit better now. At least the loading of the OGG sould work now. But on other stuff, I haven't found other bigendian issues (like , for the PackFiles, I allready should have put everyhting correctly already).