#pentagram@irc.freenode.net logs for 12 Dec 2002 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[00:50:52] --> celebrant has joined #pentagram
[00:51:12] <-- celebrant has left #pentagram ()
[01:30:48] --> sg1-cashman has joined #pentagram
[01:38:27] <-- Dominus has left IRC (Read error: 104 (Connection reset by peer))
[01:52:11] <-- DarkeWork has left #pentagram ("*pawwave*")
[01:55:15] <sg1-cashman> hmmmmm almost time to go to work1! Bye!!
[01:55:18] <-- sg1-cashman has left #pentagram ()
[06:59:33] --> Darke has joined #pentagram
[06:59:33] --- ChanServ gives channel operator status to Darke
[07:15:48] --> Colourless has joined #Pentagram
[07:15:48] --- ChanServ gives channel operator status to Colourless
[09:40:40] <-- Colourless has left IRC (Read error: 110 (Connection timed out))
[09:59:15] --> wjp has joined #pentagram
[09:59:15] --- ChanServ gives channel operator status to wjp
[11:09:27] <-- wjp has left IRC ("bbl")
[13:21:26] <-- Darke has left IRC ("Inficio-Infeci-Infectum")
[13:30:29] --> Colourless has joined #Pentagram
[13:30:29] --- ChanServ gives channel operator status to Colourless
[14:14:47] --> wjp has joined #pentagram
[14:14:47] --- ChanServ gives channel operator status to wjp
[14:14:55] <wjp> hi
[14:15:10] * wjp ran his first snippet of usecode last night :-)
[14:15:36] <wjp> IIRC, it did something to the effect of "push 0x1234", "pop [BP-02]", "push [BP-02]" :-)
[14:27:07] <Colourless> :-)
[14:27:48] <wjp> next step is going to be figuring out how we want to store and/or cache the actual usecode
[14:28:05] <wjp> (raw, that is. I really don't like the idea of 'cooking' it first)
[14:36:42] <Colourless> neither do i
[14:46:20] <wjp> any ideas? :-)
[14:46:59] <wjp> I basically want to have a Usecode class which 'provides' access to usecode functions in some way
[14:47:10] <Colourless> of course i have an idea ;-)
[14:47:21] <wjp> maybe a UsecodeFlex inherited from that for the default usecode file
[14:47:29] <wjp> want to share it, too? :-)
[14:47:34] <Colourless> yes a UsecodeFlex is the first step[
[14:48:02] <Colourless> now for each individual class, it would probably be best to read all the headers
[14:48:17] <Colourless> and from those headers construct a UsecodeClass object for each Class
[14:48:40] <Colourless> the function data should be kept raw, but unloaded, until required
[14:49:54] <wjp> I was thinking of having a function that ensures that a given function is fully loaded
[14:50:01] <wjp> so that we could swap things out again too if necessary
[14:50:06] <Colourless> yes sounds reasonable
[14:50:18] <wjp> (so we call that function when starting to execute code in it)
[14:50:38] <Colourless> the UsecodeFlex class would have a method like "UsecodeClass *GetClass(uint32 classnum)"
[14:52:01] <Colourless> what you need to think about it when interpreting, you need to ensure that you are not requiring information that will mess up the RET opcodes, and loading/saving
[14:52:58] <Colourless> but that's a trivial thing
[14:53:30] <Colourless> just need to make sure the CS and IP 'registers' are always correct
[14:55:21] <wjp> hm, I don't think I see what you mean
[14:56:09] <Colourless> with what?
[14:56:28] <wjp> the last three lines
[14:56:53] <wjp> make sure I don't read things from functions that aren't loaded?
[14:57:24] <Colourless> no
[14:57:37] <Colourless> with the way the interpreter is currently setup, you don't really need to worry about what i just said
[14:58:29] <Colourless> what i was just trying to say was don't attempt to use native pointers to usecode function data
[14:58:47] <Colourless> but i already made sure things weren't constructed like that
[15:00:52] <wjp> ah, I see
[15:08:46] <Colourless> so, what sort of changes have you made to my and darke's code?
[15:11:42] <Colourless> i honestly think that using a IBufferDataSource in the way we are to access the usecode data isn't the correct way :-)
[15:13:02] <Colourless> it works, but feels like a hack to m
[15:13:03] <Colourless> e
[15:13:21] <wjp> I know
[15:13:52] <wjp> it has the right functions though, so I'm just using it for now :-)
[15:14:14] <wjp> otherwise I'd be spending this entire month coding support classes :-)
[15:15:07] <Colourless> yes, maybe an abstraction from it is the right way, will make it seem like less of a hack, but still have same functionality. Perhaps the difference is in the future it will directly accept a UsecodeClass to it's 'load' function or similar
[15:23:35] <wjp> what about the heap? (or whatever we're going to call the place where we're going to store strings and lists)
[15:23:52] <Colourless> you... need to talk to darke about that ;-)
[15:24:04] <wjp> funny, Darke told me to ask you :-)
[15:24:05] <Colourless> i honestly don't know half that stuff is meant to work
[15:24:16] <Colourless> yeah i noticed
[15:24:25] <Colourless> he said talk about 'usecode pointers'
[15:24:29] <wjp> true
[15:24:49] <wjp> it seems we need strings, lists and stringlists
[15:25:21] <Colourless> aye, darke as far as I know, has some sort of idea where there memory was allocated, and how they are freed
[15:25:41] <wjp> lists appear to be only of the 16-bit-int variety, but we may want to allow for struct/sint32 lists too
[15:25:55] <wjp> wasn't freeing done explicitly?
[15:26:01] <Colourless> yeah it was
[15:26:40] <Colourless> just not sure exactly how changing ownership of them changes that
[15:26:52] <Colourless> i would assume the 'new' thread has to take responsibilty of freeing them
[15:26:56] <wjp> from the comments in Convert.h changing ownership means copying
[15:27:17] <Colourless> if that is so, then that's ok
[15:27:21] <wjp> (opcode 0x6C or maybe 0x63, can't exactly remember)
[15:27:28] <wjp> there's several pages of comments for it :-)
[15:27:42] <Colourless> it could also just mean they used ref counting :-)
[15:28:01] <wjp> true :-)
[15:28:10] <Colourless> which incidently would mean they wouldn't have to worry about lack of size being given to the opcode :-)
[15:28:30] <Colourless> plus it reduces memory usage, something that i think they would be concerned about
[15:29:06] <wjp> so that one would mean increase refcount.. interesting
[15:29:27] <Colourless> the alternative problem is if they attempt to modify the string/list/slist, all hell might break lose, but then again, it could be the desired result though, allowing them to be modified
[15:29:29] <Colourless> yes it would
[15:38:25] <wjp> I think I'll go home; bbl
[15:38:32] <Colourless> cya
[15:38:34] <-- wjp has left IRC ("bbl")
[15:45:51] <-- Kirben has left IRC (Read error: 54 (Connection reset by peer))
[15:59:53] <Colourless> this is interesting.
[16:01:01] <Colourless> in Ultima8 class 124 (that's 7C) Func_3757, the lists and string that passed to is don't get freed by the function
[16:01:42] <Colourless> but you can easily notice that the previous function frees them twice
[16:29:59] --> wjp has joined #pentagram
[16:29:59] --- ChanServ gives channel operator status to wjp
[16:34:41] <Colourless> read the logs :-)
[16:35:48] <wjp> very interesting
[16:38:36] <wjp> I wonder if the called function modifies them (and if the caller reads them afterwards)
[16:38:56] <wjp> oh, the caller doesn't do much after that spawn
[16:39:10] <Colourless> no, it just frees them
[16:42:27] <wjp> I guess this makes rather a strong case for refcounting
[16:42:54] <wjp> OTOH, the frees at the end are probably auto-generated
[16:43:12] <wjp> and they're also necessary if the jmp just above the spawn is taken
[16:44:08] <Colourless> you will also note that the string are used in numerous places above
[16:44:21] <Colourless> s/strings/string and lists/
[16:45:03] <Colourless> it 'looks' to me like that "push list" and "push string" actually duplicate them
[16:45:43] <Colourless> there is code like this:
[16:45:44] <Colourless> 3823: 42 push list [BP+10h] (02)
[16:45:45] <Colourless> 3826: 42 push list [BP-07h] (02)
[16:45:45] <Colourless> 3829: 3F push [BP-0Dh]
[16:45:45] <Colourless> 382B: 40 push dword [BP+06h]
[16:45:45] <Colourless> 382D: 11 call 007C:215E (PENT::215E)
[16:45:46] <Colourless> 3832: 66 free list [SP+08h]
[16:45:48] <Colourless> 3834: 66 free list [SP+06h]
[16:45:58] <Colourless> note that it's a 'call' opcode, not a 'spawn'
[16:46:54] <Colourless> 215E doesn't do anything with 0x6C opcodes
[16:53:17] <wjp> hm
[16:53:29] <wjp> possible, but I'm not sure
[17:05:01] <Colourless> ah yes that would make sense
[17:05:34] <wjp> would that also mean that the list-manipulating opcodes (union, difference) free the original lists?
[17:05:53] <Colourless> no idea
[17:07:05] <wjp> it does look like it
[17:07:15] <wjp> 0112: 42 push list varFA (02)
[17:07:15] <wjp> 0115: 3F push varFE
[17:07:15] <wjp> 0117: 0E create list 01 (02)
[17:07:15] <wjp> 011A: 17 append
[17:07:15] <wjp> 011B: 64 free list varFA
[17:07:16] <wjp> 011D: 01 pop varFA
[17:33:51] <Colourless> i've got to go
[17:33:54] <Colourless> cya
[17:33:55] <-- Colourless has left IRC ("casts invisibility")
[19:30:30] --> Dominus has joined #pentagram
[20:04:19] --> Dark-Star has joined #pentagram
[20:05:04] <Dark-Star> hi
[20:10:24] --> phxl has joined #pentagram
[20:10:33] <phxl> Hi
[20:10:38] <Dominus> hi
[20:10:48] <Dominus> you see, the same gang over here :-)
[20:11:00] <phxl> :D
[20:11:04] <phxl> apparently
[20:11:26] <phxl> it's an Action RPG operating system <-- nice description
[20:11:36] <Dominus> he he
[20:11:50] <Dominus> there is another channel with the same persons: #uwadv
[20:13:33] <Dark-Star> strange, the same persons in three totally different channels... *gg*
[20:22:43] <Dark-Star> could someone update exultbot so that he reports the correct URL of the pentagram logs?? ;-)
[20:23:07] <Dominus> someone=wjp
[20:23:24] <Dominus> no one else can do it :-)
[20:23:37] <Dominus> ?logs
[20:23:37] <exultbot> Logs are available at http://www.math.leidenuniv.nl/~wpalenst/exultlog.php3
[20:23:41] <Dark-Star> yes I know, but I wanted to keep the request a little indirect
[20:23:55] <Dominus> ?version
[20:23:55] <exultbot> The latest official version of Exult is: 0.99.1rc2
[20:24:01] <Dark-Star> hmmm...
[20:24:10] <Dominus> ?faq
[20:24:10] <exultbot> You can find the official FAQ at: http://exult.sourceforge.net/faq.php
[20:24:17] <Dark-Star> where does _he_ get his news from?
[20:24:43] <Dominus> exultbot is always so uninformed...
[20:24:52] <-- wjp has left IRC (Read error: 113 (No route to host))
[20:25:12] <Dark-Star> there goes wjp... did I say something wrong?? ;-)
[20:25:35] <Dominus> he he
[21:52:27] <-- phxl has left IRC ("Are we in Kansas yet?")
[21:59:36] --- Dark-Star is now known as Dark-Star|afk
[22:24:42] --> DarkeWork has joined #pentagram
[22:25:36] <Dominus> hi DarkeWork
[22:39:23] --- Dark-Star|afk is now known as Dark-Star
[22:40:03] <DarkeWork> Hi!
[22:42:36] * DarkeWork wishes people were sufficiently polite to wait until _after_ he'd greeted the irc channel he had just joined, to come to the counter and harrass him for help. *Grin*
[23:38:59] --> Colourless has joined #Pentagram
[23:38:59] --- ChanServ gives channel operator status to Colourless
[23:53:08] <DarkeWork> Hi.
[23:56:14] --> sg1-cashman has joined #pentagram