Questions regarding MSX and SofaRun

Door the_importer

Supporter (1)

afbeelding van the_importer

26-07-2021, 01:16

Hi there,

I've started playing with the MSX core for the MiSTer FPGA today because I was interested in playing some old Falcom and Konami games. I managed to setup my Micro SD Card and it's booting, but my Retro Gaming Setup with my old CRT does not include a Keyboard.

-Is there a way for SofaRun to boot automatically by editing the AUTOEXEC.BAT file?
-Also, did MSX games make use of Keyboard keys? If so, can I use any of the 6 spare buttons on my SNES controller to use the most common ones with SofaRun?

Cheers

Aangemeld of registreer om reacties te plaatsen

Van Parn

Hero (651)

afbeelding van Parn

26-07-2021, 13:02

the_importer wrote:

-Is there a way for SofaRun to boot automatically by editing the AUTOEXEC.BAT file?

Yes, just modify it accordingly.

the_importer wrote:

-Also, did MSX games make use of Keyboard keys? If so, can I use any of the 6 spare buttons on my SNES controller to use the most common ones with SofaRun?

This one is not as straightforward, I'm afraid. Many MSX games use keyboard keys, since the official MSX controller only has two buttons (pause and extra options are two of the most common examples). But in real hardware there are adapters for SNES and Genesis (Mega Drive) controllers (even the 6-button one). SofaRun can, in some cases, patch the games so they support those controllers and map the extra buttons to useful keys.

However, for this to work on your MiSTer it would have to implement these specific adapters in a transparent way to the MSX core. Like, the MSX core must "think" one of these adapters is connected to the system, no matter which real controller you're really using, and do the appropriate mapping. Since I'm not familiar with the MiSTer, I'm not sure this is really possible right now.

But wait, it's also possible the MSX core with the MiSTer already takes this into consideration and maps some controller buttons to useful MSX keys seamlessly. You really should check the MiSTer docs on this.

Van AxelStone

Prophet (3032)

afbeelding van AxelStone

26-07-2021, 14:40

About your 2nd question, I know that Sofarun enables certain keys in pad but only using JoyMega. If the Mister core supports Joymega, check options in Sofarun menu when you load a game.

However they are fixed sets, you can't map a key with a button.

Van sdsnatcher73

Prophet (2153)

afbeelding van sdsnatcher73

26-07-2021, 17:08

Definitely check mister documentation on mapping joystick buttons to keys… and possibly create some configs in between you can switch

Van Louthrax

Prophet (2406)

afbeelding van Louthrax

26-07-2021, 19:16

Hi the_importer, and welcome here.

You can create custom mappings that will be accessible in SofaRun settings by tweaking the SROM.INI file.

Note that this only works for ROM images, and games that are using "standard" keyboard access (it should be OK on most Konami games).

This method relies on patching the game, the MiSter mapping method should be more reliable (but you'll probably have to select the proper mapping every time you launch a game, while SofaRun can remember it in its settings).

####################################################################
[JOY2KEY]
####################################################################

# Joy2Key configurations
# Format is name=mode[sync_rows];{buttonautofirekeys_sequence;}*
#
# name is the name displayed in SofaRun.
#
# mode can be M, B, T, F or S depending on the joystick interface
# you want to use:
# +------+-------------------------+-----------+----------+
# | Mode |     Joystick type       | Available |   Soft   |
# |      |                         |  buttons  |   reset  |
# |------+-------------------------+-----------+----------|
# |   M  | JoyMega - Fast read     | ZYXMAS    | S+A+Down | 
# |   B  | JoyMega - Blocking read | ZYXMAS    | S+A+Down |
# |   T  | JoyMega three buttons   | AS        | S+A+Down |
# |   F  | FM-Towns                | SR        | S+U      |
# |   S  | JoySNES                 | SEYBRLXA  | S+A+Down |
# +------+-------------------------+-----------+----------+
# Shortcuts used in "Available buttons" and "Soft reset":
#   'E': Select button
#   'M': Mode button
#   'S': Start button
#   'U': Run button
#
# sync_rows is an optional list of keyboard matrix rows (0 to 9)
# for which # to perform a joystick update. By default, all rows are
# selected.
#
# button can be any of the available buttons
#
# autofire specifies the autofire delay for the specified  button.
# Set this to 0 for no auto-fire. Finding a good auto-fire value  is
# not so easy, this setting  is very game-specific. Do not  set this
# too low, because the ROM might  think that the buttons  are always
# pressed  if it does  not check it  too frequently!
#
# keys_sequence is a list of keyboard keys that will be  "pressed"
# when  the  specified  button  is  pressed.  Several  keys  can  be
# specified,  they  will be  pressed  together. This  allows  you to
# combine [F1] and [F5] keys  on the same JoyMega button  for Konami
# games. But beware, Parodius for example does not like it: you have
# to  press [F1]  and only  [F1] to  pause the  game (that's  why  a
# specific "Parodius" setting is provided).  A keycode is made of  2
# digits, that can be retrieved in the table below (row first,  then
# column). For example, the key code of the [Space] key is 80.
#
#       bit 7  bit 6  bit 5  bit 4  bit 3  bit 2  bit 1  bit 0
#row 0     7      6      5      4      3      2      1      0
#row 1    ; :    ] }    [ {     \     = +    - _     9      8
#row 2     B      A    DEAD    / ?    .     ,     ` ~    ' "
#row 3     J      I      H      G      F      E      D      C
#row 4     R      Q      P      O      N      M      L      K
#row 5     Z      Y      X      W      V      U      T      S
#row 6    F3     F2     F1    CODE   CAPS   GRAPH   CTRL  SHIFT
#row 7    RET  SELECT   BS    STOP    TAB    ESC    F5     F4
#row 8   RIGHT  DOWN    UP    LEFT    DEL    INS    HOME  SPACE
#row 9   NUM4   NUM3   NUM2   NUM1   NUM0   NUM/    NUM+  NUM*

Generic(M)=M;A080;Y067;X066;S06574;M071;Z070;
Generic(B)=B;A080;Y067;X066;S06574;M071;Z070;
Generic(T)=T;A066;S0657174;
Generic(F)=F;S0657174;U066;
Generic(S)=S;Y080;B0426260;S06574;X066;A067;L070;R071;

Autofire(M)=M;A180;Y067;X066;S06574;M071;Z070;
Autofire(B)=B;A280;Y067;X066;S06574;M071;Z070;
Autofire(T)=T;A180;S0657174;
Autofire(S)=S;Y280;B0426260;S06574;X066;A067;L070;R071;

M.O.G.(M)=M6;S066;A065;Y08577;X280;Z242;M061;
M.O.G.(B)=B6;S066;Z065;X08577;A380;Y342;M061;
M.O.G.(T)=T;S065;A077;
M.O.G.(F)=F;S065;U077;
M.O.G.(S)=S68;S066;E065;B08577;Y280;X242;L061;

Bubble Bobble(B)=B;S074;A162;X080;
Bubble Bobble(T)=T;S074;A162;
Dragon Slayer IV(B)=B;S072;X060;A057;Y077;
Goonies(T)=T;S065;A085;
Parodius(T)=T;S065;A071;
Sword of Ianna(T)=T;S035;A046;
Xevious(M)=M;S0657174;A160;X057;