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: 22 Feb 1996 16:27:01 GMT
- Organization: Dept. of Informatics, University of Oslo, Norway
- Message-ID: <2824.6626T859T1819@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>
- <4518.6625T1142T92@ifi.uio.no> <5073.6626T469T1290@login.eunet.no>
- NNTP-Posting-Host: gymir.ifi.uio.no
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- >>>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.
- >Like using structures. :)
- Yes, that's good! :)
-
- >>[..........]
- >>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
- >>[...]
- >> move.l #$00e1fffe,d4 : or.l d2,d4 ;WAS: 00df
- >> movem.l (sp)+,d0-d7/a1-a6 ;a0=(ptr)copl
- >> rts
- >Whow! What a mess. :)
- I don't think you are the only one which agree's about that! ;)
-
-
- >>>: 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!!
- >He forgot that it was 2xn
- He probably did.
-
- >>>: 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.
- >Hmm.. Yes you do. Its tha same locker we have. Exept we MAY have found a
- >solution. Guess it will lock when I implement it in our world engine. :)
- Ohh..like you did! I thought it was that the CPU locked while blitting.
-
- There is the solution(not to you, but the guy with the problem)
-
- If you set a flag in CleanUp: and are polling this flag with CPU to see if the
- blitter is finish. It might never finish because you task uses all the CPU-
- time. and CleanUp is never run.
-
- Don't do this:
-
- .QCleanup:
- move.l #-1,_BlitterIsDone
- moveq #0,d0
- rts
-
- and this
-
- while(!BlitterIsDone); //infinite wait loop.
-
- ------------------------------------------------------
- Send a signal instead!
-
- Here is my code. (It works!)
-
- .QCleanUp:
- move.l #-1,_BlitterIsDone
- movem.l d0-a6,-(sp)
- move.l _BltPort,a0
- moveq.l #0,d0
- move.b MP_SIGBIT(a0),d1
- bset d1,d0
- move.l 4.w,a6
- move.l _Task,a1
- CALL Signal(a6)
- movem.l (sp)+,d0-a6
-
- moveq #0,d0
- rts
-
- And this:
-
- while(!BlitterIsDone)
- Wait(1l<<(BltPort->mp_SigBit));
-
-
- Now your task will be in wait-state until the blitter is finished.
-
- Problem solved! :)
-
-
- <sb>Ludde - Amiga Demo Coder
- <sb>Virtual Reality & Official Be developer
- <sb>ludvigp@ifi.uio.no
-
-