<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33414002</id><updated>2012-02-01T11:16:48.452+01:00</updated><title type='text'>ROLF - An alternative GUI for Linux</title><subtitle type='html'>ROLF is a GUI framework using the framebuffer device on Linux to provide a look and feel similar to that of the RISC OS operating system.

The RISC OS GUI is largely unchanged in concept since the late 1980's, not because of any lack of development, but because it just worked.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33414002.post-2442025572808340654</id><published>2011-12-07T10:16:00.000+01:00</published><updated>2011-12-07T10:16:10.111+01:00</updated><title type='text'>Beagle Board booting moving to another blog</title><content type='html'>It seems what I'm doing now mirrors the goings on back in July at this site &lt;a href="http://www.embedded-bits.co.uk/category/beagleboard/"&gt;this&lt;/a&gt; site, which is written in a much better style.&lt;br /&gt;&lt;br /&gt;I'm intending to continue working on this until I have a complete OS on the BeagleBoard.  I'll be talking about that on my &lt;a href="http://somethinglikeeiffel.blogspot.com/"&gt;Something Like Eiffel&lt;/a&gt; blog, since it's going to be designed around the same language features that I've been thinking about there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2442025572808340654?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2442025572808340654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2442025572808340654' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2442025572808340654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2442025572808340654'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/12/beagle-board-booting-moving-to-another.html' title='Beagle Board booting moving to another blog'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-3262463036443077851</id><published>2011-11-24T21:40:00.000+01:00</published><updated>2011-11-24T21:40:43.969+01:00</updated><title type='text'>Booting Beagleboard by BBC BASIC</title><content type='html'>The RPC is the only machine I have left with a serial port (well, except the BBC Micro that's coming up to its 30th birthday next year, and it can't quite manage 115200 baud).&lt;br /&gt;&lt;br /&gt;Below is a very short BBC BASIC program that assembles some code and uploads it to the BB internal memory.  You have to hold down the USR button on powerup/reset to get it to talk.  (The slowest part in development was noticing out that the initial boot sequence uses 8E1 protocol, and not the 8N1 that the x-loader and u-boot and linux do.)&lt;br /&gt;&lt;br /&gt;I wanted to get into the boot process as early as possible without continuously re-flashing the NAND ROM, and also avoiding plugging an SD card into the somewhat worn out socket.&lt;br /&gt;&lt;br /&gt;Brunel OS is an idea I've been thinking about for years, with a concept based on an Eiffel inspired language that handles multi-threading by simply only alowing one thread at a time access to any object and allowing threads to pass through multiple memory maps (somewhat different to the process model of other operating systems I've had experience of).&lt;br /&gt;&lt;br /&gt;So, an example of loading a very small program into internal RAM of the BeagleBoard from a Risc PC:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;SYS"OS_SerialOp", 0, &amp;106, &amp;fffffe00&lt;br /&gt;SYS"OS_SerialOp", 1, %011000&lt;br /&gt;SYS"OS_SerialOp", 5, 18&lt;br /&gt;SYS"OS_SerialOp", 6, 18&lt;br /&gt;&lt;br /&gt;PROCassemble&lt;br /&gt;&lt;br /&gt;REM Receive ASIC ID (and ignore it, for the time being)&lt;br /&gt;FOR R%=1 TO 58&lt;br /&gt;  REPEAT&lt;br /&gt;    SYS"OS_SerialOp", 4 TO ,J%;F%&lt;br /&gt;  UNTIL (F% AND 2) = 0&lt;br /&gt;&lt;br /&gt;  PRINT RIGHT$( "0"+STR$~J%, 2 );&lt;br /&gt;NEXT&lt;br /&gt;&lt;br /&gt;PRINT "Sending boot command"&lt;br /&gt;PROCput( 2 )&lt;br /&gt;PROCput( 0 )&lt;br /&gt;PROCput( 3 )&lt;br /&gt;PROCput( &amp;f0 )&lt;br /&gt;PRINT "Boot command sent"&lt;br /&gt;DIM B% 4&lt;br /&gt;!B%=P%-code%&lt;br /&gt;PROCput( B%?0 )&lt;br /&gt;PROCput( B%?1 )&lt;br /&gt;PROCput( B%?2 )&lt;br /&gt;PROCput( B%?3 )&lt;br /&gt;PRINT "Length sent ";!B%&lt;br /&gt;T%=0&lt;br /&gt;FOR Q%=code% TO P%&lt;br /&gt;  SYS"OS_SerialOp", 4 TO ,J%;F%&lt;br /&gt;  IF (F% AND 2) = 0 THEN&lt;br /&gt;    PROCshow( J% )&lt;br /&gt;  ENDIF&lt;br /&gt;  PROCput( ?Q% )&lt;br /&gt;  T%+=1&lt;br /&gt;NEXT&lt;br /&gt;PRINT "Transmission finished "; T%; " bytes"&lt;br /&gt;&lt;br /&gt;REM Kind of terminal (one way, at the moment)&lt;br /&gt;REPEAT&lt;br /&gt;  REPEAT&lt;br /&gt;    SYS"OS_SerialOp", 4 TO ,J%;F%&lt;br /&gt;  UNTIL (F% AND 2) = 0&lt;br /&gt;  PROCshow( J% )&lt;br /&gt;UNTIL 0&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DEF PROCput( C% )&lt;br /&gt;REPEAT&lt;br /&gt;SYS"OS_SerialOp", 3, C% TO ; F%&lt;br /&gt;UNTIL (F% AND 2) = 0&lt;br /&gt;ENDPROC&lt;br /&gt;&lt;br /&gt;DEF PROCshow( C% )&lt;br /&gt;    R%+=1&lt;br /&gt;    IF C%&gt;31 OR C%=10 OR C%=13 THEN&lt;br /&gt;      VDU C%&lt;br /&gt;    ELSE&lt;br /&gt;      PRINT "&lt;";~C%;"&gt;"&lt;br /&gt;    ENDIF&lt;br /&gt;ENDPROC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DEF PROCassemble&lt;br /&gt;DIM code% 1000&lt;br /&gt;FOR I%=0 TO 1&lt;br /&gt;P%=code%&lt;br /&gt;[OPT 3*I%&lt;br /&gt;  MOV r9, #&amp;49000000&lt;br /&gt;  ORR r9, r9, #&amp;00020000&lt;br /&gt;  ADR r1, welcome&lt;br /&gt;.write_loop&lt;br /&gt;  LDRB r2, [r1], #1&lt;br /&gt;  CMP r2, #0&lt;br /&gt;  STRNEB r2, [r9]  ;This can overflow the buffer, but it's not important yet&lt;br /&gt;  BNE write_loop&lt;br /&gt;&lt;br /&gt;.loop&lt;br /&gt;  B loop&lt;br /&gt;.welcome&lt;br /&gt;  EQUS "Welcome to Brunel OS 0.0.0-1"+CHR$10+CHR$13&lt;br /&gt;  EQUB 0&lt;br /&gt;  ALIGN&lt;br /&gt;]&lt;br /&gt;NEXT&lt;br /&gt;ENDPROC&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Output:&lt;br /&gt;&lt;pre&gt;04010501343007561302010012150100000000000000000000000000000000000000001415010000000000000000000000000000000000000000Sending boot command&lt;br /&gt;Boot command sent&lt;br /&gt;Length sent 64&lt;br /&gt;Transmission finished 65 bytes&lt;br /&gt;Welcome to Brunel OS 0.0.0-1&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-3262463036443077851?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/3262463036443077851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=3262463036443077851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3262463036443077851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3262463036443077851'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/11/booting-beagleboard-by-bbc-basic.html' title='Booting Beagleboard by BBC BASIC'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5882500446772483886</id><published>2011-11-04T19:33:00.001+01:00</published><updated>2011-11-04T19:35:26.084+01:00</updated><title type='text'>Alignment and modern ARM processors</title><content type='html'>Back when RISC OS was in its heyday, and the ARM processor was new, reading or writing a word at a non-word aligned address didn't cause an exception or cause two memory words to be read (and half discarded); instead it would read the word at (address &amp;amp; ~3) (i.e. the word containing the byte addressed) and load it into the register, rotated so that the addressed byte was the least significant byte in the register (IIRC).&lt;br /&gt;&lt;br /&gt;ARM Architecture Reference Manual:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;load single word ARM instructions are architecturally defined to rotate right the word-aligned data transferred by a non word-aligned address one, two or three bytes depending on the value of the two least significant address bits.&lt;/blockquote&gt;&lt;br /&gt;Modern ARM processors, when faced with this case, can trigger an alignment exception, allowing the OS to fixup the instruction to behave in the (admittedly more high-level-language-friendly) way of reading the four bytes starting at the address and treating them as a single word); some hardware can even perform the fixup automatically.&lt;br /&gt;&lt;br /&gt;Unfortunately, that means that some RISC OS (read: old) code breaks.&lt;br /&gt;&lt;br /&gt;There are two Linux features that appear to have a bearing on the problem:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;/proc/cpu/alignment (allows you to set whether an alignment exception should be fixed up or a SIGBUS sent to the process).&amp;nbsp; Unfortunately, that has at least two problems; firstly, it's system-wide, and so may cause other programs to break, secondly, it doesn't register unaligned LDRs (probably because the hardware performs the fixup).&lt;/li&gt;&lt;li&gt;The prctl has the following values defined in linux/prctl.h: PR_SET_UNALIGN and PR_GET_UNALIGN, and the possible values: PR_UNALIGN_NOPRINT (for silent fixup) and PR_UNALIGN_SIGBUS (to signal the exception to the process for fixing up).&amp;nbsp; This is a per-process feature but, unfortunately, these values are not implemented in the ARM kernel.&lt;/li&gt;&lt;/ol&gt;Ideally, I think I'd like to use the prctl approach and have a third value to set the system to, PR_UNALIGN_ARM_TRADITIONAL, which would simply work the way ARM processors used to.&amp;nbsp; How practical that is remains to be seen (especially in the presence of multi-core processors; the behaviour has to be settable on a per-core basis).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5882500446772483886?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5882500446772483886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5882500446772483886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5882500446772483886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5882500446772483886'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/11/alignment-and-modern-arm-processors.html' title='Alignment and modern ARM processors'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-8365111070205993265</id><published>2011-11-02T19:15:00.004+01:00</published><updated>2011-11-02T23:41:56.784+01:00</updated><title type='text'>ARM Emulation on ARM - progress</title><content type='html'>The emulation approach I talked about in my last post is working well enough that most BASIC seems to work well (and the missing parts are probably due to omissions in the ROLF libraries, not down to the emulator code).&amp;nbsp; !Edit (from a RISC OS 4.02 ROM image) starts up, brings up an IconBar icon and opens a window (whose text can be read, provided it's not in system font), but for some reason the characters typed each get put on a new line!&lt;br /&gt;&lt;br /&gt;There are still some bugs to be ironed out, and the (unoptimised) speed is less than I'd hoped.&amp;nbsp; Actually it's about 100 times slower than my 200MHz RiscPC!&lt;br /&gt;&lt;br /&gt;Still, I have several features that still need implementing, such as a hash table for cache searching, fixing up jumps to non-local code so that the second and subsequent jumps make no search, compiling the library with gcc optimisation on (which made a surprisingly large difference on the x86 ARM emulator) and, if all else fails, reorganising the instruction identification mechanism to be more efficient.&lt;br /&gt;&lt;br /&gt;Update 19:39.&amp;nbsp; Implemented a simple three instruction hash, for a better than 10x speedup.&amp;nbsp; Now only 10 times slower than the 15 year old machine!&lt;br /&gt;&lt;br /&gt;Update 19:55.&amp;nbsp; -O4 optimisation gives a 30% speedup (a test that used to take 167cs, now takes 115cs), although that's probably more about turning off some debug than anything else.&lt;br /&gt;&lt;br /&gt;Update 00:21.&amp;nbsp; One fixup approach takes the time down to 78cs (for 1 million times around a FOR...NEXT loop).&lt;br /&gt;Initially, I thought I'd have to clear the cache (which involves a system call, plus whatever the OS does) for each fixup, but I realised that I could use LDR pc, [pc,...] to load the destination address using the data cache, (where the destination address would initially be the fixup routine and later the actual code address).&amp;nbsp; I might try some other approaches in the morning.&amp;nbsp; (I just noticed some debug output still in there, so I deleted it and... the time went UP to 106cs.&amp;nbsp; I'm going to bed.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-8365111070205993265?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/8365111070205993265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=8365111070205993265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/8365111070205993265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/8365111070205993265'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/11/arm-emulation-on-arm-progress.html' title='ARM Emulation on ARM - progress'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-1596383938634640321</id><published>2011-10-06T15:23:00.000+02:00</published><updated>2011-10-06T15:23:59.574+02:00</updated><title type='text'>ARM Emulation on ARM</title><content type='html'>ROLF has a compatibility layer intended to allow execution of RISC OS applications.  On x86 platforms, this includes an emulator for the ARM instruction set.  Recent experience with trying to simply use the ARM processor on ARM platforms ended in &lt;a href="http://ro-lookandfeel.blogspot.com/2011/07/minor-hitch-running-risc-os-code-on.html"&gt;failure&lt;/a&gt;.  I'm trying a different approach to work around that problem, which should also remove the need for Linux kernel changes and allowing the execution of both 32-bit and 26-bit programs.&lt;br /&gt;&lt;br /&gt;The emulator interface will be the same as the emulator on the emulator that generates x86 code, but takes a different approach to code generation due to the similarity of emulated and host processors.&lt;br /&gt;&lt;br /&gt;Basically, code generated by the emulator is isolated from the Linux code by a code fragment that stores and replaces Linux register values with the emulator's register values on entry and does the opposite on exit.  Most instructions can then simply be copied verbatim from the emulated code to the generated code.  Since the emulator generated code needs some workspace to deal with, four registers have been reserved and instructions that use the reserved registers will be modified and supplemented with code to load and/or store the stored register's values into reserved registers.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ADD r1, r4, #17&lt;/pre&gt;&lt;br /&gt;Would be copied, but&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ADD r8, r9, r10 LSL#2&lt;/pre&gt;&lt;br /&gt;needs to be replaced with something like&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;LDR r8, [r11, #40]    ; Load arm_emulator_regs[10] into r8&lt;br /&gt;LDR r9, [r11, #36]    ; Load arm_emulator_regs[9] into r9&lt;br /&gt;ADD r8, r9, r8 LSL#2  ; The original instruction with the register fields replaced&lt;br /&gt;STR r8, [r11, #32]    ; Store r8 into arm_emulator_regs[8]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Use of r15, the program counter, will also be recognised by the emulator and code generated to emulate either the 26-bit or 32-bit PC, depending on the current mode.&lt;br /&gt;&lt;br /&gt;The reserved registers chosen are r8-r11, since:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;They appear to be the least used registers in the RISC OS 4.02 ROM&lt;/li&gt;&lt;li&gt;They are in a block of four, aligned on a four register boundary, which allows instructions using them to be identified by checking the top two bits of the register number (0b10xx) &lt;/li&gt;&lt;li&gt;Four is the smallest number of registers that this can work with, considering instructions like ADD r11, r10, r9, LSL r8 need three registers to hold the "input" values (we can re-use one of them as the destination register) and one more register (r11) to store a pointer to the emulator's registers in memory (plus the stored caller's registers and the emulator's PSR).&lt;/li&gt;&lt;/ol&gt;Condition flags are also a breeze compared with emulating them in x86 machine code, and conditional execution of instructions pretty much takes care of itself, except when the instruction sets the flags and the emulator still has to emit code to store the value of a reserved register.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;ADDEQ r8, #1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Can't simply do this:&lt;br /&gt;&lt;pre&gt;LDREQ  r8, [r11, #32]&lt;br /&gt;ADDEQS r8, #1&lt;br /&gt;STREQ  r8, [r11, #32]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;because the final instruction will execute on the conditions set by the preceeding instruction.&lt;br /&gt;&lt;br /&gt;So, in cases where the instruction condition is not AL, and a reserved register may be modified by the instruction, the generated code will have to be more like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ADDNE  pc, pc, #offset&lt;br /&gt;LDR    r8, [r11, #32]&lt;br /&gt;ADDS   r8, #1&lt;br /&gt;STR    r8, [r11, #32]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I'll have to experiment to see if it's more efficient to implement all conditional instructions with a opposite-condition hop over unconditional instructions or copying the emulated instruction's condition to each of the generated instructions.  I suspect that the hop approach will be easier to implement and also faster at generating code, so that's what I'll try initially.&lt;br /&gt;&lt;br /&gt;Two details that have cropped up in the implementation so far are that:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The generated code needs to be written to a writable, executable area of memory, so not a global variable but an anonymous mmap'd area (or possibly a global variable declared specially, perhaps in an assembler file?)&lt;/li&gt;&lt;li&gt;The ARM instruction cache needs clearing after generating code.&amp;nbsp; Linux provides a call: __clear_cache( void *begin, void *end ) - begin is inclusive, end is exclusive.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-1596383938634640321?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/1596383938634640321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=1596383938634640321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/1596383938634640321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/1596383938634640321'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/10/arm-emulation-on-arm.html' title='ARM Emulation on ARM'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-8348124993086518250</id><published>2011-09-04T18:55:00.002+02:00</published><updated>2011-09-09T16:09:10.453+02:00</updated><title type='text'>What now?</title><content type='html'>I've been having a look at what's working and what's not (on x86 systems).&lt;br /&gt;&lt;br /&gt;The basic ROLF functionality is largely there, with some minor bugs (buttons appearing pressed when they aren't any more, etc.)  It's largely unchanged, although it's easier to produce different Wimps for different display types (currently xlib, vnc and the original frame buffer are supported, I expect others, like SDL, would be fairly simple to implement).  XLib needs to be able to support mouse movement outside the screen area (probably by including an offset to the X mouse position to ensure the mouse limit is always within the window area).  Framebuffer needs autorepeat of keypresses to be implemented; the Terminal application is a bit of a pain to use without that.  The only adjustment to the Wimp protocol still to be made is to allow an application to request the current state of the modifier keys, specifically for shift-activating application directories in the Filer.&lt;br /&gt;&lt;br /&gt;From the point of view of RISC OS programs, support is patchy.  For example, the ArtWorks renderer seems to work quite well, both using the AWRender module from the ROLF-native Viewer application as well as !AWViewer, a complete RISC OS application (given a RO4 ROM image to provide various modules).&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-pukyCwpYfu8/TmNvjeVjvlI/AAAAAAAAABw/-cfx0jnbH98/s1600/ArtWorksExamples.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="240" width="320" src="http://2.bp.blogspot.com/-pukyCwpYfu8/TmNvjeVjvlI/AAAAAAAAABw/-cfx0jnbH98/s320/ArtWorksExamples.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;On the other hand, of the ROM applications from RO4, none of them show their proper application icons &lt;b&gt;[fixed]&lt;/b&gt; and only Edit gets to the point where it does anything useful.  Draw drops out after adding an icon to the iconbar.  Help requires the toolbox, which I've not included in the list of modules loaded by default.  None of the others bother the scorer at all.&lt;br /&gt;&lt;br /&gt;NetSurf needs tidying up and possibly merging with the NetSurf sources.  It would be nice if ArtWorks files could be displayed, using AWRender, and even videos using mplayer.  At the moment, none of the menu items work, you can't type in a URL, etc.&lt;br /&gt;&lt;br /&gt;The MPlayer application hasn't changed in a long time, some videos appear in diagonal stripes, like the horizontal hold is broken; perhaps they have an unusual width or height?  The one I just looked at has a width of 930, which isn't divisible by eight... [&lt;b&gt;fixed&lt;/b&gt; - the stride passed in to the draw_slice routine was greater than needed for the width, my mistake]&lt;br /&gt;&lt;br /&gt;I have no idea if GTK still compiles, let alone does anything useful.&lt;br /&gt;&lt;br /&gt;Brandy 1.0.19 has a patch that may still work, but I tend to use the RO BASIC interpreter, because it's got an assembler built in (needed for AWViewer to run).  I seem to recall that 1.0.20 needed quite a different patch approach, but I can't remember the details.&lt;br /&gt;&lt;br /&gt;I think I'll have a go at the Filer, first, it's been a long time since I looked at it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-8348124993086518250?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/8348124993086518250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=8348124993086518250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/8348124993086518250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/8348124993086518250'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/09/what-now.html' title='What now?'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-pukyCwpYfu8/TmNvjeVjvlI/AAAAAAAAABw/-cfx0jnbH98/s72-c/ArtWorksExamples.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2299695917096276720</id><published>2011-07-09T16:56:00.000+02:00</published><updated>2011-07-09T16:56:18.024+02:00</updated><title type='text'>A minor hitch running RISC OS code on ARMLinux</title><content type='html'>Update to an &lt;a href="http://ro-lookandfeel.blogspot.com/2011/05/building-on-angstrom-on-beagleboard.html"&gt;earlier post&lt;/a&gt; about running RISC OS applications on ARMLinux.&lt;br /&gt;&lt;br /&gt;Here's the thing: RISC OS modules, libraries and, occasionally, even applications switch merrily between USR and SVC mode at will.  There's even a system call, OS_EnterOS, which exits with your application running in SVC mode, no questions asked.&lt;br /&gt;&lt;br /&gt;The problem is that at least one instruction to return to user mode (MSR CPSR_c, r1) is still a legal instruction &lt;i&gt;in&lt;/i&gt; user mode (i.e. its execution isn't flagged as an exception), so ROLF can't detect that it should switch the "banked" registers it emulates.&lt;br /&gt;&lt;br /&gt;One solution might be to jump to the code while in SVC mode but, even if that works, there would be a hole in the Linux security model big enough to fly a fleet of A380s through.&lt;br /&gt;&lt;br /&gt;Bother.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2299695917096276720?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2299695917096276720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2299695917096276720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2299695917096276720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2299695917096276720'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/07/minor-hitch-running-risc-os-code-on.html' title='A minor hitch running RISC OS code on ARMLinux'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-1536975749499944470</id><published>2011-06-15T09:47:00.003+02:00</published><updated>2011-06-15T09:49:53.000+02:00</updated><title type='text'>Why does the language version being used affect standard semantics?</title><content type='html'>&lt;pre&gt;knoppix@Microknoppix:/tmp$ cat x.c&lt;br /&gt;#include &amp;lt;signal.h&amp;gt;&lt;br /&gt;&lt;br /&gt;siginfo_t info;&lt;br /&gt;&lt;br /&gt;knoppix@Microknoppix:/tmp$ gcc x.c -c&lt;br /&gt;knoppix@Microknoppix:/tmp$ gcc x.c -c &lt;span style="background-color: yellow;"&gt;-std=c99&lt;/span&gt;&lt;br /&gt;x.c:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'info'&lt;br /&gt;knoppix@Microknoppix:/tmp$&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;Hmpf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-1536975749499944470?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/1536975749499944470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=1536975749499944470' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/1536975749499944470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/1536975749499944470'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/06/why-does-language-version-being-used.html' title='Why does the language version being used affect standard semantics?'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-4658623955764096539</id><published>2011-06-11T17:14:00.002+02:00</published><updated>2011-06-28T08:19:56.447+02:00</updated><title type='text'>Root filesystem for Beagleboard on MMC card</title><content type='html'>Update: There is of course the rootwait kernel parameter, which is better.  (I'll leave the rest in case someone else searches for the same symtoms.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Just in case someone else has the same problem, I've had a frustrating few days trying to get my own kernel to start up with the root filesystem on /dev/mmcblk0p2.&lt;br /&gt;&lt;br /&gt;I based my kernel on the config found &lt;a href="http://rcn-ee.net/deb/squeeze/v2.6.39.1-x1/defconfig"&gt;here&lt;/a&gt;, and based my boot.scr file on the one supplied with the Debian Net Install generates with "mk_mmc.sh --uboot beagle_bx".&lt;br /&gt;&lt;br /&gt;No matter which kernel I tried, or boot.scr options I could find, I kept getting a kernel panic whenever I tried to use root=/dev/mmcblk0p2 (rather than an initfd):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.075317] regulator_init_complete: VDAC: incomplete constraints, leaving on&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.083404] md: Waiting for all devices to be available before autodetect&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.090637] md: If you don't use raid, use raid=noautodetect&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.097534] md: Autodetecting RAID arrays.&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.101928] md: Scanned 0 and added 0 devices.&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.106628] md: autorun ...&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.109558] md: ... autorun DONE.&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.113159] Root-NFS: no NFS server address&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.117614] VFS: Unable to mount root fs via NFS, trying floppy.&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.124816] VFS: Cannot open root device "mmcblk0p2" or unknown-block(2,0)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.132141] Please append a correct "root=" boot option; here are the available partitions:&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.140991] 1f00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 512 mtdblock0&amp;nbsp; (driver?)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.146362] 1f01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1920 mtdblock1&amp;nbsp; (driver?)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.151672] 1f02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 128 mtdblock2&amp;nbsp; (driver?)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.157012] 1f03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4096 mtdblock3&amp;nbsp; (driver?)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.162384] 1f04&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 255488 mtdblock4&amp;nbsp; (driver?)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.167724] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.176483] [&lt;c0069384&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c0615f38&gt;] (panic+0x5c/0x190)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.185150] [&lt;c0615f38&gt;] (panic+0x5c/0x190) from [&lt;c0008f88&gt;] (mount_block_root+0x160/0x214)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.194061] [&lt;c0008f88&gt;] (mount_block_root+0x160/0x214) from [&lt;c00091d4&gt;] (mount_root+0xa8/0xc4)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.203338] [&lt;c00091d4&gt;] (mount_root+0xa8/0xc4) from [&lt;c000934c&gt;] (prepare_namespace+0x15c/0x1c0)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.212707] [&lt;c000934c&gt;] (prepare_namespace+0x15c/0x1c0) from [&lt;c0008c30&gt;] (kernel_init+0x150/0x194)&lt;br /&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.222381] [&lt;c0008c30&gt;] (kernel_init+0x150/0x194) from [&lt;c00635f4&gt;] (kernel_thread_exit+0x0/0x8)&lt;/c00635f4&gt;&lt;/c0008c30&gt;&lt;/c0008c30&gt;&lt;/c000934c&gt;&lt;/c000934c&gt;&lt;/c00091d4&gt;&lt;/c00091d4&gt;&lt;/c0008f88&gt;&lt;/c0008f88&gt;&lt;/c0615f38&gt;&lt;/c0615f38&gt;&lt;/c0069384&gt;&lt;/blockquote&gt;&lt;br /&gt;The solution turns out to be dead simple (but I couldn't find a reference to it on the web): the rootdelay kernel parameter gives the kernel time to detect the MMC card before trying to mount it.&lt;br /&gt;&lt;br /&gt;Now, if I can just work out how to stop Debian's "Detecting Network Hardware" stopping the installation process in its tracks, I'll be a happy man...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-4658623955764096539?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/4658623955764096539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=4658623955764096539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4658623955764096539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4658623955764096539'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/06/root-filesystem-for-beagleboard-on-mmc.html' title='Root filesystem for Beagleboard on MMC card'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2266953757812498328</id><published>2011-06-03T19:55:00.000+02:00</published><updated>2011-06-03T19:55:38.161+02:00</updated><title type='text'>Why did Linux use a RISC OS SWI number, when they had 24 million to choose from?</title><content type='html'>The EABI syscall interface for Linux on ARM processors uses the SWI (SoftWare Interrupt instruction) number zero as its way into supervisor mode and the kernel.&amp;nbsp; Unfortunately, that instruction has been in use for more than twenty years by the operating system used by the originators of the ARM, Acorn's RISC OS.&lt;br /&gt;&lt;br /&gt;Now, Acorn weren't against looking ahead (I like to think of their software interfaces as forward-compatible, with support for likely developments looking forward many years, or even decades).&amp;nbsp; One example of this was when they defined the new ARM SWI instruction, they included these bits:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Bits 20 - 23&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; These are used to identify the particular operating system that the SWI expects to be in the machine. All SWIs used under RISC OS have these bits set to zero. Under RISC iX, bit 23 is set to 1 and all other bits are set to zero.&lt;/blockquote&gt;Now, Linux used to stick to this definition, using the number 9 for the OABI, but when they moved to EABI, the operating system bits were quietly dropped and&amp;nbsp; SWI 0 (RISC OS's OS_WriteC - "Writes a character to all of the active output streams") was used.&lt;br /&gt;&lt;br /&gt;Now, this has become a bit of a headache for me, because I'm trying to get Linux to run RISC OS programs using the ROLF compatibility library, which provides native Linux implementations for many RISC OS system calls.&amp;nbsp; What I want is for the kernel to signal the application when a SWI is encountered in RISC OS code so that the ROLF routines can be executed in user space and the application (or module) can continue on its merry way.&lt;br /&gt;&lt;br /&gt;There are a few ways to approach this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Check the personality of the process for each SWI executed&lt;/li&gt;&lt;li&gt;Redefine the EABI to insist on SWI 0x009fxxxx as the kernel entry SWI (and treat all other SWIs as an illegal instruction or use a special signal code)&lt;/li&gt;&lt;li&gt;Make OABI the standard interface &lt;/li&gt;&lt;li&gt;Use a similar mechanism to the x86 emulator to generate Linux code from the RISC OS code, which won't execute any RISC OS SWIs&lt;/li&gt;&lt;li&gt;Make the personality implementation more object-oriented and allow each process to determine how it should handle SWIs, Unknown instructions, data aborts, etc. &lt;/li&gt;&lt;/ol&gt;Option 1 will work, but will slow down all system calls even more than just moving back to OABI.&lt;br /&gt;&lt;br /&gt;Option 2 will make some existing programs incompatible with the kernel, although not if they just use libc to make system calls, or are recompiled against a new unistd.h.&lt;br /&gt;&lt;br /&gt;Option 3 would be a step backward for Linux (and support will probably be phased out over time).&amp;nbsp; Also, it suffers from the same incompatibilities as option 2.&lt;br /&gt;&lt;br /&gt;Option 4 will be fully compatible and would allow running of old 26-bit applications but would be much more work and probably quite a lot slower.&lt;br /&gt;&lt;br /&gt;Option 5 would be cool, but probably too high impact.&lt;br /&gt;&lt;br /&gt;Jan Rinze likes 1, I prefer 2, but I'll probably go with whichever produces a working solution first!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2266953757812498328?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2266953757812498328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2266953757812498328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2266953757812498328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2266953757812498328'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/06/why-did-linux-use-risc-os-swi-number.html' title='Why did Linux use a RISC OS SWI number, when they had 24 million to choose from?'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2150758997234926825</id><published>2011-05-22T00:37:00.002+02:00</published><updated>2011-05-24T16:37:13.068+02:00</updated><title type='text'>Building on Angstrom on a BeagleBoard</title><content type='html'>Update: Anonymous says all I needed to do was:&amp;nbsp; &lt;b&gt;opkg install task-native-sdk&lt;/b&gt;, thanks!&lt;br /&gt;&lt;br /&gt;These are some quick notes that I intend to update when I have (a) time, and/or (b) a working build.&lt;br /&gt;&lt;br /&gt;Tha Angstrom distribution doesn't include a native toolchain (it's meant to be light-weight, so that's OK). &amp;nbsp;It does, however, mean you need to use the opkg package manager &lt;i&gt;a lot&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;First try:&lt;br /&gt;"opkg install gcc"... This works.&lt;br /&gt;"gcc x.c"... command not found - what?&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 0px;"&gt;"opkg install gcc-symlinks"... Ah! &amp;nbsp;gcc now exists!&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;Here's part of today's bash history:&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp; 87 &amp;nbsp;opkg install gcc&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp; 88 &amp;nbsp;opkg install gcc&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp; 93 &amp;nbsp;opkg install binutils binutils-symlinks cpp cpp-symlinks&amp;nbsp;&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp; 95 &amp;nbsp;opkg install libc-6&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp; 96 &amp;nbsp;opkg install libc6-dev&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;107 &amp;nbsp;opkg install libmagic&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;109 &amp;nbsp;opkg install libmagic-dev&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;110 &amp;nbsp;opkg install file&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;111 &amp;nbsp;opkg install file-dev&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;115 &amp;nbsp;opkg install ccache&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;117 &amp;nbsp;opkg install install&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;118 &amp;nbsp;opkg install libtool-symlink&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;119 &amp;nbsp;opkg install libtool-symlinks&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;121 &amp;nbsp;opkg install coreutils&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;128 &amp;nbsp;opkg install freetype2-dev&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;129 &amp;nbsp;opkg install freetype-dbg&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;131 &amp;nbsp;opkg install freetype-dbg&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;147 &amp;nbsp;opkg install libjpeg-dev&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;148 &amp;nbsp;opkg install libpng-dev&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;152 &amp;nbsp;opkg install pkg-config&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;154 &amp;nbsp;opkg install pkg-config&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;174 &amp;nbsp;opkg install eval&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;195 &amp;nbsp;opkg install bash&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;215 &amp;nbsp;opkg install stl&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;218 &amp;nbsp;opkg install c++&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;221 &amp;nbsp;opkg install g++ g++-symlinks&lt;/div&gt;&lt;div style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;223 &amp;nbsp;opkg install libstdc++-dev&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Some worked, some didn't. &amp;nbsp;But I think the combination of all of them has given me enough programs and libraries to build ROLF without RISC OS compatibility.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also had to set up these symbolic links for libraries:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ln -s libfreetype.so.6 /usr/lib/libfreetype.so&lt;/div&gt;&lt;div&gt;ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As the applications were supposed to be linked, there was a problem with libtool; the generated static libraries contained only the text "! &amp;lt; a r c h &amp;gt;&lt;arch&gt;" (without the spaces), which turned out to be because the /bin/sh link was to /bin/busybox, not /bin/bash (which was already installed). &amp;nbsp;For search engines: there were several lines like: "eval: 1: libtool_args+=: not found".&lt;/arch&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ln -sf bash /bin/sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've noticed you can get a tarball of rolf code using the following URL (which means you don't have to install SVN to build it):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://ro-lf.svn.sourceforge.net/viewvc/ro-lf/ROLF/rolf/?view=tar&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code needs modifying to get it to build, including removing the agp specific code and also the compatibility library, for the time being. &amp;nbsp;The signal handlers in the compatibiity code need modifying to cope with ARM registers, rather than x86. &amp;nbsp;Also, run_arm_code, and similar routines should be replacable with a simple jump to the code - a kernel patch by Jan Rinze will provide a signal on non-Linux system calls, allowing the compatibilty library to handle RISC OS system calls in-process.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm really hoping we can get this to work!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2150758997234926825?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2150758997234926825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2150758997234926825' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2150758997234926825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2150758997234926825'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/05/building-on-angstrom-on-beagleboard.html' title='Building on Angstrom on a BeagleBoard'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-4285376194134374691</id><published>2011-01-27T19:08:00.000+01:00</published><updated>2011-01-27T19:08:30.105+01:00</updated><title type='text'>Building on and for Knoppix II</title><content type='html'>Updated with some corrections from &lt;a href="http://ro-lookandfeel.blogspot.com/2010_05_01_archive.html"&gt;last time&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_N5AfJVFG_JA/TAFUDFsF_DI/AAAAAAAAAAw/KEvxpOkGA7k/s1600/Screenshot.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5476751033902693426" src="http://1.bp.blogspot.com/_N5AfJVFG_JA/TAFUDFsF_DI/AAAAAAAAAAw/KEvxpOkGA7k/s320/Screenshot.png" style="cursor: pointer; display: block; height: 256px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;The Knoppix Live CD (http://knopper.net/knoppix/) is an excellent way to try out Linux on any PC with a CD-ROM drive.  It won't store anything on your PC (unless you ask it to) and doesn't mess up any existing installations of Linux or Windows.&lt;br /&gt;&lt;br /&gt;In this article, I'm going to describe how to build ROLF to run on Linux assuming a PC booted from an unmodified Knoppix 6.2 CD.&lt;br /&gt;&lt;br /&gt;When done, you should have a working ROLF desktop being displayed in a window, able to run a few native ROLF programs and even some RISC OS programs, in a limited way.  Simply by copying the directory into which you've installed ROLF to some permanent storage (a hard disc or a memory stick, for example), you can use the build again without having to go through the steps I describe.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Set up a build environment&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Knoppix, unfortunately, doesn't include all the tools needed to build ROLF, so we have to get them from Debian first.  (If your Linux system already includes these tools, you can obviously skip this step.)&lt;br /&gt;&lt;br /&gt;First, get the full list of packages that are available:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sudo apt-get update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then update the compiler to include the C++ compiler, needed to build the Server part of ROLF (the libraries are all plain C, but to build them, you need libtool).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sudo apt-get install build-essentials&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sudo apt-get install subversion&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sudo apt-get install libtool&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sudo apt-get install pkg-config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After that has been done, the compiler will still refuse to compile C++ programs because it can't find cc1plus, for some reason.  The simplest way to fix that is to add the path to the (just installed) cc1plus file installed to the PATH environment variable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;export PATH=$PATH:$(dirname $(find /usr/ -name cc1plus 2&amp;gt;/dev/null | head -n 1))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, to get the source code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;svn co https://ro-lf.svn.sourceforge.net/svnroot/ro-lf/ROLF/rolf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(If you don't expect to make any changes to the code, you can instead use:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;svn export https://ro-lf.svn.sourceforge.net/svnroot/ro-lf&lt;/span&gt;/ROLF/rolf)&lt;br /&gt;&lt;br /&gt;Change directory into the downloaded code and run configure (not as complicated as a normal configure script):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cd rolf&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;./configure --appsdir=$(pwd)/Apps --prefix=$(pwd) --tarballs=$(pwd)/tarballs/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Knoppix (or Debian) have all their shared libraries taged by their version number; to make the files linkable, we need to do this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;mkdir lib&lt;br /&gt;ln -s /usr/lib/libz.so.1 lib/libz.so&lt;br /&gt;ln -s /usr/lib/libjpeg.so.62 lib/libjpeg.so&lt;br /&gt;ln -s /usr/lib/libpng12.so.0 lib/libpng.so&lt;br /&gt;ln -s /usr/lib/libfreetype.so.6 lib/libfreetype.so&lt;br /&gt;ln -s /usr/lib/libstdc++.so.6 lib/libstdc++.so&lt;br /&gt;ln -s /usr/lib/libmagic.so.1 lib/libmagic.so&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Similarly, the build requires a set of include files [This bit needs an update!]&lt;br /&gt;&lt;br /&gt;Specifically, the files needed are:&lt;br /&gt;&lt;br /&gt;From zlib:&lt;br /&gt;zlib.h, zconf.h&lt;br /&gt;&lt;br /&gt;From libpng:&lt;br /&gt;png.h, pngconf.h&lt;br /&gt;&lt;br /&gt;From file:&lt;br /&gt;magic.h&lt;br /&gt;&lt;br /&gt;From libjpeg&lt;br /&gt;jpeglib.h, jmorecfg.h, jconfig.h&lt;br /&gt;&lt;br /&gt;From freetype 2:&lt;br /&gt;./ft2build.h&lt;br /&gt;./freetype/internal/internal.h&lt;br /&gt;./freetype/fttypes.h&lt;br /&gt;./freetype/ftsystem.h&lt;br /&gt;./freetype/ftmoderr.h&lt;br /&gt;./freetype/ftimage.h&lt;br /&gt;./freetype/fterrors.h&lt;br /&gt;./freetype/fterrdef.h&lt;br /&gt;./freetype/freetype.h&lt;br /&gt;./freetype/config&lt;br /&gt;./freetype/config/ftheader.h&lt;br /&gt;./freetype/config/ftconfig.h&lt;br /&gt;./freetype/config/ftstdlib.h&lt;br /&gt;./freetype/config/ftoption.h&lt;br /&gt;&lt;br /&gt;Update the config.mak file created by configure to point at the libraries and includes:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;sed -i 's/CFLAGS.*$/&amp;amp; -L$(CFGDIR)\/lib/' config.mak&lt;br /&gt;sed -i 's/CFLAGS.*$/&amp;amp; -I$(CFGDIR)\/my_includes/' config.mak&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now you should be able to build ROLF:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assuming all goes well with the build, the next step is to collect the resources needed in one place.&lt;br /&gt;&lt;br /&gt;You will need:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Fonts (at least FreeSerif.ttf; the default font)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Tool and Icon sprites (I use Chris Wraight's Steel theme, from here: http://www.lym.iconbar.com/downloads/steel.zip)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A mimemap.txt file (if you're going to use RISC OS software)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;and a !Boot file, to load them all (like the one below)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Create a resources directory with subdirectories:&lt;br /&gt;&lt;span style="font-style: italic;"&gt; mkdir -p Resources/fonts/{FreeSerif,FreeSans,FreeMono}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ln -s /usr/share/file/ Resources/&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cd Resources/fonts&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;for i in *; do for f in $( find /KNOPPIX/ -name $i*.ttf ); do ln -s $f $i/ ; done ; done 2&amp;gt;/dev/null&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;# This one is needed for the Terminal application:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cp `find /KNOPPIX/ -name default8x16.psf* 2&amp;gt; /dev/null` .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; cd .. # Resources&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;unzip &lt;pathto&gt;steel.zip&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;cd ..&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;cat &amp;gt; \!Boot &amp;lt;&amp;lt;"EOF"&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt; IconSprites $ROLF_RESOURCES/Steel/Tools&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;IconSprites $ROLF_RESOURCES/Steel/Icons&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;LoadPointer $ROLF_RESOURCES/Steel/Icons ptr_default 0 21&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt; LoadPointer $ROLF_RESOURCES/Steel/Icons ptr_double 0 21&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;  # Match up icons with the appropriate mime types&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;if [ -f $ROLF_RESOURCES/mimemap.txt ] ; then ( grep -v ^# $ROLF_RESOURCES/mimemap.txt | tr -s '\t' | cut -f 1,3 | sort -k 2 | sed 's/\(.*\)\t\(.*\)$/IconSprite file_\2 "file_\1"/' | sh ) ; fi&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;# Load applications&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;IconBar&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;Filer Icon $(dirname $0)/Apps 50 romapps Apps&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt; Filer Icon /tmp 40 ramfs ramfs&amp;nbsp;&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt;Filer Icon $HOME 45 homedisc Home&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt; EOF&lt;/pathto&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;pathto&gt; &lt;/pathto&gt;&lt;/span&gt;  Now, we just have to run it!&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; export LD_LIBRARY_PATH=`pwd`/lib&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; export PATH=$PATH:`pwd`/bin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  #Uncomment the next line if you need a log of what's happened (useful for debugging)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;# ROLF_WIMP_LOG=/tmp/rolf_wimp_log \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ROLF_RESOURCES=`pwd`/Resources \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ROLF_VNC=800x600:2008 \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Wimp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;  That should have the effect of printing:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VNC Server waiting for connections on port 2008.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; New file descriptor 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; New Opaque bitmap VNCFrameBuffer, 800x600&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;br /&gt;In another terminal window, type:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; vncviewer localhost:2008 &lt;/span&gt; &lt;br /&gt;&lt;br /&gt;... and a colourful window with an icon bar and a couple of drive icons should appear!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-4285376194134374691?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/4285376194134374691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=4285376194134374691' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4285376194134374691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4285376194134374691'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/01/building-on-and-for-knoppix-ii.html' title='Building on and for Knoppix II'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_N5AfJVFG_JA/TAFUDFsF_DI/AAAAAAAAAAw/KEvxpOkGA7k/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-7155676589287766512</id><published>2011-01-26T18:27:00.002+01:00</published><updated>2011-01-26T18:41:14.515+01:00</updated><title type='text'>Progress, with a Video!</title><content type='html'>A couple of bugs have been chased down, so, just for fun, I thought I'd try and make a screen capture video of the state of the emulator.&lt;br /&gt;&lt;br /&gt;At first I tried to use recordmydesktop, but that doesn't seem to play nice with the compiz window manager.&amp;nbsp; So, I found a nice, uncomplicated, picture format (TGA) and modified the user interface to write a screenshot to a file ten times a second (albeit upside down).&amp;nbsp; The user interface, incidentally, is a separate process from the emulator and accesses the files that contain the memory of the emulated RPC directly, much like a real VIDC chip.&lt;br /&gt;&lt;br /&gt;Using mencoder, I produced the following video; it's probably best to watch it in fast-forward since it takes 40 seconds to get to the desktop and I'm not the fastest typer, either!&lt;br /&gt;&lt;br /&gt;The upload to Blogger seems to have scaled it down 50% and reduced the quality considerably, though.  The screen looks a lot better than that in use.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object width="640" height="506" class="BLOG_video_class" id="BLOG_video-5e10f79751c41d32" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v2.nonxt3.googlevideo.com/videoplayback?id%3D5e10f79751c41d32%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330306741%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D22C5AA312F4C44C33407C20EFF27683A278EB7F2.2D982D9C53C72FCF62BD80A304256718DE943898%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D5e10f79751c41d32%26offsetms%3D5000%26itag%3Dw160%26sigh%3DIfNS5mbw2zljeVwbzCL3eFkY1-E&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="640" height="506" bgcolor="#FFFFFF"flashvars="flvurl=http://v2.nonxt3.googlevideo.com/videoplayback?id%3D5e10f79751c41d32%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330306741%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D22C5AA312F4C44C33407C20EFF27683A278EB7F2.2D982D9C53C72FCF62BD80A304256718DE943898%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D5e10f79751c41d32%26offsetms%3D5000%26itag%3Dw160%26sigh%3DIfNS5mbw2zljeVwbzCL3eFkY1-E&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The command line I used to generate the movie was this:&lt;br /&gt;mencoder mf://*.tga -mf w=640:h=480:fps=10:type=tga -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -o /tmp/screen_cap.mpg -flip&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-7155676589287766512?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/7155676589287766512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=7155676589287766512' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/7155676589287766512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/7155676589287766512'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/01/progress-with-video.html' title='Progress, with a Video!'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-3761278423559835445</id><published>2011-01-24T19:45:00.001+01:00</published><updated>2011-01-24T20:02:50.916+01:00</updated><title type='text'>I don't much like C++</title><content type='html'>I came across this statement today which &lt;a href="http://iconbar.com/forums/viewthread.php?threadid=11167&amp;amp;page=2#comments"&gt;neatly sums up my experience:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.smallshire.org.uk/sufficientlysmall/2009/07/31/in-c-throw-is-an-expression/"&gt;"After 15 years programming in C++, I was surprised to discover today that..."&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-3761278423559835445?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/3761278423559835445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=3761278423559835445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3761278423559835445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3761278423559835445'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/01/i-dont-much-like-c.html' title='I don&apos;t much like C++'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2650301282283464524</id><published>2011-01-18T12:10:00.004+01:00</published><updated>2011-01-18T12:28:15.067+01:00</updated><title type='text'>Programs are running, for a while at least.</title><content type='html'>The stand-alone RPC emulator has taken a couple of steps forward in the last few days.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_N5AfJVFG_JA/TTVcDUYM-pI/AAAAAAAAABk/ffpKPn4kxRM/s1600/UnnamedRPCEmulator.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/_N5AfJVFG_JA/TTVcDUYM-pI/AAAAAAAAABk/ffpKPn4kxRM/s320/UnnamedRPCEmulator.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Still some problems!&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The TEQP implementation was wrongly checking the future processor mode rather than the current one, to see which flags should be affected.&lt;br /&gt;&lt;br /&gt;Once that was fixed, the next problem was dealing with pre-fetch aborts, where the ARM code scanner caused a segmentation violation reading the memory where code would be mapped in by the OS's lazy address decoding.&lt;br /&gt;&lt;br /&gt;There are still problems with caching (see picture); I've missed something that should be clearing the instruction cache between task swaps...&lt;br /&gt;&lt;br /&gt;In addition to stability, I need to:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Write a module to handle the mouse input (I've done a hack to intercept OS_Mouse calls, but the RO pointer doesn't move with it, just changes shape while staying motionless).&amp;nbsp; The X interface passes on absolute coordinates, like a tablet, rather than relative movement, like a mouse.&lt;/li&gt;&lt;li&gt;Sort out keyboard input (it's a bit hit and miss if a keypress appears when you're typing quickly); I think RISC OS is debouncing the input, so modifying the timing of keyboard events might sort that out.&lt;/li&gt;&lt;li&gt;Intercept more SWIs; networking ones might be a good start.&lt;/li&gt;&lt;li&gt;More graphics modes (limited currently to 640x480x256), maybe change the RISC OS mode when resizing the X window. &lt;/li&gt;&lt;/ul&gt;&lt;b&gt;What ROLF gets from all this&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When it works, ROLF should gain:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a bit of publicity&lt;/li&gt;&lt;li&gt;a test platform for running RISC OS programs under ROLF (I'll be able to examine the behaviour of SWIs under RISC OS when implementing them in the compatibility layer&lt;/li&gt;&lt;li&gt;an X windows front end for a variation on the ROLF Wimp server which will make use of the work done on graphic card acceleration to display the frame buffer (while still remaining compatible with simple frame buffer implementations)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2650301282283464524?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2650301282283464524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2650301282283464524' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2650301282283464524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2650301282283464524'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2011/01/programs-are-running-for-while-at-least.html' title='Programs are running, for a while at least.'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_N5AfJVFG_JA/TTVcDUYM-pI/AAAAAAAAABk/ffpKPn4kxRM/s72-c/UnnamedRPCEmulator.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2549202726604451574</id><published>2010-12-11T12:58:00.004+01:00</published><updated>2010-12-12T18:50:42.329+01:00</updated><title type='text'>Stalled for months!</title><content type='html'>&lt;div style="text-align: left;"&gt;[Updated below; some progress!]&lt;br /&gt;[Updated again, lots more progress!] &lt;br /&gt;&lt;br /&gt;I've been struggling with the RPC emulator over the last few weeks.&lt;br /&gt;&lt;br /&gt;The main problem is accessing a hard disc image.&amp;nbsp; Initially, I intercepted the calls from FileCore to ADFS in order to read (what I thought were) the appropriate areas of the disc image file, but what I returned wasn't accepted by FileCore.&amp;nbsp; Then I tried another track; I integrated the files ide.c, fdc.c and superio.c from RPCEmu to provide the emulation of the fdc37c665 component.&amp;nbsp; This is the result when using the hd4.hdf and cmos.ram from http://b-em.bbcmicro.com/arculator/hdboot.zip (the emulator now has a VNC based front-end that provides keyboard entry):&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_N5AfJVFG_JA/TQNSyeCTGxI/AAAAAAAAABY/qu1YrYra71U/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://1.bp.blogspot.com/_N5AfJVFG_JA/TQNSyeCTGxI/AAAAAAAAABY/qu1YrYra71U/s320/Screenshot.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;The output I get from the ide.c file (with the addition of the data read from the file) is as follows:&lt;br /&gt;&lt;pre&gt;IDE: First check - spt 63 hpc 16&lt;br /&gt;IDE: Write IDE 000003F6 00 039C0A2C 02107CF4&lt;br /&gt;IDE: Read IDE 000003F6 039C2028 00000000&lt;br /&gt;IDE: Write IDE 000001F6 A0 039C1FEC 02107CF4&lt;br /&gt;IDE: Read IDE 000003F6 039C1FF8 00000000&lt;br /&gt;Callback IDE = 200&lt;br /&gt;IDE: Read IDE 000003F6 039C1B88 00000200&lt;br /&gt;IDE: Write IDE 000001F6 A0 039C1BA0 02107CF4&lt;br /&gt;IDE: Read IDE 000003F6 039C1BB4 00000200&lt;br /&gt;IDE: Write IDE 000001F1 00 039C1BD0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F2 01 039C1BD8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F3 07 039C1BE0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F4 00 039C1BE8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F5 00 039C1BF0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F6 A0 039C1BF8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F7 20 039C1BFC 02107CF4&lt;br /&gt;IDE: New IDE command - 20 0 0 039C1BFC&lt;br /&gt;IDE: Read 1 sectors from sector 7 cylinder 0 head 0&lt;br /&gt;IDE: Read 0 0 7 00000E00&lt;br /&gt;IDE: Read sector callback 7 0 0 offset 00000E00 0 left 1&lt;br /&gt;IDE: Read data:  00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 01 00 80 13 03    ................&lt;br /&gt;IDE: Read data:  09 3f 10 00 0d 09 00 00 01 1a 68 00 35 02 00 00    .?........h.5...&lt;br /&gt;IDE: Read data:  00 60 1b 03 00 00 00 00 00 00 00 00 00 00 00 00    .`..............&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................&lt;br /&gt;IDE: Read data:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f    ..............._&lt;br /&gt;IDE: Read IDE 000001F7 039C17B8 00000002&lt;br /&gt;IDE: Over! packlen 0 512&lt;br /&gt;IDE: Read IDE 000003F6 039C1B88 00000002&lt;br /&gt;IDE: Write IDE 000001F6 AF 039C1BA0 02107CF4&lt;br /&gt;IDE: Read IDE 000003F6 039C1BB4 00000002&lt;br /&gt;IDE: Write IDE 000001F1 00 039C1BD0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F2 3F 039C1BD8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F3 07 039C1BE0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F4 00 039C1BE8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F5 00 039C1BF0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F6 AF 039C1BF8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F7 91 039C1BFC 02107CF4&lt;br /&gt;IDE: New IDE command - 91 0 0 039C1BFC&lt;br /&gt;IDE: Read IDE 000001F7 039C1F84 00000002&lt;br /&gt;c2107f08 00000041 00000006 01c07a90 000001f4 021086ac Callback IDE = 200&lt;br /&gt;IDE: -1338894612 sectors per track, -1338894596 heads per cylinder&lt;br /&gt;IDE: Read IDE 000003F6 039C1B88 00000002&lt;br /&gt;IDE: Write IDE 000001F6 AF 039C1BA0 02107CF4&lt;br /&gt;IDE: Read IDE 000003F6 039C1BB4 00000002&lt;br /&gt;IDE: Write IDE 000001F1 00 039C1BD0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F2 3F 039C1BD8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F3 07 039C1BE0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F4 00 039C1BE8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F5 00 039C1BF0 02107CF4&lt;br /&gt;IDE: Write IDE 000001F6 AF 039C1BF8 02107CF4&lt;br /&gt;IDE: Write IDE 000001F7 91 039C1BFC 02107CF4&lt;br /&gt;IDE: New IDE command - 91 0 0 039C1BFC&lt;br /&gt;IDE: Read IDE 000001F7 039C1F84 00000002&lt;br /&gt;Callback IDE = 200&lt;br /&gt;IDE: -1338894612 sectors per track, -1338894596 heads per cylinder&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Some differences in my use of the RPCEmu code are:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;callbackide is called on the next tick event, ignoring the value of (non-zero) idecallback.&lt;/li&gt;&lt;li&gt;No DMA implemented &lt;/li&gt;&lt;/ol&gt;Any bright ideas?&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;&lt;br /&gt;Thanks to Tom Walker pointing out (on &lt;a href="http://www.stardot.org.uk/forums/viewtopic.php?f=30&amp;amp;t=3521"&gt;stardot&lt;/a&gt;) that the error reported by RISC OS is a floppy disc error, not a hard disc one, I noticed that I wasn't making callbacks required by the fdc.c floppy disc emulation.&amp;nbsp; Now, I have a nice new error to worry about!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_N5AfJVFG_JA/TQSQUsiWYDI/AAAAAAAAABc/kOtREVas0bI/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_N5AfJVFG_JA/TQSQUsiWYDI/AAAAAAAAABc/kOtREVas0bI/s1600/Screenshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Update 2: Not so much to worry about, after all.&amp;nbsp; That one turns out to be because my emulation of post-increment LDR wasn't storing the calculated base+offset value into the base register.&amp;nbsp; That's the first bug I've found in the basic emulate-ARM-instructions part of the emulator for a long time, but at least it's just a two line fix.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2549202726604451574?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2549202726604451574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2549202726604451574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2549202726604451574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2549202726604451574'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/12/stalled-for-months.html' title='Stalled for months!'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_N5AfJVFG_JA/TQNSyeCTGxI/AAAAAAAAABY/qu1YrYra71U/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-413289619206456831</id><published>2010-10-15T22:01:00.000+02:00</published><updated>2010-10-15T22:02:51.162+02:00</updated><title type='text'>Emulator progress on RO 4.02</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_N5AfJVFG_JA/TLizS18cZEI/AAAAAAAAABQ/DXicO6RhkLY/s1600/Screenshot_15.10.2010.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_N5AfJVFG_JA/TLizS18cZEI/AAAAAAAAABQ/DXicO6RhkLY/s320/Screenshot_15.10.2010.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5528365678896899138" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-413289619206456831?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/413289619206456831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=413289619206456831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/413289619206456831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/413289619206456831'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/10/emulator-progress-on-ro-402.html' title='Emulator progress on RO 4.02'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_N5AfJVFG_JA/TLizS18cZEI/AAAAAAAAABQ/DXicO6RhkLY/s72-c/Screenshot_15.10.2010.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-9208040545992523200</id><published>2010-09-28T18:40:00.006+02:00</published><updated>2010-10-10T18:01:44.165+02:00</updated><title type='text'>Using the ROLF Emulator to run RISC OS</title><content type='html'>Updated below.&lt;br /&gt;&lt;br /&gt;I've been working on getting RISC OS 4.02 running using the ARM emulator from ROLF.&lt;br /&gt;&lt;br /&gt;This was initially prompted by a near death experience of my Risc PC, and also a desire to see how well it would do.&lt;br /&gt;&lt;br /&gt;Also, many years ago, I suggested an approach to getting RO available on (then-current and 26-bit mode supporting) ARM based computers.&lt;br /&gt;&lt;br /&gt;It was quite simple:&lt;br /&gt;1. Identify what the OS absolutely needed from the hardware to be able to run (I guessed memory, one or two timers and some form of static memory, as provided by the CMOS RAM in the RPC)&lt;br /&gt;&lt;br /&gt;2. Get the hardware manufacturers to provide some startup code to get that hardware running and enter the OS with information about where the RAM/ROM is and a set of pointers to routines to provide each of the required functions.&lt;br /&gt;&lt;br /&gt;3. At a certain point in the boot process, the hardware manufacturers could start modules to handle other aspects of their computer.&lt;br /&gt;&lt;br /&gt;It looks, so far, like that approach would have worked.  (And, of course, getting the hardware manufacturers to work on the low level aspects would have had the advantage of hugely increasing the number of engineers working on getting the OS to market, at no cost to ROL.)&lt;br /&gt;&lt;br /&gt;The speed of running the ArtWorks Renderer module on some complex images under the emulator show a speed of approximately 3-4 times that of a 200MHz StrongARM Risc PC.  (i.e. celtic_knot3 renders in about 14s, as opposed to nearly a minute on the RPC).  There's still some considerable scope for improvements in the code generated by the emulator.&lt;br /&gt;&lt;br /&gt;As far as I can tell from reading about RPCEmu (I've had difficulties installing it, and not yet suceeded), the speed compares quite well.&lt;br /&gt;&lt;br /&gt;The main difference, I think, is that ROLF uses the Linux process' memory to provide the emulated RISC OS task with no address translation required.  With a single RISC OS Task (process) that is very easy, since memory doesn't have to be switched in and out, as is the case with the whole OS.&lt;br /&gt;&lt;br /&gt;The approach I've taken is to use some special link parameters to keep the Linux process's memory in an area of the memory map which RISC OS doesn't use.  Then, a set of files for ROM, RAM and VRAM are mapped in and out of memory as required by the OS using mmap (this is the part that could turn out to be horrendously slow).&lt;br /&gt;&lt;br /&gt;Also, I've avoided emulating hardware outside the processor (so it's not really a RiscPC emulator) and chosen to patch some sections of RISC OS with native code.  This is an ugly approach, but it has the advantage of being quick and easy as well as identifying those essential hardware elements I was talking about.  Longer term it should be possible to integrate RPCEmu's hardware emulation routines (both products are GPL licenced).&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;It seems I've found a problem with Linux.  The emulator, when it's producing a lot of debug output, tends to hang in a futex system call.  This happens with the shared C library, the static equivalent that came with Knoppix and a specially compiled static glibc-2.5.1.  Kernel 2.6.32.6.&lt;br /&gt;&lt;br /&gt;The other problem is with RISC OS; the routine TranslateMonitorLeadType (which I will be replacing with native code, but that's not the point) makes an XOS_ServiceCall, which causes a jump to zero.  I'll look into that before I try to work out the Linux Kernel.&lt;br /&gt;&lt;br /&gt;Update 2: It seems the ROM files were corrupted somehow.&lt;br /&gt;&lt;br /&gt;Update 3: Yes, there really is a problem with Linux.  The following program will hang, sooner or later, on my system.  It's easiest to see if you pipe the output into "grep -n Tick".  It is probably related to &lt;a href="http://lwn.net/Articles/124747/"&gt;this&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#include &amp;lt;signal.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;time.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/time.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;&lt;br /&gt;static void alrm_action( int code, siginfo_t *info, void *p )&lt;br /&gt;{&lt;br /&gt;    fprintf( stderr, "Tick" );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    struct sigaction action = { .sa_sigaction = alrm_action, .sa_flags = SA_SIGINFO };&lt;br /&gt;    sigaction( SIGALRM, &amp;action, 0 );&lt;br /&gt;&lt;br /&gt;    int microseconds = 10000; // 1cs&lt;br /&gt;&lt;br /&gt;    struct itimerval timer_val = { &lt;br /&gt;        .it_interval = { .tv_sec = microseconds / 1000000, .tv_usec = microseconds % 1000000 },&lt;br /&gt;        .it_value = { .tv_sec = microseconds / 1000000, .tv_usec = microseconds % 1000000 },&lt;br /&gt;    };&lt;br /&gt;    struct itimerval old_val;&lt;br /&gt;&lt;br /&gt;    setitimer( ITIMER_REAL, &amp;timer_val, &amp;old_val );&lt;br /&gt;&lt;br /&gt;    int x = 0;&lt;br /&gt;    while (1) {&lt;br /&gt;        fprintf( stderr, "+" );&lt;br /&gt;        if (x-- == 0)&lt;br /&gt;        {&lt;br /&gt;            fprintf( stderr, "\n" );&lt;br /&gt;            x = 100;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Update 3:  It's not a problem with Linux, fortunately.  &lt;a href="http://www.opengroup.orghttp://www.blogger.com/img/blank.gif/onlinepubs/000095399/functions/xsh_chap02_04.html#tag_02_04_03"&gt;This&lt;/a&gt; document lists 118 functions "that shall be either reentrant or non-interruptible by signals and shall be async-signal-safe"; printf variations are &lt;span style="font-weight:bold;"&gt;not&lt;/span&gt; included.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-9208040545992523200?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/9208040545992523200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=9208040545992523200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/9208040545992523200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/9208040545992523200'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/09/using-rolf-emulator-to-run-risc-os.html' title='Using the ROLF Emulator to run RISC OS'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-3617401452078716197</id><published>2010-06-18T09:46:00.005+02:00</published><updated>2010-06-27T10:59:38.713+02:00</updated><title type='text'>Famous last words (Updated)</title><content type='html'>"I could probably build you a standalone program to execute non-WIMP programs; it wouldn't even need to run the ROLF server."&lt;br /&gt;&lt;br /&gt;Well, it worked to an extent, but as always when you think something won't take long, something always crops up.&lt;br /&gt;&lt;br /&gt;I've successfully got to the point where I can get squeeze ("squeeze vsn 5.00 [Jan 11 1995] - compress an executable ARM-code program", plus SharedCLibrary and Messages modules from RO4) to compress a NetSurf !RunImage file, resulting in a identical file to one generated by the same utility on RO4.  &lt;span style="font-weight:bold;"&gt;But&lt;/span&gt;, the RMA has to be located low in memory, for it to work!  It has to be under the 16MB boundary, which is considerably below where it is in a real RISC OS system.&lt;br /&gt;&lt;br /&gt;The possibilities I see at the moment are:&lt;br /&gt;  On real RISC OS, the shared C library mallocs from the WimpSlot rather than RMA.&lt;br /&gt;  I've got a problem with my implementation of the ARM emulator when it comes to shifts or overflows (the crash seems to appear when the most significant bytes of the malloc'd address is non-zero).&lt;br /&gt;&lt;br /&gt;Update: It seems (http://www.iconbar.com/forums/viewthread.php?threadid=11447&amp;page=1#114647) that the former is correct, and, on examining the emulator debug output, I notice that the library checks if it was called from SVC or USR mode and behaves appropriately.  Unfortunately, the program never drops back into USR mode after a OS_EnterOS SWI, which is probably the problem.&lt;br /&gt;&lt;br /&gt;Update 2: The culprit was that I hadn't emulated TEQP correctly for 26-bit mode.  Since TEQ is a data processing operation with no destination, I'd simply ignored the destination part of the opcode; unfortunately it has a special meaning in 26-bit mode when the destination is 15 (the PC), and changes the processor mode.  It's working much better now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-3617401452078716197?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/3617401452078716197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=3617401452078716197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3617401452078716197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3617401452078716197'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/06/famous-last-words.html' title='Famous last words (Updated)'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5514941052962550320</id><published>2010-06-08T20:58:00.006+02:00</published><updated>2010-06-09T11:50:29.979+02:00</updated><title type='text'>A non-graphical OSCLI</title><content type='html'>(Updated because the previous version wouldn't run without a running ROLF server.)&lt;br /&gt;(Updated again, Wed 9 June 2010, because of a bug in the interpreter, now built from revision 81.)&lt;br /&gt;&lt;br /&gt;I've just put a Linux x86 executable to run command line RISC OS programs &lt;a href="http://stoppers.drobe.co.uk/command_line_oscli.tar.bz2"&gt;here&lt;/a&gt; (&lt;ins&gt;48785 bytes, md5sum 72db2104a71d0f2c5527dae1b0597fe3&lt;/ins&gt; &lt;del&gt;48843 bytes, md5sum 5deb778bdbb5e7e1eef06fbc358f8bf8&lt;/del&gt;).&lt;br /&gt;&lt;br /&gt;command_line_oscli is released under the GPL version 2.&lt;br /&gt;&lt;br /&gt;To get it to run usefully, you will need a file called mimemap.txt containing at least the following three lines, in a directory whose name is stored in the environment variable&lt;br /&gt;ROLF_RESOURCES:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;application/x-riscos-absolute           Absolute        ff8     .ff8    .abs&lt;br /&gt;application/x-riscos-module             RelocatableModule       ffa     .ffa&lt;br /&gt;application/x-riscosobey                Obey            feb     .oby    .feb&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;RISC OS applications and modules will have to be "filetyped" appropriately by creating a hidden symbolic link to the mime type for the file named .filename,type&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;&lt;pre&gt;ln -s application/x-riscos-module .SharedCLibrary,type&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The source is available as revision &lt;del&gt;80&lt;/del&gt; &lt;ins&gt;81&lt;/ins&gt; of the ro-lf project on&lt;br /&gt;http://sourceforge.net/projects/ro-lf/develop.&lt;br /&gt;&lt;br /&gt;The build command was:&lt;br /&gt;&lt;pre&gt;gcc -DNO_DISASSEMBLE -DNO_GRAPHICS -DNO_FPE Libs/Compatibility/arm_emulator.c \&lt;br /&gt;Libs/Compatibility/compatibility_switch.c External/Compatibility/oscli.c \&lt;br /&gt;Libs/Environment/*.c -I Libs/Environment/includes/ -I Libs/Compatibility/includes/ \&lt;br /&gt;-o command_line_oscli -std=gnu99 -lmagic&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If Floating Point Emulation is needed, try not defining NO_FPE and including some more of the files from the Libs/Compatibility directory.&lt;br /&gt;&lt;br /&gt;All the testing I've done was to run unmodsqz from !SqzUnSqz/Abs on CLib from the ROOL website and look to see that the file size had changed.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ln -s application/x-riscos-module .CLib,type&lt;br /&gt;ln -s application/x-riscos-absolute .unmodsqz,type&lt;br /&gt;( echo rmload .home.knoppix.Apps.\!Compatibility.SharedCLibrary&lt;br /&gt;  echo run unmodsqz CLib ) | ./command_line_oscli&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There's quite a lot of debug output to stderr (try 2&gt; /dev/null) and the test ends with "Should do a handler function here", which means an unexpected SEGV trap was caught, but that's after the program has run.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5514941052962550320?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5514941052962550320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5514941052962550320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5514941052962550320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5514941052962550320'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/06/non-graphical-oscli.html' title='A non-graphical OSCLI'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5615742908762998705</id><published>2010-05-31T20:05:00.003+02:00</published><updated>2010-05-31T20:21:25.893+02:00</updated><title type='text'>ArtWorks Renderer</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_N5AfJVFG_JA/TAP6ioc8_YI/AAAAAAAAAA4/IC5zhqfasxI/s1600/Screenshot-Untitled+Window.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 246px;" src="http://4.bp.blogspot.com/_N5AfJVFG_JA/TAP6ioc8_YI/AAAAAAAAAA4/IC5zhqfasxI/s320/Screenshot-Untitled+Window.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5477497044694007170" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The ARM emulator is now working with 26-bit code as well as 32-bit (although it would be a bad idea to mix them in the same process) and is capable of executing the free renderer for ArtWorks files.  Unfortunately, it seems to be a little slower than the pure 32-bit version was but there's plenty of room for optimisation.&lt;br /&gt;&lt;br /&gt;The Viewer window title bar shows the time taken to render the file (actually, the whole ArtWorks file is rendered and copied into a bitmap that is displayed by the Viewer application).  The computer is a dual core with about 5000 BogoMIPs per core (the emulator only uses one core, of course).  No modules from RISC OS are needed to run Viewer with AWRender.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5615742908762998705?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5615742908762998705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5615742908762998705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5615742908762998705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5615742908762998705'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/05/artworks-renderer.html' title='ArtWorks Renderer'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_N5AfJVFG_JA/TAP6ioc8_YI/AAAAAAAAAA4/IC5zhqfasxI/s72-c/Screenshot-Untitled+Window.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-4777852717951578702</id><published>2010-05-29T14:50:00.003+02:00</published><updated>2010-05-29T20:10:28.897+02:00</updated><title type='text'>Building on and for Knoppix</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_N5AfJVFG_JA/TAFUDFsF_DI/AAAAAAAAAAw/KEvxpOkGA7k/s1600/Screenshot.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_N5AfJVFG_JA/TAFUDFsF_DI/AAAAAAAAAAw/KEvxpOkGA7k/s320/Screenshot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5476751033902693426" /&gt;&lt;/a&gt;&lt;br /&gt;The Knoppix Live CD (http://knopper.net/knoppix/) is an excellent way to try out Linux on any PC with a CD-ROM drive.  It won't store anything on your PC (unless you ask it to) and doesn't mess up any existing installations of Linux or Windows.&lt;br /&gt;&lt;br /&gt;In this article, I'm going to describe how to build ROLF to run on Linux assuming a PC booted from an unmodified Knoppix 6.2 CD.&lt;br /&gt;&lt;br /&gt;When done, you should have a working ROLF desktop being displayed in a window, able to run a few native ROLF programs and even some RISC OS programs, in a limited way.  Simply by copying the directory into which you've installed ROLF to some permanent storage (a hard disc or a memory stick, for example), you can use the build again without having to go through the steps I describe.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Set up a build environment&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Knoppix, unfortunately, doesn't include all the tools needed to build ROLF, so we have to get them from Debian first.  (If your Linux system already includes these tools, you can obviously skip this step.)&lt;br /&gt;&lt;br /&gt;First, get the full list of packages that are available:&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;sudo apt-get update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then update the compiler to include the C++ compiler, needed to build the Server part of ROLF (the libraries are all plain C, but to build them, you need libtool).&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;sudo apt-get install build-essentials&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;sudo apt-get install subversion&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;sudo apt-get install libtool&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;sudo apt-get install pkg-config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After that has been done, the compiler will still refuse to compile C++ programs because it can't find cc1plus, for some reason.  The simplest way to fix that is to add the path to the (just installed) cc1plus file installed to the PATH environment variable.&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;export PATH=$PATH:$(dirname $(find /ramdisk/ -name cc1plus 2&gt;/dev/null | head -n 1))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, to get the source code:&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;svn co https://ro-lf.svn.sourceforge.net/svnroot/ro-lf ro-lf &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(If you don't expect to make any changes to the code, you can instead use:&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;svn export https://ro-lf.svn.sourceforge.net/svnroot/ro-lf&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Knoppix (or Debian) have all their shared libraries taged by their version number; to make the files linkable, we need to do this:&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;mkdir lib&lt;br /&gt;ln -s /usr/lib/libz.so.1 lib/libz.so&lt;br /&gt;ln -s /usr/lib/libjpeg.so.62 lib/libjpeg.so&lt;br /&gt;ln -s /usr/lib/libpng12.so.0 lib/libpng.so&lt;br /&gt;ln -s /usr/lib/libfreetype.so.6 lib/libfreetype.so&lt;br /&gt;ln -s /usr/lib/libstdc++.so.6 lib/libstdc++.so&lt;br /&gt;ln -s /usr/lib/libmagic.so.1 lib/libmagic.so&lt;br /&gt;sed -i 's/CFLAGS.*$/&amp; -L$(CFGDIR)/lib' config.mak&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Similarly, the build requires a set of include files [This bit needs an update!]&lt;br /&gt;&lt;br /&gt;Specifically, the files needed are:&lt;br /&gt;&lt;br /&gt;From zlib:&lt;br /&gt;zlib.h, zconf.h&lt;br /&gt;&lt;br /&gt;From libpng:&lt;br /&gt;png.h, pngconf.h&lt;br /&gt;&lt;br /&gt;From file:&lt;br /&gt;magic.h&lt;br /&gt;&lt;br /&gt;From libjpeg&lt;br /&gt;jpeglib.h, jmorecfg.h, jconfig.h&lt;br /&gt;&lt;br /&gt;From freetype 2:&lt;br /&gt;./ft2build.h&lt;br /&gt;./freetype/internal/internal.h&lt;br /&gt;./freetype/fttypes.h&lt;br /&gt;./freetype/ftsystem.h&lt;br /&gt;./freetype/ftmoderr.h&lt;br /&gt;./freetype/ftimage.h&lt;br /&gt;./freetype/fterrors.h&lt;br /&gt;./freetype/fterrdef.h&lt;br /&gt;./freetype/freetype.h&lt;br /&gt;./freetype/config&lt;br /&gt;./freetype/config/ftheader.h&lt;br /&gt;./freetype/config/ftconfig.h&lt;br /&gt;./freetype/config/ftstdlib.h&lt;br /&gt;./freetype/config/ftoption.h&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;sed -i 's/CFLAGS.*$/&amp; -I$(CFGDIR)/my_includes' config.mak&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Change directory into the downloaded code and run configure (not as complicated as a normal configure script) and build ROLF:&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;cd ro-lf/ROLF/rolf&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;./configure --appsdir=$HOME/Apps --prefix=$HOME --tarballs=`pwd`/tarballs/&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-style:italic;"&gt;make&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assuming all goes well with the build, the next step is to collect the resources needed in one place.&lt;br /&gt;&lt;br /&gt;You will need:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Fonts (at least FreeSerif.ttf; the default font)&lt;br /&gt;&lt;li&gt;Tool and Icon sprites (I use Chris Wraight's Steel theme, from here: http://www.lym.iconbar.com/downloads/steel.zip)&lt;br /&gt;&lt;li&gt;A mimemap.txt file (if you're going to use RISC OS software)&lt;br /&gt;&lt;li&gt;and a !Boot file, to load them all (like the one below)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Create a resources directory with subdirectories:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;mkdir -p Resources/fonts/{FreeSerif,FreeSans,FreeMono}&lt;br /&gt;ln -s /usr/share/file/ Resources/&lt;br /&gt;cd Resources/fonts&lt;br /&gt;for i in *; do for f in $( find /KNOPPIX/ -name $i*.ttf ); do ln -s $f $i/ ; done ; done 2&gt;/dev/null&lt;br /&gt;# This one is needed for the Terminal application:&lt;br /&gt;cp `find /KNOPPIX/ -name default8x16.psf* 2&gt; /dev/null` .&lt;br /&gt;cd ..&lt;br /&gt;unzip &lt;pathto&gt;Steel.zip&lt;br /&gt;cd ..&lt;br /&gt;cat &gt; \!Boot &lt;&lt;"EOF"&lt;br /&gt;IconSprites $ROLF_RESOURCES/Steel/Tools&lt;br /&gt;IconSprites $ROLF_RESOURCES/Steel/Icons&lt;br /&gt;&lt;br /&gt;LoadPointer $ROLF_RESOURCES/Steel/Icons ptr_default 0 21&lt;br /&gt;LoadPointer $ROLF_RESOURCES/Steel/Icons ptr_double 0 21&lt;br /&gt;&lt;br /&gt;# Match up icons with the appropriate mime types&lt;br /&gt;if [ -f $ROLF_RESOURCES/mimemap.txt ] ; then ( grep -v ^# $ROLF_RESOURCES/mimemap.txt | tr -s '\t' | cut -f 1,3 | sort -k 2 | sed 's/\(.*\)\t\(.*\)$/IconSprite file_\2 "file_\1"/' | sh ) ; fi&lt;br /&gt;&lt;br /&gt;# Load applications&lt;br /&gt;IconBar&lt;br /&gt;Filer Icon $HOME/Apps 50 romapps Apps&lt;br /&gt;Filer Icon /tmp 40 ramfs ramfs&lt;br /&gt;Filer Icon $HOME 45 homedisc Home&lt;br /&gt;EOF&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, we just have to run it!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;export LD_LIBRARY_PATH=`pwd`/lib&lt;br /&gt;export PATH=$PATH:`pwd`/bin&lt;br /&gt;&lt;br /&gt;#Uncomment the next line if you need a log of what's happened (useful for debugging)&lt;br /&gt;# ROLF_WIMP_LOG=/tmp/rolf_wimp_log \&lt;br /&gt;ROLF_RESOURCES=`pwd`/Resources \&lt;br /&gt;ROLF_VNC=1 \&lt;br /&gt;Wimp&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That should have the effect of printing:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;VNC Server waiting for connections on port 2008.&lt;br /&gt;New file descriptor 3&lt;br /&gt;New Opaque bitmap VNCFrameBuffer, 1024x768&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In another terminal window, type:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;vncviewer localhost:2008&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;... and a colourful window with an icon bar and a couple of drive icons should appear!&lt;br /&gt;&lt;br /&gt;I will follow this up with some more postings about running RISC OS software on ROLF, as well as implementations of NetSurf and MPlayer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-4777852717951578702?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/4777852717951578702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=4777852717951578702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4777852717951578702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4777852717951578702'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/05/building-on-and-for-knoppix.html' title='Building on and for Knoppix'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_N5AfJVFG_JA/TAFUDFsF_DI/AAAAAAAAAAw/KEvxpOkGA7k/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5191691329456309850</id><published>2010-05-22T22:03:00.004+02:00</published><updated>2010-05-22T22:23:43.263+02:00</updated><title type='text'>Emulator speedups</title><content type='html'>The other day I noticed that it took AWRender nearly fifty seconds to render the file celtic_knot3 from &lt;a href="http://www.simon-smith.org/graphics/celtic_knots.html"&gt;here&lt;/a&gt;, and I thought that was too long, so I decided to get around to speeding up the emulator.  (Had I first tried it on my SARPC, I'd have found that it took 55 seconds on there, so it wasn't really too slow.)&lt;br /&gt;&lt;br /&gt;The first step was to disable all the debug output from the compatibility library; that halved the rendering time to a shade over 24s.  I found that rather disappointing; I was expecting the debug output to take up at least two-thirds of the time.&lt;br /&gt;&lt;br /&gt;I turned on optimisation in the library compilation, -O4 reduced the render time to under 18s.&lt;br /&gt;&lt;br /&gt;Two optimisation suggestions from Jake Waskett were to ensure that jump targets were on 16-byte boundaries and to fix up calls to scan from a fixed location and jump to the returned call so that on the second attempt, there wouldn't be a relatively expensive scan call.  The former shaved about 0.1s off the render time, but the latter gave a significant improvement, taking the render time down to just over 15s.&lt;br /&gt;&lt;br /&gt;During all this, I noticed the SETcc operations and realised that I could use SETO %al ; LAHF to get all the necessary x86 flags into %ax (previously, I'd been using pushf/popf).  Of course, when I googled for that combination I found a description of someone writing an ARM JIT compiler using pushf, with a comment recommending the seto/lahf combination; it's all about knowing what to look for!  Anyway, once the flags are in %ax, it's fairly easy to get the four flags we want into the bottom nibble of %al by rotating %ah, masking and or'ing with %al: ( ror $3, %ah ; and $0xe, %ah ; or %ah, %al ).  The flags aren't in the same order used by ARM, but a 16-byte lookup table can translate between the two in one instruction.&lt;br /&gt;&lt;br /&gt;Obviously, there are more flag reads than flag writes (there's no point in setting the flags if they aren't going to be read at least once), so I added a new global variable to be set at the same time the flags were which contains a 16 entry bitmap, one for each condition code (EQ, NE, GT, etc.), so that a conditional instruction just has to test a known bit in a known variable and use the ZF to behave appropriately.&lt;br /&gt;&lt;br /&gt;That change was fairly major (but only affected three files), and takes the render time down to 13 seconds.&lt;br /&gt;&lt;br /&gt;Next thing to try was to eliminate the extra code for each load or store that checks for non-aligned accesses.  The idea is to set the x86 flag that causes a SIGBUS signal to be generated for unaligned accesses and load the registers as necessary before moving on to the next instruction.  Unaligned accesses in ARM code will probably be relatively rare and the speedup in the normal memory accesses should more than make up for the slower signal handling.  Since the only routines called from emulated ARM code are scan_arm_code and (when debugging is enabled) dump_regs), those routines would reset the flag on entry and restore its state on exit.&lt;br /&gt;&lt;br /&gt;That "optimisation" slowed the render time down to 15s again.&lt;br /&gt;&lt;br /&gt;Since the only unaligned access from scan_arm_code is likely to be when setting a 32-bit constant in an instruction, I stopped manipulating the flag in scan_arm_code and tried modifying cache_32bit to write its four bytes one at a time, instead, and the time improved again to a little over 12s.  However, the code I was testing didn't include any unaligned accesses, and since I hadn't written the signal handler anyway, I've decided to call it a day for the time being and leave that optimisation out.&lt;br /&gt;&lt;br /&gt;Future optimisation possibilities:&lt;br /&gt;finish the SIGBUS solution&lt;br /&gt;Improve the hash table lookup&lt;br /&gt;Use mov $constant,arm_emulator_regs[n] for constant loads into registers&lt;br /&gt;Combine consecutive ARM instructions that load a constant into a register&lt;br /&gt;Remember if the flags (or a register's contents) are stored in a register from last time.&lt;br /&gt;&lt;br /&gt;All of these things have a chance of making the scan_arm_code routine slower and negating their speed improvements, but they're probably worth a try.&lt;br /&gt;&lt;br /&gt;The other thing to do is to profile the ARM code somewhat by generating code to increment counters when, for example, flags are set, flags are read, scan_arm_code and get_hash_entry are called, etc.  At the moment, I notice that a sequence of ARM instructions leading up to a decision point (conditional jump, swi, etc.) is rarely much more than ten instructions.&lt;br /&gt;&lt;br /&gt;The instruction emulator file stands at 1761 lines (55158 bytes).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5191691329456309850?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5191691329456309850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5191691329456309850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5191691329456309850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5191691329456309850'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/05/emulator-speedups.html' title='Emulator speedups'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-7630016777494663246</id><published>2010-02-22T14:43:00.002+01:00</published><updated>2010-02-22T14:56:50.686+01:00</updated><title type='text'>Edit partially working</title><content type='html'>The compatibility layer is coming on nicely, to the extent that the !Edit application binary from ROOL will run, load a file and allow its editing (but not saving).&lt;br /&gt;&lt;br /&gt;Before I go any further on that, I intend to start dropping all use of the original window api (in furniture.h) in favour of the newer and much more flexible composite_window interface.&lt;br /&gt;&lt;br /&gt;I'd spent a lot of time trying to think of a good way to describe complex windows with multiple panes, toolbars, combined status and scroll bars, etc.  In the end, I decided to avoid any descriptive mechanism in favour of providing a toolbox of useful widgets to be combined programmatically.  The idea is that, as long as they are flexible enough, a descriptive system (textual, or data structure based) can be added later by simply writing an interpreter layer.&lt;br /&gt;&lt;br /&gt;I'm not likely to get very much done in the next month (just like most months, unfortunately), but that's where I plan to focus when I get a chance.  Once the compatibility library starts using that mechanism, I can go back to implementing more RO system calls until I can get some proper applications running.&lt;br /&gt;&lt;br /&gt;I'll try to add a screenshot in the next day or so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-7630016777494663246?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/7630016777494663246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=7630016777494663246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/7630016777494663246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/7630016777494663246'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/02/edit-partially-working.html' title='Edit partially working'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5618988359446907904</id><published>2010-01-05T20:01:00.002+01:00</published><updated>2010-01-05T21:29:18.362+01:00</updated><title type='text'>RISC OS Compatibility Revisited</title><content type='html'>Today, I managed to get a Public Domain RISC OS program that uses the shared C library to run.&lt;br /&gt;&lt;br /&gt;The application is unmodsqz from !SqzUnSqz (www.martinkd.freeuk.com/unsqueeze.html), which unsqueezes relocatable modules.&lt;br /&gt;&lt;br /&gt;Unfortunately, it was a rather circular problem, because the shared C library is squeezed and thus not directly supported by the compatibility library (which can be thought of as being a bit like WINE, but for RISC OS).  The solution I used was to unsqueeze the CLib module on an existing RO computer, a better one is probably to use the Graham Shaw's open source (GPL) library from RiscPkg.&lt;br /&gt;&lt;br /&gt;Anyway, the biggest problem was with the library accessing zero page (the bottom 4k of RAM), because it appears that it can't be mmap'd into memory on x86 Linux.  The solution I've used is just to catch SEGV events and interpret the x86 instruction accessing the memory.  That was a lot easier than I thought (especially as I only had to deal with x86 instructions generated by the ARM emulator code), and gave me some experience of recovering from signals.  A similar approach could be fairly easily used for non-word-aligned memory accesses and reduce the code generated by the emulator and, no doubt, speed up emulated code significantly.&lt;br /&gt;&lt;br /&gt;I've tried to get a few of the applications from the ROOL site to run, but without success; a lot more SWIs need to be implemented.  One thing I noticed was that Edit uses UpCall 6 (no UpCalls are supported at the moment, the SWI just pretends to work), and that could be something like ROLF's Detatch mechanism - needs looking into.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5618988359446907904?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5618988359446907904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5618988359446907904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5618988359446907904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5618988359446907904'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2010/01/risc-os-compatibility-revisited.html' title='RISC OS Compatibility Revisited'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-8227123164072213930</id><published>2009-09-08T12:46:00.002+02:00</published><updated>2009-09-08T12:49:38.738+02:00</updated><title type='text'>Problems with a new PC</title><content type='html'>I got myself a new PC today, an Acer Aspire L5100 with 4GB RAM and 640GB SATA hard disc.&lt;br /&gt;&lt;br /&gt;Unfortunately, neither my Live CD nor some (relatively old) knoppix or SUSE discs that I tried could see either disc drive.&lt;br /&gt;&lt;br /&gt;I'm sure I can rectify the situation, but I thought I'd mention it in case anyone tries the ISO image on a similar machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-8227123164072213930?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/8227123164072213930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=8227123164072213930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/8227123164072213930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/8227123164072213930'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/09/problems-with-new-pc.html' title='Problems with a new PC'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2061877645380850497</id><published>2009-08-14T17:24:00.002+02:00</published><updated>2009-08-14T19:09:39.339+02:00</updated><title type='text'>What now?</title><content type='html'>I've not done anything on ROLF for a few weeks; I've been on holiday.  Just before I left, I put the source up on &lt;a href="http://ro-lf.sourceforge.net/"&gt;SourceForge&lt;/a&gt;, but I didn't advertise it because I didn't have a chance to help anyone crazy enough to try to get it to work.  I should have some time now, though.&lt;br /&gt;&lt;br /&gt;The code can be accessed by the following command:&lt;br /&gt;&lt;br /&gt;svn checkout https://ro-lf.svn.sourceforge.net/svnroot/ro-lf/ROLF/rolf&lt;br /&gt;&lt;br /&gt;There are quite a few areas I'd like to tidy up and debug, but I wondered if anyone had a preference for where I should focus.  Some possibilities are:&lt;br /&gt;&lt;br /&gt;Create and upload a 25-30MB iso image for people to try out.&lt;br /&gt;&lt;br /&gt;Continue working on getting an ARM kernel and build to run on a BeagleBoard.&lt;br /&gt;&lt;br /&gt;Speed up the ARM emulator.&lt;br /&gt;&lt;br /&gt;Improve the ROLF frontend to NetSurf.&lt;br /&gt;&lt;br /&gt;Improve the ROLF frontend to MPlayer.&lt;br /&gt;&lt;br /&gt;Get a VNC-based version of ROLF to run on a Nokia 770 (not really a practical platform, in general).&lt;br /&gt;&lt;br /&gt;Comments/requests?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2061877645380850497?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2061877645380850497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2061877645380850497' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2061877645380850497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2061877645380850497'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/08/what-now.html' title='What now?'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-1678533475215174994</id><published>2009-07-01T13:22:00.003+02:00</published><updated>2009-07-01T13:45:10.449+02:00</updated><title type='text'>What's working</title><content type='html'>In the screenshot below, you can see the following:&lt;br /&gt;&lt;br /&gt;Two NetSurf windows (without any toolbar and with the status in the title bar).&lt;br /&gt;&lt;br /&gt;A terminal window running a modified Brandy, the BASIC interpreter, with SYS calls available.  The ROOL BASIC will also run, once decompressed, on the ARM emulator, which has the advantage of an inline assembler but the disadvantage of not being released under a free licence.&lt;br /&gt;&lt;br /&gt;A native image viewer application, displaying an &lt;a href="http://www.mw-software.com/"&gt;ArtWorks&lt;/a&gt; image rendered using the AWRender module.&lt;br /&gt;&lt;br /&gt;A movie running on MPlayer.&lt;br /&gt;&lt;br /&gt;And, of course, the Icon Bar and Filer windows.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_N5AfJVFG_JA/SktJsvaoI9I/AAAAAAAAAAc/NFDZnjzeaKA/s1600-h/Screenshot-1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_N5AfJVFG_JA/SktJsvaoI9I/AAAAAAAAAAc/NFDZnjzeaKA/s320/Screenshot-1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5353453615051187154" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All of the applications need a good deal of polishing up, but I'm quite happy with the state of the ARM emulation, which is good enough to run two quite demanding pieces of software (AWRender and BASIC105), and the SWI support is easily extendable.  The emulator could be faster (it takes about 10 seconds to render the ArtWorks StartUp file, where my RPC takes 3-4s), but there are several ways to achieve that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-1678533475215174994?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/1678533475215174994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=1678533475215174994' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/1678533475215174994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/1678533475215174994'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/07/whats-working.html' title='What&apos;s working'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_N5AfJVFG_JA/SktJsvaoI9I/AAAAAAAAAAc/NFDZnjzeaKA/s72-c/Screenshot-1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-7219898746250212222</id><published>2009-06-01T01:50:00.004+02:00</published><updated>2009-06-06T11:20:30.754+02:00</updated><title type='text'>Some progress on the emulator</title><content type='html'>I've been working on the emulator, trying to get the ArtWorks file viewer AWViewer running on an x86 computer.  I finally have some progress to report!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_N5AfJVFG_JA/SiMYW0bQM6I/AAAAAAAAAAM/ArObGnrl-M8/s1600-h/Screenshot.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://1.bp.blogspot.com/_N5AfJVFG_JA/SiMYW0bQM6I/AAAAAAAAAAM/ArObGnrl-M8/s400/Screenshot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5342140363300680610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ROLF is being viewed via VNC, and the ArtWorks StartUp file is being displayed entirely using the AWRender module, called from AWViewer.!RunImage running on ROOL's BASIC105.&lt;br /&gt;&lt;br /&gt;The blue border is due to some debug code (clearing the area to be redrawn to blue), the title of the window is not taken from the CreateWindow request, and the green text is because the font code needs some more work.  There's still a long way to go, but it's a significant step forward.&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;The size of the text is due to the font manager being told that the screen is 90dpi, but ArtWorks expects 180dpi (because that's what my software tells it).&lt;br /&gt;&lt;br /&gt;There's no transparency in the image (the droplets of water should be transparent), which, I'm told, was due to the renderer not being able to get dynamic areas properly.  I've fixed the dynamic areas, but now I have to work on allowing the code to redirect output to sprites.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-7219898746250212222?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/7219898746250212222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=7219898746250212222' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/7219898746250212222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/7219898746250212222'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/06/some-progress-on-emulator.html' title='Some progress on the emulator'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_N5AfJVFG_JA/SiMYW0bQM6I/AAAAAAAAAAM/ArObGnrl-M8/s72-c/Screenshot.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-4199375944015231026</id><published>2009-04-16T18:28:00.007+02:00</published><updated>2009-04-21T09:23:50.774+02:00</updated><title type='text'>Getting BBC BASIC to run on ROLF</title><content type='html'>I'm trying to get the BASIC105 module from ROOL to run using the compatibility library and ARM emulator.&lt;br /&gt;&lt;br /&gt;Downloaded the module from:&lt;br /&gt;http://www.riscosopen.org/content/downloads/module-zipfiles&lt;br /&gt;&lt;br /&gt;Next, a program to load a single Relocatable Module:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#include "rolf/compatibility/compatibility.h"&lt;br /&gt;#include "rolf/compatibility/arm_emulator.h"&lt;br /&gt;&lt;br /&gt;int main( int argc, const char *argv[] )&lt;br /&gt;{&lt;br /&gt;    uint32_t regs[16];&lt;br /&gt;    uint32_t flags;&lt;br /&gt;&lt;br /&gt;    setenv( "RISCOS_MODULES", "BASIC105", 0 );&lt;br /&gt;&lt;br /&gt;    // Any old SWI, the first call to riscos_swi loads and&lt;br /&gt;    // initialises all the modules in RISCOS_MODULES (a&lt;br /&gt;    // colon-separated list of filenames)&lt;br /&gt;&lt;br /&gt;    riscos_swi( 0x0, regs, &amp;flags );&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;First problems:&lt;br /&gt;&lt;br /&gt;1. I haven't implemented arguments to be passed to the module on initialisation (in r10).  I can fake that in gdb, for the time being.&lt;br /&gt;&lt;br /&gt;2. The module expects to be decompressed by the operating system (the init code has bit 31 set).  What algorithm does it use?&lt;br /&gt;&lt;br /&gt;[Update]&lt;br /&gt;The decompression algorithm appears to be private, so I've ripped a decompressed version from my Risc PC.&lt;br /&gt;&lt;br /&gt;The start code assumes it has memory to use at 0x8000, so I've given it some to be going on with.&lt;br /&gt;&lt;br /&gt;The code makes use of multiple load and store instructions which load or store the base register, which I hadn't implemented.&lt;br /&gt;&lt;br /&gt;I believe I've fixed that, now, and with the (quick and dirty) implementation of a few OS_ SWIs (WriteS, Write0, WriteI+... and ReadLine) I've got to the point where it prompts for input, but segfaults at a strange address that's exactly 0x20000000 lower than the return address in r14.  I suspect that the module requires loading in the lowest 512MB, or even lower.&lt;br /&gt;&lt;br /&gt;[Update 2]&lt;br /&gt;Yes, allocating memory around the 64MB mark means that the code runs a lot longer.&lt;br /&gt;&lt;br /&gt;A whole lot longer; it's time to disable logging the register contents on each ARM instruction!&lt;br /&gt;&lt;br /&gt;[Update 3]&lt;br /&gt;OK, the underlying problem is that the BASIC I have is 26-bit, and I'm not implementing that (yet).  The 0x20000000 offset was due to the code clearing the C flag.&lt;br /&gt;&lt;br /&gt;On the plus side, I found a bug in the emulator where loading a byte didn't clear the top 24 bits of the register.  I'll go back to trying to get AWRender to work, now that's fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-4199375944015231026?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/4199375944015231026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=4199375944015231026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4199375944015231026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4199375944015231026'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/04/getting-bbc-basic-to-run-on-rolf.html' title='Getting BBC BASIC to run on ROLF'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5538871927125432383</id><published>2009-02-24T12:35:00.003+01:00</published><updated>2009-02-24T13:00:17.130+01:00</updated><title type='text'>Beagle board</title><content type='html'>A week or so ago, I got a Beagle board.  So far, I've proved that it is unbrickable (by corrupting the NAND ROM and practically bricking it, then spending a couple of days and using a wide selection of computers and software to nurse it back to health).&lt;br /&gt;&lt;br /&gt;Today I just got a self-built linux kernel to boot on it (not doing anything useful yet, though).&lt;br /&gt;&lt;br /&gt;Once I'd got a set of working binutils and gcc (built for the arm-elf target), I got a long way, until the kernel was generating the uImage file.  There were two problems.  &lt;br /&gt;&lt;br /&gt;The second, mkimage not found, was simple to fix - it comes with the u-boot code, also available here:&lt;br /&gt;ftp://ftp.koansoftware.com/public/linux/mkimage&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The first was heralded by the following error message:&lt;br /&gt;&lt;br /&gt;"arm-elf-ld: ERROR: arch/arm/boot/compressed/misc.o uses VFP instructions, whereas arch/arm/boot/compressed/vmlinux does not"&lt;br /&gt;&lt;br /&gt;It turned out the problem wasn't with arch/arm/boot/compressed/vmlinux at all (which is not surprising, since it's actually the output file), but with the head.o and piggy.o in the same directory.&lt;br /&gt;&lt;br /&gt;The output of this command:&lt;br /&gt;&lt;br /&gt;readelf -a arch/arm/boot/compressed/*.o | grep Flags:&lt;br /&gt;&lt;br /&gt;included the lines:&lt;br /&gt;  Flags:                             0x200, GNU EABI, software FP&lt;br /&gt;  Flags:                             0x600, GNU EABI, software FP, VFP&lt;br /&gt;  Flags:                             0x200, GNU EABI, software FP&lt;br /&gt;&lt;br /&gt;What was needed was to re-assemble the head.S and piggy.S files with the -mfpu=vfp flag.  Now, I doubt I've run any floating point code in the kernel since it's only booted up and hasn't really done anything, so it could be that I've compiled everything else wrong and it shouldn't use VFP, but that can wait for now.&lt;br /&gt;&lt;br /&gt;Oh, I also edited drivers/video/omap/Makefile, to add the following line:&lt;br /&gt;&lt;br /&gt;objs-y$(CONFIG_ARCH_OMAP3) += dispc.o&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(I won't be able to work on anything for the next week and a half, but I'm looking forward to getting ROLF working on my TV, it's already worked with OMAP on the Nokia N800, and the VNC code points to a better solution.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5538871927125432383?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5538871927125432383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5538871927125432383' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5538871927125432383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5538871927125432383'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/02/beagle-board.html' title='Beagle board'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-2836865477010405242</id><published>2009-02-06T21:38:00.005+01:00</published><updated>2009-02-13T19:30:10.731+01:00</updated><title type='text'>ARM emulation</title><content type='html'>Yesterday, I decided to implement my own ARM code emulator.&lt;br /&gt;&lt;br /&gt;I think my problems with getting AWRender to work have been to do with self modifying ARM code in the AWRender module.  I had a half-hearted go at finding a way to implement  OS_SynchroniseCodeAreas with QEMU, then I decided to just implement my own.&lt;br /&gt;&lt;br /&gt;The interface is very simple: global storage for the registers, and a routine that returns a pointer to some x86 code that implements whatever ARM code is pointed to by r15 on entry.  The x86 code will return when it comes to an instruction it can't deal with by itself, such as a SWI or a floating point operation.&lt;br /&gt;&lt;br /&gt;The idea is to keep the emulator as the core of an ARM system, and anything else that needs emulating (like an Operating System, or a co-processor) will be taken care of outside the core.  That way, I think, I can create something that can be finished!&lt;br /&gt;&lt;br /&gt;I'm moving away from QEMU for a couple of reasons.  Firstly, because it does much more than I need and it's heading off in a direction of increased complexity.  For example,  when I found a bug in the (latest release) version I was using, I discovered that later versions (with that bug long since fixed) don't work the same way as the one I had been working with, and I was told that, surprisingly, I didn't really want to use it that way!&lt;br /&gt;&lt;br /&gt;Another reason is that a stripped version of the QEMU library is a little under half a megabyte in size (478568 bytes, to be specific), whereas my replacement is about 8k, at the moment, with maybe half the instruction set dealt with (bearing in mind that floating point is a co-processor feature).  Perhaps I could strip QEMU down, but not that far, and not that quickly.&lt;br /&gt;&lt;br /&gt;QEMU has given me some good ideas about how to approach the problem, but it's too bloated for my liking, now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update:  It's going quite well.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It took me a while to work out that the x86 uses the carry flag in the opposite way to the ARM when subtracting, that jb isn't quite the same as BHI, and a day and a half to realise that I'd implemented BIC as AND instead of AND NOT.&lt;br /&gt;&lt;br /&gt;Anyway, I'm now at the point where I have to start looking at which SWIs to emulate in order to get AWRender to, well, render something.  I've chosen to attempt to get the freely available &lt;A href="http://www.mw-software.com/"&gt;ArtWorks&lt;/A&gt; renderer working as a proof of concept for the compatibility layer (the whole thing isn't free, but apparently very good).  Unfortunately, the application doesn't work out of the box, because the BASIC uses inline assembler and Brandy (http://sourceforge.net/projects/brandy) doesn't include that.  I'll ask on comp.sys.acorn.programmer if there's an alternative that does.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-2836865477010405242?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/2836865477010405242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=2836865477010405242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2836865477010405242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/2836865477010405242'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2009/02/arm-emulation.html' title='ARM emulation'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-5589887777327602756</id><published>2008-12-10T09:12:00.002+01:00</published><updated>2008-12-11T11:09:59.521+01:00</updated><title type='text'>Update</title><content type='html'>I'm moving my code into an SVN repository, something I should have done a while ago.&lt;br /&gt;&lt;br /&gt;I've sorted out the rather horrible looking text problem by ignoring FT2's 1/64th pixel resolution in favour of absolute millipoints.  If text should fit in an inch at 12pt size, it should fit in a half inch at 6pt (and the dpi of the display should not be allowed to affect that).&lt;br /&gt;&lt;br /&gt;NetSurf is coming along, in a horrible, hacked way!&lt;br /&gt;&lt;br /&gt;In general, nothing to release, but still working on it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-5589887777327602756?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/5589887777327602756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=5589887777327602756' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5589887777327602756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/5589887777327602756'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2008/12/update.html' title='Update'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-4034304250757105410</id><published>2008-10-30T10:08:00.007+01:00</published><updated>2008-11-12T21:14:58.166+01:00</updated><title type='text'>RISC OS Compatibility</title><content type='html'>The primary goal of ROLF was always to produce an operating system that provided a programming and user experience as similar to RISC OS as possible.  It was never about running particular RO programs, although I had given the concept some thought.&lt;br /&gt;&lt;br /&gt;In response to some postings on Drobe, I thought I'd have another look at the compatibility library that is intended to be used by Brandy and QEMU.&lt;br /&gt;&lt;br /&gt;I've implemented a very few SWIs in the library and sucessfully integrated (hacked) it into Brandy (although any programs using TIME= will get out of sync with OS_ReadMonotonicClock).&lt;br /&gt;&lt;br /&gt;I've since started looking at QEMU, and it looks promising.&lt;br /&gt;&lt;br /&gt;The emulator code is released under the LGPL and so I should be able to integrate it into the compatibility library.  That should mean that I can provide SWI decoder code that can search both native i386 routines and also Relocatable Modules from RO, which can then call i386 SWIs.&lt;br /&gt;&lt;br /&gt;Some outstanding questions:&lt;br /&gt;&lt;br /&gt;Should the RMA be a shared memory area?  (This would allow RMs to provide inter-process communication, but opens up a whole can of worms with locking the code/memory areas.)&lt;br /&gt;&lt;br /&gt;Can restricting RM SWI calls to when the application has a lock on the Wimp (i.e. has received a non-redraw event from the Wimp) work?  (Not really, Artworks, for example would need it's RMs' routines when redrawing.)&lt;br /&gt;&lt;br /&gt;Update: [3 Nov] After a little more work, I've got various relocatable modules initialising and executing SWIs.  For simplicity, I've gone for loading all the modules in each application, no shared memory; that means that only utility-style modules will work (task modules won't at all).  ARM SWIs may call native (i386) code SWIs, but they can't call ARM module provided SWIs.  (Also, I haven't looked at returning flags properly, including setting the V flag on a failed exit.)  For each SWI a module needs, I either have to soft-load another module or implement the SWIs natively; of course the RISC OS modules aren't freely distributable.&lt;br /&gt;&lt;br /&gt;Update 2: [4th Nov] I made the mistake of softloading Font Manager 3.40 (17 Aug 1998), which got some distance, but then failed for what I finally worked out was a non-32bit compatible instruction (of course, it's from 1998).  So, now I'll have a look at the 41 Font_ SWIs.&lt;br /&gt;&lt;br /&gt;Update 3: [10 Nov] I've been trying to get the ArtWorks renderer module to work, with permission and documentation from Martin Wuerthner.  It's an interesting interface, in that it gives you a pointer to a routine within the relocatable module for the application to call and you have to pass the address of a callback routine to the renderer, so it can request more memory (among other things).  That seems to be working, in that the ARM code runs and, with the addition of two special SWIs ROLF_RunARMCode and ROLF_CallOut, native code can call the ARM routines and ARM code can call native code (i.e. C, written and compiled under x86 Linux).  Unfortunately, I seem to have done something wrong and the simple AWRender_DocBounds SWI fails.  I'm working on that, and on making RO applications transparently executable on Linux.&lt;br /&gt;&lt;br /&gt;Update 4: It seems to be a bug in QEMU, and Justin Fletcher's already been there!  Unfortunately, it doesn't look like his quick fix is sufficient, so it looks like I'll have to have a look at the qemu internals.&lt;br /&gt;&lt;br /&gt;Update 5: [12 Nov] OK, I've made a patch for QEMU which seems to work, but I should test it a bit more before sending it in.  I'm trying to get the ArtWorks renderer module, http://www.mw-software.com/software/awmodules/awrender.html (and its dependencies) to work; it's a utility module that stresses the compatibility library (so similar modules should be easier to get to work), and Martin Wuerthner is supportive of my attempts.  The framework appears to be working OK, so now its back to adding support for more low-level SWIs.&lt;br /&gt;&lt;br /&gt;The comments are appreciated, I'll try to keep posting updates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-4034304250757105410?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/4034304250757105410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=4034304250757105410' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4034304250757105410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/4034304250757105410'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2008/10/risc-os-compatibility.html' title='RISC OS Compatibility'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-3994842232961787444</id><published>2008-10-17T11:52:00.002+02:00</published><updated>2008-10-17T12:14:53.597+02:00</updated><title type='text'>Remote Frame Buffer</title><content type='html'>I've taken a few days off trying to get NetSurf to work in order to add basic Remote Frame Buffer protocol support to the Wimp.&lt;br /&gt;&lt;br /&gt;That's the protocol used by VNC, so now the Wimp can be used from a VNC client, either with or without displaying to an actual display.  (Keyboard support is not yet included, but the mouse works.)&lt;br /&gt;&lt;br /&gt;To use it, set the environment variable ROLF_VNC to anything (at the moment, later it will be used to define the port to listen at and, possibly, the frame buffer resolution).  If ROLF_VNC is not defined, or FRAME_BUFFER is, the proper frame buffer device will be used (rather than a shared memory bitmap).&lt;br /&gt;&lt;br /&gt;In use, it's much faster than running the system under qemu, and I can use the host system to debug code.  I'll now go back to working out the coordinate system for netsurf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-3994842232961787444?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/3994842232961787444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=3994842232961787444' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3994842232961787444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3994842232961787444'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2008/10/remote-frame-buffer.html' title='Remote Frame Buffer'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-623016865871938143</id><published>2007-12-10T08:18:00.000+01:00</published><updated>2007-12-10T08:38:29.249+01:00</updated><title type='text'>An apology</title><content type='html'>I have to make an apology.  When I was getting a distribution together to release ROLF, I dutifully asked Chris Wraight if I could use his sprites, and he was kind enough to say yes.&lt;br /&gt;&lt;br /&gt;Unfortunately, the sprites I used (in a9sprite and tools) were designed by Detlef Thielsch.  He pointed this out to me in a friendly e-mail last week, and has kindly said that I can continue to use the sprites for private use.&lt;br /&gt;&lt;br /&gt;So, my apologies to Detlef for using his sprites without permission.  (While I'm at it, I also apologise to Chris, for not using his.)&lt;br /&gt;&lt;br /&gt;Thanks to both of them for providing the chance to make ROLF look half way decent and not like a bad copy of Arthur, which is how it would have looked with my attempts at icon drawing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-623016865871938143?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/623016865871938143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=623016865871938143' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/623016865871938143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/623016865871938143'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2007/12/apology.html' title='An apology'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-3299501559328339422</id><published>2007-11-16T12:20:00.001+01:00</published><updated>2007-11-24T13:12:52.121+01:00</updated><title type='text'>Progress on palmtop version</title><content type='html'>While I'm waiting for a new CD-ROM image to build, I thought I'd take another look at getting ROLF to run on my Nokia N800.&lt;br /&gt;&lt;br /&gt;The display is now working; it turns out the frame buffer access isn't so clear-cut as on a PC, in that the display needs to be told when you've just updated a rectangle, it's a simple enough modification, though.&lt;br /&gt;&lt;br /&gt;Initially, I thought I'd (have to) replace the existing interface with ROLF, but now I think I'll try to have them running simultaneously on separate virtual terminals.  This means the server will have to configure and react to VT change signals (rather than the simplistic approach of waiting to be sent another keypress when changed to another VT).  Then, I just need a simple program on each one to perform a chvt to the other.&lt;br /&gt;&lt;br /&gt;The touchscreen delivers events through an input event device (see Documentation/input/input.txt in the Linux kernel); this is a much nicer interface than the /dev/psaux one I was using and handles keyboards as well, so I'm moving over to that for all platforms.  I need to calibrate the touchscreen, though, the reported return values from the device cover a larger area than are actually returned, so with my initial code, the cursor wouldn't move out of a smaller rectangle in the middle of the screen.&lt;br /&gt;&lt;br /&gt;To get anything working at all, I've installed dropbear (a ssh server), so that I can login remotely via the network.  Executable files don't work from the memory cards, so I'm installing to a directory under the root.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-3299501559328339422?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/3299501559328339422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=3299501559328339422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3299501559328339422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3299501559328339422'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2007/11/progress-on-palmtop-version.html' title='Progress on palmtop version'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-6861211714129770189</id><published>2007-11-05T11:35:00.000+01:00</published><updated>2007-11-06T09:15:07.485+01:00</updated><title type='text'>Finally, new core code</title><content type='html'>I've just uploaded a new version of the core code to http://stoppers.drobe.co.uk/downloads/rolf.200711031911.tgz&lt;br /&gt;&lt;br /&gt;This version supports more frame buffer formats, including the packed 24-bit RGB used by QEMU.&lt;br /&gt;&lt;br /&gt;There is a very simple configure script, now, that you can use to configure the code to compile on X86 or ARM, and enable debug symbols, etc.  (IIRC, the GTK+2 configure script is actually more lines of code than ROLF contains.)&lt;br /&gt;&lt;br /&gt;The terminal program has been modified to keep reading from the application producing output even when waiting for a response from the Wimp (this means that you can run ROLF applications from the terminal command line without it hanging because it's filled up the buffer while it's got the lock on the Wimp).&lt;br /&gt;&lt;br /&gt;As it stands, it's not very much, but if anyone gets it working, they'll be in a position to use the patches for Brandy, GTK and MPlayer that I intend to put up soon (meaning when they're finished, or I get prodded again).  Also, I should look into patching ARM QEMU....&lt;br /&gt;&lt;br /&gt;Update: Once you've built the code, you will need a fonts directory (included in the ISO image, or from &lt;a href="http://stoppers.drobe.co.uk/downloads/minimal_free_fonts.tgz"&gt;here&lt;/a&gt;.  Then change directory into Resources and run:&lt;br /&gt;&lt;br /&gt;ROLF_FONT_DIR=$HOME/.fonts Wimp&lt;br /&gt;Assuming you unpacked the fonts tarball into your home directory.&lt;br /&gt;&lt;br /&gt;Update II:&lt;br /&gt;If nothing appears to happen, try Ctrl-Shift-F12 to exit and look in /tmp/boot.&lt;br /&gt;If the mouse pointer doesn't move, you probably don't have read-write access to /dev/psaux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-6861211714129770189?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/6861211714129770189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=6861211714129770189' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/6861211714129770189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/6861211714129770189'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2007/11/finally-new-core-code.html' title='Finally, new core code'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-3613469113780859547</id><published>2007-10-17T08:35:00.000+02:00</published><updated>2007-10-17T09:11:35.903+02:00</updated><title type='text'>What I'm working on at the moment</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Image library&lt;/span&gt;&lt;br /&gt;I've optimised the image library in several important cases (all the optimisations are within a single routine, DefaultRenderTo, where information hiding is allowed to go out the window to improve speed of rendering images).&lt;br /&gt;I've added support for more frame buffer pixel formats, although they have yet to be tested.&lt;br /&gt;Specifically, I've taken some code from MPlayer to do copying to the frame buffer (mem2agpcpy), this will be an optimisation for almost all applications, but mplayer was the only one really suffering.&lt;br /&gt;I will also add a generic image colour inverter that can be used by the filer for selected files, instead of the ugly red square overlay.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Live CD&lt;/span&gt;&lt;br /&gt;The stax scripts weren't quite what I was after, but they have helped me to understand squashfs and build it into my kernel and scripts; unionfs (or aufs) will come later.  At the moment, the kernel doesn't boot under QEMU for some reason that I will be looking into.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MPlayer&lt;/span&gt;&lt;br /&gt;The ROLF Mplayer output library can play DVDs at full speed (and about 50% processor loading).  The only example HD trailer I have (The Bourne Supremacy) plays pretty well, too.&lt;br /&gt;I'm not sure about licensing issues to do with including it on the Live CD, though.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Launcher&lt;/span&gt;&lt;br /&gt;This is a new program that will allow simple applications to be built which have an icon bar icon and run programs on any files dropped on the icon (this will initially be used for mplayer).  It could be extended to something scriptable, perhaps.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Compatibility Library&lt;/span&gt;&lt;br /&gt;This library has been added recently, with partial support for a few simple RO SWIs.  It is easy to integrate with Brandy, although there is an issue with running a Wimp program; Brandy doesn't seem to like being turned into a daemon (which ROLF_Initialise usually does).  I haven't tried integrating it with (ARM) QEMU yet, but it shouldn't be much harder.&lt;br /&gt;I think it should be possible to support ARM code relocatable modules fairly easily, by having a shared memory block containing the RMA.  It would be nice to get something like the ArtWorks viewer running.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Priorities&lt;/span&gt;&lt;br /&gt;I'll be working on getting the live cd to run under QEMU and, in the mean time making minor additions to the image library and filer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-3613469113780859547?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/3613469113780859547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=3613469113780859547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3613469113780859547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/3613469113780859547'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2007/10/what-im-working-on-at-moment.html' title='What I&apos;m working on at the moment'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-9189915344339842892</id><published>2007-10-17T08:32:00.000+02:00</published><updated>2007-10-17T08:35:30.370+02:00</updated><title type='text'>Back to Blogger</title><content type='html'>I think this might be a quicker way to publish my thoughts about what's being updated in ROLF.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-9189915344339842892?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/9189915344339842892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=9189915344339842892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/9189915344339842892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/9189915344339842892'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2007/10/back-to-blogger.html' title='Back to Blogger'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-116133397673320271</id><published>2006-10-20T10:32:00.000+02:00</published><updated>2006-10-20T10:46:16.740+02:00</updated><title type='text'>Progress</title><content type='html'>I've been on holidays for a couple of weeks, but since then, I've added support for reading Sprite files and modified my Iconsprites utility to accept sprite files.  This means that I can use the Chrome tools by Chris Wraight downloaded from drobe.  I haven't asked for permission to distribute them, but I can presumably just include a script to download and decompress them (or similar ones), when the time comes.&lt;br /&gt;&lt;br /&gt;The release of the Select documentation will allow me to add alpha sprite capability later, too, also a good thing.&lt;br /&gt;&lt;br /&gt;At the moment, I've lowered my sights somewhat from Firefox, to the example programs that come with GTK+.  Specifically, I'm trying to get the helloworld program to work.  The good news is that it seems that I can shoehorn ROLF into the structure of GTK without any modifications to the ROLF API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-116133397673320271?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/116133397673320271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=116133397673320271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/116133397673320271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/116133397673320271'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/10/progress.html' title='Progress'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-115830258855679455</id><published>2006-09-15T08:34:00.000+02:00</published><updated>2006-09-15T08:43:08.566+02:00</updated><title type='text'>Getting Firefox to build</title><content type='html'>Well, I've got a GTK2 library to build without any X source (and without any functionality, the ROLF backend consists of placeholders for the time being), and I want to get Firefox to build on top of that.  It's not as easy as I'd like, the X library headers seem to get pulled in whether or not it's using X.  It's been a decade since I had anything to do with COM, and there seems to be about 2000 COM interfaces in the tree.  When I've had a look through them, hopefully I'll be able to identify which libraries need to be patched.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-115830258855679455?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/115830258855679455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=115830258855679455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115830258855679455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115830258855679455'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/09/getting-firefox-to-build.html' title='Getting Firefox to build'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-115762702011586651</id><published>2006-09-07T12:44:00.000+02:00</published><updated>2006-09-07T13:04:25.553+02:00</updated><title type='text'>Still here</title><content type='html'>I'm not posting more often because (a) nobody's looking and (b) I have to reboot into Knoppix and use Mozilla Firefox to post. My base system is Linux From Scratch, this time built using ALFS, which doesn't do a lot, but I want to ensure that there are as few dependencies as possible for the basic system.&lt;br /&gt;&lt;br /&gt;The mplayer patch seems to work quite well with moderate sized videos (but needs DVD movies scaled down to a half original to be watchable).&lt;br /&gt;&lt;br /&gt;Next (after hunting down the show-stopper that meant I had to do this re-boot), I plan to install GDK in a special user's home directory and see what I can achieve with SVG and, possibly, some simple Gnome applications.&lt;br /&gt;&lt;br /&gt;If anyone is interested in having a copy of the source code, I can provide it via e-mail, if anyone wants to request it from simon dot willcocks at t-online dot de. The code will be released as (L)GPL. The whole lot is 12k lines of code, 360K uncompressed (78K compressed), plus a 528 line patch to MPlayer-1.0pre8.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-115762702011586651?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/115762702011586651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=115762702011586651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115762702011586651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115762702011586651'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/09/still-here.html' title='Still here'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-115714280289595719</id><published>2006-09-01T22:23:00.000+02:00</published><updated>2006-09-01T22:33:22.903+02:00</updated><title type='text'>MPlayer</title><content type='html'>Well, I gave up on SVG for the time being and decided to patch MPlayer to display movies using ROLF instead.&lt;br /&gt;&lt;br /&gt;It's simply a matter of adding a new Video Out driver that opens a window and displays each frame as it comes, detatching from the WIMP while the next frame is built so that other windows can do stuff.  The MPlayer software even takes care of the YUV to RGB translation transparently.  That took a couple of days, the last two days have been spent updating my LFS system to get proper audio (and a 2.6 kernel).  I've got to do that more often, so I don't forget how it works!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-115714280289595719?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/115714280289595719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=115714280289595719' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115714280289595719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115714280289595719'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/09/mplayer.html' title='MPlayer'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-115668459663496737</id><published>2006-08-27T14:49:00.000+02:00</published><updated>2006-08-27T15:16:36.643+02:00</updated><title type='text'>Alpha version available soon</title><content type='html'>I've been working on ROLF for some time, off and on, and I've got to the point where I'm almost willing to let other people have a look.&lt;br /&gt;&lt;br /&gt;The applications include the Iconbar and Filer, plus a simple image viewer for JPEG and PNG files (try some PNGs with transparency) and a terminal application (supporting ONE font and ONE screen size).&lt;br /&gt;&lt;br /&gt;Everything is very slow and flickery, even on a 2GHz machine, but fairly functional.  You don't want to have anything important running or edit important documents at the moment, though!&lt;br /&gt;&lt;br /&gt;Currently, I'm working on supporting SVG in the bitmap library (OK, the name's bad, I'll probably change it), but librsvg seems to want me to install an entire X windows system to get it to compile!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-115668459663496737?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/115668459663496737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=115668459663496737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115668459663496737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115668459663496737'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/08/alpha-version-available-soon.html' title='Alpha version available soon'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-115668280181688986</id><published>2006-08-27T11:31:00.000+02:00</published><updated>2006-08-27T14:46:41.850+02:00</updated><title type='text'>Architecture (in brief)</title><content type='html'>The basic ROLF software consists of three applications and two libraries:&lt;br /&gt;&lt;br /&gt;Wimp : the central process that all ROLF applications communicate with.  It manages the window stack and the on-screen pointer, handles inter-process messaging, and communicates with the input devices (keyboard and mouse).  Access to the Wimp is managed in a co-operative multi-tasking manner (as with RISC OS), with a couple of differences: firstly, applications can continue processing independently of the Wimp and, secondly, multiple applications may be asked to (re)draw non-overlapping rectangles of the screen simultaneously.&lt;br /&gt;&lt;br /&gt;Iconbar : this ROLF application must be run first by the Wimp (to be ready to provide its services to other applications, including the Filer) and provides the backdrop and iconbar functionality.&lt;br /&gt;&lt;br /&gt;Filer : this ROLF application provides a GUI representing the files on the system and handles loading or running of files and applications.  Filetypes will be stored in the Linux directory structure (initially as hidden files including the file type in their names) so that the types of all the files in a directory can be read in almost the same time as simply reading their names.&lt;br /&gt;&lt;br /&gt;Furniture library : a library linked with each ROLF application that handles window furniture (title bar, size icon, etc.) using the facilities provided by the Wimp.  Having a separate library should avoid feature creep in the Wimp, so that modifications to the Wimp should consist only of optimisations and support for additional hardware.&lt;br /&gt;&lt;br /&gt;Bitmap library: a library for handling images in an abstract way, so that the internal format of a bitmap need not be known by external software.  Source Images can be rendered to Destination Images, without having to know anything about the internal representations of either.  Pixels are nominally 16 bits each of Red, Green, Blue and Alpha, although most major operations will be optimised to use the minimum required.  Scalable images (SVG, DrawFiles and Fonts) are also handled by this mechanism.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-115668280181688986?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/115668280181688986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=115668280181688986' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115668280181688986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115668280181688986'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/08/architecture-in-brief.html' title='Architecture (in brief)'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33414002.post-115667102364020815</id><published>2006-08-27T08:55:00.000+02:00</published><updated>2006-08-27T15:24:24.836+02:00</updated><title type='text'>What ROLF is</title><content type='html'>ROLF is a GUI framework using the framebuffer device on Linux to provide a look and feel similar to that of the RISC OS operating system.&lt;br /&gt;&lt;br /&gt;The RISC OS GUI is largely unchanged in concept since the late 1980's, not because of any lack of development, but because it just worked, better in many people's opinion than any of its competitors, then and now.&lt;br /&gt;&lt;br /&gt;ROLF is not intended to take over from RISC OS, or even to run RISC OS native applications (although that may become possible with the use of Brandy, QEMU and a command line interpreter, among other things), but to allow Linux applications to be written or modified to work in the manner of the RISC OS GUI (with some newer twists, like translucent windows and preemptive scheduling, not to mention multi-gigahertz processors).&lt;br /&gt;&lt;br /&gt;Another aspect of RISC OS I would like to emulate is to keep the system lightweight and modular, so that it will work on devices with limited resources as well as highly powerful and resource-rich desktop machines.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33414002-115667102364020815?l=ro-lookandfeel.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ro-lookandfeel.blogspot.com/feeds/115667102364020815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33414002&amp;postID=115667102364020815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115667102364020815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33414002/posts/default/115667102364020815'/><link rel='alternate' type='text/html' href='http://ro-lookandfeel.blogspot.com/2006/08/what-rolf-is.html' title='What ROLF is'/><author><name>Simon</name><uri>http://www.blogger.com/profile/11289534660572407264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
