Previous 199869 Revisions Next

r29479 Wednesday 9th April, 2014 at 10:55:54 UTC by Fabio Priuli
k054338: updated to use inline configs. nw.
[src/mame/drivers]bishi.c moo.c xexex.c
[src/mame/video]k054338.c k054338.h

trunk/src/mame/drivers/moo.c
r29478r29479
541541   moo_sprite_callback
542542};
543543
544static const k054338_interface moo_k054338_intf =
545{
546   0,
547   "none"
548};
549
550544static k054539_interface k054539_config;
551545
552546static MACHINE_CONFIG_START( moo, moo_state )
r29478r29479
590584   MCFG_K056832_ADD("k056832", moo_k056832_intf)
591585   MCFG_K056832_GFXDECODE("gfxdecode")
592586   MCFG_K056832_PALETTE("palette")
587
593588   MCFG_K053251_ADD("k053251")
594   MCFG_K054338_ADD("k054338", moo_k054338_intf)
595589
590   MCFG_DEVICE_ADD("k054338", K054338, 0)
591
596592   /* sound hardware */
597593   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
598594
r29478r29479
640636   MCFG_K056832_ADD("k056832", moo_k056832_intf)
641637   MCFG_K056832_GFXDECODE("gfxdecode")
642638   MCFG_K056832_PALETTE("palette")
639
643640   MCFG_K053251_ADD("k053251")
644   MCFG_K054338_ADD("k054338", moo_k054338_intf)
645641
642   MCFG_DEVICE_ADD("k054338", K054338, 0)
643
646644   /* sound hardware */
647645   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
648646
trunk/src/mame/drivers/bishi.c
r29478r29479
372372   bishi_tile_callback, "none"
373373};
374374
375static const k054338_interface bishi_k054338_intf =
376{
377   0,
378   "none"
379};
380
381375void bishi_state::machine_start()
382376{
383377   save_item(NAME(m_cur_control));
r29478r29479
416410   MCFG_K056832_ADD("k056832", bishi_k056832_intf)
417411   MCFG_K056832_GFXDECODE("gfxdecode")
418412   MCFG_K056832_PALETTE("palette")
419   MCFG_K054338_ADD("k054338", bishi_k054338_intf)
413
414   MCFG_DEVICE_ADD("k054338", K054338, 0)
415   // FP 201404: any reason why this is not connected to the k055555 below?
416
420417   MCFG_K055555_ADD("k055555")
421418
422419   /* sound hardware */
trunk/src/mame/drivers/xexex.c
r29478r29479
460460   ym_set_mixing
461461};
462462
463static const k054338_interface xexex_k054338_intf =
464{
465   0,
466   "none"
467};
468
469463static const k056832_interface xexex_k056832_intf =
470464{
471465   "gfx1", 0,
r29478r29479
570564   MCFG_K053246_PALETTE("palette")
571565   MCFG_K053250_ADD("k053250", "palette", "screen", -5, -16)
572566   MCFG_K053251_ADD("k053251")
567
573568   MCFG_DEVICE_ADD("k053252", K053252, XTAL_32MHz/4)
574   MCFG_K054338_ADD("k054338", xexex_k054338_intf)
575569
570   MCFG_DEVICE_ADD("k054338", K054338, 0)
571
576572   /* sound hardware */
577573   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
578574
trunk/src/mame/video/k054338.c
r29478r29479
11
22#include "emu.h"
33#include "k054338.h"
4#include "k055555.h"
54
65
76#define VERBOSE 0
r29478r29479
237236
238237k054338_device::k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
239238   : device_t(mconfig, K054338, "Konami 054338", tag, owner, clock, "k054338", __FILE__),
240   device_video_interface(mconfig, *this)
239   device_video_interface(mconfig, *this),
240   m_alpha_inv(0),
241   m_k055555_tag("")
241242   //m_regs[32],
242243   //m_shd_rgb[9],
243244{
244245}
245246
246247//-------------------------------------------------
247//  device_config_complete - perform any
248//  operations now that the configuration is
249//  complete
250//-------------------------------------------------
251
252void k054338_device::device_config_complete()
253{
254   // inherit a copy of the static data
255   const k054338_interface *intf = reinterpret_cast<const k054338_interface *>(static_config());
256   if (intf != NULL)
257   *static_cast<k054338_interface *>(this) = *intf;
258
259   // or initialize to defaults if none provided
260   else
261   {
262   m_alpha_inv = 0;
263   m_k055555_tag = "";
264   };
265}
266
267//-------------------------------------------------
268248//  device_start - device-specific startup
269249//-------------------------------------------------
270250
trunk/src/mame/video/k054338.h
r29478r29479
1
21#pragma once
32#ifndef __K054338_H__
43#define __K054338_H__
54
65#include "k055555.h"
76
8#define MCFG_K054338_ADD(_tag, _interface) \
9   MCFG_DEVICE_ADD(_tag, K054338, 0) \
10   MCFG_DEVICE_CONFIG(_interface)
117
12
13
148/* K054338 mixer/alpha blender */
159void K054338_vh_start(running_machine &machine, k055555_device* k055555);
1610DECLARE_WRITE16_HANDLER( K054338_word_w ); // "CLCT" registers
r29478r29479
3832#define K338_CTL_CLIPSL     0x20
3933
4034
41struct k054338_interface
42{
43   int                m_alpha_inv;
44   const char         *m_k055555_tag;
45};
46
47
4835class k054338_device : public device_t,
49                              public device_video_interface,
50                              public k054338_interface
36                  public device_video_interface
5137{
5238public:
5339   k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
5440   ~k054338_device() {}
5541
42   // static configuration
43   static void set_mixer_tag(device_t &device, const char  *tag) { downcast<k054338_device &>(device).m_k055555_tag = tag; }
44   static void set_yinvert(device_t &device, int alpha_inv) { downcast<k054338_device &>(device).m_alpha_inv = alpha_inv; }
45
5646   DECLARE_WRITE16_MEMBER( word_w ); // "CLCT" registers
5747   DECLARE_WRITE32_MEMBER( long_w );
5848
r29478r29479
6858
6959protected:
7060   // device-level overrides
71   virtual void device_config_complete();
7261   virtual void device_start();
7362   virtual void device_reset();
7463
7564private:
7665   // internal state
77   UINT16    m_regs[32];
78   int       m_shd_rgb[9];
66   UINT16      m_regs[32];
67   int         m_shd_rgb[9];
68   int         m_alpha_inv;
69   const char  *m_k055555_tag;
7970
8071   k055555_device *m_k055555;  /* used to fill BG color */
8172};
8273
8374extern const device_type K054338;
8475
76
77#define MCFG_K054338_MIXER(_tag) \
78   k054338_device::set_mixer_tag(*device, _tag);
79
80#define MCFG_K054338_ALPHAINV(_alphainv) \
81   k054338_device::set_alpha_invert(*device, _alphainv);
82
83
8584#endif

Previous 199869 Revisions Next


© 1997-2024 The MAME Team