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 - SMW Dev Env V0.2 Released Import/Export Actual Source Code
  
User name:
Password:
Reply:
 

UserPost
HabsoluteFate
Posts: 149/179
Originally posted by Darkflight
Or, why not make the SMWDE, but also supply an earlier version for other ROMS called "SNDE"?


The site that hosts the program (Sourceforge) has a copy of all versions of this program, even though i'm going to be adding SMW features specific stuff you can still download older versions anytime you want. I wont force the user to use a SMW rom for features that are not specific to SMW so you should be ok...

If someone ever wanted to make a spinoff project on Sourceforge named SNDE then go right ahead...SMWDE is open source therefore you can use it as a basis for any program you write....(you might want to read the GPL used for further details).
Sukasa
Posts: 433/1981
Or, why not make the SMWDE, but also supply an earlier version for other ROMS called "SNDE"?
HabsoluteFate
Posts: 148/179
Right now you could use it on any SNES ROM but in later versions I might (and probably will) deviate from that so that it is specific to SMW...
For example when i have the power up functionality...that will be specific to SMW....
Sukasa
Posts: 430/1981
No, I think that Super Mario World Development Environment would work on any SNES ROM with the right pointers supplied to it.
Parasyte
Posts: 439/514
Also, there are a few instructions that assemble to 5 bytes... So yeah.
I'm still scratching my head over what this program does that's specifically caters to Super Mario World?
HyperLamer
Posts: 4220/8210
I suggest you just have it print blank for non-existant bytes, like:
EA .. .. .. | NOP
But spaces instead of dots.
HabsoluteFate
Posts: 147/179
Originally posted by DisruptiveIdiot
I heard a printf comment in there

Why didn't you use C++ instead of C?


I'm kinda using both c and c++....i'm just re-learning all that stuff again since its been over 7 years since i last really touched either
There are chunks of the code i would rewrite already....and i probably will at some point in time...

The entire ROM cannot be exported as soon code no...this is only useful for sub routine at the moment...will it ever be able to do the entire rom? maybe someday but not in my radar right now
DisruptiveIdiot
Posts: 66/147
I heard a printf comment in there

Why didn't you use C++ instead of C?
Sokarhacd
Posts: 1144/1757
woah...triple post O_o....anyway.......why not just make a frontend? that should work.
Sukasa
Posts: 409/1981
Oh, all right. Just thought that if what was printed was exactly what went into the ROM, then space was being wasted. O well. If you make a VB version, I wouldn't mind helping you.

Triple post. Wierd. Deleted the Extras.
Sokarhacd
Posts: 1143/1757
is it possible to export the whole rom as an asm file yet? that would be a cool feature if not possible yet..anyway, awesome work
HabsoluteFate
Posts: 146/179
Originally posted by Darkflight
Wow. Good job. I will be able to use this well. All I could suggest is to make it a win32 App and when you reimport the code, only add zeros when you need to, not just to make 4-byte entries for the instructions, kinda like this:

C2 20 00 00 | REP #$20
A2 00 04 00 | LDX #$04
AC 84 0D 00 | LDY $0D84
F0 1F 00 00 | BEQ $1F
A0 00 86 00 | LDY #$86
8C 21 21 00 | STY $2121
A9 00 22 00 | LDA #$2200
8D 20 43 00 | STA $4320
AD 82 0D 00 | LDA $0D82
8D 22 43 00 | STA $4322
A0 00 00 00 | LDY #$00
8C 24 43 00 | STY $4324
A9 14 00 00 | LDA #$0014
8D 25 43 00 | STA $4325
8E 0B 42 00 | STX $420B
EA 00 00 00 | NOP

Becomes

C2 20 | REP #$20
A2 00 04 | LDX #$04
AC 84 0D | LDY $0D84
F0 1F | BEQ $1F
A0 00 86 | LDY #$86
8C 21 21 | STY $2121
A9 00 22 | LDA #$2200
8D 20 43 | STA $4320
AD 82 0D | LDA $0D82
8D 22 43 | STA $4322
A0 00 | LDY #$00
8C 24 43 | STY $4324
A9 14 00 | LDA #$0014
8D 25 43 | STA $4325
8E 0B 42 | STX $420B
EA | NOP

And the just repair the pointers as nessesary.


Actually the printout is somewhat missleading...it imports NOP as EA Only...its just it was easier to format with printf....so no worries entries are the length they should be in the rom when you re-import in...
Sukasa
Posts: 407/1981
Wow. Good job. I will be able to use this well. All I could suggest is to make it a win32 App and when you reimport the code, only add zeros when you need to, not just to make 4-byte entries for the instructions, kinda like this:

C2 20 00 00 | REP #$20
A2 00 04 00 | LDX #$04
AC 84 0D 00 | LDY $0D84
F0 1F 00 00 | BEQ $1F
A0 00 86 00 | LDY #$86
8C 21 21 00 | STY $2121
A9 00 22 00 | LDA #$2200
8D 20 43 00 | STA $4320
AD 82 0D 00 | LDA $0D82
8D 22 43 00 | STA $4322
A0 00 00 00 | LDY #$00
8C 24 43 00 | STY $4324
A9 14 00 00 | LDA #$0014
8D 25 43 00 | STA $4325
8E 0B 42 00 | STX $420B
EA 00 00 00 | NOP

Becomes

C2 20 | REP #$20
A2 00 04 | LDX #$04
AC 84 0D | LDY $0D84
F0 1F | BEQ $1F
A0 00 86 | LDY #$86
8C 21 21 | STY $2121
A9 00 22 | LDA #$2200
8D 20 43 | STA $4320
AD 82 0D | LDA $0D82
8D 22 43 | STA $4322
A0 00 | LDY #$00
8C 24 43 | STY $4324
A9 14 00 | LDA #$0014
8D 25 43 | STA $4325
8E 0B 42 | STX $420B
EA | NOP

And the just repair the pointers as nessesary.
gnkkwinrrul
Posts: 620/647
Whew, thank god its easier now. The earlier version was too complicated ;;
Tweaker
Posts: 17/57
Ah, I understand now. Very handy.

Will you be providing locations for certain portions of code? For example, if I wanted to edit the properties of Mario's jump, do you have the location of that programming? Stuff like that. This will be very handy to me in the future though.
HabsoluteFate
Posts: 145/179
Originally posted by Tweaker
Will this tool disassemble even already edited ROMs? I see the logic behind how it works, I'm just not sure how you have it disassmble the source, that's all.


I'm not too sure what you mean but its main purpose is to diassemble only a portion of a ROM such as a single sub routine.
For example you could disassemble a sub routine, edit it to do anything you want it to do using an editor and re-assemble it into the ROM...although because odds are the size of the sub routine would change you wouldnt be able to put it back into the same location of the ROM. Here is an example export & import, in this example i exported the source code, added a NOP in the middle of the sub routine, and imported the new source code at the first available location i could manually find:


Super Mario World Development Environment V0.2
Please enter ROM File Name: smw.smc
ROM File Name: smw.smc
Type exit (lower case) at any time to exit

Select one of the following options:
0. Exit
1. Export code/data chunk from ROM as Binary to a new file
2. Import code/data chunk from Binary to ROM
3. Copy/Move code/data from one location of the ROM to another
4. Clear/Replace code/data within rom with Repeating Op Code
5. Export Assembly Source Code from ROM to file
6. Import Assembly Source Code from file to ROM
5

Please enter File Name to Export to: smw.asm

The file smw.asm exists. Overwrite? y/n
y
Please enter Bank number to export from: 0

Please enter Address within Bank to export from: 0xA300

Please enter number of bytes to export: 143

Initial Processor Status Register Value (Hint:0,16,32,48): 48
Rom: smw.smc
Output File: smw.asm
Bank: 0x0
Start Address: 0xA300
Number of Bytes to Export: 143
Processor Status Register: 00110000

Export Completed.

Type exit (lower case) at any time to exit

Select one of the following options:
0. Exit
1. Export code/data chunk from ROM as Binary to a new file
2. Import code/data chunk from Binary to ROM
3. Copy/Move code/data from one location of the ROM to another
4. Clear/Replace code/data within rom with Repeating Op Code
5. Export Assembly Source Code from ROM to file
6. Import Assembly Source Code from file to ROM
6

Please enter File Name to Import from: smw.asm

Please enter Bank number to import to: 0xF

Please enter Address within Bank to import to: 0xF7D4

Please enter number of lines to import (0=Entire File): 0

Initial Processor Status Register Value (Hint:0,16,32,48): 48
Input File: smw.asm
Rom: smw.smc
Bank: 0xF
Start Address: 0xF7D4
Number of Lines to Import: 0Processor Status Register: 00110000
Source Code Imported:
C2 20 00 00 | REP #$20
A2 00 04 00 | LDX #$04
AC 84 0D 00 | LDY $0D84
F0 1F 00 00 | BEQ $1F
A0 00 86 00 | LDY #$86
8C 21 21 00 | STY $2121
A9 00 22 00 | LDA #$2200
8D 20 43 00 | STA $4320
AD 82 0D 00 | LDA $0D82
8D 22 43 00 | STA $4322
A0 00 00 00 | LDY #$00
8C 24 43 00 | STY $4324
A9 14 00 00 | LDA #$0014
8D 25 43 00 | STA $4325
8E 0B 42 00 | STX $420B
EA 00 00 00 | NOP
A0 00 80 00 | LDY #$80
8C 15 21 00 | STY $2115
A9 01 18 00 | LDA #$1801
8D 20 43 00 | STA $4320
A9 F0 67 00 | LDA #$67F0
8D 16 21 00 | STA $2116
AD 99 0D 00 | LDA $0D99
8D 22 43 00 | STA $4322
A0 00 7E 00 | LDY #$7E
8C 24 43 00 | STY $4324
A9 20 00 00 | LDA #$0020
8D 25 43 00 | STA $4325
8E 0B 42 00 | STX $420B
A9 00 60 00 | LDA #$6000
8D 16 21 00 | STA $2116
A2 00 00 00 | LDX #$00
BD 85 0D 00 | LDA $0D85,x
8D 22 43 00 | STA $4322
A9 40 00 00 | LDA #$0040
8D 25 43 00 | STA $4325
A0 00 04 00 | LDY #$04
8C 0B 42 00 | STY $420B
E8 00 00 00 | INX
E8 00 00 00 | INX
EC 84 0D 00 | CPX $0D84
90 E8 00 00 | BCC $E8
A9 00 61 00 | LDA #$6100
8D 16 21 00 | STA $2116
A2 00 00 00 | LDX #$00
BD 8F 0D 00 | LDA $0D8F,x
8D 22 43 00 | STA $4322
A9 40 00 00 | LDA #$0040
8D 25 43 00 | STA $4325
A0 00 04 00 | LDY #$04
8C 0B 42 00 | STY $420B
E8 00 00 00 | INX
E8 00 00 00 | INX
EC 84 0D 00 | CPX $0D84
90 E8 00 00 | BCC $E8
E2 20 00 00 | SEP #$20
60 00 00 00 | RTS

Imported 57 line(s).

Type exit (lower case) at any time to exit

Select one of the following options:
0. Exit
1. Export code/data chunk from ROM as Binary to a new file
2. Import code/data chunk from Binary to ROM
3. Copy/Move code/data from one location of the ROM to another
4. Clear/Replace code/data within rom with Repeating Op Code
5. Export Assembly Source Code from ROM to file
6. Import Assembly Source Code from file to ROM





the spot that has the NOP inserted within the actual .asm file looks like this:
STX $420B
NOP
LDY #$80

To keep it short this above example only includes the line before and after where i
inserted the NOP. Obviously you would use this to make much bigger changes than a simple NOP
Tweaker
Posts: 16/57
Will this tool disassemble even already edited ROMs? I see the logic behind how it works, I'm just not sure how you have it disassmble the source, that's all.
HabsoluteFate
Posts: 144/179
Version 0.2 of the Super Mario World Development Environment has been released:
https://sourceforge.net/project/showfiles.php?group_id=125248&package_id=148369&release_id=320496

The following new features have been added since version 0.1:
. Copy or move a chunk of code/data from one location of the ROM to another
. When selecting a Length of 0 during imports the entire file is imported
. Command line tool is now interactive and easier to use
. Deassemble (Export) chunk of data from ROM to Source File (.asm)
. Assemble (Import) chunk of data from source File (.asm) to ROM

Release notes can be found here:
https://sourceforge.net/project/shownotes.php?release_id=320496

You can download the program here:
http://prdownloads.sourceforge.net/smwdev/SMWDevEnv0.2Binary.zip?download
If you want the program with the source code download it here:
http://prdownloads.sourceforge.net/smwdev/SMWDevEnv0.2Src.zip?download

For those downloading the source code yes I realise the code is messy!

What's next? I'm not too sure but i would like to get back to the power up tool i was working on before...i should be able to edit code much more quickly now that
the SMWDE can allow me to export/import as actually .asm source code.

If anyone wants to help (perhaps in designing a website for it) it would be much
much apreciated. Thank you!

The thread for version 0.1 can be found here:
http://board.acmlm.org/thread.php?id=10999
Acmlm's Board - I2 Archive - Super Mario World hacking - SMW Dev Env V0.2 Released Import/Export Actual Source Code


ABII


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



Page rendered in 0.005 seconds.