NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectNESASM 2.0 programming problem  
Posted byhight1mes
Posted on10/4/01 03:39 AM
From IP24.21.91.115  



Hi there! I've been trying to code a demo using NESASM that displays a mario 16x16 object using 8x8 sprites on the screen. Everything works fine except for
some reason I can't seem to align the sprites correctly on screen. I've tried many different X-Y coordinates to display the sprites but to no resolution. Here is a small snippet of the code that isn't working right...

lda #$09 ;|\__ turn off sprite
sta $2001 ;|/

lda #$00 ;|\__ set the address in SPR-RAM
sta $2003 ;|/

; draw all the sprites to make up a little mario object

lda #$10 ;y
stx $2004
ldx #$00 ;sprite pattern number
stx $2004
ldx #%00000000 ;color bit
stx $2004
ldx #$08 ;x
stx $2004

lda #$10 ;y
stx $2004
ldx #$01 ;sprite pattern number
stx $2004
ldx #%00000000 ;color bit
stx $2004
ldx #$0F ;x
stx $2004

lda #$19 ;|\__ turn on sprite
sta $2001 ;|/

this is just two of the sprites out of the four that should be right next to each other. this code is located in the NMI interupt routine. any ideas. thanks :)





-
Entire Thread
Subject  Posted byPosted On
.NESASM 2.0 programming problem  hight1mes10/4/01 03:39 AM
.*Re: NESASM 2.0 programming problem  hight1mes10/4/01 04:20 AM
..*sprites  Memblers10/4/01 06:23 AM
...*Re: sprites  senior200010/4/01 5:37 PM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo