IRC logs for #opendune on OFTC at 2011-03-30
⏴ go to previous day
00:03:25 *** glevans2 has joined #openDune
01:25:06 *** glevans2 has joined #openDune
03:59:16 *** DorpsGek has joined #openDune
03:59:16 *** ChanServ sets mode: +o DorpsGek
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
18:01:09 * Alberth wanders around in the code without much focus
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: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: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: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: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:16:33 <glx> and ptr = emu_get_csip32(emu_ss, emu_sp, 0x0) ;)
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:23 <TrueBrain> we had to 'write' those rules
19:19:31 <glx> well you did, I just follow the examples :)
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: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:23:09 <TrueBrain> and what I personally like more, instead of the != 0) {}
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: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:39 <glx> and remove the function from decompiled.h
19:24:54 <TrueBrain> and add it to tools.h :p
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: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:31:12 <TrueBrain> add the emu_ to tools.h ;)
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: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:44:58 <glx> it's some kind of library implementing an API
19:45:44 <glx> calling another lib implementing a different API ;)
19:58:08 <TrueBrain> 0xFF for not installed
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: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
continue to next day ⏵