scene.org File Archive

File download

<root>­/­resources­/­tools­/­snes/snes_disassembler.lha

File size:
16 409 bytes (16.02K)
File date:
2021-10-29 05:45:02
Download count:
all-time: 308

Preview

  • magicdis.doc 8.95K
  • magicdis.exe 37.37K

file_id.diz

Hi ho friends! For about one year I've been training SNES games with a
286 TANDY laptop. Simply because DSFX was the only SNES disassembler I
could get my hands on. There have been Amiga disassemblers that supported
65816 code, but none that did correct SNES addressing.
Today I bury my 286 Laptop and lavish in A4000 luxury!
PRESENTING:
 
                        - SUPER MAGIC DISASSEMBLER -
   featuring:
               - 100% Assembly Code
               - Dissassembles SMC files or binary images
               - Supports hi-rom addressing
               - Does not load entire file into ram: SAVES MEMORY!
               - EOR command used for decrytion of text, bytes
               - Save feature for ripping!
               - Trainer possiblity finder!
               - Working on ALL Amiga operating systems!
 
Yes friends, 2 weeks of me programming and you get a fine product.
Based on DSFX, Super Magic Disassembler is easier to use with more
useful features.
 
Instructions:
 
SMD is designed around most machine language monitors I have seen on
C64, Amiga, and IBM platforms. Widely used commands such as D, M, H, T
were used for ease of transition to this new SNES disassembler.

USAGE:
magicdis.exe [FILE]
 
Commands:

 D - Disassemble 65816 code.
     example:
.D 8000
 
 This will start disassembling at $008000. If you were disassembling a 
lo-rom game it would start at the beginning of the file.
 

.D
 
 This will disassemble at the current address.

-----------------------------------------------------------------------------

 T - Show as ASCII Text.
     example:
.T 8000
 This will show 64 ASCII characters per line starting at $008000.


.T
 
 This will show 64 ASCII characters per line at the current address

-----------------------------------------------------------------------------
 
 H - Hunt for bytes.
     example:
.H a2 04 ?? 8e ?? 43
 
 This will scan the entire file for the requested sequence.
 ?? is a wildcard flag, it simply means to includes any digit.
 If any sequence is found, the address it lies at will be printed on
 the screen. To stop hunting, hold down BOTH mouse buttons.

 You are limited to 16 bytes maximum for hunting.

-----------------------------------------------------------------------------

 EOR - Exclusive Or bytes.
     example:
.EOR 30

 This will set internal EOR value to #$30.
 When using T or M commands, the bytes shown on screen will be
 EORd with the set value. This is used for decrypting EORd texts.

-----------------------------------------------------------------------------

 SMC - toggle SMC header
     example:
.SMC
 
 Toggles SMC header. When the disassembler is first run it sets the
 flag to SMC header off. This is used for disassembling standard 
 Super Magicom files.

-----------------------------------------------------------------------------

 S - Save bytes
     example:
.S ram:pan.bin 38000 7fefa
 
  This will save from SNES memory $038000 to $07fefa
  This feature requires you have enough ram. It will calculate
  the amount of bytes to be saved and then allocate the necessary
  memory. Trying to save more bytes than you have free RAM will give you
  an Allocation error.
  If you try to save more bytes than the file contains, or try to
  save past the last byte in the file, the disassembler will save
  starting at the address you've specified to the end of the file. 

-----------------------------------------------------------------------------

 L - Load new file for disassembling
     example:
.L SNES:supermario.smc
 
  This will change the current file to what you've specified.
  If no file is found an error message will be reported back.
  You will not be allowed to disassemble unless a file is 'loaded'.

-----------------------------------------------------------------------------

 F - Find trainer possibilities
    example:
.F 03
 
  This will search the entire file for LDA, STA commands with reference to
 the value #$03. it searches for these patterns:
 a9 xx 8d    (LDA #$XX, STA $YYYY)
 a9 xx 00 8d (LDA #$00XX, STA $YYYY)
 a9 xx 8f    (LDA #$XX, STA $YYYYYY)
 a9 xx 00 8f (LDA #$00XX, STA $YYYYYY)
 a9 xx 85    (LDA #$XX, STA $YY)
 a9 xx 00 85 (LDA #$00XX, STA $YY)
 
 It excludes all registers ($21xx, $42xx, $43xx) to reduce the number
 of possibilities.
 If any match is found, the address will be printed on the screen.

 This option is used only if you are too lazy to use the H command, or
 want early possibilities. An easier way to find trainer options
 would be to use an Action Replay Cartrdidge, but hey, only LAMERS use
 that!

-----------------------------------------------------------------------------

 REP - Changes 16 bit status, acts like 65816 command.
     example:
.REP 30
 
 This instruction is a replacement for the DSFX command REG, which changes
 Accumulator and Index bit length. The problem I didn't like with the DSFX
 REG command was that it worked backwards. For example:
 REG 00 set A, Y, X to 16 bit, while REG 11 set A, X, Y to 8 bit.
 figuring that SNES starts up in 8 bit mode why would 0, which logically
 means NO, NONE, or OFF be used to go into 16 bit mode. Its like turning the
 light switch off and having the lights turn on! Not to mention that you
 had to specify an address to which it would change the status.
 
My REP command works just like the 65816 code. This reduces confusion a bit
since the programmer will be thinking in 65816 code when disassembling.
REP 30 sets A, X, Y to 16 bit
REP 20 sets A to 16 bit
REP 10 sets X, Y to 16 bit

-----------------------------------------------------------------------------

 SEP - Changes 8 bit status, acts like 65826 command.
     example:
.SEP 10
 
 Works exactly like REP above, but sets to 8 bit.

-----------------------------------------------------------------------------

 M - Show hex bytes, ascci characters.
     example:
.M 040000
 
 This will show bytes as hex characters and ascii characters on the screen
 starting at the specified address.

.M
 
 This will show bytes starting at the current address

 This command is universal in ML monitors and is known as 'Modify'
 This disassembler does not change bytes nor modifies, but since this
 command is widely used, I included it without changing it's name.

-----------------------------------------------------------------------------

 ? - Help screen.
     example:
.?

 Shows lists of commands with an example

-----------------------------------------------------------------------------

 I - Internal Nintendo info
     example:
.I

 This will show a block of memory starting at $ffc0 as useful information
 such as reset vectors, irq vectors, brk vectors, game name.

-----------------------------------------------------------------------------

 HROM - Selects Hi-rom addressing
     example:
.HROM           or
.HR
    
 This will change all addressing to HI-ROM for HI-ROM games

-----------------------------------------------------------------------------

 LROM - Selects Lo-rom addressing
     example:
.LROM           or
.LR
 
 This will change all addressing to Lo-rom for normal games

-----------------------------------------------------------------------------
 X - Exit to shell, quit disassembler
    example:

.X

-----------------------------------------------------------------------------

 STAT - Show statitics of REP, SEP, EOR, Lrom/Hrom, current file
    example:
.STAT

-----------------------------------------------------------------------------
 
 RESET - RESETS REP, SEP, EOR, LROM
    example:
.RESET

 Sets:
 SEP 30, EOR 00, LROM
 
 Acts as if you've just execute the disassembler.

-----------------------------------------------------------------------------

 
 Small note:
 
 SNES banks $80 and $00 are exactly the SAME. If you see a program JMPing
 to an address like $808000 it is actually going to bank $00.
 The disassembler assumes all files start at bank $00, therefore if you
 attempt to disassemble address $808000 you may get an end of file error or
 disassemble the wrong address. Same goes with bank $C0 for Hi-Rom.
 If the game uses that bank simply subtract the ammount. If it is $c0 then
 subtract $c0 to get the correct bank ($00). If the bank is $d0 then subtract
 $c0 to get $10. Use this as the bank.
 If perhaps this disassembler becomes popular enough I may fix this in
 a future version.
 
If you like this program then please support the programmer by sending
$1,000,000 to

 -Pan-/ATX
 P.O. Box 0
 Share Ware Sucks, NYC 12345
 
Seriously now, send all bug reports and ideas to my new BBS:
 
DREAMLAND at (718) 381-7504
supporting SNES/SEGA/AMIGA and a SNES coders conference.


                                             -PAN- of ANTHROX
 
Not so impressive things:
 
 - Programming started on Oct 24, 1993 and ended on Nov 5, 1993.
 - I haven't programmed anything on amiga for over 1 1/2 YEARS!
 - This is the first amiga program I ever released!
 - I got a new modem, I got a new modem! And it works!
 - I may see you in Denmark at some party after Christmas.. we'll see!
 - My C64 died yesterday! SNIFF! I'll miss you BOBO!
 - I was abuducted by small grey skinned aliens with huge eyes!