asar icon indicating copy to clipboard operation
asar copied to clipboard

better errors for invalid instruction widths

Open randomdude999 opened this issue 4 years ago • 4 comments

we really should have better error messages for things like dec $123456. currently getting the address mode wrong prints "invalid command" which isn't really all that helpful. i think we should have separate errors for cases where the addressing mode exists, but the width is incompatible (like dec $123456 from before) and cases where the entire addressing mode doesn't exist (like dec $00,y)

implementation is gonna either be a gigantic mess or a rewrite of arch-65816 though

(also, on a related note: print "wrong number of arguments" instead of "invalid command" for all the non-opcode commands)

randomdude999 avatar Jan 19 '21 16:01 randomdude999

I have an issue that probably falls within the scope of this one, so I'll just bring it up here instead of a new issue.

Various SPC700 operations seem to ignore the .b. So unless I shut warnings off, I get things like this:

spc/customspc.asm:104: warning: (W1006): This opcode does not exist with 16-bit parameters, assuming 8-bit. [adc.b A,#DYNAMIC_SONG_DATA]

spannerisms avatar Mar 15 '21 09:03 spannerisms

I'll look into fixing this with 1.9, however arch-*.cpp are scheduled for pretty significant overhauls in 2.0. So this may get deferred if it isn't relatively easy to fix up. But I think it should be.

p4plus2 avatar Mar 15 '21 12:03 p4plus2

Fix pushed.

By the way @spannerisms feel free to join the sneslab discord if you want to talk about either asar more directly (or other snes related stuff like homebrew etc). https://discord.gg/5sEQQ5Ae The link will expire in 24hrs. Totally optional, just giving it to you as in case you want it.

p4plus2 avatar Mar 15 '21 12:03 p4plus2

Thanks for the offer, but I'm mainly an on-my-own kinda person when it comes to most hacking.

spannerisms avatar Mar 24 '21 10:03 spannerisms

implemented in asar_2_beta. i think i'm quite happy with the new errors

randomdude999 avatar Jan 23 '24 16:01 randomdude999