00:04 <DerpyBot> New post on Equestria Daily by Sethisto: My Little Pony Speedpaint Compilation #119 - Luna Edition [ http://tinyurl.com/tsarssx ]
00:10 *** Quits: ArchPegasusMichael (Poni@Keep.In.A.Friendly.And.Pony.Place) (Ping timeout: 121 seconds)
00:10 *** Joins: ArchPegasusMichael (Poni@Keep.In.A.Friendly.And.Pony.Place)
00:11 *** Joins: Jackie (Jackie@Pony-vug.0ji.9.61.IP)
00:12 * Jackie pets Surreal_Nightmares
00:14 *** Surreal_Nightmares is now known as Filly_Nightmares
00:14 * Filly_Nightmares kneads Jackie
00:14 * Jackie nuzzles hooves
00:15 *** Quits: Jackie (Jackie@Pony-vug.0ji.9.61.IP) (Connection closed)
00:15 *** Joins: Jackie2 (Jackie@Pony-vug.0ji.9.61.IP)
00:17 *** Jackie2 is now known as Jackie
00:25 *** Joins: Pony|76261 (Pony76261@Pony-i454b4.cable.virginm.net)
00:31 * Schism flops.
00:31 <Stormspark> here is a more informative video on that game
00:31 <Stormspark> !link https://www.youtube.com/watch?v=BfZTY1Cjt20
00:31 <DerpyBot> I need to ask Twilight about that one.
00:31 <DerpyBot> Twilight told me this video is about SONIC 06: A Legacy in Ruin | GEEK CRITIQUE
00:32 <Stormspark> or if you just want vitriol
00:32 <Stormspark> !link https://www.youtube.com/watch?v=Sr_rd6DpxM0
00:32 <DerpyBot> I need to ask Twilight about that one.
00:32 <DerpyBot> Twilight told me this video is about Sonic the Hedgehog 2006 (Xbox 360) - Angry Video Game Nerd (AVGN)
00:36 * Cepheid sits atop Schism. "Much progress has been made."
00:36 <Schism> So I saw.
00:36 * Schism flips a bit, and walks through a wall.
00:38 <Cepheid> Outside of a few bytes, I've figured out the map data.
00:39 <Cepheid> In order of data: Tile Type, Tile ID(If the tile type supports an ID, otherwise it's 0xFF), encounter group, encounter frequency, unknown.
00:40 <Cepheid> The Tile IDs are used to differentiate between different objects of the same type that are "special"
00:40 <Cepheid> For example, chests, stairways, secret passageways, etc.
00:40 <Cepheid> There's apparently an unused tile type.
00:41 <Cepheid> Tile types seem to range from 0x00 to 0x1E. There's one tile type that I do not see used anywhere: 0x09.
00:41 <Cepheid> I'd have to edit the map data and put it in to see what it is, as a result.
00:41 <Schism> Cepheid: https://twitter.com/vhautaka/status/1188486364653932544
00:41 * Jackie pets Stormspark
00:41 <Schism> Also, nice. o3o;
00:43 <Cepheid> WIkiHeh.
00:43 <Cepheid> Wikipedia..
00:43 <Cepheid> Screw you.
00:43 <Cepheid> Seriously.
00:43 <Schism> What's all this then?
00:43 <Cepheid> I need a list of common hash functions and a simple description of them.
00:44 <Schism> Notability?
00:44 <Cepheid> I do not need, full, 200+ page mathematical proofs that they meet some criteria.
00:44 <Schism> Oh. Hah.
00:44 <Schism> Seriously, put that on a separate page.
00:44 <Cepheid> Indeed.
00:44 <Cepheid> I'm trying to figure out what the hash table function is being used.
00:44 <Cepheid> There's a few approaches to finding it.
00:44 <Cepheid> Put the game's code through Ghidra and hope for the best.
00:45 <Cepheid> I'm not doing that. It took me a full day just to figure out how the game decompresses the compressed ARM9 code within the ARM9 program.
00:45 <Cepheid> Yes, the ARM9 program for the game is compressed, and the boot loader for the game DECOMPRESSES IT, THEN RUNS THE GAME>
00:46 <Cepheid> Fine, let's try modular hashing, because the key here is strings.
00:46 <Schism> "Cancelled wedding party, everypony!" "YAY!"
00:47 <Cepheid> But yeah.
00:47 <Cepheid> Apparently, if you set the entire map to just zero?
00:47 <Cepheid> You can't interact with anything. No combat occurs unless it's a FOE.
00:47 <Cepheid> You can create combat-free areas.
00:47 <Cepheid> Which is of interest to me.
00:47 <Cepheid> That said, I'm surprised they didn't treat "00" as solid.
00:47 <Cepheid> Instead, it's just... "Nothing. Nothing at all."
00:47 <Schism> So, what, 01 is solid?
00:48 <Schism> Also, it makes sense that you can create combat-free areas. Isn't the first room in every Labyrinth combat-free?
00:49 <Schism> Or am I imagining things?
00:50 <Cepheid> No, actually.
00:50 <Jackie> Don't you hate it that people censor Hitler's history
00:50 * Schism kinda wants to imagine that there are some combat-free areas anyway, like those right next to stairs, but... hm.
00:50 <Cepheid> 00 is "not solid", as is 01.
00:50 <Cepheid> Solid is 0E or 0F, depending on what type of "solid" is there.
00:51 <Cepheid> There's optimizations.
00:51 <Cepheid> 0E means "solid, and player can't see anything behind it."
00:51 <Cepheid> 0F means "solid, but player can see beyond it."
00:51 <Schism> Sure, you create a row of that, and then you fill in the void with 00.
00:51 <Cepheid> Yeah, that's what they do.
00:51 <Cepheid> But there's no real reason to do so.
00:51 <Cepheid> Except..
00:51 <Cepheid> I can see one reason.
00:51 <Cepheid> It's a short-circuit.
00:51 <Schism> If 00 is hardcoded as nothing, then it won't pull up any more metadata.
00:52 <Cepheid> That is, if it encounters a 00 byte, it just skips processing of that cell.
00:52 <Schism> Yup.
00:52 <Cepheid> Which is probably why I can walk right through it.
00:52 *** Quits: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de) (Quit: Leaving.)
00:52 <Cepheid> Because it doesn't do any further processing.
00:52 * Schism nodnods.
00:52 <Schism> It's a pretty basic sounding hack.
00:52 <Cepheid> I labeled "1E" as "All-seeing eye." by the way.
00:52 <Cepheid> It's the last cell type they defined.
00:53 <Cepheid> It's used in stratum six for the wall-eyes.
00:53 * Schism is clearly tired, he was about to ask 'Only 31 definitions?'
00:54 <Cepheid> Nah.
00:54 <Cepheid> It's a byte, so up to 255. :P
00:54 <Cepheid> Probably 127, since Atlus seems to like using signed data.
00:54 <Schism> That's still up to 254. :P
00:54 <Schism> Oh wait.
00:54 <Schism> Yeah, I'm tired.
00:54 <Cepheid> Oh, it can still use all 256 entries.
00:55 * Schism facedesks. "A few things tonight on FFXIV and then I'll get a full night's sleep."
00:55 <Cepheid> It's just I imagine because the bytes are treated as signed, that if you try to use the signed byte to index an array, it'll index outside the array.
00:55 <Cepheid> That said..
00:55 <Schism> Signed zero and unsigned zero, I know.
00:55 <Cepheid> I did find something else that's fun.
00:55 <Schism> I think?
00:55 <Cepheid> Actually, we use two's complement these days, which solves that problem.
00:55 <Cepheid> You're thinking one's complement.
00:55 <Schism> Yeah, old programming funtimes.
00:56 <Cepheid> As for the fun bit..
00:56 <Cepheid> There's more than just the standard red, orange, black and golden colours for FOEs.
00:56 <Cepheid> I'm not sure if it indexes a common palette, but you can set other colours.
00:56 <Schism> That could be very useful in editing.
00:56 <Cepheid> Indeed.
00:56 <Cepheid> Specifying new FOE types.
00:57 <Cepheid> Especially since the behaviours of FOEs seem to utilize an assembly-like language.
00:57 <Cepheid> I was able to manipulate the bits of it to change the behaviours of some FOEs.
00:57 <Cepheid> Had one FOE walking through the walls.
00:58 <Schism> Noclip FOEs, how fun.
00:59 <Cepheid> Indeed.
00:59 <Cepheid> The simplest FOE I was able to get to do different things were the FOEs on the third floor.
00:59 <Schism> So you can get non-aggressive FOEs, random wanderers, instead of just your standard 'go after the player the moment they get into range' and 'patrol region'.
00:59 <Cepheid> I figured out their opcodes relatively quickly. Opcode 0F is "Aggro when player enters this box", Opcode 10 is "De-aggro when player leaves this box."
01:00 <Cepheid> That said, I don't know how the code is stored.
01:00 <Jackie> Is it possible to play Dwarf Fortress in a political level?
01:00 <Schism> Which leads to the fact that you don't know what limitations on those opcodes might be, or what space you're working in.
01:00 <Cepheid> I know FOE data is 240 bytes in size, and I've decoded a portion of the header.
01:00 <Cepheid> But I still don't know how large that header is, and where the code starts executing from.
01:01 <Schism> Based on patrolling data, it sounds like that's probably a very large chunk, at least.
01:02 <Cepheid> Each opcode is 4 bytes, the parameters can be smaller.
01:02 <Cepheid> For example, the 0F and 10 opcodes use four 2-byte parameters.
01:02 <Cepheid> Coordinates, in this case. Upper left and lower right corners of a box, inclusive.
01:03 <Schism> Assuming they're reusing a lot of code from EO1, and my immediate consideration is that ring of patrolling deer.
01:03 <Cepheid> It'd be interesting if the opcodes were associated with scripts, rather than executable code.
01:04 <Schism> Random cat moment. https://twitter.com/Felinar_MrLemur/status/1205495748160360448
01:05 <Cepheid> Interestingly, there's 276 AI scripts.
01:06 <Cepheid> There doesn't seem to be any script files that would indicate they're associated with FOEs, though.
01:06 <Cepheid> ... Ye know..
01:06 * Cepheid just tries the standard summation formula for filenames to see if they match the hashes at all.
01:08 <Cepheid> Strikes me as unlikely that it'll work, but I can't rule it out.
01:08 <Schism> It's quite plausible.
01:09 <Schism> Also, hee. Watching the 10+ cats navigate a great big sea of boxes.
01:09 <Cepheid> Close, not no cigar.
01:09 <Cepheid> Oh, wait. Wrong mod.
01:09 <Cepheid> Yeah, no.
01:09 <Cepheid> I love cats. I don't entirely know why.
01:09 <Cepheid> Maybe it's the parasite infestation.
01:10 <Schism> Probably. That, and cats don't give a crap, and they're adorable.
01:10 <Schism> Said box video: https://www.youtube.com/watch?v=cWf3vzHVXBc
01:11 <Cepheid> Yep. 10 cats. I know of them.
01:11 <Schism> I should think so! You showed me that ice ball video years ago.
01:13 <Cepheid> First, I should identify, PROPERLY, what kind of table this is..
01:13 <Cepheid> I know it's a hash table. Size, 2048 entries.
01:13 <Cepheid> It's definitely a separate chaining type, as well.
01:14 <Cepheid> Each entry stores an offset, a bit flag, and a size.
01:14 <Cepheid> The offset is 23 bits. The flag is 1 bit. The size is 24 bits, though I suspect there are flags in *THAT* too.
01:15 <Cepheid> If the flag is set to 0, then the offset is a direct offset into the archive file. If it's 1, then the offset is an offset into the index file that the table is a part of.
01:15 <Schism> That sounds like an odd way to run a railroad, but I guess it's a hack that works.
01:15 <Cepheid> The size, regardless of type, is always shifted left 2 bits, and has to be shifted right 2 bits to get the actual size.
01:15 <Cepheid> Even on entries where the offset is into the index table, the size is there, for a specific reason.
01:16 <Cepheid> When you go to the offset in the index file, you encounter what appears to be a list. The first byte is the number of entries. Then after that, you have the offset that would have been in the table. You associate that offset with the size from the table.
01:16 <Cepheid> Then after that, 3 unknown bytes. Followed by N - 1 entries, where N is the number of entries earlier read.
01:17 <Cepheid> Each entry is 11 bytes. 4 bytes offset, 4 bytes size, no shifting needed, then 3 bytes unknown.
01:17 <Cepheid> This is similar to what Wikipedia calls "Separate Chaining With List Head Cells."
01:17 *** Joins: Jackie2 (Jackie@Pony-vug.0ji.9.61.IP)
01:18 <Cepheid> Wherein the head of the list is stored in the table, and subsequent entries are stored in a list elsewhere.
01:18 *** Quits: Jackie (Jackie@Pony-vug.0ji.9.61.IP) (Connection closed)
01:18 <Cepheid> But not quite.
01:18 <Cepheid> So it's closer in line with "Separate Chaining With Other Structures" in Wikipedia's section on Hash Tables.
01:21 * Cepheid makes a C struct to replicate the layout of the data, to get a better idea of how it might look.
01:22 <Cepheid> ... Hmm, I think I know why the size is shifted.
01:27 * Ali flops over Cepheid and gwumps a bit that .18 isn't coming soon.
01:31 <Cepheid> Give it another month or two?
01:33 <Cepheid> Maximum file size in the archive is... 1,048,576 bytes. Or one megabyte.
01:34 <Cepheid> Meanwhile, maximum archive size is...
01:34 * Schism waits for something like '2 gigabytes'.
01:34 *** Joins: Jackie (Jackie@Pony-vug.0ji.9.61.IP)
01:34 <Cepheid> 135,266,302 bytes.
01:35 *** Quits: Jackie2 (Jackie@Pony-vug.0ji.9.61.IP) (Connection closed)
01:35 <Cepheid> Oh, wait. No.
01:35 <Cepheid> I forgot one details.
01:37 <Cepheid> 537,919,483 bytes. Which is approximately 512 megabytes.
01:37 <Cepheid> That said.
01:37 <Cepheid> The actual maximum is much lower.
01:37 <Cepheid> Unless...
01:38 * Cepheid goes and does a bit of ROM editing and testing with melonDS.
01:38 <Schism> Overengineering is one thing, but 256MB would be too much for a game as fine tuned as that.
01:39 <PinkieShy> Making homemade chocolate chip cookies :3
01:39 <Cepheid> Let's see... 512MiB = 524288KiB. Divide by 128...
01:39 <Cepheid> 4096.
01:39 <PinkieShy> Last time i did this.. They were so good that me and my dad ate them up in a day..
01:39 <Cepheid> Which is...
01:39 <Cepheid> 1 << 12.
01:39 <PinkieShy> 24 cookies in a day..
01:40 <PinkieShy> I mean i didn't eat 24 cookies exactly but rather close
01:40 <Cepheid> ROM without trimming is...
01:40 <Cepheid> 67,108,864 bytes.
01:41 <Cepheid> 512MiB in bytes is... 536,870,912. 536,870,912 - 67,108,864 = 469,762,048 bytes.
01:42 <Cepheid> Insert.. FF... 469,762,048 bytes.
01:44 <Cepheid> hell I can add any byte, really.
01:45 <Cepheid> Edit the header..
01:46 <Cepheid> Bah, there's a header checksum to calculate. Fine.
01:50 <Cepheid> There, all modified. Let's try loading it.
01:50 <Cepheid> ... After Okteta stops it's slow-ass saving.
01:50 <Jackie> Is it bad that I have full access to the MIDI standard?
01:51 <Cepheid> I need to write my own hex editor.
01:51 <Cepheid> No.
01:51 <Cepheid> Having access to data structure info is not bad, nor is it illegal.
01:51 <Jackie> I'm using it for very technical purposes
01:51 <Cepheid> Much as the various industries for media in the US might say otherwise.
01:52 <Jackie> Like audio stuff
01:52 <Cepheid> .. Well, this is promising. Hey, Schism.
01:54 <Cepheid> I expanded the ROM image I dumped to 512MiB, then modified the header, altered the checksum to fool the emulator into thinking the header is valid.
01:54 <Jackie> I'm making a MIDI backend that plays its messages as notes
01:54 <Cepheid> What do you think the result was?
02:04 <DerpyBot> New post on Equestria Daily by Calpain: Nightly Discussion #2009 [ http://tinyurl.com/uq7cjcc ]
02:08 *** Quits: Pony|76261 (Pony76261@Pony-i454b4.cable.virginm.net) (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
02:14 * Cepheid moves the image over to 3DS to test it's functionality.
02:16 *** Joins: roushguy (kacyr@Pony-7c9vk6.utnq.s4c9.1700.2600.IP)
02:21 *** Joins: ADragonDreaming (IceChat9@Pony-tpdjag.livnmi.sbcglobal.net)
02:26 *** Quits: ArchPegasusMichael (Poni@Keep.In.A.Friendly.And.Pony.Place) (Quit: Leaving)
02:26 *** Joins: ArchPegasusMichael (Poni@Keep.In.A.Friendly.And.Pony.Place)
02:31 <Cepheid> Hey ADragonDreaming.
02:34 *** Quits: Jackie (Jackie@Pony-vug.0ji.9.61.IP) (Ping timeout: 121 seconds)
02:45 *** Joins: Changeling_Nightmares (Surreal@Cutest.Floofy.Changeling.Batpone)
02:45 *** Quits: Changeling_Nightmares (Surreal@Cutest.Floofy.Changeling.Batpone) (Connection closed)
02:48 *** Quits: Filly_Nightmares (Surreal@Cutest.Floofy.Changeling.Batpone) (Ping timeout: 121 seconds)
02:51 *** Joins: Golden (uid250033@Pony-360sli.charlton.irccloud.com)
02:57 *** Quits: danwellby (danwellby@The.lone.griffon) (Connection closed)
02:57 <ADragonDreaming> hi
02:59 <Schism> wurp.
03:00 <Schism> I just filled out a bug report like I would have done my case notes.
03:00 <Cepheid> Heh.
03:00 <Schism> And that leads me to realize that I fill out my case notes like I would a bug report.
03:00 <Cepheid> Meanwhile, I tested the expanded NDS rom on my 3DS. First test, didn't work. It was a transfer issue.
03:00 <Cepheid> Fixed the transfer issue, ran again.
03:00 <Cepheid> Works like a charm. I loaded a 512MiB ROM.
03:01 <Schism> Well, the nDS firmware does definitely allow for that, though there are few cases where that actually -happens-...
03:01 <Schism> You could probably pull up anything on that, then.
03:02 * Schism pauses. "Did you just create a new HOMEBREW LAUNCHER?"
03:02 <Cepheid> No.
03:02 <Schism> Well, I'm glad for that. Did you just take the first step towards doing so?
03:02 <Cepheid> I used TWiLight++ Launcher, which allows launching of NDS and GBA games.
03:02 <Schism> Oh, okay.
03:02 <Cepheid> At least, ROM images.
03:03 <Cepheid> In any case, yeah, yer probably right. Probably wouldn't work on an actual DS, even with CFW.
03:04 <Schism> Eh, the homebrew community has figured out most of that. But I don't know. I've a DS Lite and an R4, and I think I'm going to have to get a backup instead of trying that monstrosity of yours.
03:04 <DerpyBot> New post on Equestria Daily by Makenshi: Album: Thrasher - Welcome To Insanity [Industrial Metal] [ http://tinyurl.com/vcwll8p ]
03:05 <Schism> I expect that it will spark twice, and then the ghost of Michael Scott will erupt from the machine, point a shaking finger at me, and shout in a wavy voice, "PROPRIETARY!"
03:05 <Schism> Well, I'd expect that to happen anyway.
03:08 * Cepheid thinks. This is a confusing and tricky problem.
03:08 <Cepheid> While I understand the structure of the hash table, there's problems with it that I cannot solve.
03:09 <Cepheid> Getting the proper index into the table is fine.
03:09 <Cepheid> There's all sorts of things that can be used as the key.
03:10 <Cepheid> No. The issue is much more complex than that. Once the index is obtained, if it turns out that the relevant bucket in the hash table is a list, how does it obtain the correct item after that point?
03:10 <Cepheid> That's probably what the 3 bytes are in each list entry.
03:11 <Cepheid> But those entries are not distinct throughout all the lists in the table.
03:11 <Cepheid> But they *ARE* distinct within the list.
03:11 <Cepheid> That is, no entry in a list will have the same 3 bytes.
03:12 <Schism> This is all assuming they used a simple hash. If they settled a complex one, then your efforts may be stalled at that.
03:12 <Schism> settled on*
03:12 <Cepheid> They would have used a simple one, for sake of performance and quickness.
03:13 <Cepheid> Plus, it's clear it's not uniformly balanced. There are zeroed entries in the table.
03:13 <Cepheid> Which means nothing was stored in those entries.
03:13 <Cepheid> The only clues I can reliably work with to figure out the hash function right now, are the entries in the hash tables that are NOT lists.
03:13 <Cepheid> Because whatever hashing I do to the relevant files in those locations, should come out to those indices, and there's no more work after that.
03:14 <Schism> Gods alive, Cepheid. You're not disassembling a game, you're performing low-level cryptanalysis.
03:15 <Cepheid> At this point, yeah.
03:15 <Cepheid> This part is basically cryptanalysis.
03:15 <Cepheid> Meanwhile, the rest is just simple decoding.
03:15 <Cepheid> See, it's one thing to modify the game, but I can't add data currently.
03:15 <Cepheid> So any changes have to be within the bounds of the file sizes of each file.
03:16 <Cepheid> In order to resolve this, I need to be able to re-pack the game files. For *THAT*, I need to figure out hash function, among other things.
03:16 <Cepheid> This is the most complex part of that.
03:16 <Cepheid> The simplest part is just packing all the files. The game's pretty straightforward there. Just one file after another.
03:17 <Cepheid> I know many critical bits. I just need to find the right configuration of tools that results in those critical bits.
03:18 <Schism> So... you're not looking for the explicit key which was used to encrypt anything, you're simply looking for the compression tools which-- HAVE YOU LOST YOUR BLOODY MIND?
03:18 <Cepheid> Like, for example, I know the size of the table. It's 2048 buckets/bins/etc. It's using separate chaining head list with a custom head structure.
03:18 <Cepheid> Possibly, Schism.
03:19 <Cepheid> My mind hasn't been working "right" for a while now. My OCD and enjoyment of this is overriding all desires to relax.
03:19 <Cepheid> You want something to blame? Blame the Vyvanse.
03:19 <Cepheid> It's because of that stuff that I am able to do this.
03:19 <Schism> You don't understand. Your mind's working just fine. Better than ever, like a tuned engine.
03:20 <Schism> I get that. But ... ugh. Well, you're probably on the right track. If Atlus didn't just do something proprietary to seal the deal.
03:20 <Cepheid> ...
03:20 <Cepheid> WHat was that? I just heard a beeping sound. Like a signal type beeping.
03:20 <Cepheid> Whatever it was, stopped now.
03:20 <Cepheid> Schism: So far, proprietary does seem to be the case with a lot of their files.
03:21 <Cepheid> They've whipped up their own file packing format. The files within follow Nintendo-known formats, though.
03:21 <Cepheid> They got archives within archives.
03:23 <Cepheid> Thing is, they aren't complicated.
03:23 <Cepheid> Not as much as this is.
03:23 <Schism> So that leads to the idea that the hash is probably something Nintendo cooked up anyway.
03:24 <Schism> Well, it's as reasonable an assumption as any, and most of yours have worked out.
03:24 <Cepheid> I'd normally agree, but it's not.
03:24 <Cepheid> The Target.bin, Target.idx, Target.ndx files are Atlus-proprietary.
03:24 <Cepheid> It's the idx file that I'm having problems with.
03:26 <Schism> Bin and NDX are kind of obvious. IDX...
03:27 <Cepheid> IDX = Index. BIN = Data archive. NDX = Name Index.
03:29 <Schism> And, by their nature, indices are much more difficult to diagnose, because they contain a lot of unrelated metadata, albeit in a comparatively orderly fashion.
03:29 <Schism> Ugh, I'm going to need to flop, I'm afraid.
03:34 <Schism> Assuming that the order of the indices wasn't randomly shuffled during compilation, could that be a clue?
03:34 * PinkieShy licks Schism
03:35 * Schism flails, "Okay, okay, to bed."
03:35 * PrincessRainbows sniffs PinkieShy
03:35 <Schism> Rest well, folks. PinkieShy, don't stay up too late
03:35 <PinkieShy> I'm not :P
03:35 * Schism then flops into bed.
03:36 <PinkieShy> I got church in the morning so.. ^_^
03:46 * Cepheid puts on NieR Automata - Goliath I.
04:03 * PrincessRainbows ponies around
04:06 * PrincessRainbows also horses a bit for good measure
04:10 * PinkieShy falls backwards near PrincessRainbows
04:11 * PrincessRainbows catches the small horse and licks a lot
04:40 * PrincessRainbows boops Ali's horn till it glows
04:40 * Ali 's horn is so very brused from all the PrincessRainbows boopings
04:41 <PrincessRainbows> Can horns bruise?
04:44 * Cepheid graghs.
04:46 * Ali ponyshrugs, just her poor horn gets booped so much.
05:03 * PrincessRainbows is sorry. Finds Ali adorable anyway
05:03 * Ali isn't adorable or cute or anything good looking.
05:05 <PrincessRainbows> Much cute
05:06 <PrincessRainbows> Magical too
05:09 <Ali> Cepheid, Tia is crying a lot despite me giving her attention. WHAT DOES THIS CAT WANT?
05:10 <Cepheid> You know, I kind of would like to hear what 'crying' in this case means.
05:11 <Cepheid> It'd help if I could hear the tone of it.
05:17 <Cepheid> ... Congratulations, Andrew. You found a string length function.
05:20 <Cepheid> Atlus, what in the ninety-nine and 3/4ths hells are you doing?
05:29 *** Quits: Stormspark (stormspark@Pony-25m.dcd.98.172.IP) (Quit: Leaving)
05:30 <Cepheid> Okay, starting to get what's going on.
05:31 <Cepheid> It's not Atlus, it's the compiler they used. It's optimizing, so I'm seeing some weird side effects as a result.
05:39 *** Joins: RazorSharpFang (RazorSharpF@Pony-m2g.u6s.63.203.IP)
05:49 <Cepheid> Hmm.
05:57 <Cepheid> ...
05:57 <Cepheid> I am being made extremely paranoid.
06:03 <ADragonDreaming> are there demons in tthe code?
06:03 <ADragonDreaming> digital devils?
06:30 <Cepheid> No.
06:30 <Cepheid> I just keep hearing all sorts of noises around me while wearing headphones.
06:30 <Cepheid> Also..
06:30 <Cepheid> I'm seeing a black shadow in my periphery a lot, to the right. It's not Spitfire.
06:32 *** Quits: PinkieShy (coolm@Pony-ck81je.67-212-45-net.sccoast.net) (Connection closed)
06:46 *** Quits: cabbage (cabbage@Pony-8q0glj.dynamic.sonic.net) (Connection closed)
06:57 *** roushguy is now known as Dranae
07:09 *** Joins: Crimson_Ta1l (zeta@batpones.are.for.snuggles)
07:09 *** Quits: Crimson_Tail (zeta@batpones.are.for.snuggles) (Ping timeout: 121 seconds)
07:41 <Cepheid> ... The hell is this function? It looks like a hash function.
07:51 <Cepheid> ...
07:51 * Cepheid flops back into a chair.
07:51 <Cepheid> I found it.
07:58 *** Joins: ConfusionRift (ConfusionRi@Pony-s47.irn.56.193.IP)
07:58 *** ChanServ sets mode: +o ConfusionRift
07:58 <ConfusionRift> Hello everypony.
08:01 <Cepheid> Hey Rifty.
08:01 * ConfusionRift waves.
08:02 <Cepheid> How goes it?
08:03 <ConfusionRift> Doing okay, just laying back at the time. Pain. The pain. I mean, doing alright.
08:06 <Cepheid> Oh?
08:06 <ConfusionRift> Christmas rush.
08:06 <Cepheid> Oof.
08:10 * ConfusionRift watches this kid unbox some animals he received for rehoming. "Oh, that's ni-" He stacks the boxes on the table, all wobbly. His anxiety kicks in. 0_0;
08:11 * Golden is running on one hour of sleep. So he apologizes if he says anything weird.
08:12 <Cepheid> So, I figured out one of the many unknowns that was exceedingly complex.
08:12 <ConfusionRift> Heh, kinda used to it at this point. :P
08:12 <Cepheid> I was right. The table in the Target.idx Index file is, in fact, a hash table.
08:12 <Cepheid> Problem is, the hash function was unknown. And it wasn't a common function, either.
08:12 <Golden> Me or what Ceph said?
08:12 <Cepheid> ... I figured out the function. o3o;
08:13 <ConfusionRift> Eeerm... yes. :P
08:13 <Cepheid> Presumably you, Golden.
08:13 <ConfusionRift> ^
08:13 <Golden> Okay. Want to hear one of my weird ramblings?
08:14 <ConfusionRift> Eeerm... I guess. As long as it's PG and doesn't get ultimate weird.
08:15 <ConfusionRift> Cepheid: You really have been stripping this to bare bones. :P
08:15 <Golden> ...it will be pushing pg in my eyes. All bones are technically wet. Can that be seen as pg? I don't know. My mind is well gone at this point.
08:16 <Cepheid> Indeed.
08:16 <Cepheid> This function though, I need it.
08:17 <Cepheid> If I want to be able to make additions or subtractions, I need to be able to re-pack the game's files.
08:17 <Cepheid> And this function is one of the keys.
08:17 <ConfusionRift> Golden: The threshold is pretty big. But I'll let you know if it might be a good idea to switch topic. :P
08:18 <Golden> Okay well the whole bones thing was something I weirded out my friends with. I'd rather not push my luck over here.
08:18 <Cepheid> ... That means this needlessly complex function is the function to read the index table and it's lists.
08:19 <ConfusionRift> Wait. So... I know you're planning on basically modding this thing to death, but... you plan on changing core functions too? I mean, duh. But I'm sure- oh wait never mind. For basically debugging.
08:22 <Cepheid> Not going that far, as modifying the game code itself, but... any of the data the game uses?
08:22 <Cepheid> Yes.
08:22 <Cepheid> Adding to it, removing, etc.
08:22 <Cepheid> So long as it falls in line with what the game expects, it shouldn't break
08:22 <Cepheid> The problem is re-packing everything is the final step. And it's the most complex.
08:23 <ConfusionRift> Golden: And that's fine. I f you think it's a no-no, then it might be. (shrugs)
08:23 <Cepheid> Hell, I already confirmed that I can expand the DS ROM image to handle upwards of 480MiB or so of extra data.
08:24 <Cepheid> I hacked the header of the rom, changed it's reported size, updated the header checksum, then expanded the rom to match the reported size, filling the extra data with 0s, and then loaded it onto my 3DS and ran it.
08:24 <Cepheid> The NDS bootloader didn't complain.
08:24 <Cepheid> Nor did the game.
08:24 * Ali flops into ConfusionRift and Cepheid
08:24 <ConfusionRift> Eeeerm... 480MiB? How big is the game itself unpacked? It can't be reaching anywhere near 500 for sure.
08:25 * ConfusionRift patpats Ali.
08:25 * Ali leans into the pats so much.
08:25 <Cepheid> ConfusionRift: About 34 or so megabytes, trimmed down to minimum size.
08:26 <Cepheid> I calculated that a little over 512 is the absolute maximum the game's code is designed to handle, though.
08:27 <Cepheid> To use the full 512MiB the game is capable of using though, you'd need a 1GiB rom file.
08:27 <Cepheid> Because the index and name tables themselves would take up a lot of space.
08:27 <ConfusionRift> Hmm, which game was it? I know it's Etrian Odyssey, but don't remember which.
08:27 <Cepheid> Etrian Odyssey 3.
08:28 * ConfusionRift checks... almost pukes oil.
08:29 <Cepheid> What?
08:30 <Cepheid> I even found the function that decompresses the compressed files within the archive.
08:30 <ConfusionRift> The game is not even 10% of the size of that. Yeah, I can see what you mean. Gonna be choking looking through that mess.
08:31 <Cepheid> You misunderstand.
08:31 <Cepheid> I expanded the ROM.
08:31 <Cepheid> From ~34MiB to 512MiB.
08:31 <Cepheid> And made it so that the NDS bootloader would blissfully load it without issue.
08:32 <ConfusionRift> Oh, yeah, kinda misunderstood the thing.
08:32 <Cepheid> I made the ROM go from ~34MiB in size to 512MiB.
08:32 <Cepheid> Giving me that much extra storage. :P
08:33 <Cepheid> I... just need to figure out how to pack data back into that space, now.
08:33 <Cepheid> Part of that was figuring out a hash table.
08:34 <ConfusionRift> Still, that's pretty crazy. Now... surely you have been running this tests through emulation. I wonder how it fair via hardware. Then again, you expanded the rom space, but there's not much referencing those tables, since there aren't assets in that space.
08:35 *** Quits: Dranae (kacyr@I.Will.Fly.Higher) (Ping timeout: 121 seconds)
08:35 <Cepheid> Yes, it runs in emulation. And yes, it runs on hardware.
08:35 <Cepheid> I tested it on my 3DS.
08:35 <Cepheid> The 3DS ran it just fine.
08:35 <Cepheid> Neither the bootloader or the game complained.
08:36 <ConfusionRift> Hmmm.
08:36 <Cepheid> If anything, the emulator complained the most, because it has a database of gamecodes and known rom sizes, and the size it had in it's database didn't match what was reported by the rom.
08:38 <Cepheid> Let's see...... R1 has the address of the string being processed, R0 is loaded with the address of a 20-byte stack-allocated buffer..
08:40 <Cepheid> The buffer is initialized by a separate function, that sets it to read... [ FF FF FF FF 00 00 00 00 00 00 00 00 00 00 ] which is... only 14 bytes?
08:45 <Cepheid> ... And then immediately zeroed out completely.
08:45 <Cepheid> This other function must be called from elsewhere.
08:45 <Cepheid> ... Yeah, it is.
08:50 *** Joins: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de)
08:53 <Cepheid> Pointer one is copied to temporary one. Pointer two is then assigned to pointer one. Pointer two is assigned the value of temporary one + 8. Temporary two is assigned the value of temporary one + 4. Then a 4-byte 0 is written to the address held by temporary one, then a 1-byte 0 is written to the address (temporary one + 12) and then (temporary one + 13). Officially, this only changes the first 4 bytes of the above.
08:54 <Cepheid> Then the next function is called with the file path as the first parameter, temporary + 8 as the second parameter, and temporary +4 as the third...
08:56 <Cepheid> It's clear that the above data is some sort of structure, then.
09:09 * Cepheid psyducks.
09:10 <ConfusionRift> 0_0;
09:10 * ConfusionRift gets a trash can lid, and uses it as a shield.
09:27 <Cepheid> Ghidra, that's a wierd-butt way to express "checking the most significant bit."
09:27 <Cepheid> Or, rather, least significant bit here.
09:34 <Cepheid> Right, if the least significant bit is zero, it shifts the bytes around to extract the actual file offset. This function just reads the index table data.
09:46 *** Quits: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de) (Quit: Leaving.)
09:59 <Cepheid> There's the size calc..
10:00 <Cepheid> Hmm. Here we are, this is what I seek.
10:04 *** Joins: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de)
10:08 *** Quits: coppertiger (coppertiger@Pony-u7oomq.md.comcast.net) (Quit: Leaving)
10:08 <Cepheid> ...
10:08 <Cepheid> Atlus, you are kidding me with this madness.
10:10 <Cepheid> Those 3 unknown bytes in each list entry.
10:10 <Cepheid> First byte is a character from the full file path, in lowercase. Second byte is the index into the full file path of a character to extract.
10:11 <Cepheid> You take that character from the full file path, and do some transformations on it(If it's a backslash, make it a slash, then make it lowercase), and then compare it to the first byte.
10:11 <Cepheid> If it matches, you've got the file you're looking for.
10:11 <Cepheid> Unless..
10:11 <Cepheid> The third byte is not zero.
10:12 <Cepheid> In which case, you repeat the process, using bytes 3 and 4, and so on, and so on, until you hit a zero.
10:12 <Cepheid> Or the characters don't match up.
10:12 <Cepheid> If they all match, you got the file you want.
10:13 <Cepheid> I wish I was kidding about this. I'm not.
10:14 * Cepheid psyducks so hard that rather than grow to that new gigantic size, he shrinks to 1/10th his size.
10:15 <Cepheid> All this means in the end?
10:15 <Cepheid> I can now re-pack the files.
10:15 <Cepheid> I can make the game larger or smaller.
10:16 <Cepheid> Hell, if I wanted to, I could now do an open-source re-implementation.
10:17 <Cepheid> I have fully decoded the core of Atlus' file formats. Aside from having to decode all the resources in the archive, there is nothing stopping me now.
10:18 *** Quits: Ali (Ali@Pony-ucvh45.4nua.5fca.1702.2600.IP) (Quit: Leaving)
10:31 *** Quits: Golden (uid250033@Pony-360sli.charlton.irccloud.com) (Quit: Connection closed for inactivity)
10:32 <Cepheid> ... Oh... OH OH OH! I know what I can do now!
10:37 <Cepheid> Lookit that, all 7 files simply do not exist in the index. Their entries have been removed.
10:42 <Cepheid> Now I can write a proper extraction tool. One that doesn't assume seven files are missing.
10:46 * Cepheid noms some pie, then some rasberries, and consumes a tall glass of orange juice.
10:55 <ConfusionRift> Nice.
10:55 * ConfusionRift just flops. "Honestly don't feel like doing much."
10:57 <Cepheid> A part of me wants to relax. The other part wants me to keep working.
10:57 <Cepheid> Can't stop. Won't stop. Not until I have drained myself of all mental energy.
11:01 <Cepheid> Kind of unfortunate. I want to play games. Particularly, I want to finish EO3's story, and play NieR: Automata.
11:01 <Cepheid> Music of the latter is... interesting.
11:04 <DerpyBot> New post on Equestria Daily by Calpain: Morning Discussion #1782 [ http://tinyurl.com/wx8yua5 ]
11:04 <ConfusionRift> It really is, and do like it a lot. :P
11:05 <Cepheid> I've been listening to some of the tracks. In particular, Bipolar Nightmare.
11:08 <ConfusionRift> Seems to always fall for mechanized tracks, like Wretched Weaponry.
11:09 <ConfusionRift> Which reminds me a lot of Wretched Automatons from Gestalt & Replicant.
11:10 <ConfusionRift> Not saying the rest of the tracks aren't good, because they really are. :P
11:16 <ConfusionRift> And then there's Amusement Park, which hits me on a soft spot for some reason. I suppose it's the area's visuals, and how it progressively gets more lively.
11:16 <ConfusionRift> Then again, all tracks do in the game, depending on the event and area.
11:27 <Cepheid> Heh.
11:54 <Cepheid> Okay, no. I need to stop this, and go take a shower.
11:54 * Cepheid closes laptop and immediately goes to shower, before he- OOH SHINEY CODE!
11:56 <ConfusionRift> ...
11:56 <ConfusionRift> You can always come back to it later, man. :P
12:04 <DerpyBot> New post on Equestria Daily by Sethisto: Pony Plushie Compilation #366 [ http://tinyurl.com/ul2xg4d ]
12:08 <Cepheid> Indeed, indeed.
12:09 <Cepheid> As it is, there's only one remaining detail about the packing-unpacking system that I'll never be able to figure out, no matter how hard I try.
12:09 <Cepheid> That said, it's moot. I don't need the detail.
12:10 <Cepheid> Essentially, the issue is that I don't know how they pick the letter that needs to be checked in the first place. Buuuuut, as long as the letter, within the list, is distinct, it's irrelevant.
12:11 <Cepheid> That is, I don't have two entries in a given list with the letter "i" as their matching letter. One would have to be "i" and the other would have to be some other letter specific to that entry.
12:12 <Cepheid> In truth, it just has to be a distinct character, period. So, when putting an entry into the list, just pick a letter from the entry. If it matches the character of any entries in the list, then I pick a different character.
12:12 <Cepheid> Repeat until I find a distinct one.
12:13 <Cepheid> Can't find one? Well I'm ****ed.
12:13 <Cepheid> There doesn't actually seem to be a contingency for that case, either.
12:13 <Cepheid> ... Actually, wait, no there is.
12:14 <Cepheid> The code can match multiple letters, if need be.
12:15 <Cepheid> Gotta admit, crazy as it looks, it's actually pretty ingenious.
12:32 <ConfusionRift> Blarg. Gonna call it a day, sleep for work. Laters!
12:32 *** Quits: ConfusionRift (ConfusionRi@Pony-s47.irn.56.193.IP) (Quit: Recharging the batteries. Laters! *shutdown*)
12:43 *** Joins: danwellby (danwellby@The.lone.griffon)
13:58 <Cepheid> Schism, if you happen to see my mind, please direct it back to my bed.
14:05 *** Joins: Stormspark (stormspark@Pony-25m.dcd.98.172.IP)
14:12 *** Joins: darkdoomer (kayanamasha@nowhere.eq)
14:33 <RazorSharpFang> I made roast pork, for sandwich material.
14:33 <RazorSharpFang> I don't know what I'll do with the lard from it though.
14:35 <RazorSharpFang> I could make candles or soap out of it, or just burn it.
14:49 <RazorSharpFang> Turns out that a little ad-hoc candle of 85g of lard will burn quite hot for literally hours.
14:50 *** Quits: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de) (Quit: Leaving.)
15:08 *** Joins: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de)
15:27 *** Quits: RazorSharpFang (RazorSharpF@Pony-m2g.u6s.63.203.IP) (Connection closed)
15:48 *** Joins: Crimson_Tail (zeta@batpones.are.for.snuggles)
15:50 *** Quits: Crimson_Ta1l (zeta@batpones.are.for.snuggles) (Ping timeout: 121 seconds)
15:50 *** Joins: cabbage (cabbage@Pony-8q0glj.dynamic.sonic.net)
15:58 *** Joins: Crimson_Ta1l (zeta@batpones.are.for.snuggles)
15:58 *** Quits: Crimson_Tail (zeta@batpones.are.for.snuggles) (Ping timeout: 121 seconds)
16:02 *** Crimson_Ta1l is now known as Crimson_Tail
16:04 *** Quits: Taoki (MirceaKitsu@Pony-7ul.gjo.113.93.IP) (Quit: http://www.furaffinity.net/user/mircea/)
16:05 *** Joins: Taoki (MirceaKitsu@Pony-7ul.gjo.113.93.IP)
16:17 *** Quits: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de) (Quit: Leaving.)
16:38 *** Quits: Crimson_Tail (zeta@batpones.are.for.snuggles) (Quit: Reboot)
16:44 *** Joins: Crimson_Tail (zeta@batpones.are.for.snuggles)
17:04 <DerpyBot> New post on Equestria Daily by Makenshi: Hearth's Warming Special Remix: Daniel Ingram - The True Gift of Gifting (Foozogz XMasMix) [Breakbeat] [ http://tinyurl.com/vv5t4xz ]
17:09 *** Joins: Fn (Eogan@Pony-lu8u66.dip0.t-ipconnect.de)
17:12 *** Quits: FruitNibbler (Eogan@Pony-mrb52p.dip0.t-ipconnect.de) (Ping timeout: 121 seconds)
18:01 *** Joins: coppertiger (coppertiger@Pony-u7oomq.md.comcast.net)
18:04 <DerpyBot> New post on Equestria Daily by Sethisto: Fanfiction: Storefronts [ http://tinyurl.com/r95zhdt ]
18:07 *** Quits: coppertiger (coppertiger@Pony-u7oomq.md.comcast.net) (Quit: Leaving)
18:12 *** Joins: coppertiger (coppertiger@Pony-u7oomq.md.comcast.net)
18:15 *** Joins: Dranae (kacyr@I.Will.Fly.Higher)
18:45 * PrincessRainbows ponies a little
19:04 <DerpyBot> New post on Equestria Daily by Penny Wrights: Equestria Daily: All The World's Off Stage Follow Up [ http://tinyurl.com/vjb6fjh ]
19:10 *** Joins: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de)
19:27 <danwellby> huh pop is airing rainbow roadtrip
19:28 <danwellby> tiny pop even
19:47 *** Joins: Ali (Ali@Pony-cvibue.iplsin.sbcglobal.net)
19:47 *** ChanServ sets mode: +qo Ali Ali
19:52 *** Joins: Pony|89519 (Pony89519@Pony-cui.i0m.161.101.IP)
19:52 *** Quits: Pony|89519 (Pony89519@Pony-cui.i0m.161.101.IP) (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20:00 * PrincessRainbows kicks at her collar and boops the Ali
20:00 * Ali boops the PrincessRainbows back and flops over her.
20:00 * PrincessRainbows goes splat and barks
20:03 * Ali scritchies PrincessRainbows's ears and wings
20:04 * PrincessRainbows is good birb horse
20:04 <DerpyBot> New post on Equestria Daily by Sethisto: Your Little Cat 3 [ http://tinyurl.com/t5bf4yl ]
20:28 *** Quits: matttheshadowman (matthewhowa@the.shadowy.corners) (Client exited)
20:32 * Starlight_Glimmer curls up in Ali's lap
20:33 * Ali nuzzles into Starlight_Glimmer
20:36 *** Quits: darkdoomer (kayanamasha@nowhere.eq) (Connection closed)
20:36 *** Joins: darkdoomer (kayanamasha@nowhere.eq)
20:36 *** Quits: darkdoomer (kayanamasha@nowhere.eq) (Connection closed)
20:52 *** Joins: matttheshadowman (matthewhowa@Pony-r5i.0ec.238.89.IP)
21:04 <DerpyBot> New post on Equestria Daily by Sethisto: Drawfriend Stuff (Pony Art Gallery) #3191 [ http://tinyurl.com/v4d5wna ]
21:12 *** Quits: RyuImperator (RyuImperato@Pony-trb5lu.dip0.t-ipconnect.de) (Quit: Leaving.)
22:11 <Schism> Sigh. Sick.
22:15 * PrincessRainbows boops Ali with her tennis ball
22:22 <Schism> For your consideration, a soccer-playing deer. https://twitter.com/travisakers/status/1205850298633400320
22:26 <Schism> You know. At some point, I should probably buy a bread machine. And get rid of some of the other crap in the apartment, heh.
22:27 <Schism> Also, how I feel right now: https://twitter.com/hourlywolvesbot/status/1206288164979138561
22:56 *** Quits: Dranae (kacyr@I.Will.Fly.Higher) (Ping timeout: 121 seconds)
22:59 *** Joins: PinkieShy (coolm@Pony-ck81je.67-212-45-net.sccoast.net)
23:04 * PrincessRainbows also boops PinkieShy with a random horse
23:05 * PinkieShy blushes
23:07 * PrincessRainbows picks him up and pets
23:07 * PinkieShy meows
23:07 * PinkieShy licks PrincessRainbows
23:08 <PrincessRainbows> such a good horse
23:26 *** Quits: danwellby (danwellby@The.lone.griffon) (Connection closed)
23:50 *** Quits: heftig (heftig@quassel.archlinux.org) (Client exited)
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!