Skip to content

Instantly share code, notes, and snippets.

@huntiep
Created November 2, 2018 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huntiep/91d272e45fb4c87ed1e2bfc6e8d1ddf8 to your computer and use it in GitHub Desktop.
Save huntiep/91d272e45fb4c87ed1e2bfc6e8d1ddf8 to your computer and use it in GitHub Desktop.

Slide 2

Who?

  • Soon unemployed
  • Work life okay (?)

Slide 3

First, an apology

Slide 4

I'm sorry, Yesterday at JNUG booth I overwrote Linux

(JNUG =? Japan NetBSD User's Group)

  • Thank you for loaning a display!!

Slide 5

Regardless

Slide 6

What is this LT JNUG framework?

(Couldn't find what LT stands for)

Slide 7

We apologize in advance.

  • I will not talk -> (NetBSD)
  • (Linux) <- I will talk

Slide 8

So

  • Since the punch line almost leaked it, a light explanation (?)
  • Porting Linux to the Nintendo 64
  • Meaning
  • Like this -> (Tux on N64)

Slide 9

Nintendo 64

Slide 10

Why 64?

  • Went on sale 1996/6/23
  • CPU: MIPS VR4300 (93.75MHz, 64bit)
  • GPU: RCP (62.5mHz, 64bit)
    • Greatest resolution 640x480x16
  • Memory: 4MiB (CPU point of view)
    • Expansion pack adds 4MiB (CPU point of view)
  • Audio ~48KHz? 2ch 16bit PCM
    • Not ADPCM! (Wikipedia lies)
  • ROM: Maximum about 508MiB
    • Commonly limited to 64MiB (?)
  • Not Nintendo 64 (? maybe this is in reference to the last bit, saying that most systems are limited to 64 MiB but the N64 isn't)

Slide 11

Why 64?

  • (presumably the definition of vaporware)

Slide 12

The N64 is compatible with Linux

Slide 13

The N64 is compatible with Linux

(I think the japanese characters ママ in the diagram mean "this is fine")

Slide 14

Did it~

Slide 15

Also making the userland

(Image Linux(revised))

Slide 16

Why 9660!?

  • The first 4KiB (-64 bytes) of the N64's ROM image are hard to change
  • To write the partition table, the usual filesystem is impossible
  • In ISO9660 the first 16KiB are empty!
  • Packing a simple bootloader is easy
  • (I think this means that since the first 16KiB are empty, you can put a bootloader there)
Diagram
  • header area (64by)
  • N64 bootloader
  • Linux simple bootloader
  • ISO9660's contents
  • (Green text) N64 entry point

Slide 17

What to do about input?

  • I'm getting tty by way of USB but, it is more interesting to move by itself (?)
  • Input device.... you have a controller!

Slide 18

Homebuilt joy2key-like software

  • 3D stick -> 8 directions
  • B, A, C down -> 3 * 8 -> 24
  • Alphabet = 26 characters
  • We want to input uppercase letters
  • We also want symbols
  • R, Z triggers act as modifiers
  • -> 2^2 * 3 * 8 = 96 characters!!

Slide 19

Like this

Slide 20

For example

  • right down + A -> l
  • right + C down -> s
  • left + R + Z + B -> ^M
  • => ls command execution!!!
  • 2 days to get used to it (I'm not saying there won't be typos)

Slide 21

I can't remember that!

  • You have 8bit direct input mode! (?)
  • (msb) Z R [C right] [C up] [C down] [C left] A B (lsb)
  • While simultaneously pressing START
  • For example B+A+START -> 3 = ^C
  • We can throw SIGINT!!
  • Maybe it is too early for humans

Slide 23

Present and Future

  • Recently ALSA driver was made and aplay and mpg123 are working (?)
  • ogg123 is slow grumbling, tremor(integer vorbis decoder) just barely uses too much CPU
  • GitHub open to the public afterwards (personal history...) (?)
  • Linux 4.4.1 is a little old, so I want to run 4.18
  • Sometimes SEGV/ILL/BUS are a mystery, but I want to do something

Slide 24

We are going to port NetBSD

  • The end
@rtpg
Copy link

rtpg commented Nov 3, 2018

Slide 2:

  • second point is "currently looking for work" (転職活動中)
    Slide 6:
  • LT = Lightning talk ("this is a lightning talk for JNUG but....")
    Slide 10:
  • "Not Nintendo 64" is referring to the spelling in Katakana, since lots of people write ニンテンドー. Since the name is derived from 任天堂(にんてんどう) the official spelling is with the last two katakana being ドウ(dou) instead of ドー (do-, which I guess is like doo? Not sure of the katakana hyphen rule)
    Slide 17:
  • "Able to do USB through tty for input, but using the N64 itself would be funner..."-kinda thing. Like would be funner to use actual N64 hardware and not a whole USB keyboard"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment