Categories
Box64 Dev

Revisiting the dynarec

Since the last post about it, the dynarec (dynamic recompiler, a Just-In-Time recompilation of x86 code) changed a lot. It still works in four major steps, but now there are a lot more intermediary steps. So let’s see how it works now! Note: this article will focus on the ARM version of the dynarec on…

Categories
Box64 Dev

Optimizing AVX2

Note: this article is pretty technical. Basic understanding of what registers are is a strict minimum required to understand what follows. What is AVX? AVX (and its extension AVX2) are complex x86_64 instruction sets which extends the SSE4 instruction set. It mandates the existence of extensions of the 16 SSE 128-bits-wide XMM registers (called XMM0…

Categories
Box64 Dev Gaming General

New Box64 v0.3.0 Released

A new version of box64 just released. Note that box86 has not evolved enough and did not get a new release. Next time maybe? So what’s new on Box64? Well, AVX! But not only that, also AVX2, and BMI1, BMI2, ADX, FMA, F16C and RDRAND cpu extensions. While the later one are less well known,…

Categories
Box64 Box86 Dev General

How to create a wrapping

In a previous post, we talked about the mechanism behind library wrapping. In it, I said box86/box64 used some manually written files to correctly call functions. However, there is a big question: how are these files written? To follow this article, you will need at least a basic understanding of function signatures. The basics First,…

Categories
Box64 Dev

Box64 running on M1 with Asahi

Box64 running on mac M1 with Asahi

Categories
Box64 Box86 Dev

A deep dive into library wrapping

After talking about the dynarec, we’re going to talk about library wrapping. This article will be very technical from start to finish. Note: until the “Differences” paragraph, everything said is identical for box86 and box64. As such, until then, you can replace every “box86” with “box64” and “x86” with “x86_64”. The first step: loading As…

Categories
Dev OSDev

A peek at OS-deving part 2: memory management

Note: this article supposes you have already read part 1. While it shouldn’t be required, you should still give it a try. Now that we can boot to C, we need to start working on the C library. Let’s start with memory management. What’s needed here? So, what is memory management? Well, it can be…

Categories
Dev OSDev

A peek at OS-deving part 1: booting

Have you ever wondered, “How does the computer boot? How does the OS know what to do when”? Well, I did too, and so took it upon myself to… develop an OS. Intro Well, when I say “develop an OS”, I mean that I started writing something that could boot into an emulator. I didn’t…

Categories
Box64 Box86 Dev

Inner workings

A high‑level view of box86/box64 and a low‑level view of the dynarec This article explains the technical details about how box86 and box64 works (at the high level for the start and a low level for the dynarec). At the start, box86 (and box64) will extract useful informations about the executable being run: where is…