IRC logs for #opendune on OFTC at 2011-03-30
            
00:03:25 *** glevans2 has joined #openDune
01:24:42 *** glevans2 has quit IRC
01:25:06 *** glevans2 has joined #openDune
02:49:36 *** glx has quit IRC
03:59:16 *** DorpsGek has joined #openDune
03:59:16 *** ChanServ sets mode: +o DorpsGek
03:59:20 *** Yexo- has joined #openDune
04:00:50 *** tneo has quit IRC
04:01:15 *** Yexo has quit IRC
12:17:07 *** glx has joined #openDune
12:17:07 *** ChanServ sets mode: +o glx
12:17:49 <glx> hello
12:48:00 *** Osai has quit IRC
12:50:00 *** SmatZ has quit IRC
12:50:03 *** tneo- has quit IRC
12:50:25 *** Yexo- has quit IRC
12:50:33 *** planetmaker has quit IRC
14:06:51 *** SmatZ has joined #openDune
14:07:21 *** tneo has joined #openDune
14:07:51 *** Osai has joined #openDune
14:09:21 *** Yexo has joined #openDune
14:09:21 *** ChanServ sets mode: +v Yexo
14:10:21 *** planetmaker has joined #openDune
14:10:21 *** ChanServ sets mode: +v planetmaker
17:32:55 *** Alberth has joined #openDune
17:33:27 <Alberth> moin
18:01:09 * Alberth wanders around in the code without much focus
18:19:51 <TrueBrain> like we all do :D
18:53:17 <Alberth> http://devs.openttd.org/~alberth/diffs/f__1DD7_0213_0016_41ED.patch
18:53:30 <Alberth> no doubt I forgot something :)
18:54:26 <TrueBrain> emu_ function is not in the right format :p
18:54:54 <TrueBrain> and maybe: Free_IfNotNull ?
18:54:57 <TrueBrain> or:
18:54:59 <TrueBrain> Free_Safe
18:55:22 * Alberth picks the first option
19:00:51 <Alberth> with 'not the right format' meaning not changing 'Decompiled function f__1DD7_0213_0016_41ED() ' ?
19:03:17 <TrueBrain> the popping of emu_cs etc
19:03:36 <TrueBrain> emu_bp vs emu_sp, in result of that :p
19:03:50 <TrueBrain> in this case, it doesn't _really_ matter, but I like to keep things more equal :)
19:03:56 <TrueBrain> just open any other emu_ function, and you will see :)
19:05:53 <Alberth> hmm, so perhaps the file is wrong?
19:06:02 <TrueBrain> sorry?
19:06:37 <TrueBrain> what I mean: alle emu_ functions have a layout:
19:06:41 <TrueBrain> first they pop ip/cs
19:06:50 <TrueBrain> then they read parameters (via emu_sp now, as the emu_bp is invalid)
19:06:53 <TrueBrain> then it calls the C function
19:06:57 <TrueBrain> then it cleans up and returns
19:07:34 <Alberth> ah
19:07:51 <TrueBrain> it has to do with cleanups later on; in this format, it means no stack is changed in emu_s
19:07:58 <TrueBrain> so callers can easily remove it by replacing it with the C function
19:08:01 <TrueBrain> without changing anything
19:08:41 <TrueBrain> (and move it to emu_tools etc etc ;))
19:13:47 <glx> hmm 1DD7 functions are related to drivers IIRC
19:14:43 <glx> + emu_push(ptr.s.cs);
19:14:44 <glx> + emu_push(ptr.s.ip);
19:14:44 <glx> we put that on one line, to show it's one value in two words
19:15:12 <glx> like emu_push(s.cs); emu_push(s.ip);
19:15:19 <Alberth> that's easy :)
19:16:33 <glx> and ptr = emu_get_csip32(emu_ss, emu_sp, 0x0) ;)
19:16:47 <TrueBrain> lol, nice catch :)
19:17:17 <glx> like in other places, with of course pop return cs:ip before that
19:18:00 <glx> all these are things you'll learn progressively :)
19:18:10 <Alberth> I hope so :)
19:18:23 <TrueBrain> we had to 'write' those rules
19:19:31 <glx> well you did, I just follow the examples :)
19:19:41 <TrueBrain> :D
19:19:45 <glx> same for commit messages ;)
19:19:54 <TrueBrain> I adjusted to you too, so :)
19:20:11 <TrueBrain> you sometimes did things in a way I was like: not too bad
19:20:14 <TrueBrain> and adjusted to that :)
19:20:22 <TrueBrain> if you read the 'older' parts, you laugh your ass off :D
19:21:57 <Alberth> http://devs.openttd.org/~alberth/diffs/f__1DD7_0213_0016_41ED.patch attempt 2
19:22:31 <TrueBrain> != 0 -> != 0x0
19:22:35 <TrueBrain> pointers we indicate with 0x0 :)
19:22:36 <Alberth> I think you have that with any code, when I see my own code of a few years back, I always think 'what a mess' :)
19:22:51 <TrueBrain> well, I meant: it went to a lot of iterations of a way of doing this
19:22:53 <TrueBrain> and really many :D
19:23:09 <TrueBrain> and what I personally like more, instead of the != 0) {}
19:23:10 <TrueBrain> == 0) return
19:23:30 <TrueBrain> (less nesting == easier to read)
19:23:33 <glx> I looked at f__22A3_000D_0010_9291() and f__22A6_0004_0003_DA0F()
19:23:40 <glx> makes no sense to me
19:23:53 <Alberth> I can imagine you have to learn what system works best by trying
19:23:57 <TrueBrain> +extern void emu_Tools_Free();
19:24:12 <TrueBrain> why is this needed? Hmm .. shouldn't it ben in an include?
19:24:14 <TrueBrain> (tools.h even)
19:24:39 <glx> and remove the function from decompiled.h
19:24:54 <TrueBrain> and add it to tools.h :p
19:24:55 <TrueBrain> hihi
19:25:00 <TrueBrain> well, then you have had everything I guess :D
19:26:36 <Alberth> emu_Tools_Free() is in decompiled somewhere
19:26:45 <TrueBrain> owh, only named
19:26:46 <TrueBrain> I see
19:26:48 <TrueBrain> fair enough :)
19:26:56 <TrueBrain> sometimes forget :D
19:27:06 <glx> yes Malloc and Free are just named
19:27:17 <glx> we won't never convert them
19:27:22 <glx> would be silly :)
19:27:23 <TrueBrain> true
19:30:39 <Alberth> fixed
19:31:12 <TrueBrain> add the emu_ to tools.h ;)
19:31:59 <TrueBrain> but perfect :)
19:32:08 <TrueBrain> if glx can, he can commit it? :D (I can't, too busy :( )
19:32:50 <glx> oh too many @implements ;)
19:33:08 <glx> but I did this "mistake" too at the begining
19:33:50 <Alberth> you don't want to keep them all ?
19:33:58 <TrueBrain> just the one with a ()
19:34:05 <glx> only the first one is needed for JIT
19:34:06 <TrueBrain> (first one, normally)
19:35:10 <Alberth> done
19:35:39 <Alberth> so many details to remember
19:39:29 <DorpsGek> SVN: glx (r1443) -Add: C-ified emu_Tools_Free_IfNotNull() (patch by Alberth)
19:39:39 <Alberth> f__22A6_0004_0003_DA0F() looks like a csip calculation to me
19:41:09 <glx> for me too, but the sequence is 22A3 -> 22A6 and the return value is skiped (args are ignored too)
19:42:27 <glx> so the only thing really done is 7097 = something(7096) and always return true
19:42:46 <TrueBrain> nothing wrong with that :p
19:43:20 <Alberth> dx is passed to the end of 22a3
19:43:48 <glx> and ignored ;)
19:44:58 <glx> it's some kind of library implementing an API
19:45:44 <glx> calling another lib implementing a different API ;)
19:57:01 <glx> http://svn.opendune.org/~glx/temp.patch <-- 2 functions become 1 line :)
19:58:04 <TrueBrain> ah, lol
19:58:05 <TrueBrain> INT return value
19:58:08 <TrueBrain> 0xFF for not installed
19:58:10 <TrueBrain> 0x0 for installed
19:58:29 <TrueBrain> or something
19:58:55 <TrueBrain> funny that it is used for some overlay check :p
20:00:13 <glx> the if (emu_ax == 0) part was unresolved IIRC
20:09:20 <glx> hmm if my conversion is right, 0x7097 is always != 0
20:10:37 <TrueBrain> can't g_global->mouseInstalled be 0?
20:10:43 <TrueBrain> owh
20:10:44 <TrueBrain> lol
20:10:46 <TrueBrain> nevermind :D
20:12:26 <glx> anyway all this is temporary
20:17:16 <DorpsGek> SVN: glx (r1444) -Add: inlined the only 22A3 function. Another segment is done
21:06:50 *** Alberth has left #openDune