Jump to content
IGNORED

Flicker free screens without using VBI


Plastron

Recommended Posts

Anyone still playing with the 8-bit for programming and want filcker free screens without a VBI routine here is the trick i used all thoes years ago use the interal clock think it was $14 #20 LDA with it and compare it with its self then BEQ back tp the LDA do this first before and screen action and you will get a flicker free change.

Link to comment
Share on other sites

best interlace (by Stanley - XLPaint)

 

1st:

 

line1(screen1[0])

line2(screen2[40])

line1(screen1[80])

line2(screen2[120])

line1(screen1[160])

line2(screen2[200])

...

 

2nd:

 

line1(screen1[40])

line2(screen2[0])

line1(screen1[120])

line2(screen2[80])

line1(screen1[200])

line2(screen2[160])

...

 

 

flip 2 screen with ANTIC:

 

antic1

dta b($4e),a(screen1)

dta b($4e),a(screen2+40)

dta b($4e),a(screen1+80)

dta b($4e),a(screen2+120)

...

dta b($41),a(antic2) <----- wait 1 frame, jump to antic2

 

 

antic2

dta b($4e),a(screen1+40)

dta b($4e),a(screen2+0)

dta b($4e),a(screen1+120)

dta b($4e),a(screen2+80)

...

dta b($41),a(antic1) <----- wait 1 frame, jump to antic1

Link to comment
Share on other sites

If you really don't want to use a VBI routine, then it is a clever trick. But IMHO programming a VBI routine is too easy, and running a compare & wait loop wastes a lot of usable CPU time. Another trick by the way is checking the vertical line counter. Then you don't need any DLIs or VBIs and you can time processes at places on the screen that are independent of the Display List. I know there's some ABBUC intro that makes use of this technique only. Very clever but weird programming.

 

To go on: When you set a pokey timer on 50 Hz you can make use of a Timer IRQ. When you synchronize the triggering of the IRQ at top or bottom of the screen, you've got the same effect. No VBIs used, rather complicated and clever.

Link to comment
Share on other sites

Well try it and see what you think Plastron the game and everything else i did used this simple trick. I found it by accident when i first stated coding and wanted to make a PMG run at the right speed and noted that it did not flicker. Eversince i used it before any screen call. Never had a problem with CPU time. One thing to avoid as i am sure you know is the branch instruction a good way to speed code is duplicate it rather than branch. This was used a lot on the ST for scrolling screens.

Link to comment
Share on other sites

plastron One thing to avoid as i am sure you know is the branch instruction a good way to speed code is duplicate it rather than branch. This was used a lot on the ST for scrolling screens.
That's a good tip to remember Andy. Nice one. My brother coded many demos on the ST back around 89-90 so I'm sure he will know that one!!
Link to comment
Share on other sites

Hi, can you tell us a bit about its development? I recall chatting

with Steve G. at an Atari show at the Novatel in London years ago...

not long after Plastron was out (or it may have even been released

at the show, I can't recall?).

 

After commenting how close it looked to the game "MetroCross" he grinned ;)

Link to comment
Share on other sites

tezz... for which crew did your brother coded demos?

 

all...to be honest... i don't know what's so "hightech" in this method? polish coders use this since i was born... ;)

 

i personally use the 540-trick... 540 will be decremented by OS every VBL so you can do this as well

 

jsr wait

 

wait lda #1

sta 540

wait0 lda 540

bne wait0

rts

 

ok...it's not so compact and confortable... and if you switch off complete the OS and install your own kernel routines (NMIs, DLIs service routines) i am not sure if the "20" trick still works... the 540 definitly not if you not implement a "DEC 540" in your VBL service routine...

Link to comment
Share on other sites

Heaven/TQA tezz... for which crew did your brother coded demos?
Hi Heaven, we were in a small crew called PAW back then on the ST scene. We had some demos and intros out but we were never that well known I don't think. Probably the most popular demo we did was the Roger Dean demo (Roger Dean was the guy who did fantasy artwork and did some pics for Psygnosis) It was basically an intro with some ripped Mad Max music borderless with many scrollers and raster effects. The Roger dean pics were done in Spectrum 512 format. I was the gfx member. Good old Degas Elite! actually D-Paint on the Amiga was my favourite.. Don't know where the other members are these days, not seen them for about 10+ years now..

 

Anyway, best leave this stuff for the ST forum!!!

 

jsr wait

wait lda #1

sta 540

wait0 lda 540

bne wait0

rts

 

Another method to remember!!!

 

;) Tezz

Link to comment
Share on other sites

Hiya Andy!

 

Did you read my interview with Steve Goss? There was also a question about "PLASTRON"... ;) Just check out this forum - it's still there.

 

Are you gonna do anything else for Atari 8-bit?

Link to comment
Share on other sites

ok...it's not so compact and confortable... and if you switch off complete the OS and install your own kernel routines (NMIs, DLIs service routines) i am not sure if the "20" trick still works...

 

No, it doesn't. Shadow registers are not updated when OS is off. But you can synchronize with e.g $d40b then, it is a hardware (not shadow/OS) register so works even when OS is off and most importantly in case of VBL it's updated by ANTIC.

 

Like this:

 


      lda $d40b

      bne *-3 

 

Effect is the same, waits for a hardware VBL phase.

50/sec. As accurate as "20" trick.

 

Just my 2 cents.

Peace

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...