Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,488,480
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-26-24 04:36 PM
Guest: Register | Login

0 users currently in ROM Hacking Archives | 1 guest

Main - ROM Hacking Archives - 65816 ASM tutorial New thread | Thread closed

Pages: 1 2

al2fenrir
Posted on 10-09-09 02:27 PM Link | Quote | ID: 116777


Panser
Level: 41

Posts: 15/333
EXP: 443731
Next: 36414

Since: 09-20-09

Last post: 4957 days
Last view: 4963 days
Hello Sukasa, the download link to 65_IDE.exe seems broken.

Your info was really valuable though. This is just what I need.

____________________
SUPER MARIO RPG EXPANSION
MY PERSONAL BLOG
Got any SMRPG Hacking related question?
astralgamma.nursing-resource.com

Sukasa
Posted on 10-09-09 03:55 PM Link | Quote | ID: 116780


Red Birdo
Level: 92

Posts: 2027/2112
EXP: 7689510
Next: 67427

Since: 02-19-07

Last post: 4448 days
Last view: 3219 days
I should probably remove that link, I have no intention of trying to fix that horrid program. Notepad is better.

MathOnNapkins
Posted on 10-09-09 11:54 PM Link | Quote | ID: 116839


Super Koopa
Level: 62

Posts: 714/842
EXP: 1935545
Next: 49141

Since: 02-19-07
From: durff

Last post: 4488 days
Last view: 4011 days
You know, I always wondered what the hell was in that IDE...

____________________
Zelda Hacking Forum
hobbies: delectatio morosa

Hamtaro126
Posted on 10-10-09 02:56 AM Link | Quote | ID: 116859


Cheep-cheep
Level: 33

Posts: 121/194
EXP: 212842
Next: 16337

Since: 05-02-07
From: Shelton, WA

Last post: 2473 days
Last view: 2316 days
What about making these ASM plugins for the newest version of Emerald editor (for people to choose): ca65_6502, ca65_65816, wladx_6502, wladx_65816 and asm6)

I could make them.... Maybe?

____________________
Mah boi, romhacking is what all true warriors strive for!

I wonder what's for dinner?

al2fenrir
Posted on 10-15-09 09:37 PM Link | Quote | ID: 117211


Panser
Level: 41

Posts: 22/333
EXP: 443731
Next: 36414

Since: 09-20-09

Last post: 4957 days
Last view: 4963 days
This ASM thing is consuming my time. I manage to disassemble the ROM, but now, I don't know how to reassemble.. do I need a programming tool to do this? If so, what programs are best.

Sorry, I'm a noob in programming.

____________________
SUPER MARIO RPG EXPANSION
MY PERSONAL BLOG
Got any SMRPG Hacking related question?
astralgamma.nursing-resource.com

boingboingsplat
Posted on 10-15-09 11:03 PM Link | Quote | ID: 117224


Giant Koopa
[PREFSTRING:wonderful bounciness]
Level: 74

Posts: 1038/1292
EXP: 3633789
Next: 19755

Since: 07-23-07
From: Michicola

Last post: 4842 days
Last view: 4804 days
xkas is the best 65c816 assembler available. It shouldn't be too hard to find with google, so I won't bother providing a link.

xkas is a command line tool, and it's format is this: xkas in.asm out.bin (Or any other extension)

____________________
 

Sukasa
Posted on 10-16-09 10:03 PM Link | Quote | ID: 117286


Red Birdo
Level: 92

Posts: 2032/2112
EXP: 7689510
Next: 67427

Since: 02-19-07

Last post: 4448 days
Last view: 3219 days
Posted by MathOnNapkins
You know, I always wondered what the hell was in that IDE...


Nothing worthwhile, really. It was slow, the undo function was underthought, and it was one of my earlier VB6 programs. The latter fact alone means you're best off avoiding that program.

swamp cecil
Posted on 02-16-10 11:49 PM (rev. 2 of 02-17-10 12:09 AM) Link | Quote | ID: 127147

Newcomer
Level: 3

Posts: 1/1
EXP: 71
Next: 57

Since: 02-16-10

Last post: 5182 days
Last view: 5181 days
a couple of nooby questions.
1. what do i do/use to edit the ASM?
2. lets say i want the block that turns mario into cape mario. how do insert it into my rom? do i use block tool, and if yes, then how?
3. i got the
LDA #$02
STA $7E0019
RTS
code good, but how do i chose which block uses this code?
its like making a house, but who is going to live there?

boingboingsplat
Posted on 02-17-10 04:26 AM Link | Quote | ID: 127151


Giant Koopa
[PREFSTRING:wonderful bounciness]
Level: 74

Posts: 1215/1292
EXP: 3633789
Next: 19755

Since: 07-23-07
From: Michicola

Last post: 4842 days
Last view: 4804 days
1) A simple text editor will do in most cases.
2) Block Tool Super Deluxe (BTSD, you can track it down on SMWC) is able to directly insert .asm files. (Which are just txt files with a different extension.)
3) With BTSD you can specify which asm file is used for which block when you insert the block.

____________________
 

Gil-Galad
Posted on 07-14-10 10:15 AM Link | Quote | ID: 132956


Goomba
Level: 13

Posts: 26/26
EXP: 10255
Next: 12

Since: 12-08-07

Last post: 5035 days
Last view: 5032 days
Just goes to show you how long I haven't been around here, then I show up and notice a 65816 tutorial. I figured that I'd write something up and then I remembered this book that I have in PDF format, which explains it far better than what I could.

It's called "Programming the 65816 Including the 6502, 65C02 and 65802". Written by David Eyes and Ron Lichty. April 28, 1992. Copyright 2007 Western Design Center, INC.

This book describes all of those processors quite well and starts with very basic concepts to assembly programming that even a beginner could possibly understand. Don't get me wrong, there is a learning curve here. However, it's very good and that the book tries not to assume you know everything about basic concepts.

For anyone that is used to messing with the 6502 will catch on very fast to this book. Of course it starts with the 6502 because that CPU is pretty much the base of the technology. Even if you don't know 6502 already, I suggest that you don't skip those sections because the core of what you need to know is explained from 6502 and then the 65C02. Of course, the 65802 is a bit different, in that it's constrained by it's 6502 pinout to 64KB, where the 65816 can access up to 16MB.

Here is the document for you to read and I believe it will help you. HERE

Upon further reflection of this topic: There are a few things to consider and I will point them out.

For most of you the primary point of this tutorial is to learn how to assembly hack games and I would say that requires that you "reverse engineer" the ROM. It usually wouldn't be required to disassemble the entire game unless you wished to reverse engineer the entire game as a reference. And use some sort of label commenting for certain lines of code and data. However, this method certainly wouldn't usually give you a re-compilable source code. If you had the original source code and assembler, your job would be much easier.

On the other hand, you could extract certain banks out of the ROM image and then disassemble those and comment, such as the FFVI community has done.

What I have done for my projects is to manually assemble the code from Notepad and then overwrite the bytes at a select location in the ROM. I have even used a assembler and tricked it by using the address as a base origin and then copy those bytes from the assembled ROM.

Of course, now we have Xkas and honestly, I'm not familiar with this assembler at all. I'm considering on learning how to use it for hacks.

Then you have debuggers and those can help tremendously in deducing addresses and then you can always find those in the ROM somewhere.

So, I suggest getting to know the CPU architecture, opcodes, operands. Learning to how disassemble a bank and then read some code by citing each opcode and operand. After that, you get selective and start tracking down what each routine does specifically.

That's all for the general tips. Have fun reading the document!






UnderTheSea
Posted on 08-06-11 02:21 PM Link | Quote | ID: 145716

Newcomer
Level: 4

Posts: 1/2
EXP: 192
Next: 87

Since: 08-06-11

Last post: 4640 days
Last view: 4640 days
I used a branch code (beq) and it said it was too many bytes away from the place I wanted it to jump to and gave me an error. How do I fix this so branch codes can be more than -127 to 128 bytes away from the place you want them to go to?

Kawa
Posted on 08-06-11 02:24 PM (rev. 2 of 08-06-11 02:26 PM) Link | Quote | ID: 145717


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 5015/5344
EXP: 30945454
Next: 717527

Since: 02-20-07
From: The Netherlands

Last post: 4498 days
Last view: 2633 days
Put the destination closer to the branch instruction. The instruction you try to use is for short jumps only, and that can't be changed.

But you can also use a different kind of jump, that can go farther.

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

UnderTheSea
Posted on 08-13-11 02:48 PM Link | Quote | ID: 145906

Newcomer
Level: 4

Posts: 2/2
EXP: 192
Next: 87

Since: 08-06-11

Last post: 4640 days
Last view: 4640 days
I cannot move it since it has to be in the middle, otherwise I just get more of the same errors from other places that need to go to it.

And I have tried changing:

beq PlaceToBranch
jmp NextBit

With:

bne NextBit
jmp PlaceToBranch

But that gives the error of NextBit being to far away as well.

I don't know what else I can do!

Toad Shroom
Posted on 12-08-14 03:19 AM Link | Quote | ID: 159108

Newcomer
Level: 4

Posts: 1/2
EXP: 165
Next: 114

Since: 12-08-14
From: Clarksburg, West Virginia

Last post: 3389 days
Last view: 3389 days
On DSHack.org, there is a .PDF file on how to do ASM hacks. I once had it.

____________________
The user who will soon have an Post Layout.

ShaneM
Posted on 12-08-14 04:33 PM (rev. 3 of 12-08-14 04:36 PM) Link | Quote | ID: 159110


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 239/285
EXP: 293486
Next: 14624

Since: 02-17-14

Last post: 3137 days
Last view: 2653 days
Posted by Toad Shroom
On DSHack.org, there is a .PDF file on how to do ASM hacks. I once had it.


Please refrain from posting on topics this old unless you have some brand new, relevant information. It prevents board clutter and unnecessary posting.

Also, welcome to Board 2! I hope that you enjoy your stay. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?
Pages: 1 2


Main - ROM Hacking Archives - 65816 ASM tutorial New thread | Thread closed

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.025 seconds. (322KB of memory used)
MySQL - queries: 102, rows: 125/126, time: 0.017 seconds.