From Richard's C64 blog!
20th-21st April 2018
A couple of weeks ago, I bought myself a theC64 mini console, and I loved it. The built in games were cool. However I needed to purchase a USB keyboard, so this week I did exactly that. Set up a multi-USB adapter with the C64Mini (An old one) and everything was working. I was able to play multiple games from a .D64 (D82 image renamed to .d64). Now I realized. Wouldn’t it be cool if I set myself a Dev challenge. Announced on theC64 Mini Users Group. I decided to set myself an assembly programming challenge.
CHALLENGE #1 – OLDSCHOOL INTRO
20th April 2018
I set myself a challenge, which was to create and develop my very own oldschool cracktro style intro using theC64 Mini. I was able to select some of the classic public domain utilities, that were released by the C64 demoscene back in the good old C64 scene days, and get those on to a D82 image (via dir master). Then I renamed the .D82 to ‘theC64-drive8.d64’ using my 1541Ultimate 2. Now it was time for me to get to work.
In order for me to design the logo. I went for a very classic utility from the 1980’s called Centauri Logo Editor (Pictured below). I wanted to draw my own logo for this challenge. I went for an oldschool design idea. The idea was simply to draw a logo that was embossed inside a plaque. I got a bit carried away with the logo design, and pixed inside the words TND some stars and basic shading. Of course the logo was limited to 3 colours. After finishing the logo, I converted the Hires/Multicolour bitmap into a Font+Screen matrix format and the saved the font+screen files separately.
I wanted to create two character sets for the intro. They were 1×1 hires and 2×2 multicolour. I loaded in Shape’s Font Editor V3.0. There was no joystick function for designing the font, so I used the USB keyboard to pixel the correct colours into the correct position in the grid. I was very happy with the 2×2 charset, the same for the 1×1 charset. Not a bad result.
Now that I was 100% happy with the graphics. I got started on composing some music. For this I used Graffity’s DMC V4.0 (Pictured below). I found it quite awkward to work out the key-mapping on the USB keyboard at first, but managed to get around it afterwards. The tune was to sound oldschool in a sort of Future Composer kind of way. I decided not to use FC, due to the possibility of the program crashing should DUR/SND be in the wrong place. I would not have been able to get back to the music editor if it did crash. I created some oldschool instruments using DMC’s sound and filter editor. A little further experimenting came out before coming out with a final piece of music, called Laser Light. I was very pleased with the result.
The Sprites: I originally chose Shape’s Sprite Editor V1.7, but after creating some star sprites for the intro. I realised it was just impossible for me to save the sprites. There was no save option implemented. So I decided to use Graphic Editor, also by Shape. I created a series of sprite frames for the animated stars. Then saved everything
Before I was able to do some programming. I needed to work out where I should place data and code. In order for me to complete my task. First however, I needed to use a M/C monitor, for loading/saving data during the coding process. I loaded up Black/Angel’s improved version of Omicron’s Turbo Assembler from the filebrowser menu then added a JMP $FCE2. This forced the C64 to do a soft reset. I was then able to load in the Code Suck Monitor into $5000 (Since my intro was intended to be only use data+code from $0c00-$4500 – where $4500 is where linked programs will go). I set CSM to load the following data to the following addresses in memory:
– Music: $1000-$1fff
– Logo Charset: $2000-$2800
– Logo Matrix: $0C00-$0e00
– 1×1 Charset: $2800-$2a00 ($2a00-$2c00 reserved for the star field source)
– Sprite anim frames: $2c00-$2fff
– 2×2 Charset: $3000-$3800
I went back to the turbo assembler by calling J 9000 in CSM. Then I programmed my own text routine, for writing the intro text, and also the scroll text. The intro text was placed at $3c00, and the scroll text was placed at $3800. Now it was time to code the main intro.
So then what was done in the main intro code. Well, for a start off, I needed to program an IRQ interrupt to ensure that music was okay and in working order. Then, I started to add more and pieces of code, and placing those together with the assembler. Basically, create a subroutine that displayed the text, logo and scroller charset using the default PETSCII. After I was happy with the result. Some more raster splits were added inside the code. One of which was to display the logo charset+screen, the presentation lines charset, and the 2×2 scroll text – and get everything smooth running. A good result.
Although everything displayed nicely. I felt that the intro looked too plan. So I decided to code a few raster colour bars. They got displayed, but the rasters needed timing out. Although I always had difficulties with raster timing, when coding intros/demos – I had no problem with this one. All 3 rasters were nicely timed out on PAL machines. It was getting late, so I decided to create a save state of the intro (as well as save the intro data + code done so far).
21st April 2018
Last night I was very happy with the result of the intro, so far made on my theC64 Mini. Now it was time for me to add a bit of code to the intro. I felt that the presentation lines were just too plain. There needed to be something behind the text. So I decided to create an additional table which produced 6 characters for a flying star field. I put the star field into place. Added a little more code that could flash the text, and avoid the starfield from also flashing. Then I added the flying sprites and code. A final result. Finally the main code has finished. It was time to code a relocator subroutine then put everything together using the save option in CSM. (s “introfinal”,8,0c00,4500)
The intro (pictured) was complete, but there was one more thing I needed to do. Compile and compress the final intro, so that it was runnable from BASIC. Since I wanted to do things sort of late 1980’s/Early 1990’s style. I loaded up Compactor/Linker V4S by E.C.A Industries, a very old packer/linker, which did its job fine on my intro. Then to finish it off. S&T’s 2mhz Time Crunch V5.0. The final intro was made and it all worked out quite nicely.
My weekend challenge of programming on theC64 Mini was very successful. 🙂 I was very pleases with my result.
Want to see the intro? Download it from here, and place on to a USB Stick on your theC64 Mini and enjoy. I have also provided the Public Domain utilities that helped support me producing this production so you can see how the intro was made and put together. This intro can also be run on WinVice, and CCS64. Enjoy 🙂