summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2024-03-25 14:15:36 +0100
committer hap <happppp@users.noreply.github.com>2024-03-25 14:27:51 +0100
commit8be0d3eb2955cd8efb0d019535708f5b02477d67 (patch)
tree944f8bc283a29da02d36675de5b6ac1e5438dea5
parent5abb7f4df29ca67be124e242266b6a4c3ccca2bd (diff)
avr8: fix port D bit 7 toggle on timer2
(cherry picked from commit 2db21a34b5be8782c1ba510c4fdfc96d37cabea4)
-rw-r--r--src/devices/cpu/avr8/avr8.cpp8
-rw-r--r--src/mame/homebrew/uzebox.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index 7779648d057..e6e1aa54561 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -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);
}
}
@@ -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;
}
@@ -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;
}
diff --git a/src/mame/homebrew/uzebox.cpp b/src/mame/homebrew/uzebox.cpp
index 3e7d6b678d7..dac24881d9e 100644
--- a/src/mame/homebrew/uzebox.cpp
+++ b/src/mame/homebrew/uzebox.cpp
@@ -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)