IRC logs for #opendune on OFTC at 2011-05-31
⏴ go to previous day
01:17:20 *** fjb is now known as Guest2883
11:16:59 <TrueBrain> Xaroth|W1rk: wtf @ name
11:17:05 <TrueBrain> how can I talk to you if you have aweird name :p
13:01:02 <TrueBrain> nice found yesterday
13:01:09 <TrueBrain> weird it didn't give a problem when I tested it :(
13:05:04 <glx> xms is used by voices only
13:05:13 <glx> and you disable them IIRC
13:06:26 <glx> and as it failed, it always played current content of g_global->readBuffer
13:30:40 <glx> and I checked the diff many times before finding the bug
13:32:29 <TrueBrain> what are you up to now? So we don't do bot the same :D
13:32:59 <glx> for now I'm looking randomly in the code to find something to do :)
13:33:15 <TrueBrain> I am going to try to remove the overlay stuff again :)
13:33:42 <TrueBrain> 3 warnings when compiling
13:33:50 <TrueBrain> something about int vs size_t
13:34:45 <TrueBrain> what does profile.ini do btw?
13:35:14 <glx> profile.ini allows you to change structures and unit info
13:35:16 <TrueBrain> it overwrites the default costs etc?
13:35:23 <TrueBrain> k, what we expected
13:36:00 <glx> count = sscanf(buffer, "%hu,%hu,%hu,%hu,%hu,%hu,%hu,%hu", &buildCredits, &buildTime, &hitpoints, &fogUncoverRadius, &availableCampaign, &priorityBuild, &priorityTarget, &sortPriority);
13:36:12 <TrueBrain> but then what is it with the SetString stuff?
13:36:46 <TrueBrain> owh, in debug you can make it write the ini file to disk, so you can see what it does ...
13:36:54 <glx> with g_global->debugGame true, but it does it in memory and never writes it to the disk :)
13:37:52 <TrueBrain> it seems the warning I get is about 15- strlen
13:38:11 <TrueBrain> its also a bit weird
13:39:05 <TrueBrain> I don't get the change of order
13:39:15 <TrueBrain> that is stupid weird
13:39:44 <DorpsGek> SVN: truebrain (r1692) -Fix: GCC warnings
13:40:01 <glx> if (sscanf(buffer, "%hu,%hu,%hu,%hu", &variable_50, &damage, &fireDelay, &variable_40) < 4) continue; <-- that is for units only
13:45:06 <glx> ok 22A6:1200 does something with the video controller
13:50:04 <TrueBrain> right, without overlay, audio-driver is complaining :D
13:51:58 <glx> but they are not in overlays
13:52:04 <TrueBrain> but everything moved in the memory
13:53:32 <TrueBrain> they are no longer depending on the cs
13:53:39 <TrueBrain> some graphical glitches ...
13:53:56 <TrueBrain> try running intro on trunk
13:54:10 <TrueBrain> assertsin the emu_get_memorycsip
13:54:47 <TrueBrain> graphical glitch is for sure due to my patch
13:55:12 <glx> I had asserts only related to memmove and voices
13:56:49 <TrueBrain> ah, you assumed 0x44AF to be there .. it no longer is :D
13:58:23 *** Xaroth|W1rk is now known as Xaroth|Work
13:58:42 <glx> so Drivers_CallFunction() fails ?
13:58:50 <TrueBrain> those were easy to fix
13:58:55 <TrueBrain> but I have a solution :D
13:59:22 <TrueBrain> yeah ... now it works :D
14:00:05 <TrueBrain> wow, the game works!!! :D
14:00:39 <TrueBrain> no clue if sound routes to my boxes correctly
14:01:06 <TrueBrain> so you will have to test that :D
14:02:01 <DorpsGek> SVN: truebrain (r1693) -Fix: make the music drivers non-dependable on a preset CodeSegment. It tends to change if memory management changes
14:02:17 <DorpsGek> SVN: truebrain (r1694) -Add: remove the overlay manager completely, and reroute some signals
14:03:54 <DorpsGek> SVN: truebrain (r1695) -Fix: MSVC project files .. sigh..
14:04:11 <TrueBrain> why are the hardlinks to AB00 needed, any idea?
14:04:23 <TrueBrain> but it seems unused now
14:04:30 <TrueBrain> that is, no way they are working atm, but no errors
14:05:43 <TrueBrain> well, those still might trigger errors then
14:05:49 <TrueBrain> can't find any call to 056F nor 058F
14:05:57 <TrueBrain> might happen .. their hardlink is wrong anyway
14:06:14 <glx> they are called by libemu IIRC
14:06:18 <TrueBrain> hmm ... guess worklist script is wrong ...
14:06:29 <TrueBrain> I removed so many things, and nothing changed :(
14:06:56 <glx> data_csip = emu_get_csip32(g_mt32mpu_cs, index, 0x12F2);
14:06:56 <glx> data = (MSData *)emu_get_memorycsip(data_csip);
14:07:39 <TrueBrain> ah, forgot decompiled/decompiled.h, sigh
14:07:45 <TrueBrain> asserts? Hmm .. more detail?
14:07:48 <TrueBrain> doesn't assert here
14:09:10 <TrueBrain> owh, guess it is caleld before when I set the cs ...
14:10:29 <DorpsGek> SVN: truebrain (r1696) -Fix: hopefully fix a crash
14:10:59 <DorpsGek> SVN: truebrain (r1697) -Fix (r1696): compile before commit
14:11:48 <DorpsGek> SVN: truebrain (r1698) -Fix (r1694): also remove entries from decompiled.h
14:12:07 <glx> assert again, but in MPU_IsPlaying() now
14:14:54 <TrueBrain> that one is more tricky
14:15:03 <TrueBrain> nothing on him to set that variable
14:15:15 <TrueBrain> was hoping it just got set before that got called tbfh
14:15:57 <glx> weird it should be correct
14:16:12 <DorpsGek> SVN: truebrain (r1699) -Fix (r1696): another attempt
14:18:07 <DorpsGek> SVN: truebrain (r1700) -Fix: more unused entries in decompiled.h
14:18:40 <TrueBrain> there we go .. 77% done
14:19:48 <TrueBrain> does it run with latest glx?
14:20:52 <glx> Program Termination: jumped to 4352:058F, which is not decompiled.
14:21:10 <TrueBrain> ah, that is the hardlink indeed
14:21:14 <glx> The jump appears to originate from 0000:0000.
14:21:15 <TrueBrain> how are we going to fix thatone ... euh ...
14:22:16 <TrueBrain> when did it happen?
14:22:43 <glx> after the first voice play
14:23:07 <glx> it calls the interrupt to refill it
14:23:16 <DorpsGek> SVN: truebrain (r1701) -Fix: temporary fix interrupt calls by matching current codesegment. This will break again in the future.
14:24:06 <glx> btw I noticed many errors in mt32mpu
14:24:51 <TrueBrain> versus the specifications?
14:24:57 <glx> I'll check but I think all emu_get_csip32(cs, index, 0x12F2) should be index * 4
14:25:09 <TrueBrain> ah, stuff like that
14:25:16 <TrueBrain> yeah ... we need to do AB00 and AB01 soon
14:25:30 <TrueBrain> if possible, with some open source lib .. otherwise make something similar :D
14:25:52 <glx> well voices are silly each file has a different sample rate
14:31:59 <glx> always at "and the evil harkonnen"
14:32:16 <glx> timing issues due to slower fadein I think
14:33:53 <glx> GameLoop_B4ED_0AA5(false);
14:33:53 <glx> } while (g_global->variable_76B4 != 0 && loc10 > g_global->variable_76AC);
14:34:44 <glx> g_global->variable_76AC 0x0000345c unsigned int
14:34:44 <glx> g_global->variable_76B4 0x1110fd0f unsigned int
14:34:44 <glx> loc10 0xeeef0f01 unsigned int
14:34:46 <TrueBrain> it works without voices anyway
14:34:58 <glx> I disabled voices and it still hangs
14:35:10 <TrueBrain> your values are weird
14:36:19 <glx> loc10 is very weird indeed
14:39:16 <glx> ok set loc10 to 0, and animation unpaused
14:43:31 <TrueBrain> any idea why loc10 is weird?
14:45:00 <glx> comes from loc1C = loc10 - g_global->variable_76AC;
14:45:26 <glx> loc10 0x000021e6 unsigned int
14:45:26 <glx> loc1C 0xffffff84 unsigned int
14:45:49 <glx> g_global->variable_76AC is lower than loc10
14:45:58 <TrueBrain> so var805E->variable_0004 is negative?
14:46:38 <glx> then loc10 become negative / very big
14:46:51 <TrueBrain> yes, but loc10 should be bigger than 76AC (see decleration)
14:47:00 <TrueBrain> can only happen if 805E->04 is negative
14:47:45 <glx> var805E->variable_0004 is 0x1E
14:48:00 <TrueBrain> but it is unsigned ....
14:48:11 <TrueBrain> loc10 = 76AC + 0x1E * 6 ...
14:48:28 <glx> 76AC is increased each tick
14:48:29 <TrueBrain> so loc10 - 76AC == 0x1E * 6
14:48:56 <TrueBrain> time might have passed indeed
14:49:06 <TrueBrain> even then .... for 76AC to be bigger than loc10 ...
14:49:49 <glx> and if there is palette animation too it's worse
14:50:48 <DorpsGek> SVN: truebrain (r1702) -Fix: speedup fadein a bit, it seems to give problems on slower machines
14:50:59 <glx> g_global->variable_76B4 = loc18; <-- and that is not good either ;)
14:51:00 <TrueBrain> it is directly related to CPU speed, how fast this goes
14:54:55 <glx> and first ordos rockets don't go in fast forward mode
14:58:23 <TrueBrain> at least it works :D
15:19:10 <TrueBrain> what did sti and cli do again ..
15:19:13 <TrueBrain> thought nothing improtant?
15:20:11 <TrueBrain> and you can remove the function
15:20:14 <TrueBrain> it doesn't do anything for us
15:20:25 <TrueBrain> 3D4 and 3D5 are not implemented
15:22:26 <DorpsGek> SVN: truebrain (r1703) -Add: remove 2BC0. Those functions are no longer used
15:23:28 <TrueBrain> I wonder what it is supposed to do ...
15:26:15 <TrueBrain> but so maybe leave the function empty
15:26:26 <TrueBrain> we have no clue yet what those functions do really :)
15:26:57 <TrueBrain> easier if we can put them in some array I guess
15:31:16 <TrueBrain> I doubt it does nothing, if they made a function for it :D
15:31:27 <TrueBrain> so I am tempted to keep the structure intact
15:32:41 <glx> I'm tempted to remove emu_GFX_Ignore[12] :)
15:32:54 <TrueBrain> if they have no more callers
15:32:58 <TrueBrain> last time I couldn't :)
15:33:09 <glx> there are callers, but they can be modified
15:33:32 <glx> emu_Mouse_CheckMovement() is the caller
15:44:01 <TrueBrain> removing unused 01F7 functions ...
15:48:02 <DorpsGek> SVN: truebrain (r1704) -Add: removed many now unused functions in 01F7 codesegment
15:53:13 <DorpsGek> SVN: truebrain (r1705) -Add: more unused functions removed
15:53:21 <TrueBrain> 50-ish functions removed :D
15:53:27 <TrueBrain> 81% done, 89% named
16:06:27 <glx> hmm how to name an GUI_DrawFilledRectangle using ^= colour instead = colour ?
16:14:44 <glx> I go for DrawXorFilledRectangle
16:20:10 <TrueBrain> trying to figure out 01F7 more .. hard ..
16:21:02 <TrueBrain> trying to figure out the startup mostly
16:22:23 <DorpsGek> SVN: glx (r1706) -Add: C-ified GUI_DrawXorFilledRectangle() and removed useless functions. That removes 22A6.
16:24:47 <TrueBrain> I can either try to remove it all, but then it can fail somewhere along the line ...
16:25:26 <glx> when I tried bypassing entry point I got "not enough memory" error
16:29:46 <TrueBrain> so much initialization .....
16:31:50 <glx> first it gets DOS version
16:32:15 <TrueBrain> yeah .. I want to try to avoid decoding all that tbh :D
16:34:14 <TrueBrain> okay ... going to approach this differently ..
16:34:16 <glx> oh the inmportant part is emu_get_memory16(emu_ds, 0x00, 0x91) = emu_bp;
16:34:59 <DorpsGek> SVN: truebrain (r1707) -Add: remove unused functions. It defined an interrupt (0x24) which is never triggered
16:35:54 <DorpsGek> SVN: truebrain (r1708) -Fix: remove unused emu_ function
16:40:10 <TrueBrain> all code is a bit tricky
16:45:17 <TrueBrain> there is a chance that in any of my next commits I commit something that is going to give a problem .. I do my best to avoid it, but it is a bit guessing :D
16:46:50 <DorpsGek> SVN: truebrain (r1709) -Add: remove a function that stored the current directory in memory, write-only
16:47:14 <DorpsGek> SVN: truebrain (r1710) -Add: remove a call to a function that does sanity checks for the DOS env. We don't need that, really.
16:47:20 <glx> I think I'll try to convert MPU
16:47:30 <glx> then I can try to replace it
17:06:40 <DorpsGek> SVN: truebrain (r1711) -Fix: remove the need of a wrapper
17:09:59 <DorpsGek> SVN: truebrain (r1712) -Add: remove functions regarding 'current drive'. This is DOS only, and we don't care
17:14:33 *** Alberth has joined #openDune
17:14:49 <TrueBrain> if you like, please convert the input thingies :D
17:15:00 <TrueBrain> also, if glx doesn't mind, I wanna give you svn access :p
17:17:31 <Alberth> decompiled code seems to melting very rapidly judging from the commits :)
17:18:35 <TrueBrain> but would you be interested Alberth, or you rather send patches? :)
17:19:42 <Alberth> that sort of depends on where you are going, I think
17:21:17 <Alberth> say one month from now, all decompiled is gone. then what?
17:21:25 <TrueBrain> then we start to improve
17:21:30 <TrueBrain> like OpenTTD, I would suggest
17:21:32 <glx> hmm better try to remove Drivers_CallFunction() calls before converting functions (at least when it's possible)
17:22:01 <TrueBrain> I would like to keep OpenDUNE playable in the old-style, with all the crappy interface etc, but without the bugs
17:22:11 <TrueBrain> and a version that is more friendly, still heavily leaning towards dune2
17:22:30 <TrueBrain> but no real concrete ideas tbh
17:33:52 <Alberth> I seem to like code refactoring more than making really new things.
17:34:41 <TrueBrain> enough refactoring to do :D Lol :)
17:34:46 <TrueBrain> so much shit to rewrite .... :(
17:37:51 <Alberth> that's why I started patching here :) , together with running out of useful ideas to do for openttd at the time.
17:39:01 <TrueBrain> well, if you want SVN access, let me know :)
17:40:47 <Alberth> If giving me svn access makes your life(s) easier, go ahead. Like in OpenTTD I won't make non-trivial changes without your approval
17:41:16 <Alberth> ie I will continue bothering you with code reviews :p
18:37:51 <TrueBrain> so ... I think I removed all 01F7 calls ...
18:37:56 <TrueBrain> which means only memory stuff is used now :p
18:40:24 <TrueBrain> now it becomes all very tricky tbh
18:40:50 <TrueBrain> I wonder if and how to C-ify Interrupt_Vector_Set
18:40:56 <TrueBrain> doesn't really matter ...
18:41:32 <TrueBrain> how do we want to have g_unitInfo?
18:45:12 <TrueBrain> lol; in original dune2, only the house who build the last structure could get the "spice lost" message
18:45:35 <TrueBrain> going to remove that behavoir in total; we have it as enhancement, but it is too much effort to maintain that (requires a csip :p)
18:47:16 <Alberth> I'd consider that behavior a bug, so safe to remove :)
18:47:29 <TrueBrain> its a very odd bug, even
18:48:32 <TrueBrain> owh, btw, glx, do you also consider it now safe to start removing stuff from g_global? We have nothing else that is reading it, right?
18:48:43 <Alberth> but the AI doesn't rebuild so often in my experience,so the message usually ends up at the player
18:49:18 <TrueBrain> we only have mouse and input left ... doubt they touch g_global outside their own scope ..
18:50:53 <Alberth> well, since you have successfully diverted my attention this evening, what segment needs decoding?
18:51:24 <TrueBrain> we have left ... 01F7 - general bullshit
18:51:29 <TrueBrain> 23E1 - memory allocation
18:51:34 <TrueBrain> 263B - Video wrappers
18:51:47 <TrueBrain> 2AE1 - blegh boring don't want to do them
18:51:54 <TrueBrain> 2BEE - video wrappers
18:52:06 <TrueBrain> all except for 2AE1 don't need converting
18:52:20 <TrueBrain> only 2AE1, 29A3 and 29E8 are left, and the sound drivers (which glx works on)
18:56:00 <TrueBrain> its the last 3 functions of a decoder of WSA
18:56:05 <TrueBrain> these 2 blitter it directly to the screen
18:56:15 <TrueBrain> where one mode does it xor
18:56:18 <TrueBrain> and the other does it =
18:56:26 <TrueBrain> the latter can be avoided
18:56:35 <TrueBrain> the first one is used once (!), when a movie is split over 2 WSAs
18:56:48 <TrueBrain> and the second frame of the second WSA is still xor of the last frame of the first WSA
18:56:55 <TrueBrain> second frame = first frame
18:57:01 <TrueBrain> very annoying ... couldn't be arshed to convert :D
18:58:02 <TrueBrain> btw, Alberth, we have something nice:
18:58:14 <TrueBrain> latter is patch, first is a nice way of viewing them
18:58:27 <TrueBrain> glx: what do you think of above patch?
19:03:14 <Alberth> s/considered to badly/considered to be so bad/
19:03:45 <TrueBrain> shutdown my machine already, hope I won't forget ... :p
21:43:22 <DorpsGek> SVN: glx (r1713) -Fix (r1708): MSVC project files
21:46:49 <DorpsGek> SVN: glx (r1714) -Add: named some functions
23:37:03 <DorpsGek> SVN: glx (r1715) -Add: C-ified MPU_Init() and MPU_TestPort()
23:37:28 <glx> but don't search MPU_TestPort() in the code ;)
continue to next day ⏵