Open source firmware for Gotek floppy emulator released

Arc/RPCs, peripherals, RISCOS operating system & ARM kit eg GP2x, BeagleBoard
User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Sat Dec 16, 2017 7:27 pm

I absolutely recommend adding a rotary encoder and OLED display too:

OLED module: https://www.ebay.co.uk/itm/282691544994
Rotary encoder: https://www.ebay.co.uk/itm/132433293994

You'll need a USB A-A cable to do the initial flashing too.
Thanks Daniel.... I was wondering about those...

Parts now on the way :D

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sat Dec 16, 2017 7:40 pm

You will need to enlarge the window a bit for the OLED, and drill a hole for the rotary encoder. You can also add a piezo buzzer to give you drive click noises:

https://www.ebay.co.uk/itm/222581547044

I've used hotmelt glue to hold the OLED in place.

d.

User avatar
YuT666
Posts: 169
Joined: Tue Oct 25, 2016 6:07 pm
Location: Bavaria
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by YuT666 » Sun Dec 17, 2017 9:28 pm

Well ...
I absolutely recommend adding a rotary encoder ...
A rotary encoder for what?
Libera Te Ex Inferis ...

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sun Dec 17, 2017 9:32 pm

To scroll through the images and navigate directories on the USB stick. Twist the knob to move to the next, press it in to select. Much quicker than the buttons.

d.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Thu Dec 21, 2017 10:51 pm

danielj wrote:80 track, 10 sectors, 256 bytes, single sided, interleave 1, skew 0, bitrate 250000, RPM 300, Auto-Gap3, pregap 0.

It seems fine with 1770 on the master - it could be it needs tweaking on an 8271...

d.
My Gotek arrived today from China. Replaced the 7 segment display with an OLED display, USB flashed the firmware to ver 0.9.5a and hooked it up to my 8271 based Beeb. All working perfectly (after working out that I needed to move the drive select jumper from S1 to S0) using the default settings in HxCFloppyEmulator to convert fully padded .ssd & .dsd files to .hfe format.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sat Dec 23, 2017 7:44 pm

Hi,

I'm having a bit of trouble getting some of the Level 9 graphics adventures to work properly with this drive (eg Lancelot). For some reason it won't load the graphics. For graphics to load, the beeb needs to be expanded with both sideways and shadow ram. The machine I'm using has both, and the game works fine with MMFS in this machine.

The game was originally supplied on a 'flippy' disk for those with single sided 80 track drives only. In this mode, the user would be instructed to periodically flip the disk. There were instructions supplied which would allow you to create a double sided disk to avoid you having to flip the disk (basically just doing *BACKUP x y).

In my case the game has previously been converted to double sided. I've basically taken the lancelot.dsd file from my MMFS (which works fine) and converted it to .hfe format. Both drive 0 and drive 2 on the gotek seem to have the correct files and file structure when I run a *INFO *.* command.

I believe the game checks for 'flippy' status by trying to access drive 2, and a drive error sets the game to 'flippy' mode. I wonder if something is going wrong when this check is being carried out on the gotek drive. In my case I'm already using a .dsd file so this check shouldn't actually generate any error, and should work in non flippy mode. The game is not asking me to flip the disk (expected), but at the same time is not displaying any graphics (not expected).

My beeb has a 8271 disk controller, and I'm currently using DFS 1.20 (from DNFS ROM).

Anyone able to test on their system (would need BBC+, or BBC with both shadow and SWR) to see if they get the same issue, or able to provide any pointers as to what might be going wrong?

Thanks
Ken.
Last edited by KenLowe on Sat Dec 23, 2017 8:45 pm, edited 3 times in total.

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sat Dec 23, 2017 8:25 pm

Ken, not in a position to test the HFE on my gotek at the moment, but can you post it up here and I'll have a look at it in the editor (and try and recreate a DSD from it)?

d.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sat Dec 23, 2017 8:29 pm

Here's the original .dsd and converted .hfe

Worth noting that I can see on the gotek oled display that drive 2 (S:1) is being briefly accessed during the initial loading of the game. Thereafter there is no attempt to access drive 2. I think most of the pictures are on drive 2.

Edit 1: Interesting. I've just switched from DFS1.20 (DNFS) to DFS0.98, and it's now working! Not sure what happens on real hardware. I'll try that shortly...

Edit 2: Well, that took a bit more effort than I anticipated. Firstly, I had to find something to format a physical floppy disk (thanks ADT 2.00 ROM), and then find a way to transfer a .dsd to floppy (thanks RetroClinic *IMPORT -D02). And the outcome was... exactly the same as I saw with gotek. DFS1.20 (DNFS) not working, DFS0.98 working! So this is NOT a gotek issue. It looks like it's a Lancelot / DFS1.20 issue. I wonder if it's down to some of the differences highlighted here (possibly the difference in the way that DIR & LIB work):

http://chrisacorns.computinghistory.org ... NFS-ib.pdf

Thanks.
Attachments
Lancelot.zip
(516.46 KiB) Downloaded 26 times

User avatar
jgharston
Posts: 3090
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by jgharston » Sun Dec 24, 2017 6:43 am

KenLowe wrote:And the outcome was... exactly the same as I saw with gotek. DFS1.20 (DNFS) not working, DFS0.98 working! So this is NOT a gotek issue. It looks like it's a Lancelot / DFS1.20 issue. I wonder if it's down to some of the differences highlighted here (possibly the difference in the way that DIR & LIB work):
I've just done a quick test on BeebEm+DFS 1.20 and it works fine here, as far as I can tell. (I get bored with adventure games after about minus three nanoseconds....)

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sun Dec 24, 2017 8:25 am

jgharston wrote:I've just done a quick test on BeebEm+DFS 1.20 and it works fine here, as far as I can tell. (I get bored with adventure games after about minus three nanoseconds....)
Interesting. I've just tried BeebEm, and get the same result (without Econet enabled). However, if I then enable Econet, it fails in the same way as on real hardware. Switching to standalone ROMS DFS0.98 & NFS 3.34 and everything starts working again. Do you see the same?

For my test, I'm using the following configuration:

BBC + IntegraB
Native 8271
Econet On
Floppy Drives On
Default Keyboard Mapping
ROM15: BASIC
ROM14: IBOS 1.20
ROM13: DFS, NET (DNFS)
ROM12: DFS 0.98 (Unplugged)
ROM11: NET 3.34 (Unplugged)

Annoyingly, there's an issue with the way BeebEm is setting up the default IntegraB config, so I've gone through a few steps to reset it (CTRL+@+BREAK and the *CONF. a few parameters). I've attached a snapshot which should get you there without having to go through the reset steps.

'*UNPLUG 13' & '*INSERT 11 12' followed by a CTRL+BREAK swaps the active ROMS around.

I get a sense I'm drifting off topic a little bit! Maybe one of the mods can carve this discussion out into a new thread?
Attachments
IntegraB.rar
(43.5 KiB) Downloaded 24 times

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Mon Jan 01, 2018 6:26 pm

I've popped up a very long winded video about how to mod the gotek:

https://www.youtube.com/watch?v=fedLRCFZycY

Some of it will no doubt be teaching people to suck eggs :)

d.

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Thu Jan 04, 2018 8:38 am

I've popped up a very long winded video about how to mod the gotek:
Thanks Daniel... not brief :D but works for me.

I've got my Gotek flashed and reading 640k ADFS images created by ADFS explorer.

I'll do the OLED, rotary encoder and speaker mods when I get a couple of hours free.

Are there still plans to include the older DSD SSD formats?

Also, am I correct in thinking this will now work with my Amiga 1200 without any further mods?

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Thu Jan 04, 2018 9:23 am

Yes, but in the meantime you can use the HxC software to convert them to HFE format that will work. No additional changes needed to make it work with the Amiga AFAIK.

:)

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Thu Jan 04, 2018 6:25 pm

Thanks Daniel I'll wait for the update :D

In the mean time I've just tried it with my 960k 286 Pi CoPro datacentre Master :lol:

Works a treat... For now, with the vanilla GOTEK control and screen...

Drop the 720k DOS image files created by Virtual Floppy Drive onto a memory stick.
Boot to C prompt in DOS, select the desired image on the GOTEK.
A: and DIR brings the image contents up ready to play... I mean 'Test'....

Awesome new piece of kit... Thanks for doing this fellas !!

=D> =D> =D>

User avatar
myelin
Posts: 420
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by myelin » Fri Jan 05, 2018 8:25 am

I finally got around to trying the Gotek + FlashFloppy on my Master 128 and it worked very nicely! I don't have any ADFS images to try with, but it worked well with single sided 80 track (200k) DFS disks. I used the command line 'hxcfe' tool, which autodetected the format once I padded the files out to 204800 bytes. Without this padding, it would give me an unknown format error.

This worked for me at the command line on macOS:

Code: Select all

# Pad the file out to 204800 bytes
dd if=/dev/zero of=zeros bs=1k count=200
cat original.ssd zeros | dd of=padded.ssd bs=1024 count=200

# Convert to dest.hfe with hxcfe tool
hxcfe_cmdline/App/hxcfe -finput:padded.ssd -foutput:dest.hfe -conv:HXC_HFE

# Clean up
rm zeros padded.ssd
SW/EE from New Zealand, now in San Francisco, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sat Jan 06, 2018 8:55 pm

danielj wrote:You can also add a piezo buzzer to give you drive click noises:

https://www.ebay.co.uk/itm/222581547044
I've just added the piezo buzzer, and whilst it does work, the sound is very faint. I've tried a couple, and both are the same. Is that what others are noticing, or is there something wrong with my buzzers?

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sat Jan 06, 2018 11:29 pm

Check the wiki, you can set the volume in a config file iirc?

d.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sun Jan 07, 2018 8:06 am

danielj wrote:Check the wiki, you can set the volume in a config file iirc?
So there is. I'll try that later. Thanks.

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sun Jan 07, 2018 8:19 am

I did think it was a bit quiet myself, so it's not just you!
d.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sun Jan 07, 2018 12:18 pm

Probably an age thing with me :roll:

Anyway, here's my fully pimped up GoTek - with piezo buzzer, OLED display & rotary switch mods. All working really well. Need to do some case mods to finish it off.
20180107_120613.jpg
No idea why it's upsides down in the preview. It's the right way round when you view the image.

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sun Jan 07, 2018 12:33 pm

Excellent work! :) - The encoder won't fit as is, so you can either remove it from its PCB, or else desolder some of the pins and extend to the PCB with wires so you can put the PCB at a right angle to the encoder.
d.

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Mon Jan 08, 2018 9:53 am

I'm having a small issue with set-up.

I've got my GOTEK working with one master ( datacentre CF hard drive with image form ROBC ) working no problem.

Now I have setup my BeebSCSI mini on a videonula master ( multiOS IFEL setup ) using the same image in LUN 0.
It boots fine but the GOTEK hangs.
I'll do some testing with a 3.5" floppy to see if its just affecting the GOTEK.

May be worth pushing this to an 8-bit hardware thread.

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Mon Jan 08, 2018 10:21 am

On the IFEL Master, does it have the IDE patched ADFS, or the standard ADFS?

d.

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Mon Jan 08, 2018 10:35 am

On the IFEL Master, does it have the IDE patched ADFS, or the standard ADFS?
I think we are both waiting for the answer to that... But I believe the IFEL ADFS routines are pre-IDE versions.

However, I can drop the old MOS 3.2 in to prove the point.
I'll try that and report back.

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Mon Jan 08, 2018 6:49 pm

Ok here's where I've got to :

Video Nula Master
BeebSCSI : working with IFEL multiOS and working with MOS3.2
GOTEK FD emulator : working with IFEL multiOS and working with MOS3.2
Sony MPF920 3.5" FD : working

Datacentre Master with Retroclinic multiOS
BeebSCSI : not tried
GOTEK FD emulator : working
Sony MPF920 3.5" FD : working

Edit : On further testing the GOTEK runs really slowly with the IFEL MultiOS.
The GOTEK runs about the same speed with MOS3.2 and RetroClinic MultiOS


Marcus

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by marcusjambler » Thu Jan 11, 2018 3:02 pm

I'm after an original MOS3.5 ROM IC if anyone has one going spare.
Happy to pay the going rate

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sun Jan 14, 2018 6:11 pm

Ok. So that's my OLED now mounted. I wasn't very good at cutting the plastic case to extend the window, so I ordered up a bezel to hide my handiwork! This is what I ordered, and it's finished off the front quite nicely:

https://www.shapeways.com/product/4GB64 ... d=56516400

Not the cheapest by the time you add P&P, but I'm sure there will be others out there who make something similar for less, or folks on this board who can make their own.

The OLED is currently held onto the case with some Blu Tack, but I'll get some hot glue to finish it off correctly. Since taking the photo, I've also removed the protective film from the front of the OLED which has made the display text look a bit sharper. All I need to do now is get the rotary switch mounted and that'll be me finished!
20180114_175522.jpg
Edit: Got a new rotary encoder today, but it doesn't work properly for some reason. I went for one of these, because it had a knurled spindle:

https://www.ebay.co.uk/itm/5-Pin-Digita ... 2749.l2649

The momentary push button part works, but the rotary up / down is temperamental. Rotate in one direction, and sometimes it will step up, other times it will step down, and occasionally it will miss a pulse. Rotate the other direction, I get the same. Mostly though, it steps down no matter which direction I rotate it. I've swapped CLK / DT around with no difference. I tried a second encoder and it was the same. It's wired up using the 4 wire solution (without the 3.3v connection), and with a GND link between the middle pin of the encoder and one contact of the momentary switch, so I'm fairly sure it's wired up correctly. I've ordered up a different type to see if it'll work any better.
Last edited by KenLowe on Tue Jan 30, 2018 10:56 pm, edited 3 times in total.

User avatar
danielj
Posts: 6277
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by danielj » Sat Jan 27, 2018 7:22 pm

I've converted the Stairway To Hell Collection to HFE format here. Seems to work! This is the original STH collection available for download on STH, so if there were any bugs in it, they ain't fixed. Let me know how you get on :)

d.

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Sat Jan 27, 2018 10:19 pm

Cool. Thank you very much for doing this!

User avatar
KenLowe
Posts: 305
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Open source firmware for Gotek floppy emulator released

Post by KenLowe » Tue Jan 30, 2018 8:56 pm

That's the new rotary encoders arrived and installed. These ones are working much better. Not too sure why the previous ones didn't work. Again, I went for knurled spindle:

https://www.ebay.co.uk/itm/272041590627

That's me all pimped up, with the latest 0.9.7a firmware installed too.

Edit: Hmmm. Firmware 0.9.7a seems to have broken something on my system. I'm getting disk errors when I try to load games from disks that are converted to .hfe format. Drive fault 10 at 01/C1. The disks work fine with 0.9.6a. I've reverted back to 0.9.6a for the time being.

Edit2: I flagged the disk error issue with keirf (https://github.com/keirf/FlashFloppy/issues/47) and he thinks he knows what the issue is. He's working on a patch to fix the issue.

Edit3: Until the next release is issued, there's a temporary fix posted up here: https://github.com/keirf/FlashFloppy/fi ... f_47_2.zip. You also need to add the following to the ff.cfg file:

Code: Select all

track-change = realtime
index-during-seek = yes
Attachments
20180130_203938.jpg
20180130_203639.jpg
20180130_203537.jpg

Post Reply