Welcome, Guest. Please login or register.

Author Topic: Question about USB on the minimig  (Read 9981 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline techieTopic starter

  • Full Member
  • ***
  • Join Date: Oct 2004
  • Posts: 127
    • Show only replies by techie
Question about USB on the minimig
« on: September 22, 2007, 11:36:21 PM »
So Recently I have been going through some of the Minimig threads and I've noticed that whenever the topic of adding USB to the Minimig is brought up people seem to jump to the conclusion that it would be impossible to add. Now this really made me start to ask the question -

Just what really is preventing us from adding this feature into future revisions?

A lot of people seem to say it's the 68000 cpu that is the biggest hurdle but according to an Article entitled
'USB Stack for AmigaOS 1.3' in Amiga Future (NR.67) there  already is a solution for running USB on 68000 equipped Amiga's. Now granted this USB stack does not support the one thing I'm really interested in (i.e. USB joysticks/gamepads) but it does at least appear (to me anyway) to be a step in the right direction.

Now don't get me wrong here, I'm not assuming that we could just tack this stack onto the MiniMig and BOOM instantly have access to USB devices. But I do think it would be helpful if people could just explain to us non-hardware people just what else is stopping us from having USB in future designs?

Edit:
Please Note: I do understand that the current design of the MiniMig was not built with USB in mind but I am curious about the possibility in future versions.

Edit Edit:
Also Note: I'm also aware that some people don't feel that USB is worth the effort of adding. Now while I respect that some people feel this way (and I can sort of understand the reasons behind this opinion) I still think it's important for us to at least discuss the possibility of adding USB without necessarily delving into the debate of whether or not it is worth adding.

 
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Question about USB on the minimig
« Reply #1 on: September 23, 2007, 12:11:41 AM »
IMO USB isn't suitable for Minimig, but lets consider it:

To be of any use the USB-stack would need to run outside of the emulation in the first place (this is kind of obvious if you think about it: How would you go on about launching the USB-stack if you're booting from a game floppy? You obviously want to be able to use the keyboard and mouse in games...)

IMO the only sensible way would be to have some sort of independent USB-on-chip solution that'd give PS2-like signals easily, without actual need to have custom USB-stack. That'd be "easy" (relatively speaking) to wire to the current Minimig design.

However, once the USB is outside of the emulation itself, it means that the running system will not get any real benefits from the USB in the first place (actually, it won't see USB at all, just keyboard and mouse/joystick thru the CIA/Custom registers).

In fact, you'd get much of the same (except amiga joystick) by connecting some external USB-to-PS2 bridge to current minimig.
 

Offline techieTopic starter

  • Full Member
  • ***
  • Join Date: Oct 2004
  • Posts: 127
    • Show only replies by techie
Re: Question about USB on the minimig
« Reply #2 on: September 23, 2007, 01:57:29 AM »
Quote

Piru wrote:
IMO USB isn't suitable for Minimig, but lets consider it:

To be of any use the USB-stack would need to run outside of the emulation in the first place (this is kind of obvious if you think about it: How would you go on about launching the USB-stack if you're booting from a game floppy? You obviously want to be able to use the keyboard and mouse in games...)

IMO the only sensible way would be to have some sort of independent USB-on-chip solution that'd give PS2-like signals easily, without actual need to have custom USB-stack. That'd be "easy" (relatively speaking) to wire to the current Minimig design.

However, once the USB is outside of the emulation itself, it means that the running system will not get any real benefits from the USB in the first place (actually, it won't see USB at all, just keyboard and mouse/joystick thru the CIA/Custom registers).

In fact, you'd get much of the same (except amiga joystick) by connecting some external USB-to-PS2 bridge to current minimig.


Okay so let's consider this option for a moment.

The benefits:
1) Access to a wide variety of USB based joysticks.
- Which could also include Amiga joysticks too if you happen to convert them to USB with something like this RetroUSB Atair/Commodore Adaptor Kit

2) Access to multiple USB Mice for two player games (examples: Marble Madness, Lemmings, etc...)

3) Access to USB Keyboards and Mice.


The Downside:
1) Most USB Keyboards and Mice can already be converted to PS/2 so there really is little to gain.

2) Still no access to USB storage devices
- To me this really isn't a big loss as since we already have an SD Card reader built into the MiniMig. Plus it has been stated before that EIDE could be added to the MiniMig which would also give us access to harddrives and other storage media.

3) No Access to other USB technologies (i.e. Printers, Camera's, Misc devices...)
- Again to me this really isn't a big loss either since there is little reason to run these devices on the MiniMig in the first place.


Hmm...so the only REAL benefit from this particular solution would seem to be:

A) USB joysticks
B) Multiple Mice (which I must say I would LOVE to see again but that's just me  :-) )

Admittedly this doesn't seem to make a strong case for adding USB to the MiniMig (using this solution anyway). Can anyone else think of reasons I have missed for Adding USB to the MiniMig design? Or other solutions which could bring added benefits?

 

Offline downix

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 1587
    • Show only replies by downix
    • http://www.applemonthly.com
Re: Question about USB on the minimig
« Reply #3 on: September 23, 2007, 03:35:21 AM »
Alright, let's crunch the numbers:

USB is a CPU-driven, not DMA driven, system.  That means for every batch call, the CPU must be utilized.

For a single mouse, you will, at peak, utilize 12Mbps, roughly 1.5MB/sec.  Now, the Amigas RAM speed is only 7MB/sec.  So, for a single, solitairy mouse, you'd be tying up 40% of RAM access.... just imagine adding a keyboard.
Try blazedmongers new Free Universal Computer kit, available with the GUI toolkit Your Own Universe, the popular IT edition, Extremely Reliable System for embedded work, Enhanced Database development and Wide Area Development system for telecommuting.
 

Offline Floid

  • Hero Member
  • *****
  • Join Date: Feb 2003
  • Posts: 918
    • Show only replies by Floid
Re: Question about USB on the minimig
« Reply #4 on: September 23, 2007, 07:55:46 AM »
Quote

downix wrote:

For a single mouse, you will, at peak, utilize 12Mbps, roughly 1.5MB/sec.  Now, the Amigas RAM speed is only 7MB/sec.  So, for a single, solitairy mouse, you'd be tying up 40% of RAM access.... just imagine adding a keyboard.


...but non-insane_laser_2-trillion_DPI mice are low-speed devices operating at 1.5m*bits*/s, yes?

Still bothersome but somewhat less so.
 

Offline platon42

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 573
    • Show only replies by platon42
    • http://www.platon42.de/
Re: Question about USB on the minimig
« Reply #5 on: September 23, 2007, 09:26:12 AM »
Quote

downix wrote:
Alright, let's crunch the numbers:

USB is a CPU-driven, not DMA driven, system.  That means for every batch call, the CPU must be utilized.

For a single mouse, you will, at peak, utilize 12Mbps, roughly 1.5MB/sec.  Now, the Amigas RAM speed is only 7MB/sec.  So, for a single, solitairy mouse, you'd be tying up 40% of RAM access.... just imagine adding a keyboard.


How do you come up with such a kind of calculation? That's just plain wierd.

You still could add a simple USB 1.1 core into the minimig that would probably be able to handle mice and keyboards well enough. The enumeration is a bit tricky to do in firmware I suppose, but the polling would be a no-brainer. So maybe an external microcontroller with USB-host (such as AT90USB) would do the trick and could provide the minimig some raw Ps/2 signals as Piru proposed.

Sure you could implement an USB 1.1 core into some unused custom chip registers, but if you have the "stack" part on the Amiga emulation side, it would not benefit for games and such. (Well, thinking about it, you maybe do the enumeration stuff during kickstart boot time and hardwire the joysticks and then let the minimig fill in the port data, but you'll lose the hot plugging capabilities.)
--
Regards, Chris Hodges )-> http://www.platon42.de <-(
hackerkey://v4sw7CJS$hw6/7ln6pr7+8AOP$ck0ma8u2LMw1/4Xm5l3i5TJCOTextPad/e7t2BDMNb7GHLen5a34s5IMr1g3/5ACM
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Question about USB on the minimig
« Reply #6 on: September 23, 2007, 10:01:50 AM »
That does make sense. Let's keep in mind that it'd be nice to have USB, but it'd also be a great effort. I'm sure it will eventually be added, but probably much later on.

No matter how great the effort, essentially someone has to actually do it, not much sense in just discussing the possibilities. I'd vote for SATA but if that also is a long way to go, good ol' PATA (IDE) will do.
 

Offline pixie

  • Sr. Member
  • ****
  • Join Date: Apr 2002
  • Posts: 480
    • Show only replies by pixie
    • http://savoc.tripod.com
Re: Question about USB on the minimig
« Reply #7 on: September 23, 2007, 12:23:05 PM »
@Piru

if Winuae 'removable drive automounting on the fly (USB memory, USB HD, memory cards, any removable drive that mounts as a drive letter in Windows)' can do it, why such approach wouldn't do?


pixie- writing from a paradise called Portugal
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Question about USB on the minimig
« Reply #8 on: September 23, 2007, 12:28:14 PM »
WinUAE has the support of Windows' USB stack which is why it can utilise USB devices. MiniMig doesn't.

--
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 Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Question about USB on the minimig
« Reply #9 on: September 23, 2007, 12:32:41 PM »
@pixie
Quote
if Winuae 'removable drive automounting on the fly (USB memory, USB HD, memory cards, any removable drive that mounts as a drive letter in Windows)' can do it, why such approach wouldn't do?

Well it does if you put Windows to minimig.
 

Offline Hattig

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 901
    • Show only replies by Hattig
Re: Question about USB on the minimig
« Reply #10 on: September 23, 2007, 01:33:06 PM »
If you eventual point in all this is that you want to use a USB gamepad to play Speedball 2, then this is nigh-on impossible.

Yes, you can attach a USB port to a 68000, the rest of the system is just code. However due to the nature of the software part of USB, you would need to run what is probably quite a heavy duty bit of software alongside the game that already probably uses >90% of the 68000's available power. Alongside that you would need to map the USB gamepad input into standard Amiga joystick inputs. And then you'd realise that Amiga games boot from ADFs on the MiniMig, and that there's no way to stick the USB stuff into that.

The only way it could be done would be to have a second CPU that runs the USB stack transparently, and also does the mappings to classic Amiga hardware transparently. Here, of course, you start seeing the level of work that would be required.
 

Offline KThunder

  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 1509
    • Show only replies by KThunder
Re: Question about USB on the minimig
« Reply #11 on: September 23, 2007, 01:39:10 PM »
you want a 50 button with thumbsticks etc.etc. gamepad take one, gut it, hook up wires to the switch pads and make a wiring setup to make it compatible to the minimig.

that would be way better than trying to make a usb interface.

for some of the other stuff like mass memory an ide interface would be easier as well and would work with simple adapters to many modern mass memory cards

there are schematics and software for ide stuff online
Oh yeah?!?
Well your stupid bit is set,
and its read only!
(my best geek putdown)
 

Offline downix

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 1587
    • Show only replies by downix
    • http://www.applemonthly.com
Re: Question about USB on the minimig
« Reply #12 on: September 23, 2007, 01:52:47 PM »
Quote

Floid wrote:
Quote

downix wrote:

For a single mouse, you will, at peak, utilize 12Mbps, roughly 1.5MB/sec.  Now, the Amigas RAM speed is only 7MB/sec.  So, for a single, solitairy mouse, you'd be tying up 40% of RAM access.... just imagine adding a keyboard.


...but non-insane_laser_2-trillion_DPI mice are low-speed devices operating at 1.5m*bits*/s, yes?

Still bothersome but somewhat less so.


Nope, not bits, Bytes.  Even if you're only sending one pip of information, requiring only a byte, it sends a full 32-bit word down the pipe.  Very inefficient.
Try blazedmongers new Free Universal Computer kit, available with the GUI toolkit Your Own Universe, the popular IT edition, Extremely Reliable System for embedded work, Enhanced Database development and Wide Area Development system for telecommuting.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Question about USB on the minimig
« Reply #13 on: September 23, 2007, 02:05:54 PM »
HIDs run at Low Speed - 1.5 Mbps.
 

Offline pixie

  • Sr. Member
  • ****
  • Join Date: Apr 2002
  • Posts: 480
    • Show only replies by pixie
    • http://savoc.tripod.com
Re: Question about USB on the minimig
« Reply #14 on: September 23, 2007, 02:12:01 PM »
Quote
Well it does if you put Windows to minimig.


To be of any use the USB-stack would need to run outside of the emulation in the first place (this is kind of obvious if you think about it: How would you go on about launching the USB-stack if you're booting from a game floppy? You obviously want to be able to use the keyboard and mouse in games...)


pixie- writing from a paradise called Portugal