Previous Thread
Next Thread
Print Thread
Page 10 of 14 1 2 8 9 10 11 12 13 14
Joined: May 2009
Posts: 2,214
Likes: 382
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,214
Likes: 382
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.

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?

Ensjo #65185 10/19/10 06:11 PM
Joined: Apr 2004
Posts: 1,563
Likes: 12
J
Very Senior Member
Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,563
Likes: 12
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.

judge #65195 10/20/10 09:24 AM
Joined: Feb 2005
Posts: 449
C
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 ?

Joined: Mar 2001
Posts: 17,215
Likes: 234
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,215
Likes: 234
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.

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

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

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:

[Linked Image from ricbit.com]

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?

Joined: Mar 2001
Posts: 17,215
Likes: 234
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 17,215
Likes: 234
That diff looks fine. I'll apply it myself later if nobody else does.

Joined: Feb 2000
Posts: 219
Likes: 1
T
Senior Member
Offline
Senior Member
T
Joined: Feb 2000
Posts: 219
Likes: 1
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

Link Copied to Clipboard
Who's Online Now
1 members (MrBogi), 303 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,320
Posts121,929
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