madmoose

Joined 17 years ago

Karma
474
Submissions
116
Member since
Jan 12
Poking at games to see what makes them tick.

https://mastodon.social/@madmoose

View on Hacker News

Recent submissions

Comment · 21 days ago
> the examples given to highlight the supposed positives of software rendering can all be achieved on GPUs.

Any look in older games, 2d or 3d, can be achieved on modern GPUs, so that seems like a vacuous thing to state.

Comment · 27 days ago
Immigrants who don't know their birthdate are assigned xxxx-01-01, so they have actually run out of numbers for January 1st in some years.
Comment · 2 months ago
You either held in the Commodore key while powering it on or you typed in GO64.

It's firmly lodged in my fingers still.

Comment · 5 months ago
Comment · 10 months ago
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.
Comment · 1 year ago
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…

Comment · 1 year ago
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.
Comment · 1 year ago
> 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.

Comment · 2 years ago
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.
Comment · 2 years ago
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.

Comment · 2 years ago
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.

Comment · 2 years ago
There's no general purpose virtualization involved in ScummVM. It's a collection of game engines derived mostly from reverse engineering old games.
Comment · 2 years ago
Most game engines have scripting languages built in.
Comment · 2 years ago
ScummVM isn't an emulator, it's a collection of game engines based on reverse engineering and, on occasion, original source code donations.
Comment · 3 years ago
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?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton