IRC logs for #opendune on OFTC at 2010-10-29
⏴ go to previous day
08:48:41 *** planetmaker has joined #openDune
08:49:11 *** planetmaker is now known as Guest1080
08:49:58 *** Guest1080 is now known as planetmaker
10:32:33 *** planetmaker has joined #openDune
10:32:33 *** ChanServ sets mode: +v planetmaker
14:02:55 <TrueBrain> glx: what was the URL of the decoded WSA again? :D
14:13:43 <TrueBrain> woei, flawless conversion :D
14:27:29 <TrueBrain> all works, except one .. right ...
14:37:03 <TrueBrain> it hangs in a function that contains no loops .. lol :)
14:48:25 <TrueBrain> f__2AE1_00B7_0014_51EF freezes up
14:48:30 <TrueBrain> no clue why ... I see nothing wrong with my calls
14:48:55 <TrueBrain> even more as it 'just works' mocely
14:57:51 <TrueBrain> something corrupts ...
15:16:05 <TrueBrain> 100% sure it is my latest work ... sigh ... how to find it ...
15:17:07 <glx> I know the feeling, change one thing and it no longer works
15:17:54 <TrueBrain> the most weird is that it works for 50 frames perfectly
15:17:56 <TrueBrain> and then it fails .. :d
15:18:12 <TrueBrain> well, at least found it :)
15:18:52 <TrueBrain> I thought I know what a certain function did
15:18:54 <TrueBrain> appears I was wrong
15:19:17 <TrueBrain> second is the function result ..
15:22:55 <glx> my brain is not fully functionnal
15:23:43 <glx> dentist extracted a wisdom tooth yesterday (was not planned)
15:24:16 <TrueBrain> now you lost your wisdom? :(
15:38:07 <TrueBrain> I am now done with the WSA load stuff, now converting it to more readable code :)
15:39:02 <TrueBrain> wrote the Malloc part too ...
15:39:07 <TrueBrain> now cleaning time :)
15:39:09 <glx> oh and there are some not decompiled functions too (easy to spot with the static arrays)
15:42:17 <TrueBrain> right .. I have a WSAHeader.flags
15:42:29 <TrueBrain> but before the WSAHeader can be used, it already gets a few flags assigned
15:42:33 <TrueBrain> which then are given to the WSAHeader.flags
15:42:41 <TrueBrain> but ... how to make that flags the union, without making stuff unreadable ..
15:44:10 <TrueBrain> not too happy about it, but it works
15:44:31 <TrueBrain> the scene with the rotating planet? Constantly does reading of the file ..
15:50:58 <TrueBrain> /* 0001 */ BITTYPE notmalloced:1; /*!< If the WSA is in memory of the caller. */
15:50:59 <TrueBrain> /* 0002 */ BITTYPE malloced:1; /*!< If the WSA is malloc'd by us. */
15:51:01 <TrueBrain> /* 0004 */ BITTYPE dataOnDisk:1; /*!< Only the header is in the memory. Rest is on disk. */
15:51:02 <TrueBrain> /* 0008 */ BITTYPE dataInMemory:1; /*!< The whole WSA is in memory */
15:51:05 <TrueBrain> it is so hard to use 2 sides of a boolean ... you really need 2 of them ....
16:03:58 *** planetmaker is now known as Guest1157
16:13:31 <glx> 0x6C91 is indeed a memory block
17:45:20 *** fjb is now known as Guest1165
18:25:40 <TrueBrain> darn, can't convert everything nicely now ... because it depends on the csip value
18:41:16 <TrueBrain> fuck ... everything was working, my cleaning messed something up ...
18:48:08 <TrueBrain> lucky enough itis always something simple :)
18:51:09 <DorpsGek> SVN: truebrain (r1164) -Add: C-ified WSA_Load(), WSA_Unload(), WSA_DisplayFrame(), WSA_GetFrameCount(), and related friends
18:55:33 <TrueBrain> glx: you were doing DrawSprite, not?
18:55:46 <TrueBrain> you converted the code around f__2BD6_0000_0015_24A9 ?
18:56:40 <TrueBrain> well, you did, but more I am asking: any clues what it does?
18:56:45 <TrueBrain> it seems to decode something, from my end
18:57:00 <glx> emu_push(g_global->variable_6F18.s.cs); emu_push(g_global->variable_6F18.s.ip);
18:57:00 <glx> emu_push(sprite_csip.s.cs); emu_push(sprite_csip.s.ip);
18:57:00 <glx> emu_push(0x2903); emu_push(0x0341); emu_cs = 0x2BD6; f__2BD6_0000_0015_24A9();
18:57:03 <TrueBrain> takes 2 buffers and a size
18:57:38 <TrueBrain> emu_push(header->bufferLength);
18:57:39 <TrueBrain> emu_push(header->buffer.s.cs); emu_push(header->buffer.s.ip);
18:57:41 <TrueBrain> emu_push(dest.s.cs); emu_push(dest.s.ip);
18:57:42 <TrueBrain> emu_push(emu_cs); emu_push(0x0A76); emu_cs = 0x2BD6; f__2BD6_0000_0015_24A9();
18:57:46 <TrueBrain> I know what your emu_bx is :p
18:57:53 <TrueBrain> but is this function called after reading from disk?
18:58:29 <glx> no disk access in DrawSprite
18:58:37 <TrueBrain> I am going to convert this function, just so you know :)
19:26:13 <TrueBrain> yeah, the function does some kind of RLE :)
19:53:02 <TrueBrain> N0 < 0x80: memmove(dest, dest - N1, (N0 >> 4) + 3)
19:53:05 <TrueBrain> N0 == 0xFE: memset(dest, N3, N1:N2)
19:53:06 <TrueBrain> N0 == 0xFF: memmove(dest, dest + N3:N4, N1:N2)
19:53:08 <TrueBrain> N0 & 0x40: memcpy(dest, source, (N0 & 0x3F))
19:53:09 <TrueBrain> Rest: memmove(dest, dest + N1:N2, (N0 & 0x3F) + 3)
19:53:11 <TrueBrain> I think that is the algorithm
19:53:15 <TrueBrain> heavily based on little change
20:39:51 <TrueBrain> pixel errors, but the old code shows me the same reads as the new .. so somehow I have a wrong write :(
21:12:53 <TrueBrain> wtf ... I change a memmove for a memcpy and it works ...
21:13:50 <TrueBrain> memmove should always be fine, where memcpy can fail ... wtf?
21:19:27 <TrueBrain> this does not make sense .... memcpy and memmove should be identical, in this respect ..
21:20:27 <TrueBrain> this can only be true if the algorithm assumes memcpy is done ..
21:20:31 <TrueBrain> that would be REALLY nasty ....
21:33:28 <TrueBrain> okay, some minor artifects ...
21:38:29 <TrueBrain> you know what is very kewl? The DUNE II rotating thingy, finally goes smooth :D
21:41:06 <TrueBrain> naming this function after what other people in the Dune2 community did
21:41:11 <TrueBrain> just to avoid another layer of confusion :)
21:44:45 <TrueBrain> whoho, this function has not a single emu_ entry :D
21:50:36 <TrueBrain> glx: incoming conflict. Rename f__2BD6_0000_0015_24A9 with emu_Format80_Decode
21:51:19 <DorpsGek> SVN: truebrain (r1165) -Add: C-ified Format80_Decode()
21:52:52 <TrueBrain> it is a weird decoder btw .. :)
21:53:48 <DorpsGek> SVN: truebrain (r1166) -Fix: forgot to remove an 'extern' entry
22:17:54 <DorpsGek> SVN: truebrain (r1167) -Fix: more C-ifying on existing C-ified functions
continue to next day ⏵