Raspberry Pi and the MagPi

Let's talk about anything related to the 6502 microprocessor.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

My TV's a widescreen, but it displays the Pi's output with grey sidebars so it does detect the signal as 4:3. The output is slightly letterboxed, by the Pi itself I think. That doesn't sound good from a video playback perspective (but then maybe such programs put the video driver into a different mode)

You can just about see from this photo.

I'm not much interested in media, so you might need to consult with someone else ... I want to run programs! Like this:

Code: Select all

pi@raspberrypi:~/lib6502/v1.1$ ./run6502 -B -l 0  bbc.img 

BBC Computer 32K

BASIC

>P.22/7
3.14285714
>
(As it can run a 42-second benchmark in 1.5 seconds, it's emulating at about 56MHz. For another benchmark, 40MHz.)
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Raspberry Pi and the MagPi

Post by Dajgoro »

Did you try to use the GPIO, uart, i2c ports?
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

No, I haven't tried anything electrical. I have noticed that the power-on reset isn't 100% reliably triggering, which could scupper some unattended projects.

I fired up a build of B-em, which just about works, but key press detection is sluggish and it pegs the CPU. No sound from it. Other sound works. It's early days.

(There's a video playback demo which evidently bypasses X. It looks great over HDMI, not so good at low res - resampling or scaling artefacts.)
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Raspberry Pi and the MagPi

Post by Dajgoro »

If you can, just try the blinking led test, just to get the idea how complex is to achieve that.
The Pi usually runs code on Python, but what about C, or Java?

Btw, you have lots of interesting stuff on your google+ account, and you are ukscone, on the pi forum?
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

Dajgoro wrote:
If you can, just try the blinking led test, just to get the idea how complex is to achieve that.
The Pi usually runs code on Python, but what about C, or Java?
I had a go, see here - no LEDs, but I did get some action. Below the python packages there's a file I/O level of access involving /sys/devices/virtual/gpio/gpio22/value and so on. You just write '1' or '0' as a single character - no need to keep opening and closing. I'm not sure how you get below that (because that is probably mediated through a kernel module, which might be closed-source) (Edit: but see below - you can be more direct in C at least)
Quote:
Btw, you have lots of interesting stuff on your google+ account, and you are ukscone, on the pi forum?
Thanks! (But no, I'm not ukscone - I have a forum account but I don't think I've posted.)

Cheers
Ed
Last edited by BigEd on Sun May 27, 2012 9:20 pm, edited 1 time in total.
jonb
Posts: 104
Joined: 08 May 2011

Re: Raspberry Pi and the MagPi

Post by jonb »

You can force the resulution and HDMI mode by setting a config file on the /boot directory up properly.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

jonb wrote:
You can force the resulution and HDMI mode by setting a config file on the /boot directory up properly.
Ah, thanks. (wiki article)

Edit: you may know this, but it turns out that XBMC does its graphics without using X, as does the Quake3 port, as do the OpenGL ES examples mentioned in this post. So, X being a bit slow and an odd size isn't the limitation it might seem to be.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

David Welch has written a bootloader and some demo projects for bare-metal programming (no OS)
https://github.com/dwelch67/raspberrypi/
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

Worked example in C of truly low-level GPIO access:
http://elinux.org/RPi_Low-level_periphe ... le_.28C.29
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Raspberry Pi and the MagPi

Post by Dajgoro »

How does it run java? In this semester i have a java class, and i learned how to do a lot of useful stuff , so i hope it works on the Pi.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

I hear that a java app using swing runs OK using openjdk-6. There's not much RAM, so bear that in mind. Java IDE is not going to work! See also this thread and this one.
(and in general have a search on those forums)

Cheers
Ed
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Raspberry Pi and the MagPi

Post by Dajgoro »

New issue available:
http://www.themagpi.com/
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

There's a thread over at StarDot
http://www.stardot.org.uk/forums/viewto ... 986#p47986
which notes that the native port of RISCOS has just sprung into life (although not ready for the faint hearted yet) (I think there's no mass storage)
The effect being that the Pi becomes something like a super fast Archimedes - the successor to the Beeb, which was of course a 6502 machine.
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Raspberry Pi and the MagPi

Post by Dajgoro »

New issue:
http://dl.dropbox.com/u/26650928/MagPi/ ... 0Final.pdf

Did anyone of you who have the pi manage to do some other "cool stuff" worth mentioning?
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Raspberry Pi and the MagPi

Post by BigEd »

(Running up the latest RISC OS build is all I've done - that was pleasing. Quick boot, desktop, BASIC, web browser. What more do you need? (*))

Looks like open orders are now possible, although product isn't in stock. Presumably you queue for the next delivery.
http://uk.farnell.com/jsp/displayProduc ... price=true

(But if you wait for it to be in-stock, it'll be out of stock very quickly!)

Image

(*) I tried to spin up BeebIt and it seems to run but the font is illegible. (Actually, BeebIt crashes the Pi, but BeebItJ runs)
Last edited by BigEd on Wed Mar 27, 2019 9:26 pm, edited 1 time in total.
Post Reply