I started to read tutorials here:
https://wiki.superfamicom.org/
I have an issue when I try to display 2 sprites on the screen. How can I set a different position to the second sprite?
This is the source code:
https://www.dropbox.com/s/n7tbnwk7bgcr8 ... e.zip?dl=0
This is the main code:
Code: Select all
Start:
InitSNES ; Clear registers, etc.
rep #$10
sep #$20
lda #%00001001
sta $2105
; Blue Background
stz $2121
lda #$40
sta $2122
sta $2122
; Load Palette for our tiles
LoadPalette PaletteConsole, 128, 16 ; Sprite Palettes start at color 128
LoadPalette PaletteBike, 128, 16 ; Sprite Palettes start at color 128
; Load Tile data to VRAM
LoadBlockToVRAM SpriteConsole, $0000, $0800 ; First sprite
LoadBlockToVRAM SpriteBike, $0100, $0800 ; Second sprite
jsr SpriteInit
; First Sprite Position
lda #($80-16)
sta $0000
lda #(224/2 - 16)
sta $0001
stz $0002
lda #%01110000
sta $0003
;lda #%11000000
;sta $0100
lda #%01010100
sta $0200
; Second Sprite Position
; ???
; Setup Video modes and other stuff, then turn on the screen
jsr SetupVideo
lda #$80
sta $4200 ; Enable NMI
Infinity:
Stall
jmp Infinity ; bwa hahahahaha
https://ibb.co/TbjQZ8Z