fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

psi: Fix encoding of the GCR format byte

Values outside the range [0,63] now indicate that the gcr format
byte is unspecified, rather than the value 0, which is a valid
gcr format byte.

Hampa Hug bffb2d9d 124b7454

+7 -6
+3 -3
src/drivers/pri/pri-enc-gcr.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/drivers/pri/pri-enc-gcr.c * 7 7 * Created: 2012-02-01 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2012-2021 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2012-2025 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 15 15 * * 16 16 * This program is distributed in the hope that it will be useful, but * 17 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 19 * Public License for more details. * 20 20 *****************************************************************************/ 21 21 ··· 559 559 560 560 f = psi_sct_get_gcr_format (sct); 561 561 562 - if (f == 0) { 562 + if (f >= 64) { 563 563 f = fmt; 564 564 } 565 565
+2 -1
src/drivers/psi/psi-img-psi.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/drivers/psi/psi-img-psi.c * 7 7 * Created: 2013-05-29 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2013-2023 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2013-2025 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 952 952 req = (sct->c != c) || (sct->h != h); 953 953 req |= ((sct->flags & (PSI_FLAG_CRC_ID | PSI_FLAG_NO_DAM)) != 0); 954 954 req |= (sct->encoding != enc); 955 + req |= sct->have_gcr_format; 955 956 956 957 if (psi_sct_get_tags (sct, buf + 6, 12) > 0) { 957 958 for (i = 0; i < 12; i++) {
+2 -2
src/drivers/psi/psi.c
··· 373 373 374 374 void psi_sct_set_gcr_format (psi_sct_t *sct, unsigned char val) 375 375 { 376 - sct->have_gcr_format = 1; 376 + sct->have_gcr_format = (val < 64); 377 377 sct->gcr_format = val; 378 378 } 379 379 ··· 383 383 return (sct->gcr_format); 384 384 } 385 385 386 - return (0); 386 + return (0xff); 387 387 } 388 388 389 389 unsigned psi_sct_set_tags (psi_sct_t *sct, const void *buf, unsigned cnt)