Skip to content
murachue edited this page Nov 6, 2018 · 5 revisions

Linux on Nintendo 64 with EverDrive-64 v3

Works on my machine

(Image: Jon Galloway. CC BY-SA 3.0)

Slides on OSC 2018 Tokyo fall (Japanese): https://speakerdeck.com/murachue/nintendou64

build & run

$ git clone https://github.com/murachue/buildroot buildroot -b myn64
$ cd buildroot/n64
$ git clone https://github.com/murachue/linux-stable-n64 linux-stable -b n64
$ git clone https://github.com/murachue/busybox busybox   # and you get nconfig... or use https://git.busybox.net/busybox
$ make nintendo64_defconfig

## you may need buildroot host-m4 patch if glibc >= 2.28:
## https://git.busybox.net/buildroot/commit/?id=c48f8a64626c60bd1b46804b7cf1a699ff53cdf3
## and bump host-m4 to 1.4.18.
## easiest way: git checkout c48f8a64626c60bd1b46804b7cf1a699ff53cdf3 package/m4/
##              (above requires fetching git://git.buildroot.net/buildroot )

$ make
## Core i5-2500 and make -j3 takes about 50min to build.
## images/n64linux.n64 will be built.
$ cd _userprogs
$ ../host/usr/bin/mips-linux-gcc -o joytty joytty.c
$ ../host/usr/bin/mips-linux-gcc -o jstest2 jstest2.c
$ ../host/usr/bin/mips-linux-gcc -o oviplay oviplay.c -lasound -lvorbisidec
$ ./_install.sh
$ cd ..
$ make
## now images/n64linux.n64 contains userprogs. (esp. joytty is necessary)
  • copy images/n64linux.n64 into SD card and boot it in EverDrive-64 menu
  • profit!

try commands!

Input via ruby tty64.rb /dev/ttyUSB0 (ttyE0), or Controller Bros.!

controller keymap: https://speakerdeck.com/murachue/nintendou64?slide=19
(detail: https://github.com/murachue/buildroot/blob/9d2f6f707c54020bff6b502ad90ec7d4d8fd184f/n64/_userprogs/joytty.c#L201 )

  • uname -a
  • ps
  • ls
  • dd if=/dev/urandom of=/dev/fb0
    • colorful!
  • dd if=/dev/cart0 of=/dev/null bs=4k count=256
    • roughly 1.5MB/s
  • dd if=/dev/mmcblk0 of=/dev/null bs=4k count=256
    • roughly 800KB/s on my SD card
  • aplay /mnt/somesound.au
  • mpg123 /mnt/somemusic.mp3
  • oviplay /mnt/somemusic.ogg # ogg vorbis

go internet!

host-side

# pppd debug nodetach noauth nodefaultroute pty "ruby tty64.rb /dev/ttyUSB0 0" 10.0.0.1:10.0.0.2
# iptables -t nat -A POSTROUTING -o some_if -j MASQUERADE
# sysctl -w net.ipv4.conf.all.forwarding=1

N64-side

# pppd debug noauth defaultroute /dev/ttyE0

N64 side ppp often crashes... keep patience!

You may need to run /unmute.sh on N64 side... if you fail to run pppd on host before n64 side, or you forget to run tty64 on boot.

Clone this wiki locally