DS203-DSOQuad icon indicating copy to clipboard operation
DS203-DSOQuad copied to clipboard

Rev 5.7 - improve save CFG function

Open Turro75 opened this issue 3 years ago • 4 comments

it now works with 2M and 8M flash thanks to Alterbios no need to manually create CONFXXX.CFG files.

Changed Rev to 5.7

Turro75 avatar Jun 25 '21 20:06 Turro75

@Turro75,

I don't have a hw 2.72 8mb device so unfortunately I can't test. Reading the User Guides section for older HW 2.6 and 2.72 it says: ALTERBIOS V 0.4 Needs to be installed on 2Mb devices to fix file corruption issues.

My understanding is that the 8mb device does not need ALTERBIOS. Have you tried without using ALTERBIOS?

MotoMaxis avatar Jun 27 '21 16:06 MotoMaxis

Also, why do you want to remove the code for backing up the Default CONFIG 0 (boot up config) which is done only when you are Saving new Default config?

Thank you for your support.

MotoMaxis avatar Jun 27 '21 16:06 MotoMaxis

Hello MotoMaxis,

the backup and the creation in advance of many CONF00X.CFG are tricks inserted by Wildcat as a workaround because of frequent fat corruptions.

The main issues I've seen is that stock SYS and APP both save the CFG as 512B size, this in some way create the corruption in my 2.72 8MB. I realized that because I was failing all the times when saving BMP, unless once during a test on a fresh formatted flash (with a winXP virtual machine) I got all valid BMP, then really happy to have found a valid way (instead of formatting it in linux as I usually do) when I created the WPT everything stopped working.

Modifying SYS was out of my scope, Alterbios instead is quite easy and quick, so I modified a couple of lines of code and everything started working. My patch was already merged by JPA, it simply writes chunks of 512B on 2MB devices and 4KB on 8MB devices. This fixed all my corruption issues and file saving inconsistencies.

Then I had a look at the Wildcat 5.6 code to see why there were still so much issues on saving CFG file, I reworked it a bit and now it works. I see exactly the same code is used in 6.5, I suggest You to apply and try my changes.

Sorry I see that the diff file is big, I didn't realize that the code beautifier modified a lot of unchanged stuff. I changed on version on main.c and the body of Save_Param in files.c

Turro75 avatar Jun 27 '21 17:06 Turro75

I merged SYS and Alterbios to a single file that fit in the SYS slot. have a look here https://github.com/Turro75/AlterBIOS/tree/fit-in-SYS-memory/Compiled if You want try it on Your devices.

Turro75 avatar Jun 27 '21 20:06 Turro75