English Amiga Board


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

 
 
Thread Tools
Old 19 July 2014, 14:05   #61
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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, 05:39   #62
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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...
Attached Files
File Type: zip SDL_AGA_debug.zip (367.8 KB, 92 views)
File Type: c amigaos_video_AGA.c (20.8 KB, 99 views)

Last edited by NovaCoder; 17 June 2015 at 03:46.
NovaCoder is offline  
Old 12 July 2017, 21:52   #63
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
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, 01:20   #64
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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, 01:30   #65
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
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, 02:15   #66
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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, 02:49   #67
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
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, 03:08   #68
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 30
Posts: 497
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 03:15.
Marlon_ is offline  
Old 06 December 2018, 03:54   #69
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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 05:51.
NovaCoder is offline  
Old 06 December 2018, 10:06   #70
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,691
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, 11:15   #71
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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, 13:01   #72
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 30
Posts: 497
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, 01:25   #73
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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 03:13.
NovaCoder is offline  
Old 07 December 2018, 22:55   #74
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,691
@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, 01:46   #75
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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, 12:11   #76
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,691
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, 04:24   #77
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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 05:34.
NovaCoder is offline  
Old 09 December 2018, 14:00   #78
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,691
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 10 December 2018, 00:13   #79
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,537
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 02:16.
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 09:17
Nova 9: The Return Of Gir Draxon mai HOL data problems 2 21 November 2009 21:18
Nova's 1200 AGA>VGA ...Zetr0 violated! NovaCoder Hardware pics 20 01 September 2009 10:45
No Love Greater than the Love of Moto Zetr0 Hardware pics 15 05 October 2007 19:42
[Fixed] Hard Nova Uukrul HOL data problems 1 17 December 2002 11: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 03:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.08748 seconds with 16 queries