From: Stefan Reinauer Date: Tue, 26 May 2026 01:14:33 +0000 (-0700) Subject: gfxboard: rewind Picasso IV flash before autoconfig X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=221b17dd2e53e80538916ac55759a3d55aacf084;p=francis%2Fwinuae.git 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. --- 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) {