Language…
6 users online: AJ1Ayrton, masl, Nirv, Oskise, playagmes169, Tsquare07 - Guests: 250 - Bots: 245
Users: 64,795 (2,375 active)
Latest user: mathew

MVN not working (solved)

My code for the first time using MVN:
Code
	PHB
	REP #$30
	LDA.w #(!GraphiBar_LeftTileExist+(!GraphiBar_MiddleTileExist*!Default_MiddleLength)+!GraphiBar_RightTileExist)-1
	LDX.w !Scratchram_GraphicalBar_FillByteTbl
	LDY.w (!Scratchram_GraphicalBar_FillByteTbl+!GraphiBar_LeftTileExist+(!GraphiBar_MiddleTileExist*!Default_MiddleLength)+!GraphiBar_RightTileExist)
	MVN (!Scratchram_GraphicalBar_FillByteTbl>>16), (!Scratchram_GraphicalBar_FillByteTbl>>16)
	SEP #$30
	PLB


Asar reports:
Code
Processing binary file 'DoubleBar.asm':
  DoubleBar.asm:160: error: Unknown command. [LDY.w ($7F844B+1+(1*7)+1)]


I've added a .w since LDY <singlebyte or triple byte addressing> does not exist. But for some reason, asar decided not to cut off byte 2 (3rd highest byte). Is there a way around this?
Give thanks to RPG hacker for working on Asar.
LDY indirect doesn't exist. Remove the outermost parens, or stick a 0+ in front or whatever.
<blm> zsnes users are the flatearthers of emulation
oh, its reading it as LDY.w ($xxxx), should've known that parenthesis on the very outside (as in, all the numbers inside the parenthesis) counts as indirect addressing. Thanks.

Another issue: MVN isn't transferring data. Here is the debug code:
Code
90814d phb                    A:0007 X:0008 Y:0000 S:01f9 D:0000 DB:90 nvMXdizc V:256 H:  6 F:36
90814e rep #$30               A:0007 X:0008 Y:0000 S:01f8 D:0000 DB:90 nvMXdizc V:256 H: 12 F:36
908150 lda #$0008             A:0007 X:0008 Y:0000 S:01f8 D:0000 DB:90 nvmxdizc V:256 H: 17 F:36
908153 ldx $844b     [90844b] A:0008 X:0008 Y:0000 S:01f8 D:0000 DB:90 nvmxdizc V:256 H: 23 F:36
908156 ldy $8454     [908454] A:0008 X:9449 Y:0000 S:01f8 D:0000 DB:90 Nvmxdizc V:256 H: 33 F:36
908159 mvn $7f,$7f            A:0008 X:9449 Y:9449 S:01f8 D:0000 DB:90 Nvmxdizc V:256 H: 43 F:36
908159 mvn $7f,$7f            A:0007 X:944a Y:944a S:01f8 D:0000 DB:7f Nvmxdizc V:256 H: 56 F:36
908159 mvn $7f,$7f            A:0006 X:944b Y:944b S:01f8 D:0000 DB:7f Nvmxdizc V:256 H: 69 F:36
908159 mvn $7f,$7f            A:0005 X:944c Y:944c S:01f8 D:0000 DB:7f Nvmxdizc V:256 H: 82 F:36
908159 mvn $7f,$7f            A:0004 X:944d Y:944d S:01f8 D:0000 DB:7f Nvmxdizc V:256 H: 95 F:36
908159 mvn $7f,$7f            A:0003 X:944e Y:944e S:01f8 D:0000 DB:7f Nvmxdizc V:256 H:108 F:36
908159 mvn $7f,$7f            A:0002 X:944f Y:944f S:01f8 D:0000 DB:7f Nvmxdizc V:256 H:121 F:36
908159 mvn $7f,$7f            A:0001 X:9450 Y:9450 S:01f8 D:0000 DB:7f Nvmxdizc V:256 H:144 F:36
908159 mvn $7f,$7f            A:0000 X:9451 Y:9451 S:01f8 D:0000 DB:7f Nvmxdizc V:256 H:157 F:36
90815c sep #$30               A:ffff X:9452 Y:9452 S:01f8 D:0000 DB:7f Nvmxdizc V:256 H:170 F:36
90815e plb                    A:ffff X:0052 Y:0052 S:01f8 D:0000 DB:7f NvMXdizc V:256 H:176 F:36
90815f rtl                    A:ffff X:0052 Y:0052 S:01f9 D:0000 DB:90 NvMXdizc V:256 H:183 F:36


It is supposed to copy 9 bytes (address $7F844B to $7F8453), to address $7F8454 (to $7F845C). But the debugger for some reason didn't show the copied in the memory editor (I'm bsnes plus, by the way). I've have it set to auto update.
Give thanks to RPG hacker for working on Asar.
did you even read the log

Originally posted by GreenHammerBro
908159 mvn $7f,$7f A:0008 X:9449 Y:9449 S:01f8 D:0000 DB:90 Nvmxdizc V:256 H: 43 F:36

copying from $7f9449 to $7f9449 ain't gonna help you

Quote
908153 ldx $844b [90844b] A:0008 X:0008 Y:0000 S:01f8 D:0000 DB:90 nvmxdizc V:256 H: 23 F:36
908156 ldy $8454 [908454] A:0008 X:9449 Y:0000 S:01f8 D:0000 DB:90 Nvmxdizc V:256 H: 33 F:36

neither does loading from random rom addresses, more #
<blm> zsnes users are the flatearthers of emulation
Solved. I've found the issue, I've forgot to use the # symbol for all AXY values. Oops.
Give thanks to RPG hacker for working on Asar.