   pinMode(OEVCBUS, OUTPUT);
   pinMode(LED, OUTPUT);
 
+  // Isolate MultiROM from console bus
   disableVCBus();
 
-  // Initializing SD card and open ROM file
+  // Enable 7-segment display
+  display.setBrightness(0x0f);
+
+  // Wait for user selecting a ROM number
+  byte key = getKey(A7);
+  do {
+    if (key == UPKEY && lastkey != UPKEY && romNumber < MAX_ROMS)
+      ++romNumber;
+    else if (key == DOWNKEY && lastkey != DOWNKEY && romNumber > 1)
+      --romNumber;
+    display.showNumberDec(romNumber, false, 2, 2);
+    lastkey = key;
+    key = getKey(A7);
+  } while (key != SELECTKEY);
+
+  // Construct ROM file name
+  itoa(romNumber, romName, 10);
+  byte len = strlen(romName);
+  romName[len]   = '.';
+  romName[len+1] = 'b';
+  romName[len+2] = 'i';
+  romName[len+3] = 'n';
+
+  // Initialize SD card and open ROM file
   if (SD.begin(SD_CS)) {
-    if (getRomName()) {
-      romFile = SD.open(romName);
+    romFile = SD.open(romName);
+
+    // Write ROM file to SRAM
+    if (romFile) {
+      unsigned romSize = static_cast<unsigned>(romFile.size());
+      if (romSize <= MAX_ROM_SIZE) {
+        for (unsigned i = 0; i < romSize; i++) {
+          write2RAM(i, romFile.read());
+        }
+      } else {
+        // ROM size too big.
+        blinkTimeHigh =   50;
+        blinkTimeLow  = 1000;
+      }
+      romFile.close();
+      enableVCBus();
     } else {
-      // ROM name could not be determined.
-      blinkTimeHigh = 50;
-      blinkTimeLow = 500;
+      // ROM file could not be opened.
+      blinkTimeHigh =  50;
+      blinkTimeLow  = 200;
     }
   } else {
-    // SD card not found or otherwise failing SD initialization.
+    // SD card not found or otherwise failing initialization
     blinkTimeHigh = 50;
     blinkTimeLow  = 50;
-  }
-
-  // Write ROM file to SRAM
-  if (romFile) {
-    unsigned romSize = static_cast<unsigned>(romFile.size());
-    if (romSize <= MAX_ROM_SIZE) {
-      for (unsigned i = 0; i < romSize; i++) {
-        write2RAM(i, romFile.read());
-      }
-    } else {
-      // ROM size too big.
-      blinkTimeHigh = 50;
-      blinkTimeLow = 1000;
-    }
-    romFile.close();
-    enableVCBus();
-  } else {
-    // ROM file could not be opened.
-    blinkTimeHigh = 50;
-    blinkTimeLow = 200;
   }
   SPI.end();  // Otherwise on-board LED does not work!
 }

  digitalWrite(LATCH, LOW);
}

bool getRomName() {
  File config = SD.open("config.txt");
  if (config) {
    for (byte i = 0; config.peek() != '\n' && i <= FILENAME_SIZE; ++i) {
      romName[i] = config.read();
    }
    config.close();
    return true;
  } else {
    // File config.txt was not found or could not be opened.
    return false;
  }
}

#include <SD.h>
#include <SPI.h>            // Needed for SD lib
#include <TM1637Display.h>  // 7-segment driver lib

// Defines for Arduino port numbers
#define CLOCK          5  // SRCLK (A/D-Bus Shift Registers)
#define LATCH          3  // RCLK  (A/D-Bus Shift Registers)
#define DATA           6  // SER   (A/D-Bus Shift Registers)
#define OESHIFT        2  // _G    (A/D-Bus Shift Registers)
#define WESRAM        10
#define OEVCBUS        7  // OE for Bus Transceivers
#define SD_CS          4  // Chip Select for SD card
#define DISPLAY_CLK   A4  // 7-segment display
#define DISPLAY_DIO   A5  // 7-segment display
#define LED           13

// Miscellaneous other defines
#define NOKEY           0
#define UPKEY           1
#define DOWNKEY         2
#define SELECTKEY       3
#define MAX_ROMS       99
#define MAX_ROM_SIZE 6144

// Global variables
byte lastkey = NOKEY;
byte romNumber = 1;
char romName[] = { 0, 0, 0, 0, 0, 0, 0 };
File romFile;
unsigned blinkTimeHigh = 500;
unsigned blinkTimeLow  = 500;
TM1637Display display(DISPLAY_CLK, DISPLAY_DIO);

void setup() {
  pinMode(SD_CS, OUTPUT);
