Emulator Resources / Making AVI / Gens / Linux

This page is part of the Emulator resources / Making AVI page collection. Back to:
<< Emulator Resources / Making AVI / Gens
<< Emulator Resources / Making AVI
<< Emulator Resources

This page explains how to create AVI files from Gens movies when you have a GNU/Linux operating system (any flavor will do).

Program requirements

You need the Gens source code.
You can download it from: http://prdownloads.sourceforge.net/gens/Gens212a1SrcL.zip?download
You need MEncoder.
You can find it at: http://mplayerhq.hu/ or install from a package usually called "mplayer".
Standard MPlayer versions (non-CVS) always include libavcodec. If you want to use xvid, you need to install it separately and ensure MPlayer will support it.
You need LAME.
You can download it at: http://lame.sourceforge.net/ or install from a package usually called "lame".
You need this patch
http://bisqwit.iki.fi/src/Gens212a-moviepatchv2-jyzero,bisqwit.gz

Compiling Gens

Extract the source code.

  unzip Gens212a1SrcL.zip

Apply the patch.

  cd gens_linux
  zcat ../Gens212a-moviepatchv2-jyzero,bisqwit.gz | patch -p1

Compile the source code.

  cd gens
  make
Note that you must have gtk+ 2 and SDL development libraries installed in your system. And a C++ compiler (gcc) of course.

Creating the script to run it all

For running Gens, I use this kind of shell script:

RUNSEGA

  #!/bin/sh
  # Which file do you want to place your audio in.
  AUDIO_RESULT="audiolog.mp3"
  # Where is your Gens binary?
  GENS="./gens"
  rm -f  s.log
  mkfifo s.log
  lame -rx -b 256 -m s -q 2 s.log "$AUDIO_RESULT" &
  $GENS $*
  rm -f s.log
  # Fix the ownership of the files - doesn't matter if this fails.
  chown bisqwit test0.avi "$AUDIO_RESULT"
I call the script RUNSEGA.

Again, you can edit it to suit your setup and needs.

Running Gens

To run Gens, start your newly created shell script. Example:
  ./RUNSEGA
I prefer to do this as root, but I can not recommend it to others due to security reasons.

When Gens starts up, select File and Open ROM. Locate your ROM and open it.
Then select CPU and Play Movie. Locate your movie file and open it.

When Gens is done playing the movie, exit it by normal means (select File and Quit).

Now you should have test0.avi and audiolog.mp3 on your disk. Names may vary if you have changed the script/source files.

Note that Gens is lag-tolerant.
It doesn't matter if you watch anime while recording the movie.

The encoding environment

The rest of this documentation is at the Linux AVI scripts page, because it's common in all the different emulators.

Troubleshooting

Do you get error messages such as this?
  glade/interface.c:2072: error: invalid type argument of `->'
Tough luck. Backward compatibility isn't the strongest feature of Gnome stuff...
  • Edit Makefile
    • Locate "-DGTK_DISABLE_DEPRECATED" and delete it
    • Recompile. If it works, enjoy.
  • Otherwise - install Glade
  • Go to the glade/ directory
  • Run glade: glade-2 *.glade
  • Select "Options" from the "Project menu"
    • Put "." where it says "src"
    • Go to "C Options" and check "Output Build Files"
    • Click "Ok"
  • Select "Build" from the "Project menu"
  • Exit Glade
  • Run ./autogen.sh
  • Run make. Ignore the complaint about "main".
  • Then return to the "gens" directory (1 level up) and issue "make".
  • Notice how it complains of linker errors. Eat your shorts.

Author

Written by Bisqwit

Get Firefox!EmulatorResources/MakingAVI/Gens/Linux last edited by Bisqwit on 2008-02-20 13:37:47
Page info and history | Latest diff | List referrers