summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/pxa255.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/pxa255.cpp')
-rw-r--r--src/devices/machine/pxa255.cpp40
1 files changed, 28 insertions, 12 deletions
diff --git a/src/devices/machine/pxa255.cpp b/src/devices/machine/pxa255.cpp
index 1f1dff2e452..2c06dd618a7 100644
--- a/src/devices/machine/pxa255.cpp
+++ b/src/devices/machine/pxa255.cpp
@@ -39,6 +39,7 @@ pxa255_periphs_device::pxa255_periphs_device(const machine_config &mconfig, cons
, m_maincpu(*this, finder_base::DUMMY_TAG)
, m_dmadac(*this, "dac%u", 1U)
, m_palette(*this, "palette")
+ , m_screen(*this, "screen")
{
}
@@ -253,20 +254,21 @@ void pxa255_periphs_device::device_reset()
void pxa255_periphs_device::device_add_mconfig(machine_config &config)
{
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size(1024, 1024);
- screen.set_visarea(0, 295, 0, 479);
- screen.set_screen_update(FUNC(pxa255_periphs_device::screen_update));
+ // TODO: should be SCREEN_TYPE_LCD, but that dislikes dynamic configure
+ // will stay stuck at 296x480 aspect ratio.
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(1024, 1024);
+ m_screen->set_visarea(0, 295, 0, 479);
+ m_screen->set_screen_update(FUNC(pxa255_periphs_device::screen_update));
PALETTE(config, m_palette).set_entries(256);
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "speaker", 2).front();
- DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
- DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+ DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "speaker", 1.0, 0);
+ DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "speaker", 1.0, 1);
}
/*
@@ -877,8 +879,8 @@ void pxa255_periphs_device::update_interrupts()
{
m_intc_regs.icfp = (m_intc_regs.icpr & m_intc_regs.icmr) & m_intc_regs.iclr;
m_intc_regs.icip = (m_intc_regs.icpr & m_intc_regs.icmr) & (~m_intc_regs.iclr);
- m_maincpu->set_input_line(ARM7_FIRQ_LINE, m_intc_regs.icfp ? ASSERT_LINE : CLEAR_LINE);
- m_maincpu->set_input_line(ARM7_IRQ_LINE, m_intc_regs.icip ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(arm7_cpu_device::ARM7_FIRQ_LINE, m_intc_regs.icfp ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(arm7_cpu_device::ARM7_IRQ_LINE, m_intc_regs.icip ? ASSERT_LINE : CLEAR_LINE);
}
void pxa255_periphs_device::set_irq_line(u32 line, int irq_state)
@@ -1462,10 +1464,24 @@ template <int Which>
void pxa255_periphs_device::lcd_lccr_w(offs_t offset, u32 data, u32 mem_mask)
{
LOGMASKED(LOG_LCD, "%s: lcd_lccr_w: LCD Control Register %d = %08x & %08x\n", machine().describe_context(), Which, data, mem_mask);
+
if (Which == 0)
m_lcd_regs.lccr[Which] = data & 0x00fffeff;
else
+ {
m_lcd_regs.lccr[Which] = data;
+ if (Which == 1 || Which == 2)
+ {
+ const u16 lpp = (m_lcd_regs.lccr[2] & LCCR2_LPP);
+ const u16 ppl = (m_lcd_regs.lccr[1] & LCCR1_PPL);
+
+ if (lpp && ppl)
+ {
+ rectangle rect(0, ppl, 0, lpp);
+ m_screen->configure(1024, 1024, rect, HZ_TO_ATTOSECONDS(60));
+ }
+ }
+ }
}
template <int Which>