[00:00] finally, im helpful! [00:04] snover, you're always helpful :) [00:06] that unary negation on the LHS of the comparison is also tickling my OCD [00:07] !=0 would be better? :) [00:09] i would think so [00:10] Once I have everything working I'm rewriting it anyway [00:10] A lot of this is still somewhat structured like the assembly [00:11] ! and * have the same precendence, so depending on the compiler that line might effectively cast cur_unk to a short then to a bool, then negate that and then multiply that by 2 [00:11] and then compare to 0, so in effect just check if cur_unk is zero or not [00:11] oh, fun [00:12] I'm mostly in the 'getting it to go' phase, a lot of this code is beyond terrible [00:12] but I hadn't really though about that [00:12] I try to be always explicit with parentheses [00:13] thanks [00:13] clang warns the heck out of that line as it is written [00:13] heh, I can imagine :) [00:13] sorry, I'm not trying to make fun of you, you're doing all the hard work here [00:15] I didn't take it as making fun [00:15] Thanks :) [00:15] still need to implement the second decoding step [00:16] it's about as baroque as this [00:16] snover, but I *was* right that the problem wasn't in the parsing of the second bitstream! :D [00:16] it was something much dumber [00:18] :) [00:20] and then write this in a way that doesn't rely on 2 complements behavior I think [00:20] this is all jucky [00:31] SylvainTV (~SylvainTV@LFbn-1-8392-241.w81-254.abo.wanadoo.fr) left irc: Read error: Connection reset by peer [01:45] DominusExult (~dominus@unaffiliated/dominus) joined #scummvm. [01:45] DJW|Badger (~djwillis@cpc2-trow6-2-0-cust204.aztw.cable.virginm.net) joined #scummvm. [01:49] DJW|Home (~djwillis@cpc2-trow6-2-0-cust204.aztw.cable.virginm.net) left irc: Ping timeout: 240 seconds [01:49] Dominus (~dominus@unaffiliated/dominus) left irc: Ping timeout: 260 seconds [01:49] Nick change: DominusExult -> Dominus [01:54] Joefish_ (~ident@p200300764F6024001A5E0FFFFE1124CA.dip0.t-ipconnect.de) joined #scummvm. [01:54] #scummvm: mode change '+v Joefish_' by ChanServ!ChanServ@services. [01:55] Joefish (~ident@p200300764F0260001A5E0FFFFE1124CA.dip0.t-ipconnect.de) left irc: Ping timeout: 255 seconds [02:01] DJWillis (~djwillis@cpc2-trow6-2-0-cust204.aztw.cable.virginm.net) joined #scummvm. [02:01] #scummvm: mode change '+o DJWillis' by ChanServ!ChanServ@services. [02:02] DJW|Home (~djwillis@cpc2-trow6-2-0-cust204.aztw.cable.virginm.net) joined #scummvm. [02:02] #scummvm: mode change '+o DJW|Home' by ChanServ!ChanServ@services. [02:04] DJW|Badger (~djwillis@cpc2-trow6-2-0-cust204.aztw.cable.virginm.net) left irc: Ping timeout: 240 seconds [02:05] GitHub128 (~GitHub128@192.30.252.34) joined #scummvm. [02:05] [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vH2XK [02:05] scummvm/master 44fce15 Paul Gilbert: TITANIC: Fix some vector calculations in marker lock-on code [02:05] GitHub128 (GitHub128@192.30.252.34) left #scummvm. [02:06] DJWillis (~djwillis@cpc2-trow6-2-0-cust204.aztw.cable.virginm.net) left irc: Ping timeout: 240 seconds [02:36] GitHub78 (~GitHub78@192.30.252.42) joined #scummvm. [02:36] [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vH21E [02:36] scummvm/master f6dc363 Paul Gilbert: TITANIC: Locking onto first marker is now working [02:36] GitHub78 (GitHub78@192.30.252.42) left #scummvm. [02:52] dreammaster (~dreammast@c-73-149-116-247.hsd1.ma.comcast.net) left irc: [02:54] snover (~snover@unaffiliated/snover) left irc: Ping timeout: 268 seconds [02:59] snover (~snover@unaffiliated/snover) joined #scummvm. [02:59] #scummvm: mode change '+o snover' by ChanServ!ChanServ@services. [03:05] Joefish_ (~ident@p200300764F6024001A5E0FFFFE1124CA.dip0.t-ipconnect.de) left irc: Ping timeout: 255 seconds [03:06] Joefish (~ident@p5DDE4306.dip0.t-ipconnect.de) joined #scummvm. [03:06] #scummvm: mode change '+v Joefish' by ChanServ!ChanServ@services. [03:53] hum. ramas init routine sends the weirdo phant1 video buffer size (630x450) to use as the text renderer resolution. i dont quite know yet how this is not destroying rendering in the original interpreter, since it doesnt seem that any of the font code changed except for what looks like just some different compiler optimisations& [05:09] Lightkey (~Darklock@p200300764C7B172522CF30FFFE083718.dip0.t-ipconnect.de) left irc: Ping timeout: 260 seconds [05:12] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) joined #scummvm. [05:18] Begas_VBox (~Begasus@d54C3C8C2.access.telenet.be) joined #scummvm. [05:22] Lightkey (~Darklock@p200300764C7B175022CF30FFFE083718.dip0.t-ipconnect.de) joined #scummvm. [06:44] Mia (~Mia@85.110.59.161) joined #scummvm. [06:44] Mia (~Mia@85.110.59.161) left irc: Changing host [06:44] Mia (~Mia@unaffiliated/mia) joined #scummvm. [07:17] Henke37 (~Henrik@81-227-16-59-no133.bredband.skanova.com) joined #scummvm. [07:32] ced117 (~ced117@opensuse/member/ced117) left irc: Ping timeout: 255 seconds [07:34] ced117 (~ced117@opensuse/member/ced117) joined #scummvm. [07:48] #scummvm: mode change '+o Strangerke' by ChanServ!ChanServ@services. [07:48] hi guys [07:49] hey Strangerke [07:51] :) [07:59] LittleToonCat (~littlecat@47.54.148.237) left irc: Remote host closed the connection [08:00] Begas_VBox (~Begasus@d54C3C8C2.access.telenet.be) left irc: Quit: Vision[0.9.8]: i've been blurred! [08:10] m_kiewitz (~m_kiewitz@scummvm/undead/m-kiewitz) joined #scummvm. [08:10] #scummvm: mode change '+o m_kiewitz' by ChanServ!ChanServ@services. [08:12] ced117 (~ced117@opensuse/member/ced117) left irc: Ping timeout: 255 seconds [08:19] ced117 (~ced117@opensuse/member/ced117) joined #scummvm. [08:24] his Strangerke [08:26] TMM, hi. that mysterious video format reversing is MVE? [08:29] yeah [08:30] https://tmm.cx/nextcloud/s/2jQznYpngmpaUr1 <-- this is how far I am now with the other stream format [08:30] but isn't it already documented on multimedia wiki? [08:30] only 1/3rd of the possible video formats are documented [08:30] oh, i see [08:30] this game happily uses the other 2/3rds [08:37] Begas_VBox (~Begasus@d54c3c8c2.access.telenet.be) joined #scummvm. [08:56] ajax16384 (~User@109.60.130.33) joined #scummvm. [08:56] #scummvm: mode change '+o ajax16384' by ChanServ!ChanServ@services. [09:06] ST (~ScottT@203-227-181-180.cpe.skymesh.net.au) joined #scummvm. [09:06] #scummvm: mode change '+o ST' by ChanServ!ChanServ@services. [09:08] WooShell (~Markus@ipbcc06af5.dynamic.kabel-deutschland.de) joined #scummvm. [09:15] good meowning =^.^= [09:30] hi WooShell [09:34] https://tmm.cx/nextcloud/s/3paK3kyTqaUNC4g <-- for the people following along, this is a 'normal' 0x06 video playing on my non-interplay player :) [10:03] Mia (~Mia@unaffiliated/mia) left irc: Ping timeout: 240 seconds [10:09] frankyboy_ (~franky@ppp109-252-73-54.pppoe.spdop.ru) joined #scummvm. [10:16] frankyboy_ (~franky@ppp109-252-73-54.pppoe.spdop.ru) left irc: Read error: Connection reset by peer [10:17] frankyboy_ (~franky@ppp109-252-73-54.pppoe.spdop.ru) joined #scummvm. [10:28] |Cable| (~cable@33.138.117.91.dynamic.reverse-mundo-r.com) left irc: Ping timeout: 240 seconds [10:41] |Cable| (~cable@33.138.117.91.dynamic.reverse-mundo-r.com) joined #scummvm. [10:55] Begas_VBox (~Begasus@d54c3c8c2.access.telenet.be) left irc: Quit: Vision[0.9.8]: i've been blurred! [11:06] Begas_VBox (~Begasus@d54C3C8C2.access.telenet.be) joined #scummvm. [11:32] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) left irc: Ping timeout: 255 seconds [11:44] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) joined #scummvm. [11:56] waltervn (~waltervn@541B2DBA.cm-5-4a.dynamic.ziggo.nl) joined #scummvm. [11:56] #scummvm: mode change '+o waltervn' by ChanServ!ChanServ@services. [12:19] SylvainTV (~SylvainTV@LFbn-1-8392-241.w81-254.abo.wanadoo.fr) joined #scummvm. [12:19] #scummvm: mode change '+o SylvainTV' by ChanServ!ChanServ@services. [13:12] bleh, I really don't see another way of doing this loop short of making a table [13:13] it's not just the number of iterations that matter, but also how long the value stays negative [13:13] the *actual* value doesn't matter though [13:13] I *could* just generate an in-memory table and just use the value in the stream as an index into the table [13:14] it'd only be 65kb of data [13:14] but I'd need some wraparound logic [13:14] which is also not the end of the world [13:38] OK, In people's estimation here, what is worse. a while(1) loop with a break right at the end and 1 continue to start over, or a single goto and a label [13:38] I feel the goto actually is way more readable, but people hate goto :P [13:39] well, scummvm already has ~900 gotos [13:47] I guess an example is in order : http://paste.debian.net/966019/ [13:47] _sev, snover, wjp, Strangerke ^^ do any of you have strong opinions (or suggestions for refactoring) of the above code? [13:48] <_sev> TMM: well, it does not conform to our coding formatting :D [13:49] _sev, that's for another day :P [13:49] <_sev> TMM: and not using our data types :D [13:49] besides cosmetics? :P [13:49] <_sev> other than that it look OK. Or am I missing something? [13:49] <_sev> you mean the go to? [13:50] those are two options for the same algorithm [13:50] I'm kind of hating the goto-less version [13:50] <_sev> TMM: then use the go to [13:51] one other option would be to decrement the loop counter and 'continue' [13:51] but that's even more awful [13:55] _sev, I don't suppose you see a cleverer way of doing the same thing as this code does? [14:01] I suppose I could just shift left instead of multiplying and checking the top bit and masking the top bit and comparing to zero [14:02] instead of pretending like these are numbers [14:05] TMM: isn't this just a while (cur_unk >= 0) ? [14:05] with a break in the printf case [14:07] uh, while (cur_unk < 0) [14:09] i.e., while (cur_unk < 0) { if ((short)(cur_unk * 2)) { printf("%i: break\n", x); break; } cur_unk = *(++unk_p); } [14:10] if you don't need the printf, you can also fold that into the main while condition [14:14] in which case it becomes just while (cur_unk == 0x8000) cur_unk = *(++unk_p); ? [14:22] wjp, I'm afraid not, that printf() is relevant that's when it decides whether or not to copy a block of pixels or not [14:22] so then the first one [14:22] wjp, http://paste.debian.net/966118/ <-- this is what the whole thing looks like in context [14:24] I guess that multiplication could be done with a static value check though [14:24] while (wut < 0) { if (wut != 0x8000) { doMemcpy; break; } wut = *(++unk_map_l); } [14:24] ? [14:25] well, two actually because there are two values for which wut * 2 == 0 [14:25] but one of them won't be hit inside that if [14:25] oh, right [14:25] because ! 0 < 0 :) [14:25] (the 2*wut is probably shorter asm of course) [14:28] hum, I need to think about this a bit harder, your solution doesn't work [14:28] but I don't quite see why not [14:28] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) left irc: Ping timeout: 255 seconds [14:28] need to cast wut to unsigned of course [14:29] oh, or check against -0x8000, yes [14:30] yeah, that looks a bit less stupid [14:30] thanks wjp [14:31] wjp, http://paste.debian.net/966121/ [14:32] I may need to rename 'wut' [14:40] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) joined #scummvm. [14:59] Harekiet (~harekiet@kittens.harekiet.com) left irc: Remote host closed the connection [15:04] Deledrius (~Deledrius@68.118.139.214) left irc: Quit: App.Exit [15:07] Deledrius (~Deledrius@68.118.139.214) joined #scummvm. [15:08] girafe (~girafe@LFbn-1-11729-221.w2-7.abo.wanadoo.fr) joined #scummvm. [15:10] girafe (~girafe@LFbn-1-11729-221.w2-7.abo.wanadoo.fr) left irc: Read error: Connection reset by peer [15:12] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) left irc: Ping timeout: 240 seconds [15:14] Harekiet (~harekiet@kittens.harekiet.com) joined #scummvm. [15:24] Begasus (~begasus@ptr-4p6jpink5rtw7ctbagr.18120a2.ip6.access.telenet.be) joined #scummvm. [15:30] Harekiet (~harekiet@kittens.harekiet.com) left irc: Remote host closed the connection [15:41] dreammaster (~dreammast@c-73-149-116-247.hsd1.ma.comcast.net) joined #scummvm. [15:41] #scummvm: mode change '+o dreammaster' by ChanServ!ChanServ@services. [15:42] GitHub83 (~GitHub83@192.30.252.41) joined #scummvm. [15:42] [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaUK [15:42] scummvm/master b60f0ee Paul Gilbert: TITANIC: Rewrite of rotation code when 1 marker is fixed [15:42] GitHub83 (GitHub83@192.30.252.41) left #scummvm. [15:42] ny00123 (~ny00123@46-116-13-123.bb.netvision.net.il) joined #scummvm. [15:54] wut [15:57] Littleboy (~littleboy@c-73-4-50-241.hsd1.ma.comcast.net) joined #scummvm. [15:57] #scummvm: mode change '+o Littleboy' by ChanServ!ChanServ@services. [16:00] LittleToonCat (~littlecat@47.54.148.237) joined #scummvm. [16:08] for german speakers here: http://www.spiegel.de/netzwelt/games/leisure-suit-larry-wird-30-als-die-pixel-schluepfrig-wurden-a-1150413.html [16:15] TMM: re bit shift v multiplication - just the other day I stumbled upon a discussion when to use which and the point was made that you use whichever fits the actual *meaning* of the problem, i.e., if it's an integer you want to halve you divide and don't bitshift (and any decent compiler will optimize it away anyway) [16:15] I guess that was on stackexchange but I'm not sure [16:15] Harekiet (~harekiet@kittens.harekiet.com) joined #scummvm. [16:15] Harekiet2 (~harekiet@kittens.harekiet.com) joined #scummvm. [16:16] TMM: ah, https://stackoverflow.com/questions/235072/ [16:17] and the 2nd reply (linking to an article by raymond chen) is what I was thinking of up there [16:23] dreammaster (~dreammast@c-73-149-116-247.hsd1.ma.comcast.net) left irc: [16:29] Harekiet (~harekiet@kittens.harekiet.com) left irc: Remote host closed the connection [16:29] Harekiet2 (~harekiet@kittens.harekiet.com) left irc: Remote host closed the connection [16:29] Harekiet (~harekiet@kittens.harekiet.com) joined #scummvm. [16:46] almost got this other format working too now, but it seems one of my draws is off by 1 blockwidth [16:50] Mia (~Mia@85.110.59.161) joined #scummvm. [16:50] Mia (~Mia@85.110.59.161) left irc: Changing host [16:50] Mia (~Mia@unaffiliated/mia) joined #scummvm. [16:50] https://tmm.cx/nextcloud/s/vpKUOHsBwEvvOml <-- sooo close [16:53] t0by (~t0by@unaffiliated/t0by) joined #scummvm. [16:53] #scummvm: mode change '+o t0by' by ChanServ!ChanServ@services. [16:56] TMM: 👍 [16:56] Good evening [16:56] getting there! [16:58] I'm sure you all missed me terribly, to the point of physical pain. Fortunately I'm back, your torment is over. [16:58] t0by: huge relief [16:58] Glad that you are back, t0by :D It's the blog for this week: https://wordpress.com/read/blogs/128802372/posts/461, _sev [16:59] Hi Simei [16:59] Uh, it redirects me to a login page... [16:59] Oops, let me see [16:59] ...but I guess it's the one on https://yinsimei.wordpress.com/2017/06/04/gsoc-week-2/ [16:59] and YAY, are those characters? [17:00] Simei: great work! [17:00] Yes, that's it :D, the segmentation fault is fixed and I'm moving to texts now [17:00] Action: t0by does happy dance [17:00] Haha [17:02] I asked for a lot of help here. Thanks everyone! :) [17:03] ah, I think I found where I zigged where I should have zagged [17:03] snover: any new insights on the audio resource locking you mentioned a few days ago? (I'm back now, albeit lacking quite a bit of sleep, so not entirely 100%) [17:05] wjp: i thought i was getting closer to insight the other day, but at the moment all i can think of is how hacky this change is that they made [17:06] wjp, so, my 'goto version' was subtly wrong, so your optimization was also subtly wrong. My fault [17:06] wjp, http://paste.debian.net/966327/ <--- this is the correct code [17:06] TMM: fixable, I hope? [17:07] wjp, yeah, it should also skip an iteration of the outer loop if cur_unk >= 0 [17:07] the version I wrote didn't do that [17:08] is this coming from asm? [17:08] im having a hard time even putting into words what this code is doing. if an audio sample is returned by the resource manager when it is allocated to memory, the memory attributes are stored on the samples audio channel. then later on if someone calls kLock and there is a matching resource already loaded, that changes the lock flag on the previously recorded attributes [17:08] phew. that was a pretty incoherent explanation. [17:09] wjp, this is me going back to the first version I transcribed from asm and comparing output. The 'observable' output of the actual calls was the same in both cases but the loop counter was different [17:12] well, the video playing is still broken in a very similar way, so I guess that wasn't the whole problem at least [17:13] when the game asks for a sample to be played, if the sample is returned with a MemID (so its loaded into memory), the memory attributes of that MemID are stored in a field of the samples audio channel object (so that the original lock state is known), and then the MemID is locked [17:15] wjp, nope, I was actually right the first time it seems :-/ [17:16] when kLock is called for an audio resource, a separate call to some audio subroutine occurs, which looks for the given resource ID in the list of active audio channels. if it finds a match, it updates the channel objects memory attributes lock flag to match, and returns true [17:17] ok now I have no idea what's wrong... back to the disassembly I guess [17:18] back in kLock, if this call returns false (because the sample isnt in memory), then the resource is loaded into memory and locked [17:19] Harekiet (~harekiet@kittens.harekiet.com) left irc: Remote host closed the connection [17:21] later when it is time to discard one of the audio channels, the list of active channels is searched for any other channels using the same MemID, and if there are no others and the stored attributes of the channel being discarded does not have the lock flag, then the MemID has its lock flag removed [17:25] so, effectively, the list of audio channels operates as a pseudo-counter of locks of in-memory audio data [17:26] if im reading all this correctly, that is& [17:30] oh, and then in the new code for saving locks, there is yet another call to the audio system to get the lock flag out of that channel memory attributes field, since the MemID itself wont have the correct lock flag attribute if audio playback is the only thing holding a lock on it [17:30] and, kUnload isnt allowed to do nothing any more, since it has the potential to be the only way that an audio sample actually ends up being removed [17:37] wjp, ok, I'm pretty sure I've found the behavioral problem now :) Now to figure out how to fix it [17:40] Stormkeeper (~kvirc@2.26.112.88) left irc: Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/ [17:50] snover: can't we check if any more Gabriel Knight 2 situations happen [17:50] and if there aren't that many (or none at all), we simply patch the code away? [17:51] only a few games are affected, correct? [17:53] snover: do you know which parts of what you describe have an impact on scripts? [17:53] Harekiet (~harekiet@kittens.harekiet.com) joined #scummvm. [17:53] m_kiewitz: well, part of my anxiety right now is that it does not seem that kLock is working like SSCI in *anything*, going back to at least SCI1.1 and probably all the way to SCI0, but I dont know if the current ScummVM behaviour successfully prevents random deallocation of in-use resources due to script bugs, or if it accidentally introduces resource leaks because in SSCI it was just a flag, not a counter [17:54] I don't think there is any known bug for sci16 at all [17:55] related to this matter [17:55] have you checked a SCI1.1 interpreter? [17:55] the difference in behaviour here should really be a feature rather than a bug [17:56] although I have to say I don't know much about kLock [17:57] probably from FreeSCI, I guess [17:57] you probably would not notice resource leaks from locks unless you were looking for it [17:57] yes [17:58] I suppose the question is which behaviour is required, and what is essentially an implementation detail in SSCI [17:58] m_kiewitz: you are correct, it is not many games; this changed audio code is only in GK2+SCI3 as far as I can tell [17:58] but that would cause huge memory usage [17:58] and some of our platforms are limited in that regard, which then would probably cause issues [17:59] wjp: any script that expects 1 kLock(&, false) call to unlock the resource would be affected, or any script that called kUnLoad and expected that to dispose the resource regardless of locks [18:00] wouldn't the garbage collector get rid of unused resources anyway? [18:00] er, 1 kLock(&, false) call regardless of the number of kLock(&, true) calls, I mean [18:00] GC doesnt control resource manager memory [18:01] oh, it doesn't? well that's a shame [18:01] snover: I don't think disposal of resources controlled by the scripts is essential [18:01] Harekiet (~harekiet@kittens.harekiet.com) left irc: Ping timeout: 240 seconds [18:01] I mean, disposal in the way that it is controlled by the scripts [18:02] since the scripts don't have any way of seeing (or being affected by) the way that is handled [18:02] so, I know that Lighthouse calls kLock(&, false) when it hasnt locked anything itself, so with just the counter, that removes one of the kernel locks and explodes [18:03] since it is on an audio resource, in SSCI, that lock call would just change the memory attributes on the audio channel object [18:04] well i guess we could introduce a script-side locking counter [18:05] what are the kernel calls with return values (or other script-visible effects) that actually depend on the locking? [18:05] you mentioned DoAudioWaitForPlay or something? [18:06] yes [18:06] because effects like that are the only ones we _need_ to reproduce; the rest is all adjustable as long as resources are around when they need to be [18:07] in the GK2+SCI3 audio code, calling kDoAudioWaitForPlay() returns the number of samples not in memory (which I believe is determined in GK2 indirectly by the call to kLock which converts the background music from a streaming sample to an in-memory sample) [18:10] I dont know of any other instances of this functionality being used [18:10] I dont know why they felt it was important not to have the guard in the grotto move until some other sample was finished playing [18:11] if it's just 1 or 2 situations, where such checks are made, we could simply patch them out [18:11] sure not a great solution (for now), but it would work [18:11] and we wouldn't have to change alot of the engine [18:11] in GK2 maybe it was done to avoid having some audio being played while regular audio (not music) is already playing [18:15] dreammaster (~dreammast@c-73-149-116-247.hsd1.ma.comcast.net) joined #scummvm. [18:15] #scummvm: mode change '+o dreammaster' by ChanServ!ChanServ@services. [18:16] the guard doesnt make noise, the only other audio that i can find to play in this scene is grace saying i dont think i need to move the table or i dont think the guards would be sympathetic to my cause [18:17] hmm, maybe it was meant to avoid her talking while the guard is entering because it would "feel weird"? [18:17] that is about all i can come with right now [18:17] is there another call to check for audio samples somehow? [18:18] do we play the sample in any case? then we could also change the check to check for 1 instead of 0 [18:19] although i personally think it wouldn't be a big deal in case Grace says something and the guard enters while that happens [18:20] it doesnt bother me. if it werent for knowing about the locking issue in Lighthouse I may have just ended up deciding to have this call always return 0 [18:20] what happens in Lighthouse? [18:21] is it a similar situation? [18:21] Harekiet (~harekiet@kittens.harekiet.com) joined #scummvm. [18:22] GitHub169 (~GitHub169@192.30.252.34) joined #scummvm. [18:22] [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaYf [18:22] scummvm/master ca0a6d3 Paul Gilbert: TITANIC: Some fixes for marker 1 rotation code [18:22] GitHub169 (GitHub169@192.30.252.34) left #scummvm. [18:22] nope. In Lighthouse, BackMusic::fade calls kLock to unlock the audio resource, but there is not always a corresponding kLock call to lock the resource [18:23] in SSCI this just means the lock flag was removed from the sample, so whenever the audio system finishes playing it, the memory is unlocked and can be collected by the memory manager [18:24] in ScummVM, without separate kernel & script lock counters (or without implementing kLock the way SSCI does it), this means the game removes Audio32s lock on the resource [18:27] without implementing kLock the way SSCI does it, it is also possible (I havent seen it, but I havent been looking for it until now) that a game will call kLock to lock a resource multiple times, but only call kLock to unlock once. in SSCI this is fine since it is not a counter. [18:28] I meant what happens in Lighthouse? [18:28] does the game lock up during fades? [18:28] use-after-free [18:29] ah i see [18:31] Leisure Suit Larry in the Land of the Lounge Lizards is 30 years old [18:32] ..as logix said, oh well [18:33] Action: m_kiewitz feels old now [18:37] TFW you're trying to debug some crap on your screen as a video codec bug [18:38] m_kiewitz: as far your question about interpreters, yes, i actually looked at both EQ floppy and EQ CD and they simply set a flag like this https://zetafleet.com/i/5934538a57dee.png [18:38] https://aubreyhodges.bandcamp.com/album/quest-for-glory-shadows-of-darkness-official-soundtrack [18:39] I just found out about this - I wonder if there's a way to put that into the game like with the James Woodcock enhancements [18:41] omer_mor (~Omer@46-117-132-33.bb.netvision.net.il) joined #scummvm. [18:41] tsoliman: neato. theres also a CD-quality version of the Rama soundtrack out there on the interwebs https://youtu.be/uSccRkTF5ts?t=27m48s [18:42] I never played Rama .. is it good? [18:44] omer_mor_ (~Omer@46-117-132-33.bb.netvision.net.il) left irc: Ping timeout: 255 seconds [18:45] i cant answer that :) [18:51] wasn't that one of them myst puzzle games? [18:51] yeah. [18:52] probably better to play the old 8bit one :) [19:04] omer_mor_ (~Omer@46-117-132-33.bb.netvision.net.il) joined #scummvm. [19:06] omer_mor (~Omer@46-117-132-33.bb.netvision.net.il) left irc: Ping timeout: 260 seconds [19:14] ajax16384 (~User@109.60.130.33) left irc: Read error: Connection reset by peer [19:18] other things about kLock that arent quite right at the moment: in SCI1.1, attempts to lock Audio36/Sync36 resources are ignored; starting with SCI1.1, attempts to lock Sound resources have the type changed to Audio automatically for games with corresponding digital audio samples; starting with SCI2, -1 to unlock all resources of a given type is removed [19:26] did anyone else ever make a shell script to compact sparse savegame slots? [19:26] basically rename [000, 001, 004, 005, 007] to [000, 001, 002, 003, 004] [19:27] omer_mor (~Omer@46-117-132-33.bb.netvision.net.il) joined #scummvm. [19:27] girafe (~girafe@LFbn-1-11729-221.w2-7.abo.wanadoo.fr) joined #scummvm. [19:29] omer_mor_ (~Omer@46-117-132-33.bb.netvision.net.il) left irc: Ping timeout: 245 seconds [19:42] tsoliman: no, but its a pretty simple bash oneliner. `I=0; for FILE in $1.*; do mv $FILE ${FILE%.*}.$(printf '%03d' $I); I=$((I+1)); done`, run like `./rename.sh game-id`. that said, be careful with this, some engines like SCI32 put games in specific slots for autosave/restart game [19:43] so avoid 000 and 999? [19:46] yeah. [19:47] GitHub59 (~GitHub59@192.30.252.41) joined #scummvm. [19:47] [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaGM [19:47] scummvm/master 71fd9b7 Paul Gilbert: TITANIC: Fix saving locked marker vectors into camera rotation matrix [19:47] GitHub59 (GitHub59@192.30.252.41) left #scummvm. [19:47] 000 and 099 rather [19:48] it is 999 for the restore game in sci32 [19:50] games like QFG encourage saving often and I don't want to just simply overwrite stuff - I remember changing the max to 1000 slots instead of 100 but that PR was bounced. What I end up doing is going through and pruning a bunch of non-key saves and then compact it all .. creating more slots at the bottom basically [19:51] the other thing to do was to make another target for the same game .. more slots [20:12] I'm beginning to think I messed up this disassembly [20:13] TMM: famous last words ;) [20:14] I think I'm just dumb at this point [20:17] frankyboy_ (~franky@ppp109-252-73-54.pppoe.spdop.ru) left irc: Remote host closed the connection [20:19] I... think I don't know how x86 carry flags work [20:20] so, for 16bit registers: add ax, ax. CF is set when ax + ax overflows 2^16 right, not when it goes to negative if it were signed? That's the SF flag, no? [20:20] so this is equivalent to if ax > 16384, yeah? [20:21] err 32768 [20:24] omer_mor_ (~Omer@46-117-132-33.bb.netvision.net.il) joined #scummvm. [20:24] oh, right, and ZF [20:24] goddamnit [20:26] omer_mor (~Omer@46-117-132-33.bb.netvision.net.il) left irc: Ping timeout: 260 seconds [20:30] TMM: http://carlosrafaelgn.com.br/Asm86/ i find this helpful sometimes. click windows and open the registers window, then you can run some stuff and see what happens [20:31] thanks [20:33] snover, oh, that is super helpful [20:33] snover: if SCI32 puts stuff in target.999 and the GUI only shows 000-099, how do you load it? [20:34] tsoliman: there is a restart game button in the game that loads it [20:34] omer_mor (~Omer@46-117-132-33.bb.netvision.net.il) joined #scummvm. [20:36] i dont really know why they felt it necessary to do this in some games [20:37] omer_mor_ (~Omer@46-117-132-33.bb.netvision.net.il) left irc: Ping timeout: 245 seconds [20:37] Strangerke_ (~Strangerk@cable-85.28.84.13.coditel.net) joined #scummvm. [20:39] _dhewg (~dhewg@adiza.nexticom.net) joined #scummvm. [20:39] #scummvm: mode change '+o _dhewg' by ChanServ!ChanServ@services. [20:39] Strangerke (~Strangerk@cable-85.28.84.13.coditel.net) left irc: Ping timeout: 260 seconds [20:42] Strangerke_ (~Strangerk@cable-85.28.84.13.coditel.net) left irc: Ping timeout: 260 seconds [20:44] Henke37 (~Henrik@81-227-16-59-no133.bredband.skanova.com) left irc: Quit: ERR_SHUTDOWN [20:44] snover: GK1 saves don't show the options menu in the screenshot but QFG4 does ... it's as if GK1 quickly hides the menu just before the dialog .. why is that? [20:44] I mean to say what is different about them [20:44] Cruel` (~Cruel@cruels.net) joined #scummvm. [20:45] ComradeAnderson_ (~ComradeAn@unaffiliated/comradeanderson) joined #scummvm. [20:46] Cruel (~Cruel@cruels.net) got netsplit. [20:48] Coldwine[m] (coldwinema@gateway/shell/matrix.org/x-rnxnhyzlukunljvp) got netsplit. [20:48] Asterisk (~asterisk@unaffiliated/asterisk) got netsplit. [20:48] ComradeAnderson (~ComradeAn@unaffiliated/comradeanderson) got netsplit. [20:48] dhewg (~dhewg@adiza.nexticom.net) got netsplit. [20:48] Nick change: ComradeAnderson_ -> ComradeAnderson [20:48] Possible future nick collision: ComradeAnderson [20:48] Nick change: _dhewg -> dhewg [20:48] Possible future nick collision: dhewg [20:48] tsoliman: from what i can see, GK1 closes the settings dialog and then calls to save, whereas QFG4 calls to save and then closes the settings dialog [20:48] quick question. 'cmp al, 10' 'jnz foo' means that if al != 10 then jump to foo. basically cmp subtracts both its params without storing the result anywhere, just setting the status flags. if both params were equal, subtracting them would result in 0 and thus setting the zero flag to 1 and the jump would not be taken. Is that right or am I missing something? [20:48] Coldwine[m] (coldwinema@gateway/shell/matrix.org/x-rnxnhyzlukunljvp) returned to #scummvm. [20:48] tsoliman: or perhaps GK1 closes the settings dialog, calls frameout, then calls to save [20:48] id have to look at the scripts to tell you definitively. [20:48] SylvainTV (~SylvainTV@LFbn-1-8392-241.w81-254.abo.wanadoo.fr) left irc: Ping timeout: 240 seconds [20:48] yeah .. same (desirable) behavior happens in SQ6, PQ4, etc .. I guess QFG4 is the odd one out :) [20:48] Asterisk (~asterisk@unaffiliated/asterisk) returned to #scummvm. [20:49] SylvainTV (~SylvainTV@LFbn-1-8392-241.w81-254.abo.wanadoo.fr) joined #scummvm. [20:49] #scummvm: mode change '+o SylvainTV' by ChanServ!ChanServ@services. [20:49] lateral[m] (lateralmat@gateway/shell/matrix.org/x-qsyddttgxuexcbhn) left irc: Ping timeout: 240 seconds [20:49] Coldwine[m] (coldwinema@gateway/shell/matrix.org/x-rnxnhyzlukunljvp) left irc: Ping timeout: 272 seconds [20:50] kszys[m] (kszysmatri@gateway/shell/matrix.org/x-tqshylbbqmtsqfzc) left irc: Ping timeout: 240 seconds [20:50] FleetAdmiral[m] (fleetadmir@gateway/shell/matrix.org/x-owkdryecrqcjjtkd) left irc: Ping timeout: 276 seconds [20:51] Joefish: right [20:54] Joefish: the emulator i mentioned earlier to TMM might be useful for you too, as well as this page on jump equivalents http://unixwiz.net/techtips/x86-jumps.html [20:57] Cruel (~Cruel@cruels.net) got lost in the net-split. [20:57] Joefish: some (all?) x86 assemblers also let you write "je" (Jump of Equal) instead of "jz" and "jne" instead of "jnz" [20:57] snover: thanks. normally I have my small assembler book with a similar list than yours but it's still lost in some box.. somehow the cmp jmp combo is really hard for me to parse [20:57] s/of/if/ [20:58] Joefish: i have that same problem with test+setz [20:59] https://stackoverflow.com/questions/14267081/difference-between-je-jne-and-jz-jnz [20:59] lol, "Long answer: yes" [20:59] :D [21:00] recently I learned that JA/JG .. are not the same as JA is unsigned and JG is signed. blew my mind [21:03] Joefish: huh, indeed, didn't know that [21:03] Littleboy (~littleboy@c-73-4-50-241.hsd1.ma.comcast.net) left irc: Ping timeout: 255 seconds [21:03] heh, evil nasm, changing jnz to jne https://stackoverflow.com/questions/14807033/ [21:06] lateral[m] (lateralmat@gateway/shell/matrix.org/x-vzblfcbtibheqdmx) joined #scummvm. [21:11] Strangerke (~Strangerk@cable-85.28.84.13.coditel.net) joined #scummvm. [21:13] tom__ (~tom@cpc92166-nrte31-2-0-cust283.8-4.cable.virginm.net) joined #scummvm. [21:13] tom__ (~tom@cpc92166-nrte31-2-0-cust283.8-4.cable.virginm.net) left irc: Client Quit [21:17] wtf... I'm doing something really stupid, I can't figure it out [21:27] kszys[m] (kszysmatri@gateway/shell/matrix.org/x-wjmonrnoaoxyrsml) joined #scummvm. [21:27] FleetAdmiral[m] (fleetadmir@gateway/shell/matrix.org/x-jwzrhnoqnkkmarxv) joined #scummvm. [21:27] Coldwine[m] (coldwinema@gateway/shell/matrix.org/x-xbzyyqgrihyprmpc) joined #scummvm. [21:34] snover, I think I'm done being dumb. http://paste.debian.net/966778/ <-- this is the disassembly of the relevant code [21:36] This shouldn't be so hard :P [21:37] This is so simple I'm beginning to wonder if perhaps I fucked up something else somewhere [21:41] how are you translating it? [21:42] wjp, it's that thing you looked at earlier, I'm pretty sure that that's where the problem lies [21:44] when interpreting ax as signed short, this should yield ebx = 0 for negative ax, ebx = 2 for zero ax, ebx = 3 for positive ax [21:48] 0x8000 also yields 2 [21:50] oh, uh, yes [21:50] still not entirely awake :-) [21:51] I'm pretty sure I wrote c code that does this [21:56] TMM: the three cases in the C code you showed before don't correspond to these three cases though [21:57] to get that, you'd have to change the cur_unk < 0 to cur_unk <= 0, and the check against 0x8000 to 0x8000 or 0 [21:57] (I'm slightly guessing at which case corresponds to which action) [21:58] ny00123 (~ny00123@46-116-13-123.bb.netvision.net.il) left irc: Quit: Leaving [21:58] 0x8000 to 0x8000? [21:58] (0x8000) to (0x8000 or 0) [22:02] neither 0x8000 or 0 then? [22:03] yeah [22:03] while (wut < 0) { if (wut != 0x8000) { doMemcpy; break; } wut = *(++unk_map_l); } <-- that was your original [22:03] while (wut <= 0) { if (wut != 0x8000 && wut != 0) { doMemcpy; break; } wut = *(++unk_map_l); } [22:03] then? [22:04] wasn't the loop structure different now? [22:04] but I fell asleep for a few hours, so lost track a bit [22:05] I don't think so [22:05] t0by (~t0by@unaffiliated/t0by) left irc: Quit: t0by [22:05] bleh, now it's worse again [22:05] t0by (~t0by@unaffiliated/t0by) joined #scummvm. [22:05] #scummvm: mode change '+o t0by' by ChanServ!ChanServ@services. [22:07] t0by (~t0by@unaffiliated/t0by) left irc: Client Quit [22:07] you changed the loop structure to this earlier: http://paste.debian.net/966327/ [22:09] yeah I think that was wrong too [22:11] the != 0x8000 had the signedness issue too [22:11] Strangerke_ (~Strangerk@cable-85.28.84.13.coditel.net) joined #scummvm. [22:11] yeah, I fixed that [22:11] I think you're right [22:12] the problem wasn't there, the version I had originally probably was fine too [22:12] I think I fucked something else up [22:12] if I don't swap the buffers I can see that all blocks are actually in their correct place [22:12] I must be doing something wrong with the secondary metadata [22:13] thanks wjp, I think I'll have to stop looking here [22:13] I think this bit was working just fine several hours ago... [22:13] Strangerke (~Strangerk@cable-85.28.84.13.coditel.net) left irc: Ping timeout: 255 seconds [22:13] Nick change: Strangerke_ -> Strangerke [22:13] waltervn (~waltervn@541B2DBA.cm-5-4a.dynamic.ziggo.nl) left irc: Quit: Leaving [22:24] I'm actually thinking I maybe swap the buffers wrong [22:29] GitHub149 (~GitHub149@192.30.252.42) joined #scummvm. [22:29] [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaBE [22:29] scummvm/master a8e0328 Paul Gilbert: TITANIC: Renamings for the individual lock marker methods [22:29] GitHub149 (GitHub149@192.30.252.42) left #scummvm. [23:01] harekiet[m] (harekietha@gateway/shell/matrix.org/x-qkzyzfwivmtpceud) joined #scummvm. [23:21] girafe (~girafe@LFbn-1-11729-221.w2-7.abo.wanadoo.fr) left irc: Read error: Connection reset by peer [23:32] Mia (~Mia@unaffiliated/mia) left irc: Ping timeout: 255 seconds [23:39] m_kiewitz (~m_kiewitz@scummvm/undead/m-kiewitz) left irc: Quit: technology isn't intrinsically good or evil. It's how it's used. Like the Death Ray. [23:53] omer_mor_ (~Omer@46-117-132-33.bb.netvision.net.il) joined #scummvm. [23:55] omer_mor (~Omer@46-117-132-33.bb.netvision.net.il) left irc: Ping timeout: 268 seconds [00:00] --- Mon Jun 5 2017