Previous Thread
Next Thread
Print Thread
Page 11 of 14 1 2 9 10 11 12 13 14
Joined: Dec 1999
Posts: 1,180
Likes: 2
J
Very Senior Member
Offline
Very Senior Member
J
Joined: Dec 1999
Posts: 1,180
Likes: 2
Originally Posted by Ensjo
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
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,234
Likes: 259
The M6847 external rom change is submitted as #9449.

Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted by Justin
Originally Posted by Ensjo
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? confused

Originally Posted by Justin
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
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted by R. Belmont
The M6847 external rom change is submitted as #9449.

Seen it. Thank you, Belmont!

Joined: Dec 1999
Posts: 1,180
Likes: 2
J
Very Senior Member
Offline
Very Senior Member
J
Joined: Dec 1999
Posts: 1,180
Likes: 2
Originally Posted by Ensjo
Why doesn't SHIFT have PORT_CHAR(UCHAR_MAMEKEY(LSHIFT))? And, more importantly... What's the difference? confused

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.)

Originally Posted by Ensjo
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
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted by Justin
the PORT_CODE changes should be enough.
Done. SVN diff:
Code

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
J
Very Senior Member
Offline
Very Senior Member
J
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).

Ensjo #65306 10/28/10 05:07 PM
Joined: Jul 2007
Posts: 4,625
A
Very Senior Member
Offline
Very Senior Member
A
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.

Anna Wu #65309 10/28/10 07:47 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
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! smile ] Stop the program with CTRL+C and then RUN it again.)

Why, are you having any trouble?

Ensjo #65310 10/28/10 08:58 PM
Joined: Jul 2007
Posts: 4,625
A
Very Senior Member
Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
I used the tools already to convert it to wav format.
Thanks again for the tools. smile

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.
Page 11 of 14 1 2 9 10 11 12 13 14

Link Copied to Clipboard
Who's Online Now
2 members (Dorando, 1 invisible), 240 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,328
Posts122,128
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com