diff options
Diffstat (limited to 'src/mame/olympia/portrait.h')
-rw-r--r-- | src/mame/olympia/portrait.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mame/olympia/portrait.h b/src/mame/olympia/portrait.h index 2d7c986cba1..38c4d3de864 100644 --- a/src/mame/olympia/portrait.h +++ b/src/mame/olympia/portrait.h @@ -1,10 +1,11 @@ // license:BSD-3-Clause -// copyright-holders:Steve Ellenoff, Pierpaolo Prazzoli -#ifndef MAME_INCLUDES_PORTRAIT_H -#define MAME_INCLUDES_PORTRAIT_H +// copyright-holders:Steve Ellenoff, Pierpaolo Prazzoli, Angelo Salese +#ifndef MAME_OLYMPIA_PORTRAIT_H +#define MAME_OLYMPIA_PORTRAIT_H #pragma once +#include "cpu/mcs48/mcs48.h" #include "sound/tms5220.h" #include "emupal.h" #include "tilemap.h" @@ -15,6 +16,7 @@ public: portrait_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") , m_gfxdecode(*this, "gfxdecode") , m_palette(*this, "palette") , m_tms(*this, "tms") @@ -22,6 +24,7 @@ public: , m_fgvideoram(*this, "fgvideoram") , m_spriteram(*this, "spriteram") , m_lamps(*this, "lamp%u", 0U) + , m_photo(*this, "photo") { } static constexpr feature_type unemulated_features() { return feature::CAMERA; } @@ -29,13 +32,12 @@ public: void portrait(machine_config &config); protected: - virtual void machine_start() override { m_lamps.resolve(); } + virtual void machine_start() override { m_lamps.resolve(); m_photo.resolve(); } virtual void video_start() override; private: void ctrl_w(uint8_t data); - void positive_scroll_w(uint8_t data); - void negative_scroll_w(uint8_t data); + void scroll_w(offs_t offset, uint8_t data); void bgvideo_write(offs_t offset, uint8_t data); void fgvideo_write(offs_t offset, uint8_t data); @@ -46,11 +48,12 @@ private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); inline void get_tile_info( tile_data &tileinfo, int tile_index, const uint8_t *source ); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, u8 priority); void portrait_map(address_map &map); void portrait_sound_map(address_map &map); required_device<cpu_device> m_maincpu; + required_device<i8039_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; required_device<tms5200_device> m_tms; @@ -59,10 +62,11 @@ private: required_shared_ptr<uint8_t> m_fgvideoram; required_shared_ptr<uint8_t> m_spriteram; output_finder<2> m_lamps; + output_finder<> m_photo; int m_scroll = 0; tilemap_t *m_foreground = nullptr; tilemap_t *m_background = nullptr; }; -#endif // MAME_INCLUDES_PORTRAIT_H +#endif // MAME_OLYMPIA_PORTRAIT_H |