Previous 199869 Revisions Next

r17835 Wednesday 12th September, 2012 at 14:27:13 UTC by Angelo Salese
Checkpoint
[src/emu/machine]seibu_cop.c seibu_cop.h
[src/mame/machine]seicop.c

trunk/src/mame/machine/seicop.c
r17834r17835
15421542      case (0x026/2): { state->m_scrollram16[3] = seibu_vregs[offset]; break; }
15431543      case (0x028/2): { state->m_scrollram16[4] = seibu_vregs[offset]; break; }
15441544      case (0x02a/2): { state->m_scrollram16[5] = seibu_vregs[offset]; break; }
1545//      case (0x03a/2): Godzilla sets this up to be 0x1ef / 0x1eb, presumably bit 2 is vertical wrap-around on/off?
1545
15461546      default: { logerror("seibu_common_video_regs_w unhandled offset %02x %04x\n",offset*2,data); break; }
15471547   }
15481548}
r17834r17835
26302630            //  return;
26312631
26322632            address = (cop_dma_src[cop_dma_trigger] << 6);
2633            length = ((cop_dma_size[cop_dma_trigger]+1) << 4);
2633            length = ((cop_dma_size[cop_dma_trigger]+1) << 5);
26342634
2635            for (i=address;i<address+length;i+=4)
2635            for (i=address;i<address+length;i+=2)
26362636            {
2637               space->write_dword(i, fill_val);
2637               space->write_word(i, fill_val);
26382638            }
26392639
26402640            return;
trunk/src/emu/machine/seibu_cop.c
r17834r17835
11/***************************************************************************
22
3Template for skeleton device
3   Seibu COP protection device
44
5   (this header needs expanding)
6
57***************************************************************************/
68
79#include "emu.h"
r17834r17835
1618// device type definition
1719const device_type SEIBU_COP = &device_creator<seibu_cop_device>;
1820
21#if 0
22static ADDRESS_MAP_START( seibu_cop_vram, AS_0, 16, seibu_cop_device )
23ADDRESS_MAP_END
24#endif
1925
2026//**************************************************************************
2127//  LIVE DEVICE
r17834r17835
8692//  READ/WRITE HANDLERS
8793//**************************************************************************
8894
89READ8_MEMBER( seibu_cop_device::read )
95READ16_MEMBER( seibu_cop_device::read )
9096{
9197   return 0;
9298}
9399
94WRITE8_MEMBER( seibu_cop_device::write )
100WRITE16_MEMBER( seibu_cop_device::write )
95101{
102   switch(offset)
103   {
104      case 0x028/2:
105         COMBINE_DATA(&m_dma_fill_val_lo);
106         m_dma_fill_val = (m_dma_fill_val_lo) | (m_dma_fill_val_hi << 16);
107         break;
108
109      case 0x02a/2:
110         COMBINE_DATA(&m_dma_fill_val_hi);
111         m_dma_fill_val = (m_dma_fill_val_lo) | (m_dma_fill_val_hi << 16);
112         break;
113
114      case (0x05a/2): COMBINE_DATA(&m_pal_brightness_val); break;
115      case (0x05c/2): COMBINE_DATA(&m_pal_brightness_mode); break;
116
117      case 0x074/2:
118         /*
119            This sets up a DMA mode of some sort
120               0x0e00: grainbow, cupsoc
121               0x0a00: legionna, godzilla, denjinmk
122               0x0600: heatbrl
123               0x1e00: zeroteam, xsedae
124            raiden2 and raidendx doesn't set this up, this could indicate that this is related to the non-private buffer DMAs
125            (both only uses 0x14 and 0x15 as DMAs)
126         */
127         COMBINE_DATA(&m_dma_unk_param);
128         break;
129
130      case (0x076/2):
131         COMBINE_DATA(&m_cop_dma_fade_table);
132         break;
133
134      case (0x078/2): /* DMA source address */
135         COMBINE_DATA(&m_cop_dma_src[m_cop_dma_trigger]);
136         break;
137
138      case (0x07a/2): /* DMA length */
139         COMBINE_DATA(&m_cop_dma_size[m_cop_dma_trigger]);
140         break;
141
142      case (0x07c/2): /* DMA destination */
143         COMBINE_DATA(&m_cop_dma_dst[m_cop_dma_trigger]);
144         break;
145
146      case (0x07e/2): /* DMA parameter */
147         COMBINE_DATA(&m_cop_dma_exec_param);
148         m_cop_dma_trigger = m_cop_dma_exec_param & 7;
149         break;
150   }
96151}
trunk/src/emu/machine/seibu_cop.h
r17834r17835
4444   seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4545
4646   // I/O operations
47   DECLARE_WRITE8_MEMBER( write );
48   DECLARE_READ8_MEMBER( read );
47   DECLARE_WRITE16_MEMBER( write );
48   DECLARE_READ16_MEMBER( read );
4949
5050protected:
5151   // device-level overrides
r17834r17835
5757private:
5858   devcb_resolved_read8      m_in_mreq_func;
5959   devcb_resolved_write8      m_out_mreq_func;
60
61   UINT16 m_dma_unk_param, m_cop_dma_fade_table, m_cop_dma_src[8], m_cop_dma_dst[8], m_cop_dma_size[8], m_cop_dma_exec_param;
62   UINT8 m_cop_dma_trigger;
63   UINT16 m_dma_fill_val_lo,m_dma_fill_val_hi;
64   UINT32 m_dma_fill_val;
65   UINT8 m_pal_brightness_val, m_pal_brightness_mode;
6066};
6167
6268

Previous 199869 Revisions Next


© 1997-2024 The MAME Team