From 2115983a7935c38bb249d15ffec4a7caeed47dc7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 22 May 2015 23:24:27 +0100 Subject: [PATCH] util: swap the old ucp etc 'sd' 32MB shifts for a simple bias We don't use the SocZ80 UZI 32MB block scheme, so repurpose it for general use --- Standalone/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Standalone/util.c b/Standalone/util.c index 5e820310..657a993e 100644 --- a/Standalone/util.c +++ b/Standalone/util.c @@ -18,18 +18,18 @@ extern int swizzling; int fd_open(char *name) { char *namecopy, *sd; - int subdev = 0; + int bias = 0; namecopy = strdup(name); sd = index(namecopy, ':'); if (sd) { *sd = 0; sd++; - subdev = atoi(sd); + bias = atoi(sd); } - printf("Opening %s sd%d\n", namecopy, subdev); - dev_offset = subdev << 25; // * 32MB + printf("Opening %s (offset %d)\n", namecopy, bias); + dev_offset = bias; dev_fd = open(namecopy, O_RDWR | O_CREAT, 0666); free(namecopy); -- 2.34.1