Skip to content

Instantly share code, notes, and snippets.

@addisonElliott
Last active December 9, 2017 14:55
Show Gist options
  • Save addisonElliott/a790a91f4120ff8cada2b4dc8e98be77 to your computer and use it in GitHub Desktop.
Save addisonElliott/a790a91f4120ff8cada2b4dc8e98be77 to your computer and use it in GitHub Desktop.

MiSTer provides an on-screen display (OSD) that can be pulled up by pressing F12 on your keyboard. For each core that is loaded, this menu can be configured to add specific options for that core.

The top-level module for the cores is emu. Note that this does NOT mean emu is the top-level module for the project, but rather it is the top-level module for our purposes. The emu module is typically found in the SystemVerilog file (.sv extension) with the same name as the project. As an example, the Arcade-Galaga project has it's top-level module at Arcade-Galaga.sv.

The configuration string is stored in the variable CONF_STR. This variable is passed to the hps_io module that handles sending it to the processor to be read when necessary.

Each line of the configuration string is delineated with a semi-colon. The first line is the core name followed by two semi-colons.

Here are the follow valid options for the menu:

  • T - Trigger button. This is simple a button that will trigger or go HIGH and then go LOW a clock cycle or more later. A perfect example of this is for a reset button.
  • O{Index1}{Index2},{Name},{Options...} - Option button that allows you to select between various choices. {Index1} and {Index2} are values from 0-9 and A-V (like Hex but it extends from A-V instead of A-F). This represents all 31 bits. First and second index are the range of bits that will be set in the status register. {Name} is what is shown to describe the option. {Options...} is a list of comma separated options.
  • J - J1 means lock keyboard to joystick emulation mode. Useful for keyboard-less systems such as consoles.
  • V,{Version String} - Version string. {Version String} is the version string. Takes the core name and appends version string for name to display.
  • - - Skips line.
  • S,{Slot},{Text} - Mount SD card button. {Slot} is a value from 0-3. Up to four images can be mounted at the same time. Optional {Text} string is the text that is displayed before the extensions like "Load RAM". If {Text} is not specified, then default is Mount *.
  • F,{Ext},{Text} - Load file button. {Ext} is a string of 3 character extensions. For example, BINGEN would be BIN and GEN extensions. Optional {Text} string is the text that is displayed before the extensions like "Load RAM". If {Text} is not specified, then default is Load *.
@sorgelig
Copy link

sorgelig commented Dec 9, 2017

J1 means lock keyboard to joystick emulation mode. Useful for keyboard-less systems such as consoles.
O - it's not limited to 2 bits and 4 options. You may define as many consecutive bits as you want within available amount of status bits. You can use 3 bits and have 8 options for example (O13).
S{0-3},.. where 0-3 is slot number. Up to 4 images can be mounted at the same time.

@addisonElliott
Copy link
Author

addisonElliott commented Dec 9, 2017

Oh shoot, that makes much more sense. I was reading the code and saw there was only two valid indices after O. But I understand that's a range now!

Edited the gist. It's all making more sense now. Whenever the Wiki is open to the public, I'll just copy/paste this over there and it can become a community-led project.

Thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment