Lovebyte 2023 Apple II sizecoded Demos


Background

Lovebyte is a demoparty aimed directly at sizecoding!

Presentations

I didn't present this year, but I (along with an Apple IIe I recently rescued from being thrown out) featured in the teaser trailers for the special guest: Steve Wozniak (who mentioned one of my 16-byte demos in his presentation(!))

Also I was surprised to see I was featured in the Ask Anything segments as I had recorded those segments last year.

Source Code

The full source code for all of these entries is available on my dos33fsprogs github project under the demos/lovebyte2023 directory.

Byte-athlon

I finished 3rd in the Old-skool Byte-athlon this year (you get this by best placement in 4 different size categories).

The Entries



Oldschool 1k -- Blue Flame

This one I wrote the end first with the shapes and then filled in the rest.

It's convenient that the letters in deater, desire, and ma2e have a lot of common letters. I also was possibly going to spell "demo" with it. The blue flame is a variant on the "Doom Fire" effect that I was trying to get working on hi-res. It draws it offscreen then manually copies it to the visible screen.

The Sierpinski parallax comes from my efforts to make a fast hi-res parallax routine. A lot of tricks here but didn't quite get the frame rate I would have liked.

The cool static pattern is a 32-byte intro slotted in because we had just enough space for it.

I actually used ZX02 compression to make this fit. That makes size-optimization hard as sometimes shaving a few bytes off the code actually made the final demo longer.

Thanks to mA2E for making the music track.


Finish: 1/5 1k Oldschool
Download:
blue_flame.dsk
Video: https://youtu.be/T6iG3AiOURQ
Sourcecode: blueflame_1k
Pouet: https://www.pouet.net/prod.php?which=93627

Oldschool 1k -- a2-4eva (Atari VCS)

This one was a bit of a troll

I originally wanted it to say "Apple ][ Forever" at the end, and maybe even play the tune from that song. However ran out of room and also couldn't track down the musical notes for the song.

I'm also using a new way of optimizing the playfield graphics. The Apple II graphic has the color flip every 3 lines which is actually a huge pain to do in a one-line kernel. I'm actually saving X to the stack in order to hit the cycle count limit.



Finish: 4/5 1k Oldschool
Download:
a2-4eva-2k.bin (note, intro is 1k but we pad with 1k of zeros so it will run on Harmony Catridge)
Video: https://youtu.be/XVUzUf4SpwI
Sourcecode: a2-4eva
Pouet: https://www.pouet.net/prod.php?which=93630

Oldschool 512B Bootsector -- Unexpected Duck

I had more elaborate plans for this one, including having the duck appear randomly over the screen. Ran out of time and also out of bytes.

I also wanted a quacking noise, but couldn't figure out how to do that in the bytes available.

This is an actual bootsector (well, Apple II has 256 byte disk sectors, but the disk boot ROM will let you specify more than one to load). Apple II loads the boot sector starting at $800, which is a problem for a Lo-res demo as that's also the location of lo-res PAGE2 graphics. So I had to waste a chunk of code to move the code out of the way before running it.

The spinning lo-res logo is actually using the hi-res shape table routines. How is that possible? It draws a small rotating copy of the logo to the upper-left corner of the (not-displayed) hi-res screen. Then the code copies this (while adding more colors) to the lo-res screen. It's hard to do this quickly, to save time and space it actually destroys the hi-res image by shifting it down to zero while reading it out, but this is actually good as then we don't have to clear the screen.


As a boot sector, the remaining 140k of the floppy would be empty, which seems like a waste, so I used
Bzotto's Picture Disk to add this image to the magnetic flux patterns (in case you have a floppy disk flux imager):


Finish: 2/6 512 Byte Oldschool Bootsector
Download: love_duck.woz.zip
Video: https://youtu.be/1jWXp3RDs8c
Sourcecode: loveduck_512
Pouet: https://www.pouet.net/prod.php?which=93569


256B Intro -- Lemm256

This one was written in Applesoft BASIC! Tokenized on disk it's less than 256 bytes. For size reasons it starts page-flipping before it's done drawing the hi-res graphics on each page which is why it starts out a bit glitchy.

Working on this is what got me started on the
Apple II Lemmings Demake





Finish: 17/22 256B Oldschool Intro
Download: lemm256.dsk
Video: https://youtu.be/o3ixk3PBxtw
Sourcecode: lemm.bas
Pouet: https://www.pouet.net/prod.php?which=93656


128B Intro -- Gears128

Some rotating gears. The gears are drawn with the shapetable vector graphics, we only have a definition for a single tooth but we then draw it multiple times while rotating. The catchment at the top happened accidentally, as I originally wanted to have a desire logo but didn't have enough room and the little device is what you get when you truncate the logo shape.
It's a fast animation because it draws two scenes to the two graphics PAGEs and is just page-flipping between them.




Finish: 8/13 128B Oldschool Intro
Download:
gears128.dsk
Video: https://youtu.be/r_OSSrHhXeY
Sourcecode: gears_fancy.s
Pouet: https://www.pouet.net/prod.php?which=93583


128B Intro -- Parallax128

Three-level parallax scrolling on Apple II lores. I actually got this down to 90 bytes, then used the extra space to add the code to switch directions. Apple II has no scrolling circuitry, there are some mildly clever tricks going on to keep the frame rate up.




Finish: 3/13 128B Oldschool Intro
Download:
parallax128.dsk
Video: https://youtu.be/5BXGnR0mtWk
Sourcecode: par_tiny.s
Pouet: https://www.pouet.net/prod.php?which=93584


64B Intro -- Pied64

Scrolling boxes have been done to death, however in this case there's a border around them which looks nice and almost gives the illusion of more colors than are actually there.




Finish: 7/16 64B Oldschool Intro
Download:
pied64.dsk
Video: https://youtu.be/000D-bqa_qM
Sourcecode: pied57.s
Pouet: https://www.pouet.net/prod.php?which=93561


32B Intro -- Agony17

This is yet another Apple II Xdraw (firmware vector drawing) intro.
In this case I wanted to draw short lines. The value for the shapetable was $04 $00. I tried various ways to point to this value in a short manner, but even putting it at address $0101 (an easy pointer to load into X/Y/A) didn't help with the size.
Eventually I found $0400 in ROM and point to that instead.
Despite a lot of work I wasn't able to get it down to 16-bytes, hence the agony.




Finish: 7/15 32B Oldschool Intro
Download:
agony17.dsk
Video: https://youtu.be/BM-AMxX43fQ
Sourcecode: agony17.s
Pouet: https://www.pouet.net/prod.php?which=93552

Quick run on your own Apple II or emulator:
CALL -151
E7: 20 D8 F3 20 11 F4 A0 E8  A2 0E A9 02 20 5D F6 F0  F5  
E7G

32B Intro -- Ooze32

I found this effect by accident when trying to make a fancy screen wipe for my Peasant's Quest port. It's just writing random patterns from ROM to the hi-res screen rows at a time.




Finish: 10/15 32B Oldschool Intro
Download:
ooze32.dsk
Video: https://youtu.be/a8cSfi_XH9Y
Sourcecode: ooze32.s
Pouet: https://www.pouet.net/prod.php?which=93557

Quick run on your own Apple II or emulator:
CALL -151
C00: 20 E2 F3 85 FD 85 FF A9  D0 85 FE A5 FF 20 11 F4
C10: A0 00 B1 FD 91 26 88 D0  F9 E6 FF D0 EE 10 E4
C00G

16B Intro -- Field16

This is yet another tiny Apple II hires/shapetable intro.

It loads at $E7 (HGR_SCALE) so that we set that value for free from the first instruction (in this case JSR so $20).

I thought this result at times looked like a field of grain, hence the name.

I found this one while doing a search of ROM values that were easy to load the address for, but the results looked nice. In this case the rotation and ROM address are $F6 and $F6F5 which makes it easy to load, though it is a byte bigger than the theoretical minimum because I need a DEX instruction to get the address right.





Finish: 9/20 16B Oldschool Intro
Download:
field16.dsk
Video: https://youtu.be/y0rBFADe6es
Sourcecode: field16.s
Pouet: https://www.pouet.net/prod.php?which=93612

Quick run on your own Apple II or emulator:
CALL -151
E7: 20 D8 F3 20 57 F4 A9 F6  A8 AA CA 20 5D F6 F0 F6
E7G

16B Intro -- Weave15

This is yet another tiny Apple II hires/shapetable intro.

It loads at $E7 (HGR_SCALE) so that we set that value for free from the first instruction (in this case JSR so $20).

I thought this looked like woven cloth at times, hence the name.

I found this one while searching for pleasant looking patterns in the ROM to display that were easy to load. Specifically patterns that have a 0 value after one or two bytes, as those are smaller shapes. In this case this is rotation value $E2 at address $E2E2 which is easy to load.





Finish: 14/20 16B Oldschool Intro
Download:
weave15.dsk
Video: https://youtu.be/snWsGtY6chI
Sourcecode: weave15.s
Pouet: https://www.pouet.net/prod.php?which=93614

Quick run on your own Apple II or emulator:
CALL -151
E7: 20 D8 F3 20 57 F4 A9 E2  AA A8 20 5D F6 F0 F7
E7G

8B Intro Showcase -- Tiny HGR-8

If you'd like to read a 10k long description of this 8-byte demo you can do so here:
README.hgr8.txt
The results are a nice animation with lots of color variation, below is just a brief screenshot.


Finish: 8B showcase, no voting
Download: tiny_hgr8.dsk
Video: https://youtu.be/8QYezzXC9PA
Sourcecode: tiny_hgr.s
Pouet:

Quick run on your own Apple II or emulator:
CALL -151
B8: 2C EA 20 F4 F3 20 D8 F3 
B8G

Back to my Demos
See my Apple II projects
See my writeups on my Apple II twitterbot demos