Cheap chinese floppy emulators & Lafumat's disk controller

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
User avatar
JCCyC
Posts: 26
Joined: Mon Dec 03, 2012 2:54 pm
Location: Rio de Janeiro, Brazil
Contact:

Cheap chinese floppy emulators & Lafumat's disk controller

Post by JCCyC »

So... I bought one of those...

http://www.ebay.com/itm/230910971956

...with the intent of using it with my many vintage computers. Hey, it costs a fraction of the (admittedly kickass) Lotharek alternative. The first guinea pig was the MSX, and it worked perfectly, after some judicious jumper selecting. (Set as drive 0, fudge with READY timing.) As a curiosity, here's my blog posts (in Portuguese) about the subject:

http://www.retrocomputaria.com.br/plus/?p=3295
http://www.retrocomputaria.com.br/plus/?p=3610

One complication I didn't have then is the MSX wants 512 byte sectors in its disks, just like the PC. That made things easy. With the Dragon, which uses 256-byte sectors, I knew it would not be so simple. I started by using the same jumper settings. So far so good. It looked like DragonDOS recognized a drive. DIR gave me ?IV ERROR and lit up the access light on the emulator. Sweet.

But DSKINIT didn't work. Even with only one face and 40 tracks, I would get a "record not found" error. So I started reading and writing individual sectors with SREAD and SWRITE.

Turns out I can read/write only nine sectors per track, and DragonDOS wants 18 in all formats. Bleh. I made a program to write a string "T xx S yy IMG zz" in every (writable) sector of the virtual disk. Take a look at this album:

http://picasaweb.google.com/11627422826 ... orOnDragon

I ran this program on images 0 and 1. A compressed version of the data partition is here. Beware -- it's 159K compressed, but 151 megabytes uncompressed! It corresponds with what the emulator does in a MSX or a PC, with the following differences:

One: Each 512-byte sector in the image has, in the first 256 bytes, what I really intended to write in that sector. The other 256 bytes have a copy of what was previously written in the last sector!
Two: After every 9 sectors, there's 9 sectors of nothing. I assume if the emulator were capable of writing sectors 10 through 18 in each track, they would lie there. Also, one face only.
Three: Each image lies 1.5MB apart, just like with the MSX.

Then it hit me. I bought a 720K model of the emulator, for compatibility with the MSX. But 1.44 MB DISKS HAVE 18 SECTOR PER TRACK!

There's a jumper in the emulator which, in theory, would switch it from 720K to 1.44M. But if you select it, the computer can't read anything. On the other hand, there's a 1.44MB specific model from the same seller and manufacturer, and it's even cheaper:

http://www.ebay.com/itm/230935796270

Maybe I should buy one to experiment. I'll wait until Good Credit Card Day, which is in a few days. Unless someone wants to donate me one... you know, for Science!
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by robcfg »

Hi Juan Carlos!

I think I have a 1.44Mb emulator I bought some years ago somewhere in my room. How can I help you? Is there anything I can test for you?

I've attached a picture of the PCB of my emulator, in case it's helpful.

Best regards,
Rob

P.S. Welcome to Zona de Pruebas! ;)
Attachments
Chinese 1.44Mb Floppy Emulator PCB
Chinese 1.44Mb Floppy Emulator PCB
USB_FloppyEmul_Top.jpg (254.72 KiB) Viewed 6671 times
User avatar
JCCyC
Posts: 26
Joined: Mon Dec 03, 2012 2:54 pm
Location: Rio de Janeiro, Brazil
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by JCCyC »

Aha. Yes, that can be useful. I'm going to abuse your goodwill now. ;) First of all, the emulator has to be set as Drive 0. From the looks of it (my emulator's PCB is very different), I strongly suspect you only need to move that jumper from J2-S1 to J1-S0. Then connect it to the Lafumat board with a non-twisted flat, feed 5V to the emulator, put a thumb drive in, and turn the Dragon on.

(In order to make things easier to follow, you should zero out al sectors the thumb drive and create one partition (any type) with at least 150MB. Do you use Linux?)

For starters, you could try running the following commands:

A$=STRING$(128,"X")
B$=STRING$(128,"Y")
SWRITE 0,0,1,A$,B$
SWRITE 0,0,9,A$,B$
SWRITE 0,0,10,A$,B$
SWRITE 0,0,18,A$,B$

And tell me which of these, if any, succeed. If at least one did, wait for the activity light to go off, take the thumb drive back to the PC, and explore the contents with a hex editor (again, Linux is your friend here) looking for the blocks of XXXXX....YYYYY. And tell me at what position they are. There may be up to eight such blocks.

If thinks go well, you may want to try the program in the photo album.
robcfg wrote:Hi Juan Carlos!

I think I have a 1.44Mb emulator I bought some years ago somewhere in my room. How can I help you? Is there anything I can test for you?

I've attached a picture of the PCB of my emulator, in case it's helpful.

Best regards,
Rob

P.S. Welcome to Zona de Pruebas! ;)
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by robcfg »

I'll give it a try as soon as I can and tell you the results.
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by robcfg »

Hi!

Managed to find my emulator and some time to test it.

The results are not good, though. It seems that the thumb drive is accessed when I try to write sectors, and even as I tried to format it, but everything ends the same, with a ?RF (Record not Found) error.

My guess is that the emulator is hardcoded to 512 byte sectors, while the dragon uses 256 byte sectors, so anytime a sector is accessed, the data read will be wrong.

It's a pity because being able to use that kind of emulators would be great, but I fear that the only way would be to reprogram it, and that's not going to be easy.

If there's any more tests you want me to try, just tell me.

Regards,
Rob
User avatar
JCCyC
Posts: 26
Joined: Mon Dec 03, 2012 2:54 pm
Location: Rio de Janeiro, Brazil
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by JCCyC »

SWRITE 0,0,1,A$,B$ gives you a ?RF error? Odd. The 720K model also has 512 byte sectors and that works. The first 256 bytes have what I intended, and the last 256 have garbage. Can read it back too.
robcfg wrote:Hi!

Managed to find my emulator and some time to test it.

The results are not good, though. It seems that the thumb drive is accessed when I try to write sectors, and even as I tried to format it, but everything ends the same, with a ?RF (Record not Found) error.

My guess is that the emulator is hardcoded to 512 byte sectors, while the dragon uses 256 byte sectors, so anytime a sector is accessed, the data read will be wrong.

It's a pity because being able to use that kind of emulators would be great, but I fear that the only way would be to reprogram it, and that's not going to be easy.

If there's any more tests you want me to try, just tell me.

Regards,
Rob
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by robcfg »

Strange... I will try again as soon as I can.

I had the SD card already prepared with 720kb images, should I just format the sd card without the emulator program?
User avatar
JCCyC
Posts: 26
Joined: Mon Dec 03, 2012 2:54 pm
Location: Rio de Janeiro, Brazil
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by JCCyC »

Try formatting with a 1.44M image. The emulator is 1.44 capable, right?
robcfg wrote:Strange... I will try again as soon as I can.

I had the SD card already prepared with 720kb images, should I just format the sd card without the emulator program?
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by robcfg »

Do you have by any chance a link to the software for windows for formatting the sd? I cannot find it, and I have now some time to thest the 1.44mb disks with the Dragon.
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Cheap chinese floppy emulators & Lafumat's disk controll

Post by robcfg »

Good news!

Someone managed to write a new firmware for these devices and got it working with an Amiga computer.

As far as I know, he's working to support other computers and intended to release the source code.

See the current progress here.
Post Reply