BeBits Information Developer Central Submit Application Your Account Web Links Contact Us
BeBits
Please support this BeBits sponsor!
Angband
Talkback
 Go back to the Angband page
 Post a new Talkback comment!
updated R5 version
 By Begasus_ - Posted on December 24, 2007 - 06:25:45   (#22307)
 Current version when comment was posted: 2.9.2 beta1
Thanks for pointing out the patch, it worked and I checked on R5 and Haiku where the new bin is working ok.
I've uploaded a R5 version compiled from the latest source (3.0.9) for you guys to download.
I also should be careful when I say that I'm in contact with the developer ;) I've been talking a while back with him for the stuff I found and mailed him a patch file (that probly will be applied later), I also pointed to the link here where you posted the talkback so he can add it also in the source.
Due to other games and compiling I haven't been in direct contact with him lately but if for nothing else ... people can read what you've posted here and take into their own code (if needed). Enjoy the holidays :D

re:Begasus
 By _edge - Posted on December 23, 2007 - 11:20:28   (#22301)
 Current version when comment was posted: 2.9.2 beta1
I thought you said you were speaking with the developer about it? It is up to them how they want to implement it, so I'd suggest you have a look at the program itself (to see their style of code) - because there are different ways to do it ;)

Why are you using usleep for any BeOS/Dan0/Zeta? Snooze should work on all of them (probably Haiku, I wouldn't know).

If you just want to release the binary and provide sourcecode, then change the usleep to snooze while dividing whatever it's using by 1000. As BeOS aimed to be a realtime O.S., it allows much finer granularity in the function (via smaller times).

For a constant it would be changed from
usleep (10)
to
snooze (0.01)
-----
Of course you could have it do the math itself, but I am attempting to be as clear as possible.

And since I was bored, I downloaded the source and looked at it.
This patch should work:

--- angband-3.0.9/src/main-gcu.c.orig 2007-07-27 15:36:30.000000000 -0400
+++ angband-3.0.9/src/main-gcu.c 2007-12-23 12:15:26.000000000 -0500
@@ -86,6 +86,17 @@ _stdcall void Sleep(int);
#define usleep(v) Sleep(v / 1000)
#endif

+
+
+/*
+ * BeOS uses snooze (x/1000) in place of usleep(x)
+ */
+#ifdef BEOS
+#define usleep(v) snooze(v/1000)
+#endif
+
+
+
/*
* POSIX stuff
*/



re usleep
 By Begasus_ - Posted on December 23, 2007 - 02:49:24   (#22298)
 Current version when comment was posted: 2.9.2 beta1
I know (heard from the people in #haiku at freenode) that usleep is implemented as snooze in BeOS, trying to get it to use snooze instead of usleep is something I don't know how to do (yet). Probably there has to be some ifdef for BeOS that I need to add then. Any tips are welcome. ;)

usleep on BeOS
 By _edge - Posted on December 22, 2007 - 15:38:45   (#22296)
 Current version when comment was posted: 2.9.2 beta1
usleep on BeOS is implemented as snooze

i.e.,
usleep(x) is snooze(x/1000)

just FYI...

Re: libroot/libposix
 By tonestone57 - Posted on December 22, 2007 - 09:47:15   (#22294)
 Current version when comment was posted: 2.9.2 beta1
You still have to link in libposix into the binary itself so that the binary will use this library. Otherwise the binary won't look for or use libposix.

Basically, you need to modify the Makefile. And either add -lposix to LIBS= ( easiest way ) or add it to the line where the libraries get linked to the binary.

I can't say for sure if linking libposix in will solve the missing usleep symbol. But, usleep is found in libposix so *probably* will work.

libroot/libposix
 By Begasus_ - Posted on December 17, 2007 - 08:31:48   (#22280)
 Current version when comment was posted: 2.9.2 beta1
I've try'd to copy the above libraries into the lib folder for angband ... libposix (zeta) gives me the same undefined symbol in R5.
libroot (haiku or zeta's) gives me another undefined symbol, so it's a no go yet ...

RE: 3.0.9 for ZETA and Haiku
 By tonestone57 - Posted on December 4, 2007 - 12:34:43   (#22256)
 Current version when comment was posted: 2.9.2 beta1
I checked and found the following:

Zeta & Haiku have usleep in libroot.so ( & in libposix.so when present ).

Dano is missing usleep in libroot.so but has it in libposix.so. Sorry, don't have BeOS R5 installed to check but probably the same thing.

Maybe linking to libposix.so will solve the missing symbol issue? Just one thought ( other solutions are remove usleep from program or port Haiku's libroot to BeOS R5 ).

3.0.9 for ZETA and Haiku
 By Begasus_ - Posted on December 4, 2007 - 11:05:58   (#22255)
 Current version when comment was posted: 2.9.2 beta1
Compiled the latest version for angband and checked in BeOS/ZETA and Haiku, only BeOS R5 suffers from a missing symbol (usleep) at the moment ... this is being looked at by the developer and should be updated in the near future ...

 
The Green Board
  Recent Downloads  -  # 756
Total Downloads  -  # 2,211
Total Views  -  # 2,250
User Ratings  -  N/A
  Classic Games
Role Playing Games
Text Based Games
1.  QEMU - 9.62
2.  ScummVM - 9.50
3.  cpu_fix - 9.42
4.  Jukebox - 9.36
5.  Haiku AGP busm... - 9.35
6.  vim6 - 9.31
7.  Beezer - 9.25
8.  BeeF - 9.25
9.  HandBrake - 9.24
10.  DOSBox - 9.22
1.  Realtek RTL8139... - 289
2.  BeOS 5 Personal... - 257
3.  ATI Rage 128 Pr... - 196
4.  Ati Radeon Grap... - 183
5.  USB Serial driver - 123
6.  DjVu Viewer - 120
7.  Broadcom 440x 1... - 113
8.  Intel Extreme Gr... - 85
9.  Sound Blaster Pr... - 77
10.  Ensoniq AudioPCI... - 75
You are not logged in.
 Login or create an account...
Hosted by NetConnect

 
Unless otherwise noted, everything is copyright © 1999-2002 Fifth Ace Productions, LLC. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.
Fifth Ace Productions