#nuvie@irc.freenode.net logs for 31 Oct 2013 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage


[00:12:40] <Malignant_Manor> Dominus: I added a --reset-video command line option for Nuvie. I'm not sure if you want that in the bundle or not.
[00:13:42] <-- Malignant_Manor has left IRC (Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258])
[01:55:15] --> assur has joined #nuvie
[02:25:32] <assur> The SE Character Names & HP missing titles existed in the release nuvie-0.4 If it is a regression, it happened before the recent changes
[04:09:43] <-- assur has left IRC (Quit: Leaving)
[09:14:41] <Dominus> malignant, that reset option is great (as for Exult). Thanks. It's useful for OS X as well...
[09:14:54] <Dominus> OS X bundle I mean
[09:54:44] --> Yuv422 has joined #nuvie
[10:30:22] <-- Yuv422 has left IRC (Ping timeout: 272 seconds)
[15:16:03] --> assur has joined #nuvie
[15:38:16] --> Malignant_Manor has joined #nuvie
[15:43:58] <Malignant_Manor> Dominus: can you see if you can track down when that regression happened?
[15:44:21] <Malignant_Manor> I think maybe I did mention this to Eric a long time ago and forgot.
[15:44:57] <Malignant_Manor> SE doesn't actually use the font that was in the menu. I think I read it used a system font.
[15:45:28] <Dominus> hi, can oyu describe it again for me? I have no time right now, got to go to sports in a few minutes and might not return for a while (after sports beer etc...)
[15:46:15] <Malignant_Manor> There is currently no font in the SE party view screen and most is missing from the inventory screen.
[15:46:57] <Malignant_Manor> You should notice right away if there is any text next to the character sprites in the upper right.
[15:47:22] <Malignant_Manor> The text in the portrait/status screen is gone too.
[16:00:00] <Malignant_Manor> We really should have Nuvie able to exit in the intros when you click the close button on the window.
[17:00:34] <Malignant_Manor> assur: are there any unused SE menu graphics for answer selection buttons (a or b)?
[17:06:21] <assur> There are a few unused graphics in one of the files.
[17:07:00] <assur> But I'm not sure what you're asking about as far as the 'answer selection buttons (a or b)'
[17:08:11] <Malignant_Manor> The U6 character creation had actual buttons for the gypsy answer selection that you could click on.
[17:08:45] <assur> From memory: There is an unused menu option (something like import character), a bunch of weird text that was likely scrapped, but never removed (Courage, Truth, Love?), and what looked like animation for the Story So Far... that didn't get implemented as well
[17:09:17] <Malignant_Manor> How do you view the menu graphics?
[17:09:43] <Malignant_Manor> (all graphics used by intro.lua)
[17:10:55] <assur> I just did it manually within the intro screens, adding sprites at offset locations. You can see how many images load in the debug screen. One sec.
[17:11:54] <assur> lib_size = ##
[17:12:32] <Malignant_Manor> ouch that is nasty.
[17:13:00] <assur> If you look in the intro.lua, I left some of the references to unused images in there. Commented out
[17:13:12] <assur> There are a couple other images that aren't in there commented out
[17:13:36] <assur> There are utilities to view the graphics, but I didn't want to learn them, compile, them, etc
[17:14:16] <assur> But yes, not a 'nice' way to figure it out.
[17:15:46] <Malignant_Manor> P.S. mouse controls and shortcut keys for intro.lua just got committed.
[17:16:03] <assur> Awesome, thanks!
[17:16:19] <assur> I got it to a working state and wanted to move on.
[17:16:40] <assur> Figured we'd fix the rest of the stuff as we get closer to release
[17:16:47] <Malignant_Manor> Character creation actually journeys onward now.
[17:17:31] <assur> I'm working on the usecode, which is the best part of SE
[17:19:09] <Malignant_Manor> I didn't mess with any of that because Eric wanted it moved to lua.
[17:19:13] <assur> That and the mid-game cutscenes.
[17:19:25] <assur> Yeah, that is the reason I'm going so slow
[17:19:40] <assur> Working on design for how they will work in lua
[17:20:04] <Malignant_Manor> The triggers are hard coded in C++.
[17:21:24] <assur> Have you happened to look at the SE disassembly?
[17:21:49] <Malignant_Manor> I don't mess with assembly.
[17:21:55] <assur> lol, fair enough
[17:22:14] <Malignant_Manor> That's another reason. I would just implement things my way instead of looking at the original.
[17:22:21] <assur> I disassembled it and spent maybe 30 minutes trying to find the usecode (unsuccessfully)
[17:22:44] <Malignant_Manor> Hard coded stats are the most important thing.
[17:22:48] <assur> Mainly I want to make sure we catch everything
[17:23:04] <Malignant_Manor> MD and SE need those badly for actors and items.
[17:25:00] <assur> I also hope my excitement about SE doesn't impact the mainline of U6 Nuvie.
[17:25:29] <assur> but I saw that U6 was playable from start to finish and said now is the perfect time to jump in and start working on SE
[17:28:59] <Malignant_Manor> I started helping with U6 (and some SE and MD) when I noticed Nuvie was mostly playable.
[17:29:28] <Malignant_Manor> I started to do bug testing and fixing. Then I worked on improving input and new stuff.
[17:30:52] <assur> Question. In full screen mode, the text is almost unreadable. Is this only for SE? Or is it also mostly unreadable with U6?
[17:32:05] <Malignant_Manor> Do you have a screenshot?
[17:32:54] <Malignant_Manor> I'm not sure what text you are talking about. I know the new UI font has a horrible palette for SE.
[17:33:38] <Malignant_Manor> I know the text spacing in the bottom right text box is way off in original mode.
[17:34:00] <assur> Yes, that is what I'm having trouble with, the palette
[17:34:17] <Malignant_Manor> So it is the new UI?
[17:34:20] <assur> Yes
[17:35:07] <Malignant_Manor> I think it is nasty hard coded palette indexes in C++.
[17:35:59] <Malignant_Manor> You could probably copy/paste it, highlight it, and find/replace the indexes. Then load the new font for SE.
[17:38:29] <Malignant_Manor> I wish it was done differently.
[18:02:09] <Malignant_Manor> assur: poll_for_key_or_button(cycles) has cycles unused. You commented about input detecting clicks and not mouse movement, If input_poll() is used, that is how it works.
[18:03:34] <Malignant_Manor> If input_poll(true) is used, then mouse movement is also returned. input 0 is mouse click. Input 1 is mouse motion.
[18:05:30] <assur> Yes, I'm aware of that
[18:05:54] <assur> Figured it out after I asked
[18:06:51] <Malignant_Manor> I had to kind of hack in mouse input into unused sdl keys.
[18:07:23] <assur> I'm ok with many hacks if they work...
[18:27:39] <Malignant_Manor> assur: is there an unused graphic for viewing the intro?
[18:28:47] <assur> I'm going from memory, but I think I listed all the 'unused' graphics above
[18:29:45] <Malignant_Manor> I don't see you listing it.
[18:30:48] <assur> Import Character menu option, Weird Truth/Love/Courage Text Graphics, and Story So Far animation.
[18:31:35] <Malignant_Manor> I wonder why they didn't have viewing the intro again since it can be skipped by any key press.
[18:31:48] <Malignant_Manor> I just implemented that.
[18:56:51] <-- Malignant_Manor has left IRC (Quit: ChatZilla 0.9.90.1 [Firefox 24.0/20130910160258])
[19:48:53] --> Yuv422 has joined #nuvie
[19:54:57] <Yuv422> assur: curiosity got the better of me and I opened up SE's game.exe in IDA
[20:12:47] <assur> Ha! You were supposed to play first
[20:14:06] <assur> I tried searching for references to a string in IDA, but couldn't find any. They should be there, but I was either doing it wrong or IDA just couldn't find the refs
[20:14:45] <Yuv422> did you get my email about ida
[20:15:06] <Yuv422> you need to unpack the game.exe
[20:15:12] <assur> Yes. When I tried running the uncompress utility, it didn't give an output file, so I'm not sure what happened there
[20:15:43] <assur> The verbose setting implied not much was happening, too
[20:15:49] <Yuv422> hmm
[20:16:00] <assur> Might be my error. These tools are new to me
[20:16:26] <assur> My thinking was if I found the "cannot use that" string references, I could find the usecode really quickly
[20:16:56] <wjp> you can usually tell quite easily by file size if it did something
[20:16:58] <Yuv422> yeah that's pretty much right
[20:17:00] <wjp> some unpackers work in-place
[20:17:14] <Yuv422> hi wjp
[20:17:18] <wjp> hi
[20:19:35] <wjp> although my SE game.exe doesn't seem packed at first glance
[20:20:25] <Yuv422> are the game strings visible?
[20:20:48] <assur> Yes
[20:20:49] <wjp> yes
[20:21:03] <Yuv422> ah k
[20:21:23] <Yuv422> :)
[20:21:29] <Yuv422> so no unpacking needed then
[20:22:08] <assur> So I must be using the tool wrong. The refs to the strings should be there
[20:22:12] <wjp> the strings seem to be concatenated together in their own exe segment
[20:23:07] <Yuv422> yeah
[20:23:08] <Yuv422> some are
[20:23:16] <wjp> so they may be looked up by index rather than pointer
[20:23:32] <Yuv422> seg50 on my database
[20:23:34] <assur> Ah, that could be
[20:23:42] <assur> Seg 50 for me, too
[20:24:11] <wjp> ah, no
[20:24:26] <wjp> IDA just doesn't recognize the way they are referenced automatically
[20:24:37] <wjp> so you have to tell it manually some offsets are offsets into seg050
[20:24:50] <Yuv422> yeah
[20:24:54] <wjp> if you're looking for a particular one, it may be easier to take its offset and do a search immediate on that
[20:25:06] <wjp> if you want them all, scan for references to seg050
[20:25:52] <assur> Let me try.
[20:26:15] <wjp> it shows one ref to the "can't use" string for me that way
[20:26:23] <assur> Not surprisingly, I haven't done a lot of reverse engineering. I suspect few people really have
[20:27:09] <wjp> pointing to a function with a huge jump table
[20:27:15] <wjp> so that sounds plausible
[20:27:27] <assur> How do you search for that offset?
[20:27:45] <Yuv422> I use alt-t
[20:27:52] <Yuv422> and search for the hex string
[20:28:02] <wjp> alt-i
[20:28:13] <wjp> (search for immediate)
[20:28:22] <Yuv422> seg003:2E15
[20:28:29] <Yuv422> is the print message func
[20:28:32] <Yuv422> in my database
[20:30:23] <assur> Ok, I've done something wrong. Not finding it using either method
[20:32:47] <wjp> the string is at offset 0x3C1 for me
[20:33:06] <assur> Same for me
[20:33:11] <wjp> alt-I and search for 0x3C1 finds one hit
[20:33:33] <wjp> oh, be sure to either search from the top of the program or check "find all"
[20:33:42] <wjp> (it defaults to search down for current location)
[20:33:48] <assur> I hit find all and it worked this time
[20:33:50] <Yuv422> yeah I get the reference too
[20:34:00] <Yuv422> seg013:88a4 for me
[20:34:21] <Yuv422> I've already renamed that function to usecode related
[20:34:23] <Yuv422> :)
[20:35:09] <Yuv422> there aer a lot of unconnected nodes in that func
[20:35:20] <Yuv422> might be a switch statement
[20:35:23] <wjp> there's a large unrecognized jump table in there
[20:35:32] <assur> Just going to say that. Switch statement
[20:35:33] <wjp> it does some annoying offset arithmetic to get at the table
[20:35:54] <assur> Is there an easy way to find the top of the subroutine?
[20:36:27] <Yuv422> are you in graphical mode?
[20:36:43] <Yuv422> press space then just head to the top
[20:37:18] <wjp> or just scroll up until you find it :-)
[20:37:24] <assur> Thanks.
[20:37:32] <Yuv422> wjp: :)
[20:37:51] <Yuv422> I don't think I could use IDA without the graphical view now
[20:38:17] <wjp> I tend to get lost in the graphical view
[20:38:50] <Yuv422> yeah I group loops to restore some order to the graph
[20:38:52] <wjp> although I've had a few functions with confusing logic that jumped all over the place where it was nice
[20:39:20] <wjp> I sometimes colour big loops in the linear view to see those easily
[20:40:41] <Yuv422> seg003:47f is the load objlist function
[20:41:20] <Yuv422> seg000 contains the file functions
[20:42:57] <Yuv422> another important function we need to find is the random function
[20:44:59] <wjp> do you know which one that is in u6?
[20:45:48] <assur> That is something we can try to cheat with, disassembly SE & MD. Likely many functions use the same code. If you know the function in U6, you can search for the first 10 bytes that match in SE & MD
[20:46:45] <assur> Won't work all the time, but it'll work enough to make it a useful tool
[20:52:26] <assur> Ah, wow, just switched to the graphical overview. You can almost see read the code one you have a clue of what you are looking at.
[20:53:25] <assur> Bottom of this section has all subroutine calls for each object that has usecode
[20:56:50] <assur> So I'm labeling seg013:8276 as the USECODE entry point
[21:03:01] <Yuv422> put your cursor on the function name and press 'n' to rename
[21:13:57] <Yuv422> I think sub_3B8F5 is the rand function
[21:14:34] <Yuv422> seg025:0025
[21:14:41] <Yuv422> in my disassembly
[21:19:35] <Yuv422> http://pastebin.com/1pR9Wqiz
[21:19:51] <Yuv422> I've got to go to work now
[21:19:53] <Yuv422> cya
[21:19:57] <assur> later
[21:20:09] <-- Yuv422 has left IRC (Quit: Yuv422)
[21:34:35] <assur> Thanks for the help wjp & Yuv
[22:39:19] <-- assur has left IRC (Ping timeout: 245 seconds)