Post AuEYTscGDRuucEpPfc by StompyRobot@mastodon.gamedev.place
 (DIR) More posts by StompyRobot@mastodon.gamedev.place
 (DIR) Post #AuEEMRDdgIYMXDUBAe by foone@digipres.club
       2025-05-18T19:46:49Z
       
       0 likes, 0 repeats
       
       Hacking on a "new" game today: Brøderbund's 1989 DOS game Playroom.
       
 (DIR) Post #AuEERaP0xsCGSsGGgq by foone@digipres.club
       2025-05-18T19:47:46Z
       
       0 likes, 0 repeats
       
       I'd already gotten this game into my ghidra because I was checking to see if it used the same formats/compression as the 1990-ish Carmens & Prince of Persia. I didn't think it did... but then someone on reddit asked about hacking this game's compression. So I pulled it back up
       
 (DIR) Post #AuEEUbqS3eFvo7XJuy by foone@digipres.club
       2025-05-18T19:48:21Z
       
       0 likes, 0 repeats
       
       some code and specs they've made:https://github.com/PeterSwinkels/ThePlayroomPESFileViewer
       
 (DIR) Post #AuEEbbsaKPpzwPs9Uu by foone@digipres.club
       2025-05-18T19:49:38Z
       
       0 likes, 0 repeats
       
       It's definitely compressed. Here's what TITLE.PES looks like in binxelview:
       
 (DIR) Post #AuEEyrkHVM0ToF4skq by kawa@mas.to
       2025-05-18T19:53:46Z
       
       0 likes, 0 repeats
       
       @foone Oh my fuck I remember that one fondly.
       
 (DIR) Post #AuEFIxOkCL898GaHAm by foone@digipres.club
       2025-05-18T19:57:23Z
       
       0 likes, 0 repeats
       
       @endrift I'm sure that was the last time you messed around with a program so much you broke it
       
 (DIR) Post #AuEFLjglcpkLTyL692 by foone@digipres.club
       2025-05-18T19:57:45Z
       
       0 likes, 0 repeats
       
       they seem to be opening title.PES 4 times on load.that seems less than optimal
       
 (DIR) Post #AuEFYOeR9bJe04Hozw by foone@digipres.club
       2025-05-18T20:00:12Z
       
       0 likes, 0 repeats
       
       maybe it's loading the file once per plane? this is a CGA/EGA game, after all
       
 (DIR) Post #AuEG683DNcZUMQxdQG by foone@digipres.club
       2025-05-18T20:06:18Z
       
       0 likes, 0 repeats
       
       8b5606 MOV DX, word ptr [BP  + param_1 ]8b5606 MOV DX, word ptr [BP  + param_1 ]you know, in case the first one doesn't take
       
 (DIR) Post #AuEHsTlO3ZhvYTF0Xg by fluchtkapsel@nerdculture.de
       2025-05-18T20:26:11Z
       
       0 likes, 0 repeats
       
       @foone Reminds me of something similar on the C128 where a specific instruction was only executed when written twice. Someone called the construct the "do it, please" instruction.
       
 (DIR) Post #AuEISBn2MIY0Ej2aUi by foone@digipres.club
       2025-05-18T20:32:42Z
       
       0 likes, 0 repeats
       
       @fluchtkapsel ooh, fun
       
 (DIR) Post #AuEM4FIC5IG7xxS772 by foone@digipres.club
       2025-05-18T21:13:13Z
       
       0 likes, 0 repeats
       
       Progress.
       
 (DIR) Post #AuEM8ZLJTnzlJEyOBM by StompyRobot@mastodon.gamedev.place
       2025-05-18T21:13:58Z
       
       0 likes, 0 repeats
       
       @foone why are the two instructions addresses the same?
       
 (DIR) Post #AuEMRJoZR9q2eTbA6y by foone@digipres.club
       2025-05-18T21:17:23Z
       
       0 likes, 0 repeats
       
       @StompyRobot that's not the address, that's the machine code
       
 (DIR) Post #AuESBmlubgjtYJKbr6 by foone@digipres.club
       2025-05-18T22:21:49Z
       
       0 likes, 0 repeats
       
       found a picture of the original disks on ebay: it comes on three disks, labeled A, B, and C.interestingly, the game uses those names internally, instead of calling them disk1-disk3.
       
 (DIR) Post #AuEScBHi5iG16gn6YK by JennyFluff@chitter.xyz
       2025-05-18T22:26:31Z
       
       0 likes, 0 repeats
       
       @foone Do we have proper images of those disks yet (and how much are they on ebay?)?
       
 (DIR) Post #AuESndoCNc7Al3S4lU by foone@digipres.club
       2025-05-18T22:28:41Z
       
       0 likes, 0 repeats
       
       @JennyFluff yup! images (and flux level) here:https://archive.org/details/20240119_20240119_0659
       
 (DIR) Post #AuESv4ggqL1i9GU5Z2 by JennyFluff@chitter.xyz
       2025-05-18T22:29:58Z
       
       0 likes, 0 repeats
       
       @foone beautiful <3
       
 (DIR) Post #AuETjP03b2MrcpXbuq by foone@digipres.club
       2025-05-18T22:39:05Z
       
       0 likes, 0 repeats
       
       so every time the game tries to open a file, it'll try first the current drive, then A:, then B:.so it'll happily let you have two disks in at once to cut down on disk swapping
       
 (DIR) Post #AuEToorqqfRvIgHnm4 by foone@digipres.club
       2025-05-18T22:40:05Z
       
       0 likes, 0 repeats
       
       also, it looks like only some versions of the game have 3 disks. Some (even 360kb versions) only come on two disks. I imagine this is for sound support: this game came out 1989-1991, when sound cards were evolving rapidly.
       
 (DIR) Post #AuETrcj0S1lIVdUC92 by foone@digipres.club
       2025-05-18T22:40:31Z
       
       0 likes, 0 repeats
       
       there's two copies on the internet archive that are 2-disk:https://archive.org/details/20240119_20240119_0659
       
 (DIR) Post #AuEU2AIMUb2nWO39Pc by foone@digipres.club
       2025-05-18T22:42:30Z
       
       0 likes, 0 repeats
       
       there's also apple II, macintosh, amiga, fm towns, and windows 3.x versions. like most broderbund games, it got ported to a bunch of things.
       
 (DIR) Post #AuEUnV8wnURHn7DZia by jpm@aus.social
       2025-05-18T22:51:00Z
       
       0 likes, 0 repeats
       
       @foone CBF typing the opcode for NOOP, just copy & paste the last assembly command
       
 (DIR) Post #AuEV2YzglM024s4MxU by JennyFluff@chitter.xyz
       2025-05-18T22:53:40Z
       
       0 likes, 0 repeats
       
       @foone I converted the flux image to scp via greaseweazle and having a look at the copy protection bit. I wonder if it actually reads the sector that's being overlapped or if it looks for a read error at that specific sector. Want to look into that?
       
 (DIR) Post #AuEVBopxEDH1otvhTc by foone@digipres.club
       2025-05-18T22:55:27Z
       
       0 likes, 0 repeats
       
       @JennyFluff I'll get around to it later, right now I'm focusing on the decompression.I did spot some direct disk I/O calls, so I bet those are related
       
 (DIR) Post #AuEVGPltqeN9WrDzE0 by JennyFluff@chitter.xyz
       2025-05-18T22:56:15Z
       
       0 likes, 0 repeats
       
       @foone :blobcatheart:
       
 (DIR) Post #AuEXEHwoAOk0amROGO by foone@digipres.club
       2025-05-18T23:18:09Z
       
       0 likes, 0 repeats
       
       @Devourer_ITA several broderbund games had fm-towns ports, they were translated versions
       
 (DIR) Post #AuEYTscGDRuucEpPfc by StompyRobot@mastodon.gamedev.place
       2025-05-18T23:32:15Z
       
       0 likes, 0 repeats
       
       @foone ah!
       
 (DIR) Post #AuEcph8DzkyDBWR8vA by foone@digipres.club
       2025-05-19T00:21:01Z
       
       0 likes, 0 repeats
       
       @Devourer_ITA I think it was relatively easy to port DOS games to the FM-Towns, because of how it's nearly a PC-compatible. Just a guess, though
       
 (DIR) Post #AuIiQsVhvdqBapoIK0 by foone@digipres.club
       2025-05-20T23:42:38Z
       
       1 likes, 0 repeats
       
       the eternal question:is this code completely stupid, or is ghidra decompiling it wrong?
       
 (DIR) Post #AuIiTSVv2X4xpp8irg by foone@digipres.club
       2025-05-20T23:42:45Z
       
       0 likes, 0 repeats
       
       the answer is always "yes"
       
 (DIR) Post #AuIiX6qzVuDhocjk5Q by foone@digipres.club
       2025-05-20T23:43:43Z
       
       0 likes, 0 repeats
       
       my current theory is that the programmer was very superstitious and needed to do an elaborate ritual on each register to make it Purified before it could be accessed
       
 (DIR) Post #AuIicZpzBDqN9fsE5I by foone@digipres.club
       2025-05-20T23:43:54Z
       
       0 likes, 0 repeats
       
       my current theory is that the programmer was very superstitious and needed to do an elaborate ritual on each register to make it Purified before it could be accessed
       
 (DIR) Post #AuIlIpI2JnWL9PGfHE by acsawdey@fosstodon.org
       2025-05-21T00:14:45Z
       
       0 likes, 0 repeats
       
       @foone Or, was the compiler misconfigured or just plain stupid?
       
 (DIR) Post #AuIlNLQYm2i3yvPQR6 by acsawdey@fosstodon.org
       2025-05-21T00:15:38Z
       
       0 likes, 0 repeats
       
       @foone 😂 like compiling with -O0? Or maybe declaring too many things as volatile?
       
 (DIR) Post #AuIlPh4dGRv7hCGyWm by foone@digipres.club
       2025-05-21T00:15:39Z
       
       0 likes, 0 repeats
       
       @acsawdey and I keep reversing code from the 80s/early 90s, when compilers were very stupid
       
 (DIR) Post #AuIlVZQsaRzxjbTsjw by acsawdey@fosstodon.org
       2025-05-21T00:17:07Z
       
       0 likes, 0 repeats
       
       @foone Oh boy yes they were. “What, you want automatic register allocation?”
       
 (DIR) Post #AuIlgJxWSPpqvhsM5I by foone@digipres.club
       2025-05-21T00:19:03Z
       
       0 likes, 0 repeats
       
       I wonder if anyone has ever made a machine-code level inliner. like this code would be a lot easier to use if it didn't call that function to calculate some value, can't I just elide it by inling that code? but not manually?
       
 (DIR) Post #AuIlliF7b8Mzh0g7t2 by foone@digipres.club
       2025-05-21T00:19:23Z
       
       0 likes, 0 repeats
       
       as someone who can write 16bit x86 assembly, I endeavor to do as little of it as possible.
       
 (DIR) Post #AuIm5cwN1QBb2UP5cW by foone@digipres.club
       2025-05-21T00:23:35Z
       
       0 likes, 0 repeats
       
       @SarraceniaWilds I'd wear it
       
 (DIR) Post #AuImDUCrNXk8GerdR2 by acsawdey@fosstodon.org
       2025-05-21T00:24:46Z
       
       0 likes, 0 repeats
       
       @foone That’s a slippery slope to writing a compiler 😑
       
 (DIR) Post #AuImIWzYRy4yM22veS by foone@digipres.club
       2025-05-21T00:25:35Z
       
       0 likes, 0 repeats
       
       @acsawdey that's also on my todo list, for Doom reasons.
       
 (DIR) Post #AuImb3WuDIsWTuTm1A by acsawdey@fosstodon.org
       2025-05-21T00:29:17Z
       
       0 likes, 0 repeats
       
       @foone My condolences. So you want something with decent optimization for 16-bit segmented x86 code? My approach to writing a compiler has mostly been “can I write a gcc machine description to target that?”
       
 (DIR) Post #AuIn3tPGvjAdU0evM8 by foone@digipres.club
       2025-05-21T00:34:32Z
       
       0 likes, 0 repeats
       
       @acsawdey nah, that one is 32bit. I'm just compiling to a weird platform that doesn't currently have support by any compilers
       
 (DIR) Post #AuIn9p3i0Ya5jhOtpw by acsawdey@fosstodon.org
       2025-05-21T00:35:37Z
       
       0 likes, 0 repeats
       
       @foone So .. you just need a compiler that can compile Doom reasonably well?
       
 (DIR) Post #AuInMoH0EwX342oNou by foone@digipres.club
       2025-05-21T00:38:00Z
       
       0 likes, 0 repeats
       
       @acsawdey yeah. I need to be able to compile doom and target a new machine I'm gonna define
       
 (DIR) Post #AuIpohHe1LShP2XMjA by drwho@masto.hackers.town
       2025-05-21T01:05:19Z
       
       0 likes, 0 repeats
       
       @foone Which happens weirdly often.
       
 (DIR) Post #AuIvXLTcRbvQZXFP5k by n1vux@mastodon.radio
       2025-05-21T02:09:20Z
       
       0 likes, 0 repeats
       
       @foone So like macros.Yes. ... old IBM 360 ASSM had a macro layer that was pretty much as powerful as Lisp. One could have macros emit macros and reprocess the output, making it effectively metainterpretative. And could  also emit assembley symbols or naked bytes as data literals.They didn't know the SNA control table builder was a configuration expert system because it was built a decade or more before that buzzword became common.
       
 (DIR) Post #AuJ7jl2YQOFMmTGzyq by pauljan@graphics.social
       2025-05-21T04:26:08Z
       
       0 likes, 0 repeats
       
       @foone perfect attitude for a sizecoding compo!
       
 (DIR) Post #AuJ9Lj3aLZoZaVQL5M by mgedmin@floss.social
       2025-05-21T04:44:13Z
       
       0 likes, 0 repeats
       
       @foone Turbo Pascal.function Max(x: Integer, y: Integer) inline($xx, $xx,$xx);I used to remember the machine code for cmp ax, bx; jl $+2; xchg ax, bx...Now I don't ever remember if the second function argument was passed in bx or some other register.(I cursed myself a lot for pointless optimization when I had to port that code to Free Pascal on Linux.)
       
 (DIR) Post #AuJOL06sxNHNV550hE by NocturnalNessa@infosec.exchange
       2025-05-21T07:32:07Z
       
       0 likes, 0 repeats
       
       @foone after the commodore no one needed assembly for most software anymore and subsequently the assembly writing experience became sadder and neglected. now no one needs to write c anymore and i fear for the future of the c writing experience