Also what bothers me with Delphi with platforms like Android and iOS they changed index of first char in strings. While in Win32 it continued starting with 1 instead of 0 it’s suddenly different on other platforms.
I didn’t link it anywhere. It was mostly an animation with the background of IK+ ripped from the Amiga version and adapted to the C64. Here’s some code I wrote for the animation function:
; page zero for post-indexed addressing
animation_address_l equ $00f9
animation_address_h equ $00fa
advanceAnimFrame subroutine
ldy #$00 ; y serves as an offset, init to 0
lda (animation_address_l), y ; a = last_frame; y->main_bkgrnd
sta last_frame ; saves last_frame of the animation
iny ; y->main_bkgrnd_dps
iny ; y->main_bkgrnd_nxt
lda (animation_address_l), y ; a = frame to play
sta frame_to_play ; saves frame_to_play
cmp last_frame ; check if we are about to play last frame
bne .not_last_frame
lda #$00 ; next frame is zero
jmp .update_next_frame
.not_last_frame
clc
adc #$01 ; next frame is frame_to_play + 1
.update_next_frame
sta (animation_address_l), y ; updates next frame in the animation struct
lda frame_to_play
cmp #$00 ; check if frame_to_play is zero
bne .loop_to_frame ; if not loop until frame_to_play is reached
iny ; else y->main_bkgrnd_data[0]
tya
jmp .read_frame_data
Do you animate on every frame (vertical refresh)? Personally, I tend to use something like the digital differential analyzer algorithm to support animation frame rates that are not multiples of the screen refresh.
In the Intellivision at least, a lot of home-brewers just use multiples of the frame rate (every frame, every other frame, every third frame, etc.), but the DDA is so simple to implement, and can be even applied to sub-pixel sprite motion. It gives it a more fluent and natural quality.
I was focusing on animating the background. I had all frames saved and then I wrote a java tool that was only outputting the differences between those frames in the color memory, that snippet I posted just reads the animation file and loops through the frames. It was a while ago so I forgot some details. I wanted to start animating a multi sprite and I designed an animation system for that but I eventually lost interest. I might pick it up again, who knows
I’ve coded a whole bunch of games. Finished and unfinished. From c16+4 and Speccy to Amiga to PC. I still code them now. Only released 1 officially/commercially, it bombed.
I get in a loop of working and don’t often finish. I get distracted by shiny things. I do hope to release some of my old games at some point though. They are not dead, just sleeping.