Home   News   Concept   AMIGA-Compatible   Hardware   Forum   Questions+Answers   Pictures   Contact & Team

Welcome to the Natami / Amiga Forum

This forum is for AMIGA fans interested in the new NATAMI platform.
Please read the forum usage manual.



All TopicsNewsQAFeaturesTalkTEAMLogin to post    Create account
Do you have questions about the Natami?
Post it here and we will answer it!

Mixed Planar/chunky Mode, How Does It Work?page  1 2 3 4 5 6 7 
Marcel Verdaasdonk
Netherlands

Posts 3991
11 Oct 2011 21:36


Mr. Clark your correct however for AOS 3.1 Natami would be a AGA system, if not in body it would be in soul.

To be a little more clear, new hardware ancient software. ;)

So yes it does need the restrictions however new software could lift that restrictions.(register setting)

Thomas Richter
Germany
(MX-Board Owner)
Posts 1425
11 Oct 2011 21:54


Thomas Clarke wrote:

I won't pretend that I understand everything written in this thread, but just to be clear, these chunky restrictions only apply when using the Natami as an AGA machine, correct?

No.

Thomas Clarke wrote:

  What I mean by this is, with SuperAGA, we don't need to carry around the same restrictions. If the hardware is new, and the software making use of this enhanced hardware will be new, then the restrictions need not apply, correct?

No. The restrictions apply to any program that want to access the machine through the operating system, and hence through gfx. The problem is not the hardware, and not the user software, but gfx in the middle. No matter how your software works, gfx will not render, draw lines, or move windows around on any chunky machine. You need to patch up gfx for that, no matter what.

For games that access the hardware directly, there is of course no problem.


Thomas Clarke
United Kingdom

Posts 286
11 Oct 2011 22:12


@Thomas Richter
For games that access the hardware directly, there is of course no problem.

Good to hear.

So the issue is the OS then. Seeing as AROS already supports true colour modes, the issue is writing an AROS driver that opens up the extra graphics power of the Natami, is that what you mean by 'patching'?

Thomas Richter
Germany
(MX-Board Owner)
Posts 1425
11 Oct 2011 22:38


Thomas Clarke wrote:

  So the issue is the OS then.

Gfx is not exactly high quality code, too much bound to the hardware, and the design left a bit to desire.

Thomas Clarke wrote:

Seeing as AROS already supports true colour modes, the issue is writing an AROS driver that opens up the extra graphics power of the Natami, is that what you mean by 'patching'?

No. Actually, I know not much about AROS, and have no experience with using it, and how compatible it really is. I believe that patching up gfx with something like P96 might be more realistic.

Thomas Clarke
United Kingdom

Posts 286
11 Oct 2011 23:41


Thomas Richter wrote:
I believe that patching up gfx with something like P96 might be more realistic.

It might be, but also it might not be. Perhaps it would be sensible to investigate what AROS already offers with regards to true colour modes first, to avoid duplicating work.

According to the CyberGraphX Wikipedia page "AROS implements CyberGraphX V4 compatible API". Here's some documentation about it from the AROS Wikibook:
EXTERNAL LINK 
Surely some of this will be of use for a Natami true colour mode?

Thomas Richter
Germany
(MX-Board Owner)
Posts 1425
12 Oct 2011 01:01


Thomas Clarke wrote:

  According to the CyberGraphX Wikipedia page "AROS implements CyberGraphX V4 compatible API". Here's some documentation about it from the AROS Wikibook:
  EXTERNAL LINK 
  Surely some of this will be of use for a Natami true colour mode?

Not really, but this is not due to cgfx, but due to the Natami chunky modes. I don't know why Thomas designed them the way they are right now, but currently, a true color image consists of three planes, each chunky, each plane representing 8 bits per channel, where the first plane is red, the second is green and the third is blue. Unfortunately, this doesn't match any of the typical graphic modes supported by PC type cards, and hence is not in any of the color formats cgfx, P96 or AROS supports.

A 32 bpp color mode (32 bits per pixel, as RGB) would have been more orthogonal and would have fit right into the typical layout of PC graphics memory. Hopefully, Thomas is still able to revisit this design decision.


Georg Steger
Italy

Posts 1
12 Oct 2011 08:16


Thomas Richter wrote:

and hence is not in any of the color formats cgfx, P96 or AROS supports.

In case of AROS this is not a problem because there's no code in it's graphics.library that relies on direct bitmap access (gfx drivers can provide support for that but it is not required so they can deny direct access).

This allows the driver to lie about the real hw color/pixel format and for example it could provide ARGB32 bitmaps which in reality the driver stores as shadow chunky pixel arrays in RAM and then for display real time ditheres to a 8 bit planar screen.


Jakob Eriksson
Sweden
(Moderator)
Posts 1097
12 Oct 2011 09:01


Thomas Richter wrote:

  A 32 bpp color mode (32 bits per pixel, as RGB) would have been more orthogonal and would have fit right into the typical layout of PC graphics memory. Hopefully, Thomas is still able to revisit this design decision.
 

Possibly, but as Georg Steger points out, for AROS itself it does not seem to be an issue, since it hides the actual details about the framebuffer.

Matt Hey
USA

Posts 737
12 Oct 2011 14:34


Jakob Eriksson wrote:

 
Thomas Richter wrote:

    A 32 bpp color mode (32 bits per pixel, as RGB) would have been more orthogonal and would have fit right into the typical layout of PC graphics memory. Hopefully, Thomas is still able to revisit this design decision.
   
 

 
  Possibly, but as Georg Steger points out, for AROS itself it does not seem to be an issue, since it hides the actual details about the framebuffer.
 

 
  That's very slow. All drawing functions will go into a framebuffer and then the framebuffer will be copied to the screen at the refresh rate? People won't buy the Natami with that kind of support.
 
  Is there really no standard 16 bit or 32 bit chunky modes? The 3x8 byte RGB mode does not suffice. In most cases, it would not be used and is more cumbersome to handle than chunky. It saves display bandwidth but it's still not worth it for programs that access the display memory a lot (3x access vs 1) or use alpha channels. Plus, the whole gfx and layers system would have to support it. 16 bit chunky should be available for where 32 bit chunky does use too much bandwidth. 16 bit 565 RGB (BE or LE) formats should be a priority. It's fast, compatible, enough colors for many things and would allow the gfx system to get up to speed faster. I think Natami's success will hinge on it's support (or lack of support) for 16 bit and 32 bit chunky modes.
 

Louis Dias
USA

Posts 217
12 Oct 2011 14:55


Yea, does it really matter if WritePixel(screen, x,y, color24) is defined as:
    (excuse the VB.Net-ish code)
   

    Sub WritePixel(screen as ScreenObject, X as Integer, Y as Integer, Color as Integer)
        Dim Red As Integer = 16711680
        Dim Green As Integer = 65280
        Dim Blue As Integer = 255
   
        WriteRedPixel(screen, X, Y, (Red AND Color)/256^2)
        WriteGreenPixel(screen, X, Y, (Green AND Color)/256)
        WriteBluePixel(screen, X, Y, Blue AND Color)
    End Sub
   


Matt Hey
USA

Posts 737
12 Oct 2011 16:03


@Louis Dias
Many programs that use chunky write directly into the vmem to change a pixel. It's fast and it works with a compatible chunky mode but not 3x8 byte planes. Your WritePixel function looks simple but it has over twice (and maybe 3x) the overhead of a program writing directly to vmem. You can say that the vmem shouldn't ever be accessed directly by programs but it is and it's fast. Even SDL programs need direct vmem access.



Thomas Richter
Germany
(MX-Board Owner)
Posts 1425
12 Oct 2011 16:17


Louis Dias wrote:

Yea, does it really matter if WritePixel(screen, x,y, color24) is defined as:
    (excuse the VB.Net-ish code)
   

    Sub WritePixel(screen as ScreenObject, X as Integer, Y as Integer, Color as Integer)
        Dim Red As Integer = 16711680
        Dim Green As Integer = 65280
        Dim Blue As Integer = 255
   
        WriteRedPixel(screen, X, Y, (Red AND Color)/256^2)
        WriteGreenPixel(screen, X, Y, (Green AND Color)/256)
        WriteBluePixel(screen, X, Y, Blue AND Color)
    End Sub
   


Sorry, I afraid you miss the point. The point is not how to implement WritePixel. The point is which implementations we have to build on. And, to my knowledge, neither P96 or CGFX implement WritePixel in such a way. Instead, they assume a single continuous memory layout with either 2, 3 or 4 bytes per pixel, with writing a pixel being a single operation. They don't support a frame buffer/video memory consisting of three planes.

AROS might, but this includes - as I read it - an additional copy operation, i.e. the AROS code or rather the user program writes a single pixel into an off-screen buffer, and then AROS converts this buffer to the video memory, so a lot of steps are needed to write a single pixel (write into memory, and copy over again to the video memory).

As you know, I don't care about programs that go directly to the hardware. It's the job of the operating system to provide the proper abstraction. Unfortunately, there is no *effective* way of supporting the current Natami organization with the current state of P96. This means a lot of additional work, either by writing conversion functions, or by drilling up existing systems (if we can, for legal reasons).

Greetings from Rapid City,

Thomas


Przemyslaw Szeremiota
Poland

Posts 25
12 Oct 2011 16:49


I understand your points, but...

I have nothing against RGB packed chunky formats, but I will buy Natami EXACTLY because of this unique mode :-). Ideally, if driver/GFX subsystem could support merged channels in framebuffer (e.g. of the three framebuffer byteplanes any two or all three could be in fact the same framebuffer memory area; or partially overlapping areas (for channel pairs)), as in Amiga normal bitplanes.

I know, corner case of this merging (monochromatic display) can be done also in LUT mode, but on bitplanes it is still more cumbersome... And those channels themselves are very interesting project, a different way to go -- this is what I expect from this project :-).

And, isn't that some (many) image manipulation algorithms operate exactly on separate color channels? And they can be easier streamed and paralleled this way?

I would even encourage Thomas (H.) to push this channel support further, e.g. with possibility of configurable reduction of resolution (e.g. packed byteplane with 2/4 pixels per byte) and bit depth of a given channel (e.g. packed byteplane with 2/4/8 bits per pixel) -- I guess it's mainly matter of RAMDAC control?

Thomas Richter
Germany
(MX-Board Owner)
Posts 1425
12 Oct 2011 19:19


Przemyslaw Szeremiota wrote:

I understand your points, but...
 
  I have nothing against RGB packed chunky formats, but I will buy Natami EXACTLY because of this unique mode :-). Ideally, if driver/GFX subsystem could support merged channels in framebuffer (e.g. of the three framebuffer byteplanes any two or all three could be in fact the same framebuffer memory area; or partially overlapping areas (for channel pairs)), as in Amiga normal bitplanes.

Sorry, I don't understand your point. I buy a machine because it runs certain programs... The number of additional features you get by this mode is rather small. You mention one specific corner case I do not see any good application for (do you have any?) - and setting R = B or so can also easily done by the CPU by setting the pixels appropriately.

Thus, what I'm saying is that the benefits are minimal, but the costs are large - as in: quite some software has to be rewritten to make use of it. (Would you spend your time in drilling up P96 or Cgfx, provided we *would* get licenses to extend it?)

Przemyslaw Szeremiota wrote:

  I know, corner case of this merging (monochromatic display) can be done also in LUT mode, but on bitplanes it is still more cumbersome... And those channels themselves are very interesting project, a different way to go -- this is what I expect from this project :-).

Please note: This is not about LUT vs. direct color modes, but rather how a direct/true-color mode is implemented. And of course you can merge channels in a true-color display - though it requires more CPU cycles. But since there is rarely an application that requires such operations, I don't see why it matters.

Przemyslaw Szeremiota wrote:

  And, isn't that some (many) image manipulation algorithms operate exactly on separate color channels? And they can be easier streamed and paralleled this way?

Not really. For example, ICC profiles do define separate LUTs on R, G and B indeed, but the channels need to go into a common matrix transformation/common lookup as well, so you need all three channels simulatenously anyhow as inputs for a single operation. There is no benefit of the three planes you could take advantage of, and there is no parallelity in the Natami either. In fact, it is a bit easier with 32bpp because a single longword catches or writes a single pixel.

Przemyslaw Szeremiota wrote:

  I would even encourage Thomas (H.) to push this channel support further, e.g. with possibility of configurable reduction of resolution (e.g. packed byteplane with 2/4 pixels per byte) and bit depth of a given channel (e.g. packed byteplane with 2/4/8 bits per pixel) -- I guess it's mainly matter of RAMDAC control?

I don't know. I don't quite see the benefit, a reduced resolution in one of the R or G or B channels doesn't make much sense. It would make some sense for a YCbCr type of frame buffer since video is typically subsampled, but then again you are completely on your own because P96 nor Cgfx supports anything but RGB. Thus, there is *some* benefit in a YCbCr planar mode, but none I see for planar RGB.

Greetings,
Thomas

Peter K.
Germany
(MX-Board Owner)
Posts 439
12 Oct 2011 22:12


Hi Thomas,
 
The 3 RGB-Byteplane mode as been a proposal and is
documented and marked as proposal only in our internal
Wiki. It might be useful in special cases, but actually
I trust in Thomas to specify a generally useful standard hi or
truecolor mode first.
 
 

Peter K.
Germany
(MX-Board Owner)
Posts 439
12 Oct 2011 22:29


And to add from the old FAQ section

24  16M    24  6  (chunky-planar mix mode)
8    256    8  2  (chunky mode)
16  65536  16  2  (chunky mode)
32  16M    32  2  (chunky mode)

So on this roadmap there are both: real chunky modes and
the discussed mixed-mode proposal.
 


Thomas Hirsch
Germany
(MX-Board Owner)
Posts 647
12 Oct 2011 22:40


Talking about roadmap. As I get it here you are talking about how to implement high color modes most reasonable. But more immediate for me is the topic itself, whether it makes sense mixing chunky and planar screen modes.

The second thing is as I get it we need conversion methods between planar and chunky. I think it would make sense to do that in hardware.

Ceti 331
United Kingdom

Posts 282
13 Oct 2011 01:04


Dont see a point to anything other than packed chunky framebuffers in 2011.
would be interested to know if the blitter will have ability to perform format conversions, palette lookup (e.g. store fonts in 8bit alpha..)

Marcel Verdaasdonk
Netherlands

Posts 3991
13 Oct 2011 08:10


ceti 331 wrote:

Dont see a point to anything other than packed chunky framebuffers in 2011.
  would be interested to know if the blitter will have ability to perform format conversions, palette lookup (e.g. store fonts in 8bit alpha..)

Ceti remember that part of the RAM is unavailable to programs because of the use of a RAM disk.
second I think i am one of the few here that see a good reason to update the sprite engine above using BOBs(off-topic)

the hybrid mode makes it easier to use planar ciruitry/mechanics get used by chunky to some extend.
This would eliviate stress on the memory since less bandwidth is required.(more for other things)
If this is well implemented it could mean you can disassociate one color plane and swap it with a different one.(neat effect if used properly)

The advantage planar had was it's LUT, if this feature is available for the hybrid mode one could use it for a color intensity map.
But this would be a less usfull feature IMHO i think some of the artist here can tell us otherwise.

and if we do need a package formot i still prefer 16bit RGB 565 format over 32bit RGBAX 88871.

Matt Hey
USA

Posts 737
13 Oct 2011 19:00


Thomas Richter wrote:
 
     
Przemyslaw Szeremiota wrote:

      I would even encourage Thomas (H.) to push this channel support further, e.g. with possibility of configurable reduction of resolution (e.g. packed byteplane with 2/4 pixels per byte) and bit depth of a given channel (e.g. packed byteplane with 2/4/8 bits per pixel) -- I guess it's mainly matter of RAMDAC control?
     

      I don't know. I don't quite see the benefit, a reduced resolution in one of the R or G or B channels doesn't make much sense. It would make some sense for a YCbCr type of frame buffer since video is typically subsampled, but then again you are completely on your own because P96 nor Cgfx supports anything but RGB. Thus, there is *some* benefit in a YCbCr planar mode, but none I see for planar RGB.
   

   
    68k P96 does partially support some non-RGB modes...
   
    RGBFB_Y4U2V2:  2 byte TrueColor (CCIR recommendation CCIR601)
    RGBFB_Y4U1V1:  1 byte TrueColor ACCUPAK (used on Cirrus GD5446)
   
    The (PIP) "window" can be opened with these modes but most drawing functions don't support it. It works on Voodoo 3+ cards and Picasso IV at least (probably Virge and Permedia 2 based cards too). It looks like these modes are packed linearly. Would there be any advantage to packing YCbCr/YUV in separate "planes"? RGBFB_Y4U2V2 already looks pretty easy to access and process.
   
   
Thomas Hirsch wrote:

    Talking about roadmap. As I get it here you are talking about how to implement high color modes most reasonable. But more immediate for me is the topic itself, whether it makes sense mixing chunky and planar screen modes.

   
    It's not a necessity. Is there a large speed reduction or technical problems? Most gfx boards do offer PIP/video overlay that fits over the display and offers different modes. For example my gfx board...
   
    "Video Overlay : Napalm supports one full featured video overlay that is unlimited in size, and supports pixel formats of YUV 411, YUV 422, RGB (1-5-5-5), RGB (5-6-5), and RGB (x-8-8-8). The video overlay can be double, tripple or quad buffered, and can be bilinear scaled to full screen resolutions."
     
    EXTERNAL LINK   
 
    The way the Amiga would do it may be different but it would be good to look at how gfx cards do overlays and maybe combine some of the ideas. This might allow some software that uses overlays on the PC or P96 overlays to be more easily used on the Amiga. A dynamic type of overlay per screen with planar support up to 8 bit would fit with the Amiga the best but may not be practical. That P96 YUV PIP window is movable and resizable as any other window but as soon as I change screens it becomes obvious that it is not a normal window as it disappears. Even better than the Amiga would be to allow separate resolutions for windows and be able to overlap and attach another window with whatever resolution on top with transparency to what's below. That was a great idea someone suggested but it was shot down as probably unpractical.
   
   
Thomas Hirsch wrote:

      The second thing is as I get it we need conversion methods between planar and chunky. I think it would make sense to do that in hardware.

   
    Some of the early gfx boards had hardware planar to chunky support. The CV64 (not 3D version) had support in CGFX for this. I think getting 16 bit and 32 bit chunky modes working is much higher priority but it would be useful to have in hardware...
   
    planar->chunky
    16 bit dithering
    YUV->RGB (similar to gfx board support again)
    endian conversion
   
    3x8 byte plane modes may be interesting test subjects for later but the Natami will be judged on how well it does what the rest of the world can do and that's chunky.
   

posts 135page  1 2 3 4 5 6 7