Welcome, Guest. Please login or register.

Author Topic: MiniMig Development  (Read 5587 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Dennis

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 128
    • Show only replies by Dennis
Re: DE-1
« Reply #59 from previous page: March 03, 2008, 06:37:59 PM »
Quote
1) Reading up on the Amiga side and implementing the GAYLE IDE registers (quite easy, someone has already done the work).
2) Reading up on the MiniMig interface to the PIC and see if a scheme for multiplexing IDE and Floppy disk I/O can be done.
3) Reading the PIC code and see if it would be possible to serve data (probably a HDF file at first) using the previously determined multiplex scheme. Hopefully there is enough room in the PIC EPROM (or compatible larger PIC's) for us to manoeuvre.


My thoughts exactly. Emulating an IDE drive through a GAYLE like interface is the way to do it. And HDF would be really easy. Just configure a nice HDF file from UAE, copy it to the SD card and there you go. It is definately do-able with the current hardware.

Dennis
 

Offline mrmkl

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 147
    • Show only replies by mrmkl
    • http://www.iki.fi/mkl/
Re: DE-1
« Reply #60 on: March 03, 2008, 07:29:55 PM »
Must it have actual IDE emulation? (WHDload require it?) If it is only needed to mount a hardfile image, you could load any driver from a bootable floppy image, perhaps create a mountlist file from the RDB-header of a hard disk image, mount partitions with the appropriate filesystems, and continue the boot process from the mounted partition.
Maybe you could even DMA the data stream to RAM, for speed-up?
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: DE-1
« Reply #61 on: March 03, 2008, 07:52:29 PM »
Quote
The whole point is mute because MiniMig v1.x (or any for that matter) doesn't need a SATA interface if it is possible to emulate a hard drive using the MMC/SD card.

"But hard drives are bigger!"

You are going to be hard pushed to fill a 8/16Gbyte SD card with classic OCS software. I doubt even the entire (non AGA) WHDload collection is that big!


Don't get me started on the amount of space available through ethernet..  :crazy:
 

Offline Dennis

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 128
    • Show only replies by Dennis
Re: DE-1
« Reply #62 on: March 03, 2008, 09:41:34 PM »
How does UAE handle hardfiles? Do they use a custom driver?
That could be done for Minimig as well. There is plenty of room in RAM (or even some Kbytes in blockbased ROM) for a simple driver. Could be even faster than an IDE based version.
Does anyone have an idea?

Dennis
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: DE-1
« Reply #63 on: March 03, 2008, 09:53:48 PM »
I would prefer the Gayle style interface with a block read/write backend.

Dennis: What do you think about an integrated ICSP controlled by the FPGA ..? (provided an XC3S500-PQ208 is used)
 

Offline HenryCase

  • Hero Member
  • *****
  • Join Date: Oct 2007
  • Posts: 800
    • Show only replies by HenryCase
Re: DE-1
« Reply #64 on: March 03, 2008, 10:17:08 PM »
Quote
alexh wrote:
Any board that can take one crystal and produce selectable NTSC and PAL clocks it's going to work.

Finding that single crystal and the settings for the clock synthesiser will be the actual research.

STB boxes use just one crystal to generate PAL and NTSC clocks so the solution is out there. The capabilities of the Altera equivalent of the Xilinx DCM (Digital Clock Module) would also have to be looked into (work that I am sure Tobiflex and the other DE-1 users have already done)


Okay, so lets start looking at the frequencies we need. First, I need some clarification on the differences between PAL and NTSC Amigas. According to this webpage, http://www.mjmwired.net/kernel/Documentation/m68k/README.buddha, NTSC Amiga clock oscillates at 28.37516Mhz, just off the NTSC frequency of 28.63636Mhz. From this base frequency the clock speed is divided to obtain all the different frequencies it needs to produce, if this is right:

http://blogs.msdn.com/oldnewthing/archive/2004/12/02/273721.aspx
"The early Amigas had a similar arrangement. The oscillator runs at ~28 MHz, the pixel clock runs at half or a quarter of that depending on screen mode, the processor runs at a quarter of that, the memory bus runs at an eighth, the colour clock runs at some other fraction I don't remember, and the "E-clock" used by 6800-style chips runs at a fourtieth. The programmable timers are in two VIA chips connected to the E-clock and the OS sets one of them to a sensible 1/50 second (or the best approximation it can manage, anyway). A lot of regular interrupt handlers are connected to the vertical blank interrupt, though, making them dependent on the screen mode. Some people made the mistake of using that for music play-routines."

When it comes to the PAL clock signal, am I right in thinking the same oscillator was used, but the PAL versions of Agnus produced the frequencies needed?
http://en.wikipedia.org/wiki/MOS_Technology_Agnus

PAL video frequency (for reference):
http://lipas.uwasa.fi/~f76998/video/modes/
"For example, the designers of the Commodore Amiga line of computers chose to use a pixel clock of 70 ns for some of the graphics modes. (70 ns = 70 × -10-9 s = 1 / (70 × 10-9) Hz = approximately 14.286 MHz sampling rate)."

Dennis, one point I'd like to ask you. On this Minimig webpage, http://home.hetnet.nl/~weeren001/minimig.html, you say that the Minimig clock frequency (in current design) is 7.09379MHz, derived from a 4.433619MHz crystal. As this isn't a whole number multiple (close to 1.6, but not spot on), I was wondering whether the current crystal could create NTSC frequencies (if not, why not)? Thanks in advance.

Quote
mrmkl wrote:
Must it have actual IDE emulation? (WHDload require it?) If it is only needed to mount a hardfile image, you could load any driver from a bootable floppy image, perhaps create a mountlist file from the RDB-header of a hard disk image, mount partitions with the appropriate filesystems, and continue the boot process from the mounted partition.
Maybe you could even DMA the data stream to RAM, for speed-up?


mrmkl, I don't understand what you are proposing here. Are you proposing booting a file that describes a filesystem structure?
"OS5 is so fast that only Chuck Norris can use it." AeroMan
 

Offline mrmkl

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 147
    • Show only replies by mrmkl
    • http://www.iki.fi/mkl/
Re: DE-1
« Reply #65 on: March 04, 2008, 04:36:40 PM »
Quote
mrmkl, I don't understand what you are proposing here. Are you proposing booting a file that describes a filesystem structure?


I was thinking of doing it more straight forward and more simple on the hardware (FPGA, the MMC-card and the PIC microcontroller.)

Even though the basic IDE is a relatively simple interface, I believe that you can create a simpler interface for this purpose specially for minimig. I believe it will be less effort to design a block device interface from scratch, than implementing an IDE-emulator, which must follow the IDE specification to some detail. There is like more freedom to go straight to the aim, which is to use a hard disk image file. (hard disk image file = some number of 512 byte blocks)
The possibly hard work to implement an IDE-device emulator may not be necessary. In AmigaOS we can use any block device, it doesn't have to mimic an IDE or SCSI hardware, because an AmigaOS device driver provides abstraction. A block device driver reads or writes n number of blocks starting from an offset from the beginning of the block device, which is an abstractified disk-storage to anyone that calls the block device driver, this anyone is usually the filesystem handler.

The IDE-interfaces of A600/1200/4000 are supported by inbuilt drivers in the KS-ROMs for those models. The KS-ROMs know how to mount the partition with the highest boot-priority and start executing the s:startup-sequence from it. (edit: or execute code from the boot-block, and the process will reach startup-sequence later.)

When you write an AmigaOS block device driver for the proposed simplified hardware interface, you can place it on a floppy image. Some of the older Amiga hard disks worked that way, that you boot the machine from a floppy disk, which has an AmigaOS device driver on it, the AmigaOS C:mount command, a filesystem (which usually placed in L:), and a mount-list file, which has the parameters for each partition. Parameters such as Blocks per track, start cylinder, end cylinder, the filesystem maybe specified, the amount of buffers, bufmemtype and many others I don't quite remember too well.
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: DE-1
« Reply #66 on: March 04, 2008, 06:15:13 PM »
What mrmkl is describing actually makes sense (to me). Not 100% sure it's the way to go from a hardware perspective, but you never know.

WinUAE uses a similar technique for it's hard disks. AFAIK it does not use any regular scsi.device built into some kickstarts but appears to the Amiga as a board with a boot-ROM and provides access via much simpler interface than IDE emulation.

Here you can see the board + boot ROM on showconfig



Here you can see the device (uaehf.device) from the boot ROM loaded up via SCOUT



It is only recently WinUAE has attempted true(?) 2091 SCSI emulation and I believe that was a spinoff of the work required for CDTV emulation.

This may actually be the quickest way for MiniMig to get hard disk like functionality. The bootrom 68k code could handle all of the hard work. The control registers for our "SCSI card" could be implemented any way we like as long as the 68k code for our driver responds correctly to accesses.

Hmm, I wonder how much work would go into coding one of these boot-ROM's? Time for someone to PM Toni Wilen
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: DE-1
« Reply #67 on: March 04, 2008, 06:50:39 PM »
At some point amiga software is likely to go lowlevel with the hardddisc. And then the system will be less problematic if it is outlined like a real system.
Kickstart ROMs expects a Denise interface I assume. Commodore/Amiga software is not known for it's adherence to abstraction levels asfair :-D

Avoiding haveing to compile up a special driver for harddisk kludge I think is benefitial. Each cpu/chipset combo wanting it's own version I presume.

I don't we really need to build a full P-ATA compatible interface. Only those commands that the kickstart + driver use  would be needed. Anything that's missing can be added later.
 

Offline amigadave

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Jul 2004
  • Posts: 3836
    • Show only replies by amigadave
    • http://www.EfficientByDesign.org
Re: DE-1
« Reply #68 on: March 04, 2008, 07:10:03 PM »
Quote

alexh wrote:
What mrmkl is describing actually makes sense (to me). Not 100% sure it's the way to go from a hardware perspective, but you never know.

WinUAE uses a similar technique for it's hard disks. AFAIK it does not use any regular scsi.device built into some kickstarts but appears to the Amiga as a board with a boot-ROM and provides access via much simpler interface than IDE emulation.

Here you can see the board + boot ROM on showconfig



Here you can see the device (uaehf.device) from the boot ROM loaded up via SCOUT



It is only recently WinUAE has attempted true(?) 2091 SCSI emulation and I believe that was a spinoff of the work required for CDTV emulation.

This may actually be the quickest way for MiniMig to get hard disk like functionality. The bootrom 68k code could handle all of the hard work. The control registers for our "SCSI card" could be implemented any way we like as long as the 68k code for our driver responds correctly to accesses.

Hmm, I wonder how much work would go into coding one of these boot-ROM's? Time for someone to PM Toni Wilen


Has anyone thought about setting up bounties like AROS has to get this "HD driver/emulation layer" completed?

It makes great sense that the work already done for UAE could be used for future versions (or hopefully even existing v1.1 Minimigs) of enhanced Minimigs.
How are you helping the Amiga community? :)
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: DE-1
« Reply #69 on: March 04, 2008, 07:22:08 PM »
The reason I don't do this is because I don't have minimig on the table here. And I desire a minimig with the issues pointed out at opencircuits wiki fixed. At minimum an onboard +5V supply, the SD-Card resistor fix, and the D/A linearity fix.
 

Offline Dennis

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 128
    • Show only replies by Dennis
Re: DE-1
« Reply #70 on: March 04, 2008, 07:50:13 PM »
Quote
In AmigaOS we can use any block device, it doesn't have to mimic an IDE or SCSI hardware, because an AmigaOS device driver provides abstraction. A block device driver reads or writes n number of blocks starting from an offset from the beginning of the block device, which is an abstractified disk-storage to anyone that calls the block device driver, this anyone is usually the filesystem handler.


This makes sense to me too. A simple interface that can load a block of data (512bytes) from/to an HDF file is *very* easy to do. I can do that. The thing I am not capable of is writing the block device driver. Also, we could make the driver and interface part of a virtual expansion board (as Alexh suggested).
Again, the hardware part can be very simple, we just need someone to figure out the driver....
 

Offline Dennis

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 128
    • Show only replies by Dennis
Re: DE-1
« Reply #71 on: March 04, 2008, 07:53:54 PM »
Quote
Dennis: What do you think about an integrated ICSP controlled by the FPGA ..? (provided an XC3S500-PQ208 is used)

Makes sense. I would use one of the newer PIC18F..J.. types. These do not need the +12V programming voltage. This would make it easier for field upgrades of the PIC firmware.
OTOH, I just use a simple serial bootloader for Minimig rev1.1 ...

 

Offline mrmkl

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 147
    • Show only replies by mrmkl
    • http://www.iki.fi/mkl/
Re: DE-1
« Reply #72 on: March 04, 2008, 08:21:38 PM »
Commodore Amiga released a simple ram disk device driver, I think it was in the ROM Kernel Reference series. There is some device driver source code on Aminet, such as for parallel port zip drive, scsi, ide, and more.

Spartan-3E can "configure itself" from commodity serial or parallel flash memory, and this thought lead me to remember the usenet post "Why Spartan-3e is the best" Clipped quote seems relevant on topic:
Quote

* can load not only from SPI Flash but also from Atmel Dataflash
meaning that a it is the only FPGA around that can directly use
an MMC (Atmel MMC form factor packaged 2/4/8 MByte Dataflash cards)
like Flash card as its main configuration media. So a design with
S3e and MMC Card socket can boot from the removabale flash media
card. Note that the MMC Card socket inserion switch could overide
the 'enable' of the additional on board memory so the SoC loaded
from the inserted into socket Dataflash card could copy a new
bitstream and OS image onto onboard flash, so next 'boot' without
card inserted could come from on board DataFlash. Nice little
feature.

 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: DE-1
« Reply #73 on: March 04, 2008, 08:23:03 PM »
mrmkl, you've got some nice opensource HDL code for GAYLE IDE support on your website I see:

http://www.students.tut.fi/~leinone3/ide/ide68k.html

I hadn't put 2+2 together till now.
 

Offline denli

  • Jr. Member
  • **
  • Join Date: May 2007
  • Posts: 67
    • Show only replies by denli
Re: DE-1
« Reply #74 on: March 07, 2008, 05:49:33 AM »
(Removed my message. Topic already discussed.)
/Dennis