Post AxBMNA2Y6uUI5TUdRQ by shironeko@fedi.tesaguri.club
 (DIR) More posts by shironeko@fedi.tesaguri.club
 (DIR) Post #Ax9IfKiQN0EGHBZNsO by foone@digipres.club
       2025-08-14T04:17:46Z
       
       0 likes, 0 repeats
       
       I'm hacking on Robot Alchemic Drive now, and WOW does this game want you to know it's for the PS2.half the filenames for tihngs are named like TAE\Now00.tae_ps2 and then the classes are named like clPs2VfsFile
       
 (DIR) Post #Ax9IiQxHcyCKUrzxh2 by foone@digipres.club
       2025-08-14T04:18:09Z
       
       0 likes, 0 repeats
       
       this game only came out on PS2!
       
 (DIR) Post #Ax9L16qOp8pVXAoN60 by foone@digipres.club
       2025-08-14T04:44:08Z
       
       1 likes, 0 repeats
       
       interesting, the game tries to load the USB keyboard driver, but it's not included on the disc. I bet you could copy it from another game and restore that functionality
       
 (DIR) Post #Ax9M5BQro5lusPNKbY by CursedSilicon@social.restless.systems
       2025-08-14T04:56:01Z
       
       0 likes, 0 repeats
       
       @foone Gauntlet: Dark Legacy was originally a Dreamcast game and later got ported to the PS2, Xbox and GameCube It has the same weirdness on Xbox where all the files are named .PS2
       
 (DIR) Post #Ax9MTiFnQffTcWtT16 by foone@digipres.club
       2025-08-14T05:00:31Z
       
       0 likes, 0 repeats
       
       CreatePlayerGuageCreatePlayerRoboGuage23 year old typo detected
       
 (DIR) Post #Ax9Mj7LUQ8fNmjtzyi by ppxl@social.tchncs.de
       2025-08-14T05:03:16Z
       
       0 likes, 0 repeats
       
       @foone probably a developer setting?
       
 (DIR) Post #Ax9OmCuKOj67oPnZey by foone@digipres.club
       2025-08-14T05:26:12Z
       
       0 likes, 0 repeats
       
       I have no idea how it encodes the text. I can't even find it in RAM!
       
 (DIR) Post #Ax9Qj5S7rGw7jNFNlg by foone@digipres.club
       2025-08-14T05:48:04Z
       
       0 likes, 0 repeats
       
       I think this game has some kind of quake-style console that's not supposed to be accessible
       
 (DIR) Post #Ax9Qlzfpngr4g12s7s by foone@digipres.club
       2025-08-14T05:48:16Z
       
       0 likes, 0 repeats
       
       I wonder if they left enough of it in that it can be reactivated
       
 (DIR) Post #Ax9RwppuoeFNJ2Ugoi by 1000millimeter@chaos.social
       2025-08-14T06:01:45Z
       
       0 likes, 0 repeats
       
       @foone At firstI thought you were talking about the IBM PS/2 but the filename extension with more than 3 charakters said no.
       
 (DIR) Post #Ax9tqsRszHp6O5CZhQ by zozo@dice.camp
       2025-08-14T11:14:22Z
       
       0 likes, 0 repeats
       
       @foone my gut says "middleware" but could it be a remnant of when they were going to use the engine to make an adaptation of a toku series?
       
 (DIR) Post #AxBKwtg0EB5NqwrMau by foone@digipres.club
       2025-08-15T03:52:45Z
       
       0 likes, 0 repeats
       
       40 nested IFs? that's certainly one way to do a look-up tablegod I hope this is a macro or something and they didn't just code it this way
       
 (DIR) Post #AxBLFINL8V7TfTu4Po by foone@digipres.club
       2025-08-15T03:56:10Z
       
       0 likes, 0 repeats
       
       I was gonna say "there's no way their compiler is this dumb" but then I realized this is code warrior for a console, it's probably terrible.
       
 (DIR) Post #AxBLMmKCBSIya606vw by foone@digipres.club
       2025-08-15T03:57:31Z
       
       0 likes, 0 repeats
       
       but it seems they built some kind of basic scripting system that can allocate C++ objects. This requires a big jump table to turn names of classes into constructor calls. (because C++ doesn't really have any reflection to speak of)
       
 (DIR) Post #AxBLexdIsYEWribmgS by foone@digipres.club
       2025-08-15T04:00:48Z
       
       1 likes, 0 repeats
       
       oh it's go inheritance: every class constructor calls the superconstructor, which appears to almost always be completely blank. it's a completely blank function! WHERE IS YOUR OPTIMIZING LINKER?
       
 (DIR) Post #AxBMHvWQf2HNc1yPOS by foone@digipres.club
       2025-08-15T04:07:50Z
       
       0 likes, 0 repeats
       
       there's a function that does:void * p = malloc(0x7d5fd70);free(p);and nothing else. it just allocates 125 megabytes and then frees it.
       
 (DIR) Post #AxBMM10eCVmNn13c7U by foone@digipres.club
       2025-08-15T04:08:11Z
       
       1 likes, 0 repeats
       
       in a PS2 game, which has 32 megabytes of work ram
       
 (DIR) Post #AxBMNA2Y6uUI5TUdRQ by shironeko@fedi.tesaguri.club
       2025-08-15T04:09:13.043024Z
       
       0 likes, 0 repeats
       
       @foone is_fragmented()?
       
 (DIR) Post #AxBMNrZgFbXV6gKCYK by brouhaha@mastodon.social
       2025-08-15T04:07:59Z
       
       0 likes, 0 repeats
       
       @foone Finally it will in C++26. People have only been clamoring for it for 28 years.
       
 (DIR) Post #AxBMuczRUpvnQizxBI by jpm@aus.social
       2025-08-15T04:14:47Z
       
       0 likes, 0 repeats
       
       @foone just making sure free() on a null pointer doesn’t do anything
       
 (DIR) Post #AxBNCyazuCYbeSJV4a by nobletrout@infosec.exchange
       2025-08-15T04:18:08Z
       
       0 likes, 0 repeats
       
       @foone who are we to judge?
       
 (DIR) Post #AxBNv5aBI1ze3vxy0u by foone@digipres.club
       2025-08-15T04:26:03Z
       
       0 likes, 0 repeats
       
       C_TAE_Player_PS2 extends C_TAE_PlayerTHIS GAME IS STILL ONLY FOR THE PS2
       
 (DIR) Post #AxBObu4Py58koGWabw by Flyingmana@phpc.social
       2025-08-15T04:33:44Z
       
       0 likes, 0 repeats
       
       @foone maybe one of the tricks to make sure it breaks on Devs hardware if using more ram then the PS2 has?And because of another trick it does not break in PS2?
       
 (DIR) Post #AxBP2X9pGVSfZ8kiky by Stepland@mamot.fr
       2025-08-15T04:38:39Z
       
       0 likes, 0 repeats
       
       @foone ... weird anti-piracy thing ?
       
 (DIR) Post #AxBPH6CBn6tmHxnrJA by foone@digipres.club
       2025-08-15T04:41:21Z
       
       0 likes, 0 repeats
       
       someday I will reverse engineer something for an system that doesn't have weird pointer issues in ghidra... but not today!
       
 (DIR) Post #AxBPY56b676FpYHlHk by foone@digipres.club
       2025-08-15T04:44:23Z
       
       0 likes, 0 repeats
       
       ghidra's thinking some pointers are at ffff82a4 which is outside the valid memory map
       
 (DIR) Post #AxBPhbZjkCyb8mSMcK by burnitdown@beige.party
       2025-08-15T04:46:03Z
       
       0 likes, 0 repeats
       
       @foone it goes in the square hole
       
 (DIR) Post #AxBQEPOk2YkSvgxIrw by nebogeo@post.lurk.org
       2025-08-15T04:51:55Z
       
       0 likes, 0 repeats
       
       @foone this thread brings back memories I thought I'd buried deep
       
 (DIR) Post #AxBQHaWL8wseIJ1eYy by foone@digipres.club
       2025-08-15T04:52:39Z
       
       0 likes, 0 repeats
       
       interesting. this code does a syscall to find out how much memory the console has, and only runs a subfunction if the console has 32mb. (which PS2s do)at least, the retail ones. the devkits have 64mb. So maybe they're trying to only do something in the retail version of the game?
       
 (DIR) Post #AxBQbFsTbRtc3xl2o4 by foone@digipres.club
       2025-08-15T04:55:45Z
       
       0 likes, 0 repeats
       
       @growlph I think it's mainly to let you run a more unoptimized game during development, which you can later prune down to fit in a retail console
       
 (DIR) Post #AxBS77aI4ZUVYw0hTk by datawuppi@troet.cafe
       2025-08-15T05:13:01Z
       
       0 likes, 0 repeats
       
       @foone maybe some kind of check, whether it is running on a PC?Most PC afaik have overcommit aka thin provisioning enabled, which allows this to return succesfully even if the system has not enough memory.
       
 (DIR) Post #AxBSk6qUkjamZ7BGng by foone@digipres.club
       2025-08-15T05:20:07Z
       
       0 likes, 0 repeats
       
       FUN_001872c8(0x3f7921fb54524550,uVar1);that's a hell of a 64bit literal. I have no idea what the fuck it means
       
 (DIR) Post #AxBTNvEbLHJk8ZRN1E by barubary@infosec.exchange
       2025-08-15T05:27:20Z
       
       0 likes, 0 repeats
       
       @foone lower half looks suspiciously ascii
       
 (DIR) Post #AxBV51wsM4QTMoGjg0 by mctwist@social.accum.se
       2025-08-15T05:46:14Z
       
       0 likes, 0 repeats
       
       @foone I made a program with thousand else-if's. Not fun.
       
 (DIR) Post #AxBVx6kOjHjrt5DcEy by foone@digipres.club
       2025-08-15T05:56:00Z
       
       0 likes, 0 repeats
       
       oh god this compiler is not smart. instantiating a C++ object that's a subclass with a vtable assigns the vtable pointer to the parent vtable and then directly after, its own vtable. easy optimization right there: DON'T DO REDUNDANT STORES
       
 (DIR) Post #AxBW3Msdf0sDf03fxA by baffinsquid@mastodon.me.uk
       2025-08-15T05:56:53Z
       
       0 likes, 0 repeats
       
       @foone 1. ASCII constant string (however there is 0xFB), 2. maybe it has some pattern jn binary, 3. there was const struct with some global constants
       
 (DIR) Post #AxBW67Zl1ENL3xXVlQ by foone@digipres.club
       2025-08-15T05:57:34Z
       
       0 likes, 0 repeats
       
       anyway, speaking of not smart, I didn't realize this until just now, which means I've been mistakenly naming constructors after their parent classes, not the class itself
       
 (DIR) Post #AxBYVUo9yjcWGSVHSi by foone@digipres.club
       2025-08-15T06:24:40Z
       
       0 likes, 0 repeats
       
       what kind of a class name is C_VfsFile_KK? that's ugly to the point where I'm gonna assume it's actually named "VfsFile" and the compiler mangled it
       
 (DIR) Post #AxBYZ6Nek1W5f7pHFY by foone@digipres.club
       2025-08-15T06:25:12Z
       
       0 likes, 0 repeats
       
       @SRAZKVT yeah, I used to be a java programmer, I have seen such horrors. it's the most copy-pasted language
       
 (DIR) Post #AxBZXcLF2WxSA9YKOW by foone@digipres.club
       2025-08-15T06:36:19Z
       
       0 likes, 0 repeats
       
       heh, interesting way to port a game: the scripting language's parser remaps "OptionTitle" to "OptionTitleUS". So it triggers different code... so presumably the old OptionTitle is still there, just it can't be called
       
 (DIR) Post #AxBa6lE9zj17rBzwNU by piggo@piggo.space
       2025-08-15T06:37:51.703335Z
       
       0 likes, 0 repeats
       
       @foone unless one is SFR but safe to assume not here ig
       
 (DIR) Post #AxBa6moM6dZ2ljwMQy by foone@digipres.club
       2025-08-15T06:42:37Z
       
       0 likes, 0 repeats
       
       @piggo yeah, they're vtable pointers, so nowhere near any special registers. and the compiler should know this
       
 (DIR) Post #AxBdm3hqUlyyu4Gd6m by notjimtuck@infosec.exchange
       2025-08-15T07:23:38Z
       
       0 likes, 0 repeats
       
       @foone Every time I see a function like that it usually turns out to be something like "so-and-so was a smug bastard who liked to put his initials on things he fixed to rub it in that he was better than they were".
       
 (DIR) Post #AxBeObHw5PLy3oWgXQ by nebogeo@post.lurk.org
       2025-08-15T07:30:41Z
       
       0 likes, 0 repeats
       
       @foone the games company I worked for hired a compiler developer so we could understand how to work around codewarrior's problems
       
 (DIR) Post #AxBgo2MYlD9XB8whY8 by foone@digipres.club
       2025-08-15T07:57:39Z
       
       0 likes, 0 repeats
       
       @nebogeo haha, nice!
       
 (DIR) Post #AxBoceu6RIn8rzikGO by pjokse@social.restless.systems
       2025-08-15T09:25:10Z
       
       0 likes, 0 repeats
       
       @foonehttps://github.com/NationalSecurityAgency/ghidra/pull/8366 I hope this will help and that they fix the problem where if the segments dont align with 0x1000, it just blows up
       
 (DIR) Post #AxC6ir55sMQPY7xwxs by chocobo13@mastodon.social
       2025-08-15T12:48:02Z
       
       0 likes, 0 repeats
       
       @foonePS1 games do a lot of loading the upper word of a pointer one more than needed, then loading the lower word with a value much like that. So 0x80080000 would become 0x800782a4, for example
       
 (DIR) Post #AxCiGpFurjoq2P5cPo by SvenGeier@mathstodon.xyz
       2025-08-15T19:48:43Z
       
       0 likes, 0 repeats
       
       @foone 3.141592654 =  2¹ × 1.570796327As an 8-byte ('double precision') float his means the mantissa is 0.570796327 = 0.921FB54524550h which is the last 52 bits of your magic number.Your exponent, however, is 0x3f7 which, when I subtract 0x3ff gives me -8; which would suggest that this is the binary representation of pi/256. Which I could imagine being useful somewhere in rendering stuff on the screen?
       
 (DIR) Post #AxCnPMdV8qC9eX0oWe by foone@digipres.club
       2025-08-15T20:46:22Z
       
       0 likes, 0 repeats
       
       @SvenGeier oooh, good catch!
       
 (DIR) Post #AxDQg2QfQ7mG7Jx0dM by foone@digipres.club
       2025-08-16T04:06:18Z
       
       0 likes, 0 repeats
       
       I wondered what would happen if I overwrite a create_object("title") call with "create_object("ending") and... credits! that was easy.
       
 (DIR) Post #AxDQqaPtuTlAQKcdEm by ClarusPlusPlus@gamedev.lgbt
       2025-08-16T04:08:19Z
       
       0 likes, 0 repeats
       
       @foone As someone for whom an embarrassingly-large percentage of development time on her game has been spent on getting the typography right... I hate the letter spacing here lol