It’s time for a code walkthrough for the Truchet Tiles Commodore 64 program demonstrated in a previous video. We cover the BASIC stub that makes a machine language program RUNnable, the PETSCII characters used for the Truchet tiles, initializing colour memory, how the 30 Truchet patterns of varying sizes are stored in memory for easy access, plotting the tiles to screen, and more. There’s also a short bonus about a tile-based mini RPG I worked on years ago.
Previous Truchet video: https://youtu.be/MVQJykMJSH0
Download the Truchet D64:
https://8bitshowandtell.com/downloads/truchet.d64
LOAD"TMP",8,1
SYS 32768
To support 8-Bit Show And Tell:
Become a patron: https://patreon.com/8BitShowAndTell
One-time donation: https://paypal.me/8BitShowAndTell
2nd channel: https://youtube.com/channel/UCAgWzEh5c8391eJnELDy9OA
Index:
0:00 Loading TMP, code, quick run
3:23 BASIC Stub RUN vs. SYS
5:52 BASIC Stub explanation
7:40 Labels and variables, tile screen codes
13:23 Program, screen initialization
18:57 Pattern pointers and definitions
24:46 Pattern width, height, data pointer
28:22 Draw initialization and character point
31:09 Advance to next pattern and screen column
33:53 Advance to next row
38:10 Wait key, advance to next pattern, loop
41:11 Bonus: Minima Reloaded tile-based RPG
43:48 Thanks, credits