home *** CD-ROM | disk | FTP | other *** search
- Path: ifi.uio.no!usenet
- From: ludvigp@ifi.uio.no (Ludvig Pedersen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: doubling pixels horizontally
- Date: 21 Feb 1996 19:22:56 GMT
- Organization: Dept. of Informatics, University of Oslo, Norway
- Message-ID: <4518.6625T1142T92@ifi.uio.no>
- References: <4f4ibc$gl9@news.cs.tu-berlin.de> <591.6610T1165T2102@login.eunet.no><1045.6611T753T2256@vip.cybercity.dk><4faoe1$47@sunsystem5.informatik.tu-muenchen.de><2991.6612T1034T625@vip.cybercity.dk><576.6613T1070T1730@login.eunet.no><1257.6614T57T922@vip.cybercity.dk>
- <1982.6617T1096T103@ifi.uio.no> <4gbjg3$104@sunsystem5.informatik.tu-muenchen.de>
- NNTP-Posting-Host: gymir.ifi.uio.no
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- >: He was the first to use sprite-dither!
- >yes. In "Excess/RIOT", I used this method for quick 256 col rotzoom.
- >It was no c2p, it was a special 1-blitterpass solution with cpu
- >storing mega-scrambled ;) Any more rotzoomers ?
- Please not, I have seen enough of rotzoomer!! :-)
-
- >Having already claimed "blitteronly c2p on A1200 rulz" bevore,
- >I combined both ideas of ghost-mode & c2p. voila :)
- >: He used a SCRAMBLED buffer and the source code was extremly hard to
- >Well, both scrambled & linear, 2pass or 3pass.
- Yes that was the problem. It went 25 fps in linear mode.
-
- >: understand. (In my opinion this was the worst source I have ever seen!)
- >were you the one I was wrestling with about this some months ago ? ;)
- >nobody could really tell me what is bad about my code. maybe it is...
- >Yes, blitterscreen is "extremly hard to understand" for some people ;->
- >Sorry for not writing a comment after each instruction. I know it
- >would have been hard work to understand it for myself if I had to
- >try to check what's going on just by this code :)
- In my opinion good code don't need comments on *every* lines.
- It should be written in a way that it is easy to understand and
- there is easy to get an overview.
-
- Having many instructions on screen don't give us more overview but more MESS!
- (Try another screenmode instead)
-
- Actually I think it is important to have a litte "air" in between! :-)
-
-
- Here is a small piece of *your* code:
-
- * PLANES
- movem.l d0-d7/a1-a6,-(sp) ;a0=(ptr)copl
- move.l d4,mfpoffs : ext.l d5 : move.l d5,mfloffs
- * gen planeptr moves
- movem.l d3/d0,-(sp)
- move.w #$00e0,d3 : move.w #4-1,d7
- mf256genhi:
- move.w d3,(a0)+ : addq.w #2,d3 : move.l d0,(a0)+ ;store hiwd ! -2(a0)
- move.w d3,-2(a0) : addq.w #2,d3 : move.w d0,(a0)+ ;store lowd
- ;every 2nd plane same data
- move.w d3,(a0)+ : addq.w #2,d3 : move.l d0,(a0)+ ;store hiwd ! -2(a0)
- move.w d3,-2(a0) : addq.w #2,d3 : move.w d0,(a0)+ ;store lowd
- add.l mfpoffs,d0
- dbra d7,mf256genhi
- * end gen ptrs
- movem.l (sp)+,d3/d0
- and.l #$ff,d2 : sub.b #1,d2 : ror.l #8,d2 ;sub #1: prev line
- move.l #$00e1fffe,d4 : or.l d2,d4 ;WAS: 00df
- *
- move.w d3,d5
- subq.w #1,d5
- mf256yanz:
- move.l #$1020010,d7
- move.w #2-1,d6
- mf256do2:
- move.l d4,(a0)+ : add.l #$01000000,d4 ;cwait
- move.l d7,(a0)+ : eor.l #$00000031,d7 ;horiz shift
- ; ^---- 3: 1 -> 2 -> 1 -> 2 ....
- dbra d6,mf256do2
- add.l mfloffs,d0
- dbra d5,mf256yanz
- movem.l (sp)+,d0-d7/a1-a6 ;a0=(ptr)copl
- rts
-
- Its quiet unreadable in my opinion.
-
- >: Anyway, I was inspired by the sprite-dither (A great idea!). This enabled
- >: the c2p to have faster frame rate and less computations.
- >one pass done by planar hardware, so one less for blitter or cpu.
- Yes that was clever. :)
-
- >: And made the code 30-40% faster. Now it is just as fast as to copy
- >: 5120 (160*128/4) longwords to chipram. (Try to beat that!)
- >Your refer to 2-pass on 030-50 ? please be more exact.
- Yes. I think I have posted some timings here some days ago.
-
- >Well, I guess my 1pass routine will also be as fast as copy on 030-25,
- >it needs 2 times on 020-14 and as 030-25 is roughly about 2 times
- >faster...
- >I would be happy if we could get a 3pass almost at copy speed.
- >(well copy speed, that's 7mb/sec on 030 ? or are we refering to
- >the 4mb/sec on 020-14 ?)
- On my A1200 7mb/sec is not copy speed but chip write speed.
-
- I did a simple test and I was able to copy 4.9mb/sec from fastram to chipram
- on a 256 colors screen.
-
- >: I have also made a version without sprite-dither with the same algorithm.
- >=:o oooh! But it's non-ideal, right ? how you get normal planar words
- >out of THAT mess :) 01010101 how you get together the 0's to 0000 ?
-
- I don't get it??? ;) It is optimal. That was actually VERY easy. Remeber that
- we are taking about 2x2 without sprite-dithering!!
-
- (This code will also be released.)
-
- >: We plan to release this routine as soon as possible. The only thing we need
- >: is a doc file! :-/
- >: BTW:
- >: I have also tried to write this routine as system-friendly as possible by
- >: using QBlit for the blitterpasses.
- >I currently got problems with my way of calling qblit. You got a demo
- >executable ? Mine locks up with small OS-blits :\
-
- I don't have that problem. You can look at the source. It will be released
- this week.
-
- BTW:
-
- fASTERblIT(FBL) makes the CPU hang after a QBlit(). If you are using this
- patch thats the error.
-
-
-
- <sb>Ludde - Amiga Demo Coder
- <sb>Virtual Reality & Official Be developer
- <sb>ludvigp@ifi.uio.no
-
-