Skip to content

Commit

Permalink
avr8: fix port D bit 7 toggle on timer2
Browse files Browse the repository at this point in the history
(cherry picked from commit 2db21a3)
  • Loading branch information
happppp committed Mar 25, 2024
1 parent 5abb7f4 commit 8be0d3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/devices/cpu/avr8/avr8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ void avr8_device<NumTimers>::update_timer_waveform_gen_mode(uint8_t t, uint8_t m
if (m_timer_top[t] == -1)
{
m_timer_top[t] = 0;
LOGMASKED((LOG_TIMER0 + t), "%s: update_timer_waveform_gen_mode: Timer %d - Unsupported waveform generation type: %d\n", machine().describe_context(), t, mode);
LOGMASKED((LOG_TIMER0 << t), "%s: update_timer_waveform_gen_mode: Timer %d - Unsupported waveform generation type: %d\n", machine().describe_context(), t, mode);
}
}

Expand Down Expand Up @@ -2028,7 +2028,7 @@ void avr8_device<NumTimers>::timer2_tick_fast_pwm()
if (m_ocr2_not_reached_yet)
{
// Turn off
m_r[PORTD] |= 1 << 7;
m_r[PORTD] &= ~(1 << 7);
m_gpio_out_cb[GPIOD](m_r[PORTD]);
m_ocr2_not_reached_yet = false;
}
Expand Down Expand Up @@ -2191,11 +2191,11 @@ void avr8_device<NumTimers>::update_timer_clock_source(uint8_t clock_select, con
const uint16_t old_prescale = s_prescale_values[(Timer == 2) ? 1 : 0][old_clock_select];
m_timer_prescale[Timer] = (uint16_t)prescale_divisor;

LOGMASKED(LOG_TIMER0 + Timer, "%s: update_timer_clock_source: t = %d, cs = %d\n", machine().describe_context(), Timer, clock_select);
LOGMASKED(LOG_TIMER0 << Timer, "%s: update_timer_clock_source: t = %d, cs = %d\n", machine().describe_context(), Timer, clock_select);

if (prescale_divisor == -1)
{
LOGMASKED(LOG_TIMER0 + Timer, "%s: timer%d: update_timer_clock_source: External trigger mode not implemented yet\n", machine().describe_context(), Timer);
LOGMASKED(LOG_TIMER0 << Timer, "%s: timer%d: update_timer_clock_source: External trigger mode not implemented yet\n", machine().describe_context(), Timer);
m_timer_prescale[Timer] = 0xffff;
}

Expand Down
2 changes: 1 addition & 1 deletion src/mame/homebrew/uzebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void uzebox_state::port_a_w(uint8_t data)

uint8_t uzebox_state::port_a_r()
{
return m_port_a | 0xf0;
return m_port_a | 0xf0;
}

void uzebox_state::port_b_w(uint8_t data)
Expand Down

0 comments on commit 8be0d3e

Please sign in to comment.