Firmware updates for the STM32/Gotek HxC floppy emulators !

Post Reply
Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Firmware updates for the STM32/Gotek HxC floppy emulators !

Post by Jeff »

I have done many modifications since the current official firmware (v3.0.8.2a)

Since i don't like to release a new firmware with so many changes, i prefer to put it here as an alpha version.

Since the last beta here are the updates :

- New buttons behaviour and better debouncing filter. Navigation user-experience should be better now.
- Disk Eject function : Press both buttons to eject the disk. Working in indexed, autoboot mode, and normal mode.
- "Eject at power up" option added.
- Support up to 999 Images in autoboot mode (with the File selector) (Use the new CFG file format and selector to "activate" this feature)
- LCD : Display refresh improvements.
- New CFG file format : Some new flags and no more slots/disk drive limitation.
- Some critical parts rewritten in assembly. Huge code speed improvement -> Better HD density reliability. ED density to be tested ;).
- Advanced USB mass storage cache implemented to improve read/write reliability.
(Btw : Now when track size can be stored into the SRAM, the emulator will not read forever the data from the stick but use the cached data instead).

And :
- The File selector is now available under Windows and Linux ! : You can now edit the list from a PC !. (Compatible with all SD/USB HxC drives !)
To launch it : HXCFEMNG [SD/USB drive letter:]
A Linux version is also available.
See the readme file for more details.

This is a new solution for all others machines without file selector available.

TO BE DONE :
- Finish the IMG/ST file write support. Most part is there, but still a bug to fix. EDIT : Done !

EDIT : 4 July 2017, new version :

- Huge RAW (*.ADF/*.ST/*.IMG) Write performance enhancement (Write 2 tracks at once !)
- RAW *.IMG files can be used in indexed mode : Name the files DSKA0000.IMG,DSKA0001.IMG,DSKA0002.IMG,...
- Small (for the moment) HFE write performance enhancement.
- "Autoboot.hfe not found" message added.

EDIT : 7 July 2017, new version :

- 7 segments "dots" glitch fixed.
- 128 & 256 bytes sectors support added in raw mode.
- FM : Work in progress (Read working, Write to be done).

EDIT : 10 July 2017, new version :

- Raw file FM Read & Write support ready !
- Some more write speed optimization.

EDIT : 4 August 2017, new version :

- New File format support (WIP) : HFEv3. Can now support copy protected images converted from IPF and others similar formats !
Variable bitrate supported (CopyLock & SpeedLock). Weak/Flakey bits support to be added !
- Fix IPF support for these games: Jim Power, Z-Out,Xenon 2,Ghosts'n Goblins,Rainbow Islands,B.A.T II and probably some others !
- Slot number printed on the second line during slot search with an LCD.
- XCopy write issue fixed.
- Sound buzzer output on the "JB" jumper position. You can connect a piezo or a magnetic buzzer (transistor needed for the magnetic version).
The sound output can be disabled or enabled into the selector settings.
(Note : Please remove these old sound mod using directly the step signal, they are producing reliability problems...)
- Mixed track format/density write support fixed (To be tested!).

Selector software :
- New Bootblock for the Amiga version : The file selector is now "trackloaded" and start faster.
- Speed up the sub-directory change/browsing.
- Can start an image from the slot page with the F7 key.
- The File selector is now available under Windows and Linux ! : You can now edit the list from a PC !. (Compatible with all SD/USB HxC drives !)
To launch it : HXCFEMNG -disk:[SD/USB drive letter:]
See the selector readme file for more details.
This is a new selection solution for all others machines without native file selector available.
- Linux/Windows version : You can now import from txt file / export to txt file / auto populate / check / fix and clear your slots configuration.
Very useful for fast populating and compilations duplication ;)
- Windows version : Fix big size (>8GB) usb stick/sd access issue.
- populateslots option : autoboot.hfe filtered.
07 aug 2017:
- Fix the config file access error when the file haven't the archive flag set.

EDIT : 7 August 2017, new version :

- Low level I2C & LCD IO redesigned and optimized.
- Long names are now scrolling on the LCD during floppy emulation.
- Short name image type identification issue fixed.
- USB "Hot plug" support fixed in autoboot/"file selector" mode.

EDIT : 8 August 2017, new version :


- LCD Display : Refresh rate adjusted and I2C dead lock issue fixed.

- Normal / direct browsing mode :

Auto selecting the current image or subfolder if you don't
press the buttons during than 4 seconds. If needed, the file name
scroll during the delay time.
This modification make the additional select button optional.
Of course the LCD still needed for this mode.

- Indexed/selector mode :

Delay added before selecting the image. Browsing through the slots
is smoother. If needed, the file name scroll during the delay time.

- 7 segments display :
New error/message codes :
"FAt" : Fat init error.
"NFL" : No file. Empty stick ?
"CFG" : Config file not found !
"cFG" : Bad config file !
"Nor" : Warning -> in Normal/Direct browsing mode. You should use a LCD screen.
"AUt" : Autoboot.hfe not found.
"Err" : File image error !
"Ldr" : Into the bootloader.

- Config file save : Before writing to the disk, check that this is really needed.
(Parameters change check)


EDIT : 17 August 2017, new version :

- Write descriptors and write pipeline added :
The drive can now "capture" a new floppy write while it is writing
previous write(s) to the stick.

EDIT : 20 August 2017 -> v3.0.24.1a

- GPIOs access speed up (IRQ latency reduced).
- Write flux decoder speed up (+50%).
- I2C/LCD low level routines optimized and prepared to support the incoming OLED screen support.
( + I2C transmission issues fixed)
- User interface : Fix the printed total number of slot in autoboot and indexed mode.
- Indexed mode + LCD : The file name is printed (Fix).

EDIT : 3 September 2017 -> v3.0.25.1a

- Disk change signal delay reduced when swapping the images.
- Faster HFE write :
- HFE write cache size extended.
- Huge write back function optimization.
- Write flux decoder buffer size reduced to optimize the write latency (ACA500 ARIII support) .
- SSD1306 OLED support (W.I.P!) : SSD1306 Init and mire test.
- Floppy Interface assertion/deassertion IRQ completely turned into assembly.
- USB Stack optimization.

EDIT 6 September 2017: -> v3.0.26.3a

- SSD1306 OLED screen support fully working and enabled.
You can now connect an SSD1306 based 128x32 OLED screen.

These screens are compatible with this firmware : http://www.ebay.com/itm/302110929185

You can connect the screen directly to the J7 connector. (additional pull-up resistors NOT required.)

! > Take care with the 3.3V and GND while connecting the screen. Any mistake may damage the screen ! < !

EDIT 9 September 2017: -> v3.0.26.4a

- Fix write support with non contigus/fragmented tracks into the image (usb stick fragmentation issue).

EDIT 16 September 2017: -> v3.0.27.1a

- Extra LCD resolutions and sizes options added :

- 2x16 characters (for 2x16 or 2x20 I2C-HD44780 and 128x32 OLED screens)
- 2x18 characters (for 2x20 I2C-HD44780 and 128x32 OLED screens)
- 2x20 characters (for 2x20 I2C-HD44780 and 128x32 OLED screens)
- 2x21 characters (for 128x32 OLED screens only)

To select the desired resolution, enter the internal menu, and choose the "LCD size" sub-menu.

- To enter the internal config menu you can now press both up and down buttons. (without usb stick inserted).

- The internal config menu can now be browsed without the selection button, just wait 4 seconds to select an item.

- SD HxC Floppy Emulator internal EEPROM emulation added : The parameters changed into the internal config menu are
now saved into the Flash memory and restored/used at power up.

- Some more internal optimizations.

EDIT : 30 September 2017: -> v3.0.29.1a

- Write pipeline issue fixed.

- Fix : IMG/IMA/DSK and ST files are now visible in normal/direct browsing mode.

- Rotary support added. Connections points : Clock -> J7 pin 2,Direction -> J7 pin 1.

This version passed the 10 Hours intensive Read/Write tests successfully.
(R/W HD Density @ 500Kbits/s on HFE & IMG files).

EDIT : 7 October 2017: -> v3.0.30.1a

- New setting menu item : auto selection setting.
You can now set the desired timeout for the auto selection
function or disable it.

EDIT : 9 October 2017 -> v3.0.31.1a

- Amstrad CPC DSK direct support added (Old and new format) : Read only for the moment.
Write support and simple copy protection support incoming ;).

EDIT : 9 October 2017 -> v3.0.31.2a

Amstrad CPC EDSK & DSK support : Fix issues with non-standard sector size images (Midline Process...).
256/512/1024/2048/4096/8192 sector size supported.

EDIT : 10 October 2017 -> v3.0.32.1a

Amstrad CPC EDSK & DSK : Write Support working !

EDIT : 10 October 2017 -> v3.0.32.2a

Amstrad CPC EDSK & DSK : Fix file type detection with CPC File selector v2.5

EDIT : 15 October 2017 -> v3.0.32.4a

Normal/Direct selection mode :

- Don't load at power up the last selected image if this one was previously ejected.
- Don't load at power up the last selected image if a button is pressed.


EDIT : 17 October 2017 -> v3.0.33.1a

- Config-Less Mode :

Use the settings saved into the device internal flash memory and
switch to normal/direct selection mode when no HXCSDFE.CFG are present.

To change settings without config file, just use the embedded config menu
(Remove the USB Stick and press both buttons to enter it).

NOTE : Without HXCSDFE.CFG the last image selection is not saved.

- More CPC DSK format variant support. (again !)

EDIT : 19 October 2017 -> v3.0.33.2a

- OLED screen support : Characters generator code speed optimization.

EDIT : 25 October 2017 -> v3.0.33.3a

- System tick optimization.

EDIT : 26 October 2017 -> v3.0.33.4a

- CPC DSK / RAW DSK : If not a CPC DSK file, open it as a RAW image.
- RAW Image : *.DSK and *.OUT files support added.

EDIT : 11 November 2017 -> v3.0.33.12a

- Extra LCD size option added :
- 2x40 characters (for 2x40 I2C-HD44780 screens)

- Clear internal settings function : Press "up" button at power up to
clear the settings with the default values.

- SP1200 write support fix.

EDIT : 3 December 2017 -> v3.1.0.4a

Major update !

- New direct file formats support (Read & Write !) :
- Acorn machines : *.ADL,*.ADM,*.SSD,*.DSD and *.ADF file support
- Camputer Lynx : *.LDF
- Commodore C64 : *.D81
- Thomson machines : *.FD
- Sam Coupé : *.SAD, *.MGT
- MSX Machines : *.IMG, *.DSK
- Spectrum : *.TRD, *.SDD

- New menu entry : Target system family selection.
This reduce a lot the risk of erronous raw file identification.

- Lots of RAW file support improvements :
All sector sizes supported, advanced track skew and interleaving support.
FM & MFM support.

- Amstrad CPC DSK support : Fix for the One Disk/double sided Batman demo.

- Fix attempt of the "diymore.cc" OLED screens : OLED init screen delay
menu option added.
(Note : Please avoid these "diymore.cc" screens until i got an idea
what is the root cause of the issue.)

- Internal improvement : Track cache layer improved, RAW files support/identification improved.

Please report any issue to hxc2001 <at> hxc2001.com
Thanks ! :)

EDIT : 17 December 2017 -> v3.1.1.0a

More direct raw formats support :

- Akai formats (*.IMG)
- Casio FZ1 (*.FZ1)
- Emax machines formats (*.IMG)
- Ensoniq EPS & Mirage series formats (*.IMG)
- General Music formats (*.IMG)
- Korg formats (*.IMG)
- X68000 (*.HDM,*.XDF)

- Internal optimizations.

Please report any issue to hxc2001 <at> hxc2001.com
And if you want a specific file/disk format supported by the HxC firmware, send me an email too !

Thanks ! :)

EDIT : 15 January 2018 -> v3.1.1.1a

- Fix broken Rotary support in normal mode.
(Connection points reminder : Clock -> J7 pin 2,Direction -> J7 pin 1)

EDIT : 21 January 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.1.2a

- "Load Last selected image" : Save & Restore previous folder position.

EDIT : 27 January 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.1.3a

- Normal mode Fix : ST files are visible again !

EDIT : 27 January 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.1.4a

- Config file "Load last loaded floppy" flag is now supported in indexed and file selector mode.

EDIT : 29 January 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.2.0a

- *.ST 720KB Files : Switch to the TOS 1.62 Disk Layout.
- RAW files loader : Internal enhancement.

EDIT : 31 January 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.3.0a

- RAW MFM & FM Images (IMG/ST/...) :
- Write speed improvement :
- Track cache workflow improvement.
- Code optimization (CRC16, MFM 2 BIN...).

EDIT : 01 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.4.0a

- More Code Speed optimizations.
- RAW MFM & FM Images (IMG/ST/...) :
- More Write speed improvement : Sector Data cache prefetch.

EDIT : 02 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.5.0a

- Cache flush fix :
Do you not reorder the cache when not needed ( e.g when the track fit the cache size )

- CFG File V1 fix (Autoboot mode) :
slots support now file images with 2 characters filename extension...

- More code Speed optimizations. (again ! :) )

EDIT : 04 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.5.1a

- Raw *.IMG PC Files : Use the DOS 6.22 disk layouts.
- And as always some code optimizations.

EDIT : 05 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.6.0a

- Low level Floppy IO optimizations.

EDIT : 06 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.8.1a

- Raw files : Write sector performance increased.
Near Real time sectors write !

13 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.9.1a

- New menu setting interface menu for normal 7-segments Goteks:

-> To access it, remove the USB Stick and press both buttons.
--> Choose the sub menu number - wait some seconds for the selection validation.
---> Check and/or change the setting - wait some seconds for the selection validation.

The new setting is then saved into the device.
Reminder : To clear all settings to the default values, press the right button at power up.

Current Menu and sub selection definition :

Menu 0 - System family selection :
00 = AUTO (DEFAULT)
01 = Amiga
02 = Acorn
03 = Atari ST
04 = IBM PC AT/XT
05 = Camputer Lynx
06 = Commodore 1581
07 = Thomson
08 = x68000
09 = SAMCOUPE
0A = MSX
0B = Spectrum
0C = Akai
0D = Casio
0E = Emax
0F = Ensoniq
10 = General Music
11 = Korg

Menu 1 - Interface mode :
00 = AUTO (DEFAULT)
01 = IBM PC DD
02 = IBM PC HD
03 = ATARI ST DD
04 = ATARI ST HD
05 = AMIGA DD
06 = AMIGA HD
07 = CPC DD
08 = GENERIC SHUGART DD
09 = IBMPC ED
0A = MSX2 DD
0B = C64 DD
0C = EMU SHUGART
0D = S950 DD
0E = S950 HD

Menu 2 - Write protect mode :
00 = AUTO (DEFAULT)
01 = Write protected.
02 = Write enabled.

Menu 3 - Double Step :
00 = AUTO (DEFAULT)
01 = Single step
02 = Double step

Menus 4<->E : Not currently assigned.

Menu F - Display firmware version


25 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.16.1a

- User interface part : Code Refactored

- Better buttons behavior.
- Better/faster rotary behavior.

- Normal mode : Press both buttons shortly to jump to the first entry of the current folder. ("..")

- Normal mode : When returning to parent folder ("..") the position in the folder is restored.

- Autoboot mode :
--> Press both buttons shortly to jump to Autoboot.hfe
--> Press both buttons more than 2 seconds eject/insert the disk.

- Indexed mode :
--> Press both buttons shortly to jump to DSKA0000.HFE
--> Press both buttons more than 2 seconds eject/insert the disk.

- 7 segments screen : Now show when an image is inserted ("---") or ejected (" - ")

- OLED : init algorithm revised for diymore.cc screens.
(Press the right button at power up at the first diymore.cc screen installation).

- Various user interface fixes.


So i now need some alpha tester volunteers :)

https://hxc2001.com/download/floppy_dri ... rmware.zip

https://hxc2001.com/download/floppy_dri ... _notes.txt

:D

Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

New update : Fix/reduce the Index signal jitter:

https://hxc2001.com/download/floppy_driv ... rmware.zip

Kingstener
Posts: 67
Joined: Sat Mar 04, 2017 1:47 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Kingstener »

- New CFG file format : Some new flags and no more slots/disk drive limitation
The last two trials do not run here with the included cfg - since no USB stick is detected, I had to take the cfg from an older version...

Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

Kingstener wrote:
- New CFG file format : Some new flags and no more slots/disk drive limitation
The last two trials do not run here with the included cfg - since no USB stick is detected, I had to take the cfg from an older version...
How do you use the emulator ? Autoboot, normal or indexed mode ?

Kingstener
Posts: 67
Joined: Sat Mar 04, 2017 1:47 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Kingstener »

normal mode

Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

Kingstener wrote:normal mode
What is displayed on the lcd ?

mondo1976
Posts: 156
Joined: Mon Dec 28, 2015 3:54 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by mondo1976 »

Amazing! Trying this out right now.

Edit: I haven't noticed any problems specific to this update, but I was hoping it might fix the saving problem on my E-mu Emax. It didn't. Basically, it's about a 40% chance it will save banks back to disk. I have to attempt "Save All" usually a couple times before it will finally work.

Ah well, the index mode did seem to be smoother changing between disks though, so that's nice!!!

You had mentioned previously:

"With a simple data sector dump, you have just to push/pop the sector data to/from the usb disk. But you have to add a real time iso/mfm sector encoder/decoder into the firmware plus find a way to specify the disk geometry if you want the emulator to be versatile. The realtime encoder is already into the firmware. I need to finish the write part."

Is this implemented now? Is that "IMG/ST file write support" or did you mean that's only for Atari? I've still been trying to write to HFE, so if I can attempt raw IMG writing with the Emax then I'd be quite happy to give it a go.

Kingstener
Posts: 67
Joined: Sat Mar 04, 2017 1:47 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Kingstener »

Jeff wrote:
Kingstener wrote:normal mode
What is displayed on the lcd ?
reading FAT...
forever and ever... :wink:
I've seen, the included cfg is about 65K and a "normal" 8K :shock:

Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

Kingstener wrote:
Jeff wrote:
Kingstener wrote:normal mode
What is displayed on the lcd ?
reading FAT...
forever and ever... :wink:
I've seen, the included cfg is about 65K and a "normal" 8K :shock:
This is probably because the new cfg are set by default for the file selector (autoboot) mode. the emulator is looking for autoboot.hfe
is it on your usb stick?

For the size, this is normal : 8K allow ~54 slots. 65K is for 999 slots.

Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

mondo1976 wrote:Amazing! Trying this out right now.

Edit: I haven't noticed any problems specific to this update, but I was hoping it might fix the saving problem on my E-mu Emax. It didn't. Basically, it's about a 40% chance it will save banks back to disk. I have to attempt "Save All" usually a couple times before it will finally work.

Ah well, the index mode did seem to be smoother changing between disks though, so that's nice!!!

You had mentioned previously:

"With a simple data sector dump, you have just to push/pop the sector data to/from the usb disk. But you have to add a real time iso/mfm sector encoder/decoder into the firmware plus find a way to specify the disk geometry if you want the emulator to be versatile. The realtime encoder is already into the firmware. I need to finish the write part."

Is this implemented now? Is that "IMG/ST file write support" or did you mean that's only for Atari? I've still been trying to write to HFE, so if I can attempt raw IMG writing with the Emax then I'd be quite happy to give it a go.
I am working on the write speed problem right now.

namachari
Posts: 59
Joined: Tue Aug 23, 2016 11:33 am

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by namachari »

I'll give this a go tomorrow. I'm also looking forward to the write speed fix, as that may fix some issues I'm having with some of me S-100 machines. Specifically the ones using Versafloppy cards.

Thanks

Kingstener
Posts: 67
Joined: Sat Mar 04, 2017 1:47 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Kingstener »

Jeff wrote:
This is probably because the new cfg are set by default for the file selector (autoboot) mode. the emulator is looking for autoboot.hfe
Ok, with the autoboot.hfe it works - thanks for your support :D

Jeff
Site Admin
Posts: 8091
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

New version :
https://hxc2001.com/download/floppy_dri ... aTrial.zip

-> Huge RAW (*.ADF/*.ST/*.IMG) Write performance enhancement (Write 2 tracks at once !)
-> RAW *.IMG files can be used in indexed mode : Name the files DSKA0000.IMG,DSKA0001.IMG,DSKA0002.IMG,...
-> Small (for the moment) HFE write performance enhancement.
-> "Autoboot.hfe not found" message added.

mondo1976
Posts: 156
Joined: Mon Dec 28, 2015 3:54 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by mondo1976 »

Raw mode worked with zero fuss. It also seemed to boost the writing reliability on my very picky Emax significantly. It wrote correctly somewhere around 8 or 9 times out of 10. Not perfect, but good enough for me!!

Terrific update!!!

namachari
Posts: 59
Joined: Tue Aug 23, 2016 11:33 am

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by namachari »

Hi Jeff,
I'm just in the process of trying out the latest files.
I've updated the Gotek, and that seemed to work well.

I tried exporting a working .HFE file (FM, 77 tracks, 26 sectors, 128 bytes/sector etc) used on my IMSAI as a .IMG file and naming it DSKA0000.IMG. I put this on the USB stick, but the Gotek shows an ERR message when trying to select this file.
Maybe I'm doing something wrong, or my understanding of the .IMG file is wrong.

Also, I'm wondering if your update fixed the two dots on the LCD screen issue that some people have (including me). See here: http://torlus.com/floppy/forum/viewtopi ... =33&t=3028
I only ask because after I first updated the gotek with your latest files, the dots disappeared for a short time, but for some reason reappeared again!!! I was hoping your "- LCD : Display refresh improvements" was maybe going to solve this.

Thanks again for the great update and your continued support. We all appreciate your time and efforts.

Phil

Post Reply