From 9e5711a9e9ff4edf3a3fddbac5750f8b6f13bf53 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 30 Jul 2020 19:15:13 +0800 Subject: [PATCH] ao486: additiona debug info is shared folder. --- support/x86/x86_share.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/support/x86/x86_share.cpp b/support/x86/x86_share.cpp index f4ffbf4..dae05dd 100644 --- a/support/x86/x86_share.cpp +++ b/support/x86/x86_share.cpp @@ -80,6 +80,7 @@ enum AL_SUBFUNCTIONS { AL_FINDFIRST = 0x1B, AL_FINDNEXT = 0x1C, AL_SKFMEND = 0x21, + AL_QUALIFY = 0x23, AL_SPOPEN = 0x2E, AL_UNKNOWN = 0xFF }; @@ -736,9 +737,11 @@ static int process_request(void *reqres_buffer) uint32_t off; memcpyb(&off, buf, 4); + uint16_t sz = buf[6] | (buf[7] << 8); + dbg_print(" read %d bytes at %d\n", sz, off); + FileSeek(&open_file_handles[key], off, SEEK_SET); - uint16_t sz = buf[6] | (buf[7] << 8); int read = FileReadAdv(&open_file_handles[key], buf, sz, -1); if (read < 0) { @@ -746,6 +749,8 @@ static int process_request(void *reqres_buffer) break; } + dbg_print(" was read %d\n", read); + reslen = read; res = 0; } @@ -764,9 +769,11 @@ static int process_request(void *reqres_buffer) uint32_t off; memcpyb(&off, buf, 4); + uint16_t sz = buf[6] | (buf[7] << 8); + dbg_print(" write %d bytes at %d\n", sz, off); + FileSeek(&open_file_handles[key], off, SEEK_SET); - uint16_t sz = buf[6] | (buf[7] << 8); int written = 0; if (sz) { @@ -778,6 +785,8 @@ static int process_request(void *reqres_buffer) } } + dbg_print(" written %d\n", written); + *buf++ = written; *buf++ = written >> 8; @@ -1086,6 +1095,15 @@ static int process_request(void *reqres_buffer) } break; + case AL_QUALIFY: + { + dbg_print("> AL_QUALIFY\n"); + + res = 0; + reslen = 128; + } + break; + } ((short *)reqres_buffer)[0] = reslen;