Contents

Overview

Configure content & menu navigation

Configure layout & behavior

Rascal animations

Emulator examples

Build

Configuration File Intro

This document highlights example config file entries by giving them a gray background and a different font. Italicised text in an example config file entry means to use some appropriate value for what the italicised term represents, not the literal words which are italicised. A pipe character, |, between terms in a field definition means to use only one of the terms which are separated by the pipe(s).

NoQuarter.cfg is the main config file. No quarter works by creating file associations. When working in most parts of the config file, it might help to remember that the whole point is to define that a certain file extension should be opened with a certain program.

Spaces: leading and trailing spaces get stripped as much as possible: they get stripped from beginning of lines, and from the values of fields, so use as many spaces as you like to line up and format your data.

Comments: Create a comment line (that is, a line to make notes for yourself and which will be ignored by the No Quarter program as it reads the config file), by starting it with a pound sign.

Directories: Wherever a directory may be part of the value for a field, you may use an absolute path or a path relative to where nq.exe is sitting on your hard drive. You do not have to enclose space-containing file or directory names with quotes, unless such a space-containing name is in the options field in the [emulator config] section.

User-Defined Variables and Conditional Blocks

This section might be confusing if you aren't already familiar with the concepts involved, and nothing in here is necessary for modifying your config files, so if you aren't right now on a mission to understand how the config file uses variables and conditional blocks, you might want to jump down to the next section.

To make the config file easier to manage, you can define your own variables. These variables will cause nq.exe to perform text substitutions when it processes the configuration file. The format is the variable name enclosed in dollar signs, an equal sign, and then the value to assign to the variable. For example, the line:

$ROMSDIR$ = C:\users\zanzibarbuckbuckmcfate\roms

...creates a variable named $ROMSDIR$, and any subsequent instance of the string $ROMSDIR$ in the config file will be replaced with the text on the right side of the equals sign. So later in the file, when it comes time to load roms from your arcade, genesis, and snes subfolders, instead of typing:
C:\users\zanzibarbuckbuckmcfate\roms\arcade
C:\users\zanzibarbuckbuckmcfate\roms\genesis
C:\users\zanzibarbuckbuckmcfate\roms\snes

You could type:
$ROMSDIR$\arcade
$ROMSDIR$\genesis
$ROMSDIR$\snes

And if you change the location of your roms, you just need to edit the variable assignment line instead of editing the three other lines.

The other convenience I have for working with the config file is the support of conditional blocks, similar to the c preprocessor directive #ifdef, except NQ uses an ampersand instead of the pound sign.

The line:
&ifdef WINDOWS
...means that unless the WINDOWS trigger was defined, then all subsequent lines will be ignored until the line
&endif
- or -
&else
...is encountered.

If an &else line is encountered between a &ifdef something and a &endif, then the lines between the &else and &endif will be processed if and only if the trigger in the most recent &ifdef was not defined.

To define a trigger, use &define triggername anywhere in the file before the trigger is referenced in a &ifdef triggername line.
Here is a full example of using condidional blocks:

&define WINDOWS
&ifdef WINDOWS
<20 lines of configuration>
&else
<15 lines of configuration>
&endif

In this case, the 20 lines of configuration will be processed, but the next 15 lines will not. If we comment out the WINDOWS trigger definition by changing the first line to:
#&define WINDOWS
...then the first 20 lines of configuration will be ignored, and the next 15 will be processed.

I have found the conditional blocks to be mostly useful for hardware changes: I use one block defined for CRT screen geometry vs another block defined for LCD widescreen geometry, and then I use one block defined for a certain game controller mapping versus a different block defined for when a different controller is plugged in, and I use one block defined for Windows folder locations and another block defined for Linux folder locations.

NQ Variables

There is another kind of variable, and these are configuration variables for the program. These variables take the form ?variablename value. Click here to learn about the configuration variables. Any variable not defined will receive a default value, so it's not imperative to define these variables immediately. If you're still on the fence about using NQ, then I would skip that page for now, and instead keep reading on here to learn about setting up your emulators and roms.

Images

All images will be resized to fit the maximum area available to them, while maintaining their width:height ratio (they will not be skewed). So nearly all images will end being letter-boxed or pillar-boxed within their alotted screen space, unless they happen to match the aspect ratio of their designated screen space.

Directories

Starting Fresh

To remove the demo data to make way for your data:

To start with a fresh noquarter.cfg file, you can either remove the lines of demo data under the various sections of the noquarter.cfg file which came with the download, or just copy or rename the file skeleton.cfg to "noquarter.cfg".

If you don't want any of the slideshow screenshots, posters, banners, hardware logos, or sprites which came with the download (I included them for the demo), then delete the files under the directories "slideshow", "posters-master", "banners", "logos", and "sprites", and delete the directories under the "posters" folder.

Remove all of the data from favorites.txt.



The sections of noquarter.cfg:

A section begins with an opening tag, which is the name of the section enclosed in braces. NQ does not use closing tags - the opening tag of a new section will close the section preceding it.

[emulator config]

Configure your emulators. You can find many examples here. Format:
reference name, directory, executable, options, argument type, input config FSO [, minimize]

[associations]

This section creates an association between a file extension (roms) and a program (emulator). There are two other types of associations other than file extension associations: a unique association, which associates a full file name with a program, and a folder + extension combination association, which is a file extension association applicable only to the files in a certain folder. The format is:
extension | name | folder + extension, emulator reference name

[aliases]

The roms in rom lists are sorted alphabetically. Mame requires that roms have specific names. If you want a Mame rom to sort in the list as though it had a different name, then create an alias for it in this section. This alias will also become the display name, unless you also create an entry for the rom in displaynames.txt, in which case the name in displaynames.txt will be the display name, but it will still sort based on the alias created here. Format: rom base name, alias

[shared configs]

Documentation to come later.

[ignore]

The next section, [load roms], is where you load files from directories into rom lists. Before we get there, you can exclude certain files in those directories from being loaded by naming them in this section. Separate file names by any mix of new lines or commas. Use the full file name without the path, or you can use a directory and extension combo. I use this mostly for bios roms, and for parent/clones when you only want either the parent or the clone to be loaded into the menu. Format:

file name | directory and extension combo

The directory and extension combo works the same here as it does for the associations section. For example, I use this: roms\psx\.bin because I load this directory in the [load roms] section, but I only want the cue files. There are also .bin files in this directory, but since .bin is associated with a Genesis emulator, those .bin files would get loaded too if I did not have this "ignore" entry for them.

[load roms]

NQ uses two levels of grouping (referred to as tiers). The top level (or tier) is called volumes, and the bottom level is called rom lists. This section defines volumes and the rom lists they contain, and populates your rom lists with roms from your directories. You can load multiple directories into a list, and you can have one directory loaded into multiple lists. Only files with extensions which have an association defined will be loaded. Keep in mind any file you want put into a rom list from favorites.txt must first be loaded into some other rom list from this section. Format:

volume, rom list, directory [, hardware logo]
- or -
volume, rom list

Use the second format for rom lists which will only be populated by the favorites.txt file. Such rom lists do still need to be defined in this section.

[key config]

Configure keyboard controls to navigate NQ. Format:

nq function, character | SDL decimal keycode

Navigation functions: GUI functions:

The first three functions are used to populate favorites-style rom lists. These functions make changes to the file favorites.txt, which you can just as easily edit manually if you want. The last function is for changing the menu's display names of your roms, and will edit the file displaynames.txt, which may also be edited manually as an alternative to using this in-program function.
Character or SDL decimal keycode

[joy config]

Configure a joystick to navigate NQ. Format:

nq function, joystick button

NQ function: Use the list from the previous section.

Joystick button: The button number on the joystick. There is a helper program in the same directory as nq.exe named joytest.exe. Run this program and press a button on your joystick to see which number you should enter for the value of this field. You cannot map the analog up/down and left/right axes. They are hardcoded to prevrom/nextrom/prevlist/nextlist. If you have more than one joystick plugged in, NQ does not differentiate between which device sent a joystick button. So if you have multiple joysticks of different types, then input from any of them will be processed, but only the one you configured NQ for will be guaranteed to have the correct functions mapped to the correct buttons.

[layout]

Layouts define the geometry of the various screen objects. You may have more than one layout section (they all need to start exactly with the tag [layout] - don't add a number or anything to the tags for multiple layouts). Your different layouts can be cycled through when No Quarter is running by hitting the cycle layout button.

I have this section on the bottom of this documentation page because creating your own layouts is probably one of the last things you're going to do, but in the file noquarter.cfg, the layout section(s) need to be the first section(s) in that file.

The width of the No Quarter screen = padding * 2 + max slide width + divide + max poster width
The height of the No Quarter screen = padding * 2 + tier height * 2 + max poster height

Format:
property, value

These are the properties you should define for each layout:


Configuration File page 2 - variables