[Oberon] Oberon on the Raspberry Pi
Paul Onyschuk
blink at bojary.koba.pl
Fri Apr 11 11:09:48 CEST 2014
On Fri, 11 Apr 2014 03:22:25 +0200
eas lab <lab.eas at gmail.com> wrote:
> SDL2 doesn't seem to have USB-drivers, which seems strange.
> And rPi needs USB-drivers.
I don't have an idea what your are talking about. When you're using
SDL you don't need care about where input is coming from - this is what
abstractions are for. You deal with keyboard events such as key
presses and it doesn't matter if keyboard is connected via PS/2, USB or
Bluetooth. Mobile devices with on-screen keyboard are only exception
(I looked into it to get it running on Android), since input is exposed
by different API of SDL: text input is registered there instead of key
presses (e.g. letter H instead of shift+key h).
Anyway RISC Oberon should work out-of-box on most devices without any
changes to code. If it doesn't work for you under RPi you should check
simple demos and examples provided by SDL2 first, just to make sure
that keyboard/mouse work with those before touching emulator code.
> Since SDL 'interlinks' so many facilities: statically could be a
> problem?
It shouldn't be a problem in itself, just statically linked binary can
be huge, especially under Linux: statically linked xterm against libX11
is 4MB or so last time I checked. I know that one of the methods of
using SDL2 on Android includes static libraries, so it is probably
possible to do on other platforms.
> how many instructions has risc got?
> I'll check the mail which listed file sizes.
You can get listing of files with their sizes under Project Oberon by
using exclamation mark option, example:
System.Directory *!
I think numbers are bytes there. RISC.img is much bigger than needed -
it is intended to be used with SD card and 256MB for image is very
rational in this case (it is hard to find card smaller than that).
As far I understand 16 opcodes are reserved by RISC architecture
devised by Prof. Wirth. Common sense tells me (I could be wrong here,
since I didn't read too much about compiler itself yet) that
instructions could be stored in nibble (half of byte), which is hard to
beat when it comes to size of object files.
--
Paul Onyschuk
More information about the Oberon
mailing list