Bad idea: build a captcha library that embeds DOSBox so it can make you beat levels/puzzles from DOS games to continue.
-
this set_palette code got loaded into the segment 0BBC, one of the only 16-bit DOS segments marked red in shinigami eyes
-
@[email protected] maybe they wanted to experience the joys of funroll-loops all by themselves
not much else going on in 91 -
Foone🏳️⚧️replied to Foone🏳️⚧️ last edited by [email protected]
interesting: the same function is called to fade a palette TO black and to fade a palette FROM black
I wonder if it's specialized to just be palette to black and vice versa, or if it does arbitrary fades between two palettes?
-
@aud good point, it was a famously uneventful year
-
I'm staring at this code going "if it was less 2am, I could understand this math"
-
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); -
@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).
-
@[email protected] who even remembers the first gulf war, the Soviet Union, or Rodney King anyway
-
@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?)
-
@nazgul I know it existed before, I just don't think DOS compilers of the time did it this much.
-
@oblomov FACK
yeah
-
-
@[email protected] @[email protected] "In America, we have enough prosperity and room for code sprawl".
-
@[email protected] @[email protected] like the opposite of a Potemkin Village
we showcase our decadent use of file space. look how many kilobytes we can afford, you fucking commies -
@foone this is why i love binja and can't stand hexrays
who 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)
-
found the INT31!
we've got OVERLAYS FOR SURE!
-
wasn't there some kind of tool that could flatten out an overlay'd file, at least enough for ghidra to load it?
-
Support for Borland FBOV / VROOMM overlays for DOS MZ EXE · Issue #5543 · NationalSecurityAgency/ghidra
It would be nice to get support for the "FBOV" overlay extension for MZ EXEs. Also known as "VROOMM" (Virtual Run-time Object-Oriented Memory Manager), this was a feature provided by the Borland C/C++ toolchain from v2.0. It allowed for ...
GitHub (github.com)
oh this is more complicated than I can figure out at 2:42am
-
@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.
-
@foone in the middle od the night your thread here was my entire feed.
Wilde!