Welcome, Guest. Please login or register.

Author Topic: Floppy emulator  (Read 60988 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: CF
« Reply #149 from previous page: January 09, 2008, 11:38:36 PM »
Quote

monami wrote:

I am probably ignorant but anyway why can't a floppy emulator be done in software? wouldn't that be an easier job?  :roll:


 There is a lot of floppy software-based emulators on Aminet. But not a single one have ability to use N-DOS disks or survive a reset (except RAD:). They are useless to emulate a real floppy drive.

 Remember one thing: this floppy emulator is a drop-in replacement to the real floppy drive, giving the Amiga the ability to use ADF files directly placed in a SD/MMC card. Much better than a real floppy drive (no bad blocks, small footprint, easy transfer from peecees, etc).
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3647
    • Show only replies by alexh
    • http://thalion.atari.org
Re: CF
« Reply #150 on: January 10, 2008, 12:14:17 AM »
Quote

monami wrote:
i am probably ignorant but anyway why can't a floppy emulator be done in software? wouldn't that be an easier job?  :roll:

There is already a software floppy disk emulator for the Amiga (kind of) it's called WHDload.

I still feel this device has a commercial potential, especially if made to work with Spectrum's and C64 etc. and whatever other Retro computers dont have a WHDload.

It could even be extended to be a TAPE emulator in the form of a compressesed sample player.

 

Offline tekopaa

  • Newbie
  • *
  • Join Date: Jan 2008
  • Posts: 28
    • Show only replies by tekopaa
Re: CF
« Reply #151 on: January 10, 2008, 07:12:24 AM »
few questions .....

so this emulator will be like external floppy diskdrive and will be autoboot so i dont have choose from early startup screen anything..


assuming someday it will be for sale...will it work also Escom A1200 :)
 

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: CF
« Reply #152 on: January 10, 2008, 07:42:12 AM »
 Read the author statement: linky link!

 [edit]: Silly me! this is from the author of the USB floppy link!
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: CF
« Reply #153 on: January 10, 2008, 09:20:54 AM »
Quote
monami wrote:
i am probably ignorant but anyway why can't a floppy emulator be done in software? wouldn't that be an easier job?  :roll:

Because software which is hard-coded to load from trackdisk.device unit 0 (DF0) would fail to load if it is booted from some software emulated floppy drive. The bootloader would fail when it tried to load data from the drive. As has already been pointed out, WHDLoad gets around this by patching the software. Alternatively, hardware projects like this replace the drive physically connected to the internal floppy connector and emulate the drive itself, so any software which directly access the drive will behave in exactly the same way as it would with a real disk.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline monami

  • Sr. Member
  • ****
  • Join Date: Nov 2006
  • Posts: 461
    • Show only replies by monami
Re: CF
« Reply #154 on: January 10, 2008, 11:43:38 AM »
i like the concept of whdload but to be honest it's going to take forever to get half the games finished and them hunt down original floppies. i no longer want to use floppy disks. it's 2008!

"Because software which is hard-coded to load from trackdisk.device unit 0 (DF0) would fail to load if it is booted from some software emulated floppy drive. The bootloader would fail when it tried to load data from the drive. As has already been pointed out, WHDLoad gets around this by patching the software. Alternatively, hardware projects like this replace the drive physically connected to the internal floppy connector and emulate the drive itself, so any software which directly access the drive will behave in exactly the same way as it would with a real disk."

i no longer believe in impossibilities!
uae on amiga did floppy emulation so can anyone take advantage of that code?
i will bless them that bless you. i will curse them that curse you. gods promise to his chosen people the jews.
 

Offline alexatkin

  • Full Member
  • ***
  • Join Date: Aug 2006
  • Posts: 100
    • Show only replies by alexatkin
    • http://csdprojects.co.uk/
Re: CF
« Reply #155 on: January 10, 2008, 07:53:16 PM »
UAE is an emulator.  No doubt to "emulate" the floppy drive it has to emulate many other parts too which in turn slow-down the Amiga.  You cannot simply replace a part of the hardware with software running ON the hardware.

A hardware plug-in replacement for the floppy drive however is self contained.  The Amiga merely sees a floppy drive so it runs just the same as if it was a REAL floppy drive, possibly faster for software which doesn't rely on strict read timings.
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: CF
« Reply #156 on: January 10, 2008, 08:07:26 PM »
Quote
monami wrote:
uae on amiga did floppy emulation so can anyone take advantage of that code?

How would a game which switches off the Amiga OS and halts all other code and in all other ways takes over the machine, and is also hard coded to read data from DF0, know anything about some kind of software floppy drive unless it is modified to do so? The only reason this works in UAE is because UAE is an emulator. A piece of software running inside UAE, e.g. a game, makes a call to what it thinks is hardware, but is actually more software which can do whatever it wants, and in this case that means feeding data to the game from a file instead of a disk. The same game running on actual Amiga hardware does not have the luxury of this flexibility unless you patch the software, which is what WHDLoad does, or replace parts of the hardware - which is what this project is for.

[EDIT]
Changed some of the instances of the word "software" to make that less confusing :-)
[/EDIT]

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show only replies by tnt23
Update
« Reply #157 on: February 01, 2008, 08:47:58 PM »
Folks,

I would like to apologize for not posting any updates on the project. In fact, there simply haven't been any for quite a while.

Now for the good news. User interface is somewhat usable now. It still takes 16 seconds for ADF to load; if I find a way to cut it down further I will. A bunch of PC formats has been added, among them 720K and TR-DOS.

And what I am really excited about is this: write mode! The emulated floppy can not only be read, but formatted and written, too. The top level code for dumping the changes back to the flash is still to be worked out, but the low level write support seems to be working properly. (At least Linux' fdformat command takes it for real.)

A slightly redone board has been ordered, with some fixes (and possibly few bugs), able to accomodate LCD's backlight module. I am hoping to populate it in a week and tell you how it goes.
 

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: Update
« Reply #158 on: February 01, 2008, 10:08:11 PM »
 Wow! Great news, indeed.

 Keep the superb job.

 And if you want a brazilian "beta-tester", count on me! :-D
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline FrenchShark

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show only replies by FrenchShark
    • http://www.arcaderetrogaming.com
Re: Update
« Reply #159 on: February 02, 2008, 05:58:53 AM »
@tnt23

Hello,

I plan to have a full floppy emulation for my stratix II minimig. I want to use the propeller chip from Parallax to do the emulation.

I have some technical questions:
- It looks like every signal has to be open collector with 1K pull-up resistor (because of bus sharing between different drives). Did you do it that way ?
- Paula generates the 500 kbit/s bitrate for the floppy by dividing 3.57 MHz by 7 (511364 bit/s for NTSC and 506699 bit/s for PAL). What frequency do you use for your HW ?
- Did you implement write precompensation ?
- Any support for HD floppy drives planned ?

Regards,

Frederic
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show only replies by tnt23
Re: Update
« Reply #160 on: February 02, 2008, 07:07:17 AM »
@rkauer, thanks :)
I was thinking about adding boot loader to the emulator, so that its firmware could be updated via the same SD card. Otherwise it would require a JTAG capable programmer and software to reprogram the MCU.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show only replies by tnt23
Re: Update
« Reply #161 on: February 02, 2008, 07:38:42 AM »
@FrenchShark

- No, I let output signals float. There is a 3-state buffer between my MCU and the bus, and when the emulator is not accessed, it switches its outputs to Z. I simply didn't care much as it worked for Amiga and PC. I guess both have own pull-ups to accomodate any floppy (with or without line termination).
On the Atari ST, however, the emulator failed as there seemed to be no internal pull-ups. I have added a few in a new revision of PCB because of that ST case.

- My ATmega256 runs at 16MHz. For DD MFM flow, every bit takes 2us, or 32 one-clock 62.5ns instructions. Here is how the output looked in early designs: http://milliways.chance.ru/~tnt23/amiga/mfm.jpg
Now it is much the same, only the "1" are wider.

- I don't do write precomp, mainly for the fact I am not aware of it :) Can you tell a few words on it?
There is an IDE/Compact flash port in the emulator, which is completely software driven. If I ever manage to use it to attach an external FDD for 'ADF Bakery', I will probably have to deal with write precompensation.

- As far as I understand, HD Amiga floppies deliver the same bitrate of 500 kbytes/sec, only INDEX pulse comes every 0.4 seconds instead of 0.2. If so, chances are good for that specific HD implementation to do on my current hardware.
PC HD can hardly be done on it with 1000 kbit/second flow.

BTW, Amiga Floppy Project (http://www.techtravels.org/amiga/amigablog/) also is based on Parallax chip.
 

Offline arnljot

Re: Update
« Reply #162 on: February 02, 2008, 09:39:36 AM »
@tnt23

Have you considered supporting the IPF format of www.softpres.org?

That would make it a "complete" floppy emulator for the amiga :)
A posting a day keeps the sanity away...
http://www.arnljot.com
 

Offline Darrin

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: May 2002
  • Posts: 4430
    • Show only replies by Darrin
Re: Update
« Reply #163 on: February 02, 2008, 10:26:59 AM »
This is the first I've heard about this project (I must have had my head burried in the sand) and it sounds great.  You can mark me down as a potential customer.  I certainly wouldn't mind 2 units for my A2000, 2 for my A3000 (which has some really iffy drives that keep "forgetting" they have floppies inserted) and one in a formfactor that allows it to fit into a 5.25" drive bay for use as DF1 with an A1200 tower.

Great work.   :-)
A2000, A3000, 2 x A1200T, A1200, A4000Tower & Mediator, CD32, VIC-20, C64, C128, C128D, PET 8032, Minimig & ARM, C-One, FPGA Arcade... and AmigaOne X1000.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show only replies by tnt23
Re: Update
« Reply #164 on: February 02, 2008, 12:33:41 PM »
Quote

arnljot wrote:
@tnt23

Have you considered supporting the IPF format of www.softpres.org?

That would make it a "complete" floppy emulator for the amiga :)


IPF is not an open format. (Or rather, has not been one when I checked their site lately.) Certainly they provide compiled libraries, but not for the AVR.