mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
Fixed typo and removed uneeded counter in exchange for a more clear TIN pin clock update interface
This commit is contained in:
parent
6845eabdf1
commit
9b84f0bd72
@ -20,7 +20,7 @@
|
|||||||
* - Complete support for clock and timers
|
* - Complete support for clock and timers
|
||||||
* - Add interrupt support
|
* - Add interrupt support
|
||||||
* - Add DMA support
|
* - Add DMA support
|
||||||
* - Add apropriate buffering for each submode
|
* - Add appropriate buffering for each submode
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "68230pit.h"
|
#include "68230pit.h"
|
||||||
@ -240,18 +240,15 @@ void pit68230_device::pa_update_bit(uint8_t bit, uint8_t state){ if (state) m_pa
|
|||||||
void pit68230_device::pb_update_bit(uint8_t bit, uint8_t state){ if (state) m_pbdr |= (1 << bit); else m_pbdr &= ~(1 << bit); }
|
void pit68230_device::pb_update_bit(uint8_t bit, uint8_t state){ if (state) m_pbdr |= (1 << bit); else m_pbdr &= ~(1 << bit); }
|
||||||
void pit68230_device::pc_update_bit(uint8_t bit, uint8_t state){ if (state) m_pcdr |= (1 << bit); else m_pcdr &= ~(1 << bit); }
|
void pit68230_device::pc_update_bit(uint8_t bit, uint8_t state){ if (state) m_pcdr |= (1 << bit); else m_pcdr &= ~(1 << bit); }
|
||||||
|
|
||||||
void pit68230_device::update_tin()
|
void pit68230_device::update_tin(uint8_t state)
|
||||||
{
|
{
|
||||||
static uint32_t counter = 0;
|
|
||||||
|
|
||||||
// Tick clock on falling edge. TODO: check what flank is correct
|
// Tick clock on falling edge. TODO: check what flank is correct
|
||||||
if (((counter & 1) != 0))
|
if (state == CLEAR_LINE)
|
||||||
{
|
{
|
||||||
tick_clock();
|
tick_clock();
|
||||||
}
|
}
|
||||||
|
|
||||||
pc_update_bit(REG_PCDR_TIN_BIT, counter & 1);
|
pc_update_bit(REG_PCDR_TIN_BIT, state == ASSERT_LINE ? 0 : 1);
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VERBOSE > 2
|
#if VERBOSE > 2
|
||||||
|
@ -131,7 +131,7 @@ class pit68230_device : public device_t//, public device_execute_interface
|
|||||||
void pa_update_bit(uint8_t bit, uint8_t state);
|
void pa_update_bit(uint8_t bit, uint8_t state);
|
||||||
void pb_update_bit(uint8_t bit, uint8_t state);
|
void pb_update_bit(uint8_t bit, uint8_t state);
|
||||||
void pc_update_bit(uint8_t bit, uint8_t state);
|
void pc_update_bit(uint8_t bit, uint8_t state);
|
||||||
void update_tin();
|
void update_tin(uint8_t);
|
||||||
|
|
||||||
void wr_pitreg_pgcr(uint8_t data);
|
void wr_pitreg_pgcr(uint8_t data);
|
||||||
void wr_pitreg_psrr(uint8_t data);
|
void wr_pitreg_psrr(uint8_t data);
|
||||||
|
Loading…
Reference in New Issue
Block a user