BBC Micro and Acorn Electron demo effects

new graphics/music demos - bitshifters, 0xc0de, The Master + others
User avatar
tricky
Posts: 7697
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by tricky »

Very nice, it's good to see one that isn't just horizontal (like all mine!). =D>
User avatar
oss003
Posts: 3849
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by oss003 »

Hi,

Great demo but are you willing to upload the source code so that I can test it on the Atom?

Greetings
Kees
Last edited by oss003 on Sun May 26, 2019 8:04 pm, edited 1 time in total.
User avatar
davidb
Posts: 3395
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by davidb »

Nice and smooth. :) Well done! :D
User avatar
FourthStone
Posts: 1527
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by FourthStone »

very nice demo =D>
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

Thanks everyone, nice to hear!
I have the Starfield demo running on my trusty Electron next to me while typing this. It's very soothing and a great screen saver :mrgreen:

@Kees: I haven't given much thought to releasing my source code yet. I will PM you the essential parts of my Starfield demo so you can try to get it to run on an Atom.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Elk2019
Posts: 78
Joined: Wed Apr 03, 2019 6:25 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by Elk2019 »

=D> 0xC0DE. An amazing piece of coding and a great screen saver too! Reminds me of L/R view in ELITE and opening titles of classic STAR TREK series. It certainly has a calming effect and demonstrates what is possible on the Elk. Well done!
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by marcusjambler »

Cool Demos.... =D>
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

Thanks guys. I really appreciate it!
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
Mr B
Posts: 1
Joined: Tue Oct 24, 2017 2:25 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by Mr B »

I've just got to say - where were you 20 years ago on the electron :) Some amazing stuff!!!
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

Thank you Mr B!
Let's see. 20 years ago I had already moved on to PCs and my Electron was safely stored away in the loft :D
However, 35(!) years ago I played many games on the Electron, tried writing my own games in BASIC and dabbled unsuccessfully in 6502 machine code. Dreaming about creating the things I do for a hobby now. I couldn't have created these demo effects back in the day. Funny how things turn out! :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Dethmunk
Posts: 224
Joined: Fri Jul 01, 2016 1:29 pm
Location: Guildford
Contact:

Re: Acorn Electron demo effects

Post by Dethmunk »

0xC0DE wrote: Sat Apr 27, 2019 9:36 pm Thank you!
kieranhj wrote: Sat Apr 27, 2019 9:06 pm if you can just get the Electron ULA to play a decent tune
Now there's a challenge! :shock:

Has anybody ever gotten a decent tune out of the Electron's speaker? :mrgreen:
(any particular game with an outstanding tune I should check out for example?)
The Electron has had some ok tune-age... :D
FRAK! rendered some nice tunes...
https://youtu.be/0oADqPx5Bv0

Zalaga had some decent little ditties...
https://youtu.be/TGZalhQ3v6E
Image
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

Finally, a new demo effect: RACING THE BEAM

This one will only work on an Acorn Electron (from tape or disk), not on a BBC.
I have only tested it with MMFS (PAGE=&1900).
It will NOT work 100% correctly on any existing Electron emulator; only on the real machine!

Technical details:
  • MODE 2
  • 50 fps
  • Extreme cycle counting, i.e. racing the beam
  • Detects even and odd fields of the interlaced display

Future experiments:
  • Trying different 'flows' >> done! see below
  • Playing a tune >> done! see next post

Enjoy! And please report any glitches you may find.


Electron disk:
racingthebeam.ssd
(200 KiB) Downloaded 113 times
Electron tape:
racingthebeam.uef
(14.33 KiB) Downloaded 106 times
shape1-example.jpg


Update: trying a different shape/flow:
racingthebeam.ssd
(200 KiB) Downloaded 87 times
shape2-example.jpg
Last edited by 0xC0DE on Sun Sep 08, 2019 9:30 pm, edited 3 times in total.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

As an initial proof of concept I have now added a catchy tune. So this is officially my first demo with music.
NOTE: The music was originally written by Orlando for the Electron version of Frak!.
It's one of the better tunes I have ever heard on the Electron's speaker. Same goes for the (hidden) tune in Zalaga (also by Orlando).

Does anybody know of any better music on the Electron?

Technical info: instead of translating Orlando's (BASIC) music program into machine code, I "recorded" the tune with my Electron emulator by saving all writes to &FE06. This raw data (just over 1Kb) is then played back in my demo. The original program uses SOUND and ENVELOPE which I cannot use anyway because MOS is disabled in my code.

Demo with tune:

racingthebeam.ssd
(200 KiB) Downloaded 85 times
racingthebeam.uef
(14.33 KiB) Downloaded 94 times


Edit: watch it on YouTube now: https://www.youtube.com/watch?v=1sm_0msFCzA
Last edited by 0xC0DE on Sat Sep 14, 2019 10:40 am, edited 1 time in total.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

"VERTICAL BARS" demo effect on the Acorn Electron.
Will work on the real machine and on any Electron emulator as well.

Tech info: MODE 2, 50fps, buttery smooth animation in various directions/colours/speeds/sizes/splits.

vbars1.png

vbars2.png

vbars3.png


Electron disk:
verticalbars.ssd
(200 KiB) Downloaded 106 times


Electron tape:
verticalbars.uef
(13.97 KiB) Downloaded 89 times


YouTube: https://www.youtube.com/watch?v=b67lBEbNZEg
Last edited by 0xC0DE on Fri Sep 20, 2019 6:02 pm, edited 1 time in total.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
tricky
Posts: 7697
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by tricky »

How about sneaky mirror alternate columns for the middle one ;)
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

tricky wrote: Sat Sep 14, 2019 10:57 pm How about sneaky mirror alternate columns for the middle one ;)
I may be able to do that but I'm struggling to understand what exactly you mean by that :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Elk2019
Posts: 78
Joined: Wed Apr 03, 2019 6:25 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by Elk2019 »

Absolutely amazing effects you have created on the humble Electron. =D> Who said the Elk could not manage smooth scrolling? I remember an effect I saw on the C64 BITD where the coder would display a bitmap image & then move it around. Would this be possible on the Elk or Beeb?
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

Thank you. On the Beeb definitely. On the Elk: depends on the size of the bitmap and the screen mode.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

Elk2019 wrote: Fri Sep 20, 2019 8:47 pm Who said the Elk could not manage smooth scrolling?
Also, see if you can figure out how the smooth scrolling is actually achieved :mrgreen:
Hint: not all is what it seems....
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Doctorj1
Posts: 30
Joined: Thu Jun 20, 2019 10:17 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by Doctorj1 »

0xC0DE wrote: Fri Sep 20, 2019 9:01 pm
Elk2019 wrote: Fri Sep 20, 2019 8:47 pm Who said the Elk could not manage smooth scrolling?
Also, see if you can figure out how the smooth scrolling is actually achieved :mrgreen:
Hint: not all is what it seems....
Quick palette switching?
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

You are on the right track. However, quick colour palette changes are not necessary. Once every frame (or rather, field) is enough.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
ThomasHarte
Posts: 563
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by ThomasHarte »

0xC0DE wrote: Sun Sep 08, 2019 2:00 pm It will NOT work 100% correctly on any existing Electron emulator; only on the real machine!
I dispute this claim.
Screenshot 2020-06-11 at 09.41.39.png
... and since I haven't changed anything in the timing on the Electron part of my emulator in a few years, I backdate that to 2019. All I did was download the demo and run it, no tweaking was involved, no changes will be forthcoming.

EDIT: I'll try to grab a video later but, for the record, that correlates with this moment in the real-hardware video:
Screenshot 2020-06-11 at 13.07.37.png
User avatar
tricky
Posts: 7697
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by tricky »

I can't think how to do it with only one set of palette changes.
Does it look good a scan line at a time?
Do you get any CPU in MODE 0-2 while the beam is off-screen per scanline?
ThomasHarte
Posts: 563
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by ThomasHarte »

tricky wrote: Fri Jun 12, 2020 7:46 am Do you get any CPU in MODE 0-2 while the beam is off-screen per scanline?
Yes — on lines with pixels you get 1Mhz access to RAM in the border region, i.e. 24 cycles/line.
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

ThomasHarte wrote: Thu Jun 11, 2020 2:42 pm I dispute this claim.
:shock: :shock: :shock:

Could you try this one as well?

viewtopic.php?f=64&t=18431
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
ThomasHarte
Posts: 563
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by ThomasHarte »

0xC0DE wrote: Fri Jun 12, 2020 7:05 pm
ThomasHarte wrote: Thu Jun 11, 2020 2:42 pm I dispute this claim.
:shock: :shock: :shock:

Could you try this one as well?

viewtopic.php?f=64&t=18431
Alas something seems to be off with that; I guess I don't quite have one of my interrupts properly placed horizontally. The ball bounces up and down properly, and the raster bars look correct, but it flashes between being in its proper position and being split over the edge of the screen. Which I assume to mean that my emulator is misplacing the mode split, and that's where I make the guess about horizontal placement.

Changing my placement is supposed to be as simple as tweaking a constant, if indeed that's the real problem. This section of code is a bit more embarrassing to me than many because I restarted emulation to get up to speed on modern C++ and this is very early code from that effort, but the constants I'm using are here, i.e. within a complete frame — two fields — I'm signalling the real-time clock interrupt at cycles 16704 and 56704, and the end-of-display at 36736 and 76672. If you take those numbers modulo 128, the first graphics fetch occurs at cycle 33.

So I have the two end-of-display interrupts occurring 33 cycles before pixels occur [@2Mhz], the first real-time clock occurs 31 cycles after pixels began on its line, and the second — like the horizontal positioning of end-of-display — occurs 33 cycles before they began.

If you can see any obvious issues with those numbers, let me know! Otherwise the bug is obviously more nebulous. And sorry for the minor thread hijack!

And: mode (and palette) changes always take effect immediately, which it strikes me now might or might not be true.

Typing completely extemporaneously: I'm also curious as to whether I'm doing what hardware would do if there's a 40 <-> 80 mode split on the final line of a character row with regard to updating the address. If the logic is what feels easiest, that on lines 1–7 of a character row a row start address is incremented and reloaded, and on line 8 the final counter is stored back to that row counter, then you could get smooth horizontal scrolling so I guess probably not? E.g. switch from a 40-column mode to an 80-column mode eight 40-column character from the end of the display, the display will consume 16 bytes instead of eight for the rest of the line and then on you'll have offset the video address by 8, i.e. one character square.

Have you poked at that on real hardware at all?

EDIT: it was hard to grab a clean shot, but this shows the errors in rendering currently in my emulator; the mostly-gone basketball in the middle is the end of a correct period of correct placement, and the more solid one at the outside is the beginning of a period of incorrect placement.
Screenshot 2020-06-12 at 18.16.58.png
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: BBC Micro and Acorn Electron demo effects

Post by 0xC0DE »

ThomasHarte wrote: Fri Jun 12, 2020 10:15 pm Typing completely extemporaneously: I'm also curious as to whether I'm doing what hardware would do if there's a 40 <-> 80 mode split on the final line of a character row with regard to updating the address. If the logic is what feels easiest, that on lines 1–7 of a character row a row start address is incremented and reloaded, and on line 8 the final counter is stored back to that row counter, then you could get smooth horizontal scrolling so I guess probably not? E.g. switch from a 40-column mode to an 80-column mode eight 40-column character from the end of the display, the display will consume 16 bytes instead of eight for the rest of the line and then on you'll have offset the video address by 8, i.e. one character square.

Have you poked at that on real hardware at all?
Just to let you know: this has been in the back of my mind, trying to fight its way to the front. In theory / on paper this (smooth horizontal scrolling, 1 byte at a time) sounds completely possible. I am going to try this on real hardware, starting from a stable raster so I have complete control of every cycle for precise timing. Will let you know what happens!
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
Post Reply

Return to “new projects and releases: demoscene”