trunk/src/mame/drivers/pipeline.c
| r243605 | r243606 | |
| 77 | 77 | public: |
| 78 | 78 | pipeline_state(const machine_config &mconfig, device_type type, const char *tag) |
| 79 | 79 | : driver_device(mconfig, type, tag), |
| 80 | | m_vram1(*this, "vram1"), |
| 81 | | m_vram2(*this, "vram2"), |
| 82 | 80 | m_maincpu(*this, "maincpu"), |
| 83 | 81 | m_gfxdecode(*this, "gfxdecode"), |
| 84 | | m_palette(*this, "palette") { } |
| 82 | m_palette(*this, "palette"), |
| 83 | m_vram1(*this, "vram1"), |
| 84 | m_vram2(*this, "vram2") { } |
| 85 | 85 | |
| 86 | required_device<cpu_device> m_maincpu; |
| 87 | required_device<gfxdecode_device> m_gfxdecode; |
| 88 | required_device<palette_device> m_palette; |
| 89 | |
| 90 | required_shared_ptr<UINT8> m_vram1; |
| 91 | required_shared_ptr<UINT8> m_vram2; |
| 92 | |
| 86 | 93 | tilemap_t *m_tilemap1; |
| 87 | 94 | tilemap_t *m_tilemap2; |
| 88 | | required_shared_ptr<UINT8> m_vram1; |
| 89 | | required_shared_ptr<UINT8> m_vram2; |
| 95 | |
| 90 | 96 | UINT8 m_vidctrl; |
| 91 | 97 | UINT8 *m_palram; |
| 92 | 98 | UINT8 m_toMCU; |
| 93 | 99 | UINT8 m_fromMCU; |
| 94 | 100 | UINT8 m_ddrA; |
| 101 | |
| 95 | 102 | DECLARE_WRITE8_MEMBER(vram2_w); |
| 96 | 103 | DECLARE_WRITE8_MEMBER(vram1_w); |
| 97 | 104 | DECLARE_WRITE8_MEMBER(mcu_portA_w); |
| r243605 | r243606 | |
| 100 | 107 | DECLARE_WRITE8_MEMBER(vidctrl_w); |
| 101 | 108 | DECLARE_READ8_MEMBER(protection_r); |
| 102 | 109 | DECLARE_WRITE8_MEMBER(protection_w); |
| 110 | |
| 103 | 111 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 104 | 112 | TILE_GET_INFO_MEMBER(get_tile_info2); |
| 113 | |
| 114 | virtual void machine_start(); |
| 105 | 115 | virtual void video_start(); |
| 106 | 116 | DECLARE_PALETTE_INIT(pipeline); |
| 107 | | UINT32 screen_update_pipeline(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 117 | |
| 118 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 119 | |
| 108 | 120 | TIMER_CALLBACK_MEMBER(protection_deferred_w); |
| 109 | | required_device<cpu_device> m_maincpu; |
| 110 | | required_device<gfxdecode_device> m_gfxdecode; |
| 111 | | required_device<palette_device> m_palette; |
| 112 | 121 | }; |
| 113 | 122 | |
| 114 | 123 | |
| 124 | void pipeline_state::machine_start() |
| 125 | { |
| 126 | save_item(NAME(m_toMCU)); |
| 127 | save_item(NAME(m_fromMCU)); |
| 128 | save_item(NAME(m_ddrA)); |
| 129 | } |
| 130 | |
| 115 | 131 | TILE_GET_INFO_MEMBER(pipeline_state::get_tile_info) |
| 116 | 132 | { |
| 117 | 133 | int code = m_vram2[tile_index]+m_vram2[tile_index+0x800]*256; |
| r243605 | r243606 | |
| 137 | 153 | m_tilemap1 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32 ); |
| 138 | 154 | m_tilemap2 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info2),this),TILEMAP_SCAN_ROWS,8,8,64,32 ); |
| 139 | 155 | m_tilemap2->set_transparent_pen(0); |
| 156 | |
| 157 | save_item(NAME(m_vidctrl)); |
| 158 | save_pointer(NAME(m_palram), 0x1000); |
| 140 | 159 | } |
| 141 | 160 | |
| 142 | | UINT32 pipeline_state::screen_update_pipeline(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 161 | UINT32 pipeline_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 143 | 162 | { |
| 144 | 163 | m_tilemap1->draw(screen, bitmap, cliprect, 0,0); |
| 145 | 164 | m_tilemap2->draw(screen, bitmap, cliprect, 0,0); |
| r243605 | r243606 | |
| 377 | 396 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 378 | 397 | MCFG_SCREEN_SIZE(512, 512) |
| 379 | 398 | MCFG_SCREEN_VISIBLE_AREA(0, 319, 16, 239) |
| 380 | | MCFG_SCREEN_UPDATE_DRIVER(pipeline_state, screen_update_pipeline) |
| 399 | MCFG_SCREEN_UPDATE_DRIVER(pipeline_state, screen_update) |
| 381 | 400 | MCFG_SCREEN_PALETTE("palette") |
| 382 | 401 | |
| 383 | 402 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", pipeline) |
| r243605 | r243606 | |
| 424 | 443 | ROM_LOAD( "82s123.u79", 0x00200, 0x00020,CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) ) |
| 425 | 444 | ROM_END |
| 426 | 445 | |
| 427 | | GAME( 1990, pipeline, 0, pipeline, pipeline, driver_device, 0, ROT0, "Daehyun Electronics", "Pipeline",GAME_NO_SOUND ) |
| 446 | GAME( 1990, pipeline, 0, pipeline, pipeline, driver_device, 0, ROT0, "Daehyun Electronics", "Pipeline", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) |