Angrylion RDP Comments

by cqcumbers on 21 Sep 2021

The RDP is the Nintendo 64’s equivalent to the back half of a typical GPU pipeline, taking screen-space triangle and rectangle span coordinates and turning them into appropriately textured, depth-tested, and anti-aliased pixels in memory. The official RDP command reference lists all the RDP instructions, and the N64 Programming manual describes the architecture of the RDP and how many effects work from the point of view of a programmer, but neither of these resources document many details relevant to emulator authors, such as bit widths and nonstandard formats, and can make it difficult to understand the full capabilities due to their organization. This document attempts to address these shortcomings in documentation by commenting on the internal workings of Angrylion’s RDP plugin, generally acknowledged as the standard for accuracy.

Read more

Common Dynarec Optimizations

by cqcumbers on 01 Feb 2021

Many emulator developers are interested in the performance advantages of dynamic recompilers, but fewer have implemented one. A good way to start is through one of the beginner tutorials available on the Getting Started page. But while the simple dynarecs described by these tutorials may be satisfactory for some systems, a lot more performance remains on the table, and in between beginner content and the cutting edge there are many widely known optimizations that can be taken for granted by more experienced developers. This article will cover some of these baseline optimizations, with a focus on getting the most performance for the least code complexity.

Read more

Writing a Cached Interpreter

by DenSinH on 31 Jan 2021

A while ago, I rewrote my GBA emulator (GBAC-) in C++ (DSHBA) to make it faster. I wanted to add a hardware renderer, and really focus on optimizing it all the way. After I was “done”, and had reached framerates higher than I had ever hoped before, I recently came back to it, and wanted to try to write a cached interpreter. I have heard a lot of talks about JITs and cached interpreters for performance gain, and since I had reached pretty insane framerates already, I wanted to go even further.

Read more

Emudev Survey Results

by cqcumbers on 10 Jan 2021

The emulator developer survey has just wrapped up, and as promised the results are summarized here. Many thanks to every one of the 143 people who filled out this survey, this was made possible by your participation. The survey was open for 2 weeks between December 28 2020 and January 10 2021, and most people probably saw it on either the emudev discord or r/emudev on reddit.

Read more

RSP Vector Instructions

by rasky on 28 Mar 2020

Within the Nintendo 64, the RSP (Reality Signal Processor) is the name of the computation units used for mathematical calculations. It is made by a stripped-down R4300 core (without a few more advanced opcodes) referred to as the Scalar Unit (SU), composed with a coprocessor (configured as COP2) that can perform SIMD operations on a separate set of vector registers, referred to as the Vector Unit (VU).

Read more

PSX BIOS (translation)

by psxdev on 27 Mar 2020

A 512 KB ROM contains the BIOS startup bootloader, a copy of the PlayStation OS kernel, as well as a “shell” that opens if a game disc is not inserted in the console and contains a memory card manager and a CD player.

Read more

PS2 Trivia

by PSI on 21 Oct 2019

Under certain conditions, the EE may skip branches due to a bug in the pipelining logic. There is at least one game that relies on this, due to another bug in the game. The compiler will automatically pad out loops that meet those conditions, and handwritten assembly will produce a warning if those conditions are met. So basically, the assholes that developed the game Oni didn’t check their warnings.

Read more

Debugging True Crime on the PS2

by PSI on 21 Oct 2019

True Crime uses a custom streaming IOP module that acts as a wrapper around the CDVD manager. It allows the game to asynchronously stream disc data from multiple sources. On dobiestation, the game’s stdout complains about not being able to start a streaming thread while loading assets. I figured that there’s an issue with the streaming module because of this, so I opened up Ghidra and worked on reversing the driver on the EE and the module itself on the IOP.

Read more