[DC] DreamEDGE cannot be compiled with KOS 2.0

Are you experiencing a problem? Maybe you can't get your scripts to do what you need, or are frustrated by a feature you just can't seem to get working? Let us know about it here and we will try our best to help you out!
Post Reply
gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

[DC] DreamEDGE cannot be compiled with KOS 2.0

Post by gameblabla »

Hello,
I have KOS 2.0 properly set up on lubuntu 14.04 and i can compile the provided examples with no problems.
But i can't compile DreamEDGE. Instead, i got this :

Code: Select all

src/edge/rgl_fx.cc: In function ‘void RGL_ColourmapEffect(player_t*)’:
src/edge/rgl_fx.cc:133:20: error: ‘glVertex2i’ was not declared in this scope
src/edge/rgl_fx.cc: In function ‘void RGL_PaletteEffect(player_t*)’:
src/edge/rgl_fx.cc:191:28: error: ‘glVertex2i’ was not declared in this scope
make: *** [src/edge/rgl_fx.o] Error 1
When i try to replace glVertex2i with glVertex2f , it's even worse:

Code: Select all

src/edge/rgl_main.cc: In function ‘void RGL_SetupMatrices3D()’:
src/edge/rgl_main.cc:187:31: error: ‘glFrustum’ was not declared in this scope
src/edge/rgl_main.cc:175:10: warning: unused variable ‘ambient’ [-Wunused-variable]
src/edge/rgl_main.cc: In function ‘void RGL_DrawImage(float, float, float, float, const image_t*, float, float, float, float, const colourmap_c*, float)’:
src/edge/rgl_main.cc:287:34: error: ‘glVertex2i’ was not declared in this scope
src/edge/rgl_main.cc: In function ‘void RGL_SolidBox(int, int, int, int, rgbcol_t, float)’:
src/edge/rgl_main.cc:322:36: error: ‘glVertex2i’ was not declared in this scope
src/edge/rgl_main.cc: In function ‘void RGL_SolidLine(int, int, int, int, rgbcol_t, float)’:
src/edge/rgl_main.cc:340:36: error: ‘glVertex2i’ was not declared in this scope
src/edge/rgl_main.cc: In function ‘void RGL_ReadScreen(int, int, int, int, byte*)’:
src/edge/rgl_main.cc:353:10: error: ‘glFlush’ was not declared in this scope
src/edge/rgl_main.cc:358:16: error: ‘GL_UNPACK_ALIGNMENT’ was not declared in this scope
src/edge/rgl_main.cc:358:38: error: ‘glPixelStorei’ was not declared in this scope
src/edge/rgl_main.cc:363:65: error: ‘glReadPixels’ was not declared in this scope
src/edge/rgl_main.cc: In function ‘void RGL_CheckExtensions()’:
src/edge/rgl_main.cc:385:45: error: ‘GL_VERSION’ was not declared in this scope
src/edge/rgl_main.cc:385:55: error: ‘glGetString’ was not declared in this scope
src/edge/rgl_main.cc:388:44: error: ‘GL_VENDOR’ was not declared in this scope
src/edge/rgl_main.cc:391:46: error: ‘GL_RENDERER’ was not declared in this scope
src/edge/rgl_main.cc:406:48: error: ‘GL_EXTENSIONS’ was not declared in this scope
src/edge/rgl_main.cc:424:23: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
src/edge/rgl_main.cc: In function ‘void RGL_SoftInit()’:
src/edge/rgl_main.cc:491:12: error: ‘GL_STENCIL_TEST’ was not declared in this scope
src/edge/rgl_main.cc:509:38: error: ‘glAlphaFunc’ was not declared in this scope
src/edge/rgl_main.cc: In function ‘void ProgressSection(const byte*, int, int, const byte*, int, int, float, float, float, int*, int, float)’:
src/edge/rgl_main.cc:595:19: error: ‘glVertex2i’ was not declared in this scope
make: *** [src/edge/rgl_main.o] Error 1
Note that i used both the latest stable and the git version, i didn't use the version from the no-longer-updated SVN.
When i try to build the toolchain for the SVN version, i gives me lots of error so it looks like i'm stuck.

Any idea on how to fix this ? If not, maybe Corbin or someone else could at least provide a build with music ?
Thanks

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by Corbachu »

I think I had compiled this under an earlier version of KOS a long time ago, and I'm not sure if anything has changed that would cause it to fail.

Try using a version of KOS this was was used to build from (so around ~2009 or so), and if it works, then we can document the errors and get it to compile. This is an older version of Dream3DGE (back when the codebase was under 1.29, which used a different renderer and dynamic lights) but I believe this might be the first time someone has tried to compile it since we released.

Is your toolchain set up correctly?
\(סּںסּَ` )/ۜ

gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by gameblabla »

Finally, I managed to compile it with the latest version of KOS.
But i don't know if it works on real hardware... (it doesn't work on NullDC)

Here's what i did to compile it :
Spoiler:
DreamEDGE uses the SDL version by Chui and Kglx.
I have decompressed the precompiled version and put the headers and libraries in kos/addons/include/kos directory and kos/addons/lib/dreamcast.
I had to delete the LGL directory in kos-ports because LGL and Kglx use the same filenames.
The SDL version done by Chui no longer compiles with the current version of KOS so instead i used the SDL version provided by Kallistios.

I also had to change the Makefile to include the directories of my headers :
KOS_CFLAGS+= -I/home/myusername/Documents/kos/kallistios/addons/include/kos/GL -I/home/myusername/Documents/kos/kallistios/addons/include/kos/SDL -I/home/myusername/Documents/kos/kallistios/addons/include/kos -Isrc -DDREAMCAST
And change that -lSDL_gl_1213 to that : -lSDL

Do a make -f Makefile.dc and you should get a binary file.
Here's a link to the binairies
Like i said , no idea if this works on real hardware.

And here's how to use it (from what i understand) :
Spoiler:
Your main wad file should be named data.wad and you need a .gwa for it as well.
To get a .gwa file , simply run EDGE 1.29 with your wad and the gwa file should be in the cache directory.
Download DreamEDGE and decompress it somewhere.
After decompression , you should find a cd directory.
Take your two files and put them in the cd directory.
Rename the binairy from Dreamedge.bin to 1st_read.bin and put it in the cd directory as well.
Generate the cdi file with BootDreams. (Point it to the cd directory where all your files are)

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by Corbachu »

Wow, very cool =)

Do you have an account on Sourceforge? I would like to give you admin access on the project so you can upload your files/changes/etc, because with all the shit I have going on I tend to forget ^_^

I will test this out on real hardware. From what I can remember it worked (I think I have a video of it running on an old TV from a few years ago).
\(סּںסּَ` )/ۜ

gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by gameblabla »

Do you have an account on Sourceforge? I would like to give you admin access on the project so you can upload your files/changes/etc, because with all the shit I have going on I tend to forget ^_^
Yes, here's my profile on Sourceforge. https://sourceforge.net/u/gameblabla/profile/
I will test this out on real hardware. From what I can remember it worked (I think I have a video of it running on an old TV from a few years ago).
I hope it'll work or else that means i'll have to release my game after Slave or Hypertension.

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by Corbachu »

Okay I have added you to the project.

I will test out later tonight (I promise)!
\(סּںסּَ` )/ۜ

gameblabla
Posts: 15
Joined: Sat Nov 15, 2014 2:47 pm

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by gameblabla »

So this time, i tried to build it using Chui's libraries.
Link to binairies : https://cloud.openmailbox.org/public.ph ... 1&download

Now on NullDC, i can see it loading the resources but after it loaded everything in memory , it freezes NullDC.
Even your build doesn't work well on NullDC (but unlike mine , it actually loads the game) so it might work
on real hardware.

This fucker just don't want to run properly (i spent 3 days trying to get it to somehow work)

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: [DC] DreamEDGE cannot be compiled with KOS 2.0

Post by Corbachu »

I've been super swamped lately but I'm trying to find time to burn and get this thing up and running. So sorry that I'm lagging here. :oops:

If I recall there were problems running it on nullDC, especially with the sounds. I believe too there were problems with rgl_plane functions but I know it was working perfectly on the actual hardware.
\(סּںסּَ` )/ۜ

Return to “Support and Help”