Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Amiga Boing ball for Raspberry PI  (Read 1892 times)

0 Members and 1 Guest are viewing this topic.

Offline bbond007

Amiga Boing ball for Raspberry PI
« on: November 02, 2012, 12:08:49 AM »
I don't know if anyone is interested in this or not...

The classic "Boing Ball" for the Raspberry PI!

Like the original, it takes advantage of the hardware :)

It uses direct hardware acclerated ELGS and the OMX sound API so it only works on Rapberry PI.

default sound is headphone jack..

RaspPIBoing.bin HDMI

or

RaspPIBoing.bin NONE
« Last Edit: November 02, 2012, 02:58:52 AM by bbond007 »
 

Offline bbond007

Re: Amiga Boing ball for Raspberry PI
« Reply #1 on: November 02, 2012, 04:14:55 AM »
I updated the EXE to try and clean up the sound when using the heaphone option.

It did not seem to help, however, I did make the audio a little more efficient.

The HDMI sounds great so it may be down to a buggy driver. I noticed the same issue with other programs. I could try different sample rates to see if it makes a difference but if i go too high the EXE won't fit on the forum.

Actually, this is like my "Hello World" type program on the PI, so I will probably just move on to something more interesting :)
« Last Edit: November 02, 2012, 04:17:00 AM by bbond007 »
 

Offline som99

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Sep 2005
  • Posts: 1566
  • Total likes: 0
    • http://www.som99.se
Re: Amiga Boing ball for Raspberry PI
« Reply #2 on: November 02, 2012, 04:55:04 AM »
I will try this out later today :) Thanks
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
  • Total likes: 0
    • http://www.troubled-mind.com
Re: Amiga Boing ball for Raspberry PI
« Reply #3 on: November 02, 2012, 08:48:25 AM »
You should publish the source :) x

Offline takemehomegrandma

Re: Amiga Boing ball for Raspberry PI
« Reply #4 on: November 02, 2012, 09:17:38 AM »
Cool! :D

:)
MorphOS is Amiga done right! :)
 

Offline gaula92

Re: Amiga Boing ball for Raspberry PI
« Reply #5 on: November 02, 2012, 10:10:26 AM »
Very interesting!
Of course, I also would like to peek at the sources, as I'm experimenting with Pi myself and accelerated 2D without X is just what I'm looking at :D
 

Offline som99

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Sep 2005
  • Posts: 1566
  • Total likes: 0
    • http://www.som99.se
Re: Amiga Boing ball for Raspberry PI
« Reply #6 on: November 02, 2012, 12:18:26 PM »
Quote from: bloodline;713582
You should publish the source :) x


Quote from: gaula92;713585
Very interesting!
Of course, I also would like to peek at the sources, as I'm experimenting with Pi myself and accelerated 2D without X is just what I'm looking at :D


I agree, the source would be fun to look at :)
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
  • Total likes: 0
    • http://www.troubled-mind.com
Re: Amiga Boing ball for Raspberry PI
« Reply #7 on: November 02, 2012, 12:54:34 PM »
Quote from: gaula92;713585
Very interesting!
Of course, I also would like to peek at the sources, as I'm experimenting with Pi myself and accelerated 2D without X is just what I'm looking at :D
I have written a basic raspberry Pi Graphics library based on OpenVG (with mouse input) for use without the abortion that is X... It's very crude at the moment, and I intend to improve it (by moving it to OpenGL)... But you might like to try it... I'm hoping to build a set of audio classes using OpenMAX... Hence, why I want to see the sources here :)

Offline gaula92

Re: Amiga Boing ball for Raspberry PI
« Reply #8 on: November 02, 2012, 01:09:10 PM »
Quote
for use without the abortion that is X

hahaha! :D True. It has many advocates and I don't get why: it's causing most of the graphics jerkyness in Linux and is one of the main culprits of this OS's weight.
Good thing we already got wayland almost ready for desktop-addicts (I'm a terminal guy anyway, so I don't really mind desktop systems).

I'd like to take a peak into that OpenVG library too: I'm currently finishing a nice dispmanx backend for libSDL. I already have nice double-buffered graphics with zero tearing, thus having examples running smooth as Amiga scrolls.
Does OpenVG implement buffer and vsync control? As I understand it, it's just for vector graiphics plotting so it needs an underlaying system to render into... correct me if I'm wrong.
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
  • Total likes: 0
    • http://www.troubled-mind.com
Re: Amiga Boing ball for Raspberry PI
« Reply #9 on: November 02, 2012, 02:48:26 PM »
Quote from: gaula92;713604
hahaha! :D True. It has many advocates and I don't get why: it's causing most of the graphics jerkyness in Linux and is one of the main culprits of this OS's weight.
Good thing we already got wayland almost ready for desktop-addicts (I'm a terminal guy anyway, so I don't really mind desktop systems).

I'd like to take a peak into that OpenVG library too: I'm currently finishing a nice dispmanx backend for libSDL. I already have nice double-buffered graphics with zero tearing, thus having examples running smooth as Amiga scrolls.
Does OpenVG implement buffer and vsync control? As I understand it, it's just for vector graiphics plotting so it needs an underlaying system to render into... correct me if I'm wrong.
OpenVG is just accelerated vector drawing, it's not really for highspeed graphics... It sits on OpenGL. But it is useful for fast primitive drawing.

I use it to develop my library, then I will reimplement it using OpenGL surfaces. The API shouldn't need to change... But I should get a massive performance boost :)

Offline bbond007

Re: Amiga Boing ball for Raspberry PI
« Reply #10 on: November 02, 2012, 03:08:28 PM »
Quote from: som99;713592
I agree, the source would be fun to look at :)


I was going to put the sources in the tar.gz, but it would not fit ithe size limit, I converted the wav to c array which really bloats the source.. maybe i can put it on github or something when i get home from work...

the ball is drawn with as one GL_TRIANGLE_STRIP array which is no big deal, but I also did the same thing with the grid this time using surface culling in such a way that the lines of the grid are not conencted...

I took the bouncing logic from another boing ball thing I found on the internet. Wish I still had that original source.

EDIT:  found it, here is the original project that I borrowed a lot of the logic from.  

http://www.jimbrooks.org/web/opengl/boing/
« Last Edit: November 02, 2012, 04:37:33 PM by bbond007 »
 

Offline bbond007

Re: Amiga Boing ball for Raspberry PI
« Reply #11 on: November 02, 2012, 03:38:58 PM »
Quote from: som99;713592
I agree, the source would be fun to look at :)


ok. here is what I did in order to make the source under the 97.7k file size limit:

I got rid of soundraw.c which can be recreated by running the included script "convertwav16.sh"

you'll need mplayer installed.
« Last Edit: November 05, 2012, 11:05:54 PM by bbond007 »
 

Offline som99

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Sep 2005
  • Posts: 1566
  • Total likes: 0
    • http://www.som99.se
Re: Amiga Boing ball for Raspberry PI
« Reply #12 on: November 02, 2012, 03:45:26 PM »
Quote from: bbond007;713625
ok. here is what I did in order to make the source under the 97.7k file size limit:

I got rid of soundraw.c which can be recreated by running the included script "convertwav16.sh"

you'll need mplayer installed.

Thanks for taking time to give us the source, appreciated :)
Might be time for me to put together a free file hosting service for Amiga forums to share files unrestricted with other users and with web interface, hmmm
« Last Edit: November 02, 2012, 03:47:44 PM by som99 »
 

Offline bbond007

Re: Amiga Boing ball for Raspberry PI
« Reply #13 on: November 02, 2012, 04:30:26 PM »
Quote from: gaula92;713585
Very interesting!
Of course, I also would like to peek at the sources, as I'm experimenting with Pi myself and accelerated 2D without X is just what I'm looking at :D


maybe look at the sprite example in ths
gles2framework

https://github.com/chriscamacho/gles2framework


the phystest one is really cool. i'm going to try and replace the spheres with boing balls :)
 

Offline bbond007

Re: Amiga Boing ball for Raspberry PI
« Reply #14 on: November 05, 2012, 06:00:57 PM »
I have updated the Raspberry PI Boing demo to optionally run on the desktop.

the technique uses eglCreatePixmapSurface() to render the view off-screen.

there is a bottleneck with how it currently works because the X11 server runs 16bpp and the rendering is done in 32bpp. You can read more about that on this thread:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=6488

Anyway the parameters for the sound remain the same (none/hdmi)

I have added a parameter for X11 (x/X)

X = 640 * 480

x = 320 * 240

EDIT: (new home for this project)

https://github.com/bbond007/RaspPIBoing
« Last Edit: November 05, 2012, 11:10:09 PM by bbond007 »