IRC logs for #opendune on OFTC at 2011-04-06
⏴ go to previous day
00:48:22 <DorpsGek> SVN: glx (r1467) -Add: C-ified Driver_Voice_LoadFile()
17:22:14 *** Alberth has joined #openDune
17:41:25 <Alberth> glx: you got fed up waiting? :)
17:42:16 <glx> I just fixed some style before commiting
17:42:55 <Alberth> waiting for me to try again
18:10:53 <DorpsGek> SVN: glx (r1468) -Fix (r1466): gcc warnings
18:16:42 <Alberth> while (emu_get_memory16(emu_ds, 0x00, 0x705E) != 0x0) ; <-- interesting code at 2b6c:013e, but how to code a spin lock properly?
18:42:05 <Alberth> hmm, function also has function pointers that magically get a value, tricky
18:47:16 <Alberth> better find another one first :)
19:16:29 <glx> anyway for things like while (emu_get_memory16(emu_ds, 0x00, 0x705E) != 0x0) ; it's better to do while (emu_get_memory16(emu_ds, 0x00, 0x705E) != 0x0) sleep(0);
19:17:41 <glx> <Alberth> hmm, function also has function pointers that magically get a value, tricky <-- emu_ip = emu_get_memory16(emu_ds, 0x00, 0x66B4); ?
19:18:07 <glx> it's not magic, it's hardcoded
19:21:31 <Alberth> you'd expect an assignment somewhere, but I couldn't find one, either by address or by its name in global.h
19:40:32 <Alberth> cs__B536 == 5727 ? (5726 gives the same result)
19:45:52 <glx> 5726:0000 is 00059ef0, 5727:0000 is 00059f00
19:46:13 <glx> the script is not that good ;)
19:47:40 <glx> csip before the address is not derivated from the address, maybe I should try to do that
20:21:05 <Alberth> I just wrote a brute-force search program in 10-15 lines of python, maybe it should do those calculations instead :)
20:23:07 <Alberth> you can perhaps also just dump everything, and after finding a match compute the address of the match instead
20:23:22 <Alberth> that would be much more efficient :)
20:24:21 <glx> addr = "0x"substr($0, 4, 5)
20:24:21 <glx> if (cs == 0) cs = rshift(addr - 0x2C90, 4)
20:24:21 <glx> ip = addr - lshift(cs + 0x2C9, 4)
20:24:23 <glx> printf " %04x:%04x", cs, ip
20:25:15 <glx> it computes cs on first decompiled line
20:25:28 <glx> and calculates ip based on that
20:27:07 <glx> 573b:0008 5a048: 55 push bp <-- B536:0148
20:27:32 <glx> should be 5727:0148 instead
20:28:27 <Alberth> saved that text for the next time :)
20:35:02 <Alberth> glx: do you have the address of cs__259e ?
20:36:08 <glx> but the script expect 259e ;)
20:37:24 <Alberth> Oh, not starting with B. /me needs sleep :)
22:18:17 <Alberth> saved, I must go to bed now :)
continue to next day ⏵