Using the microphone to kill the pols voice in the Japanese Legends of Zelda 1 (Ubuntu)

In Japan the popular gaming console Nintendo entertainment System (NES), was called Famicon (Family Computer). It had a completely different design and it had also some hardware differences, one of them was that second game controller lacked the Select and Start button and instead had a built in Microphone with a volume slider that could be used in some games. The most popular of the games that supported the mic is “Zelda no Densetsu – The Hyrule Fantasy”, which is the Japanese version of the original “The legend of Zelda”.

In the game you could use the microphone on the second controller to kill the the enemy “Pols Voice” by blowing or shout into it.

There are more than one emulator that emulate the microphone, I am using the Mesen Emulator for this guide. All the emulators that emulate the mic, let you assign a Keyboard or Controller button to the Microphone. Because blowing into a Famicom microphone registered as simple Button press and nothing more. So using a microphone is somewhat pointless but in case you want to try it out anyway for fun then this guide is for you. 🙂

Other games that used the Microphone are:

Atlantis no Nazo – get the microphone power-up and then yell into the microphone to freeze and kill most enemies.

Hikari Shinwa: Palutena no Kagami (NES = Kid Icarus) – talk into the microphone to bargain for lower shop prices.

Raid on Bungeling Bay

SD Kamen Rider — in one of the mini games, blow air into the microphone to get a windmill to spin.

Takeshi no Chousenjou

This guide works with all these games.

You will need :

Python 3

alsaaudio for python (pip3 install pyalsaaudi)

xdotool (apt-get install xdotool)

Mesen NES emulator or any other emulator that supports the Microphone (https://www.mesen.ca/)

Mesen emulator is written in .NET Framework so the download file for both Windows and Linux is the same exe file so in order to run it you will need the following

Mono 4.2.1+ (sudo apt-get install mono-complete)

SDL 2

glibc 2.24+

When everything is installed create in a folder an empty text file and name it “MicToKey.py”

Open the text file and add the file and add the following code:

import alsaaudio, time, audioop, subprocess

# Open the device in nonblocking capture mode. The last argument could

# just as well have been zero for blocking mode. Then we could have

# left out the sleep call in the bottom of the loop

inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE,alsaaudio.PCM_NONBLOCK)



# Set attributes: Mono, 8000 Hz, 16 bit little endian samples

inp.setchannels(1)

inp.setrate(8000)

inp.setformat(alsaaudio.PCM_FORMAT_S16_LE)





# The period size controls the internal number of frames per period.

# The significance of this parameter is documented in the ALSA api.

# For our purposes, it is suficcient to know that reads from the device

# will return this many frames. Each frame being 2 bytes long.

# This means that the reads below will return either 320 bytes of data

# or 0 bytes of data. The latter is possible because we are in nonblocking

# mode.

inp.setperiodsize(160)



while True:

# Read data from device

l,data = inp.read()

if l:

if(audioop.max(data,2)>5000): #increasing and decreasing the number "5000" determines how loud you have to blow into the Mic

#The subprocess.call tell python to call the xdotool and simulate the keyboard key Number "8"

subprocess.call(["xdotool", "key", "8"])

time.sleep(.001)



IMPORTANT: Make sure when you paste the code that the indentation correct, unfortunately WordPress removes them.

if you need help look at the code in the picture.

Then save the text file and close it.

NOTE: This is modified version of the code that can be found here.

open the terminal in the same folder and type in:

python3 MicToKey.py

Now every time you blow into the Mic the number “8” should be typed into the terminal.

Next step is running the emulator. Extract the emulator from the zip file and from a new terminal window run:

mono Mesen.exe

When the Emulator is open. Go to “Options” and choose “Input”.

From there choose Console Type “Famicom”.

Configure the first controller in any way you like, for the second controller, configure the microphone to Keyboard number 8. The rest doesn’t need to be configured

now run “Zelda no Densetsu” and when you reach the areas with Pols Voices (First appearance on Level 5, or on Level 2 in the second quest) blow for a couple sec into the Mic and kill them.