static struct CIA cia[2];
static bool oldovl;
-static bool led;
+static int led;
static int led_old_brightness;
static evt_t led_cycle;
static evt_t cia_now_evt;
{
evt_t c = get_cycles();
int t = (int)((c - led_cycle) / CYCLE_UNIT);
- if (old_led)
+ if (old_led > 0)
led_cycles_on += t;
else
led_cycles_off += t;
static void check_led(void)
{
uae_u8 v = cia[0].pra;
- bool led2;
+ int led2;
v |= ~cia[0].dra; /* output is high when pin's direction is input */
led2 = (v & 2) ? 0 : 1;
led_cycles_off = 0;
led_cycles_on = 0;
led_cycle = get_cycles();
+ led = 0;
if (!savestate_state) {
oldovl = true;
if (currprefs.cs_ciaoverlay) {
oldovl = true;
}
+ led = -1;
bfe001_change();
if (!currprefs.cs_ciaoverlay) {
map_overlay(oldovl ? 0 : 1);