IRC logs for #opendune on OFTC at 2009-09-17
⏴ go to previous day
07:07:22 <Xaroth> oo, i hath spotted a glx :o
08:09:58 <TrueBrain> I not yet a news post :p :p
08:15:45 <Xaroth> From decrypting your message I take it you want me to make a news post?
08:18:52 <TrueBrain> you promised 2 days ago :)
08:19:26 <TrueBrain> if you can't come up with anything, you don't have to ;)
08:19:37 <TrueBrain> "ik zit je een beetje te pesten :p"
08:19:52 <Xaroth> the :P gave it away :)
08:20:00 <TrueBrain> not for everyone :)
08:20:15 <TrueBrain> either way, I am very poor in PR
08:22:21 <TrueBrain> DARN! This can thingy opener broke
08:22:25 <TrueBrain> now how to get some drink out of it
08:22:56 <Xaroth> or scissors = bashing it (carefully tho
08:23:18 <TrueBrain> it is Kasvan Cevitam
08:29:17 <Xaroth> use a knife, sharp tipped
08:29:25 <Xaroth> should be able to cut it open easily
08:29:36 <Xaroth> make sure to hold the lip up before cutting it completely
08:29:43 <Xaroth> or you'll have that piece of plastic floating in it :P
08:54:54 *** Yexo__ has joined #openDune
10:20:21 <TrueBrain> I guess today I should boot to OSX and try OpenDUNE there :p
10:23:24 <TrueBrain> but I don't feel like doing that
10:26:50 <TrueBrain> of course the first time I start OpenDUNE it crashes on a missing function :p
10:26:55 <TrueBrain> I wonder how often that will keep on happening
10:34:11 <TrueBrain> LibEMU updated, INT21:41 supported (DELETE FILE)
10:40:33 <TrueBrain> running a 720p movie kind of kills my IO cache
10:41:22 <DorpsGek> SVN: commit (r33) by truebrain - -Add: mapped another 10 functions (clearing Hall of Fame)
11:41:21 <TrueBrain> so, lets play a bit more :)
11:42:27 <TrueBrain> how often you are in the menu, there are still new functions :p
11:47:35 <TrueBrain> does any of you have any problem with it, if we keep this GCC only for the time being?
11:57:15 <Xaroth> :) I have my creative moments
11:57:40 <Xaroth> damn formatting in redmine
11:57:43 <TrueBrain> me too, but on a whole other plane :p
12:00:47 <DorpsGek> SVN: commit (r34) by truebrain - -Add: mapped another 9 functions (general, all over the place)
12:01:53 <TrueBrain> damn, I could almost build a windtrap! :p
12:02:31 <Xaroth> another missing function? :P
12:02:38 <TrueBrain> and resuming still fails
12:07:30 <TrueBrain> 29A3:0054 <- mouse point entry
12:08:47 <glx> undefined references in patched.c
12:09:41 <TrueBrain> latest svn with no diff?
12:10:00 <glx> seems all are related to 01F7
12:10:09 <TrueBrain> patched.c was changed a few revisions ago
12:10:38 <glx> clean svn r34 (except my little makefile change to use gcc)
12:12:09 <glx> hmm svn up skips patched.c it seems
12:12:36 <glx> oh ok I think I know what happened
12:16:52 <TrueBrain> Xaroth: naming of functions ... Mouse_EntryPoint or MouseEntryPoint
12:17:05 <TrueBrain> (the idea of the _ is to make clear it is in the Mouse 'class', and the function EntryPoint
12:17:21 <glx> and it crashes writing crash.bin
12:17:38 <TrueBrain> we still haven't found all entries ;)
12:18:00 <glx> crashed at "evil harkonen" ;)
12:18:11 <TrueBrain> again? Weird .. here it does run most of the time :)
12:18:22 <TrueBrain> send me your crash.bin in that case :)
12:18:40 <glx> [14:17:27] <+glx> and it crashes writing crash.bin
12:18:57 <TrueBrain> sorry, I read that as: it crashes and has written a crash.bin
12:19:02 <TrueBrain> why wouldn't it be able to write the crash.bin?
12:19:21 <nsz> isn't there a way to tell which parts of the memory aren't recorded yet
12:19:36 <TrueBrain> nsz: how do you mean?
12:20:05 <nsz> you know the address of the functions
12:20:09 <TrueBrain> values[0] = emu_cs;
12:20:19 <nsz> so you can tell if there si something missing in between
12:20:41 <nsz> is the data intermixed with code?
12:20:43 <TrueBrain> such assumptions has shown really terrible for decompiling .. many compilers try to 'trick' a disassembler there
12:20:54 <TrueBrain> for example, the last byte in the data are can be a EA
12:20:57 <TrueBrain> which means far jump
12:21:01 <TrueBrain> and needs 4 bytes afterwards
12:21:09 <TrueBrain> which happens to be partly a very important command there
12:21:18 <TrueBrain> so the JIT and decompiler works on no assumptions
12:21:46 <TrueBrain> glx: it is true that I never check if memory/crash.bin is really opened .. I just assume it is
12:21:59 <nsz> ok but this way you can make an estimate of the size of the untouched parts
12:22:09 <TrueBrain> either way, your backtrace does not comply with latest source ..
12:22:49 <TrueBrain> a simple script can guess that based on the TXT files
12:27:15 <Xaroth> that way if things need to be turned into classes the naming scheme isn't that different
12:27:21 <Xaroth> Mouse::EntryPoint or Mouse_EntryPoint
12:30:57 <TrueBrain> I guess can I losen up some constraints in the decompiler for Dune2
12:31:14 <TrueBrain> like if he knows where it wants to jump to, but the jump is not yet seen, it can still tell the instruction
12:31:20 <TrueBrain> but not many cases that happens
12:31:30 <TrueBrain> it is mostly to indicate a skip of the next instruction
12:31:39 <glx> weird crash.bin is not created only in this case
12:31:41 <TrueBrain> even that is resolvable, but .. that will be complex ;)
12:31:48 <TrueBrain> glx: can be a timer issue
12:38:12 <TrueBrain> I guess we need something to mark thing as unknown
12:38:19 <TrueBrain> if (emu_get_memory8(emu_ds, 0x00, 0x7097) != 0x0) { f__29A3_01C3_000C_CF33(); return; }
12:38:20 <TrueBrain> if (emu_get_memory8(emu_ds, 0x00, 0x7098) == 0x0) { f__29A3_01C3_000C_CF33(); return; }
12:38:24 <TrueBrain> I have no idea what those 2 memory addresses hold
12:38:37 <TrueBrain> I guess a list somewhere which indicates that, would be nice .. that if we ever figure it out, you know where to look ..
12:38:44 <TrueBrain> on the other hand, you can also grep for that number :p
12:45:57 <glx> grr libemu is not in valid C for MSVC
12:46:10 <TrueBrain> why doesn't that come as a suprise? :)
12:46:12 <TrueBrain> where does it break?
12:46:13 <Xaroth> why do you think I gave up :P
12:46:32 <glx> everywhere you declare variables in the middle of functions
12:46:52 <TrueBrain> you got to be kidding me? :)
12:46:56 <glx> in C declarations should be at scope beginning
12:46:57 <TrueBrain> I thought we left that long long long ago :p
12:47:10 <TrueBrain> didn't C99 say otherwise?
12:49:00 <glx> ok compiling as c++ is better
12:51:46 <TrueBrain> you don't believe it if I tell you: a screen is 320x200 (I extend it to 640x400 in the emulator), but mouse movement is in 640x200 (no typo)
12:57:47 <DorpsGek> SVN: commit (r35) by truebrain - -Fix: make sure files in a subdirectory can also be compiled
13:02:29 <nsz> hm why would they do that?
13:03:17 <nsz> c99 allows declarations anywhere but it's not a good style
13:03:54 <nsz> if you really need a declaration in the middle of a function then you can start a new block there
13:04:05 <nsz> that's leagal in c89 and more clear
13:19:55 <glx> of course compiling as c++ fails now because someone used "new" as variable name :)
13:21:59 <glx> I used something like that yes
13:25:39 <TrueBrain> nsz: I disagree; defining all your variables at the top of a function is mostly VERY unclear, and randomly starting a scope is not always an option
13:25:44 <TrueBrain> but that is all preference and style :)
13:25:50 <glx> now I need to retrieve my gettimeofday implementation
13:26:01 <TrueBrain> glx: doesn't MSVC have those?
13:26:16 <TrueBrain> I thought it was a standard :p
13:26:18 <glx> even mingw didn't have it some time ago
13:26:23 <TrueBrain> but .. that even doesn't hold MSVC, so who am I kidding :)
13:28:19 <nsz> it's not randomly starting a scope
13:28:39 <nsz> it's starting a scope to introduce new variables
13:29:05 <TrueBrain> nsz: in my opinion that is just a silly limitation :) But as I said, different people, difference preferences :)
13:29:29 <nsz> limitations make you more effective
13:29:51 <nsz> without that limitation one should check much more code to get the variable defs
13:40:01 <TrueBrain> the mouse handler has check after check after check .... annoying :p
13:42:09 <TrueBrain> I have one memory address, that is only read ... never written to :s
13:55:27 <TrueBrain> Left mousebutton is 0x41 and right is 0x42 ..
13:55:31 <TrueBrain> I wonder where those numbers come from
14:07:44 <TrueBrain> okay .. some kind of policy .. should I first commit the slightly rewritten assembly version before I make it a real C version, or would it be okay if I just skip that step? (as my slightly rewritten assembly version can also be very wrong :p)
14:07:53 *** ChanServ sets mode: +v Yexo_
14:07:55 <TrueBrain> I guess the decompiled version is a good reference ..
14:09:58 <TrueBrain> just rewrote 40 lines of assembly to 10 simple lines of C :p
14:26:19 <glx> hmm I still get undefined reference with libemu.lib :(
14:29:42 <glx> TrueBrain: emu_init declaration is wrong
14:33:37 <TrueBrain> lol, every click on New Game now causes a nice-crash
14:33:46 <TrueBrain> oh well .. we will get there some day :)
14:40:00 <DorpsGek> SVN: commit (r36) by truebrain - -Add: rewrote a small portion of the mouse handler to real C
14:45:36 <glx> msvc build crash on start
14:46:13 <Xaroth> the mingw build crashes 7/10 times as well
14:47:30 <TrueBrain> emu_idivw(&emu_ax.x, emu_bx.x);
14:47:32 <TrueBrain> emu_imuluw(&emu_ax.x, emu_bx.x);
14:48:34 <TrueBrain> well, it does: (ax / bx) * bx
14:48:38 <TrueBrain> so just a way of rounding
14:48:44 <TrueBrain> makes me wonder if bx is a constant or not
14:48:58 <Xaroth> <bert visser> ja natuuuuuurlijk </bert visser
14:49:11 <Xaroth> that rounding would be well odd then
14:49:38 <TrueBrain> why? It is a pretty logic thing to happen
14:49:59 <TrueBrain> just it is never called in DOSBox, so I can't see what the values are :p
14:50:14 <TrueBrain> if you want your mouse to move 16 pixels at the time, this is a good method :)
14:50:42 <TrueBrain> mouse movement triggers the most problems for now glx :)
14:51:14 <TrueBrain> weird piece of code .. it only does the rounding thing on the x-position
14:51:20 <TrueBrain> and only for a part on the right screen
14:51:35 <TrueBrain> does the mouse ever in Dune move in blocks or what ever?
14:52:13 <TrueBrain> oh, building a structure
14:52:26 <Xaroth> yes, that thing moves in block
14:52:34 <TrueBrain> but also in verticle direction :s
14:52:44 <TrueBrain> oh, guess what hte next block of code does
14:52:47 <Xaroth> so there's something you haven't found yet that does the vertical one :P
14:55:49 <Xaroth> going home early today
14:55:53 <Xaroth> damn flu is killing me
14:56:02 <TrueBrain> and go to bed when you are home :p
14:58:33 <TrueBrain> emu_cx.x -= emu_get_memory16(emu_ds, 0x00, 0x6C7C);
14:58:35 <TrueBrain> emu_cx.x = (emu_cx.x / snap) * snap;
14:58:36 <TrueBrain> emu_cx.x += emu_get_memory16(emu_ds, 0x00, 0x6C7C);
14:58:39 <TrueBrain> who understands why first a value is substracted?
14:59:01 <TrueBrain> hmm .. I guess to give it a few pixels offset
15:15:21 <TrueBrain> are you sure Sleep(1) sleeps for 1msec, and not for 1 second?
15:16:37 <glx> The minimum time interval for which execution is to be suspended, in milliseconds
15:24:38 <TrueBrain> okay ... something is now wrong .. hmm ..
15:26:19 <TrueBrain> when I disable 'packed' for GCC, it can't start
15:27:34 <TrueBrain> I guess you controlled that somewhere else with MSVC?
15:27:59 <glx> not really, I just commented out this part
15:28:09 <TrueBrain> weird, as the MSB has to be packed in order to work correctly
15:28:27 <TrueBrain> it is 16 bytes long
15:31:31 <TrueBrain> can you try if I didn't fucked up? As I did make a few alterations :)
15:31:35 <TrueBrain> oh, and I didn't add the project file yet
15:33:12 <TrueBrain> thanks a lot glx :)
15:34:03 <DorpsGek> Xaroth: Error: unexpected EOF while parsing (<string>, line 1)
15:34:32 <TrueBrain> I thought I understood the grid snapping, but .. it is not for buildings, as the mouse does normally move around
15:34:39 <TrueBrain> and the mouse location is lost after this snapping
15:34:54 <TrueBrain> on the other hand, there is one place it could in theory still draw the mouse first ..
15:34:59 <TrueBrain> so I guess I should look at that first ;)
15:36:46 <glx> what happens exactly without packed ?
15:36:54 <TrueBrain> OpenDUNE fails on startup
15:37:12 <TrueBrain> Program Termination: jumped to 01F7:21F2, which is not decompiled.
15:37:12 <glx> and generate a crash.bin?
15:37:25 <glx> ok that's what I get with MSVC :)
15:37:34 <TrueBrain> k, then you need to find a way to pack structures :p
15:37:36 <glx> so I need to find how to pack
15:37:41 <TrueBrain> the MSB is read by Dune2 :p
15:38:13 <TrueBrain> #pragma pack I guess
15:38:31 <glx> yes, I just need to understand how to use it :)
15:39:12 <TrueBrain> what I don't get is that this struct is 16 bytes
15:39:18 <TrueBrain> that should be packed by default, in my little world :p
15:39:26 <TrueBrain> #pragma pack is '8' by default :s
15:40:02 <Xaroth> This is equivalent to compiler option /Zp8.
15:40:02 <TrueBrain> it makes 32bit out of every entry
15:40:20 <TrueBrain> using #pragma is more useful :) Depending on project options is baddddd :p
15:40:46 <TrueBrain> glx: and it is better to push/pop the pragma around structs, as having a pragma of 1 in general can be a performance loss :p
15:40:58 <TrueBrain> let me write you a patch now :)
15:50:16 <TrueBrain> snapping is really done before it is drawn ... weird!
15:51:21 <TrueBrain> so far nowhere in the game the snap value is set, so ... what ever :p
15:52:58 <glx> hmm it doesn't like # in a macro
15:53:56 <TrueBrain> # define MSVC_PACKED_BEGIN __pragma pack(push, 1)
15:53:58 <TrueBrain> # define MSVC_PACKED_END __pragma pack(pop)
16:01:47 <glx> well it starts, but as it's a debug build it's slow as hell
16:01:56 <glx> trying a release build now
16:03:07 <glx> release build shows the intro \o/
16:03:42 <TrueBrain> can you confirm for me that latest commit is in fact correct?
16:03:53 <TrueBrain> also, if you can supply me with a MSVC project file for OpenDUNE, that would be great :)
16:08:30 <glx> well we also need a project file generator ;)
16:08:51 <glx> because adding/removing decompiled files by hand is not fun
16:09:30 <TrueBrain> glx: I know a place ..... ;)
16:09:38 <glx> you need to remove them first Xaroth
16:09:47 <glx> else you keep unexistant files
16:09:53 <TrueBrain> for now all .c files in src/ and src/*/* should be in it :p
16:10:13 <TrueBrain> so I suggest we copy/paste that from another cool GPL project :)
16:10:30 <Xaroth> Better a good copy than a bad idea :P
16:10:33 <TrueBrain> oh, and decompiled/* :)
16:10:33 <glx> the other project uses source.list ;)
16:10:47 <TrueBrain> glx: replace source.list with ls decompiled/* src/* src/*/* ;)
16:12:15 <TrueBrain> glx: source.list for now is not maintainable with all those decompiled files coming and going :)
16:12:46 <TrueBrain> loll, I remember generate :) And how much easier it made things for non-MSVC people :)
16:12:54 <TrueBrain> and how darn time it took to get perfect :)
16:13:08 <glx> don't forget the vbs version too :)
16:14:08 <glx> anyway for now project files can be modified by hand by msvc users
16:17:05 <Xaroth> TrueBrain: you forgot a line of asm in Mouse_ExitHandler() :)
16:17:53 <Xaroth> nice changes on the mouse handler btw
16:18:24 <Xaroth> emu_movw(&emu_sp, emu_bp);
16:18:38 <TrueBrain> oh, I didn't convert it at all :) You are absolutely right :)
16:18:51 <TrueBrain> the return is also bullshit of course
16:18:52 <Xaroth> I'm amazed by the simplicity compared to the old code O_O
16:19:05 <TrueBrain> Mouse_CheckButtons() mostly cleaned up nicely :)
16:19:23 <TrueBrain> I rather type a few more commands, than to have something very fast, but unreadable :p
16:19:47 <TrueBrain> oh well, still 500 lines to go :)
16:19:52 <Xaroth> also love the memory map you mage
16:19:58 <TrueBrain> and then there are the subroutines of the mouse-handler ....
16:20:12 <TrueBrain> well, now this pack works on MSVC too, I can even put that in a nice struct :)
17:22:57 <nsz> TrueBrain: igor said that dma access after building destroy can be used to implement shaking (earthquake effect)
17:27:30 <TrueBrain> yeah, it is mass memory movement
17:27:59 <TrueBrain> so I guess that is something to do another day ;)
17:28:59 <DorpsGek> SVN: commit (r37) by truebrain - -Add: MSVC project files (glx)
17:29:11 <TrueBrain> thanks a lot glx :)
17:29:59 <TrueBrain> I did that a while back
17:30:25 <glx> it's declared as void emu_init()
17:30:32 <glx> in both libemu and opendune
17:32:10 <DorpsGek> SVN: commit (r38) by truebrain - -Update: updated include files from libemu
17:33:21 <TrueBrain> I need to write something so I can initialize variables which are clamped around memory
17:33:31 <TrueBrain> like: void *mouse = get_emu_memory8(blabla)
17:33:52 <TrueBrain> ctors are no option I guess
17:33:56 <TrueBrain> not really cross-platform :)
17:34:21 <glx> hmm .h changes don't trigger recompile :)
17:34:57 <TrueBrain> haha, most likely :)
17:35:01 <TrueBrain> they are not that important anyway ;)
17:35:28 <TrueBrain> I forget that in C () doesn't mean (void) like in C++
17:38:51 <TrueBrain> LOL! This is retarted:
17:39:11 <TrueBrain> first function gives warning, second doesn't
17:41:54 <TrueBrain> glx: I fixed a few of them; they are all bogus warnings neverthelss
17:42:09 <TrueBrain> I can't fix them all, not within introducing complex shit which is completely unneeded :)
17:52:00 <glx> hmm debug builds are unusable (I think timer triggers faster than other code is run)
17:58:26 <glx> if I increase _pic_speed everything should be slower I guess
18:02:22 <glx> looking at the call stack it's not surprising
18:03:25 <Xaroth> another loop another stack overflow :P
18:03:44 <glx> maybe related to _pic_speed increase
18:12:24 <TrueBrain> the higher pic_speed, the more stack it needs, yes
18:12:30 <TrueBrain> inifnite loops waiting for the clock to tick
18:22:55 *** ChanServ sets mode: +v Yexo_
18:24:00 *** Yexo is now known as Guest2864
19:08:19 *** proyvind has joined #openDune
19:11:56 *** Xaroth sets mode: +v proyvind
19:13:16 <TrueBrain> bit by bit I understand what the mouse does :p
19:13:31 <TrueBrain> guess what it does! :p
19:13:34 <Xaroth> what -does- the mouse do?!?
19:13:46 <TrueBrain> if ((emu_get_memory16(emu_ds, 0x00, 0x7080) & 0x8000) == 0x8000) {
19:13:47 <TrueBrain> if (emu_cx.x >= emu_get_memory16(emu_ds, 0x00, 0x7082) ||
19:13:49 <TrueBrain> emu_cx.x <= emu_get_memory16(emu_ds, 0x00, 0x7086) ||
19:13:50 <TrueBrain> emu_dx.x >= emu_get_memory16(emu_ds, 0x00, 0x7084) ||
19:13:52 <TrueBrain> emu_dx.x <= emu_get_memory16(emu_ds, 0x00, 0x7088)) {
19:13:53 <TrueBrain> more things like this :p
19:14:06 <TrueBrain> well, I rewrote this already to make a bit sense :) All you know need to know is that cx is the x-pos and dx is the y-pos
19:14:32 <Xaroth> and 82, 84, 86 and 88 are the bounds?
19:14:56 <TrueBrain> and I think that 7080 is a bit to indicate it needs to do this kind of checking
19:15:27 <Xaroth> aka, when something moved?
19:15:43 <TrueBrain> I expect that the next code I find is code related to the changing of the mouse cursor
19:15:55 <TrueBrain> so as long as the mouse is inside a certain region, it doesn't have to do those checks
19:16:32 <TrueBrain> maybe it is even used for highlight of menu entries and stuff
19:17:02 <TrueBrain> but okay, that is how I work .. I make for myself a small list of things I tihnk it can do
19:17:05 <TrueBrain> then I start to validate that :)
19:17:20 <Xaroth> maybe the bounds of the window for placing stuff?
19:17:29 <Xaroth> aka, draw the placement thing only when inside the borders
19:17:46 <TrueBrain> well, when you move around in the play screen, you get another cursor when you are over the radar
19:17:55 <TrueBrain> something efficient has to decide those borders
19:18:07 <TrueBrain> but we will see .. me continues following this rabbit
19:23:05 *** proyvind_ has joined #openDune
19:26:30 <TrueBrain> WHA! I was right :)
19:26:39 <TrueBrain> in the main menu it is used for exactly that: highlight the entries :)
19:27:35 <TrueBrain> but I don't know what 2 functions around it do ..
19:27:44 <TrueBrain> I wouldhave expected that one undraw the cursor and the other would draw it
19:29:58 <TrueBrain> anyone feels like guessing what it does?
19:30:19 <TrueBrain> well, besides the obvious: moving 8 bytes
19:30:33 <Xaroth> that would've been my guess :P
19:31:02 <TrueBrain> another function moves it back, and fills the rest with 0x002800C8
19:31:13 <TrueBrain> euh, even 0x00000028000000C8
19:32:41 <glx> by default it name it vc90.pdb and that's just stupid :)
19:33:41 <TrueBrain> even more weird: those values are only read/written in two functions, but seem never to be really used ....
19:34:03 <Xaroth> one is even, as it should, one is odd
19:34:26 <TrueBrain> Xaroth: it is just a location where it stores data
19:34:39 <TrueBrain> in between is most likely some other information
19:34:59 <TrueBrain> yeah, at 0x30 is a single byte
19:38:00 <TrueBrain> I can't solve everything in one day ;)
19:40:11 <TrueBrain> like 0x7092 is only read, never written ..
19:40:15 <TrueBrain> it is one of the parameters for that function
19:40:25 <TrueBrain> so it is good possible it once was some kind of debug thing :p
19:42:41 <TrueBrain> I guess we need a make depend soon too :p
19:43:52 <Xaroth> any stuff you want me to work on, TrueBrain?
19:44:34 <TrueBrain> what ever you fancy most
19:44:38 <TrueBrain> at this stage it really doesn't matter
19:44:53 <TrueBrain> just try to figure out what functions do
19:45:10 <TrueBrain> 0x01F7 has system stuff, like file opening, and sanity checks
19:45:23 <TrueBrain> 29E8 has mouse handle thingies
19:45:36 <TrueBrain> 22A6 has mouse handle thingies
19:45:42 <TrueBrain> dunno what they overlap
19:46:13 <TrueBrain> everything with a B is an overlay, which means they have very isolated functions
19:46:17 <TrueBrain> mostly relative small ones
19:49:29 <Xaroth> what's emu_pushf different from emu_push ?
19:49:37 <TrueBrain> pushf pushes the flags
19:50:22 <Xaroth> how accurate is the called from list?
19:50:36 <TrueBrain> it shows all mapped stuff
19:50:45 <TrueBrain> so it is not 100%, but it gives a good indication
19:52:02 <Xaroth> oh and yes, I randomly opened a file.. 3EEE sounded like fun :P
19:52:11 <TrueBrain> the cs:ip are the first 2 entries :) The last 2 are length:crc ;)
19:52:35 <TrueBrain> and yes, after 0E82 0E85 is always called
19:52:35 <Xaroth> they vary enough to differentiate anyhow :P
19:52:37 <TrueBrain> (after the intterupt)
19:52:51 <TrueBrain> and given 0E82 is an entry point, this is a very small function
19:53:43 <TrueBrain> calls the video-mode interrupt
19:53:47 <Xaroth> a LOT of those functions are in there
19:53:50 <TrueBrain> no idea why it is done in such a complicated matter
19:54:12 <Xaroth> easy enough to clean up :)
19:54:30 <Xaroth> turning 2 into 1 is always good.
19:54:40 <TrueBrain> it is only a bit tricky where to put them ;)
19:57:13 <Xaroth> turned 14 functions back into 7
19:57:34 <DorpsGek> SVN: commit (r39) by truebrain - -Add: more work on the mouse handler
19:57:42 <TrueBrain> but where did you put them?
19:58:20 <TrueBrain> btw, with the 3EEE:0E82 you now have an entry point in 01F7 where the video is setup
19:58:24 <TrueBrain> the combined functions
19:58:35 <TrueBrain> you can't put it in decompiled/ as that is overwritten the next time I run the tool
19:58:36 <Xaroth> as I haven't figured out what they do yet
19:59:08 <TrueBrain> so you need to crawl deeper to figure out where they come from, and what they do
19:59:11 <Xaroth> /* $Id: cs__3EEE.c 27 2009-09-16 19:22:42Z truebrain $ */
19:59:14 <TrueBrain> and from there on start creating something ;)
20:00:00 <TrueBrain> 300 lines of new code .. pff :p
20:00:23 <TrueBrain> I am trying to stabilize the mouse stuff, as that is the reason of many crashes
20:03:12 <TrueBrain> hmm ... I now have here code that is, when put midly, doubtful code
20:03:39 <TrueBrain> I need a second pair of eyes
20:03:54 <TrueBrain> C0 is part of B5, as you can clearly see
20:04:04 <TrueBrain> yet, in C0 it jumps to 29E8:08B5
20:04:12 <TrueBrain> but in B5 it wants to jump to 29E8:097E
20:04:20 <TrueBrain> the latter is in the middle of a function
20:05:31 <TrueBrain> even more worse that in the byte code the correct numbers are ...
20:05:35 <TrueBrain> what the fuck went wrong :s
20:06:39 <Xaroth> why is there an emu_push 0x00C9 in the call part
20:06:57 <TrueBrain> remember what a function call does?
20:07:05 <TrueBrain> it pushes the current cs and the ip of the nex tinstruction on the stac
20:07:10 <TrueBrain> so on return it continues where it left off
20:07:17 <TrueBrain> C9 in this case is the ip of th enext instruction
20:09:46 <TrueBrain> okay, the bug was in my static analyser
20:10:16 <TrueBrain> very nasty bug, as the resumer would have had a bad day trying to resume
20:10:25 <TrueBrain> nsz: did you use it for the txt set, resuming?
20:11:27 <TrueBrain> oh well .. then there might be faulty jumps here and there :p
20:11:32 <TrueBrain> I fixed the bug in toc
20:11:56 <nsz> hm i think i used saving instead of resuming
20:13:29 <nsz> ok all my renamed crash dumps are 2 days old
20:13:49 <nsz> so i did resume with the older code only
20:14:08 <TrueBrain> hmm .. my first attempt to correct the problem was wrong :p
20:15:58 <TrueBrain> 2598:0000 <- switches the param with a value somewhere in the memory :)
20:16:05 <TrueBrain> will be lovely to trace those ..... LOL :)
20:17:10 <DorpsGek> SVN: commit (r40) by truebrain - -Fix: the decompiler had a terrible bug, causing all instruction pointers for far unresolved jumps/calls to show wrong values
20:17:17 <TrueBrain> k, all sources updated and corrected
20:17:44 <TrueBrain> maybe now resuming no longer crashes :p
20:18:06 <TrueBrain> basicly it jumped to a random place in the memory :p
20:19:05 <TrueBrain> it seems to be true :p
20:19:57 <TrueBrain> [TOC] ERROR: node error: No such opcode (0xF4)
20:20:00 <TrueBrain> then again ... maybe not :p
20:20:10 <TrueBrain> nsz: so please don't use resuming for now :)
20:21:11 <TrueBrain> the annoying part is that I can't get it reproduced with JIT attached :p
20:26:14 <DorpsGek> SVN: commit (r41) by truebrain - -Add: mapped another function (startup)
20:26:22 <TrueBrain> (help with the revision number :p)
20:27:06 <glx> hmm msvc release doesn't refresh "screen"
20:27:21 <TrueBrain> how do you mean exaclty?
20:27:27 <TrueBrain> Westwood logo fades in and out?
20:27:32 <glx> I need to move mouse for that
20:31:05 <TrueBrain> come on glx, I need more details to work with :)
20:31:36 <glx> well the SDL window appears,
20:32:10 <glx> the westwood logo starts (I can see it when I look at the screen from the side)
20:32:44 <glx> but I need to move the mouse over the window to make it appear completely
20:32:56 <TrueBrain> k, so the palette is not corrected
20:33:23 <TrueBrain> Westwood fadein is done by changing the palette
20:33:29 <glx> but with mingw builds there's no problem
20:33:59 <TrueBrain> yes, thread problem again
20:34:58 <TrueBrain> libemu/int10.c, line 605 and 607
20:35:01 <TrueBrain> try disabling thsoe
20:35:27 <glx> as it's the major changes between mingw and msvc
20:36:57 <TrueBrain> in timer_run you can see how it uses those values
20:38:00 <glx> ok it's not pic_get_?sec :)
20:38:22 <glx> I made it use the same code for mingw and it still works
20:38:24 <TrueBrain> so try my suggestion, and else debug how often they are called
20:47:45 <DorpsGek> SVN: commit (r42) by truebrain - -Fix: the decompiler now outputs better information on unresolved calls/jumps
21:00:18 <TrueBrain> every time I run: svn -R revert .
21:00:22 <TrueBrain> it keeps reverting decompiled files
21:00:49 <TrueBrain> hmm ... I think I know ... $Id$ tags :)
21:04:32 <TrueBrain> I think I got the JIT now in such way it boots when it is needed
21:09:16 <TrueBrain> [JIT] Unknown function, starting with JIT.
21:09:17 <TrueBrain> [JIT] Jumped from 24FD:0034 to 24FD:002A; recorded
21:09:19 <TrueBrain> [JIT] Finished function, stopping with JIT.
21:09:24 <TrueBrain> and it immediatly continued with the static version
21:09:28 <TrueBrain> just how I like it :)
21:15:25 <TrueBrain> doesn't always go as it should, as it sometimes returns too much :p
21:16:56 <TrueBrain> I think something is wrong with my mouse handler :p
21:17:33 <TrueBrain> things are ... off :p
21:19:35 <TrueBrain> but okay, I can start a game and play a bit without it puking me out :p
21:26:19 <DorpsGek> SVN: commit (r43) by truebrain - -Fix: mixed up mouse button pressed/released state
21:27:43 <DorpsGek> SVN: commit (r44) by truebrain - -Add: mapped another function (startup)
21:27:51 <TrueBrain> solutions are always simple :)
21:30:15 <Xaroth> i forgot a bugtraq property
21:30:50 <TrueBrain> I loce that my mouse does random things :p
21:30:52 <TrueBrain> I really should fix that :p
21:31:00 <Xaroth> any thought on the format for the bug fix message?
21:31:14 <Xaroth> -Fix <number> <number> <number> ?
21:31:29 <TrueBrain> I love most: -Fix #12
21:31:36 <TrueBrain> -Fix #12, #13 etc is fine by me
21:31:57 <Xaroth> -[Ff]ix #?(\d+)(,? ?#?(\d+))+
21:32:01 <TrueBrain> right button should center the map, not?
21:32:10 <TrueBrain> well, it can also be -Add #12 I guess
21:32:14 <TrueBrain> shit, then my mouse routine is still broken
21:33:21 <Xaroth> I don't care, as long as it matches :P
21:35:41 <DorpsGek> SVN: commit (r45) by xaroth - -Fix: bugtraq:logregex was not set, as such, WebSVN didn't give us the love we wanted...
21:35:58 <TrueBrain> txt/0AEC/f__0AEC_0FEF_0021_7407.txt:From: 0AEC,0FEA,0017,6202
21:36:00 <TrueBrain> txt/34CD/f__34CD_00B6_0005_0000.txt:From: 0AEC,0FEA,0017,6202
21:36:07 <TrueBrain> 1 jump to two places ... never possible
21:36:36 <TrueBrain> in this case possible ... oh nasty ...
21:36:54 <TrueBrain> I wonder why this didn't happen before
21:37:22 <Xaroth> might also work if we add it to / ...
21:37:37 <Xaroth> now it only works if the log for /trunk is viewed..
21:38:04 <Xaroth> or.. i hack the bugtraq thingie
21:39:13 <TrueBrain> okay, the error is a result of the JIT attaching itself ..
21:41:22 <Xaroth> elseif ($path != "/trunk/") {
21:41:22 <Xaroth> self::Bugtraq($rep, $svnrep, "/trunk/");
21:41:38 <Xaroth> <!-- -> / --><!-- 1 -> /trunk/ -->
21:41:46 <Xaroth> can't find it on / , have found it on /trunk/ :)
21:42:02 <Xaroth> the # is not required, btw.
21:42:12 <Xaroth> so -Fix 1,2,3,4: will work as well
21:42:23 <TrueBrain> but I want the #! :P
21:42:38 <TrueBrain> shit shit shit, how am I going to solve this jumping issue .. hmm ..
21:42:40 <Xaroth> it's just not required
21:42:41 <TrueBrain> tricky hard and nasty
21:45:21 <Xaroth> btw TB, i mentioned the teaser on my clan's forum
21:45:32 <Xaroth> most of em are non-programmers, but they all like their retro :)
21:45:58 <TrueBrain> I just got a complain that there was nowhere an easy download link :
21:46:19 <Xaroth> that's because we want people to browse, not to hit and run :)
21:48:05 <Xaroth> oo, done with part one of the audiobooks
21:48:19 <Xaroth> TrueBrain: another day of awesome progress :)
21:48:22 <TrueBrain> manual correcting txt .. not so much fun :(
21:48:54 <Xaroth> also very much pleased with the work glx did today.. seeing I can now work from VC Studio :P
21:49:18 <glx> well you can but it doesn't run very well ;)
21:49:37 <Xaroth> heh, I couldn't even get the damn thing to compile :P
21:50:00 <glx> compiling with msvc is always the easy part
21:50:36 <Xaroth> well libemu had some issues so i couldn't get that to work, and my knowledge of C/C++ is lacking to say the least.. so fixing that was just.. meh
21:50:52 <Xaroth> was easier to boot up ubuntu on vm workstation and work from there :P
21:52:43 <Xaroth> Bot name Last visit Options Mark
21:52:43 <Xaroth> Google [Bot] Thu Sep 17, 2009 11:34 pm
21:53:12 <TrueBrain> okay ... I can't correct the txt files
21:53:12 <Xaroth> google opendune == us on top
21:54:26 <TrueBrain> waste of some good txt files
21:54:49 <Xaroth> they aren't hard to get, just takes time, and time we have :)
21:55:16 <Xaroth> meh, probably not going to work tomorrow
21:55:24 <Xaroth> better not be swine flu
21:56:35 <DorpsGek> SVN: commit (r46) by truebrain - -Fix: the right mouse button gave the wrong return code
21:56:38 <TrueBrain> I rewrote 500 lines of code
21:56:43 <TrueBrain> and I make 3 mistakes in 10 lines of them
21:57:29 <DorpsGek> SVN: commit (r47) by truebrain - -Fix: the decompiler gave wrong ip for tailing unresolved jumps (off by a few bytes)
21:58:56 <TrueBrain> how ever often I play, I keep getting new functions :)
22:06:35 <TrueBrain> lol, sometimes I geet Chinese in the top bar
22:09:49 <TrueBrain> ERROR: calling function 29A3:00B9 from 29E8:0C6A, but is marked as not callable.
22:15:46 <TrueBrain> whoho, build a Windtrap without a new function! :)
22:17:44 <TrueBrain> okay, tons of new functions again :p
22:18:10 <glx> I still don't get why "animation" fails with msvc
22:18:20 <TrueBrain> you checked those points I told you about?
22:18:33 <TrueBrain> is the SDL_UpdatePalette thingy called often enough?
22:18:46 <TrueBrain> as in theory one thread sets the value, and the other reads it, so I can see problems existing there :p
22:19:29 <glx> well I tried commenting the suspend/resume calls -> no changes for mingw and msvc
22:21:02 <TrueBrain> k, one last run, then I am really going to bed :)
22:21:38 <TrueBrain> glx: well, if I understand you correctly, the problem is that the palette is not updated, or the screen not updated ...
22:21:51 <TrueBrain> easy to find out which: if you don't move your mouse, does the westwood logo disapear later on?
22:21:57 <TrueBrain> and does the virgin logo appear?
22:22:30 <glx> if I don't move the mouse, the westwood logo doesn't finish appearing
22:22:50 <TrueBrain> oh .. so .. the timer doesn't tick :'(
22:23:47 <glx> then I move mouse, and westwood logo is fully visible
22:24:05 <TrueBrain> then things continue normal?
22:24:21 <glx> then I move the mouse and it disappear and "and" starts to appear
22:24:33 <TrueBrain> so as long as you move your mouse, it works :p
22:24:42 <TrueBrain> so clearly someone is holding back the timer thread
22:25:08 <glx> but timer is exactly the same for mingw
22:25:19 <TrueBrain> put a printf in _pic_run and see if that is really true
22:25:29 <TrueBrain> as the logo and stuff appears on ticks of the timer
22:25:36 <TrueBrain> timer_run needs to call some magic function for it to work
22:25:42 <TrueBrain> clearly moving your mouse makes that happen :p
22:25:56 <TrueBrain> so either SDL 'hangs' in PollEvent or something
22:26:01 <TrueBrain> or the timer is not running at all :p
22:29:50 <TrueBrain> the mouse still acts very funny
22:29:59 <glx> ok timer seems to work (printf added at begining of _pic_run)
22:30:00 <TrueBrain> something to really fix soon, as it is annoying .. random things being built and stuff
22:30:14 <TrueBrain> that is just odd ..
22:30:30 <DorpsGek> SVN: commit (r48) by truebrain - -Add: mapped another 15 functions (general gameplay)
22:30:33 <glx> now need to check with pic_running
22:30:52 <TrueBrain> 10550 functions .. not bad :)
22:31:02 <TrueBrain> glx: thank you very much for at least trying btw :)
22:31:06 <TrueBrain> now I am going to my bed :)
continue to next day ⏵