Re: PilOS on 32-bit Arm Cortex-A9
Hi Robert, > I have a few TV sticks laying around running Android, but they have a > microSD slot, which you can boot a Linux image from. I am thinking on > learning ARM programming, since so many IOT devices, small netbooks and > tablets use these processors. How hard would it be to turn the work on > PilOS into a 32-bit PicoLisp running on specifically an ARM Cortex-A9 dual > core with a Mali400 GPU? PilOS is strictly 64-bit. It won't run on a 32-bit architecture. I would take miniPicoLisp. It can also be built as a stand-alone embedded system, see http://picolisp.com/wiki/?miniCodeROM > A bootable microSD image for the TV stick. Am I > biting off way too much here? How hard would implementing networking be, as > there is none on the 64-bit PilOS right now. Thanks! The same challenge you would have on mini :) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS - File I/O and OpenGL
Hi Rob, How would you even start to write a VGA driver/device in PicoLisp or pil-assembly? Ha! I just found an old version of RcSim, from 1991, running on DOS, using 16-color VGA graphics (and also one using B/W CGA ;). I didn't remember at all that I had already implemented all that stuff back then. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS - File I/O and OpenGL
Hi Rob, I'll check those out. Is Lisp, PicoLisp or Common Lisp above? What do you mean with above here? I am guessing RCSim is the RC simulator? I was not aware of it before your Yes. Unfortunately, the README file is no longer part of the PicoLisp distribution. Let me put some excerpts here: It is all implemented within the PicoLisp system, so that no additional libraries like OpenGL or GL4Java are needed. It may be regarded as a proof of concept, because a flight simulator is one of the least typical things to do in Lisp. The plane is similar to the German WW-I aircraft Fokker D-VII (and a bit to the British Sopwith Camel ;-). Though the user's position is that of a model plane's pilot (i.e. viewing the plane from a fixed position), all parameters like dimensions, mass, engine power and flight data are intended to be as close as possible to a real Fokker D-VII. Unfortunately, some of these parameters are not known exactly, but it is a fun project anyway, and I hope it comes close. You start it (pil64 only) as $ pil /usr/share/picolisp/misc/rcsim.l -main -go + This opens a new XWindow. Put it on your desktop into a position where you can *also* see the XTerm where you started it from. Set the keyboard focus to the XTerm, i.e. where you now have a ':' REPL prompt. The simulator is controlled by the following 10 keys: - The cursor (arrow) keys UP and DOWN control the elevator - The LEFT and RIGHT cursor keys control the combined rudder/ailerons - The HOME key sets full throttle - PAGE UP/DOWN increase/decrease the throttle - The END key turns the engine off - INS/DEL zoom in/out For a first flight, just hit the HOME key as the plane sits waiting on the runway, and watch it accelerate. After some time, when it starts to jump a bit nervously, give a little up-elevator (the DOWN arrow key) to gain height. Then hit the PAGE DOWN key once or twice to decrease the throttle, and cautiously experiment with with the arrow keys. There should really be an article about that in picolisp.com :( reference. Hobby, or did you contribute to it? That would be a great app to Both (hobby, and I wrote it ;) port covering graphics, math, realtime (soft realtime?) and all of the logistics that entails. Would you stick with z3d.l or create something wholly new? Sounds exciting. Yes, lib/z3d.l would have to be rewritten. But that's by far not the problem. Rather trivial. The REAL problem is to get a decent Video mode (SVGA?, VESA?, XGA?) working on PilOS. Seems to be a lot of trouble. See e.g. http://wiki.osdev.org/How_do_I_set_a_graphics_mode http://wiki.osdev.org/Getting_VBE_Mode_Info http://wiki.osdev.org/VGA_Hardware http://wiki.osdev.org/VGA_Resources Here we surely have the same problems as with the BIOS compatibility issues during boot. Supporting a variety of graphics cards (simulated or real) is a nightmare. And sticking with the minimal standard VGA might be easier, but then resolution and color depth are not satisfactory. Anybody willing to help? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS - File I/O and OpenGL
Hi Robert, I tried saving a file (3dtext.l) to the misc directory in PilOS, but I could not see it when using the (dir misc). I am suspecting I need to write it and save it from within PilOS? You can put a file into a directory while building the PilOS image: Enter the path in pilos/lib/init.l into the global *IniFiles, and create that file in pilos/init/. All files which have a 'T' in *IniFiles are automatically 'loaded' when PilOS boots. You may also add it to 'initFiles' in pilos/Makefile, but this is needed only for the (temporal) dependency. And, yes, you can also create a file at runtime, using 'out' just like in normal PicoLisp. : (out my/path/file.l (println ...) (println ...) ..) How to add a library to PilOS such as the OpenGL one that is native to the 64bit PicoLisp distribution? Do you have to add it to the source and recreate the img file? This is rather meaningless. You can't execute a library written for Linux (or any other operating system) under PilOS. For example, you would first need the whole X11 system. Then you would need a loader program which reads those libraries into memory, relocates them, and links them with other libraries. And even then it would not work, as the calling conventions, register usage (the ABI) are different. So you must first port X11 and OpenGL to PilOS. A surely interesting task ;) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS - File I/O and OpenGL
On Fri, Jul 24, 2015 at 04:30:53PM +0200, Alexander Burger wrote: So you must first port X11 and OpenGL to PilOS. A surely interesting task ;) .. especially as there is no C compiler yet (and probably also not in the future). So it must be done in Lisp and/or pil-assembly. Of course a full X11 is not needed. A possible first step might be getting the flight simulator (in misc/rcsim.l) up and running. The only library it uses is @lib/z3d.l which - though in C - does no more than writing single pixels into a window. This could perhaps be rewritten to write those pixels directly to the frame buffer. Still a daunting task ... ;) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS - File I/O and OpenGL
Hi Rob, I'll keep hacking away at it, since the payoffs are big for me from a learning perspective. Good :) And you brought me to the idea of porting RcSim :) I think I'll investigate that more. This should be the first real application in PilOS. When you say @lib/z3d.l is in C, if I wanted to learn how to build upon PilOS, would it be preferable to use pil-assembly or Lisp (PicoLisp, I assume)? I would start on the Lisp level. Only low-level and time-critical parts need to be done in assembly. Can I learn pil-assembly from the source files, or do you have a reference somewhere? The only reference is in doc64/asm. It describes the virtual PicoLisp machine and its instruction set. The ultimate documentation are the sources in src64/*.l and (as a modification of those) in pilos/src/*.l. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Good to hear! Happy to help. On Thu, Jul 23, 2015 at 11:21 AM, Robert Herman rpjher...@gmail.com wrote: Joe, Thanks! That did it. I was trying different versions of Qemu sequentially, and hopping around, and could not get one past that 09 error. I have no regrets of jumping down the rabbit hole though, since I have learned heaps about DMA and qemu, and I have even started to look into Alex's code. Now, back to PilOS!!! Rob On Tue, Jul 21, 2015 at 7:18 PM, Joe Bogner joebog...@gmail.com wrote: Hi Rob, I'm using qemu-2.0.9.1 on win64 with pilos and it works fine I downloaded it from here: http://qemu.weilnetz.de/w64/qemu-w64-setup-20140715.exe Later versions, including qemu-w64-setup-20150503.exe did not run for me Hope that helps On Mon, Jul 20, 2015 at 6:10 AM, Robert Herman rpjher...@gmail.com wrote: I tried several, and when I finally tried version 2.2.90 for windows 64 bit, It went past that error and went to a 'READ ERROR 09' Is that a 09h Attempt to DMA over 64kb boundary using the same Wiki reference you supplied in a previous posting? How can I fix it or keep moving on? Where do I look in the source to troubleshoot this myself? Exciting fun anyhow, so no complaints here! Rob On Mon, Jul 20, 2015 at 1:32 PM, Alexander Burger a...@software-lab.de wrote: Hi Robert, First, I would like to donate some money anyway, seeing how much fun I have had with PicoLisp and PilOS. Thanks, that's very nice! But don't worry, that's not what I'm looking for. I need some stable, long-term project(s) ;) Second, I get a 'Guest has not initialized the display (yet).' when trying to run PilOS in qemu on my i5 Windows 8.1 64bit machine. Any steps I am missing? I am a qemu newbie, and PilOS newbie. I did a short search on the web, and it seems this error appears in qemu in other situations too. Not only on Windows, but also on other guest operating systems. I have no idea what might be the reason. PilOS simply uses the standard VIDEO memory (VGA) on hardware address 0xB8000. Can you try another version of qemu? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Joe, Thanks! That did it. I was trying different versions of Qemu sequentially, and hopping around, and could not get one past that 09 error. I have no regrets of jumping down the rabbit hole though, since I have learned heaps about DMA and qemu, and I have even started to look into Alex's code. Now, back to PilOS!!! Rob On Tue, Jul 21, 2015 at 7:18 PM, Joe Bogner joebog...@gmail.com wrote: Hi Rob, I'm using qemu-2.0.9.1 on win64 with pilos and it works fine I downloaded it from here: http://qemu.weilnetz.de/w64/qemu-w64-setup-20140715.exe Later versions, including qemu-w64-setup-20150503.exe did not run for me Hope that helps On Mon, Jul 20, 2015 at 6:10 AM, Robert Herman rpjher...@gmail.com wrote: I tried several, and when I finally tried version 2.2.90 for windows 64 bit, It went past that error and went to a 'READ ERROR 09' Is that a 09h Attempt to DMA over 64kb boundary using the same Wiki reference you supplied in a previous posting? How can I fix it or keep moving on? Where do I look in the source to troubleshoot this myself? Exciting fun anyhow, so no complaints here! Rob On Mon, Jul 20, 2015 at 1:32 PM, Alexander Burger a...@software-lab.de wrote: Hi Robert, First, I would like to donate some money anyway, seeing how much fun I have had with PicoLisp and PilOS. Thanks, that's very nice! But don't worry, that's not what I'm looking for. I need some stable, long-term project(s) ;) Second, I get a 'Guest has not initialized the display (yet).' when trying to run PilOS in qemu on my i5 Windows 8.1 64bit machine. Any steps I am missing? I am a qemu newbie, and PilOS newbie. I did a short search on the web, and it seems this error appears in qemu in other situations too. Not only on Windows, but also on other guest operating systems. I have no idea what might be the reason. PilOS simply uses the standard VIDEO memory (VGA) on hardware address 0xB8000. Can you try another version of qemu? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
Re: PilOS
Thanks for the boost, Alex. I'll do some work on my own now, and get back to you. I am going to try more qemu versions, then I am going to try modifying or rewriting the bios file in qemu to see if I can bypass this limit. I guess it is trying to emulate the x86-64 architecture to the bit, so maybe as a vm the 64kb limit is not needed? Another thought I had was designing my own hardware in the vm along the lines of PilMCU. I am by no means qualified to do so (yet!), but that's the fun isn't it? 64bit is the kicker, since I have some 32 bit boards lying around, and an FPGA proto board. Rob On Mon, Jul 20, 2015 at 9:26 PM, Alexander Burger a...@software-lab.de wrote: On Mon, Jul 20, 2015 at 08:30:01PM +0800, Robert Herman wrote: Is there a way to change a qemu bios file config? The man page of qemu-system says QEMU uses the PC BIOS from the Seabios project and the Plex86/Bochs LGPL VGA BIOS. But there is also a -bios file option. I haven't tried. Could I change beg.l to load it in segments, or would it still require a 670kb read to put it together again? This is surely possible, but quite tedious. You would have to modify the 'DAP' structure (starting at line 87) for varying Start sectors, Offsets and smaller Number of sectors values, and call int 13h repeatedly. So you could read it all in e.g. 11 pieces, each = 64 KiB. Perhaps not worth the effort ... ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Hi Rob, I'm using qemu-2.0.9.1 on win64 with pilos and it works fine I downloaded it from here: http://qemu.weilnetz.de/w64/qemu-w64-setup-20140715.exe Later versions, including qemu-w64-setup-20150503.exe did not run for me Hope that helps On Mon, Jul 20, 2015 at 6:10 AM, Robert Herman rpjher...@gmail.com wrote: I tried several, and when I finally tried version 2.2.90 for windows 64 bit, It went past that error and went to a 'READ ERROR 09' Is that a 09h Attempt to DMA over 64kb boundary using the same Wiki reference you supplied in a previous posting? How can I fix it or keep moving on? Where do I look in the source to troubleshoot this myself? Exciting fun anyhow, so no complaints here! Rob On Mon, Jul 20, 2015 at 1:32 PM, Alexander Burger a...@software-lab.de wrote: Hi Robert, First, I would like to donate some money anyway, seeing how much fun I have had with PicoLisp and PilOS. Thanks, that's very nice! But don't worry, that's not what I'm looking for. I need some stable, long-term project(s) ;) Second, I get a 'Guest has not initialized the display (yet).' when trying to run PilOS in qemu on my i5 Windows 8.1 64bit machine. Any steps I am missing? I am a qemu newbie, and PilOS newbie. I did a short search on the web, and it seems this error appears in qemu in other situations too. Not only on Windows, but also on other guest operating systems. I have no idea what might be the reason. PilOS simply uses the standard VIDEO memory (VGA) on hardware address 0xB8000. Can you try another version of qemu? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
On Tue, Jul 21, 2015 at 03:26:03PM +0800, Robert Herman wrote: Thanks for the boost, Alex. I'll do some work on my own now, and get back to you. I am going to try more qemu versions, then I am going to try modifying or rewriting the bios file in qemu to see if I can bypass this limit. Yes, but still strange why qemu differs so much. I never had any problem, and, it seems, other people too. I guess it is trying to emulate the x86-64 architecture to the bit, so maybe as a vm the 64kb limit is not needed? If the error diagnosis is correct, it is only the DMA transfer by this special BIOS which is limited to 64 KiB. And - I suspect - if it fails so early, the following code will give problems too ;) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
I tried several, and when I finally tried version 2.2.90 for windows 64 bit, It went past that error and went to a 'READ ERROR 09' Is that a 09h Attempt to DMA over 64kb boundary using the same Wiki reference you supplied in a previous posting? How can I fix it or keep moving on? Where do I look in the source to troubleshoot this myself? Exciting fun anyhow, so no complaints here! Rob On Mon, Jul 20, 2015 at 1:32 PM, Alexander Burger a...@software-lab.de wrote: Hi Robert, First, I would like to donate some money anyway, seeing how much fun I have had with PicoLisp and PilOS. Thanks, that's very nice! But don't worry, that's not what I'm looking for. I need some stable, long-term project(s) ;) Second, I get a 'Guest has not initialized the display (yet).' when trying to run PilOS in qemu on my i5 Windows 8.1 64bit machine. Any steps I am missing? I am a qemu newbie, and PilOS newbie. I did a short search on the web, and it seems this error appears in qemu in other situations too. Not only on Windows, but also on other guest operating systems. I have no idea what might be the reason. PilOS simply uses the standard VIDEO memory (VGA) on hardware address 0xB8000. Can you try another version of qemu? ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Hi Rob, I tried several, and when I finally tried version 2.2.90 for windows 64 bit, It went past that error and went to a 'READ ERROR 09' Is that a 09h Attempt to DMA over 64kb boundary using the same Wiki reference you supplied in a previous posting? Yes, indeed. And interesting: This seems to be the first time that error number 09 appears. How can I fix it or keep moving on? Where do I look in the source to troubleshoot this myself? Exciting fun anyhow, so no complaints here! The place where this happens is pilos/x86-64/beg.l, line 26 ff mov $DAP, %si # Disk Address Packet mov $0x42, %ah# Extended Read Sectors int $0x13 # Drive interrupt jc readError This is the standard BIOS call to read a given number of sectors from a drive. https://en.wikipedia.org/wiki/INT_13#INT_13h_AH.3D43h:_Extended_Write_Sectors_to_Drive This above error is correct, in that indeed more than 64 KiB are being read from the drive (the size of PilOS is 670 KiB currently). So the BIOS which is emulated in your version of Qemu somehow cannot handle it. Unfortunately, I don't know of any other way, except from writing your own BIOS. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Wow, thanks. It's trying to read in the entire thing 670kb of PicoLisp. I'll try other versions of qemu. There are a few between this one and the others that failed. Is there a way to change a qemu bios file config? Could I change beg.l to load it in segments, or would it still require a 670kb read to put it together again? Thanks. Rob On Mon, Jul 20, 2015 at 6:33 PM, Alexander Burger a...@software-lab.de wrote: Hi Rob, I tried several, and when I finally tried version 2.2.90 for windows 64 bit, It went past that error and went to a 'READ ERROR 09' Is that a 09h Attempt to DMA over 64kb boundary using the same Wiki reference you supplied in a previous posting? Yes, indeed. And interesting: This seems to be the first time that error number 09 appears. How can I fix it or keep moving on? Where do I look in the source to troubleshoot this myself? Exciting fun anyhow, so no complaints here! The place where this happens is pilos/x86-64/beg.l, line 26 ff mov $DAP, %si # Disk Address Packet mov $0x42, %ah# Extended Read Sectors int $0x13 # Drive interrupt jc readError This is the standard BIOS call to read a given number of sectors from a drive. https://en.wikipedia.org/wiki/INT_13#INT_13h_AH.3D43h:_Extended_Write_Sectors_to_Drive This above error is correct, in that indeed more than 64 KiB are being read from the drive (the size of PilOS is 670 KiB currently). So the BIOS which is emulated in your version of Qemu somehow cannot handle it. Unfortunately, I don't know of any other way, except from writing your own BIOS. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
On Mon, Jul 20, 2015 at 08:30:01PM +0800, Robert Herman wrote: Is there a way to change a qemu bios file config? The man page of qemu-system says QEMU uses the PC BIOS from the Seabios project and the Plex86/Bochs LGPL VGA BIOS. But there is also a -bios file option. I haven't tried. Could I change beg.l to load it in segments, or would it still require a 670kb read to put it together again? This is surely possible, but quite tedious. You would have to modify the 'DAP' structure (starting at line 87) for varying Start sectors, Offsets and smaller Number of sectors values, and call int 13h repeatedly. So you could read it all in e.g. 11 pieces, each = 64 KiB. Perhaps not worth the effort ... ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Alex, First, I would like to donate some money anyway, seeing how much fun I have had with PicoLisp and PilOS. Second, I get a 'Guest has not initialized the display (yet).' when trying to run PilOS in qemu on my i5 Windows 8.1 64bit machine. Any steps I am missing? I am a qemu newbie, and PilOS newbie. I used the line from the PilOS page: qemu-system-x86_64..exe -m 4096 -ctrl-grab -no-reboot x86-64.img Great work! Rob On Thu, Jul 16, 2015 at 12:29 AM, Alexander Burger a...@software-lab.de wrote: On Wed, Jul 15, 2015 at 11:05:42AM -0400, Rick Lyman wrote: Which board would you like to start with? Suggestions? As I said, this is in the far future. And - as nobody is going to pay for it - this will not be too soon, I'm afraid. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Hi Rick, In the future, we might think of utilizing it in embedded systems Meaning ARM boards? Yes, this too. But first pil64 must be ported to ARMv8. This is on my todo list since a long time, but I don't have the necessary hardware. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
Which board would you like to start with? On Wed, Jul 15, 2015 at 10:55 AM, Alexander Burger a...@software-lab.de wrote: Hi Rick, In the future, we might think of utilizing it in embedded systems Meaning ARM boards? Yes, this too. But first pil64 must be ported to ARMv8. This is on my todo list since a long time, but I don't have the necessary hardware. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS
On Wed, Jul 15, 2015 at 11:05:42AM -0400, Rick Lyman wrote: Which board would you like to start with? Suggestions? As I said, this is in the far future. And - as nobody is going to pay for it - this will not be too soon, I'm afraid. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS Boot Issues
On Mon, Jun 29, 2015 at 08:02:06PM +0200, Alexander Burger wrote: It seems that virtualbox doesn't support BIOS 0x13 interrupts for Extended Read Sectors calls. It still freezes on the black screen Loading PilOS We guessed that from the fact that this message appears, but not the following Checking long mode. And, for Virtual PC, we get a READ ERROR 01 which means Invalid command (https://en.wikipedia.org/wiki/INT_13). Same. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: PilOS Boot Issues
Hi Joe, The new version boots fine on qemu under windows 7 x64. Under virtualbox on the same platform, get stuck with a black screen that says Loading PilOS with nothing else displayed For the mailing list: We discussed this in IRC just now. It seems that virtualbox doesn't support BIOS 0x13 interrupts for Extended Read Sectors calls. It still freezes on the black screen Loading PilOS We guessed that from the fact that this message appears, but not the following Checking long mode. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe