IRC logs for #opendune on OFTC at 2011-04-25
⏴ go to previous day
08:03:15 *** Alberth has joined #openDune
12:33:39 * Alberth works on removing 'emu_' from WSA routines
12:33:51 <TrueBrain> awh, I wanted to do that! :p :D :)
12:33:59 <TrueBrain> if they are all called from C functions now, that is finally doable ...
12:34:23 <TrueBrain> my idea was to put all WSAs in memory, in all cases
12:34:41 <TrueBrain> but there is a minor problem with the intro screen, as then it assumes in the buffer is the image of the last WSA ...
12:34:48 <TrueBrain> annoying piece of code :p
12:35:45 <TrueBrain> (WSA has 2 options: either work in a screen buffer, or in memory. In memory is much better and easier, but there is one instance where that fails. The intro goes from NNNA.WSA to NNNB.WSA, assuming the screenbuffer ... I needed the C code to fix it :D)
12:35:48 <Alberth> I need WSA_* for my B4DA_0000 conversion
12:36:05 <TrueBrain> why not call the emu_ parts?
12:37:35 <Alberth> because it is an emu_* function?
12:37:44 <TrueBrain> you can still call them, not? Like you do many many others :)
12:37:54 <Alberth> but if you want to finish the patch, I can give it to you
12:38:10 <TrueBrain> well, you are free to do it :)
12:38:28 <TrueBrain> I did the initial start on WSA stuff, but I couldn't finish it because some callers were still in decompiled/
12:39:32 <TrueBrain> it is one of the more uglier conversions I have done :D
12:39:32 <Alberth> emu_al = emu_get_memory8(0x2C6C, houseID *8, 0x2); <-- I am stuck on this one
12:39:54 <TrueBrain> 2C6C is a struct of 8 bytes big, HOUSE_MAX size, clearly :p
12:43:05 <glx> so rare, all bytes are accessed
12:43:07 <Alberth> I should add that to global segments?
12:43:28 <TrueBrain> it is not in the global 353F, if that is what you mean
12:43:33 <TrueBrain> don't know what is in it :p
12:44:12 <glx> it's a kind of g_houseXXX
12:44:47 <Alberth> the emu_WSA_* calls still need to be replaced.
12:45:50 <TrueBrain> haha, I guess that should be done yes :)
12:46:10 <TrueBrain> don't forget to add the functions to the header files
12:47:02 <TrueBrain> and if you can move the C functions to wsa.c, it sounds like a good patch, yes :D
12:49:53 <Alberth> I was not thinking that far ahead :)
13:08:02 <Alberth> TrueBrain: there are still other emu_WSA calls in decompiled/cs__B4DA.c and decompiled/cs__B495.c
13:11:16 <Alberth> btw, any reason why there is 'extern' in front of function declarations?
13:18:39 <glx> hmm ok f__1DD7_0719_0014_A78C() doesn't need emu_ wrapper, let's start working on this one
13:28:28 <glx> but later, for now I'm watching "the great escape"
14:15:57 <Alberth> one wsa_func2.patch for you, in 0000066
14:21:52 <Alberth> just 38 freaking KB :p
15:00:45 <Alberth> no relations between issues apparently :)
15:01:21 <TrueBrain> right ... I should boot to linux and apply your patches I guess :p
15:03:31 <Alberth> I am going to make diner now, so suit yourself :)
15:05:35 <TrueBrain> my linux appears broken :(
15:05:41 <TrueBrain> doesn't want to go in graphics mode
15:05:47 <TrueBrain> and doesn't want to come out either :( :( :(
15:08:50 <TrueBrain> so that is a no on programming ....
15:09:06 <TrueBrain> maybe glx wants to look at it :p
15:09:33 <Alberth> now you have to play sysadmin instead :p
15:09:41 <TrueBrain> not going to bother
15:09:45 <TrueBrain> and tnx for replying on forum :)
15:10:39 <Alberth> just trying to prevent starvation of this user :)
15:13:59 <glx> hmm sound should work directly without running setup
15:15:14 <TrueBrain> I guess he had an old dune.cfg
15:20:15 <TrueBrain> lol, seems I was in the middle of a conversion of my own .. hmm ..
15:28:26 <TrueBrain> @return \c 0 on failre
15:29:49 <TrueBrain> he uses it inconsistent
15:29:58 <TrueBrain> and we never used it .. so I think we can beter not use it, or change it everywhere
15:32:53 <DorpsGek> SVN: truebrain (r1480) -Add: C-ified WSA functions better (patch by Alberth)
15:33:49 <DorpsGek> SVN: truebrain (r1481) -Fix: C-ified 07AE functions better (patch by Alberth)
15:38:39 <DorpsGek> SVN: truebrain (r1482) -Add [#64]: C-ified GUI_Unknown_24D0_000D() (patch by Alberth)
15:38:56 <TrueBrain> hmm ... #64 didn't do what it should do, I think
15:39:09 <TrueBrain> Xaroth|Work: what did I do wrong?
15:39:59 <glx> IIRC it doesn't auto close
15:40:08 <TrueBrain> no, but it should add a comment
15:40:26 <DorpsGek> SVN: truebrain (r1483) -Add (#62): named Tools_Free_Wrapper() (patch by Alberth)
15:40:28 <glx> ha the format is -Bla (#XX)
15:44:54 <DorpsGek> SVN: truebrain (r1484) -Add (#61): C-ified Unknown_259E_00B1() (patch by Alberth)
15:45:38 <TrueBrain> Alberth: #63 needs some more love :D
15:46:21 <TrueBrain> and it seems it does something like: showMentat ;)
15:46:45 <TrueBrain> with the wsaFilename as image in the mentat window
15:48:15 <TrueBrain> #65 no longer applies cleanly :(
15:51:50 <TrueBrain> you forgot to include emu_PrepareEnd
15:54:14 <DorpsGek> SVN: truebrain (r1485) -Add (#65): C-ified PrepareEnd() (patch by Alberth, mostly :p)
15:57:45 <DorpsGek> SVN: truebrain (r1486) -Fix: remove no longer used emu_ wrappers
15:57:50 <TrueBrain> that wraps most of that up
16:04:06 <Alberth> I am aware of #63, but the #66 stuff got in the way :)
16:26:46 <DorpsGek> SVN: glx (r1487) -Fix (r1484): MSVC wants sleep.h to be included before math.h
16:32:04 <Alberth> I get some additional warnings, like src/opendune.c:1202:10: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] <-- I caused this one, probably
18:01:52 <DorpsGek> SVN: glx (r1488) -Add: C-ified Driver_Music_0719()
18:02:12 <glx> the more I convert driver stuff, the less I understand it :)
18:03:17 <Alberth> perhaps it is from some libraries that they used?
18:03:55 <Alberth> each with its own way of doing things :)
18:04:15 <glx> yes it uses the classic miles lib
18:05:18 <glx> like many games at that time
18:05:36 <glx> even nowadays game still use miles lib
18:48:49 <Alberth> euhm, HOUSE_MAX is 6, not 8. That does not match with (14:39:57) TB: 2C6C is a struct of 8 bytes big, HOUSE_MAX size, clearly :p :)
18:50:15 <Alberth> oh, duh, uint[HOUSE_MAX][8] of course
20:05:25 <Alberth> Program Termination: jumped to 3FF1:20EC, which is not decompiled. <--- from issue 67
20:05:25 <Alberth> The jump was triggered at ..\decompiled\cs__B4DA.c:1914
20:06:20 <Alberth> My code broke at the exact same point, except I was the cause :p
20:06:43 <Alberth> but that's for another day, good night
20:37:59 <glx> hmm wrong emu_cs it seems
20:55:12 <glx> ok I can't reproduce the crash but there's a bug
20:57:00 <glx> whatever house you chose, the question is "Do you wish to join house Harkonnen ?" with "Harkonnen ?" misaligned
21:03:03 <glx> wrong emu_cs somewhere, trying to find it
21:03:25 <SmatZ> I got a hangup after pressing "play game" in the main menu
21:04:24 <SmatZ> [22:57:01] <glx> whatever house you chose, the question is "Do you wish to join house Harkonnen ?" with "Harkonnen ?" misaligned <== seems to be caused by r1482
21:09:08 <SmatZ> emu_push(24 * (ret + 1));
21:09:13 <SmatZ> GUI_Unknown_24D0_000D(0, 24 - (ret + 1), 26, 0, 13, 24, 2, 0);
21:10:35 <SmatZ> glx: fixing it fixes the problem you described
21:10:41 <SmatZ> the misaligned "harkonnen" text
21:11:13 <glx> it fixes alignment and text
21:12:20 <glx> hmm he didn't change all references
21:13:22 *** mujahid has joined #openDune
21:14:45 <SmatZ> emu_push(emu_cs); emu_push(0x0199); emu_cs = 0x24D0; emu_GUI_Unknown_24D0_000D();
21:15:02 <SmatZ> somewhere, there remain those emu_push(cs, ip) ... is that the problem?
21:15:18 <glx> not a problem it's the emu_ function
21:15:43 <SmatZ> well, somewhere those emu_push() are removed
21:15:56 <SmatZ> so you won't get wrong (different) value of SP?
21:16:12 <glx> they are removed for non emu_ functions ;)
21:17:22 <SmatZ> I am confused why somewhere, emu_ is used, somewhere not :)
21:40:14 <DorpsGek> SVN: glx (r1489) -Fix (r1482): a-(b+1) != a*(b+1). Also use GUI_Unknown_24D0_000D() instead wrapper when possible
21:54:23 <SmatZ> if emu_GUI_Unknown_24D0_000D() isn't used anywhere, will it be removed?
21:54:36 <SmatZ> or is it possible there are still some hidden callers? (not yet found)
21:55:17 <SmatZ> I am used to search only in src/
23:27:58 <glx> about #67, somehow overlay didn't reload correctly
23:28:37 <glx> because emu_cs seems correct but content in emu_cs segment is wrong
23:41:46 <glx> ok emu_cs=0x3FF1 but code is loaded at 0x3FF0
23:46:41 <glx> 3FF0:0000 00 00 00 00 00 00 00 00 00 00 00 00 00 da 34
23:46:41 <glx> 3FF1:0000 00 00 8b d8 c4 9f ec 37 26 8a 07 98 50 1e b8 7a
23:46:41 <glx> 3FF0:0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 da 34
23:46:43 <glx> 3FF1:0000 55 8b ec 83 ec 06 56 57 8b 7e 0a 8b c7 ba 1e 00
23:53:51 <glx> hmm unless he uses another dune.exe version
23:54:22 <glx> dunno if that can cause this kind of things
continue to next day ⏵