Previous 199869 Revisions Next

r18137 Tuesday 25th September, 2012 at 12:10:15 UTC by Robbbert
SPECTRA - wip
[src/mame/drivers]spectra.c

trunk/src/mame/drivers/spectra.c
r18136r18137
11/******************************************************************************************
2  Pinball
3  Valley Spectra IV
4  -----------------
5  Rotating game, like Midway's "Rotation VIII".
2    Pinball
3    Valley Spectra IV
4
5    Rotating game, like Midway's "Rotation VIII".
6
7    Schematic and PinMAME used as references.
8
9
610*******************************************************************************************/
711
812
9#include "emu.h"
13#include "machine/genpin.h"
1014#include "cpu/m6502/m6502.h"
15#include "machine/6532riot.h"
16#include "machine/nvram.h"
17//#include "spectra.lh"
1118
19
1220class spectra_state : public driver_device
1321{
1422public:
1523   spectra_state(const machine_config &mconfig, device_type type, const char *tag)
1624      : driver_device(mconfig, type, tag),
17        m_maincpu(*this, "maincpu")
25   m_maincpu(*this, "maincpu"),
26   m_samples(*this, "samples")
1827   { }
1928
29   DECLARE_READ8_MEMBER(porta_r);
30   DECLARE_READ8_MEMBER(portb_r);
31   DECLARE_WRITE8_MEMBER(porta_w);
32   DECLARE_WRITE8_MEMBER(portb_w);
2033protected:
2134
2235   // devices
2336   required_device<cpu_device> m_maincpu;
37   required_device<samples_device> m_samples;
2438
2539   // driver_device overrides
2640   virtual void machine_reset();
r18136r18137
3246static ADDRESS_MAP_START( spectra_map, AS_PROGRAM, 8, spectra_state )
3347   ADDRESS_MAP_UNMAP_HIGH
3448   ADDRESS_MAP_GLOBAL_MASK(0xfff)
35   AM_RANGE(0x0000, 0x017f) AM_RAM
36   //AM_RANGE(0x0180, 0x019f) riot device
49   AM_RANGE(0x0000, 0x00ff) AM_RAM AM_SHARE("nvram") // battery backed, 2x 5101L
50   AM_RANGE(0x0100, 0x017f) AM_RAM // RIOT RAM
51   AM_RANGE(0x0180, 0x019f) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
3752   AM_RANGE(0x0400, 0x0fff) AM_ROM
3853ADDRESS_MAP_END
3954
r18136r18137
4863{
4964}
5065
66READ8_MEMBER( spectra_state::porta_r )
67{printf("ReadA ");
68   return 0;
69}
70
71READ8_MEMBER( spectra_state::portb_r )
72{printf("ReadB ");
73   return 0;
74}
75
76WRITE8_MEMBER( spectra_state::porta_w )
77{printf("A=%X ",data);
78}
79
80WRITE8_MEMBER( spectra_state::portb_w )
81{printf("B=%X ",data);
82}
83
84
85static const riot6532_interface riot6532_intf =
86{
87   DEVCB_DRIVER_MEMBER(spectra_state, porta_r),   // port a in
88   DEVCB_DRIVER_MEMBER(spectra_state, portb_r),   // port b in
89   DEVCB_DRIVER_MEMBER(spectra_state, porta_w),   // port a out
90   DEVCB_DRIVER_MEMBER(spectra_state, portb_w),   // port b in
91   DEVCB_CPU_INPUT_LINE("maincpu", M6502_IRQ_LINE)   // interrupt
92};
93
5194static MACHINE_CONFIG_START( spectra, spectra_state )
5295   /* basic machine hardware */
53   MCFG_CPU_ADD("maincpu", M6502, 3579545/4)
96   MCFG_CPU_ADD("maincpu", M6502, 3579545/4)  // actually a 6503
5497   MCFG_CPU_PROGRAM_MAP(spectra_map)
98   MCFG_RIOT6532_ADD("riot", 3579545/4, riot6532_intf) // R6532
99   MCFG_NVRAM_ADD_0FILL("nvram")
100
101   /* Video */
102   //MCFG_DEFAULT_LAYOUT(layout_spectra)
103
104   /* Sound */
105   MCFG_FRAGMENT_ADD( genpin_audio )
55106MACHINE_CONFIG_END
56107
57108/*--------------------------------
r18136r18137
60111ROM_START(spectra)
61112   ROM_REGION(0x10000, "maincpu", 0)
62113   ROM_LOAD("spect_u5.dat", 0x0400, 0x0400, CRC(49e0759f) SHA1(c3badc90ff834cbc92d8c519780069310c2b1507))
114   // pinmame has a different u4 rom: CRC(b58f1205) SHA1(9578fd89485f3f560789cb0f24c7116e4bc1d0da)
63115   ROM_LOAD("spect_u4.dat", 0x0800, 0x0400, BAD_DUMP CRC(e6519689) SHA1(06ef3d349ea27a072889b7c379f258d29b7217be))
64116   ROM_LOAD("spect_u3.dat", 0x0c00, 0x0400, CRC(9ca7510f) SHA1(a87849f16903836158063d593bb4a2e90c7473c8))
65117ROM_END

Previous 199869 Revisions Next


© 1997-2024 The MAME Team