From b28b607c090b72594641b11eaa3647ff043e0e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Amig=C3=B3?= Date: Tue, 21 Aug 2018 16:26:45 +0200 Subject: [PATCH] Fixing bug in GR8NET devices not properly returning name version string --- src/hub.c | 24 ++++++++++++++---------- src/include/globals.h | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/hub.c b/src/hub.c index 7ccd406..cfb266c 100644 --- a/src/hub.c +++ b/src/hub.c @@ -307,7 +307,7 @@ void get_unapi_version_string(char *unapiver) { byte version_main; byte version_sec; uint name_address; - char buffer[80]; + /*char buffer[80];*/ int n; UnapiCall(code_block, UNAPI_GET_INFO, ®s, REGS_NONE, REGS_MAIN); @@ -315,15 +315,19 @@ void get_unapi_version_string(char *unapiver) { version_sec = regs.Bytes.C; name_address = regs.UWords.HL; - n = 0; - do { - c = UnapiRead(code_block, name_address); - buffer[n] = c; - name_address++; - n++; - } while (c != '\0'); - - sprintf(unapiver, "%s v%i.%i", buffer, version_main, version_sec); + // XXX + // GR8NET doesn't seem to return the name string properly. + // Disabling it for now... + // See https://www.msx.org/forum/msx-talk/general-discussion/msxhub-first-beta-release-call-for-help + /*n = 0;*/ + /*do {*/ + /* c = UnapiRead(code_block, name_address);*/ + /* buffer[n] = c;*/ + /* name_address++;*/ + /* n++;*/ + /*} while (c != '\0');*/ + + sprintf(unapiver, "%s v%i.%i", "UNAPI", version_main, version_sec); debug("%s", unapiver); } diff --git a/src/include/globals.h b/src/include/globals.h index 71bd7e7..d74aace 100644 --- a/src/include/globals.h +++ b/src/include/globals.h @@ -10,7 +10,7 @@ #include "asm.h" -#define MSXHUB_VERSION "0.1.0 beta" +#define MSXHUB_VERSION "0.1.1 beta" /* DOS errors */ #define NOFIL 0xD7