IRC logs for #opendune on OFTC at 2011-06-01
            
00:03:11 *** Xaroth has joined #openDune
00:03:11 *** ChanServ sets mode: +o Xaroth
02:15:54 *** glx has quit IRC
09:58:05 *** fjb is now known as Guest3030
09:58:06 *** fjb has joined #openDune
10:05:30 *** Guest3030 has quit IRC
12:11:13 *** glx has joined #openDune
12:11:13 *** ChanServ sets mode: +o glx
12:11:34 <glx> hello
13:10:12 <DorpsGek> SVN: glx (r1716) -Add: C-ified MPU_Uninit() and MPU_ClearData()
13:45:28 <DorpsGek> SVN: glx (r1717) -Add: C-ified MPU_GetInfo()
13:50:53 <Xaroth|Work> :o
14:07:36 <DorpsGek> SVN: truebrain (r1718) -Add: first start with removing variables and converting away from csip
14:24:35 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch <- glx: what do you think?
14:24:42 <TrueBrain> still hackish, but ...
14:32:55 <TrueBrain> new patch, with g_ prefix
14:34:25 <DorpsGek> SVN: truebrain (r1719) -Add: move our more csip global variables
14:38:37 <DorpsGek> SVN: truebrain (r1720) -Add: named Unit->variable_6E, and cascade naming because of that
14:40:19 <TrueBrain> right, enough fun stuff ... lets bite in 01F7 again
14:42:40 <DorpsGek> SVN: truebrain (r1721) -Fix: don't use emu_ when you can make a direct pointer reference
14:52:49 <DorpsGek> SVN: truebrain (r1722) -Add: refactor some code, which mostly involved removing unused chunks
14:53:16 <TrueBrain> I really should enable voices somehow
14:54:14 <TrueBrain> useXMS = 1 and voiceDrv = 1
14:54:16 <TrueBrain> weird
14:54:48 <TrueBrain> musicDrv = 7
14:55:23 <TrueBrain> so how come I didn't have the voice problems, and I still see subtitles?
14:58:59 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch <- glx: can you please test if with this patch, voices still work?
14:59:05 <TrueBrain> I see no reason why not, but meh
15:19:03 <glx> with voices there's no subtitles in intro
15:19:25 <TrueBrain> I know; I have subtitles, but voices are on, as far as I know
15:19:27 <TrueBrain> dunno why it fails
15:19:28 <TrueBrain> meh
15:19:49 <TrueBrain> been following the entry code; most noticable it reallocs dune2.exe, so the memory manager knows
15:19:53 <glx> for me it usually fails because it takes too long to init
15:20:12 <glx> as in detection fails
15:20:44 <TrueBrain> but okay; please test the temp.patch :D
15:22:10 <glx> emu_ax = 1; at driver.c:629 if you want to be sure to have voices :)
15:22:28 <glx> voices are ok
15:23:14 <DorpsGek> SVN: truebrain (r1723) -Fix: don't do silly alloc/free; it will work fine
15:23:40 <glx> it just checked if XMS was really available
15:23:57 <TrueBrain> yup; silly :D
15:24:35 <glx> hmm I could just remove test port calls in drivers_init
15:25:06 <TrueBrain> yup, now voices work :D
15:25:14 <TrueBrain> (with your hack :p)
15:29:22 <TrueBrain> following the white rabbit over and over :D
15:29:49 <TrueBrain> ah! 0x40 flag in Malloc means: uppermemory allowed
15:29:50 <TrueBrain> lol
15:31:38 <glx> I know that for a long time :)
15:34:14 <TrueBrain> :D
15:34:23 <TrueBrain> it indeed explains the malloc/free of 1723 :p
15:36:01 <DorpsGek> SVN: glx (r1724) -Fix: removed driver port test
15:38:46 <TrueBrain> so it is now always on, even if the driver replies slow?
15:39:49 <TrueBrain> nice :D
15:43:47 <glx> DSP was slow to reply because it's interrupt based
15:44:46 *** Alberth has joined #openDune
15:44:58 <TrueBrain> lol, negative sizes indicate that you want to memset it :D
15:45:02 <TrueBrain> howdie Alberth
15:45:42 <TrueBrain> ah, no, misread; nevermind
15:45:50 <Alberth> moin TrueBrain, glx
15:49:57 <TrueBrain> okay, the code indicates mallocs never failed
15:50:07 <TrueBrain> all over the code are special cases that when malloc fails, it does something alternative
15:50:12 <TrueBrain> but it seems we nver have to worry about that
15:50:16 <TrueBrain> so ... /me starts throwing out stuff :D
15:52:02 <Alberth> you make a findable note somewhere that malloc is not expected to fail?
15:52:29 <TrueBrain> isn't that a general assumption? :D
15:52:38 <TrueBrain> and if a game works in 1MB RAM, I guess it works on any modern ;)
15:52:44 <TrueBrain> but I see your point :D
15:52:54 <TrueBrain> anyway, their way of protecting is, is running GetFreeMemory every time
15:53:02 <TrueBrain> that is kinda not-done on modern machines :)
15:53:45 <Alberth> all those precious micro seconds :p
15:54:04 <TrueBrain> I want to remove 01F7 :S
15:54:06 <TrueBrain> :D
15:54:19 <Alberth> a noble goal :)
15:55:22 <DorpsGek> SVN: glx (r1725) -Fix: remove useless driver function calls (and associated MPU functions)
15:59:57 <TrueBrain> instead if push/pop ds, 01F7 stores it in a var ... lol
16:00:38 <TrueBrain> free(NULL) works btw
16:00:47 <TrueBrain> why was there a wrapper to avoid that ...
16:00:54 <TrueBrain> maybe HMS doesn't like it
16:02:17 <Alberth> not all programmer trust C compiler implementations ;)
16:02:23 <Alberth> *programmers
16:03:07 <TrueBrain> okay, so a lot of shit in entry has to do with memory and memory scaling ... bah
16:04:32 <glx> freeifnotnull was in XMS IIRC
16:04:37 <DorpsGek> SVN: truebrain (r1726) -Add: named 2 functions
16:04:52 <TrueBrain> right ... this will be tricky :D
16:05:00 <TrueBrain> either we need to replace all mallocs, or convert the code ... :p
16:09:09 <Alberth> wow, 2ae1 is really 'in how many variations can you write a copy loop' :)
16:11:13 * glx is removing code in driver.c :)
16:14:13 <TrueBrain> Alberth: 4 bytes, 2 byes and 1 byte? :)
16:16:04 <Alberth> no, plain '*dest++=*src++', or '*dest++=val', or 'skip' so far :)
16:16:56 <TrueBrain> I think it is equal to Format40
16:16:58 <TrueBrain> but I am not sure
16:17:03 <TrueBrain> encoder/format40.c ;)
16:17:07 <TrueBrain> might want to cross-reference :)
16:17:13 <TrueBrain> (and remove any potential errors I made :D)
16:17:34 <Alberth> oh, I thought that reference was for my benefit :D
16:17:43 <TrueBrain> hell no :D
16:22:45 <TrueBrain> owh, a new one guys:
16:22:48 <TrueBrain> emu_dl = emu_al;
16:22:50 <TrueBrain> emu_al = emu_dl;
16:22:52 <TrueBrain> :D:D:D
16:22:57 <glx> hehe
16:28:20 <glx> 19kb diff of almost removal, it still works :)
16:28:26 <TrueBrain> LOL!
16:28:28 <TrueBrain> :D
16:51:10 <DorpsGek> SVN: glx (r1727) -Fix: removed useless driver code
17:09:47 <DorpsGek> SVN: truebrain (r1728) -Fix: how did thisone slip in ...
17:10:14 <glx> lol
17:11:02 <DorpsGek> SVN: truebrain (r1729) -Fix: &1 != %1 but %2 ..
17:16:39 <DorpsGek> SVN: truebrain (r1730) -Add: C-ified Tools_Malloc() and removed a bunch of unneeded stuff
17:16:47 <TrueBrain> now I know what the flags do :)
17:34:55 <TrueBrain> hmm .. segfault ... that is bad :D
17:36:22 <TrueBrain> voiceSet is 65534
17:36:30 <TrueBrain> src/sound.c:286
17:37:57 <TrueBrain> seems weird there is no check for that
17:38:32 <TrueBrain> glx: src/sound.c, around line 260, the '?' case does not free the 3E54?
17:38:35 <TrueBrain> seems weird
17:38:52 <glx> not my code IIRC
17:38:53 <TrueBrain> ah, envermind, it is also never alloced
17:39:45 <TrueBrain> not mine for sure :D
17:39:59 <TrueBrain> haven't touched any sound as far as I know :D
17:40:08 <glx> one of first Alberth patch I think
17:40:48 <DorpsGek> SVN: truebrain (r1731) -Add: C-ified Tools_Free()
17:40:49 <TrueBrain> it is not my patch, so that is easy ..
17:40:51 <TrueBrain> now lets find it
17:43:03 <TrueBrain> 1725 also crashes
17:44:17 <TrueBrain> 1700 works
17:44:20 <TrueBrain> that at least limits it :D
17:46:27 <TrueBrain> 1710 works
17:46:55 <Alberth> sprintf((char *)g_global->variable_9939, str, i); looks like it needs str + 1, line 330 in sound.c
17:47:13 <Alberth> especially since *str == '%' :)
17:47:42 <TrueBrain> 1720 works
17:48:51 <TrueBrain> 1723 works
17:48:53 <TrueBrain> 1 left ..
17:49:14 <TrueBrain> either 1724 or 1725 makes it go crashy
17:49:25 <glx> no crashes here
17:49:34 <glx> using 1727
17:49:35 <TrueBrain> it happens when I finish the game
17:50:07 <TrueBrain> 1724
17:51:39 <TrueBrain> so something there does have an effect here ...
17:53:13 <TrueBrain> it has to be noted here that ALSA doesn't work here, so the MIDI is refused; shouldn't matter I guess, dunno ...
17:54:56 <glx> hmm maybe check MPU_Reset return in r1723
17:56:34 <TrueBrain> did you try the finish-game end-scene?
17:56:39 <glx> yes
17:56:40 <TrueBrain> it crashes as soon as it wants to show the intro
17:56:44 <TrueBrain> or outro
17:56:51 <glx> outro works here
17:56:59 <TrueBrain> as intro runs fine
17:57:38 <glx> I checked atreids end only
17:57:45 <glx> but I can test the others too
17:58:19 <TrueBrain> 2 out of 3 crashes
17:58:20 <TrueBrain> testing 3rd
17:58:48 <glx> ordos crashed
17:59:43 <glx> default: i = g_houseInfo[voiceSet].prefixChar;
17:59:46 <TrueBrain> all 3 crash
17:59:48 <TrueBrain> yup
17:59:49 <TrueBrain> voiceSet is -2
17:59:50 <glx> voiceSet is FFFE
18:00:07 <glx> but didn't crash in r1727
18:00:36 <TrueBrain> 1724 did for me
18:00:38 <TrueBrain> might be timing?
18:00:58 <TrueBrain> testing 1727 to be sure
18:01:22 <glx> atreides works
18:01:50 <TrueBrain> none of the 3 work here
18:01:53 <TrueBrain> so I would guess timing issue
18:01:58 <TrueBrain> for the same reason as init fails sometimes
18:02:07 <TrueBrain> 1727 crashes too here
18:04:36 <glx> now 3 work
18:05:16 <TrueBrain> timing, I tell you
18:05:28 <TrueBrain> guess the testing thingy avoided the timing issue
18:06:42 <glx> but with voiceset -2 it should never be in that part of the code
18:06:46 <TrueBrain> and to come back what Alberth said: I have no clue ... I haven't did anythong on sound, so I dunno :D
18:09:09 <glx> I think there's a missing check
18:09:32 <glx> g_global->currentVoiceSet == voiceSet || voiceSet == 0xFFFF) break;
18:09:32 <glx> should check for 0xFFFE too
18:09:50 <TrueBrain> but hwo can it only sometimes give a problem?
18:10:16 <glx> if (g_global->currentVoiceSet == voiceSet) return;
18:10:16 <glx>
18:10:16 <glx> if (g_global->variable_6D8F == 0x0) {
18:10:16 <glx> g_global->currentVoiceSet = voiceSet;
18:10:16 <glx> return;
18:10:18 <glx> }
18:10:37 <glx> side effects for g_global->currentVoiceSet ?
18:10:58 <glx> or g_global->variable_6D8F
20:34:44 <Alberth> good night
20:35:30 *** Alberth has left #openDune