Previous 199869 Revisions Next

r22651 Friday 3rd May, 2013 at 02:47:36 UTC by David Haywood
further code collapse (nw)
[src/emu/machine]mcf5206e.c
[src/mame/drivers]bfm_sc4h.c bfm_sc5.c
[src/mame/includes]bfm_sc45.h bfm_sc5.h

trunk/src/emu/machine/mcf5206e.c
r22650r22651
785785   {
786786   case 0:
787787      debuglog("%s: TCN1_r %04x\n", this->machine().describe_context(), mem_mask);
788      return 0x8ca0 -1;// m_TCN1; // this should be the counter, code has a hardcoded >= check against 8ca0.
788      return machine().rand(); // 0x8ca0 -1;// m_TCN1; // this should be the counter, code has a hardcoded >= check against 8ca0.
789789   case 1:
790790      invalidlog("%s: invalid TCN1_r %d %04x\n", this->machine().describe_context(), offset, mem_mask);
791791      return 0;
trunk/src/mame/includes/bfm_sc45.h
r22650r22651
3636
3737   UINT8 vfd_ser_value;
3838   int vfd_ser_count;
39
40   DECLARE_WRITE8_MEMBER(mux_output_w);
41   DECLARE_WRITE8_MEMBER(mux_output2_w);
42
3943};
4044
4145void bfm_sc45_write_serial_vfd(running_machine &machine, bool cs, bool clock, bool data);
r22650r22651
8993
9094   UINT8 read_input_matrix(running_machine &machine, int row);
9195
92   DECLARE_WRITE8_MEMBER(mux_output_w);
93   DECLARE_WRITE8_MEMBER(mux_output2_w);
9496
9597   DECLARE_READ16_MEMBER(sc4_mem_r);
9698   DECLARE_WRITE16_MEMBER(sc4_mem_w);
trunk/src/mame/includes/bfm_sc5.h
r22650r22651
1717   DECLARE_READ8_MEMBER( sc5_10202F0_r );
1818   DECLARE_WRITE8_MEMBER( sc5_10202F0_w );
1919   DECLARE_WRITE16_MEMBER( sc5_duart_w );
20
21   DECLARE_READ8_MEMBER( sc5_mux1_r );
22   DECLARE_WRITE8_MEMBER( sc5_mux1_w );
23   DECLARE_WRITE8_MEMBER( sc5_mux2_w );
24
25
2026};
2127
trunk/src/mame/drivers/bfm_sc5.c
r22650r22651
3636
3737}
3838
39READ8_MEMBER( bfm_sc5_state::sc5_mux1_r )
40{
41   switch (offset)
42   {
43      case 0x20:
44         return machine().rand();
45   }
46
47   printf("%s: sc5_mux1_r %1x\n", machine().describe_context(), offset);
48
49   return 0x00;
50}
51
52
53WRITE8_MEMBER( bfm_sc5_state::sc5_mux1_w )
54{
55   if ((offset&0xf)==0)
56   {
57      mux_output_w(space, (offset & 0x01f0)>>4, data);
58   }
59   else
60   {
61      printf("%s: sc5_mux1_w %1x %04x\n", machine().describe_context(), offset, data);
62   }
63}
64
65
66
67WRITE8_MEMBER( bfm_sc5_state::sc5_mux2_w )
68{
69   if ((offset&0xf)==0)
70   {
71      mux_output2_w(space, (offset & 0x01f0)>>4, data);
72   }
73   else
74   {
75      printf("%s: sc5_mux2_w %1x %04x\n", machine().describe_context(), offset, data);
76   }
77}
78
79
3980static ADDRESS_MAP_START( sc5_map, AS_PROGRAM, 32, bfm_sc5_state )
4081   // ROM (max size?)
4182   AM_RANGE(0x00000000, 0x002fffff) AM_ROM
r22650r22651
4485
4586#if 1
4687   // dev1
47   AM_RANGE(0x01010000, 0x01010003) AM_WRITENOP
48   AM_RANGE(0x01010010, 0x01010013) AM_WRITENOP
49   AM_RANGE(0x01010020, 0x01010023) AM_WRITENOP
50   AM_RANGE(0x01010030, 0x01010033) AM_WRITENOP
51   AM_RANGE(0x01010040, 0x01010043) AM_WRITENOP
52   AM_RANGE(0x01010050, 0x01010053) AM_WRITENOP
53   AM_RANGE(0x01010060, 0x01010063) AM_WRITENOP
54   AM_RANGE(0x01010070, 0x01010073) AM_WRITENOP
55   AM_RANGE(0x01010080, 0x01010083) AM_WRITENOP
56   AM_RANGE(0x01010090, 0x01010093) AM_WRITENOP
57   AM_RANGE(0x010100a0, 0x010100a3) AM_WRITENOP
58   AM_RANGE(0x010100b0, 0x010100b3) AM_WRITENOP
59   AM_RANGE(0x010100c0, 0x010100c3) AM_WRITENOP
60   AM_RANGE(0x010100d0, 0x010100d3) AM_WRITENOP
61   AM_RANGE(0x010100e0, 0x010100e3) AM_WRITENOP
62   AM_RANGE(0x010100f0, 0x010100f3) AM_WRITENOP
63   AM_RANGE(0x01010100, 0x01010103) AM_WRITENOP
64   AM_RANGE(0x01010110, 0x01010113) AM_WRITENOP
65   AM_RANGE(0x01010120, 0x01010123) AM_WRITENOP
66   AM_RANGE(0x01010130, 0x01010133) AM_WRITENOP
67   AM_RANGE(0x01010140, 0x01010143) AM_WRITENOP
68   AM_RANGE(0x01010150, 0x01010153) AM_WRITENOP
69   AM_RANGE(0x01010160, 0x01010163) AM_WRITENOP
70   AM_RANGE(0x01010170, 0x01010173) AM_WRITENOP
71   AM_RANGE(0x01010180, 0x01010183) AM_WRITENOP
72   AM_RANGE(0x01010190, 0x01010193) AM_WRITENOP
73   AM_RANGE(0x010101a0, 0x010101a3) AM_WRITENOP
74   AM_RANGE(0x010101b0, 0x010101b3) AM_WRITENOP
75   AM_RANGE(0x010101c0, 0x010101c3) AM_WRITENOP
76   AM_RANGE(0x010101d0, 0x010101d3) AM_WRITENOP
77   AM_RANGE(0x010101e0, 0x010101e3) AM_WRITENOP
78   AM_RANGE(0x010101f0, 0x010101f3) AM_WRITENOP
88   AM_RANGE(0x01010000, 0x010101ff) AM_READWRITE8(sc5_mux1_r, sc5_mux1_w,0xffffffff) // guess
89#endif
90
91#if 0
92
7993   AM_RANGE(0x01010200, 0x01010203) AM_WRITENOP
8094   AM_RANGE(0x01010210, 0x01010213) AM_WRITENOP
8195   AM_RANGE(0x01010220, 0x01010223) AM_WRITENOP
r22650r22651
97111
98112   AM_RANGE(0x01010380, 0x01010383) AM_WRITENOP
99113   AM_RANGE(0x01010390, 0x01010393) AM_WRITENOP
114#endif
100115
116#if 1
101117   // dev2
102   AM_RANGE(0x01020000, 0x01020003) AM_WRITENOP
103   AM_RANGE(0x01020010, 0x01020013) AM_WRITENOP
104   AM_RANGE(0x01020020, 0x01020023) AM_WRITENOP
105   AM_RANGE(0x01020030, 0x01020033) AM_WRITENOP
106   AM_RANGE(0x01020040, 0x01020043) AM_WRITENOP
107   AM_RANGE(0x01020050, 0x01020053) AM_WRITENOP
108   AM_RANGE(0x01020060, 0x01020063) AM_WRITENOP
109   AM_RANGE(0x01020070, 0x01020073) AM_WRITENOP
110   AM_RANGE(0x01020080, 0x01020083) AM_WRITENOP
111   AM_RANGE(0x01020090, 0x01020093) AM_WRITENOP
112   AM_RANGE(0x010200a0, 0x010200a3) AM_WRITENOP
113   AM_RANGE(0x010200b0, 0x010200b3) AM_WRITENOP
114   AM_RANGE(0x010200c0, 0x010200c3) AM_WRITENOP
115   AM_RANGE(0x010200d0, 0x010200d3) AM_WRITENOP
116   AM_RANGE(0x010200e0, 0x010200e3) AM_WRITENOP
117   AM_RANGE(0x010200f0, 0x010200f3) AM_WRITENOP
118   AM_RANGE(0x01020100, 0x01020103) AM_WRITENOP
119   AM_RANGE(0x01020110, 0x01020113) AM_WRITENOP
120   AM_RANGE(0x01020120, 0x01020123) AM_WRITENOP
121   AM_RANGE(0x01020130, 0x01020133) AM_WRITENOP
122   AM_RANGE(0x01020140, 0x01020143) AM_WRITENOP
123   AM_RANGE(0x01020150, 0x01020153) AM_WRITENOP
124   AM_RANGE(0x01020160, 0x01020163) AM_WRITENOP
125   AM_RANGE(0x01020170, 0x01020173) AM_WRITENOP
126   AM_RANGE(0x01020180, 0x01020183) AM_WRITENOP
127   AM_RANGE(0x01020190, 0x01020193) AM_WRITENOP
128   AM_RANGE(0x010201a0, 0x010201a3) AM_WRITENOP
129   AM_RANGE(0x010201b0, 0x010201b3) AM_WRITENOP
130   AM_RANGE(0x010201c0, 0x010201c3) AM_WRITENOP
131   AM_RANGE(0x010201d0, 0x010201d3) AM_WRITENOP
132   AM_RANGE(0x010201e0, 0x010201e3) AM_WRITENOP
133   AM_RANGE(0x010201f0, 0x010201f3) AM_WRITENOP
118   AM_RANGE(0x01020000, 0x010201ff) AM_WRITE8(sc5_mux2_w,0xffffffff) // guess
119#endif
120
121#if 0
122
134123   AM_RANGE(0x01020200, 0x01020203) AM_WRITENOP
135124   AM_RANGE(0x01020210, 0x01020213) AM_WRITENOP
136125   AM_RANGE(0x01020220, 0x01020223) AM_WRITENOP
r22650r22651
173162      case 0x2:
174163      case 0x3:
175164         printf("%s: sc5_10202F0_r %d\n", machine().describe_context(), offset);
176         return 0xff;
165         return machine().rand();
177166   }
178167
179168   return 0;
trunk/src/mame/drivers/bfm_sc4h.c
r22650r22651
234234
235235static DECLARE_WRITE8_HANDLER( bfm_sc4_reel4_w );
236236
237WRITE8_MEMBER(sc4_state::mux_output_w)
237WRITE8_MEMBER(bfm_sc45_state::mux_output_w)
238238{
239239   int i;
240240   int off = offset<<3;
r22650r22651
246246   output_set_indexed_value("matrix", off+i, ((data & (1 << i)) != 0));
247247}
248248
249WRITE8_MEMBER(sc4_state::mux_output2_w)
249WRITE8_MEMBER(bfm_sc45_state::mux_output2_w)
250250{
251251   int i;
252252   int off = offset<<3;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team