trunk/src/mame/drivers/airbustr.c
| r29436 | r29437 | |
| 589 | 589 | |
| 590 | 590 | /* Machine Driver */ |
| 591 | 591 | |
| 592 | | static const kaneko_pandora_interface airbustr_pandora_config = |
| 593 | | { |
| 594 | | 1, /* gfx_region */ |
| 595 | | 0, 0 /* x_offs, y_offs */ |
| 596 | | }; |
| 597 | | |
| 598 | 592 | static MACHINE_CONFIG_START( airbustr, airbustr_state ) |
| 599 | 593 | |
| 600 | 594 | /* basic machine hardware */ |
| r29436 | r29437 | |
| 631 | 625 | MCFG_PALETTE_ADD("palette", 768) |
| 632 | 626 | MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) |
| 633 | 627 | |
| 634 | | MCFG_KANEKO_PANDORA_ADD("pandora", airbustr_pandora_config) |
| 628 | MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) |
| 629 | MCFG_KANEKO_PANDORA_GFX_REGION(1) |
| 635 | 630 | MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") |
| 636 | 631 | MCFG_KANEKO_PANDORA_PALETTE("palette") |
| 637 | 632 | |
trunk/src/mame/drivers/snowbros.c
| r29436 | r29437 | |
| 1509 | 1509 | m_hyperpac_ram[0x2000/2 + i] = PROTDATA[i]; |
| 1510 | 1510 | } |
| 1511 | 1511 | |
| 1512 | | static const kaneko_pandora_interface snowbros_pandora_config = |
| 1513 | | { |
| 1514 | | 0, /* gfx_region */ |
| 1515 | | 0, 0 /* x_offs, y_offs */ |
| 1516 | | }; |
| 1517 | | |
| 1518 | 1512 | static MACHINE_CONFIG_START( snowbros, snowbros_state ) |
| 1519 | 1513 | |
| 1520 | 1514 | /* basic machine hardware */ |
| r29436 | r29437 | |
| 1540 | 1534 | MCFG_PALETTE_ADD("palette", 256) |
| 1541 | 1535 | MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) |
| 1542 | 1536 | |
| 1543 | | MCFG_KANEKO_PANDORA_ADD("pandora", snowbros_pandora_config) |
| 1537 | MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) |
| 1544 | 1538 | MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") |
| 1545 | 1539 | MCFG_KANEKO_PANDORA_PALETTE("palette") |
| 1546 | 1540 | |
trunk/src/mame/drivers/hvyunit.c
| r29436 | r29437 | |
| 625 | 625 | m_mastercpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | | static const kaneko_pandora_interface hvyunit_pandora_config = |
| 629 | | { |
| 630 | | 0, /* gfx_region */ |
| 631 | | 0, 0 /* x_offs, y_offs */ |
| 632 | | }; |
| 633 | | |
| 634 | | |
| 635 | 628 | /************************************* |
| 636 | 629 | * |
| 637 | 630 | * Machine driver |
| r29436 | r29437 | |
| 660 | 653 | |
| 661 | 654 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 662 | 655 | |
| 663 | | |
| 664 | 656 | MCFG_SCREEN_ADD("screen", RASTER) |
| 665 | 657 | MCFG_SCREEN_REFRESH_RATE(58) |
| 666 | 658 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| r29436 | r29437 | |
| 674 | 666 | MCFG_PALETTE_ADD("palette", 0x800) |
| 675 | 667 | MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) |
| 676 | 668 | |
| 677 | | MCFG_KANEKO_PANDORA_ADD("pandora", hvyunit_pandora_config) |
| 669 | MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) |
| 678 | 670 | MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") |
| 679 | 671 | MCFG_KANEKO_PANDORA_PALETTE("palette") |
| 680 | 672 | |
trunk/src/mame/drivers/galpanic.c
| r29436 | r29437 | |
| 545 | 545 | GFXDECODE_END |
| 546 | 546 | |
| 547 | 547 | |
| 548 | | static const kaneko_pandora_interface galpanic_pandora_config = |
| 549 | | { |
| 550 | | 0, /* gfx_region */ |
| 551 | | 0, -16 /* x_offs, y_offs */ |
| 552 | | }; |
| 553 | | |
| 554 | | |
| 555 | 548 | static MACHINE_CONFIG_START( galpanic, galpanic_state ) |
| 556 | 549 | |
| 557 | 550 | /* basic machine hardware */ |
| r29436 | r29437 | |
| 573 | 566 | MCFG_PALETTE_ADD("palette", 1024 + 32768) |
| 574 | 567 | MCFG_PALETTE_INIT_OWNER(galpanic_state,galpanic) |
| 575 | 568 | |
| 576 | | MCFG_KANEKO_PANDORA_ADD("pandora", galpanic_pandora_config) |
| 569 | MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) |
| 570 | MCFG_KANEKO_PANDORA_OFFSETS(0, -16) |
| 577 | 571 | MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") |
| 578 | 572 | MCFG_KANEKO_PANDORA_PALETTE("palette") |
| 579 | 573 | |
| 580 | 574 | MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0) |
| 581 | 575 | kaneko_hit_device::set_type(*device, 0); |
| 582 | 576 | |
| 583 | | |
| 584 | | |
| 585 | | |
| 586 | 577 | MCFG_VIDEO_START_OVERRIDE(galpanic_state,galpanic) |
| 587 | 578 | |
| 588 | 579 | /* sound hardware */ |
trunk/src/mame/drivers/djboy.c
| r29436 | r29437 | |
| 501 | 501 | m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | | static const kaneko_pandora_interface djboy_pandora_config = |
| 505 | | { |
| 506 | | 0, /* gfx_region */ |
| 507 | | 0, 0 /* x_offs, y_offs */ |
| 508 | | }; |
| 509 | | |
| 510 | | |
| 511 | 504 | void djboy_state::machine_start() |
| 512 | 505 | { |
| 513 | 506 | UINT8 *MAIN = memregion("maincpu")->base(); |
| r29436 | r29437 | |
| 584 | 577 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", djboy) |
| 585 | 578 | MCFG_PALETTE_ADD("palette", 0x200) |
| 586 | 579 | |
| 587 | | MCFG_KANEKO_PANDORA_ADD("pandora", djboy_pandora_config) |
| 580 | MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) |
| 588 | 581 | MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") |
| 589 | 582 | MCFG_KANEKO_PANDORA_PALETTE("palette") |
| 590 | 583 | |
trunk/src/mame/drivers/sandscrp.c
| r29436 | r29437 | |
| 480 | 480 | }; |
| 481 | 481 | |
| 482 | 482 | |
| 483 | | static const kaneko_pandora_interface sandscrp_pandora_config = |
| 484 | | { |
| 485 | | 0, /* gfx_region */ |
| 486 | | 0, 0 /* x_offs, y_offs */ |
| 487 | | }; |
| 488 | | |
| 489 | 483 | static MACHINE_CONFIG_START( sandscrp, sandscrp_state ) |
| 490 | 484 | |
| 491 | 485 | /* basic machine hardware */ |
| r29436 | r29437 | |
| 499 | 493 | |
| 500 | 494 | MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ |
| 501 | 495 | |
| 502 | | |
| 503 | 496 | /* video hardware */ |
| 504 | 497 | MCFG_SCREEN_ADD("screen", RASTER) |
| 505 | 498 | MCFG_SCREEN_REFRESH_RATE(60) |
| r29436 | r29437 | |
| 522 | 515 | MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0) |
| 523 | 516 | kaneko_hit_device::set_type(*device, 0); |
| 524 | 517 | |
| 525 | | MCFG_KANEKO_PANDORA_ADD("pandora", sandscrp_pandora_config) |
| 518 | MCFG_DEVICE_ADD("pandora", KANEKO_PANDORA, 0) |
| 526 | 519 | MCFG_KANEKO_PANDORA_GFXDECODE("gfxdecode") |
| 527 | 520 | MCFG_KANEKO_PANDORA_PALETTE("palette") |
| 528 | 521 | |
trunk/src/mame/video/kan_pand.c
| r29436 | r29437 | |
| 55 | 55 | kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 56 | 56 | : device_t(mconfig, KANEKO_PANDORA, "Kaneko Pandora - PX79C480FP-3", tag, owner, clock, "kaneko_pandora", __FILE__), |
| 57 | 57 | device_video_interface(mconfig, *this), |
| 58 | m_gfx_region(0), |
| 59 | m_xoffset(0), |
| 60 | m_yoffset(0), |
| 58 | 61 | m_gfxdecode(*this), |
| 59 | 62 | m_palette(*this) |
| 60 | 63 | { |
| r29436 | r29437 | |
| 81 | 84 | } |
| 82 | 85 | |
| 83 | 86 | //------------------------------------------------- |
| 84 | | // device_config_complete - perform any |
| 85 | | // operations now that the configuration is |
| 86 | | // complete |
| 87 | | //------------------------------------------------- |
| 88 | | |
| 89 | | void kaneko_pandora_device::device_config_complete() |
| 90 | | { |
| 91 | | // inherit a copy of the static data |
| 92 | | const kaneko_pandora_interface *intf = reinterpret_cast<const kaneko_pandora_interface *>(static_config()); |
| 93 | | if (intf != NULL) |
| 94 | | *static_cast<kaneko_pandora_interface *>(this) = *intf; |
| 95 | | |
| 96 | | // or initialize to defaults if none provided |
| 97 | | else |
| 98 | | { |
| 99 | | m_gfx_region = 0; |
| 100 | | m_xoffset = 0; |
| 101 | | m_yoffset = 0; |
| 102 | | } |
| 103 | | } |
| 104 | | |
| 105 | | //------------------------------------------------- |
| 106 | 87 | // device_start - device-specific startup |
| 107 | 88 | //------------------------------------------------- |
| 108 | 89 | |
trunk/src/mame/video/kan_pand.h
| r29436 | r29437 | |
| 13 | 13 | TYPE DEFINITIONS |
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | | struct kaneko_pandora_interface |
| 17 | | { |
| 18 | | UINT8 m_gfx_region; |
| 19 | | int m_xoffset; |
| 20 | | int m_yoffset; |
| 21 | | }; |
| 22 | | |
| 23 | 16 | class kaneko_pandora_device : public device_t, |
| 24 | | public device_video_interface, |
| 25 | | public kaneko_pandora_interface |
| 17 | public device_video_interface |
| 26 | 18 | { |
| 27 | 19 | public: |
| 28 | 20 | kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| r29436 | r29437 | |
| 31 | 23 | // static configuration |
| 32 | 24 | static void static_set_gfxdecode_tag(device_t &device, const char *tag); |
| 33 | 25 | static void static_set_palette_tag(device_t &device, const char *tag); |
| 34 | | |
| 26 | static void set_gfx_region(device_t &device, int gfxregion) { downcast<kaneko_pandora_device &>(device).m_gfx_region = gfxregion; } |
| 27 | static void set_offsets(device_t &device, int x_offset, int y_offset) |
| 28 | { |
| 29 | kaneko_pandora_device &dev = downcast<kaneko_pandora_device &>(device); |
| 30 | dev.m_xoffset = x_offset; |
| 31 | dev.m_yoffset = y_offset; |
| 32 | } |
| 33 | |
| 35 | 34 | DECLARE_WRITE8_MEMBER ( spriteram_w ); |
| 36 | 35 | DECLARE_READ8_MEMBER( spriteram_r ); |
| 37 | 36 | DECLARE_WRITE16_MEMBER( spriteram_LSB_w ); |
| r29436 | r29437 | |
| 43 | 42 | |
| 44 | 43 | protected: |
| 45 | 44 | // device-level overrides |
| 46 | | virtual void device_config_complete(); |
| 47 | 45 | virtual void device_start(); |
| 48 | 46 | virtual void device_reset(); |
| 49 | 47 | |
| r29436 | r29437 | |
| 55 | 53 | bitmap_ind16 *m_sprites_bitmap; /* bitmap to render sprites to, Pandora seems to be frame'buffered' */ |
| 56 | 54 | int m_clear_bitmap; |
| 57 | 55 | int m_bg_pen; // might work some other way.. |
| 56 | UINT8 m_gfx_region; |
| 57 | int m_xoffset; |
| 58 | int m_yoffset; |
| 58 | 59 | required_device<gfxdecode_device> m_gfxdecode; |
| 59 | 60 | required_device<palette_device> m_palette; |
| 60 | 61 | }; |
| r29436 | r29437 | |
| 66 | 67 | DEVICE CONFIGURATION MACROS |
| 67 | 68 | ***************************************************************************/ |
| 68 | 69 | |
| 69 | | #define MCFG_KANEKO_PANDORA_ADD(_tag, _interface) \ |
| 70 | | MCFG_DEVICE_ADD(_tag, KANEKO_PANDORA, 0) \ |
| 71 | | MCFG_DEVICE_CONFIG(_interface) |
| 70 | #define MCFG_KANEKO_PANDORA_GFX_REGION(_region) \ |
| 71 | kaneko_pandora_device::set_gfx_region(*device, _region); |
| 72 | 72 | |
| 73 | #define MCFG_KANEKO_PANDORA_OFFSETS(_xoffs, _yoffs) \ |
| 74 | kaneko_pandora_device::set_offsets(*device, _xoffs, _yoffs); |
| 75 | |
| 73 | 76 | #define MCFG_KANEKO_PANDORA_GFXDECODE(_gfxtag) \ |
| 74 | 77 | kaneko_pandora_device::static_set_gfxdecode_tag(*device, "^" _gfxtag); |
| 75 | 78 | |