HNHacker News
TopNewBestAskShowJobs

madmoose

471 karma · joined January 12, 2010

Poking at games to see what makes them tick.

https://mastodon.social/@madmoose

submissionscomments
madmoose··on Commodore 64 released September 1, 1982
You either held in the Commodore key while powering it on or you typed in GO64.

It's firmly lodged in my fingers still.

madmoose··on UnDUNE II
Wrong composer, but I very recently managed to reverse engineer the music driver for Dune (or two out of four, at least).

Here's the AdLib/SoundBlaster Pro version of the track Morning played by a reverse engineered driver, rendered by nukeykt's Nuked-OPL3.

https://www.youtube.com/watch?v=n0l_CYH4njw

madmoose··on The Duodecimal Bulletin, Vol. 55, No. 1, Year 1209 [pdf]
There's nothing "natural" about the Fahrenheit scale either. Fahrenheit took the Rømer scale, multiplied it by 4 and rounded it off a bit.
madmoose··on MegaRace, CD-ROM, FMV, and the Multimedia Dream of the 1990s
I've been slowly reverse engineering Cryo's Dune, coded by Rémi Herbulot in assembler, and the code is both brilliant and insane.

Every function (to the extent that you can call it a function in assembler) is manually tail call optimized, often to the point of just doing fallthrough by placing functions after each other.

All arguments and return values are passed in registers and flags. Sometimes I'm investigating where a pointer in the SI or DI register came from and I'll have to trace back through several function layers that just didn't touch those registers to find the place it was set. When you're looking at a function, all registers and flags are potential return values.

Everything is hardcoded, all the resource id's are fixed, extracting things from the resources files requires that you know what's where. In the file ATTACK, entries 0–52 are sprites, 53-55 are palettes, and he does math on the id's to find the previous/next one (dec/inc).

Some of the resource files are compressed, which you can tell by checksumming the 6 byte header. If the header bytes add to 0xAB and the third byte is zero, it's compressed.

In the video decoder, there are chunks for sound that start with SD, chunks for palette updates that start with PL, and chunks for frame data which are identified by them /not/ having a chunk identifer. That saves a whole 2 bytes per frame!

The globe renderer is a work of art, the room renderer constructs the game backgrounds from sprites, lines and polygons with randomly dithered coloring – although his implementation of the Bresenham line algorithm is slightly broken :). In the CD version the game has lipsync data embedded in the audio files.

I built in 8086 emulator just to help me reverse engineer this game…

madmoose··on A 6-Hour Time-Stretched Version of Brian Eno's Music for Airports
Music for Real Airports is one of the albums I put on to block out the world when I’m trying to get work done.
madmoose··on Parsing JSON in 500 lines of Rust
> Fortunately `f64::parse` accepts a strict superset of JSON number grammar

Just for the sake of completeness, and not to imply that you don't know this, but the JSON spec doesn't limit the size or precision of numbers, although it allows implementations set other limits.

I have encountered JSON documents that (annoyingly) required the use of a parser with bigint-support.

madmoose··on MuPDF WASM Viewer Demo
On the other hand, about a decade ago I sent them a feature patch to support multipage tiff images and they sent me a Christmas card for a couple of years, so my impression of them is pretty god.
madmoose··on Dear Paul Graham, there is no cookie banner law
I've stopped going to Ars Technica exactly because their cookie pop-up lets me know that Condé Nast wants to share my data with at least (according to the popup) 159 partners.

They have so many "partners" that their cookie popup comes with a search bar.

56 of their "partners" want my precise geolocation data!

16 "partners" want to actively scan my device!

101 "partners" want to "match and combine data from other data sources" (I can't disable or object to this)

102 "partners" want to identify my device. I also can't object to this.

The only way I can really object is to close the tab, so that's what I do.

madmoose··on The First Dune Game 32 Years Later: An LGR Retrospective [video]
I've been entertaining myself lately by reverse engineering Cryo's Dune. I've got all graphics resources (videos, sprites, rooms) decoded, and I have recreated most of the intro (which exercises a good deal of engine).

I also made an interactive Dune globe renderer (in WASM and Rust!): https://thomas.fach-pedersen.net/dune/globe/

It should be pixel accurate to the in-game one, although I haven't validated it lately.

It's very slow going though. The original game was coded in highly optimized idiosyncratic 8086 assembly. It's difficult to read, much more so than compiler-generated machine code from the same era.

madmoose··on ScummVM on the App Store
There's no general purpose virtualization involved in ScummVM. It's a collection of game engines derived mostly from reverse engineering old games.
madmoose··on ScummVM on the App Store
Most game engines have scripting languages built in.
madmoose··on ScummVM on the App Store
ScummVM isn't an emulator, it's a collection of game engines based on reverse engineering and, on occasion, original source code donations.
madmoose··on GCC Adopts a Code of Conduct
Why do you feel the need to make up nonsense examples about moon-cheese to make the discussion relatable to "common men"?

Do "common men" not understand sensible examples or do you not have sensible examples?

madmoose··on A Huawei bid turned into a hunt for a corporate mole
TDC has stated to Danish media that they "recognize parts of the story" but have refused to elaborate. They haven't wished to refute any parts either.

https://nyheder.tv2.dk/business/2023-06-16-tdc-genkender-del...

madmoose··on /r/startrek/ migrates to lemmy
Ask reddit, they used to have an API.
madmoose··on Effective Rust (2021)
Of course I'm talking about an idiomatic implementation, what else would I be talking about in this context?

> The idiomatic way to represent a growable list in C is to make a list (using some implementation) and put it in a structure with bookkeeping data, then using that list by passing it (or a pointer to it) to plain old functions to use it.

That sounds like a long-winded way to say "there's no one idiomatic growable list in C".

madmoose··on Effective Rust (2021)
> For C and Go, there really is only one prevailing idiom on how to write code

What’s the one idiomatic idiom in C for a growable list of items? Because I must have a seen a hundred of those in my time.

What’s the one idiomatic idiom in C for a hashmap? I’ve seen about a hundred of those too.

madmoose··on Speed running Monkey Island
There are no original compilers of SCUMM script available online as far as I know, although certainly Ron Gilbert and Aaron Giles and probably some other LucasArts programmers have the originals.

I don't think there were even any samples of the original scripts online when ScummC was developed so it can be forgiven for not matching the original format :)

madmoose··on Speed running Monkey Island
You can study the reverse engineered code of a lot game engines. ScummVM is a massive collection of reverse engineered game engines, with the occasional donation of original game code from kind developers.
madmoose··on Speed running Monkey Island
ScummVM is not emulation, it's primarily a collection of reimplementations of game engines based on reverse engineering, with the occasional donation of original source code from the developers.

So with ScummVM you can study how the original SCUMM virtual machine worked, but to see the original SCUMM scripts before they were compiled we have to rely on the kindness of Ron Gilbert :)

madmoose··on VanJS (Vanilla JavaScript): smallest reactive UI framework
Bash?

So VanJS will make the simple things easy and anything else nigh-on impossible?

madmoose··on Why are so many young Americans adopting fake British accents?
The Wire even has a scene where Dominic West's character puts on a British accent. So a British man pretending to be an American pretending to be a Brit.

The Wire is very good.

It also features Idris Elba, so it has two British people playing Americans on either side of the law .

madmoose··on Mormon whistleblower says his church is a “clandestine hedge fund”
No representation without taxation :)
madmoose··on Even Apple employees hate Siri and are skeptical of its future, new report says
> "I am sinking!"

Wat are you sinking about?

madmoose··on The microcode and hardware in the 8086 processor that perform string operations
Aaron Giles was just lamenting the other day that the GDI ellipse drawing is apparently slightly lopsided, since he's trying to recreate it :)

https://corteximplant.com/@aaronsgiles/110121906721852861

madmoose··on MacType: Better font rendering for Windows
It what I responded to was “an extremely on-point criticism” then so was my comment.

The comment I responded to was phrased insultingly. There’s no way to start a critique with a phrase of the form “Imagine doing what you’re currently doing” and have it come across positively.

Many people feel entitled to insult things they get for free. If you’re going to critique something you got for free, at least at have the courtesy to lead with the positive.

The comment I responded to lead with the insult and ended there.

madmoose··on MacType: Better font rendering for Windows
Imagine making something you're proud of, putting your work online for free and having people insult you because they didn't like how you presented it.

I'm sure you've really motivated them to improve it now!

madmoose··on The Making of Dune II: The birth of the real-time strategy game
I reverse engineered the Dune globe renderer and managed to get it compile to WASM: https://thomas.fach-pedersen.net/dune/wasm-dune-globe/

Did you ever notice that there's an eye on the bottom of Cryo's Arrakis? https://thomas.fach-pedersen.net/dune/arrakis-eye.png :)

madmoose··on Discord fined €800k for failing to comply with several obligations of the GDPR
So you're saying that the more people disagree with you, the more entrenched you become in your position?

That doesn't sound like a healthy way to form opinions.

madmoose··on ‘Whisper list’ contains 40 politicians never to accept a drink from, MP claims
It might not be ”the solution” but it seems like this is the best solution these particular women have been able to come up with in the situation they’re in.

I certainly won’t shame these women for talking to each other about what men to avoid.

Page 1 of 4Next →