summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/tispeak.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/drivers/tispeak.c')
-rw-r--r--src/mess/drivers/tispeak.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c
index 0481f230c0d..c6d376d1e1c 100644
--- a/src/mess/drivers/tispeak.c
+++ b/src/mess/drivers/tispeak.c
@@ -54,11 +54,11 @@ public:
UINT16 m_o;
int m_power_on;
- UINT16 m_leds_state[0x10];
- UINT16 m_leds_cache[0x10];
- UINT8 m_leds_decay[0x100];
- void leds_update();
- TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
+ UINT16 m_display_state[0x10];
+ UINT16 m_display_cache[0x10];
+ UINT8 m_display_decay[0x100];
+ void display_update();
+ TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
UINT32 m_cart_max_size;
UINT8* m_cart_base;
@@ -128,9 +128,9 @@ DRIVER_INIT_MEMBER(tispeak_state, lantutor)
// To prevent flickering here, we need to simulate a decay.
// decay time, in steps of 10ms
-#define LEDS_DECAY_TIME 4
+#define DISPLAY_DECAY_TIME 4
-void tispeak_state::leds_update()
+void tispeak_state::display_update()
{
int filament_on = (m_r & 0x8000) ? 1 : 0;
UINT16 active_state[0x10];
@@ -138,7 +138,7 @@ void tispeak_state::leds_update()
for (int i = 0; i < 0x10; i++)
{
// update current state
- m_leds_state[i] = (m_r >> i & 1) ? m_o : 0;
+ m_display_state[i] = (m_r >> i & 1) ? m_o : 0;
active_state[i] = 0;
@@ -146,19 +146,19 @@ void tispeak_state::leds_update()
{
int di = j << 4 | i;
- // turn on powered leds
- if (m_power_on && filament_on && m_leds_state[i] >> j & 1)
- m_leds_decay[di] = LEDS_DECAY_TIME;
+ // turn on powered segments
+ if (m_power_on && filament_on && m_display_state[i] >> j & 1)
+ m_display_decay[di] = DISPLAY_DECAY_TIME;
// determine active state
- int ds = (m_leds_decay[di] != 0) ? 1 : 0;
+ int ds = (m_display_decay[di] != 0) ? 1 : 0;
active_state[i] |= (ds << j);
}
}
// on difference, send to output
for (int i = 0; i < 0x10; i++)
- if (m_leds_cache[i] != active_state[i])
+ if (m_display_cache[i] != active_state[i])
{
output_set_digit_value(i, active_state[i] & 0x3fff);
@@ -166,17 +166,17 @@ void tispeak_state::leds_update()
output_set_lamp_value(i*0x10 + j, active_state[i] >> j & 1);
}
- memcpy(m_leds_cache, active_state, sizeof(m_leds_cache));
+ memcpy(m_display_cache, active_state, sizeof(m_display_cache));
}
-TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::leds_decay_tick)
+TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::display_decay_tick)
{
- // slowly turn off unpowered leds
+ // slowly turn off unpowered segments
for (int i = 0; i < 0x100; i++)
- if (!(m_leds_state[i & 0xf] >> (i>>4) & 1) && m_leds_decay[i])
- m_leds_decay[i]--;
+ if (!(m_display_state[i & 0xf] >> (i>>4) & 1) && m_display_decay[i])
+ m_display_decay[i]--;
- leds_update();
+ display_update();
}
@@ -212,7 +212,7 @@ WRITE16_MEMBER(tispeak_state::snspell_write_r)
// other bits: MCU internal use
m_r = data;
- leds_update();
+ display_update();
}
WRITE16_MEMBER(tispeak_state::snspell_write_o)
@@ -221,7 +221,7 @@ WRITE16_MEMBER(tispeak_state::snspell_write_o)
// E,D,C,G,B,A,I,M,L,K,N,J,[AP],H,F,[DP] (sidenote: TI KLMN = MAME MLNK)
m_o = BITSWAP16(data,12,15,10,7,8,9,11,6,13,3,14,0,1,2,4,5);
- leds_update();
+ display_update();
}
@@ -243,7 +243,7 @@ WRITE16_MEMBER(tispeak_state::snmath_write_o)
// [DP],D,C,H,F,B,I,M,L,K,N,J,[AP],E,G,A (sidenote: TI KLMN = MAME MLNK)
m_o = BITSWAP16(data,12,0,10,7,8,9,11,6,3,14,4,13,1,2,5,15);
- leds_update();
+ display_update();
}
@@ -253,7 +253,7 @@ WRITE16_MEMBER(tispeak_state::lantutor_write_r)
{
// same as default, except R13 is used for an extra digit
m_r = data;
- leds_update();
+ display_update();
}
@@ -442,18 +442,18 @@ void tispeak_state::machine_reset()
void tispeak_state::machine_start()
{
// zerofill
- memset(m_leds_state, 0, sizeof(m_leds_state));
- memset(m_leds_cache, 0, sizeof(m_leds_cache));
- memset(m_leds_decay, 0, sizeof(m_leds_decay));
+ memset(m_display_state, 0, sizeof(m_display_state));
+ memset(m_display_cache, 0, sizeof(m_display_cache));
+ memset(m_display_decay, 0, sizeof(m_display_decay));
m_r = 0;
m_o = 0;
m_power_on = 0;
// register for savestates
- save_item(NAME(m_leds_state));
- save_item(NAME(m_leds_cache));
- save_item(NAME(m_leds_decay));
+ save_item(NAME(m_display_state));
+ save_item(NAME(m_display_cache));
+ save_item(NAME(m_display_decay));
save_item(NAME(m_r));
save_item(NAME(m_o));
@@ -482,7 +482,7 @@ static MACHINE_CONFIG_START( snmath, tispeak_state )
MCFG_TMS0270_WRITE_CTL_CB(DEVWRITE8("tms5100", tms5100_device, ctl_w))
MCFG_TMS0270_WRITE_PDC_CB(DEVWRITELINE("tms5100", tms5100_device, pdc_w))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", tispeak_state, leds_decay_tick, attotime::from_msec(10))
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", tispeak_state, display_decay_tick, attotime::from_msec(10))
MCFG_DEFAULT_LAYOUT(layout_snspell) // max 9 digits
/* no video! */