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:

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by Jeff »

tzok wrote:
Sun Feb 18, 2018 12:11 pm
Entering/exiting directories now works ok, but encoder is almost impossible to use. Now I have to turn it really fast to have any effect.

I don't know much about STM32 but why polling, not interrupts? You've got 16 different pin change interrupts there. Polling buttons and encoder eats up a lot of CPU time.

I thing someone else already asked for it - I thing it would be nice to exit directory to the same position it was entered from. So If I had directories A, B, C, D, and I've entered C, then choose .., I go back to C, not A.
ok i revert the new filtering parameters :
https://hxc2001.com/download/floppy_driv ... CUSBFE.UPD
better ?

Polling is not the exact term. Periodically checked is a better one ;).
I prefer to avoid any direct interrupt from stuff subject to bouncing...

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by tzok »

Better, but you could make auto-repeat delay for basic 2 buttons a little longer. Since .2a they started do "bounce" by 2 positions on 1 press. I'm not sure if this is due to a new de-bouncing or too short auto-repeat delay.

Hmm... as polling is "periodically checking device state", whether you like it or not, you are polling these buttons ;)

I've looked at Keir's code and he also doesn't use interrupts for UI.

I withdraw what I said - I'd would try to use interrupts (with detaching and re-attaching them inside the interrupt routine), but commonly recommended method for push-buttons is polling. So I guess more experienced people decided that this is the right way to do it.
Last edited by tzok on Sun Feb 18, 2018 6:17 pm, edited 2 times in total.

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 »

tzok wrote:
Sun Feb 18, 2018 12:51 pm
Better, but you could make auto-repeat delay for basic 2 buttons a little longer. Since .2a they started do "bounce" by 2 positions on 1 press. I'm not sure if this is due to a new de-bouncing or too short auto-repeat delay.
https://hxc2001.com/download/floppy_driv ... USBFE2.UPD

Tell me if this firmware solve the button bounce and still ok with rotary.

EDIT your oscilloscope channel 1 is set in AC mode !
But anyway this rotary is awful ! :)

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by tzok »

Thank you for the scope settings...

Encoder seems to be ok, but buttons still autorepeat way too fast. Now I think it is not about de-bouncing, but they just start to auto repeat too fast.

Image

When I turn it really slowly there is 10-20ms between edges:
Image

On slower time base it doesn't look so bad ;)
Image

But I feel as sth. bad had happened with the UI timing. The OLED scroll rate is way too fast, buttons autorepeat is also almost instantaneous (I think the autorepeat should occur after holding button for at least 250msec). Also the greetings screen after power on just flashes (impossible to read).

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 »

I see tons of glitches on these traces ;).
For the greetings, yes this is normal : The emulation must be ready as soon as possible. Some systems try to boot under 1 second after the power up !

new firmware to test :
https://hxc2001.com/download/floppy_driv ... USBFE3.UPD
both buttons + rotary to test.

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by tzok »

I've observed something interesting - buttons work just fine until I move the rotary encoder. After that they start to tend to skip by 2 positions. This problem occurs only in the file selector, in the setup menu it is always ok. Also the encoder works much smoother and better in the setup menu, I'd even say that in menu it works perfectly.

Another thing - I choose file number 4 and "insert" this image. After turning power off and back on, I still have file number 4 selected and inserted, but when I move up, I end up with the file number 1, when I go down first, I end up on the last file in directory...

Maybe revert keys de-bouncing to the initial version, because in menu they were working better then. Are you accessing filesystem after changing current file? If so, maybe delay this by slightly longer time than auto-repeat delay.

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 »

tzok wrote:
Sun Feb 18, 2018 7:39 pm
I've observed something interesting - buttons work just fine until I move the rotary encoder. After that they start to tend to skip by 2 positions. This problem occurs only in the file selector, in the setup menu it is always ok. Also the encoder works much smoother and better in the setup menu, I'd even say that in menu it works perfectly.
Firmware update ! :
18 February 2018: Firmware STM32 USB HxCFloppyEmulator v3.1.10.6a

- Normal mode : key auto-repeat delay increased.
https://hxc2001.com/download/floppy_driv ... rmware.zip

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

Should be fixed. Tell me if this is better.

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by tzok »

Buttons now work ok, yet the encoder still works... I'd say harsh. It is not the problem with encoder as in setup menu it works great.

So we can continue to other issues/request:
- ".." should go to place from we come from, not to the begin of the list. When there is a multi-level directory tree and I'm on "leaf" of it, I go to ".." push a button and still see the "..".
- go up/down after reboot should go up/down from the actual position, not from the begin of the list ("..").
- duplicated function in Setup Menu: Step sound and Sound volume - in both I can set OFF or from CFG. What is the point of having these in two places? Wouldn't be enough to leave just Sound volume menu? There is no other sound than the step motor sound emulation.
- ambiguous option in Function Menu (hold 3rd button): Change drive - it is present and drive B is possible to be chosen, despite the fact that Drive B in Setup Menu is set to OFF, and both options are obsolete as GOTEK HxC apparently does not support Drive B at all.
- ambiguous option in Function Menu (hold 3rd button): Flip disk - despite the fact, that dual side disk drive is emulated.
- non-working option in Function Menu (hold 3rd button): Rename file img - Chose (...) blinks and goes back to file selector.

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 »

tzok wrote:
Sun Feb 18, 2018 11:20 pm
Buttons now work ok, yet the encoder still works... I'd say harsh. It is not the problem with encoder as in setup menu it works great.

So we can continue to other issues/request:
so this still not ok and we can't exactly continue
tzok wrote:
Sun Feb 18, 2018 11:20 pm
- ".." should go to place from we come from, not to the begin of the list. When there is a multi-level directory tree and I'm on "leaf" of it, I go to ".." push a button and still see the "..".
- go up/down after reboot should go up/down from the actual position, not from the begin of the list ("..").
Then config file format must be revised. Anyway this is the next work already planned.
tzok wrote:
Sun Feb 18, 2018 11:20 pm
- duplicated function in Setup Menu: Step sound and Sound volume - in both I can set OFF or from CFG. What is the point of having these in two places? Wouldn't be enough to leave just Sound volume menu? There is no other sound than the step motor sound emulation.
In fact there is 2 kinds of sound : the step sound and the user interface sounds. the last one is not yet enabled in the gotek firmware, but it will.
tzok wrote:
Sun Feb 18, 2018 11:20 pm

- ambiguous option in Function Menu (hold 3rd button): Change drive - it is present and drive B is possible to be chosen, despite the fact that Drive B in Setup Menu is set to OFF, and both options are obsolete as GOTEK HxC apparently does not support Drive B at all.
Same, it will in the future.
tzok wrote:
Sun Feb 18, 2018 11:20 pm

- ambiguous option in Function Menu (hold 3rd button): Flip disk - despite the fact, that dual side disk drive is emulated.
Quite useful with some single sided machines ;).
tzok wrote:
Sun Feb 18, 2018 11:20 pm

- non-working option in Function Menu (hold 3rd button): Rename file img - Chose (...) blinks and goes back to file selector.
Not tested yet but this is a special function for HFE files. Will see if i remove it.

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by tzok »

Take a look at this:
https://youtu.be/7oZeLnQYwgI

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 »

tzok wrote:
Sun Feb 18, 2018 11:52 pm
Take a look at this:
https://youtu.be/7oZeLnQYwgI
will work on this to speedup it tomorrow ! :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 »

Jeff wrote:
Mon Feb 19, 2018 12:24 am
tzok wrote:
Sun Feb 18, 2018 11:52 pm
Take a look at this:
https://youtu.be/7oZeLnQYwgI
will work on this to speedup it tomorrow ! :D
still work in progress but let me know about the rotary :
https://hxc2001.com/download/floppy_driv ... CUSBFE.UPD

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: New Alpha version Firmware - Volunteer Testers needed !

Post by tzok »

Encoder now works fine! I've also noticed two levels of auto-repeat for keys.

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 »

tzok wrote:
Sun Feb 18, 2018 11:20 pm
- ".." should go to place from we come from, not to the begin of the list. When there is a multi-level directory tree and I'm on "leaf" of it, I go to ".." push a button and still see the "..".
- go up/down after reboot should go up/down from the actual position, not from the begin of the list ("..").
First request done :
https://hxc2001.com/download/floppy_driv ... CUSBFE.UPD

The second one will come quite soon ;)

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 »

And now short press of both buttons jump to the first file of the current folder ("..") in normal mode,
And to autoboot.hfe in file selector mode.
And to DSKA0000.HFE in indexed mode.

https://hxc2001.com/download/floppy_driv ... CUSBFE.UPD

Post Reply