summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-28 03:16:36 +0000
committer Zsolt Vasvari <zsoltvas@mamedev.org>2008-02-28 03:16:36 +0000
commit34781e5f4cd4c8e80e82e5b699190892b608aca3 (patch)
tree8a52aa5014bfd32dfc8b4dcf0fd21dad06ae1eff
parentee187c0bf6c35687f6a7334977efc2ae58a94d4e (diff)
- Better variable name for the cursor counter
- Pedantic clean-up of comments - R6545 is still in the "MC6845 CRTC" family, therefore removed DEVINFO_STR_FAMILY
-rw-r--r--src/emu/video/mc6845.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 2bd8c8925cd..b3587157b57 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -54,7 +54,7 @@ struct _mc6845_t
emu_timer *display_enable_changed_timer;
UINT8 cursor_state; /* 0 = off, 1 = on */
- UINT8 cursor_count;
+ UINT8 cursor_blink_count;
/* saved screen parameters so we don't call
video_screen_configure() unneccessarily.
@@ -379,8 +379,8 @@ UINT8 mc6845_get_ra(mc6845_t *mc6845)
static void update_cursor_state(mc6845_t *mc6845)
{
/* save and increment cursor counter */
- UINT8 old_count = mc6845->cursor_count;
- mc6845->cursor_count = mc6845->cursor_count + 1;
+ UINT8 last_cursor_blink_count = mc6845->cursor_blink_count;
+ mc6845->cursor_blink_count = mc6845->cursor_blink_count + 1;
/* switch on cursor blinking mode */
switch (mc6845->cursor_start_ras & 0x60)
@@ -394,13 +394,13 @@ static void update_cursor_state(mc6845_t *mc6845)
/* fast blink */
case 0x40:
- if ((old_count & 0x10) != (mc6845->cursor_count & 0x10))
+ if ((last_cursor_blink_count & 0x10) != (mc6845->cursor_blink_count & 0x10))
mc6845->cursor_state = !mc6845->cursor_state;
break;
/* slow blink */
case 0x60:
- if ((old_count & 0x20) != (mc6845->cursor_count & 0x20))
+ if ((last_cursor_blink_count & 0x20) != (mc6845->cursor_blink_count & 0x20))
mc6845->cursor_state = !mc6845->cursor_state;
break;
}
@@ -424,7 +424,7 @@ void mc6845_update(mc6845_t *mc6845, mame_bitmap *bitmap, const rectangle *clipr
/* read the start address at the beginning of the frame */
mc6845->current_ma = mc6845->start_addr;
- /* also update the cursor state here */
+ /* also update the cursor state now */
update_cursor_state(mc6845);
}
@@ -441,7 +441,7 @@ void mc6845_update(mc6845_t *mc6845, mame_bitmap *bitmap, const rectangle *clipr
(mc6845->cursor >= mc6845->current_ma) &&
(mc6845->cursor < (mc6845->current_ma + mc6845->horiz_disp));
- /* compute the cursor x position, or -1 if not visible */
+ /* compute the cursor X position, or -1 if not visible */
INT8 cursor_x = cursor_visible ? (mc6845->cursor - mc6845->current_ma) : -1;
/* call the external system to draw it */
@@ -504,7 +504,7 @@ static void *mc6845_start(running_machine *machine, const char *tag, const void
state_save_register_item(unique_tag, 0, mc6845->cursor);
state_save_register_item(unique_tag, 0, mc6845->light_pen);
state_save_register_item(unique_tag, 0, mc6845->cursor_state);
- state_save_register_item(unique_tag, 0, mc6845->cursor_count);
+ state_save_register_item(unique_tag, 0, mc6845->cursor_blink_count);
return mc6845;
}
@@ -548,7 +548,6 @@ void r6545_get_info(running_machine *machine, void *token, UINT32 state, devicei
{
/* --- the following bits of info are returned as NULL-terminated strings --- */
case DEVINFO_STR_NAME: info->s = "R6545"; break;
- case DEVINFO_STR_FAMILY: info->s = "R6545 CRTC"; break;
default: mc6845_get_info(machine, token, state, info); break;
}
}