3

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
5
  • 1
    Are you seeing the correct sprite at all and it is just not moving or are you not seeing the correct sprite at all? Commented Jun 14, 2025 at 20:16
  • Which assembler are you using? If you're using Acme without a suitable directive, it won't prefix the load address of 0801ドル to the file. Insert a line at the top, !to "demo.prg", cbm Commented Jun 15, 2025 at 8:13
  • 1
    Make sure that the 9th bit for the X coordinate is zero. Use lda #00ドル sta $d010 once 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. Commented Jun 15, 2025 at 21:06
  • Did you try to use any of the other colors (1-15) for your sprite? Experiment with other background colors too. Commented Jun 15, 2025 at 21:28
  • The second sprite completly doesnt show up Commented Aug 24, 2025 at 16:26

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.