English Amiga Board


Go Back   English Amiga Board > Other Projects > project.Amiga Game Factory

 
 
Thread Tools
Old 19 July 2014, 13:05   #61
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by tolkien View Post
I have to look at more sdl sources but I dont understand how a thread can replace a timer.
Just start an SDL thread which will trigger a callback hook into your code. In your code you simply need to see if enough time has passed since the last time and then trigger your event if needed.

I think that's the basic idea anyway.
NovaCoder is offline  
Old 10 June 2015, 04:39   #62
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Arti,

Here is a quick build of SDL v1.2.15 with my old AGA video code mixed in, haven't managed to test it yet but it should work OK with NetSurf AGA.

Threads and Timers are enabled in this build but not audio (same code as that v1.2.15 RTG I did for you).

Keyboard handling should also be better.


You should probably used these flags for NetSurf AGA (no point using DBL Buffer because NetSurf updates using dirty rectangles):

PHP Code:
flags = (SDL_FULLSCREEN|SDL_SWSURFACE|SDL_HWPALETTE); 


This build is for 040 (needs an FPU!)


Update:

Debug build uploaded...

Last edited by NovaCoder; 24 December 2018 at 10:28.
NovaCoder is offline  
Old 12 July 2017, 20:52   #63
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
can you please help to fix your latest SDL-AGA version,
there is a problem with missing SDL_SYS_JOYSTICK in the link library.
some older version from 2013 have this part, but latest on aminet is missing this.
emufan is offline  
Old 13 July 2017, 00:20   #64
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by emufan View Post
can you please help to fix your latest SDL-AGA version,
there is a problem with missing SDL_SYS_JOYSTICK in the link library.
some older version from 2013 have this part, but latest on aminet is missing this.
Hiya,

Yes I remember taking out the joystick code but don't recall exactly why... maybe it was a bit buggy. I'm not doing any Amiga coding these days.
NovaCoder is offline  
Old 13 July 2017, 00:30   #65
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by NovaCoder View Post
Hiya,

Yes I remember taking out the joystick code but don't recall exactly why... maybe it was a bit buggy. I'm not doing any Amiga coding these days.
oh, ok. extraction from older link lib went good, so lets see what happens
emufan is offline  
Old 13 July 2017, 01:15   #66
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by emufan View Post
oh, ok. extraction from older link lib went good, so lets see what happens
Good luck, hope you can get it working

I should also warn you that the Threading and Timer implementation in all the 68k SDL builds is less than perfect (AFAIK). It's a shame I never got the chance to release a version that I was really happy with.
NovaCoder is offline  
Old 13 July 2017, 01:49   #67
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I do not say a shame - you did a lot with your ports for amigaland, despite the few resources we have.
maybe once you're in the right mood to continue where you stoped
emufan is offline  
Old 06 December 2018, 02:08   #68
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Do you still have the sources for this lying around? I would like to add it to the Amiga68k-SDL repo on github and possibly add the option to switch between RTG and AGA during initialization and/or compile.

EDIT:

Nevermind, I suppose all that is needed is this file? amigaos_video_AGA.c

Last edited by Marlon_; 06 December 2018 at 02:15.
Marlon_ is offline  
Old 06 December 2018, 02:54   #69
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by Marlon_ View Post
Do you still have the sources for this lying around? I would like to add it to the Amiga68k-SDL repo on github and possibly add the option to switch between RTG and AGA during initialization and/or compile.

EDIT:

Nevermind, I suppose all that is needed is this file? amigaos_video_AGA.c
Hi, yes that's the only file you need.

My old SDL v1.2.15 source code is in a complete mess with so many different AGA and CGX versions I don't know which one is the latest myself.

I will be working on a new 68k SDL for real Amiga's (pure AGA and RTG code with no Vampire extensions), just need to find the time.

The current AGA library on AmiNet is a bit of a hack, actually it's a great big hack and doesn't work properly

All of the 68k ports of SDL are a bit of a mess.

Last edited by NovaCoder; 06 December 2018 at 04:51.
NovaCoder is offline  
Old 06 December 2018, 09:06   #70
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,219
SDL is supposed to be portable and cross platform, but they just didn't anticipate planar display, which makes SDL slow as hell on a real Amiga (okay on Winuae, but what's the point)
jotd is offline  
Old 06 December 2018, 10:15   #71
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by jotd View Post
SDL is supposed to be portable and cross platform, but they just didn't anticipate planar display, which makes SDL slow as hell on a real Amiga (okay on Winuae, but what's the point)
Not true!

Used to be true, but my release of SDL for AGA changed that

[ Show youtube player ]

[ Show youtube player ]

NovaCoder is offline  
Old 06 December 2018, 12:01   #72
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by NovaCoder View Post
Hi, yes that's the only file you need.

My old SDL v1.2.15 source code is in a complete mess with so many different AGA and CGX versions I don't know which one is the latest myself.

I will be working on a new 68k SDL for real Amiga's (pure AGA and RTG code with no Vampire extensions), just need to find the time.

The current AGA library on AmiNet is a bit of a hack, actually it's a great big hack and doesn't work properly

All of the 68k ports of SDL are a bit of a mess.
The Vampire extension is only activated if the library finds the operators, so it's not really locked. I would like if you could do your work against our github and share. The file in that post links to header files not available in regular Amiga SDL RTG, so the file is a bit useless without the rest.

The plan I have with SDL for Amiga is to have a unified code-base for 68k, AROS, MorphOS, WarpOS and AmigaOS4 and clean it up in the process. I'll be happy for any help, as I am currently the only one working on this.
Marlon_ is offline  
Old 07 December 2018, 00:25   #73
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
That's a great plan my friend and quite ambitious so I wish you well.

I only have limited time for Amiga coding this days and prefer to do my own thing with my hobby.

Like I said above, my old AGA port is (yet another) SDL hack so I wouldn't even bother with 'amigaos_video_AGA.c'

Last edited by NovaCoder; 07 December 2018 at 02:13.
NovaCoder is offline  
Old 07 December 2018, 21:55   #74
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,219
@Novacoder it's really impressive. What are the specs of the A1200 you're using? and which compiler are you using?

this is serious stuff.
jotd is offline  
Old 08 December 2018, 00:46   #75
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by jotd View Post
@Novacoder it's really impressive. What are the specs of the A1200 you're using? and which compiler are you using?

this is serious stuff.
Thanks man

Those videos were taken on my old 1260 running at 80Mhz and the ports were built with gcc v3.4
NovaCoder is offline  
Old 08 December 2018, 11:11   #76
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,219
1260/80MHz !! I have 1260/50. That should work okay. The new gcc 6 looks impressive on 68k. It's completely windows native. I've used it and it's excellent.

I may give a go to your library. Can you explain what you "hacked" exactly? because AFAIR the bottleneck of SDL is chunky2pixel (again): writing in an abstract buffer then rendering into the real video memory.
jotd is offline  
Old 09 December 2018, 03:24   #77
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by jotd View Post
1260/80MHz !! I have 1260/50. That should work okay. The new gcc 6 looks impressive on 68k. It's completely windows native. I've used it and it's excellent.

I may give a go to your library. Can you explain what you "hacked" exactly? because AFAIR the bottleneck of SDL is chunky2pixel (again): writing in an abstract buffer then rendering into the real video memory.
Yep that's a exactly what my version does, it the game writes to a chunky video buffer and then just uses C2P to update the display, it's nothing clever

Last edited by NovaCoder; 09 December 2018 at 04:34.
NovaCoder is offline  
Old 09 December 2018, 13:00   #78
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,219
nothing clever, I can't let you say that. That was clever to do what you did.

Why does it need AGA? because c2p to 8 bitplane is faster? what did the original port do to be so sluggish?
jotd is offline  
Old 09 December 2018, 23:13   #79
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
It doesn't really need AGA, I also did an RTG version that just blitted directly to the screen without doing C2P.

I'm not sure why the original port was so slow?

ODAMEX RTG SDL

Last edited by NovaCoder; 10 December 2018 at 01:16.
NovaCoder is offline  
Old 18 December 2018, 11:08   #80
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
I've been updating my old AGA SDL and trying to get RTG support working properly.

Can some people with real Amiga's try the attached application and see if it renders the colors properly at different color depths.

It's a very basic test application that has a single tooltype which you can use to choose if it runs in full screen or uses a window.

In theory it should render the included image in the correct colors on both big and small endian displays and in all color depths (8 bit results will obviously vary, depends on how many pens you free).

To quit the application you just hit any key (or close the window).

It is compiled for 030 + FPU because I was too lazy to compile it for soft FPU.

It uses the CyberGFX API but should work OK on P96 (maybe)

Seems to work OK using WinUAE

Last edited by NovaCoder; 24 December 2018 at 10:27.
NovaCoder is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nova's Blizzard 1260 NovaCoder Hardware pics 32 09 April 2013 08:17
Nova 9: The Return Of Gir Draxon mai HOL data problems 2 21 November 2009 20:18
Nova's 1200 AGA>VGA ...Zetr0 violated! NovaCoder Hardware pics 20 01 September 2009 09:45
No Love Greater than the Love of Moto Zetr0 Hardware pics 15 05 October 2007 18:42
[Fixed] Hard Nova Uukrul HOL data problems 1 17 December 2002 10:12

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14336 seconds with 14 queries