Skip to content

rgiot/demo.revision2024.etchy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tentative for a eatch-a-sketch 4k

How to build the demo

bndbuild.yml is the configuration file that describes how to construct the demo. See https://cpcsdk.github.io/rust.cpclib/bndbuild/ for more documentation.

  • sna is a target to make a quick build that test if everything workds properly. It generates a snapshot
  • etch4k is a target to make a slower build that compresses the demo and checks if it fits in 4k. It generates a snapshot but also update the etch4k.dsk file

To build the compressed version

.\tools\bndbuild etch4k

This is veeeerrrrryyy loooong to assemble, even on a beast. My assembler is fucking slow on the macro interpretation side and everything relies on hundred of thousands of tiny macro use. I am not sure to be able to improve that during the project. This is the reason why I individually assemble each image.

From scratch it takes 52min on my powerfull Linux machine. if there is no path computation but all code to assemble it takes <1min.

To cleanup the folder

.\tools\bndbuild.exe distclean

BUT be prepared to WAIT A LOT after to rebuild everything

How to add an image

Take inspiration to these rules in bndbuild.yml to understand how to add an image to convert.

These lines generate small_connex.asm from one PNG file

- tgt: small_connex.asm
  dep: convert/small_connex.png
  cmd: extern ./tools/convert --euclidean convert/small_connex.png small_connex.asm
- tgt: small_connex.o
  dep: small_connex.asm
  cmd: basm -I src small_connex.asm -o small_connex.o

These lines generate multiple.asm` from several png file

- tgt: multiple.asm
  dep: convert/puzzle1.png convert/puzzle2.png convert/puzzle3.png
  cmd: extern ./tools/convert --euclidean convert/puzzle1.png convert/puzzle2.png convert/puzzle3.png multiple.asm
- tgt: multiple.o
  dep: multiple.asm
  cmd: basm -I src multiple.asm -o multiple.o

In src\main.asm the list of pictures to draw is set up this way

picture1
	incbin "small_connex.o"
picture2
	incbin "title.o"
picture3
	incbin "multiple.o"

so just give a label and use incbin "file.o to include the picture stored in file.o

The display order is also set up in src\main.asm

unaligned_data
.pictures
	dw picture1
	dw picture2
	dw picture3
	dw 00

just add dw new_label to include a new image in the list

How to test

You can test with :

For the compressed version type RUN"ETCH4K and wait a while during uncrunch of the demo. uncompressed version is way faster to start

Current Limitations

  • OSCC + My Flat TV does not like the screen erasing part. SCreen is black. Need to be able to disable taht at last minute if revision people have the same issue

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published