Page 1 of 1

Help horizontally scrolling more than 2 screens (solved)

Posted: Sun Apr 01, 2018 8:42 pm
by lazerbeat
I am working through the advanced nerdy nights tutorial and I am able to get 2 screens of data scrolling nicely. However when I try and add in 2 more screens I run in to problems. I am pretty sure this is as I am drawing the columns off screen incorrectly as this is what I get. It looks like my code is only drawing the top 2 rows of new data.

Image

The code works in ASM3 but I am using ASM6 so I am assuming I have done something wrong converting it to ASM6. Would anyone be kind enough to take a look at my code?

https://pastebin.com/qWVh7Xgd

Thanks!

Re: Help with horizontally scrolling more than 2 screens

Posted: Sun Apr 01, 2018 9:50 pm
by dougeff
I didn't test this, but...lines 289 and 347

LDA sourceLow, y

perhaps you wanted indirect mode

LDA (sourceLow), y

Re: Help horizontally scrolling more than 2 screens (solved)

Posted: Sun Apr 01, 2018 11:15 pm
by lazerbeat
Thanks so much that was it! Is (foobar),x in asm6 the same as [foobar],x in ASM3?

Re: Help horizontally scrolling more than 2 screens (solved)

Posted: Sun Apr 01, 2018 11:40 pm
by koitsu
lazerbeat wrote:Thanks so much that was it! Is (foobar),x in asm6 the same as [foobar],x in ASM3?
There is no (foobar),x addressing mode in 65xxx series. There is (foobar),y (this is called indirect indexed or sometimes "post-indexed") or (foobar,x) (this is called indexed indirect or sometimes "pre-indexed").

asm6 -- like most 65xxx assemblers -- uses parenthesis (()) for indirect addressing modes. It also uses parenthesis for operator ordering (ex. ((2+3)*4)); the assembler's parser is intelligent enough to know what you mean. NESASM chooses to use brackets ([]) to specify indirect addressing.

While I'm here: please stop saying "ASM3". You mean to say NESASM 3 -- and you should refer to the exact version of the assembler you're using. The term "asm3" is bizarre and confusing. NESASM 3 and asm6 have no relation to one another. They are completely different assemblers with completely different authors.