From 221b17dd2e53e80538916ac55759a3d55aacf084 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 25 May 2026 18:14:33 -0700 Subject: [PATCH] gfxboard: rewind Picasso IV flash before autoconfig Picasso IV autoconfig is read from the flash image, but the initializer can run more than once while the expansion list is scanned and sorted. loadp4rom() leaves the flash zfile positioned later in the image, so a later dry scan read all-0xff data and the board looked like it had no autoconfig block. Seek back to the beginning before reading the Picasso IV autoconfig bytes so repeated scans see the same board data. --- gfxboard.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/gfxboard.cpp b/gfxboard.cpp index faf33b21..174a3795 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -5003,6 +5003,7 @@ bool gfxboard_init_memory (struct autoconfig_info *aci) gb->p4rom = flashromfile_open(_T("picasso_iv_flash.rom")); } if (gb->p4rom) { + zfile_fseek (gb->p4rom, 0, SEEK_SET); zfile_fread (gb->p4autoconfig, sizeof gb->p4autoconfig, 1, gb->p4rom); copyp4autoconfig (gb, gb->board->configtype == 3 ? 192 : 0); if (gb->board->configtype == 3) { -- 2.47.3