Previous 199869 Revisions Next

r26421 Monday 25th November, 2013 at 22:13:53 UTC by Angelo Salese
Fixed regression with csplayh5.c
[src/emu/machine]tmp68301.c tmp68301.h
[src/emu/video]v9938.c
[src/mame/drivers]csplayh5.c

trunk/src/mame/drivers/csplayh5.c
r26420r26421
146146
147147   AM_RANGE(0x800000, 0xbfffff) AM_ROM AM_REGION("blit_gfx",0) // GFX ROM routes here
148148
149   AM_RANGE(0xfffc00, 0xffffff) AM_DEVREADWRITE("tmp68301", tmp68301_device, regs_r, regs_w)  // TMP68301 Registers
150
149151   AM_RANGE(0xc00000, 0xc7ffff) AM_RAM AM_SHARE("nvram") AM_MIRROR(0x380000) // work RAM
150
151   AM_RANGE(0xfffc00, 0xffffff) AM_DEVREADWRITE("tmp68301", tmp68301_device, regs_r, regs_w)  // TMP68301 Registers
152152ADDRESS_MAP_END
153153
154154#if USE_H8
r26420r26421
611611   int scanline = param;
612612
613613   if(scanline == 212*2)
614      m_maincpu->set_input_line_and_vector(1, HOLD_LINE,0x100/4);
614      m_tmp68301->external_interrupt_0();
615615
616616   if((scanline % 2) == 0)
617617   {
trunk/src/emu/video/v9938.c
r26420r26421
217217/*
218218About the colour burst registers:
219219
220The color burst registers will only have effect on the composite video outputfrom
220The color burst registers will only have effect on the composite video output from
221221the V9938. but the output is only NTSC (Never The Same Color ,so the
222222effects are already present) . this system is not used in europe
223223the european machines use a separate PAL  (Phase Alternating Line) encoder
r26420r26421
14701470         int colour[4];
14711471             int ind;
14721472
1473/*
1474    pixel0 = (*data) & 8 ? pal_ind16[(*data) >> 4] : s_pal_indYJK[ind | (*data >> 3) & 30];
1475    pixel1 = *(data+1) & 8 ? pal_ind16[*(data+1) >> 4] : s_pal_indYJK[ind | *(data+1) >> 3) & 30];
1476    pixel2 = *(data+2) & 8 ? pal_ind16[*(data+2) >> 4] : s_pal_indYJK[ind | *(data+2) >> 3) & 30];
1477    pixel3 = *(data+3) & 8 ? pal_ind16[*(data+3) >> 4] : s_pal_indYJK[ind | *(data+3) >> 3) & 30];
1478
1479*/
1480
14811473         colour[0] = m_vram_space->read_byte(((nametbl_addr&1) << 16) | (nametbl_addr>>1));
14821474         nametbl_addr++;
14831475         colour[1] = m_vram_space->read_byte(((nametbl_addr&1) << 16) | (nametbl_addr>>1));
r26420r26421
16531645   else
16541646      ln += m_offset_x;
16551647
1656   for (i=0;i<256;i++)
16571648   {
1658      if (col[i] & 0x80)
1649      for (i=0;i<256;i++)
16591650      {
1660         *ln++ = pens[g7_ind16[col[i]&0x0f]];
1661         if (_Width > 512)
1651         if (col[i] & 0x80)
1652         {
16621653            *ln++ = pens[g7_ind16[col[i]&0x0f]];
1663      }
1664      else
1665      {
1666         if (_Width > 512)
1667            ln += 2;
1654            if (_Width > 512)
1655               *ln++ = pens[g7_ind16[col[i]&0x0f]];
1656         }
16681657         else
1669            ln++;
1658         {
1659            if (_Width > 512)
1660               ln += 2;
1661            else
1662               ln++;
1663         }
16701664      }
16711665   }
16721666}
trunk/src/emu/machine/tmp68301.c
r26420r26421
1313
1414const device_type TMP68301 = &device_creator<tmp68301_device>;
1515
16static ADDRESS_MAP_START( tmp68301_regs, AS_0, 16, tmp68301_device )
17//   AM_RANGE(0x000,0x3ff) AM_RAM
18
19ADDRESS_MAP_END
20
1621tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
17   : device_t(mconfig, TMP68301, "TMP68301", tag, owner, clock, "tmp68301", __FILE__)
22   : device_t(mconfig, TMP68301, "TMP68301", tag, owner, clock, "tmp68301", __FILE__),
23      device_memory_interface(mconfig, *this),
24      m_space_config("regs", ENDIANNESS_LITTLE, 16, 10, 0, NULL, *ADDRESS_MAP_NAME(tmp68301_regs))
1825{
1926}
2027
r26420r26421
5360   machine().firstcpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(tmp68301_device::irq_callback),this));
5461}
5562
63//-------------------------------------------------
64//  memory_space_config - return a description of
65//  any address spaces owned by this device
66//-------------------------------------------------
5667
68const address_space_config *tmp68301_device::memory_space_config(address_spacenum spacenum) const
69{
70   return (spacenum == AS_0) ? &m_space_config : NULL;
71}
72
73//**************************************************************************
74//  INLINE HELPERS
75//**************************************************************************
76
77//-------------------------------------------------
78//  read_byte - read a byte at the given address
79//-------------------------------------------------
80
81inline UINT16 tmp68301_device::read_word(offs_t address)
82{
83   return space(AS_0).read_word(address << 1);
84}
85
86//-------------------------------------------------
87//  write_byte - write a byte at the given address
88//-------------------------------------------------
89
90inline void tmp68301_device::write_word(offs_t address, UINT16 data)
91{
92   space(AS_0).write_word(address << 1, data);
93}
94
5795IRQ_CALLBACK_MEMBER(tmp68301_device::irq_callback)
5896{
5997   int vector = m_irq_vector[irqline];
r26420r26421
181219{
182220   COMBINE_DATA(&m_regs[offset]);
183221
222   write_word(offset,m_regs[offset]);
223
184224   if (!ACCESSING_BITS_0_7)    return;
185225
186226//  logerror("CPU #0 PC %06X: TMP68301 Reg %04X<-%04X & %04X\n",space.device().safe_pc(),offset*2,data,mem_mask^0xffff);
trunk/src/emu/machine/tmp68301.h
r26420r26421
11#ifndef TMP68301_H
22#define TMP68301_H
33
4class tmp68301_device : public device_t
4class tmp68301_device : public device_t,
5                  public device_memory_interface
56{
67public:
78   tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r26420r26421
2122   virtual void device_config_complete();
2223   virtual void device_start();
2324   virtual void device_reset();
25   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
2426
2527private:
2628   // internal state
r26420r26421
2931   UINT8 m_IE[3];        // 3 External Interrupt Lines
3032   emu_timer *m_tmp68301_timer[3];        // 3 Timers
3133
32   int m_irq_vector[8];
34   UINT16 m_irq_vector[8];
3335
3436   TIMER_CALLBACK_MEMBER( timer_callback );
3537   void update_timer( int i );
3638   IRQ_CALLBACK_MEMBER(irq_callback);
3739   void update_irq_state();
40
41   inline UINT16 read_word(offs_t address);
42   inline void write_word(offs_t address, UINT16 data);
43   const address_space_config      m_space_config;
3844};
3945
4046extern const device_type TMP68301;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team