|
Joined: Dec 1999
Posts: 1,180 Likes: 2
Very Senior Member
|
Very Senior Member
Joined: Dec 1999
Posts: 1,180 Likes: 2 |
keys recognized by the emulation? Is it enough to add the PORT_CODE(KEYCODE_RSHIFT) and PORT_CODE(KEYCODE_LCONTROL) in both lines? Is it necessary to change something in the PORT_CHAR() part? Adding the PORT_CODEs to both lines should work for "emulated keyboard" mode, yes. The PORT_CHAR stuff is for the "natural keyboard" mode - I'm not sure if any change would be needed there. The right shift at least seems to already work in natural keyboard mode, I don't know what the control key is supposed to do in MC-1000 so I can't check.
|
|
|
|
Joined: Mar 2001
Posts: 17,234 Likes: 259
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,234 Likes: 259 |
The M6847 external rom change is submitted as #9449.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
OP
Member
Joined: Jul 2009
Posts: 78 |
keys recognized by the emulation? Is it enough to add the PORT_CODE(KEYCODE_RSHIFT) and PORT_CODE(KEYCODE_LCONTROL) in both lines? Is it necessary to change something in the PORT_CHAR() part? Adding the PORT_CODEs to both lines should work for "emulated keyboard" mode, yes. The PORT_CHAR stuff is for the "natural keyboard" mode - I'm not sure if any change would be needed there. Hm... Do you know why SHIFT has PORT_CHAR(UCHAR_SHIFT_1) while CTRL has PORT_CHAR(UCHAR_MAMEKEY(RCONTROL))? Why doesn't SHIFT have PORT_CHAR(UCHAR_MAMEKEY(LSHIFT))? And, more importantly... What's the difference? The right shift at least seems to already work in natural keyboard mode, I don't know what the control key is supposed to do in MC-1000 so I can't check. Well... CTRL+M should be the same as pressing the RETURN key, CTRL+C should break a running BASIC program or LIST output, and abort a line you were typing, CTRL+S should pause (and then resume) a running BASIC program or LIST output... not much more than that.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
OP
Member
Joined: Jul 2009
Posts: 78 |
The M6847 external rom change is submitted as #9449. Seen it. Thank you, Belmont!
|
|
|
|
Joined: Dec 1999
Posts: 1,180 Likes: 2
Very Senior Member
|
Very Senior Member
Joined: Dec 1999
Posts: 1,180 Likes: 2 |
Why doesn't SHIFT have PORT_CHAR(UCHAR_MAMEKEY(LSHIFT))? And, more importantly... What's the difference? For natural keyboard mode you can list two characters for the same key, e.g. PORT_CHAR('4') PORT_CHAR('$')The PORT_CHAR(UCHAR_SHIFT_1) then tells MESS that this is the modifier key that needs to be held down to get the second character listed. This allows things like copy-paste into MESS to work. (It's also possible to use PORT_CHAR(UCHAR_SHIFT_2) and have 3 characters for the same key.) Well... CTRL+M should be the same as pressing the RETURN key, CTRL+C should break a running BASIC program or LIST output, and abort a line you were typing, CTRL+S should pause (and then resume) a running BASIC program or LIST output... not much more than that. OK. Looks like both Ctrl keys are already working in natural keyboard mode as well so the PORT_CODE changes should be enough.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
OP
Member
Joined: Jul 2009
Posts: 78 |
the PORT_CODE changes should be enough. Done. SVN diff:
Index: src/mess/drivers/mc1000.c
===================================================================
--- src/mess/drivers/mc1000.c (revision 9454)
+++ src/mess/drivers/mc1000.c (working copy)
@@ -237,8 +237,8 @@
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("MODIFIERS")
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RCONTROL))
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_CHAR(UCHAR_MAMEKEY(RCONTROL))
PORT_INCLUDE( m6847_artifacting )
INPUT_PORTS_END
|
|
|
|
Joined: Dec 1999
Posts: 1,180 Likes: 2
Very Senior Member
|
Very Senior Member
Joined: Dec 1999
Posts: 1,180 Likes: 2 |
I don't think adding the second PORT_CHAR for the Ctrl key is necessary since it already works in emulated keyboard mode, and multiple PORT_CHARs have a different semantic than PORT_CODE (the second one is to be used when a modifier key is held down).
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
Ensjo, did you get running "Aventura.wav" on the current MESS build ?
It is a Adventure in Basic so the "LOAD" command needed.
|
|
|
|
Joined: Jul 2009
Posts: 78
Member
|
OP
Member
Joined: Jul 2009
Posts: 78 |
Yes, Anna. I just pasted the source code into a .BAS file, then used BAS2BIN.EXE and BIN2WAV.EXE to make the .BIN and then the .WAV files, and then loaded it successfully with LOAD. (Note that, when the program automatically runs after loading, some PRINT comands don't work... [Yet another MC-1000 BUG! ] Stop the program with CTRL+C and then RUN it again.) Why, are you having any trouble?
|
|
|
|
Joined: Jul 2007
Posts: 4,625
Very Senior Member
|
Very Senior Member
Joined: Jul 2007
Posts: 4,625 |
I used the tools already to convert it to wav format. Thanks again for the tools. All other converted basic (LOAD) + assembler (TLOAD) programs are working, except "Aventura.wav". The tape file is loading but not running. Anyway, I will convert this file again for testing.
Last edited by Anna Wu; 10/28/10 09:00 PM.
|
|
|
2 members (Dorando, 1 invisible),
240
guests, and
1
robot. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,328
Posts122,128
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|