From 896c3a046ca74e2f7ca7a4e3e55ec0bcbb70114b Mon Sep 17 00:00:00 2001 From: David Kuder Date: Tue, 2 May 2023 19:54:27 -0400 Subject: [PATCH] Auto selection of card based on detection --- src/menu.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/menu.h b/src/menu.h index 6c05a18..884df3a 100644 --- a/src/menu.h +++ b/src/menu.h @@ -335,6 +335,13 @@ int prompt_slot(char *progname) { int c; int done=0; + // Attempt to find the lowest numbered V2 Analog Card + for(c = 7; c > 0; c--) { + if(!memcmp("V2A", (uint8_t *)(0xC0F8 + (c << 8)), 3)) { + cardslot = c; + } + } + backdrop(progname); window(" Slot Number? ", 38, 7, 1);