trunk/src/mame/drivers/tgtpanic.c
| r244854 | r244855 | |
| 18 | 18 | public: |
| 19 | 19 | tgtpanic_state(const machine_config &mconfig, device_type type, const char *tag) |
| 20 | 20 | : driver_device(mconfig, type, tag), |
| 21 | | m_ram(*this, "ram"), |
| 22 | 21 | m_maincpu(*this, "maincpu"), |
| 23 | | m_screen(*this, "screen") { } |
| 22 | m_screen(*this, "screen"), |
| 23 | m_ram(*this, "ram") { } |
| 24 | 24 | |
| 25 | required_device<cpu_device> m_maincpu; |
| 26 | required_device<screen_device> m_screen; |
| 27 | |
| 25 | 28 | required_shared_ptr<UINT8> m_ram; |
| 29 | |
| 26 | 30 | UINT8 m_color; |
| 31 | |
| 27 | 32 | DECLARE_WRITE8_MEMBER(color_w); |
| 28 | | UINT32 screen_update_tgtpanic(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 29 | | required_device<cpu_device> m_maincpu; |
| 30 | | required_device<screen_device> m_screen; |
| 33 | |
| 34 | virtual void machine_start(); |
| 35 | |
| 36 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 31 | 37 | }; |
| 32 | 38 | |
| 33 | 39 | |
| 40 | void tgtpanic_state::machine_start() |
| 41 | { |
| 42 | save_item(NAME(m_color)); |
| 43 | } |
| 44 | |
| 34 | 45 | /************************************* |
| 35 | 46 | * |
| 36 | 47 | * Video hardware |
| 37 | 48 | * |
| 38 | 49 | *************************************/ |
| 39 | 50 | |
| 40 | | UINT32 tgtpanic_state::screen_update_tgtpanic(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 51 | UINT32 tgtpanic_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 41 | 52 | { |
| 42 | 53 | UINT32 colors[4]; |
| 43 | 54 | UINT32 offs; |
| r244854 | r244855 | |
| 146 | 157 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* Unverified */ |
| 147 | 158 | MCFG_SCREEN_SIZE(256, 256) |
| 148 | 159 | MCFG_SCREEN_VISIBLE_AREA(0, 192 - 1, 0, 192 - 1) |
| 149 | | MCFG_SCREEN_UPDATE_DRIVER(tgtpanic_state, screen_update_tgtpanic) |
| 160 | MCFG_SCREEN_UPDATE_DRIVER(tgtpanic_state, screen_update) |
| 150 | 161 | MACHINE_CONFIG_END |
| 151 | 162 | |
| 152 | 163 | |
| r244854 | r244855 | |
| 168 | 179 | * |
| 169 | 180 | *************************************/ |
| 170 | 181 | |
| 171 | | GAME( 1996, tgtpanic, 0, tgtpanic, tgtpanic, driver_device, 0, ROT0, "Konami", "Target Panic", GAME_NO_SOUND_HW ) |
| 182 | GAME( 1996, tgtpanic, 0, tgtpanic, tgtpanic, driver_device, 0, ROT0, "Konami", "Target Panic", GAME_NO_SOUND_HW | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/drivers/xtheball.c
| r244854 | r244855 | |
| 30 | 30 | |
| 31 | 31 | required_device<cpu_device> m_maincpu; |
| 32 | 32 | required_device<tlc34076_device> m_tlc34076; |
| 33 | |
| 33 | 34 | required_shared_ptr<UINT16> m_vram_bg; |
| 34 | 35 | required_shared_ptr<UINT16> m_vram_fg; |
| 36 | |
| 35 | 37 | required_ioport m_analog_x; |
| 36 | 38 | required_ioport m_analog_y; |
| 39 | |
| 37 | 40 | UINT8 m_bitvals[32]; |
| 41 | |
| 38 | 42 | DECLARE_WRITE16_MEMBER(bit_controls_w); |
| 39 | 43 | DECLARE_READ16_MEMBER(analogx_r); |
| 40 | 44 | DECLARE_READ16_MEMBER(analogy_watchdog_r); |
| 45 | |
| 46 | virtual void machine_start(); |
| 47 | |
| 41 | 48 | TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); |
| 42 | 49 | TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); |
| 43 | 50 | TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update); |
| 44 | 51 | }; |
| 45 | 52 | |
| 46 | 53 | |
| 54 | void xtheball_state::machine_start() |
| 55 | { |
| 56 | save_item(NAME(m_bitvals)); |
| 57 | } |
| 47 | 58 | |
| 48 | | |
| 49 | 59 | /************************************* |
| 50 | 60 | * |
| 51 | 61 | * Video update |
| r244854 | r244855 | |
| 108 | 118 | else if (address >= 0x02000000 && address <= 0x020fffff) |
| 109 | 119 | memcpy(shiftreg, &m_vram_fg[TOWORD(address & 0xff000)], TOBYTE(0x1000)); |
| 110 | 120 | else |
| 111 | | logerror("%s:xtheball_to_shiftreg(%08X)\n", space.machine().describe_context(), address); |
| 121 | logerror("%s:to_shiftreg(%08X)\n", space.machine().describe_context(), address); |
| 112 | 122 | } |
| 113 | 123 | |
| 114 | 124 | |
| r244854 | r244855 | |
| 119 | 129 | else if (address >= 0x02000000 && address <= 0x020fffff) |
| 120 | 130 | memcpy(&m_vram_fg[TOWORD(address & 0xff000)], shiftreg, TOBYTE(0x1000)); |
| 121 | 131 | else |
| 122 | | logerror("%s:xtheball_from_shiftreg(%08X)\n", space.machine().describe_context(), address); |
| 132 | logerror("%s:from_shiftreg(%08X)\n", space.machine().describe_context(), address); |
| 123 | 133 | } |
| 124 | 134 | |
| 125 | 135 | |
| r244854 | r244855 | |
| 381 | 391 | * |
| 382 | 392 | *************************************/ |
| 383 | 393 | |
| 384 | | GAME( 1991, xtheball, 0, xtheball, xtheball, driver_device, 0, ROT0, "Rare", "X the Ball", 0 ) |
| 394 | GAME( 1991, xtheball, 0, xtheball, xtheball, driver_device, 0, ROT0, "Rare", "X the Ball", GAME_SUPPORTS_SAVE ) |