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 Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Learning SMW ASM [ASM howto] | |
Pages: 1 2 3 4 5Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
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: 5311/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 06-28-05 02:50 AM Link | Quote
If you tell them it will teach them ASM, they will come.
mikepjr

Ninji
Level: 26

Posts: 165/242
EXP: 92006
For next: 10269

Since: 03-15-04
From: houston texas

Since last post: 4 days
Last activity: 1 hour
Posted on 06-28-05 05:33 AM Link | Quote
Question time!!!!

Ok, im trying to disable the time all togethor.

Ok, here is my problem.

What is this thing about BNE and BRA?

52F1: ASM that handles the 'TIME UP!' message. You can change the 'BNE' opcode to a 'BRA' to disable it.

Not sure what that means.

I do need to know thogh because i want to disable time in my hack.

Oh, and im useing Hex Workshop.
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1025/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 06-28-05 05:49 AM Link | Quote
Mike, just change 0x103F to 50 to disable the timer.
mikepjr

Ninji
Level: 26

Posts: 166/242
EXP: 92006
For next: 10269

Since: 03-15-04
From: houston texas

Since last post: 4 days
Last activity: 1 hour
Posted on 06-28-05 05:53 AM Link | Quote
Ok, will that also get rid of the TIME UP?
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1028/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 06-28-05 06:00 AM Link | Quote
No, but the time will not count downwards.
mikepjr

Ninji
Level: 26

Posts: 167/242
EXP: 92006
For next: 10269

Since: 03-15-04
From: houston texas

Since last post: 4 days
Last activity: 1 hour
Posted on 06-28-05 06:08 AM Link | Quote
Well, i was asking because i already did that, and i just checked it and it still shows it, unles i give it time in the game.

And then the blasted thing still wants to add up the time to the score at the end.

These are the things i am trying to get rid of.

Timer and TIME UP message.
The score tallying at the end of every level.
That blasted fadeing at the end of every level.
My hack will be pure exploration.

The only thing to give you score are the monsters and what not.

I also would like to get rid of the star thing that come from toching the tape.

And that is it.


(edited by mikepjr on 06-27-05 09:09 PM)
Glyph Phoenix

Level: 39

Posts: 316/745
EXP: 385876
For next: 18895

Since: 11-07-04

Since last post: 2 hours
Last activity: 2 hours
Posted on 06-28-05 08:52 AM Link | Quote
The BRA opcode has a hexadecimal equivalent of 80.

During the tutorial I skipped the three letter opcodes completely. I find the hex numbers and their equivalents far easier to manage. If you're using an assembler or disassembler three letter opcodes are necessary, but they just get in the way if you're editing with hex.
mikepjr

Ninji
Level: 26

Posts: 169/242
EXP: 92006
For next: 10269

Since: 03-15-04
From: houston texas

Since last post: 4 days
Last activity: 1 hour
Posted on 06-28-05 09:07 AM Link | Quote
Hmmmmmmmmm, is what i would say if i understood that. lol

Ummm, well then what is BNE if BRA is 80.

I mean why even explane it that way if no one really looks at it that way?

I ask because that is what it says a few threads down.

But since i have been useing Hex Workshop i have been unable to type in BNE or anything like that, but i guess that would explane it.

Sooooo now im stuck.

I have to know what BNE is in order to change it, goodness this is a stumper.

It gets confusing, dosn't it?
-EDIT-
Ok, i figured it out, all i had to do was change D0 to 80.


(edited by mikepjr on 06-28-05 12:10 AM)
Glyph Phoenix

Level: 39

Posts: 357/745
EXP: 385876
For next: 18895

Since: 11-07-04

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-16-05 03:56 AM Link | Quote
I'd like to extend my knowledge of this so I can extend this tutorial, but 65c816 has annoyingly few resources. I need to know how Direct Page accessing works and the syntax of jmp and jsl statements.
Hackwiz
Newcomer
Level: 1

Posts: 1/1
EXP: 9
For next: 2

Since: 07-28-05

Since last post: 96 days
Last activity: 54 days
Posted on 07-28-05 07:32 PM Link | Quote
Hi Y'all,
Something that has proven very useful for me in hacking Game Genie codes, is the W65C816S data sheet available from the manufacturer "Western Design." You can dl it in .pdf

http://www.westerndesigncenter.com/wdc/

It has very good explainations for the different addressing modes/opcodes and other assorted goodies.

For learning basic asm for the SNES/NES, I highly suggest:

"Apple Machine Language" by Don Inman & Kurt Inman

You can find it on amazon.com for a few dollars. Although it is based on the 6502 (NES) microprocessor, all of the opcodes are present in the 65C816 (SNES) micro opcode list. The book does a great job of teaching everything from hexidecimal to writing small routines.




(edited by Hackwiz on 07-28-05 12:07 PM)
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1431/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 07-29-05 12:21 AM Link | Quote
JMP and JSL? The first tells the processor to move to a new section of code, instead of simply increment a byte. JML is the 24-bit equivalent of JMP, wheras JMP is only 16-bit. JSR and JSL are the same as their respective counterparts, but they also push the current program counter to the stack (again, 16-bit and 24-bit addresses respectively), before jumping to the desired offset. RTS and RTL are the same as the JMP and JML commands, but instead of getting the destination address from code, they get their destinations addresses from the stack.
PaD

Micro-Goomba
Level: 5

Posts: 7/11
EXP: 361
For next: 168

Since: 07-27-05
From: Datteln, Germany

Since last post: 86 days
Last activity: 5 days
Posted on 07-29-05 03:08 AM Link | Quote
Does anybody know a disassembler for 65816 (SNES) assembly (NOT running DOS-based)?
I'd like to get into hacking myself, but reading opcodes is a pain in the ass and will result in total confusion. I need something readable... an assembler isn't necessary, I prefer writing assembly code directly in OpCode.


(edited by PaD on 07-28-05 06:13 PM)
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1455/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 07-29-05 04:02 AM Link | Quote
Well, I can't help you with a disassembler, but this may help: 65816REF.HLP.
Glyph Phoenix

Level: 39

Posts: 408/745
EXP: 385876
For next: 18895

Since: 11-07-04

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-29-05 02:48 PM Link | Quote
Thanks, DF, I'll add that into the tutorial when I get to those two... but I really need to know how to write a JMP or JML address. Are we talking byte flipping like with the ram addresses or anything like that? Or is this a Lunar Address thing? Not knowing how to change the regular address you use to find an offset from the kind you use in JMP or JML statements is really what's throwing me here.
mikeyk

Koopa
Level: 18

Posts: 97/110
EXP: 25086
For next: 4811

Since: 07-17-04

Since last post: 45 days
Last activity: 44 days
Posted on 07-29-05 03:33 PM Link | Quote
GP: Lets say you have write some custom code at PC 0x0A9254 that you want to run. This address corresponds to SNES $159054, so to get to your code, all you have to do is get to it with a JML $159054 statement, 5C 54 90 15 in hex. The hardest part is finding a place to put your jump statement. I find it easiest to replace a JSL statement in the original code with your JML statement, and then just call the subroutine from your custom code.
Dark Ludwig

Red Paratroopa
Level: 21

Posts: 53/172
EXP: 45740
For next: 4203

Since: 09-17-04
From: Georgia

Since last post: 9 days
Last activity: 2 days
Posted on 07-30-05 10:06 PM Link | Quote
I figured out how the pointer of a branch instruction works. (excluding BRL) If it is going to branch, then it should work kinda like this below. Glyph, why don't you put this in the tutorial?

If the branch's pointer byte was 00, it would branch to the byte immediately following that pointer. If it was 01, it would skip 1 byte after the pointer. If it was 05, it would skip 5 bytes. If it was 0C, it would skip C bytes, and so forth and so forth until you get to 7F, which is the farthest you can branch forward.

Now, here is if you want to branch backward. If the pointer is FF, it will branch to itself, which is quite a dumb idea, unless a big crash is otherwise a good thing to your hack. If it's FE, it will branch backward one byte, which would of course also be dumb since that's the branch opcode. Then you just keep subtracting one at a time from the branch's pointer and move back one at a time from where it's branching, until you reach 80, which if the farthest it can branch backward.

For a little demonstration, assume that the "O" is the branch's pointer byte, and that the vertical dashes are the bytes before and after the branch. Then, assume that the numbers above the dashes and "O" are above the byte that the branch would point to if it's pointer was that number.

|---------------------------------------|
|etc. FB FC FD FE FF 00 01 02 03 04 etc.|
|--|--|--|--|--|--O--|--|--|--|--|--|--||
|---------------------------------------|


Seriously, this thread is barely getting any attention. I had several questions, and I already figured out all but one on my own since it has been taking so long for an answer. How does a BRL work? Like, how do the two pointer bytes following it's opcode affect where it branches to? That's my only question as of now.

Thank you so much for all the help you guys have given to all of us who want to learn this, I finally have a grasp on how to at least do simple custom ASM codes in SMW.

Edit: Ok, I went ahead and erased all the answered questions, because this post was getting a bit jumbled.


(edited by dark ludwig on 07-31-05 08:16 PM)
(edited by dark ludwig on 08-01-05 02:37 AM)
(edited by dark ludwig on 08-01-05 04:01 PM)
(edited by dark ludwig on 08-02-05 12:20 AM)
(edited by dark ludwig on 08-09-05 02:46 PM)
(edited by dark ludwig on 08-09-05 02:47 PM)
(edited by dark ludwig on 08-09-05 02:48 PM)
Tweaker

Red Paragoomba
Level: 12

Posts: 39/57
EXP: 6490
For next: 1431

Since: 03-20-05
From: Rochester, NY

Since last post: 25 days
Last activity: 13 days
Posted on 08-01-05 08:46 AM Link | Quote
I really like this. It's a good SNES ASM tutorial in case I ever decide to major in SMW hacking (Or any SNES hacking for that matter)..

I like how you explained the branching routines. I know a fair bit of Motorola 68000 ASM, and it works in the same way...

Example:

My_Routine:

cmp.w #$0E10, FFE0 -- Check if the current word at RAM address FFE0 is 0E10
bne.s @Other_Routine -- If condition is false, branch to Other_Routine
move.b #0B FE10 -- Move 0B to fE10 in RAM

Other_Routine

etc...


But yeah, great work. From a ASM tutorial I saw for the SNES before, the instructions are fairly similar, with the exception of the SNES being a little endian processor based system. At least I'll be at a good start. =P
d4s

Panser
Level: 29

Posts: 273/325
EXP: 142151
For next: 5734

Since: 03-23-04

Since last post: 13 days
Last activity: 1 day
Posted on 08-11-05 03:37 PM Link | Quote
Glyph Phoenix:

while some people still believe that coding in hex is easier and/or more l33t than using assemblers, its actually totally stupid and a waste of time.

although you may be able to code some simple 2 or 3 opcode routine in hex, you'll very soon hit a dead end once your skill level increases and you start to work on more sophisticated stuff.

trying to help out newbies is always a good idea, but you should make sure you have the appropriate knowledge base to do so, first.
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1607/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 08-11-05 10:54 PM Link | Quote
d4s: Wrong. Coding in hex is easier for me, because when I attempted to use a compiler for a simle store 1/ store 0 block, the compiler assembled it with 16-bit accumulator settings in mind. While I agree that cometimes a compiler is useful, in many cases, I find that Hex editing SNES code can be easier and ultimately, more productive because it does not crash as often.
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 1965/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 08-11-05 11:01 PM Link | Quote
I'm coding ASM in hex, since I don't trust assemblers. Sure, it's messier to code and a hell to look for problems, but the code is like I want it to be, not like the assembler's programmer want it to be.
Pages: 1 2 3 4 5Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - Learning SMW ASM [ASM howto] | |


ABII


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



Page rendered in 0.022 seconds.