SpiffMAME Framebuffer console configuration

This page describes how I configured a framebuffer console using matroxfb on my Matrox G400 Dual head, allowing me to have a console on the low-res Hantarex MTC900 arcade monitor in my cabinet. After getting the console framebuffer up and running, this can also be used through the slang-library, allowing the configuration utilities to run on the arcade monitor as well.

I used the tools that came with the AdvanceMAME-package to create a few video-modes that I would use for AdvanceMAME, as well as the AdanceMENU frontend and the framebuffer console.

The first step is to use the advcfg-utility to create a proper setup for my monitor. Start off by connecting a regular PC-monitor, which will be used to enter the parameters of the monitor (found from the service manual), and then choose easy centering. Now, plug in your arcade monitor, and hopefully you get an image on the screen. Follow the on-screen instructions on centering the screens. After centering the screens, it is time to generate a mode that we will use for the console, so exit from advcfg (saving your configuration), but first plug in your PC monitor again.

Now, start the advv-utility. Creat a mode with the most possible scan-lines, but not interlaced (since this is not supported by the console framebuffer on startup). In my case the monitor was adjusted for 256 scan-lines (since this seem to be the maximum number of scan-lines used without running in interlaced modes, at least for 95% of the games. The graphics-mode I chose was 640x248@59Hz, which was displaying very nicely on my monitor. Notice the odd aspect-ratio. For the console, this will be fixed by choosing an appropriate font, but the 640 pixels wide screen allows for 80 coloumns of text display. Also, a high x-resolution actually means a higher pixel-clock, so this may actually be needed for the fb-driver to work correctly.

When you have your mode displayed nicely on the arcade monitor, and centered the way you want it, log in over the network (via ssh), and run the fbset-utility. This should print the current mode of the framebuffer. In my case the result was:

mode "640x248-59"
    # D: 14.439 MHz, H: 15.832 kHz, V: 59.295 Hz
    geometry 640 248 640 496 16
    timings 69259 136 72 17 0 64 2
    rgba 8/16,8/8,8/0,0/0

Write this down, as we will use this to configure the console. First we can try it out on the command-line (after exiting advv):

root@spiffmame ~ # fbset -g 640 248 640 496 16 -t 69259 136 72 17 0 64 2

Running this command should switch your console to the selected mode. To set the mode during bootup, we have to turn them into appropriate parameters for the kernel command line. Extracting the values from the above run of fbset yields the following parameters:

The matroxfb-framebuffer permits the specification of all these on the kernel command line, so we go ahead and add this to the kernel command line in grub.conf or lilo.conf:


I actually use LILO, since it is a little faster to boot the kernel, and every second counts when starting up an arcade machine. If you use LILO, you must run the command lilo in order to write the updated configuration to the boot-sector. If you use grub, you need not do anything for the update to take effect. If all goes well, you should now be able to reboot the system, and you should have nice framebuffer console on your arcade monitor after the kernel has initialized.

Just to make sure everyone understands, here is the appropriate line from my lilo.conf:

append = "CONSOLE=/dev/tty1 video=matroxfb:xres:640,yres:248,depth:16,pixclock:69259,left:136,right:72,upper:17,lower:0,hslen:64,vslen:2 splash=silent"

At this point you can mess arround with the console fonts, either the ones built in the kernel, or the ones provided by your distribution. In my case I have disabled the consolefont-initscript, since it messes up the bootsplash-system. This means the kernel chooses an appropriate mode, and works very well.

Also note that after the successful configuration of the console framebuffer, you can now set advv and advcfg to use the slang-library, and they will be able to use the mode configured on your console, allowing these utilities to run on the arcade monitor as well.

Since you got this far, you may want to take a look at setting up bootsplash, which will allow you to have a nice progress bar while the system boots up and shuts down.

Last updated: 2005.11.17