Post Aoh5ackfCB8PMcs8Rc by foone@digipres.club
 (DIR) More posts by foone@digipres.club
 (DIR) Post #AoOX24uQJ14fSrl7YG by foone@digipres.club
       2024-11-25T07:50:32Z
       
       2 likes, 0 repeats
       
       Bad idea: build a captcha library that embeds DOSBox so it can make you beat levels/puzzles from DOS games to continue.Prove you're a human! Beat Lifewater Oasis from Commander Keen 4! Defeat the Yeti in Kings Quest 5! Make sure 15 lemmings survive! Get the sword in Prince of Persia!
       
 (DIR) Post #AoOX4ljY3WbUrUxIHo by foone@digipres.club
       2024-11-25T07:50:53Z
       
       1 likes, 0 repeats
       
       Honestly just making it do The Incredible Machine puzzles would be hilarious
       
 (DIR) Post #AoOX7QoYI1e8qnZ7Ue by foone@digipres.club
       2024-11-25T07:51:09Z
       
       0 likes, 0 repeats
       
       Same form lemmings... God, is it just all puzzle games?
       
 (DIR) Post #AoOXB1NenHdT7xhI24 by SonnyBonds@mastodon.gamedev.place
       2024-11-25T07:52:10Z
       
       0 likes, 0 repeats
       
       @foone "Get anywhere at all in Zaxxon"
       
 (DIR) Post #AoOXDezYUVnoYhgMEa by foone@digipres.club
       2024-11-25T07:52:11Z
       
       0 likes, 0 repeats
       
       I have thought about adapting Simon Tatham's puzzle collection to a captcha. Like it just gives you a puzzle with no instructions.
       
 (DIR) Post #AoOXQrII3ypWTgjs0G by cr1901@mastodon.social
       2024-11-25T07:55:05Z
       
       0 likes, 0 repeats
       
       @foone I like his game that has dense graphs that you have to untangle so none of the edges intersect :D:https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/untangle.html#10:0-4,0-7,0-8,0-9,1-7,1-8,2-5,2-6,2-9,3-4,3-6,4-5,4-8,5-6,5-9,7-8,7-9
       
 (DIR) Post #AoOXWy5zghBnJIttxI by foone@digipres.club
       2024-11-25T07:56:06Z
       
       0 likes, 0 repeats
       
       !Where in the world is Carmen Sandiego!You catch the culprit of the current case, using the clues and your geographic knowledge and Encyclopedia!
       
 (DIR) Post #AoOXZjP2lt24bu81tA by foone@digipres.club
       2024-11-25T07:56:32Z
       
       0 likes, 0 repeats
       
       Oregon Trail would also be funny.To prove you are a human, get to Oregon.
       
 (DIR) Post #AoOXcQQDnaCebuxpPU by foone@digipres.club
       2024-11-25T07:57:07Z
       
       0 likes, 0 repeats
       
       We use geo-ip to automatically allow anyone showing up as accessing the site from the state of Oregon, of course.
       
 (DIR) Post #AoOXevwrYTPYy2QaJ6 by foone@digipres.club
       2024-11-25T07:57:33Z
       
       0 likes, 0 repeats
       
       (that is only one slight degree sillier than something I have done professionally for a website)
       
 (DIR) Post #AoOXkdiEGk2w9AIte4 by foone@digipres.club
       2024-11-25T07:58:42Z
       
       0 likes, 0 repeats
       
       Chip's Challenge levels would also be funny.
       
 (DIR) Post #AoOXn5ahaWLDBpx212 by cr1901@mastodon.social
       2024-11-25T07:58:59Z
       
       0 likes, 0 repeats
       
       @foone Make them play a game of "Where in North Dakota is Carmen Sandiego" instead :D
       
 (DIR) Post #AoOXyMTR9srajivbEm by foone@digipres.club
       2024-11-25T08:01:07Z
       
       1 likes, 0 repeats
       
       The edutainment puzzles from the doors in Super Solvers: Gizmos and Gadgets!
       
 (DIR) Post #AoOY1cEX1MxuTzVY36 by Osmose@digipres.club
       2024-11-25T08:01:15Z
       
       0 likes, 0 repeats
       
       @foone brb adding an error handler that says BUMMER whenever the API returns a 401
       
 (DIR) Post #AoOY4H4e9E69j79U36 by foone@digipres.club
       2024-11-25T08:01:36Z
       
       0 likes, 0 repeats
       
       You know, I was just thinking yesterday I should reverse engineer that game, but I don't really have a reason to.Now I do.
       
 (DIR) Post #AoOYAAncODwq0I03Jw by foone@digipres.club
       2024-11-25T08:03:17Z
       
       0 likes, 0 repeats
       
       "have a population of at least 20,000 within 5 years in this game of SimCity 2000"
       
 (DIR) Post #AoOYIwptfr0RItFYOm by vger@fidget.place
       2024-11-25T08:04:50Z
       
       0 likes, 0 repeats
       
       @foone Solving captchas would be everything I'd do all day.
       
 (DIR) Post #AoOYUp5yHPBMlsQmdU by attie@chaos.social
       2024-11-25T08:06:57Z
       
       0 likes, 0 repeats
       
       @foone I had this as a kiddo, and nobody I've ever mentioned it to, has heard of it! 🤓
       
 (DIR) Post #AoOYZFIsmQJfDGZxnk by foone@digipres.club
       2024-11-25T08:07:48Z
       
       0 likes, 0 repeats
       
       Just throwing surfers randomly in point and click adventures and then telling them to find an item would also be funny.Do you know where to get the Cloaking Belt in Space Quest 3? How about the box of electronic bunnies in Full Throttle?Where's the Old Book on Hugo 3: Jungle of Doom?
       
 (DIR) Post #AoOYyldThsmsjGNkXY by lunarloony@dosgame.club
       2024-11-25T08:12:22Z
       
       0 likes, 0 repeats
       
       @foone Oh, I'd be snookered in that case
       
 (DIR) Post #AoOZ2x07ORn58TxzHs by lunarloony@dosgame.club
       2024-11-25T08:13:10Z
       
       0 likes, 0 repeats
       
       @foone Would Lode Runner levels be a bit too actiony?
       
 (DIR) Post #AoOZ92i74tzOa6Rwhc by barubary@infosec.exchange
       2024-11-25T08:14:15Z
       
       0 likes, 0 repeats
       
       @foone Beat Super Metroid in under 3 hours.
       
 (DIR) Post #AoOZGsRF9ZGf2WIKsi by gryzor@androiddev.social
       2024-11-25T08:15:41Z
       
       0 likes, 0 repeats
       
       @foone how about an incredible machine *with* lemmings?
       
 (DIR) Post #AoOZL4SeOYsfUAx8Ai by foone@digipres.club
       2024-11-25T08:16:28Z
       
       0 likes, 0 repeats
       
       @gryzor madness!
       
 (DIR) Post #AoOZmcKYZrGoLgImga by globalc@chaos.social
       2024-11-25T08:21:23Z
       
       0 likes, 0 repeats
       
       @foone "I finished 'Secret of Monkey Island' just so I could prove to be human and open a new email account.."
       
 (DIR) Post #AoOZt7JtP7bw22DSXQ by bytex64@awesome.garden
       2024-11-25T08:22:15Z
       
       0 likes, 0 repeats
       
       @foone Ah fuck.
       
 (DIR) Post #AoOZthxrA0y7gPBspM by itec@chaos.social
       2024-11-25T08:21:58Z
       
       0 likes, 0 repeats
       
       @foone something like doom captcha?https://vivirenremoto.github.io/doomcaptcha/
       
 (DIR) Post #AoOZwzv4rNxWErSXom by simonzerafa@infosec.exchange
       2024-11-25T08:23:19Z
       
       0 likes, 0 repeats
       
       @foone Unless there is a significant random element in those levels then it would be possible to design an algorithm to bet them. "AI" wins 😕🤷‍♂️
       
 (DIR) Post #AoOa2uQGD8NCvYrcEi by foone@digipres.club
       2024-11-25T08:24:15Z
       
       0 likes, 0 repeats
       
       @itec yes but running the actual game
       
 (DIR) Post #AoOaE4ZOp6rFaISgYS by lritter@mastodon.gamedev.place
       2024-11-25T08:26:22Z
       
       0 likes, 0 repeats
       
       @foone warioware but as captcha
       
 (DIR) Post #AoOaIrpHdF2HVZB42y by RonanLK@piaille.fr
       2024-11-25T08:27:13Z
       
       0 likes, 0 repeats
       
       @foone get out of the cave labyrinth in Kyrandia before you run out of fire berries.
       
 (DIR) Post #AoOaMWKdUOOs0FaIIC by foone@digipres.club
       2024-11-25T08:27:31Z
       
       0 likes, 0 repeats
       
       @lritter that'd be fun! significantly more likely to get your ass sued off, sadly.
       
 (DIR) Post #AoOaOAl4fc9ffmjqfA by bayindirh@mastodon.sdf.org
       2024-11-25T08:27:12Z
       
       0 likes, 0 repeats
       
       @foone I would refresh the page with all kind of funny headers and user agents to get Full Throttle puzzles. :D
       
 (DIR) Post #AoOaRwlscDq1S2unPE by lritter@mastodon.gamedev.place
       2024-11-25T08:28:49Z
       
       0 likes, 0 repeats
       
       @foone if you use that name, sure
       
 (DIR) Post #AoOaaDxeaV4V57MwTo by damianogerli@mastodon.social
       2024-11-25T08:30:25Z
       
       0 likes, 0 repeats
       
       @foone finish the desert in KQV without dying of thirst
       
 (DIR) Post #AoOas8MW8wVEvfXTLE by foone@digipres.club
       2024-11-25T08:33:37Z
       
       0 likes, 0 repeats
       
       Seems Gizmos and Gadgets is a 16-bit EXE compiled with Borland Turbo C++ (no floating point support)
       
 (DIR) Post #AoOb0suGyZYDbJV5Ci by foone@digipres.club
       2024-11-25T08:35:13Z
       
       0 likes, 0 repeats
       
       oh goody my favorite, OVERLAYS! as if segmented code wasn't enough of a pain, where you don't know where a pointer points to unless you see how it's used, now you don't know what code is CURRENTLY loaded at that position, because it changes!
       
 (DIR) Post #AoOb45YAQN6vgNgjsO by gh@mastodon.me.uk
       2024-11-25T08:35:45Z
       
       0 likes, 0 repeats
       
       @foone Or for the non-gamers: “Edit these CONFIG.SYS and AUTOEXEC.BAT files so that you have both CD-ROM access and mouse driver working, while also having 600KB of available conventional memory.”We’d need anti-cheat to prevent the use of MEMMAKER though…
       
 (DIR) Post #AoOb7fvvbo1fOMVqjY by foone@digipres.club
       2024-11-25T08:36:27Z
       
       0 likes, 0 repeats
       
       step up: find the fade out.see the game fades out when you go into a door. find where that code is, then see what gets called next. finding a fade out should be easy: look for when they reprogram the VGA palette registers to dim every color to black.
       
 (DIR) Post #AoObAY6NBO93yIlhj6 by mikaeleiman@mastodon.sdf.org
       2024-11-25T08:36:23Z
       
       0 likes, 0 repeats
       
       @foone *flashbacks from 8051 assembly programming*
       
 (DIR) Post #AoObGyiP9D3GFVchGK by tobyjaffey@mastodon.me.uk
       2024-11-25T08:38:04Z
       
       0 likes, 0 repeats
       
       @foone I assume the test of being human is whether you abandon the boring task you were trying to do for and just play Commander Keen all day
       
 (DIR) Post #AoObKs69guFQsxaZF2 by foone@digipres.club
       2024-11-25T08:38:49Z
       
       0 likes, 0 repeats
       
       @gh oh that'd be fun.
       
 (DIR) Post #AoObT6S6CuplihmIFc by foone@digipres.club
       2024-11-25T08:40:17Z
       
       0 likes, 0 repeats
       
       found 5 places the palette is reprogrammedand all are in overlays. ugh.
       
 (DIR) Post #AoObWyCooFDNIoTTkm by foone@digipres.club
       2024-11-25T08:41:00Z
       
       0 likes, 0 repeats
       
       OKAY realistically this is a game that features several different games you can play, and games between games. they're just gonna make each one a separate overlay. so I need to figure out how it shifts overlays and how to track which overlay is active
       
 (DIR) Post #AoObtQdtlLyhrtqlDk by foone@digipres.club
       2024-11-25T08:44:54Z
       
       0 likes, 0 repeats
       
       looks like the separate game engines are called puzzler, electric, and simple.
       
 (DIR) Post #AoObwGueOVxEYp2clc by foone@digipres.club
       2024-11-25T08:45:18Z
       
       0 likes, 0 repeats
       
       I love when games use __FILE__ in their assertions. please tell me all your filenames please
       
 (DIR) Post #AoObzZscKb8SFsfOYi by tnt@chaos.social
       2024-11-25T08:46:10Z
       
       0 likes, 0 repeats
       
       @foone I'm pretty sure a computer would be better at playing PoP than me 😅   I think when I was a kid I just played the first level over and over ...
       
 (DIR) Post #AoOcaoLql6ET9l1cI4 by foone@digipres.club
       2024-11-25T08:52:56Z
       
       0 likes, 0 repeats
       
       can I not set an I/O breakpoint in dosbox-x's debugger? I forget.
       
 (DIR) Post #AoOcmmmmPCenm9KbHU by exec@furry.engineer
       2024-11-25T08:55:01Z
       
       0 likes, 0 repeats
       
       @foone How about WarioWare minigames instead? Takes less than 10 seconds and should be intuitive
       
 (DIR) Post #AoOdI9EJ0dlYMTA252 by enno@mastodon.gamedev.place
       2024-11-25T09:00:34Z
       
       0 likes, 0 repeats
       
       @foone some of these could probably do double duty as age verification challenges .
       
 (DIR) Post #AoOdPirF1yA8lNX4Ua by foone@digipres.club
       2024-11-25T09:02:03Z
       
       0 likes, 0 repeats
       
       @enno meanbut yeah, clearly.
       
 (DIR) Post #AoOdvkcOhjlfleixKy by foone@digipres.club
       2024-11-25T09:07:51Z
       
       0 likes, 0 repeats
       
       oh sweet laser jesus I found the upload palette function and THEY UNROLLED IT
       
 (DIR) Post #AoOe4XfQE516CrKZDU by foone@digipres.club
       2024-11-25T09:09:30Z
       
       0 likes, 0 repeats
       
       why do:for(int i=0;i<256;i++){   upload_color(i,palette[i]);}when you can doupload_color(0,palette[0]);upload_color(1,palette[1]);upload_color(2,palette[2]);upload_color(3,palette[3]);upload_color(4,palette[4]);upload_color(5,palette[5]);and just repeat 251 more times
       
 (DIR) Post #AoOe8Gm8yEeKybFhGS by foone@digipres.club
       2024-11-25T09:10:12Z
       
       0 likes, 0 repeats
       
       the worst part is that this was done with a compiler from 1991 so there's no way it unrolled the loop itself. they did this manually
       
 (DIR) Post #AoOedhcHE7opCOcpyS by saua@troet.cafe
       2024-11-25T09:15:36Z
       
       0 likes, 0 repeats
       
       @foone Any idea why? I have extremely little experience with programming in that era, but I remember that code size was always a serious concern ... so unrolling it sounds like a bad idea, unless they really needed it for performance.
       
 (DIR) Post #AoOegVBLuhfZVHMnAG by realn2s@infosec.exchange
       2024-11-25T09:16:00Z
       
       0 likes, 0 repeats
       
       @foone Oh, what a great opportunity for various foot and paste errors 🥴
       
 (DIR) Post #AoOejWJe9ePrt9gYYS by ozzelot@mstdn.social
       2024-11-25T09:16:37Z
       
       0 likes, 0 repeats
       
       @foone If we had shorter workweeks, maybe people wouldn't need to waste time manually unrolling loops
       
 (DIR) Post #AoOemui1uwhOPahziS by foone@digipres.club
       2024-11-25T09:17:31Z
       
       0 likes, 0 repeats
       
       @saua it runs slightly faster. like a couple cycles per "iteration".This is aiming at CPUs so slow that that might matter
       
 (DIR) Post #AoOey3qQICzbviwxEW by simonzerafa@infosec.exchange
       2024-11-25T09:19:24Z
       
       0 likes, 0 repeats
       
       @foone No compiler flags that would do this? 🤔🤷‍♂️
       
 (DIR) Post #AoOf1EGQ0iFL76cTxo by 0xabad1dea@infosec.exchange
       2024-11-25T09:20:04Z
       
       0 likes, 0 repeats
       
       @foone I am surprised a game from 1991 would make such a large tradeoff against executable size. Maybe they were missing frame deadlines without it?
       
 (DIR) Post #AoOfYk10yodV95OWS8 by RueNahcMohr@infosec.exchange
       2024-11-25T09:26:05Z
       
       0 likes, 0 repeats
       
       @foone yea, then you can easily reverse the 0 and 255 entries for gifs!
       
 (DIR) Post #AoOfiQ4dyc34C5htPU by RueNahcMohr@infosec.exchange
       2024-11-25T09:27:55Z
       
       0 likes, 0 repeats
       
       @foone LOOK how many lines of code you wrote today! wow, your SO productive!!!!I think productivity meters have always been a bane to society.
       
 (DIR) Post #AoOgMauV6f2lNz7SwC by foone@digipres.club
       2024-11-25T09:35:08Z
       
       0 likes, 0 repeats
       
       oh that's cute. their set_palette function takes two arguments: a pointer to the palette, and a number of extra palettes to apply. so they could set up an array of palettes in decreasing brightness, and just do set_palette(&fade_pallets[0], 64) to go through them.but the same function is a regular one-time set_palette if you just pass 1 for the second argument.
       
 (DIR) Post #AoOgPtBvauCGx6qGQK by foone@digipres.club
       2024-11-25T09:35:44Z
       
       0 likes, 0 repeats
       
       @simonzerafa in 1991? I don't think so. Not a for loop this big.
       
 (DIR) Post #AoOgSxIYmUOeYhPF8i by otte_homan@theblower.au
       2024-11-25T09:35:59Z
       
       0 likes, 0 repeats
       
       @foone ... maybe (just maybe) because it would give them an excuse to use Excel to generate the code lines as text ?=CONCAT("upload_color(",TEXT([@n],"0"),",palette[",TEXT([@n],"0"),"])")
       
 (DIR) Post #AoOgacHwmN8viLlxdA by foone@digipres.club
       2024-11-25T09:37:38Z
       
       0 likes, 0 repeats
       
       "hey ghidra what calls set_palette?""I don't know! you're in 16bit segmented mode! pointers are MEANINGLESS
       
 (DIR) Post #AoOgsCzvY1ywUOjTVo by nazgul@infosec.exchange
       2024-11-25T09:40:51Z
       
       0 likes, 0 repeats
       
       @foone Reminds me of an Apple II educational game I wrote where some of the code was running in the hires graphics memory range and when I built the program I'd dump a copy of that segment to disk. At runtime, after I displayed an image, I'd then load the code segment back from the disk. I just had to structure the C code so that the image display routines were lower down in memory.
       
 (DIR) Post #AoOh2FMRcHZiiM3Exs by codeofamor@social.codeofamor.net
       2024-11-25T09:42:39Z
       
       0 likes, 0 repeats
       
       @foone @catsalad hyperventilates
       
 (DIR) Post #AoOh8xgLkEg3uYZ0kK by codeofamor@social.codeofamor.net
       2024-11-25T09:43:53Z
       
       0 likes, 0 repeats
       
       @foone @catsalad Except it would only be 250 more times, or you'd get an OOB exception or 8-bit integer overflow. But the check wouldn't allow that anyway. Code is sound.
       
 (DIR) Post #AoOhe0Yn5tQroYpeim by foone@digipres.club
       2024-11-25T09:49:30Z
       
       0 likes, 0 repeats
       
       ahh, nope! I misidentified it.the second parameter on set_palette is how many frames to set it for. The same palette gets set. it vsyncs every time so this is a set_palette that's also a timing function
       
 (DIR) Post #AoOhm1qMCrnC6xsCbQ by th@social.v.st
       2024-11-25T09:50:51Z
       
       0 likes, 0 repeats
       
       @foone the only thing better than __FILE__ is __func__
       
 (DIR) Post #AoOi1IizizasoMiC6S by barubary@infosec.exchange
       2024-11-25T09:53:44Z
       
       0 likes, 0 repeats
       
       @foone This is why C++ is superior: template<int i> void upload_colors() {    upload_colors<i - 1>();    upload_color(i, palette[i]);}template<> void upload_colors<0>() {    upload_color(0, palette[0]);}upload_colors<255>();
       
 (DIR) Post #AoOi3c9sRT47f9OBMG by foone@digipres.club
       2024-11-25T09:54:02Z
       
       0 likes, 0 repeats
       
       or maybe not? it's too 2am to tell.ANYWAY I'm currently debugging through a function that's 256 palette entry uploads and my debugger has no "run until return" function so I have to manually hit next instruction SO MANY TIMES
       
 (DIR) Post #AoOi6Sfs9xEd7LiDfE by foone@digipres.club
       2024-11-25T09:54:20Z
       
       0 likes, 0 repeats
       
       (approximately 1536 times)
       
 (DIR) Post #AoOiB0mhHUFm4B4eS8 by foone@digipres.club
       2024-11-25T09:55:30Z
       
       0 likes, 0 repeats
       
       @th yup
       
 (DIR) Post #AoOiV4PJWMiD5thXiS by foone@digipres.club
       2024-11-25T09:59:08Z
       
       0 likes, 0 repeats
       
       this set_palette code got loaded into the segment 0BBC, one of the only 16-bit DOS segments marked red in shinigami eyes
       
 (DIR) Post #AoOjCVQ8xgVdKJnjOK by foone@digipres.club
       2024-11-25T10:06:57Z
       
       0 likes, 0 repeats
       
       interesting: the same function is called to fade a palette to blackness and to fade a palette to blackness.I wonder if it's specialized to just be palette to black and vice versa, or if it does arbitrary fades between two palettes?
       
 (DIR) Post #AoOjFebZGsVsgDe6ls by aud@fire.asta.lgbt
       2024-11-25T10:06:18.115Z
       
       0 likes, 0 repeats
       
       @foone@digipres.club maybe they wanted to experience the joys of funroll-loops all by themselvesnot much else going on in 91
       
 (DIR) Post #AoOjFfPuFimNCLCJEW by foone@digipres.club
       2024-11-25T10:07:15Z
       
       0 likes, 0 repeats
       
       @aud good point, it was a famously uneventful year
       
 (DIR) Post #AoOjIjk0dDkpTi42wi by tjbutt58@infosec.exchange
       2024-11-25T10:07:38Z
       
       0 likes, 0 repeats
       
       @foone @simonzerafa there were, but perhaps only 16 entries at a time.They were mostly targeted for SIMD.It was possible, for instance, on. Convex mini supercomputer.
       
 (DIR) Post #AoOjUsk2zeCirssD32 by foone@digipres.club
       2024-11-25T10:10:16Z
       
       0 likes, 0 repeats
       
       I'm staring at this code going "if it was less 2am, I could understand this math"
       
 (DIR) Post #AoOjXbF2VyolSefKgC by foone@digipres.club
       2024-11-25T10:10:24Z
       
       0 likes, 0 repeats
       
       this math: local_8 = (int)(0x3f / (long)param_1) + 1; iVar6 = 0;  do {    uVar7 = (undefined2)((ulong)param_2 >> 0x10);    uVar8 = (undefined2)((ulong)param_4 >> 0x10);    iVar4 = (int)param_4;    uVar1 = (int)*(char *)(iVar4 + iVar6) - (int)*(char *)((int)param_2 + iVar6);    uVar2 = (int)uVar1 >> 0xf;    local_608[iVar6] = (char)((int)((uVar1 ^ uVar2) - uVar2) / local_8) + '\x01';    iVar6 = iVar6 + 1;  } while (iVar6 < 0x300);
       
 (DIR) Post #AoOjcAAYb2NywhkFU0 by nazgul@infosec.exchange
       2024-11-25T10:10:47Z
       
       0 likes, 0 repeats
       
       @foone Loop unrolling is older than that though. Although maybe not on these platforms, unless they were cross compiling?It's in the "dragon book" on compiler design in the 70's. And by the 80's, in the workstation  space, that and other techniques were common (my ex-wife worked on compiler optimization back then).
       
 (DIR) Post #AoOje3HhAIcCAiz6Lw by oblomov@sociale.network
       2024-11-25T10:11:15Z
       
       0 likes, 0 repeats
       
       @foone you also wouldn't have posted about fading the palette to blackness being the same function as fading the palette to blackness ;-) (I assume one of those was supposed to be whiteness and/or a from?)
       
 (DIR) Post #AoOjhMZ9vtOMqFjRXE by foone@digipres.club
       2024-11-25T10:11:51Z
       
       0 likes, 0 repeats
       
       @nazgul I know it existed before, I just don't think DOS compilers of the time did it this much.
       
 (DIR) Post #AoOjk0wulBq8fQ6jKa by foone@digipres.club
       2024-11-25T10:12:09Z
       
       0 likes, 0 repeats
       
       @oblomov FACKyeah
       
 (DIR) Post #AoOjvXH8ucGc6v3xzM by nazgul@infosec.exchange
       2024-11-25T10:15:05Z
       
       0 likes, 0 repeats
       
       @foone Probably not. I doubt the Aztec C compiler I used on the Apple II game did either. In fact, I'm kind of amazed it ran at all. That and xlisp.
       
 (DIR) Post #AoOk181tglFlY7bBtw by magnetic_tape@infosec.exchange
       2024-11-25T10:16:04Z
       
       0 likes, 0 repeats
       
       @fooneThis is a wonderful idea. What about solving Ruckingenur levels (one of the first and IMO the best Zachtronics games)?
       
 (DIR) Post #AoOk5wR2DyQZ2NeTSK by thacuber2a03@mastodon.gamedev.place
       2024-11-25T10:16:51Z
       
       0 likes, 0 repeats
       
       @foone mafs
       
 (DIR) Post #AoOkH3gnarQeinKIBU by whitequark@mastodon.social
       2024-11-25T10:19:00Z
       
       0 likes, 0 repeats
       
       @foone this is why i love binja and can't stand hexrayswho tf *wants* this kind of c output(apparently if you work with it for years the typecasts get filtered in your mind. i do not wish to learn this)
       
 (DIR) Post #AoOlwGkSADe72EHNJo by foone@digipres.club
       2024-11-25T10:37:36Z
       
       0 likes, 0 repeats
       
       found the INT31! we've got OVERLAYS FOR SURE!
       
 (DIR) Post #AoOm1TlhBPYorcLQbA by foone@digipres.club
       2024-11-25T10:38:34Z
       
       0 likes, 0 repeats
       
       wasn't there some kind of tool that could flatten out an overlay'd file, at least enough for ghidra to load it?
       
 (DIR) Post #AoOmNVAie3dVaVYBc0 by foone@digipres.club
       2024-11-25T10:42:34Z
       
       0 likes, 0 repeats
       
       https://github.com/NationalSecurityAgency/ghidra/issues/5543oh this is more complicated than I can figure out at 2:42am
       
 (DIR) Post #AoOobcipZPuIy0Mq7k by viraptor@cyberplace.social
       2024-11-25T11:07:24Z
       
       0 likes, 0 repeats
       
       @foone "+ '\x01'"How many levels of hell down for this code to be legit?
       
 (DIR) Post #AoOpwSZsa8T5XXgDE8 by dragonarchitect@rubber.social
       2024-11-25T11:22:23Z
       
       0 likes, 0 repeats
       
       @foone Y E S !I LOVED THAT GAME
       
 (DIR) Post #AoOtp7QDExX5iQugDI by mafe@layer8.space
       2024-11-25T12:05:53Z
       
       0 likes, 0 repeats
       
       @foone Copy'n'Paste Driven Development (CPDD) for experts!
       
 (DIR) Post #AoOybXEGzXrtTMfe6q by MedeaVanamonde@chaosfem.tw
       2024-11-25T12:59:29Z
       
       0 likes, 0 repeats
       
       @foone eeek!
       
 (DIR) Post #AoOyrmUk0CNnS37W5I by MedeaVanamonde@chaosfem.tw
       2024-11-25T13:02:26Z
       
       0 likes, 0 repeats
       
       @foone in the middle od the night your thread here was my entire feed.Wilde!
       
 (DIR) Post #AoOzTlXfzb1xV7bc7E by MenhirMike@mastodon.social
       2024-11-25T13:09:17Z
       
       0 likes, 0 repeats
       
       @foone Reminds me of the Doom Captcha, but I guess your idea is more NES Remix. Either way, I like it! https://vivirenremoto.github.io/doomcaptcha/
       
 (DIR) Post #AoOzWoNFv5zn9XBSc4 by magnetic_tape@infosec.exchange
       2024-11-25T13:09:33Z
       
       0 likes, 0 repeats
       
       @fooneAnd Lasertank ones!https://en.m.wikipedia.org/wiki/LaserTank
       
 (DIR) Post #AoOznyKY9i2cxG6K7E by rotopenguin@mastodon.social
       2024-11-25T13:12:56Z
       
       0 likes, 0 repeats
       
       @foone gotta go fast
       
 (DIR) Post #AoP2Ko6FPiQogoCCqu by lanodan@queer.hacktivis.me
       2024-11-25T13:41:39.920172Z
       
       0 likes, 0 repeats
       
       @foone Imagine getting a TASBot extension for your browser…
       
 (DIR) Post #AoP4gkseGPJKz4QcTI by mhoye@mastodon.social
       2024-11-25T14:07:35Z
       
       0 likes, 0 repeats
       
       @foone @simontatham You two should talk, I love this idea so much.
       
 (DIR) Post #AoP9zBWOS1qaapcsNM by Taffer@mastodon.gamedev.place
       2024-11-25T15:06:58Z
       
       0 likes, 0 repeats
       
       @foone it’s bad enough that Cloudflare keeps telling me I’m a robot, I don’t need this
       
 (DIR) Post #AoPBsA83Qiz49h1LuK by bcasiello@floss.social
       2024-11-25T15:28:06Z
       
       0 likes, 0 repeats
       
       @foone @catsalad "Ha! You're not so 'stop playing those stupid video games and go outside and get some fresh air' now that you need help getting into your bank account, are you, MOM!"
       
 (DIR) Post #AoPH6oWSXmD9G7F3Pk by gkrnours@mastodon.gamedev.place
       2024-11-25T16:26:45Z
       
       0 likes, 0 repeats
       
       @foone maybe they shaved 512 CPU cycle
       
 (DIR) Post #AoPKSyac5y3MiMRbgu by LordCaramac@discordian.social
       2024-11-25T17:04:23Z
       
       0 likes, 0 repeats
       
       @foone Playing games is one of the earliest things that machines did better than humans.
       
 (DIR) Post #AoPjVT5u9FWekxMirw by foone@digipres.club
       2024-11-25T21:44:44Z
       
       0 likes, 0 repeats
       
       @ckape Carmen Sandiego Go is the obvious next step, yeah!
       
 (DIR) Post #AoPjfCmHfQiX30pa8u by foone@digipres.club
       2024-11-25T21:46:53Z
       
       0 likes, 0 repeats
       
       @MedeaVanamonde that "foone" punk posts a LOT
       
 (DIR) Post #AoPjzUy9k1hBG83pIm by dougall@mastodon.social
       2024-11-25T12:32:23Z
       
       0 likes, 0 repeats
       
       @whitequark @foone fwiw, as someone who once loved hex-rays, (a) this is ghidra output and I'm fairly confident it's spewing more casts than hex-rays would on this code, and (b) my primary interaction is iteratively adding and refining type information that removes the typecasts – they don't get filtered in my mind, they're more of a to-do list.
       
 (DIR) Post #AoPjzW25msREYcuU4m by foone@digipres.club
       2024-11-25T21:50:28Z
       
       0 likes, 0 repeats
       
       @dougall @whitequark yeah this is early decompilation. I haven't told it of types yet, so it's rougher than it'll be once I clean it up
       
 (DIR) Post #AoPlnQXsYyIpyL8prE by MedeaVanamonde@chaosfem.tw
       2024-11-25T22:10:40Z
       
       0 likes, 0 repeats
       
       @foone I was on my home feed, only thee and me were up
       
 (DIR) Post #AoPmCWKCDFuD8UhsYa by foone@digipres.club
       2024-11-25T22:15:17Z
       
       0 likes, 0 repeats
       
       I like that this program using overlays is only 209kb."oh no, we can't fit all 209 kilobytes of our program into RAM! better use our compiler's overlay system" TWO HUNDRED KILOBYTES
       
 (DIR) Post #AoPmLaIsmymm5APlXE by noodle@aus.social
       2024-11-25T22:16:53Z
       
       0 likes, 0 repeats
       
       @foone Human: Eat pie and die.Machine: I have not eaten the pie.  I will throw it at yeti.
       
 (DIR) Post #AoPmSyO1eD2EnkLL8a by foone@digipres.club
       2024-11-25T22:18:11Z
       
       0 likes, 0 repeats
       
       oh hey, there is a 32bit windows version of this game? that might be way easier to reverse engineer
       
 (DIR) Post #AoPmW16W04KS6AbWaG by foone@digipres.club
       2024-11-25T22:18:30Z
       
       0 likes, 0 repeats
       
       you know, because of pointers that actually point
       
 (DIR) Post #AoPmrMajJ1bKozuprE by RueNahcMohr@infosec.exchange
       2024-11-25T22:22:00Z
       
       0 likes, 0 repeats
       
       @foone "The only thing 32 bits ever got us was 64 bits, and now a browser can allocate 4T of RAM. THIS IS NOT HOW WE SOLVE MEMORY LEAKS PEOPLE."
       
 (DIR) Post #AoPn09oOBpMBnBUwJU by foone@digipres.club
       2024-11-25T22:24:16Z
       
       0 likes, 0 repeats
       
       I can't play it because MIDI doesn't work on Windows 10
       
 (DIR) Post #AoPnIaUNk7VHk7vbJg by foone@digipres.club
       2024-11-25T22:27:32Z
       
       0 likes, 0 repeats
       
       sticking a zero byte file at C:\Windows\SysWOW64\midimap.cfg fixed that. It runs. I kinda hate it, but that's to be expected.
       
 (DIR) Post #AoPnLzdCikvuaag7rU by foone@digipres.club
       2024-11-25T22:28:10Z
       
       0 likes, 0 repeats
       
       if there's a game you grew up with and love on platform X, never play a cheap 90s port of that game to platform Y. it never ends well
       
 (DIR) Post #AoPnP7sUW6Qt2BK4ci by dougall@mastodon.social
       2024-11-25T22:28:18Z
       
       0 likes, 0 repeats
       
       @foone I guess it's less 2am now, but, assuming 16-bit ints:uVar2 = (int)uVar1 >> 0xf;(uVar1 ^ uVar2) - uVar2)is justabs(uVar1)The divisions and unused uVar7/uVar8 don't make a ton of sense to me, so I'd be checking the asm... But I guess if it's a fade that skips about half-way in the first or last frame it might make sense as:  local_8 = (int)(0x3f / (long)param_1) + 1;  for (i = 0; i < 0x300; i++)    local_608[i] = (abs(param_4[i] - param_2[i]) / local_8) + 1;
       
 (DIR) Post #AoPnWJbDKrcNPkfZc8 by cr1901@mastodon.social
       2024-11-25T22:29:38Z
       
       0 likes, 0 repeats
       
       @foone Tempest 2000?
       
 (DIR) Post #AoPngXOit6L16bhYAK by raptor85@mastodon.gamedev.place
       2024-11-25T22:31:53Z
       
       0 likes, 0 repeats
       
       @foone it's also pretty painful to see what a lot of the games we grew up with look like on crappy emulation being re-sold for $20 on modern platforms,  literally visually worse than they were 35 years ago, now with the bonus of input lag.
       
 (DIR) Post #AoPoA5yXPLWqkCY1Kq by dashasierra@mastodon.social
       2024-11-25T22:37:14Z
       
       0 likes, 0 repeats
       
       @foone oh its so true C&C did not play well on PS1.
       
 (DIR) Post #AoPoLiQ4oVMvA6yBDk by foone@digipres.club
       2024-11-25T22:39:21Z
       
       0 likes, 0 repeats
       
       @dashasierra has an RTS EVER played well on a console?Maybe an FPS-RTS hybrid, but RTS games are such a mouse-based genre!
       
 (DIR) Post #AoPoQKnM4nvRL83oDA by tess@mastodon.social
       2024-11-25T22:40:06Z
       
       0 likes, 0 repeats
       
       @foone ten year old Finale Notepad will still output midi synth on my Windows 11 PC but I'm assuming this is much, much older, yes?
       
 (DIR) Post #AoPp8CrevJXpU8zeYC by foone@digipres.club
       2024-11-25T22:47:52Z
       
       0 likes, 0 repeats
       
       @tess 1997 port of a 1993 game, so yeah
       
 (DIR) Post #AoPpD20shBa9HKbjw8 by foone@digipres.club
       2024-11-25T22:48:23Z
       
       0 likes, 0 repeats
       
       wait, ghidra autodetects the 32bit version as being DELPHI?!The DOS one is definitely C++.Did these fuckers rewrite the whole game in Delphi so it'd run on Win32?
       
 (DIR) Post #AoPpDncPhSWyvLWsSm by Canageek@wandering.shop
       2024-11-25T22:46:31Z
       
       0 likes, 0 repeats
       
       @foone @dashasierra I've heard that weirdly enough the N64 had some!(I'm not counting one of my all time favourite games, Ogre Battle 64, as it is more of an RPG with RTS elements)
       
 (DIR) Post #AoPpHQ2NJgOWwjOm1o by foone@digipres.club
       2024-11-25T22:48:44Z
       
       0 likes, 0 repeats
       
       maybe they compiled the games into DLLs and had a delphi shell around it?
       
 (DIR) Post #AoPpKJabkJ8Vojn8jo by tess@mastodon.social
       2024-11-25T22:48:51Z
       
       0 likes, 0 repeats
       
       @foone woof
       
 (DIR) Post #AoPpPqtxJtPwa4Tw12 by foone@digipres.club
       2024-11-25T22:50:35Z
       
       0 likes, 0 repeats
       
       I think that's exactly what they did.on the CD there's a bunch of DAT files in SSGWINCD, and they mysteriously all start with the bytes MZ, like a DLL/EXE
       
 (DIR) Post #AoPpPscevAlnv0P9Ki by foone@digipres.club
       2024-11-25T22:50:52Z
       
       0 likes, 0 repeats
       
       loadLibrary()ing a .DAT file? naughty naughty.
       
 (DIR) Post #AoPpcl0gXG984bmbZY by krono@toot.berlin
       2024-11-25T22:53:38Z
       
       0 likes, 0 repeats
       
       @foone Pascal calling convention got way out of hand
       
 (DIR) Post #AoPplCNSfU7fGhSgBU by foone@digipres.club
       2024-11-25T22:54:48Z
       
       0 likes, 0 repeats
       
       Language ID:x86:LE:16:Protected Mode (2.13)what do you mean 16bit protected mode? the one used for, like, Xenix? the 286 one that was an evolutionary dead end? YOU'RE RUNNING THAT IN DLLs?
       
 (DIR) Post #AoPplEyP16rPJqlD2e by foone@digipres.club
       2024-11-25T22:55:04Z
       
       0 likes, 0 repeats
       
       that can't be right. I'm on a 64bit system. those DLLs shouldn't even load.
       
 (DIR) Post #AoPpsIiFVoBuwaZUfo by yakkoj@fosstodon.org
       2024-11-25T22:56:27Z
       
       0 likes, 0 repeats
       
       @foone Windows 10: so backwards-compatible, even the error dialogs look 16-bit enough!
       
 (DIR) Post #AoPpvO1KEbwIH3xvQO by ozzelot@mstdn.social
       2024-11-25T22:56:28Z
       
       0 likes, 0 repeats
       
       @foone You’re on a Foone system. Those DLLs will somehow load.
       
 (DIR) Post #AoPq0SyjEC1t6EAnbs by foone@digipres.club
       2024-11-25T22:57:58Z
       
       0 likes, 0 repeats
       
       These are NE executables. So windows 3.x. Those... shouldn't be loading. Unless they're 32bit, somehow... is win32s being invoked here? and somehow working? on a 64bit OS?did they embed a 16bit x86 emulator into their program? (no)
       
 (DIR) Post #AoPq4KVcevLpzSOwYy by dg3hda@aschaffenburg.social
       2024-11-25T22:58:36Z
       
       0 likes, 0 repeats
       
       @foone Mark Zbikovski likes this.
       
 (DIR) Post #AoPq6y2CfvGT9htlTc by foone@digipres.club
       2024-11-25T22:59:04Z
       
       0 likes, 0 repeats
       
       all this is telling me "give up on the windows version and go back to hacking the DOS version" but I have to figure out what the fuck they're doing here.
       
 (DIR) Post #AoPqByKgzgFbWovuKm by rk@mastodon.well.com
       2024-11-25T22:59:13Z
       
       0 likes, 0 repeats
       
       @foone I always loved that Xenix could even run on a stock XT with no memory protection whatsoever. I haven’t looked but AFAIK it supported full fork(2) semantics, so…I guess it must’ve just copied segments on fork? No way to do CoW AFAIK.
       
 (DIR) Post #AoPqDnRKSrhaK7uIro by foone@digipres.club
       2024-11-25T22:59:30Z
       
       0 likes, 0 repeats
       
       @dg3hda He goes by Zark Mbikovski in little-endian cultures
       
 (DIR) Post #AoPqHJtCH5WdpgcdZQ by foone@digipres.club
       2024-11-25T23:00:13Z
       
       0 likes, 0 repeats
       
       because this smells like it's either brilliant or a crime against man and God and I need to find out which. and yes, both is an option
       
 (DIR) Post #AoPqKKY4HQjikJAu6C by RueNahcMohr@infosec.exchange
       2024-11-25T23:00:46Z
       
       0 likes, 0 repeats
       
       @foone win64 runs 32 bit programs in an emulator that runs 16 bit programs in an emulator. "WOW.exe" stack 'em up!nobody in Microsoft knows how windows actually works, so they all just add more layers on top. Thats why hackers can get in so easy.
       
 (DIR) Post #AoPqO4zk3AitfJuHRY by foone@digipres.club
       2024-11-25T23:01:59Z
       
       0 likes, 0 repeats
       
       @onfy ugh. if this is a trend for them, I might have to get all their 90s games and see if they use the same exact nonsense
       
 (DIR) Post #AoPqRDnPmfjDpYdgno by dg3hda@aschaffenburg.social
       2024-11-25T23:02:36Z
       
       0 likes, 0 repeats
       
       @foone that is my learning of the evening.
       
 (DIR) Post #AoPqV2ybx6VPQuhTeq by Sonikku@techhub.social
       2024-11-25T23:02:45Z
       
       0 likes, 0 repeats
       
       @foone “same thing”-parents when buying presents
       
 (DIR) Post #AoPqYT1RZUjp55ejVQ by foone@digipres.club
       2024-11-25T23:03:29Z
       
       0 likes, 0 repeats
       
       WAITI was using this ancient version of ghidra for GBA hackingI'm doing x86 hacking nowwhy am I still on a version with a broken dark mode?
       
 (DIR) Post #AoPqbbT8ciA89A6abg by ScotttSee@mastodon.sdf.org
       2024-11-25T23:04:02Z
       
       0 likes, 0 repeats
       
       @foone Are they possibly using the.DAT/.DLLs to load puzzle data into a recreated engine?
       
 (DIR) Post #AoPqeW3tBSVqFGgTse by foone@digipres.club
       2024-11-25T23:04:31Z
       
       0 likes, 0 repeats
       
       it's only a matter of time before someone invents one of those Version Managers like for node/ruby/etc but it just keeps track of your ghidra versions
       
 (DIR) Post #AoPqhdl91Kn2zJPFb6 by foone@digipres.club
       2024-11-25T23:04:53Z
       
       0 likes, 0 repeats
       
       I'm on my laptop now (disability reasons) but my Real Workstation has like 13 versions of Ghidra installed
       
 (DIR) Post #AoPqkUJyZHECaJ3YK8 by foone@digipres.club
       2024-11-25T23:05:28Z
       
       0 likes, 0 repeats
       
       @ScotttSee it's certainly possible. resource dlls are a thing.
       
 (DIR) Post #AoPqx85YXVX5OcL6h6 by mempko@fosstodon.org
       2024-11-25T23:08:28Z
       
       0 likes, 0 repeats
       
       @foone Why stop at video games? Captchas already make people do slave labor (labeling imagery), just extend it to it's dystopian end. In other words, not only do you play DOS games, but your plays are used to train an AGI.
       
 (DIR) Post #AoPr1Ntdhyrfa6nJlw by foone@digipres.club
       2024-11-25T23:09:16Z
       
       0 likes, 0 repeats
       
       you're... making int21h calls?in a DLL? your'e making raw DOS interrupt calls in a WINDOWS DLL!?
       
 (DIR) Post #AoPr59joI82apNzlwG by foone@digipres.club
       2024-11-25T23:09:56Z
       
       0 likes, 0 repeats
       
       I'm starting to think none of these DLLs are actually ever used
       
 (DIR) Post #AoPr8PijKDCZGX2lIe by foone@digipres.club
       2024-11-25T23:10:18Z
       
       0 likes, 0 repeats
       
       procmon time. what do you do, game?
       
 (DIR) Post #AoPrDWOpv4e1QdAqno by macleod@infosec.exchange
       2024-11-25T23:11:26Z
       
       0 likes, 0 repeats
       
       @foone how it should always be
       
 (DIR) Post #AoPrGOc7K7249MkyDQ by foone@digipres.club
       2024-11-25T23:11:36Z
       
       0 likes, 0 repeats
       
       they didn't bother to make the animations play at the right speed :(
       
 (DIR) Post #AoPrMJmQCyL8tbOsjI by sandbender@mastodon.social
       2024-11-25T23:13:03Z
       
       0 likes, 0 repeats
       
       @foone DOS interrupt calls were the pinnacle of civilization.
       
 (DIR) Post #AoPrR2JUZmIKAj7Poe by foone@digipres.club
       2024-11-25T23:13:55Z
       
       0 likes, 0 repeats
       
       they are indeed using those files.I'm wondering if they're just using them for data, though? maybe they just load them and pull resources out, and the Real Code is elsewhere?
       
 (DIR) Post #AoPrdMniEKQJBh8KzQ by gabe@mendeddrum.org
       2024-11-25T23:16:05Z
       
       0 likes, 0 repeats
       
       @foone My XT only *has* 256kB, the entire first kilobyte goes poof for the interrupt table *even though nobody needs that many interrupts!* and then you never know what silly TSRs the user has running. Probably sidekick+, for the calendar.Anyway, the game expecting 200kB available is quite optimistic.What year did you say this is?
       
 (DIR) Post #AoPrhJ6xtCnuu419sG by foone@digipres.club
       2024-11-25T23:16:53Z
       
       0 likes, 0 repeats
       
       @gabe 1993! with minimum requirements of 640kb
       
 (DIR) Post #AoPrlGDUasbH5FxKYy by gsuberland@chaos.social
       2024-11-25T23:17:33Z
       
       0 likes, 0 repeats
       
       @foone yeah that's what I'm thinking. either that or they're hotpatching stuff and using VEH or similar to catch and handle the int instructions.
       
 (DIR) Post #AoPro5fYGW1jExQi5w by cr1901@mastodon.social
       2024-11-25T23:17:59Z
       
       0 likes, 0 repeats
       
       @foone >rustup>zigup>espupghiddy-up
       
 (DIR) Post #AoPrr0mYtKBIx76MeO by phi1997@mastodon.social
       2024-11-25T23:18:16Z
       
       0 likes, 0 repeats
       
       @fooneWindow 11 has a chance to make itself better than Windows 10 if they fix this
       
 (DIR) Post #AoPsGNZVIXNws85eBU by phi1997@mastodon.social
       2024-11-25T23:23:09Z
       
       0 likes, 0 repeats
       
       @fooneCome, join the light side
       
 (DIR) Post #AoPtNsfACRFFHUsVkG by gabe@mendeddrum.org
       2024-11-25T23:35:19Z
       
       0 likes, 0 repeats
       
       @foone oh yeah, you mentioned VGA.Damn gamers and their high-end hardware.
       
 (DIR) Post #AoPz7tRY86kGnFGoWe by foone@digipres.club
       2024-11-26T00:40:00Z
       
       0 likes, 0 repeats
       
       @SpindleyQ AHHH
       
 (DIR) Post #AoPzi265Qs8k3dSohU by jonn@social.doma.dev
       2024-11-25T23:35:48Z
       
       0 likes, 0 repeats
       
       @foone remember the goat puzzle?
       
 (DIR) Post #AoPzi2kqzIkY64XNFA by foone@digipres.club
       2024-11-26T00:46:37Z
       
       0 likes, 0 repeats
       
       @jonn which one?
       
 (DIR) Post #AoPzl8rYjaCFuT9RLs by gsuberland@chaos.social
       2024-11-25T23:21:02Z
       
       0 likes, 0 repeats
       
       @foone are they passing LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE or LOAD_LIBRARY_AS_IMAGE_RESOURCE to LoadLibraryEx? that'd be a giveaway that they're not directly doing imports and there's some extra gubbins in there for yanking out data and maybe executing code.
       
 (DIR) Post #AoPzlADDiX7M5wIFkm by foone@digipres.club
       2024-11-26T00:47:11Z
       
       0 likes, 0 repeats
       
       @gsuberland haven't found out yet but i suspect so
       
 (DIR) Post #AoQ0wTFVNYVMHBJkoq by jonn@social.doma.dev
       2024-11-26T01:00:20Z
       
       0 likes, 0 repeats
       
       @foone Broken Sword. I won't spoil. If you didn't play it, play it when you have the time!It's solvable but very difficult. I have looked up the solution idea online during my playthrough and was very sad that I did because I think in an evening I would have solved it.
       
 (DIR) Post #AoQ5wYJT3Dphki1sau by mmu_man@m.g3l.org
       2024-11-26T01:55:54Z
       
       0 likes, 0 repeats
       
       @foone haters gonna hate, pointers gonna point…
       
 (DIR) Post #AoQ7jkYkPKLjsUCQXQ by jgilbert@mastodon.social
       2024-11-26T02:16:31Z
       
       0 likes, 0 repeats
       
       @foone captchas that get smaller and quicker and more spastic to play before the next page is accessed, yet while also being difficult to automatically solves, just slide inexorably towards WarioWare mini games in the browser. I'm okay with this.
       
 (DIR) Post #AoQ81RWBwP7i2ERNM8 by mmu_man@m.g3l.org
       2024-11-26T02:19:19Z
       
       0 likes, 0 repeats
       
       @foone … but… why?
       
 (DIR) Post #AoQ8GFXKlpUrDc2FaS by foone@digipres.club
       2024-11-26T02:22:29Z
       
       0 likes, 0 repeats
       
       @mmu_man different plugins target different versions. compiling between versions is annoying enough that the easiest way to do it is to just have multiple versions installed
       
 (DIR) Post #AoQ8MOoBDAM5iBqaEy by foone@digipres.club
       2024-11-26T02:23:30Z
       
       0 likes, 0 repeats
       
       @greg ooh, nasty. I'm not sure if that's what's happening here, but good to know
       
 (DIR) Post #AoQ8VXt4pEAqTZV05o by mmu_man@m.g3l.org
       2024-11-26T02:22:57Z
       
       0 likes, 0 repeats
       
       @foone and I thought r2 was complex 😅
       
 (DIR) Post #AoQ97jgBQmsu3Jg8ky by foone@digipres.club
       2024-11-26T02:32:05Z
       
       0 likes, 0 repeats
       
       obviously the first thing you call GetProcAddress on is "GetProcAddress"
       
 (DIR) Post #AoQ9ClYrrSPxKyehfc by foone@digipres.club
       2024-11-26T02:33:04Z
       
       0 likes, 0 repeats
       
       you know, just in case the address has changed between compile time and run time
       
 (DIR) Post #AoQ9hdjh0QLG2oRNGy by mmu_man@m.g3l.org
       2024-11-26T02:38:29Z
       
       0 likes, 0 repeats
       
       @foone or to obfuscate subsequent calls?
       
 (DIR) Post #AoQ9kSj2OonelSTp32 by foone@digipres.club
       2024-11-26T02:38:53Z
       
       0 likes, 0 repeats
       
       oh it's trying to load WinG32.dllthat's a pre-directx windows library for high speed graphics. it was partially written to get Doom running at full speed under windows.
       
 (DIR) Post #AoQ9ugTM8uy4IQ1Fcu by foone@digipres.club
       2024-11-26T02:40:59Z
       
       0 likes, 0 repeats
       
       hah! it works!it turns out they installed this pre-win95 graphics library into System32 of my 64bit windows system (well, sysWOW64)
       
 (DIR) Post #AoQA3qdFjsNcPb1AuW by foone@digipres.club
       2024-11-26T02:42:37Z
       
       0 likes, 0 repeats
       
       okay I'm running in a debugger now, with breakpoints on LoadLibrary/GetProcAddress.There's no activity while doing stuff that'll trigger the .DAT files (which are DLLs) to load.
       
 (DIR) Post #AoQA6KRXsAWFRsj02i by wcbdata@vis.social
       2024-11-26T02:42:42Z
       
       0 likes, 0 repeats
       
       @foone Now I'll have "thunk" and "twunk" stuck in my head for days, dangit.
       
 (DIR) Post #AoQA8ZT6ypMaczWiHY by foone@digipres.club
       2024-11-26T02:43:13Z
       
       0 likes, 0 repeats
       
       I wonder if these fuckers just skipped using the windows DLL loader and wrote their own so they could use them on win32?
       
 (DIR) Post #AoQCKJk7TPblEsD8E4 by foone@digipres.club
       2024-11-26T03:07:55Z
       
       0 likes, 0 repeats
       
       oh goody, they're not using the regular CreateFilethey're using _lopen. The 16-bit windows compatibility one!
       
 (DIR) Post #AoQCPD3lkSMZxYjbQ8 by foone@digipres.club
       2024-11-26T03:08:53Z
       
       0 likes, 0 repeats
       
       @delan oh, awesome! I'll have to look through what you've found so far.
       
 (DIR) Post #AoQCY2Jd434FF9MUaG by foone@digipres.club
       2024-11-26T03:10:30Z
       
       0 likes, 0 repeats
       
       and CreateFile.they use both. fun!
       
 (DIR) Post #AoQCx9NLx6BkNa4x3Q by alexandria@mastodon.gamedev.place
       2024-11-26T03:15:00Z
       
       0 likes, 0 repeats
       
       @foone mom said its my turn on the DAT/EXE file
       
 (DIR) Post #AoQD0k14BDrct2MnmC by foone@digipres.club
       2024-11-26T03:15:43Z
       
       0 likes, 0 repeats
       
       see the cool thing about reversing 32bit or 64bit code is that it's not segmented, so when you look in your debugger and it says it's running a function at 0x004013cc, you can go over to ghidra and type in "0x004013cc" and it'll show you that same function!
       
 (DIR) Post #AoQD6h4i1p1zVBuQBU by foone@digipres.club
       2024-11-26T03:16:45Z
       
       0 likes, 0 repeats
       
       this may seem "boring" and "mundane" and "how debuggers always work?" but just imagine you have lost that simple ability to compare code between the two programs?that is the horror of 16bit segmented code
       
 (DIR) Post #AoQF32M3AX68FYP7Ym by foone@digipres.club
       2024-11-26T03:38:27Z
       
       0 likes, 0 repeats
       
       I've been doing too much GBA reverse engineering. I saw a 32bit pointer starting with 0x02 and tried to remember if that was on-cartridge RAM. this is a /windows/ program. on windows 10. THERE ARE NO CARTRIDGES!
       
 (DIR) Post #AoQF5pSlYYGP8TsQXw by foone@digipres.club
       2024-11-26T03:38:43Z
       
       0 likes, 0 repeats
       
       now let me copy this program onto this SD card in my laptop's built-in SD card reader
       
 (DIR) Post #AoQF9eyAVrChkVOLtg by rk@mastodon.well.com
       2024-11-26T03:39:31Z
       
       0 likes, 0 repeats
       
       @foone Well there certainly aren’t going to be any with that attitude.
       
 (DIR) Post #AoQFCEFMK8QhjrepGa by north@xn--8r9a.com
       2024-11-26T03:39:09Z
       
       0 likes, 0 repeats
       
       @foone but what if there were cartridges? 🤔
       
 (DIR) Post #AoQFR5dIdFp1MowRwu by foone@digipres.club
       2024-11-26T03:42:54Z
       
       0 likes, 0 repeats
       
       @north this thought experiment gave us the IBM PCjr, which was a massive flop.
       
 (DIR) Post #AoQGItGGqRasdRpACu by Canageek@wandering.shop
       2024-11-26T03:52:28Z
       
       0 likes, 0 repeats
       
       @foone couldn't have written a little script to write that for them? or do you think they actually copy pasted that out by hand?
       
 (DIR) Post #AoQGN2vGrm5xl1z2IK by foone@digipres.club
       2024-11-26T03:53:23Z
       
       0 likes, 0 repeats
       
       @Canageek probably a macro in their compiler. little scripts are rarer then, but possibly?
       
 (DIR) Post #AoQHP8Xx1mirjVdWfw by foone@digipres.club
       2024-11-26T04:04:48Z
       
       0 likes, 0 repeats
       
       yeah this is some windows 3.x-ass code. They definitely recompiled it as 32bit and did all the changes that required, but the general feel of the code is that it's 3.x code, with how it handles most things.
       
 (DIR) Post #AoQHndYrMr0qsCkCTw by redrummy@ohai.social
       2024-11-26T04:09:15Z
       
       0 likes, 0 repeats
       
       @foone This thread has been a JOURNEY. I don't understand all of it, but still love it. Thank you for the ride.
       
 (DIR) Post #AoQIEMTV0EHjhPyofw by DrakkenZero@retro.pizza
       2024-11-26T04:14:08Z
       
       0 likes, 0 repeats
       
       @foone I love seeing your posts come up in my feed because I have legit no idea what's going on most of the time, but you've got such an energy to you as you rip apart the digital insides of things you keep finding and torturing.
       
 (DIR) Post #AoQJ3jBuItgUvBFEwa by foone@digipres.club
       2024-11-26T04:23:15Z
       
       0 likes, 0 repeats
       
       WHAT IN THE BORLAND TURBO C PLUS PLUS IS GOING ON HERE?
       
 (DIR) Post #AoQJ6aBgEffnrjV3fE by foone@digipres.club
       2024-11-26T04:23:57Z
       
       0 likes, 0 repeats
       
       Ghidra is better at reversing MSVC-style arguments than Borland-style. Makes sense. Probably not a lot of Evil Malware written in Borland Turbo C++ these days
       
 (DIR) Post #AoQJFgcRgyCaQ4MOga by foone@digipres.club
       2024-11-26T04:25:39Z
       
       0 likes, 0 repeats
       
       What happened: I'm looking at a function that's clearly a strcmp of some kind. It seems to compare against a length, so... strncmp? looks like it, except it takes FOUR ARGUMENTS?! what could this be? I look at several variants of strncmp to see if there's a 4-argument version, then give up and look back at ghidra's decompilation: it never uses argument 1.
       
 (DIR) Post #AoQJLvfgdnk8qBqwy0 by clayote@peoplemaking.games
       2024-11-26T04:26:44Z
       
       0 likes, 0 repeats
       
       @foone that's quitter talk
       
 (DIR) Post #AoQJQ95ahCXtc6yp4y by gsuberland@chaos.social
       2024-11-26T04:27:23Z
       
       0 likes, 0 repeats
       
       @foone Borland stuff is so cursed. especially if it's anything to do with strings.
       
 (DIR) Post #AoQJT10RCmBjPfwDlA by foone@digipres.club
       2024-11-26T04:27:36Z
       
       0 likes, 0 repeats
       
       there's some nonsense going on here with pascal calling convention but I think I'm too tired already to figure out the exact details well enough to explain it.
       
 (DIR) Post #AoQJWPmvWRkl8sEuUi by foone@digipres.club
       2024-11-26T04:28:10Z
       
       0 likes, 0 repeats
       
       but the bottom line is that it's not a 4-argument function, it's a 3-argument function. the decompiler just didn't get the calling convention exactly right.
       
 (DIR) Post #AoQJZcYcVFYFc84nK4 by foone@digipres.club
       2024-11-26T04:28:38Z
       
       0 likes, 0 repeats
       
       so I live another day, safe from the horror that is the 4-argument strcmp. what does it do? how does it work? I don't want to know.
       
 (DIR) Post #AoQJprWecRJwfdtwZ6 by foone@digipres.club
       2024-11-26T04:32:11Z
       
       0 likes, 0 repeats
       
       I figured it out! it's a locale-specific strnnicmp.That's stricmp (compare insensitively) and also strncmp (compare only the first n characters), but with TWO LENGTHS! Why? To compare two strings of different lengths, case-insensitively.
       
 (DIR) Post #AoQK1Bvl5uWB8n2u9o by foone@digipres.club
       2024-11-26T04:34:11Z
       
       0 likes, 0 repeats
       
       and you might say "why would you compare two strings you know are of different lengths, of course they're not equal" Well, if the compare is case insensitive, they might still match... in a german locale!
       
 (DIR) Post #AoQKSNnZ4tktlcBASe by foone@digipres.club
       2024-11-26T04:39:06Z
       
       0 likes, 1 repeats
       
       To greatly oversimplify, the german letter "ß" is lowercase, and in uppercase you write it "SS". So if you have two strings, one reading "straße" and one reading "STRASSE", they are different lengths (6 vs 7), but case insensitively comparing them should return a match.
       
 (DIR) Post #AoQKW25nioczbcRvGK by foone@digipres.club
       2024-11-26T04:39:49Z
       
       0 likes, 0 repeats
       
       Try it out on your local javascript console:>> "Straße".length6>> "Straße".toUpperCase().length7
       
 (DIR) Post #AoQKdLVfvXUPr32Tz6 by foone@digipres.club
       2024-11-26T04:41:06Z
       
       0 likes, 0 repeats
       
       so yeah hypothetically if you had a version of stricmp that was strncmp and compared two strings of different length, this might still be a match, if your locale treated the German Eszett this way.
       
 (DIR) Post #AoQKfrUfyzNnd7lt5M by foone@digipres.club
       2024-11-26T04:41:25Z
       
       0 likes, 0 repeats
       
       enough writing about FICTIONAL C LIBRARY FUNCTIONS, what the hell writing brain, let's get back to reverse engineering
       
 (DIR) Post #AoQKsa5628jPOGs6Fs by foone@digipres.club
       2024-11-26T04:43:53Z
       
       0 likes, 0 repeats
       
       someone should write a fictional programming library reference book. like, fit enough interesting ideas in about what the fictional world needs functions for, worldbuild in the cracks, but stay clearly still a dry list of man pages?
       
 (DIR) Post #AoQKxVfTrw3r9RExoO by zarchasmpgmr@infosec.exchange
       2024-11-26T04:43:59Z
       
       0 likes, 0 repeats
       
       @foone you have got me wondering if it supports the recent uppercase addition, ẞ (U+1E9E).
       
 (DIR) Post #AoQL1LNe3nD4P2j53Q by foone@digipres.club
       2024-11-26T04:44:25Z
       
       0 likes, 0 repeats
       
       @lizzy let me point you at the first three words of my post :)
       
 (DIR) Post #AoQL41sZ1QZmn0T7IG by clayote@peoplemaking.games
       2024-11-26T04:45:52Z
       
       0 likes, 0 repeats
       
       @foone huh, it'd fit right in with the debugging simulator / mystery game I'm totally going to make one day in my copious free time
       
 (DIR) Post #AoQL6qO8CXDO1IZmee by foone@digipres.club
       2024-11-26T04:46:24Z
       
       0 likes, 0 repeats
       
       @clayote lemme know if you do (or just wanna share your ideas), it sounds exactly up my alley!
       
 (DIR) Post #AoQLB0GFR6CxnYs8Bc by roguecnidarian@meemu.org
       2024-11-26T04:47:10Z
       
       0 likes, 0 repeats
       
       @foone I've had thoughts about writing a story told through just news articles or snippets of stories
       
 (DIR) Post #AoQLG03XcqEybvJMQ4 by foone@digipres.club
       2024-11-26T04:48:07Z
       
       0 likes, 1 repeats
       
       writer-brain grabs the mic:C'S MEMORY HANDLING IS SO BAD IT CAN BE EXPLOITED BY THE GERMAN LANGUAGE ITSELF
       
 (DIR) Post #AoQLRahPjAl3RVULFg by clayote@peoplemaking.games
       2024-11-26T04:50:10Z
       
       0 likes, 0 repeats
       
       @foone The idea is that a fictionalized version of the Hans Reiser murder happened, and to find out who the killer is, and why they did it, and where the body is, you have to reverse engineer his "home automation" software that kills people. To do this, you use something much like Ghidra, or probably closer to a scripting language's debugger for playability's sake, and have to red-team his underhanded murder code to find out which totally innocuous functions aren't.
       
 (DIR) Post #AoQLfPpsujkRnx2hw8 by jonny@neuromatch.social
       2024-11-26T04:52:42Z
       
       0 likes, 0 repeats
       
       @fooneOn the edge of my damn seat with this thread
       
 (DIR) Post #AoQLlrrTd0h8Sircx6 by StevenSavage@sfba.social
       2024-11-26T04:53:49Z
       
       0 likes, 0 repeats
       
       @foone I actually had notes on making a book that'd tell the story through textbooks.  The idea is that each book is a "marked up" draft of a textbook from an alternate world.  By reading the books, you'd get a view of the world, and the man who wrote the books and his editor.
       
 (DIR) Post #AoQLr51E8ZPmiUuTUe by sandbender@mastodon.social
       2024-11-26T04:54:48Z
       
       0 likes, 0 repeats
       
       @foone SHUT UP AND TAKE MY MONEY
       
 (DIR) Post #AoQLzCBvLzqTHKmcV6 by foone@digipres.club
       2024-11-26T04:56:18Z
       
       0 likes, 0 repeats
       
       @clayote that sounds awesome!
       
 (DIR) Post #AoQM442T5lizRSgKgq by fontenot@mastodon.social
       2024-11-26T04:57:09Z
       
       0 likes, 0 repeats
       
       @foone I follow you mainly because I relate so much to this pattern."Hey here's a weird thing. I don't know what it does. I don't need to know what it does. I don't want to know what it does."*five minutes later*"Hey I figured out what that thing does."
       
 (DIR) Post #AoQN6OQoLMnRDok5J2 by ChartreuseK@social.restless.systems
       2024-11-26T05:08:44Z
       
       0 likes, 0 repeats
       
       @foone properly locking and unlocking handles? Rather than the win32 way of just locking on allocation?
       
 (DIR) Post #AoQOEZekasEcJ1j9bU by kmmfoo@friendsofdesoto.social
       2024-11-26T05:21:19Z
       
       0 likes, 0 repeats
       
       @foone #this. because it will take a lifetime to unravel
       
 (DIR) Post #AoQOOkTZDnDal4LdHE by trochee@dair-community.social
       2024-11-26T05:23:16Z
       
       0 likes, 0 repeats
       
       @foone You don't even need to use German majuscule/minuscule: there are different Unicode normalizations that change the length of the strings
       
 (DIR) Post #AoQOnUgN4uw7108WCu by theboatend@aus.social
       2024-11-26T05:27:43Z
       
       0 likes, 0 repeats
       
       @foone Capital <ẞ> (viz lc <ß>) was actually added [... checks] in ~2017. [Fraktur is never set all caps [1] and ß is never the first letter of a word, so a fraktur capital ß never developed, and after the shift to antiqua it took A While for people to get around to it][1] the unicode consortium were wrong to do Roman unification: fraktur and insular/Gaelic are different scripts (as are italic and bold!) not different letterforms.
       
 (DIR) Post #AoQOzeq196fLzGRrvM by joncruz@mstdn.social
       2024-11-26T05:29:56Z
       
       0 likes, 0 repeats
       
       @foone why, hand optimized code, doncha know? A human with their knowledge of dos optimization tricks will always beat the stupid compiler. Just ask the senior dev with an EE degree. He'll tell ya
       
 (DIR) Post #AoQP2BqpNJbIxF2EU4 by foone@digipres.club
       2024-11-26T05:30:07Z
       
       0 likes, 0 repeats
       
       the funniest part? I'm back in reverse engineering mode.it's not even a 3-argument version of strcmp. it's just a weird strcmp(char*,char*): It only takes two arguments! not even three!
       
 (DIR) Post #AoQPBJivTTaTydgukS by foone@digipres.club
       2024-11-26T05:32:04Z
       
       0 likes, 0 repeats
       
       how do you confuse a two-argument function for a FOUR argument function?borland. borland is how you do that.
       
 (DIR) Post #AoQPbFvGEGtpiXpTDk by foone@digipres.club
       2024-11-26T05:36:40Z
       
       0 likes, 0 repeats
       
       DirectSound?!this windows 3.x-ass program uses DirectX?!
       
 (DIR) Post #AoQPjdhlgt57nHW2Ns by onelson@mastodon.social
       2024-11-26T05:38:15Z
       
       0 likes, 0 repeats
       
       @foone was this windows 3.x-ass program written by copilot?
       
 (DIR) Post #AoQPm8FR6TW76IS6F6 by foone@digipres.club
       2024-11-26T05:38:36Z
       
       0 likes, 0 repeats
       
       @onelson It's been stuck on a CD-ROM since 1997, so NOPE
       
 (DIR) Post #AoQPsoc6VBdmEUF33I by onelson@mastodon.social
       2024-11-26T05:39:55Z
       
       0 likes, 0 repeats
       
       @foone so it was a skynet time travel situation. Got it.
       
 (DIR) Post #AoQQFE1Iiq7DOriHfU by foone@digipres.club
       2024-11-26T05:43:58Z
       
       0 likes, 0 repeats
       
       haha, 1991-1997 programmer: you made the LoadDirectSoundFuncptrs return a 0 for success, but you only ever return 0. your code smells with your bad decisions, which I can see THROUGH TIME from 30 years later
       
 (DIR) Post #AoQQMMblBruM3wAdrU by foone@digipres.club
       2024-11-26T05:45:15Z
       
       0 likes, 0 repeats
       
       you even check, in the calling code, that it returns 0 and not some other value. you have fallback code for if it fails. it can't fail.
       
 (DIR) Post #AoQQVtFBDk0Xt39SDY by foone@digipres.club
       2024-11-26T05:46:58Z
       
       0 likes, 0 repeats
       
       correction, you're returning a boolean.and it's hardcoded to always return a 0, which is false. so this ALWAYS fails.
       
 (DIR) Post #AoQQZIHca6KiPiusoi by foone@digipres.club
       2024-11-26T05:47:13Z
       
       0 likes, 0 repeats
       
       I'm guessing this is dummying out code that didn't work
       
 (DIR) Post #AoQQh8gw7vM6yyUxkW by flyingsaceur@ioc.exchange
       2024-11-26T05:48:57Z
       
       0 likes, 0 repeats
       
       @foone 🎵I’m the epitome / of double arity
       
 (DIR) Post #AoQRG6bvr3XYfGpZwW by todb@infosec.exchange
       2024-11-26T05:55:19Z
       
       0 likes, 0 repeats
       
       @foone I haven’t thought about Borland C since, oh, 1992, and upon reflection, holy smokes did I spend way, way too much energy on that nonsense.Thankfully I had forgotten nearly all of it. UNTIL NOW, THANKS. 🙏
       
 (DIR) Post #AoQRwAA72cunqDsBf6 by foone@digipres.club
       2024-11-26T06:02:56Z
       
       0 likes, 0 repeats
       
       yeah this code is just casually mixing pascal and stdcall calling conventions. I am in hell
       
 (DIR) Post #AoQSAcZGE7Q1zgWvFw by foone@digipres.club
       2024-11-26T06:05:34Z
       
       0 likes, 0 repeats
       
       okay yeah. this is not remotely delphi. this is C++. ghidra mis-detected it, and that may have messed up the analysis
       
 (DIR) Post #AoQSRDUCjTmv7z4ujg by foone@digipres.club
       2024-11-26T06:08:31Z
       
       0 likes, 0 repeats
       
       yep and it's buggered every single function, even after changing language. I can delete and recreate functions, but that might not fix them because they're getting hints from downstream functions which it still thinks are __fastcall and not __stdcall
       
 (DIR) Post #AoQSUBo5Qt1OmvnOGu by foone@digipres.club
       2024-11-26T06:08:55Z
       
       0 likes, 0 repeats
       
       maybe I just need to delete every function and re-analyze from scratch
       
 (DIR) Post #AoQSi17twH5NiYeodc by foone@digipres.club
       2024-11-26T06:11:33Z
       
       0 likes, 0 repeats
       
       (i just re-imported the EXE as a new file, and I'll manually port over the dozen or so symbols I've found.
       
 (DIR) Post #AoQSnOozGkPgecNQWm by foone@digipres.club
       2024-11-26T06:12:28Z
       
       0 likes, 0 repeats
       
       BTW it turns out there's cheats in the windows version.maybe in the other versions too? I don't think anyone has found them if so.https://www.speedrun.com/super_solvers_gizmos_and_gadgets/forums/vcalv
       
 (DIR) Post #AoQSq70TxZQmGv2ylk by foone@digipres.club
       2024-11-26T06:12:44Z
       
       0 likes, 0 repeats
       
       I spotted them in the EXE and googled to see if they were known. Yep. At least in that one post!
       
 (DIR) Post #AoQT1dS9fJoS5VUA1w by ppxl@social.tchncs.de
       2024-11-26T06:15:06Z
       
       0 likes, 0 repeats
       
       @foone "manage to hit the spider with the boulder on the desert planet in Space Quest I"
       
 (DIR) Post #AoQThcXTSFizPmzfCy by matt@proud.social
       2024-11-26T06:22:16Z
       
       0 likes, 0 repeats
       
       @foone Did T.L.C. use a common asset storage formats?  I’m curious how I’d go about inspecting some of these uralt binaries.
       
 (DIR) Post #AoQUOS4wDn2zQQ4NTU by h3@chaos.social
       2024-11-26T06:30:22Z
       
       0 likes, 0 repeats
       
       @fooneYou could also use an uppercase ß, the ẞ
       
 (DIR) Post #AoQUWCnWv1vMLiclcW by foone@digipres.club
       2024-11-26T06:31:53Z
       
       0 likes, 0 repeats
       
       @matt I'm not sure yet, I've not been looking at the datafiles yet, just the EXE with Ghidra
       
 (DIR) Post #AoQUmP7mr8gfDHp7aK by foone@digipres.club
       2024-11-26T06:34:48Z
       
       0 likes, 0 repeats
       
       ah-ha! see that?They call GetVersion(), then no matter if it's below 4 or not, they jump to the SAME PLACE, and there's dead code below it.This EXE has been patched after compilation!
       
 (DIR) Post #AoQUqr4StU1Z2uOMj2 by scribblesonnapkins@mastodon.social
       2024-11-26T06:35:36Z
       
       0 likes, 0 repeats
       
       @foone I always wanted to go back and design an updated game like the super solvers style.
       
 (DIR) Post #AoQV6RACz6bBKSVanA by foone@digipres.club
       2024-11-26T06:38:23Z
       
       0 likes, 0 repeats
       
       yeah the EXE has a modification date of 1998, but the compile time inside the EXE says 1994
       
 (DIR) Post #AoQVN6aqiYhQSDuxEW by foone@digipres.club
       2024-11-26T06:41:25Z
       
       0 likes, 0 repeats
       
       They patched out this dialog box.
       
 (DIR) Post #AoQVPsE6acholUbDf6 by foone@digipres.club
       2024-11-26T06:41:43Z
       
       0 likes, 0 repeats
       
       I think the typo in the name is a bug on my resource viewer
       
 (DIR) Post #AoQVrS1TbkejbVqHNw by foone@digipres.club
       2024-11-26T06:46:54Z
       
       0 likes, 0 repeats
       
       yeah, there's other dialogs like "you need to be in 386 enhanced mode!" that I think they just orphaned when they made this version win9x only
       
 (DIR) Post #AoQVu1JjM4jTeAbbPc by foone@digipres.club
       2024-11-26T06:47:16Z
       
       0 likes, 0 repeats
       
       I just realized this is a game. fuck, half this should be on TCRF. I do not have time for that right now
       
 (DIR) Post #AoQWMWGHtitnjBaIro by glyph@mastodon.social
       2024-11-26T06:52:27Z
       
       0 likes, 0 repeats
       
       @foone this is paradoxically making me anxious that they have left an orphaned backgrounded job running in the shell somehow
       
 (DIR) Post #AoQX2r8Eh3BgcN0RG4 by foone@digipres.club
       2024-11-26T07:00:10Z
       
       0 likes, 0 repeats
       
       well that sure is a fuck of a thing.playing with the cheats and there's a pick-a-puzzle mode.It looks like this.
       
 (DIR) Post #AoQX5UtLq0j8VhIrpI by foone@digipres.club
       2024-11-26T07:00:31Z
       
       0 likes, 0 repeats
       
       the funniest part? that's an image. like, in the game. they just screenshotted an image and wired up some basic clickables. It's not a real dialog!
       
 (DIR) Post #AoQXG9tuDqvQape8xc by foone@digipres.club
       2024-11-26T07:02:35Z
       
       0 likes, 0 repeats
       
       puzzle counts:43 scales40 electricity 33 energy42 force 42 gear20 jigsaw30 "magnetizm"20 simple machine
       
 (DIR) Post #AoQXcJv9eGKa2anXfM by foone@digipres.club
       2024-11-26T07:06:36Z
       
       0 likes, 0 repeats
       
       I should automate this and dump screenshots of all 270 puzzles
       
 (DIR) Post #AoQXn1gDo8vIeYuzZo by foone@digipres.club
       2024-11-26T07:08:31Z
       
       0 likes, 0 repeats
       
       btw: at first glance, no evidence of cheats in the DOS version
       
 (DIR) Post #AoQXvm90wE094oYdhg by DJGummikuh@mastodon.social
       2024-11-26T07:10:00Z
       
       0 likes, 0 repeats
       
       @foone well I mean at the very least, they wouldn't have cheats looking like a windows 3.1 dialog in a game that predates Windows 3.1, right? ^^
       
 (DIR) Post #AoQYjaLX4qqmxsAEwC by foone@digipres.club
       2024-11-26T07:19:04Z
       
       0 likes, 0 repeats
       
       the documented cheats are missing at least one: ctrl-wI have no idea what it does besides print "beam me up sid" in the corner.it does SOMETHING, I just don't understand what yet.
       
 (DIR) Post #AoQZ0AtmwZ4Uxo673Q by foone@digipres.club
       2024-11-26T07:22:05Z
       
       0 likes, 0 repeats
       
       the producer was Sid Weber
       
 (DIR) Post #AoQauFq1rl4gSBdz6W by pascaldragon@metalhead.club
       2024-11-26T07:43:24Z
       
       0 likes, 0 repeats
       
       @foone though nowadays uppercase sharp-s exists and is allowed to be used as well 😅 STRAẞE 😁
       
 (DIR) Post #AoQb3S4Flb8WzMgOPY by pascaldragon@metalhead.club
       2024-11-26T07:45:01Z
       
       0 likes, 0 repeats
       
       @foone a pitty. Was already looking forward to some Delphi stuff 😢
       
 (DIR) Post #AoQb89sIpn4w0rKyK8 by foone@digipres.club
       2024-11-26T07:46:00Z
       
       0 likes, 0 repeats
       
       a linked list of fonts, indexed by number.that's an interesting approach to font storage
       
 (DIR) Post #AoQbY6lB2QPzshNV6O by aatheus@batchats.net
       2024-11-26T07:50:39Z
       
       0 likes, 0 repeats
       
       @foone Oh wow.. I remember playing this game as a kid
       
 (DIR) Post #AoQdIJI4siVo1GMUgi by foone@digipres.club
       2024-11-26T08:10:08Z
       
       0 likes, 0 repeats
       
       found another byte-level patch:there's a debug-printf function which has a hack at the top to set the first character of the printf template to \0
       
 (DIR) Post #AoQevfV8KwnY9UneTY by foone@digipres.club
       2024-11-26T08:28:28Z
       
       0 likes, 0 repeats
       
       the game's EnsureFontLoaded function seems to be called with 2 font numbers:15000 and 200I'm sure that makes sense to someone
       
 (DIR) Post #AoQf7hmHhLmGgiYsmO by foone@digipres.club
       2024-11-26T08:30:40Z
       
       0 likes, 0 repeats
       
       okay and I can spot a chunk index I sorta understand inside FONTS.DAT which specifies 3 fonts: 200, 300, and 15000
       
 (DIR) Post #AoQfAh58k3mfOlo3M0 by KeyJ@mastodon.gamedev.place
       2024-11-26T08:30:56Z
       
       0 likes, 0 repeats
       
       @foone The one used for, like, Windows 3.x Standard mode. (And also Xenix, of course :)
       
 (DIR) Post #AoQfDLOdpApT0kBwWG by foone@digipres.club
       2024-11-26T08:31:13Z
       
       0 likes, 0 repeats
       
       so it seems to identify chunks by a 4-digit character string (like NFNT) and a 16bit integer.Very similar to what 3d Movie Maker does
       
 (DIR) Post #AoQh2ImtNqHtduOh4y by foone@digipres.club
       2024-11-26T08:52:03Z
       
       0 likes, 0 repeats
       
       so I think what's going on is these weirdos abused the 16bit linker to build their DAT filesthat's why they're all DLL/EXE files
       
 (DIR) Post #AoQhGtXFYMVhfT2TqK by foone@digipres.club
       2024-11-26T08:54:41Z
       
       0 likes, 0 repeats
       
       so it seems the NE files have multiple resource sections, and the first one has an index to get to the sub-chunk, and the rest are just in that order.
       
 (DIR) Post #AoQhJgnBO7350yp9CC by foone@digipres.club
       2024-11-26T08:55:03Z
       
       0 likes, 0 repeats
       
       I don't know if they wrote their own NE executable header parser or there's some weird API for it that they're using
       
 (DIR) Post #AoQhvaagtRNwml3LzE by foone@digipres.club
       2024-11-26T09:02:04Z
       
       0 likes, 0 repeats
       
       oh goody it emulates file numbers on top of the whole windows Handle thing.so it's limited to 127 files open at once
       
 (DIR) Post #AoQi3DaMJJATkhXGdc by th@social.v.st
       2024-11-26T09:03:22Z
       
       0 likes, 0 repeats
       
       @foone what about upperestcase and lowerestcase? https://sigbovik.org/2021/proceedings.pdf
       
 (DIR) Post #AoQjW3dcTQDDFkNOdc by foone@digipres.club
       2024-11-26T09:19:38Z
       
       0 likes, 0 repeats
       
       correction: 30 files
       
 (DIR) Post #AoQniSpD3RYkf0y7gu by foone@digipres.club
       2024-11-26T10:06:54Z
       
       0 likes, 0 repeats
       
       okay yeah they're parsing their own EXE Files. absolutely wild.
       
 (DIR) Post #AoQo33KX2Sn7ffR9fM by foone@digipres.club
       2024-11-26T10:10:38Z
       
       0 likes, 0 repeats
       
       Borland Turbo C++: I know compilers who merge constant strings and they're all cowards
       
 (DIR) Post #AoQoCCmTGr2daVryQy by foone@digipres.club
       2024-11-26T10:12:15Z
       
       0 likes, 0 repeats
       
       I think I found the "load this resource by type+ID" function.I had temporarily named it "something_resource_something"
       
 (DIR) Post #AoQqeT7SJmuUHGI1k8 by dryak@mstdn.science
       2024-11-26T10:39:42Z
       
       0 likes, 0 repeats
       
       @foone ...and other dialects of German further do this with diacritics:toupper("ö") == "OE"E.g.: Swiss keyboards don't have upper case diacritics, shift instead switches between German and French diacritics, and it is customary to write some words with the "e" split appart, see: https://en.m.wikipedia.org/wiki/Swiss_Standard_German(Meanwhile, in French, Swiss just skip the diacritics on uppercase, toupper("ça") == "CA")
       
 (DIR) Post #AoQtIiKJOekovxca2K by MedeaVanamonde@chaosfem.tw
       2024-11-26T11:09:30Z
       
       0 likes, 0 repeats
       
       @foone you appear to have gone to sleep just before i was rudely awakened by an over flow and ended up mopping in the middle of the night .Too sleep to work thru this thread night night
       
 (DIR) Post #AoR0bEcokXwPzu3W1w by jeeger@mastodon.social
       2024-11-26T12:31:10Z
       
       0 likes, 0 repeats
       
       @foone wait, this was years before Unicode, surely? Did anyone implement this before Unicode?
       
 (DIR) Post #AoRJFNuJSMX1XmX8cK by Canageek@wandering.shop
       2024-11-26T15:25:11Z
       
       0 likes, 0 repeats
       
       @foone ahhh, just seemed similar to stuff I've done with sed or awk when I needed to generate a bunch of input files for physics simulations
       
 (DIR) Post #AoRUi6OKl2bT75TJ1k by keen456@infosec.exchange
       2024-11-26T18:08:36Z
       
       0 likes, 0 repeats
       
       @foone Just wanted to say I love this thread- enjoyed Gizmos and Gadgets a ton.
       
 (DIR) Post #AoRqruQsH2ixuVk2Nc by cmarqu@dresden.network
       2024-11-26T22:16:49Z
       
       0 likes, 0 repeats
       
       @foone To be really nitpicky, JS is a bit outdated here (since 2017): https://www.youtube.com/watch?v=j64acCeati4&t=261s
       
 (DIR) Post #AoT02uv3vEqRsePB0S by truh@shark.community
       2024-11-27T11:34:30Z
       
       0 likes, 0 repeats
       
       @foone maybe we need to rollback the German language to the pre 2017.06 release for security reasons
       
 (DIR) Post #AoT8JRUtMiFTBZYTT6 by osma@sigmoid.social
       2024-11-27T13:07:01Z
       
       0 likes, 0 repeats
       
       @foone Isn't that a bit like the INTERCAL reference manual, from 1973?https://3e8.org/pub/intercal.pdfExcept it's not really fictional since it was implemented for real and there are actual programs written in it.The basic idea IIRC was that the language was intended to be different from all other computer languages. So there are lots of hilarious data structures and perplexing operators. Even the tables and diagrams in the manual are a bit...special.https://en.wikipedia.org/wiki/INTERCAL
       
 (DIR) Post #AoWxRPBzUrYDUT9Fyq by foone@digipres.club
       2024-11-29T09:24:07Z
       
       0 likes, 0 repeats
       
       I have altered the gear puzzlepray I do not alter it any further
       
 (DIR) Post #AoWxmRziH48cGIRNWS by darkling@mstdn.social
       2024-11-29T09:27:58Z
       
       0 likes, 0 repeats
       
       @foone "Who are you calling a crank?"
       
 (DIR) Post #AoWz6Rym8kDBxd6Ptg by aurora@toot.queer-lexikon.net
       2024-11-29T09:42:35Z
       
       0 likes, 0 repeats
       
       @foone cutiee
       
 (DIR) Post #AobIgOT5LaJhG1yKHY by foone@digipres.club
       2024-12-01T11:41:00Z
       
       0 likes, 0 repeats
       
       it does nothing to stop you from just copying the files onto the PC and just changing the INI, and then it runs without CD:[Gizmos & Gadgets! CD]CDDrive=C:\Tlcwin\Ssgwincd\CD\Ssgwincd\
       
 (DIR) Post #AobJ1C1MoudkjcvPAu by foone@digipres.club
       2024-12-01T11:44:46Z
       
       0 likes, 0 repeats
       
       set your CDDrive to C:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to crash the game
       
 (DIR) Post #AobJ3iI5oSiBOfwxu4 by foone@digipres.club
       2024-12-01T11:45:02Z
       
       0 likes, 1 repeats
       
       I know programmers who use strncpy and they're all cowards
       
 (DIR) Post #AobKI0CI8MYQwPc7Y8 by signaleleven@fosstodon.org
       2024-12-01T11:59:00Z
       
       0 likes, 0 repeats
       
       @foone input bound checking is the hallmark of a nanny state. The users are adults, they can make their own decisions . They "make their own research" I hear.
       
 (DIR) Post #AobM31ESChMbiPbmnw by admin@mastodon.ai8w.ddns.net
       2024-12-01T12:18:41Z
       
       0 likes, 0 repeats
       
       @foone Why not an Atari 2600 emulator... make them find the easter egg in "Yar's Revenge"... or complete the level on "Pitfall" that has all the snakes.Did I just give away my age?
       
 (DIR) Post #AobM5zUR8bThBGV9GK by foone@digipres.club
       2024-12-01T12:18:54Z
       
       0 likes, 0 repeats
       
       I thought I'd figured out where it loads images. Nope! This is for palettes.
       
 (DIR) Post #AobMtpHrLVRQ14Njeq by foone@digipres.club
       2024-12-01T12:28:18Z
       
       0 likes, 0 repeats
       
       looks like ASEQ is the image format.Here, I've used it to make this electricity puzzle impossible
       
 (DIR) Post #AobMyrO0y5kXyVf3ZI by mcc@mastodon.social
       2024-12-01T12:29:13Z
       
       0 likes, 0 repeats
       
       @foone Palette here made this look very sci fi which was causing that bottom right set of meters to REALLY confuse me until I realized this was super solvers
       
 (DIR) Post #AobN3jj2sW11fBp7HE by foone@digipres.club
       2024-12-01T12:30:07Z
       
       0 likes, 0 repeats
       
       ahh, the most obscure of the electrical components, the zeppelin
       
 (DIR) Post #AobN7JPudQcTE8ZyHA by preferred@expressional.social
       2024-12-01T12:30:41Z
       
       0 likes, 0 repeats
       
       @foone zap-pelin; more like
       
 (DIR) Post #AobNznYCoYOyK4RIBc by ozone89@techhub.social
       2024-12-01T12:40:34Z
       
       0 likes, 0 repeats
       
       @foone
       
 (DIR) Post #AobQqYomWKJ5t1Tm0u by Sweepi@social.tchncs.de
       2024-12-01T13:12:26Z
       
       0 likes, 0 repeats
       
       @foone I swear i haven seen these graphic assets (the coil etc) in a (learning) computer game like twenty-something years ago. cant remember the name...
       
 (DIR) Post #AobRM1DKzibavrxv16 by foone@digipres.club
       2024-12-01T13:18:11Z
       
       0 likes, 0 repeats
       
       @Sweepi Super Solvers Gizmos and Gadgets is what I'm hacking on
       
 (DIR) Post #AobRPKYLY8DZmON5iy by foone@digipres.club
       2024-12-01T13:18:19Z
       
       0 likes, 0 repeats
       
       @snowfox sadly not
       
 (DIR) Post #AobT2jrBVJubVQXPRQ by foone@digipres.club
       2024-12-01T13:37:07Z
       
       0 likes, 0 repeats
       
       yeah these punks just wrote their own code to parse NE headers. presumably because they made this silly resource scheme on windows 3.x, but had to rewrite some of it to handle win9x
       
 (DIR) Post #AobyleSvUbTAOa5TtY by gadgetoid@fosstodon.org
       2024-12-01T19:32:30Z
       
       0 likes, 0 repeats
       
       @foone is this aLED Zeppelin?
       
 (DIR) Post #AocVrzSXeEujjPXOpU by foone@digipres.club
       2024-12-02T01:43:23Z
       
       0 likes, 0 repeats
       
       @kevingranade this code was originally written in ~1993 with Borland Turbo C++. I don't think it supported stpncpy
       
 (DIR) Post #Aocj5MYkN9wWXm9Awq by foone@digipres.club
       2024-12-02T04:11:33Z
       
       0 likes, 0 repeats
       
       hResInfo = FindResourceA(*(HMODULE *)((int)&pLVar3[3].prev + 2),                               (LPCSTR)(uint)*(ushort *)&new_node[1].next,chunk_type);heuristically decompiled C is such a beautiful language
       
 (DIR) Post #AocjCFWiuz2Yl9U5Zo by foone@digipres.club
       2024-12-02T04:12:51Z
       
       0 likes, 0 repeats
       
       So it seems this code is using a C-based (I have seen no hint of C++ in this code, so I think it's C) linked list library.
       
 (DIR) Post #AocjFZFq1lw2oRAVrE by foone@digipres.club
       2024-12-02T04:13:24Z
       
       0 likes, 0 repeats
       
       since it's C, that means they're using some kind of macro system that's going to have FUN type safety issues.
       
 (DIR) Post #AocjLRqcTjdhZvB1iy by foone@digipres.club
       2024-12-02T04:14:34Z
       
       0 likes, 0 repeats
       
       because they've got functions I've called SafeNodeGetNext and UnsafeNodeGetNext that they use on different linked lists, with different types of different sizes.
       
 (DIR) Post #AocjTbq5DNrmsmok8e by foone@digipres.club
       2024-12-02T04:15:59Z
       
       0 likes, 0 repeats
       
       that's what the "pLVar3[3].prev" nonsense is about. The code is accessing the, uh... 36th? bytes in a struct autodetected as a LinkedListNode struct, which is only 8 bytes. So it has to assume it's an array and a member access
       
 (DIR) Post #AocjoGIMVf2a99tOvQ by foone@digipres.club
       2024-12-02T04:19:45Z
       
       0 likes, 0 repeats
       
       it's not. It's actually just a member access to some resource id in a completely unrelated (as far as the compiler & decompiler knows) struct, like a ResourceListNode or something
       
 (DIR) Post #AocpNP0saUy35jI66K by foone@digipres.club
       2024-12-02T05:22:02Z
       
       0 likes, 0 repeats
       
       @delan Wow. I'm wondering if that just means one per compilation unit? Like, this is 39 separate .c files, all containing the word "TEXT"? That seems like a lot.
       
 (DIR) Post #AocpuyimqXaDOWq2xE by foone@digipres.club
       2024-12-02T05:28:08Z
       
       0 likes, 0 repeats
       
       @delan yeah honestly that makes more sense, if they just don't do constant merging at all. I'm using 1.12 which says it was compiled on a Borland from 1995, so maybe. I'd have to check the compiler to see, and I'm not gonna go that far yet, for an idle curiosity
       
 (DIR) Post #Aocq8Os6vnOwGNbEzw by foone@digipres.club
       2024-12-02T05:30:33Z
       
       0 likes, 0 repeats
       
       and the first problem with this is that I don't know how big ResourceListNode is either, I'm going to have to guess unless I can track down a malloc somewhere. Which I guess should be easy, in a linked list? they're mallocing node-sized chunks all over the place.
       
 (DIR) Post #AocqRxOcnJYgqC8Jwe by foone@digipres.club
       2024-12-02T05:34:09Z
       
       0 likes, 0 repeats
       
       @delan yeah, I just re-imported the exe as borlandcpp and went from there. But it seems the incorrectly analyzed ones are a rarity now rather than the norm, which is a nice improvement.
       
 (DIR) Post #Aod3P88Ri27ggOY2me by foone@digipres.club
       2024-12-02T07:59:15Z
       
       0 likes, 0 repeats
       
       oh wait no, are these heterogeneous* linked lists? like there's different types shoved into this list? Eww! *not the right word but I can't remember the right one right now
       
 (DIR) Post #Aod3WoS4m8ejx7ORSy by barubary@infosec.exchange
       2024-12-02T08:00:40Z
       
       0 likes, 0 repeats
       
       @foone No, that sounds right to me.
       
 (DIR) Post #Aod3aVybPNk3oJN9SS by foone@digipres.club
       2024-12-02T08:01:20Z
       
       0 likes, 0 repeats
       
       psVar1 = (short *)((int)&((LinkedListNode *)((int)pLVar3 + 8))->next + 2);yeah something tells me this isn't being disassembled correctly. I'm telling it the wrong types. I think this is mixing two types freely and I'm pulling my hair out trying to reconcile the differences that only exist at runtime.
       
 (DIR) Post #Aod3e7HRAcJKNItqHA by typeswitch@gamedev.lgbt
       2024-12-02T08:01:54Z
       
       0 likes, 0 repeats
       
       @foone tuples
       
 (DIR) Post #Aod3zDCMMVRKoKaFxQ by foone@digipres.club
       2024-12-02T08:05:47Z
       
       0 likes, 0 repeats
       
       so in the first chunk of the function, it iterates through the list, looking for a match. if it finds one, it exits early. This is a "load a thing and stick it in a list of loaded things" type function, so that makes sense: don't load the same asset twice if we ask for it twice. but then once it's not found it, it allocates a 26 byte object, which it eventually inserts into the same global linked list as the list of objects it iterated at the beginning
       
 (DIR) Post #Aod427FQwSqrDzPFjs by foone@digipres.club
       2024-12-02T08:06:20Z
       
       0 likes, 0 repeats
       
       so the obvious thing to assume is that the things in that list are 26 bytes each, since we're sticking one in now.but the code that iterates through the list doesn't seem to make sense if you have 26-byte objects! something weirder is going on
       
 (DIR) Post #Aod4BDplpB2KG0kEgC by foone@digipres.club
       2024-12-02T08:07:59Z
       
       0 likes, 0 repeats
       
       questioning if my 26-byte-malloc is off. perhaps it's more like "allocate packet with header and data" and it's only taking the size of the data in the argument, so it allocates sizeof(header)+data_length
       
 (DIR) Post #Aod4gNevLSJxhqWr0C by count@berlin.social
       2024-12-02T08:13:31Z
       
       0 likes, 0 repeats
       
       @foone your journeys. I love them. 😆
       
 (DIR) Post #Aod5yxZgeOfSGMVDSS by foone@digipres.club
       2024-12-02T08:27:50Z
       
       0 likes, 0 repeats
       
       if the objects you stuff into the resource_linked_list collection are 26 bytes long, WHY ARE YOU REFERENCING THE 28th BYTE?CMP word ptr [ESI  + 0x1c ],0x50x1C is 28! that's 28! IS THIS JUST A MEMORY BUG IN THE ORIGINAL GAME?
       
 (DIR) Post #Aod638HCnqmGc2qc6q by foone@digipres.club
       2024-12-02T08:28:53Z
       
       0 likes, 0 repeats
       
       oh fuck, I think this is entirely my fault. I think there's two linked lists that are used separately by this function, but both are related to resources so I named them both basically "resource_linked_list" and didn't notice the function switches between which one it is using
       
 (DIR) Post #Aod69OBGaIZNfz3Lii by foone@digipres.club
       2024-12-02T08:30:03Z
       
       0 likes, 0 repeats
       
       so the second list probably has the 34-byte objects I originally thought this function used. So it's "ResourceNode" vs "ResourceNode3".very bad names, I need to change them immediately, but I don't know what to.
       
 (DIR) Post #Aod6ILRm7MXvnu2s0O by foone@digipres.club
       2024-12-02T08:31:43Z
       
       0 likes, 0 repeats
       
       I just made them resources_26byte_list and resources_34byte_list
       
 (DIR) Post #Aod6RFr2HQk1466q12 by foone@digipres.club
       2024-12-02T08:33:15Z
       
       0 likes, 0 repeats
       
       I should find all the global linked lists and systematically find out how big they are. They always use the same UnsafeNodeGetNext/SafeNodeGetNext functions to deal with them, I can just look up all call sites for those functions and see what linked list they're being used on. then I track where that linked list is used to where someone calls a malloc
       
 (DIR) Post #Aod6eVoeFNFWKjJXPs by foone@digipres.club
       2024-12-02T08:35:43Z
       
       0 likes, 0 repeats
       
       eww, the list definitely is heterogeneous. I just realized that the list always has an "end of list" marker that's just an instance of the base LinkedList struct, so it's only 8 bytes (two pointers). So every list has to contain two different types of objects, because some objects are the special end-of-list object.
       
 (DIR) Post #Aod6j3UWz4iVw04SDA by foone@digipres.club
       2024-12-02T08:36:28Z
       
       0 likes, 0 repeats
       
       I'm sure there's some benefit to having an end-of-list marker instead of just having the last object have a next pointer that's NULL, but I'm not sure what it is right now, too tired to think about linked lists in that much detail.
       
 (DIR) Post #Aod6zH6u7JZ6o2kn3I by foone@digipres.club
       2024-12-02T08:39:24Z
       
       0 likes, 0 repeats
       
       yup found the allocate, it's a 34 after all. Maybe I should just look at this allocator, is this a linked-list only allocator?
       
 (DIR) Post #Aod72X7b2o8zKgdCAy by tthbaltazar@chaos.social
       2024-12-02T08:39:36Z
       
       0 likes, 0 repeats
       
       @foone you can do some funny branchless programing but it requires a lot of preparationI've done some really high performance stuff that does parallel work on a single core by exploiting out of order execution when it comes to traversing trees/linked lists
       
 (DIR) Post #Aod75LbOKVMgTTuRm4 by foone@digipres.club
       2024-12-02T08:40:19Z
       
       0 likes, 0 repeats
       
       the reverse engineer who worked on this before me* has helpfully named the allocator "allocate_something" which doesn't tell me what exactly it allocates. * that would be me
       
 (DIR) Post #Aod7BjjZWLCl3WmZVI by foone@digipres.club
       2024-12-02T08:41:37Z
       
       0 likes, 0 repeats
       
       nah. I went through the 51 calls to allocate_something, but most don't look like they're for linked lists. this is just a generic malloc
       
 (DIR) Post #Aod7Zaxtm6ScoFrOfg by foone@digipres.club
       2024-12-02T08:45:58Z
       
       0 likes, 0 repeats
       
       oh nasty, this function picks which linked list to use based on a flag. I sure hope those are compatible types and they aren't just mixing different lists of different types entirely!
       
 (DIR) Post #Aod7nK6VGFzcZNQmjQ by foone@digipres.club
       2024-12-02T08:48:31Z
       
       0 likes, 0 repeats
       
       one annoying detail is that I'm pretty sure this program also uses pointers to specific items in global linked lists. which look in my disassembly just like iterating over a full list from a global head pointer. so if I see two SafeNodeGetNext calls to addresses A and B, I assume those are two different lists. It might just be that B is a specific item in the actual global list A.
       
 (DIR) Post #Aod8VAROY7gzLG6qeG by olemd@mastodon.social
       2024-12-02T08:56:19Z
       
       0 likes, 0 repeats
       
       @foone this sounds like a nightmare I've been working with. Linked lists to maps of mostly compatible function pointers. All cast to whatever pointer seems to be right, then called with varying numbers of pointer arguments, and the return values are promptly ignored.Obviously it pretends to be C++.
       
 (DIR) Post #Aod8Y4sDhm6Qwa2oS0 by prozacchiwawa@functional.cafe
       2024-12-02T08:56:44Z
       
       0 likes, 0 repeats
       
       @foone might simply have been the style at the time.  i remember my cs profs saying it was good practice to use singleton sentinel values by address instead of null pointers.
       
 (DIR) Post #Aod8nG20VE3btQrPqi by anathem@toot.kif.rocks
       2024-12-02T08:59:39Z
       
       0 likes, 0 repeats
       
       @foone How do you do all the reporting here and not break out of the flow? Each post would rip me out for half an hour or so...
       
 (DIR) Post #Aod96zGqWnc1hcD2H2 by foone@digipres.club
       2024-12-02T09:03:13Z
       
       0 likes, 0 repeats
       
       their coding style has a few safe_frob(ptr) functions that are just identical to unsafe_frob (ptr) by adding an "if (ptr==null) return;" at the top.
       
 (DIR) Post #Aod9DKonKNHWGi7CFc by foone@digipres.club
       2024-12-02T09:03:59Z
       
       0 likes, 0 repeats
       
       @anathem advanced ADHD. focusing on two things at once is sometimes indistinguishable from not being able to focus on either
       
 (DIR) Post #Aod9XPDGhK1Ngr8J6m by brezelradar@norden.social
       2024-12-02T09:07:56Z
       
       0 likes, 0 repeats
       
       @foone Aside: Since 2020 the standard suggests using the captial-ß ẞ instead of SS or SZ.Not sure if updating the implementations accordingly would make things easier, you will always encounter old code that expects the old behavior and might break if that changes.https://en.wikipedia.org/wiki/DIN_5008
       
 (DIR) Post #Aod9cNdTzNzyFLlajI by foone@digipres.club
       2024-12-02T09:08:55Z
       
       0 likes, 0 repeats
       
       over a half hour I checkedall 160ish calls to UnsafeNodeGetNext and SafeNodeGetNext, and my finally tally is:21 global linked lists! 18 unknowns, the font list, and the two resource ones.
       
 (DIR) Post #Aod9huCOLd8IgejIci by foone@digipres.club
       2024-12-02T09:09:30Z
       
       0 likes, 0 repeats
       
       motherfuckers loved them some linked lists apparently.
       
 (DIR) Post #Aod9r15A7o3ydqh0IS by foone@digipres.club
       2024-12-02T09:11:33Z
       
       0 likes, 0 repeats
       
       next search: 26 calls to AddToNodeList. presumably it'll get called on each of these near some code to allocate a new node. So I can nail down how big these linked lists are... and hopefully they're consistent enough to make that a meaningful question to ask.
       
 (DIR) Post #AodA0cXmDHUTQtel0K by gabe@mendeddrum.org
       2024-12-02T09:13:13Z
       
       0 likes, 0 repeats
       
       @foone if your memory accesses aren't spread out evenly, you'll have an imbalance and your bearings wear out really quickly.Same reason you should regularly regfrag your harddisk.
       
 (DIR) Post #AodA95llR9coOJEqC8 by anathem@toot.kif.rocks
       2024-12-02T09:14:49Z
       
       0 likes, 0 repeats
       
       @foone I feel that, but there's the ASD kicking in here, too, preventing me from flowing in two or more threads.... or it's autistic burnout for so long that it's normal to me now.
       
 (DIR) Post #AodAsljuEwrbae9LTk by foone@digipres.club
       2024-12-02T09:23:03Z
       
       0 likes, 0 repeats
       
       oh good one of them is VARIABLE SIZE!
       
 (DIR) Post #AodDCtUzIgXrM5tbqy by foone@digipres.club
       2024-12-02T09:49:04Z
       
       0 likes, 0 repeats
       
       I'm not sure what unknown lists 9,10, and 11 are for, but they're connected together. There's code to move things from 10 to 11, 11 to 9, and 11 to 10. and I think they're only ever added into 11?
       
 (DIR) Post #AodFCsg6YFv0ibDWu8 by foone@digipres.club
       2024-12-02T10:11:29Z
       
       0 likes, 0 repeats
       
       ahh, they've got an add function that looks like this:void func(LinkedListNode* list, LinkedListNode* node, void *)Turns out it takes a comparison function, so you can put things into the list at their sported position.
       
 (DIR) Post #AodG1fCuOae3hwmB5U by foone@digipres.club
       2024-12-02T10:20:40Z
       
       0 likes, 0 repeats
       
       @momo @anathem yeah. as well as a reminder to myself about what I'm doing
       
 (DIR) Post #AodGfBBXR7IQBAyg64 by foone@digipres.club
       2024-12-02T10:27:52Z
       
       0 likes, 0 repeats
       
       spotted a function an hour and a half ago and decided not to reverse it, but I guessed I might take a 4-character string and turn it into a 4-byte DWORD of it. finally got around to checking it (by just seeing what goes in and comes out in the debugger), and YEP I was correct
       
 (DIR) Post #AodGqdOAupH2pyLnMm by foone@digipres.club
       2024-12-02T10:29:53Z
       
       0 likes, 0 repeats
       
       3d Movie Maker does the same thing where they have chunk types that are 4 digit strings, because you can easily pass them around as 32bit values
       
 (DIR) Post #AodHNf5tb3XPgLY7Cy by foone@digipres.club
       2024-12-02T10:35:56Z
       
       0 likes, 0 repeats
       
       @delan bingo!
       
 (DIR) Post #AodLsIm322l5Fd8CmW by foone@digipres.club
       2024-12-02T11:26:05Z
       
       0 likes, 0 repeats
       
       @cyberspice oh I know, I just meant more that I have plenty of experience with this kind of thing, but specifically because of 3dmm
       
 (DIR) Post #AodM3HqWozyrYjStoO by foone@digipres.club
       2024-12-02T11:28:13Z
       
       0 likes, 0 repeats
       
       the game has a hard limit on how many allocations it can do: 500.
       
 (DIR) Post #AodMYVLGh7JSOPjGs4 by nabijaczleweli@101010.pl
       2024-12-02T11:33:31Z
       
       0 likes, 0 repeats
       
       @foone this is what C's lack of complex static initialisation does to a mf
       
 (DIR) Post #AoddUTQ3bFEgUYdICe by zbrown@floss.social
       2024-12-02T14:43:30Z
       
       0 likes, 0 repeats
       
       @foone 500 in use, or 500 ever?
       
 (DIR) Post #AoeGtWe6dXhdx18mlk by foone@digipres.club
       2024-12-02T22:04:44Z
       
       0 likes, 0 repeats
       
       @zbrown in use. they get recycled
       
 (DIR) Post #AoeGwD3huwoe4UOZii by foone@digipres.club
       2024-12-02T22:05:00Z
       
       0 likes, 0 repeats
       
       that's 500 in use at once. when you free the memory it goes back to the pool
       
 (DIR) Post #AoeH0W03R9XZyTjvay by foone@digipres.club
       2024-12-02T22:05:43Z
       
       0 likes, 0 repeats
       
       still, 500 is pretty low, especially since they're using linked lists which are one-alloc-per-node. 21 of those lists, in fact.
       
 (DIR) Post #AoeH3XiVVfD8AUyZLU by foone@digipres.club
       2024-12-02T22:06:42Z
       
       0 likes, 0 repeats
       
       although hardcoded it's adjustable by changing a line in the main() equivalent. I bet they didn't start with 500 and had to tune it up to bigger numbers
       
 (DIR) Post #AoeHN5OYWFOu7axkW0 by zbrown@floss.social
       2024-12-02T22:10:28Z
       
       0 likes, 0 repeats
       
       @foone phew, well that's …less concerning, I guess
       
 (DIR) Post #AoeJmv4vhLenYxEFhQ by foone@digipres.club
       2024-12-02T22:37:35Z
       
       0 likes, 0 repeats
       
       WHAT THE PIXEL ART FUCK IS GOING ON IN THIS SCREENSHOT?the pixel art itself is inconsistently stretched and then some windows DPI scaling nonsense is blurring the whole thing to make it even worse
       
 (DIR) Post #AoeK3zU0ZkMY976Dg0 by crobbler@mastodon.social
       2024-12-02T22:40:40Z
       
       0 likes, 0 repeats
       
       @foone I sense Gizmos and Gadgets. I loved that game!
       
 (DIR) Post #AoeKBYSSwAnge8z6sy by foone@digipres.club
       2024-12-02T22:41:52Z
       
       0 likes, 0 repeats
       
       The DOS game this is a port of, for comparison.The lack of DPI stretch is just because it's DOS and I don't have my DOSBox-X misconfigured, but HEY LOOK CONSISTENT PIXEL WIDTHS
       
 (DIR) Post #AoeKMrNkv0YSWXAkMq by foone@digipres.club
       2024-12-02T22:43:44Z
       
       0 likes, 0 repeats
       
       @Foritus don't tempt me to load this game up on an actual CRT.
       
 (DIR) Post #AoeLlQTKCszGG03Tfs by foone@digipres.club
       2024-12-02T22:59:40Z
       
       0 likes, 0 repeats
       
       this project just added a new stretch goal: unfuck the graphics for the win32 version so you can run this on modern computers without it looking like 7 types of ass
       
 (DIR) Post #AoeM0SXSny4l0j9wWG by ancients@infosec.exchange
       2024-12-02T23:01:56Z
       
       0 likes, 0 repeats
       
       @foone This is one of those Foone threads where a memory is forcibly pried up from the depths of my brain. I absolutely played this game as a kid.
       
 (DIR) Post #AoeMOgDXbEbMNtOEzo by foone@digipres.club
       2024-12-02T23:06:48Z
       
       0 likes, 0 repeats
       
       GetAsyncKeyState considers the mouse to be a keyboard?!
       
 (DIR) Post #AoeMXT21zcDy61CFDk by foone@digipres.club
       2024-12-02T23:08:22Z
       
       0 likes, 0 repeats
       
       oh good and they're "sticky" in a way that only works reliably on windows 16bit
       
 (DIR) Post #AoeMkcPyPGdOyHfNBo by foone@digipres.club
       2024-12-02T23:10:48Z
       
       0 likes, 0 repeats
       
       I need to start remembering to check if a function is ever called before I waste 5 minutes reverse engineering it. I know exactly how this GetMouseButtonsDown function works and I've spotted at least one minor bug, but now I just found out it's dead code that's never called
       
 (DIR) Post #AoeMotONEroUm3xKzI by vxo@digipres.club
       2024-12-02T23:11:28Z
       
       0 likes, 0 repeats
       
       @foone oh you must be trying to dissect something I wrote! oh hi.
       
 (DIR) Post #AoeMuF7rrPsXd0mqLw by foone@digipres.club
       2024-12-02T23:12:31Z
       
       0 likes, 0 repeats
       
       JUST DID IT AGAIN RIGHT AFTER THIS POSTI'm a trusting soul, I assume code is in a binary because it's needed for that binary to run. I'm not so used to these early-90s compilers who leave everything in the C file in the binary
       
 (DIR) Post #AoeN0GrqIZHglcAKIa by grumpasaurus@infosec.exchange
       2024-12-02T23:13:02Z
       
       0 likes, 0 repeats
       
       @foone tests can't fail if they don't ever call the specified function
       
 (DIR) Post #AoeNOlIao4eQ6AM7kG by foone@digipres.club
       2024-12-02T23:17:59Z
       
       0 likes, 0 repeats
       
       else if ((uMsg != WM_NCACTIVATE) && (uMsg == WM_KEYDOWN)) {amazing comparison folding here, compiler. so it doesn't match WM_NCACTIVATE, but at the same time it does match WM_KEYDOWN? amazing. almost like you could ignore that first test
       
 (DIR) Post #AoeNUnWhRC9wkDpfeq by foone@digipres.club
       2024-12-02T23:19:03Z
       
       0 likes, 0 repeats
       
       @trini most newer stuff I've seen is compiled with a compiler that leaves out dead code, yeah.
       
 (DIR) Post #AoeNZhcunflLtX4vYG by foone@digipres.club
       2024-12-02T23:20:01Z
       
       0 likes, 0 repeats
       
       @vxo possibly! did you work for The Learning Company in the 90s?
       
 (DIR) Post #AoeNeBBCremUi6FixU by foone@digipres.club
       2024-12-02T23:20:49Z
       
       0 likes, 0 repeats
       
       @trini well I do a lot of hacking on console games, and over there saving space has always been a need, to fit on ROMs or load faster off slow CDs
       
 (DIR) Post #AoeQUbdPwyW1j3ZhVQ by foone@digipres.club
       2024-12-02T23:52:40Z
       
       0 likes, 0 repeats
       
       hah. It takes all the keypresses from the WM_CHAR/WM_KEYDOWN messages and puts them in a circular buffer.You know, how keypresses worked on DOS... which this game started as.
       
 (DIR) Post #AoeS6Ee1yWGtNiMuXo by foone@digipres.club
       2024-12-03T00:10:43Z
       
       0 likes, 0 repeats
       
       WHY DOES IT HAVE A SECOND CIRCULAR KEYBOARD BUFFER
       
 (DIR) Post #AoeSTB3jTJl2vDKW1o by anselmschueler@ieji.de
       2024-12-03T00:14:24Z
       
       0 likes, 0 repeats
       
       @foone possibly the compiler didn't know the values of the constants
       
 (DIR) Post #AoeSkJMZqpqzbCJYqO by foone@digipres.club
       2024-12-03T00:17:59Z
       
       0 likes, 0 repeats
       
       there might be a cheat code no one has found on the capslock key but I can't test it because I don't have a capslock key
       
 (DIR) Post #AoeT8ZQ7noLGLjXdBI by foone@digipres.club
       2024-12-03T00:22:20Z
       
       0 likes, 0 repeats
       
       Help I'm in the statusbar
       
 (DIR) Post #AoeTBunKn0u3Vezab2 by foone@digipres.club
       2024-12-03T00:22:29Z
       
       0 likes, 0 repeats
       
       @ironiridis I HOLD DOWN SHIFT VERY HARD
       
 (DIR) Post #AoeTTuSKmtDFfhkZns by foone@digipres.club
       2024-12-03T00:26:05Z
       
       0 likes, 0 repeats
       
       @ironiridis no PCB, it's a membrane and I hate it
       
 (DIR) Post #AoeTWK6CQ0dNmUY17w by foone@digipres.club
       2024-12-03T00:26:38Z
       
       0 likes, 0 repeats
       
       the virtual screen height is 320 pixels?huh. that's a weird number for a HEIGHT
       
 (DIR) Post #AoeThHPUkuWEcxnVyK by foone@digipres.club
       2024-12-03T00:28:39Z
       
       0 likes, 0 repeats
       
       oh no, it's worse, it's like ... 385?
       
 (DIR) Post #AoeTkon96IYz1jXzk0 by foone@digipres.club
       2024-12-03T00:29:16Z
       
       0 likes, 0 repeats
       
       oh, 384. less weird
       
 (DIR) Post #AoeUTJrovMeU9BxBZY by foone@digipres.club
       2024-12-03T00:37:19Z
       
       0 likes, 0 repeats
       
       the width is something north of 480 pixels, so I'm guessing 512? weirdly the save games save your pixel position, so even exiting and reentering won't unfuck your position
       
 (DIR) Post #AoeVXQe3lWCOHW2Zhw by Argonel@dice.camp
       2024-12-03T00:49:13Z
       
       0 likes, 0 repeats
       
       @foone it's to balance the gyroscope forces.  One buffer circulates clockwise, the other anti-clockwise. With native keyboards they may align the buffers to have the ones more smoothly enter the cable.
       
 (DIR) Post #AoeWuoDWOKZa0GL8Km by foone@digipres.club
       2024-12-03T01:04:37Z
       
       0 likes, 0 repeats
       
       @onfy yeah this is a Mac program ported to DOS ported to win16 ported to win95. It's slightly weird
       
 (DIR) Post #AoeYbpkydv3ZBV4Hw0 by david@fedi.machaj.info
       2024-12-03T01:23:35Z
       
       0 likes, 0 repeats
       
       @foone “7 types of ass” sounds like the name of a band
       
 (DIR) Post #AoebGE2lxnCQ07mPg0 by ghosttie@mastodon.gamedev.place
       2024-12-03T01:53:15Z
       
       0 likes, 0 repeats
       
       @foone if you think about it, a mouse is just a keyboard with only two buttons
       
 (DIR) Post #AoehlmNmwQSLCg2U52 by foone@digipres.club
       2024-12-03T03:06:11Z
       
       0 likes, 0 repeats
       
       @delan oh neat!
       
 (DIR) Post #AoejMZiT67MkaVozB2 by foone@digipres.club
       2024-12-03T03:24:08Z
       
       0 likes, 0 repeats
       
       yeah the windows version runs as a 512x384 box inside a larger window, while the DOS version is 320x200 .
       
 (DIR) Post #AoejTiDbsuuAz5n65A by foone@digipres.club
       2024-12-03T03:25:27Z
       
       0 likes, 0 repeats
       
       why in the fuck didn't they just make it 640x480 and upscale it by 2x? they did some kind of bad nearest-neighbor scale on all the sprites to enlarge them by 60% and it looks terrible
       
 (DIR) Post #Aoekyri6kBhjM1TUtE by foone@digipres.club
       2024-12-03T03:42:08Z
       
       0 likes, 0 repeats
       
       I need to write some code to pull bitmaps from these datafiles. I gotta see if they're doing this at runtime or if they encoded the shit into the datafiles
       
 (DIR) Post #Aoel231l7lTfK1BTN2 by foone@digipres.club
       2024-12-03T03:42:33Z
       
       0 likes, 0 repeats
       
       I have some basic info on how the .DAT files work but I've not yet got the ability to list contents and dump 'em.
       
 (DIR) Post #AoeqAfZSChuYwwsJQu by falk_@chaos.social
       2024-12-03T04:40:18Z
       
       0 likes, 0 repeats
       
       @foone 512x384 is the 12“ color resolution of the Mac LC series - did they do a Mac port as well?
       
 (DIR) Post #AoeqPTax0oZI9QdTDU by foone@digipres.club
       2024-12-03T04:42:41Z
       
       0 likes, 0 repeats
       
       @falk_ yep. And I bet what happened was they built the Mac one off the assets (and maybe not source) of the DOS one, and then when they made the windows version they ended up porting the mac version assets over instead of the DOS assets?
       
 (DIR) Post #AoeqawcHS35zLRj4V6 by foone@digipres.club
       2024-12-03T04:45:10Z
       
       0 likes, 0 repeats
       
       @falk_ if this project goes on long enough I'll have to look at the mac version. My roommate just bought an LC, maybe I can just burn an ISO and install it on there?
       
 (DIR) Post #AoerSzbmXknoGIGUSW by foone@digipres.club
       2024-12-03T04:54:54Z
       
       0 likes, 0 repeats
       
       went looking for tools to look inside these dat/exe/dll hybrids and finally found something that can read NE files. It shows resources! and as soon as I try to look at that list, it explodes.
       
 (DIR) Post #AoesKVRYua7oLR0BBQ by foone@digipres.club
       2024-12-03T05:04:37Z
       
       0 likes, 0 repeats
       
       obviously everyone is yelling "just use objdump!" but I am running low on linux at the moment and haven't got any such thing installed. and then I spent 5 minutes trying to debug one of my sftp clients wasn't working (I am NOT installing samba at this level of tired) and failing because it turns out it was the other sftp client I didn't know about!
       
 (DIR) Post #AoesQ52M0HY2BRrvvc by foone@digipres.club
       2024-12-03T05:05:39Z
       
       0 likes, 0 repeats
       
       foone@pasilameli:~$ objdump -x plane256.datobjdump: plane256.dat: file format not recognized
       
 (DIR) Post #AoesSzrzffo91jPiPQ by foone@digipres.club
       2024-12-03T05:06:11Z
       
       0 likes, 0 repeats
       
       well fuck you too, buddy! why wouldn't you just support a format that hasn't been relevant for I dunno 30 years?
       
 (DIR) Post #Aoessmrwd8rmEcgkpU by foone@digipres.club
       2024-12-03T05:10:50Z
       
       0 likes, 0 repeats
       
       llvm-objdump is the same. I'm gonna need some kind of specialized tool if I want to escape having to reimplement the stupid resource headers. I'm not even sure that's what they're using, they might be ALMOST using it? in a way that breaks tools? I can't tell. none of my tools can open the fuckers
       
 (DIR) Post #Aoet15h6WTCOw8Zrvs by foone@digipres.club
       2024-12-03T05:12:21Z
       
       0 likes, 0 repeats
       
       I mean, I guess Ghidra kinda does? I could maybe export out of that into a file, but that's way more manual than I'd like. I have like, dozens of files here. I am an ADHD programmer: I don't do things manually
       
 (DIR) Post #AoetFUxdNY1hM0BBB2 by foone@digipres.club
       2024-12-03T05:14:56Z
       
       0 likes, 0 repeats
       
       nah, if ghidra is doing this right, I'm not getting the chunk ids/fourccs. if ghidra is right, it means the format is somewhat different from a real NE file. But that's a big "IF"
       
 (DIR) Post #AoetSh9HNNNmuzv1tY by foone@digipres.club
       2024-12-03T05:17:19Z
       
       0 likes, 0 repeats
       
       oh hey, wrestool from icoutils seems to get something.
       
 (DIR) Post #AoetyQCpu5z7ddi91k by ieure@retro.social
       2024-12-03T05:23:01Z
       
       0 likes, 0 repeats
       
       @foone when you inevitably write your own tool for this, i humbly request you name it "nething."
       
 (DIR) Post #AoeuHtNXfGj7cN0Emu by falk_@chaos.social
       2024-12-03T05:26:32Z
       
       0 likes, 0 repeats
       
       @foone https://archive.org/details/MPSI013_GAG74DE_06252001-OR has a cue/bin version, presumably with a hybrid iso9660/hfs disk. So, yes, that could work.
       
 (DIR) Post #AoeufUlYpEEEEWUZqC by foone@digipres.club
       2024-12-03T05:30:51Z
       
       0 likes, 0 repeats
       
       openwacom says it has no resources, which is incorrect.
       
 (DIR) Post #Aoeuq80DneWQopQ5gW by Forbearance@mastodon.xyz
       2024-12-03T05:32:43Z
       
       0 likes, 0 repeats
       
       @foone To prove you're human, develop your own tooling to reverse-engineer this hacky win32 port of a DOS game.
       
 (DIR) Post #AoeutZq0lVVg18HxTs by foone@digipres.club
       2024-12-03T05:33:05Z
       
       0 likes, 0 repeats
       
       the NE file format uses an interesting trick to encode offsets: every offset given is bitshifted by global bitshift-value.The idea is that as the file gets bigger, you can address farther and farther offsets at the expense of more padding between sections.
       
 (DIR) Post #Aoeuw4Cgpx9em45FD6 by foone@digipres.club
       2024-12-03T05:33:30Z
       
       0 likes, 0 repeats
       
       I thought it sounded familiar, and then I realized:this is a floating point number.
       
 (DIR) Post #Aoev1wxkfh5A3Qty6K by foone@digipres.club
       2024-12-03T05:34:50Z
       
       0 likes, 0 repeats
       
       it's a base-2 floating point number with an unsigned exponent
       
 (DIR) Post #Aoev6fFvvr7waNebyq by foone@digipres.club
       2024-12-03T05:35:44Z
       
       0 likes, 0 repeats
       
       @falk_ yeah, I'll grab that and then ask her tomorrow if her system is in working condition yet
       
 (DIR) Post #AoevOiIRMn1TECQukC by foone@digipres.club
       2024-12-03T05:39:02Z
       
       0 likes, 0 repeats
       
       Borland Resource Workshop v5.02 OPEN'S IT FUCKING PERFECTLY! of course. They probably MADE the fucking resource files with this tool! It came with Borland Turbo C++!
       
 (DIR) Post #AoevWDMQGjVFbCsA0e by foone@digipres.club
       2024-12-03T05:40:24Z
       
       0 likes, 0 repeats
       
       They put together dummy DLL/EXEs with BRW containing all their assets, then wrote a little code to parse the bare minimum of the NE header so it could find where resources were.
       
 (DIR) Post #AoevbBv93AHma5UEtM by foone@digipres.club
       2024-12-03T05:41:18Z
       
       0 likes, 0 repeats
       
       that is very cool. Like, it's a very common thing for a game to have it's own resource-file system. Sometimes it's very filesystem, with paths, and sometimes it's just a index where you can look up by a type+number, or just a number.
       
 (DIR) Post #AoevemyNkONUMhiTOi by foone@digipres.club
       2024-12-03T05:41:56Z
       
       0 likes, 0 repeats
       
       but they skipped out on developing half the code they'd need to have their own resource filesystem: They used an existing tool to make the files for them, they just wrote a parser.
       
 (DIR) Post #AoevkoiiAE4DWPGEtc by foone@digipres.club
       2024-12-03T05:43:00Z
       
       0 likes, 0 repeats
       
       but as neat as this trick is, I think this is actually the compromise version. This version is a win9x port of the windows 3.1 version, which I haven't looked at yet.
       
 (DIR) Post #Aoevn66gUY1U1aYsL2 by foone@digipres.club
       2024-12-03T05:43:17Z
       
       0 likes, 0 repeats
       
       hey why is there a windows 95 version? windows 95 can run windows 3.1 programs, right?
       
 (DIR) Post #Aoevra3R5abi41BCs4 by foone@digipres.club
       2024-12-03T05:44:15Z
       
       0 likes, 0 repeats
       
       well I bet this trick is why they made a windows 95 version. I bet they used some windows 3.x API to find the resources for them, and something about how they did this broke on windows 95.
       
 (DIR) Post #Aoevvjh1CByT7CfwkS by foone@digipres.club
       2024-12-03T05:44:59Z
       
       0 likes, 0 repeats
       
       So they came back to the project and swapped in their own parse-the-NE-file-and-get-a-resource functionality. Now it works on Windows 95.
       
 (DIR) Post #Aoew1VcSQx2lCjIMLI by rotopenguin@mastodon.social
       2024-12-03T05:46:00Z
       
       0 likes, 0 repeats
       
       @foone Welcome to hell, here's your floating-point 𝚙𝚘𝚒𝚗𝚝𝚎𝚛.
       
 (DIR) Post #Aoew3tJ5KpUDFVMyh6 by foone@digipres.club
       2024-12-03T05:46:01Z
       
       0 likes, 0 repeats
       
       To be clear: This is all conjecture, based on what I'm seeing in the files. I've not talked to the developers or even looked at the windows 3.1 version yet. But I have Theories.
       
 (DIR) Post #AoewIejzlzgmPvztAm by foone@digipres.club
       2024-12-03T05:49:08Z
       
       0 likes, 0 repeats
       
       anyway as cool as this is, it only confirms my theory about how the resource-stuff is working. I still don't have code I can reuse or my own code to handle these resources, so I basically still have to write my own damn NE parsing code. This is less work than it sounds like, but I am very much in a "reverse engineering" mood and not a "writing scripts to parse files I don't understand based on possibly incorrect reverse engineering source, debugging, and tracebacks"
       
 (DIR) Post #AoewR3mqXKXSPeL1Rw by foone@digipres.club
       2024-12-03T05:50:36Z
       
       0 likes, 0 repeats
       
       I have done way too much of the latter recently, so I'm trying to relax by doing something easier, like trying 15 different development tools to see if any of them can make any sense of a single file. and of course, the most obvious one I should have tried was the one that could finally do it! the one in the compiler suite I already knew this was compiled with.
       
 (DIR) Post #AoewVJOATFf7xYp2dU by leonerd@fosstodon.org
       2024-12-03T05:51:25Z
       
       0 likes, 0 repeats
       
       @foone It's a floating-point *integer*
       
 (DIR) Post #AoewZ6oXAJNy7NxurI by foone@digipres.club
       2024-12-03T05:51:59Z
       
       0 likes, 0 repeats
       
       I guess having this tool does help. If I'm correct that it is what made these files, I can make my own with known values and see how they get laid out in the file. In fact, I should probably do just that for verification!
       
 (DIR) Post #Aoex9b06PSgEAIm5w0 by crobbler@mastodon.social
       2024-12-03T05:58:41Z
       
       0 likes, 0 repeats
       
       @foone Holy hell. I have no clue what it is you're trying to extract from this game, but I appreciate it. Gizmos & Gadgets was one of my favorite games as a child. I'm just happy someone is still thinking about it.
       
 (DIR) Post #AoeyP29fpg0SgHB1to by foone@digipres.club
       2024-12-03T06:12:36Z
       
       0 likes, 0 repeats
       
       I just love the sheer fucking 90s-developement it is that I told this thing to add a new bitmap and it just busted out an integrated image editor.
       
 (DIR) Post #AoeyRm7PubDDoVQcz2 by foone@digipres.club
       2024-12-03T06:12:48Z
       
       0 likes, 0 repeats
       
       What, objdump doesn't have a fully featured (for, like, 1993) image editor? seems like it's not a very good resource editor now is it?
       
 (DIR) Post #Aoeyk09GUK7IXSz3kO by brennen@federation.p1k3.com
       2024-12-03T06:16:16Z
       
       0 likes, 0 repeats
       
       @foone looking back on 90s gui shit in general, it's kind of amazing what we've given up on expecting software to provide, in a lot of ways.
       
 (DIR) Post #AoeylwL7cUu3IzSDtA by nobletrout@infosec.exchange
       2024-12-03T06:16:19Z
       
       0 likes, 0 repeats
       
       @foone it’s so bizarre to me how much effort has been made in the past to fulfill such niche needs that live on for so long.
       
 (DIR) Post #AoezKZFhRzH9puQi12 by foone@digipres.club
       2024-12-03T06:23:03Z
       
       0 likes, 0 repeats
       
       it has been zero days since I crashed explorer
       
 (DIR) Post #AoezUjyURJRFzGENIO by foone@digipres.club
       2024-12-03T06:24:56Z
       
       0 likes, 0 repeats
       
       speaking crashing, I can't get this version of the resource explorer to compile without crashing. So I'm gonna just assume "yeah this makes sense" and get to work on writing that stupid resource-entry parsing code that I don't want to write
       
 (DIR) Post #Aof08CkFPF0iVhO3KC by foone@digipres.club
       2024-12-03T06:31:58Z
       
       0 likes, 0 repeats
       
       I'm gonna ignore the confusing reversed source for the funcs and just base it on this NE document, the Resource Table section. http://benoit.papillault.free.fr/c/disc2/exefmt.txt
       
 (DIR) Post #Aof0BF2rJJbWVrXZR2 by foone@digipres.club
       2024-12-03T06:32:12Z
       
       0 likes, 0 repeats
       
       hopefully that's close enough that once I have that, it won't be hard to hack it into properly working
       
 (DIR) Post #Aof0KZWyVx8Eee4mci by fishidwardrobe@mastodon.me.uk
       2024-12-03T06:34:16Z
       
       0 likes, 0 repeats
       
       @foone for the mouse?
       
 (DIR) Post #Aof12mpAS1L2cofW1g by foone@digipres.club
       2024-12-03T06:42:16Z
       
       0 likes, 0 repeats
       
       why does this section say that each resource table entry is 8 bytes wide then clearly list 5 members of it that add up to 9 bytes?
       
 (DIR) Post #Aof1BokwdahdDt03Bw by foone@digipres.club
       2024-12-03T06:43:54Z
       
       0 likes, 0 repeats
       
       anyway the ones in this file are clearly 16 bytes long.so already we fell off the beaten trail
       
 (DIR) Post #Aof1FxpQqfzsWE4lMm by SwiftOnSecurity@infosec.exchange
       2024-12-03T06:44:35Z
       
       0 likes, 0 repeats
       
       @foone You always find the weirdest problems to have
       
 (DIR) Post #Aof1J7fygytVvf9yqG by foone@digipres.club
       2024-12-03T06:44:45Z
       
       0 likes, 0 repeats
       
       getting slightly tired of how many documents on "how windows works" are really documents on "how the MSVC compiler works"
       
 (DIR) Post #Aof1MOzUly7qUyqvwm by foone@digipres.club
       2024-12-03T06:45:25Z
       
       0 likes, 0 repeats
       
       @SwiftOnSecurity look I just expect text files from the bowels of early 90s MSDN to have accurate!
       
 (DIR) Post #Aof1PCKkHwuw6z7qaW by foone@digipres.club
       2024-12-03T06:46:04Z
       
       0 likes, 0 repeats
       
       what are the chances borland documented this behavior? I'm thinking low. I'm gonna keep stare-at-hex-dump reversing.
       
 (DIR) Post #Aof1a7RYoHd88AWLhY by foone@digipres.club
       2024-12-03T06:48:19Z
       
       0 likes, 0 repeats
       
       "clearly 16 bytes long" NO THEY'RE 12 BYTES FOONE CAN'T YOU COUNT?
       
 (DIR) Post #Aof1craIELctoTuium by foone@digipres.club
       2024-12-03T06:48:50Z
       
       0 likes, 0 repeats
       
       still, 12 is equally not 8 (and equally not 9) as 16 was. The point is it's not right, because Borland.
       
 (DIR) Post #Aof1vNCZPslv5LdzJw by jaykass@mastodon.online
       2024-12-03T06:52:00Z
       
       0 likes, 0 repeats
       
       @foone ASEQ + 8 bytes?
       
 (DIR) Post #Aof2bPWt9VSqT1C0nI by foone@digipres.club
       2024-12-03T06:59:40Z
       
       0 likes, 0 repeats
       
       I think their fucking header is better too. The MSVC one is 1 byte, this makes more sense if they have a 2-byte header.
       
 (DIR) Post #Aof3144BZcqhQj03RQ by JoshJers@peoplemaking.games
       2024-12-03T07:04:20Z
       
       0 likes, 0 repeats
       
       @foone I feel like I remember this being a problem back when I was doing Windows development with whatever the fuck the Borland compiler was called at the timeThe one that had OWL which was actually kinda cool
       
 (DIR) Post #Aof3HA0pEd9gVJ6SlE by Krazov@mstdn.social
       2024-12-03T07:06:51Z
       
       0 likes, 0 repeats
       
       @foone Yo, aseq! Any plans for the evening?
       
 (DIR) Post #Aof5SjlCrfMMT6RgSe by foone@digipres.club
       2024-12-03T07:31:46Z
       
       0 likes, 0 repeats
       
       okay it has no header at all.They don't need the shift-floating header thing because there are no offsets here! this just is the chunk_types of the resources, not any kind of data I could use to find the resource itself in the binary. I have to parse that elsewhere!
       
 (DIR) Post #Aof5slm4033WF9G9sO by foone@digipres.club
       2024-12-03T07:36:22Z
       
       0 likes, 0 repeats
       
       There we go, that part seems to be working. It's a list of IDs and the chunk_types: from here I can parse some other part of the resource headers and get the offsets & sizes
       
 (DIR) Post #Aof7cnvuPClWDJNb8a by foone@digipres.club
       2024-12-03T07:55:59Z
       
       0 likes, 0 repeats
       
       okay, the code I'm looking at doesn't make sense because of a very weird reason: they don't parse the data out of the binary, but they do seem to add a header to it?
       
 (DIR) Post #Aof7tZp87JIDNSCrxY by empathicqubit@mastodon.de
       2024-12-03T07:58:58Z
       
       0 likes, 0 repeats
       
       @fooneYo aseq, mi aseq, tú aseq
       
 (DIR) Post #AofAQqUNNPZ6WoUTtA by slyecho@mdon.ee
       2024-12-03T08:27:19Z
       
       0 likes, 0 repeats
       
       @foone I bet this is the reason DOS games were considered superior for years, even when running under Windows
       
 (DIR) Post #AofAgF5wAuSdBZOwsq by foone@digipres.club
       2024-12-03T08:30:15Z
       
       0 likes, 0 repeats
       
       they add a 22 byte header and cut the first 2 bytes from the file.what the fuck
       
 (DIR) Post #AofAtcsr2VAQjLfDiy by thorsummoner@ibite.lol
       2024-12-03T08:32:38Z
       
       0 likes, 0 repeats
       
       @foone why does it draw the text Bitmap so stretched out in the other pane!?
       
 (DIR) Post #AofB8xBTqSXW2DgVeK by foone@digipres.club
       2024-12-03T08:35:25Z
       
       0 likes, 0 repeats
       
       @thorsummoner DPI weirdness
       
 (DIR) Post #AofBXq2dXRHz7cPjaS by womble@infosec.exchange
       2024-12-03T08:39:53Z
       
       0 likes, 0 repeats
       
       @foone There! Are! Twelve! Bytes!
       
 (DIR) Post #AofC5CXeu4sCSgpi3E by ozeng@aus.social
       2024-12-03T08:45:53Z
       
       0 likes, 0 repeats
       
       @foone I’ve worked with people like that.  Maddening, isn’t it?
       
 (DIR) Post #AofEmSDggmZRRjFBdg by foone@digipres.club
       2024-12-03T09:16:07Z
       
       0 likes, 0 repeats
       
       this code is broken or I don't understand it. maybe both
       
 (DIR) Post #AofF68okXH7T3xy0mm by foone@digipres.club
       2024-12-03T09:19:28Z
       
       0 likes, 0 repeats
       
       99% sure it's bugged. so if you have a file like this one which has the following chunks:* NFNT 200* NFNT 300* NFNT 15000* TEXT 128* TEXT 129* TEXT 130You call the FindFileResource("NFNT", 128" and it'll check that the first node is an NFNT (it is) and then it'll end up matching the TEXT 128, because the chunk-type check is outside the loopsimilarly FindFileResource("TEXT",130) will fail, because the first chunk isn't TEXT
       
 (DIR) Post #AofGtkyFZUShXLdJKa by foone@digipres.club
       2024-12-03T09:39:51Z
       
       0 likes, 0 repeats
       
       I can't figure out what this FindFileResource is doing. there's too many pointers for my tiredness. I think it's time to stop for the day.
       
 (DIR) Post #AofHGKeTagV4ZR9HsW by foone@digipres.club
       2024-12-03T09:43:55Z
       
       0 likes, 0 repeats
       
       @Jenetrix no virtual machines here! everything is running natively
       
 (DIR) Post #AofapXjuoxfGQTCEs4 by boredzo@mastodon.social
       2024-12-03T13:23:03Z
       
       0 likes, 0 repeats
       
       @foone The mentions of 'NFNT' resources prompted me to try throwing ResEdit and DeRez at it. Sadly, neither one is able to make sense of the executable or the .dat file.Would've been really cool if the Borland/Microsoft resource map format was actually the same one Mac OS used, to the point of being intercompatible. But no.
       
 (DIR) Post #AofexdKkJ1xduPXL3g by rachaelspooky@cyberpunk.lol
       2024-12-03T14:09:19Z
       
       0 likes, 0 repeats
       
       @foone i fuckin love gizmos n gadgets
       
 (DIR) Post #AofkhSNhrFab25ai0W by BRicker@fosstodon.org
       2024-12-03T15:13:43Z
       
       0 likes, 0 repeats
       
       @foone that's a strange kind of cool
       
 (DIR) Post #AogClbI5TLqmXVj8Uq by uliwitness@chaos.social
       2024-12-03T20:28:12Z
       
       0 likes, 0 repeats
       
       @foone Isn’t there a strcmp_s like that on Windows? With two lengths?
       
 (DIR) Post #AogCttdp84eBllqkjo by uliwitness@chaos.social
       2024-12-03T20:29:42Z
       
       0 likes, 0 repeats
       
       @foone Fun fact: There is  now officially an uppercase ß: ẞ
       
 (DIR) Post #AogScMYUUI6bUz15uK by foone@digipres.club
       2024-12-03T23:25:55Z
       
       0 likes, 0 repeats
       
       @uliwitness didn't see it while quickly looking at MSDN but it wouldn't surprise me
       
 (DIR) Post #AogT8BRdKdwUJ3yydk by boredzo@mastodon.social
       2024-12-03T13:36:56Z
       
       0 likes, 0 repeats
       
       @foone … then I remembered that this game comes on a hybrid CD.The Mac version also has 'NFNT' resources. If those would be useful to you, lemme know and I can dump 'em.
       
 (DIR) Post #AogT8DBOry95hIP2cC by blitter@mastodon.social
       2024-12-03T17:12:06Z
       
       0 likes, 0 repeats
       
       @boredzo @foone Came here to say this. ‘NFNT’ type and 16-bit ID? Sounds suspiciously Mac.
       
 (DIR) Post #AogT8Ec1YT2K89roki by boredzo@mastodon.social
       2024-12-03T18:27:32Z
       
       0 likes, 0 repeats
       
       @blitter @foone Yeah, that was my feeling from the first mention. I wouldn't expect to see 'NFNT' on anything other than a Mac font resource.Also, I did confirm that the Mac version's 'NFNT' resources are viewable in ResEdit, as shown here.There are also 'ASEQ' and 'TEXT' resources. 'ASEQ' is a custom format (unlike 'NFNT', which is a standard Mac font format), so I can't view those, but I can dump them. 'TEXT' is exactly what it says on the tin (both normally and in this app).
       
 (DIR) Post #AogT8FmhCHAPlXrr1c by foone@digipres.club
       2024-12-03T23:31:39Z
       
       0 likes, 0 repeats
       
       @boredzo @blitter Thanks for looking that up! I haven't taken a crack at the mac one yet (I'm doing this all on a laptop, so I don't have my usual emulation/hacking tools on hand), so it's good to know this definitely came from the mac version.
       
 (DIR) Post #AogTDnhcW9VQPQ8esC by foone@digipres.club
       2024-12-03T23:32:41Z
       
       0 likes, 0 repeats
       
       @boredzo @blitter and I just realized, the program I learned this chunk+id style from? 3DMM? It was MAC only... but built on a framework they'd used for two previous Kids Creation Tools which did have mac ports. It was probably always a mac-ism
       
 (DIR) Post #AogTK8P6SnCwLnUv4a by foone@digipres.club
       2024-12-03T23:33:51Z
       
       0 likes, 0 repeats
       
       @boredzo If you could dump one of the fonts that'd be handy. The binary of the font, if that's doable: I want to see if they just implemented Mac font loading on Windows, rather than making their own font and calling it after the NFNT system
       
 (DIR) Post #AogUI3sePVENhEtTOq by foone@digipres.club
       2024-12-03T23:44:42Z
       
       0 likes, 0 repeats
       
       I pointed binxelview at one of the font resources, and got nothing sensible.Are these fuckers COMPRESSING their fonts? eww. Nothing else in this damn thing is compressed, why would the fonts be?!
       
 (DIR) Post #AogURydKm1OwJpSQPQ by foone@digipres.club
       2024-12-03T23:46:21Z
       
       0 likes, 0 repeats
       
       I don't have any specific reason to hack the fonts, it's just my default setting. I'm not even trying to deathgenerate this game, I did that back in *checks json metadata* 2020.
       
 (DIR) Post #AogWN4gr1jf1Z1tV3I by boredzo@mastodon.social
       2024-12-04T00:07:58Z
       
       0 likes, 0 repeats
       
       @foone I see your edit but I was already 98% finished writing my resource extractor anyway, so I just did the last 2%, which was finishing up bulk-dumping.Here's all the 'NFNT', 'TEXT', and 'ASEQ' resources, as one file per resource, organized by originating file: https://boredzo.org/stuph/Gizmos%20&%20Gadgets!%20CD%20extracted%20resources.zipI don't think there are any other interesting resource types, but if you find any others you're curious about, I'm happy to bulk-dump those too if the Mac version has 'em.
       
 (DIR) Post #AogWmVs36idp6QGCwa by foone@digipres.club
       2024-12-04T00:12:33Z
       
       0 likes, 0 repeats
       
       @boredzo Thanks!
       
 (DIR) Post #AogXCyow5yCkPyQOQ4 by foone@digipres.club
       2024-12-04T00:17:25Z
       
       0 likes, 0 repeats
       
       @boredzo interesting. The ASEQ (image files) I checked is the same between Mac and Windows(32).
       
 (DIR) Post #AogXHz9uGVAwumcW92 by foone@digipres.club
       2024-12-04T00:18:16Z
       
       0 likes, 0 repeats
       
       @boredzo oh wow. the NFNT is clearly the same file format, but the mac version is big endian
       
 (DIR) Post #AogXMedK0RQKhhbacK by boredzo@mastodon.social
       2024-12-04T00:19:09Z
       
       0 likes, 0 repeats
       
       @foone That makes sense. Better to byte-swap the PC version once when writing the disk than do it at runtime.
       
 (DIR) Post #AogbD29a6ReSZVMXEu by foone@digipres.club
       2024-12-04T01:02:10Z
       
       0 likes, 0 repeats
       
       @kawa that's the secret: the 90s never ended
       
 (DIR) Post #AogcsmM3KhPRgmfJfE by foone@digipres.club
       2024-12-04T01:20:56Z
       
       0 likes, 0 repeats
       
       okay so @boredzo grabbed me some resources from the mac version, and they're very interesting.the image I checked is byte-for-byte identical between the windows and mac versions. So their custom image format is used on both!and the font is even weirder: it's the same, I think, but it's big-endian on mac and little-endian on PC!
       
 (DIR) Post #AogdVheakF08P2th4K by boredzo@mastodon.social
       2024-12-04T01:27:54Z
       
       0 likes, 0 repeats
       
       @foone Yeah, Macs were big-endian through the PowerPC era, so all the native resource formats like 'NFNT' were, too.
       
 (DIR) Post #AogdZKYgYQy3vsrebI by foone@digipres.club
       2024-12-04T01:28:37Z
       
       0 likes, 0 repeats
       
       @boredzo it's definitely not a real NFNT, though. Unless it is, and I was confused because I was looking at the little-endian variant. lemme take a doublecheck
       
 (DIR) Post #AogdcFbRR3ifQqXuWe by foone@digipres.club
       2024-12-04T01:29:04Z
       
       0 likes, 0 repeats
       
       @boredzo wait does ResEdit natively support them? like, it thinks they're real NFNTs?
       
 (DIR) Post #Aogdj6BEroHsEeYUBk by boredzo@mastodon.social
       2024-12-04T01:30:23Z
       
       0 likes, 0 repeats
       
       @foone Yes. ResEdit has a built-in resource editor that can display 'NFNT's.(It does warn you not to edit them. There are some metrics that they never perfected saving correctly. ResEdit was basically abandonware for a decade, during which time TrueType took over.)
       
 (DIR) Post #AogdoqhTKnbFxiNFr6 by foone@digipres.club
       2024-12-04T01:31:20Z
       
       0 likes, 0 repeats
       
       @boredzo ok cool. that save me a lot of time. I basically need to write a "little endian NFNT parser" then
       
 (DIR) Post #AogdrjepyUqozNWB6G by foone@digipres.club
       2024-12-04T01:31:58Z
       
       0 likes, 0 repeats
       
       oh god, I thought the font was a bespoke format but no, it's just the macintosh NFNT format.Except it's fucking LITTLE ENDIAN!
       
 (DIR) Post #AogduQStmxWuKiDVB2 by foone@digipres.club
       2024-12-04T01:32:16Z
       
       0 likes, 0 repeats
       
       little endian mac resources? what is the world coming to?
       
 (DIR) Post #AogdzaSc3NRImUXn9s by rk@mastodon.well.com
       2024-12-04T01:32:54Z
       
       0 likes, 0 repeats
       
       @foone More like TNFN amirite
       
 (DIR) Post #AogeIs98WQVD8Qd7qa by boredzo@mastodon.social
       2024-12-04T01:36:29Z
       
       0 likes, 0 repeats
       
       @foone Sounds like a plan.The format is documented in Inside Macintosh: Text, under the Font Manager documentation: https://developer.apple.com/library/archive/documentation/mac/pdf/Text.pdf (page 4-46)
       
 (DIR) Post #AogeLf4VacatSAnN9U by Zotmeister@mastodon.online
       2024-12-04T01:36:21Z
       
       0 likes, 0 repeats
       
       @foone KILL IT WITH FIRE
       
 (DIR) Post #AogeTWeqkw1xfuXluS by KevinMarks@xoxo.zone
       2024-12-04T01:37:52Z
       
       0 likes, 0 repeats
       
       @foone that must have predated the QuickTime compatibility layer where all the Endians were fixed.
       
 (DIR) Post #AogepHrESoUI8xiCzw by foone@digipres.club
       2024-12-04T01:42:42Z
       
       0 likes, 0 repeats
       
       okay I'm going to intentionally ignore fonts right now. I don't need the fonts for anything, so as nice as it might be to have them, I don't actually want them and I should focus on hacking something I want. like fixing the scaling problems(s)
       
 (DIR) Post #Aoggky12UdANM5MoRE by foone@digipres.club
       2024-12-04T02:04:19Z
       
       0 likes, 0 repeats
       
       ahh it's trying to call internal WING.DLL functions. lovely
       
 (DIR) Post #AoghP2jwLd23afTkI4 by foone@digipres.club
       2024-12-04T02:11:32Z
       
       0 likes, 0 repeats
       
       my kingdom for multiple monitors. reverse engineering on just one small laptop screen is killing me
       
 (DIR) Post #AoghbLGZIFtmWWbYwK by gsuberland@chaos.social
       2024-12-04T02:13:48Z
       
       0 likes, 0 repeats
       
       @foone I genuinely get a feeling of claustrophobia when working on stuff like that on a single low-res monitor.
       
 (DIR) Post #AoghjHOjYklgqKD1yS by foone@digipres.club
       2024-12-04T02:15:18Z
       
       0 likes, 0 repeats
       
       thank god for WINE, Microsoft gave up on documenting WinG ages ago
       
 (DIR) Post #AoghlwURkcNUrp9QHo by foone@digipres.club
       2024-12-04T02:15:40Z
       
       0 likes, 0 repeats
       
       @gsuberland same, yeah, and I'm already claustrophobic by nature. unfortunately I have no other choice at the moment
       
 (DIR) Post #AoghqIJ6ZrjdgpvB5s by gsuberland@chaos.social
       2024-12-04T02:16:33Z
       
       0 likes, 0 repeats
       
       @foone :(hope things clear up for you soon and you can get back to a more comfortable environment.
       
 (DIR) Post #AoghuK9VeubaZTM2qW by indigoparadox@mastodon.social
       2024-12-04T02:17:17Z
       
       0 likes, 0 repeats
       
       @foone I didn't even think to check WINE. Here I've been using the HLP file and source examples like a sucker!
       
 (DIR) Post #AogieuvDHclLvjsv9k by foone@digipres.club
       2024-12-04T02:25:39Z
       
       0 likes, 0 repeats
       
       for not the first or last time, either this code is stupid or it's not being decompiled correctlypossibly both
       
 (DIR) Post #AogjlqalsZwmU1Bwfo by foone@digipres.club
       2024-12-04T02:38:03Z
       
       0 likes, 0 repeats
       
       yeah this decompilation is just wrong
       
 (DIR) Post #AogkliIeoEk2igDe0e by foone@digipres.club
       2024-12-04T02:49:17Z
       
       0 likes, 0 repeats
       
       aha! fastcall. for some reason it thought these win32 apis used fastcall .
       
 (DIR) Post #AogmA0trPFNRJKltlQ by beeoproblem@mastodon.gamedev.place
       2024-12-04T03:04:49Z
       
       0 likes, 0 repeats
       
       @foone Intel macs? If not then WT actual F
       
 (DIR) Post #AognOMK4eZbxlERAEC by foone@digipres.club
       2024-12-04T03:18:44Z
       
       0 likes, 0 repeats
       
       @beeoproblem in 1997? nope!
       
 (DIR) Post #Aognc0qFJg1ZBzznpQ by foone@digipres.club
       2024-12-04T03:21:12Z
       
       0 likes, 0 repeats
       
       The nice thing about hacking this particular game is that it uses so many fucking pointers.I just need to malloc some RAM/find some used storage, and point the right pointer at it and now the renderer is Foone's Special One instead of WinG
       
 (DIR) Post #Aognfl9Pb3CngckNua by beeoproblem@mastodon.gamedev.place
       2024-12-04T03:21:41Z
       
       0 likes, 0 repeats
       
       @foone Oof. That's a big WTF there then.
       
 (DIR) Post #AogpDH5xwtCKGqgFii by foone@digipres.club
       2024-12-04T03:39:00Z
       
       0 likes, 0 repeats
       
       wait what?it has files like AUTO16.DAT and AUTO256.DATI assumed these were 16-color and 256-color versions of the sprites, and they may still be that, but here's the fun part I just discovered:THIS GAME DOESN'T RUN IN 16 COLOR MODE
       
 (DIR) Post #AogpO9QqmSNlgndRqa by foone@digipres.club
       2024-12-04T03:40:39Z
       
       0 likes, 0 repeats
       
       I hacked out the make-sure-we're-not-in-256-color-mode check and it just segfaults. I bet it had working 16-color mode when it was on win3.x, but they broke it for win95
       
 (DIR) Post #AogpWKXRN5u8S3cN0a by foone@digipres.club
       2024-12-04T03:42:31Z
       
       0 likes, 0 repeats
       
       this game is an entire archaeological dig in itself. It's like one of those cities that calls itself Foobar, but it was built on the ancient ruins of Foobar, which itself was built ontop of the destroyed Fort Foobar, which used to be just the Foobar Settlement before it got raized by invaders
       
 (DIR) Post #AogpYhYalBAcQCHriC by foone@digipres.club
       2024-12-04T03:42:56Z
       
       0 likes, 0 repeats
       
       BUT THE FOURTH ONE STAYED UP, AND STILL RUNS ON WINDOWS 10
       
 (DIR) Post #Aogq2qPKPzHsYhKMFs by gregly@retro.pizza
       2024-12-04T03:48:26Z
       
       0 likes, 0 repeats
       
       @foone it is, dare I say, the little-end of the world as we know it
       
 (DIR) Post #AogqBHa3H1cf9PMo52 by foone@digipres.club
       2024-12-04T03:49:59Z
       
       0 likes, 0 repeats
       
       @gregly nice
       
 (DIR) Post #AogqKh8bcaff1P18Nc by pseudonym@mastodon.online
       2024-12-04T03:51:37Z
       
       0 likes, 0 repeats
       
       @foone This thread is like that. I actually scrolled back and back from this comment and went back a week ago.You are an odd duck, in the best way. Please keep sharing your programming exploits.
       
 (DIR) Post #AogqVU34cwknbyZf8a by foone@digipres.club
       2024-12-04T03:53:39Z
       
       0 likes, 0 repeats
       
       @pseudonym thanks. I'll try!
       
 (DIR) Post #AogqXnpw1ho3YvXCeO by foone@digipres.club
       2024-12-04T03:53:57Z
       
       0 likes, 0 repeats
       
       just not very well. That's why I'm here.
       
 (DIR) Post #AogqtkSFHWXVRZv0BE by foone@digipres.club
       2024-12-04T03:57:54Z
       
       0 likes, 0 repeats
       
       @trini the latter, I think. I don't know that this is documented anywhere or most people have any idea it still works (at all) on modern windows
       
 (DIR) Post #AogsHemc7TRql4PTMW by foone@digipres.club
       2024-12-04T04:13:30Z
       
       0 likes, 0 repeats
       
       I'm going to need to modify ScreenCalculations to get the centering fixed. I think it also affects how the mouse works? when I hacked the x/y offsets I couldn't click properly. I'll also need to hack the window to be resizable and add a handler for resize events. and finally, modify the bitblt wrapper so that it does integer scaling
       
 (DIR) Post #AogsR7KZLinfu4nre4 by foone@digipres.club
       2024-12-04T04:15:10Z
       
       0 likes, 0 repeats
       
       ARGH MSDN TELL ME THE INTEGER VALUES OF YOUR FUCKING BITMASK FLAGS
       
 (DIR) Post #Aogu0E3kQLuwrUEwqm by phoenixgee@mastodon.social
       2024-12-04T04:32:44Z
       
       0 likes, 0 repeats
       
       @foone *cough* ctrl-click *cough* (that is assuming you're looking at source code in their ide)
       
 (DIR) Post #AoguDXDAWqec1bzcZc by foone@digipres.club
       2024-12-04T04:35:12Z
       
       0 likes, 0 repeats
       
       @phoenixgee I'm not. I'm using Ghidra
       
 (DIR) Post #AogvJKkpr9vv594M4W by foone@digipres.club
       2024-12-04T04:47:24Z
       
       0 likes, 0 repeats
       
       I want to find the person who decide the x86 assembler in ghidra needed to be CASE FUCKING SENSITIVE
       
 (DIR) Post #AogvMIv989ViGPJBgm by foone@digipres.club
       2024-12-04T04:47:31Z
       
       0 likes, 0 repeats
       
       I just want to talk
       
 (DIR) Post #AogvaekGmfdI0P44Ia by wrosecrans@mstdn.social
       2024-12-04T04:50:30Z
       
       0 likes, 0 repeats
       
       @foone Finally, System 6 on VAX!
       
 (DIR) Post #Aogvdpr9vhCJKonqt6 by foone@digipres.club
       2024-12-04T04:50:57Z
       
       0 likes, 0 repeats
       
       @alilly type "mov" and it's like "invalid instruction" but "MOV" is fine
       
 (DIR) Post #AogvyFnjB4ghamvzIu by cr1901@mastodon.social
       2024-12-04T04:54:50Z
       
       0 likes, 0 repeats
       
       @foone Ghidra RE detected
       
 (DIR) Post #AogwbjQexInIm8y8DQ by emily@sparkly.uni.horse
       2024-12-04T04:56:25Z
       
       0 likes, 0 repeats
       
       @foone sudden desire to invent a cursed ISA where the assembly is case sensitiveA and a are different registers. the value of A is always ~a.conditional moves/jumps work with a flags register like lots of other architectures do. `ADD a, b, c` sets flags, `add a, b, c` does not`Add` inverts the flags written to the flags register`aDD` is technically allowed but there's no real reason to use it: it inverts the flags but does not write the inverted flags anywhere
       
 (DIR) Post #AogwbkRlAhGhvqUWZM by foone@digipres.club
       2024-12-04T05:01:58Z
       
       0 likes, 0 repeats
       
       @emily NO
       
 (DIR) Post #Aogwz4WigGQKrxvu3U by foone@digipres.club
       2024-12-04T05:06:14Z
       
       0 likes, 0 repeats
       
       @cr1901 not surprising. I live inside Ghidra
       
 (DIR) Post #Aogxf5cT0ZrmQ9emB6 by foone@digipres.club
       2024-12-04T05:13:46Z
       
       0 likes, 0 repeats
       
       I wrote my code and called it and it crashed instantly!
       
 (DIR) Post #AogxiGDo2uC6AidMae by martin_piper@mastodon.social
       2024-12-04T05:13:58Z
       
       0 likes, 0 repeats
       
       @foone I have a baseball bat with nails...
       
 (DIR) Post #AogxkaCiiqt6j3EWtE by foone@digipres.club
       2024-12-04T05:14:02Z
       
       0 likes, 0 repeats
       
       what, can you write x86 assembly and have it work fine the first time?
       
 (DIR) Post #AogxnOE9hzQKRtF8Hg by scottmichaud@mastodon.gamedev.place
       2024-12-04T05:14:46Z
       
       0 likes, 0 repeats
       
       @foone Not the worst outcome.
       
 (DIR) Post #AogxpssYiXFM5nKZdo by foone@digipres.club
       2024-12-04T05:15:34Z
       
       0 likes, 0 repeats
       
       yep I fucked the stack. Whoops
       
 (DIR) Post #AogxszE9ZSbSeMuWxM by foone@digipres.club
       2024-12-04T05:16:19Z
       
       0 likes, 0 repeats
       
       I'm pushing 9 arguments for an 8 argument function
       
 (DIR) Post #AogyBNkr7K87vuykCW by foone@digipres.club
       2024-12-04T05:19:39Z
       
       0 likes, 0 repeats
       
       EAX and ECX look too similar on this high-DPI screen
       
 (DIR) Post #AogyNCMPJ56q4MB4MK by foone@digipres.club
       2024-12-04T05:21:48Z
       
       0 likes, 0 repeats
       
       @scottmichaud yeah! I'm not running this in a VM. I've had a debugger wipe my hard drive before... I live on the edge
       
 (DIR) Post #AogyUaowlK4dxV3KQi by foone@digipres.club
       2024-12-04T05:23:08Z
       
       0 likes, 0 repeats
       
       clearly not a problem Intel thought about when they created the 8086 architecture
       
 (DIR) Post #AogyjUE1ZBZ1qYstA8 by foone@digipres.club
       2024-12-04T05:25:49Z
       
       0 likes, 0 repeats
       
       it runs! with no major changes yet, but this is just a safety check that the base code is working
       
 (DIR) Post #AogymBV9dZUke3BQY4 by foone@digipres.club
       2024-12-04T05:26:17Z
       
       0 likes, 0 repeats
       
       I've replaced the WinGBitBltWrapper with FooneBlit, a completely different function that (currently) does the same thing
       
 (DIR) Post #Aogytj2HM8TUg1GyW0 by foone@digipres.club
       2024-12-04T05:27:40Z
       
       0 likes, 0 repeats
       
       I edited the wrong part of the function call and accidentally made the game half-size instead of double-size. whoops
       
 (DIR) Post #Aogz1cNRzoxuLHwHuC by foone@digipres.club
       2024-12-04T05:29:06Z
       
       0 likes, 0 repeats
       
       instead of blitting a 512x384 image as 1024x768, it treated the original 512x384 image as if it was part of a 1024x768 image, and scaled that mostly-blank image down to 512x384
       
 (DIR) Post #Aogz60bLsBhcdAXEKu by foone@digipres.club
       2024-12-04T05:29:54Z
       
       0 likes, 0 repeats
       
       DO NOT DO THIS
       
 (DIR) Post #Aogz9LrTHkanR6fWhU by NosirrahSec@infosec.exchange
       2024-12-04T05:29:56Z
       
       0 likes, 0 repeats
       
       @foone this is the most threatening sentence.
       
 (DIR) Post #AogzAneTRlfjurHPw8 by shanecelis@mastodon.gamedev.place
       2024-12-04T05:29:58Z
       
       0 likes, 0 repeats
       
       @foone HIGH-LEVEL LANG PEOPLE: It's tuple time!LOW-LEVEL LANG PEOPLE: What register is that?
       
 (DIR) Post #AogzPvV0YLRYb846PQ by foone@digipres.club
       2024-12-04T05:33:28Z
       
       0 likes, 0 repeats
       
       or this
       
 (DIR) Post #AogzeKRgbEOK1QNYi8 by foone@digipres.club
       2024-12-04T05:36:02Z
       
       0 likes, 0 repeats
       
       This kinda worked but then DPI scale turned on and it's fucked. I need to make my EXE tell windows "DON'T SCALE ME" and that might be tricky
       
 (DIR) Post #AogzqtU69SBmAUUz7g by foone@digipres.club
       2024-12-04T05:38:21Z
       
       0 likes, 0 repeats
       
       There! properly 2x scaled. This is a proof of concept, for a real version I'll need to dynamically change scale based on window size, and make the mouse work (it still thinks the game is the old size/position)as well as re-enabling the centering
       
 (DIR) Post #Aoh0ZWSgb2A7nO7QZs by Infoseepage@mastodon.social
       2024-12-04T05:46:21Z
       
       0 likes, 0 repeats
       
       @foone There's a really fun free game called Trilby: The Art of Theft which strikes me as similar. You have to break into places and evade traps, security cameras, etc. through coordinated movement and pattern recognition and a host of gadgetry which you purchase through completing missions and thoroughly burgling joints.
       
 (DIR) Post #Aoh0fSgDZNe5nvHQlE by EMR@mastodon.sdf.org
       2024-12-04T05:47:19Z
       
       0 likes, 0 repeats
       
       @foone it's insane to me that you remember and are now running Super Solvers Outnumbered.
       
 (DIR) Post #Aoh0oO93ncIeLW1lzc by foone@digipres.club
       2024-12-04T05:49:06Z
       
       0 likes, 0 repeats
       
       @EMR Different game! It's Super Solvers Gizmos & Gadgets
       
 (DIR) Post #Aoh0uuG7JVzhgOR756 by EMR@mastodon.sdf.org
       2024-12-04T05:50:18Z
       
       0 likes, 0 repeats
       
       @foone now I need to figure out which one I remember.
       
 (DIR) Post #Aoh16oba9zffcg9g00 by crobbler@mastodon.social
       2024-12-04T05:52:24Z
       
       0 likes, 0 repeats
       
       @foone Are the pixels not quite square?
       
 (DIR) Post #Aoh1vUgA0MFqakShM0 by foone@digipres.club
       2024-12-04T06:01:34Z
       
       0 likes, 0 repeats
       
       @crobbler They're square, but the assets aren't.
       
 (DIR) Post #Aoh23CzrdA2E4HMBQe by foone@digipres.club
       2024-12-04T06:02:58Z
       
       0 likes, 0 repeats
       
       Fixed centering but the mouse is still kfuct. I'll have to find where it handles this, it's clearly translating between scales and it must still be assuming a 512x384 screen
       
 (DIR) Post #Aoh2P7tTHhPobzoldo by glyph@mastodon.social
       2024-12-04T06:06:55Z
       
       0 likes, 0 repeats
       
       @foone did that resolution exist outside of early Macs?
       
 (DIR) Post #Aoh2oXQDVaRj1eFeqW by glyph@mastodon.social
       2024-12-04T06:11:28Z
       
       0 likes, 0 repeats
       
       @foone no. absolutely not. that is the most important lesson that my father ever taught me. that literally no one can do this.there might—*might*—be a person who could do it with m68k assembly though
       
 (DIR) Post #Aoh372SgqEx4VTEKRc by foone@digipres.club
       2024-12-04T06:14:48Z
       
       0 likes, 0 repeats
       
       @glyph nope. But the win32 version seems to be ported from the mac version
       
 (DIR) Post #Aoh43AHHwJGVXlc728 by foone@digipres.club
       2024-12-04T06:25:22Z
       
       0 likes, 0 repeats
       
       I need to stuff a mouse scale somewhere but there's no room in winproc. I'm gonna have to find somewhere else to put it and then jump back and forth :(
       
 (DIR) Post #Aoh4MSRwbKQnP9nVgm by kaced@infosec.exchange
       2024-12-04T06:28:50Z
       
       0 likes, 0 repeats
       
       @foone probably not, but Delphi malware definitely still exists
       
 (DIR) Post #Aoh5DJfjxxbRWuSIee by foone@digipres.club
       2024-12-04T06:38:25Z
       
       0 likes, 0 repeats
       
       damn it. I was trying very hard to not optimize their code while moving it into a function, but it seems I'm gonna have to, this function may be too small
       
 (DIR) Post #Aoh5Lr4reN1RS1HKl6 by foone@digipres.club
       2024-12-04T06:39:54Z
       
       0 likes, 0 repeats
       
       I think whoever wrote this code assumed they were on a system that can't do unaligned 32bit reads.They were wrong.
       
 (DIR) Post #Aoh5ackfCB8PMcs8Rc by foone@digipres.club
       2024-12-04T06:42:39Z
       
       0 likes, 0 repeats
       
       I am ONE BYTE SHORT
       
 (DIR) Post #Aoh5cvR6hJSXtNp2Jc by foone@digipres.club
       2024-12-04T06:42:50Z
       
       0 likes, 0 repeats
       
       I have the whole function but no room for a RET!
       
 (DIR) Post #Aoh5mRXYhlBi4FNWHg by foone@digipres.club
       2024-12-04T06:44:47Z
       
       0 likes, 0 repeats
       
       @apicultor NOPs take up more space! I have a 36 byte codecave to shove this into
       
 (DIR) Post #Aoh5ou1Fn9FyyMRNfk by crobbler@mastodon.social
       2024-12-04T06:45:09Z
       
       0 likes, 0 repeats
       
       @foone Sad trombone.
       
 (DIR) Post #Aoh5sVakYR9YN1lNSa by foone@digipres.club
       2024-12-04T06:45:49Z
       
       0 likes, 0 repeats
       
       the above function has 5 NOPs in it, but moving the code around is a pain in Ghidra.
       
 (DIR) Post #Aoh5vSGXNQiivKiJrU by crobbler@mastodon.social
       2024-12-04T06:46:09Z
       
       0 likes, 0 repeats
       
       @foone Wow, you weren't kidding. They did a number on this game in the Windows conversion.
       
 (DIR) Post #Aoh69noI4WwpnSLKOe by foone@digipres.club
       2024-12-04T06:48:56Z
       
       0 likes, 0 repeats
       
       NEW CODE CAVE TIME
       
 (DIR) Post #Aoh6pN2vyAryx80uUy by foone@digipres.club
       2024-12-04T06:56:28Z
       
       0 likes, 0 repeats
       
       it has been zero days since I exploded the stack
       
 (DIR) Post #Aoh6yKBdyEbkgrMCcy by foone@digipres.club
       2024-12-04T06:58:05Z
       
       0 likes, 0 repeats
       
       turns out my codecave was non-existent so it never actually ran
       
 (DIR) Post #Aoh70m47I0u1jX0Kzw by foone@digipres.club
       2024-12-04T06:58:22Z
       
       0 likes, 0 repeats
       
       where am I going to find 37 spare bytes, in this day and age?
       
 (DIR) Post #Aoh74uOAHl3AhqLxmy by RnDanger@infosec.exchange
       2024-12-04T06:59:16Z
       
       0 likes, 0 repeats
       
       @foone
       
 (DIR) Post #Aoh7AGYbI8fMuLmz9E by foone@digipres.club
       2024-12-04T07:00:04Z
       
       0 likes, 0 repeats
       
       "Borland C++ - Copyright 1995 Borland Intl." is 42 characters long...
       
 (DIR) Post #Aoh83W8r37k1Ac5nfM by smeg@assortedflotsam.com
       2024-12-04T07:10:13Z
       
       0 likes, 0 repeats
       
       @foone Turbo C++ was the first language I ever learned. I miss it
       
 (DIR) Post #Aoh87OZ3AFIapMC6oi by vandorb12@infosec.exchange
       2024-12-04T07:10:53Z
       
       0 likes, 0 repeats
       
       @foone @EMR oh dang a nostalgia trip! I couldn't get past the helicopter level for some reason, until RNG graced me with a final win that was by like a pixel. Young me was upset enough with that I decided not to play anymore.
       
 (DIR) Post #Aoh8MCbbuOo458S7G4 by smeg@assortedflotsam.com
       2024-12-04T07:13:39Z
       
       0 likes, 0 repeats
       
       @foone Turbo C++ was the first language I ever learned, Borland's dumber brother. I miss it
       
 (DIR) Post #Aoh8YuJREWUD6y0jKq by foone@digipres.club
       2024-12-04T07:15:57Z
       
       0 likes, 0 repeats
       
       well that worked (as in didn't crash) but did nothing
       
 (DIR) Post #Aoh8k8OpCOLVzDsrMO by foone@digipres.club
       2024-12-04T07:18:00Z
       
       0 likes, 0 repeats
       
       I have located another function that may be fucking things
       
 (DIR) Post #Aoh9eWoZbuCjvSomrQ by foone@digipres.club
       2024-12-04T07:28:04Z
       
       0 likes, 0 repeats
       
       unfortunately that function is 68 bytes long, and my fixed version will be 72 bytes long. That's not good. I need way more room
       
 (DIR) Post #AohATjSiLaFTv60f5c by foone@digipres.club
       2024-12-04T07:37:24Z
       
       0 likes, 0 repeats
       
       the function after it is never used, though. time to just take over that space
       
 (DIR) Post #AohBLip6wDtPZnEJBA by foone@digipres.club
       2024-12-04T07:47:09Z
       
       0 likes, 0 repeats
       
       YES! it works. At least for the movement of the cursor in the game: clicking is still not functional. But that should be relatively easy to fix.
       
 (DIR) Post #AohBm36w8FrE1g7aXg by MedeaVanamonde@chaosfem.tw
       2024-12-04T07:51:53Z
       
       0 likes, 0 repeats
       
       @foone Ptah should be part of your nameOr maybe your egyptian namePtah-Phoonë-Niûť
       
 (DIR) Post #AohBwXQwFS4kxwTjxg by foone@digipres.club
       2024-12-04T07:53:44Z
       
       0 likes, 0 repeats
       
       ugh I may have overstated the ease
       
 (DIR) Post #AohC2i5ZXpYZkaQaKe by foone@digipres.club
       2024-12-04T07:54:56Z
       
       0 likes, 0 repeats
       
       I basically need a second copy of GetAdjustedMousePosition to fix this.the problem is that that function is already huge, at 78 bytes. A second copy is going to be difficult to shove somewhere
       
 (DIR) Post #AohHO4tCT48iJheIuO by foone@digipres.club
       2024-12-04T08:54:44Z
       
       0 likes, 0 repeats
       
       ugh. writing x86 assembly code in ghidra is no fun.
       
 (DIR) Post #AohHkZzpUfKLAETnPs by rasur@mastodon.social
       2024-12-04T08:58:42Z
       
       0 likes, 0 repeats
       
       @foone isn't the "in ghidra" superfluous? ;)
       
 (DIR) Post #AohIyZgxWQ1KEDtGC0 by foone@digipres.club
       2024-12-04T09:12:35Z
       
       0 likes, 0 repeats
       
       @rasur Nah. Ollydbg makes it easy to use, but I'm not using that debugger. And it's fine in a real assembler like NASM
       
 (DIR) Post #AohJ1si7Gdkm5B0ZxQ by foone@digipres.club
       2024-12-04T09:13:12Z
       
       0 likes, 0 repeats
       
       it's somehow generating calls to win32 functions that don't work at all.
       
 (DIR) Post #AohJ5DEVQE40bHkM2i by foone@digipres.club
       2024-12-04T09:13:25Z
       
       0 likes, 0 repeats
       
       FUCK ME FIXUPS
       
 (DIR) Post #AohJjggFMA3dVt1R7Q by foone@digipres.club
       2024-12-04T09:20:59Z
       
       0 likes, 0 repeats
       
       no I don't think there are fixups here. this is just... some other weirdness.
       
 (DIR) Post #AohLXs6zEGzDOs1UtU by foone@digipres.club
       2024-12-04T09:41:25Z
       
       0 likes, 0 repeats
       
       got it working. Ghidra has no idea what my code means, but it works.Clicking and moving the mouse is properly done now, but the problem is that there's a few points where it clips the mouse to a smaller rectangle, and those rectangles are not calculated correctly now
       
 (DIR) Post #AohM2cAmXUXAwaSRQe by foone@digipres.club
       2024-12-04T09:46:52Z
       
       0 likes, 0 repeats
       
       found a bug! it saves the clipping RECT with a memset that only takes 8 bytes.a RECT that's made of 4 16bit ints is 8 bytes, but this rect is made of 4 32bit ints. So they only copy half of it
       
 (DIR) Post #AohM7wVQMx7tSAeaQ4 by tautology@infosec.exchange
       2024-12-04T09:47:54Z
       
       0 likes, 0 repeats
       
       @foone s/ in ghidra// <- fixed it for you 😜
       
 (DIR) Post #AohMSQL3A5RJllZEZM by Archivist@social.linux.pizza
       2024-12-04T09:52:00Z
       
       0 likes, 0 repeats
       
       @foone ah, I was gonna ask if you wanted to find them with a knife or a missile. I guess the answer is 'more personally' then
       
 (DIR) Post #AohMkuDCpc69dIi9Ro by th@social.v.st
       2024-12-04T09:54:50Z
       
       0 likes, 0 repeats
       
       @foone when @phooky was hacking new features into the vt100 ROM the easiest place to find space was removing support for different RX/TX baud rates.
       
 (DIR) Post #AohNBxDXlVoQlylbIe by foone@digipres.club
       2024-12-04T09:59:48Z
       
       0 likes, 0 repeats
       
       ugh. now I have the SetClip function, I need to find somewhere to stuff 8 bytes into it.or maybe... I replace all calls to SetClip(x,y,w,h) with FooneSetClip, which  just does:SetClip(x*2,y*2,w*2,h*2)
       
 (DIR) Post #AohNEhjfmaWXcr6eyu by foone@digipres.club
       2024-12-04T10:00:18Z
       
       0 likes, 0 repeats
       
       instead of needing 8 bytes "in place" (where I don't have them) it'll take up, like, uh... ~70 bytes elsewhere?
       
 (DIR) Post #AohNNjQYrVyjTkTIwK by foone@digipres.club
       2024-12-04T10:01:49Z
       
       0 likes, 0 repeats
       
       "Hey Foone? What did you just do?"Write a new function in the Ghidra "assembler""And how was it?"Very painful and slow."And what are you about to do?"Write a new function in the Ghidra AssemblerGEE I WONDER IF THIS IS'LL BE FUN
       
 (DIR) Post #AohNjzFGjSuwuLnlvk by foone@digipres.club
       2024-12-04T10:06:00Z
       
       0 likes, 0 repeats
       
       SHR, EAX 1 yeah that's how x86 assembly works
       
 (DIR) Post #AohNmjAswIQDvz3fhQ by Unixbigot@aus.social
       2024-12-04T10:06:30Z
       
       0 likes, 0 repeats
       
       @foone i don’t think  they thought about Thursday when they made the 8086.
       
 (DIR) Post #AohOL4SYJCZJnIhLJg by foone@digipres.club
       2024-12-04T10:12:40Z
       
       0 likes, 0 repeats
       
       there's a 50/50 chance that I'm passing the arguments in reverse order, but it's one of those annoying things where it's being inverted multiple times so I can't easily tell. I'm just gonna try it, I guess, and if the debugger says I got it wrong, I try again.I was never very good with binaries.
       
 (DIR) Post #AohRA8JdvkhOQo0ULI by foone@digipres.club
       2024-12-04T10:44:19Z
       
       0 likes, 0 repeats
       
       ok I've written FooneClip, my doubling function that calls SetClip. I just need to inject it into the places where SetClip is called, then test.
       
 (DIR) Post #AohREjnGWyjhpD3faC by foone@digipres.club
       2024-12-04T10:45:09Z
       
       0 likes, 0 repeats
       
       I'm patching the callsites instead of making SetClip detour to  my own version simply because there's not that many callsites, they're all static, and moving code is a real pain on ghidra
       
 (DIR) Post #AohRKBRf9OI125YBpw by foone@digipres.club
       2024-12-04T10:46:06Z
       
       0 likes, 0 repeats
       
       @gwenthekween yeah! So annoying. I learned one, I'm not gonna do the other, that will just completely fuck my brain.
       
 (DIR) Post #AohSCIasmu9AqEfQUy by foone@digipres.club
       2024-12-04T10:55:52Z
       
       0 likes, 0 repeats
       
       ok. callsites patched. it sounds like a speedrunning trick, so let's see if we can get FooneClip() !
       
 (DIR) Post #AohSFDzcLoTnRMdEgK by foone@digipres.club
       2024-12-04T10:56:29Z
       
       0 likes, 0 repeats
       
       my guess? it crashes, but it'll tell me important info in the debugger to see what went wrong, and it's something easily fixable.
       
 (DIR) Post #AohSgfqateYneFV3ui by foone@digipres.club
       2024-12-04T11:01:24Z
       
       0 likes, 0 repeats
       
       good lord, it works perfectly. or maybe it has a minor bug? I can't actually tell without cross-checking with the original pre-foone version.
       
 (DIR) Post #AohSomxOLZs60zY5qK by foone@digipres.club
       2024-12-04T11:02:41Z
       
       0 likes, 0 repeats
       
       I should inject some debugging to see where clipping rectangles actually are. It doesn't obviously break in the new one, but my clipping rectangles could be very different than how I think they are based on how the mouse acts.
       
 (DIR) Post #AohT3cSLfdghn86IBU by foone@digipres.club
       2024-12-04T11:05:30Z
       
       0 likes, 0 repeats
       
       yeah no, my clipping rectangles are completely buggered, I just didn't notice. so it runs, and just doesn't obviously break, but it never actually clips your mouse.
       
 (DIR) Post #AohT79akvhXTQcibC4 by rasur@mastodon.social
       2024-12-04T11:06:12Z
       
       0 likes, 0 repeats
       
       @foone ;)
       
 (DIR) Post #AohcWhQRAoo9Bk9E9Y by gregly@retro.pizza
       2024-12-04T12:51:42Z
       
       0 likes, 0 repeats
       
       @foone eternal mood 😅
       
 (DIR) Post #AohiXXGn16DHhpPvQ8 by RueNahcMohr@infosec.exchange
       2024-12-04T13:59:00Z
       
       0 likes, 0 repeats
       
       @foone not triangles?
       
 (DIR) Post #Aoi7872Bv72hx7Yxt2 by uliwitness@chaos.social
       2024-12-04T18:34:29Z
       
       0 likes, 0 repeats
       
       @foone Ah, what I remembered was memcpy_s() ! https://en.cppreference.com/w/c/string/byte/memcpy
       
 (DIR) Post #Aoiah0tDeglVhXMQ5Y by BRicker@fosstodon.org
       2024-12-05T00:05:43Z
       
       0 likes, 0 repeats
       
       @foone This is expected of clipping rectangles...
       
 (DIR) Post #AoimbYRpAmT7Uai6dM by nekoewen@mastodon.social
       2024-12-05T02:19:01Z
       
       0 likes, 0 repeats
       
       @foone currently typing on a Zeppelin46 mechanical keyboard 😤 something something a joke about adding zeppelin support to QMK
       
 (DIR) Post #AoivRjbtiQ0UntoYPg by Forbearance@mastodon.xyz
       2024-12-05T03:58:18Z
       
       0 likes, 0 repeats
       
       @foone always one day lateFor once I'd like an ending I can celebrate
       
 (DIR) Post #AojYiE7dw87QHTWBLE by foone@digipres.club
       2024-12-05T11:18:10Z
       
       0 likes, 0 repeats
       
       okay I now can re-manifest the EXE files, using the SDK's Manifest Tool. This lets me turn off the DPI-scaling that windows tries to automatically apply, without having to manually configure compatibility setting each time I export a modified EXE.
       
 (DIR) Post #AojZ4WVWGINTfjJlQW by foone@digipres.club
       2024-12-05T11:22:19Z
       
       0 likes, 0 repeats
       
       I could also call a function, but then I'd need to write some code to load it with LoadLibrary/GetProcessAddress
       
 (DIR) Post #AojeXuZeMSTCTx5BE8 by krono@toot.berlin
       2024-12-05T12:23:36Z
       
       0 likes, 0 repeats
       
       @foone IIRC, if the exe does *not* have an embedded manifest, you can just put a FOO.exe.manifest next to it and it will be picked up (like we did here https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/building/win64x64/squeak.cog.spur/Squeak.exe.manifest#L14 )
       
 (DIR) Post #AoknjWVyjS0e5Hw9oW by foone@digipres.club
       2024-12-06T01:41:22Z
       
       0 likes, 0 repeats
       
       @krono oh interesting
       
 (DIR) Post #AolAaDZs4K8vguI0w4 by krono@toot.berlin
       2024-12-06T05:57:26Z
       
       0 likes, 0 repeats
       
       @foone "If possible, you should embed the application manifest as a resource in your application's `.exe` file or `.dll`. If you can't do that, then you can place the application manifest file in the same directory as the `.exe` or `.dll`."https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#file-location
       
 (DIR) Post #AolAuTND3AJATM1dZo by foone@digipres.club
       2024-12-06T06:01:06Z
       
       0 likes, 0 repeats
       
       @krono Good to know. And that definitely simplifies this: one less way I gotta patch the binary.
       
 (DIR) Post #AolB0DAQDXblwmmS4O by krono@toot.berlin
       2024-12-06T06:02:06Z
       
       0 likes, 0 repeats
       
       @foone Exactly.
       
 (DIR) Post #ApjejaVXsnHXzl16iu by sborrill@justfollow.me.uk
       2025-01-04T10:17:46Z
       
       0 likes, 0 repeats
       
       @foone https://www.theregister.com/2025/01/03/captcha_doom_nightmare/