Avg undraw explosions: 1.690 ms, min: >7min, max: 0.0 us Avg undraw projectiles: 1.700 ms, min: >7min, max: 0.0 us Avg undraw vehicles: 1.710 ms, min: >7min, max: 0.0 us Avg draw vehicles: 12.094 ms, min: 10.557 ms, max: 13.411 ms Avg draw projectiles: 2.156 ms, min: 1.536 ms, max: 3.403 ms Avg draw explosions: 38.4 us, min: 0.0 us, max: >7min
@teh_KaiN, post #1
@Krashan, post #2
logAvgBegin(a); // coś tam logAvgEnd(a); logAvgBegin(b); // coś tam logAvgEnd(b);
@teh_KaiN, post #4
to chyba bym je musiał rezerwować w OSie, gadać z nimi przy pomocy timer.device, ... A to trochę jednak jest roboty.
uwFr1 = g_sTimerManager.uwFrameCounter; *pRay1 = *pReg; uwFr2 = g_sTimerManager.uwFrameCounter;
uwFr1 = g_sTimerManager.uwFrameCounter; *pRay1 = *pReg; uwFr2 = uwFr1;
* Max time capacity: 33 months */ ULONG timerGet(void) { return g_sTimerManager.uwFrameCounter; }
@mschulz, post #7
@teh_KaiN, post #8
@teh_KaiN, post #9
@Krashan, post #10
@teh_KaiN, post #11
@teh_KaiN, post #1
@asman, post #13
@teh_KaiN, post #14
Avg undraw explosions: 42.4 us, min: 0.0 us, max: 106.4 us Avg undraw projectiles: 62.0 us, min: 0.0 us, max: 64.4 us Avg undraw vehicles: 2.321 ms, min: 0.0 us, max: 2.494 ms Avg draw vehicles: 9.046 ms, min: 7.134 ms, max: 11.742 ms Avg draw projectiles: 319.6 us, min: 230.8 us, max: 895.6 us Avg draw explosions: 24.8 us, min: 0.0 us, max: >7min
@teh_KaiN, post #14
@makarsky, post #17
@teh_KaiN, post #18
@teh_KaiN, post #19
BYTE blitUnsafeCopy( tBitMap *pSrc, WORD wSrcX, WORD wSrcY, tBitMap *pDst, WORD wDstX, WORD wDstY, WORD wWidth, WORD wHeight, UBYTE ubMinterm, UBYTE ubMask ) { // Each dot/hash is 2 bits // CASE A: // srcX & 15 = dstX & 15 // ####|#### ....|.... ....|.... // ^===================v // ....|.... ....|.... ####|#### // // CASE B: // srcX & 15 < dstX & 15 // ..##|##.. ....|.... ....|.... // ^--v // ....|#### ....|.... ....|.... // ^=========v // ....|.... ....|#### ....|.... // // CASE C: // srcX & 15 > dstX & 15 // ..##|#### ####|##.. ....|.... ....|.... // ^-------v // ....|.... ####|#### ####|#### ....|.... // ^=========v // ....|.... ....|.... ####|#### ####|#### logWrite( "Blitting from %hd,%hd to %hd,%hu, size: %hdx%hd\n", wSrcX, wSrcY, wDstX, wDstY, wWidth, wHeight ); logWrite( "Bitmap sizes - src: %d,%d, dst: %d,%d\n", pSrc->BytesPerRow<<3, pSrc->Rows, pDst->BytesPerRow<<3, pDst->Rows ); UBYTE ubSrcOffs = wSrcX & 0xF; UBYTE ubDstOffs = wDstX & 0xF; LONG lSrcSeg = pSrc->BytesPerRow * wSrcY + (wSrcX >> 3); LONG lDstSeg = pDst->BytesPerRow * wDstY + (wDstX >> 3); if(ubSrcOffs > ubDstOffs) { // Case C lDstSeg -= 2; ubDstOffs += 16; logWrite("Case 'C'\n"); } UBYTE ubShift = ubDstOffs-ubSrcOffs; UWORD uwBlitWidth = (MAX(ubSrcOffs, ubDstOffs) + wWidth + 15) & 0xFFF0; UWORD uwBlitWords = uwBlitWidth >> 4; WORD wSrcModulo = pSrc->BytesPerRow - (uwBlitWords << 1); WORD wDstModulo = pDst->BytesPerRow - (uwBlitWords << 1); UWORD uwFirstMask = 0xFFFF >> ubSrcOffs; if(ubSrcOffs + wWidth < 16) uwFirstMask &= 0xFFFF << (16 - (ubSrcOffs + wWidth)); UWORD uwLastMask = 0xFFFF << (uwBlitWidth - (ubSrcOffs + wWidth)); logWrite("Offsets - src: %hhu, dst: %hhu\n", ubSrcOffs, ubDstOffs); logWrite("Segs - src: %d, dst: %d\n", lSrcSeg, lDstSeg); logWrite("Shift: %hhu\n", ubShift); logWrite("Blit width: %hu (%hu words)\n", uwBlitWidth, uwBlitWords); logWrite("Modulos - src: %hd, dst: %hd\n", wSrcModulo, wDstModulo); logWrite("Masks: %04X, %04X\n", uwFirstMask, uwLastMask); ubMask &= 0xFF >> (8- MIN(pSrc->Depth, pDst->Depth)); UBYTE ubPlane = 0; OwnBlitter(); custom.bltcon0 = (ubShift << ASHIFTSHIFT) | USEB|USEC|USED | ubMinterm; custom.bltcon1 = (ubShift << BSHIFTSHIFT); custom.bltafwm = uwFirstMask; custom.bltalwm = uwLastMask; // shift & mask before ptr & data custom.bltbmod = wSrcModulo; custom.bltcmod = wDstModulo; custom.bltdmod = wDstModulo; custom.bltadat = 0xFFFF; while(ubMask) { if(ubMask & 1) { WaitBlit(); // This hell of a casting must stay here or else large offsets get bugged! custom.bltbpt = (UBYTE*)(((ULONG)(pSrc->Planes[ubPlane])) + lSrcSeg); custom.bltcpt = (UBYTE*)(((ULONG)(pDst->Planes[ubPlane])) + lDstSeg); custom.bltdpt = (UBYTE*)(((ULONG)(pDst->Planes[ubPlane])) + lDstSeg); custom.bltsize = (wHeight << 6) | uwBlitWords; } ubMask >>= 1; ++ubPlane; } DisownBlitter(); return 1; }
Blitting from 146,0 to 0,0, size: 4x6 Bitmap sizes - src: 256,6, dst: 16,6 Case 'C' Offsets - src: 2, dst: 16 Segs - src: 18, dst: -2 Shift: 14 Blit width: 32 (2 words) Modulos - src: 28, dst: -2 Masks: 3C00, 0000
Blitting from 146,0 to 16,0, size: 4x6 Bitmap sizes - src: 256,6, dst: 32,6 Case 'C' Offsets - src: 2, dst: 16 Segs - src: 18, dst: 0 Shift: 14 Blit width: 32 (2 words) Modulos - src: 28, dst: 0 Masks: 3C00, 0000
@teh_KaiN, post #20
@asman, post #21
@teh_KaiN, post #22
Kolejność OwnBlitter faktycznie zmienię, ale nie sądzę żeby tu miała istotny wpływ.
@asman, post #24
custom.bltbpt = (UBYTE*)((ULONG)pSrc->Planes[ubPlane]) + lSrcSeg; custom.bltcpt = (UBYTE*)((ULONG)pDst->Planes[ubPlane]) + lDstSeg; custom.bltdpt = (UBYTE*)((ULONG)pDst->Planes[ubPlane]) + lDstSeg;
Co do engine'u i wgryzania się w chipset to już coś takiego powstało. Siedzę nad tym ponad 5 lat, ale jakoś nikt nie jest skory do pomocy żeby to mi pomóc rozwijać. Latają na tym wszystkie moje gry amigowe.
@docent, post #26
@asman, post #28
@teh_KaiN, post #1