Login
Back to forumReply to this topicGo to last reply

Posted By

BSZ
on 2024-08-24
05:39:31
 FlexSD firmware for SD2IEC drives, VCPU R2

I think it's worth starting a new thread on this...

A new version of the FlexSD firmware has been released, see project's homepage:

Project homepage

TL;DR: The new version allows the handling of .D64 disk images with 40 tracks. In addition, the (preliminary) R2 version of the VCPU has been introduced. Also, the binaries were created with a newer version of the compiler. Due to the use of the new compiler, the firmware requires thorough testing. If you have the hardware, please give it a try! All experiences are welcome.

Longer: The new version introduces the use of 40-track disk images. These disk images can now be attached in the traditional way. But of course it's not that simple. grin

The attached disk image can be read/written sector-wise. (Which will be necessary in the future for support any stuffs with use these type of images.) Traditional DOS file handling is problematic, however, because there are several kinds of "standards" for using extended tracks. I have found 3 species so far, and the biggest problem is that there is no reliable way to identify them. Two of these versions are the most common: DolphinDOS and SpeedDOS format. Of these, the DolphinDOS version is currently supported in firmware, but this is probably not very important. DOS files can be read from all versions, but for writing, if the disk is not DolphinDOS type, the extra capacity cannot be used. This can only cause a problem if you want to delete a file from a non-DolphinDOS disk from the extended area. I don't think this is a real problem, there is no need to deal with extended images for DOS files, the native FAT file system provided by the drive is sufficient. Extended disk image management is needed for today's "modern" programs, but sector-level access is usually sufficient.

The VCPU-R2 version includes some new instructions, which are described in the (also updated) documentation. This completed the old idea, but managed to overcomplicate the implementation a little. grin For this reason it is marked as "preliminary", if there is an idea for simplification, this implementation may change.

The most significant change is that the firmware has been compiled with a new C compiler. There's a constant shortage of memory, so every now and then I try a new compiler to see if it optimizes better and leaves more memory. However, a change of compiler is always risky, for this reason I used GCC version 10.2 for a long time. But I recently tried the 13.2 version, and this generated ~600 BYTE shorter program code than before! happy But... My own tests ran flawlessly, but I ran into a bug with one of the programs: the drive would occasionally "drop" the SD card. (As if there were no card in the drive.) At first, I thought it was a hardware failure (e.g. the card does not contact the socket properly) but after several "cross-tests" it turned out to be flawless with the previous firmware. Further testing also showed that the new firmware is fine if I compile it with the old (10.2) C compiler. grin

One solution might be to return to the "tried and tested" C compiler, but the shorter binary is very tempting. grin The error was rare, but fortunately easy to cause. So I set out to find the cause. Finally, it turned out that the original program implemented a function in a "compiler implementation-dependent" way. In other words, the C compiler generates good results, but this function implemented differently in newer versions. By replacing this function with an implementation-independent version, the bug was fixed.

Fortunately, this has been discovered, but it is not known if there is a similar bug elsewhere. I have created (many) test programs for my own code, but I have not yet found a general test for sd2iec. This is why this firmware version has been designated as alpha for the time being. I would ask everyone who has the opportunity to test it! And if you notice any abnormalities that you haven't already, please report them! And it might be worthwhile to create a general test program to try/test the basic features? But I didn't want to take on something like that... grin

(Edit 2023-12-15: links changed to alpha3.)
(Edit 2024-01-22: links cleared, only homepage)

Posted By

SukkoPera
on 2023-10-12
02:01:42
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Nice job as usual! I have upgraded one of my SD2IECs and made a few very quick tests, everything has been running smoothly so far. I will certainly let you know if I find anything unexpected.

Posted By

BSZ
on 2024-08-24
15:08:09
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

@SukkoPera: Thank you!

I forgot to write in the opening post: there's also an updated package of test programs, including a new test for testing 40-track disk management. Plus I have (finally) written a changelog for the firmware, briefly describing the changes. But they are all linked on the site.

Status update 2023.Dec.15:

I made a new package, here is the FlexSD firmware 1.2.0 alpha3! But you can also find sources and updated test codes on the usual page, of course.

There are two notable changes from the previous version:

- This may not be of interest to anyone but me at the moment, but a preliminary version of ARM2IEC hardware support has been completed! (This brings the total number of supported devices to 9 types of hardware. happy ) I don't think it's too important at the moment, this development will be interesting later. I've been meaning to do this for a while, but due to a recent shortage of chips, I couldn't get the right hardware to make/test it.
- This in maybe affects all users: I may have found a common bug (?) while testing the ARM version. This is in the handling of the error channel: when the drive has sent the last data (with correct sign), it does not finish sending. However, the machine's KERNAL will - of course - cuts off receiving data. And he usually succeeds, therefore no error is visible. But when this fails, communication breaks down. I have only experienced this problem with a combination of ARM2IEC and C128, probably due to some timing mismatch. But the logic so far is incomplete; as soon as I coded the exit, the error disappeared. happy

Since I really didn't want to touch this part of the code, this version needs more thorough testing! grin So please everyone who can, please test! Thanks!

(I have also replaced the links in the opening post.)
Edit: clear old links.

Posted By

SukkoPera
on 2024-01-13
12:53:15
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Updated my SD2IEC, no issues found with ordinary use so far happy.

Posted By

BSZ
on 2024-01-14
11:42:55
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

@SukkoPera: Thanks! "No news" is actually good news here! happy

Posted By

BSZ
on 2024-03-11
18:39:47
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Status update 2024-Jan-22:

I made a new package, here is the FlexSD firmware 1.2.0 beta1!

What's changed:

This is not so interesting for us, but a basic support for the C128 + fast serial bus is ready. But remember: this is currently only possible with the VCPU! The KERNAL communication is not ready yet! But at least it is now possible to write a program that communicates through it. There are also some programs for testing it, among the test programs are T-SRFS, U-RECVTIMEFS, V-LOADTSTFS. These - of course - only work with C128. There are also some bug fixes / optimizations. In addition, the programming documentation has been updated.

If you have the time / inclination, please test! I'm mostly tested with C128 now, as development is now related to it, but thanks for any platform experiences! I would especially appreciate it if someone could also run the mentioned fast-serial tests on C128! I would especially be interested in a C128DCR experience!

Thanks!


Posted By

BSZ
on 2024-03-11
18:39:28
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Status update 2024-Feb-10:

New package, here is the FlexSD firmware 1.2.0 beta2!

I found a "theoretical" bug in the previous version, which has not caused any problems so far. Usually such "never to be seen" bugs tend to cause impossible bugs later on, so I included the possible fix instead. grin

You should update the firmware on the drive! wink

The same as described for beta1 applies here: test, test, test! grin


Posted By

SukkoPera
on 2024-02-11
14:16:15
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Updated, so far, so good! wink

Posted By

BSZ
on 2024-02-12
15:10:19
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Thank you for your feedback! It's true now: if there is no unexpected effects, it's good news! happy

Posted By

BSZ
on 2024-03-27
17:56:24
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Status update 2024-Mar-11:

New package, here is the FlexSD firmware 1.2.0 beta3!

I have replaced the patch in alpha3 with another solution. As the same 'bug' was causing problems in other cases, another solution had to be found. Because of this, I had to touch again the part I didn't want to touch at all! grin But that's why I made another beta, even though the plan was already to make an RC version.

I can still only quote myself: You should update the firmware on the drive! wink And: test, test, test! grin


Posted By

SukkoPera
on 2024-03-14
18:23:03
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Upgraded and did some testing here and there, all good as usual! happy

Posted By

BSZ
on 2024-03-17
10:58:06
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

@SukkoPera: Thank you for your feedback! Good news!

Posted By

BSZ
on 2024-08-24
05:36:10
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Status update 2024-Mar-27:

New package, here is the FlexSD firmware 1.2.0 rc1!

No big changes are expected; I hope this release will be the last of 1.2.0, that's why it's called Release Candidate. It came so quickly after beta3 because there are too many changes in the development branch, and the new stuff should be moved to the public code base, because I end up getting involved. grin

There will be some interesting things, I'm planning to build my own new hardware for it, which will include all the improvements I've been wanting to make for a long time. The prototype is already largely operational. wink

New stuffs here:

FlexSD 1.2.0-rc1 firmware
Test stuffs
VCPU-R2 programming reference guide

All other things

(I think the site is still a bit chaotic, it's time for some tidying up.)

Posted By

gerliczer
on 2024-03-28
13:46:33
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

@BSZ: Any chance of some hints on what to expect from your spin on SD2IEC?

Posted By

BSZ
on 2024-03-29
09:39:41
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

@gerliczer: I don't understand the question exactly, what do you mean? Do you mean the firmware features, or the new hardware to be designed? happy

I didn't want to say too much in advance, if it works to some degree, I'll open a new thread for it. But - of course - I can give you a preview. grin

Posted By

BSZ
on 2024-08-24
05:38:54
 Re: FlexSD firmware for SD2IEC drives, VCPU R2

Update 2024.08.24. No news for now (hopefully soon), but there is a new mirror (thanks siz), I've replaced the links in the post above.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon