IRC logs for #opendune on OFTC at 2011-06-03
            
00:00:17 <glx> "TZ"
00:01:25 <TrueBrain> it does a getenv on it ...
00:01:29 <TrueBrain> now .. how did I store that shit :D
00:01:32 <TrueBrain> think it is empty
00:02:14 <TrueBrain> always NULL indeed
00:03:11 <glx> env is in the memory
00:26:57 <DorpsGek> SVN: glx (r1748) -Fix: replaced a global csip32 with uint8*
00:47:54 <DorpsGek> SVN: glx (r1749) -Add: more removal of useless code
00:53:35 <glx> hmm all stuff in dune.cfg is constant now (except language)
00:54:42 <glx> hmm no, voice music and sound can be disabled
02:43:18 *** glx has quit IRC
05:11:08 *** Xaroth_ has joined #openDune
05:17:39 *** Xaroth has quit IRC
08:26:40 *** Alberth has joined #openDune
09:58:39 *** fjb is now known as Guest3266
09:58:40 *** fjb has joined #openDune
10:05:50 *** Guest3266 has quit IRC
10:40:02 <Alberth> howdie
10:54:54 <Alberth> how is r1747 (-Add: named a function) an 'Add' rather than a 'CodeChange' ?
10:55:58 <Xaroth|Work> 1744 is also not an 'add' but a 'Remove' :)
10:56:03 <Xaroth|Work> so is 1743 :P
11:02:07 <Alberth> :D
11:03:07 <DorpsGek> SVN: alberth (r1750) -Codechange: Name a function.
11:10:28 <Xaroth|Work> gz on your 2nd commit :P
11:24:24 <Alberth> if only they were all this simple :)
11:34:54 <Xaroth|Work> heh
11:39:36 <TrueBrain> Alberth: we nicked everything 'add' that adds something new :)
11:39:46 <TrueBrain> might be a bit odd, but else all commits would have been codechange :)
11:40:29 <Alberth> and now they are all 'add' :)
12:02:00 *** glx has joined #openDune
12:02:00 *** ChanServ sets mode: +o glx
12:02:19 <glx> hello
12:06:05 <TrueBrain> o/
13:12:15 <DorpsGek> SVN: glx (r1751) -Add: C-ified MPU_SetVolume()
13:37:47 <Alberth> http://devs.openttd.org/~alberth/cs__29A3.c I mostly converted the mouse functions
13:39:09 <Alberth> not sure what to do next with it
13:39:55 <Alberth> besides the missing value, there are interrupt routines in there, which are less useful to convert :p
13:40:56 <Alberth> for the interested parties, I have a patch queue of 11 patches :)
13:41:49 <TrueBrain> can you name it .txt? :D
13:45:52 <Alberth> add a ".txt"
13:47:41 <TrueBrain> it all still works?
13:47:43 <Alberth> hmm, auto-completion is getting ieky. It knows about openttd.org and opendune.org, thus "open<TAB>" gives "open|.org" with | the cursor
13:47:55 <Alberth> unlikely that it still works
13:48:14 <TrueBrain> can you do a few more things on that patch:
13:48:16 <TrueBrain> remove labels
13:48:23 <TrueBrain> remove all the pushing and popping :)
13:48:37 <Alberth> I mostly concentrated on this file, not so much on the surrounding files
13:48:49 <TrueBrain> like in HandleMovementIfMoved
13:48:55 <TrueBrain> most of that pushing/popping is not needed :)
13:49:55 <TrueBrain> /* XXX newButtonState was originally pulled from emu_get_memory16(emu_ss, emu_bp, -0x4) in Mouse_HandleMovement,
13:49:56 <TrueBrain> * XXX but no idea how it gets here.
13:49:58 <TrueBrain> * XXX g_global->prevButtonState used as a replacement. */
13:49:59 <TrueBrain> I don't get it?
13:50:29 <Alberth> emu_Mouse_EventHandler is obviously a handler called from an interrupt, emu_Mouse_Init does mouse init, which we will do differently I guess, and emu_Mouse_CallbackClear is a reset-interrupt routine, I think
13:50:56 <Alberth> emu_Mouse_HandleMovementIfMoved is called from the Input_ functions
13:51:52 <TrueBrain> Alberth: yes, and that is fine. Still, most of the pushes and pops are nto needed :)
13:52:04 <TrueBrain> if you don't use emu_di, you don't have the push/pop it ;)
13:53:11 <TrueBrain> emu_push(emu_cs);
13:53:12 <TrueBrain> emu_pop(&emu_es);
13:53:14 <TrueBrain> emu_es = emu_cs
13:53:52 <Alberth> the called function Mouse_HandleMovement() does emu_ax = Mouse_CheckButtons(emu_get_memory16(emu_ss, emu_bp, -0x4)); without setting up a stack, so it gets its value from outside
13:54:03 <TrueBrain> CallbackClear <- clear? It installs it, if I read it correctly :)
13:54:18 <Alberth> but I cannot find that point
13:54:20 <TrueBrain> it sets the eventhandler :)
13:54:36 <Alberth> I believe you immediately :)
13:54:52 <TrueBrain> emu_hard_link(0x29A3, 0x0054, &emu_Mouse_EventHandler);
13:54:53 <TrueBrain> :D
13:54:53 <Alberth> but is there any point in messing around in that interrupt code?
13:55:02 <TrueBrain> atm we have to leave it
13:55:06 <TrueBrain> but it needs replacing, of cours
13:55:07 <TrueBrain> e
13:56:45 <TrueBrain> HandleMovement is an inline function
13:56:48 <TrueBrain> different compiler :D
13:56:48 <Alberth> my idea was that it is easier to do this in our context
13:57:09 <Alberth> rather than converting the code
13:57:18 <TrueBrain> yeah, we don't need to C-ify the interrupt code
13:59:30 <Alberth> so we should decide what functions to keep and which to rewrite. You are probably in a far better position to judge that
14:00:25 <Alberth> but it can be done later, of course
14:00:35 <TrueBrain> yeah; what I optimally would like, is all the input code C-ified
14:00:38 <TrueBrain> so we know what it does exactly
14:00:43 <TrueBrain> then we can replace it with direct SDL calls
14:01:06 <Alberth> I was afraid you'd say that :p
14:01:40 <Alberth> will have another try on that big file
14:01:56 <TrueBrain> but well yeah, clean this file up a bit more, and commit it :)
14:03:57 <TrueBrain> emu_ax = Mouse_CheckButtons(emu_get_memory16(emu_ss, emu_bp, -0x4)); <- yeah, that won't work ..
14:04:24 <TrueBrain> emu_addw(&emu_sp, 0x2); => emu_sp += 2 ;)
14:04:54 <TrueBrain> EventHandler <- doesn't that miss a } ?
14:05:41 <Alberth> it needs more cleaning than 'a bit more' :)
14:06:12 <TrueBrain> emu_push(emu_cs); emu_push(0x0171); emu_cs = 0x2B6C; emu_GUI_Mouse_Hide(); <- C function! :p
14:07:06 <Alberth> as I said, I see no point in further cleaning up code we are going to throw away anyway
14:07:20 <Alberth> (or at least, I tried to express that) :p
14:07:40 <TrueBrain> yeah, but at least remove the useless stuff, so it becomes readable :)
14:07:42 <TrueBrain> emu_ax = Mouse_CheckButtons(emu_get_memory16(emu_ss, emu_bp, -0x4)); <- btw, this is wrong
14:07:51 <TrueBrain> in this case, -0x4 is filled with emu_bx
14:08:06 <TrueBrain> (in EventHandler)
14:08:17 <TrueBrain> emu_get_memory16(emu_ss, emu_bp, -0x4) = emu_bx;
14:08:18 <TrueBrain> emu_get_memory16(emu_ss, emu_bp, -0x2) = emu_ax;
14:09:04 <Alberth> yes, it seems to take ax, bx, cx, dx
14:09:16 <TrueBrain> it comes from the interrupt handler
14:09:26 * Alberth nods
14:09:32 <TrueBrain> so you can't put C parameters in it yet :)
14:09:52 <Alberth> that no doubt has a definition of its parameters
14:10:31 <TrueBrain> and he -0x4 in HandleMovement is also this emu_bx in one of the two calls
14:11:11 <Alberth> the missing value comes from input_ code
14:11:30 <TrueBrain> the other caller is wrong ... that just is plain wrong ....
14:11:53 <TrueBrain> also seems to pick out emu_bx
14:11:57 <TrueBrain> but that is more luck then anything
14:12:26 <Alberth> but it is compiled code, isn't it?
14:12:54 <TrueBrain> it is; and this looks like a bug
14:12:59 <TrueBrain> might just happen to end up correctly
14:13:17 <TrueBrain> but like I said: I tried converting these functions before, and it resulted in tons of glitches
14:13:35 <TrueBrain> lot of magic going on here
14:13:48 <Alberth> yeah, that's why I concentrated on getting them in an understandable state rather than commit-ready
14:14:01 <TrueBrain> well, if I look at this, it doesn't compile :D
14:14:49 <TrueBrain> this is going to be such a pain in the butt, to peal down layer by layer of the input devices :)
14:14:50 <Alberth> I didn't try that for the last 7 or so patches in the queue :)
14:14:52 <TrueBrain> they are so mixed up :p
20:40:25 <DorpsGek> SVN: glx (r1752) -Add: C-ified MPU_0564(), MPU_0610() and MPU_21CE(). Removed a useless function.
21:04:45 *** fjb is now known as Guest3328
21:04:47 *** fjb has joined #openDune
21:06:40 *** Guest3328 has quit IRC
22:20:26 <Alberth> grr, stupid compiler: emu_push(emu_cs); emu_pop(&emu_ds); <-- and thus breaking my g_global assumptions :(
22:23:54 <glx> hehe
22:25:34 *** Alberth has left #openDune
22:27:43 <DorpsGek> SVN: glx (r1753) -Add: C-ified MPU_074E() and MPU_1C49()
23:40:18 *** Xaroth has joined #openDune
23:40:18 *** ChanServ sets mode: +o Xaroth
23:46:32 *** Xaroth_ has quit IRC