Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fast-wipe Hires
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
BLuRry  
View profile  
 More options Aug 30 2012, 10:21 pm
Newsgroups: comp.sys.apple2.programmer
From: BLuRry <brendan.rob...@gmail.com>
Date: Thu, 30 Aug 2012 19:21:56 -0700 (PDT)
Local: Thurs, Aug 30 2012 10:21 pm
Subject: Fast-wipe Hires
Here's something I wrote to see how fast I could fill the hires screen with the same number.  I wrote this in a "race-the-gun" style so that you could in theory run this without ever getting a vertical retrace artifact or vertical blinds.  Store the pattern you want in $06 before calling it.

I wrote this for ACME assembler.  Because I unrolled the loop to store 8 bytes before a conditional branch it is incredibly speedy.

There is a reason for this routine, but it's actually because I want something that can reverse the whole screen.  The way I see it is you can't make a killer 3d demo on this platform.  But holy cow can you get creative with persistence of vision.  Because this platform can fire off 60 fps, stroboscopic effects are much more effective.

-B

; @com.wudsn.ide.asm.hardware=APPLE2
!cpu 65c02
*=$6000

GRAPHICS        = $c050
FULLSCREEN      = $c052
PAGE1           = $c054
HIRES           = $c057

                        bit HIRES
                        bit PAGE1
                        bit FULLSCREEN
                        bit GRAPHICS

                        LDY #47
                        CLC
clearloop
                        LDA lookup,y
                        STA rewrite1+2
                        ADC #$04
                        STA rewrite2+2
                        ADC #$04
                        STA rewrite3+2
                        ADC #$04
                        STA rewrite4+2
                        ADC #$04
                        STA rewrite5+2
                        ADC #$04
                        STA rewrite6+2
                        ADC #$04
                        STA rewrite7+2
                        ADC #$04
                        STA rewrite8+2                  
                        LDX #40
                        DEY
                        LDA lookup,y
                        STA rewrite1+1
                        STA rewrite2+1
                        STA rewrite3+1
                        STA rewrite4+1
                        STA rewrite5+1
                        STA rewrite6+1
                        STA rewrite7+1
                        STA rewrite8+1
                        LDA $06
rewrite1        STA $2000, X
rewrite2        STA $2000, X
rewrite3        STA $2000, X
rewrite4        STA $2000, X
rewrite5        STA $2000, X
rewrite6        STA $2000, X
rewrite7        STA $2000, X
rewrite8        STA $2000, X
                        DEX
                        BPL rewrite1
                        DEY
                        BPL clearloop
                        RTS

lookup          !wo $23D0,$2350,$22D0,$2250,$21D0,$2150
                        !wo $20D0,$2050,$23A8,$2328,$22A8,$2228
                        !wo $21A8,$2128,$20A8,$2028,$2380,$2300
                        !wo $2280,$2200,$2180,$2100,$2080,$2000


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antoine Vignau  
View profile  
 More options Aug 31 2012, 3:10 pm
Newsgroups: comp.sys.apple2.programmer
From: Antoine Vignau <antoine.vig...@laposte.net>
Date: Fri, 31 Aug 2012 12:10:06 -0700 (PDT)
Local: Fri, Aug 31 2012 3:10 pm
Subject: Re: Fast-wipe Hires
Even faster ;-)
- divide your lookup table into two tables: one for low @ and one for high @

lookupl hex D050D050D050 ...
lookuph hex 232322222121 ...

 LDY #24-1
 CLC
clearloop
 LDA lookuph,y
 ...

 LDX #40-1 (and not 40)
 LDA lookupl,y
 ...

You'll save one DEY per loop and even more with #40-1 instead of #40 :-)

antoine


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BLuRry  
View profile  
 More options Aug 31 2012, 6:55 pm
Newsgroups: comp.sys.apple2.programmer
From: BLuRry <brendan.rob...@gmail.com>
Date: Fri, 31 Aug 2012 15:55:34 -0700 (PDT)
Local: Fri, Aug 31 2012 6:55 pm
Subject: Re: Fast-wipe Hires

That's good feedback!  Thanks Antoine!  I expanded this out to EOR page 1 and page 2 and flip on the VBL.  This proof of concept has shown me that the resolution of the display does not seem so low when you're flipping pages rapidly to produce optical illusions.

I've been able to reproduce these two:

http://www.moillusions.com/2007/01/flying-through-city-stereogram.html
http://www.grand-illusions.com/opticalillusions/chris_walken/

And I also have a take on this one which makes it look like it's continually expanding:

http://www.moillusions.com/wp-content/uploads/img142.imageshack.us/im...

All in all, the speed of the routine is key to reversing the screen quickly.

More to follow...

-B


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BLuRry  
View profile  
 More options Aug 31 2012, 8:49 pm
Newsgroups: comp.sys.apple2.programmer
From: BLuRry <brendan.rob...@gmail.com>
Date: Fri, 31 Aug 2012 17:49:46 -0700 (PDT)
Local: Fri, Aug 31 2012 8:49 pm
Subject: Re: Fast-wipe Hires
With feedback from Antoine, here's a variation which inverses both hires screens and switches between them on the vertical retrace.  The speed of this is sufficient to achieve the optical illusion of movement.  I'm not sure if I could pull this off for DHGR because it would essentially be twice as slow.

; @com.wudsn.ide.asm.hardware=APPLE2
!cpu 65c02
*=$6000

KEYBOARD        = $c000
STROBE          = $c010
GRAPHICS        = $c050
TEXT            = $c051
FULLSCREEN      = $c052
MIXED           = $c053
PAGE1           = $c054
PAGE2           = $c055
LORES           = $c056
HIRES           = $c057

                        bit HIRES
                        bit FULLSCREEN
                        bit GRAPHICS
beginning
                        JSR waitForRetrace
                        LDA pageOffset+1
                        BEQ showPage2
showPage1
                        BIT PAGE2
                        LDA #$00
                        BEQ startLoop
showPage2
                        BIT PAGE1
                        LDA #$20
startLoop
                        STA pageOffset+1
                        LDY #23
                        CLC
clearloop1
                        LDA lookupHi,y
pageOffset      ADC #$20
                        STA xor1a+2
                        STA xor1b+2
                        ADC #$04
                        STA xor2a+2
                        STA xor2b+2
                        ADC #$04
                        STA xor3a+2
                        STA xor3b+2
                        ADC #$04
                        STA xor4a+2
                        STA xor4b+2
                        ADC #$04
                        STA xor5a+2
                        STA xor5b+2
                        ADC #$04
                        STA xor6a+2
                        STA xor6b+2
                        ADC #$04
                        STA xor7a+2
                        STA xor7b+2
                        ADC #$04
                        STA xor8a+2                    
                        STA xor8b+2
                        LDA lookupLo,y
                        STA xor1a+1
                        STA xor2a+1
                        STA xor3a+1
                        STA xor4a+1
                        STA xor5a+1
                        STA xor6a+1
                        STA xor7a+1
                        STA xor8a+1
                        STA xor1b+1
                        STA xor2b+1
                        STA xor3b+1
                        STA xor4b+1
                        STA xor5b+1
                        STA xor6b+1
                        STA xor7b+1
                        STA xor8b+1
                        LDX #39
xor1a           LDA $2000, X
                        EOR #$7f
xor1b           STA $2000, X
xor2a           LDA $2000, X
                        EOR #$7f
xor2b           STA $2000, X
xor3a           LDA $2000, X
                        EOR #$7f
xor3b           STA $2000, X
xor4a           LDA $2000, X
                        EOR #$7f
xor4b           STA $2000, X
xor5a           LDA $2000, X
                        EOR #$7f
xor5b           STA $2000, X
xor6a           LDA $2000, X
                        EOR #$7f
xor6b           STA $2000, X
xor7a           LDA $2000, X
                        EOR #$7f
xor7b           STA $2000, X
xor8a           LDA $2000, X
                        EOR #$7f
xor8b           STA $2000, X
                        DEX
                        BPL xor1a
                        DEY
                        BMI finishedLoop
                        JMP clearloop1
;----------------------------------------------------------
finishedLoop
                        LDA STROBE
                        BMI gameOver
                        JMP beginning
waitForRetrace                  
                        LDA $c019
                        BMI waitForRetrace
                        RTS
gameOver
                        BIT PAGE1
                        BIT TEXT
                        RTS
lookupLo        !by $d0, $50, $d0, $50
                        !by $d0, $50, $d0, $50
                        !by $a8, $28, $a8, $28
                        !by $a8, $28, $a8, $28
                        !by $00, $80, $00, $80
                        !by $00, $80, $00, $80
lookupHi        !by $23, $23, $22, $22
                        !by $21, $21, $20, $20
                        !by $23, $23, $22, $22
                        !by $21, $21, $20, $20
                        !by $23, $23, $22, $22
                        !by $21, $21, $20, $20


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antoine Vignau  
View profile  
 More options Sep 1 2012, 1:25 am
Newsgroups: comp.sys.apple2.programmer
From: Antoine Vignau <antoine.vig...@laposte.net>
Date: Fri, 31 Aug 2012 22:25:24 -0700 (PDT)
Local: Sat, Sep 1 2012 1:25 am
Subject: Re: Fast-wipe Hires
Great change! Will you prepare a disk image of the illusions?
av

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
BLuRry  
View profile  
 More options Sep 1 2012, 6:55 pm
Newsgroups: comp.sys.apple2.programmer
From: BLuRry <brendan.rob...@gmail.com>
Date: Sat, 1 Sep 2012 15:55:14 -0700 (PDT)
Local: Sat, Sep 1 2012 6:55 pm
Subject: Re: Fast-wipe Hires
M e g a d e m o

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »