OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => OpenZaurus/Opie/Qtopia => Topic started by: Mark on January 29, 2005, 09:11:49 pm

Title: Arm And Zaurus Software Emulator
Post by: Mark on January 29, 2005, 09:11:49 pm
Hi everyone!

I've been working in stealth mode on a software emulator for the ARM architecture. It runs on a PC (Linux only at present) and emulates the system features of the Sharp Zaurus SL-5500 platform. Currently I am able to run bare machine programs, vanilla Linux kernels, and OpenZaurus SL-5500 distributions. The emulator uses some fairly sophisticated simulation techniques so performance is very good. I am close to a real-time simulation of the SL-5500 on a fairly ordinary 2.6 GHz Pentium 4. It does a pretty good job with Zaurus Pacman for example!

The emulator will be a commercial product, and I'm looking for volunteers for the beta test program. If you are interested, please check out the details over at http://www.virtera.com (http://www.virtera.com) and become a site member if you'd like to give it a try. You will need to have access to an x86 Linux machine with a supported distro, and have some familiarity with installing from RPM, building Linux kernels and installing OpenZaurus to get started.

Look forward to hearing from you! Cheers,

Mark.
Title: Arm And Zaurus Software Emulator
Post by: Mickeyl on January 30, 2005, 07:44:29 am
Very interesting work, I just applied for an account.
Title: Arm And Zaurus Software Emulator
Post by: Mickeyl on January 30, 2005, 07:44:56 am
(double posting)
Title: Arm And Zaurus Software Emulator
Post by: Mark on January 30, 2005, 12:31:02 pm
Mickey - just approved your account. I was hoping that you'd register! I spent many hours debugging the boot of OpenZaurus on the emulator, and found a lot of invaluable insights from you in various forums and IRC logs!

There was one problem I remember in particular. The emulator would go into an infinite loop about 3.2 billion (yes billion) instructions into boot. This was well into init.d processing and the problem was in user space, not the kernel, making it that much harder to find out what was going on. Finally, I was able to grab all the sources, and build my own OpenZaurus distro using oemake (great stuff!) and turn on various debugging flags. It turned out that it was hanging inside some math routines used by SSH RSA key generation. I had a bug in the emulation of the ARM's 32-bit by 32-bit to 64-bit multiplies that prevented a math intensive loop from converging. After I fixed this one bug everything worked beautifully.

I think that the emulator will be really useful for kernel and distro testing. It means you can try out all kinds of new stuff without worrying about bricking your Zaurus.

I'll attach a couple of screen-shots below. These were taken using the GIMP just by grabbing the window running OpenZaurus.

Mark.
Title: Arm And Zaurus Software Emulator
Post by: Pyrates on January 30, 2005, 01:47:58 pm
Hey Mark!

Could you explain "commercial" ? I'm really not trying to start a flamewar, but the thing is, my gentoo system isn't supported by you, and if I get the source, there's a much better chance of getting it to run... Also, I couldn't find anything about the price, what is to be expected?

Cheers
Philipp
Title: Arm And Zaurus Software Emulator
Post by: Mark on January 30, 2005, 02:25:31 pm
Hi Philipp,

Commercial means that this is proprietary software, developed as an original work by Virtera Inc. as part of a commercial enterprise.

Although we don't support gentoo at this time, there is a good chance that one of the supported distributions will just work. The main dependency is on the dynamic libraries supported by your distro. If there is a problem then I can work with you to solve it.

We haven't disclosed pricing yet, but we will set appropriate price points for home users, and for business users.

Mark.
Title: Arm And Zaurus Software Emulator
Post by: lpotter on February 02, 2005, 01:44:24 pm
Just curious, is there a way in your software to change the rate of the cpu cycles it uses,.. as in slowing it down?
Title: Arm And Zaurus Software Emulator
Post by: Tezeee on February 02, 2005, 07:59:33 pm
Quote
Just curious, is there a way in your software to change the rate of the cpu cycles it uses,.. as in slowing it down?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=65179\"][{POST_SNAPBACK}][/a][/div]

Hi there!

Yes, there is a way to do this. You can specify the target MHz on the command line (such as --mhz 50)  and also tell the emulator to synchronize clocks so that it will  keep simulated time in sync with real wall-clock time. If your host machine is fast enough to hit the target MHz, then the clock synchronization logic dynamically inserts small delays to slow down the simulator to the specified rate. This is done using the Linux sleep system call so that spare cycles are returned to the host machine. This technique works really well and the delays are imperceptible to the user.

This is actually quite an important feature as otherwise the simulation would run too fast in places. It makes the Zaurus clock tick at the right rate, and also makes playing games much more fun.

You should even be able run one of the Zaurus packages that emulates another machine on the Zaurus emulator if you want! The most bizarre set-up I've had is setting at my lap-top PC running Windows and using VNC to display the remote desktop from a Linux virtual machine, that is provided by  VMware hosted on a real Linux machine,  and then run vm-arm-se inside that Linux virtual machine with display back out via VNC. Everything just works the way that it should. It would be kind of cool to then run something like a SNES emulator inside the emulated Zaurus inside the emulated Linux machine, displayed remotely to my Windows machine, but that just makes my head hurt too much!

There is more more information in the User Guide, and there's some performance measurements too. If you create an account at www.virtera.com then you can download the User Guide from the "Documents Download" link and see for yourself. Feel free to ask for a beta trial if you are interested in trying it out.

Cheers,

Tezeee for Mark.
Title: Arm And Zaurus Software Emulator
Post by: RickHodgin on August 13, 2005, 08:00:56 am
Mark,

I would be very interested in porting the emulator to the Windows/PC architecture.  As this is a commercial venture, I would be willing to sign whatever non-disclosure agreements would be required.  I would also be willing to demonstrate my abilities prior to any significant investment of time or effort on your behalf.

If interested, please contact me.

- Rick C. Hodgin
Title: Arm And Zaurus Software Emulator
Post by: Mark on August 13, 2005, 12:58:03 pm
Quote
Mark,

I would be very interested in porting the emulator to the Windows/PC architecture.  As this is a commercial venture, I would be willing to sign whatever non-disclosure agreements would be required.  I would also be willing to demonstrate my abilities prior to any significant investment of time or effort on your behalf.

If interested, please contact me.

- Rick C. Hodgin
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91674\"][{POST_SNAPBACK}][/a][/div]

Hi Rick,

Can you send an e-mail to me so that we can discuss this off-line? You can reach me at support (at) virtera.com. Thanks!

Mark.
Title: Arm And Zaurus Software Emulator
Post by: RickHodgin on August 13, 2005, 08:47:01 pm
Quote
Hi Rick,

Can you send an e-mail to me so that we can discuss this off-line? You can reach me at support (at) virtera.com. Thanks!

Mark.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=91701\"][{POST_SNAPBACK}][/a][/div]

An email has been sent to the address you specified.  I look forward to hearing from you.

- Rick C. Hodgin
Title: Arm And Zaurus Software Emulator
Post by: Ragnorok on August 31, 2005, 06:04:14 pm
Quote
Hi everyone!

I've been working in stealth mode on a software emulator for the ARM architecture.
...[snip]...

- Clever!  Any idea when the C1k might be emulated?  (cheshire grin)
Title: Arm And Zaurus Software Emulator
Post by: Mark on August 31, 2005, 10:04:59 pm
Quote
- Clever!  Any idea when the C1k might be emulated?  (cheshire grin)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=93988\"][{POST_SNAPBACK}][/a][/div]

We're working on the C1000 version right now, and we'll get C3000 emulation without any additional work (we already support large CompactFlash memory cards).  There's a reasonable amount of work involved, mostly PXA support plus the platform support code. We haven't decided on a release date yet, but when its reaches beta quality I'll post an announcement on oesf.org to round up some more beta testers.

Cheers,

Mark.
Title: Arm And Zaurus Software Emulator
Post by: miskinis on August 31, 2005, 10:16:38 pm
Will the SL-6000 be supported, and in both portrait/landscape?

Will PC-based peripherals (COM port, mic, speaker, etc.) be mapped
to the OS running in the emulator?

Thanks,  John
Title: Arm And Zaurus Software Emulator
Post by: speculatrix on February 12, 2007, 09:14:16 am
anyone interested should download it ASAP as it looks as if virtera is stopping this product... a great shame, I am wondering why they couldn't do a version to allow pocketPC developers and palm developers to work on a virtual device.
Title: Arm And Zaurus Software Emulator
Post by: RickHodgin on May 22, 2010, 03:13:49 am
Quote from: speculatrix
anyone interested should download it ASAP as it looks as if virtera is stopping this product... a great shame, I am wondering why they couldn't do a version to allow pocketPC developers and palm developers to work on a virtual device.

I had offered to Mark and his company to write the full Windows port for free, including a full debugging suite with custom ports to read/write to any value in memory.  I did not need source code access to his product, just runtime-level access with a working API.  I was willing to give him and his company the source code of my product, as well as sign over all rights to the project for any and all purposes.  He flatly refused to agree, even becoming rude to me at the end when I asked him if he realized what I was giving him.

At the time, I had told many of my co-workers about it, and they could not understand his reasoning.  There must've been some real reason why he shut it down.  I wished he hadn't, as I'm still many years later without a good emulator.
Title: Arm And Zaurus Software Emulator
Post by: Mark on June 18, 2010, 03:19:32 pm
Quote from: RickHodgin
I had offered to Mark and his company to write the full Windows port for free, including a full debugging suite with custom ports to read/write to any value in memory.  I did not need source code access to his product, just runtime-level access with a working API.  I was willing to give him and his company the source code of my product, as well as sign over all rights to the project for any and all purposes.  He flatly refused to agree, even becoming rude to me at the end when I asked him if he realized what I was giving him.

At the time, I had told many of my co-workers about it, and they could not understand his reasoning.  There must've been some real reason why he shut it down.  I wished he hadn't, as I'm still many years later without a good emulator.

Hi Rick,

Good to hear from you again!

I'm sorry if I was rude in my email correspondence to you. I took your offer very seriously and read all of the details in all your emails. Perhaps the rudeness was in my last email in August 2005, were I said that this was my final decision. Apologies for that. I never had any interest in selling shrink-wrapped software. The end-game was to sell the IP, services and maybe the entire company. I wanted a few very large deals (maybe only one), not selling units of software at $50 a go.

In the end, there were good reasons for shutting it down and I can tell you some of the back story now. Firstly, I was the *only* person working on the software. I also had a very demanding full-time day job, so all Virtera development was done outside regular hours in my spare time. There were many late nights. The idea was to get a working product and make some big deals before quitting the day job. I never reached critical mass, never took a single dime of revenue, and never got to the point where I could make this my full-time occupation.

There were two events that finally made me throw in the towel. The first was the birth of my daughter in September 2005, literally the week after our final email. Any spare time that I had quickly disappeared! The second was that I had re-targeted the technology to be an iPod emulator. I had a near complete emulation of the 1st and 2nd generation iPods sufficient to run iPod Linux and play audio in real-time. I made some efforts to market this, but had to abandon this because of legal concerns. The final straw was when one of my target companies (the micro-processor chip supplier to Apple) lost the iPod contract and completely lost interest - they were acquired by nVidia in the end.

I thought about open sourcing the whole thing, but didn't go through with that because of the potential legal issues.

Anyway, hope things worked out for you. It sounds like QEMU is the way to go these days.

Cheers,

Mark.