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

Red Paratroopa
Level: 23

Posts: 144/179
EXP: 58525
For next: 9198

Since: 03-15-04
From: Ottawa, Ontario, Canada

Since last post: 10 days
Last activity: 2 days
Posted on 04-15-05 04:01 AM Link | Quote
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



(edited by HabsoluteFate on 04-14-05 11:12 AM)
(edited by HabsoluteFate on 04-14-05 11:13 AM)
(edited by HabsoluteFate on 04-14-05 11:14 AM)
Tweaker

Red Paragoomba
Level: 12

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

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

Since last post: 25 days
Last activity: 13 days
Posted on 04-15-05 04:57 AM Link | Quote
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

Red Paratroopa
Level: 23

Posts: 145/179
EXP: 58525
For next: 9198

Since: 03-15-04
From: Ottawa, Ontario, Canada

Since last post: 10 days
Last activity: 2 days
Posted on 04-15-05 05:28 AM Link | Quote
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

Red Paragoomba
Level: 12

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

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

Since last post: 25 days
Last activity: 13 days
Posted on 04-15-05 05:33 AM Link | Quote
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.
gnkkwinrrul

Dry Bones
Level: 39

Posts: 620/647
EXP: 402054
For next: 2717

Since: 03-15-04
From: LYKEOMGIMFROMSOMEPLACE????

Since last post: 81 days
Last activity: 40 days
Posted on 04-15-05 05:35 AM Link | Quote
Whew, thank god its easier now. The earlier version was too complicated ;;
Sukasa

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

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

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

Since last post: 6 days
Last activity: 1 day
Posted on 04-16-05 05:21 AM Link | Quote
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.
HabsoluteFate

Red Paratroopa
Level: 23

Posts: 146/179
EXP: 58525
For next: 9198

Since: 03-15-04
From: Ottawa, Ontario, Canada

Since last post: 10 days
Last activity: 2 days
Posted on 04-16-05 05:32 AM Link | Quote
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...
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 1143/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 04-16-05 05:37 AM Link | Quote
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
Sukasa

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

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

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

Since last post: 6 days
Last activity: 1 day
Posted on 04-16-05 05:48 AM Link | Quote
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.


(edited by Darkflight on 04-15-05 01:07 PM)
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 1144/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 04-16-05 05:56 AM Link | Quote
woah...triple post O_o....anyway.......why not just make a frontend? that should work.
DisruptiveIdiot

Paratroopa
Level: 21

Posts: 66/147
EXP: 42614
For next: 7329

Since: 04-09-04

Since last post: 4 days
Last activity: 5 hours
Posted on 04-16-05 06:58 AM Link | Quote
I heard a printf comment in there

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

Red Paratroopa
Level: 23

Posts: 147/179
EXP: 58525
For next: 9198

Since: 03-15-04
From: Ottawa, Ontario, Canada

Since last post: 10 days
Last activity: 2 days
Posted on 04-16-05 05:38 PM Link | Quote
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



(edited by HabsoluteFate on 04-16-05 12:38 AM)
(edited by HabsoluteFate on 04-16-05 12:39 AM)
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: 4220/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 04-17-05 10:22 AM Link | Quote
I suggest you just have it print blank for non-existant bytes, like:
EA .. .. .. | NOP
But spaces instead of dots.
Parasyte

Bullet Bill
Level: 35

Posts: 439/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 04-17-05 12:46 PM Link | Quote
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?
Sukasa

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

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

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

Since last post: 6 days
Last activity: 1 day
Posted on 04-17-05 11:24 PM Link | Quote
No, I think that Super Mario World Development Environment would work on any SNES ROM with the right pointers supplied to it.
HabsoluteFate

Red Paratroopa
Level: 23

Posts: 148/179
EXP: 58525
For next: 9198

Since: 03-15-04
From: Ottawa, Ontario, Canada

Since last post: 10 days
Last activity: 2 days
Posted on 04-17-05 11:51 PM Link | Quote
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

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

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

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

Since last post: 6 days
Last activity: 1 day
Posted on 04-18-05 12:04 AM Link | Quote
Or, why not make the SMWDE, but also supply an earlier version for other ROMS called "SNDE"?
HabsoluteFate

Red Paratroopa
Level: 23

Posts: 149/179
EXP: 58525
For next: 9198

Since: 03-15-04
From: Ottawa, Ontario, Canada

Since last post: 10 days
Last activity: 2 days
Posted on 04-19-05 10:19 AM Link | Quote
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).
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
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.020 seconds.