amiga.org
     
iconAll times are GMT -6. The time now is 03:02 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Amiga computer related discussion » Amiga News and Community Announcements » Announcements and Press Releases » Tales from an AmigaOS 4.1 Developer…

Announcements and Press Releases This is the news feed forum for General announcements and press releases.

Reply
 
Thread Tools Display Modes
Old 06-08-2011, 12:01 AM   #1
Argo
Forums Moderator
Points: 17,377, Level: 84 Points: 17,377, Level: 84 Points: 17,377, Level: 84
Activity: 7% Activity: 7% Activity: 7%
 
Argo's Avatar
 
Join Date: Feb 2002
Posts: 3,204
Default Tales from an AmigaOS 4.1 Developer…

From the Hyperion Entertainment Blog:

Quote:
In the words of Dr. Nick, "Hello everybody!"...

I suppose I better start by introducing myself. My name is Karl Churchill whom you may know as Karlos from one or more of the various Amiga forums. I've been an Amiga enthusiast since I first had a go of a friend's A500 back in 1988. I didn't actually own one until 1992, but from then on, I've not been without one. I've been asked to write a few words about my involvement with OS4.1 for classic. Well, there's the short version and the long version. The short version is that I've been working as a contributor to add Warp3D support for the Permedia2. Work began in October last year as an evening project.
The version of the driver in the repository had not been touched in the best part of a decade and whilst it compiled, that was all it did. Any attempt to launch a 3D application would simply freeze the machine. The first challenge was to get it to a point where it would at least allow an application to start, even if it didn't render anything. Working on low-level code is not without it's complications. Thankfully, the kernel provides a debug printing service but I don't have a serial line debugger (the serial port on that machine is not entirely reliable) so every time there was a crash, I'd have to reboot and run DumpDebugBuffer to see what had blown up. Progress was slow at first, but eventually I was rewarded with a blank screen and not a DSI.

Over the following months I got all the basic drawing routines up and running, starting with the basic V1-V3 API calls. Along the way, I found some amusing undocumented bugs in the Permedia2 that were the cause of a lot of head scratching and finally I got up to the point where I could implement the V4 API. This is where everything changes and is a good time to start the "long" version of the story... as if this one wasn't long enough already!
Back in 2001 or so, I was developing my own applications that were using Warp3D as an "advanced rasterizer" for 2D. If you've ever used RTG as a developer on OS3.x, you'll doubtless be as dismayed as I was with the extent of it's hardware acceleration. The functions provided by Warp3D were much more capable and efficient for 2D graphics work. Warp3D 4 was released and introduced it's vertex array functions. For what I was doing at the time, these were perfect. I refactored my code to use them and then discovered to my dismay that various chunks of the advertised API just weren't implemented by the driver, especially line and point rendering.

I badgered Hyperion about this at the time who were busy with other things but responded by giving me access to the source. It's fair to say that after a few months, I had the only driver that implemented every drawing operation the API specified. The original V4 functions used templates (i.e. C macros) to generate a drawing function for each possible combination of primitive and supported vertex format. Conceptually, this is the most efficient way of doing it but in reality it produces a lot of code which is mostly redundant and not cache friendly. After adding the extra primitives, the driver had reached an unprecedented size (well over 1MB) which was clearly too big. The only thing that actually varied from one format to the next is the way in which the vertex data was fetched. So, I scrapped the existing code and started a new version that has drawing routines for each primitive, but uses a function pointer to invoke a fetcher that is specific to the format being used. The code was well within acceptable size again and ran considerably faster despite having to make up to 3 indirect function calls per vertex (one for geometry, one for colour and one for texture/fog).

I went on to fine tune this implementation by adding versions of the fetchers that were not only specific to the vertex format but also the currently selected states. This moves a lot of state-dependent conditional logic out of the fetch routine and as they represent the innermost level of the code, that's always a good thing. Eventually, some of theV4 routines were over 2x faster than the original version, depending on the vertex format and state. Unfortunately, this driver never found it's way into the wild. Mostly because I never considered it finished it due to the constant need to tweak and improve it; there was always some new experiment to try. DMA FIFO transport is still "the one that got away" but I've promised to behave and actually release versions this time. The vertex fetch idea caught on though and became the standard method used for all later drivers, so at least the work wasn't entirely wasted. I was later asked if I'd be interested in making an OS4.0 version of it. Seeing as this meant I'd get to play with something new on my A1200 (the then upcoming OS4.0 classic), I naturally agreed and having got the beta version on my machine started work on it. Classic 4.0 was very much in beta at that time and I ran into a lot of issues just running it, development using it was even trickier. Then life took a series of increasingly difficult turns which ultimately left me out of the scene for many years. OS4.0 for the classic came and went in the meantime. I had thought things had hit an inflection point when a close uncle passed away suddenly but things reached a new low in 2007 when my mother was diagnosed with a life-limiting illness and passed away just two short years later in the spring of 2009. She was not to be the last. By the end of that year, I felt I needed to get back into my hobbies, doing something, anything, would be therapeutic.

So I bought OS4.1 for the inherited A1 that was sat under my desk for about 4 years unused to see how things had moved on since my early experiences with 4.0 beta for the Classic. Quite a bit, as it happens. As I got back into it, I got the SDK and started playing about with some code. And that's where the long and the even longer versions of the story recombine. This time I have a nice stable machine to do the actual compilation on, which has helped considerably. The present driver for 4.1 has incorporated all the fundamental changes the unreleased v4 driver had and then some; even the old V1-V3 drawing routines now use a set of vertex fetchers, all designed around W3D_Vertex, but optimised for each state combination that has an effect on their operation. The FIFO code has been completely rewritten, as has the state handling. Finally there is as much support as is feasible for the V5 API. Unique challenges this time around are trying to appease some old applications that did naughty things (like poking the context instead of making the proper API calls) without sacrificing too much performance and trying to track down some really persistent bugs. The latter has led to having to work through the main library and even the RTG driver. It's a frustrating task a lot of the time; you think you nailed a bug, only to discover the "it works for me" phenomenon is genuinely real and the same bug is still affecting other users. So, back to the drawing board. Still, seeing Quake3 run on my 20-year old A1200 was fun enough to make it worthwhile.

So, the Permedia2 driver is still in development and won't be considered final until the various bugs are ironed out. In a case of history repeating itself, I also noticed that the R200 driver doesn't draw everything advertised in the API either. I guess I'll have to look into that one next...
http://blog.hyperion-entertainment.biz/?p=439

Last edited by SysAdmin; 06-08-2011 at 05:49 AM.. Reason: Formatted for easier reading
Argo is offline   Reply With Quote
Old 06-08-2011, 12:55 AM   #2
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: Tales from an AmigaOS 4.1 Developer…

TL;DR
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 06-08-2011, 03:39 AM   #3
magnetic
Defender of the Faith
Points: 14,616, Level: 78 Points: 14,616, Level: 78 Points: 14,616, Level: 78
Activity: 99% Activity: 99% Activity: 99%
 
magnetic's Avatar
 
Join Date: Feb 2002
Posts: 1,737
Blog Entries: 1
Default Re: Tales from an AmigaOS 4.1 Developer…

Karlos

GOGOGOGGOGOGOGGOGO!!!!
__________________
bPlan Pegasos2 G4@1ghz
Quad Boot:Reg. MorphOS /Amiga OS4.1 U4/Ubuntu GNU-Linux /MacOS X

Amiga Technologies A1200 HD | Blizzard 1260@66mhz | 128mb | OS 3.9 | Indivision MK2
magnetic is offline   Reply With Quote
Old 06-08-2011, 05:11 AM   #4
nicholas
Guru Meditator
Points: 16,216, Level: 81 Points: 16,216, Level: 81 Points: 16,216, Level: 81
Activity: 99% Activity: 99% Activity: 99%
 
nicholas's Avatar
 
Join Date: Feb 2003
Location: Englistan
Posts: 6,823
Default Re: Tales from an AmigaOS 4.1 Developer…

Woohoo you're out of the proverbial closet now, prepared for the back lash?
__________________
http://www.commodore.gen.tr/forum/in...38089#msg38089
http://sf.net/projects/amithlon/files/

“Socialism" is no more an evil word than "Christianity." Socialism no more prescribed Joseph Stalin and his secret police and shuttered churches than Christianity prescribed the Spanish Inquisition. Christianity and socialism alike, in fact, prescribe a society dedicated to the proposition that all men, women, and children are created equal and shall not starve.” - Kurt Vonnegut
nicholas is offline   Reply With Quote
Old 06-08-2011, 06:13 AM   #5
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: Tales from an AmigaOS 4.1 Developer…

Quote:
Originally Posted by nicholas View Post
Woohoo you're out of the proverbial closet now, prepared for the back lash?
I don't think it was much of a secret, was it?
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 06-08-2011, 06:33 AM   #6
JJ
Lifetime Member
Points: 19,023, Level: 87 Points: 19,023, Level: 87 Points: 19,023, Level: 87
Activity: 7% Activity: 7% Activity: 7%
 
JJ's Avatar
 
Join Date: Feb 2002
Location: Wales, UK
Posts: 3,584
Default Re: Tales from an AmigaOS 4.1 Developer…

Cant believe you do AOS4.1 Coding.

MorphOS is the only AmigaNG OS worht bothering with.

Im taking you off my friends list
__________________
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2

Registered MorphsOS 2.7 user
JJ is offline   Reply With Quote
Old 06-08-2011, 10:28 AM   #7
TheGoose
Defender of the Faith
Points: 13,413, Level: 75 Points: 13,413, Level: 75 Points: 13,413, Level: 75
Activity: 1% Activity: 1% Activity: 1%
 
TheGoose's Avatar
 
Join Date: Nov 2002
Location: Moon
Posts: 1,458
Blog Entries: 9
Default Re: Tales from an AmigaOS 4.1 Developer…

Quote:
Originally Posted by Karlos View Post
I don't think it was much of a secret, was it?
I just thought you had no life and hung out here all day. Now, I think wow, that guy does a lot and I need to get a life...

__________________
G1200, A3000D, A1200 PPC AOS4.0C

I'm on Google +
TheGoose is offline   Reply With Quote
Old 06-08-2011, 10:16 AM   #8
TheBilgeRat
Defender of the Faith
Points: 8,533, Level: 62 Points: 8,533, Level: 62 Points: 8,533, Level: 62
Activity: 60% Activity: 60% Activity: 60%
 
TheBilgeRat's Avatar
 
Join Date: May 2010
Location: Dundee, OR
Posts: 1,621
Default Re: Tales from an AmigaOS 4.1 Developer…

Quote:
Originally Posted by Karlos View Post
TL;DR
Beat me to it
TheBilgeRat is offline   Reply With Quote
Old 06-08-2011, 07:35 AM   #9
jorkany
Defender of the Faith
Points: 9,119, Level: 64 Points: 9,119, Level: 64 Points: 9,119, Level: 64
Activity: 7% Activity: 7% Activity: 7%
 
jorkany's Avatar
 
Join Date: Sep 2006
Posts: 1,007
Blog Entries: 1
Default Re: Tales from an AmigaOS 4.1 Developer…

While I think Karlos is wasting his time and talent on OS4, I do have to say that if the majority of the OS4 community and dev team were more like Karlos that would go a long way towards making OS4 less unattractive.
jorkany is offline   Reply With Quote
Old 06-08-2011, 09:47 AM   #10
Franko
Banned
Points: 22,799, Level: 93 Points: 22,799, Level: 93 Points: 22,799, Level: 93
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Jun 2010
Posts: 5,707
Blog Entries: 33
Default Re: Tales from an AmigaOS 4.1 Developer…

Ahh Haa... so that explains the reason why Karlos always get very defensive about OS4 whenever I say it's slower than a dead donkey...

and here was me thinking he was just a deluded OS4 fanatic...
Franko is offline   Reply With Quote
Old 06-11-2011, 09:35 AM   #11
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: Tales from an AmigaOS 4.1 Developer…

Quote:
Originally Posted by jorkany View Post
While I think Karlos is wasting his time and talent on OS4, I do have to say that if the majority of the OS4 community and dev team were more like Karlos that would go a long way towards making OS4 less unattractive.
Thanks, er, I think

I think that the problems you are alluding to are somewhat exaggerated in each camp; usually by a handful of zealots. Personally, I've found the that developers (from each platform) are perfectly normal, friendly human beings in all my exchanges with them.
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 06-11-2011, 12:44 PM   #12
muahaha
Merely Curious
Points: 405, Level: 8 Points: 405, Level: 8 Points: 405, Level: 8
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Nov 2010
Posts: 2
Default Re: Tales from an AmigaOS 4.1 Developer…

Developers are perfectly normal.



Thanks man, I needed that.
muahaha is offline   Reply With Quote
Old 06-08-2011, 10:15 AM   #13
nyteschayde
Premium Member
Points: 10,213, Level: 67 Points: 10,213, Level: 67 Points: 10,213, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
nyteschayde's Avatar
 
Join Date: Mar 2002
Location: San Jose, Ca USA
Posts: 402
Send a message via ICQ to nyteschayde Send a message via AIM to nyteschayde Send a message via MSN to nyteschayde Send a message via Yahoo to nyteschayde
Default Re: Tales from an AmigaOS 4.1 Developer…

Grats Karlos! I've had some long development conversations with Karlos. He really is an amazing developer. I get paid very well for being a software engineer but talking with him usually leaves me feeling dumb. I wish you the best man!
nyteschayde is offline   Reply With Quote
Old 06-08-2011, 11:28 AM   #14
lionstorm
Cult Member
Points: 11,184, Level: 69 Points: 11,184, Level: 69 Points: 11,184, Level: 69
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: Feb 2002
Location: France
Posts: 772
Default Re: Tales from an AmigaOS 4.1 Developer.

nice read, thanks Karlos !

will the new warpd3D version and new permedia2 driver be released only for AOS4 or will classic warpos will also benefit from your expertise ?
lionstorm is offline   Reply With Quote
Old 06-08-2011, 01:30 PM   #15
Karlos
Sockologist
Points: 48,752, Level: 100 Points: 48,752, Level: 100 Points: 48,752, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: I solve practical problems...
Posts: 16,606
Blog Entries: 18
Default Re: Tales from an AmigaOS 4.1 Developer.

Quote:
Originally Posted by lionstorm View Post
nice read, thanks Karlos !

will the new warpd3D version and new permedia2 driver be released only for AOS4 or will classic warpos will also benefit from your expertise ?
Well, the current driver is for OS4.1, but I can't really see any technical reasons why it won't run on 4.0.

As for OS3.x/WarpOS, I have an unreleased driver from way back when. It's not quite as developed as the current one, but it was fundamentally the starting point for the big refactor that led to the performance gains for vertex array drawing.

However, it isn't as compatible with existing software as the original 4.2 driver. The present driver likewise has problems. Certain applications don't play nice with Warp3D, calling functions with broken arguments or just poking internal structures directly.

I am not sure what the deal is with that. I signed the necessary NDA at the time to be able to work on it but releases aren't up to me and Warp3D 4 is no longer supported. I could always ask though.
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Reply

Bookmarks

Tags
amigaos , amiga , developer… , development , karlos , permedia2 , tales
Thread Tools
Display Modes

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