Jump to content
IGNORED

copper l!nes (zx spectrum)


xxl

Recommended Posts

since 20 years I never captured how these "kefren bars" work... can someone tell me what is driving the illusion? because I don't believe that the screen is been rendered fully every frame...

 

Once I looked in monitor of some demo how the kefrens bar are done. IIRC "every" line of DLI was reffering to the same address (in this case to zero page for speed) and just after every WSYNC you add new data and in VBLANK you just clear the one line (will clear "whole" screen) and repeat. But this demo does it in different way (just looked at DLIST...).

Edited by MaPa
Link to comment
Share on other sites

Ahhh... Mapa, does make sense a little bit... so the 1 line is rendered on the fly every scanline, right? but you don't have much time each line to render a bit?

 

I never tried to do it, but if you have 1 kefren bar you just add/render like 1 byte per line, you just need to calculate new position on some sinus trace or can have it precalculated. Remember that whenever you put data onscreen they are repeated vertically to the bottom until you put some other data in that place, so you render "only" the top edge of the bar and the "wall" down from there is there automatically. It's simplified but the basics can be like that.

Link to comment
Share on other sites

MaPa is right, on Atari this should be done by re-using the same line.

Unfortunately, you can't do this on speccy, and I think XXL just did one-to-one conversion.

 

Here's a quick hack how it should work/look:

executable: http://homepages.cwi.nl/~marcin/a8/copperu.xex

sources: http://homepages.cwi.nl/~marcin/a8/copperu.asx

 

1 hour of work from scratch, not optimized at all.

 

btw, on Atari there is a 256-byte intro that does something similar: http://www.pouet.net/prod.php?which=9761 (the part not on the screenshot)

Link to comment
Share on other sites

MaPa is right, on Atari this should be done by re-using the same line.

Unfortunately, you can't do this on speccy, and I think XXL just did one-to-one conversion.

 

yep. I have once coded a c64 version. you need an lda screen,x and mask,x ora bargfx,x sta screen,x sequence for each byte updated. (x contains the horizontal offset of the bar, and use clever tables) how many times you do this depends on how wide bars do you want (and at wider ones you dont need to mask the middle). on a8 colors could be changed on a line basis to make it look niftier than c64 versions, and there is more time to do wider bars. (only wsync at the top of the screen, then keep a constant timing for each line to save speed.. imho)

Edited by Oswald
Link to comment
Share on other sites

It's amazing... I looked at the effect, and I though: "Hmm, it's a bit different than kefren bars" - w r o n g :)

So I reimplemented the same thing ;)

 

Btw, Oswald, I think you need to use Y in the AND/ORA combination ;)

Link to comment
Share on other sites

It's amazing... I looked at the effect, and I though: "Hmm, it's a bit different than kefren bars" - w r o n g :)

So I reimplemented the same thing ;)

 

Btw, Oswald, I think you need to use Y in the AND/ORA combination ;)

 

yeah probably :) but I got a hangover and some insomnia as an excuse:)

Link to comment
Share on other sites

A Copper List is like a Display List, except it's much more flexible and can program registers other than just video ones, so it removes most of the need for things like DLI's by automating register changes as the screen is drawn.

 

The name Copper was chosen because it sounds like Co-processor.

 

-Bry

Link to comment
Share on other sites

From memory, you can get copper instructions to load just about any hardware register relating to graphics/sound.

 

But there's a limit per scanline. Got the hardware manual here, just too lazy to pull it out.

 

I also have owned Amigas for > 15 years, but never really got into programming them beyond batch type files.

 

I guess the awesome games just made us too busy in that regard - on the ST I got into a fair amount of programming.

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...