I'm writing a Chrome Dino demake on the c64 but the code won't work. Sprite 0 won't move and there are some garbage pixels on top of the screen.
A demake is a video game remake that adapts a modern game to an older platform, or one that transforms the game to an older graphical or gameplay style. Essentially, it's the opposite of a remake, which typically moves a game to a more advanced platform.
My code:
* = 0801ドル
!word 0810ドル
!word 2021
!byte 9ドルe
!text "2064"
!byte 0
!word 0
* = 0810ドル
dino_y = $fb
dino_vy = $fc
; Ustawienia początkowe
lda #01ドル ; set bg color white
sta $d021
lda #80ドル ; set sp0 pointer to 2000ドル
sta 07ドルf8
lda #00ドル ; set sp0 color to black
sta $d027
lda #80ドル ; sprite 0 x
sta $d000
lda #40ドル ; sprite 0 y
sta $d001
lda #01ドル ; sprite 0 enable
sta $d015
; init pos
lda #40ドル
sta dino_y
lda #00ドル
sta dino_vy
mainloop:
; grawitacja
lda dino_vy
clc
adc #1
sta dino_vy
; update dino ypos
lda dino_y
clc
adc dino_vy
sta dino_y
; update dino sprite
lda dino_y
sta $d001
; delay setup
ldx #$ff
delay1:
ldy #$ff
delay2:
dey
bne delay2
dex
bne delay1
jmp mainloop
* = 2000ドル
sprite0_data:
!byte %00000000,%00000000,%00000000
!byte %00000000,%00000011,%11111100
!byte %00000000,%00000111,%11111110
!byte %00000000,%00000110,%11111110
!byte %00000000,%00000111,%11111110
!byte %00000000,%00000111,%11111110
!byte %00000000,%00000111,%11000000
!byte %00000000,%00000111,%11111000
!byte %00001000,%00001111,%10000000
!byte %00001000,%00011111,%10000000
!byte %00001100,%01111111,%11100000
!byte %00001110,%11111111,%10100000
!byte %00001111,%11111111,%10000000
!byte %00001111,%11111111,%10000000
!byte %00000111,%11111111,%00000000
!byte %00000011,%11111111,%00000000
!byte %00000001,%11111110,%00000000
!byte %00000000,%11101100,%00000000
!byte %00000000,%11000100,%00000000
!byte %00000000,%10000100,%00000000
!byte %00000000,%11000110,%00000000
Sep Roland
41.3k10 gold badges50 silver badges90 bronze badges
asked Jun 13, 2025 at 11:06
Karolina Sadowska
311 silver badge1 bronze badge
lda #00ドルsta $d010once before the loop. Should the 9th bit be ON, then your X=128 plus 256 would yield the true X=384 which would be off-screen.