Nokia promoting emulation on their new N900 device, look MSX!

페이지 3/6
1 | 2 | | 4 | 5 | 6

By jr

Champion (377)

jr의 아바타

04-02-2010, 08:31

Ok, I'll try the new version when you have it available. On the display composition stuff, have a look at wiki.maemo.org/SimpleGL_example and what it does in its main() function prior to initializing the EGL stuff -- that should be useful for openmsx as well. Informing the WM about the full screen and non-composited state wishes should make the WM disable composition and enable higher graphics throughput.

By Manuel

Ascended (19058)

Manuel의 아바타

04-02-2010, 19:04

I'm preparing new packages now....

I'd first like to see if simple openMSX settings can already improve the experience to some extent. Did you have a chance to try out the suggestions I did, so we can make an optimal default configuration for N900?

About the stuff you mentioned: I'm not sure those go well with SDL... we do not use X directly anywhere in our code. So, I'm not sure this is (easily) feasible.

By Manuel

Ascended (19058)

Manuel의 아바타

04-02-2010, 21:51

OK, here are new packages, with maintainer field fixed and of course that input bug:

http://openmsx.sourceforge.net/temp/cbios_0.23-1maemo1_all.deb
openMSX:
http://openmsx.sourceforge.net/temp/openmsx-data_0.7.2-4maemo1_all.deb
http://openmsx.sourceforge.net/temp/openmsx_0.7.2-4maemo1_armel.deb

Let me know if that works better and if you can, also which settings are optimal for the N900.

By jr

Champion (377)

jr의 아바타

05-02-2010, 08:03

Better, now keyboard sort-of works. The main problem is that many keys on the N900 keyboard are accessed through alt+keypress which openmsx doesn't recognize -- unfortunately that includes characters like underscore and all numbers so it makes adjusting settings in the console a little bit difficult. It seems the "kbd_trace_key_presses" setting is not read from settings.xml and since I cannot enable it from the console because I cannot enter an underscore I'm out of luck Sad I'll try to add some alt+key bindings manually to the settings.xml but I'm not sure if I can use that to replace "missing" keys like bind alt+g "_".

Quickly judging I'd say running with scale_factor 1 gives full framerate but on the other hand the graphics get quite small Tongue Running fullscreen with resampler set to fast and default scale_factor also plays Metal Gear 2 at almost full framerate which makes me believe full framerate could be achieved if the display composition was disabled. I understand if you do not want to introduce platform specific code to openmsx but the trick I linked to should (not a promise) be usable with SDL as well since you can acquire a handle to the X Window SDL is using via SDL_GetWMInfo.

By Manuel

Ascended (19058)

Manuel의 아바타

05-02-2010, 09:09

openMSX relies on SDL for that keyboard input, so it might be a problem in SDL if you can't type an underscore. Do you have a TAB key? The completer might be useful if you do.

The "kbd_trace_key_presses" setting is not a savable setting, which explains why it is no use to put it in settings.xml. A workaround is to put this setting in a txt file as a tiny script:

set kbd_trace_key_presses on

, and start openMSX with

openmsx -script yourtextfile

.

You said that with scale factor 2 and fullscreen and resampler 'fast' you get almost full framerate. What if you optimize/disable settings like 'blur', 'scanline', 'noise'? That may give you even more speed.
Running fullscreen with scale_factor 1 gives full framerate without small graphics. (Although the resolution is still low, of course.)

I'll try to look into the SDL_GetWMInfo stuff, thanks for the tip. For this, it might even be nice if you could help me out a bit to make it more efficient. It's not hard to make a Maemo dev env (it's explained on the Maemo web site) and this way you could directly test stuff. If you're interested, I'll do my best to help you as good as I can Smile

By jr

Champion (377)

jr의 아바타

05-02-2010, 09:25

The keys actually work in the emulated MSX, i.e. when I press alt+Q on the N900, I get a '1' in the MSX BASIC as it should. It's just the console that doesn't read input from these "shifted" keys.

I'll experiment with the other settings you mentioned, unfortunately I have to do this by manually editing the settings.xml in the XTerminal because I cannot enter any numbers either in the console :/

I'd be glad to help but I only have Macs and the Maemo devenv only works on Linux. I know I could set up a virtual machine and work from there, I'll look into it.

By jr

Champion (377)

jr의 아바타

05-02-2010, 09:29

Ah, it's not alt key, at least openmsx is calling it the "mode" key.

By jr

Champion (377)

jr의 아바타

05-02-2010, 09:39

According to the key trace log, when the console is open I get no key press events with the mode key, only release events. On the other hand, when console is closed, both press and release events are reported.

An excerpt from the trace log below. I have mapped CTRL+Q to "toggle console" command. What I do is I'm first in MSX BASIC, enter numbers 1,2,3 by pressing MODE + Q, W, E respectively, open the console and try to do the same.

Key pressed, unicode: 0x0000, keyCode: 0x00139, keyName: MODE
Key pressed, unicode: 0x0031, keyCode: 0x200071, keyName: Q+MODE
Key released, unicode: 0x0000, keyCode: 0x600071, keyName: Q+MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400139, keyName: MODE,RELEASE
Key pressed, unicode: 0x0000, keyCode: 0x00139, keyName: MODE
Key pressed, unicode: 0x0032, keyCode: 0x200077, keyName: W+MODE
Key released, unicode: 0x0000, keyCode: 0x600077, keyName: W+MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400139, keyName: MODE,RELEASE
Key pressed, unicode: 0x0000, keyCode: 0x00139, keyName: MODE
Key pressed, unicode: 0x0033, keyCode: 0x200065, keyName: E+MODE
Key released, unicode: 0x0000, keyCode: 0x600065, keyName: E+MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400139, keyName: MODE,RELEASE
Key pressed, unicode: 0x0000, keyCode: 0x00132, keyName: LCTRL
Key released, unicode: 0x0000, keyCode: 0x440071, keyName: Q+CTRL,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400132, keyName: LCTRL,RELEASE
Key released, unicode: 0x0000, keyCode: 0x600071, keyName: Q+MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400139, keyName: MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x600077, keyName: W+MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400139, keyName: MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x600065, keyName: E+MODE,RELEASE
Key released, unicode: 0x0000, keyCode: 0x400139, keyName: MODE,RELEASE

By Manuel

Ascended (19058)

Manuel의 아바타

05-02-2010, 17:50

Hehe, interesting! I'll talk about it with Wouter.

The key names are not invented by openMSX by the way, but are straight from libSDL.

About the dev env: I especially installed a Debian GNU/Linux on a VirtualBox VM as well, just to run the dev env Smile (I didn't like how it messes with my Linux installation, so I used a VM. This is quite workable.)

By Manuel

Ascended (19058)

Manuel의 아바타

06-02-2010, 12:21

OK, Wouter had some ideas:
<Quibus> i.e. why he only gets release events in the console and not when typing in the MSX
<wouter_> that's beause of the location of the logging .. logging in done in the MSX keyboard code, and when the console is up, keydown events are not send to the msx anymore (in 0.7.2, though this recently changed, now not even keyup events are passed to the msx)
<wouter_> the console only processes 'normal' keys (CommandConsole::normalKey()) when no modifier or only SHIFT is pressed
<wouter_> maybe, in the console code, we shouldn't look at the modifier state at all, but only to the unicode field?

And he gave me a patch for that. Will build a new openMSX package for that (replacing the old one).

If you have a dev env yourself now, this is the patch against SVN HEAD (won't apply to 0.7.2):

diff --git a/src/console/CommandConsole.cc b/src/console/CommandConsole.cc
index 1ff7bcc..ad96868 100644
--- a/src/console/CommandConsole.cc
+++ b/src/console/CommandConsole.cc
@@ -199,7 +199,12 @@ bool CommandConsole::handleEvent(const KeyEvent& keyEvent)
 			if (down) clearCommand();
 			break;
 		default:
-			used = false;
+			if (chr) {
+				if (down) normalKey(chr);
+			} else {
+				used = false;
+			}
+			break;
 		}
 		break;
 	case Keys::KM_SHIFT:
@@ -275,7 +280,12 @@ bool CommandConsole::handleEvent(const KeyEvent& keyEvent)
 		}
 		break;
 	default:
-		used = false;
+		if (chr) {
+			if (down) normalKey(chr);
+		} else {
+			used = false;
+		}
+		break;
 	}
 	if ((key == Keys::K_LSHIFT) || (key == Keys::K_RSHIFT) ||
 	    (key == Keys::K_LCTRL)  || (key == Keys::K_RCTRL)  ||
페이지 3/6
1 | 2 | | 4 | 5 | 6