Wiki feedback

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 91
Joined: Fri May 23, 2008 5:57 am

Re: Wiki feedback

Post by AtariOwl » Wed Jan 11, 2017 7:01 am

I was using partition d only because of space, i'll try it on C though

Re installed on c
and now its working... git is working, wget is working its currently downloading gcc 4.7.3

Edit (13:32) And compiling

Edit (14:23) Still compiling, on the current machine it would normally have failed by now

Edit (14:46) Compiling ARM cross compiler

Edit (15:16) Its run through, looking promising

OK its built, the only obvious problem i have now is that genromfs is not working and therefore i cannot build some of the demos

Apparently its not finding netinet/in.h even though the file is plainly there

Attempting to make nehe
02 and 05 seem to work 06 fails as do other kgl demos

Code: Select all

$ make
make -C  nehe02
make[1]: Entering directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe02'
rm -f nehe02.elf
/opt/toolchains/dc/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -ffunction-sections -fdata-sections  -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -D_arch_dreamcast -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing  -ml -m4-single-only -Wl,-Ttext=0x8c010000 -Wl,--gc-sections -T/opt/toolchains/dc/kos/utils/ldscripts/shlelf.xc -nodefaultlibs -L/opt/toolchains/dc/kos/lib/dreamcast -L/opt/toolchains/dc/kos/addons/lib/dreamcast -L/opt/toolchains/dc/kos/../kos-ports/lib -o nehe02.elf  \
        main.o  -L/opt/toolchains/dc/kos/lib -lGL -lm -Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-group
make[1]: Leaving directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe02'
make -C  nehe05
make[1]: Entering directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe05'
rm -f nehe05.elf
/opt/toolchains/dc/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -ffunction-sections -fdata-sections  -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -D_arch_dreamcast -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing  -ml -m4-single-only -Wl,-Ttext=0x8c010000 -Wl,--gc-sections -T/opt/toolchains/dc/kos/utils/ldscripts/shlelf.xc -nodefaultlibs -L/opt/toolchains/dc/kos/lib/dreamcast -L/opt/toolchains/dc/kos/addons/lib/dreamcast -L/opt/toolchains/dc/kos/../kos-ports/lib -o nehe05.elf  \
        main.o  -L/opt/toolchains/dc/kos/lib -lGL -lm -Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-group
make[1]: Leaving directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe05'
make -C  nehe06
make[1]: Entering directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe06'
rm -f nehe06.elf
/opt/toolchains/dc/kos/utils/genromfs/genromfs -f romdisk.img -d romdisk -v
make[1]: /opt/toolchains/dc/kos/utils/genromfs/genromfs: Command not found
make[1]: *** [Makefile:28: romdisk.img] Error 127
make[1]: Leaving directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe06'
make: *** [Makefile:14: _dir_nehe06] Error 2
attempting to make genromfs

Code: Select all

 MINGW32 /opt/toolchains/dc/kos/utils/genromfs
$ make
cc -O2 -Wall    -c -o genromfs.o genromfs.c
genromfs.c:82:79: fatal error: netinet/in.h: No such file or directory
 #include <netinet/in.h>  /* Consts & structs defined by the internet system */
                                                                               ^
compilation terminated.
make: *** [<builtin>: genromfs.o] Error 1

Hmmm if i copy in a genromfs.exe it asks for a cygwin1.dll
If i copy in a cygwin1.dll it seems to be mismatched i need a pair i think
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Wed Jan 11, 2017 5:39 pm

First of all glad to hear we found the problem(s) and thanks for sticking through. I'll add that as a warning to the wiki.

That netinet problem is something somebody else reported already: viewtopic.php?f=29&t=103940&p=1051453&h ... d#p1051453
I got no feedback from that person anymore, though.
That header is just required for ntohl(), so you can just remove the include and copy paste this as a workaround, I think:

Code: Select all

#if BYTE_ORDER == BIG_ENDIAN
#define HTONS(n) (n)
#define NTOHS(n) (n)
#define HTONL(n) (n)
#define NTOHL(n) (n)
#else
#define HTONS(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
#define NTOHS(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
#define HTONL(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
                  ((((unsigned long)(n) & 0xFF00)) << 8) | \
                  ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
                  ((((unsigned long)(n) & 0xFF000000)) >> 24))
#define NTOHL(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
                  ((((unsigned long)(n) & 0xFF00)) << 8) | \
                  ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
                  ((((unsigned long)(n) & 0xFF000000)) >> 24))
I'm not sure why that header is not found. Can you try the 'find' command I suggested in that post and tell me the output?
Also msys2 has two shells. One creates native windows applications (no cygwin dll), the other uses a cygwin dll to get more unix features. You're using the windows-native shell. I don't remember having that issue in the past, however. Just a theory. :idea:
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 91
Joined: Fri May 23, 2008 5:57 am

Re: Wiki feedback

Post by AtariOwl » Wed Jan 11, 2017 5:45 pm

Hi and thak you for sticking with me through this.

Ahh yes the same problem. Now i should add that when i tried copying the in.h to place where it could be seen i then got a series of other missing .h files.

OK running find

nothing happens

Code: Select all

MINGW32 /usr
$ find /usr/include -name in.h

MINGW32 /usr
$
Now i know that in.h is in several locations
Image


Adding the ntohl and removing the #include <int.h> is not enough

Code: Select all

$ make
cc -O2 -Wall    -c -o genromfs.o genromfs.c
genromfs.c:91:5: error: unknown type name 'int32_t'
     int32_t nextfh;
     ^~~~~~~
genromfs.c:92:5: error: unknown type name 'int32_t'
     int32_t spec;
     ^~~~~~~
genromfs.c:93:5: error: unknown type name 'int32_t'
     int32_t size;
     ^~~~~~~
genromfs.c:94:5: error: unknown type name 'int32_t'
     int32_t checksum;
     ^~~~~~~
genromfs.c:108:0: error: unterminated #else
 #if BYTE_ORDER == BIG_ENDIAN

make: *** [<builtin>: genromfs.o] Error 1

int32_t should NOT be causing errors i think.



Now i found a copy of genromfs.exe and put it in the genromfs folder and this is where i get the cygwin1.dll error

Code: Select all

make -C  nehe06
make[1]: Entering directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe06'
rm -f nehe06.elf
/opt/toolchains/dc/kos/utils/genromfs/genromfs -f romdisk.img -d romdisk -v
C:/msys32/opt/toolchains/dc/kos/utils/genromfs/genromfs.exe: error while loading shared libraries: cygwin1.dll: cannot open shared object file: No such file or directory
make[1]: *** [Makefile:28: romdisk.img] Error 127
make[1]: Leaving directory '/opt/toolchains/dc/kos/examples/dreamcast/kgl/nehe/nehe06'
make: *** [Makefile:14: _dir_nehe06] Error 2

User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Wed Jan 11, 2017 6:35 pm

The in.h should be the one of your msys2 install, not the one for your Dreamcast. But nevermind, it seems like it won't be included into msys..
2014-05-23 22:17 GMT+04:00 Jon bae <jonbae77@...>:
> Hello again,
> have you a ported version from the socket in mingw-w64? I had trying to
> compile different cd tools but all want the socket.h, and this is not in
> then system.
>
Mingw-w64 doesn't contain this header and will not contain it.
See
http://stackoverflow.com/questions/4638 ... ource-file

Regards,
Alexey.
So it seems like we'll have to patch some kos tools to be msys/windows compatible.

Please replace

Code: Select all

#include <netinet/in.h>
with

Code: Select all

#include <winsock2.h>
If you keep getting that int32_t error, also add

Code: Select all

#include <stdint.h>
If that solves your problem, please try

Code: Select all

#if defined(__MINGW32__) || defined(__MINGW64__)
#include <winsock2.h>
#else
#include <netinet/in.h>
#endif
(I'm not entirely sure which define is the correct one, but we need this for a clean patch to the kos repository)
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5274
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Wiki feedback

Post by BlueCrab » Wed Jan 11, 2017 6:59 pm

Code: Select all

#ifdef _WIN32
Should catch MinGW in general (along with MSVC, but that's another story).

That said, genromfs might well still not play nicely with MinGW, since it assumes it is in a UNIX-like environment. I know it compiles fine on Cygwin, so it should (in theory) do the same with MSYS. I know it did before, but you actually needed the MSYS development tools installed (which weren't installed by default). It was many years ago that I last messed with that, though (2003 or so).
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 91
Joined: Fri May 23, 2008 5:57 am

Re: Wiki feedback

Post by AtariOwl » Thu Jan 12, 2017 3:38 am

Still not working...

with just the first change

Code: Select all

$ make
cc -O2 -Wall    -c -o genromfs.o genromfs.c
genromfs.c:93:5: error: unknown type name 'int32_t'
     int32_t nextfh;
     ^~~~~~~
genromfs.c:94:5: error: unknown type name 'int32_t'
     int32_t spec;
     ^~~~~~~
genromfs.c:95:5: error: unknown type name 'int32_t'
     int32_t size;
     ^~~~~~~
genromfs.c:96:5: error: unknown type name 'int32_t'
     int32_t checksum;
     ^~~~~~~
genromfs.c: In function 'nodematch':
genromfs.c:210:12: warning: implicit declaration of function 'fnmatch' [-Wimplicit-function-declaration]
     return fnmatch(pattern, start, FNM_PATHNAME | FNM_PERIOD);
            ^~~~~~~
genromfs.c:210:36: error: 'FNM_PATHNAME' undeclared (first use in this function)
     return fnmatch(pattern, start, FNM_PATHNAME | FNM_PERIOD);
                                    ^~~~~~~~~~~~
genromfs.c:210:36: note: each undeclared identifier is reported only once for each function it appears in
genromfs.c:210:51: error: 'FNM_PERIOD' undeclared (first use in this function)
     return fnmatch(pattern, start, FNM_PATHNAME | FNM_PERIOD);
                                                   ^~~~~~~~~~
genromfs.c: In function 'romfs_checksum':
genromfs.c:230:5: error: unknown type name 'int32_t'
     int32_t sum, *ptr;
     ^~~~~~~
genromfs.c: In function 'dumpnode':
genromfs.c:362:13: warning: implicit declaration of function 'S_ISLNK' [-Wimplicit-function-declaration]
     else if(S_ISLNK(node->modes)) {
             ^~~~~~~
genromfs.c:366:9: warning: implicit declaration of function 'readlink' [-Wimplicit-function-declaration]
         readlink(node->realname, bigbuf, node->size);
         ^~~~~~~~
genromfs.c:408:25: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
         ri.spec = htonl(major(node->devnode) << 16 | minor(node->devnode));
                         ^~~~~
genromfs.c:408:54: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
         ri.spec = htonl(major(node->devnode) << 16 | minor(node->devnode));
                                                      ^~~~~
genromfs.c:420:13: warning: implicit declaration of function 'S_ISSOCK' [-Wimplicit-function-declaration]
     else if(S_ISSOCK(node->modes)) {
             ^~~~~~~~
genromfs.c: In function 'processdir':
genromfs.c:584:13: warning: implicit declaration of function 'lstat' [-Wimplicit-function-declaration]
         if(!lstat(link->realname, sb)) {
             ^~~~~
genromfs.c:660:35: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration]
                     sb->st_rdev = makedev(major, minor);
                                   ^~~~~~~
genromfs.c: In function 'nodematch':
genromfs.c:211:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [<builtin>: genromfs.o] Error 1
and adding stdint

Code: Select all

$ make
cc -O2 -Wall    -c -o genromfs.o genromfs.c
genromfs.c: In function 'nodematch':
genromfs.c:211:12: warning: implicit declaration of function 'fnmatch' [-Wimplicit-function-declaration]
     return fnmatch(pattern, start, FNM_PATHNAME | FNM_PERIOD);
            ^~~~~~~
genromfs.c:211:36: error: 'FNM_PATHNAME' undeclared (first use in this function)
     return fnmatch(pattern, start, FNM_PATHNAME | FNM_PERIOD);
                                    ^~~~~~~~~~~~
genromfs.c:211:36: note: each undeclared identifier is reported only once for each function it appears in
genromfs.c:211:51: error: 'FNM_PERIOD' undeclared (first use in this function)
     return fnmatch(pattern, start, FNM_PATHNAME | FNM_PERIOD);
                                                   ^~~~~~~~~~
genromfs.c: In function 'dumpnode':
genromfs.c:363:13: warning: implicit declaration of function 'S_ISLNK' [-Wimplicit-function-declaration]
     else if(S_ISLNK(node->modes)) {
             ^~~~~~~
genromfs.c:367:9: warning: implicit declaration of function 'readlink' [-Wimplicit-function-declaration]
         readlink(node->realname, bigbuf, node->size);
         ^~~~~~~~
genromfs.c:409:25: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
         ri.spec = htonl(major(node->devnode) << 16 | minor(node->devnode));
                         ^~~~~
genromfs.c:409:54: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
         ri.spec = htonl(major(node->devnode) << 16 | minor(node->devnode));
                                                      ^~~~~
genromfs.c:421:13: warning: implicit declaration of function 'S_ISSOCK' [-Wimplicit-function-declaration]
     else if(S_ISSOCK(node->modes)) {
             ^~~~~~~~
genromfs.c: In function 'processdir':
genromfs.c:585:13: warning: implicit declaration of function 'lstat' [-Wimplicit-function-declaration]
         if(!lstat(link->realname, sb)) {
             ^~~~~
genromfs.c:661:35: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration]
                     sb->st_rdev = makedev(major, minor);
                                   ^~~~~~~
genromfs.c: In function 'nodematch':
genromfs.c:212:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [<builtin>: genromfs.o] Error 1

AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 91
Joined: Fri May 23, 2008 5:57 am

Re: Wiki feedback

Post by AtariOwl » Thu Jan 12, 2017 10:16 am

I tried adding fnmatch.h to the includes...

but

Code: Select all

$ make
cc -O2 -Wall    -c -o genromfs.o genromfs.c
genromfs.c: In function 'dumpnode':
genromfs.c:364:13: warning: implicit declaration of function 'S_ISLNK' [-Wimplicit-function-declaration]
     else if(S_ISLNK(node->modes)) {
             ^~~~~~~
genromfs.c:368:9: warning: implicit declaration of function 'readlink' [-Wimplicit-function-declaration]
         readlink(node->realname, bigbuf, node->size);
         ^~~~~~~~
genromfs.c:410:25: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
         ri.spec = htonl(major(node->devnode) << 16 | minor(node->devnode));
                         ^~~~~
genromfs.c:410:54: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
         ri.spec = htonl(major(node->devnode) << 16 | minor(node->devnode));
                                                      ^~~~~
genromfs.c:422:13: warning: implicit declaration of function 'S_ISSOCK' [-Wimplicit-function-declaration]
     else if(S_ISSOCK(node->modes)) {
             ^~~~~~~~
genromfs.c: In function 'processdir':
genromfs.c:586:13: warning: implicit declaration of function 'lstat' [-Wimplicit-function-declaration]
         if(!lstat(link->realname, sb)) {
             ^~~~~
genromfs.c:662:35: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration]
                     sb->st_rdev = makedev(major, minor);
                                   ^~~~~~~
cc   genromfs.o   -o genromfs
genromfs.o:genromfs.c:(.text+0x13b): undefined reference to `fnmatch'
genromfs.o:genromfs.c:(.text+0x190): undefined reference to `fnmatch'
genromfs.o:genromfs.c:(.text+0x1e8): undefined reference to `_imp__ntohl@4'
genromfs.o:genromfs.c:(.text+0x243): undefined reference to `_imp__ntohl@4'
genromfs.o:genromfs.c:(.text+0x26b): undefined reference to `_imp__htonl@4'
genromfs.o:genromfs.c:(.text+0x359): undefined reference to `_imp__ntohl@4'
genromfs.o:genromfs.c:(.text+0x5f9): undefined reference to `_imp__htonl@4'
genromfs.o:genromfs.c:(.text+0x70a): undefined reference to `S_ISLNK'
genromfs.o:genromfs.c:(.text+0x74e): undefined reference to `S_ISSOCK'
genromfs.o:genromfs.c:(.text+0x7dc): undefined reference to `readlink'
genromfs.o:genromfs.c:(.text+0x98b): undefined reference to `major'
genromfs.o:genromfs.c:(.text+0x99b): undefined reference to `minor'
genromfs.o:genromfs.c:(.text+0x9c9): undefined reference to `_imp__htonl@4'
genromfs.o:genromfs.c:(.text+0xdc0): undefined reference to `fnmatch'
genromfs.o:genromfs.c:(.text+0xe52): undefined reference to `lstat'
genromfs.o:genromfs.c:(.text+0xe96): undefined reference to `S_ISLNK'
genromfs.o:genromfs.c:(.text+0xf86): undefined reference to `S_ISLNK'
genromfs.o:genromfs.c:(.text+0x102c): undefined reference to `readlink'
genromfs.o:genromfs.c:(.text+0x104e): undefined reference to `lstat'
genromfs.o:genromfs.c:(.text+0x10ba): undefined reference to `lstat'
genromfs.o:genromfs.c:(.text+0x1191): undefined reference to `lstat'
genromfs.o:genromfs.c:(.text+0x12b7): undefined reference to `S_ISLNK'
genromfs.o:genromfs.c:(.text+0x1460): undefined reference to `makedev'
collect2.exe: error: ld returned 1 exit status
make: *** [<builtin>: genromfs] Error 1

AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 91
Joined: Fri May 23, 2008 5:57 am

Re: Wiki feedback

Post by AtariOwl » Thu Jan 12, 2017 11:43 am

OK

Sooooo... i got frustrated trying to get genromfs to build so i took an exe from ...

https://sourceforge.net/p/cadcdev/kalli ... /genromfs/

that wasnt happy as it didnt have a cygwin1.dll so i took one from

https://github.com/Light-Dark/dcvqtex

and put it in the genromfs directory


Can i compile?
Image


Now i know this is something of a shortcut and we really should try to get this working properly. But i'm up and running at least.
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Thu Jan 12, 2017 12:56 pm

Lucky, that exe was probably included by mistake haha

The error message is very telling so if you google it you find
http://man7.org/linux/man-pages/man3/fnmatch.3.html

Which tells you to

Code: Select all

 #include <fnmatch.h>
Just keep hunting for missing includes when you see such errors.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5274
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Wiki feedback

Post by BlueCrab » Thu Jan 12, 2017 1:48 pm

bogglez wrote:Lucky, that exe was probably included by mistake haha

The error message is very telling so if you google it you find
http://man7.org/linux/man-pages/man3/fnmatch.3.html

Which tells you to

Code: Select all

 #include <fnmatch.h>
Just keep hunting for missing includes when you see such errors.
He did that. The problem is that it eventually boiled down to linker errors (and other implicit declarations).

The linker errors would be fixed by linking with the winsock library (-lws2_32 or something like that). But that won't fix things like makedev and whatnot that just have no Windows equivalent.

As I said, this is a case of something needing to be built against Cygwin/MSYS, not against MinGW. It compiles just fine against Cygwin (and did against MSYS back in the day, so I assume that'd work too). But this is all trying to compile against MinGW still.
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Thu Jan 12, 2017 2:29 pm

Oops, I should've read more carefully.
Do you think we can port the too-unixy code parts to windows? It seems like not all that much code depends on UNIX functionality which is unsupported in msys. Looks like it's just some utils, maybe even only genromfs?
And there's also the default shell which doesn't build native programs but should use cygwin's DLL if I remember correctly.
When I made the windows build I found cygwin to be very finicky. I don't have a windows machine available to work on this intensively though
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 91
Joined: Fri May 23, 2008 5:57 am

Re: Wiki feedback

Post by AtariOwl » Thu Jan 12, 2017 6:08 pm

I'm willing to keep experimenting.
I have to machines. I can use this one for dev and the other one (which behaves just the same for experimenting with setup)

What do you think?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5274
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Wiki feedback

Post by BlueCrab » Thu Jan 12, 2017 6:32 pm

bogglez wrote:Oops, I should've read more carefully.
Do you think we can port the too-unixy code parts to windows? It seems like not all that much code depends on UNIX functionality which is unsupported in msys. Looks like it's just some utils, maybe even only genromfs?
And there's also the default shell which doesn't build native programs but should use cygwin's DLL if I remember correctly.
When I made the windows build I found cygwin to be very finicky. I don't have a windows machine available to work on this intensively though
KOS is largely dependent on a real UNIX-like shell for building and use.

MSYS would work fine with genromfs if you were to compile it with the MSYS toolchain rather than the MinGW one (considering MSYS is basically Cygwin anyway). Installing the "gcc" package with the MSYS2 pacman should install the MSYS toolchain, if I'm understanding how that is set up correctly.
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Thu Jan 12, 2017 6:34 pm

AtariOwl wrote:I'm willing to keep experimenting.
I have to machines. I can use this one for dev and the other one (which behaves just the same for experimenting with setup)

What do you think?
That would of course be fantastic, because Windows users would have an easy, full install.

Line 625 would need to replaced with a different way to check whether the file exists and whether it is special.

A special file could be a symbolic link (windows also supports those).
It could also be a unix virtual /dev/ file.

I think a patch that just disables those features, prints an error and calls exit(1) would be good enough for now. You could also implement Windows symbolic links.

So please look up the documentation for these unix function calls and find similar Windows function calls to replace them with.
Last edited by bogglez on Thu Jan 12, 2017 6:39 pm, edited 1 time in total.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Thu Jan 12, 2017 6:39 pm

BlueCrab wrote:
bogglez wrote:Oops, I should've read more carefully.
Do you think we can port the too-unixy code parts to windows? It seems like not all that much code depends on UNIX functionality which is unsupported in msys. Looks like it's just some utils, maybe even only genromfs?
And there's also the default shell which doesn't build native programs but should use cygwin's DLL if I remember correctly.
When I made the windows build I found cygwin to be very finicky. I don't have a windows machine available to work on this intensively though
KOS is largely dependent on a real UNIX-like shell for building and use.

MSYS would work fine with genromfs if you were to compile it with the MSYS toolchain rather than the MinGW one (considering MSYS is basically Cygwin anyway). Installing the "gcc" package with the MSYS2 pacman should install the MSYS toolchain, if I'm understanding how that is set up correctly.
(Saw your post after I posted mine)

No other tools apart from genromfs seem to fail, according to two Windows users' reports. Except if make aborted the build because of genromfs and we therefore just don't know about others..

Regarding the toolchain.. that's possible, but I can't test that. Not sure whether AtariOwl wants to try that if porting genromfs is not enough.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5274
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Contact:

Re: Wiki feedback

Post by BlueCrab » Thu Jan 12, 2017 7:02 pm

bogglez wrote:
BlueCrab wrote:
bogglez wrote:Oops, I should've read more carefully.
Do you think we can port the too-unixy code parts to windows? It seems like not all that much code depends on UNIX functionality which is unsupported in msys. Looks like it's just some utils, maybe even only genromfs?
And there's also the default shell which doesn't build native programs but should use cygwin's DLL if I remember correctly.
When I made the windows build I found cygwin to be very finicky. I don't have a windows machine available to work on this intensively though
KOS is largely dependent on a real UNIX-like shell for building and use.

MSYS would work fine with genromfs if you were to compile it with the MSYS toolchain rather than the MinGW one (considering MSYS is basically Cygwin anyway). Installing the "gcc" package with the MSYS2 pacman should install the MSYS toolchain, if I'm understanding how that is set up correctly.
(Saw your post after I posted mine)

No other tools apart from genromfs seem to fail, according to two Windows users' reports. Except if make aborted the build because of genromfs and we therefore just don't know about others..

Regarding the toolchain.. that's possible, but I can't test that. Not sure whether AtariOwl wants to try that if porting genromfs is not enough.
All that things used to require was getting genromfs to build (and one patch that was only needed for old versions of GCC, like 3.0.4) back when I used to use MSYS (back in 2003 or so?). :wink:

Everything else should be fine as-is, as long as you're on a UNIXy shell.
DarkMorford
DCEmu Newbie
DCEmu Newbie
Posts: 5
Joined: Thu Jan 12, 2017 6:44 pm

Re: Wiki feedback

Post by DarkMorford » Fri Jan 27, 2017 6:29 pm

BlueCrab wrote:MSYS would work fine with genromfs if you were to compile it with the MSYS toolchain rather than the MinGW one (considering MSYS is basically Cygwin anyway). Installing the "gcc" package with the MSYS2 pacman should install the MSYS toolchain, if I'm understanding how that is set up correctly.
I can confirm that installing the msys/gcc package (and switching to the MSYS shell instead of the MinGW one) allowed me to compile genromfs.
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Sat Jan 28, 2017 5:54 am

DarkMorford wrote:
BlueCrab wrote:MSYS would work fine with genromfs if you were to compile it with the MSYS toolchain rather than the MinGW one (considering MSYS is basically Cygwin anyway). Installing the "gcc" package with the MSYS2 pacman should install the MSYS toolchain, if I'm understanding how that is set up correctly.
I can confirm that installing the msys/gcc package (and switching to the MSYS shell instead of the MinGW one) allowed me to compile genromfs.
Can you tell me what exact commands you ran and whether you could build the entire toolchain using that shell? I would like to add that to the wiki
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Wed Feb 22, 2017 10:53 am

I've added "Video: Hardware Architecture Breakdown" to the general section, links to https://www.youtube.com/watch?v=1_XhD5Msurc
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
bogglez
Moderator
Moderator
Posts: 567
Joined: Sun Apr 20, 2014 9:45 am

Re: Wiki feedback

Post by bogglez » Sat Feb 25, 2017 3:27 pm

I've separated the "Graphics" section into general, PVR and OpenGL.
I"ve also added the tutorial "Loading PNG images as OpenGL textures" to the OpenGL section: http://dcemulation.org/?title=Loading_P ... L_textures
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Post Reply