MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Analog emulation
#213090 - 02/02/10 07:14 PM


I'm at the point where I need some hints or help from others who are more acquainted with analog circuits than I am. It's been over 20 years that I heard "Elektrotechnik" at a high school and many details are lost to beers and what not ;-P

The only thing more or less clear to me is that pullup resistors on TTL inputs can be seen as if they weren't there.

How I should treat a capacitor is already a little more difficult. Should I care at all? Probably, because a capacitor while being charged is conductive.

Diodes are conductive for one polarity, depending on how anode and cathode are connected to other parts.

Now comes a difficult part: a network of transistors, resistors, diodes and capacitors. Would it be feasible at all to try to evaluate such a network's digital equivalent, if there is any?

The other Pong emulations treated that specific section of the schematics as being non-existent (mine) or as a special black-box digital circuit (Dan Boris'). I would, however, prefer to try to emulate such a circuit at the simplest level, using only two voltage levels of 0V and 5V and just time delays due to capacitor values.

Is there someone out there who would be able to tell me how to tackle this job? That'd be fine, because otherwise I see no way out but using replacement black-box function generators in the schematics.

Juergen

The latest, corrected schematics:
http://img2.imagetitan.com/img.php?image=33_pong858.png



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: pullmoll]
#213244 - 02/04/10 10:29 AM


I see :-P



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4462
Loc: Melbourne, Australia
Send PM


Re: Analog emulation new [Re: pullmoll]
#213247 - 02/04/10 11:30 AM


It's all about solving differential equations. Does [url=http://en.wikipedia.org/wiki/Runge–Kutta_methods
]Runge-Kutta[/url] mean anything to you? If it doesn't, you probably need to study some more.

> How I should treat a capacitor is already a little more difficult. Should I care at
> all? Probably, because a capacitor while being charged is conductive.

Not just that, but you need to model the effective impedance of whatever's driving it. TTL circuits have far lower output impedance when the output is low than when it's high. Classic 4000 series CMOS outputs' current capacity varies with the input state. You also have to consider the characteristics of the input it's connected to. TTL inputs sense current flow - pulling them down switches on the multi-emitter transistor. CMOS inputs sense voltage, and look like a small capacitor to the driving circuit.

> Diodes are conductive for one polarity, depending on how anode and cathode are
> connected to other parts.

No, they allow a small forward current to flow up to the bias voltage, at which point they allow far more current to flow. They allow a smaller reverse current to flow up to the Zener voltage, at which point they allow a much larger current to flow.

> Now comes a difficult part: a network of transistors, resistors, diodes and
> capacitors. Would it be feasible at all to try to evaluate such a network's digital
> equivalent, if there is any?

No, it wouldn't. You need to be able to deduce the differential equations for the voltages and currents, and solve them using numeric methods.

> The other Pong emulations treated that specific section of the schematics as being
> non-existent (mine) or as a special black-box digital circuit (Dan Boris'). I would,
> however, prefer to try to emulate such a circuit at the simplest level, using only
> two voltage levels of 0V and 5V and just time delays due to capacitor values.

Time delays won't cut it - you either black box it, or simulate it properly.

> Is there someone out there who would be able to tell me how to tackle this job?
> That'd be fine, because otherwise I see no way out but using replacement black-box
> function generators in the schematics.

Seriously, go with black boxes, and consider studying circuit theory if you want to move to a more realistic model in the future.



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: Vas Crabb]
#213422 - 02/06/10 12:45 AM


> It's all about solving differential equations. Does Runge-Kutta mean anything to you?
> If it doesn't, you probably need to study some more.

Yes, I heard about it, but it's all too long ago to remember the details.

> Not just that, but you need to model the effective impedance of whatever's driving
> it. TTL circuits have far lower output impedance when the output is low than when
> it's high. Classic 4000 series CMOS outputs' current capacity varies with the input
> state. You also have to consider the characteristics of the input it's connected to.
> TTL inputs sense current flow - pulling them down switches on the multi-emitter
> transistor. CMOS inputs sense voltage, and look like a small capacitor to the driving
> circuit.

Well, first off CMOS isn't in my scope for now. Simulating with real values for voltages and currents isn't either. All I can do is make the most primitive assumption to how a capacitor acts at a specific time, and that is it's either conductive or it isn't.

I know you say that's wrong, and I know that myself, but I can't do much about it :-)

> > Diodes are conductive for one polarity, depending on how anode and cathode are
> > connected to other parts.
>
> No, they allow a small forward current to flow up to the bias voltage, at which point
> they allow far more current to flow. They allow a smaller reverse current to flow up
> to the Zener voltage, at which point they allow a much larger current to flow.

Yep, I remember that fairly well. However, it's the same case here: I have no voltages other than 0V and +5V and thus I don't calculate anything for a diode. I want to assume that a diode with anode tied to +5V passes the +5V to the part connected to the cathode. Or the other way round: the cathode tied to ground is passed to the part connected to the anode.

[networks]
> No, it wouldn't. You need to be able to deduce the differential equations for the
> voltages and currents, and solve them using numeric methods.

...if I want a SPICE like simulation of the circuit, yes.

[capacitors]
> Time delays won't cut it - you either black box it, or simulate it properly.

The disadvantage of black-boxing is that the schematics including any black-box doesn't match the original. That means I will have to go with 2 schematics per game: original and "digitalized".

> Seriously, go with black boxes, and consider studying circuit theory if you want to
> move to a more realistic model in the future.

I doubt I am able to do that. It would need a companion author who's willing to care about the analog part. I can create the editing functions and network lists for any format he'd desire, but I can't grok circuit theory in a moderate time frame.

Thanks for your comment!

Juergen



couriersud
Reged: 03/27/07
Posts: 214
Send PM


Re: Analog emulation new [Re: pullmoll]
#213423 - 02/06/10 12:55 AM


The only parts of the schematics I could identify where analog components would make a difference are:

a) Paddle signals

These are generated by 555 circuits in a modified monostable configuration. Looks like a PWM circuit. The 555 is triggered by the 256V signal. So the output is a signal at 256V frequency with pulse width most likely proportional to the paddle position. The circuit can be calibrated with a variable resistor. The pulse width is about 8 ms (without paddle connected) , 256V at 60Hz refresh occurs every 16 ms. ==> Pulse width should between (guess!) 1ms and 15ms.
I'd recommend to use a black box. Emulating this is tricky (diode between THR and DIS) and the paddle connected to control voltage. I would use Switcher CAD III to get an idea what you get.

b) Transistors (single and darlington)

This may be related to reset. However the darlington (the two transistors where C is connected to B of the next) circuit does not look right. It seems to be missing a resistor to +5V.

BTW: The coin circuit does not look right as well. I looks like some resistors are missing.

Regards,

Couriersud



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: couriersud]
#213424 - 02/06/10 01:06 AM


Thanks for your description. Yes, the 555s were already handled by faking a variable resistor at pin 6 (THR) instead of pin 5 (CV). The result is the same: the output pulse time varies between two values.

The /SRST section with the 3 transistors is what needs to be black boxed. You are right: R20 (220) was tied to the wrong end. It connects to the collector of Q3.

Juergen



couriersud
Reged: 03/27/07
Posts: 214
Send PM


Re: Analog emulation new [Re: pullmoll]
#213427 - 02/06/10 01:15 AM


What signal is than connected to the basis of Q3?

Regarding the paddles: Given the input nature of the circuit I would keep the existing black box solution. Anything else IMHO is a overkill. The circuit is not exact by design. If it would have been, there would be no variable resistor for calibration.



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: couriersud]
#213428 - 02/06/10 01:23 AM


> What signal is than connected to the basis of Q3?

It's an antenna input. The circuit is used to detect manipulation using things like a piezo crystal from a lighter to confuse the circuit.

We actually did this many years ago with a Phoenix cabinet.

> Regarding the paddles: Given the input nature of the circuit I would keep the
> existing black box solution. Anything else IMHO is a overkill. The circuit is not
> exact by design. If it would have been, there would be no variable resistor for
> calibration.

Yes, that's what I had in mind anyway. The model of the 555 is only capable of simulating the monostable mode anyway. If any circuit with a 555 as clock generator comes along, I'd have to take some measure to distinguish them.



couriersud
Reged: 03/27/07
Posts: 214
Send PM


Re: Analog emulation new [Re: pullmoll]
#213432 - 02/06/10 02:01 AM


In this case you have a black box with two inputs and one output:

Input 1: Antenna (analog)
Input 2: STOP G
Output: /SRST

Case 1: Stop G low ==> E4 high

Input 1 is amplified by the darlington. if input1 > threshold ==> /SRST low, else (normal operation) /SRST high

Case 2: Stop G high ==> E4 low

==> /SRST high



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: couriersud]
#213448 - 02/06/10 05:08 AM


> In this case you have a black box with two inputs and one output:

I think the coin switch plays a role, too. And I think you haven't seen it in the schematics, because in the one I posted some time ago there was a connection missing.

Here's the most recent one:
http://img2.imagetitan.com/img.php?image=33_pong355.png



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: Analog emulation new [Re: pullmoll]
#213449 - 02/06/10 05:09 AM


> > What signal is than connected to the basis of Q3?
>
> It's an antenna input. The circuit is used to detect manipulation using things like a
> piezo crystal from a lighter to confuse the circuit.
>
> We actually did this many years ago with a Phoenix cabinet.

Hah! Not to imitate gregf or anything, but that reminds me of an old interesting thread on MAME.Net.

- Stiletto



Moose
Don't make me assume my ultimate form!
Reged: 05/03/04
Posts: 1483
Loc: Outback, Australia
Send PM


Re: Analog emulation new [Re: pullmoll]
#213450 - 02/06/10 05:17 AM


> > It's all about solving differential equations. Does Runge-Kutta mean anything to
> you?
> > If it doesn't, you probably need to study some more.

If you need help, I might be able to offer some. Back in my last year of my Mathematics degree (~23 years ago), I developed my own predictor-corrector method for solving differential equations in much the same way that Runge-Kutta, Milne-Simpson, etc do, and then wrote Fortran and Pascal programs to test the hell out of it and compare the results against 6 or so other methods. Alas, like I say, this was 23 years ago, so I am now very rusty. But, if you need help solving any differential equations, let me know and I will do my best.

Oh, one thing: if you need accurate results, don't rely on Runge-Kutta, Milne-Simpson, or any of the other common methods like these, they tend produce terribly inaccurate results. (My 100+ test equations years ago proved this).

Edited by Moose (02/06/10 05:20 AM)



Moose



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: Moose]
#213456 - 02/06/10 05:21 AM


> If you need help, I might be able to offer some. Back in my last year of my
> Mathematics degree (~23 years ago), I developed my own predictor-corrector method for
> solving differential equations in much the same way that Runge-Kutta, Milne-Simpson,
> etc do, and then wrote Fortran and Pascal programs to test the hell out of it and
> compare the results against 6 or so other methods. Alas, like I say, this was 23
> years ago, so I am now very rusty. But, if you need help solving any differential
> equations, let me know and I will do my best.

Wow. Your method/code would certainly help, once I knew how to transform a netlist into differential equations. That is your contribution would be step #2 and I'm already clueless about step #1 ;-)

I have the (very) vague idea that every element of a circuit would have to be described with its resistance, capacitive reactance and inductive reactance, i.e. 3 characteristics, and then each knot in a network would have at least two such characteristics influencing each other. I may be totally wrong here, though.

Edited by pullmoll (02/06/10 05:26 AM)



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: pullmoll]
#213458 - 02/06/10 05:33 AM


...meanwhile one can watch the digital signal changes inside the circuit editor. Hit F11 to run the simulation. It's quite interesting, despite the fact that there are some signals missing from the updates for an yet unknown reason.

http://pmbits.ath.cx/sedate/sedit.exe
http://pmbits.ath.cx/sedate/parts.xml
http://pmbits.ath.cx/sedate/sheet1.xml



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: Analog emulation new [Re: pullmoll]
#213460 - 02/06/10 05:41 AM


> ...meanwhile one can watch the digital signal changes inside the circuit editor. Hit
> F11 to run the simulation. It's quite interesting, despite the fact that there are
> some signals missing from the updates for an yet unknown reason.
>
> http://pmbits.ath.cx/sedate/sedit.exe
> http://pmbits.ath.cx/sedate/parts.xml
> http://pmbits.ath.cx/sedate/sheet1.xml

!!!

Congratulations!

- Stiletto



Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM


Re: Analog emulation new [Re: Stiletto]
#213470 - 02/06/10 07:48 AM Attachment: fan.jpg 10 KB (2 downloads)


> >The circuit is used to detect manipulation using things like a
> > piezo crystal from a lighter to confuse the circuit.
> >
> > We actually did this many years ago with a Phoenix cabinet.
>
> Hah! Not to imitate gregf or anything, but that reminds me of an old interesting
> thread on MAME.Net.

You mean the thread where people talked about all the different tricks to get free credits!

btw someone should charter a helicopter and fly Derrick in from the Bahamas..

Remember this?

S

[ATTACHED IMAGE]

Attachment



couriersud
Reged: 03/27/07
Posts: 214
Send PM


Re: Analog emulation new [Re: pullmoll]
#213480 - 02/06/10 04:44 PM


> > In this case you have a black box with two inputs and one output:
>
> I think the coin switch plays a role, too. And I think you haven't seen it in the
> schematics, because in the one I posted some time ago there was a connection missing.
>
> Here's the most recent one:
> http://img2.imagetitan.com/img.php?image=33_pong355.png

The coin switch looks wrong. With this circuit you would be able to connect a TTL output directly to GND:

Unrelated to burning TTL circuits alive: I really do not see any necessity here to solve any differential equations in the complex plane (Current, Voltage). If this would be anywhere near economically feasible it would be in the mame discrete emulation by now.



pullmoll
frood
Reged: 12/12/09
Posts: 59
Loc: Germany
Send PM


Re: Analog emulation new [Re: couriersud]
#213486 - 02/06/10 06:39 PM


> The coin switch looks wrong. With this circuit you would be able to connect a TTL
> output directly to GND:

The coin switch is right. It's quite common to use this setup of two inverters to kill noise while opening or closing a switch. The left inverter has about 14 ns of short circuit before it goes low on the output, driven by the right inverter's high ouput.

> Unrelated to burning TTL circuits alive: I really do not see any necessity here to
> solve any differential equations in the complex plane (Current, Voltage). If this
> would be anywhere near economically feasible it would be in the mame discrete
> emulation by now.

Ok.



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


last bump. *nt* new [Re: pullmoll]
#243112 - 01/08/11 08:12 PM


> > The coin switch looks wrong. With this circuit you would be able to connect a TTL
> > output directly to GND:
>
> The coin switch is right. It's quite common to use this setup of two inverters to
> kill noise while opening or closing a switch. The left inverter has about 14 ns of
> short circuit before it goes low on the output, driven by the right inverter's high
> ouput.
>
> > Unrelated to burning TTL circuits alive: I really do not see any necessity here to
> > solve any differential equations in the complex plane (Current, Voltage). If this
> > would be anywhere near economically feasible it would be in the mame discrete
> > emulation by now.
>
> Ok.



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: last bump. *nt* new [Re: Stiletto]
#280750 - 03/28/12 05:59 PM


> > > The coin switch looks wrong. With this circuit you would be able to connect a TTL
> > > output directly to GND:
> >
> > The coin switch is right. It's quite common to use this setup of two inverters to
> > kill noise while opening or closing a switch. The left inverter has about 14 ns of
> > short circuit before it goes low on the output, driven by the right inverter's high
> > ouput.
> >
> > > Unrelated to burning TTL circuits alive: I really do not see any necessity here
> to
> > > solve any differential equations in the complex plane (Current, Voltage). If this
> > > would be anywhere near economically feasible it would be in the mame discrete
> > > emulation by now.
> >
> > Ok.



mogli
MAME Fan
Reged: 01/26/08
Posts: 1956
Send PM


Why is this getting bumped? (nt) new [Re: Stiletto]
#280988 - 03/30/12 08:29 PM





Consider it high comedy....sincere tragedy....whatever...don't take it personally.

The Culture




TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: Why is this getting bumped? new [Re: mogli]
#280993 - 03/30/12 08:48 PM


Important information and this forum (up until recently) erases all forum messages past 1 year. Now, it's said to be 3 years - so bumping is not such an issue for the time being



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: Why is this getting bumped? new [Re: Tafoid]
#281000 - 03/30/12 10:50 PM


> Important information and this forum (up until recently) erases all forum messages
> past 1 year. Now, it's said to be 3 years - so bumping is not such an issue for the
> time being

Yes, thread retention (up until I asked Smitdogg if it was still the case the other day) was 1 year from most recent reply.

... and I was too lazy to be like gregf and archive the thread. I'll get around to it soon...

- Stiletto



TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: Why is this getting bumped? new [Re: Stiletto]
#281002 - 03/30/12 10:56 PM


> > Important information and this forum (up until recently) erases all forum messages
> > past 1 year. Now, it's said to be 3 years - so bumping is not such an issue for the
> > time being
>
> Yes, thread retention (up until I asked Smitdogg if it was still the case the other
> day) was 1 year from most recent reply.
>
> ... and I was too lazy to be like gregf and archive the thread. I'll get around to it
> soon...
>
> - Stiletto

That's funny.. I hit Italie up with a request when I bumped the first TLL emulation thread (doing research for the discrete stuff). Two voices are strong!



TrevEB
Brokering peace between the collectors and the Mame Community
Reged: 03/11/05
Posts: 770
Loc: Oakland, CA
Send PM


Re: Why is this getting bumped? new [Re: Tafoid]
#281407 - 04/03/12 09:44 PM


Wish Pullmoll would come back
He was on to something great.
Come back to us Pullmoll. We miss you.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 289 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3441