I don't know if I'm weird or if it's just normal to get random reverse engineering urges.
like right now I have like 5 major RE tasks I'm halfway done with, I'm hacking a bunch of games (and more interesting things), but my brain is just like "you need to reverse engineer a game that uses a software 3D renderer"
Conversation
Notices
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:31 JST Foone🏳️⚧️
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:52 JST Foone🏳️⚧️
the best place to stick dynamically loaded code: INSIDE AN INTERRUPT HANDLER
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:53 JST Foone🏳️⚧️
I think they're dynamically loading code and stuffing it into the tick handler
Rich Felker and Ryan Castellucci :nonbinary_flag: repeated this. -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:54 JST Foone🏳️⚧️
at least they remembered to call CLI first
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:55 JST Foone🏳️⚧️
weird.
it stores the video mode selected (1-3) in 1000:912d, then stores the video mode TIMES TWO in 1000:912e and 1000:6646 -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:55 JST Foone🏳️⚧️
why bother using the DOS api for changing interrupt handlers, when you can just address segment zero? WHY NOT INDEED, ECHELON?
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:56 JST Foone🏳️⚧️
okay so video mode hercules is actually CGA but with a flag set.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:57 JST Foone🏳️⚧️
so lets instead search the whole program for the scalar 6648 and OH LOOK IT'S REFERENCED AFTER ALL
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:57 JST Foone🏳️⚧️
ghidra: I know decompilers that understand segments and they're all cowards
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:58 JST Foone🏳️⚧️
the what video mode do you want? string starts at 1000:6648 and it's referenced from... nowhere. or so ghidra thinks.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:48:59 JST Foone🏳️⚧️
so when the game launches it asks me what video mode I want (Hercules, CGA, Tandy/Amstrad, or VGA) and then asks me to insert the data disk. This is not fun, since I always give it the same answers. So let's fix that
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:00 JST Foone🏳️⚧️
the game hangs if you try to copy the wrong .ARE file into the place, so I suspect there's some internal location references or something that break
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:01 JST Foone🏳️⚧️
there's some values over 0x80 in the decompressed out so I think I'm misunderstanding the decompression
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:01 JST Foone🏳️⚧️
I wonder of those 6-byte chunks are objects? like, x-pos, y-pos, z-pos, look up object ID in the CMP file?
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:02 JST Foone🏳️⚧️
NOPE I'm completely wrong. They've got ES and DS pointing at different segments.
2CEF is the start (I guess?) of the output buffer, in a different segment -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:03 JST Foone🏳️⚧️
okay I'm following through the decompress loading A3.ARE. I can see in the data segment we've got the data in the file, but up at 2CEF? all zeros. now if I wait for this function to return, that should get filled out
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:04 JST Foone🏳️⚧️
the files have a 2 byte header that's ignored and not checked, then a number of things.
those things are 6-byte chunks that get copied into the buffer above 0x1427. No idea why yet. -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:04 JST Foone🏳️⚧️
It seems the way the function works that it's passed a buffer as DS, then it loads the file starting from address 0, and writes that into 0x2CEF and up That's 11k into the buffer, so well above any real file.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:05 JST Foone🏳️⚧️
so 44 82 44 turns into 44 00 00 44
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:06 JST Foone🏳️⚧️
the calling code changes the data segment to one just used for your specific buffer, so you don't need a pointer, it's just in the implicit state of the processor. you just work from 2
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:06 JST Foone🏳️⚧️
okay I haven't checked against the actual output (since I haven't gotten the actual output yet) but I think this isn't huffman, it's not even regular RLE, it's Very Simple RLE: You can represent all bytes 00-7F normally, but if the high bit is set, it instead means "repeat this many zeros"
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:07 JST Foone🏳️⚧️
16bit assembly is so silly.
You enter a function and step one is you make a pointer to 2, and then increment from there -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:08 JST Foone🏳️⚧️
uh-oh.
after loading the file, it calls two functions. One seems to just be shoving it into memory, but the other shows up as blank, and instant ret.
That smells like dynamic code loading and I don't like that
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:09 JST Foone🏳️⚧️
Ghidra: I support disassembly of 16-bit DOS programs!
also Ghidra: WHAT THE FUCK IS "DS"? all segment-relative poitners are aimed at segment 0000, right? -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:09 JST Foone🏳️⚧️
either ghidra's set-register doesn't work or I don't understand what it's doing
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:10 JST Foone🏳️⚧️
ahh. so it's got a string in the EXE that's A0.ARE.
Then it has another string that's 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
So when it wants to load area N, it indexes into the Nth item of the second string, then shoves it in over the 0 in A0.ARE and opens that file -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:11 JST Foone🏳️⚧️
but I bet it's because it can read non-huffman'd files, and 8192 + 2 byte header?
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:12 JST Foone🏳️⚧️
ahh, I think I was looking at a custom loader that just handles TITLE.HUF
(which is 7687 but presumably the files is re-opened later?)
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:12 JST Foone🏳️⚧️
yeah the version that works for maps loads 8194 bytes.
which is an annoying number.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:13 JST Foone🏳️⚧️
I think this game was programmed in assembly. passing one pointer in SI is not a calling convention I have seen compilers use
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:14 JST Foone🏳️⚧️
interesting. this code that opens A2.ARE reads 1536 bytes and then closes it.
the file is 2432 bytes, though
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:15 JST Foone🏳️⚧️
I suspect the maps are compressed too.
time to find the decompress routine in the exe!
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:16 JST Foone🏳️⚧️
here's P0.HUF to show what I mean about corruption:
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:16 JST Foone🏳️⚧️
CMP files seem to contain object info, since I see text in them.
the game supposedly has 240 objects on the map, which can be transported onto your ship when found. Some are useless, some are clues to The Main Puzzle, and some are instant death bombs
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:17 JST Foone🏳️⚧️
for the ones with 0/1 versions (COVE and DASH), 0 seems be the CGA/Monochrome version, while 1 is the VGA version
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:18 JST Foone🏳️⚧️
it seems to only render the first half and then the rest is gibberish. I bet it's something to do with these files being multi-format, since they have to encode the image for VGA/CGA/Monochrome
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:18 JST Foone🏳️⚧️
okay so P0-5 are the artifact pictures, DASH is the dashboard, COVE is some castle (end of game?) and title is... the title
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:19 JST Foone🏳️⚧️
anyway, the game starts up by showing you TITLE.HUF.
let's just swap out all the other HUF files one by one and see what they are!
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:20 JST Foone🏳️⚧️
there's a reference to a covex.huf file in the EXE, but it's not included in this version.
Maybe COVE0/COVE1 are short for COVEX? -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:20 JST Foone🏳️⚧️
I think the HUF files are compressed, at least somewhat. Just not very well.
Either that or they're some kind of image drawing microcode but I kinda doubt it
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:21 JST Foone🏳️⚧️
arg I don't have a memory scanner that'll work on the game right now. I can't easily make cheats for infinite health and fuel and shit
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:21 JST Foone🏳️⚧️
EXE isn't packed, it's about 90 kilobytes.
Other files: 16 CMP files, and a bunch of HUF files.
6 labeled P0 - P5, TITLE, DASH0/1, COVE0/1? Sounds like they're image files . -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:22 JST Foone🏳️⚧️
Each .ARE file is only 3 kilobytes so all 36 of them only use up 96 kilobytes, but this game was born on the c64, where that was more RAM than the whole system had
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:23 JST Foone🏳️⚧️
Which makes sense if we look at the map included in the box:
It's a 6x6 grid, labeled A-F, 1-6.So clearly the game is storing map chunks in these .ARE files and loading them as needed.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:24 JST Foone🏳️⚧️
the game has 36 .ARE files, named A0 through AZ.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:25 JST Foone🏳️⚧️
okay so I set a interrupt breakpoint (bpint in the DOSBOX debugger) on AH=3D, and AH=0F. Those are the two main ways to open files on DOS, the early way (0F) and the later way (3D). Flew around until the game pauses, and it's trying to load A2.ARE
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:26 JST Foone🏳️⚧️
I think that system had some PIC problem, because it crashed more than once while games were doing weird CPU-based animation/audio tricks
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:26 JST Foone🏳️⚧️
and I have crashed the game. maybe this isn't emulated terribly well
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:27 JST Foone🏳️⚧️
Echelon was technically the first video game I ever owned. Shortly after my family got our first PC (a Heavily Used Packard Bell 486), my dad picked up a copy at a thrift store or something.
I never beat the game, especially because it only had a 50/50% chance of launching on my PC -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:28 JST Foone🏳️⚧️
maybe I should just go back so far I find a DOS game that doesn't need segments and overlays because it's only 64kb
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:28 JST Foone🏳️⚧️
1987 Wireframe flightsim/puzzle Echelon?
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:29 JST Foone🏳️⚧️
on the other hand, 3/4 of those are DOS games. I have done so many DOS games and I think I'm overdosed on having to deal with segments and overlays.
maybe win9x games are a better idea for relaxation
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:30 JST Foone🏳️⚧️
3D game ideas I might could hack on for just why not reasons:
1. MindTrap (it glitches on later windows, would be nice to fix it, even if no one but me cares)
2. Betrayal at Krondor: The overworlds are cool!
3. Abrams Battle Tank by Dynamix/EA ?
4. 688 Attack Sub -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Saturday, 28-Dec-2024 13:49:31 JST Foone🏳️⚧️
me, yearning: man, I wish I could reverse engineer something with a software 3D renderer...
3D Movie Maker: what? are you serious?
Corncob 3d: AM I A JOKE TO YOU?
hell, Office 95: YOU STILL NEED TO GET BACK TO ME -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:46 JST Foone🏳️⚧️
when a sector isn't loaded it's rendered like it's there anyway, but empty.
So when you're at A05 and looking west, you should be seeing what's in B14. And you are... because B14 is empty. The stuff doesn't start to B13, which you can only see by traveling into B14 and loading that area instead
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:47 JST Foone🏳️⚧️
but it can only have on area loaded.
So when you're at A01, you should have parts of three other areas visible... it solves this in a silly but simple fashion:There's nothing at the borders.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:48 JST Foone🏳️⚧️
I wonder if it'll break if I put all 242 items into one area
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:48 JST Foone🏳️⚧️
so the game works by only having a 3x3 sector grid rendered, but those sectors are inside of Areas, and it can only have one area loaded at once. So if you're at sector B02, you have A01, A02, A03, B01,B02,B03, C01,C02,& C03 loaded.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:49 JST Foone🏳️⚧️
okay I can figure out where all the items are now
C:\DOSBox-X\drive_c\Echelon\py>python decode.py ..\Az.ARE az.out
header=(0, 144),n_items=5
icon=0,itemid=2,sector=D04,x=6528,y=4992,c6=31
icon=96,itemid=128,sector=D11,x=7552,y=7040,c6=3
icon=108,itemid=152,sector=D11,x=3712,y=4992,c6=33
icon=20,itemid=41,sector=E06,x=5760,y=6784,c6=18
icon=18,itemid=38,sector=L11,x=3456,y=7296,c6=1 -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:50 JST Foone🏳️⚧️
byte 4 is Y-position using the same rules (origin is at bottom left)
No idea what byte 5 means. it's set to 18, but changing it to 0 or FF or anything in between seems to change nothing
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:51 JST Foone🏳️⚧️
okay so the 6-byte format is:
byte 0: icon
byte 1: what it is
byte 2: what sector it is inbytes 3-5 are for intra-sector positioning (presumably). now to try and figure that shit out
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:51 JST Foone🏳️⚧️
okay this is weird. Byte 3 is the x-position within the sector, and it can have (valid) positions between -19 and +19.
If you go above or below that range, it'll get placed into neighboring sectors, which fucks up the game's item detection. It only looks in the current sector for items, but it won't see an item that's one sector over but positioned at -50
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:52 JST Foone🏳️⚧️
hey look there it is.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:53 JST Foone🏳️⚧️
so if I change it to 71 (hex 0x47) it should move to sector D07
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:54 JST Foone🏳️⚧️
which I think means it has a positional resolution of like 35 meters, given that each sector is 10km across
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:54 JST Foone🏳️⚧️
fuck me these are nibble addresses
I entered "87", which is hex 0x57, and it's in sector E07
E is the 5th letter of the alphabet. so it's sector E07. -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:55 JST Foone🏳️⚧️
ahh. I think it's (effectively) using big endian numbers. See, the coordinates aren't linear X/Y, they're "which sector" and then (maybe) "where within the sector".
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:56 JST Foone🏳️⚧️
the first byte seems to be which icon to use. I can adjust it, and the thing still picks up as the mining probe, but it looks different in the preview
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:56 JST Foone🏳️⚧️
next byte seems to be what it is.
I set it to 08 and got a Data Storage Laser Disk [sic]I think this guy was murdered, I found out from looking at the files that there's a dead body you can find somewhere, and I think it's mr. Allen
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:57 JST Foone🏳️⚧️
yeah this makes no sense.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:58 JST Foone🏳️⚧️
I'm gonna need a spreadsheet for this
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:59 JST Foone🏳️⚧️
yeah I narrowed down the item I'm floating over to one specific chunk.
I set the last short in the chunk to 4312 and the item changed Z coord to (approx) 4761.The value was original 4615 and it was at Z coord 6794. ugh.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:40:59 JST Foone🏳️⚧️
WHY ARE THE SCALES DIFFERENT
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:00 JST Foone🏳️⚧️
which does mean I can figure out how many items are in each area, easily. Read the 3rd byte of every area file!
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:00 JST Foone🏳️⚧️
I have done so. The Area you start in is the only one with zero items.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:01 JST Foone🏳️⚧️
okay I think that 6-byte-chunks thing at the top of the file is items. I went and sat on top of an item, then edited the file so instead of 5-chunks it had 0, then reloaded the area (by hyperspacing out and then back in ) and suddenly the item is gone
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:02 JST Foone🏳️⚧️
So the game has an alien language that's written on lots of artifacts, right?
You can see some of it here, on this mining probe I picked up
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:02 JST Foone🏳️⚧️
But like most alien languages in games, it's just a alternate alphabet on english.
So I found the alphabet in the EXE and overwrote it with one of the other two fonts, and now it's plain english:
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:03 JST Foone🏳️⚧️
I'm gonna have to expand my patching system to let me patch PNGs into EXEs as binary data
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:04 JST Foone🏳️⚧️
also based on the scale this game says it functions at, your one-man fighter jet/spaceship is approximately 500 meters (1640') long
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:05 JST Foone🏳️⚧️
it keeps crashing when I modify it. I think I found the font routine, though, which'll help hack more
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:05 JST Foone🏳️⚧️
I think the map format might be tile-based rather than wireframes. You see (on the map) how the rocks in the sector to the bottom-left are the same as the ones in the top-right? That'd make sense if it's just a single value selecting what set of 3D geometry to stuff in the square
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:06 JST Foone🏳️⚧️
I tried to glitch up the map to see what it meant, but I accidentally glitched it too hard and got stuck in an infinite divide by zero glitch
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:07 JST Foone🏳️⚧️
this compresses the file from 2.36 kilobytes down to an amazing 2.25 kilobytes
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:08 JST Foone🏳️⚧️
interesting. so the .ARE files have a 140 near the top, and the manual says each AREA is 140 kilometers.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:08 JST Foone🏳️⚧️
the RLE compression seems to only affect the first 256 bytes of the file (after the 6-byte chunks). fucking weird. But I wrote some code that does the same, and it matches.
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:09 JST Foone🏳️⚧️
for some reason ghidra thinks some of the calls are going into the data segment instead of CS
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:10 JST Foone🏳️⚧️
the way ghidra handles interrupts is profoundly broken and someone needs to fix it. someone might have already, I just haven't installed that incomplete dos loader
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:10 JST Foone🏳️⚧️
oh ghidra is just completely wrong about where this call goes. that's... fine
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:11 JST Foone🏳️⚧️
I guess it's puts(), not printf
But yeah. It doesn't feel like an inlined function, it's just a macro
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:12 JST Foone🏳️⚧️
patch 0xDF0A with 90 90 90 to skip disk check
patch 0xE2BF with C6 C0 33 90 90 90 to skip video check. 33=VGA, 32=Tandy/Amstrad, 31=CGA, 68=Hercules -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:12 JST Foone🏳️⚧️
I think this was written with a macro assembler by someone who loved macros.
Like there's a lot of times where the code would be like
LEA EAX, SomeString
CALL PRINTFin a saner world, but instead there's a loop that uses global memory addresses and calls the BIOS TELETYPE OUTPUT call letter by letter. and that loop appears in every function that needs to do printf()
-
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:13 JST Foone🏳️⚧️
anyway for now I can just skip the disk swap check by patching out CALL DiskSwapCheck, since it has no side-effects.
The video mode check unfortunately does, so I gotta leave it in but hack it to think I said "VGA" -
Embed this notice
Foone🏳️⚧️ (foone@digipres.club)'s status on Sunday, 29-Dec-2024 17:41:14 JST Foone🏳️⚧️
I need to turn my patching shit form Super Solvers Gizmos & Gadgets into a generic thing I can use on any game. That'd be sweet
-
Embed this notice
sneak (sneak@s.sneak.berlin)'s status on Sunday, 29-Dec-2024 21:32:43 JST sneak
@foone "i don't know if i'm weird"
-
Embed this notice