scene.org File Archive

File download

<root>­/­parties­/­2022­/­vccc22­/­christmas_star_challenge/geirs_c64_asm_vc3-2022.zip

File size:
90 994 bytes (88.86K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 4

Preview

  • C64Autostart/ dir
  • C64Autostart/star-49.asm 1.90K
  • C64Autostart/star-49.prg 51B
  • C64BASICstub/ dir
  • C64BASICstub/star-52.asm 1.88K
  • C64BASICstub/star-52.prg 66B
  • file_id.diz 1.39K
  • MAXCartridge/ dir
  • MAXCartridge/crt-header.asm 1.04K
  • MAXCartridge/star-128.asm 3.20K
  • MAXCartridge/star-128.crt 8.08K
  • result.png 753B
  • source.png 82.70K
  • star-50.asm 1.83K
  • star-50.prg 52B

file_id.diz

C64 Christmas Star 52

Author: Geir Straume
Category: Christmas Challenge
System: C64
Language: Assembler (64tass)
Len source code: 1875 bytes (lots of comments in the code)
Len exe file:    52 bytes
Len code only:   50 bytes
Instructions:
Install the VICE emulator, drag and drop the prg file into it. Enter SYS 253 to start.

Description:
The code displays the star on the screen by drawing four partly overlapping triangles.

The program consists of three loops; TriangleLoop, RowLoop and ColumnLoop. Each triangle consists of 13 rows with up to 13 columns.

The base screen address of one of the triangles has been chosen so that the lo byte ($a2) matches the opcode of the first instruction, saving a byte.
The initial index value (x register) to the data tables is set so that it matches the lo byte ($9e) of the address of another triangle, also saving a byte.
Some code and data in the KERNAL ROM is utilized to minimize the program size.

See commented source code for further implementation details.


Comments:
Some alternate versions are also available:
- Folder "C64Autostart" contains an autostarting 49 bytes version (which requires "Inject into RAM" as Autostart PRG mode in the VICE emulator)
- Folder "C64BASICstub" contains a 52 bytes version (which uses a BASIC stub to start)
- Folder "MAXCartridge" contains a version for the Commodore MAX Machine (8 KB cartridge, 128 bytes of actual code and data)