Previous 199869 Revisions Next

r33215 Wednesday 5th November, 2014 at 11:30:07 UTC by hap
added simon skillswitch, thanks to Simon from http://www.waitingforfriday.com for making a wiring diagram
[src/mess/drivers]merlin.c simon.c
[src/mess/layout]simon.lay

trunk/src/mess/drivers/merlin.c
r241726r241727
1212
1313
1414  TODO:
15  - accurate rc osc
1615  - accurate speaker levels (tone pitch sounds good though)
1716  - is the rom dump good?
1817
r241726r241727
2423
2524#include "merlin.lh"
2625
27// master clock is a single stage RC oscillator: R=27K, C=100pf
28// this is an approximation compared with recordings
29#define MERLIN_RC_CLOCK (355000)
26// master clock is a single stage RC oscillator: R=33K, C=100pf,
27// according to the TMS 1000 series data manual this is around 350kHz
28#define MERLIN_RC_CLOCK (350000)
3029
3130
3231class merlin_state : public driver_device
trunk/src/mess/drivers/simon.c
r241726r241727
55  Milton Bradley Simon
66 
77  Revision A hardware:
8  * TMS1000 (has internal ROM), SN75494 lamp driver
8  * TMS1000 (has internal ROM), DS75494 lamp driver
99 
1010  Newer revisions have a smaller 16-pin MB4850 chip instead of the TMS1000.
1111  This one has been decapped too, but we couldn't yet find the internal ROM.
r241726r241727
1313  Other games assumed to be on similar hardware:
1414  - Pocket Simon
1515  - Super Simon
16 
1716
18  TODO:
19  - accurate rc osc
20  - where's the skill switch?
21
2217***************************************************************************/
2318
2419#include "emu.h"
r241726r241727
2722
2823#include "simon.lh"
2924
30// master clock is a single stage RC oscillator: R=?, C=?
31// this is an approximation compared with old recordings
32#define SIMON_RC_CLOCK (330000)
25// master clock is a single stage RC oscillator: R=33K, C=100pf,
26// according to the TMS 1000 series data manual this is around 350kHz
27#define SIMON_RC_CLOCK (350000)
3328
3429
3530class simon_state : public driver_device
r241726r241727
3833   simon_state(const machine_config &mconfig, device_type type, const char *tag)
3934      : driver_device(mconfig, type, tag),
4035      m_maincpu(*this, "maincpu"),
41      m_button_matrix(*this, "R"),
36      m_button_matrix(*this, "IN"),
4237      m_speaker(*this, "speaker")
4338   { }
4439
4540   required_device<cpu_device> m_maincpu;
46   required_ioport_array<3> m_button_matrix;
41   required_ioport_array<4> m_button_matrix;
4742   required_device<speaker_sound_device> m_speaker;
4843
4944   UINT16 m_r;
r241726r241727
6762   UINT8 k = 0;
6863   
6964   // read selected button rows
70   for (int i = 0; i < 3; i++)
71      if (m_r & (1 << i))
65   for (int i = 0; i < 4; i++)
66   {
67      static int r[4] = { 0, 1, 2, 9 };
68      if (m_r & (1 << r[i]))
7269         k |= m_button_matrix[i]->read();
70   }
7371
7472   return k;
7573}
7674
7775WRITE16_MEMBER(simon_state::write_r)
7876{
79   // R4-R7: lamps, through 75494 IC
77   // R4-R8 go through an 75494 IC first:
78   // R4 -> 75494 IN6 -> green lamp
79   // R5 -> 75494 IN3 -> red lamp
80   // R6 -> 75494 IN5 -> yellow lamp
81   // R7 -> 75494 IN2 -> blue lamp
8082   for (int i = 0; i < 4; i++)
8183      output_set_lamp_value(i, data >> (4 + i) & 1);
8284   
83   // R8: speaker
85   // R8 -> 75494 IN0 -> speaker
8486   m_speaker->level_w(data >> 8 & 1);
8587
86   // R0-R2: input mux
88   // R0,R1,R2,R9: input mux
8789   // R3: GND
8890   // other bits: N/C
8991   m_r = data;
r241726r241727
103105***************************************************************************/
104106
105107static INPUT_PORTS_START( simon )
106   PORT_START("R.0")
108   PORT_START("IN.0")
107109   PORT_CONFNAME( 0x07, 0x02, "Game Select")
108110   PORT_CONFSETTING(    0x02, "1" )
109111   PORT_CONFSETTING(    0x01, "2" )
110112   PORT_CONFSETTING(    0x04, "3" )
111113   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
112114
113   PORT_START("R.1")
115   PORT_START("IN.1")
114116   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Green Button")
115117   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Red Button")
116118   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Yellow Button")
117119   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Blue Button")
118120
119   PORT_START("R.2")
121   PORT_START("IN.2")
120122   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Start")
121123   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Last")
122124   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Longest")
123125   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
126
127   PORT_START("IN.3")
128   PORT_CONFNAME( 0x0f, 0x01, "Skill Level")
129   PORT_CONFSETTING(    0x02, "1" )
130   PORT_CONFSETTING(    0x04, "2" )
131   PORT_CONFSETTING(    0x08, "3" )
132   PORT_CONFSETTING(    0x01, "4" )
124133INPUT_PORTS_END
125134
126135
r241726r241727
177186
178187ROM_START( simon )
179188   ROM_REGION( 0x0800, "maincpu", ROMREGION_ERASE00 )
180   ROM_LOAD( "simon.bin", 0x0000, 0x0400, CRC(9961719d) SHA1(35dddb018a8a2b31f377ab49c1f0cb76951b81c0) )
189   ROM_LOAD( "tms1000.u1", 0x0000, 0x0400, CRC(9961719d) SHA1(35dddb018a8a2b31f377ab49c1f0cb76951b81c0) )
181190ROM_END
182191
183192
trunk/src/mess/layout/simon.lay
r241726r241727
9393
9494   <!-- big lamps -->
9595
96      <bezel name="lamp0" element="lamp_g" inputtag="R.1" inputmask="0x01" >
96      <bezel name="lamp0" element="lamp_g" inputtag="IN.1" inputmask="0x01" >
9797         <bounds left="0" right="91" top="0" bottom="50" />
9898      </bezel>
99      <bezel name="lamp0" element="lamp_g" inputtag="R.1" inputmask="0x01" >
99      <bezel name="lamp0" element="lamp_g" inputtag="IN.1" inputmask="0x01" >
100100         <bounds left="0" right="50" top="0" bottom="91" />
101101      </bezel>
102      <bezel name="lamp0" element="lamp_g" inputtag="R.1" inputmask="0x01" >
102      <bezel name="lamp0" element="lamp_g" inputtag="IN.1" inputmask="0x01" >
103103         <bounds x="40" y="40" width="20" height="20" />
104104      </bezel>
105105
106      <bezel name="lamp1" element="lamp_r" inputtag="R.1" inputmask="0x02" >
106      <bezel name="lamp1" element="lamp_r" inputtag="IN.1" inputmask="0x02" >
107107         <bounds left="109" right="200" top="0" bottom="50" />
108108      </bezel>
109      <bezel name="lamp1" element="lamp_r" inputtag="R.1" inputmask="0x02" >
109      <bezel name="lamp1" element="lamp_r" inputtag="IN.1" inputmask="0x02" >
110110         <bounds left="150" right="200" top="0" bottom="91" />
111111      </bezel>
112      <bezel name="lamp1" element="lamp_r" inputtag="R.1" inputmask="0x02" >
112      <bezel name="lamp1" element="lamp_r" inputtag="IN.1" inputmask="0x02" >
113113         <bounds x="140" y="40" width="20" height="20" />
114114      </bezel>
115115
116      <bezel name="lamp2" element="lamp_y" inputtag="R.1" inputmask="0x04" >
116      <bezel name="lamp2" element="lamp_y" inputtag="IN.1" inputmask="0x04" >
117117         <bounds left="0" right="91" top="150" bottom="200" />
118118      </bezel>
119      <bezel name="lamp2" element="lamp_y" inputtag="R.1" inputmask="0x04" >
119      <bezel name="lamp2" element="lamp_y" inputtag="IN.1" inputmask="0x04" >
120120         <bounds left="0" right="50" top="109" bottom="200" />
121121      </bezel>
122      <bezel name="lamp2" element="lamp_y" inputtag="R.1" inputmask="0x04" >
122      <bezel name="lamp2" element="lamp_y" inputtag="IN.1" inputmask="0x04" >
123123         <bounds x="40" y="140" width="20" height="20" />
124124      </bezel>
125125
126      <bezel name="lamp3" element="lamp_b" inputtag="R.1" inputmask="0x08" >
126      <bezel name="lamp3" element="lamp_b" inputtag="IN.1" inputmask="0x08" >
127127         <bounds left="109" right="200" top="150" bottom="200" />
128128      </bezel>
129      <bezel name="lamp3" element="lamp_b" inputtag="R.1" inputmask="0x08" >
129      <bezel name="lamp3" element="lamp_b" inputtag="IN.1" inputmask="0x08" >
130130         <bounds left="150" right="200" top="109" bottom="200" />
131131      </bezel>
132      <bezel name="lamp3" element="lamp_b" inputtag="R.1" inputmask="0x08" >
132      <bezel name="lamp3" element="lamp_b" inputtag="IN.1" inputmask="0x08" >
133133         <bounds x="140" y="140" width="20" height="20" />
134134      </bezel>
135135
r241726r241727
157157      <bezel element="text_last">
158158         <bounds x="65" y="110" width="20" height="4" />
159159      </bezel>
160      <bezel element="button_y" inputtag="R.2" inputmask="0x02">
160      <bezel element="button_y" inputtag="IN.2" inputmask="0x02">
161161         <bounds x="71" y="115" width="8" height="8" />
162162      </bezel>
163163
164164      <bezel element="text_start">
165165         <bounds x="90" y="110" width="20" height="4" />
166166      </bezel>
167      <bezel element="button_r" inputtag="R.2" inputmask="0x01">
167      <bezel element="button_r" inputtag="IN.2" inputmask="0x01">
168168         <bounds x="96" y="115" width="8" height="8" />
169169      </bezel>
170170
171171      <bezel element="text_long">
172172         <bounds x="115" y="110" width="20" height="4" />
173173      </bezel>
174      <bezel element="button_y" inputtag="R.2" inputmask="0x04">
174      <bezel element="button_y" inputtag="IN.2" inputmask="0x04">
175175         <bounds x="121" y="115" width="8" height="8" />
176176      </bezel>
177177


Previous 199869 Revisions Next


© 1997-2024 The MAME Team