Previous 199869 Revisions Next

r31722 Thursday 21st August, 2014 at 02:14:05 UTC by Robbbert
jeutel.c : some work
[src/mame/drivers]jeutel.c
[src/mame/layout]jeutel.lay

trunk/src/mame/layout/jeutel.lay
r31721r31722
146146      <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
147147      <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
148148      <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel>
149      <bezel name="led0" element="red_led">
150         <bounds left="10" right="25" top="360" bottom="375" /></bezel>
151149   </view>
152150</mamelayout>
trunk/src/mame/drivers/jeutel.c
r31721r31722
44  Jeutel
55
66  There are at least 7 machines from this manufacturer. Unable to find anything
7  technical at all... so will be using PinMAME as the reference.
7  technical at all... so used PinMAME as the reference. Really need a proper
8  schematic though.
89
910ToDo:
1011- Everything!
r31721r31722
2526   jeutel_state(const machine_config &mconfig, device_type type, const char *tag)
2627      : genpin_class(mconfig, type, tag)
2728      , m_maincpu(*this, "maincpu")
29      , m_cpu2(*this, "cpu2")
30      , m_tms(*this, "tms")
2831   { }
2932
3033   DECLARE_DRIVER_INIT(jeutel);
34   DECLARE_READ8_MEMBER(portb_r);
35   DECLARE_WRITE8_MEMBER(porta_w);
36   DECLARE_WRITE8_MEMBER(ppi0a_w);
37   DECLARE_WRITE8_MEMBER(ppi0b_w);
38   DECLARE_WRITE8_MEMBER(sndcmd_w);
39   TIMER_DEVICE_CALLBACK_MEMBER(timer_a);
3140private:
41   bool m_timer_a;
42   UINT8 m_sndcmd;
43   UINT8 m_digit;
3244   virtual void machine_reset();
3345   required_device<cpu_device> m_maincpu;
46   required_device<cpu_device> m_cpu2;
47   required_device<tms5110_device> m_tms;
3448};
3549
3650
3751static ADDRESS_MAP_START( jeutel_map, AS_PROGRAM, 8, jeutel_state )
3852   ADDRESS_MAP_UNMAP_HIGH
39   AM_RANGE(0x0000, 0x1fff) AM_ROM
53   AM_RANGE(0x0000, 0x1fff) AM_ROM AM_REGION("roms", 0)
4054   AM_RANGE(0xc000, 0xc3ff) AM_RAM AM_SHARE("shared")
4155   AM_RANGE(0xc400, 0xc7ff) AM_RAM
4256   AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write)
r31721r31722
4458
4559static ADDRESS_MAP_START( jeutel_cpu2, AS_PROGRAM, 8, jeutel_state )
4660   ADDRESS_MAP_UNMAP_HIGH
47   AM_RANGE(0x0000, 0x0fff) AM_ROM
61   AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("roms", 0x2000)
4862   AM_RANGE(0x2000, 0x2003) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
4963   AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
50   AM_RANGE(0x4000, 0x4000) AM_WRITENOP
64   AM_RANGE(0x4000, 0x4000) AM_WRITENOP // writes 12 here many times
5165   AM_RANGE(0x8000, 0x83ff) AM_RAM
5266   AM_RANGE(0xc000, 0xc3ff) AM_RAM AM_SHARE("shared")
5367ADDRESS_MAP_END
5468
5569static ADDRESS_MAP_START( jeutel_cpu3, AS_PROGRAM, 8, jeutel_state )
5670   ADDRESS_MAP_UNMAP_HIGH
57   AM_RANGE(0x0000, 0x2fff) AM_ROM
71   AM_RANGE(0x0000, 0x0fff) AM_ROM AM_REGION("roms", 0x3000)
5872   AM_RANGE(0x4000, 0x43ff) AM_RAM
73   AM_RANGE(0x8000, 0x8000) AM_WRITE(sndcmd_w)
5974ADDRESS_MAP_END
6075
6176static ADDRESS_MAP_START( jeutel_cpu3_io, AS_IO, 8, jeutel_state )
r31721r31722
6883static INPUT_PORTS_START( jeutel )
6984INPUT_PORTS_END
7085
86WRITE8_MEMBER( jeutel_state::sndcmd_w )
87{
88   m_sndcmd = data;
89}
90
91READ8_MEMBER( jeutel_state::portb_r )
92{
93   return m_sndcmd;
94}
95
96WRITE8_MEMBER( jeutel_state::porta_w )
97{
98   if ((data & 0xf0) == 0xf0)
99   {
100      m_tms->ctl_w(space, offset, TMS5110_CMD_RESET);
101      m_tms->pdc_w(1);
102      m_tms->pdc_w(0);
103   }
104   else
105   if ((data & 0xf0) == 0xd0)
106   {
107      m_tms->ctl_w(space, offset, TMS5110_CMD_SPEAK);
108      m_tms->pdc_w(1);
109      m_tms->pdc_w(0);
110   }
111}
112
113WRITE8_MEMBER( jeutel_state::ppi0a_w )
114{
115   UINT16 segment;
116   bool blank = !BIT(data, 7);
117
118   if BIT(data, 6)
119   {
120      output_set_digit_value(40+m_digit, 0x3f); //patterns[data&15];
121      return;
122   }
123   switch (data & 0x0f)
124   {
125      case 0x0a: // letter T
126         segment = 0x301;
127         break;
128      case 0x0b: // letter E
129         segment = 0x79;
130         break;
131      case 0x0c: // letter L
132         segment = 0x38;
133         break;
134      case 0x0d: // letter U
135         segment = 0x3e;
136         break;
137      case 0x0e: // letter J
138         segment = 0x1e;
139         break;
140      default:
141         segment = 0x3f; //patterns[data & 0x0f];
142   }
143   if BIT(data, 4)
144   {
145      output_set_digit_value(m_digit, (blank) ? 0 : segment);
146   }
147   else
148   if BIT(data, 5)
149   {
150      output_set_digit_value(20+m_digit, (blank) ? 0 : segment);
151   }
152}
153
154WRITE8_MEMBER( jeutel_state::ppi0b_w )
155{
156   m_digit = data & 0x0f;
157   if (m_digit > 7)
158      m_digit+=2;
159}
160
161
71162void jeutel_state::machine_reset()
72163{
164   m_timer_a = 0;
165   m_sndcmd = 0;
166   m_digit = 0;
73167}
74168
169TIMER_DEVICE_CALLBACK_MEMBER( jeutel_state::timer_a )
170{
171   m_timer_a ^= 1;
172   m_cpu2->set_input_line(0, (m_timer_a) ? ASSERT_LINE : CLEAR_LINE);
173   if (m_cpu2->state_int(Z80_HALT))
174      m_cpu2->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
175}
176
75177DRIVER_INIT_MEMBER( jeutel_state, jeutel )
76178{
77179}
r31721r31722
96198   MCFG_SPEAKER_STANDARD_MONO("mono")
97199
98200   MCFG_SOUND_ADD("aysnd", AY8910, 639450)
99   //MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
100   //MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
201   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(jeutel_state,porta_w))
202   MCFG_AY8910_PORT_B_READ_CB(READ8(jeutel_state,portb_r))
101203   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
102204
103205   MCFG_SOUND_ADD("tms", TMS5110A, 640000)
r31721r31722
108210   /* Devices */
109211   MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
110212   //MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
111   //MCFG_I8255_OUT_PORTA_CB(WRITE8(jeutel_state, port_C_w))
213   MCFG_I8255_OUT_PORTA_CB(WRITE8(jeutel_state, ppi0a_w))
112214   //MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
113   //MCFG_I8255_OUT_PORTB_CB(WRITE8(jeutel_state, port_C_w))
215   MCFG_I8255_OUT_PORTB_CB(WRITE8(jeutel_state, ppi0b_w))
114216   //MCFG_I8255_IN_PORTC_CB(IOPORT("EXTRA"))
115   //MCFG_I8255_OUT_PORTC_CB(WRITE8(jeutel_state, port_C_w))
217   //MCFG_I8255_OUT_PORTC_CB(WRITE8(jeutel_state, ppi0c_w))
116218
117219   MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
118220   //MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
119   //MCFG_I8255_OUT_PORTA_CB(WRITE8(jeutel_state, port_C_w))
221   //MCFG_I8255_OUT_PORTA_CB(WRITE8(jeutel_state, ppi1a_w))
120222   //MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
121   //MCFG_I8255_OUT_PORTB_CB(WRITE8(jeutel_state, port_C_w))
223   //MCFG_I8255_OUT_PORTB_CB(WRITE8(jeutel_state, ppi1b_w))
122224   //MCFG_I8255_IN_PORTC_CB(IOPORT("EXTRA"))
123   //MCFG_I8255_OUT_PORTC_CB(WRITE8(jeutel_state, port_C_w))
225   //MCFG_I8255_OUT_PORTC_CB(WRITE8(jeutel_state, ppi1c_w))
124226
125227   MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0)
126228   //MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
127   //MCFG_I8255_OUT_PORTA_CB(WRITE8(jeutel_state, port_C_w))
229   //MCFG_I8255_OUT_PORTA_CB(WRITE8(jeutel_state, ppi2a_w))
128230   //MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
129   //MCFG_I8255_OUT_PORTB_CB(WRITE8(jeutel_state, port_C_w))
231   //MCFG_I8255_OUT_PORTB_CB(WRITE8(jeutel_state, ppi2b_w))
130232   //MCFG_I8255_IN_PORTC_CB(IOPORT("EXTRA"))
131   //MCFG_I8255_OUT_PORTC_CB(WRITE8(jeutel_state, port_C_w))
233   //MCFG_I8255_OUT_PORTC_CB(WRITE8(jeutel_state, ppi2c_w))
132234
235   MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_a", jeutel_state, timer_a, attotime::from_hz(120))
133236MACHINE_CONFIG_END
134237
135238/*--------------------------------
136239/ Le King
137240/-------------------------------*/
138241ROM_START(leking)
139   ROM_REGION(0x10000, "maincpu", 0)
140   ROM_LOAD("game-m.bin", 0x0000, 0x2000, CRC(4b66517a) SHA1(1939ea78932d469a16441507bb90b032c5f77b1e))
242   ROM_REGION(0x4000, "roms", 0)
243   ROM_LOAD("game-m.bin",  0x0000, 0x2000, CRC(4b66517a) SHA1(1939ea78932d469a16441507bb90b032c5f77b1e))
244   ROM_LOAD("game-v.bin",  0x2000, 0x1000, CRC(cbbc8b55) SHA1(4fe150fa3b565e5618896c0af9d51713b381ed88))
245   ROM_LOAD("sound-v.bin", 0x3000, 0x1000, CRC(36130e7b) SHA1(d9b66d43b55272579b3972005355b8a18ce6b4a9))
141246
142   ROM_REGION(0x10000, "cpu2", 0)
143   ROM_LOAD("game-v.bin", 0x0000, 0x1000, CRC(cbbc8b55) SHA1(4fe150fa3b565e5618896c0af9d51713b381ed88))
144
145   ROM_REGION(0x10000, "cpu3", 0)
146   ROM_LOAD("sound-v.bin", 0x0000, 0x1000, CRC(36130e7b) SHA1(d9b66d43b55272579b3972005355b8a18ce6b4a9))
147   ROM_LOAD("sound-p.bin", 0x1000, 0x2000, BAD_DUMP CRC(97eedd6c) SHA1(3bb8e5d32417c49ef97cbe407f2c5eeb214bf72d))
247   ROM_REGION(0x2000, "speech", 0)
248   ROM_LOAD("sound-p.bin", 0x0000, 0x2000, BAD_DUMP CRC(97eedd6c) SHA1(3bb8e5d32417c49ef97cbe407f2c5eeb214bf72d))
148249ROM_END
149250
150251/*--------------------------------
151252/ Olympic Games
152253/-------------------------------*/
153254ROM_START(olympic)
154   ROM_REGION(0x10000, "maincpu", 0)
255   ROM_REGION(0x4000, "roms", 0)
155256   ROM_LOAD("game-jo1.bin", 0x0000, 0x2000, CRC(c9f040cf) SHA1(c689f3a82d904d3f9fc8688d4c06082c51645b2f))
257   ROM_LOAD("game-v.bin",   0x2000, 0x1000, CRC(cd284a20) SHA1(94568e1247994c802266f9fbe4a6f6ed2b55a978))
258   ROM_LOAD("sound-j0.bin", 0x3000, 0x1000, CRC(5c70ce72) SHA1(b0b6cc7b6ec3ed9944d738b61a0d144b77b07000))
156259
157   ROM_REGION(0x10000, "cpu2", 0)
158   ROM_LOAD("game-v.bin", 0x0000, 0x1000, CRC(cd284a20) SHA1(94568e1247994c802266f9fbe4a6f6ed2b55a978))
159
160   ROM_REGION(0x10000, "cpu3", 0)
161   ROM_LOAD("sound-j0.bin", 0x0000, 0x1000, CRC(5c70ce72) SHA1(b0b6cc7b6ec3ed9944d738b61a0d144b77b07000))
162   ROM_LOAD("sound-p.bin", 0x1000, 0x2000, CRC(97eedd6c) SHA1(3bb8e5d32417c49ef97cbe407f2c5eeb214bf72d))
260   ROM_REGION(0x2000, "speech", 0)
261   ROM_LOAD("sound-p.bin",  0x0000, 0x2000, CRC(97eedd6c) SHA1(3bb8e5d32417c49ef97cbe407f2c5eeb214bf72d))
163262ROM_END
164263
165264

Previous 199869 Revisions Next


© 1997-2024 The MAME Team