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... | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
FloBo

Koopa
Level: 17

Posts: 79/101
EXP: 20723
For next: 4020

Since: 09-11-04

Since last post: 3 days
Last activity: 13 hours
Posted on 08-20-05 01:44 PM Link | Quote
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...
ExKay
Somebody set up us the bomb!
Level: 50

Posts: 923/1114
EXP: 908268
For next: 39049

Since: 03-15-04
From: Hannover, Germany

Since last post: 14 hours
Last activity: 1 hour
Posted on 08-20-05 02:44 PM Link | Quote
Change the hex address to EA, it's a NOP which means No Operation and won't execute the code.
FloBo

Koopa
Level: 17

Posts: 80/101
EXP: 20723
For next: 4020

Since: 09-11-04

Since last post: 3 days
Last activity: 13 hours
Posted on 08-20-05 02:56 PM Link | Quote
I'll try this... thnx.

btw, it was you who posed this question already, wasn't it?
ExKay
Somebody set up us the bomb!
Level: 50

Posts: 924/1114
EXP: 908268
For next: 39049

Since: 03-15-04
From: Hannover, Germany

Since last post: 14 hours
Last activity: 1 hour
Posted on 08-20-05 03:36 PM Link | Quote
Nope, I never posted something about ASM.
Jedenfalls, kein Problem.
FloBo

Koopa
Level: 17

Posts: 81/101
EXP: 20723
For next: 4020

Since: 09-11-04

Since last post: 3 days
Last activity: 13 hours
Posted on 08-20-05 06:30 PM Link | Quote
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
Somebody set up us the bomb!
Level: 50

Posts: 926/1114
EXP: 908268
For next: 39049

Since: 03-15-04
From: Hannover, Germany

Since last post: 14 hours
Last activity: 1 hour
Posted on 08-20-05 06:37 PM Link | Quote
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.
Gideon Zhi

Red Tektite
Level: 13

Posts: 52/79
EXP: 10265
For next: 2

Since: 04-02-05

Since last post: 47 days
Last activity: 2 days
Posted on 08-20-05 07:28 PM Link | Quote
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
Setzer

Popo
Level: 36

Posts: 416/532
EXP: 290182
For next: 17928

Since: 04-22-04
From: Not Florida. because I'm going to sink it.

Since last post: 5 hours
Last activity: 48 min.
Posted on 08-20-05 07:37 PM Link | Quote
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.
FloBo

Koopa
Level: 17

Posts: 82/101
EXP: 20723
For next: 4020

Since: 09-11-04

Since last post: 3 days
Last activity: 13 hours
Posted on 08-20-05 08:05 PM Link | Quote
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?!
Bio

Buster Beetle
Level: 27

Posts: 125/458
EXP: 107144
For next: 9015

Since: 07-06-05
From: a laboratory somewhere... Waiting to be completed

Since last post: 8 hours
Last activity: 5 hours
Posted on 08-20-05 11:04 PM Link | Quote
he being refeiring to 65c816 oppcode tutorial
here a link
http://freewebtown.com/illegalmove/65816ref.hlp
FloBo

Koopa
Level: 17

Posts: 83/101
EXP: 20723
For next: 4020

Since: 09-11-04

Since last post: 3 days
Last activity: 13 hours
Posted on 08-21-05 05:24 PM Link | Quote
thnx, bio^^
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 2131/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-21-05 05:55 PM Link | Quote
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.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6453/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-21-05 10:22 PM Link | Quote
It's also useful when you need to remove a single opcode. Jumps won't fit in one byte.
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 2134/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-22-05 08:23 AM Link | Quote
Sure they will... (RTS), (RTI), (RTL). You just won't like the result
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6480/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-22-05 12:25 PM Link | Quote
Returning jumps don't count!
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 2136/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-22-05 02:18 PM Link | Quote
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
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6493/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-22-05 10:55 PM Link | Quote
But that's not one byte.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
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.018 seconds.