ejp
Posts: 7
Joined: Mon Oct 31, 2011 11:35 am

Re: Demo scene?

Mon Oct 31, 2011 12:35 pm

I\'m seriously loving the educational aspirations of this project and every time I think about it I can\'t help thinking that one of the ways of promoting the educational side of things might just be a demo scene?

Let me explain, if i go back in time about twenty years to the when I received my beloved archimedes, during my early teenage years my main motivation for learning to code in assembly was trying to recreate the effects that the guys in the demo scene were pushing out. I\'m really looking forward to going through a similar exercise with my own kids using the Pi. My aims are fairly simple, pure asm coding to create some neat visual effects.

Why so low-level? IMO it\'s a great way of getting the kids to understand the basics of the technical side of how the machine actually works - registers, memory, interrupts, stacks, binary maths etc and coding demos will have a great visual pay-off as a reward.

Is anyone looking at the Pi, and thinking the same thing? I\'d love there to be a like-mided community around a demo scene, not only to create a bit of motivation through heathly competition but also to build a community and share knowledge.

What\'s solutions are there around for kids to get code up and running directly on the Pi? The beauty of the archimedes for this sort of thing was the BASIC interpreter - you could code in asm and compile and run it directly on the box - fixing and tweaking as you went along. A linux environment with GCC would obviously work, but I wonder if the temptation to solve problems with higher-level code would be too much for this particular goal?

How easy is it going to be to avoid the GPU for this sort of thing - I\'d like to start off with direct framebuffer manipulation?

Bit of a long shot this one: Are any of the old school archimedes demo coders lurking around here, I\'m guessing the Pi project has also piqued your interest? (Brothers in Arm, System Interrupt, Armaxes, Moribund Hedgehog and all the rest) - do you still have code from back in the day lying around, and if you do would you consider digging it out and publishing it as reference material for the community - I spent hours picking this sort of stuff apart and it was invaluable as a learning resource and I\'m guessing that much of it is still relevant and tweakable for the current ARM architecture.

User avatar
Beakster
Posts: 29
Joined: Mon Oct 24, 2011 6:03 pm

Re: Demo scene?

Mon Oct 31, 2011 1:34 pm

I love demos on the Amiga. I\'ve never seen any on the archimedes though. I did think about demos on the Pi, but the fact that we don\'t have access to the GPU is a big turn off from this perspective. Also that the Pi is so powerful (compared to 16 bit micros of the early 90s) means that writing demos isn\'t as challenging. You can display anything you can think of really at full motion video speeds. Any Pi demo competitions would need strict regulations, like a 4k limit, to keep things interesting.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Demo scene?

Mon Oct 31, 2011 1:46 pm

[quote]Quote from Beakster on October 31, 2011, 13:34
I did think about demos on the Pi, but the fact that we don\'t have access to the GPU is a big turn off from this perspective. [/quote]

Why is it a turn off? You have full access to the GPU 3D system via OpenGL. For example, Taiji, a pretty standard 3D benchmark works fine via the OpenGL drivers. You also have OpenVG for 2D graphics.

I\'m pretty sure there is very little more you could do with GPU access.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Beakster
Posts: 29
Joined: Mon Oct 24, 2011 6:03 pm

Re: Demo scene?

Mon Oct 31, 2011 2:04 pm

[quote]Quote from jamesh on October 31, 2011, 13:46
Why is it a turn off? You have full access to the GPU 3D system via OpenGL. For example, Taiji, a pretty standard 3D benchmark works fine via the OpenGL drivers. You also have OpenVG for 2D graphics. [/quote]

This is only via the Linux driver isn\'t it? Demos have typically been about banging the metal. On the Amiga you would normally boot them from a floppy and they\'d load into memory instead of the Operating System. They would then access the custom chips (equivalent to todays 3D hardware) directly to create interesting visual effects.

So far as I understand it, with the Pi we need to use Linux if we want to access any functionality of the Broadcom chip so any such demo will have to run as a linux application. From a practical standpoint that sounds fine it isn\'t really in the true spirit of demo coding.

ejp
Posts: 7
Joined: Mon Oct 31, 2011 11:35 am

Re: Demo scene?

Mon Oct 31, 2011 2:25 pm

I don\'t really think GPU access is necessarily important for this sort of thing anyway - in terms of restrictions to keep things interesting, ARM only with framebuffer and no GPU would certainally give it a nice twist.

It would force coders to write their own effects from scratch and from a point of view of learning this would be incredibly valuable as well as a good angle to encourage competition and optimisation.

Even the basics like plotting sprites would form a good project for beginners in this environment as a great introduction to moving memory around as well as a very visual introduction to logic functions in a practical application.

I suspect you\'re right about the icrease in power. Getting things done in one vsync on an 8MHz arm 3 was certainally one of the great challenges to the demo scene of the time (not to mention not having any FP instructions available if you did want to try anything 3d!).

User avatar
Emanuele
Posts: 177
Joined: Wed Aug 03, 2011 5:28 pm
Contact: Website

Re: Demo scene?

Tue Nov 01, 2011 10:58 am

I think that demos were mostly about pushing the platform you had available to its limit, and, as jamesh suggested, I reckon that GL benchmarks are their modern equivalent.

When we think about distributions, most of us would agree that GCC should always be included. I suggest that including a good selection of textures and 3d models is also very important.

CargoCult
Posts: 25
Joined: Wed Nov 02, 2011 7:06 am
Contact: Website

Re: Demo scene?

Wed Nov 02, 2011 7:19 am

The demo scene is still around - and they\'re deeply in love with modern GPUs. Have you seen what they can do with fancy shaders in just four kilobytes of code?

Something I\'m looking forwards to playing with on the Raspberry Pi is the GPU. While it\'s definitely not an AMDIVIA RadForce 666 GTX MegaHeater, it sounds surprisingly powerful. And, as a fixed platform, a nice target to work towards...

trevj
Posts: 65
Joined: Fri Oct 28, 2011 6:41 am
Location: Bristol, UK

Re: Demo scene?

Wed Nov 02, 2011 8:49 pm

[quote]Quote from ejp on October 31, 2011, 12:35
Bit of a long shot this one: Are any of the old school archimedes demo coders lurking around here, I\'m guessing the Pi project has also piqued your interest? (Brothers in Arm, System Interrupt, Armaxes, Moribund Hedgehog and all the rest) - do you still have code from back in the day lying around, and if you do would you consider digging it out and publishing it as reference material for the community - I spent hours picking this sort of stuff apart and it was invaluable as a learning resource and I\'m guessing that much of it is still relevant and tweakable for the current ARM architecture.[/quote]
Almost in the same vein, I wonder if David Braben would be able to release the code for Lander?

DannyB
Posts: 5
Joined: Wed Nov 02, 2011 7:58 pm

Re: Demo scene?

Wed Nov 02, 2011 9:08 pm

I stopped with C64 demos but demos are still going strong, the 4k demos from Breakpoint 2010 are truly outstanding.

WizardOfOZ
Posts: 76
Joined: Thu Oct 13, 2011 8:08 am

Re: Demo scene?

Wed Nov 02, 2011 9:25 pm

One thing I am really hoping for, when it comes to the Raspi project, is that the platform may convince young people to start writing efficient programs again, demos included. I have to admit that all the requests for more RAM and whatnot on the Raspi calls up a message from years gone by. Some of you will understand it, some may not:

Code: Select all

**** CBM BASIC V2 ****

3583 BYTES FREE

READY.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Demo scene?

Wed Nov 23, 2011 3:44 pm

I think the Raspberry Pi has got a good chance of a healthy demo scene springing up around it. When there is a fixed hardware specification to confine yourself to; you take it as a challenge. People will want to see how much they can get out of the device.

A demo should not just be about maxing out the performance within the confines of a certain specification though. It’s also an art form, I remember some future crew demos from the 90’s that might not have been so technically amazing but were so trippy and abstract you could sit there and watch them loop for 30 minutes totally mesmerised. Mind you the recent “badger badger badger” flash animation also did this to me – so I am easily amused :)

I take the point about limiting the memory footprint to 4K or maybe 64K. That sort of thing I would think is fine if there is a competition where demos from different platforms were competing against each other. However I think it would be completely fair and exciting to have a competition where the limit is the physical limit of the Raspberry Pi. So this would be a Ras Pi only demo competition.

I actually think the foundation could organise that too. Get Eben and Liz to judge it :)

kkolev
Posts: 13
Joined: Wed Nov 16, 2011 11:14 pm

Re: Demo scene?

Wed Nov 23, 2011 7:04 pm

[quote] When there is a fixed hardware specification to confine yourself to; you take it as a challenge. People will want to see how much they can get out of the device.[/quote]

I really hope that to be the case. The other side of the coin is that (128 or) 256MB/700MHz is already strong enough that the 4K-like challenge isn\'t there.

I think RasPi may have potential as the level of abstraction/power between Arduino and full x86 machines.
If the community manages to lower the GPIO barrier enough - Gert\'s IO board, the RasPi guys\'s Broadcomm contacts helping from the other side of the NDA wall - we will have the hardware foundations.
If we can
a) build a nice community (a lively #raspberrypi on freenode, posting http://webchat.freenode.net/?channels=%23raspberrypi all over the place),
b) standardize an IDE, or better a tutorial that can get you from unpacking a raspi, sd card, cables, to blinking a LED every time somebody tweets about Bieber
we can capture a huge portion of those schmucks like me that give up too easily :-)

From there on we\'ll be the new device to be hated by the hipster part of hackaday. A large enough RasPi community means the optimizer-weenie subgroup may reach critical mass and we\'ll be able to enjoy raspidemos.org and the like :-)

I\'m highly inclined to make the Bieber/second twitter LED indicator tutorial a reality if I get my hands on a board before the holidays. As simple and easy to follow as possible - unpack, grab sd, download iso from <url>, type this command to get it on the sd, boot raspi, sudo apt-get ipython + libs. Write this to get the proggie to print out \'blink\' every time someone posts a bieber-tweet. Connect these wires, leds, resistors there. Write this to change the program and start blinking yer real life LED!

But enough with the community bootstrapping daydreams. Let\'s get some useful data in this thread - can you point to some demo sites? I\'d love to see some examples, and tutorials would be awesome. For example, I still have no idea how to draw a damn circle in pure C :-)

Gurnox
Posts: 2
Joined: Tue Dec 27, 2011 10:36 am

Re: Demo scene?

Tue Dec 27, 2011 1:53 pm

I'm an ex-scener and the very moment I saw the news about this my immediate reaction was hard to put into words. Suffice to say, I've been waiting for many years…..

It's got all the ingredients to have a great scene behind it. Low cost, reasonably powerful and a standard architecture. Far more so than there used to be in fact. We now have the Internet, after all.

As for the OpenGL, ahem, 'limitation' on coding the GPU. It won't take too long for someone clever to learn how to hit it direct. I dare say that a good starting point will be to reverse engineer the driver. Part of the fun has always been in making the hardware do things for which it was not intended. This will be no different.

Every single proprietary platform has tried to place restrictions on how it's coded. Even if that's been a case of 'best practise' rather than out-and-out 'licensees only' access to hardware documentation.

Bear in mind that the SNES was a damn site more closed than this will ever be. And we still managed to make that turn some rather clever tricks

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Demo scene?

Tue Dec 27, 2011 5:54 pm

I personally would love to get into a modern variation on Demo coding, the only thing holding me back is the need to stop multitasking on the OSes that have OpenGL support for the GPUs available.  If we could get a good OpenGL driver for for Risc OS, then it would be easy to go single tasking and we could truly push the HW to its absolute limits.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

OrbDemon
Posts: 11
Joined: Sat Dec 24, 2011 9:00 am

Re: Demo scene?

Tue Dec 27, 2011 9:53 pm

Yeah, I was going to ask about a demo scene.

There were a few great 64k intros on the Risc PC - It would be good to see what can be done with this device.

It would certainly be better to access the GPU directly, and I'm sure someone will figure out houw to do it...

dattaway
Posts: 20
Joined: Tue Nov 15, 2011 11:41 pm

Re: Demo scene?

Wed Dec 28, 2011 3:06 am

4 KB is an awesome amount of space for tight code full of tricks.  1 MB is a huge country.  I'm no John Carmack.  This is a quantum supercomputer compared to my 8 bit roots.  I'm getting too old...

User avatar
Emanuele
Posts: 177
Joined: Wed Aug 03, 2011 5:28 pm
Contact: Website

Re: Demo scene?

Wed Dec 28, 2011 9:17 am

I don't know, am I the only one here who doesn't miss Blitter and its octants? Give me OpenGL any day of the week. To be honest, I think that pushing the hardware to its limits nowadays is more about knowing you maths (for shaders that antialias properly), choosing good algorithms and designing for optimal memory access.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Demo scene?

Wed Dec 28, 2011 10:07 am

DavidS said:


I personally would love to get into a modern variation on Demo coding, the only thing holding me back is the need to stop multitasking on the OSes that have OpenGL support for the GPUs available.  If we could get a good OpenGL driver for for Risc OS, then it would be easy to go single tasking and we could truly push the HW to its absolute limits.


Sorry, I don't understand what you mean here. A multitasking OS nowadays has very little impact on performance over, say, an  RTOS simply becasue task switching is so quick on modern processors at high MHz.

In the Raspi's case, the GPU is doing all the heavy lifting, so what the Arm is doing is pretty much irrelevent to final performance. There is a hit when running code on the Arm vs directly on the GPU  as there are communication delays between host and GPU, but third parties cannot write code on the GPU anyway, so it's irrelevant.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
riffraff
Posts: 307
Joined: Tue Sep 27, 2011 3:17 am
Location: Newnan, Georgia, US

Re: Demo scene?

Wed Dec 28, 2011 10:15 am

@ Gurnox


THREAD: BCM2835 datasheet | Features and requests | Forum

RE: Reverse Engineering Vidcore Blob

JamesH Said:

Good luck with that. The code running on the Videocore took a  team of >100 engineers over 5 years to write. All of whom are CS degree graduate's, and many are PhD's. It's many millions lines of code, including custom vector assembler code (i.e. its a custom instruction set, private to Broadcom – with custom compilers etc. That'll be the first challenge!). There are 8k or so registers on the SoC, for all the different blocks all of which require specialise knowledge to use. Do not underestimate how complicated this device is.

You might be able to reverse engineer the Arm side library which talks to the VC – but all you would be doing is replacing one piece of code with a probably less effective version that does the same thing.


There's way to much speculation going on and the boards aren't even out here yet where we can get our mitts on them.  There haven't been any heavy-lifting demos created specifically for this device yet.  It'll get interesting in a few months though. Just what I've seen of the UI on the Roku 2 kinda hints at what's possible.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Demo scene?

Wed Dec 28, 2011 10:19 am

Gurnox said:


As for the OpenGL, ahem, "limitation" on coding the GPU. It won"t take too long for someone clever to learn how to hit it direct. I dare say that a good starting point will be to reverse engineer the driver. Part of the fun has always been in making the hardware do things for which it was not intended. This will be no different.

Every single proprietary platform has tried to place restrictions on how it"s coded. Even if that"s been a case of "best practise" rather than out-and-out "licensees only" access to hardware documentation.

Bear in mind that the SNES was a damn site more closed than this will ever be. And we still managed to make that turn some rather clever tricks


Good luck with that. As I posted in another thread, this is NOT as easy as some people seem to think. Like quantum physics, people who think they understand it don't know enough about it yet. Remember that the code on the GPU and the arm side libraries have been written by people who really REALLY know what they are doing, and have been well optimised already. There are areas that need improving and that is constantly ongoing anyway.

At the risk of repeating. The GPU is accessed via a message passing system, so there are messages flowing to and from the drivers to the GPU to make it do stuff. Those messages pass OpenGL commands for example. You cannot really improve on that - you have messages, you use them. It's not like you can tweak registers to make things faster. There are no registers except on the GPU which is not accessible, and even if you had the source code, compilers, assemblers, documentation etc, there is still a lot of domain knowledge you don't  have. Like how to use the customer instruction set on some of the custom 3d processors.

I really cannot emphasise enough how complicated all this stuff is. You are so much better off just using the libraries. - you won't be able to improve performance by hacking, reverse engineering, or trying to write code better than the 3D experts  who currently write it and have loads of experience on the platform.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Demo scene?

Wed Dec 28, 2011 10:23 am

riFFraFF said:


@ Gurnox


THREAD: BCM2835 datasheet | Features and requests | Forum

RE: Reverse Engineering Vidcore Blob

JamesH Said:

Good luck with that. The code running on the Videocore took a  team of >100 engineers over 5 years to write. All of whom are CS degree graduate's, and many are PhD's. It's many millions lines of code, including custom vector assembler code (i.e. its a custom instruction set, private to Broadcom – with custom compilers etc. That'll be the first challenge!). There are 8k or so registers on the SoC, for all the different blocks all of which require specialise knowledge to use. Do not underestimate how complicated this device is.

You might be able to reverse engineer the Arm side library which talks to the VC – but all you would be doing is replacing one piece of code with a probably less effective version that does the same thing.


There's way to much speculation going on and the boards aren't even out here yet where we can get our mitts on them.  There haven't been any heavy-lifting demos created specifically for this device yet.  It'll get interesting in a few months though. Just what I've seen of the UI on the Roku 2 kinda hints at what's possible.


 I should have just cut and pasted rather than rewriring. Still need the typing practice after 25 years!

We have had the major industry standard benchmarks running - you need that stuff to do direct comparisons between platforms when trying to flog chips. Think some figures can be seen in the benchmark thread.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
riffraff
Posts: 307
Joined: Tue Sep 27, 2011 3:17 am
Location: Newnan, Georgia, US

Re: Demo scene?

Wed Dec 28, 2011 11:14 am

@JamesH

What I know by word of mouth of the architecture in this SoC is that you have an ARM11 CPU core and a similar ARM core controlling the GPU.  I carry an ARM11 in my pocket 24/7. I'm truly floored by what it's capable of - and that hampered by the Android baggage with all its damned abstraction layers.

I've seen a lot of speculative comments in these forums concerning performance of ARM vs. x86 architecture, but its like comparing apples and oranges. As regards the SoC itself, I beginning to think that in both devices (RasPi and Roku) only a fraction of its features are fully implemented. The GPU is hideously complex, and I think eventually when folk stop trying to display the size of their stones, they'll appreciate the tools provided to control it.  The most encouraging thing is that particular level of control is provided in software format which can easily be updated by the manufacturer.

RasPi is a very cool, KISS implementation, but all my senses tells me that's a very dangerous and powerful beast in it's heart.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Demo scene?

Wed Dec 28, 2011 11:40 am

I'm afraid that word of mouth has mislead you here. There is no Arm core in the GPU - just the Arm11 on the SoC. The CPU in the GPU is a custom design with a custom instruction set to handle its vector nature. There are also other processing cores  on the GPU, and a multitude of HW blocks for HW acceleration of various GPU tasks. For example H264, camera ISP, JPEG etc.

In fact the majority of the GPU capablities ARE exposed to the end user in some way or another. OpenGLES, OpenVG, OpenMAX, H264 decode are available on the Pi now. Camera ISP and H264 encode available next year when we release a camera module. That covers most bases!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
riffraff
Posts: 307
Joined: Tue Sep 27, 2011 3:17 am
Location: Newnan, Georgia, US

Re: Demo scene?

Wed Dec 28, 2011 12:10 pm

@JamesH

Still, that's a potent mix. Leads me to wonder what this SoC was originally designed for. Seems like it's supposed to be the ultimate home media/comm center on a shoestring. Smells like a category killer to me.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Demo scene?

Wed Dec 28, 2011 12:18 pm

riFFraFF said:


@JamesH

Still, that's a potent mix. Leads me to wonder what this SoC was originally designed for. Seems like it's supposed to be the ultimate home media/comm center on a shoestring. Smells like a category killer to me.


The Videocore GPU alone was originally designed as a mobile media coprocessor, and is used in a number of Nokia smartphones (both the VC3 and the VC4). Older videocores were used in Apple product.  This SoC is basically a VC4 with the Arm bolted on the side (which explains it's odd booting mechanism). As to what it is supposed to be, well, dunno!

Videocore tech, which was developed in the UK, is used in a number of Broadcom products, not just these particular GPU's although that is where it originated.

Yes, it is a potent mix - it's a very powerful, very low power, and very cheap device for what it does.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Return to “General discussion”