#94608 - 18/05/2002 22:23
Source released for emptriv, empwake, and empan
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
All you hungry programmers out there should head over to my new site at http://empeg.webhop.net. It's actually just a redirect URL for my existing site, but this is easier to remember, and will be there if I change web hosts.
I have tarred up the source code to the three programs I've released, being emptriv (trivia game), empwake (alarm clock), and empan (image panner.) That doesn't mean you'll be able to understand it, it just means I'm releasing it.
Go have fun.
|
Top
|
|
|
|
#94609 - 19/05/2002 05:44
Re: Source released for emptriv, empwake, and empan
[Re: tonyc]
|
journeyman
Registered: 03/02/2002
Posts: 71
|
hi!
i installed emptriv and had read the source.. nice game
i wanna program a game by myself! is there anywhere a tutorial with all the stuff i need? and some examples how to get the buttons read and draw things on screen and put that prog in hijack menu to start and so on...
|
Top
|
|
|
|
#94610 - 19/05/2002 07:16
Re: Source released for emptriv, empwake, and empan
[Re: tonyc]
|
enthusiast
Registered: 19/04/2001
Posts: 369
Loc: Seattle, WA (formerly Houston,...
|
hey, trying to compile emptriv, but i'm kind of an amature . Never cross compiled before. Anyway I think I got everything I need from Mark Lord's site, changed the makefile around as best I could, but got hung up with this gd library stuff. Didn't have it, so i went and got it, and it may or may not be set up right. however, now I'm getting this error: # make /usr/local/armtools-empeg/bin/arm-empeg-linux-gcc -I/usr/local/armtools-empeg/arm-empeg-linux/include -I/home/jrm20/empeg/kernel/linux-v2.00b11/include -L/usr/local/armtools-empeg/arm-empeg-linux/lib -lm emptriv.c -L/usr/local/armtools-empeg/arm-empeg-linux/lib -lgd -lpng -lz -o emptriv /usr/local/armtools-empeg/arm-empeg-linux/bin/ld: cannot find -lgd collect2: ld returned 1 exit status make: *** [emptriv] Error 1 any ideas? Thanks again, John
_________________________
1998 BMW ///M3
30 GB Mk2a, Tuner,
and 10 GB backup
|
Top
|
|
|
|
#94611 - 19/05/2002 09:10
Re: Source released for emptriv, empwake, and empan
[Re: Draghtnod]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Nah there's really no tutorial. I was hoping that releasing my stuff would help people out a bit though, and I'll be happy to explain anything I'm doing in my programs.
If it's the GD library you want docs for, those are available at http://www.boutell.com/gd/.
As for how to do the Hijack stuff, my source should be a good starting point. Basically all Hijack programs are one big while infinite loop that has a EMPEG_HIJACK_WAITMENU ioctl inside. This basically sleeps the program until the user goes into the Hijack menu and selects your app from the menu. Then you usually want to bind to some buttons using the EMPEG_HIJACK_BINDBUTTONS ioctl, and do your thing. When you want to return to the Empeg's player app, you just do a WAITMENU again (usually by letting the outer while loop run again.)
emptriv isn't the best one to start out trying to understand.. empan is probably a little simpler. Start with that one...
|
Top
|
|
|
|
#94612 - 19/05/2002 09:15
Re: Source released for emptriv, empwake, and empan
[Re: johnmcd3]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Hmm. Looks like it got through compiling and can't find libgd.a. From your error message, it looks like it wants this file to be in /usr/local/armtools-empeg/arm-empeg-linux/lib . If it's not there, copy it into there. If it is, then I'm not sure what's happening. I just removed my GD lib and tried to make, and got the same error you're reporting, so I'm guessing libgd.a isn't in that path.
Optionally instead of copying it in, you can just add another -L statement to your Makefile which points to where GD is installed by adding a -L argument to LDFLAGS:
LDFLAGS=-L/usr/local/arm/arm-empeg-linux/lib -L/path/to/gd/libraries -lgd -lpng -lz
Hope this helps.
|
Top
|
|
|
|
#94613 - 19/05/2002 09:27
Re: Source released for emptriv, empwake, and empan
[Re: tonyc]
|
enthusiast
Registered: 08/09/1999
Posts: 364
Loc: Brooklyn
|
Thanks yN0t! Time to go create
|
Top
|
|
|
|
#94614 - 19/05/2002 11:39
Re: Source released for emptriv, empwake, and empan
[Re: tonyc]
|
enthusiast
Registered: 19/04/2001
Posts: 369
Loc: Seattle, WA (formerly Houston,...
|
thanks for the help. i haven't yet attempted to solve this next problem on my own (which i generally like to do), but i figured someone might be able to save me some time when i start playing with this stuff when I get home in two or three hours. I'm now getting this error:
$ make /usr/local/armtools-empeg/bin/arm-empeg-linux-gcc -I/usr/local/armtools-empeg/arm-empeg-linux/include -I/home/jrm20/empeg/kernel/linux-v2.00b11/include -I/home/jrm20/empeg/gd-1.8.4 -L/usr/local/armtools-empeg/arm-empeg-linux/lib -lm emptriv.c -L/usr/local/armtools-empeg/arm-empeg-linux/lib -L/home/jrm20/empeg/gd-1.8.4 -lgd -lpng -lz -o emptriv collect2: ld terminated with signal 11 [Segmentation fault], core dumped make: *** [emptriv] Error 1
after I compiled the gd libraries and linked the .a files. I suspect my problem is that i need to change the makefile of the libraries need to be complied with the arm gcc, instead of my x86 gcc, which is what i compiled them with the last time. Does that sound like it will fix my problem?
_________________________
1998 BMW ///M3
30 GB Mk2a, Tuner,
and 10 GB backup
|
Top
|
|
|
|
#94615 - 19/05/2002 11:44
Re: Source released for emptriv, empwake, and empan
[Re: tonyc]
|
pooh-bah
Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
|
I just wanted to say thanks, I've been looking for something like this and look forward to being done with finals and having a chance to really play with it.
Matthew
|
Top
|
|
|
|
#94616 - 19/05/2002 11:53
Re: Source released for emptriv, empwake, and empan
[Re: johnmcd3]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Yeah, all the libs need to be built with arm-empeg-linux-gcc. If it's pulling in libs from another architecture, ld won't be happy with it. I've done this myself a couple of times. Rebuild the dependent libs for ARM and you should be all set.
|
Top
|
|
|
|
#94617 - 19/05/2002 15:41
Re: Source released for emptriv, empwake, and empa
[Re: tonyc]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
The "patched" gd link on the page appears to be a dangling link.
|
Top
|
|
|
|
#94618 - 19/05/2002 16:17
Re: Source released for emptriv, empwake, and empa
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
|
Top
|
|
|
|
#94619 - 20/05/2002 04:41
Re: Source released for emptriv, empwake, and empa
[Re: tonyc]
|
enthusiast
Registered: 19/04/2001
Posts: 369
Loc: Seattle, WA (formerly Houston,...
|
Sucess! I finally got it working! First, I needed to use a the patched gd libraries from your page, missed that, I was getting them off the web. Then I needed copies of libjpeg.a and libpng.a built for the strongarm, so I built them from the source here: ftp://ftp.uu.net/graphics/ . Funy thing is, libpng needs header files from libz to compile, and I only had the libz.a file you provided, so I downloaded the zlib source from here: http://www.gzip.org/zlib/ and build a new copy of libz.a in case there might be vertion conflicts between my headers and the ones you built libz.a with. A little more makefile magic and *poof*-- a properly compiling vertion of emptriv! That of course includes a great deal of doing all sorts of stuff the wrong way for hours . It probably took about 8 hours total for me to get it to compile, but it was a valuble educational expirience. Hell, before a few weeks ago I'd never seriously used linux, and I probably now know about 3 times as much as I did before regarding makefiles and cross compilation. Now comes the fun part. John
_________________________
1998 BMW ///M3
30 GB Mk2a, Tuner,
and 10 GB backup
|
Top
|
|
|
|
#94620 - 20/05/2002 05:38
Re: Source released for emptriv, empwake, and empa
[Re: johnmcd3]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Sorry I didn't provide more info about the dependent libs and such. Yeah you need the JPG and PNG libs unless you want to build GD without them, which can be done with more Makefile magic when you build GD. But since I use gdCreateImageFromPng in emptriv, you'll at least need libpng. I think you could have gotten by without libjpeg with more GD makefile magic (by getting rid of -DHAVE_JPEG or something to that effect.) Yeah, zlib was a bit of a curve ball as well.
I went through the same learning experiences many times with getting GD to build right, but that's part of the process. Glad you had fun with it!
So what are you planning to write now that you're an Empeg master hacker?
|
Top
|
|
|
|
#94621 - 22/05/2002 13:26
Re: Source released for emptriv, empwake, and empa
[Re: tonyc]
|
enthusiast
Registered: 19/04/2001
Posts: 369
Loc: Seattle, WA (formerly Houston,...
|
So what are you planning to write now that you're an Empeg master hacker? I deliberately held off answering until I had a go at some things to see how I'd do, and I'm happy to report that all is going quite well! I have several ideas to attempt in my quest toward uber-hackerdom, and my first idea is nearing completion. (not entirely an original idea, but is fully my impemenation.) I won't tell what it is quite yet, but it's something I wanted for my own use, and I'm sure it could be of great use for others as well. Right now I'm sorting out a few final issues and thoroughly commenting my code so others could learn from it like I did from others. Hopefully a fully functioning version will be released in the next 18-24 hours. John P.S. I had to patch emptriv to add something too, you'll see that at the same time. (This is pretty minor.)
_________________________
1998 BMW ///M3
30 GB Mk2a, Tuner,
and 10 GB backup
|
Top
|
|
|
|
#94622 - 22/05/2002 19:24
Re: Source released for emptriv, empwake, and empa
[Re: johnmcd3]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Sounds fascinating. Glad things are going well. What did you add to emptriv? If it's something useful and improves it, send me the changes and I'll incorporate them.
|
Top
|
|
|
|
#94623 - 27/05/2002 13:19
Re: Source released for emptriv, empwake, and empa
[Re: tonyc]
|
journeyman
Registered: 03/02/2002
Posts: 71
|
ok i compiled that libgd.a and empan too.. but i only have the x86 gcc! where could i get the arm gcc? or do i have to complie it too?
|
Top
|
|
|
|
#94624 - 27/05/2002 14:28
Re: Source released for emptriv, empwake, and empa
[Re: Draghtnod]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
You need to install the ARM cross-compiler. A prebuilt one is available on Mark Lord's site. You'll probably need to play with Makefiles and PATH settings to get it to use the ARM compiler instead of your x86 gcc.
|
Top
|
|
|
|
#94625 - 28/05/2002 08:54
Re: Source released for emptriv, empwake, and empa
[Re: tonyc]
|
journeyman
Registered: 03/02/2002
Posts: 71
|
thanks
|
Top
|
|
|
|
|
|