Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - another ASM-question...
  
User name:
Password:
Reply:
 

UserPost
HyperLamer
Posts: 6493/8210
But that's not one byte.
MathOnNapkins
Posts: 2136/2189
Oh yeah? I've seen jump tables that are generated with RTS:



REP #$30

LDA INDEX
ASL A
TAY

LDA JUMPTABLE, Y
PHA

SEP #$30

RTS



very hard to spot from just casually looking at a routine.
HyperLamer
Posts: 6480/8210
Returning jumps don't count!
MathOnNapkins
Posts: 2134/2189
Sure they will... (RTS), (RTI), (RTL). You just won't like the result
HyperLamer
Posts: 6453/8210
It's also useful when you need to remove a single opcode. Jumps won't fit in one byte.
MathOnNapkins
Posts: 2131/2189
If you ask me, NOP is a waste of space

While you are more or less correct, there are some things that you simply must use a NOP for on an snes. If you want to do hardware divide or multiply, for instance, you have to wait a set number of cycles to get the result back from the onboard circuitry. So if you have to wait 8 cycles, you will use 4 NOPs, since they take 2 cycles a piece.
FloBo
Posts: 83/101
thnx, bio^^
Bio
Posts: 125/458
he being refeiring to 65c816 oppcode tutorial
here a link
http://freewebtown.com/illegalmove/65816ref.hlp
FloBo
Posts: 82/101
It's always just a few bytes to be filled, so it won't make the whole thing too slow... also i needed it just for a tiny self-written little tool that does all that filling automatically... calculating the next jump-to position would be a too much effort for the little advantage you may get. Anyway, thanks for your help, Gideon


@ice man: what document are you talking about? jay's asm-tutorial?!
Setzer
Posts: 416/532
If you ask me, NOP is a waste of space just JMP to the address you need it to go too, it sounds alot simpler to me, and alot more efficient. unless, say, you only have a few bytes that you'd have to bypass.
Gideon Zhi
Posts: 52/79
Another option, if there's a _lot_ of space you're NOPing through, is to add in a Branch Always or a JMP to the address of the next executed instruction. Your game'll execute faster with one JMP or a BRA rather than ten NOPs
ExKay
Posts: 926/1114
Nope, d4s once told me that EA is a NOP and seeing that I have an 65c816 reference with all the opcodes, that's why I knew that.
FloBo
Posts: 81/101
Heyhey^^ It works!! Many thanks to you, Ice Man Dankeschön!!!


Well, then how do you know about this? Did you use your holidays to learn ASM?
ExKay
Posts: 924/1114
Nope, I never posted something about ASM.
Jedenfalls, kein Problem.
FloBo
Posts: 80/101
I'll try this... thnx.

btw, it was you who posed this question already, wasn't it?
ExKay
Posts: 923/1114
Change the hex address to EA, it's a NOP which means No Operation and won't execute the code.
FloBo
Posts: 79/101
Hey there. I think there's been a thread like this some time ago but I actually can't seem to find it anymore...

Anyway here's my question: I have some space left within my SNES-rom and want to fill it with some hex-characters (for I don't want to rewrite all pointers coming afterwards...). The problem is, that they're all read as asm-instructions by the snes.... So is there any asm-instuction (and the according hex-value) that simply doesn't do ANYTHING???

Thanx in advance, FloBo...
Acmlm's Board - I2 Archive - Rom Hacking - another ASM-question...


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.003 seconds.