mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
Remove first_screen() from lisa and ldplayer, nw
This commit is contained in:
parent
b9926417ad
commit
8b0d71b98f
@ -18,6 +18,7 @@
|
||||
|
||||
#include "emuopts.h"
|
||||
#include "speaker.h"
|
||||
#include "screen.h"
|
||||
|
||||
#include "chd.h"
|
||||
|
||||
@ -31,9 +32,10 @@ class ldplayer_state : public driver_device
|
||||
public:
|
||||
// construction/destruction
|
||||
ldplayer_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_last_controls(0),
|
||||
m_playing(false) { }
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_screen(*this, "screen")
|
||||
, m_last_controls(0)
|
||||
, m_playing(false) { }
|
||||
|
||||
// callback hook
|
||||
static chd_file *get_disc_static(device_t *dummy, laserdisc_device &device) { return device.machine().driver_data<ldplayer_state>()->get_disc(); }
|
||||
@ -91,6 +93,7 @@ protected:
|
||||
};
|
||||
|
||||
// internal state
|
||||
required_device<screen_device> m_screen;
|
||||
std::string m_filename;
|
||||
ioport_value m_last_controls;
|
||||
bool m_playing;
|
||||
@ -301,8 +304,8 @@ void ldplayer_state::device_timer(emu_timer &timer, device_timer_id id, int para
|
||||
process_commands();
|
||||
|
||||
// set a timer to go off on the next VBLANK
|
||||
int vblank_scanline = machine().first_screen()->visible_area().max_y + 1;
|
||||
attotime target = machine().first_screen()->time_until_pos(vblank_scanline);
|
||||
int vblank_scanline = m_screen->visible_area().max_y + 1;
|
||||
attotime target = m_screen->time_until_pos(vblank_scanline);
|
||||
timer_set(target, TIMER_ID_VSYNC_UPDATE);
|
||||
break;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ MACHINE_CONFIG_START(lisa_state::lisa)
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 5093760) /* 20.37504 MHz / 4 */
|
||||
MCFG_CPU_PROGRAM_MAP(lisa_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", lisa_state, lisa_interrupt)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, lisa_state, lisa_interrupt)
|
||||
|
||||
MCFG_CPU_ADD(COP421_TAG, COP421, 3900000)
|
||||
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true )
|
||||
@ -122,7 +122,7 @@ MACHINE_CONFIG_START(lisa_state::lisa)
|
||||
MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(lisa_state, vtmsk_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(lisa_state, hdmsk_w))
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
|
||||
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
||||
@ -181,7 +181,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(lisa_state::macxl)
|
||||
lisa210(config);
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_MODIFY(SCREEN_TAG)
|
||||
MCFG_SCREEN_SIZE( 768/* ???? */, 447/* ???? */)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 608-1, 0, 431-1)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -20,9 +20,11 @@
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/sonydriv.h"
|
||||
#include "sound/spkrdev.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define COP421_TAG "u9f"
|
||||
#define KB_COP421_TAG "kbcop"
|
||||
#define SCREEN_TAG "screen"
|
||||
|
||||
/* lisa MMU segment regs */
|
||||
struct real_mmu_entry
|
||||
@ -123,7 +125,8 @@ public:
|
||||
m_io_line7(*this, "LINE7"),
|
||||
m_io_mouse_x(*this, "MOUSE_X"),
|
||||
m_io_mouse_y(*this, "MOUSE_Y"),
|
||||
m_palette(*this, "palette")
|
||||
m_palette(*this, "palette"),
|
||||
m_screen(*this, SCREEN_TAG)
|
||||
{ }
|
||||
|
||||
required_device<m68000_base_device> m_maincpu;
|
||||
@ -150,6 +153,7 @@ public:
|
||||
required_ioport m_io_mouse_y;
|
||||
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
uint8_t *m_ram_ptr;
|
||||
uint8_t *m_rom_ptr;
|
||||
|
@ -1343,7 +1343,7 @@ READ16_MEMBER(lisa_state::lisa_r)
|
||||
/* problem : due to collisions with video, timings of the LISA CPU
|
||||
are slightly different from timings of a bare 68k */
|
||||
/* so we use a kludge... */
|
||||
int time_in_frame = machine().first_screen()->vpos();
|
||||
int time_in_frame = m_screen->vpos();
|
||||
|
||||
/* the BOOT ROM only reads 56 bits, so there must be some wrap-around for
|
||||
videoROM_address <= 56 */
|
||||
@ -1756,7 +1756,7 @@ READ16_MEMBER(lisa_state::lisa_IO_r)
|
||||
if (m_VTIR<=1)
|
||||
// GFE : needs to be in phase with Serial NUM
|
||||
{
|
||||
int time_in_frame = machine().first_screen()->vpos();
|
||||
int time_in_frame = m_screen->vpos();
|
||||
if (m_features.has_mac_xl_video)
|
||||
{
|
||||
if ((time_in_frame >= 374) && (time_in_frame <= 392)) /* these values have not been tested */
|
||||
|
Loading…
Reference in New Issue
Block a user