Previous Thread
Next Thread
Print Thread
Page 10 of 14 1 2 8 9 10 11 12 13 14
Re: MC-1000 & NE555 [Re: R. Belmont] #65176 10/19/10 03:12 PM
Joined: May 2009
Posts: 1,822
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,822
Originally Posted By R. Belmont
For the two-timers solution you'd start the second timer in the service routine for the first one. It's a fairly common pattern in MAME/MESS.


To me, this seems like a good use case for some sort of 555 device. It would manage two timers and one output line, generating a fixed PWM pulse train. Simple to implement, but given how commonplace the 555 was, it might prove useful.

Re: MC-1000 & NE555 [Re: R. Belmont] #65177 10/19/10 03:15 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Hey, Belmont. Could you give an example of a MESS machine that implements this?

Re: MC-1000 & NE555 [Re: Ensjo] #65185 10/19/10 06:11 PM
Joined: Apr 2004
Posts: 1,554
J
judge Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,554
There is NE555 stuff in the discrete sound emulation. I don't know how reusable that is.

See src/emu/sound/discrete.h and src/emu/sound/disc_dev.c.

Re: MC-1000 & NE555 [Re: judge] #65195 10/20/10 09:24 AM
Joined: Feb 2005
Posts: 449
C
Curt Coder Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2005
Posts: 449
I don't think the discrete system supports output via WRITE_LINE_DEVICE_HANDLER ?

Re: MC-1000 & NE555 [Re: Curt Coder] #65200 10/20/10 12:21 PM
Joined: Mar 2001
Posts: 16,389
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,389
Also, it's difficult to sync audio devices with the emulation. I just had to add a timer to the ASC that does nothing but stream_update() to get the latency on the "buffer half empty" IRQ to a reasonable level.

Re: CCE MC-1000 [Re: Ensjo] #65258 10/25/10 02:20 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
FINALLY! I got a MacBook Pro, installed XCode, svn'd down MESS source code and managed to make a functional change.
Originally Posted By Ensjo
MC-1000 doesn't provide the external ROM that MC6847 may use to get the characters bytes when it is in "External Alphanumerics" mode (AG=0, AS=0, INTEXT=1). Currently the emulation doesn't provide a cfg.get_char_rom at VIDEO_START, and thus it works as if a byte 0x00 is read. In the actual machine, though, MC6847 puts the character code byte into the wires trying to reach the external character ROM, and then reads the wires again for the pattern... but it gets the very same byte that it put there, i.e., the ASCII code of the character.

I think you could add something like...

Code:
UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch,int line)
{
   return ch;
}

Then @ VIDEO_START:
Code:
cfg.get_char_rom = mc1000_get_char_rom;

The result is not usefull at all, as you can see by accessing this MC-1000 Java emulator and typing
Code:
POKE 245,33

but that's how it works, so here you have it.

In fact, there was no need for VIDEO_START. I found another machine that used external character ROM and found a solution. Under MACHINE_CONFIG_START I added:
Code:
	MDRV_MC6847_CHAR_ROM(mc1000_get_char_rom)

And voilà. smile
I'll see if "svn diff" can really send my changes for approval now...

Re: CCE MC-1000 [Re: Ensjo] #65259 10/25/10 04:28 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Well, according to Duke @ the Shout Box,
Quote:
you need to capture the output [of "svn diff"] and send it to nathan, who will then apply it (or not)

see mess.org contacts

And so I did. Since this is my first change submission, I think it's better to document it in case I'm doing something wrong. Here is the diff:
Code:
Index: src/mess/drivers/mc1000.c
===================================================================
--- src/mess/drivers/mc1000.c	(revision 9441)
+++ src/mess/drivers/mc1000.c	(working copy)
@@ -272,6 +272,11 @@
 	return mc6847_update(state->mc6847, bitmap, cliprect);
 }
 
+UINT8 mc1000_get_char_rom(running_machine *machine, UINT8 ch,int line)
+{
+	return ch;
+}
+
 /* AY-3-8910 Interface */
 
 static WRITE8_DEVICE_HANDLER( keylatch_w )
@@ -438,6 +443,7 @@
 
     MDRV_MC6847_ADD(MC6847_TAG, mc1000_mc6847_intf)
     MDRV_MC6847_TYPE(M6847_VERSION_ORIGINAL_NTSC)
+	MDRV_MC6847_CHAR_ROM(mc1000_get_char_rom)
 
 	/* sound hardware */
 	MDRV_SPEAKER_STANDARD_MONO("mono")

MC-1000 right & left SHIFT & CONTROL [Re: Ensjo] #65260 10/25/10 07:05 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
MC-1000's keyboard has a single SHIFT key to the left, and a single CTRL key to the right:



The emulation replicates this, recognizing only LEFT SHIFT and RIGHT CONTROL keys from a PC keyboard.

This annoyed me a little: From time to time I press the "wrong" CONTROL or SHIFT key.

Even worse: I bought a MacBook Pro 33", and it has ONLY ONE CONTROL KEY, to the LEFT. I tried to stop MESS running a BASIC program with CTRL-C and couldn't do it.

Since the emulation has nothing mapped to PC's RIGHT SHIFT and LEFT CONTROL keys, it would be more comfortable to have both left and right keys map to MC-1000's single keys.

The emulation currently has:
Code:
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))

How can we have both SHIFT/CTRL 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?

Re: MC-1000 right & left SHIFT & CONTROL [Re: Ensjo] #65261 10/25/10 07:15 PM
Joined: Mar 2001
Posts: 16,389
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,389
That diff looks fine. I'll apply it myself later if nobody else does.

Re: MC-1000 right & left SHIFT & CONTROL [Re: Ensjo] #65262 10/25/10 07:18 PM
Joined: Feb 2000
Posts: 207
T
tlindner Offline
Senior Member
Offline
Senior Member
T
Joined: Feb 2000
Posts: 207
Originally Posted By Ensjo
Even worse: I bought a MacBook Pro 33"


Sound pretty nice to me! smile


tim lindner
tlindner@macmess.org
Page 10 of 14 1 2 8 9 10 11 12 13 14

Who's Online Now
0 registered members (), 207 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,721
Posts114,623
Members4,873
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3