FYI: compile pb and other with CVS

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

FYI: compile pb and other with CVS

Post by artaxerxes »

devel-1-00:
can't compile with the --usecode-debugger (I'm testing with --debug right now). It says something about a missing file.

exult:
compiles fine but spells don't work at all. I've got the spellbook (duh), the ring of reagents, appropriate spells and enough mana and level.

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

compiling without the --debug option works ok with devl-1-00

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

correction:

it compiles ok but the spell don't work anymore


Argh
artaxerxes
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by wjp »

Hm, oops, --enable-usecode-debugger wasn't supposed to exist in devel-1-00. (it's gone now)

Spells are fixed now. (I broke them this weekend :-( )
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

I've got another question regarding cross-compiling.

I've installed the arm cross compiling environment but whenever I run ./configure it doesn't pick up that's it's a cross-compiler.

any clues ?

Artaxerxes
IgnitusDragonn
Posts: 219
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by IgnitusDragonn »

Artarxerxes: the intelligent bastard who should be in the exult team but apparently isnt.
why not??:(
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by wjp »

> I've installed the arm cross compiling environment but whenever I run ./configure
> it doesn't pick up that's it's a cross-compiler.

Hm, could you post the first couple of dozen lines of output from configure?
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

wjp:
my apologies, I had a path problem. Seems ok now.


IgnitusDragonn:
because I guess it takes more than testing, contributing code and investigating new avenues for development to be in the elite.

Artaxerxes
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by wjp »

Let me know if anything else goes wrong; I haven't tried compiling it with a cross-compiler in ages.

IIRC, it was broken the last time because of the problem of having to compile expack for the BUILD platform, while the rest of exult had to be built for the HOST platform. (Or the other way around or something... I can never remember which is which :-) )
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

just a question:

why does the source has to have SDL_mixer even though I disable timidity and kmid ?

also I though SDL_mixer 1.2.4 was not required for devel-1-00 but it seems it is.
Artaxerxes
IgnitusDragonn
Posts: 219
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by IgnitusDragonn »

Sorry Artaxerxes, I think your good enough to be elite;) in mi'selfs opinion.
Anyway, I contribute to this forum(at the risk of spamming and being banned lol), oh and the bug report, I contribute to that. Hehehehe.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

you should also contribute code. And best of all, contribute patches.

you could also maintain a new port.

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

wjp:

I updated my tree but there still must be some reference to USECODE_DEBUGGER as I got the following:

c++ -g -Wno-long-long -g -O2 -o exult actions.o actorio.o actors.o alloc.o args.o bggame.o browser.o cheat.o cheat_screen.o combat.o delobjs.o devgame.o dir.o drag.o effects.o exult.o exultmenu.o game.o gameclk.o gamedat.o gamemap.o gamerend.o gamewin.o keys.o keyactions.o menulist.o monsters.o mouse.o npcnear.o npctime.o palette.o paths.o readnpcs.o schedule.o segfile.o shapeid.o sigame.o tqueue.o txtscroll.o version.o xdrag.o pathfinder/.libs/libpathfinder.a audio/.libs/libaudio.a audio/midi_drivers/.libs/libmididrv.a flic/.libs/libflic.a conf/.libs/libconf.a imagewin/.libs/libimagewin.a usecode/.libs/libusecode.a shapes/.libs/libshapes.a objs/.libs/libobjs.a gumps/.libs/libgumps.a server/.libs/libserver.a files/.libs/libu7file.a files/zip/.libs/libminizip.a -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lz
usecode/.libs/libusecode.a(ucinternal.o): In function `Usecode_internal::Execute_Intrinsic(Usecode_value (Usecode_internal::*)(Usecode_internal *, int, int, int, Usecode_value *), char const *, int, int,
int, Usecode_value *)':
/root/tmp/exult/usecode/ucinternal.cc:1295: undefined reference to `usecode_debugging'
collect2: ld returned 1 exit status
IgnitusDragonn
Posts: 219
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by IgnitusDragonn »

I can't maintain a new port, I just have windows 98 and I'm not educated in any other OS really.
Patches, I can help with that. When I get around to it...
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by SB-X »

> why does the source has to have SDL_mixer even though I disable timidity and kmid ?

The digital audio needs SDL_Mixer. The other MIDI drivers never did, nor do they have anything to do with the digital audio (though I think SQ changed it so they would used sdl_mixer *shrug*)
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by wjp »

> I updated my tree but there still must be some reference to USECODE_DEBUGGER as I got the following:

Hm, it might still be in there somewhere. Is there a #define USECODE_DEBUGGER (or something) in config.h?
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

it is commented.

tell you what I'll do. I'll wipe my whole tree, do a "cvs co exult" and then a "cvs update -d -r devel-1-00" and finally a ./autogen.sh, ./configure --disable-usecode-debugger && make && make install.

I'll tell you what gives.

As for the moment, I'm documenting my creation of SDL for Zaurus as well as the compilation of Exult for Zaurus. Work in progress

artaxerxes
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by wjp »

If you do a

cvs co -r devel-1-00 exult

you'll save some bandwidth.



/me goes check on occurences of 'usecode_debugging' in the meantime
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

greathx

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

just finished compiling and just tested.

magic works again, all is good in a happy world.

thx again wjp.


btw, I finished compiling the latest CVS of SDL for Sharp Zaurus (arm port) and I am trying to compile exult, but it stumbles on a problem where I can see the source, but I don't know how to fix it.

The compiling halts on rwregress and it says:

/bin/sh ../libtool --mode=link arm-linux-g++ -g -O2 -o rwregress rwregress.o libu7file.la
arm-linux-g++ -g -O2 -o rwregress rwregress.o .libs/libu7file.a
/opt/Embedix/tools/arm-linux/lib/crt1.o: In function `_start':
/opt/Embedix/tools/arm-linux/lib/crt1.o(.text+0x2c): undefined reference to `main'
collect2: ld returned 1 exit status
make[3]: *** [rwregress] Error 1



I suppose I am missing another file to include in the compiling of rwregress but which one ? It should contain a main() in it I guess...

Artaxerxes
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by wjp »

I disabled this piece of code in ucinternal.cc now even if you have USECODE_DEBUGGING defined. (in devel-1-00)
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

I think I fixed it.

when it compiled rwregress.cc, it included -Dmain=SDL_main. This is wrong.

when I manually did the same step without this setting, it worked.

You might want to update the configure script.

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

another thing:

in order to port to Zaurus, there are certain keywords you should avoid.

for instance in:
shapes/monsinf.[hc] I had to replace every occurence of the word "arm" into something less dangerous like "armur" (I know it's not how it's spelled).

The reason why is that the cross-compiler has the word "arm" reserved since that's the name of the target platform.

diffs:
monstinf.cc
114c114
int str, int dex, int intel, int cmb, int armur,
122c122
armor = armur;


monstinf.h
189,190c189
void set_stats(int str, int dex, int intel, int cmb, int armur, int wpn, int rch);
IgnitusDragonn
Posts: 219
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by IgnitusDragonn »

armur, thats clever :)
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by drcode »

Seems kind of goofy that they defined 'arm', lower-case. They should have used something like 'ARM_CPU'.

In any case, let us know of any other things we need to fix. It would be cool if you succeed at this.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

right now the goal is to be able to compile exult for strongarm.
the next step will be so that is actually _runs_ ! :)

Once it will be running, I'll have a few things to modify:
1) ease-up the memory hog
2) consider there is no right click
3) put music in (?). The zaurus plays MP3 natively. Maybe I'll wait for exult to support that feature (I know it is being worked on)
4) add a small toolbar since there will be some screen waste (resolution is 320x240 while U7 is 320x200 I think) for quick access to stuff
5) use the keypad cursor for moving maybe (the FAQ says the cursor and the keyboard will be on the left if you use landscape mode)


etc

I'll keep you posted.

Artaxerxes
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by SB-X »

> 1) ease-up the memory hog

It would be cool if you succeed at this, and make it universal for all platforms. :)

> 3) put music in (?). The zaurus plays MP3 natively. Maybe I'll wait for exult to support that feature (I know it is being worked on)

What do you mean? OGG is good, and since you got SDL_Mixer working then shouldn't the digital music already be working(you did say your using the dev branch right)? I love this feature. :)

4) add a small toolbar since there will be some screen waste (resolution is 320x240 while U7 is 320x200 I think) for quick access to stuff

Maybe you and Colourless can work together to create a standard toolbar and toolbar access method, since he might have been planning to do that already.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

I'm actually using the stable branch with is (very goofily) called devel-1-00.
no offense meant

Artaxerxes
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by Dominus »

Artaxerxes: You should definitely speak to Colourless. Many of the thins you outlined are also vital for porting to PocketPC.
And how is it with ogg support (which is in the unstable branch).

Admittedly the naming of the stable branch is odd but once you get used to it, it's okay. :-)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

I am not aware if the zaurus can play ogg natively. I'l give a try at home (where my cradle is).

Isn't the pocketPC running windows ? I think it does. In this case, we need to make sure the changes do not occur in the "#define WIN32" areas.

You probably should add a "#define PDA" option.

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

a quick google search seems to show that ogg can be played but there is a need for a fixed point library (developed by Xiph.org).

The Kompany have created an ogg player using this library but it cost $10 and I don't have any US money to spend of software.

Artaxerxes
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: FYI: compile pb and other with CVS

Post by artaxerxes »

to tell you the truth, I first thought it was triggered by the "intel" keyword (used in intelligence). So I replaced it and nothing good happen.. I then cast my eyes around and I saw the word "arm" and I got a flash.. :)

It's true it's goofy ti use a lowercase keyword... oh well.

Artaxerxes
Locked