This page looks best with JavaScript enabled

Setup CEN64 On Windows 10

 ·  ☕ 4 min read  ·  🥓🥓🥓 werkn

The instructions below outline setting up CEN64 with respect to using it for emulation during homebrew development but if your just looking to set the emulator up for basic usage the steps below will also apply.

Setup

  1. Download CEN64 or Build It From Source

You can get a pre-built Windows executable of CEN64 from https://www.cen64.com/uploads/stable/cen64-windows-x86_64.exe.

When you visit the site you’ll get a certificate warning, it appears to be expired. To be safe scan this with Windows Defender and test it out on VirusTotal. If you want to build it yourself from source see the repository README.

Unsigned Binaries

Windows Defender/SmartScreen is going to complain throughout if your using the pre-built binaries and telling you there are unsafe (because they are not digitally signed and did not originate on your system), if you accept the risk then continue to dismiss these throughout, otherwise I would suggest building from source.

  1. With CEN64 downloaded extract to wherever you plan to install it, were going to assume you’ve created the following folder structure, ~/n64/cen64/. Place cen64-windows-x86_64.exe inside the cen64 folder and rename to cen64.exe.

  2. Go out and get a copy of pifdata.bin, this file is essentially the system BIOS used to initialize the N64 hardware. It’s copyrighted and I’m not hosting it but if you did a Google search like "pifdata.bin MESS 0.151 archive" you’re likely to find a ZIP folder container it.

  3. Place your copy of pifdata.bin inside of the folder alongside cen64.exe.

  4. Get a ROM to test the emulator, use your own or download my Homebrew test ROM from https://github.com/werkn/n64devkit-everdrive/raw/main/N64DevKit/homebrew/0_hello_world/hello_world.z64. Save this as hello_world.z64 in the same folder as cen64.exe and pifdata.bin.

  5. If your using a clean install of Windows you likely don’t have a copy of OpenAL (audio library used by CEN64). To test if you have it try double clicking cen64 (SmartScreen may complain at this point). If you don’t get an error saying something like OpenAl32.dll not found then you can proceed to step 8. Otherwise we need to install OpenAL.

  6. To setup OpenAL download the following OpenAL 1.1 Windows Installer (zip). Open the zip folder and run oalinst and complete the installation. You should now have OpenAL installed, proceed to step 8.

  7. Now if you already have OpenAL/OpenGL installed you should be able to do the following:

  • Launch PowerShell/cmd from the folder ~/n64/cen64/. An easy way to do this is in explorer hold <SHIFT> and <RIGHT-CLICK> on an area in the folder that is not a file and select Launch powershell/cmd window here in the list of options.
  • With your new PowerShell window launched, type the following .\cen64.exe pifdata.bin hello_world.z64 and press <ENTER>. If you see a window launched that says “Hello World!” in black text on a white background, congratulations you’re setup is complete.

(Optional) Helpers

Optionally, and to make working with CEN64 easier I recommend creating a command alias that you can call from PowerShell run any .z64 file from any directory.

Note: If you do not have an existing profile for Current user, All Hosts. If one exists we append to it. You may want to back up the file found at $PROFILE.CurrentUserAllHosts before running the commands below.

  1. Begin by launching a PowerShell admin shell by pressing <WIN>+<R> which will bring up the run dialogue. From here enter powershell and press <CTRL>+<SHIFT>+<ENTER> this will prompt you to run powershell as administrator, select yes. Next paste the code below into powershell (<RIGHT-CLICK> will paste or <CTRL>+<SHIFT+<V>) and press <ENTER>. When prompted to change execution policy enter a and hit <ENTER>. After complete close powershell and relaunch it (it does not need to be an admin shell).
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$env:CEN64_HOME=Resolve-Path("~/n64/cen64")
$env:Path += ";$env:CEN64_HOME"

#persist environment variables
[Environment]::SetEnvironmentVariable("CEN64_HOME", $env:CEN64_HOME, [System.EnvironmentVariableTarget]::User)
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User)

#persist cen64 command
#create a new Profile.ps1 for the current user, all hosts
#this is essentially .bashrc for windows
if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) {
	Write-Host -ForegroundColor Green "Creating profile.ps1 for current user..."
	New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force
} else {
	Write-Host -ForegroundColor Magenta "profile.ps1 already exists... Not creating."
}

Write-Host -ForegroundColor Green "Configuring profile.ps1 and command aliases..."

$cenAlias="function c64([string]`$RomFile) { & ""cen64.exe"" @(""$env:CEN64_HOME\pifdata.bin"", ""`$RomFile"") }"

Add-Content $PROFILE.CurrentUserAllHosts $cenAlias

#enable scripts, we use remote-signed, local machine which essentially means remote scripts must be signed or they will fail
#and we can run mostly everything else locally
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
  1. From the newly launched shell you should now be able to run the command c64 -RomFile <your_rom_file.z64>.
Share on

Ryan Radford
WRITTEN BY
werkn
Developer / IT Guy / Tinkerer