Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in ROM Hacking. |
Acmlm's Board - I3 Archive - ROM Hacking - Make Mario and Luigi use different jump height offset | New poll | | |
Pages: 1 2 | Add to favorites | Next newer thread | Next older thread |
User | Post | ||
C:/xkas bio.asm Compiled ASM code Since: 11-17-05 Last post: 6432 days Last view: 6432 days |
| ||
I've been recently trying to make Mario and Luigi use different offset for jump height (located at Snes $D7A5),I have put a breakpoint to it and I found that It got read at Snes $ D949 in the oppcode ADC $D7A5,y(79 A5 D7 in hex) I have replaced it by:
$ D949 JSR $F9F9 $F9F9 JMP $10EF1A ADC $D7A5,y RTS ADC $C453,y RST $10EF1A PHA PHB PHD PHP PHX PHY LDA $0DB3 CMP #$00 BEQ #$0A PLY PLX PLP PLD PLB PLA JMP $00F9FD PLY PLX PLP PLD PLB PLA JMP $00FA01 Its the first time I'm doing that sort of thing,I have tested it and the game just freeze after the nintendo present any help? (edited by Bio on 11-27-05 07:37 PM) (edited by Bio on 11-27-05 08:33 PM) |
|||
Cruel Justice I have better things to do. Since: 11-18-05 From: At my house! Last post: 6432 days Last view: 6432 days |
| ||
Interesting... Does it work? Maybe you could create a demo hack? | |||
C:/xkas bio.asm Compiled ASM code Since: 11-17-05 Last post: 6432 days Last view: 6432 days |
| ||
Originally posted by Bio |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6433 days Last view: 6432 days |
| ||
Well, take a new ROM, then what you want5 to do is replace that statement with a JSL statement to a custom subroutine that checks the player flag, chooses a jump height accordingly, then does the next opcode after the JDA you replaced, then RTL back.
If that crashes, I have no idea why it would. |
|||
C:/xkas bio.asm Compiled ASM code Since: 11-17-05 Last post: 6432 days Last view: 6432 days |
| ||
this is what I did, look above, It is the code I did,but he crash,and I didn't know why, and that the prupose of this thread (edited by Bio on 11-28-05 09:09 PM) |
|||
spel werdz rite Since: 11-19-05 Last post: 6433 days Last view: 6432 days |
| ||
An excellent idea would be to totally recreate the physics for Luigi. Give Luigi his own jumping ability, friction, and graphics. I have thought of doing this myself, but I don't have the experience (still learning jump routines, high and low byte stuff). | |||
d4s Shyguy Since: 12-01-05 Last post: 6554 days Last view: 6452 days |
| ||
Originally posted by Bio duuude, 80% of your code is pushing and popping stuff. for example, you dont have to save y to the stack when you dont modify it.also try to use more jsrs instead of static jumps. i bet your problem is either accumulator/index width or incorrect jumps. also, be sure your assembler translates the lorom adresses correctly and knows what size the accumulator is. the following code snippet does the exact same thing as your code, just simpler, more flexible and with 13 lines of code instead of 28. you could make it even shorter, but that would probably reduce the readability. .org $d948 ;watch the different offset! jsl MarioLuigiJump .org $somewhere MarioLuigiJump: sep #$20 ;be sure that your assembler knows the size of the accumulator! pha lda $0db3 beq MarioLuigiJumpCase1 pla clc ;clear carry, that opcode was overwritten by our jsl adc $c453,y rtl MarioLuigiJumpCase1: pla clc ;clear carry, that opcode was overwritten by our jsl adc $d7a5,y rtl oh, and snes adress $00948 in lorom mode is rom adress 0x5948, just in case you didnt know. also, keep in mind that your rom most likely has a $200 byte header, so snes adress d948 would be 0x5b48 in a hexeditor if your rom has a header. one last thing: if you want to learn how to code effectively, take a look at other games disassembly. there are lots of little tricks and optimizations you can do specifically on the snes' processor you will hardly find documented on the net. just DONT assume smw is a good example of how to drive the hardware, its horribly static and unflexible most of the time. (edited by d4s on 12-01-05 03:47 PM) (edited by d4s on 12-01-05 03:49 PM) (edited by d4s on 12-01-05 03:52 PM) (edited by d4s on 12-02-05 05:54 AM) (edited by d4s on 12-02-05 05:56 AM) |
|||
C:/xkas bio.asm Compiled ASM code Since: 11-17-05 Last post: 6432 days Last view: 6432 days |
| ||
thank d4s,I will try this later,I'm busy for now
BTW, I already know about these adressing stuff,I have disambled all the code before posting it,and the adress below are all Snes adress |
|||
d4s Shyguy Since: 12-01-05 Last post: 6554 days Last view: 6452 days |
| ||
Originally posted by Bio no problem. =) how about not coding in hex? its a total waste of time, i cant understand why anyone would still want to do this. get a decent 65816 assembler with rom-patching ability (wla dx for example), and you will be able to: 1) produce readable and commentable sourcecode 2) use labels 3) let the assembler take care of all the adress calculation stuff i really mean it, start using an assembler now, you wont get very far without one. (edited by d4s on 12-04-05 02:46 PM) (edited by d4s on 12-04-05 02:46 PM) |
|||
Kailieann Since: 11-18-05 Last post: 6432 days Last view: 6432 days |
| ||
Originally posted by d4s Blasphemer. |
|||
d4s Shyguy Since: 12-01-05 Last post: 6554 days Last view: 6452 days |
| ||
Originally posted by KailieannOriginally posted by d4s hehe i feel sorry for you in case that wasnt meant to be ironic. |
|||
MathOnNapkins 1100 In SPC700 HELL Since: 11-18-05 Last post: 6432 days Last view: 6432 days |
| ||
Not at all. I think coding in hex is better at first. Then move on to assembler once you get a feel for how it should lay out. Starting off in assembler is no better than driving a car without knowing what's under the hood. Now... if you continue using assembler after you know what's what I'd say you should probably try an assembler. They don't bite.
The other assemblers I've heard of are 65816Tricks (aka TricksASM). Jathys uses it. I use Xkas. WLA DX seems to be d4s's favorite but I found it a bit daunting at first. I could probably use it now but I think Xkas is the one that has clicked with me most. There are others though (ASM2HEX I've heard is sort of buggy and doesn't calculate branches correctly all the time, among other weird occurrences I've heard about). I'd like to see GUI frontends for some of the better assemblers, I think it would make people less scared of using them. (edited by MathOnNapkins on 12-05-05 04:40 AM) (edited by MathOnNapkins on 12-05-05 04:41 AM) (edited by MathOnNapkins on 12-05-05 06:06 AM) |
|||
d4s Shyguy Since: 12-01-05 Last post: 6554 days Last view: 6452 days |
| ||
Originally posted by MathOnNapkins i dont say nothing against being able to code in hex first in order to grasp the whole concept of machine language, id even say its imperative to understand the concept of hex, adressing and such before you are able to learn assembler, but as soon as you start doing more ambitious projects, you will have a very, very hard time with hex coding, you cant deny that. i think your example of driving a car without knowing whats inside better fits the topic of c/c++ versus assembler. in that case, the compiler translates a high level language into low level machine code the user doenst have to be familiar with at all.(although its highly reccomended, of course) assembler and hex coding, on the other hand, are not two different languages, assembler sourcecode is just a different representation of machine code. the underlying concept and idea are exactly the same. thus, if you can grasp the concept of assembler, you have understood everything thats needed to master hex coding and vice versa, you already know whats "under the hood". the only difference is the vastly improved flexibility. you probably guessed it already, i dont have a problem with people coding in hex in order to better understand assembler. i have a problem with people believing hex coding is superior to assembler, or that, in order to "keep it real", you have to prefer hex coding over assembler. thats bullshit. |
|||
Kailieann Since: 11-18-05 Last post: 6432 days Last view: 6432 days |
| ||
I don't regard hex coding as superior, and the last thing I'd want is to 'keep it real'.
Hex is simply my personal preference. For now, anyways. But if I do decide to switch to an assembler, it'll be one I code myself. Only way I can make sure it'll assemble things the way I want it to. (edited by Kailieann on 12-05-05 07:33 AM) |
|||
MathOnNapkins 1100 In SPC700 HELL Since: 11-18-05 Last post: 6432 days Last view: 6432 days |
| ||
I had a problem trusting assemblers at first. Any of the major assemblers shouldn't be a problem for most people. But knowing hex is great, b/c if you spot a problem with the assembler you can bitch out the assembler author. I've had no problems yet .
Btw, the source code for Xkas is open if you want to look at it. http://byuu.cinnamonpirate.com/?page=utils&bg=5&browser= (edited by MathOnNapkins on 12-05-05 08:05 AM) |
|||
d4s Shyguy Since: 12-01-05 Last post: 6554 days Last view: 6452 days |
| ||
ive heard from various sources that xkas is superior to wla dx.
for example, wla dx wasnt really meant to be a 65816 assembler in the first place after all, its a matter of personal preference. i think i currently use wla dx cause thats whats got me started, my small library of functions relies on wla dxs functions etc. i will look into xkas later this week. |
|||
C:/xkas bio.asm Compiled ASM code Since: 11-17-05 Last post: 6432 days Last view: 6432 days |
| ||
Originally posted by d4s that was the problem,the accumulator was 16 bit and he was suppose to be 8 bit,I'm so happy to have finally found it, I may release it after I took care of these useless push and pop.I will also give permanent sliperry to luigi Edit:Crap,now the game don't freeze, but the new offset aren't loaded edit2:now the game freeze If the player is luigi (edited by Bio on 12-05-05 05:12 PM) (edited by Bio on 12-05-05 05:31 PM) |
|||
d4s Shyguy Since: 12-01-05 Last post: 6554 days Last view: 6452 days |
| ||
Originally posted by BioOriginally posted by d4s great to hear you sorted it out. in the beginning, it can be difficult to get things like accu size, pushing and popping and jumps right on the first try. you'll eventually master it, just keep on practicing in case you dont do that already, i suggest using geigers snes debugger. btw, are you sure $D7A5 does what you want/believe it to do? doublecheck if youre unsure, cause if your routine isnt crashing, theres litte that can go wrong with it. |
|||
C:/xkas bio.asm Compiled ASM code Since: 11-17-05 Last post: 6432 days Last view: 6432 days |
| ||
now its work,I will recode some stuff(mainly the uselless push and pop)thank for your help d4s
Edit:done,I also did the slippery level stuff (edited by Bio on 12-05-05 05:58 PM) |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6433 days Last view: 6432 days |
| ||
...You got the jump height modifier to work? Cool, how well does it work? |
Pages: 1 2 | Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - ROM Hacking - Make Mario and Luigi use different jump height offset | | |