General Development Archive

Rethinking the D-Bus message bus

David Hermann writes:

Later this year, on November 21, 2017, D-Bus will see its 15th birthday. An impressive age, only shy of the KDE and GNOME projects, whose collaboration inspired the creation of this independent IPC system. While still relied upon by the most recent KDE and GNOME releases, D-Bus is not free of criticism. Despite its age and mighty advocates, it never gained traction outside of its origins. On the contrary, it has long been criticized as bloated, over-engineered, and orphaned. Though, when looking into those claims, you’re often left with unsubstantiated ranting about the environment D-Bus is used in. If you rather want a glimpse into the deeper issues, the best place to look is the D-Bus bug-tracker, including the assessments of the D-Bus developers themselves. The bugs range from uncontrolled memory usage, over silent dropping of messages, to dead-locks by design, unsolved for up to 7 years. Looking closer, most of them simply cannot be solved without breaking guarantees long given by dbus-daemon(1), the reference implementation. Hence, workarounds have been put in place to keep them under control.

Nevertheless, these issues still bugged us! Which is, why we rethought some of the fundamental concepts behind the shared Message Buses defined by the D-Bus Specification. We developed a new architecture that is designed particularly for the use-cases of modern D-Bus, and it allows us to solve several long standing issues with dbus-daemon(1). With this in mind, we set out to implement an alternative D-Bus Message Bus. Half a year later, we hereby announce the dbus-broker project!

Jailbreaking Super Mario World to install hex editor, mod loader

Cooper Harasyn found a Super Mario World save corruption glitch, and we worked together to create a jailbreak that works on real, unmodified cartridges and Super Nintendos.

They managed to install a hex editor and a mod loader onto unmodified Super Mario World cartridges running on unmodified Super Nintendos. With the mod loader, you can, for instance, give Mario telekinesis powers. This is somewhat reminiscent of a similar extraordinary feat in Castlevania: Symphony of the Night we talked about earlier this year.

Arcan 0.5.2 released

OSNews covered the One night in Prio article, and now a new version of its umbrella project, Arcan, has been released (which only happens two or three times a year). The actual details are covered in the release post.

So, what is Arcan?

Arcan is a powerful development framework for creating virtually anything between user interfaces for specialised embedded applications all the way to full-blown standalone desktop environments.

At its heart lies a robust and portable multimedia engine, with a well-tested and well-documented interface, programmable in Lua. At every step of the way, the underlying development emphasises security, performance and debugability guided by a principle of least surprise in terms of API design.

SeqBox: reconstructable file containers/archives

An SBX container is composed of a collections of blocks with size submultiple/equal to that of a sector, so they can survive any level of fragmentation. Each block has a minimal header that includes a unique file identifier, block sequence number, checksum, version. Additionally, non-critical info/metadata are contained in block 0 (like name, file size, crypto-hash, other attributes, etc.).

If disaster strikes, recovery can be performed simply by scanning a volume/image, reading sector-sized slices and checking block signatures and then CRCs to detect valid SBX blocks. Then the blocks can be grouped by UIDs, sorted by sequence number and reassembled to form the original SeqBox containers.

This was submitted to us by the author of the project, so hopefully she or he can answer possibly questions in the comments.

When women stopped coding

Modern computer science is dominated by men. But it hasn't always been this way.

A lot of computing pioneers - the people who programmed the first digital computers - were women. And for decades, the number of women studying computer science was growing faster than the number of men. But in 1984, something changed. The percentage of women in computer science flattened, and then plunged, even as the share of women in other technical and professional fields kept rising.

What happened?

An older article from 2014 that - sadly - just refuses to become irrelevant.

Hacking Final Fantasy 1 on the NES

I decided I wanted to hack Final Fantasy 1, one of my favorite games growing up, that I put in more than 100 hours playing. I used fceux as my NES emulator, same as in the video and followed mostly the same patterns.

I kept some notes on how I did it and thought others might find the process as interesting and fun as I did. I ended up losing most of the notes from a few years ago, so I went back and rediscovered the different memory locations and values to use again.

Patching closed software for beginniners

In this article we'll walk through an example of how to interpret a closed source program, how to analyze its behavior, and how to ultimately alter that behavior to do what we want. These techniques are well known within many circles, but few tutorials exist to help people get started. The context for this example investigation is the linker's subsystem field generation, but the techniques can be applied to other problems that seem interesting.

Operating system: from 0 to 1

Probably you asked yourself at least once, how an Operating System (OS) was written from the ground up? You probably have spent years programming, but still understand operating system as a collection of abstract concepts, not how to implement an operating system in actual code. In your mind, somehow the operating system can magically control the underlying hardware and do what you want through the higher level API of your favorite programming language. You wish to understand the details, but for some reason, it seems too difficult because regardless how much you learn, it is never enough. You may feel that you are missing an important piece of the puzzle, and get stuck. However, deep inside you still want to write an operating system without a crystal clear understanding. After all, you are a software engineer, and an operating system is a software. You should know your software better than anyone else!

If that is the case, this book is for you. By going through this book, you will be able to find the missing piece that is essential and enable you to implement your operating system, from scratch!

A free detailed book about writing your first operating system.

POSIX has become outdated

The POSIX standard for APIs was developed over 25 years ago. We explored how applications in Android, OS X, and Ubuntu Linux use these interfaces today and found that weaknesses or deficiencies in POSIX have led to divergence in how modern applications use the POSIX APIs. In this article, we present our analysis of over a million applications and show how developers have created workarounds to shortcut POSIX and implement functionality missing from POSIX.

Wine 2.0 released

This release represents over a year of development effort and around 6,600 individual changes. The main highlights are the support for Microsoft Office 2013, and the 64-bit support on macOS.

It also contains a lot of improvements across the board, as well as support for many new applications and games. See the release notes below for a summary of the major changes.

As awesome of a project Wine is, I wonder how many people actually use it on a daily basis. Maybe I'm wildly off base here (honestly, I probably am), but it seems like if you're running Linux, there's really nothing Windows applications offer that Linux can't.

Making a game in PICO-8

I'm going to use PICO-8, which its creator, Joseph "Zep" White, calls a 'fantasy console', but really it's like an indie-fied emulator of the computers I grew up with, like the BBC B. When you start it, you're presented with a 128 by 128 pixel display glitching into life, this little do-do-do-do! jingle, and a command prompt.

Everything you need to make games is right there: a mini Lua code editor, sprite and map editors, and sound and music editors. It's reactive, instant to test to see if things work, and generally delightful. And the stuff people have made in it is extraordinary. Little short-form games: colourful, fun, immediate, varied. Type SPLORE into the command prompt and this little browser for games posted to the PICO-8 forum comes up. Since no game, including its graphics, is bigger than a 65K text file, you're playing them pretty much instantly. It's lovely.

This is just the first article in a series.

Brainfuck: code that was designed to hurt

Software is the umbrella term for computer programs and libraries, the coded logic that makes our machines tick. At the root of all software is the code, the instructions that enable a human to tell a machine what to do. This code is written in one of the hundreds of different programming languages - such as C, Java, or Python - each of which has its own eccentricities and context-dependent advantages.

Yet regardless of the programming language being used, the functionality, logic, and efficiency of the language are always paramount - unless, of course, you're talking about Brainfuck, an esoteric programming language that champions purposefully overcomplicated code.

I had no idea esoteric programming languages were a thing.

The little book about OS development

This text is a practical guide to writing your own x86 operating system. It is designed to give enough help with the technical details while at the same time not reveal too much with samples and code excerpts. We've tried to collect parts of the vast (and often excellent) expanse of material and tutorials available, on the web and otherwise, and add our own insights into the problems we encountered and struggled with.

CHIP-8 in Common Lisp: the CPU

A while back I decided to try to write a Game Boy emulator in Common Lisp based on this series of articles. I made some good progress but eventually got bogged down because I was trying to learn a bunch of complex new things at once.

Instead of dragging on, I decided to take a break and try something simpler: a CHIP-8 emulator/interpreter. The CHIP-8 is much simpler than the Game Boy, which made it easier to experiment with the rest of the infrastructure.

In this post and a couple of future ones I'll walk through all of my CHIP-8 emulator implementation.

The BASIC issue with retro computers

When you have built your retro computer the chances are you’ll turn it on and be faced with a BASIC interpreter prompt. This was the standard interface for home computers of the 8-bit era, one from which very few products deviated. If you were a teenager plugging your family's first ever computer into the living-room TV then your first port of call after getting bored with the cassette of free educational games that came with it would have been to open the manual and immerse yourself in programming.

The trouble is, in the several decades since, 8-bit BASIC skills have waned a little. Most people under 40 will have rarely if ever encountered it, and the generation who were there on the living room carpet with their Commodore 64s (or whatever) would probably not care to admit that this is the sum total of their remembered BASIC knowledge.

10 PRINT "Hello World"
20 GOTO 10

If you have built a retro-computer then clearly this is a listing whose appeal will quickly wane, so where can you brush up your 8-bit BASIC skills several decades after the demise of 8-bit home computers?

When I was very, very young - I'm from 1984 - I did some very basic BASIC, mostly on an MSX, but I remember very little of it. BASIC programming didn't grab me as a kid, and as such, I never went down the programmer's path. Today, with an adult life with adult responsibilities, learning to program seems like such a daunting undertaking, for which I simply don't have the time.

GPLGPU walkthrough

The goal was to publish source code to a GPU that is register compatible with the late 90's era Number Nine "Ticket To Ride IV" GPU. Although the project didn't meet its funding goal, the person behind it later published the code on github.

Despite the fact that this is an older design, it has lots of stuff that is worth studying. It's interesting to compare this design to the VideoCore GPU that I walked through in a previous post. While there are some fundamental differences, there are surprising number of functions that are similar, which shows how modern GPUs evolved from earlier ones.

A walkthrough of the GPLGPU as well as some history and backstory of the Number Nine "Ticket To Ride IV" GPU.