Welcome, Guest. Please login or register.

Author Topic: Curse of the SDL  (Read 24673 times)

Description:

0 Members and 3 Guests are viewing this topic.

Offline Khephren

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 606
    • Show only replies by Khephren
Re: Curse of the SDL
« Reply #29 on: August 07, 2011, 12:52:40 PM »
Quote from: utri007;653276
Talking about 68k apps and games, sound many time like it would be impossible to do anything to 68k amigas. Wich makes me wonder, how good they were, I mean those who made amaizing apps and games to amiga years ago?? Were they humans or some kind of super creatures with big brains and super natural skills?????

The problem is that SDL is generic, and written in C. To get the most out of the Amiga, you would use assembler, and the tricks the Amiga provides to speed things up.

For example, in a web browser you could have a 64x640 'screen' with it's own palette for your navigation buttons (and could even run it at a different resolution to the webpage viewport itself). You could then run the actual viewport in a sliced mode for more colours etc. Such things would be difficult to add to a ported project.
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: Curse of the SDL
« Reply #30 on: August 07, 2011, 03:26:28 PM »
Quote from: utri007;653276
Talking about 68k apps and games, sound many time like it would be impossible to do anything to 68k amigas. Wich makes me wonder, how good they were, I mean those who made amaizing apps and games to amiga years ago?? Were they humans or some kind of super creatures with big brains and super natural skills?????


It is pretty difficult squeeze true colour JPEG graphics with tons of Javascript into Amiga 500. Even simple tasks like decoding JPEGs is very slow on anything less than 68060 and quality is still quite poor on some 640x200 with 16 colours...
My Amigas: A500, Mac Mini and PowerBook
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Curse of the SDL
« Reply #31 on: August 07, 2011, 07:33:31 PM »
>Certainly there were Amiga coders back in the day who dazzled with raw skill, but a large >part of why things seemed to work so well is that programmers were willing to tailor and >compromise their designs in order to work well on the hardware.

that always happen.there is still no Hardware out that is fast enough to run all in that way designers want.also remember the play consoles.

But in the past, amiga Hardware Limits are state of the Art and most users have it.so games are develop for amiga in 32 colors enhanced with copper lists to more color instead of EGA 16 color of PC.

but later PC get faster and faster users buy them more and PC market grow..devleopers see less limits on PC or game consoles and so go to PC or game consoles and di more complex games.

and so nobody want to strip down something that it run on a AOS.nobody pay enough money for the stripdown.

If this is 68k or MOS or OS4.All ist too slow in compare to modern Systems as playstation 3 or xbox 360 or PC and have only a market of a few hundret users.

Quote from: utri007;653295
Netsurf is designed to run 16mhz system, is it low-end enough :D


but the problem is, the internet pages today are not designed to run with 16 MHZ well.
Pages use CSS truecolor images, lots images and some other performance huge features.and if the web designer use no A500 to develop the page, he did not notice that his page is show too slow.

if you want show only a simple html page with text antialiasing netsurf is fast and can show such a page in below 1 sec.try it out with the ibrowse history.html file
« Last Edit: August 07, 2011, 07:39:07 PM by bernd_afa »
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Curse of the SDL
« Reply #32 on: August 07, 2011, 07:52:34 PM »
Quote from: utri007;653238
Netsurf SDL problem for me is that it requires true type fonts.

Amiga chip / zorro bus is sure slow, but have you tried FBlit? Games like simcity 2000 and napalm get huge speed up to vertical/horzontal scrolling with it, if you promote them to fast mem with FBLit.

But ofcourse there is limitations with 68k amigas, programmers just neet to live with them.

all does not help, because the simple fact, the screen resolution used in modern games is 640*480*16 bit at least.

nobody enhance the images for 8 bit usage and 256 color.

and so its a simple calculation.to run a 640*480 * 16 bit image game at same speed with full scrolling as a 320*240*8 bit image game, you need a Hardware that is 8* faster.

I dont know what the Problem is for you with truetype Fonts.

speedtests on large Text html files show, that antialias truetype fonts do things not slowdown.so the internal fonts version is not need

the CPU expensive stuff is loading and decoding the jpg process the page with CSS.
when you use a page without CSS and big images all go faster.
 

Offline x303

Re: Curse of the SDL
« Reply #33 on: August 07, 2011, 08:47:27 PM »
Quote from: utri007;653432
To get rid of SDL is not just a speed it is also feel of native app. Reaction/Mui gui would give it the feel of the original amiga app
Yep, with a native gui you would get things like menuitems and scrollbars visible with any screenmode (now they're cut off on anything < 1024*768). But would the program itself be any faster ? Perhaps it just feels faster because it's native.
 

Offline utri007Topic starter

Re: Curse of the SDL
« Reply #34 on: August 08, 2011, 12:22:28 AM »
Quite many SDL apps are slow 68k amigas, even when they shouldn't be.
ACube Sam 440ep Flex 800mhz, 1gb ram and 240gb hd and OS4.1FE
A1200 Micronic tower, OS3.9, Apollo 060 66mhz, xPert Merlin, Delfina Lite and Micronic Scandy, 500Gb hd, 66mb ram, DVD-burner and WLAN.
A1200 desktop, OS3.9, Blizzard 060 66mhz, 66mb ram, Ide Fix Express with 160Gb HD and WLAN
A500 OS2.1, GVP+HD8 with 4mb ram, 1mb chip ram and 4gb HD
Commodore CDTV KS3.1, 1mb chip, 4mb fast ram and IDE HD
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Curse of the SDL
« Reply #35 on: August 08, 2011, 08:23:23 PM »
>Yep, with a native gui you would get things like menuitems and scrollbars visible with any >screenmode (now they're cut off on anything < 1024*768).

you need press the resize button.then the scrollbars are set correct.

>But would the program itself be any faster ?

the SDL Port is when look at performance /MHZ lots faster as on OS4, so seem no speedup possible.

See here the time results.

http://www.amiga.org/forums/showpost.php?p=649724&postcount=146

but its intresting to see how fast it is in performance /MHZ on a Acorn RISC OS.

>Quite many SDL apps are slow 68k amigas, even when they shouldn't be.

I can only repeat the Fact, when a game developer develop his game for full scroll in 640*480 16 bit or at larger screen resolution, the data is too much for a Amiga.

another big problem is audio.old amiga games music have only samplerate of 7 khz and 4 channels.

but most games today use more than 4 channels and at least a sample rate of 22 khz but most 44 khz.

So you need all sounds convert to 7 khz and that sound is ok if only 4 channels are use.


wy you do not learn a little programming, and change all graphic and game coordinates in a program so it can show on 320*240 16 bit screen.

this is possible.
then a sdl game is too playable on classic.

On the othe side when you just use a SDL game as it is and try it without use of SDL, the game is still lots too slow.the screen resolution or audio channels are lots too much for a classic

So we need only guys who have time that strip down SDL games to 320*240 16 bit screen and 4 channel audio with 7 khz.
« Last Edit: August 08, 2011, 08:25:36 PM by bernd_afa »
 

Offline utri007Topic starter

Re: Curse of the SDL
« Reply #36 on: August 08, 2011, 09:02:47 PM »
68k Amiga Os is usually hevily patched, so problem is that every patch does some small incompatibility to it and many times it is really difficult solve this kind of problems because many problems are caused interaction of several patches.

So I just woun't install afa os or tt engine. I want to keep my OS lightly patched.

Situation would be different when 68k aros is mature enough to be usefull, I hope. No need to run dozens of patches to get os more prety/usefull/modern.

About speed, I really do belive that SDL is major slowdown for 68k amigas, but we will see is it true, when native scummVM is relased.

It is simply not possible that SDL kind of generic engine would be optimized enough to such low spec machines as 68k amigas are and still be compatiable to high spec machines.
« Last Edit: August 08, 2011, 09:36:12 PM by utri007 »
ACube Sam 440ep Flex 800mhz, 1gb ram and 240gb hd and OS4.1FE
A1200 Micronic tower, OS3.9, Apollo 060 66mhz, xPert Merlin, Delfina Lite and Micronic Scandy, 500Gb hd, 66mb ram, DVD-burner and WLAN.
A1200 desktop, OS3.9, Blizzard 060 66mhz, 66mb ram, Ide Fix Express with 160Gb HD and WLAN
A500 OS2.1, GVP+HD8 with 4mb ram, 1mb chip ram and 4gb HD
Commodore CDTV KS3.1, 1mb chip, 4mb fast ram and IDE HD
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2281
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Curse of the SDL
« Reply #37 on: August 08, 2011, 10:06:49 PM »
@utri007

SDL often assumes that the systems it supports have chunky graphics modes.  Chunky graphics are consistently faster than planar at almost every operation.  The only time planar can outperform chunky is at low bit-depths.  Odd bit-depths like 32 colors (5 bits-per-pixel) would also be impossible without bitplanes.

If this is about the NatAmi or the FPGAArcade being slowed down by SDL, I assure you that it will be possible to optimize to those systems by using their native chunky-pixel support.

Things to note:  SDL 1.2.14 and earlier used software CPU blitting at most resolutions while the experimental 1.3 versions due for release soon rest heavily on OpenGL and require 3D accelerated texturing to do such things as image rotations.  Also SDL 1.3 is under a more liberal license than the earlier versions.

As such, many of the problems you fear will come to pass will not affect the final version of the NatAmi.  It will affect only the earlier Amigas due to their dependence on bit-planes.
 

Offline x303

Re: Curse of the SDL
« Reply #38 on: August 08, 2011, 10:47:56 PM »
Quote from: bernd_afa;653705
>Yep, with a native gui you would get things like menuitems and scrollbars visible with any >screenmode (now they're cut off on anything < 1024*768).

you need press the resize button.then the scrollbars are set correct.
This doesn't work.
 

Offline NovaCoder

Re: Curse of the SDL
« Reply #39 on: August 09, 2011, 12:11:00 AM »
Quote from: utri007;653711
About speed, I really do belive that SDL is major slowdown for 68k amigas, but we will see is it true, when native scummVM is relased.


Quite a few RTG 060 users have said the AGA version of ScummVM is much faster on their RTG boxes than the SDL based RTG release so yes, I hope when I do a 'native' RTG version we'll see the speed increase a bit (it should of course run faster than the AGA version at the same resolution/color depth).

The AGA version may get a chance to catch up again with the RTG version if I can get direct-chunky working (eg Graffiti) and skip the C2P step ;)
 
I don't think the 68k SDL is a curse though, it was very helpful to me when I did my intial port (the 68k SDL source code was made open source).   Most of the performance issues are probably down to the fact that it's no longer maintained.
« Last Edit: August 10, 2011, 12:33:10 AM by NovaCoder »
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline Crumb

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1786
  • Country: 00
    • Show only replies by Crumb
    • http://cuaz.sourceforge.net
Re: Curse of the SDL
« Reply #40 on: August 09, 2011, 11:00:31 AM »
Quote from: NovaCoder;653734
Quite a few RTG 060 users have said the AGA version of ScummVM is much faster on their RTG boxes than the SDL based RTG release so yes, I hope when I do a 'native' RTG version we'll see the speed increase a bit (it should of course run faster than the AGA version at the same resolution/color depth).

The AGA version may get a chance to catch up again with the RTG version if I can get direct-chunky working (eg Graffiti) and skip the C2P step ;)
 
I don't the 68k SDL is a curse though, it was very helpful to me when I did my intial port (the 68k SDL source code was made open source).   Most of the performance issues are probably down to the fact that it's no longer maintained.


On both cgx/p96/sdl you could lock the bitmap and draw directly to it, most of times you'll get a nice speedup (although with SDL you may have slowdowns compared to cgx/p96 if you use doublebuffer functions). If you could tune up rendering to write chunks of 4 or more pixels it would be even faster :-)
The only spanish amiga news web page/club: Club de Usuarios de Amiga de Zaragoza (CUAZ)
 

Offline Khephren

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 606
    • Show only replies by Khephren
Re: Curse of the SDL
« Reply #41 on: August 09, 2011, 11:07:19 AM »
Quote from: bernd_afa;653705

nother big problem is audio.old amiga games music have only samplerate of 7 khz and 4 channels.

but most games today use more than 4 channels and at least a sample rate of 22 khz but most 44 khz.

So you need all sounds convert to 7 khz and that sound is ok if only 4 channels are use.



Amiga sample playback is at 28khz. If you open and close a double scanned screen, that allows 56khz playback. Also, even the A500 is capable of channel mixing.There have been 8 channel MOD's since the late eighties. The problem as I have mentioned, is that ports from other platforms do not use Amiga tricks to increase the speed/quality of sound and graphics fidelity.
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Curse of the SDL
« Reply #42 on: August 09, 2011, 12:23:55 PM »
Quote from: NovaCoder;653734
Quite a few RTG 060 users have said the AGA version of ScummVM is much faster on their RTG boxes than the SDL based RTG release so yes, I hope when I do a 'native' RTG version we'll see the speed increase a bit (it should of course run faster than the AGA version at the same resolution/color depth).

The AGA version may get a chance to catch up again with the RTG version if I can get direct-chunky working (eg Graffiti) and skip the C2P step ;)
 
I don't the 68k SDL is a curse though, it was very helpful to me when I did my intial port (the 68k SDL source code was made open source).   Most of the performance issues are probably down to the fact that it's no longer maintained.

scumm games are no action games that need frequently update all graphic.How is it possible to measure the speedup ?

a better test to compare between a native port and sdl is maybe quake
try a test with sdlquake and quake.set your workbench to 8 bit to run sdlquake.fullscreen do not work on old SDL
fullscreen 640*480 8 bit screen.

or use window mode so it run on workench in quake68k.

http://aminet.net/package/game/shoot/sdlquake-1.0.9

http://aminet.net/package/game/shoot/Quake68k

free shareware files are here.You need a PC to install it and then copy the wad files.

http://quakeone.com/freequake/en.html

and presse esc and go to menu option and choose open console

Now type in console
timedemo demo1

this you can do in both quake and you get a fps value.what results you get with native Port and sdl port ?.you van also test on AGA.here can see that AGA is unusable slow
And if sdlquake is really slower as native version, i compile it with newest sdl, this is faster as the old sdl that is used in this port, and fullscreen can work too

I often see that think something is faster, but when measure time no speedup can notice.
A good example you can see on netsurf thread(link above).first it was report, older netsurf is faster as new netsurf.but when the user measure time he see that new netsurf is lots faster.

maybe its really possible to speed up without SDL around 50%, but thats near nothing and nobody notice it, when remember that new games have more than 8* more graphic data and more sounds date, the game is still unplayable if it use SDL or not.

>This doesn't work.

ah yes i see on new netsurf is because of gadgets not possible to use smaller screens as 1024.maybe you write to Artur, if he have add the limit, and if so he can remove.

but currently most pages need 1024 show in full width and you need not scroll in X
I test on a older netsurf, and when use 800*600 with amiga.org, you can not see all in width.

so also for amiga pages 1024 width is good
« Last Edit: August 09, 2011, 12:33:35 PM by bernd_afa »
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Curse of the SDL
« Reply #43 on: August 09, 2011, 12:37:26 PM »
Quote from: Crumb;653767
On both cgx/p96/sdl you could lock the bitmap and draw directly to it, most of times you'll get a nice speedup (although with SDL you may have slowdowns compared to cgx/p96 if you use doublebuffer functions). If you could tune up rendering to write chunks of 4 or more pixels it would be even faster :-)


sdl is able to work in same way as you told, when use HWSURFACE.but then many modern games run slower.

todays games use alphachannel for all objects.
this mean before calc a pixel, the pixel data need read, the object data is add and then the pixel is written.

but because amiga GFX card access is so slow, and a gfx card read is more slower than write, this slowdown alot.
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: Curse of the SDL
« Reply #44 from previous page: August 09, 2011, 12:42:19 PM »
Quote from: Khephren;653768
Amiga sample playback is at 28khz. If you open and close a double scanned screen, that allows 56khz playback. Also, even the A500 is capable of channel mixing.There have been 8 channel MOD's since the late eighties. The problem as I have mentioned, is that ports from other platforms do not use Amiga tricks to increase the speed/quality of sound and graphics fidelity.

try a old amiga game and a sample ripper.in winuae you can too rip samples-
you see sample rate is not often larger as 7 khz, because on A500 memory was low and memory need save

also transpose a sample with paula have very ugly sound quality.amiga have a 7 khz filter so it sound not so ugly as when disable the filter.

modern systems as sdlmixer use linear transpose this cost more CPU power but have good sound quality so you can get CD quality sound

so the first thing you can do, when you want play a sdl game on a slow amiga, is switch music and sound off.