[Back to Index]

[00:00] <snover> finally, im helpful!
[00:04] <TMM> snover, you're always helpful :)
[00:06] <snover> that unary negation on the LHS of the comparison is also tickling my OCD
[00:07] <TMM> !=0 would be better? :)
[00:09] <snover> i would think so
[00:10] <TMM> Once I have everything working I'm rewriting it anyway
[00:10] <TMM> A lot of this is still somewhat structured like the assembly
[00:11] <logix> ! 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] <logix> and then compare to 0, so in effect just check if cur_unk is zero or not
[00:11] <TMM> oh, fun
[00:12] <TMM> I'm mostly in the 'getting it to go' phase, a lot of this code is beyond terrible
[00:12] <TMM> but I hadn't really though about that
[00:12] <logix> I try to be always explicit with parentheses
[00:13] <TMM> thanks
[00:13] <snover> clang warns the heck out of that line as it is written
[00:13] <logix> heh, I can imagine :)
[00:13] <logix> sorry, I'm not trying to make fun of you, you're doing all the hard work here
[00:15] <TMM> I didn't take it as making fun
[00:15] <TMM> Thanks :)
[00:15] <TMM> still need to implement the second decoding step
[00:16] <TMM> it's about as baroque as this
[00:16] <TMM> snover, but I *was* right that the problem wasn't in the parsing of the second bitstream! :D
[00:16] <TMM> it was something much dumber
[00:18] <snover> :)
[00:20] <TMM> and then write this in a way that doesn't rely on 2 complements behavior I think
[00:20] <TMM> this is all jucky
[00:31] <-- SylvainTV left irc: Read error: Connection reset by peer
[01:45] --> DominusExult joined #scummvm.
[01:45] --> DJW|Badger joined #scummvm.
[01:49] <-- DJW|Home left irc: Ping timeout: 240 seconds
[01:49] <-- Dominus left irc: Ping timeout: 260 seconds
[01:49] Nick change: DominusExult -> Dominus
[01:54] --> Joefish_ joined #scummvm.
[01:54] #scummvm: mode change '+v Joefish_' by ChanServ!ChanServ@services.
[01:55] <-- Joefish left irc: Ping timeout: 255 seconds
[02:01] --> DJWillis joined #scummvm.
[02:01] #scummvm: mode change '+o DJWillis' by ChanServ!ChanServ@services.
[02:02] --> DJW|Home joined #scummvm.
[02:02] #scummvm: mode change '+o DJW|Home' by ChanServ!ChanServ@services.
[02:04] <-- DJW|Badger left irc: Ping timeout: 240 seconds
[02:05] --> GitHub128 joined #scummvm.
[02:05] <GitHub128> [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vH2XK
[02:05] <GitHub128> scummvm/master 44fce15 Paul Gilbert: TITANIC: Fix some vector calculations in marker lock-on code
[02:05] GitHub128 (GitHub128@ left #scummvm.
[02:06] <-- DJWillis left irc: Ping timeout: 240 seconds
[02:36] --> GitHub78 joined #scummvm.
[02:36] <GitHub78> [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vH21E
[02:36] <GitHub78> scummvm/master f6dc363 Paul Gilbert: TITANIC: Locking onto first marker is now working
[02:36] GitHub78 (GitHub78@ left #scummvm.
[02:52] <-- dreammaster left irc:
[02:54] <-- snover left irc: Ping timeout: 268 seconds
[02:59] --> snover joined #scummvm.
[02:59] #scummvm: mode change '+o snover' by ChanServ!ChanServ@services.
[03:05] <-- Joefish_ left irc: Ping timeout: 255 seconds
[03:06] --> Joefish joined #scummvm.
[03:06] #scummvm: mode change '+v Joefish' by ChanServ!ChanServ@services.
[03:53] <snover> 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 left irc: Ping timeout: 260 seconds
[05:12] --> Begasus joined #scummvm.
[05:18] --> Begas_VBox joined #scummvm.
[05:22] --> Lightkey joined #scummvm.
[06:44] --> Mia joined #scummvm.
[06:44] <-- Mia left irc: Changing host
[06:44] --> Mia joined #scummvm.
[07:17] --> Henke37 joined #scummvm.
[07:32] <-- ced117 left irc: Ping timeout: 255 seconds
[07:34] --> ced117 joined #scummvm.
[07:48] #scummvm: mode change '+o Strangerke' by ChanServ!ChanServ@services.
[07:48] <Strangerke> hi guys
[07:49] <Joefish> hey Strangerke
[07:51] <Strangerke> :)
[07:59] <-- LittleToonCat left irc: Remote host closed the connection
[08:00] <-- Begas_VBox left irc: Quit: Vision[0.9.8]: i've been blurred!
[08:10] --> m_kiewitz joined #scummvm.
[08:10] #scummvm: mode change '+o m_kiewitz' by ChanServ!ChanServ@services.
[08:12] <-- ced117 left irc: Ping timeout: 255 seconds
[08:19] --> ced117 joined #scummvm.
[08:24] <TMM> his Strangerke
[08:26] <wanwan> TMM, hi. that mysterious video format reversing is MVE?
[08:29] <TMM> yeah
[08:30] <TMM> https://tmm.cx/nextcloud/s/2jQznYpngmpaUr1 <-- this is how far I am now with the other stream format
[08:30] <wanwan> but isn't it already documented on multimedia wiki?
[08:30] <TMM> only 1/3rd of the possible video formats are documented
[08:30] <wanwan> oh, i see
[08:30] <TMM> this game happily uses the other 2/3rds
[08:37] --> Begas_VBox joined #scummvm.
[08:56] --> ajax16384 joined #scummvm.
[08:56] #scummvm: mode change '+o ajax16384' by ChanServ!ChanServ@services.
[09:06] --> ST joined #scummvm.
[09:06] #scummvm: mode change '+o ST' by ChanServ!ChanServ@services.
[09:08] --> WooShell joined #scummvm.
[09:15] <WooShell> good meowning =^.^=
[09:30] <TMM> hi WooShell
[09:34] <TMM> 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 left irc: Ping timeout: 240 seconds
[10:09] --> frankyboy_ joined #scummvm.
[10:16] <-- frankyboy_ left irc: Read error: Connection reset by peer
[10:17] --> frankyboy_ joined #scummvm.
[10:28] <-- |Cable| left irc: Ping timeout: 240 seconds
[10:41] --> |Cable| joined #scummvm.
[10:55] <-- Begas_VBox left irc: Quit: Vision[0.9.8]: i've been blurred!
[11:06] --> Begas_VBox joined #scummvm.
[11:32] <-- Begasus left irc: Ping timeout: 255 seconds
[11:44] --> Begasus joined #scummvm.
[11:56] --> waltervn joined #scummvm.
[11:56] #scummvm: mode change '+o waltervn' by ChanServ!ChanServ@services.
[12:19] --> SylvainTV joined #scummvm.
[12:19] #scummvm: mode change '+o SylvainTV' by ChanServ!ChanServ@services.
[13:12] <TMM> bleh, I really don't see another way of doing this loop short of making a table
[13:13] <TMM> it's not just the number of iterations that matter, but also how long the value stays negative
[13:13] <TMM> the *actual* value doesn't matter though
[13:13] <TMM> I *could* just generate an in-memory table and just use the value in the stream as an index into the table
[13:14] <TMM> it'd only be 65kb of data
[13:14] <TMM> but I'd need some wraparound logic
[13:14] <TMM> which is also not the end of the world
[13:38] <TMM> 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] <TMM> I feel the goto actually is way more readable, but people hate goto :P
[13:39] <TMM> well, scummvm already has ~900 gotos
[13:47] <TMM> I guess an example is in order : http://paste.debian.net/966019/
[13:47] <TMM> _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] <TMM> _sev, that's for another day :P
[13:49] <_sev> TMM: and not using our data types :D
[13:49] <TMM> 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] <TMM> those are two options for the same algorithm
[13:50] <TMM> I'm kind of hating the goto-less version
[13:50] <_sev> TMM: then use the go to
[13:51] <TMM> one other option would be to decrement the loop counter and 'continue'
[13:51] <TMM> but that's even more awful
[13:55] <TMM> _sev, I don't suppose you see a cleverer way of doing the same thing as this code does?
[14:01] <TMM> 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] <TMM> instead of pretending like these are numbers
[14:05] <wjp> TMM: isn't this just a while (cur_unk >= 0) ?
[14:05] <wjp> with a break in the printf case
[14:07] <wjp> uh, while (cur_unk < 0)
[14:09] <wjp> i.e., while (cur_unk < 0) { if ((short)(cur_unk * 2)) { printf("%i: break\n", x); break; } cur_unk = *(++unk_p); }
[14:10] <wjp> if you don't need the printf, you can also fold that into the main while condition
[14:14] <wjp> in which case it becomes just while (cur_unk == 0x8000) cur_unk = *(++unk_p); ?
[14:22] <TMM> 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] <wjp> so then the first one
[14:22] <TMM> wjp, http://paste.debian.net/966118/ <-- this is what the whole thing looks like in context
[14:24] <TMM> I guess that multiplication could be done with a static value check though
[14:24] <wjp> while (wut < 0) { if (wut != 0x8000) { doMemcpy; break; } wut = *(++unk_map_l); }
[14:24] <wjp> ?
[14:25] <TMM> well, two actually because there are two values for which wut * 2 == 0
[14:25] <wjp> but one of them won't be hit inside that if
[14:25] <TMM> oh, right
[14:25] <TMM> because ! 0 < 0 :)
[14:25] <wjp> (the 2*wut is probably shorter asm of course)
[14:28] <TMM> hum, I need to think about this a bit harder, your solution doesn't work
[14:28] <TMM> but I don't quite see why not
[14:28] <-- Begasus left irc: Ping timeout: 255 seconds
[14:28] <TMM> need to cast wut to unsigned of course
[14:29] <wjp> oh, or check against -0x8000, yes
[14:30] <TMM> yeah, that looks a bit less stupid
[14:30] <TMM> thanks wjp
[14:31] <TMM> wjp, http://paste.debian.net/966121/
[14:32] <TMM> I may need to rename 'wut'
[14:40] --> Begasus joined #scummvm.
[14:59] <-- Harekiet left irc: Remote host closed the connection
[15:04] <-- Deledrius left irc: Quit: App.Exit
[15:07] --> Deledrius joined #scummvm.
[15:08] --> girafe joined #scummvm.
[15:10] <-- girafe left irc: Read error: Connection reset by peer
[15:12] <-- Begasus left irc: Ping timeout: 240 seconds
[15:14] --> Harekiet joined #scummvm.
[15:24] --> Begasus joined #scummvm.
[15:30] <-- Harekiet left irc: Remote host closed the connection
[15:41] --> dreammaster joined #scummvm.
[15:41] #scummvm: mode change '+o dreammaster' by ChanServ!ChanServ@services.
[15:42] --> GitHub83 joined #scummvm.
[15:42] <GitHub83> [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaUK
[15:42] <GitHub83> scummvm/master b60f0ee Paul Gilbert: TITANIC: Rewrite of rotation code when 1 marker is fixed
[15:42] GitHub83 (GitHub83@ left #scummvm.
[15:42] --> ny00123 joined #scummvm.
[15:54] <Lightkey> wut
[15:57] --> Littleboy joined #scummvm.
[15:57] #scummvm: mode change '+o Littleboy' by ChanServ!ChanServ@services.
[16:00] --> LittleToonCat joined #scummvm.
[16:08] <logix> 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] <logix> 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] <logix> I guess that was on stackexchange but I'm not sure
[16:15] --> Harekiet joined #scummvm.
[16:15] --> Harekiet2 joined #scummvm.
[16:16] <logix> TMM: ah, https://stackoverflow.com/questions/235072/
[16:17] <logix> and the 2nd reply (linking to an article by raymond chen) is what I was thinking of up there
[16:23] <-- dreammaster left irc:
[16:29] <-- Harekiet left irc: Remote host closed the connection
[16:29] <-- Harekiet2 left irc: Remote host closed the connection
[16:29] --> Harekiet joined #scummvm.
[16:46] <TMM> almost got this other format working too now, but it seems one of my draws is off by 1 blockwidth
[16:50] --> Mia joined #scummvm.
[16:50] <-- Mia left irc: Changing host
[16:50] --> Mia joined #scummvm.
[16:50] <TMM> https://tmm.cx/nextcloud/s/vpKUOHsBwEvvOml <-- sooo close
[16:53] --> t0by joined #scummvm.
[16:53] #scummvm: mode change '+o t0by' by ChanServ!ChanServ@services.
[16:56] <snover> TMM: 👍
[16:56] <t0by> Good evening
[16:56] <wjp> getting there!
[16:58] <t0by> I'm sure you all missed me terribly, to the point of physical pain. Fortunately I'm back, your torment is over.
[16:58] <snover> t0by: huge relief
[16:58] <Simei> 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] <t0by> Hi Simei
[16:59] <t0by> Uh, it redirects me to a login page...
[16:59] <Simei> Oops, let me see
[16:59] <t0by> ...but I guess it's the one on https://yinsimei.wordpress.com/2017/06/04/gsoc-week-2/
[16:59] <t0by> and YAY, are those characters?
[17:00] <t0by> Simei: great work!
[17:00] <Simei> Yes, that's it :D, the segmentation fault is fixed and I'm moving to texts now
[17:00] t0by does happy dance
[17:00] <Simei> Haha
[17:02] <Simei> I asked for a lot of help here. Thanks everyone! :)
[17:03] <TMM> ah, I think I found where I zigged where I should have zagged
[17:03] <wjp> 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] <snover> 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] <TMM> wjp, so, my 'goto version' was subtly wrong, so your optimization was also subtly wrong. My fault
[17:06] <TMM> wjp, http://paste.debian.net/966327/ <--- this is the correct code
[17:06] <wjp> TMM: fixable, I hope?
[17:07] <TMM> wjp, yeah, it should also skip an iteration of the outer loop if cur_unk >= 0
[17:07] <TMM> the version I wrote didn't do that
[17:08] <wjp> is this coming from asm?
[17:08] <snover> 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] <snover> phew. that was a pretty incoherent explanation.
[17:09] <TMM> 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] <TMM> 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] <snover> 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] <TMM> wjp, nope, I was actually right the first time it seems :-/
[17:16] <snover> 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] <TMM> ok now I have no idea what's wrong... back to the disassembly I guess
[17:18] <snover> 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 left irc: Remote host closed the connection
[17:21] <snover> 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] <snover> so, effectively, the list of audio channels operates as a pseudo-counter of locks of in-memory audio data
[17:26] <snover> if im reading all this correctly, that is&
[17:30] <snover> 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] <snover> 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] <TMM> wjp, ok, I'm pretty sure I've found the behavioral problem now :) Now to figure out how to fix it
[17:40] <-- Stormkeeper left irc: Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/
[17:50] <m_kiewitz> snover: can't we check if any more Gabriel Knight 2 situations happen
[17:50] <m_kiewitz> and if there aren't that many (or none at all), we simply patch the code away?
[17:51] <m_kiewitz> only a few games are affected, correct?
[17:53] <wjp> snover: do you know which parts of what you describe have an impact on scripts?
[17:53] --> Harekiet joined #scummvm.
[17:53] <snover> 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] <m_kiewitz> I don't think there is any known bug for sci16 at all
[17:55] <m_kiewitz> related to this matter
[17:55] <m_kiewitz> have you checked a SCI1.1 interpreter?
[17:55] <wjp> the difference in behaviour here should really be a feature rather than a bug
[17:56] <wjp> although I have to say I don't know much about kLock
[17:57] <m_kiewitz> probably from FreeSCI, I guess
[17:57] <snover> you probably would not notice resource leaks from locks unless you were looking for it
[17:57] <wjp> yes
[17:58] <wjp> I suppose the question is which behaviour is required, and what is essentially an implementation detail in SSCI
[17:58] <snover> 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] <m_kiewitz> but that would cause huge memory usage
[17:58] <m_kiewitz> and some of our platforms are limited in that regard, which then would probably cause issues
[17:59] <snover> 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] <m_kiewitz> wouldn't the garbage collector get rid of unused resources anyway?
[18:00] <snover> er, 1 kLock(&, false) call regardless of the number of kLock(&, true) calls, I mean
[18:00] <snover> GC doesnt control resource manager memory
[18:01] <m_kiewitz> oh, it doesn't? well that's a shame
[18:01] <wjp> snover: I don't think disposal of resources controlled by the scripts is essential
[18:01] <-- Harekiet left irc: Ping timeout: 240 seconds
[18:01] <wjp> I mean, disposal in the way that it is controlled by the scripts
[18:02] <wjp> since the scripts don't have any way of seeing (or being affected by) the way that is handled
[18:02] <snover> 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] <snover> 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] <m_kiewitz> well i guess we could introduce a script-side locking counter
[18:05] <wjp> what are the kernel calls with return values (or other script-visible effects) that actually depend on the locking?
[18:05] <wjp> you mentioned DoAudioWaitForPlay or something?
[18:06] <snover> yes
[18:06] <wjp> 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] <snover> 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] <snover> I dont know of any other instances of this functionality being used
[18:10] <snover> 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] <m_kiewitz> if it's just 1 or 2 situations, where such checks are made, we could simply patch them out
[18:11] <m_kiewitz> sure not a great solution (for now), but it would work
[18:11] <m_kiewitz> and we wouldn't have to change alot of the engine
[18:11] <m_kiewitz> in GK2 maybe it was done to avoid having some audio being played while regular audio (not music) is already playing
[18:15] --> dreammaster joined #scummvm.
[18:15] #scummvm: mode change '+o dreammaster' by ChanServ!ChanServ@services.
[18:16] <snover> 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] <m_kiewitz> hmm, maybe it was meant to avoid her talking while the guard is entering because it would "feel weird"?
[18:17] <snover> that is about all i can come with right now
[18:17] <m_kiewitz> is there another call to check for audio samples somehow?
[18:18] <m_kiewitz> do we play the sample in any case? then we could also change the check to check for 1 instead of 0
[18:19] <m_kiewitz> 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] <snover> 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] <m_kiewitz> what happens in Lighthouse?
[18:21] <m_kiewitz> is it a similar situation?
[18:21] --> Harekiet joined #scummvm.
[18:22] --> GitHub169 joined #scummvm.
[18:22] <GitHub169> [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaYf
[18:22] <GitHub169> scummvm/master ca0a6d3 Paul Gilbert: TITANIC: Some fixes for marker 1 rotation code
[18:22] GitHub169 (GitHub169@ left #scummvm.
[18:22] <snover> 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] <snover> 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] <snover> 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] <snover> 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] <m_kiewitz> I meant what happens in Lighthouse?
[18:28] <m_kiewitz> does the game lock up during fades?
[18:28] <snover> use-after-free
[18:29] <m_kiewitz> ah i see
[18:31] <Lightkey> Leisure Suit Larry in the Land of the Lounge Lizards is 30 years old
[18:32] <Lightkey> ..as logix said, oh well
[18:33] m_kiewitz feels old now
[18:37] <TMM> TFW you're trying to debug some crap on your screen as a video codec bug
[18:38] <snover> 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] <tsoliman> https://aubreyhodges.bandcamp.com/album/quest-for-glory-shadows-of-darkness-official-soundtrack
[18:39] <tsoliman> 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 joined #scummvm.
[18:41] <snover> 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] <tsoliman> I never played Rama .. is it good?
[18:44] <-- omer_mor_ left irc: Ping timeout: 255 seconds
[18:45] <snover> i cant answer that :)
[18:51] <Harekiet> wasn't that one of them myst puzzle games?
[18:51] <snover> yeah.
[18:52] <Harekiet> probably better to play the old 8bit one :)
[19:04] --> omer_mor_ joined #scummvm.
[19:06] <-- omer_mor left irc: Ping timeout: 260 seconds
[19:14] <-- ajax16384 left irc: Read error: Connection reset by peer
[19:18] <snover> 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] <tsoliman> did anyone else ever make a shell script to compact sparse savegame slots?
[19:26] <tsoliman> basically rename [000, 001, 004, 005, 007] to [000, 001, 002, 003, 004]
[19:27] --> omer_mor joined #scummvm.
[19:27] --> girafe joined #scummvm.
[19:29] <-- omer_mor_ left irc: Ping timeout: 245 seconds
[19:42] <snover> 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] <tsoliman> so avoid 000 and 999?
[19:46] <snover> yeah.
[19:47] --> GitHub59 joined #scummvm.
[19:47] <GitHub59> [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaGM
[19:47] <GitHub59> scummvm/master 71fd9b7 Paul Gilbert: TITANIC: Fix saving locked marker vectors into camera rotation matrix
[19:47] GitHub59 (GitHub59@ left #scummvm.
[19:47] <tsoliman> 000 and 099 rather
[19:48] <snover> it is 999 for the restore game in sci32
[19:50] <tsoliman> 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] <tsoliman> the other thing to do was to make another target for the same game .. more slots
[20:12] <TMM> I'm beginning to think I messed up this disassembly
[20:13] <snover> TMM: famous last words ;)
[20:14] <TMM> I think I'm just dumb at this point
[20:17] <-- frankyboy_ left irc: Remote host closed the connection
[20:19] <TMM> I... think I don't know how x86 carry flags work
[20:20] <TMM> 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] <TMM> so this is equivalent to if ax > 16384, yeah?
[20:21] <TMM> err 32768
[20:24] --> omer_mor_ joined #scummvm.
[20:24] <TMM> oh, right, and ZF
[20:24] <TMM> goddamnit
[20:26] <-- omer_mor left irc: Ping timeout: 260 seconds
[20:30] <snover> 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] <TMM> thanks
[20:33] <TMM> snover, oh, that is super helpful
[20:33] <tsoliman> snover: if SCI32 puts stuff in target.999 and the GUI only shows 000-099, how do you load it?
[20:34] <snover> tsoliman: there is a restart game button in the game that loads it
[20:34] --> omer_mor joined #scummvm.
[20:36] <snover> i dont really know why they felt it necessary to do this in some games
[20:37] <-- omer_mor_ left irc: Ping timeout: 245 seconds
[20:37] --> Strangerke_ joined #scummvm.
[20:39] --> _dhewg joined #scummvm.
[20:39] #scummvm: mode change '+o _dhewg' by ChanServ!ChanServ@services.
[20:39] <-- Strangerke left irc: Ping timeout: 260 seconds
[20:42] <-- Strangerke_ left irc: Ping timeout: 260 seconds
[20:44] <-- Henke37 left irc: Quit: ERR_SHUTDOWN
[20:44] <tsoliman> 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] <tsoliman> I mean to say what is different about them
[20:44] --> Cruel` joined #scummvm.
[20:45] --> 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] <snover> 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] <Joefish> 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] <snover> tsoliman: or perhaps GK1 closes the settings dialog, calls frameout, then calls to save
[20:48] <snover> id have to look at the scripts to tell you definitively.
[20:48] <-- SylvainTV left irc: Ping timeout: 240 seconds
[20:48] <tsoliman> 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 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] <snover> Joefish: right
[20:54] <snover> 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] <logix> Joefish: some (all?) x86 assemblers also let you write "je" (Jump of Equal) instead of "jz" and "jne" instead of "jnz"
[20:57] <Joefish> 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] <logix> s/of/if/
[20:58] <snover> Joefish: i have that same problem with test+setz
[20:59] <logix> https://stackoverflow.com/questions/14267081/difference-between-je-jne-and-jz-jnz
[20:59] <logix> lol, "Long answer: yes"
[20:59] <Joefish> :D
[21:00] <Joefish> recently I learned that JA/JG .. are not the same as JA is unsigned and JG is signed. blew my mind
[21:03] <logix> Joefish: huh, indeed, didn't know that
[21:03] <-- Littleboy left irc: Ping timeout: 255 seconds
[21:03] <logix> 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 joined #scummvm.
[21:13] --> tom__ joined #scummvm.
[21:13] <-- tom__ left irc: Client Quit
[21:17] <TMM> 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] <TMM> snover, I think I'm done being dumb. http://paste.debian.net/966778/ <-- this is the disassembly of the relevant code
[21:36] <TMM> This shouldn't be so hard :P
[21:37] <TMM> This is so simple I'm beginning to wonder if perhaps I fucked up something else somewhere
[21:41] <wjp> how are you translating it?
[21:42] <TMM> wjp, it's that thing you looked at earlier, I'm pretty sure that that's where the problem lies
[21:44] <wjp> 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] <TMM> 0x8000 also yields 2
[21:50] <wjp> oh, uh, yes
[21:50] <wjp> still not entirely awake :-)
[21:51] <TMM> I'm pretty sure I wrote c code that does this
[21:56] <wjp> TMM: the three cases in the C code you showed before don't correspond to these three cases though
[21:57] <wjp> 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] <wjp> (I'm slightly guessing at which case corresponds to which action)
[21:58] <-- ny00123 left irc: Quit: Leaving
[21:58] <TMM> 0x8000 to 0x8000?
[21:58] <wjp> (0x8000) to (0x8000 or 0)
[22:02] <TMM> neither 0x8000 or 0 then?
[22:03] <wjp> yeah
[22:03] <TMM> while (wut < 0) { if (wut != 0x8000) { doMemcpy; break; } wut = *(++unk_map_l); } <-- that was your original
[22:03] <TMM> while (wut <= 0) { if (wut != 0x8000 && wut != 0) { doMemcpy; break; } wut = *(++unk_map_l); }
[22:03] <TMM> then?
[22:04] <wjp> wasn't the loop structure different now?
[22:04] <wjp> but I fell asleep for a few hours, so lost track a bit
[22:05] <TMM> I don't think so
[22:05] <-- t0by left irc: Quit: t0by
[22:05] <TMM> bleh, now it's worse again
[22:05] --> t0by joined #scummvm.
[22:05] #scummvm: mode change '+o t0by' by ChanServ!ChanServ@services.
[22:07] <-- t0by left irc: Client Quit
[22:07] <wjp> you changed the loop structure to this earlier: http://paste.debian.net/966327/
[22:09] <TMM> yeah I think that was wrong too
[22:11] <wjp> the != 0x8000 had the signedness issue too
[22:11] --> Strangerke_ joined #scummvm.
[22:11] <TMM> yeah, I fixed that
[22:11] <TMM> I think you're right
[22:12] <TMM> the problem wasn't there, the version I had originally probably was fine too
[22:12] <TMM> I think I fucked something else up
[22:12] <TMM> if I don't swap the buffers I can see that all blocks are actually in their correct place
[22:12] <TMM> I must be doing something wrong with the secondary metadata
[22:13] <TMM> thanks wjp, I think I'll have to stop looking here
[22:13] <TMM> I think this bit was working just fine several hours ago...
[22:13] <-- Strangerke left irc: Ping timeout: 255 seconds
[22:13] Nick change: Strangerke_ -> Strangerke
[22:13] <-- waltervn left irc: Quit: Leaving
[22:24] <TMM> I'm actually thinking I maybe swap the buffers wrong
[22:29] --> GitHub149 joined #scummvm.
[22:29] <GitHub149> [scummvm] dreammaster pushed 1 new commit to master: https://git.io/vHaBE
[22:29] <GitHub149> scummvm/master a8e0328 Paul Gilbert: TITANIC: Renamings for the individual lock marker methods
[22:29] GitHub149 (GitHub149@ left #scummvm.
[23:01] harekiet[m] --> (harekietha@gateway/shell/matrix.org/x-qkzyzfwivmtpceud) joined #scummvm.
[23:21] <-- girafe left irc: Read error: Connection reset by peer
[23:32] <-- Mia left irc: Ping timeout: 255 seconds
[23:39] <-- 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_ joined #scummvm.
[23:55] <-- omer_mor left irc: Ping timeout: 268 seconds
[00:00] --- Mon Jun 5 2017