static void Init() { CopListActivate(cp); EnableDMA(DMAF_BLITTER | DMAF_RASTER | DMAF_BLITHOG); { WORD i; LONG lines = ReadLineCounter(); #if CPULINE == 1 CpuLineSetup(screen, 0); #else BlitterLineSetup(screen, 0, LINE_OR|LINE_SOLID); #endif for (i = 0; i < screen->width; i += 2) { #if CPULINE == 1 CpuLine(i, 0, screen->width - 1 - i, screen->height - 1); #else BlitterLine(i, 0, screen->width - 1 - i, screen->height - 1); #endif } for (i = 0; i < screen->height; i += 2) { #if CPULINE == 1 CpuLine(0, i, screen->width - 1, screen->height - 1 - i); #else BlitterLine(0, i, screen->width - 1, screen->height - 1 - i); #endif } Log("lines: %ld\n", ReadLineCounter() - lines); } }
static void Init() { CopListActivate(cp); custom->dmacon = DMAF_SETCLR | DMAF_RASTER; { LONG lines = ReadLineCounter(); WORD r; for (r = 2; r < screen->height / 2 - 2; r += 2) Circle(screen, 0, screen->width / 2, screen->height / 2, r); Log("circles: %ld\n", ReadLineCounter() - lines); } }
static void Init() { WORD w = bitmap->width; WORD h = bitmap->height; WORD xs = X((320 - w) / 2); WORD ys = Y((256 - h) / 2); { LONG lines = ReadLineCounter(); BitmapUnpack(bitmap, BM_DISPLAYABLE); lines = ReadLineCounter() - lines; Log("Bitmap unpacking took %ld raster lines.\n", (LONG)lines); } CopInit(cp); CopSetupGfxSimple(cp, MODE_LORES, bitmap->depth, xs, ys, w, h); CopSetupBitplanes(cp, NULL, bitmap, bitmap->depth); CopLoadPal(cp, bitmap->palette, 0); CopEnd(cp); CopListActivate(cp); EnableDMA(DMAF_RASTER); }
static void Init() { { LONG lines = ReadLineCounter(); pixmap = PixmapFromPNG(image, MEMF_PUBLIC); lines = ReadLineCounter() - lines; Log("Png decoding took %ld raster lines.\n", (LONG)lines); } bitmap = NewBitmap(pixmap->width, pixmap->height, 4); bitmap->palette = PaletteFromPNG(image); { LONG lines = ReadLineCounter(); c2p_1x1_4(pixmap->pixels, bitmap->planes[0], pixmap->width, pixmap->height, bitmap->bplSize); lines = ReadLineCounter() - lines; Log("Chunky to planar took %ld raster lines.\n", (LONG)lines); } cp = NewCopList(100); { WORD w = bitmap->width; WORD h = bitmap->height; WORD xs = X((320 - w) / 2); WORD ys = Y((256 - h) / 2); CopInit(cp); CopSetupGfxSimple(cp, MODE_LORES, bitmap->depth, xs, ys, w, h); CopSetupBitplanes(cp, NULL, bitmap, bitmap->depth); CopLoadPal(cp, bitmap->palette, 0); CopEnd(cp); CopListActivate(cp); EnableDMA(DMAF_RASTER); } }