A downloadable project

overview

  - c2p.library is a fast lowlevel Amiga shared library for chunky2planar conversion.

  - c2p.library is designed to run the core loop entirely into the CPU instruction cache, resulting a very fast conversion.

  - being a standard Amiga shared library, you can use c2p.library with your favourite development language.

  - c2p.library can convert chunky data in any resolution, up to 2 Mpx.

  - c2p.library is released under the MIT license.


features

  - convert 8 bit chunky buffer to 1-8 bitplanes planar Bitmap

  - fully OS compliant

  - automatic CPU detection to select the best conversion algorithm

  - sources included

  - fully documented

  - supplied with SDK for C, Assembly and Amiga E

  - free to use, for any personal or commercial software


requirements

  - os1.2 (v33) or newer

  - CPU 68020 or greater


recent changes

v1.9
- avoids pipeline stalls in the conversion on the 68040/060 CPUs.

v1.8
- custom memory manager, which ensures backward compatibility of the code back to AmigaOS 1.2 (still requires a 68020+ CPU).

v1.7
- improved conversion speed (up to +20%) for 1, 2 and 3 bitplanes.

v1.6
- if available, use Akiko chip (Amiga CD32) for c2p conversion.

v1.5.1
- fixed an issue in the delta conversion writeback algorithm.

v1.5
- added support for delta conversion: convert only the pixels that are modified in new frame.

v1.4
- added support for interleaved bitmaps as target of c2p conversion.

v1.3
- you can choose to convert only a limited number of chunky pixels, selecting them using a source offset and placing the result using a destination offset (eg: useful for chunky Blitter objects).

v1.2
- ability to use custom bitmaps.

v1.1
- optimized conversion algorithm for processors with bigger instruction cache (Motorola 68040 or greater).

v1.0
- first public release.

Download

Download
c2plib package URL on Aminet
External

Development log

Comments

Log in with itch.io to leave a comment.

I am crazy but i wonder if is possible to do something for older amigas even if will have HUGE 8x8 pixels

It’s possible in theory, even on older Amigas using very large “mega pixels”, but the current c2p.library is not ready for that yet.

At least two important features are missing:

1) Horizontal output pixel scaling
Right now one input byte is converted into one real output pixel.
To support huge pixels, the library should allow a configurable output format where each input pixel is expanded horizontally:

  • 1 → 1 pixel (current behavior)1 → 2 pixels

  • 1 → 4 pixels

  • 1 → 8 pixels

Vertical stretching can be handled outside the c2p.library using a suitable copperlist that repeats scanlines.

2) 68000-compatible chunky2planar routines
The current implementation is optimized for 68020+ CPUs (long shifts, swaps, advanced addressing).
To run on Amiga 500/600 OCS/ECS systems, a separate base 68000-compatible version of the c2p routines is required, without 020+ instructions.

--

In short:
yes, it can be done on older Amigas with big pixels,
but the c2p.library first needs output scaling support and a true 68000 backend.

As it stands now, it’s designed for 020+/AGA-class machines, not OCS/ECS.