How to pass file paths to openmsx?

Page 1/2
| 2

By brakenwagen

Supporter (14)

brakenwagen's picture

20-03-2018, 17:05

Can somebody please tell me how openmsx handles file paths regarding the –carta command. So far I have gathered that it takes forward slashes instead of backwards slashes. But beyond that I have no idea it refuses to load file paths I give it. Even using the pipe method described here (https://openmsx.org/manual/openmsx-control.html) doesn’t work, it works for other commands that don’t need a file path but things like carta will not work. Please I’ve already spent an entire day trying to figure this out, I'm going mad here.

Login or register to post comments

By Manuel

Ascended (14328)

Manuel's picture

20-03-2018, 19:15

Can you give some examples what doesn't work and what you expected to work?
Are you talking about console commands or command line parameters?

By brakenwagen

Supporter (14)

brakenwagen's picture

20-03-2018, 21:00

i have tried console command and command line (I think I'm fine with either one) but none of them work. here is the path I'm trying to load

C:\Roms\MSX Games\Roms\Vampire Killer (MSX) (1986)\Vampire Killer.mx2

and i tried it with forward slashes as well nothing. there has to be some way to do it openmsx loads it fine if you browse to it manually from the internal menu.

By FiXato

Scribe (1434)

FiXato's picture

20-03-2018, 21:19

Try wrapping the path in double quotes, since it has spaces, or escaping each space with a backslash. Without that, it will likely interpret each next 'word' as a separate argument.

By NYYRIKKI

Enlighted (4944)

NYYRIKKI's picture

20-03-2018, 21:21

Try: carta "C:/Roms/MSX Games/Roms/Vampire Killer (MSX) (1986)/Vampire Killer.mx2"

Few tips:
- Filenames are case sensitive
- On command shell you can usually use TAB-key to fill missing part of command or filename
- Catapult is a mouse driven graphical user interface delivered with openmsx. If you use it to insert cartridge and then write "carta" you can see the correct path write style.

By Manuel

Ascended (14328)

Manuel's picture

20-03-2018, 22:13

Indeed, in the console, use the TAB key to complete filenames, it will automatically do the escaping for you.

By brakenwagen

Supporter (14)

brakenwagen's picture

20-03-2018, 22:24

Omg I finally figured it out it was the current directory. See I want to make it so I can just make shortcuts to a bat file instead of the exe itself. With the bat as a middle man I can do all sorts of things like pipe in console commands. And if I want to change the shortcuts instead of changing every signal one I just change what’s in the bat file.

I would start the program by dragging and dropping the rom file onto the shortcut to the bat. From there the bat file’s universal variable %~1 would be the path to whatever I dragged and dropped onto it. But it turns out when you do this your %CD% (current directory) is the directory of wherever the rom file was not the directory of openmsx.exe and that was messing with it somehow (not the first time I’ve encountered this).

It appears I led you all on a wild goose chase, it was nothing wrong with how openmsx handles file paths (expect for changing \ to /) it was just an oversight on my part however I thank you all none the less.

By Manuel

Ascended (14328)

Manuel's picture

20-03-2018, 23:03

So, what exactly are you up to? You got me curious!

By brakenwagen

Supporter (14)

brakenwagen's picture

20-03-2018, 23:40

I'm working on organizing my rom collection so that everything is neat and easy to get to with little effort. with msx games i like to play them at 50hz but i would have to input the console command toggle_freq every time i started it up. with batch i can pipe console command right into the exe at start up without typing anything meaning i get to the game faster.

I got all kinds of scripts and techniques that streamline everything when I'm all done its going to be so easy to just start things up and go. For example mupen64plus makes inputting controls like trying to find the lost city of Atlantis (for reasons) but with vb script i got the whole thing automated only have to make the profile once and from then on i can input it whenever i want.

I'm also making a copy for my sister who doesn't understand these things to well but loves to play old school jrpgs. here is the code i got so far for openmsx's bat file it not finalized yet but i got the hard stuff out of the way.

set strInput="%~1"
set strInputUnix=%strInput:\=/%

CD=C:\Roms\MSX Games\Emulators\openmsx-0.14.0-windows-vc-x64-bin

echo "set renderer SDL toggle_freq extb scc+ set power on" | openmsx.exe -control stdio -carta %strInputUnix%
pause

darn part of it is in xml so it not displaying everything correctly with this forum

By Manuel

Ascended (14328)

Manuel's picture

21-03-2018, 00:01

You could also just use an MSX1 with a TMS9xx9 VDP, which run at 50Hz...

Some questions and suggestions:
- why not SDLGL-PP renderer? You can set it to default by doing: "unset renderer".
- I like how you pipe the XML to openMSX. You can also use the -script option to let it execute a script right after loading. Could be a bit simpler. At least allows you to leave out setting the renderer and the power on stuff.
- Why do you want an SCC+ cart in the MSX? It's only used by a handful of games. Instead of adding it all the time, you could even build it in into your own machine configuration
- And as I wrote above, instead of toggle_freq, just use a 50Hz MSX instead of a 60Hz one. Are you using the default machine? (C-BIOS_MSX2+)

I like how you want to get control over the software you're running there Smile

By Grauw

Enlighted (7214)

Grauw's picture

21-03-2018, 00:05

brakenwagen wrote:

set strInput="%~1"
set strInputUnix=%strInput:\=/%

CD=C:\Roms\MSX Games\Emulators\openmsx-0.14.0-windows-vc-x64-bin

echo "<command>set renderer SDL</command> <command>toggle_freq</command> <command>extb scc+</command> <command>set power on</command>" | openmsx.exe -control stdio -carta %strInputUnix%
pause

darn part of it is in xml so it not displaying everything correctly with this forum

MRC Troubleshooting FAQ: How do I write a < character?

Page 1/2
| 2
My MSX profile