mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
wswan.cpp : Updates
Remove hardcoded tags, Add device_video_interface for screen
This commit is contained in:
parent
dfeccacffc
commit
6e638fca24
@ -46,14 +46,14 @@ void wswan_state::wswan_mem(address_map &map)
|
||||
{
|
||||
map(0x00000, 0x03fff).rw(m_vdp, FUNC(wswan_video_device::vram_r), FUNC(wswan_video_device::vram_w)); // 16kb RAM / 4 colour tiles
|
||||
map(0x04000, 0x0ffff).noprw(); // nothing
|
||||
//AM_RANGE(0x10000, 0xeffff) // cart range, setup at machine_start
|
||||
//map(0x10000, 0xeffff) // cart range, setup at machine_start
|
||||
map(0xf0000, 0xfffff).r(FUNC(wswan_state::bios_r));
|
||||
}
|
||||
|
||||
void wscolor_state::wscolor_mem(address_map &map)
|
||||
{
|
||||
map(0x00000, 0x0ffff).rw("vdp", FUNC(wswan_video_device::vram_r), FUNC(wswan_video_device::vram_w)); // 16kb RAM / 4 colour tiles, 16 colour tiles + palettes
|
||||
//AM_RANGE(0x10000, 0xeffff) // cart range, setup at machine_start
|
||||
//map(0x10000, 0xeffff) // cart range, setup at machine_start
|
||||
map(0xf0000, 0xfffff).r(FUNC(wscolor_state::bios_r));
|
||||
}
|
||||
|
||||
@ -125,6 +125,7 @@ void wswan_state::wswan(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_IO, &wswan_state::wswan_io);
|
||||
|
||||
WSWAN_VIDEO(config, m_vdp, 0);
|
||||
m_vdp->set_screen("screen");
|
||||
m_vdp->set_vdp_type(VDP_TYPE_WSWAN);
|
||||
m_vdp->set_irq_callback(FUNC(wswan_state::set_irq_line), this);
|
||||
m_vdp->set_dmasnd_callback(FUNC(wswan_state::dma_sound_cb), this);
|
||||
|
@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(WSWAN_VIDEO, wswan_video_device, "wswan_video", "Bandai Wonde
|
||||
|
||||
wswan_video_device::wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, WSWAN_VIDEO, tag, owner, clock)
|
||||
, m_screen(*this, ":screen")
|
||||
, device_video_interface(mconfig, *this)
|
||||
, m_vdp_type(VDP_TYPE_WSWAN)
|
||||
{
|
||||
}
|
||||
@ -82,7 +82,7 @@ void wswan_video_device::common_save()
|
||||
|
||||
void wswan_video_device::device_start()
|
||||
{
|
||||
m_screen->register_screen_bitmap(m_bitmap);
|
||||
screen().register_screen_bitmap(m_bitmap);
|
||||
|
||||
m_timer = timer_alloc(TIMER_SCANLINE);
|
||||
m_timer->adjust(attotime::from_ticks(256, 3072000), 0, attotime::from_ticks(256, 3072000));
|
||||
|
@ -34,7 +34,7 @@ typedef device_delegate<void (int irq)> wswan_video_irq_cb_delegate;
|
||||
typedef device_delegate<void (void)> wswan_video_dmasnd_cb_delegate;
|
||||
#define WSWAN_VIDEO_DMASND_CB_MEMBER(_name) void _name(void)
|
||||
|
||||
class wswan_video_device : public device_t
|
||||
class wswan_video_device : public device_t, public device_video_interface
|
||||
{
|
||||
public:
|
||||
wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
@ -68,8 +68,6 @@ protected:
|
||||
void scanline_interrupt();
|
||||
void common_save();
|
||||
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
bitmap_ind16 m_bitmap;
|
||||
uint8_t m_layer_bg_enable; /* Background layer on/off */
|
||||
uint8_t m_layer_fg_enable; /* Foreground layer on/off */
|
||||
|
Loading…
Reference in New Issue
Block a user