log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Arcem et al
 
  Arcem et al
  This is a long thread. Click here to view the threaded list.
 
Jeffrey Lee Message #96071, posted by Phlamethrower at 16:25, 21/12/2006, in reply to message #96070
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
An ARM-on-ARM JIT for ArcEm or RPCEmu would be very nice, though.
Yes.

*applies pokeage to Adrian*
  ^[ Log in to reply ]
 
Jeffrey Lee Message #96078, posted by Phlamethrower at 00:25, 22/12/2006, in reply to message #96071
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
"First" version with graphics output is now working - but it still takes just under a minute to get to a usable desktop (disregarding the fact there's currently no way of using it :P).

Even if the screen update rate is reduced to about 1 update every 2 seconds, it still takes roughly the same time to get to the desktop :(

*pokes Adrian some more to add JIT support to an ARM-on-ARM emulator*

[Edited by Phlamethrower at 00:32, 22/12/2006]
  ^[ Log in to reply ]
 
richard cheng Message #96103, posted by richcheng at 11:34, 22/12/2006, in reply to message #96078

Posts: 655
Exciting! I think I'm going to get my Zaurus (roar!) in the NY, depending on how much I've spent over the Christmas period. I'm currently too scared to look at my bank account.

(It's not been just on food/drink and presents - my car insurance and road tax runs out in December, and I've just forked out for a year's insurance for two new kittens, too.)
  ^[ Log in to reply ]
 
Jeffrey Lee Message #96105, posted by Phlamethrower at 11:37, 22/12/2006, in reply to message #96103
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Exciting!
But probably too slow to play games, which was my primary intention :(

I think I'm going to get my Zaurus
Yay!

I should be able to get keyboard input working tonight, so I'll be able to see exactly how slow it is by messing around in BASIC etc.
  ^[ Log in to reply ]
 
Jeffrey Lee Message #96151, posted by Phlamethrower at 20:19, 22/12/2006, in reply to message #96105
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Key mapping needs some work, but I can get into and use BASIC :P

[edit]

It looks like the emulator (or at least the clock) is currently running 8 times slower than realtime.

[Edited by Phlamethrower at 21:34, 22/12/2006]
scrn018.png 640x480 20.6KB
scrn018.png
640x480
20.6KB

  ^[ Log in to reply ]
 
Andrew Flegg Message #96174, posted by Jaffa at 00:17, 23/12/2006, in reply to message #96151
Member
Posts: 53
Cool.

Got it basically working on a Nokia 770 too this evening, tried with Thumb-instructions and the soft FP ABI to try and get some more speed. Unfortunately, I didn't move across my updated ArcemModes module to better fit the 770 screen; and it decided to not like my Bluetooth keyboard.

Definitely needs some clever JITting to be more than just a clever proof of concept, though.

However, if you wanted to run *some* RISC OS software (specifically Netsurf) on a 770, that's doable:

http://www.bleb.org/software/770/netsurf-002.png
  ^[ Log in to reply ]
 
Jeffrey Lee Message #96176, posted by Phlamethrower at 00:44, 23/12/2006, in reply to message #96174
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
However, if you wanted to run *some* RISC OS software (specifically Netsurf) on a 770, that's doable:

http://www.bleb.org/software/770/netsurf-002.png
Nice!

On the Zaurus front, the key mapping is now improved (Should be fully functional, if a little confusing), scroll bars are working, and the redraw code has been tweaked. Unfortunately the Zaurus video memory is organised in portrait mode instead of landscape, so landscape redraws from a landscape image are a bit slow - depending on how the redraw code progresses I may find a clever way of accelerating it.

Next step will probably be the mouse, which may be a bit tricky since I haven't worked out how to trap the 'extra' keys. I receive events for them, but that isn't stopping the OS from launching the relevant piece of software :(
  ^[ Log in to reply ]
 
Jeffrey Lee Message #96177, posted by Phlamethrower at 02:45, 23/12/2006, in reply to message #96176
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Screenshot says it all, really.

Currently it's using simplistic mouse input, i.e. the position of the hardware cursor is used to guide the mouse to the right place. So it obviously won't work if the hardware cursor becomes detatched from the mouse. Buttons are activated by keys on the keyboard.

Now I feel like adding some kind of profiling code so I can see how much time is spent emulating, redrawing, and in the OS/other programs.

[Edited by Phlamethrower at 02:48, 23/12/2006]
scrn019.png 640x480 28.2KB
scrn019.png
640x480
28.2KB

  ^[ Log in to reply ]
 
Jeffrey Lee Message #96191, posted by Phlamethrower at 19:27, 23/12/2006, in reply to message #96177
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
http://www.phlamethrower.co.uk/misc/arcem.php

I had a play with A310Emu on my Iyonix today. A mix of ARM & BASIC gets it up to around 7MHz. But I don't think trying to merge that code into ArcEm would be a good idea.

Some kind of cross-platform (ARM/x86) JIT emulator would be an interesting thing to work on. The simplest way would be to detect instruction sequences that don't access SWIs/memory/R15 and JIT those - which can be done just by copying the code somewhere, loading the registers & PSR, and running it. Anything else would require lots of complicated additions that would involve rewriting the code (to manage data aborts, branches, etc.) instead of just copying it.

Assuming the emulator runs at a steady 0.5MHz, that makes (for the zaurus) around 80 real instructions for every 1 emulated. If only 25% of the emulated instructions could be JIT'd, that would (in theory) get the emulated speed up to 6.6MHz :) (Assuming, of course, that the code being emulated is neat enough to allow that. In reality it looks like compiled code often contains memory accesses/branches every 2 or 3 instructions, so to get decent speed you'd probably have to emulate those, which would then involve rewriting the code being emulated to handle extra stuff like memory mapping and data aborts).

[Edited by Phlamethrower at 19:36, 23/12/2006]
  ^[ Log in to reply ]
 
Adrian Lees Message #96245, posted by adrianl at 16:59, 24/12/2006, in reply to message #96191
Member
Posts: 1637
get the emulated speed up to 6.6MHz :)
:(
  ^[ Log in to reply ]
 
Jeffrey Lee Message #96298, posted by Phlamethrower at 20:17, 27/12/2006, in reply to message #96245
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Don't worry, I've realised that a 'full' JIT engine is probably easier than I thought.
  ^[ Log in to reply ]
 
Andrew Flegg Message #96302, posted by Jaffa at 20:54, 27/12/2006, in reply to message #96298
Member
Posts: 53
Excellent :-)
  ^[ Log in to reply ]
 
Jeffrey Lee Message #97206, posted by Phlamethrower at 23:31, 15/1/2007, in reply to message #96302
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
I appear to have started writing an ARM-on-ARM JIT engine. Of course I've done this without checking whether anyone else has started a similar project, so I guess I'd better make contact before getting into the meat of it :P

The fairly simple interface to the interpreter (and the hopefully fairly simple innards) should make it easy to plug it into whatever projects need it, extend the JIT instruction set, or even to rewrite the whole core for ARM-on-x86, etc.
  ^[ Log in to reply ]
 
richard cheng Message #97223, posted by richcheng at 15:07, 16/1/2007, in reply to message #97206

Posts: 655
ArcEm doesn't appear to work on my Zaurus. Would you like a more full error report, with transcribed error messages and whatnot?
  ^[ Log in to reply ]
 
Jeffrey Lee Message #97225, posted by Phlamethrower at 15:35, 16/1/2007, in reply to message #97223
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Yes please :)

You should be able to run it from a terminal to get 'useful' debug output.

[Edited by Phlamethrower at 15:47, 16/1/2007]
  ^[ Log in to reply ]
 
richard cheng Message #97226, posted by richcheng at 15:47, 16/1/2007, in reply to message #97225

Posts: 655
Hmm. I could have sworn there was more output than that.

When run from the terminal, it says:
Version 1.10 (11/12/2005) + CVS, ARM2AS
Couldn't open ROM file
When run from the icon in Applications, I get a window in which the top half is (flashing) black, and the bottom half is grey, and the title bar states the MHz (about 1) and the fps (about 6).

I have a 3.10 ROM that I extracted from the support2.zip file on the !A310Emu website, named rom, and placed alongside the arcem exe.

I've also placed the 64MB HardImage1 file from the ArcEm site in the same directory, and edited the arcemrc file as such:
MFM disc
1 1024 8 32 256
... but it didn't work before I added the hard drive image, either, (presumably with the same error message).

Do I have a duff ROM?
  ^[ Log in to reply ]
 
Jeffrey Lee Message #97227, posted by Phlamethrower at 15:51, 16/1/2007, in reply to message #97226
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Hmm. I could have sworn there was more output than that.

When run from the terminal, it says:
Version 1.10 (11/12/2005) + CVS, ARM2AS
Couldn't open ROM file
File permissions, perhaps?

Do I have a duff ROM?
If it says it can't open the ROM file, then I don't think you'll have gotten far enough to know if the ROM is any good or not ;)

But I think I'm using the same ROM as you, so it probably is some silly file permission thing.
  ^[ Log in to reply ]
 
richard cheng Message #97230, posted by richcheng at 17:11, 16/1/2007, in reply to message #97227

Posts: 655
Hmm. It is owned by root.

But, I've tried "sudo ./arcem" to little effect.

Also, the permissions on ROM are currently set as:

-rwxrwxrwx

Any ideas?
  ^[ Log in to reply ]
 
richard cheng Message #97231, posted by richcheng at 17:13, 16/1/2007, in reply to message #97230

Posts: 655
Chown'ing the rom to zaurus also doesn't help.
  ^[ Log in to reply ]
 
Jeffrey Lee Message #97233, posted by Phlamethrower at 17:27, 16/1/2007, in reply to message #97231
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Hmm, oddness.

I'll have a play when I get home, and maybe upload a version that gives a bit more debug output.
  ^[ Log in to reply ]
 
Peter Howkins Message #97244, posted by flibble at 20:49, 16/1/2007, in reply to message #97233
flibble

Posts: 892
I have a 3.10 ROM that I extracted from the support2.zip file on the !A310Emu website, named rom, and placed alongside the arcem exe
Linux is case sensitive, rename the file 'ROM' and try :)
  ^[ Log in to reply ]
 
Jeffrey Lee Message #97245, posted by Phlamethrower at 20:55, 16/1/2007, in reply to message #97233
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
I've checked, and I'm definitely using the same ROM as you.

One thing that may be causing the problem may be to do with where you installed the emulator. I installed it to an SD card, but (for whatever reason) still have the ROM on internal flash. So I get:

[zaurus zaurus]$ ls -l /opt/QtPalmtop/share/arcem/
lrwxrwxrwx 1 root qpe 41 Dec 23 17:37 arcem -> /var/mnt/card/QtPalmtop/share/arcem/arcem
lrwxrwxrwx 1 root qpe 43 Dec 23 17:37 arcemrc -> /var/mnt/card/QtPalmtop/share/arcem/arcemrc
lrwxrwxrwx 1 root qpe 43 Dec 23 17:37 hexcmos -> /var/mnt/card/QtPalmtop/share/arcem/hexcmos
-rwxr-xr-x 1 root root 2097152 Dec 23 16:07 rom
[zaurus zaurus]$ ls -l /var/mnt/card/QtPalmtop/share/arcem/
-rwxrwxrwx 1 root root 952018 Dec 23 22:12 arcem
-rwxrwxrwx 1 root root 24 Dec 23 22:12 arcemrc
-rwxrwxrwx 1 root root 513 Dec 27 23:55 hexcmos
I'm not sure how the 3200's filing system differs - does /opt/QtPalmtop/share/arcem only contain symlinks to the real install location, or is everything laid out properly on the internal microdrive?

Anyway, to cut the story short: if the rom image isn't in /opt/QtPalmtop/share/arcem/ (Or there isn't a link to its truelocation from there) then that would probably explain why it isn't working. I copied my rom to SD and put a symlink in and it works fine.

And if you run it from a terminal, remember to give it '--rom rom' as an argument otherwise it will look for 'ROM' (The reason I changed it for lowercase was that I'm using a FAT fomat SD card, and linux seems to force standard 8.3 filenames to be displayed in lowercase - so there was literally no way of getting it to load a file called 'ROM' from SD)

If that doesn't work, panic :)

Also, I'll be surprised if you can find anything on that hard disc image that can be used at 0.5MHz. Or even if you can get the pointer to navigate the filer windows properly ;)

[edit]

If you want to fiddle with the command line options it's launched with, have a poke at /home/QtPalmtop/bin/arcem

[Edited by Phlamethrower at 20:58, 16/1/2007]
  ^[ Log in to reply ]
 
richard cheng Message #97279, posted by richcheng at 11:11, 17/1/2007, in reply to message #97245

Posts: 655
It's up to ~0.7MHz now. :)

Okay. Sounds like we have a combination of stupid permission-based problems, and casiness-based problems.

sudo ./arcem --rom rom works. (Yay!)

Similarly, if I rename rom to ROM, then sudo ./arcem works.

Without the sudo, it fails with "SaveCMOS: Could not open (hexcmos.updated) CMOS settings file", which I'm guessing is some kind of permission problem, but I'm currently too lazy/at work to figure out.

I've not tried adding a sudo to the GUI launching script but I'd bet a barrel of monkeys it would work.

I look forward to seeing the vast performance improvements afforded by the git optimization!
  ^[ Log in to reply ]
 
richard cheng Message #97280, posted by richcheng at 11:24, 17/1/2007, in reply to message #97245

Posts: 655
Problem is solved, as noted above, but FYI, and for my own interest...
I'm not sure how the 3200's filing system differs - does /opt/QtPalmtop/share/arcem only contain symlinks to the real install location, or is everything laid out properly on the internal microdrive?
/opt/QtPalmtop/ is a symlink to /home/QtPalmtop/.

I installed arcem to the main memory, so otherwise, there's no symlinks involved.
And if you run it from a terminal, remember to give it '--rom rom' as an argument otherwise it will look for 'ROM' (The reason I changed it for lowercase was that I'm using a FAT fomat SD card, and linux seems to force standard 8.3 filenames to be displayed in lowercase - so there was literally no way of getting it to load a file called 'ROM' from SD)
I don't quite understand this. I've noticed the weird upper/lower case discrepancy when viewing files copied over the USB from Windows. But I can create a file called TeStInG on the FAT-formatted hdd3 partition. What's the difference?
  ^[ Log in to reply ]
 
Jeffrey Lee Message #97282, posted by Phlamethrower at 11:38, 17/1/2007, in reply to message #97280
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
But I can create a file called TeStInG on the FAT-formatted hdd3 partition. What's the difference?
I'm guessing that the mix of uppercase and lowercase made Linux decide to create the file with a long filename instead of just an 8.3 one.
  ^[ Log in to reply ]
 
Pages (2): |< < 2

Acorn Arcade forums: Programming: Arcem et al