scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­wild/yulegetdizzy_diminished_wild_bbcmicro__version_2.zip

File size:
275 930 bytes (269.46K)
File date:
2024-01-19 05:45:01
Download count:
all-time: 4

Preview

  • YuleGetDizzy_Diminished_WILD_BBCmicro__VERSION_2/disc.ssd 28.75K
  • YuleGetDizzy_Diminished_WILD_BBCmicro__VERSION_2/file_id.diz 2.70K
  • YuleGetDizzy_Diminished_WILD_BBCmicro__VERSION_2/result.png 65.08K
  • YuleGetDizzy_Diminished_WILD_BBCmicro__VERSION_2/source.png 237.23K
  • YuleGetDizzy_Diminished_WILD_BBCmicro__VERSION_2/source.s 39.36K

file_id.diz

Yule Get Dizzy

Author:          Diminished
Category:        Wild
System:          BBC Microcomputer System (Model B, OS 1.2)
Language:        Assembler (6502) Beebasm: https://github.com/stardot/beebasm/
Len source code: 40307
Len exe file:    14149
Len code only:   14149

Instructions:

There are two builds of the demo available:

  - NOFLIKR, which has flicker correction enabled;
  - FLICKER, which does not have flicker correction enabled.

I think the FLICKER version looks a bit better, so that version is the one that will boot by default.

The easiest emulator to use is the browser-based jsbeeb:

https://bbcmicro.co.uk/jsbeeb/

Using jsbeeb, select "Discs" from the menu bar, then "From examples or local", and choose the "disc.ssd" disc image file included with this ZIP. Then, either press Shift + F12 to autoboot the disc, or alternatively type *RUN FLICKER (or *RUN NOFLIKR), and press Enter. Note that on the BBC Micro, the double-quote character " is typed by pressing Shift + 2.

(Here are some other viable emulators:)
b-em:               http://b-em.bbcmicro.com/
beebjit:            https://github.com/scarybeasts/beebjit/
BeebEm for Windows: http://www.mkw.me.uk/beebem/
b2:                 https://github.com/tom-seddon/b2

Description:
Christmas greetings with spinning shapes.

I looked at Logiker's lattice shape and wondered whether it was plausible to rotate the thing on a BBC Micro with a 2 MHz processor. I managed to get about 18 FPS in MODE 4. Once I had the rotation engine working, I had some RAM left for some other shapes and some text commentary.

The flicker-corrected version NOFLIKR attempts to defeat flickering by predicting whether the asterisk that is about to be drawn will collide with the video trace. If a collision is predicted, it will defer drawing the asterisk until everything else has been drawn. Typically, between 1-12 asterisks are deferred on each frame. This seems to work, but it causes quite juddery animation, and frankly I think the flickery version looks better overall. You can build the source code with or without flicker correction by setting the BEAM_AVOIDANCE variable when building.

There are some other build-time variables at the top of source.s that you can also try playing with.

The engine is based around a huge 8K trig lookup table. Rotation is achieved by defining shapes using polar coordinates, adding on the rotation angle to the base angle of each point, and then using the lookup table to convert polars into Cartesians. The asterisk-plotting routine and text plotting routines are custom; MOS is nowhere near fast enough.

There are many other lookup tables used as well; this was a slow-CPU-but-lots-of-RAM problem. There is no self-modifying code in this.

Merry Christmas.