Previous 199869 Revisions Next

r18403 Wednesday 10th October, 2012 at 08:41:56 UTC by Robbbert
atari_s2 : wip and placeholder
[src/mame]mame.mak
[src/mame/drivers]atari_s2.c
[src/mame/layout]atari_s2.lay*

trunk/src/mame/mame.mak
r18402r18403
19811981
19821982$(DRIVERS)/atari_s1.o:   $(LAYOUT)/atari_s1.lh
19831983
1984$(DRIVERS)/atari_s2.o:   $(LAYOUT)/atari_s2.lh
1985
19841986$(DRIVERS)/avalnche.o:   $(LAYOUT)/avalnche.lh
19851987
19861988$(DRIVERS)/balsente.o:   $(LAYOUT)/stocker.lh
trunk/src/mame/layout/atari_s2.lay
r0r18403
1<!-- atari_s2.lay -->
2
3<!-- 2012-10-10: Initial version.  [Robbbert] -->
4
5<mamelayout version="2">
6
7   <element name="digit" defstate="0">
8      <led7seg>
9         <color red="1.0" green="0.25" blue="0.0" />
10      </led7seg>
11   </element>
12
13   <element name="background">
14      <rect>
15         <bounds left="0" top="0" right="1" bottom="1" />
16         <color red="0.0" green="0.0" blue="0.0" />
17      </rect>
18   </element>
19   <element name="P0"><text string="Ball / Match"><color red="1.0" green="1.0" blue="1.0" /></text></element>
20   <element name="P1"><text string="Credits"><color red="1.0" green="1.0" blue="1.0" /></text></element>
21   <element name="P3"><text string="Player 1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
22   <element name="P4"><text string="Player 2"><color red="1.0" green="1.0" blue="1.0" /></text></element>
23   <element name="P5"><text string="Player 3"><color red="1.0" green="1.0" blue="1.0" /></text></element>
24   <element name="P6"><text string="Player 4"><color red="1.0" green="1.0" blue="1.0" /></text></element>
25
26   <view name="Default Layout">
27
28      <!-- Background -->
29      <backdrop element="background">
30         <bounds left="0" top="20" right="274" bottom="394" />
31      </backdrop>
32
33      <!-- LEDs -->
34
35      <!-- Player 1 Score -->
36
37      <bezel name="digit28" element="digit">
38         <bounds left="10" top="45" right="44" bottom="84" />
39      </bezel>
40      <bezel name="digit29" element="digit">
41         <bounds left="54" top="45" right="88" bottom="84" />
42      </bezel>
43      <bezel name="digit26" element="digit">
44         <bounds left="98" top="45" right="132" bottom="84" />
45      </bezel>
46      <bezel name="digit27" element="digit">
47         <bounds left="142" top="45" right="176" bottom="84" />
48      </bezel>
49      <bezel name="digit24" element="digit">
50         <bounds left="186" top="45" right="220" bottom="84" />
51      </bezel>
52      <bezel name="digit25" element="digit">
53         <bounds left="230" top="45" right="264" bottom="84" />
54      </bezel>
55
56      <!-- Player 2 Score -->
57      <bezel name="digit20" element="digit">
58         <bounds left="10" top="105" right="44" bottom="144" />
59      </bezel>
60      <bezel name="digit21" element="digit">
61         <bounds left="54" top="105" right="88" bottom="144" />
62      </bezel>
63      <bezel name="digit18" element="digit">
64         <bounds left="98" top="105" right="132" bottom="144" />
65      </bezel>
66      <bezel name="digit19" element="digit">
67         <bounds left="142" top="105" right="176" bottom="144" />
68      </bezel>
69      <bezel name="digit16" element="digit">
70         <bounds left="186" top="105" right="220" bottom="144" />
71      </bezel>
72      <bezel name="digit17" element="digit">
73         <bounds left="230" top="105" right="264" bottom="144" />
74      </bezel>
75
76      <!-- Player 3 Score -->
77      <bezel name="digit12" element="digit">
78         <bounds left="10" top="165" right="44" bottom="204" />
79      </bezel>
80      <bezel name="digit13" element="digit">
81         <bounds left="54" top="165" right="88" bottom="204" />
82      </bezel>
83      <bezel name="digit10" element="digit">
84         <bounds left="98" top="165" right="132" bottom="204" />
85      </bezel>
86      <bezel name="digit11" element="digit">
87         <bounds left="142" top="165" right="176" bottom="204" />
88      </bezel>
89      <bezel name="digit8" element="digit">
90         <bounds left="186" top="165" right="220" bottom="204" />
91      </bezel>
92      <bezel name="digit9" element="digit">
93         <bounds left="230" top="165" right="264" bottom="204" />
94      </bezel>
95
96      <!-- Player 4 Score -->
97      <bezel name="digit4" element="digit">
98         <bounds left="10" top="225" right="44" bottom="264" />
99      </bezel>
100      <bezel name="digit5" element="digit">
101         <bounds left="54" top="225" right="88" bottom="264" />
102      </bezel>
103      <bezel name="digit2" element="digit">
104         <bounds left="98" top="225" right="132" bottom="264" />
105      </bezel>
106      <bezel name="digit3" element="digit">
107         <bounds left="142" top="225" right="176" bottom="264" />
108      </bezel>
109      <bezel name="digit0" element="digit">
110         <bounds left="186" top="225" right="220" bottom="264" />
111      </bezel>
112      <bezel name="digit1" element="digit">
113         <bounds left="230" top="225" right="264" bottom="264" />
114      </bezel>
115
116      <!-- Credits and Balls -->
117      <bezel name="digit58" element="digit">
118         <bounds left="10" top="345" right="44" bottom="384" />
119      </bezel>
120      <bezel name="digit59" element="digit">
121         <bounds left="54" top="345" right="88" bottom="384" />
122      </bezel>
123      <bezel name="digit70" element="digit">
124         <bounds left="98" top="345" right="132" bottom="384" />
125      </bezel>
126      <bezel name="digit71" element="digit">
127         <bounds left="142" top="345" right="176" bottom="384" />
128      </bezel>
129      <bezel name="digit56" element="digit">
130         <bounds left="186" top="345" right="220" bottom="384" />
131      </bezel>
132      <bezel name="digit57" element="digit">
133         <bounds left="230" top="345" right="264" bottom="384" />
134      </bezel>
135      <bezel element="P0"><bounds left="200" right="258" top="330" bottom="342" /></bezel>
136      <bezel element="P1"><bounds left="30" right="88" top="330" bottom="342" /></bezel>
137      <bezel name="text3" element="P3"><bounds left="100" right="180" top="30" bottom="42" /></bezel>
138      <bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
139      <bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
140      <bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel>
141   </view>
142</mamelayout>
trunk/src/mame/drivers/atari_s2.c
r18402r18403
33    Pinball
44    Atari Generation/System 2
55
6    Manuals and PinMAME used as references (couldn't find full schematics).
7
8
69************************************************************************************/
710
8#include "emu.h"
11#include "machine/genpin.h"
912#include "cpu/m6800/m6800.h"
13#include "machine/nvram.h"
14#include "atari_s2.lh"
1015
16
1117class atari_s2_state : public driver_device
1218{
1319public:
1420   atari_s2_state(const machine_config &mconfig, device_type type, const char *tag)
1521      : driver_device(mconfig, type, tag),
16   m_maincpu(*this, "maincpu")
22   m_maincpu(*this, "maincpu"),
23   m_samples(*this, "samples")
1724   { }
1825
26   DECLARE_WRITE8_HANDLER(intack_w);
27
28
29   TIMER_DEVICE_CALLBACK_MEMBER(irq);
1930protected:
2031
2132   // devices
2233   required_device<cpu_device> m_maincpu;
34   required_device<samples_device> m_samples;
2335
2436   // driver_device overrides
2537   virtual void machine_reset();
26public:
27   DECLARE_DRIVER_INIT(atari_s2);
38private:
39   UINT8 m_t_c;
2840};
2941
3042
3143static ADDRESS_MAP_START( atari_s2_map, AS_PROGRAM, 8, atari_s2_state )
3244   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
3345   AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0700) AM_RAM
34   AM_RANGE(0x0800, 0x08ff) AM_MIRROR(0x0700) AM_RAM // NVRAM
35   //AM_RANGE(0x1000, 0x1007) AM_READ(sw_r)
36   //AM_RANGE(0x1800, 0x1800) AM_WRITE(sound0_w)
37   //AM_RANGE(0x1820, 0x1820) AM_WRITE(sound1_w)
38   //AM_RANGE(0x1840, 0x1846) AM_WRITE(disp0_w)
39   //AM_RANGE(0x1847, 0x1847) AM_WRITE(disp1_w)
40   //AM_RANGE(0x1860, 0x1867) AM_WRITE(lamp_w)
41   //AM_RANGE(0x1880, 0x1880) AM_WRITE(sol0_w)
42   //AM_RANGE(0x18a0, 0x18a7) AM_WRITE(sol1_w)
43   //AM_RANGE(0x18c0, 0x18c1) AM_WRITE(watchdog_w)
44   //AM_RANGE(0x18e0, 0x18e0) AM_WRITE(intack_w)
45   //AM_RANGE(0x2000, 0x2003) AM_READWRITE(dip_r,dip_w)
46   AM_RANGE(0x0800, 0x08ff) AM_MIRROR(0x0700) AM_RAM AM_SHARE("nvram") // battery backed
47   //AM_RANGE(0x1000, 0x1007) AM_MIRROR(0x07F8) AM_READ(sw_r)
48   //AM_RANGE(0x1800, 0x1800) AM_MIRROR(0x071F) AM_WRITE(sound0_w)
49   //AM_RANGE(0x1820, 0x1820) AM_MIRROR(0x071F) AM_WRITE(sound1_w)
50   //AM_RANGE(0x1840, 0x1847) AM_MIRROR(0x0718) AM_WRITE(disp_w)
51   //AM_RANGE(0x1860, 0x1867) AM_MIRROR(0x0718) AM_WRITE(lamp_w)
52   //AM_RANGE(0x1880, 0x1880) AM_MIRROR(0x071F) AM_WRITE(sol0_w)
53   //AM_RANGE(0x18a0, 0x18a7) AM_MIRROR(0x0718) AM_WRITE(sol1_w)
54   AM_RANGE(0x18c0, 0x18c0) AM_MIRROR(0x071F) AM_WRITE(watchdog_reset_w)
55   AM_RANGE(0x18e0, 0x18e0) AM_MIRROR(0x071F) AM_WRITE(intack_w)
56   //AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x07FC) AM_READWRITE(dip_r,dip_w)
4657   AM_RANGE(0x2800, 0x3fff) AM_ROM
4758ADDRESS_MAP_END
4859
4960static INPUT_PORTS_START( atari_s2 )
5061INPUT_PORTS_END
5162
52void atari_s2_state::machine_reset()
63WRITE8_MEMBER( atari_s2_state::intack_w )
5364{
65   m_maincpu->set_input_line(M6800_IRQ_LINE, CLEAR_LINE);
5466}
5567
56DRIVER_INIT_MEMBER(atari_s2_state,atari_s2)
68TIMER_DEVICE_CALLBACK_MEMBER( atari_s2_state::irq )
5769{
70//   static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // 4511
71//   m_bit6++;
72   if (m_t_c > 0x40)
73      m_maincpu->set_input_line(M6800_IRQ_LINE, HOLD_LINE);
74   else
75      m_t_c++;
76
77//   m_out_offs++;
78//   m_out_offs &= 0x1f;
79//   if ((m_out_offs & 3) == 3)
80//   {
81//      // Player number
82//      char wordnum[8];
83//      sprintf(wordnum,"text%d",m_out_offs>>2);
84//      output_set_value(wordnum, !BIT(patterns[m_p_ram[m_out_offs]&15], 6)); // uses 'g' segment
85//   }
86//   else
87//   {
88//      // Digits
89//      output_set_digit_value(m_out_offs << 1, patterns[m_p_ram[m_out_offs]>>4]);
90//      output_set_digit_value((m_out_offs << 1)+1, patterns[m_p_ram[m_out_offs]&15]);
91//   }
5892}
5993
94void atari_s2_state::machine_reset()
95{
96}
97
6098static MACHINE_CONFIG_START( atari_s2, atari_s2_state )
6199   /* basic machine hardware */
62   MCFG_CPU_ADD("maincpu", M6800, 1000000)
100   MCFG_CPU_ADD("maincpu", M6800, XTAL_4MHz / 4)
63101   MCFG_CPU_PROGRAM_MAP(atari_s2_map)
102   MCFG_NVRAM_ADD_0FILL("nvram")
103   MCFG_TIMER_DRIVER_ADD_PERIODIC("irq", atari_s2_state, irq, attotime::from_hz(XTAL_4MHz / 8192))
104
105   /* Sound */
106   MCFG_FRAGMENT_ADD( genpin_audio )
107
108   /* Video */
109   MCFG_DEFAULT_LAYOUT(layout_atari_s2)
64110MACHINE_CONFIG_END
65111
66112/*-------------------------------------------------------------------
r18402r18403
90136ROM_END
91137
92138
93GAME( 1979,  supermap,  0,  atari_s2,  atari_s2, atari_s2_state,  atari_s2,  ROT0,  "Atari",    "Superman (Pinball)",    GAME_IS_SKELETON_MECHANICAL)
94GAME( 1979,  hercules,  0,  atari_s2,  atari_s2, atari_s2_state,  atari_s2,  ROT0,  "Atari",    "Hercules",              GAME_IS_SKELETON_MECHANICAL)
139GAME( 1979, supermap,  0,  atari_s2,  atari_s2, driver_device, 0,  ROT0, "Atari", "Superman (Pinball)", GAME_IS_SKELETON_MECHANICAL)
140GAME( 1979, hercules,  0,  atari_s2,  atari_s2, driver_device, 0,  ROT0, "Atari", "Hercules", GAME_IS_SKELETON_MECHANICAL)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team