IRC logs for #opendune on OFTC at 2009-10-05
⏴ go to previous day
01:05:48 *** Xaroth_ has joined #openDune
01:11:45 *** Xaroth__ has joined #openDune
02:48:21 *** Xaroth has joined #openDune
02:48:21 *** ChanServ sets mode: +o Xaroth
04:33:42 *** Xaroth_ has joined #openDune
05:54:56 *** Xaroth has joined #openDune
05:54:56 *** ChanServ sets mode: +o Xaroth
06:10:03 *** Xaroth_ has joined #openDune
07:09:46 *** Xaroth has joined #openDune
07:09:46 *** ChanServ sets mode: +o Xaroth
07:30:42 *** Xaroth_ has joined #openDune
07:51:46 *** Xaroth has joined #openDune
07:51:48 *** ChanServ sets mode: +o Xaroth
07:55:55 <TrueBrain> Xaroth: in the case of your code, lpf reads the same cs:ip pair ..
07:59:24 <TrueBrain> we talked about that inefficientness of the compiler ;)
08:00:00 <TrueBrain> every b->var =val; it does, it does: lpf(es, bx, mem(ss, bp, -0x4)); mem(es, bx, var) = val;
08:00:59 *** Xaroth_ has joined #openDune
08:30:46 <TrueBrain> weird stuff ... the last pool related function for buildings now makes a tiny bit more sense .. what it does is, it walks all houses and sets a variable to 0 .. then it recounts all buildings and sets the global var
08:31:15 <TrueBrain> sometimes things don't really make sense :p
08:31:32 <TrueBrain> (as I wonder when a recount can ever be needed :p)
08:31:47 <TrueBrain> only if things bypass the pool, and do stuff directly in memory ..
08:32:06 <TrueBrain> and when loading a game, but then it is wrong to reset the variable of houses ..
08:33:43 <Xaroth_> i started adding comments to the vars
08:33:47 <Xaroth_> so i could at least have a visual image
08:34:38 <Xaroth_> ds, 00, 0x39EE/F0 are at least part of it
08:35:11 <Xaroth_> yes, just like the movie
08:36:07 <TrueBrain> I guess the initial buildings do not count towards your building cap by scenario?
08:38:34 <TrueBrain> I 'guess' that variable_06 of House is the building-counter
08:38:48 <TrueBrain> the only thing that makes a bit sense to me
08:43:04 <TrueBrain> Xaroth_: but I really didn't get what you mean with 39EE .. what is that part of?
08:43:32 <Xaroth_> unless you already found those
08:44:00 <TrueBrain> well, the whole 0x353F (the 'ds' you used) are global vars
08:49:03 *** Xaroth has joined #openDune
08:49:03 *** ChanServ sets mode: +o Xaroth
08:49:14 <TrueBrain> you got the last thing I said?
08:57:20 <DorpsGek> SVN: truebrain (r137) -Add: (emu_)Building_Recount(), the last pool-related function for Buildings
08:57:59 *** Xaroth_ has joined #openDune
11:20:18 *** Xaroth has joined #openDune
11:20:28 <TrueBrain> haha, got sick of your connection? :p
11:20:33 <TrueBrain> (seeing you switched to webbased :p)
11:20:42 <Xaroth> well, can't ssh to home
11:20:46 <Xaroth> so i think that connection is dead
11:21:02 <TrueBrain> can I make your life more sucky?
11:21:36 <TrueBrain> oh, I can, but I was talking from KPNs point of view :p
11:22:08 *** ChanServ sets mode: +o Xaroth
11:22:14 <TrueBrain> so ... what was I doing .. ah, yes, I was looking over AirUnits
11:26:31 <TrueBrain> ah, no, first I was going to check if I missed anything in the building pool
11:26:46 <TrueBrain> a small function which uninits everything ... will that ever be useful, I wonder
11:28:02 <TrueBrain> @calc 0x10e40 - 0x10820
11:28:52 <TrueBrain> k, the rest I have it completely
11:30:30 <TrueBrain> for house pool I miss 2 functions .. 1 like building, and one other ...
11:31:29 <TrueBrain> we will see that when it pops up :) If ever ...
11:34:49 <Xaroth> it's almost scary how fast you run through this stuff :P
11:35:44 <TrueBrain> well, initial it takes a lot of time, but when you get the hang of it, it is pretty simple .. even more those pools, they are all identical, with tiny differences
11:36:09 <TrueBrain> some which still annoy me .... like House_Get can't return a house that is not active, but Building_Get can ..
11:36:47 <Xaroth> I'm sure you'll have many fun hours ripping them to pieces when we're done C-ifying everything :P
11:37:07 <TrueBrain> for sure I see many posibilities :)
11:37:18 <TrueBrain> the code in general is pretty good, which allows easy extending things
11:37:32 <TrueBrain> but I really now have to keep myself to doing just this .. and not modifying anything to make more sense :p :p :p
11:43:46 <TrueBrain> I am not just a bit bored by doing these pools ... 2 left .. but still :p
11:43:54 <TrueBrain> I can't just copy/paste it, as they are SLIGHTLY different ...
11:46:13 <TrueBrain> but Xaroth, managed to get anywhere with that first function at 0C3A?
11:50:40 <TrueBrain> if you btw ever want anything specific to do, ask :) My list slowly is growing in tasks that are doable :) (that is, of which I have a good idea what they might do :p)
11:51:37 <Xaroth> just got out of a meeting when i connected back to irc (plus lunch, so it wasn't -that- bad), so looking things over a bit before I start working on it in-between stuff.
11:51:56 <TrueBrain> oh, I was more wondering about last night :p
11:52:04 <Xaroth> meh, rewrote it, commented it
11:52:21 <Xaroth> got frustrated, rewrote it again, realised i rewrote the same thing as the first time
11:52:31 <Xaroth> then decided i needed sleep
11:52:45 <TrueBrain> please start to get used to diffs, and using them/uploading them :)
11:53:09 <Xaroth> I'll diff it once it's done :P
11:53:17 <Xaroth> I use that so i can easily c/p it across pcs
11:53:17 <TrueBrain> diff often, get feedback often :)
11:53:36 <TrueBrain> either way, you didn't use latest SVN to base your re-rewrite on ;)
11:53:48 <TrueBrain> f__1082_01E8_0020_FFB9 == Building_Allocate
11:53:53 <TrueBrain> well, emu_Building_Allocate
11:54:43 <TrueBrain> You want a few hints, or you want to fiddle yourself?
11:55:20 <Xaroth> hints are always welcome
11:55:28 <Xaroth> seeing you clearly have a better understanding of all that code :P
11:56:03 <Xaroth> opendune\trunk\tools\depend - at revision: 17717
11:56:10 <TrueBrain> OpenTTD external ;)
11:56:36 <TrueBrain> k, first of, you can call Building_Allocate directly, which returns a Building * to you. This should make a lot of things easier ;) (removes all 'lpf')
11:56:51 <TrueBrain> you have to be careful with the parameter order, but you will figure that out :)
11:57:16 <TrueBrain> emu_ax.x = emu_get_memory16(emu_ss, emu_bp, -0x4); emu_ax.x |= emu_get_memory16(emu_ss, emu_bp, -0x2); if(emu_ax.x != 0) <- this is the DOS 16bit way to do: if (b != NULL)
11:57:24 <TrueBrain> so it check if Allocate returned a valid pointer
11:58:55 <TrueBrain> if(emu_get_memory16(emu_ds, 0x00, 0x37A0) == 0x0) { f__0C3A_0095_0085_1C53(); } <- this mostly skips the next N lines, so in fact: if(emu_get_memory16(emu_ds, 0x00, 0x37A0) != 0x0) {} /* 0095 continues here as common branch */
11:59:12 <TrueBrain> well, mostly using Building * will clean most things up, and makes it all of a sudden very readable ;)
12:01:04 <Xaroth> wait, so it's all a wrapper around Building_Allocate?
12:01:23 <TrueBrain> it allocates a building, and then sets stuff in it
12:01:27 <TrueBrain> it creates a building
12:01:41 <TrueBrain> Allocate just gets one from the pool .. it is empty at that point
12:05:03 <TrueBrain> k, mapped all the missing functions of the pools
12:05:54 <TrueBrain> Xaroth: the most important thing for you is that the lpf on bp-0x4 just retrieves the Building * from Allocate :)
12:13:01 <TrueBrain> haha :) How is that hard ;)
12:13:31 <TrueBrain> line 35: Allocate is called. Return pointer is in dx:ax (the pointer to the Building * struct, in 16bit address)
12:13:53 <Xaroth> hang on, lemme get the old (but updated this time) code
12:14:04 <TrueBrain> line 41 + 43: store dx:ax in bp-0x4 and bp-0x2
12:14:31 <TrueBrain> line 73/74, line 78/79, ....: make es:bx that pointer again
12:14:40 <Xaroth> oh wait, you're looking at pastebin :P
12:14:44 <TrueBrain> line 76, line 81, ...: put a value in an offset from a pointer
12:14:51 <TrueBrain> of course, the only reference that works for both of us
12:15:09 <TrueBrain> so line 35: Building *b = Building_Allocate(params)
12:15:20 <TrueBrain> line 73/74, line 78/79: DEL
12:15:30 <TrueBrain> line 76, line 81, ...: b->variable_NN = value;
12:15:39 <TrueBrain> more clear I can't describe it without doing it ;)
12:18:09 <Xaroth> now just to figure out the params, but I think that's emu_si/emu_di
12:18:23 <Xaroth> aka param 2 and 4 from f__0C3A_0009_0029_BF94
12:18:54 <Xaroth> er, hrnf, no, mislooked
12:24:49 <Xaroth> TrueBrain: Top of stack is first argument, right?
12:25:11 <Xaroth> so in case of Building_Allocate, first arg is the emu_get_memory16 from above, THEN the emu_si from above that
12:32:38 <TrueBrain> bp+0x8 is the typeID
12:32:46 <TrueBrain> bp+0x6 is the index (mostly -1)
12:33:29 <Xaroth> still need to figure out emu_imulw
12:34:06 <TrueBrain> emu_ax.x *= emu_dx.x is safe in this case
12:34:10 <Xaroth> actually, I don't at this point
12:34:31 <Xaroth> but SI isn't then set back to ax
12:34:33 <TrueBrain> btw, that piece of code looks up the type in the array
12:34:57 <Xaroth> well, it does, but later on
12:35:30 <TrueBrain> emu_si is at all times bp+0x8, so typeID
12:35:40 <TrueBrain> (it is also just a local variable, but hidden in a register)
12:36:00 <TrueBrain> in general emu_si and emu_di can also be used as local variables (and is often done so)
12:36:00 <Xaroth> void Building_Create(uint16 argument_1 /* 0x6 */, uint16 argument_2 /* 0x8 */, uint16 argument_3 /* 0xA */, uint16 argument_4 /* 0xC */) << I'm not cheating :P
12:36:24 <TrueBrain> 0x6 -> index, 0x8 -> typeID
12:36:58 <TrueBrain> 0xA -> houseID (by the fact it is stored in variable_08, which I suspect is houseID :p)
12:37:18 <TrueBrain> no idea why it is also stored in variable_47 .. and why as uint16 ...
12:37:32 <Xaroth> plans for expansion :P
12:37:41 <TrueBrain> and 0xC is not read in your snippet
12:37:51 <Xaroth> emu_di = emu_get_memory16(emu_ss, emu_bp, 0xC);
12:37:52 <TrueBrain> k, refactoring pools ...
12:38:04 <TrueBrain> emu_di and bp+0xC is not used after that (not in your snippet)
12:38:10 <TrueBrain> most likely used to make a choice later on
12:39:10 <TrueBrain> I wonder what building 15 and 16 are ... they are special in some way :p
12:39:27 <DorpsGek> SVN: glx (r138) -Update: MSVC project file
12:43:47 <TrueBrain> proyvind_: do you know/have somewhere a list of buildings IDs and house IDs and their name? (you seem a person who would have that :p)
12:47:24 <TrueBrain> Xaroth: I will prepare as much of the pool system as possible to increase limits .. like using uint16 where possible over uint8 for index
12:47:32 <TrueBrain> should ease up later transitions
13:02:17 <TrueBrain> hmmm ... the Building_Free shows sign of a linked list, but at allocate it does nothing of the kind ..
13:09:28 <Xaroth> TrueBrain no idea why it is also stored in variable_47 .. and why as uint16 ... << It's actually storing it twice, once as uint8, once as uint16
13:09:48 <Xaroth> variable_08 as uint8, variable_47 as uint16
13:10:09 <TrueBrain> that I said, not? :p
13:10:42 <TrueBrain> glad we both find it weird :)
13:14:00 <Xaroth> now to figure out how to typecast safely
13:14:19 <TrueBrain> & 0xFF in one case ;)
13:14:44 <TrueBrain> that is the lower part, es
13:14:59 <TrueBrain> so: houseID = argument_N & 0xFF
13:15:05 <TrueBrain> variable_47 = argument_N
13:15:20 <TrueBrain> no idea if the upper-part of argument_N is ever set and/or used ...
13:15:49 <Xaroth> b->houseID = houseID & 0xFF;
13:15:56 <Xaroth> now THAT is code I understand.. mostly
13:16:05 <TrueBrain> told you it would clean up ;)
13:16:10 <Xaroth> might have to blink once to note the 0xFF and the uint8/16
13:16:37 <TrueBrain> by the end of the month, you are used to that like you are to using & ^ and | :p
13:16:51 <Xaroth> emu_get_memory16(emu_es, emu_bx.x, 0x4) |= 0x4;
13:17:00 <Xaroth> that kinda assumes variable_04 has a starting value, right?
13:17:11 <TrueBrain> Allocate assures everything is set to 0
13:17:16 <TrueBrain> and in case of variable_04, it is set to 0x3
13:18:25 <Xaroth> emu_get_memory16(emu_es, emu_bx.x, 0xC) = 0x0; << you've got variable_12 set as byte, does that cause issues/
13:18:38 <Xaroth> seeing it's setting it to 0
13:19:59 <TrueBrain> variable_12 is variable at 0x12
13:20:25 <TrueBrain> all numbers(and letters) in variables/functions are hex, in case you didn't notice that :p
13:20:40 <Xaroth> I was just looking at the Building struct
13:20:49 <Xaroth> only decimal indicators :P
13:20:52 <TrueBrain> and everywhere I used _NNNN
13:21:01 <TrueBrain> but as Building struct is never exceeding _NN, it was easier
13:21:21 <Xaroth> you use it with unknown_XXXX
13:21:47 <TrueBrain> and 1 simple rule: if you don't know the size, use unknown_, if you know the size, make it a variable_
13:21:53 <TrueBrain> see global.h for the syntax and layout thingies
13:21:59 <TrueBrain> (spaces, comments, ..)
13:23:51 <Xaroth> emu_get_memory16(emu_ds, 0x00, 0x37A0) GlobalData @ variable_37A0 ?
13:24:23 <TrueBrain> assuming emu_ds still holds the value 0x353F (it mostly does)
13:24:24 <Xaroth> I'll stick to one file for now, do the real editing when I get home
13:28:16 <Xaroth> down to the nasty parts
13:30:09 <Xaroth> global @ 0x39EE/0x39F0 is a struct
13:34:09 <Xaroth> now I wonder, does that mean that g_global->variable_0x39EE is the struct, or does that mean it merely points to a struct?
13:34:51 <Xaroth> aka, is the data after 0x39EE/0x39F0 the data of the struct, or is it stored separately
14:09:30 <TrueBrain> then it is a pointer
14:09:37 <TrueBrain> (to something, can be a integer, string, struct, ...)
14:10:08 <Xaroth> I'll keep the original commented in so i can work on that tonight
14:10:12 <Xaroth> more interesting stuffs now
14:10:21 * TrueBrain continues with pools ..
14:10:28 <Xaroth> now a lpf on -0x6 and -0x8
14:10:44 <TrueBrain> local pointers ... :)
14:12:11 <TrueBrain> emu_si contains typeID if I remember correctly
14:12:26 <TrueBrain> so most likely an offset in an array about building-type
14:12:35 <TrueBrain> (like size .. or cost .. dunno :p)
14:12:53 <Xaroth> more than once, ofcourse, so probably both :P
14:13:33 <TrueBrain> the tricky part will be to estimate the size of that array, both in element size as in total length
14:13:42 <TrueBrain> as for all we know, it is dynamic :p
14:15:09 <TrueBrain> it really is easier if you would upload the files as a .txt to your dev-space or where ever
14:15:12 <TrueBrain> pastebins read annoying :p
14:15:43 <Xaroth> and I am aware I declared the localvar_N vars without using them, they are just in case for now, probably not even needed
14:15:59 <TrueBrain> I assume you will make an emu_Building_Create around this?
14:16:35 <Xaroth> probably with a bit of help from you, yes
14:16:58 <TrueBrain> as emu_bp is now not set, and emu_pop(&emu_cs) is gone :p
14:17:18 <TrueBrain> well .. they are GONE
14:17:24 <TrueBrain> not done, okay, but then they should be somewhere ;)
14:18:31 <TrueBrain> my point here is: don't remove something ;) It is really hard to find them back later on :) Your mind overflows after working on such big functions :p
14:18:42 <TrueBrain> the rest looks good :)
14:19:44 <Xaroth> My mind had a fatal exception long before it could overflow
14:21:54 <TrueBrain> piece by piece, step by step
14:21:57 <TrueBrain> it is easy as that :)
14:22:08 <TrueBrain> you need to get a bit momentum, then it starts to roll out on its own
14:22:41 <Xaroth> well trying to understand the LFP was a bit of an uphill trip, but once i got your concept of turning it into the struct definition it actually made sense
14:22:54 <Xaroth> I just forgot to realise that this once was C++ code, so it HAD to make sense
14:25:38 <TrueBrain> most lfp thingies can be transformed to csip32 in the struct it comes from :p
14:36:17 <TrueBrain> I really need a new mouse :(
14:36:44 <Xaroth> Logitech MX518 or G5 :)
14:37:05 <TrueBrain> damn, MX518 looks UGLY
14:38:20 <TrueBrain> either way, I want a wireless
14:38:23 <TrueBrain> and most likely a darkfield
14:38:41 <TrueBrain> just ... I am also buying a new snowboard + gear, so I don't think I have the money right now :p
14:39:44 <Xaroth> G5 has adjustable weighting though, but a cable
14:39:54 <Xaroth> G7 has a battery slot where you put the weights on the G5
15:01:55 <TrueBrain> pff .. and a new laptop next week ... this is insane ... maybe I should stop spending so much :p
15:06:21 <TrueBrain> laptop means I can finally work even on the road on OpenDUNE :p Ghehe :)
15:06:29 <TrueBrain> and here is my boss thinking I will work more for him .. MWHAHAHAHAHAHA
15:08:46 <TrueBrain> k, refactored 2 pools ... now I need to make 2 more :)
15:08:57 <TrueBrain> copy/paste for the win!
15:35:08 <TrueBrain> I think building flag 0x4 in variable_04 means something like built
15:35:20 <TrueBrain> 0x1 is 'used', 0x2 I am not sure about, 0x4 built
15:40:19 <TrueBrain> what are you talking about? :)
15:40:28 <TrueBrain> (random quotes rarely are understood over IRC :p)
15:40:29 <Xaroth> almost time to go home
15:41:08 <TrueBrain> in buildings a function is called on Free, but in AirUnits it is called on some kind of special allocate :p
15:41:57 <TrueBrain> I think it is an AllocateTemporary or what ever
15:42:02 <TrueBrain> which creates those temporary carry-alls
15:52:55 <TrueBrain> it seems AirUnits has a 16bit integer which is used for either 0 or 1 :p
15:57:06 <TrueBrain> @calc 0x85D6 - 0x76a8
15:57:59 <TrueBrain> that leaves only Units ...
15:58:06 <TrueBrain> well, AirUnits not 100% done, there is one fishy function left :p
15:58:25 <TrueBrain> but I don't think that should be part of the pool code ... it creates a temporary unit ..
16:00:46 <TrueBrain> k, I just killed MSVC6.0 support :p Duplicated filenames in different directories :p
16:03:46 <TrueBrain> hmm ... somewhere I have a bug ... the game no longer wants to start a level :p (it quits on a point I know it never should)
16:05:37 <Xaroth> ugh, trying to extend this ubuntu install on vmware
16:05:44 <Xaroth> want to go home damnit :/
16:06:46 <TrueBrain> hmm .. it tries to find House 200 .. that is WRONG :p
16:07:22 <Xaroth> why oh why doesn't gparted see the ubuntu disk, grrr
16:10:05 <TrueBrain> how oh how am I ever going to find where it goes wrong :p
16:44:20 <glx> <@TrueBrain> k, I just killed MSVC6.0 support :p Duplicated filenames in different directories :p <-- not only MSVC6.0 :)
17:13:43 <TrueBrain> as long as latest works, it is fine by me :p
17:15:06 *** Xaroth has joined #openDune
17:15:06 *** ChanServ sets mode: +o Xaroth
17:16:18 <TrueBrain> still no working OpenDUNE
17:16:22 <TrueBrain> go figure what is worse :p
17:17:02 <Xaroth> told them that with 1% packet loss they aren't giving me 99.9% uptime that every other compeditor can guarantee
17:17:30 <TrueBrain> as non-business customer you don't have a SLA :(
17:20:07 *** Xaroth_ has joined #openDune
17:20:13 <TrueBrain> changing decompiled.h now became very expensive :(
17:21:22 <TrueBrain> okay, it is pool/house which is the problem ... now I need to find it :p
17:25:45 <TrueBrain> okay, of course .. what was the only difference between House and Building? Yes, GetIndex has a validation check ...
17:34:15 <TrueBrain> put that aggression in OpenDUNE, you don't need a stable connection for that (yet)
17:38:50 <Xaroth_> FEC-fouten (verzenden/ontvangen): 0 / 118.375
17:39:05 <Xaroth_> FEC-fouten (verzenden/ontvangen): 0 / 144.733
17:39:18 <TrueBrain> how is your noise-signal ratio?
17:39:31 <Xaroth_> Signaalverzwakking lijn (verzenden/ontvangen) [dB]: 20,5 / 33,5+
17:39:41 <Xaroth_> SN-marge (verzenden/ontvangen) [dB]: 9,5 / 7,0
17:40:05 <TrueBrain> FEC is a way of assuring data integrety .. in fact, a very expensive one
17:40:17 <TrueBrain> mostly done via QED, but okay
17:40:43 <TrueBrain> your SNR is high ...
17:40:58 <TrueBrain> make sure you have nothing connected to your line ;)
17:41:24 <Xaroth_> that's 'normal' values
17:41:41 <TrueBrain> NORMAL? LOL! What distance are you? :p
17:41:51 <Xaroth_> er, around max according to various tools
17:42:22 <TrueBrain> but okay .. I assume you already tried a reset of your modem?
17:42:31 <Xaroth_> De afstand van de locatie tot aan de centrale bedraagt circa 1460 meter.
17:42:32 <TrueBrain> it should train itself to avoid certain frequencies
17:42:46 <TrueBrain> 1.5km .. not that high .. it can be 5+km (with ADSL2+ for sure)
17:43:15 <Xaroth_> we're on 6mbit/.5mbit
17:43:23 <Xaroth_> so ADSL/ADSL2+ doable
17:43:39 <TrueBrain> given the FEC is on receiving, it is most likely some interference in the higher frequency band ..
17:43:41 <Xaroth_> the modem reports 9/1
17:43:59 <TrueBrain> copper is a bitch to transport data over :)
17:44:01 <Xaroth_> I think the bastards 'silently' upped the limit again
17:44:55 <TrueBrain> telephone wire is old copper :p
17:45:09 <TrueBrain> lol, I feel so much like given BOFH suggestions
17:45:28 <TrueBrain> like: well, it is most likely some static charge on the wire. To undo that, put some 230V on the wire for a short second, and it should be done
17:45:35 <TrueBrain> (together with all other communication ever over the wire :p)
17:46:00 <Xaroth_> hm, that'd work if i disconnected our endpoint :P
17:46:05 <Xaroth_> fry their systems etc
17:46:07 <glx> by old I mean 30+ years old line
17:46:19 <Xaroth_> glx: that'd be our area
17:46:20 <TrueBrain> Xaroth_: their system should be protected (blikseminslag)
17:46:32 <TrueBrain> glx: 90% of our telephone network is from the 80s
17:48:12 <TrueBrain> problem with ADSL, it can be almost anything ...
17:48:30 <Xaroth_> we've had this before
17:48:36 <Xaroth_> we get crappy connection
17:48:41 <Xaroth_> they lower it again, signal restores
17:48:53 <TrueBrain> although ADSL should train itself to avoid such cases
17:49:10 <TrueBrain> (in which ADSL2+ is much better than ADSL1)
17:49:15 <glx> we have no limit here (except the physical one, around 24mbps)
17:49:30 <glx> though I can't get more than 5mbps :)
17:49:32 <TrueBrain> ADSL2+ has an upperlimit of over 100mbit :p
17:49:51 <TrueBrain> 60mbit they 'deliver' here I believe
17:49:55 <glx> inside the dslam maybe :)
17:50:11 <TrueBrain> of course you never make that because of the QED and shit ...
17:50:15 <TrueBrain> but they don't tell you that :p
17:51:14 <TrueBrain> difference between real speed and experienced speed :p
17:51:48 <TrueBrain> QED (error protection), PPP, TCP, ... in the end ... you have nothing left :p
17:52:39 <TrueBrain> glx: lol, not really :)
17:52:48 <TrueBrain> ATM as in real ATM is very expensive with its ATM cells
17:52:55 <TrueBrain> (even more on lower speeds)
17:53:11 <TrueBrain> which is also not the most pretty protocol thinkable
17:53:16 <TrueBrain> (char-based ... brrr)
17:53:55 <TrueBrain> I hope you have PPPoA :p
17:55:39 <TrueBrain> US runs on PPPoE .. poor bastards
17:56:02 <TrueBrain> (PPPoE is bad designed to send TCP/IP over ...)
17:56:44 <TrueBrain> the most 'fun' thing about the whole PPPoA, that it uses ATM and PPP .. it has 3 16bit fields which are always 0x0 (end-address in all 3 cases)
17:57:15 <TrueBrain> on the other side ... the ATM part also allows QoS :p
17:57:49 <TrueBrain> and after you have seen how Wifi works, ADSL is a simple communication method :p
18:01:34 <TrueBrain> damn, I made a real newbie mistake ..... did a BE approach instead of LE :(
18:03:07 <TrueBrain> glx: if you click on a normal speed through the whole begin stuff, can you then just play?
18:03:21 <TrueBrain> I mean, it crashes when you let the planet run too long .. so what if you don't?
18:05:53 <glx> hmm sometimes I can start a game, but now it "crashes" when I clicked on "Yes"
18:06:26 <TrueBrain> crashes as in crash.log?
18:06:47 <TrueBrain> I just finished the first level with my latest work :) Whoho!
18:06:54 <glx> no probable stack overflow :)
18:07:10 <glx> hmm I retried and now I have a crashlog after "proceed"
18:07:43 <glx> hmm no crash.bin nor crash.log indeed (creation failed)
18:08:09 <TrueBrain> too bad .. it would be nice if we would be able to make a 'stable' Windows binary by now :p
18:08:35 <TrueBrain> Xaroth_: I am strongly considering if we should make a 0.1 release at .. say .. 1st of December, and then every N months after that, progress or not
18:09:11 <TrueBrain> but okay ... unit pool ...
18:11:53 <Xaroth_> apparently we should have a 20mbit line
18:12:00 <Xaroth_> 9mbit MAX according to modem
18:12:05 <Xaroth_> 9.7 according to 2nd line
18:12:17 <Xaroth_> so i told them to stuff it and change it back to an 8mbit connection
18:12:22 <Xaroth_> .. meaning cheaper intarwebs
18:16:57 <Xaroth_> no FTTH in uithoorn yet tho :(
18:18:24 <Xaroth_> and I'd agree with the 1dec release thing, though if stability doesn't let us I wouldn't mind jan 1
18:18:40 <TrueBrain> well, I am even considering 1nov
18:18:46 <Xaroth_> not on my beerday -_-
18:19:00 <Xaroth_> I wouldn't mind on my beerday
18:19:24 <Xaroth_> birthday s/birth/beer/
18:19:35 <Xaroth_> you don't get born on your birthday, you drink lots of beer!
18:19:40 <TrueBrain> ah .. I was wondering if you were for 45 days on sea :p
18:20:15 <Xaroth_> got my slipcourse nov 1 tho
18:20:25 <TrueBrain> but okay ... we will see how it goes this month
18:20:48 <TrueBrain> maybe a release cycle is too much pressure for this stage of development .. dunno
18:21:26 <Xaroth_> well we don't have to settle for stable releases in the beginning
18:21:55 <Xaroth_> I mean, there's bound to be thousands of unknowns/bugs/whatevers in it in the beginning anyhow
18:22:12 <Xaroth_> but a set schedule attracts people
18:22:21 <TrueBrain> but okay, a few days/weeks before a release you should stop adding new stuff, and making working things really stable
18:22:24 <TrueBrain> like a Windows problem ;)
18:26:29 <TrueBrain> when units are reset, it also set variable_06 of a house to 0
18:26:32 <TrueBrain> buildings do that too
18:26:38 <TrueBrain> so it clearly isn ot buildingCount :p
18:29:04 <TrueBrain> but Unit counts the value back when doing a recount
18:29:09 <TrueBrain> very odd ... smells more like a bug
18:30:04 <Xaroth_> if it resets the units, as in, cleared the unit list?
18:30:13 <TrueBrain> no, it recounts them
18:30:17 <TrueBrain> how ever you want to call that
18:30:58 <TrueBrain> called at the begin of a mission I think
18:31:09 <TrueBrain> it is just odd that building sets it to 0 too ..
18:32:27 <TrueBrain> I can understand that Unit_Recount() recalculates that value .. but it means if you ever do Building_Recount() after Unit_Recount(), the count is wrong :p
18:33:10 <TrueBrain> Xaroth_: I think we need (small) wrappers for things like: Building_IsValid, which check variable_04 for bit 1
18:33:21 <TrueBrain> if ((u->variable_04 & 0x0001) == 0) continue; <- not that pretty ;)
18:33:41 <TrueBrain> even if that was: if ((u->flags & UNIT_FLAG_USED) == 0) continue;
18:33:50 <TrueBrain> nicer: if (!Unit_IsValid(u)) continue;
18:33:52 <Xaroth_> if it's used quite a few times, yes
18:34:16 <TrueBrain> even if it is used once .. it centralizes bit-access, and avoids mistakes I guess :)
18:35:47 <TrueBrain> AirUnit is weird .. it has things on a COMPLETELY different place ..
18:35:57 <TrueBrain> Unit and Building have simularities ..
18:36:06 <Xaroth_> airunits aren't controllable tho
18:36:16 <Xaroth_> Carryalls and ornis do their own thing
18:36:22 <TrueBrain> house is a byte at 0x8 .. but for airunits it is a word at 0x10 ...
18:37:08 <Xaroth_> I don't think offset is relevant, seeing it used to be C++
18:37:17 <Xaroth_> could easily be a different notation of the struct
18:37:23 <Xaroth_> but byte/word is .. wrong
18:37:36 <TrueBrain> still it is a bit weird
18:37:37 <Xaroth_> might indicate it's been put in at a 'later' stage
18:38:01 <TrueBrain> as the 'flags' is also replaced with a bool of 16bits :p
18:38:04 <TrueBrain> oh well .. we will see :)
18:46:34 <TrueBrain> if variable_59 of a unit is non-zero it becomes house 2 ....
18:46:40 <TrueBrain> Xaroth_: can you guess why? :) :)
18:46:47 <TrueBrain> damn ... nice trick :)
18:46:59 <TrueBrain> house 2 ... one of the 3 houses
18:47:05 <TrueBrain> what kind of weapon do one of them have? :)
18:47:25 <TrueBrain> that identifies variable_59 immediatly :)
18:48:04 <TrueBrain> :/* 0059(1) */ uint8 deviated; //!< If non-zero, the unit is deviated for this amount of remaing ticks.
18:48:11 <TrueBrain> you need a bit of luck ;)
18:48:22 <Xaroth_> amount of remaining ticks?
18:48:27 <Xaroth_> deviated didn't have a timer, did it?
18:48:33 <Xaroth_> it usually lasted until hit
18:48:46 <TrueBrain> oh well, I will remove that for now :)
18:49:04 <TrueBrain> : /* 0059(1) */ uint8 deviated; //!< ?? If non-zero, the unit is deviated, but what does it hold exactly?
18:49:56 <TrueBrain> so that will be the first inline ... ;)
18:51:38 <TrueBrain> if (find->houseID != HOUSE_INDEX_INVALID && find->houseID != u->GetHouseID()) continue;
18:54:56 <Xaroth_> need to figure out how to properly do that g_global->variable_39EE stuff
18:55:26 <TrueBrain> 1A34 contains Unit functions and helpers
18:56:33 <TrueBrain> * @return The HouseID of the unit, which might be deviated.
18:57:19 <Xaroth_> can always make it clear by doing "which might be under the influence of a deviator"
18:57:54 <TrueBrain> that doesn't say the return value is that of the deviated house
18:58:27 <Xaroth_> @return The HouseID of the unit, or the HouseID of the unit if it is under the effect of a Deviator
19:00:01 <Xaroth_> gets (offset 0x30) << 1
19:00:28 <Xaroth_> then gets the pointer AGAIN, adds the retrieved value from before to the BX
19:00:38 <Xaroth_> then gets the new pointer, offset 0x10
19:00:52 <Xaroth_> doesn't that indicate it's looping through an array?
19:06:50 <Xaroth_> now also to figure out what the HELL -0x8 and -0x6 is
19:08:51 <Xaroth_> 0x2C94 is the array of building information
19:09:20 <TrueBrain> it makes me smile you confirm my suspicious :)
19:09:37 <TrueBrain> typeID times something plus something :p
19:09:39 <Xaroth_> so damn obvious, yet so annoying as hell
19:09:48 <TrueBrain> I wonder about that plus something
19:10:04 <TrueBrain> hmm .. offset compenstation to compact as much as possible
19:11:39 <Xaroth_> temp_a = emu_get_memory16(localvar_3, typeID, 0x10);
19:12:10 <TrueBrain> I am pretty sure there are nicer solutions :p Ghehe :)
19:12:16 <TrueBrain> btw, this is the same as typeID + 0x10
19:12:20 <TrueBrain> you do realise that I hope
19:12:34 <Xaroth_> segment, index + offset
19:14:40 <TrueBrain> a whole function dedicated to find a single (!) house+type of unit
19:14:45 <TrueBrain> well .. more exact: it returns 1 if one is found
19:14:49 <TrueBrain> (or 10, but at least 1)
19:15:10 <TrueBrain> but we already have a search function which does almost the same ...
19:16:10 <TrueBrain> oh well, I will need to test that to see if it does anything different ...
19:18:35 <Xaroth_> variable_0E and variable_56 are both set to that
19:18:50 <TrueBrain> don't you just love this jigsaw :)
19:19:38 <TrueBrain> well, you can add printfs and compile it
19:19:57 <Xaroth_> er, this code probably doesn't compile yet :P
19:21:59 <Xaroth_> typeID 0x3 is something special
19:25:11 <TrueBrain> hmm ... it seems that you can say in the scenario that a certain unit type can be made more often than the unit limit?
19:25:55 <Xaroth_> TrueBrain: testw is like cmpw?
19:26:02 <TrueBrain> no, nothing like it
19:27:15 <Xaroth_> emu_testw(&emu_get_memory16(emu_es, emu_bx.x, 0xC), 0x2); if (emu_flags.zf)
19:27:23 <Xaroth_> emu_get_memory16(buildingInfo_Index, typeID, 0xC) & 0x2 == 0
19:27:37 <Xaroth_> yeh, and an if in front
19:27:51 <TrueBrain> a & 2 == 0 means: a & (2 == 0)
19:27:56 <TrueBrain> so you want to do: (a & 2) == 0
19:28:26 <Xaroth_> C# does that slightly differently
19:28:51 <TrueBrain> notice == is above & (and all other bit-logic-operators for that matter)
19:29:20 <TrueBrain> no worries, any sane compiler warns about it
19:29:28 <TrueBrain> as no sane person would ever mean a & (2 == 0)
19:29:32 <Xaroth_> getting to the end of this function
19:29:44 <Xaroth_> a 'forced' exit to another segment
19:30:12 <TrueBrain> and I am totally confused what this function does .... some weird shit ...
19:30:14 <Xaroth_> emu_push(0x011A); emu_ip = 0x25EC; emu_last_cs = 0x0C3A; emu_last_ip = 0x0117; emu_last_length = 0x00D1; emu_last_crc = 0xD261; emu_call()
19:30:58 <Xaroth_> f__0C3A_011A_000A_817C, that comes behind it, is a popper
19:31:04 <Xaroth_> .. with something special o_O
19:31:27 <TrueBrain> hmm ... this function does Allocate alright, but how :s Omg ...
19:32:07 <Xaroth_> needs more cleaning up though
19:33:44 <TrueBrain> btw, I will change building.h later tonight completely
19:33:46 <TrueBrain> just so you know :)
19:34:00 <Xaroth_> i'll wait with adding stuff then :P
19:34:04 <Xaroth_> unless you want me to add those now
19:37:49 <TrueBrain> house->variable_06 is for sure unitCount
19:37:54 <TrueBrain> btw, what is nicer:
19:38:10 <TrueBrain> House *h = House_Get_ByIndex(u->houseID); h->variable_06--;
19:38:15 <TrueBrain> House_Get_ByIndex(u->houseID)->variable_06--;
19:38:47 <TrueBrain> what else is there, besides personally? :p
19:38:52 <glx> and maybe a check for h!=NULL
19:39:00 <Xaroth_> I don't like Function()->Variable->SubVariable->SubVariable = true
19:39:04 <TrueBrain> asserts assure me a non-NULL glx :)
19:39:41 <Xaroth_> At max val ret = Function(); ret->Variable->SubVariable->SubVariable = true;
19:39:48 <Xaroth_> but even that is a bit.. awkward
19:39:56 <Xaroth_> not that you get stuff that deep that often though
19:40:30 <TrueBrain> if ((House_Get_ByIndex(index)->variable_04 & 0x0001) == 0) return;
19:40:50 <Xaroth_> didn't you want to change that to IsValid? :P
19:41:03 <TrueBrain> House_IsValid(House_Get_ByIndex(index))
19:41:16 <TrueBrain> or House *h = House_Get_ByIndex(index); House_IsValid(h)
19:41:19 <Xaroth_> I don't mind that first one
19:41:39 <TrueBrain> then it is a bit inconsistant :)
19:41:44 <TrueBrain> what I hate most, is inconsistant :)
19:42:10 <TrueBrain> well, either all via a temp var
19:42:32 <TrueBrain> temp var it is .. makes 1 place ugly and 2 more pretty
19:43:26 *** Xaroth_ is now known as Xaroth
19:43:31 *** ChanServ sets mode: +o Xaroth
19:43:36 <TrueBrain> can it be that you can always go 10 units above what is set in a scenario?
19:43:39 <TrueBrain> a 'free' range or something?
19:45:28 <Xaroth> i was enjoying pissing him off :(
19:45:31 <TrueBrain> now this is pissing off PeterT :)
19:47:24 *** Xaroth sets mode: +vv Yexo SmatZ
19:50:03 <Xaroth> i must admit though, he does give free advertisment
19:50:13 <Xaroth> then again, I wonder if that's a good or bad thing..
20:03:08 <TrueBrain> yet again, a function I don't really understand :p
20:03:23 <TrueBrain> if it is non-zero, it returns 0:0
20:03:28 <TrueBrain> else the address of the unit
20:03:52 <TrueBrain> it also decreases 6F
20:04:17 <TrueBrain> well, the odd part about it, is that in this file are all pool related things
20:04:23 <TrueBrain> so I am wondering what it has to do with pool
20:04:49 <Xaroth> right, need to figure out how to sanely fix that silly thing in Building_Create :/
20:06:48 <TrueBrain> okay, more correct: it links through to the air unit
20:07:50 <TrueBrain> still makes little sense ... as it finds the airunit at 6f
20:08:08 <TrueBrain> if 6f > 0, then airunit.get(6f - 1)
20:08:22 <TrueBrain> so airunits have a real unit linked to them? Or is it when they are picked up?
20:10:36 *** Xaroth_ has joined #openDune
20:13:17 <TrueBrain> Xaroth / Xaroth_: it was a good idea of you to make loc02, loc04, etc vars :)
20:13:21 <TrueBrain> makes the conversion easier ;)
20:14:20 <TrueBrain> sorry, 0:0 is the 16bit CS:IP notation
20:14:25 * glx hates people with bad connection ;)
20:14:27 <TrueBrain> my mind is in different places from time to time :p
20:23:23 <TrueBrain> I revise my opinion: I think variable_04 & 0x04 means: is being build
20:23:30 <TrueBrain> build or built .. hmm ..
20:24:07 <TrueBrain> of global->variable_38BC is zero, units and buildings with this flag are not detected
20:24:17 <TrueBrain> as they don't really exist, I think that is what is meant :)
20:24:52 <Xaroth_> units don't autoattack it iirc
20:25:01 <TrueBrain> not even related to what I tried to say :)
20:25:08 <TrueBrain> unit->variable_04, bit 3 (0x04)
20:25:18 <TrueBrain> I think it indicates a unit is being built (same for Buildings)
20:25:31 <TrueBrain> this because if the GLOBAL variable 38BC is zero, Find functions skip these units and buildings
20:25:59 <TrueBrain> oh, wait, you mean it like that
20:26:37 <TrueBrain> when creating units, you can still create a unit past some limit, if this same 38BC is not zero
20:26:53 <TrueBrain> so still possible :p
20:27:34 <TrueBrain> Xaroth_: but I don't think it is saboteur, why else would the same code be in buildings
20:27:50 <TrueBrain> so I think it is to differ between what is being built, and what is already on the map
20:28:14 <TrueBrain> which means the function you work at is to start building a building
20:28:24 <TrueBrain> (hmm .. structure might have been a better name :p)
20:29:10 <TrueBrain> house->variable_08 looks a lot like max-units
20:29:34 <TrueBrain> when I am done with this, I will run a few tests for such variables :)
20:29:51 <TrueBrain> if (h->unitCount >= h->variable_08) {
20:29:53 <TrueBrain> if (emu_get_memory16(0x2D07, var08 * 0x5A, 0x3C) != 0x4) {
20:29:54 <TrueBrain> if (emu_get_memory16(0x2D07, var08 * 0x5A, 0x3C) != 0x5) {
20:29:56 <TrueBrain> if (g_global->variable_38BC == 0x00) return NULL;
20:29:59 <TrueBrain> that should be possible to write easier, one would think ....
20:30:14 <TrueBrain> and yes, I also have an array at 2something
20:31:55 <TrueBrain> I somehow am a bit against looking in those tools at fed2k .. just because it is no fun to figure out things that way :p
20:32:22 <Xaroth_> those tools should look at us for the right meaning
20:33:20 <TrueBrain> emu_orw(&emu_si, emu_si);
20:33:22 <TrueBrain> if (!(emu_flags.zf || emu_flags.sf != emu_flags.of))
20:34:11 <TrueBrain> if (emu_si > 0) I think ...
20:38:03 <TrueBrain> scenarios predefined from where to where in the unit array types can be?
20:38:07 <TrueBrain> so caps are per type?
20:42:29 <TrueBrain> fun fact: buildings on Allocate are not assigned a house, Units are
20:47:02 <TrueBrain> I am going to guess here, but I think unit 25 is a deviator :)
20:47:19 <TrueBrain> it sets variable_58 to 3, where variable_59 is the deviated
20:53:09 <TrueBrain> I think 38BC (global) is like: in-game-mode or preparing-mode
20:53:11 <TrueBrain> or something of the like
20:59:16 <TrueBrain> k, done .. testing ..
21:03:37 <TrueBrain> what is slightly odd is the hole between buildingArray and houseArray ..
21:04:10 <TrueBrain> like it was dropped ...
21:04:13 <TrueBrain> or maybe used later
21:04:36 <TrueBrain> maybe the AirUnit is solo carry-alls
21:04:39 <TrueBrain> and the other is there
21:04:48 <TrueBrain> for now my array-size is wrong :'(
21:12:27 <TrueBrain> k .. somewhere there is a bug, but I don't feel like tracing that now :)
21:12:31 <TrueBrain> so no commit tonight ... tomorrow ;)
21:12:44 <Xaroth_> still trying to figure out how to get that info properly :/
21:13:15 <TrueBrain> good luck ;) Let me know what you have by the end of the night .. tomorrow I will put the original code next to it, and see how nice of a job you did ;) :)
21:13:22 <TrueBrain> and really, the first function took me almost a day
21:13:31 <Xaroth_> well, for now, whatever i put on my pastebin
21:13:42 <TrueBrain> now it takes me 4 hours to run 1400 lines :s
21:13:55 <Xaroth_> stuck on the emu_get_memory16(emu_ds, 0x00, 0x39EE) bit
21:14:07 <TrueBrain> g_global->variable_39EE
21:14:15 <Xaroth_> /* 38BE() */ uint8 unknown_38BE[0x2DE6];
21:14:18 <TrueBrain> just .... adding that to global.h is a bitch :)
21:14:26 <TrueBrain> mister @calc is your friend :)
21:14:29 <TrueBrain> use a PM I suggest :)
21:14:37 <TrueBrain> my conversation with him over the last few days is pretty boring :p
21:14:57 <TrueBrain> btw, if I remember correctly, it is more a csip32, the 39EE var ;)
21:14:57 <Xaroth_> @calc 0x38BE - 0x39EE
21:15:09 <TrueBrain> don't forget to base 10 16 the value ;)
21:15:22 <TrueBrain> if you are wrong, it won't compile
21:15:31 <TrueBrain> assert_compile takes care of that
21:16:03 <Xaroth_> @calc (0x2DE6 - 0x132)
21:16:14 <DorpsGek> SVN: truebrain (r139) -Add: rewrite Building and House pool, and added Unit and AirUnit pool
21:16:21 <TrueBrain> and yes, the game now doesn't want to start .. I fix that tomorrow
21:16:33 <TrueBrain> but I believe many of the code in there can help you a bit :) or at least allows you to continue on Building struct :)
21:16:58 <TrueBrain> for now I wish you a very good night
21:17:07 <TrueBrain> and nice job so far :) You will get the hang of it ;)
21:18:12 <Xaroth_> maybe my first real commit tomorrow :P
21:42:14 <glx> hmm ok msvc project file starts to be unmaintainable by hand :)
21:42:40 <glx> as I need to specify a different output dir for duplicates
21:45:04 <Xaroth_> yeh, isn't it possible to make a bash script that just finds all .c files and adds that to a template?
21:45:34 <glx> and I think I will need to do it
21:45:45 <Xaroth_> I can have a go at something like it tomorrow
21:45:48 <Xaroth_> bash scripts aren't -that- hard
21:57:54 <Xaroth_> @calc 0x0012 + 0x0046
22:00:20 <Xaroth_> I think I snuck in a line by accident
22:00:36 <Xaroth_> noticed that I never saw variable_12 to be assigned in my first attempt
22:00:43 <Xaroth_> while my new code did...
22:06:02 <Xaroth_> TrueBrain: f__0C3A_25EC_0011_E453 looks a damn lot like an if-null (or if-not-null) handler right?
22:10:40 <Xaroth_> @calc 0x38BE - 0x39EE
22:12:39 <Xaroth_> @calc 0x2DE6 - (0x130 + 0x2 + 0x2 + 0x2CB2)
22:17:32 <Xaroth_> i'm off to bed now i think
23:10:53 *** Xaroth has joined #openDune
23:10:53 *** ChanServ sets mode: +o Xaroth
continue to next day ⏵