Commit Graph

558 Commits

Author SHA1 Message Date
yenatch
0b8c5ef75b Finish off make target for png generation
Now any existing lz files are converted to 2bpp, and all 2bpp files
are converted to png.
2013-02-11 17:59:43 -05:00
yenatch
98d8914b62 better dimension handling in 2bpp->png 2013-02-11 04:13:36 -05:00
yenatch
d1172e1fb6 Add build target to mass-generate pngs from 2bpp files 2013-02-11 04:13:36 -05:00
yenatch
80600f9291 Infrastructure to dump pngs for 2bpp graphics 2013-02-11 04:12:59 -05:00
yenatch
e7762890aa Don't try to convert empty 2bpp files
Also, make non-square images 1 tile wide
Minor path fixes and cleanup
2013-02-09 06:26:09 -05:00
yenatch
70280c0c3f Add some command-line interfaces for use w/ makefile
Extras:
-function to dump trainer pals
-fix testing leftover in a compression function
-keep load_rom() from getting in the way (relative address breaks extras)
2013-02-09 04:36:36 -05:00
yenatch
da205909c0 implement png import/export
palette export works fine, but palette import is disabled for now
2013-02-07 21:03:19 -05:00
yenatch
4d44c2c0e6 Condense pic dimensions table 2013-02-06 02:09:57 -05:00
Bryan Bishop
57200b6cf7 simplify load_rom in gbz80disasm 2013-02-03 15:18:06 -06:00
Bryan Bishop
82b8b5121a enable labels in gbz80disasm
fixes #102
2013-02-03 15:10:14 -06:00
Bryan Bishop
73c374a366 README: fix testing instructions 2013-01-27 19:22:12 -06:00
Bryan Bishop
eb6cb9812d dump_sections - tool to dump a skeleton asm file 2013-01-27 19:10:42 -06:00
Bryan Bishop
9a29def250 basic type_constants data 2013-01-27 17:46:48 -06:00
Bryan Bishop
fd6bb7de55 various formatting fixes for crystal.py 2013-01-27 17:33:25 -06:00
Bryan Bishop
5b2848b419 replace wildcard import with explicit import 2013-01-27 17:20:41 -06:00
Bryan Bishop
edee13391d add character encoding header in pksv.py 2013-01-27 17:17:45 -06:00
Bryan Bishop
9e9c37f577 py26 fix for RomStr.load_labels (json) 2013-01-27 17:14:59 -06:00
Bryan Bishop
db5208b41f make gbz80disasm work with python2.6 again
There was an incompatible change to the json module api between py26 and
py27, causing gbz80disasm to not work with py26. The fix is to simply
alias the new loads method to the old read function.

A possibly better plan might be to not support py26 at all.
2013-01-27 17:13:18 -06:00
Bryan Bishop
00a2e4e119 pedantic formatting changes for pointers.py 2013-01-27 17:08:14 -06:00
Bryan Bishop
3b7089411b add character encoding headers to other files 2013-01-27 17:07:32 -06:00
Bryan Bishop
12c06174d8 fix headers and imports in labels.py 2013-01-27 17:05:52 -06:00
Bryan Bishop
47a828c1dc set character encoding header in interval_map.py 2013-01-27 17:05:17 -06:00
Bryan Bishop
74a4d65884 fix imports in graph.py
Although graph.py never used DisAsm, it was still trying to import the
deprecated class. Removed.
2013-01-27 17:03:51 -06:00
Bryan Bishop
26ed5760a2 fix header comments in graph.py 2013-01-27 17:03:00 -06:00
Bryan Bishop
f22bbdd722 remove a duplication of load_rom and load_asm 2013-01-27 17:00:51 -06:00
Bryan Bishop
0ee57e94db clean up lousy headers in comparator.py 2013-01-27 16:56:31 -06:00
Bryan Bishop
59d0c6bc03 better import syntax in comparator.py 2013-01-27 16:55:52 -06:00
Bryan Bishop
4dfb8d3b09 better import syntax in crystal.py 2013-01-27 16:54:58 -06:00
Bryan Bishop
ac47399e66 remove extra whitespace in gbz80disasm 2013-01-27 16:52:20 -06:00
Bryan Bishop
00f1b71cd4 remove a broken, unfinished disassembler (DisAsm)
This removes DisAsm from romstr.py, which was the only reason that
gbz80disasm wasn't able to import RomStr from romstr.py.

DisAsm was an experimental gbz80 disassembler that was meant to replace
gbz80disasm eventually. The goals were to write cleaner code and write
more unit tests. But it never worked and the code quality looks close to
being the same as gbz80disasm anyway.
2013-01-27 16:49:35 -06:00
Bryan Bishop
a1579ab519 allow unicode addresses in RomStr.to_asm 2013-01-27 16:46:52 -06:00
Bryan Bishop
500d47f4cc add character encoding header in gbz80disasm.py 2013-01-27 16:43:03 -06:00
Bryan Bishop
4e1e9ed229 include character encoding header in romstr.py 2013-01-27 16:42:23 -06:00
Bryan Bishop
8f4b5dae2a better formatting for romstr imports 2013-01-27 16:41:35 -06:00
Bryan Bishop
5eb81b07f3 RomStr doesn't need deepcopy 2013-01-27 16:40:09 -06:00
Bryan Bishop
86150b0f8a commentify report_untested 2013-01-27 16:37:48 -06:00
Bryan Bishop
bc167bedb7 fix label imports in tests 2013-01-27 16:34:21 -06:00
Bryan Bishop
44db66e13e fix AsmList import in tests 2013-01-27 16:32:52 -06:00
Bryan Bishop
564a1b5874 fix pksv imports in tests 2013-01-27 16:30:27 -06:00
Bryan Bishop
50ae458b08 fix calculate_pointer in tests 2013-01-27 16:29:30 -06:00
Bryan Bishop
f8b1695b54 split out more item_constants stuff
Some of the item_constants functions are now placed in
item_constants.py, and the unit tests now import from that file rather
than from crystal.py for those functions.
2013-01-27 16:27:41 -06:00
Bryan Bishop
35682de426 split out tests into a separate file 2013-01-27 07:22:31 -06:00
Bryan Bishop
a826951adb fix label generator
Recently the bank lines were changed to use lowercase characters,
breaking the generator for "labels.json".
2013-01-23 18:32:23 -06:00
yenatch
cd0f717305 update gfx.py to reflect new structure 2013-01-22 05:01:21 -05:00
Bryan Bishop
0a54ce9e75 clean up python script imports 2013-01-15 16:20:10 -06:00
Bryan Bishop
80781e56f0 remove the Size class (unused) 2013-01-15 16:15:25 -06:00
Bryan Bishop
536df0787f split out IntervalMap into a separate file 2013-01-15 16:12:26 -06:00
Bryan Bishop
7a33b66ab4 Merge pull request #86 from yenatch/master
3jumptext is an ender.
2013-01-14 20:44:07 -08:00
yenatch
669c461ad8 forgot to make 3jumptext an ender 2013-01-14 23:19:31 -05:00
Bryan Bishop
e09aff7715 Merge pull request #85 from yenatch/master
More script commands.
2013-01-14 19:25:54 -08:00
yenatch
28b565a01c add missing script command (3jumptext) 2013-01-14 21:44:47 -05:00
Bryan Bishop
df680fde38 Merge pull request #84 from yenatch/master
make script parsing less terrible
2013-01-14 01:48:24 -08:00
yenatch
acd6d354c8 banish script parser output to debug 2013-01-14 03:15:47 -05:00
IIMarckus
818a82a20e Fix typo. 2013-01-13 16:12:25 -07:00
yenatch
9fbe7ea423 make careless use of gfx.py less fatal 2013-01-13 00:40:13 -05:00
yenatch
238f406024 implement rgb macro for palettes 2013-01-13 00:38:48 -05:00
yenatch
e59a7c8d6f add symfile generation 2013-01-10 03:00:46 -05:00
yenatch
2cdf7a3688 include all compressed and decompressed graphics
* frontpics & animation tiles
* backpics
* trainer pics
* attack animation gfx
* intro gfx
* intro tilemaps
* title gfx
* tilesets
* player backpic
* dude backpic
* pokegear/town map

fixes #33, #34 and #35
2013-01-04 04:08:13 -06:00
yenatch
e91f41dd35 allow other files to import gfx.py 2013-01-02 04:37:45 -05:00
yenatch
3e953ad7b6 make gfx.py more convenient from command line 2013-01-01 16:31:05 -05:00
Bryan Bishop
98c1d9d09d Merge pull request #51 from yenatch/master
Image compression/decompression.
2012-12-31 20:10:43 -08:00
yenatch
a3fe9c00d0 decompress all known gfx 2012-12-31 22:53:40 -05:00
Bryan Bishop
da8b1e06e5 clean up whitespace 2012-12-28 12:37:58 -06:00
Bryan Bishop
3b20ea2916 Merge remote branch 'remotes/yenatch/master'
fixes #49
2012-12-23 02:57:21 -06:00
IIMarckus
19ce6e7a74 specialphonecall takes a 16‐bit ID. 2012-12-17 21:00:41 -07:00
Bryan Bishop
531ccfb5f6 update gbz80disasm to not use $ff00+$ff syntax 2012-12-16 09:16:04 -06:00
padz
3bae3a5313 make gbz80disasm easier to use externally 2012-12-14 02:47:13 -05:00
Bryan Bishop
671e2b1289 md5 -> hashlib 2012-11-30 10:17:23 -06:00
Bryan Bishop
a1a9fa5560 move allowed_lengths for music macros out
This moves the allowed_lengths setting out of the preprocessor. Special
cases should not be hardcoded in the preprocessor.
2012-11-30 09:54:02 -06:00
padz
3626ddebd1 implement music macros; INCLUDE injection in pre 2012-11-30 05:58:00 -05:00
padz
1b54f73323 play nice w/ cygwin; undeprecate used command 2012-11-15 02:33:02 -05:00
Bryan Bishop
69c0125112 remove deprecated functions from crystal.py 2012-10-11 19:05:49 -05:00
Bryan Bishop
82f7e98306 get an address given a label 2012-10-11 18:52:54 -05:00
Bryan Bishop
e6c95e22c9 clean up comments in extras/crystal.py
This fixes the inconsistent comment formatting throughout the file.

There should be a space between the comment token and the comment
message, otherwise this file is less fun to read.
2012-10-01 13:11:52 -05:00
Bryan Bishop
e1ff7f98de generate labels.json automagically in gbz80disasm 2012-09-10 22:30:58 -05:00
Bryan Bishop
d23972b7a3 call load_asm in scan_for_predefined_labels 2012-09-10 22:30:58 -05:00
Bryan Bishop
0c3ba03d37 Merge pull request #22 from iimarckus/decimal1
Decimal1
2012-07-08 23:25:49 -07:00
IIMarckus
fa019d2f51 Add some functions from Mobile Stadium. 2012-07-07 19:51:02 -06:00
Bryan Bishop
6f8c3e5c3e use decimal output for givepoke in extras/crystal.py 2012-07-05 10:25:33 -05:00
Bryan Bishop
b85d9b86ad use os.path.join instead of cowboying it 2012-07-01 08:55:21 -05:00
Bryan Bishop
86cb61dbe8 make pokecrystal compatible with python2.6 by default 2012-07-01 08:48:27 -05:00
Bryan Bishop
58c696cfd3 use extras/labels.json and not ./labels.json in romstr.py 2012-07-01 08:44:20 -05:00
Bryan Bishop
85d26e31a5 better graph-generating routines 2012-07-01 08:41:38 -05:00
Bryan Bishop
fcf43b13da fix romstr for compiling (thanks pasky) 2012-07-01 08:41:14 -05:00
Bryan Bishop
3359121ba7 graph.py - parse pokecrystal into a function graph for d3.js 2012-06-21 03:37:13 -05:00
Bryan Bishop
e471fbeb32 continue at relative jumps and fix formatting 2012-06-20 21:13:24 -05:00
Bryan Bishop
36eb6c726a use labels in the disassembler output 2012-06-20 01:51:23 -05:00
Bryan Bishop
099295bb3d load labels into the new disassembler 2012-06-20 01:42:48 -05:00
Bryan Bishop
1342ab67db more de-dependency-looping 2012-06-20 01:42:33 -05:00
Bryan Bishop
ca07f1d64c move code around to avoid dependency loops 2012-06-20 01:13:15 -05:00
Bryan Bishop
e2babd69fb use romstr.py as the new disassembler 2012-06-19 23:59:49 -05:00
Bryan Bishop
96596c6944 asm output for the new disassembler 2012-06-19 23:42:12 -05:00
Bryan Bishop
96ca472fc9 implement a formatted-with-labels version of the opcode line 2012-06-19 22:54:20 -05:00
Bryan Bishop
9a4158462b remove debug lines 2012-06-19 22:40:38 -05:00
Bryan Bishop
132182e263 super duper disassembler fixes 2012-06-19 22:12:52 -05:00
Bryan Bishop
4b7ca69344 advance forward when disassembling the rom 2012-06-14 21:54:25 -05:00
Bryan Bishop
b19db1e604 broken disassembler 2012-06-10 22:55:05 -05:00
Bryan Bishop
cd60a1f0e4 backtracking and labeling for the disassembler 2012-06-10 18:26:18 -05:00
Bryan Bishop
10a5a6518d somewhat improved disassembler 2012-06-10 12:24:33 -05:00
Bryan Bishop
3233cead33 sleepy disassembling 2012-06-07 01:37:55 -05:00
Bryan Bishop
4ccfe27e4a more awful code for the new disassembler 2012-06-07 01:24:38 -05:00
Bryan Bishop
7dd0c86a6b almost complete new disassembler version 2012-06-07 01:07:48 -05:00
Bryan Bishop
0768fead4f more cleaning 2012-06-06 21:04:40 -05:00
Bryan Bishop
c79db81d43 remove more code cruft 2012-06-06 21:00:30 -05:00
Bryan Bishop
48b2237b82 remove some code cruft from gbz80disasm 2012-06-06 20:43:02 -05:00
Bryan Bishop
315edbe14b get RomStr from romstr.py in gbz80disasm 2012-06-06 20:26:02 -05:00
Bryan Bishop
9144706510 make unittest2 error show up in stderr 2012-06-02 11:42:09 -05:00
Bryan Bishop
376f65a4fd temporarily disable label-usage (find_label) in gbz80disasm 2012-05-31 02:02:41 -05:00
Bryan Bishop
8add342a85 find functions based on first few similar bytes 2012-05-31 02:02:23 -05:00
Bryan Bishop
e954781618 hooray PrintNumber_PrintLeadingZero is also shared 2012-05-29 15:04:19 -05:00
Bryan Bishop
53b0dd13a8 comparator.py - find shared functions between pokered/pokecrystal 2012-05-29 14:50:56 -05:00
Bryan Bishop
d174c8b7c6 fix up AsmSection and line_has_comment_address 2012-05-29 14:50:35 -05:00
Bryan Bishop
0edf9eb8b8 move AsmList into romstr.py too 2012-05-29 13:19:02 -05:00
Bryan Bishop
ee7d39bf04 move RomStr into a shared file 2012-05-29 13:08:43 -05:00
Bryan Bishop
0aecb683a0 use map constants for wildmons sections 2012-05-28 10:30:45 -05:00
Bryan Bishop
a9b0eb4d87 update to_asm on MapHeader to use the BANK macro 2012-05-28 09:51:49 -05:00
Bryan Bishop
5e37b9a97f insert all map connections 2012-05-28 00:16:38 -05:00
Bryan Bishop
2fe10a6682 don't use any particular formula for strip-destination west/east 2012-05-27 23:50:18 -05:00
Bryan Bishop
7d9552b5fa fix typo in strip destination pointer (north) calculations 2012-05-27 20:02:34 -05:00
Bryan Bishop
d48ce59997 do all the connection to_asm output 2012-05-27 19:45:44 -05:00
Bryan Bishop
da74952bf7 asm output for strip pointer formulas 2012-05-27 18:24:09 -05:00
Bryan Bishop
5b59d0776b better formulas for strip_destination and window 2012-05-27 15:54:44 -05:00
Bryan Bishop
a32c6d0aa4 improve formulas for calculating strip_pointer 2012-05-27 13:46:58 -05:00
Bryan Bishop
56e0795d0d better equations for calculating strip_pointer in connections 2012-05-27 12:51:53 -05:00
Bryan Bishop
fbaadd97ac some broken code 2012-05-26 23:13:48 -05:00
Bryan Bishop
3a614ddcea east connections? 2012-05-26 22:19:53 -05:00
Bryan Bishop
30695eec25 fix MainText/PokedexText interaction 2012-05-26 16:10:11 -05:00
Bryan Bishop
d88ea77cfa start to parse the connection data 2012-05-26 14:46:34 -05:00
Bryan Bishop
6074a55e3d minor whitespace fix 2012-05-24 22:01:50 -05:00
Bryan Bishop
64f52b32ef fix more height/weight confusion and whitespacing 2012-05-23 19:40:12 -05:00
Sanky
765b555b47 Dumped Pokédex data and entries. 2012-05-24 02:33:42 +02:00
Bryan Bishop
4ec6dfc5fe fix PokedexText? 2012-05-23 18:15:48 -05:00
Bryan Bishop
38eae01fcd fix PokedexText 2012-05-23 17:56:34 -05:00
Bryan Bishop
1663472cf6 quick fix for PokedexText 2012-05-23 17:39:30 -05:00
Bryan Bishop
0c778f2930 use PokedexText to parse text-script-like text without the first bash command 2012-05-23 17:38:15 -05:00
IIMarckus
bd1760f3f9 Use Pokémon IDs for the “cry” macro. 2012-05-22 19:57:09 -06:00
Bryan Bishop
4b2d26965e dump-insert the stringtotext targets 2012-05-22 11:57:00 -05:00
Bryan Bishop
2567957692 use EncodedText for stringtotext params 2012-05-22 11:50:25 -05:00
Bryan Bishop
cb5eae3e9d check if trainer_names has been set yet before using that key 2012-05-22 11:44:42 -05:00
Bryan Bishop
c16d796c27 add '@' to EncodedText output 2012-05-22 11:38:57 -05:00
Bryan Bishop
05686167d7 SUPERNERD -> SUPER_NERD in trainer constants 2012-05-21 08:39:11 -05:00
Bryan Bishop
e517b30a14 at least try to keep HoOh in tact in label names 2012-05-21 01:38:11 -05:00
Bryan Bishop
7641b53a6a fix line continuation syntax error 2012-05-21 01:35:45 -05:00
Bryan Bishop
9ea35422f8 add trainer id to trainer fragment headers for grunts 2012-05-21 01:34:21 -05:00
Bryan Bishop
377a212322 improvements to map_name_cleaner 2012-05-21 01:31:26 -05:00
Bryan Bishop
ba72006077 add the labels to the scripts, not to the params pointing to scripts 2012-05-20 14:32:19 -05:00
Bryan Bishop
a34d4621ee better signpost labeling 2012-05-20 14:23:13 -05:00
Bryan Bishop
61d3b8a6b4 use better label for MapEventHeader 2012-05-20 09:56:27 -05:00
Bryan Bishop
a27a7f2892 reuse pre-existing/pre-inserted MapBlockData objects when possible 2012-05-20 09:37:43 -05:00
Bryan Bishop
2c73f020a6 make map header labels use better rules 2012-05-20 09:32:59 -05:00