Welcome, Guest. Please login or register.

Author Topic: New AGA SDL Development  (Read 35391 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline NovaCoderTopic starter

New AGA SDL Development
« on: May 07, 2013, 05:16:20 AM »
And now for some Amiga news....

I'm currently working on a  new SDL library which is a cut-down version specifically made for good old AGA Amiga's (like mine!).

As people know I've ported a few games now and usually I have to rip out all of the SDL code and replace it with my own Amiga AGA code. This can be a very time consuming process so I decide to give an SDL library port one more try.

I've managed to knock together a working AGA SDL library which I'm using it to port Descent Rebirth to AGA.

[youtube]hhRxSw6IMa8[/youtube]


Restrictions:

   1. Only AGA 8 bit full-screen modes supported (320x200 -> 640x480).
   2. No CDROM support
   3. No OpenGL (obviously)
   4. No hardware accelerated graphics (again, kind of obvious)


This library is already being used to port NetSurf to AGA :)

If I can get this working properly it should make it much easier to port a lot of new stuff to AGA quickly.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #1 on: May 08, 2013, 12:39:18 AM »
Cool thanks for the support guys :)

This will only be a very cut down library to start with, I may add more features if I find I'm missing things later.  Not sure about advance modes like 15bit HAM8, probably be too slow to be of much use on AGA.
I've actually tried to port the old RTG SDL to AGA a couple of times in the past and never got anywhere, this time it's actually coming together nicely.

I just hope it means more new stuff on AGA, already it looks like it will give us a new web browser and Fishy_fiz is working on a new MegaDrive port.



Latest version of the library is already a bit quicker than BETA 1.

[youtube]1COt73zsxpU&NR[/youtube]
« Last Edit: May 08, 2013, 12:57:07 AM by NovaCoder »
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #2 on: May 08, 2013, 02:12:16 AM »
Kalms is Mr TBL ;)

I don't think this new SDL library will be much slower than just doing the same thing in straight C, it should only slow a 68k port by a couple of percent.

It will only support what AGA can do so I'm currently removing features that will slow it down too much.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #3 on: May 08, 2013, 04:18:39 AM »
Quote from: AmigaClassicRule;734085
NovaCoder, like lighting and shading for example? Hey NovaCoder...can I donate a petition to port that Zelda game to AGA the one Fishy_fis replied to my post?


Yes, at the moment I'm only including the bare minimum to port Descent Rebirth to AGA (and obviously talking into consideration good performance).

I think I might need to make some changes to accommodate NetSurf AGA, not sure yet.

Not sure about that Zelda game, I'm too busy at the moment.   Maybe someone else can have a look at porting it using this new library.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #4 on: May 08, 2013, 12:56:32 PM »
Quote from: apj;734132
I have quickly compiled Zelda 3T as I already have sources because I've released it for RTG.
So far opens black screen only, need to look more.

Cool, another one using the library :)

Are you using my latest one from this thread -> a thread

It's still very early in development, probably loads of bugs :)

For the next release I'll do a special DEBUG build with logging enabled so you can see what's going on.

First thing I would check though is to call SDL_GetError() after you call SDL_Init()

Code: [Select]
if( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, &quot;Could not initialize SDL: %s\\n&quot;,
SDL_GetError());
  return -1;
}

There's also an example program on the project thread over on EAB, that will give you some ideas.


I've just been looking at NetSurf AGA, got a few things to try and speed it up.   The killer is going to be resolution, you can't got for big screen sizes in AGA without it grinding to a halt.
« Last Edit: May 08, 2013, 12:58:52 PM by NovaCoder »
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #5 on: May 08, 2013, 01:01:35 PM »
Quote from: OlafS3;734147
I had a blank screen on aros vision too (when starting the test program). It would be fine if some of your great applications would work on aros 68k too.


That's odd, the test program really isn't doing much.   Does any of my recent AGA stuff work on AROS 68k, can you see if you get a blank screen with AmiQuake?

Is the screen grey or black?
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #6 on: May 09, 2013, 09:22:32 PM »
Nope, no sound, timer or threads.

Try it without initializing sound.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #7 on: May 09, 2013, 09:57:07 PM »
I'm currently adding timer and threading support, I might add sound next week.

Looks like I am going to have to make some tweaks to make NetSurf quicker.

Yep I'll upload the finished lib to AmiNet.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #8 on: May 10, 2013, 01:17:10 AM »
Quote from: wawrzon;734302
also although more complicated one could consider compiling this (optionally) as amiga shared lib. this would allow to make ports ready and update the library later, without the necessity of recompiling the ports. how about that?

Sorry but I'm waaaay to lazy to do that :)

This was only meant to be a quick hack to help me to port stuff to AGA but it turns out there are other projects that want to use it.

I'm now going to try and make it a little more flexible for other projects but this library will always be a bit of a hack I'm afraid :)

I'll see how I go, my priority at the moment is just to get NetSurf AGA working faster with this library, after that I'll try and add some kind of sound module to it.

I still haven't decided which way to go with the sound support.  I'm thinking I might attempt to do two versions.   One version would not support Timers or Threading and would use the Quake 2 sound engine (TM), the other slower version would be like the usual SDL with Timers and Threaded sound.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #9 on: May 10, 2013, 02:11:19 AM »
NetSurf is not my project, Arti has done all the hard work.   I'm just helping him out with an AGA version.

Read all about it right here -> NetSurf AGA
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #10 on: May 13, 2013, 01:14:49 AM »
Quote from: wawrzon;734666
just when a person gets mentioned... bernd has just requested me to test netsurf aga or real hardware.;) so not all is lost it seems..



NetSurf AGA, cool, hope it works ok for you (crosses fingers), make sure you get the latest version from Arti.

:)
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #11 on: May 14, 2013, 02:49:59 AM »
Quote from: wawrzon;734808
opening this site on my 060-50 system with netsurf-aga takes more than thirty seconds. the browser has wrong colors currently. it is laggy but not that much more laggy than rtg version. with some patience no proiblem to navigate. now testing if posting works. cheers.


That's awesome news, I know people have complained about the lack of an AGA browser for almost as long as they've complained about the lack of an AGA SDL :)

What version are you using, I did do some updates to my SDL which should improve the speed for Arti but I don't know if he did a new build or not.

Do you mind updating the EAB thread with your findings?

EAB thread
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #12 on: May 15, 2013, 12:41:59 AM »
Quote from: Crumb;734957
My advise is using the OS4 port as base and not the SDL one. And about ixemul... get rid of it, specially the nasty 6x versions

Yes everybody already knows that is the way to do it (see above), are you volunteering?

I already spent a couple of months trying to do it the 'right way' but kept hitting road blocks so I decided to switch my limited hobby time back to doing what I know (porting games).

I did suggest to Arti that he ditches ixemul (my new AGA SDL doesn't need it) but I don't know if he's tried to compile without it or not.   I suspect most of the libraries he's using need ixemul unfortunately.

Another why to do it is to use Reaction for the window frame and menu items but use the SDL frame buffer to render everything within the frame.   I'm not sure how hard that is to do.
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #13 on: May 17, 2013, 12:49:37 AM »
Using SDL AGA is not going to be much slower than just coding it without the SDL :)

[youtube]KFtTNsPJ7Zs[/youtube]

Descent Rebirth AGA is not optimized on the game side yet so it will get quicker then this (I hope).  My SDL is already as optimized as I can get it (and doesn't need ixemul.lib to link either!).

I've managed to get threaded sound working now, I didn't really want to go down that route as interrupt based sound is a bit quicker but it will do. You can always roll your own interrupt based code if you need to and just choose not to enable it in the SDL library (which means the library won't create any threads).

Timers have been disabled, I got them working fine but didn't really like the way it was coded as it would slow things down too much.   Most ports don't need Timers anyway so it's not a big deal.

After I've got it working properly with Descent Rebirth, I'll test it out with another couple of SDL ports to make sure it's working ok before I release it to AmiNet along with some example applications.

Please note that as I've mention many times before, this will not be a full AGA implementation of the SDL, it's just a hack to help games to be ported to AGA.

:)
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline NovaCoderTopic starter

Re: New AGA SDL Development
« Reply #14 on: May 17, 2013, 01:35:48 PM »
Quote from: Fab;735313
Even if you keep SDL, you should at least do it properly and modify it to only updated damaged areas, that would really increase performance.


Yep, done this already.
Life begins at 100 MIPS!


Nice Ports on AmiNet!