mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
48c2597d65
@ -22,48 +22,25 @@ void clock_device::device_start()
|
||||
|
||||
void clock_device::device_clock_changed()
|
||||
{
|
||||
update_timer();
|
||||
}
|
||||
if (!m_signal_handler.isnull() && m_clock > 0)
|
||||
{
|
||||
if (m_timer == nullptr)
|
||||
m_timer = timer_alloc(0);
|
||||
|
||||
attotime clock_device::period()
|
||||
{
|
||||
if (m_clock > 0)
|
||||
return attotime::from_hz(m_clock * 2);
|
||||
const attotime period(attotime::from_hz(m_clock * 2));
|
||||
|
||||
return attotime::never;
|
||||
attotime next = period - m_timer->elapsed();
|
||||
if (next < attotime::zero)
|
||||
next = attotime::zero;
|
||||
|
||||
m_timer->adjust(next, 0, period);
|
||||
}
|
||||
else if (m_timer != nullptr)
|
||||
m_timer->adjust(attotime::never);
|
||||
}
|
||||
|
||||
void clock_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
m_signal = !m_signal;
|
||||
m_signal_handler(m_signal);
|
||||
|
||||
m_timer->adjust(period());
|
||||
}
|
||||
|
||||
void clock_device::update_timer()
|
||||
{
|
||||
if (!m_signal_handler.isnull() && m_clock > 0)
|
||||
{
|
||||
if (m_timer == nullptr)
|
||||
{
|
||||
m_timer = timer_alloc(0);
|
||||
m_timer->adjust(period());
|
||||
}
|
||||
else
|
||||
{
|
||||
attotime next = period() - m_timer->elapsed();
|
||||
|
||||
if (next < attotime::zero)
|
||||
{
|
||||
next = attotime::zero;
|
||||
}
|
||||
|
||||
m_timer->adjust(next);
|
||||
}
|
||||
}
|
||||
else if (m_timer != nullptr)
|
||||
{
|
||||
m_timer->adjust(attotime::never);
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,6 @@ protected:
|
||||
virtual void device_clock_changed() override;
|
||||
|
||||
private:
|
||||
void update_timer();
|
||||
attotime period();
|
||||
|
||||
int m_signal;
|
||||
emu_timer *m_timer;
|
||||
|
||||
|
@ -72,20 +72,15 @@ dp835x_device::dp835x_device(const machine_config &mconfig, device_type type, co
|
||||
, m_hsync_active(hsync_active)
|
||||
, m_vsync_active(vsync_active)
|
||||
, m_vblank_active(vblank_active)
|
||||
, m_hsync_callback(*this)
|
||||
, m_vsync_callback(*this)
|
||||
, m_vblank_callback(*this)
|
||||
, m_60hz_refresh(true)
|
||||
{
|
||||
// many parameters are not used yet
|
||||
(void)m_vsync_delay;
|
||||
(void)m_vsync_width;
|
||||
(void)m_hsync_delay;
|
||||
(void)m_hsync_width;
|
||||
(void)m_vblank_stop;
|
||||
// some parameters are not used yet
|
||||
(void)m_cursor_on_all_lines;
|
||||
(void)m_lbc_0_width;
|
||||
(void)m_hsync_serration;
|
||||
(void)m_hsync_active;
|
||||
(void)m_vsync_active;
|
||||
}
|
||||
|
||||
|
||||
@ -150,8 +145,8 @@ void dp835x_device::device_config_complete()
|
||||
|
||||
void dp835x_device::device_resolve_objects()
|
||||
{
|
||||
//m_hsync_callback.resolve_safe();
|
||||
//m_vsync_callback.resolve_safe();
|
||||
m_hsync_callback.resolve_safe();
|
||||
m_vsync_callback.resolve_safe();
|
||||
m_vblank_callback.resolve_safe();
|
||||
}
|
||||
|
||||
@ -162,8 +157,15 @@ void dp835x_device::device_resolve_objects()
|
||||
|
||||
void dp835x_device::device_start()
|
||||
{
|
||||
screen().register_vblank_callback(vblank_state_delegate(&dp835x_device::screen_vblank, this));
|
||||
// create timers
|
||||
m_hsync_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::hsync_update), this));
|
||||
m_hsync_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::hsync_update), this));
|
||||
m_vsync_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::vsync_update), this));
|
||||
m_vsync_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::vsync_update), this));
|
||||
m_vblank_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::vblank_update), this));
|
||||
m_vblank_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(dp835x_device::vblank_update), this));
|
||||
|
||||
// save state
|
||||
save_item(NAME(m_60hz_refresh));
|
||||
}
|
||||
|
||||
@ -197,25 +199,67 @@ void dp835x_device::reconfigure_screen()
|
||||
int dots_per_line = m_char_width * m_chars_per_line;
|
||||
int dots_per_row = m_char_width * m_chars_per_row;
|
||||
int lines_per_frame = m_char_height * m_rows_per_frame + m_vblank_interval[m_60hz_refresh ? 1 : 0];
|
||||
attoseconds_t refresh = clocks_to_attotime(lines_per_frame * dots_per_line).as_attoseconds();
|
||||
attotime refresh = clocks_to_attotime(lines_per_frame * dots_per_line);
|
||||
|
||||
if (m_half_shift)
|
||||
{
|
||||
rectangle visarea(0, 2 * dots_per_row - 1, 0, m_char_height * m_rows_per_frame - 1);
|
||||
screen().configure(2 * dots_per_line, lines_per_frame, visarea, refresh);
|
||||
screen().configure(2 * dots_per_line, lines_per_frame, visarea, refresh.as_attoseconds());
|
||||
}
|
||||
else
|
||||
{
|
||||
rectangle visarea(0, dots_per_row - 1, 0, m_char_height * m_rows_per_frame - 1);
|
||||
screen().configure(dots_per_line, lines_per_frame, visarea, refresh);
|
||||
screen().configure(dots_per_line, lines_per_frame, visarea, refresh.as_attoseconds());
|
||||
}
|
||||
|
||||
logerror("Frame rate refresh: %.2f Hz (f%d); horizontal rate scan: %.4f kHz; character rate: %.4f MHz; dot rate: %.5f MHz\n",
|
||||
ATTOSECONDS_TO_HZ(refresh),
|
||||
ATTOSECONDS_TO_HZ(refresh.as_attoseconds()),
|
||||
m_60hz_refresh ? 1 : 0,
|
||||
clock() / (dots_per_line * 1000.0),
|
||||
clock() / (m_char_width * 1000000.0),
|
||||
clock() / 1000000.0);
|
||||
|
||||
// get current screen position
|
||||
int hpos = screen().hpos();
|
||||
int vpos = screen().vpos();
|
||||
|
||||
// set horizontal sync timers
|
||||
int hsync_begin = (dots_per_row + m_char_width * m_hsync_delay) * (m_half_shift ? 2 : 1);
|
||||
int hsync_end = hsync_begin + m_char_width * m_hsync_width * (m_half_shift ? 2 : 1);
|
||||
if (hpos > hsync_begin)
|
||||
hsync_begin += dots_per_line * (m_half_shift ? 2 : 1);
|
||||
m_hsync_on_timer->adjust(clocks_to_attotime(hsync_begin - hpos) / (m_half_shift ? 2 : 1), m_hsync_active, clocks_to_attotime(dots_per_line));
|
||||
if (hpos > hsync_end)
|
||||
hsync_end += dots_per_line * (m_half_shift ? 2 : 1);
|
||||
m_hsync_off_timer->adjust(clocks_to_attotime(hsync_end - hpos) / (m_half_shift ? 2 : 1), !m_hsync_active, clocks_to_attotime(dots_per_line));
|
||||
|
||||
// calculate vertical sync and blanking parameters
|
||||
int hblank_begin = dots_per_row * (m_half_shift ? 2 : 1);
|
||||
int vblank_begin = m_char_height * m_rows_per_frame - 1;
|
||||
int vsync_begin = vblank_begin + m_vsync_delay[m_60hz_refresh ? 1 : 0];
|
||||
int vsync_end = vsync_begin + m_vsync_width[m_60hz_refresh ? 1 : 0];
|
||||
int vblank_end = lines_per_frame - m_vblank_stop - 1;
|
||||
logerror("vblank_begin: %d; vsync_begin: %d; vsync_end: %d; vblank_end: %d; vpos: %d\n", vblank_begin, vsync_begin, vsync_end, vblank_end, vpos);
|
||||
if (hpos > hblank_begin)
|
||||
{
|
||||
hblank_begin += dots_per_line * (m_half_shift ? 2 : 1);
|
||||
vpos++;
|
||||
}
|
||||
attotime until_hblank = clocks_to_attotime(hblank_begin - hpos) / (m_half_shift ? 2 : 1);
|
||||
|
||||
// set vertical sync and blanking timers
|
||||
if (vpos > vsync_begin)
|
||||
vsync_begin += lines_per_frame;
|
||||
m_vsync_on_timer->adjust(clocks_to_attotime((vsync_begin - vpos) * dots_per_line) + until_hblank, m_vsync_active, refresh);
|
||||
if (vpos > vsync_end)
|
||||
vsync_end += lines_per_frame;
|
||||
m_vsync_off_timer->adjust(clocks_to_attotime((vsync_end - vpos) * dots_per_line) + until_hblank, !m_vsync_active, refresh);
|
||||
if (vpos > vblank_begin)
|
||||
vblank_begin += lines_per_frame;
|
||||
m_vblank_on_timer->adjust(clocks_to_attotime((vblank_begin - vpos) * dots_per_line) + until_hblank, m_vblank_active, refresh);
|
||||
if (vpos > vblank_end)
|
||||
vblank_end += lines_per_frame;
|
||||
m_vblank_off_timer->adjust(clocks_to_attotime((vblank_end - vpos) * dots_per_line) + until_hblank, !m_vblank_active, refresh);
|
||||
}
|
||||
|
||||
|
||||
@ -269,21 +313,73 @@ void dp835x_device::register_load(u8 rs, u16 addr)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// hsync_r - report horizontal sync state
|
||||
//-------------------------------------------------
|
||||
|
||||
READ_LINE_MEMBER(dp835x_device::hsync_r)
|
||||
{
|
||||
if (m_hsync_on_timer->remaining() > m_hsync_off_timer->remaining())
|
||||
return m_hsync_active;
|
||||
else
|
||||
return !m_hsync_active;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// vblank_r - report vertical sync state
|
||||
//-------------------------------------------------
|
||||
|
||||
READ_LINE_MEMBER(dp835x_device::vsync_r)
|
||||
{
|
||||
if (m_vsync_on_timer->remaining() > m_vsync_off_timer->remaining())
|
||||
return m_vsync_active;
|
||||
else
|
||||
return !m_vsync_active;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// vblank_r - report vertical blanking state
|
||||
//-------------------------------------------------
|
||||
|
||||
READ_LINE_MEMBER(dp835x_device::vblank_r)
|
||||
{
|
||||
return bool(screen().vblank()) == m_vblank_active;
|
||||
if (m_vblank_on_timer->remaining() > m_vblank_off_timer->remaining())
|
||||
return m_vblank_active;
|
||||
else
|
||||
return !m_vblank_active;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// screen_vblank - vertical blanking handler
|
||||
// hsync_update - update state of horizontal
|
||||
// sync output
|
||||
//-------------------------------------------------
|
||||
|
||||
void dp835x_device::screen_vblank(screen_device &screen, bool state)
|
||||
TIMER_CALLBACK_MEMBER(dp835x_device::hsync_update)
|
||||
{
|
||||
m_vblank_callback(state == m_vblank_active);
|
||||
m_hsync_callback(param);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// vsync_update - update state of vertical
|
||||
// sync output
|
||||
//-------------------------------------------------
|
||||
|
||||
TIMER_CALLBACK_MEMBER(dp835x_device::vsync_update)
|
||||
{
|
||||
m_vsync_callback(param);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// vblank_update - update state of vertical
|
||||
// blanking output
|
||||
//-------------------------------------------------
|
||||
|
||||
TIMER_CALLBACK_MEMBER(dp835x_device::vblank_update)
|
||||
{
|
||||
m_vblank_callback(param);
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ class dp835x_device : public device_t, public device_video_interface
|
||||
{
|
||||
public:
|
||||
// device configuration
|
||||
auto hsync_callback() { return m_hsync_callback.bind(); }
|
||||
auto vsync_callback() { return m_vsync_callback.bind(); }
|
||||
auto vblank_callback() { return m_vblank_callback.bind(); }
|
||||
void set_half_shift(bool half_shift) { m_half_shift = half_shift; }
|
||||
|
||||
@ -52,6 +54,8 @@ public:
|
||||
void register_load(u8 rs, u16 addr);
|
||||
|
||||
// read handlers
|
||||
DECLARE_READ_LINE_MEMBER(hsync_r);
|
||||
DECLARE_READ_LINE_MEMBER(vsync_r);
|
||||
DECLARE_READ_LINE_MEMBER(vblank_r);
|
||||
|
||||
protected:
|
||||
@ -74,7 +78,11 @@ protected:
|
||||
private:
|
||||
// internal helpers
|
||||
void reconfigure_screen();
|
||||
void screen_vblank(screen_device &screen, bool state);
|
||||
|
||||
// timer callbacks
|
||||
TIMER_CALLBACK_MEMBER(hsync_update);
|
||||
TIMER_CALLBACK_MEMBER(vsync_update);
|
||||
TIMER_CALLBACK_MEMBER(vblank_update);
|
||||
|
||||
// mask parameters
|
||||
const int m_char_width; // character field cell size (width in dots)
|
||||
@ -99,12 +107,20 @@ private:
|
||||
bool m_half_shift; // adjust screen parameters to allow half-dot shifting
|
||||
|
||||
// device callbacks
|
||||
//devcb_write_line m_hsync_callback; // horizontal sync output (polarity may vary by type)
|
||||
//devcb_write_line m_vsync_callback; // vertical sync output (polarity may vary by type)
|
||||
devcb_write_line m_hsync_callback; // horizontal sync output (polarity may vary by type)
|
||||
devcb_write_line m_vsync_callback; // vertical sync output (polarity may vary by type)
|
||||
devcb_write_line m_vblank_callback; // vertical blanking output (polarity may vary by type)
|
||||
|
||||
// internal registers and control parameters
|
||||
bool m_60hz_refresh; // refresh rate selector (true = f1, false = f0)
|
||||
|
||||
// timers
|
||||
emu_timer *m_hsync_on_timer;
|
||||
emu_timer *m_hsync_off_timer;
|
||||
emu_timer *m_vsync_on_timer;
|
||||
emu_timer *m_vsync_off_timer;
|
||||
emu_timer *m_vblank_on_timer;
|
||||
emu_timer *m_vblank_off_timer;
|
||||
};
|
||||
|
||||
// ======================> dp8350_device
|
||||
|
@ -14,38 +14,30 @@
|
||||
#include "machine/clock.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#define M68000_TAG "sndcpu"
|
||||
#define MULTIPCM_1_TAG "pcm1"
|
||||
#define MULTIPCM_2_TAG "pcm2"
|
||||
#define YM3438_TAG "ymsnd"
|
||||
#define UART_TAG "uart"
|
||||
#define MPCMBANK1_TAG "m1pcm1_bank"
|
||||
#define MPCMBANK2_TAG "m1pcm2_bank"
|
||||
|
||||
void segam1audio_device::segam1audio_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x080000, 0x09ffff).rom().region(M68000_TAG, 0x20000); // mirror of upper ROM socket
|
||||
map(0xc20000, 0xc20003).rw(UART_TAG, FUNC(i8251_device::read), FUNC(i8251_device::write)).umask16(0x00ff);
|
||||
map(0xc40000, 0xc40007).rw(MULTIPCM_1_TAG, FUNC(multipcm_device::read), FUNC(multipcm_device::write)).umask16(0x00ff);
|
||||
map(0x080000, 0x09ffff).rom().region("sndcpu", 0x20000); // mirror of upper ROM socket
|
||||
map(0xc20000, 0xc20003).rw(m_uart, FUNC(i8251_device::read), FUNC(i8251_device::write)).umask16(0x00ff);
|
||||
map(0xc40000, 0xc40007).rw(m_multipcm_1, FUNC(multipcm_device::read), FUNC(multipcm_device::write)).umask16(0x00ff);
|
||||
map(0xc40012, 0xc40013).nopw();
|
||||
map(0xc50000, 0xc50001).w(FUNC(segam1audio_device::m1_snd_mpcm_bnk1_w));
|
||||
map(0xc60000, 0xc60007).rw(MULTIPCM_2_TAG, FUNC(multipcm_device::read), FUNC(multipcm_device::write)).umask16(0x00ff);
|
||||
map(0xc60000, 0xc60007).rw(m_multipcm_2, FUNC(multipcm_device::read), FUNC(multipcm_device::write)).umask16(0x00ff);
|
||||
map(0xc70000, 0xc70001).w(FUNC(segam1audio_device::m1_snd_mpcm_bnk2_w));
|
||||
map(0xd00000, 0xd00007).rw(YM3438_TAG, FUNC(ym3438_device::read), FUNC(ym3438_device::write)).umask16(0x00ff);
|
||||
map(0xd00000, 0xd00007).rw(m_ym, FUNC(ym3438_device::read), FUNC(ym3438_device::write)).umask16(0x00ff);
|
||||
map(0xf00000, 0xf0ffff).ram();
|
||||
}
|
||||
|
||||
void segam1audio_device::mpcm1_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x0fffff).rom();
|
||||
map(0x100000, 0x1fffff).bankr(MPCMBANK1_TAG);
|
||||
map(0x100000, 0x1fffff).bankr(m_mpcmbank1);
|
||||
}
|
||||
|
||||
void segam1audio_device::mpcm2_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x0fffff).rom();
|
||||
map(0x100000, 0x1fffff).bankr(MPCMBANK2_TAG);
|
||||
map(0x100000, 0x1fffff).bankr(m_mpcmbank2);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
@ -58,26 +50,27 @@ DEFINE_DEVICE_TYPE(SEGAM1AUDIO, segam1audio_device, "segam1audio", "Sega Model 1
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_START(segam1audio_device::device_add_mconfig)
|
||||
MCFG_DEVICE_ADD(M68000_TAG, M68000, 10000000) // verified on real h/w
|
||||
MCFG_DEVICE_PROGRAM_MAP(segam1audio_map)
|
||||
void segam1audio_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
M68000(config, m_audiocpu, 10000000); // verified on real h/w
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &segam1audio_device::segam1audio_map);
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_DEVICE_ADD(YM3438_TAG, YM3438, 8000000)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.60)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.60)
|
||||
YM3438(config, m_ym, 8000000);
|
||||
m_ym->add_route(0, "lspeaker", 0.60);
|
||||
m_ym->add_route(1, "rspeaker", 0.60);
|
||||
|
||||
MCFG_DEVICE_ADD(MULTIPCM_1_TAG, MULTIPCM, 8000000)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, mpcm1_map)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
MULTIPCM(config, m_multipcm_1, 8000000);
|
||||
m_multipcm_1->set_addrmap(0, &segam1audio_device::mpcm1_map);
|
||||
m_multipcm_1->add_route(0, "lspeaker", 1.0);
|
||||
m_multipcm_1->add_route(1, "rspeaker", 1.0);
|
||||
|
||||
MCFG_DEVICE_ADD(MULTIPCM_2_TAG, MULTIPCM, 8000000)
|
||||
MCFG_DEVICE_ADDRESS_MAP(0, mpcm2_map)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
MULTIPCM(config, m_multipcm_2, 8000000);
|
||||
m_multipcm_2->set_addrmap(0, &segam1audio_device::mpcm2_map);
|
||||
m_multipcm_2->add_route(0, "lspeaker", 1.0);
|
||||
m_multipcm_2->add_route(1, "rspeaker", 1.0);
|
||||
|
||||
I8251(config, m_uart, 8000000); // T82C51, clock unknown
|
||||
m_uart->rxrdy_handler().set_inputline(m_audiocpu, M68K_IRQ_2);
|
||||
@ -86,7 +79,7 @@ MACHINE_CONFIG_START(segam1audio_device::device_add_mconfig)
|
||||
clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate)
|
||||
uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc));
|
||||
uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc));
|
||||
MACHINE_CONFIG_END
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
@ -98,15 +91,15 @@ MACHINE_CONFIG_END
|
||||
|
||||
segam1audio_device::segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, SEGAM1AUDIO, tag, owner, clock),
|
||||
m_audiocpu(*this, M68000_TAG),
|
||||
m_multipcm_1(*this, MULTIPCM_1_TAG),
|
||||
m_multipcm_2(*this, MULTIPCM_2_TAG),
|
||||
m_ym(*this, YM3438_TAG),
|
||||
m_uart(*this, UART_TAG),
|
||||
m_multipcm1_region(*this, MULTIPCM_1_TAG),
|
||||
m_multipcm2_region(*this, MULTIPCM_2_TAG),
|
||||
m_mpcmbank1(*this, MPCMBANK1_TAG),
|
||||
m_mpcmbank2(*this, MPCMBANK2_TAG),
|
||||
m_audiocpu(*this, "sndcpu"),
|
||||
m_multipcm_1(*this, "pcm1"),
|
||||
m_multipcm_2(*this, "pcm2"),
|
||||
m_ym(*this, "ymsnd"),
|
||||
m_uart(*this, "uart"),
|
||||
m_multipcm1_region(*this, "pcm1"),
|
||||
m_multipcm2_region(*this, "pcm2"),
|
||||
m_mpcmbank1(*this, "m1pcm1_bank"),
|
||||
m_mpcmbank2(*this, "m1pcm2_bank"),
|
||||
m_rxd_handler(*this)
|
||||
{
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void hazl1420_state::p1_w(u8 data)
|
||||
|
||||
u8 hazl1420_state::p2_r()
|
||||
{
|
||||
u8 result = 0xe0 | (m_crtc->vblank_r() << 4);
|
||||
u8 result = 0xe0 | (m_crtc->hsync_r() << 4);
|
||||
result |= m_ioexp[0]->p2_r() & m_ioexp[1]->p2_r();
|
||||
return result;
|
||||
}
|
||||
@ -293,6 +293,7 @@ void hazl1420_state::hazl1420(machine_config &config)
|
||||
m_maincpu->p2_out_cb().append(m_ioexp[1], FUNC(i8243_device::p2_w));
|
||||
m_maincpu->prog_out_cb().set(m_ioexp[0], FUNC(i8243_device::prog_w));
|
||||
m_maincpu->prog_out_cb().append(m_ioexp[1], FUNC(i8243_device::prog_w));
|
||||
m_maincpu->t0_in_cb().set(m_crtc, FUNC(dp8350_device::vblank_r));
|
||||
m_maincpu->t1_in_cb().set("ace", FUNC(ins8250_device::intrpt_r));
|
||||
|
||||
ADDRESS_MAP_BANK(config, m_bankdev);
|
||||
@ -315,7 +316,7 @@ void hazl1420_state::hazl1420(machine_config &config)
|
||||
INS8250(config, "ace", 2'764'800);
|
||||
|
||||
DP8350(config, m_crtc, 10.92_MHz_XTAL).set_screen("screen");
|
||||
m_crtc->vblank_callback().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
|
||||
m_crtc->hsync_callback().set_inputline(m_maincpu, MCS48_INPUT_IRQ);
|
||||
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_screen_update(FUNC(hazl1420_state::screen_update));
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "bus/pc_joy/pc_joy.h"
|
||||
#include "bus/rs232/hlemouse.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "bus/rs232/null_modem.h"
|
||||
#include "bus/rs232/terminal.h"
|
||||
|
||||
#include "screen.h"
|
||||
#include "softlist.h"
|
||||
@ -517,6 +519,8 @@ static void pcjr_com(device_slot_interface &device)
|
||||
device.option_add("wheel_mouse", WHEEL_HLE_SERIAL_MOUSE);
|
||||
device.option_add("msystems_mouse", MSYSTEMS_HLE_SERIAL_MOUSE);
|
||||
device.option_add("rotatable_mouse", ROTATABLE_HLE_SERIAL_MOUSE);
|
||||
device.option_add("terminal",SERIAL_TERMINAL);
|
||||
device.option_add("null_modem",NULL_MODEM);
|
||||
}
|
||||
|
||||
static const gfx_layout pc_8_charlayout =
|
||||
|
Loading…
Reference in New Issue
Block a user