stuporhero
Posts: 125
Joined: Fri Aug 19, 2011 2:02 pm

Re: Thinking of rolling a distro - 8 bit style!

Fri Aug 19, 2011 3:09 pm

Hi all,

I've been thinking about building a distro based specifically for the raspberry-pi, with an interface based around the spectrum +2 interface. It will be a very basic interface comprising of a menu that allows you to pick a program to run, start a python interpreter or start a web browser (that is all!) after the Linux kernel (and excluding the browser) the entire system will be python-based, possibly with a .pi extension for raspberry-pi python files! :D

Would this gather any interest with you guys?

Cool.Majkl
Posts: 15
Joined: Thu Aug 18, 2011 9:10 am

Re: Thinking of rolling a distro - 8 bit style!

Fri Aug 19, 2011 3:18 pm

Hi. I find it as a nice idea and i would really like to try it on my future RasPi. Every extra distro is plus for RasPi, especialy Raspberry Pi "excluvise" ;)

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4118
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Thinking of rolling a distro - 8 bit style!

Fri Aug 19, 2011 3:51 pm

that would be quite nice but add a Sinclair BASIC emulator to it too :)

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Thinking of rolling a distro - 8 bit style!

Fri Aug 19, 2011 6:19 pm

Quote from ukscone on August 19, 2011, 16:51
that would be quite nice but add a Sinclair BASIC emulator to it too :)

ZX or Speccy? (There's both along with Jupiter emulation available for the Linux side of things that should work well on this platform.)

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4118
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Thinking of rolling a distro - 8 bit style!

Fri Aug 19, 2011 6:55 pm

Quote from Svartalf on August 19, 2011, 19:19
Quote from ukscone on August 19, 2011, 16:51
that would be quite nice but add a Sinclair BASIC emulator to it too :)

ZX or Speccy? (There's both along with Jupiter emulation available for the Linux side of things that should work well on this platform.)

i wonder if there is any way to hook up a speccy dead flesh rubber keyboard to the R-Pi -- i really wish i could find out if that speccy bluetooth keyboard ever got made and is for sale anywhere

stuporhero
Posts: 125
Joined: Fri Aug 19, 2011 2:02 pm

Re: Thinking of rolling a distro - 8 bit style!

Sun Aug 21, 2011 10:56 pm

Spectrum basic could be a possibility: I've taken a look at the ROM disassembly and could try porting it to Python (the whole system will be Python based) add a lookup table and screen emulation and I don't see why not?

It wouldn't handle machine code though... I'd probably ask the author nicely about porting vbSpec if that was the case!

Screenshot (early progress)


The menu works, no sound or anything after selecting an item though. Learning Python 2 as I go along (Python 2 has PyGame!)

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Thinking of rolling a distro - 8 bit style!

Wed Aug 24, 2011 11:03 pm

Ow... Python... You DO realize that while it's Turing complete, you don't want to be relegating an emu to it, right? I'd have the base UI framework driven by that and relegate the heavy load-lifting to C/C++ or similar.

stuporhero
Posts: 125
Joined: Fri Aug 19, 2011 2:02 pm

Re: Thinking of rolling a distro - 8 bit style!

Thu Aug 25, 2011 11:34 am

It's more of a compatibility layer. Think Wine in Linux with a whole lot less complexity!
The top level menu will call Linux binaries so I could potentially install any half decent Spectrum emulator and just call it as a new process in Python. (At least to get it working!)

Once I'm happy with Python I'll turn my attentions to the C programming language...

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Thinking of rolling a distro - 8 bit style!

Thu Aug 25, 2011 5:27 pm

That's not a compatibility layer...that's a UI, like I mentioned... ;)

Chunkmeister
Posts: 4
Joined: Sun Aug 28, 2011 8:03 pm
Contact: Website

Re: Thinking of rolling a distro - 8 bit style!

Sun Aug 28, 2011 10:06 pm

If you're looking for ZX Spectrum "inspiration", check out here...
http://tarjan.uw.hu/zxclones_en.htm
Some interesting info on how people have hacked about with the Speccy hardware, and created their own hardware versions. (yes I know it's mainly hardware...)

I know there'll be a great emulator eventually for the Pi (I can feel it - lol) but maybe there's something there to inspire you.

nrdb
Posts: 13
Joined: Fri Jul 29, 2011 5:35 am

Re: Thinking of rolling a distro - 8 bit style!

Fri Sep 09, 2011 12:06 am

I think this would be great.

What might work good is a simple UI (maybe done in python and GTK+) that has some icons on it to do a small set of specific actions)

As this is probably going to be used to teach programming, one thing that should probably be done is a module to access the Ras.Pi GPIO etc.

A simplified file IO module would be good, so that the user can only save/load from a safe place (e.g. a USB drive) and not overwrite/delete any system files. You for sure don't want to be able to
----------------------
import os
os.chdir("/etc")
os.remove("*")
----------------------

A BASIC interpreter would be good too. It would also be good to have some extensions for the Pas.Pi GPIO etc.

iAreNewb
Posts: 59
Joined: Sun Aug 28, 2011 4:27 pm

Re: Thinking of rolling a distro - 8 bit style!

Fri Sep 09, 2011 2:37 am

File IO libraries should be available via Linux headers, a secondary API as a custom, simplified interface should be reasonable; however, users need to be able to access system files, and anyways, they should be restricted by file permissions or processes that have locked said files during usage.

A BASIC interpreter would be a bit pointless, IMO; it teaches an outdated syntax with a limited range of modern practices and extensions (more advanced libraries, OOP, functional programming, different type systems, etc.), so I would instead suggest that a group of programming languages are available, all with interfaces to the custom distro's secondary API (that sits on top of Linux code). I would personally suggest Python, Perl, Lisp (or maybe Haskell?), C++, and all major Web scripting languages (HTML5, JS, CSS, PHP, etc. [since these don't require a compiler/interpreter, the associated software would probably be server hosting and a WYSIWYG editor]).

Granted, that's probably a bigger and more unreasonable task to ask for, but it's much more convenient and applicable.

nrdb
Posts: 13
Joined: Fri Jul 29, 2011 5:35 am

Re: Thinking of rolling a distro - 8 bit style!

Fri Sep 09, 2011 4:40 pm

I think we need a simple system to teach people starting in computer programming. Like write a program to convert Celsius to Fahrenheit. Not design a Web-Site. You could have a web-site giving tutorials on programming.

If someone can program in C++ that person will want a full blown OS, with all the libraries. Not some simplified cut down system.

You can always change the CD card to swap between a simple 'learners' version and a full system.

stuporhero
Posts: 125
Joined: Fri Aug 19, 2011 2:02 pm

Re: Thinking of rolling a distro - 8 bit style!

Sat Sep 10, 2011 2:18 pm

Yeah I agree on the KISS principle here. If we're concerned about people hacking system files in Python we could always chroot jail it...

iAreNewb
Posts: 59
Joined: Sun Aug 28, 2011 4:27 pm

Re: Thinking of rolling a distro - 8 bit style!

Sun Sep 11, 2011 5:16 am

What I'm saying is that more language choice and freedom to fiddle with system files is exactly what people can't get in most conventional systems. Windows is obviously huge, bloated, and difficult to modify, but even Linux is gigantic, containing MB of source code. We could simplify the OS calls and file system, so that newbie programmers can easily redesign the GUI or optimize the file system, for instance.

These suggestions are definitely not aimed at expert programmers; exactly the opposite. Python and Perl are equally good for tiny and elegant solutions, and are not very often the basis for an entire OS/driver. However, novice and intermediate hackers would benefit greatly from a simple, clean interface with wide language choice and easy kernel access (a cleaner interface than conventional *nix, regardless of whether or not the OS is in fact *nix-based). If it is possible, this secondary API would support relatively simple options and modifications for network comms, the file system, drivers, and the GUI.

P.S. *cough* RaspberryPy *cough*

stuporhero
Posts: 125
Joined: Fri Aug 19, 2011 2:02 pm

Re: Thinking of rolling a distro - 8 bit style!

Sun Sep 11, 2011 10:45 am

I see where you're going, which is why I thought of using Python and PyGame. With a few RaspberryPi libraries (i.e. one to figure out which screen size you're using and scale interfaces proportionally, etc.) you could craft any interface you want. I have a demo Spectrum menu system written in Python/Pygame - I'll happily post somewhere if you want to take a look (nb it's not PEP8 coded yet!) and playing with an interface similar to the Amiga Workbench :D

P.S. *cough* RaspberryPy *cough*
Hell, we could have a Python Package format (literally a zipped Python app) and give it the .pi extension :D

Return to “Other projects”