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.
nymus
DC Developer
DC Developer
Posts: 968
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 5 times

Re: Wiki feedback

Post by nymus »

Hey Bluecrab, How about a developer's badge for bogglez? I think he just joined recently so it might have been missed.

A long, long time ago, I released a half-complete and buggy tetris clone using my beginner's programming skills. Surprisingly, I logged in one day and noticed that I had been awarded a developer's badge! I wondered if I deserved it then and now, even more. I haven't released or contributed anything else besides my occasional posts in the programming forum.... I'm working on something and if it's not out by end of October, I wouldn't mind if the badge was mysteriously replaced.

Thanks for your great work, bogglez, it's been quite lively around these parts recently and it's nice that the work of Bluecrab and team and others is getting more use, development and exposure.

All the best to everyone.
behold the mind
inspired by Dreamcast
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Wiki feedback

Post by BlueCrab »

nymus wrote:Hey Bluecrab, How about a developer's badge for bogglez? I think he just joined recently so it might have been missed.
Sure... Why not?

I don't normally muck with people's ranks without being asked, hence why I hadn't done it. :wink:

To bogglez: If you can think of something you'd like better as your rank name, feel free to let me know. You're the only person with that rank (I just made it), so it can be changed as needed. I tried to come up with something witty, but couldn't.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

I can't beat your title anyway, so I shall gladly accept this title from our crabby overlord without any complaint what so ever :p
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
ant512
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Thu Sep 29, 2016 12:31 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by ant512 »

The kos_setup_script.sh file is broken under OSX and produces this error:

Code: Select all

sed: 1: "Makefile": invalid command code M
Line 93 is this:

Code: Select all

sed -i'' "s/,objc,obj-c++//" Makefile
It should be this:

Code: Select all

sed -i '' "s/,objc,obj-c++//" Makefile
Note the space after "-i".
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

Thank you for pointing that out, I updated the script.
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
ant512
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Thu Sep 29, 2016 12:31 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by ant512 »

That gets me a bit further, but then:

Code: Select all

/opt/toolchains/dc/kos/utils/dc-chain/build-gcc-arm-eabi-4.7.3/./gcc/xgcc -B/opt/toolchains/dc/kos/utils/dc-chain/build-gcc-arm-eabi-4.7.3/./gcc/ -B/opt/toolchains/dc/arm-eabi/arm-eabi/bin/ -B/opt/toolchains/dc/arm-eabi/arm-eabi/lib/ -isystem /opt/toolchains/dc/arm-eabi/arm-eabi/include -isystem /opt/toolchains/dc/arm-eabi/arm-eabi/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fno-inline -I. -I. -I../.././gcc -I../../../gcc-4.7.3/libgcc -I../../../gcc-4.7.3/libgcc/. -I../../../gcc-4.7.3/libgcc/../gcc -I../../../gcc-4.7.3/libgcc/../include    -o _arm_unorddf2.o -MT _arm_unorddf2.o -MD -MP -MF _arm_unorddf2.dep -DL_arm_unorddf2 -xassembler-with-cpp -c ../../../gcc-4.7.3/libgcc/config/arm/lib1funcs.S
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S: Assembler messages:
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S:608: Error: invalid constant (ff) after fixup
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S:714: Error: invalid constant (ff) after fixup
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S:730: Error: invalid constant (fd) after fixup
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S:916: Error: invalid constant (ff) after fixup
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S:953: Error: invalid constant (fd) after fixup
../../../gcc-4.7.3/libgcc/config/arm/ieee754-df.S:1026: Error: invalid constant (fd) after fixup
make[3]: *** [_arm_muldivdf3.o] Error 1
Bah.

EDIT: Looks like this: https://devel.rtems.org/ticket/2439
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

I was a bit too quick with the fix.. sed -i '' doesn't work on my Linux system. I made another attempt at a fix. It's just like in other kos scripts now (there's a forum thread with this exact error on here..), so I think that's solved.

If that bug report is the error, is an XCode update available? I can't change anything about that, I believe. A workaround would be to use gcc from homebrew perhaps? (brew install gcc)

EDIT: actually, perhaps you can change BINUTILS_VER to something newer than 2.26 in download.sh/unpack.sh/Makefile to fix the issue?

EDIT 2:
Try the following please:

Code: Select all

cd /opt/toolchains/dc/kos/utils/dc-chain
./cleanup.sh
sed -e 's/2.23.2/2.27/' -i.bak download.sh unpack.sh Makefile
./download.sh && ./unpack.sh
make patch
make build
This will download the newest binutils version in which the bug you mentioned was fixed.

I've updated the script to use binutils 2.27 by default.
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: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Wiki feedback

Post by BlueCrab »

@bogglez: I'm curious why you disable the ObjC and Obj-C++ support from the toolchain, while encouraging building all of the Ports? Is there any particular reason for disabling ObjC/Obj-C++ there?

In my experience, it takes just as long (if not longer) to build a bunch of ports that are never going to be used as it does to build libobjc, so it seems kinda counter-intuitive to have the script take options away from people that they would otherwise have if they used it unmodified.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

I don't really know which ports people are using. I just didn't think about it that much. But I thought it's easier to just compile all the ports once instead of having to explain the port system and such. Maybe I should look at that in more detail.

But I don't know anyone who uses objective c outside of ios/osx. Especially since I heard that the strong point of objective c is the standard library on those systems which is not available on others.
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: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Wiki feedback

Post by BlueCrab »

bogglez wrote:I don't really know which ports people are using. I just didn't think about it that much. But I thought it's easier to just compile all the ports once instead of having to explain the port system and such. Maybe I should look at that in more detail.
I don't think it's all that hard to explain. Go into the directory of what you need and type "make install clean". My goal in making it was to make it as simple as possible, after all. :wink:
But I don't know anyone who uses objective c outside of ios/osx. Especially since I heard that the strong point of objective c is the standard library on those systems which is not available on others.
But why disable it, especially if you're not even mentioning that you're doing so? It's pointless to do so and it limits people's options. It'd actually fairly simple to develop a standard library with all the data structures and such that Foundation (the non-gui parts of Cocoa on Mac and iOS) includes. I had actually started doing just that a while ago, but never released it... I should go and find the source code and tie up the loose ends and release it sometime. 8-)

Of course, that's just my 2¢ on the subject. It just seems kinda odd, especially without even mentioning/explaining that you're disabling that support in the script and why.

Heck, if I had fortran support working, I'd include that in the default set of things in dc-chain too. I've just never gotten around to looking into doing it. :lol:

PS: I absolutely abhor fortran. It's a horrible language. But if it works, I'd see no reason to hide that information from people.
ant512
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Thu Sep 29, 2016 12:31 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by ant512 »

bogglez wrote:Try the following please:
That worked! Thanks! This is the next problem when trying to build KOS:

Code: Select all

sh-3.2$ make
for i in utils kernel addons ; do make -C $i || exit -1; done
for i in genromfs wav2adpcm vqenc scramble dcbumpgen; do make -C $i; done
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
cc -O2 -Wall -DINLINE=inline -I/usr/local/include    -c -o get_image_jpg.o get_image_jpg.c
get_image_jpg.c:6:10: fatal error: 'jpeglib.h' file not found
#include <jpeglib.h>
Any suggestions?
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

You need to install the jpg library including headers on your osx system, it's used by utilities that convert images for the Dreamcast. Either download it from the website or using homebrew or similar. As long as you install it in a standard directory the compilation should succeed. Otherwise you might need to add the location to your path or pkg-config path.
I think it was delivered with osx 10.7 so I didn't need to do that.. I'll need to add that to the script. So if you find a good solution I can automate please tell me, thanks
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: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

BlueCrab wrote:
bogglez wrote:I don't really know which ports people are using. I just didn't think about it that much. But I thought it's easier to just compile all the ports once instead of having to explain the port system and such. Maybe I should look at that in more detail.
I don't think it's all that hard to explain. Go into the directory of what you need and type "make install clean". My goal in making it was to make it as simple as possible, after all. :wink:
I was thinking more along the lines of "what does this cryptic error message mean?" "oh yeah, you need to go to that directory and run this command..". So in this case I trade compilation time for convenience, because people might actually use those libraries in the future, or build other people's projects which use the ports.

I'll probably time the compilation and see whether it's unreasonable to compile all of the ports. It didn't take all that long, as far as I remember, but maybe I'm wrong.

Regarding objective c, I optimize the defaults for the 99% of all people. Nobody seems to be using that feature, but everybody pays the price in compilation time and it's a possible area for compilation errors, so I just disabled it. I might want to time that as well, or if you feel strongly about this I'll respect that wish and just enable it.
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: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Wiki feedback

Post by BlueCrab »

bogglez wrote:
BlueCrab wrote:
bogglez wrote:I don't really know which ports people are using. I just didn't think about it that much. But I thought it's easier to just compile all the ports once instead of having to explain the port system and such. Maybe I should look at that in more detail.
I don't think it's all that hard to explain. Go into the directory of what you need and type "make install clean". My goal in making it was to make it as simple as possible, after all. :wink:
I was thinking more along the lines of "what does this cryptic error message mean?" "oh yeah, you need to go to that directory and run this command..". So in this case I trade compilation time for convenience, because people might actually use those libraries in the future, or build other people's projects which use the ports.

I'll probably time the compilation and see whether it's unreasonable to compile all of the ports. It didn't take all that long, as far as I remember, but maybe I'm wrong.

Regarding objective c, I optimize the defaults for the 99% of all people. Nobody seems to be using that feature, but everybody pays the price in compilation time and it's a possible area for compilation errors, so I just disabled it. I might want to time that as well, or if you feel strongly about this I'll respect that wish and just enable it.
95% of people probably don't use C++ either, and that takes a WHOLE lot longer to compile. :wink:

I just feel that it's kinda silly to disable it, that's all.
ant512
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Thu Sep 29, 2016 12:31 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by ant512 »

bogglez wrote:So if you find a good solution I can automate please tell me, thanks
I switched to Ubuntu in VirtualBox. :o

...but I'm now up and running with lxdream in OSX and the dev kit in Ubuntu. Thanks for the installer!
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

Alright, glad it worked on Linux!
Would you mind to try running a couple of commands to install libjpeg and see whether things are running on osx with that, later? I need to get home first, so I'll tell you what to copy paste later. I don't have access to a current osx so your help would be appreciated, since that would make it work for other users.

Edit: nevermind, I googled it. This should be enough
http://mac-dev-env.patrickbougie.com/libjpeg
http://mac-dev-env.patrickbougie.com/libpng

Since you're missing jpeg you probably also need png.
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
ant512
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Thu Sep 29, 2016 12:31 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by ant512 »

bogglez wrote:Edit: nevermind, I googled it. This should be enough
http://mac-dev-env.patrickbougie.com/libjpeg
http://mac-dev-env.patrickbougie.com/libpng
Ah, that makes sense. I already have both of those installed via brew, but to a non-standard location. I'll try symlinking them.
User avatar
Bouz
DCEmu Junior
DCEmu Junior
Posts: 46
Joined: Mon May 10, 2010 3:42 pm
Location: St. Bauzille de Putois (France)
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by Bouz »

95% of people probably don't use C++ either, and that takes a WHOLE lot longer to compile. :wink:
I use C++ :wink:
(For the SH4, not for the ARM!)
ant512
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 27
Joined: Thu Sep 29, 2016 12:31 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by ant512 »

ant512 wrote:
bogglez wrote:Edit: nevermind, I googled it. This should be enough
http://mac-dev-env.patrickbougie.com/libjpeg
http://mac-dev-env.patrickbougie.com/libpng
Ah, that makes sense. I already have both of those installed via brew, but to a non-standard location. I'll try symlinking them.
OK, here's what finally got this working under OSX. I fixed the PNG/JPEG issues like this:

Code: Select all

brew install libjpeg
brew install libpng
sudo ln -s ~/.brew/Cellar/jpeg/8d /usr/local/libjpeg
sudo ln -s ~/.brew/Cellar/libpng/1.6.25 /usr/local/libpng
Note that the "~/.brew" part of the path will change depending on where you install Homebrew, and the version numbers will change when the libraries are updated.

Then I modified /opt/toolchains/dc/kos/utils/dcbumpgen/Makefile to look like this:

Code: Select all

# Makefile stolen from the kmgenc program.

CFLAGS = -O2 -Wall -DINLINE=inline -I/usr/local/include -I/usr/local/libjpeg/include -I/usr/local/libpng/include
LDFLAGS = -s -lpng -ljpeg -lm -lz -L/usr/local/lib -L/usr/local/libjpeg/lib -L/usr/local/libpng/lib

all: dcbumpgen

dcbumpgen: dcbumpgen.o get_image.o get_image_jpg.o get_image_png.o readpng.o
        $(CC) -o $@ $+ $(LDFLAGS)

clean:
        rm -f dcbumpgen *.o
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Wiki feedback

Post by bogglez »

There's a brew command to link the libraries in /usr/local. You shouldn't use ln yourself.
It should tell you the command after installing libpng or jpeg with brew (with a warning that it doesn't link the libs automatically because they might collide with the same libraries provided by os x by default).

I don't think I want to assume that brew is installed, so I'll update the script to download the libs from the official websites directly and compile those.
It should be possible to install the libraries to /opt/.. and add the paths to environment variables temporarily
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