Feature request "GUI for Windows"

Everything about Andy Key's great Emulator MEMU
User avatar
schombi
Posts: 25
Joined: 06 Jan 2014 08:20
Location: Malsch, Germany
Contact:

Feature request "GUI for Windows"

Post by schombi »

I wonder if it would be possible to get a simple GUI for MEMU (Windows version)? I keep struggling with the command line parameters.
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Feature request "GUI for Windows"

Post by Bill B »

I have discussed this a bit with Andy. There are at least two issues:

1. Designing the dialog. The command line switches are extremely flexible and powerful. It is actually quite difficult to come up with a dialog structure that is capable of doing everything that can be done from the command line, particularly with respect to initialising memory contents. For MEMU-Pi, I ducked the issue and just offer a much more restrictive set of options, based upon the real hardware.

2. Implementing the dialog once it is designed. I can think of at least four approaches, all of which have their own issues:

a) A very clunky 1980's style, keyboard only, dialog. This is the approach I used for MEMU-Pi.

b) Write and maintain at least three different sets of GUI code (Windows, Mac, Linux). Hard work.

c) Use a cross-platform library. These are all heavy-weight and introduce a lot of dependencies.

d) Develop a separate "launcher" program that displays the configuration dialog and then assembles the command line to launch MEMU. This keeps MEMU lean & mean, and the "launcher" can be written in a high level cross-platform language (Python would be my choice). However this approach can only do initial setup, not things like changing emulated disks once the emulator is running.
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: Feature request "GUI for Windows"

Post by Dave »

Hi Bill,

yes, I see that this could be a lot of work, particularly to be cross platform.

Your 4th suggestion is something that I had thought might be a workable solution.

A few thoughts below . . . .

I don't know what you had in mind, perhaps a set of option buttons to select the most used MEMU options, e.g.,

-vid-win, -vid-win-big (mutually exclusive)
-joy
-kbd-remap
etc.

For options requiring a value, a button with a dialogue box, e.g., -subpage <value>

I think that the "regular" user won't need to use the diag options, and they would use the command line anyway, so those options could be left out

A bit more complex to include the Speculator options as the file renaming thin would need to be handled too
(After setting -tape-dir path)
cp Gridrunner.tap memu.tap
$ memu -vid-win -snd-portaudio Speculator.mtx
[LOAD "" the user would need to do the load command etc.]
[press F to select Gridrunner]

regards
Dave
User avatar
schombi
Posts: 25
Joined: 06 Jan 2014 08:20
Location: Malsch, Germany
Contact:

Re: Feature request "GUI for Windows"

Post by schombi »

I agree, the 4th approach seems to be relatively easy to implement. Although it would be nice to have all options available while MEMU is running, a simply launcher would help a lot.
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Feature request "GUI for Windows"

Post by Bill B »

There are actually two different types of launcher possible:

I) A launcher with a dialog that has many spinners, menus and checkboxes and attempts to provide access to as many of the MEMU command line options as possible. Such a launcher would be general purpose, but would still require the user to know which options are needed for which games.

II) A system which has a file or files storing a "recipe" for each game. The launcher would then just display a list of available games (perhaps with cover art) and launch the selected game. This would be simpler for the user, but would only support those specific games for which somebody had prepared a "recipe" file.
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: Feature request "GUI for Windows"

Post by Dave »

Hi Bill,

the second option sounds very much like the GameBase idea. Paul has put together a GameBase for a lot of the MTX games, and I know that he is working on an update. The info, and download, are available on this page :-
http://www.primrosebank.net/computers/m ... lation.htm

That is a really good way for running games - provided the GameBase is up to date, so if all people want to do is to play games, then no more work is really required.

For other uses though, I think your first "launcher" idea would be really useful

regards
Dave
User avatar
schombi
Posts: 25
Joined: 06 Jan 2014 08:20
Location: Malsch, Germany
Contact:

Re: Feature request "GUI for Windows"

Post by schombi »

Yes, Dave is right. A simple launcher with checkboxes would be a nice, quick start, but using the information from GameBase and transferring it into MEMU would be perfect (long-term-wise).
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Feature request "GUI for Windows"

Post by Bill B »

A first quick hack at a launcher. It is certainly missing features and may contain bugs.

I have done (limited) testing on Linux with Python 2.7. It should also work on Windows. I think (hope?) that it will also work with Python 3.x.

Linuxen should already have Python installed, but may need to install Tix. Use your favourite package manager.

Microsofties can find everything you need at http://www.python.org/download/.

Feedback welcome. Patches / enhancements are even better. Python is the 21st century alternative to BASIC. Have a go.
Attachments
Launch.zip
Unzip and place in the same folder as MEMU.
(1.61 KiB) Downloaded 574 times
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: Feature request "GUI for Windows"

Post by Dave »

Hi Bill,

thanks a lot, this looks like it will do the trick.

I am trying it on Windows - originally with Python 3.3.3, now Python 2.7.6.
I didn't pay enough attention to the error messages when I couldn't get it to run under 3.3.3, but I will try the later version on Python again in a while - I suspect that it will be fine when I know what I'm doing :-)

Under 2.7.6, I am having a problem, but I think it is as much to do with my not understanding how the Launcher operates as anything else.

So, perhaps some questions might clear it up...
1. How should the "Tape Directory" entry and "Run File" entry combine?
i.e., I had expected that if I specified a tapedir, when I used the run file entry, the path would populate with the tapedir entry, but I seem to have to browse for the tape directory there too or it can't find the .mtx file? - I think there may be a problem with the string concatenation?
Running the script, pointing to the tapedir and run file entries, I get the following .....
"C:\Users\stevendt\Downloads\MTX\AndyK\e>c:\"user programs"\python27\python launch.pyw
C:/Users/stevendt/Downloads/MTX/AndyK/e/tapes
['memu.exe', '-mem-blocks', '4', '-vid-win', '-snd-portaudio', '-tape-dir', 'C:/
Users/stevendt/Downloads/MTX/AndyK/e/tapes', 'C:/Users/stevendt/Downloads/MTX/An
dyK/e/tapes/Alice in Wonderland (1983) (Continental Software).mtx']
[MEMU crashes here]
C:\Users\stevendt\Downloads\MTX\AndyK\e>memu: can't open C:/Users/stevendt/Downl
oads/MTX/AndyK/e/tapes/C:/Users/stevendt/Downloads/MTX/AndyK/e/tapes/Alice in Wo
nderland (1983) (Continental Software).mtx"

i.e., the path appears twice - from both launcher option lines
If I don't specify a tapedir, it seems fine


Addtional Feature request (greedy or what!)

I know nothing about Python, so I don't know whether this is possible, but would it be possible to retain the last configuration values for the next time that the script was run?, i.e., to remember the path(s) in particular?

But, this is a great start and looks almost there

regards
Dave
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Feature request "GUI for Windows"

Post by Bill B »

Dave,

The Tape Dir entry sets the directory for the '-tape-dir' switch in MEMU. This is the directory from which tapes are loaded when you do LOAD "filename" from MTX BASIC.

The Run File option sets the final filename that is passed to MEMU at the end of the command line without a switch. It can be a *.mtx, *.run or *.com file. If you specify a *.mtx file here, then a subsequent LOAD "" will load this file.

This is as documented in Andy's excellent usage notes http://www.nyangau.org/memu/usage.htm

Bill.
Post Reply