![]() |
![]() |
#101 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,818
|
The problem with CGX and P96 is that they didn't really provide any new accelerated ways of doing graphical operations. They just patch graphics.lbrary drawing functions. Which is necessary and great for existing applications, but doesn't do much to help you if you want to do anything new in a performant way. It is to Amiga what GDI was is to Windows. The only really useful things you can do is to use those to allow you to *ensure* a BitMap is allocated in VRAM, query the precise hardware attributes (depth, format, dimensions, spans, etc) of that BitMap, the ability to lock it so that you can do unaccelerated software drawing on it*. Also, trying to lock and pin bitmaps this way is something that's not even best practise, since as Thomas says, the RTG layer is supposed to manage all this and ensure what's in VRAM is only what is necessary.
This also produces the interesting side effect that, unless you use a friend BitMap to try and ensure your new allocation is in VRAM, it typically ends up in Fast, until you want it render on it. At which point it's either transferred to VRAM, which is a massive overhead, or in some cases the system simply uses a software version of the routine to draw on the BitMap while it's still in fast memory. Also, using friend bitmaps means you lose control over the format, since it has to be in a format that can be directly blitted, which more often than not means, in exactly the same format as the friend. I can't tell you the lunacy this results in when working on 3D drivers that have to use these allocator routines for allocating texture buffers. None of these behaviours are conducive to high performance graphics programming. *This is why so many games end up just rendering to fast ram and then frame copying to the RTG card. Last edited by Karlos; Yesterday at 09:43. |
![]() |
![]() |
#102 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,818
|
Quote:
1. Pure software (locking bitmaps, direct software rendering) 2. Gfx/RTG (standard graphics.library) 3. Warp3D (direct screen space rasterization). These were all required to render to RGB (15/16/32 bpp) targets, with colour information being passed as a 32-bit ARGB tuple, arbitrarily, per primitive. There are also shaded (basic vertical and horizontal gradients). Alpha was only used where supportable. The design worked on the concept I describe, in that you set up a number of primitives and then call a render operation. I did this because it was the only sensible way to do 1 and eventually 3, even if 2 didn't strictly need it. In the end, 2 was by far the least capable and the only thing it could do better than 1 was basic rectangular fill/copy. It had to extend 1 anyway because the total graphics.librart routine overhead was so absurd for simple primitives that it was just faster to lock and draw in software. For example, one operation renders an array of point data, where each point has it's x,y,RGB data, discarding any outside either the bitmap dimension or any smaller rectangular clip area that could be defined. This is probably the worst possible case for 2, which was literally hundreds of times slower than 1. It's worth noting that 1 was also a lot faster than 3 for this. In the end, 3 was the best of a bad bunch but demanded that you have an FPU, because it's intended to support the output of 3D transformation I wasn't using. There was also no way to blit in a manner that would allow the copied area to be refused for the draw fills because textures aren't bitmaps in the conventional sense, and even having pretty strong inside knowledge of my particular HW and drivers, there was no way I was going to hack that to work. So the only one which ever worked fully was 1, which then was by far the slowest at any rectangle operations and 3 was the fastest by virtue of being able to reuse bits of 1 and 2 to support what the 3D driver API couldn't do or didn't do well. What we really needed was for the system to provide a fast, efficient, easily HW mappable set of operations, but literally nothing existed. Today, you might get the majority of this with the compositor implementation in 4.1 and equivalent functionality in MOS. As for more fully fledged API, I absolutely did not want the ludicrous indirection of GL and all that comes with it to do this, because every single 68K GL implementation utterly sucked at the time, having all the worst problems of the Warp3D implementation above with thr added overhead of GL abstraction on top. It also sucked if you didn't want to use GLUT for managing your display. GL was only useful for things written for GL and back then, very very little was written for GL that was expected to run well on a 68K. |
|
![]() |
![]() |
#103 | ||
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,390
|
Quote:
Quote:
Which is really not necessary at all. After all, you *can* allocate bitmaps in VRAM as friends and let the chip do the work. |
||
![]() |
![]() |
#104 | ||
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,390
|
Quote:
Thus, it makes little sense to add an abstraction for hardware support if you don't have any hardware that supports it. Quote:
The P96 driver API is a relatively modest abstraction of what the chips could possibly offer, and that wasn't really much. |
||
![]() |
![]() |
#105 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,818
|
No, that is (was) my API and it abstracts the problem if of converting an ARGB 32-bit word to *any* hardware format for software rendering extremely efficiently. That is 100% not the issue.
Basically the OS routines, on RTG are fit for acceleration of blitting/filling rectangles that are large enough to absorb the setup costs. For everything else they are just too outmoded and too slow. This is how I ended up with a "mostly accelerated" implementation of my API (in my library for my projects) provided you have a W3D capable system. The problems are that you have 3 different API that don't even sum to what you need: graphics for basic rendering and blitter operations. CGX/P96 for allocation and soft manipulation of VRAM resident bitmaps and software rendering to them. And finally W3D for more advanced rendering, e.g. blending a "bitmap" (a texture) onto the display, drawing gradient filled primitives (with or without "bitmap"), arbitrary scaling and rotation of "bitmaps" (again, just the rectangle size/orientation) etc. Last edited by Karlos; Yesterday at 12:58. |
![]() |
![]() |
#106 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,818
|
Just to point out, this is not an axe to grind, it's just a statement of how things were at a time when I wanted to make stuff that ran well on graphics cards when my Amiga was my daily driver. I don't think much has changed on the 68K side in that respect.
It was frustrating that there wasn't something more performance oriented available when the humble 68K+RTG would be the biggest beneficiary of improved efficiency compared to the emerging PPC/NG stuff. |
![]() |
![]() |
#107 |
ZapĀ“em
Join Date: Aug 2012
Location: Germany
Posts: 639
|
I once got a book in the nineties, where it was postulated that when Apple was in trouble, they had talks with Microsoft about being taken over by them and use a Windows version as OS that would still be Windows but have an "Apple face" to it. It would just have the Apple main screen and Apple menus, but it would be all Windows under the hood. I don't think I got that book anymore and I'm so bad at remembering names. I think it was called "The Microsoft file". But is that what is being asked for?
|
![]() |
![]() |
#108 |
Rumpig
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 93
Posts: 260
|
The Hammer and Abbot show is like a virus. Is there a thread it will not infect?
|
![]() |
![]() |
#109 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,818
|
Quote:
They both make reasonable points amid the constant to and fro but part of me thinks it's all been said and on numerous occasions. Last edited by Karlos; Today at 01:11. |
|
![]() |
![]() |
#110 |
Registered User
Join Date: Jun 2024
Location: Scotland
Posts: 22
|
A true Amiga is 68k with a floppy disk. Maybe a hard drive. Anything else is a frankenamiga. Of course I'm a hypocrite with various add ons for mine but things like PPC aren't truly Amiga. Beyond Commodore we move into what if territory.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is the best Amiga OS for PC(Amithlon or Amiga OS XL) | spannernick | support.Other | 4 | 04 September 2012 16:07 |
PortablE r4 released (now runs on Windows) | ChrisH | Coders. General | 1 | 30 May 2009 02:40 |
You know you're in trouble when a 1.4ghz PC runs Dizzy at 5fps... | Echo | Retrogaming General Discussion | 11 | 28 January 2003 15:06 |
Windows API for Amiga OS? | Pyromania | Amiga scene | 3 | 11 April 2002 13:02 |
|
|