dietrichepp

Joined 14 years ago

Karma
4,384
Submissions
960
Member since
Oct 29
http://www.moria.us/
View on Hacker News

Recent submissions

Comment · 6 months ago
Comment · 7 months ago
Comment · 8 months ago
This is great stuff… basically, an easy way to get much higher quality audio out of a GBA emulator.

I’ll add some context here—why don’t more games run their audio at 32768 Hz, if that’s such a natural rate to run audio? The answer lies in how you fill the buffers. In any modern, sensible audio system, you can check how much space is available in the audio buffer and simply fill it. The GBA lacks a mechanism to query this. Instead, what you do is calculate this yourself, and figure out when to trigger additional audio DMA from the VBlank interrupt. You know the VBlank runs every 280896 cycles, and you know that the processor runs at 16777216 Hz, so you can do some math to calculate how much data is remaining in the audio DMA stream.

A lot of games simplify the math—it’s easier to start a new audio DMA in your VBlank handler, but that means running at a lower sample rate, which will sound pretty crispy.

YMMV, some people like the crispy aliased audio. If the audio weren’t crispy, the sound designers probably would have adjusted the samples to compensate. Other factors being equal, I’d rather listen to what the original artists heard when they were testing on real hardware, because that is probably closer to what they intended, even though it has a lot of artifacts in it.

Comment · 8 months ago
Recently fixed bugs in an audio encoder / decoder (VADPCM) I reverse engineered from the Nintendo 64, and some people are apparently using it to dub Conker’s Bad Fur Day into Spanish.

On-and-off again working on a Mystery Dungeon style game but I have a lot of obligations taking me away from it.

Planning on making demoscene entries this year.

Comment · 10 months ago
If we only had trucks on the road, we’d need less road, right? The street where I live could be about a third of the width if it were not for personal cars.
Comment · 10 months ago
The civic barely does anything to a road, except require its existence and maintenance, and it turns out that roads are expensive to build and maintain (even if only damaged by weather).
Comment · 11 months ago
> Why are you using the locale-specific [:space:] on source code?

Because it’s the one I remembered first, it worked, and I didn’t think that it needed any improvement. In fact, I still don’t think it needs any improvement.

Comment · 11 months ago
Somebody wanted to set breakpoints in their C code by marking them with a comment (note “d” for “debugger”):

  //d
You can get a list of them with a single Awk line.

  awk -F'//d[[:space:]]*' 'NF > 1 {print FILENAME ":" FNR " " $2}' source/*.c
You can even create a GDB script, pretty easily.

(IMO, easier still to configure your editor to support breakpoints, but I’m not the one who chose to do it this way.)

Comment · 11 months ago
Awk is still one of my favorite tools because its power is underestimated by nearly everyone I see using it.

    ls -l | awk '{print $3}'
That’s typical usage of Awk, where you use it in place of cut because you can’t be bothered to remember the right flags for cut.

But… Awk, by itself, can often replace entire pipelines. Reduce your pipeline to a single Awk invocation! The only drawback is that very few people know Awk well enough to do this, and this means that if you write non-trivial Awk code, nobody on your team will be able to read it.

Every once in a while, I write some tool in Awk or figure out how to rewrite some pipeline as Awk. It’s an enrichment activity for me, like those toys they put in animal habitats at the zoo.

Comment · 1 year ago
I have the Heritage HA-609A. I considered going 500-series. Maybe some day in the future. For now, I have two preamps and the HA-609A in a 4U rack, and most of my other gear is in storage. Keeping things light.
Comment · 1 year ago
It would be like this either way.

The N side has negative charge carriers. It has a positive charge in the depletion region because the charge carriers are missing. Likewise, the P side has positive charge carriers, and when they’re missing, you get a negative charge.

This is true whether we live in the current universe or live in an alternate universe where we say that electrons have positive charge. The depletion region is where the charge carriers are missing (depleted), so you get the opposite charge of whatever the charge carriers are.

Comment · 1 year ago
Conspicuously absent are some of the analog circuit applications. Here are three of my favorites:

1. Frequency mixer, used for heterodyning, important in radio, so I hear. https://en.wikipedia.org/wiki/Frequency_mixer

2. Log converter, where the output voltage is proportional to the logarithm of the input voltage. https://electronics.stackexchange.com/questions/374440/log-c...

3. Diode ring, which provides variable gain, used in analog compressors like the Neve 33609 (I have a clone of the 33609, and I’m very fond of it)

Think about this: if you have a nonlinear device like a diode, then the dynamic resistance changes depending on the operating point. If you modulate the operating point, you’re modulating the dynamic resistance.

Comment · 1 year ago
Fantastic—I’ve written a QuickDraw PICT converter, but I focused narrowly on just extracting pixel data. The format is basically a way to encode QuickDraw drawing commands, and getting the original image back (in the general case) means reimplementing QuickDraw.

The old Mac game Avara used this format for levels. It was funky… you could place blocks in a 3D world, and control elevation and height by changing the corner radius of rectangles. You needed a QuickDraw image editor to make levels, like ClarisDraw.

Comment · 1 year ago
Yes, other Mac AV models did the same thing. I remember doing this on the 6100/60AV that we had.
Comment · 1 year ago
I listen to a fair amount of choral music, from plainchant and organum up through modern and contemporary works. I think the short answer is missing, which is that most choral music just isn’t that exciting.

The Wikipedia article for the Motet has an interesting quote which echoes the sentiment here:

> [the motet is] not to be celebrated in the presence of common people, because they do not notice its subtlety, nor are they delighted in hearing it, but in the presence of the educated and of those who are seeking out subtleties in the arts.

This quote is attributed to Johannes de Grocheio in the 1200s! That means that people have been saying that choral music is hard to appreciate for more than seven hundred years.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton