30 Commits

Author SHA1 Message Date
Paweł Kołodziejski ebbfd826d5 ALL: Upgrade tools licence to GPLv3+ 2022-06-26 19:14:49 +02:00
Thierry Crozat d5c8077933 JANITORIAL: Move copyright notice to a separate file 2014-01-19 18:13:09 +00:00
Thierry Crozat fe2d3c2d71 JANITORIAL: Remove now useless SVN tags 2014-01-06 22:54:34 +00:00
Michael Madsen 94f63dc22b DECOMPILER: Code cleanup
Removes _instFactory and uses class names directly
Reclassify a few opcodes in Kyra, remove now unnecessary checks

svn-id: r55001
2010-12-22 12:15:33 +00:00
Michael Madsen b46bfd791f DECOMPILER: Renaming Instruction classes
To reflect that Instructions with default implementations are aimed at
stack-based engines, I've renamed the affected types and added new ones
to keep a "base" type that other engines can use.

svn-id: r54966
2010-12-19 20:35:57 +00:00
Michael Madsen 6250533ecb DECOMPILER: Option to disable stack effect output
svn-id: r54915
2010-12-14 23:12:10 +00:00
Michael Madsen 4e9914f57e DECOMPILER: Objectify Instruction
*Major* restructuring in this revision.
All other disassemblers will require updates.
Documentation for all of this is coming soon.

svn-id: r54904
2010-12-14 03:14:11 +00:00
Michael Madsen ed2572b845 DECOMPILER: Add typedef for vector of instructions
svn-id: r54848
2010-12-09 22:02:02 +00:00
Johannes Schickel 083c38eb2b Decompiler: Fix compilation.
svn-id: r52024
2010-08-12 03:58:50 +00:00
Michael Madsen f884d729f8 DECOMPILER: Get rid of _disassemblyDone
svn-id: r52022
2010-08-12 00:37:09 +00:00
Michael Madsen 61209d5f62 Pass in instruction vector to disassemblers
Properly fix function detection

svn-id: r51774
2010-08-06 00:11:27 +00:00
Michael Madsen e21f61e8d2 Add option to output unreachable groups
svn-id: r51652
2010-08-02 19:26:46 +00:00
Michael Madsen c0de4b364d Also output parameters to calls in hex
svn-id: r51547
2010-07-31 18:21:22 +00:00
Michael Madsen 08816a24ee Output parameters to jumps in hexadecimal
svn-id: r51530
2010-07-31 01:18:16 +00:00
Michael Madsen 4368143524 Proper handling of stack during grouping
Add net stack effect of instruction to disassembly dump

svn-id: r49674
2010-06-14 22:40:32 +00:00
Michael Madsen ed632043e2 Add missing negations
svn-id: r49611
2010-06-12 21:43:50 +00:00
Michael Madsen e4b4d349d2 Remove some debug output from disassembly dump
svn-id: r49610
2010-06-12 20:39:02 +00:00
Michael Madsen 4eb29f5061 Find stack effect for variable length opcodes in SCUMMv6
Fix parameter list for pickVarRandom
Fix a regression introduced in r49522 for scripts with no instructions:
program would try to read past end of file due to the check used to
prevent repeated disassembly

svn-id: r49608
2010-06-12 19:56:44 +00:00
Michael Madsen e7b6429079 Refactored disassemblers
Disassembler::disassemble and Disassembler::dumpDisassembly are no
longer virtual, but perform the minimal functionality and ensure that
disassembly is performed once and only once. This helps to prevent
incorrect usage and implementation.

svn-id: r49522
2010-06-08 21:41:33 +00:00
Michael Madsen 6f95221c2f Formatting fixes
svn-id: r49515
2010-06-08 20:21:08 +00:00
Michael Madsen 52227426ac Refactored Parameter struct to use boost::variant
svn-id: r49381
2010-06-01 21:20:35 +00:00
Michael Madsen d6f0cc9b1e Fix formatting of license header
svn-id: r49304
2010-05-28 22:28:06 +00:00
Michael Madsen ad16984854 Replace sprintf in Disassembler::dumpDisassembly with Boost.Format
svn-id: r49303
2010-05-28 22:17:24 +00:00
Michael Madsen 6aa8c0e6bd Add short options and allow disassembly dump to stdout
svn-id: r49301
2010-05-28 22:00:43 +00:00
Michael Madsen f81af0fe79 Formatting fixes
svn-id: r49299
2010-05-28 20:43:26 +00:00
Michael Madsen e6ab9fdadd Fix formatting
svn-id: r49291
2010-05-28 11:14:58 +00:00
Michael Madsen d42c7baccc Fixed missing variable initializations and comparison warning
svn-id: r49277
2010-05-27 23:23:33 +00:00
Michael Madsen a3522ff7a5 Tests for SimpleDisassembler
Added cxxtest to project (using svn:externals)
Written test cases for SimpleDisassembler (ticket #2)
Fixed bugs found from tests
Added support for single-precision floating point values as parameters

This completes the last task for Milestone 1: Disassembly framework.
Next milestone: First disassembler (SCUMMv6)

svn-id: r49272
2010-05-27 22:10:25 +00:00
Michael Madsen 6217588546 Simple disassembler, code clean-up
Added a SimpleDisassembler class to provide a wrapper for instruction 
sets with instructions of the form "opcode params".
Cleaned up decompiler driver. Added code for engine-specific 
instantiation (just disassembler for now). Added listing of engines.
Added generic dump to file to Disassembler.
Renamed executable to avoid filename conflict on *nix.
Minor bug fixes.

svn-id: r49252
2010-05-26 22:25:43 +00:00
Michael Madsen fdc0697af3 Restructure disassembly framework
- Change existing class to a much more basic one
- Enhance parameter and instruction definitions
- Add generic object factory to create correct class when engine-specific stuff is needed.

svn-id: r49222
2010-05-25 22:31:16 +00:00