Joerg: after reading all the messages I am a bit unsure if I can take the Oberon RISC SD card and easily read/write its content under Windows, Linux, etc? Let me explain. We just released a product built around BeagleBone Black. It is shown on http://www.FemtoDAQ.com. It is a miniature data acquisition system. Users can acquire data files which then they process on a workstation of any kind. Users are able to conveniently transfer the data to their environments. They have lots of options for doing so. They can use a USB stick, or they can record an uSD card, or they can use Secure Copy and/or FileZilla over the net. The users can also connect the USB cable to the unit, which then behaves as it was a USB stick. (The directory pops up on the Windows screen.) Another option: The unit can also directly write to the host disks with NFS or samba. So the users have lots of possibilities. I was thinking of making a similar product running RISC Oberon. How can I get the data out of it? RISC Oberon does not support Internet. It does not support USB. So maybe I can use the SD card to transport the data. But is it convenient at all? I want to insert the Oberon-formatted SD card into the PC and I want to see the directory. A digital camera can create such an SD card. Can Oberon do the same? Neither I nor my customers want to use dd or something equally obscure. We want to drag-and-drop as usual. Is it possible? I am not sure. Could you explain? Thank you, Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Jörg Straube [joerg.straube@iaeth.ch] Sent: Saturday, February 13, 2016 5:03 PM To: paulreed@paddedcell.com Cc: ETH Oberon and related systems Subject: Re: [Oberon] RISC.img format Thanx Paul for the clarification. I wrote an Oberon program to copy files from or to the RISC.img file. This might be useful for people running eg Linz Oberon (on Windows) or RP de Jong 's RISC emulator on Mac to copy Windows or Mac files "easily" to FPGA ProjectOberon. Please mail me if you're interested. br Jörg
Am 13.02.2016 um 12:24 schrieb Paul Reed <paulreed@paddedcell.com>:
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
Wojtek Generally speaking with SW (even Oberon) you can do everything :-) My program as of now is not thought to be used like you want it. My first version I had was rather inline with your intention: I directly accessed the SD card from a hosted Oberon environment and emulated the ProjectOberon FS. I left that path, as I have a lot of environments (Oberon on Windows, Oberon on Mac, Oberon on XWindows, AOS on Windows, AOS on Mac...) and would have to rewrite on all environments the low layer access to the SD card, as it obviously depends on the underlying OS. So, I decided to access the SD card indirectly via file access to RISC.img. But indeed you still need dd or so to put/get this file to/from the SD card. So the answer to your question is "yes, can be done". But my code as of now will not (or only partly) help. BTW: a nice thing (depending on what you want to do of course) of RP de Jongs RISC5 emulator on Mac is, that the files you write in the RISC environment are directly Mac files. That's not the case in Peter de Wachter's emulator. br Jörg Gruss. Jörg
Am 15.02.2016 um 07:50 schrieb skulski@pas.rochester.edu:
Joerg:
after reading all the messages I am a bit unsure if I can take the Oberon RISC SD card and easily read/write its content under Windows, Linux, etc?
Let me explain. We just released a product built around BeagleBone Black. It is shown on http://www.FemtoDAQ.com. It is a miniature data acquisition system. Users can acquire data files which then they process on a workstation of any kind. Users are able to conveniently transfer the data to their environments. They have lots of options for doing so. They can use a USB stick, or they can record an uSD card, or they can use Secure Copy and/or FileZilla over the net. The users can also connect the USB cable to the unit, which then behaves as it was a USB stick. (The directory pops up on the Windows screen.) Another option: The unit can also directly write to the host disks with NFS or samba. So the users have lots of possibilities.
I was thinking of making a similar product running RISC Oberon. How can I get the data out of it? RISC Oberon does not support Internet. It does not support USB. So maybe I can use the SD card to transport the data. But is it convenient at all? I want to insert the Oberon-formatted SD card into the PC and I want to see the directory. A digital camera can create such an SD card. Can Oberon do the same?
Neither I nor my customers want to use dd or something equally obscure. We want to drag-and-drop as usual. Is it possible? I am not sure. Could you explain?
Thank you, Wojtek
________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Jörg Straube [joerg.straube@iaeth.ch] Sent: Saturday, February 13, 2016 5:03 PM To: paulreed@paddedcell.com Cc: ETH Oberon and related systems Subject: Re: [Oberon] RISC.img format
Thanx Paul for the clarification.
I wrote an Oberon program to copy files from or to the RISC.img file. This might be useful for people running eg Linz Oberon (on Windows) or RP de Jong 's RISC emulator on Mac to copy Windows or Mac files "easily" to FPGA ProjectOberon.
Please mail me if you're interested.
br Jörg
Am 13.02.2016 um 12:24 schrieb Paul Reed <paulreed@paddedcell.com>:
Dear Oberoners,
I've been asked a couple of questions about the RISC.img SD-Card image downloadable from http://projectoberon.com for the FPGA RISC5 Oberon systems. (If you can, please post questions publically rather than emailing me privately - otherwise I have to assume it's a private matter which is more time-consuming to deal with - if I can ever get to it - and doesn't benefit others.)
The RISC Oberon system boots from an SD-Card and uses it as its file system. This filesystem is much simpler than common contemporary filesystems such as FAT, FAT32, NTFS, exFAT, EXT4 etc. and is not in any way compatible. (On the original Ceres, the backup floppy disk format was very close to the FAT12 format, but with an altered directory to cope with long filenames, which were not in those days supported on FAT).
It would have been easy to make the RISC5 Oberon filesystem (including its reserved area for the bootfile) begin at offset 0 from the beginning of the SD-Card. This would have dedicated the SD-Card to Oberon use, but simplified the bootloader.
Or alternatively, the Oberon filesystem could have perhaps been stored as a file in the FAT filesystem on the SD-Card, making it much more accessible to utilities running on other computers. But this convenience would have come at a high cost: it would have made the bootloader much more complicated, and given many more possibilities for distracting problems in development.
In the end, it was decided to place the Oberon filesystem at a fixed offset from the beginning of the disk. This was a trivial change to the bootloader, keeping it easily-understandable and within one block ram (BRAM) of the FPGA.
This meant that FAT-compatible data structures, and a reasonable-size and perhaps useful (256MB) FAT partition could still exist at the beginning of the disk. If this FAT partition has nothing in it, it compresses very well and therefore does not significantly increase the RISC.img download time.
The MBR partition id for the Oberon filesystem was chosen as 0FFh, because the ids are historically rather a free-for-all and the filesystem is not exactly the same format as any that have gone before, even the ETH PC-based Oberon filesystems. 0FFh is clearly an arbitrary value, and also was only used by others for private data structures rather than for filesystems which were interoperable amongst systems.
Note that a lot of the motivation for this was defensive. For example it makes it more difficult for the Oberon filesystem to be destroyed when the SD-Card is inserted in a Windows system.
When submitting some early additions to Peter de Wachter's RISC emulator
https://github.com/pdewacht/oberon-risc-emu
for emulated RS232 file transfer which he kindly incorporated, I also included a quick check on startup which allows the use of a disk image which only contains the Oberon file system (called .OBERON.FS in the Windows binary distribution of the emulator which I put on http://projectoberon.com).
This check is for the magic number 9B1EA38DH (FileDir.DirMark) which is at the beginning of the root directory sector. Oberon uses a "parity" scheme for sector numbers, making all of them divisible by 29, so the first usable Oberon sector, number 29, begins at SD-Card sector offset 80002H. This slightly odd value comes from the fact that SD-Cards have 512-byte sectors, but Oberon uses two of these (1K) for each Oberon sector, and that sector 0 is not used.
So if you are using a nice operating system and you know what you are doing (because it allows dangerous commands such as dd) you can extract the Oberon file system from the image with a command like (262145 = 40001H = 80002H * 512 DIV 1024)
dd if=RISC.img of=.OBERON.FS obs=1024 ibs=1024 skip=262145
and you can even (sudo) write it directly back to a real SD-Card with something like
dd if=.OBERON.FS of=/dev/disk1 obs=1024 ibs=1024 seek=262145
The name .OBERON.FS was chosen to make it look like a system file, which would be totally destroyed if someone opened it and saved it with a text editor, for example.
Hope that's useful! Cheers, Paul
Am 15.02.2016 um 07:50 schrieb skulski@pas.rochester.edu:
We just released a product built around BeagleBone Black. It is shown on http://www.FemtoDAQ.com. It is a miniature data acquisition system.
Very interesting. What operating system are you running on the BeagleBone and how are you running oberon, as compiled via a compiler, or emulated oberon? Which oberon are you using since there are so many variants?
On Sun, February 14, 2016 11:50 pm, skulski@pas.rochester.edu wrote:
I was thinking of making a similar product running RISC Oberon. How can I get the data out of it? RISC Oberon does not support Internet. It does not support USB.
Back in 2001 I had this problem with a tablet computer that did not have USB, did not have pretty much anything since it was 2001. I transfered the files over a serial cable using an infamous Microsoft tool that allowed file transfers over a serial cable. Not sure if RISC oberon could transfer a file over ps/2, or serial, if it even has the old serial style option. The tablet also had an infrared file transfer ability, but it was buggy and didn't work half the time, so I preferred the serial cable file transfer. Since you are planning on building it with RISC oberon, what hardware are you going to use? the $99 product ? http://www.saanlima.com/pepino/index.php?title=Welcome_to_Pepino
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Lars Sent: Monday, 15 February 2016 9:28 PM To: ETH Oberon and related systems Subject: Re: [Oberon] RISC.img format
Not sure if RISC oberon could transfer a file over ps/2, or serial, if it even has the old serial style option.
Yes - it has the old serial style option. We use a 115000 baud RS232 serial link to upload compiled Oberon modules from the Astrobe development system to the targte system to be executed. This works with all of the five different RISC5 boards that we currently support. Some RISC5 boards also have a new serial style option that is commonly found these days on ARM- based boards. i.e. the serial link is via a USB bridge. The same cable that powers the RISC5 board can be used for file transfers so only one cable connection from the PC to the board is required. RISC5 developmemt turnaround time is rapid compared to ARM embedded development. Compiles take milliseconds - the speed is partly due to Oberon's pre-compiled symbol file import system. A significant advantage of Oberon over many other systems is there is no *static* link/load operation required. The resulting Oberon object files are automatically *dynamically* linked very efficiently by the Project Oberon OS. Any imported modules that already exist on the target are reused. Hence the executables to be uploaded are miniscule - most serial uploads during a normal edit-compile-run cycle are virtually instantaneous. Regards, Chris Burrows CFB Software http://www.astrobe.com/RISC5
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of skulski@pas.rochester.edu Sent: Monday, 15 February 2016 5:20 PM To: joerg.straube@iaeth.ch Cc: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] RISC.img format
I want to insert the Oberon-formatted SD card into the PC and I want to see the directory.
You can write software that will do that. I used BlackBox Component Pascal but you could use Gardens Point Component Pascal (GPCP), Delphi, C# or whatever is your favourite Windows programming language. As long as it can make calls to the Windows API. For source code snippets see my post (9th Jan 2015) in this mailing list with the subject: [Oberon] Project Oberon - Copying files to the SD card https://lists.inf.ethz.ch/pipermail/oberon/2015/007966.html
Neither I nor my customers want to use dd or something equally obscure. We want to drag-and-drop as usual. Is it possible? I am not sure. Could you explain?
Yes - achieving drag and drop functionality is quite straightforward. For example, the key lines of GPCP code that we use in Astrobe's drag/drop event handlers for opening Oberon source code modules are: DragEnter event: IF e.get_Data().GetDataPresent(Wfm.DataFormats.FileDrop, FALSE) THEN e.set_Effect(Wfm.DragDropEffects.All) END DragDrop event: fileList := e.get_Data().GetData(Wfm.DataFormats.FileDrop)(Sys.Array); where: * Wfm is an alias for System.Windows.Forms * filelist is of type System.Array * e (of type Wfm.DragEventArgs) is a parameter of the DragDrop event handlers. Regards, Chris Burrows CFB Software http://www.cfbsoftware.com/GPCP
participants (4)
-
Chris Burrows -
Jörg Straube -
Lars -
skulski@pas.rochester.edu