mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
first_screen removal from a5105, apc, osbexec, pasopia7, pc88va, scv (nw)
This commit is contained in:
parent
d05c2080aa
commit
8365385013
@ -43,6 +43,7 @@ public:
|
|||||||
a5105_state(const machine_config &mconfig, device_type type, const char *tag)
|
a5105_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag)
|
: driver_device(mconfig, type, tag)
|
||||||
, m_maincpu(*this, "maincpu")
|
, m_maincpu(*this, "maincpu")
|
||||||
|
, m_screen(*this, "screen")
|
||||||
, m_hgdc(*this, "upd7220")
|
, m_hgdc(*this, "upd7220")
|
||||||
, m_cass(*this, "cassette")
|
, m_cass(*this, "cassette")
|
||||||
, m_beep(*this, "beeper")
|
, m_beep(*this, "beeper")
|
||||||
@ -86,6 +87,7 @@ private:
|
|||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
virtual void video_start() override;
|
virtual void video_start() override;
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
required_device<upd7220_device> m_hgdc;
|
required_device<upd7220_device> m_hgdc;
|
||||||
required_device<cassette_image_device> m_cass;
|
required_device<cassette_image_device> m_cass;
|
||||||
required_device<beep_device> m_beep;
|
required_device<beep_device> m_beep;
|
||||||
@ -135,7 +137,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( a5105_state::hgdc_draw_text )
|
|||||||
{
|
{
|
||||||
tile_data = m_char_ram[(tile*8+yi) & 0x7ff];
|
tile_data = m_char_ram[(tile*8+yi) & 0x7ff];
|
||||||
|
|
||||||
if(cursor_on && cursor_addr == addr+x && machine().first_screen()->frame_number() & 0x10)
|
if(cursor_on && cursor_addr == addr+x && m_screen->frame_number() & 0x10)
|
||||||
tile_data^=0xff;
|
tile_data^=0xff;
|
||||||
|
|
||||||
for( xi = 0; xi < 8; xi++)
|
for( xi = 0; xi < 8; xi++)
|
||||||
@ -148,7 +150,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( a5105_state::hgdc_draw_text )
|
|||||||
|
|
||||||
if(yi >= 8) { pen = 0; }
|
if(yi >= 8) { pen = 0; }
|
||||||
|
|
||||||
if(!machine().first_screen()->visible_area().contains(res_x+0, res_y))
|
if(!m_screen->visible_area().contains(res_x+0, res_y))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bitmap.pix32(res_y, res_x) = palette[pen];
|
bitmap.pix32(res_y, res_x) = palette[pen];
|
||||||
|
@ -75,6 +75,7 @@ public:
|
|||||||
apc_state(const machine_config &mconfig, device_type type, const char *tag)
|
apc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_screen(*this, "screen"),
|
||||||
m_hgdc1(*this, "upd7220_chr"),
|
m_hgdc1(*this, "upd7220_chr"),
|
||||||
m_hgdc2(*this, "upd7220_btm"),
|
m_hgdc2(*this, "upd7220_btm"),
|
||||||
m_rtc(*this, "upd1990a"),
|
m_rtc(*this, "upd1990a"),
|
||||||
@ -90,6 +91,7 @@ public:
|
|||||||
|
|
||||||
// devices
|
// devices
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
required_device<upd7220_device> m_hgdc1;
|
required_device<upd7220_device> m_hgdc1;
|
||||||
required_device<upd7220_device> m_hgdc2;
|
required_device<upd7220_device> m_hgdc2;
|
||||||
required_device<upd1990a_device> m_rtc;
|
required_device<upd1990a_device> m_rtc;
|
||||||
@ -238,7 +240,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( apc_state::hgdc_draw_text )
|
|||||||
res_x = (x*8+xi);
|
res_x = (x*8+xi);
|
||||||
res_y = y+yi;
|
res_y = y+yi;
|
||||||
|
|
||||||
if(!machine().first_screen()->visible_area().contains(res_x, res_y))
|
if(!m_screen->visible_area().contains(res_x, res_y))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -271,9 +273,9 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( apc_state::hgdc_draw_text )
|
|||||||
if(u_line && yi == lr-1) { tile_data = 0xff; }
|
if(u_line && yi == lr-1) { tile_data = 0xff; }
|
||||||
if(o_line && yi == 0) { tile_data = 0xff; }
|
if(o_line && yi == 0) { tile_data = 0xff; }
|
||||||
if(v_line) { tile_data|=1; }
|
if(v_line) { tile_data|=1; }
|
||||||
if(blink && machine().first_screen()->frame_number() & 0x20) { tile_data = 0; } // TODO: rate & correct behaviour
|
if(blink && m_screen->frame_number() & 0x20) { tile_data = 0; } // TODO: rate & correct behaviour
|
||||||
|
|
||||||
if(cursor_on && cursor_addr == tile_addr && machine().first_screen()->frame_number() & 0x10)
|
if(cursor_on && cursor_addr == tile_addr && m_screen->frame_number() & 0x10)
|
||||||
tile_data^=0xff;
|
tile_data^=0xff;
|
||||||
|
|
||||||
if(yi >= char_size)
|
if(yi >= char_size)
|
||||||
|
@ -36,6 +36,7 @@ public:
|
|||||||
osbexec_state(const machine_config &mconfig, device_type type, const char *tag)
|
osbexec_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu( *this, "maincpu" ),
|
m_maincpu( *this, "maincpu" ),
|
||||||
|
m_screen( *this, "screen" ),
|
||||||
m_mb8877( *this, "mb8877" ),
|
m_mb8877( *this, "mb8877" ),
|
||||||
m_messram( *this, RAM_TAG ),
|
m_messram( *this, RAM_TAG ),
|
||||||
m_pia_0( *this, "pia_0" ),
|
m_pia_0( *this, "pia_0" ),
|
||||||
@ -47,6 +48,7 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
required_device<mb8877_device> m_mb8877;
|
required_device<mb8877_device> m_mb8877;
|
||||||
required_device<ram_device> m_messram;
|
required_device<ram_device> m_messram;
|
||||||
required_device<pia6821_device> m_pia_0;
|
required_device<pia6821_device> m_pia_0;
|
||||||
@ -319,7 +321,7 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
void osbexec_state::video_start()
|
void osbexec_state::video_start()
|
||||||
{
|
{
|
||||||
machine().first_screen()->register_screen_bitmap(m_bitmap);
|
m_screen->register_screen_bitmap(m_bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t osbexec_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t osbexec_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
@ -472,7 +474,7 @@ SLOT_INTERFACE_END
|
|||||||
|
|
||||||
TIMER_CALLBACK_MEMBER(osbexec_state::osbexec_video_callback)
|
TIMER_CALLBACK_MEMBER(osbexec_state::osbexec_video_callback)
|
||||||
{
|
{
|
||||||
int y = machine().first_screen()->vpos();
|
int y = m_screen->vpos();
|
||||||
|
|
||||||
/* Start of frame */
|
/* Start of frame */
|
||||||
if ( y == 0 )
|
if ( y == 0 )
|
||||||
@ -519,7 +521,7 @@ TIMER_CALLBACK_MEMBER(osbexec_state::osbexec_video_callback)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_video_timer->adjust( machine().first_screen()->time_until_pos( y + 1, 0 ) );
|
m_video_timer->adjust( m_screen->time_until_pos( y + 1, 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -544,7 +546,7 @@ void osbexec_state::machine_reset()
|
|||||||
|
|
||||||
set_banks();
|
set_banks();
|
||||||
|
|
||||||
m_video_timer->adjust( machine().first_screen()->time_until_pos( 0, 0 ) );
|
m_video_timer->adjust( m_screen->time_until_pos( 0, 0 ) );
|
||||||
|
|
||||||
m_rtc = 0;
|
m_rtc = 0;
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
pasopia7_state(const machine_config &mconfig, device_type type, const char *tag)
|
pasopia7_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag)
|
: driver_device(mconfig, type, tag)
|
||||||
, m_maincpu(*this, "maincpu")
|
, m_maincpu(*this, "maincpu")
|
||||||
|
, m_screen(*this, "screen")
|
||||||
, m_ppi0(*this, "ppi8255_0")
|
, m_ppi0(*this, "ppi8255_0")
|
||||||
, m_ppi1(*this, "ppi8255_1")
|
, m_ppi1(*this, "ppi8255_1")
|
||||||
, m_ppi2(*this, "ppi8255_2")
|
, m_ppi2(*this, "ppi8255_2")
|
||||||
@ -127,6 +128,7 @@ private:
|
|||||||
void draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width);
|
void draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cliprect,int width);
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
required_device<i8255_device> m_ppi0;
|
required_device<i8255_device> m_ppi0;
|
||||||
required_device<i8255_device> m_ppi1;
|
required_device<i8255_device> m_ppi1;
|
||||||
required_device<i8255_device> m_ppi2;
|
required_device<i8255_device> m_ppi2;
|
||||||
@ -224,8 +226,8 @@ void pasopia7_state::draw_tv_screen(bitmap_ind16 &bitmap,const rectangle &clipre
|
|||||||
{
|
{
|
||||||
case 0x00: cursor_on = 1; break; //always on
|
case 0x00: cursor_on = 1; break; //always on
|
||||||
case 0x20: cursor_on = 0; break; //always off
|
case 0x20: cursor_on = 0; break; //always off
|
||||||
case 0x40: if(machine().first_screen()->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
|
case 0x40: if(m_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
|
||||||
case 0x60: if(machine().first_screen()->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
|
case 0x60: if(m_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cursor_on)
|
if(cursor_on)
|
||||||
@ -302,8 +304,8 @@ void pasopia7_state::draw_mixed_screen(bitmap_ind16 &bitmap,const rectangle &cli
|
|||||||
{
|
{
|
||||||
case 0x00: cursor_on = 1; break; //always on
|
case 0x00: cursor_on = 1; break; //always on
|
||||||
case 0x20: cursor_on = 0; break; //always off
|
case 0x20: cursor_on = 0; break; //always off
|
||||||
case 0x40: if(machine().first_screen()->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
|
case 0x40: if(m_screen->frame_number() & 0x10) { cursor_on = 1; } break; //fast blink
|
||||||
case 0x60: if(machine().first_screen()->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
|
case 0x60: if(m_screen->frame_number() & 0x20) { cursor_on = 1; } break; //slow blink
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cursor_on)
|
if(cursor_on)
|
||||||
@ -780,7 +782,7 @@ READ8_MEMBER( pasopia7_state::crtc_portb_r )
|
|||||||
// --x- ---- vsync bit
|
// --x- ---- vsync bit
|
||||||
// ---x ---- hardcoded bit, defines if the system screen is raster (1) or LCD (0)
|
// ---x ---- hardcoded bit, defines if the system screen is raster (1) or LCD (0)
|
||||||
// ---- x--- disp bit
|
// ---- x--- disp bit
|
||||||
uint8_t vdisp = (machine().first_screen()->vpos() < (m_screen_type ? 200 : 28)) ? 0x08 : 0x00; //TODO: check LCD vpos trigger
|
uint8_t vdisp = (m_screen->vpos() < (m_screen_type ? 200 : 28)) ? 0x08 : 0x00; //TODO: check LCD vpos trigger
|
||||||
uint8_t vsync = vdisp ? 0x00 : 0x20;
|
uint8_t vsync = vdisp ? 0x00 : 0x20;
|
||||||
|
|
||||||
return 0x40 | (m_attr_latch & 0x87) | vsync | vdisp | (m_screen_type << 4);
|
return 0x40 | (m_attr_latch & 0x87) | vsync | vdisp | (m_screen_type << 4);
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
pc88va_state(const machine_config &mconfig, device_type type, const char *tag)
|
pc88va_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_screen(*this, "screen"),
|
||||||
m_fdc(*this, "upd765"),
|
m_fdc(*this, "upd765"),
|
||||||
m_dmac(*this, "dmac"),
|
m_dmac(*this, "dmac"),
|
||||||
m_palram(*this, "palram"),
|
m_palram(*this, "palram"),
|
||||||
@ -85,6 +86,7 @@ public:
|
|||||||
m_palette(*this, "palette") { }
|
m_palette(*this, "palette") { }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
required_device<upd765a_device> m_fdc;
|
required_device<upd765a_device> m_fdc;
|
||||||
required_device<am9517a_device> m_dmac;
|
required_device<am9517a_device> m_dmac;
|
||||||
required_shared_ptr<uint16_t> m_palram;
|
required_shared_ptr<uint16_t> m_palram;
|
||||||
@ -814,7 +816,7 @@ void pc88va_state::execute_sync_cmd()
|
|||||||
|
|
||||||
refresh = HZ_TO_ATTOSECONDS(60);
|
refresh = HZ_TO_ATTOSECONDS(60);
|
||||||
|
|
||||||
machine().first_screen()->configure(640, 480, visarea, refresh);
|
m_screen->configure(640, 480, visarea, refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pc88va_state::execute_dspon_cmd()
|
void pc88va_state::execute_dspon_cmd()
|
||||||
@ -967,7 +969,7 @@ WRITE16_MEMBER(pc88va_state::palette_ram_w)
|
|||||||
READ16_MEMBER(pc88va_state::sys_port4_r)
|
READ16_MEMBER(pc88va_state::sys_port4_r)
|
||||||
{
|
{
|
||||||
uint8_t vrtc,sw1;
|
uint8_t vrtc,sw1;
|
||||||
vrtc = (machine().first_screen()->vpos() < 200) ? 0x20 : 0x00; // vblank
|
vrtc = (m_screen->vpos() < 200) ? 0x20 : 0x00; // vblank
|
||||||
|
|
||||||
sw1 = (ioport("DSW")->read() & 1) ? 2 : 0;
|
sw1 = (ioport("DSW")->read() & 1) ? 2 : 0;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_videoram(*this,"videoram"),
|
m_videoram(*this,"videoram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_screen(*this, "screen"),
|
||||||
m_upd1771c(*this, "upd1771c"),
|
m_upd1771c(*this, "upd1771c"),
|
||||||
m_cart(*this, "cartslot"),
|
m_cart(*this, "cartslot"),
|
||||||
m_pa(*this, "PA.%u", 0),
|
m_pa(*this, "PA.%u", 0),
|
||||||
@ -53,6 +54,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<screen_device> m_screen;
|
||||||
required_device<upd1771c_device> m_upd1771c;
|
required_device<upd1771c_device> m_upd1771c;
|
||||||
required_device<scv_cart_slot_device> m_cart;
|
required_device<scv_cart_slot_device> m_cart;
|
||||||
required_ioport_array<8> m_pa;
|
required_ioport_array<8> m_pa;
|
||||||
@ -264,7 +266,7 @@ void scv_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
|
|||||||
{
|
{
|
||||||
case TIMER_VB:
|
case TIMER_VB:
|
||||||
{
|
{
|
||||||
int vpos = machine().first_screen()->vpos();
|
int vpos = m_screen->vpos();
|
||||||
|
|
||||||
switch( vpos )
|
switch( vpos )
|
||||||
{
|
{
|
||||||
@ -276,7 +278,7 @@ void scv_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_vb_timer->adjust(machine().first_screen()->time_until_pos((vpos + 1) % 262, 0));
|
m_vb_timer->adjust(m_screen->time_until_pos((vpos + 1) % 262, 0));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -621,7 +623,7 @@ void scv_state::machine_start()
|
|||||||
|
|
||||||
void scv_state::machine_reset()
|
void scv_state::machine_reset()
|
||||||
{
|
{
|
||||||
m_vb_timer->adjust(machine().first_screen()->time_until_pos(0, 0));
|
m_vb_timer->adjust(m_screen->time_until_pos(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -840,7 +840,7 @@ uint16_t x1_state::get_pcg_addr( uint16_t width, uint8_t y_char_size )
|
|||||||
int vbeam = m_screen->vpos() / y_char_size;
|
int vbeam = m_screen->vpos() / y_char_size;
|
||||||
uint16_t pcg_offset = ((hbeam + vbeam*width) + (((m_crtc_vreg[0x0c]<<8) & 0x3f00) | (m_crtc_vreg[0x0d] & 0xff))) & 0x7ff;
|
uint16_t pcg_offset = ((hbeam + vbeam*width) + (((m_crtc_vreg[0x0c]<<8) & 0x3f00) | (m_crtc_vreg[0x0d] & 0xff))) & 0x7ff;
|
||||||
|
|
||||||
//logerror("%08x %d %d %d %d\n",(hbeam+vbeam*width),hbeam,vbeam,machine.first_screen()->vpos() & 7,width);
|
//logerror("%08x %d %d %d %d\n",(hbeam+vbeam*width),hbeam,vbeam,m_screen->vpos() & 7,width);
|
||||||
|
|
||||||
return pcg_offset;
|
return pcg_offset;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user