mamedev / mame

MAME
https://www.mamedev.org/
Other
7.75k stars 1.95k forks source link

Am9513 logging fix #12492

Open Elektraglide opened 1 week ago

Elektraglide commented 1 week ago

fixed wrong TC index log message

angelosa commented 1 week ago

There's no active file changed here, pushed to mamedev/mame by mistake and rather wanted to sync your fork?

rb6502 commented 1 week ago

@Elektraglide Can you verify what's supposed to be happening here? There are no changes to the Am9513 as things stand.

cracyc commented 1 week ago

The first commit has

@@ -442,7 +443,7 @@ void am9513_device::set_counter_mode(int c, u16 data)
        else if (source >= 6 && source <= 10)
            LOGMASKED(LOG_MODE, "Counter %d: Count on %s edge of GATE %d\n", c + 1, BIT(data, 12) ? "falling" : "rising", source - 5);
        else if (source == 0)
-           LOGMASKED(LOG_MODE, "Counter %d: Count on %s edge of TC%d\n", c + 1, BIT(data, 12) ? "falling" : "rising", c - 1);
+           LOGMASKED(LOG_MODE, "Counter %d: Count on %s edge of TC%d\n", c + 1, BIT(data, 12) ? "falling" : "rising", c );
        else
            LOGMASKED(LOG_MODE, "Counter %d: Count on %s edge of SRC %d\n", c + 1, BIT(data, 12) ? "falling" : "rising", source);
    }

The c var is off by 1 in the log.

Elektraglide commented 3 days ago

Yes, the log has an off by 1 error that this fixes.

happppp commented 3 days ago

You already did that, and it was merged https://github.com/mamedev/mame/pull/12489 This PR(12492) is a duplicate by mistake?