Welcome, Guest. Please login or register.

Author Topic: Amiga Emulator for iPhone in development  (Read 8835 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline scarnie

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 6
    • Show all replies
Re: Amiga Emulator for iPhone in development
« on: January 16, 2011, 04:59:09 AM »
Quote from: nicholas;606499
iAmiga uses GPL source code illegally as the DRM in the Apple Appstore is incompatible with the GPL licence.

See the recent issues with VLC.

That has a lot of other political issues surrounding it, such as the lead developer working for Nokia...  Why would you make an issue out of that here?  Aren't we all supposed to just be sharing our experiences and having fun with Amiga?  If the source code for all of iAmiga is released so anyone can freely use it, isn't it truly in the spirit of GPL?  I plan on doing this (as with all my other projects) on to github.

I've spent literally 100's of hours building my own ARM/C optimized 68K CPU, so I've done my time in this code base and earned my stars.

Cheers,

Stu
« Last Edit: January 16, 2011, 05:02:25 AM by scarnie »
 

Offline scarnie

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 6
    • Show all replies
Re: Amiga Emulator for iPhone in development
« Reply #1 on: January 18, 2011, 07:20:50 AM »
Quote from: Vairn;607118
I have alot of respect for Stu, and his iAmiga emulator, I wish I was able to spend my full time job working on mine.

I have spoken to him a couple of times, and he is a cool dude, and I wish him the best of luck :D


Cheers mate - likewise.  I see us being able to collaborate on this in the future too :)

BTW, this is my part time hobby (I have a full time day job as a software architect).  I do all this at night and on weekends, in between being a husband and dad of 2 ;-)

Cheers,

Stu
 

Offline scarnie

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 6
    • Show all replies
Re: Amiga Emulator for iPhone in development
« Reply #2 on: January 18, 2011, 07:28:17 AM »
Incidentally, I ended up getting my OGL code working with glTexSubImage2d, and it's a lot faster than CALayer (using image in RGB5551, which is fast path in CG).  I now get a consistent 60fps in full screen 2x scaling on i4 (960x640).

Using shader effects has been interesting.  It doesn't take much to drop below 60fps, and dependent texture reads totally annihilate perf on the retina display.  Dropped to as low as 23fps with a simple 2-pixel multi-texture shader to create a scanline effect (actually pretty consistent no matter how big the effect texture is.  If you calculate tex-coords inside shader, perf goes out the window.

Implemented a native scanline shader effect (see below), and fps is consistently 60fps again, so it's definitely texture reads.

Code: [Select]

varying mediump vec2 TextureCoordOut;
uniform sampler2D DisplayTexture;
uniform lowp float EffectAmount;

void main(void)
{
gl_FragColor = texture2D(DisplayTexture, TextureCoordOut);
gl_FragColor.a = mod(gl_FragCoord.y, 2.0) + EffectAmount;
}


Cheers,

Stu
« Last Edit: January 18, 2011, 07:32:11 AM by scarnie »
 

Offline scarnie

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 6
    • Show all replies
Re: Amiga Emulator for iPhone in development
« Reply #3 on: January 18, 2011, 03:35:07 PM »
Quote from: Vairn;607388
Yeah, 565 is always going to be faster, make sure you setup your EAGL context to be the same format, for a little perf and mem boostie.

If you can get away with it, do all texture coord's calculations on the Vertex shader, it is what apple recommend, supposedly it doesn't get the dependent texture reads. I haven't tested it at work, back in PC land atm. Might have a looksie later, now that my daughter is in bed. (11 months old in 2 days :D).


Absolutely - my EAGL context is 16-bit.  I've tested removing the dependent read and perf jumps right back to 60fps.  Unfortunately, can't calculate the 'effect' texture in vertex shader, but I've got some alternatives I want to try.  GL_REPEAT might do the job for me :)

Congrats on the little one too, mate!  Good stuff.
 

Offline scarnie

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 6
    • Show all replies
Re: Amiga Emulator for iPhone in development
« Reply #4 on: January 20, 2011, 06:49:47 AM »
Quote from: Vairn;607388
Yeah, 565 is always going to be faster, make sure you setup your EAGL context to be the same format, for a little perf and mem boostie.

If you can get away with it, do all texture coord's calculations on the Vertex shader, it is what apple recommend, supposedly it doesn't get the dependent texture reads. I haven't tested it at work, back in PC land atm. Might have a looksie later, now that my daughter is in bed. (11 months old in 2 days :D).


By eliminating the dependent texture reads, I now maintain a consistent 60fps with effects enabled in full screen (960x640)!

Cheers,

Stu
 

Offline scarnie

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 6
    • Show all replies
Re: Amiga Emulator for iPhone in development
« Reply #5 on: August 17, 2011, 05:10:29 PM »
Quote from: bsauvage;654468
Stuart, congrats on launching Defender of the Crown. Great effort, it works flawlessly! Very well optimised, you deserve it to be a success.
 
Vairn, any news about your open source project?


Thanks much, mate.  Lot of work, but worth the effort.  On to the next title now.  We've got a lot of interest to publish more Amiga titles!