IRC logs for #opendune on OFTC at 2011-04-02
            
03:31:22 *** glx has quit IRC
05:50:26 *** tneo- has joined #openDune
05:52:07 *** tneo has quit IRC
05:52:30 *** planetmaker has quit IRC
05:52:56 *** planetmaker has joined #openDune
05:52:56 *** ChanServ sets mode: +v planetmaker
06:02:39 *** Osai has quit IRC
06:02:39 *** Xaroth has quit IRC
06:02:57 *** Osai^2 has joined #openDune
06:05:12 *** Xaroth has joined #openDune
06:05:12 *** ChanServ sets mode: +o Xaroth
07:35:41 *** Alberth has joined #openDune
10:00:33 <Alberth> trunk crashes here when loading a game
10:00:46 <planetmaker> care to post the game?
10:01:20 <Alberth> I don't even get that far, I click "load game" and then it crashes :)
10:01:41 <planetmaker> :-D
10:01:55 <Alberth> unless we should decompile 0000:0000 as well :)
10:04:28 <planetmaker> wtf means this: warning: invalid DWARF generated by the compiler: DIE 0x00000d33 has multiple AT_byte_size attributes in '/var/folders/Ix/IxRPxjXcGZiOMCR4279yqU+++TI/-Tmp-//cc5t4sle.o'.
10:06:15 * planetmaker tries a re-compile of libemu
10:08:51 <planetmaker> hm... starting a new game fails here with [EMU] [ INT21:3D ] Requesting mode '20' which is not completely supported.
10:08:53 <planetmaker> [PCM] [022C] Not Yet Implemented D1
10:08:55 <planetmaker> Ram Free Error! Press any key to exit to DOS.
10:10:39 <Alberth> you obviously have not enough RAM to run Dune2 :p
10:11:28 <Alberth> updating to r1444 works again here
10:12:08 <planetmaker> I just pulled
10:12:13 <planetmaker> before I compiled
10:12:26 <planetmaker> so it's r1445
10:12:28 <Alberth> pulled? this is SVN :)
10:12:34 <planetmaker> whatever ;-)
10:13:46 <planetmaker> strangely enough I never tinkered with the dosbox settings; so something must have started to eat more ram then
10:14:07 <planetmaker> well... dos? why dos?
10:14:13 <planetmaker> it's natively compiled
10:14:45 <Alberth> yeah, there is no DOS involved here; it is just an obsolete message :)
10:15:34 <planetmaker> I may have a few things running, but dune2 should not fail due to missing ram ;-)
10:15:53 <Alberth> perhaps that [022c] call was implemented as a simple 'no'
10:16:17 <planetmaker> no idea...
10:17:00 <Alberth> I have never seen that call, so perhaps that is already a sign of a different statement execution flow
10:17:01 <planetmaker> but that's something new since the last release
10:17:19 <Alberth> which is over a year ago :p
10:17:32 <planetmaker> I only recall the the int21 thing - which was of no consequence
10:17:56 <Alberth> me too
10:18:26 <planetmaker> 0.3 seems to be from December or do I err, was it just the last change in my dir there?
10:22:00 <Alberth> http://forum.opendune.org/viewtopic.php?f=4&t=56 TB claims April 30, 2010
10:22:20 <Alberth> hmm, almost a year thus :)
10:24:50 <Alberth> hmm, I need saner debug settings
10:25:56 <planetmaker> hm, indeed
10:37:38 <Alberth> http://devs.openttd.org/~alberth/odune_crash_r1445.txt
10:58:35 <TrueBrain> 022C is nothing to worry about. Just initialization of voices :)
10:58:42 <TrueBrain> it should, however, not crash :p
10:59:31 <planetmaker> well, indeed for the first time I heart some voices...
11:00:11 <TrueBrain> a lot has changed since 0.3 :D
11:02:17 <Alberth> the only way I see to debug this, is to re-do the last commit, and see how it compares with r1445
11:02:26 <Alberth> that however takes a few days
11:03:05 <TrueBrain> what is the problem, sorry?
11:03:43 <Alberth> start the game, wait for title stuff (I usually click once to make it go faster), click 'load a game', crash
11:04:19 <Alberth> unless you want to decompile 000::0000 :)
11:04:22 <TrueBrain> did you pinpoint the revision?
11:04:27 <Alberth> r1445
11:04:45 <TrueBrain> 0:0 contains the IVS, rather not decompile it :p
11:04:45 <Alberth> r1444 works, at least to beyond that point :)
11:06:11 <planetmaker> http://paste.openttdcoop.org/show/144/ <-- does that help?
11:09:36 <TrueBrain> planetmaker: you randomly clicked CTRL+C?
11:10:13 <TrueBrain> Alberth: here it jumps to B000:<something>
11:10:29 <planetmaker> no, I clicked that after "Ram Free Error! Press any key to exit to DOS."
11:10:35 <TrueBrain> lol, bad glx
11:10:45 <TrueBrain> planetmaker: ah :)
11:10:47 <planetmaker> "clicked"
11:11:15 <planetmaker> it wouldn't accept any other input than that
11:11:23 <DorpsGek> SVN: truebrain (r1446) -Fix (r1445): lets not corrupt the stack ;)
11:12:25 <TrueBrain> planetmaker: http://devs.opendune.org/~glx/dune.cfg/dune_no_xms.cfg
11:12:27 <TrueBrain> try thatone
11:12:31 <TrueBrain> as your cfg
11:12:33 <TrueBrain> and see what it does
11:13:27 <planetmaker> interestingly, I just pulled r1446, built and... it seems to work
11:13:57 <planetmaker> (it worked to start a new game). Still I got a nice crash when I then subsequently tried to load an old game
11:15:20 <TrueBrain> owh, lol
11:15:24 <TrueBrain> didn't you read what Alberth said? :p
11:16:09 <planetmaker> hm?
11:16:49 <TrueBrain> 1445 crashed for everyone :p
11:16:52 <TrueBrain> try to keep up :D Haha :)
11:17:14 <planetmaker> well... sorry, I'm not in the mood to do guess - work now
11:17:24 <TrueBrain> I am just teasing you planetmaker
11:18:04 <TrueBrain> I dont get how all our stack values differed so much ... that should not happen tbfh ...
11:18:06 <TrueBrain> owh well :)
11:18:09 <TrueBrain> as long as it works now :)
11:19:29 *** zear has joined #openDune
11:19:34 <zear> hey there
11:19:41 <Xaroth|Work> hiya
11:19:56 <zear> say, did opendune get any faster since the last time i tried it few months ago?
11:20:03 <zear> or any more stable :)
11:20:25 <Xaroth|Work> faster could be possible, as we've converted more and more code
11:20:40 <Xaroth|Work> so there's less overhead from the emulation layer
11:22:51 <planetmaker> TrueBrain: the point is I did not change any config since <whenever>. So does the cfg need changing? If so: why? And why is that not taken care of by an update?
11:23:15 <TrueBrain> planetmaker: if it now works for you with your old config, nothing needs changing :)
11:23:22 <TrueBrain> we just have special branded cfgs which do special things :)
11:24:51 <TrueBrain> (and in SVN is a 'default' cfg btw, which you most likely use :))
12:08:34 <Alberth> http://devs.openttd.org/~alberth/diffs/f__B491_0A41_0011_85AD.patch
12:09:01 <Alberth> diff is very messy imho, but no idea how to improve
12:09:28 <Alberth> I have 7 simple and 1 big step in there, I could give those too
12:09:42 <Alberth> also, some of the resulting code makes no sense to me :(
12:11:02 <Alberth> also a short test game didn't get at this function, so I don't know whether it actually works :p
12:22:11 <TrueBrain> emu_Tools_MulCSIP_csip <- is in fact uint32 * uint32
12:22:14 <TrueBrain> we never got to rename it :D
12:23:03 <TrueBrain> emu_push(emu_ds);
12:23:04 <TrueBrain> - emu_ax = 0x186B;
12:23:06 <TrueBrain> - emu_push(emu_ax);
12:23:07 <TrueBrain> + emu_push(0x186B);
12:23:16 <TrueBrain> this is a g_global-> entry
12:23:45 <TrueBrain> loc8 = g_global->variable_3C32; <- look it up once to an uint8*, then use ++ on it ;)
12:24:16 <TrueBrain> as this call CREDIT, it most likely is the end-dialog?
12:24:18 <TrueBrain> I dunno
12:26:53 <TrueBrain> it is kind of why I stopped doing random functions, and I pick a function that is called from a place I know :D
12:28:54 <Alberth> loc8 is needed again as csip
12:29:10 <Alberth> but fair enough, perhaps I should do a different function
12:29:43 <Alberth> how would I find a place that I know?
12:30:19 * Alberth ponders doing emu_Tools_MulCSIP_csip()
12:30:25 <TrueBrain> I always start somewhere in src/
12:30:30 <TrueBrain> no, MulCSIP is just uint32 * uint32
12:30:38 <TrueBrain> no need to convert shit like that, they will be gone sooner or later :)
12:30:51 <Alberth> I was considering 'sooner' :)
12:31:00 <TrueBrain> but I noticed the amount of errors I make are directly related to the amount of testing I can do on it :)
12:31:37 <TrueBrain> so open up src/structure and find a f__ or something :p I dunno
12:31:38 <Alberth> yeah, without being able to run the code, conversion is just building on air
12:32:03 *** glx has joined #openDune
12:32:03 *** ChanServ sets mode: +o glx
12:32:32 <glx> hello
12:32:38 <Alberth> hello
12:33:40 * TrueBrain points glx to r1446 and laughs :D
12:33:42 <TrueBrain> owh, that aint nice :D
12:34:09 <glx> haha
12:34:15 <glx> silly
12:34:26 <TrueBrain> happens :)
12:35:42 <glx> as I said, we add bugs ;)
12:38:07 *** zear has quit IRC
12:38:16 <TrueBrain> http://devs.openttd.org/~alberth/diffs/f__B491_0A41_0011_85AD.patch <- Alberth had issues finding where that was called
12:38:21 <TrueBrain> so he couldn't test ..
12:38:24 <TrueBrain> ideas?
12:40:28 <glx> called at end of game at least
12:41:41 <glx> opendune.c:1159, skip the test and you'll get the credits ;)
12:41:59 <TrueBrain> Alberth: told you glx was our oracle :D
12:42:27 <glx> that's how I tested GameLoop_GameEnd() and related
12:43:18 <glx> of course you need to finish a mission, but A1 is easy enough
12:48:25 <Alberth> let's try whether I can finish A1 :D
12:49:20 <glx> I have a savegame for that (with the harvester in refinery and almost empty)
12:51:35 <glx> even better I saved it just at the end of the mission
12:54:11 <glx> http://devs.opendune.org/~glx/_save005.dat <-- if anyone interrested
12:54:58 <TrueBrain> I have my own :D
12:55:11 <TrueBrain> finishes O1, A1, H1 in 5 seconds
12:55:16 <TrueBrain> and O9, A9, H9 in 15 seconds
12:55:23 <TrueBrain> (enough time to move away the units that are doing it :D)
12:55:47 <glx> less than 5 seconds for me, I load and get the "you successfully finished"
12:56:01 <TrueBrain> :D
12:56:08 <TrueBrain> useful for debugging :D
12:56:52 <glx> saved at the right time, ie when spice amount got over 1000
12:59:32 <glx> B491_0A41 is called after the planet colour changed
13:13:26 <Alberth> I get: Program Termination: jumped to 2649:0987, which is not decompiled.
13:13:26 <Alberth> The jump was triggered at decompiled/cs__2649.c:985
13:13:26 <Alberth> The jump appears to originate from 2649:0966.
13:13:26 <Alberth> Please send the file 'memory/crash.bin' to upstream developers.
13:13:57 <Alberth> will try clean trunk first now
13:14:01 <TrueBrain> you got to love unresolved shit :D
13:16:04 <glx> unresolved stuff may come from corrupted stack too
13:17:53 <Alberth> or my 64bit system
13:18:23 <glx> the function with unresolved jump is called by emu_Free
13:20:07 <glx> + emu_push(0x0);
13:20:07 <glx> + emu_push(loc14.s.cs);
13:20:07 <glx> + emu_push(loc14.s.ip);
13:20:07 <glx> + emu_push(emu_cs); emu_push(0x0BF2); emu_cs = 0x23E1; emu_Tools_Malloc();
13:20:07 <glx> loc14 is uint32 then ;)
13:21:35 <glx> maybe I should finally name f__23E1_0334_000B_CF65() :)
13:23:13 <glx> is emu_Tools_GetFreeMemory() clear enough ?
13:23:42 <Alberth> http://devs.openttd.org/~alberth/shifted_text.png text 'HOLDS' and 'MAX' and 'SPICE' is shifted
13:25:05 <Alberth> haha: opendune: src/gui/widget.c:182: GUI_Widget_Draw: Assertion `drawMode < DRAW_MODE_MAX' failed.
13:25:19 <Alberth> I am not supposed to reach my function :p
13:26:52 <glx> http://svn.opendune.org/~glx/temp.patch <-- end game and credits run fine for me with that
13:27:12 <glx> using clean trunk of course
13:27:54 <Alberth> hmm, that was clean trunk :(
13:29:17 <Alberth> ie I forgot your patch
13:30:18 <Alberth> does really clean trunk work with the end of the first mission (a1) ?
13:30:38 <glx> it does for me
13:35:06 <Alberth> power info is too long, perhaps ' ' has a too large length?
13:37:50 <Alberth> bleh, it is not working
13:38:27 <glx> r1446 ?
13:40:25 <Alberth> yes, with "if (true || g_global->campaignID == 9) {", I arrive at a non de-compiled place
13:42:07 <glx> that works for me too
13:42:14 <glx> weird
13:42:46 <glx> maybe a timing issue
13:42:55 <Alberth> hmm, now it works
13:43:08 <Alberth> after removing that change
13:46:39 <DorpsGek> SVN: glx (r1447) -Add: named emu_Tools_GetFreeMemory()
13:49:29 <Alberth> what's the standard way to make a csip from ax and dx registers?
13:50:15 <glx> s.cs = emu_dx; s.ip = emu_ax;
13:51:17 <Alberth> I have that: "loc14.s.cs = emu_dx; loc14.s.ip = emu_ax;" but that fails when making "uint32 loc14;"
13:51:47 <glx> ha loc14 = (emu_dx << 16) + emu_ax;
13:52:10 <glx> it's an uint32, not a csip
13:52:33 <glx> emu_dx is high word, emu_ax is low word
13:53:45 <glx> and later you'll do emu_push(loc14 >> 16); emu_push(loc14 & 0xFFFF);
13:55:25 <glx> and the test becomes if ((uint32)((emu_dx << 16) + emu_ax) >= loc14) {
13:56:52 <glx> hmm > indeed
13:57:46 <Alberth> I have now if ((((uint32)emu_dx << 16) | emu_ax) > loc14) {
13:58:12 <Alberth> ie does uint16 << 16 does anything defined?
13:58:25 <glx> cast probably not needed anyway
13:59:05 <glx> we do this in many places
13:59:52 <Alberth> (14:26:32) TrueBrain: loc8 = g_global->variable_3C32; <- look it up once to an uint8*, then use ++ on it ;) <-- what about "g_global->variable_3C36 = loc8;" then ?
14:00:47 <glx> aren't 3C32 and 3C36 pointers to palette ?
14:01:11 <TrueBrain> create 2 vars, one in the emu world, one in the real world
14:01:15 <TrueBrain> makes conversion later on easier :)
14:01:49 <Alberth> glx could be, I had a reference to "IBM.PAL" somewhere in the function above it
14:02:39 <glx> use csip32 loc08_csip; and uint8 *loc08;
14:03:04 <glx> with loc08 = emu_get_memorycsip(loc08_csip)
14:03:05 <Alberth> well, without being able to test the function, I see no way to verify correctness
14:03:26 <Alberth> perhaps I better store this conversion, and do another one now
14:03:34 <TrueBrain> http://devs.opendune.org/~truebrain/savegames/
14:03:37 <TrueBrain> use a campaign9_end
14:03:38 <glx> but it's weird you can't even test it in clean trunk
14:05:57 * glx starts the ubuntu 64 VM
14:12:25 <Alberth> glx: do you have the base address of cs__2649 ?
14:12:37 <glx> 2649 :)
14:12:44 <glx> it's not an overlay
14:12:50 <TrueBrain> everything not starting with a B, is normal :)
14:13:04 <Alberth> ah :)
14:13:15 <glx> Alberth: are you compiling with -m32 ?
14:14:40 <Alberth> nope: cc -g -Wall -Wextra -Wno-unused-label -Wno-multichar -ansi -pedantic -O1 -foptimize-sibling-calls -c src/wsa.c -o objs/src/wsa.o -I include/
14:16:13 <Alberth> it is not even installed :D /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
14:16:52 <glx> hmm unresolved jump at end of atreides campaign 9 end
14:19:41 * Alberth starts bisecting
14:19:46 <glx> oh probably because music failed
14:20:09 * glx doesn't remember what to type for that
14:22:03 <Alberth> music and sound is off with h9 end of TB
14:22:14 <Alberth> or perhaps it is my config :)
14:23:34 <glx> hmm spice harvested total are different from last run
14:24:22 <Alberth> with the stuck harvaster I noticed that too, I have mentioned that in issue 58 or 59, I think
14:25:01 <glx> and unresolved jump again
14:25:13 <glx> trying on windows now
14:25:15 <TrueBrain> resolve them :D
14:27:13 <glx> no unresolved jump on windows
14:27:24 <TrueBrain> timer ...
14:27:28 <glx> maybe related to sound too
14:27:45 <glx> well voices, they rarely start on windows
14:28:30 <glx> and the crash is at begining of end movie
14:29:47 <glx> oh nice JIT finished with runtime overlay error
14:31:29 <glx> running toc
14:36:18 <glx> hmm toc readded a lot
14:40:19 <DorpsGek> SVN: glx (r1448) -Fix (r1443): too many parenthesis
14:42:02 <glx> of course there's another one
14:45:17 <DorpsGek> SVN: glx (r1449) -Fix (r1438): too many parenthesis
14:47:56 <glx> http://svn.opendune.org/~glx/toc.patch <-- raw toc result (some cleaning needed as always)
14:51:24 <glx> yeah more comment errors to fix
14:55:58 <glx> why does toc add unused functions ???
14:57:53 <TrueBrain> because it is not perfect? Because not all references are removed? because running toc at this stage might not result in expected result :D
15:08:33 <glx> first step is fixing comments ;)
15:10:11 <glx> script idea: compare @name with function name ;)
15:13:14 <glx> oh and "inline" changes in decompiled are not good with toc ;)
15:13:27 <glx> like f__2AE1_029F_0014_50E5()
15:14:42 <TrueBrain> like I said
15:14:53 <TrueBrain> we are at a stage where toc no longer is a workable tool to use often :D
15:15:50 <DorpsGek> SVN: glx (r1450) -Fix: some errors in comments
15:16:03 <glx> at least it shows some errors ;)
15:26:44 <glx> ok I'll resolved manually then
15:26:54 <TrueBrain> :D
15:27:05 <TrueBrain> or just pickle the part of the patch which you need :p
15:51:53 <DorpsGek> SVN: glx (r1451) -Add: resolved all unresolved in B483
15:52:10 <glx> end game works for me on linux now :)
15:52:56 <TrueBrain> :D
15:54:46 <glx> hmm I lost music on linux
15:55:32 *** tneo- is now known as tneo
15:58:00 <glx> ok a dead timidity it seems
16:06:06 <Alberth> a1 works, but an endgame from TB does not
16:06:13 <Alberth> time for some food
16:06:54 <glx> I did all tests with TB A1 (atreides campaign 9 end indeed)
16:40:13 <Alberth> I meant my a1 (atreides level 1) :) I retested, and now both atreides and harkonen end levels work
16:40:18 <Alberth> very weird
16:40:40 <TrueBrain> timing
16:43:53 <glx> just tell me what is unresolved
16:44:23 <Alberth> Program Termination: jumped to 2649:0987, which is not decompiled.
16:44:23 <Alberth> The jump was triggered at decompiled/cs__2649.c:985
16:44:23 <Alberth> The jump appears to originate from 2649:0966.
16:44:30 <Alberth> but I can have a look too
16:47:49 <glx> this one is easy to fix :)
16:48:54 <glx> but I'll resolve more than that
17:15:44 <Alberth> sorry about causing so much problems today
17:16:11 <TrueBrain> problems?
17:22:38 <glx> there are no problems :)
17:22:50 <TrueBrain> only bugs with patches
20:15:20 <Alberth> http://devs.openttd.org/~alberth/diffs/01_emu_Unknown_Clear_6C8C.patch whopping complicated :p
20:16:06 <glx> please don't add empty lines in global.h
20:17:24 <glx> and you forgot decompiled.h
20:17:39 <TrueBrain> and please add that stupid comment about popping about the 2 ip/cs pops :p
20:17:53 <TrueBrain> just for consistancy :)
20:18:22 <glx> skip the wrapper
20:18:50 <TrueBrain> owh, lol, yes :)
20:19:00 <glx> just inline it
20:20:26 <Alberth> I did it this way as there are other functions in the same decompiled file that also use this variable, ie it looks like an interface
20:21:02 <TrueBrain> so make it a static inline in the C :)
20:21:11 <TrueBrain> as I assume all requests are local?
20:21:48 <TrueBrain> we have more of such instances, where it is hard to see what is the best approach atm
20:21:56 <TrueBrain> but the more emu_ stuff you can remove, the happier we are :D
20:23:53 <Alberth> except it is never set, it seems
20:24:40 <glx> so it's a constant
20:25:20 <Alberth> perhaps a detection that it is the first time the program is run or so
20:25:34 <Alberth> depends on how the global data is obtained
20:26:01 <TrueBrain> no, just static data :p
20:26:07 <glx> maybe it's an array
20:26:15 <TrueBrain> happens so often :p
20:26:16 <glx> happens too
20:28:09 <glx> emu_ax = emu_get_memory16(emu_ds, 0x00, 0x6C86);
20:28:09 <glx> emu_orw(&emu_ax, emu_get_memory16(emu_ds, 0x00, 0x6C88));
20:28:09 <glx> something seems wrong in global.h
20:28:31 <glx> . /* 6C84(4) */ PACK uint32 variable_6C84; /*!< ?? */
20:28:31 <glx> . /* 6C88() */ PACK uint8 unknown_6C88[0x0009];
20:35:29 <TrueBrain> g_global->variable_6C84 = 0x25284000;
20:36:54 <glx> but 6C86 seems accessed as 32 bit or csip
20:37:19 <TrueBrain> yup
20:37:24 <TrueBrain> so something was converted wrong :D
20:37:41 <glx> or dune2 is silly (as often)
20:38:20 <TrueBrain> - emu_get_memory16(emu_ds, 0x00, 0x6C88) = 0x2528;
20:38:22 <TrueBrain> - emu_get_memory16(emu_ds, 0x00, 0x6C86) = 0x4;
20:38:23 <TrueBrain> lol
20:38:41 <glx> was going to svn blame me :)
20:39:38 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
20:39:40 <TrueBrain> right?
20:39:58 <Alberth> http://devs.openttd.org/~alberth/diffs/01_emu_Unknown_Clear_6C8C.patch just move the assignment to the main program, and remove all other stuff :)
20:40:20 <glx> TrueBrain: global.h is wrong
20:40:46 <TrueBrain> where?
20:41:05 <Alberth> 6+4=8 :)
20:41:05 <TrueBrain> glx: 88 -> 8A?
20:41:20 <glx> + /* 6C84() */ PACK uint8 unknown_6C84[0x0002];
20:41:20 <glx> + /* 6C86(4) */ PACK uint32 variable_6C86; /*!< ?? */
20:41:20 <glx> + /* 6C88() */ PACK uint8 unknown_6C88[0x0007]; <-- 8A and 3
20:41:32 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
20:41:33 <TrueBrain> 3?
20:42:26 <Alberth> http://devs.openttd.org/~alberth/make_var.py may be useful for splitting unknown arrays :)
20:42:38 <glx> hmm
20:42:55 <glx> you don't have access to a compiler ?
20:43:08 <TrueBrain> it compiles ...
20:43:19 <glx> so it's ok, my math failed :)
20:44:18 <DorpsGek> SVN: truebrain (r1452) -Fix (r945): mixed up some offsets
20:44:22 <TrueBrain> sorry Alberth
20:44:42 <TrueBrain> (your patch breaks :p)
20:55:42 <Alberth> let's try again :) http://devs.openttd.org/~alberth/diffs/01_emu_Unknown_Clear_6C8C.patch
20:57:34 <TrueBrain> btw, stuff that seems only set once can be because some tree is never called
20:57:42 <TrueBrain> as we do run it on a specific platform (virutalized, but still)
20:58:40 <DorpsGek> SVN: truebrain (r1453) -Add: C-ified f__B536_0129_000A_8178() to a single inline command (patch by Alberth)
21:03:27 <glx> http://svn.opendune.org/~glx/temp.patch <-- resolving some stuff :)
21:04:21 <TrueBrain> void f__2649_0E96() <- I miss comments :p
21:04:36 <TrueBrain> emu_bp= emu_sp; <- space error :p
21:07:57 <Alberth> http://devs.openttd.org/~alberth/diffs/02_emu_Unknown_B4B8_110D.patch
21:08:56 <Alberth> A weird one, where 0xff / 10 is supposed to be <= 6 in the upper 16 bits :)
21:09:13 <Alberth> / 16, even
21:10:03 <TrueBrain> loc2 -> i?
21:10:22 <TrueBrain> ptr = emu_get_memorycsip(g_global->variable_3C42) + loc2;
21:10:26 <TrueBrain> before for: ptr = emu_get_memorycsip(g_global->variable_3C42)
21:10:36 <TrueBrain> in for, after loc2++: , ptr++
21:10:37 <TrueBrain> ?
21:11:19 <glx> emu_get_memorycsip(g_global->variable_3C42) [i] works too
21:11:44 <Alberth> glx: I know, I don't really like that
21:11:52 <TrueBrain> and can you please also make a C-ified function? :)
21:12:16 <TrueBrain> as this is still emu_ :)
21:12:20 <glx> but as suggested ptr = ... before the for, then you can use ptr[i]
21:12:45 <TrueBrain> why ptr[i] .. slow ..
21:12:49 <TrueBrain> ptr++ and *ptr is faster :p
21:13:21 <Alberth> ptr++ breaks on the 'then' statements
21:13:38 <TrueBrain> sorry?
21:13:46 <Alberth> moved ptr to outside the loop, and for (i = 0; i < 0x100; i++, ptr++)
21:14:11 <Alberth> *ptr = (parm << 4) + 0x90; <-- needs to be the same ptr
21:14:37 <TrueBrain> hence the ptr++ in the for :p
21:14:43 <Alberth> oh you meant that :)
21:14:56 <TrueBrain> I hate *ptr++ :p
21:15:49 <Alberth> hmm, I have a few of those too :p but not here :)
21:15:58 <TrueBrain> glx uses them too :p
21:16:01 <TrueBrain> I still hate them :p
21:16:16 <TrueBrain> (parm << 4) + 0x90
21:16:30 <TrueBrain> just observing here, but that is the same as: ((parm + 9) << 4)
21:16:39 <TrueBrain> btw, please call it unknown :p
21:16:44 <TrueBrain> (consistency again :))
21:16:55 <Alberth> s/parm/unknown/ you mean?
21:16:58 <TrueBrain> yup
21:17:09 <TrueBrain> parm sounds weird :p Should be param anyway :p
21:17:16 <Alberth> ok :) we don't know a lot, do we? :p
21:17:17 <TrueBrain> but we use unknown everywhere else, if we don't know what it does
21:17:25 <TrueBrain> that is the beauty of it :)
21:17:51 <TrueBrain> and when you get to know a few things
21:17:56 <Alberth> fixed :)
21:17:58 <TrueBrain> you can unravel tons of things :)
21:18:11 <glx> or arg06 ;)
21:18:22 <TrueBrain> or that :p
21:18:32 <TrueBrain> but I strongly prefer unknown(1), unknown2, etc :p
21:18:37 <TrueBrain> grep ftw :D
21:19:43 <TrueBrain> and 0x100 = 256 :p
21:20:04 <TrueBrain> doesnt this set a palette?
21:20:21 <Alberth> just trying to stay close to the original code, just like (unknown << 4) + 0x90
21:20:38 <TrueBrain> yeah, but 256 is safe :)
21:20:53 <TrueBrain> we tend to keep 0x when a pointer is meant, or clear usage comes from using it
21:20:55 <TrueBrain> like 0x90
21:21:18 <glx> hmm palettes are 768 bytes long ;)
21:21:28 <glx> but it can be a mapping
21:21:28 <Alberth> 0x300 :)
21:28:15 <Alberth> patch updated, the -extern void emu_Unknown_2903_090A(); was deleted as it is in unknown.h already
21:32:05 <TrueBrain> now replace the emu_ in src/ with the real one :D
21:32:23 <TrueBrain> looks good btw :)
21:51:02 <Alberth> http://devs.openttd.org/~alberth/diffs/02_emu_Unknown_B4B8_110D.patch updated
21:51:41 <Alberth> we get such nice source code... one line code, one line empty... :)
21:55:29 <TrueBrain> btw
21:55:31 <TrueBrain> unknown
21:55:35 <TrueBrain> might consider calling it HouseID :p
21:55:38 <TrueBrain> just a hunch :D
21:55:42 <TrueBrain> owh, you did
21:55:44 <TrueBrain> :D:D
21:55:45 <TrueBrain> Lol
21:56:29 <Alberth> except with lowercase h
21:56:40 <TrueBrain> yeah, my typo :)
21:56:50 <TrueBrain> looks good; glx, what do you think?
21:57:44 <glx> + * C-ified function f_ _B4B8_110D_000D_FD5C() <-- these comments are incomplete
21:58:16 <glx> the emu_ function should be Emulator wrapper around ...
21:59:05 <Alberth> ah, of course
22:00:57 <Alberth> updated
22:07:42 <TrueBrain> if glx has nothing else, I will commit it :)
22:07:52 <TrueBrain> + * C-ified function f_ _B4B8_110D_000D_FD5C()
22:07:53 <TrueBrain> + * @param houseID ???
22:08:02 <TrueBrain> 1) please put a dot at the end of a sentence :D (so minor :p)
22:08:05 <TrueBrain> 2) ?? Really? :p
22:09:07 <Alberth> I can do s/???/house/ but that would be a bad explanation of the parameter imho
22:09:26 <TrueBrain> The ID of the house, or something :p
22:09:35 <TrueBrain> I dunno ... but ??? is so like: WHAT THE FUCK IS THIS! PANICCCCCCCCCCCC
22:09:37 <TrueBrain> :p
22:09:40 <glx> like we do :)
22:09:59 <glx> like @param unit The unit. ;)
22:10:22 <Alberth> usually, I have comments like "houseID the house that wants to set ...."
22:11:05 <TrueBrain> yeah ... we don't :D
22:11:06 <TrueBrain> haha
22:11:14 <TrueBrain> sometimes I just don't know ...
22:11:17 <TrueBrain> or it is too obvious :)
22:11:22 <Alberth> updated
22:14:03 <DorpsGek> SVN: truebrain (r1454) -Add: C-ified Unknown_B4B8_110D() (catchy name, not?) (Patch by Alberth)
22:18:37 <Alberth> good night
22:20:17 <TrueBrain> sleep well Alberth
22:20:19 <TrueBrain> nice job today :D
22:20:25 <Alberth> TrueBrain: I am missing an unknown file :)
22:21:01 <DorpsGek> SVN: truebrain (r1455) -Fix: Alberth was missing an unknown file
22:21:11 <glx> and the script ?
22:21:23 <TrueBrain> check commit first ;)
22:21:25 <TrueBrain> then complain :)
22:21:33 <glx> sorry
22:21:41 <TrueBrain> you teached me well, glx :D
22:23:38 *** Alberth has left #openDune
22:25:34 <glx> hmm MSVC warns again
23:06:45 <DorpsGek> SVN: glx (r1456) -Add: resolved all unresolved in 2649
23:28:35 <glx> hmm the colors are less dark
23:58:04 <DorpsGek> SVN: glx (r1457) -Fix (r1454, r1455): conversion error and MSVC warnings