Nova's SDL Hack (AGA love)
This is a thread to talk about my new SDL library which is a cut-down version 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 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 and I'm using it to port Descent Rebirth to AGA. Currently the plan is to support at least these SDL functions: Graphics (double buffered using C2P assembler), Keyboard, mouse & joystick input Not so sure about sound, threading and timers yet. Restrictions:
This library is already being used to port NetSurf to AGA :D If I can get this working properly it should make it much easier to port a lot of new stuff to AGA quickly :) |
A for the effort dude :great! Sounds very good.
Could this be used with existing sdl apps/games also? |
Quote:
If I can get this AGA library working properly, it will make the whole porting process much quicker. I'm already thinking of some new AGA SDL ports like Red Alert and Ultima 7, that would be very cool on AGA :agree |
I think Heart of the Alien would be great but if the SDL library helps us use SDL stuff in general on AGA its got to be a good thing :)
|
Again, Kudos Novacoder, great work.
Just how much typical development time will be saved doing it this way do you think? |
Best case, maybe 50%
|
Quote:
|
Quote:
i know this is probably too much to demand, but i think starting the project like that things should be considered as to minimize effort and maximize the effect. |
Word of warning,..... open c&c, and inheritantly FreeRA arent particularly stable. Mightve improved in recent times, but they werent great last time I tried them.
Marathon might be nice to have though, as would Hexen2. Not requests, Im just thinking aloud :) As for my DGen port, it's actually semi playable already even on my 40mhz '040. I suspect that'll change though once I enable sound :) |
hiya,
I'll do a new 040 build for you, should be much better, still without sound though. Can you confirm your DGen port doesn't use the SDL Timer? I'm going to be looking at NetSurf AGA next to see what it needs, then I'll look into adding sound/joystick support. |
@Novacoder
Thanks. Nah, Dgen doesnt use SDL timers. As for joystick support I seem to recall the old SDL used lowlevel.lib for joystick support on OS3.x? Good stuff, and thanks again :) |
Ok let me know how you get on with it, if you can get it working it should be a bit faster.
I'll probably have to add both Timers and Threads back in soon, looks like NetSurf needs Timers which means you also need to support Threading. The SDL is a bit of mess to work with, it's very hard to see what things it actually needs enabled. I keep finding what I think are bugs in the library but so far they are mostly bugs with the Descent port I'm working on, this is actually a big pain in the butt because it's hard to develop a new library and port something at the same time. In hindsight, I should have gone for something that was already working properly with the existing 68k RTG SDL when running in 8 bit mode and then used that to develop the AGA SDL. |
|
As painful as crawling over broken glass but I think I've managed to get Threading and Timers enabled (they were enabled in the old 68k library but weren't very pretty).
Code:
[AGA_CreateDevice]: devindex = 0 |
Btw, you seem to have the exactly same ideas as I do :) I've made something very similar but never finished it.
A bit of warning, though: audio is a very tricky thing, at least on our platforms. There's an official Atari port of SDL (it's even in the official SVN repo) but audio is not very realiable, for two reasons: 1. You often need SDL_Mixer for some games (OpenTyrian comes to my mind but many others, too) what leads to noticable slowdown 2. It uses to crash and it's not a trivial bug: http://pmandin.atari.org/dotclear/in...audio-on-atari Anyway, I'd love to see fruits of your work as the official Atari SDL is done right "too much", i.e. it's always slower than if you code your own double buffer & stuff. |
@Novacoder
Sorry, Ive been busy the last few days so havent had a chance to try the new version of the lb you compiled for me. I'll let you know how I go when I get around to trying it. Also, a bit off topic, but I stumbled across this open source Syndicate Wards engine just before: http://swars.vexillium.org/#download I used to play it on a pentium 133 back in the day and that was a bit too fast in low res, so assuming this open source engine is similarly speedy it should be playable on an '060/aga machine. Definitely something Im going to try to remember to check out. Judging by the dependencies listed on the website it should be fairly portable. |
I've been making a bit more progress on this, I think it's almost 'finished' now. As in finished for a 'bit of a hack' :)
It will support the following: Events, Graphics, Sound and Threading Will not support: Timers (too slow and crappy) or the SDL mixer (too hard, see above) As some of you know, I've been using it to help port Descent Rebirth to AGA and that game seems to be holding together ok so far. As another test, I tried to build DosBox v0.74 with my library and the sound and graphics were fine but I did find some bugs in my library with the keyboard handling (which I've now fixed). It was quite a nice test actually because it only took 10 mins of updates to go from the existing RTG SDL to a working DosBox using my AGA version :) Next up I'm probably going to have a little go with an Exult port to help test my SDL library further. I'm now thinking that if I were take the RTG graphics code from the existing SDL library and then copy that code into my version it would give us 2 fast SDL versions for 68k ports :) |
You are the king! Hope to play with it soon! Thanks for the efford!
|
Yes, Arti and you are doing an incredible job for NetSurf to work. I'm following this thread as surely others (well, I post more) are doing without "reposting" that we are awaiting and we are grateful ... :agree
Edit: Yes, I know it won't be just for NetSurf. |
Hiya,
I don't think many people even see this thread because it's all the way down the board ;) Yep Atri is doing a great job, NetSurf is a complete bitch to compile. I tried to build it myself once but didn't really get very far. I still keep finding little bugs with my SDL library as I play with my new ports, I found another small issue with the keyboard unicode handling last night. Hopefully if I can fix all of these little bugs then it will be a pretty good 68k SDL implementation. |
All times are GMT +2. The time now is 17:49. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.