Previous 199869 Revisions Next

r29480 Wednesday 9th April, 2014 at 10:56:45 UTC by Fabio Priuli
k053936: updated to use inline configs. nw.
[src/mame/drivers]crshrace.c dbz.c f1gp.c metro.c plygonet.c rungun.c suprslam.c tmnt.c
[src/mame/video]k053936.c k053936.h

trunk/src/mame/drivers/crshrace.c
r29479r29480
406406   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
407407}
408408
409static const k053936_interface crshrace_k053936_intf =
410{
411   1, -48, -21 /* wrap, xoff, yoff */
412};
413
414
415409void crshrace_state::machine_start()
416410{
417411   m_z80bank->configure_entries(0, 4, memregion("audiocpu")->base() + 0x10000, 0x8000);
r29479r29480
464458   MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
465459   MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
466460
467   MCFG_K053936_ADD("k053936", crshrace_k053936_intf)
461   MCFG_DEVICE_ADD("k053936", K053936, 0)
462   MCFG_K053936_WRAP(1)
463   MCFG_K053936_OFFSETS(-48, -21)
468464
469
470465   /* sound hardware */
471466   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
472467
trunk/src/mame/drivers/tmnt.c
r29479r29480
20852085   thndrx2_sprite_callback
20862086};
20872087
2088
2089/* 053936 interfaces */
2090static const k053936_interface glfgreat_k053936_interface =
2091{
2092   1, 85, 0        /* wrap, xoff, yoff */
2093};
2094
2095static const k053936_interface prmrsocr_k053936_interface =
2096{
2097   0, 85, 1        /* wrap, xoff, yoff */
2098};
2099
2100
21012088MACHINE_START_MEMBER(tmnt_state,common)
21022089{
21032090   save_item(NAME(m_toggle));
r29479r29480
24962483   MCFG_K053245_ADD("k053245", glfgreat_k05324x_intf)
24972484   MCFG_K053245_GFXDECODE("gfxdecode")
24982485   MCFG_K053245_PALETTE("palette")
2499   MCFG_K053936_ADD("k053936", glfgreat_k053936_interface)
2486
2487   MCFG_DEVICE_ADD("k053936", K053936, 0)
2488   MCFG_K053936_WRAP(1)
2489   MCFG_K053936_OFFSETS(85, 0)
2490
25002491   MCFG_K053251_ADD("k053251")
25012492
25022493   /* sound hardware */
r29479r29480
25622553   MCFG_K053245_ADD("k053245", prmrsocr_k05324x_intf)
25632554   MCFG_K053245_GFXDECODE("gfxdecode")
25642555   MCFG_K053245_PALETTE("palette")
2565   MCFG_K053936_ADD("k053936", prmrsocr_k053936_interface)
2556
2557   MCFG_DEVICE_ADD("k053936", K053936, 0)
2558   MCFG_K053936_OFFSETS(85, 1)
2559
25662560   MCFG_K053251_ADD("k053251")
25672561
25682562   /* sound hardware */
trunk/src/mame/drivers/f1gp.c
r29479r29480
367367   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
368368}
369369
370static const k053936_interface f1gp_k053936_intf =
371{
372   1, -58, -2  /* wrap, xoff, yoff */
373};
374
375static const k053936_interface f1gp2_k053936_intf =
376{
377   1, -48, -21 /* wrap, xoff, yoff */
378};
379
380
381370MACHINE_START_MEMBER(f1gp_state,f1gpb)
382371{
383372   save_item(NAME(m_pending_command));
r29479r29480
452441
453442   MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp)
454443
455   MCFG_K053936_ADD("k053936", f1gp_k053936_intf)
444   MCFG_DEVICE_ADD("k053936", K053936, 0)
445   MCFG_K053936_WRAP(1)
446   MCFG_K053936_OFFSETS(-58, -2)
456447
457448   /* sound hardware */
458449   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r29479r29480
525516   MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
526517   MCFG_VSYSTEM_SPR_PALETTE("palette")
527518
528   MCFG_DEVICE_REMOVE("k053936")
529   MCFG_K053936_ADD("k053936", f1gp2_k053936_intf)
519   MCFG_DEVICE_MODIFY("k053936")
520   MCFG_K053936_OFFSETS(-48, -21)
530521
531522   MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp2)
532523MACHINE_CONFIG_END
trunk/src/mame/drivers/rungun.c
r29479r29480
330330};
331331
332332
333static const k053936_interface rng_k053936_intf =
334{
335   0, 34, 9
336};
337
338333static const k053247_interface rng_k055673_intf =
339334{
340335   "gfx2", 1,
r29479r29480
398393   MCFG_PALETTE_ENABLE_SHADOWS()
399394   MCFG_PALETTE_ENABLE_HILIGHTS()
400395
401   MCFG_K053936_ADD("k053936", rng_k053936_intf)
396   MCFG_DEVICE_ADD("k053936", K053936, 0)
397   MCFG_K053936_OFFSETS(34, 9)
398
402399   MCFG_K055673_ADD("k055673", rng_k055673_intf)
403400   MCFG_K055673_GFXDECODE("gfxdecode")
404401   MCFG_K055673_PALETTE("palette")
trunk/src/mame/drivers/metro.c
r29479r29480
45014501MACHINE_CONFIG_END
45024502
45034503
4504static const k053936_interface blzntrnd_k053936_intf =
4505{
4506   0, -69, -21
4507};
4508
45094504static MACHINE_CONFIG_START( blzntrnd, metro_state )
45104505
45114506   /* basic machine hardware */
r29479r29480
45354530   MCFG_PALETTE_ADD("palette", 0x1000)
45364531   MCFG_PALETTE_FORMAT(GGGGGRRRRRBBBBBx)
45374532
4538   MCFG_K053936_ADD("k053936", blzntrnd_k053936_intf)
4533   MCFG_DEVICE_ADD("k053936", K053936, 0)
4534   MCFG_K053936_OFFSETS(-69, -21)
45394535
45404536   /* sound hardware */
45414537   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r29479r29480
45504546
45514547/* like blzntrnd but new vidstart / gfxdecode for the different bg tilemap */
45524548
4553static const k053936_interface gstrik2_k053936_intf =
4554{
4555   0, -69, -19
4556};
4557
45584549static MACHINE_CONFIG_START( gstrik2, metro_state )
45594550
45604551   /* basic machine hardware */
r29479r29480
45844575   MCFG_PALETTE_ADD("palette", 0x1000)
45854576   MCFG_PALETTE_FORMAT(GGGGGRRRRRBBBBBx)
45864577
4587   MCFG_K053936_ADD("k053936", gstrik2_k053936_intf)
4578   MCFG_DEVICE_ADD("k053936", K053936, 0)
4579   MCFG_K053936_OFFSETS(-69, -19)
45884580
45894581   /* sound hardware */
45904582   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
trunk/src/mame/drivers/dbz.c
r29479r29480
307307   dbz_sprite_callback
308308};
309309
310/* both k053936 use the same wrap/offs */
311static const k053936_interface dbz_k053936_intf =
312{
313   1, -46, -16
314};
315
316310WRITE_LINE_MEMBER(dbz_state::dbz_irq2_ack_w)
317311{
318312   m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE);
r29479r29480
370364   MCFG_K056832_ADD("k056832", dbz_k056832_intf)
371365   MCFG_K056832_GFXDECODE("gfxdecode")
372366   MCFG_K056832_PALETTE("palette")
367
373368   MCFG_K053246_ADD("k053246", dbz_k053246_intf)
374369   MCFG_K053246_GFXDECODE("gfxdecode")
375370   MCFG_K053246_PALETTE("palette")
371
376372   MCFG_K053251_ADD("k053251")
377   MCFG_K053936_ADD("k053936_1", dbz_k053936_intf)
378   MCFG_K053936_ADD("k053936_2", dbz_k053936_intf)
373
374   MCFG_DEVICE_ADD("k053936_1", K053936, 0)
375   MCFG_K053936_WRAP(1)
376   MCFG_K053936_OFFSETS(-46, -16)
377
378   MCFG_DEVICE_ADD("k053936_2", K053936, 0)
379   MCFG_K053936_WRAP(1)
380   MCFG_K053936_OFFSETS(-46, -16)
381
379382   MCFG_DEVICE_ADD("k053252", K053252, 16000000/2)
380383   MCFG_K053252_INT1_ACK_CB(WRITELINE(dbz_state, dbz_irq2_ack_w))
381384
trunk/src/mame/drivers/suprslam.c
r29479r29480
283283
284284/*** MACHINE DRIVER **********************************************************/
285285
286static const k053936_interface suprslam_k053936_intf =
287{
288   1, -45, -21 /* wrap, xoff, yoff */
289};
290
291286void suprslam_state::machine_start()
292287{
293288   save_item(NAME(m_screen_bank));
r29479r29480
333328   MCFG_VSYSTEM_SPR_GFXDECODE("gfxdecode")
334329   MCFG_VSYSTEM_SPR_PALETTE("palette")
335330
336   MCFG_K053936_ADD("k053936", suprslam_k053936_intf)
331   MCFG_DEVICE_ADD("k053936", K053936, 0)
332   MCFG_K053936_WRAP(1)
333   MCFG_K053936_OFFSETS(-45, -21)
337334
338335   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
339336
trunk/src/mame/drivers/plygonet.c
r29479r29480
643643   m_sound_intck = state;
644644}
645645
646
647static const k053936_interface polygonet_k053936_intf =
648{
649   0, 0, 0 /* wrap, xoff, yoff */
650};
651
652646static MACHINE_CONFIG_START( plygonet, polygonet_state )
653647
654648   MCFG_CPU_ADD("maincpu", M68EC020, XTAL_32MHz/2)
r29479r29480
679673
680674   MCFG_PALETTE_ADD("palette", 32768)
681675
682   MCFG_K053936_ADD("k053936", polygonet_k053936_intf)
676   MCFG_DEVICE_ADD("k053936", K053936, 0)
683677
684678   /* sound hardware */
685679   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
trunk/src/mame/video/k053936.c
r29479r29480
220220
221221
222222
223
224
225
226223/***************************************************************************/
227224/*                                                                         */
228225/*                                 053936                                  */
r29479r29480
234231k053936_device::k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
235232   : device_t(mconfig, K053936, "Konami 053936", tag, owner, clock, "k053936", __FILE__),
236233   m_ctrl(NULL),
237   m_linectrl(NULL)
234   m_linectrl(NULL),
235   m_wrap(0),
236   m_xoff(0),
237   m_yoff(0)
238238{
239239}
240240
241241//-------------------------------------------------
242//  device_config_complete - perform any
243//  operations now that the configuration is
244//  complete
245//-------------------------------------------------
246
247void k053936_device::device_config_complete()
248{
249   // inherit a copy of the static data
250   const k053936_interface *intf = reinterpret_cast<const k053936_interface *>(static_config());
251   if (intf != NULL)
252   *static_cast<k053936_interface *>(this) = *intf;
253
254   // or initialize to defaults if none provided
255   else
256   {
257      m_wrap = 0;
258      m_xoff = 0;
259      m_yoff = 0;
260   }
261}
262
263//-------------------------------------------------
264242//  device_start - device-specific startup
265243//-------------------------------------------------
266244
trunk/src/mame/video/k053936.h
r29479r29480
33#define __K053936_H__
44
55
6/* */
7
8
9#define MCFG_K053936_ADD(_tag, _interface) \
10   MCFG_DEVICE_ADD(_tag, K053936, 0) \
11   MCFG_DEVICE_CONFIG(_interface)
12
13
14
156void K053936_0_zoom_draw(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,tilemap_t *tmap,int flags,UINT32 priority, int glfgreat_hack);
167void K053936_wraparound_enable(int chip, int status);
178void K053936_set_offset(int chip, int xoffs, int yoffs);
r29479r29480
2314void K053936GP_0_zoom_draw(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *tmap, int tilebpp, int blend, int alpha, int pixeldouble_output, UINT16* temp_m_k053936_0_ctrl_16, UINT16* temp_m_k053936_0_linectrl_16, UINT16* temp_m_k053936_0_ctrl, UINT16* temp_m_k053936_0_linectrl, palette_device *palette);
2415
2516
26
27
28struct k053936_interface
17class k053936_device : public device_t
2918{
30   int                m_wrap, m_xoff, m_yoff;
31};
32
33
34
35class k053936_device : public device_t,
36                              public k053936_interface
37{
3819public:
3920   k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4021   ~k053936_device() {}
4122
23   // static configuration
24   static void set_wrap(device_t &device, int wrap) { downcast<k053936_device &>(device).m_wrap = wrap; }
25   static void set_offsets(device_t &device, int x_offset, int y_offset)
26   {
27      k053936_device &dev = downcast<k053936_device &>(device);
28      dev.m_xoff = x_offset;
29      dev.m_yoff = y_offset;
30   }
31   
4232   DECLARE_WRITE16_MEMBER( ctrl_w );
4333   DECLARE_READ16_MEMBER( ctrl_r );
4434   DECLARE_WRITE16_MEMBER( linectrl_w );
r29479r29480
4939
5040protected:
5141   // device-level overrides
52   virtual void device_config_complete();
5342   virtual void device_start();
5443   virtual void device_reset();
5544
r29479r29480
5746   // internal state
5847   UINT16    *m_ctrl;
5948   UINT16    *m_linectrl;
49   int       m_wrap, m_xoff, m_yoff;
6050};
6151
6252extern const device_type K053936;
6353
54#define MCFG_K053936_WRAP(_wrap) \
55   k053936_device::set_wrap(*device, _wrap);
6456
57#define MCFG_K053936_OFFSETS(_xoffs, _yoffs) \
58   k053936_device::set_offsets(*device, _xoffs, _yoffs);
6559
66
6760#endif

Previous 199869 Revisions Next


© 1997-2024 The MAME Team