Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1520 > unrolled thread
| Started by | Colin McDonagh <colmcdonagh@btinternet.com> |
|---|---|
| First post | 2012-03-21 21:23 +0000 |
| Last post | 2012-03-22 20:00 +0000 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.sys.acorn.programmer
*REFRESH Colin McDonagh <colmcdonagh@btinternet.com> - 2012-03-21 21:23 +0000
Re: *REFRESH jgharston <jgh@arcade.demon.co.uk> - 2012-03-21 15:39 -0700
Re: *REFRESH jgharston <jgh@arcade.demon.co.uk> - 2012-03-21 15:42 -0700
Re: *REFRESH Colin McDonagh <colmcdonagh@btinternet.com> - 2012-03-22 19:56 +0000
Re: *REFRESH Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2012-03-22 06:42 +0100
Re: *REFRESH Colin McDonagh <colmcdonagh@btinternet.com> - 2012-03-22 20:00 +0000
| From | Colin McDonagh <colmcdonagh@btinternet.com> |
|---|---|
| Date | 2012-03-21 21:23 +0000 |
| Subject | *REFRESH |
| Message-ID | <52741d1e5dcolmcdonagh@btinternet.com> |
Hi one and all, In BBC BASIC for Windows, there is a star command *REFRESH that forces a screen refresh. Which gives smooth animation. Is the a RISC OS equivalent? I'm using R6.20 on an old SA RiscPC. Cheers Colin.
[toc] | [next] | [standalone]
| From | jgharston <jgh@arcade.demon.co.uk> |
|---|---|
| Date | 2012-03-21 15:39 -0700 |
| Message-ID | <469ff090-12eb-40a7-af37-62c79881d65e@v22g2000vby.googlegroups.com> |
| In reply to | #1520 |
Colin McDonagh wrote: > In BBC BASIC for Windows, there is a star command *REFRESH that forces a > screen refresh, which gives smooth animation. > Is the a RISC OS equivalent? I'm using R6.20 on an old SA RiscPC. There's no equivalent of *REFRESH because BB4W does't write to the screen, it writes to a buffer which is copied to the screen at intervals, or when *REFRESH is used. Acorn systems (usually) write to the displayed screen. The way to get smooth animation on Acorn systems is to set up two screen banks, write to the non-displayed one, wait for the vertical flyback with *FX19 or WAIT and swap the displayed and nondisplayed banks. JGH
[toc] | [prev] | [next] | [standalone]
| From | jgharston <jgh@arcade.demon.co.uk> |
|---|---|
| Date | 2012-03-21 15:42 -0700 |
| Message-ID | <5a472327-24da-4f06-b92e-209ccb39afe8@j14g2000vbc.googlegroups.com> |
| In reply to | #1521 |
jgharston wrote: > set up two screen banks ... Or, an alternative would be to redirect VDU output to a sprite, wait for flyback, and then display the sprite during the flyback interval. JGH
[toc] | [prev] | [next] | [standalone]
| From | Colin McDonagh <colmcdonagh@btinternet.com> |
|---|---|
| Date | 2012-03-22 19:56 +0000 |
| Message-ID | <527498f75bcolmcdonagh@btinternet.com> |
| In reply to | #1522 |
In article <5a472327-24da-4f06-b92e-209ccb39afe8@j14g2000vbc.googlegroups.com>, jgharston <jgh@arcade.demon.co.uk> wrote: > > set up two screen banks ... Thanks JG, This is my prog, where do I put the WAIT etc.. Cheers Colin. REM Simulate hybrid coupler Wave. REM 15/03/2012 MODE 28 :REM 256-colour mode : ON ERROR PROCerror : END : REM**************************************** : GCOL 132 :REM Sets graphic background colour to (132-128) = 4, blue. CLG :REM Clears graphic screen to background colour GCOL 7 :REM Sets graphic foreground colour to 7, white. COLOUR132 REM**************************************** : LeftEdge% = 0 RightEdge% = 1279 TopEdge% = 1023 BottomEdge% = 0 PROCbox : VDU 28,5,50,80,60 :REM Set up a text viewport : COLOUR 1 xtemp = 0 ytemp = 0 : FOR Phase = 0 TO 359 STEP 2 loiter = INKEY(10) CLS PROCbox : FOR Angle = 0 TO 1280 STEP 1 : Colour = 3 :REM Yellow line PROCwave1(Colour, Angle, Phase, X, Y) xms = X^2 + xtemp yms = Y^2 + ytemp NEXT Angle xrms = SQR(xms) yrms = SQR(yms) PRINT TAB(50,20) "X = " xrms, TAB(50,40) " Y = " yrms NEXT Phase : END : DEF PROCerror REPORT PRINT " at Line " ; ERL ENDPROC : DEF PROCbox MOVE RightEdge% , TopEdge% REM Moves cursor to point (1279,1023), top right corner of 'standard' screen. : REM Next four lines draw line around edge of 'standard' screen. DRAW LeftEdge% , TopEdge% DRAW LeftEdge% , BottomEdge% DRAW RightEdge% , BottomEdge% DRAW RightEdge% , TopEdge% ENDPROC DEF PROCwave1(col, angle, phi, RETURN x, RETURN y) GCOL col TINT 0 :REM yellow lines or blue lines angleRad = (angle/(2*PI))/9 phaseRad = (phi/(2*PI))/9 A = 100*SIN(angleRad) :REM This is a wave, fixed to the right. B = 100*SIN(angleRad+phaseRad) :REM This is wave moving left. REM phase shift one by -90 degrees minusjA = 100*SIN(angleRad-PI/2) REM phase shift by -90 degress minusjB = 100*SIN(angleRad+phaseRad-PI/2) REM To the right PLOT &45, angle, A + 800 : PLOT &45, angle, B + 200 GCOL col+2 REM To the left x = 0.5*A + 0.5*minusjB y = 0.5*B + 0.5*minusjA REM The hybrid wave is the sum of two above. PLOT &45, angle, x+620 PLOT &45, angle, y+400 : ENDPROC
[toc] | [prev] | [next] | [standalone]
| From | Rick Murray <heyrickmail-usenet@yahoo.co.uk> |
|---|---|
| Date | 2012-03-22 06:42 +0100 |
| Message-ID | <almarsoft.1276196108028896754@news.orange.fr> |
| In reply to | #1520 |
On Wed, 21 Mar 2012 21:23:56 +0000 (GMT), Colin McDonagh <colmcdonagh@btinternet.com> wrote: > In BBC BASIC for Windows, there is a star command *REFRESH that forces a > screen refresh. > Which gives smooth animation. Typically you would define two screen banks and draw into one while displaying the other. You can use WAIT to wait until the next screen scan, so swapping banks doesn't result in flicker. Best wishes, Rick.
[toc] | [prev] | [next] | [standalone]
| From | Colin McDonagh <colmcdonagh@btinternet.com> |
|---|---|
| Date | 2012-03-22 20:00 +0000 |
| Message-ID | <527499532bcolmcdonagh@btinternet.com> |
| In reply to | #1523 |
In article <almarsoft.1276196108028896754@news.orange.fr>, Rick Murray <heyrickmail-usenet@yahoo.co.uk> wrote: > On Wed, 21 Mar 2012 21:23:56 +0000 (GMT), Colin McDonagh > <colmcdonagh@btinternet.com> wrote: > > In BBC BASIC for Windows, there is a star command *REFRESH that > forces a > > screen refresh. > > Which gives smooth animation. > Typically you would define two screen banks and draw into one while > displaying the other. You can use WAIT to wait until the next screen > scan, so swapping banks doesn't result in flicker. Thanks Rick, JG has also sugested this. Regards Colin.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web