Discover more from hrbrmstr's Daily Drop
Dolphin; Doom; HTTP "Fields Up"
Most modern, immersive video games trigger my motion sickness almost immediately, so I rarely play anything anymore. I remember having loads of fun playing games on older systems like the GameCube and Wii (et al.).
I had forgotten about Dolphin — an emulator for said systems — that brings classic console games to our desktops in all their 1080p glory, even supporting modern controllers and multiplayer modes.
Dolphin hit my radar due to a recent announcement that the developers won't be supporting Windows 7 anymore (and you really should not be running Windows 7 — any Windows version, honestly — if you care about safety).
You may think "yeah, yeah…yet-another emulator", but those two Nintendo systems used an IBM PowerPC CPU
Instead of an Intel or AMD x86 CPU, GameCube and Wii use an IBM PowerPC CPU, which is significantly different from the CPU you're reading this newsletter on. Each instruction must be translated to the architecture you're running, which can eat 2x to 100x clock cycles (each). Our modern systems are fit for this challenge, but that's not the only difference. I'll let the Dolphin folks explain:
The RAM in these consoles is SRAM, smaller but faster than the SDRAM used in a PC. It is also shared between CPU and GPU, which makes operations like texture uploads (CPU memory to GPU memory) or framebuffer copies (GPU memory to CPU memory) a lot less demanding than they are on a PC.
The GPU is not using shaders: every graphics effect and every computation done by the game is executed directly by the hardware without an intermediate programming language. This does not match how a PC GPU works at all. Dolphin uses shaders on the PC GPU to translate what the GC GPU can do directly in hardware, causing it to run a lot slower.
A PC runs an operating system in order to be able to run several programs at the same time. A GameCube or a Wii does not have the same requirement and can directly execute things on the hardware without going through the operating system, making a lot of communication between chips faster.
If you have a bunch of old games lying around, get them on your hard drive/SSD and enjoy some retro-fun this summer!
I came across doomgeneric — a framework that makes porting the already very portable Doom game even easier. As the repo says, just create a file named
doomgeneric_yourplatform.c and implement a few bits:
DG_Init:Initialize your platform (create window, framebuffer, etc...).
DG_DrawFrame:Frame is ready in
DG_ScreenBuffer. Copy it to your platform's screen.
DG_SleepMsSleep: in milliseconds.
DG_GetTicksMs:The ticks passed since launch in milliseconds.
DG_GetKey:Provide keyboard events.
DG_SetWindowTitle:Not required. This is for setting the window title as Doom sets this from WAD file.
and you're good to go take down some pixelated demons.
While there are already versions of Doom for the operating systems I run, I might give this a go on watchOS as some FB folks did a while ago.
HTTP "Fields Up"
HTTP, the protocol used to deliver cat pictures and vaccine disinformation to your displays, received the spa treatment this week with the release of a spate of new and updated HTTP Documentation.
I'm oddly excited about the new IANA Hypertext Transfer Protocol (HTTP) Field Name Registry.
HTTP header fields are a list of strings sent and received by both the client program and server on every HTTP request and response. You have to dig into browser Developer Tools, or person-in-the-middle proxies to see them. They provide extra information for authentication and encoding, they're used to handle cookies/sessions, and lots more.
Having a registry is great, but it won't stop anyone from making their own up or clobbering registered ones, but it will make it easier to see what's officially in use. Each entry has a link to the document explaining the use of the field, which will be great for developers.
Some other HTTP RFCs of interest I may cover soon:
We'll be on holiday at the end of the month, and I'm hoping to have five days of editions scheduled in advance, but we'll see how that goes. ☮