Commit Graph

44 Commits

Author SHA1 Message Date
yenatch
2896cb93d4 gbz80disasm: just use lowercase labels 2013-06-25 04:04:19 -04:00
yenatch
91f7c123f4 gbz80disasm: fix data handling
get the scalpel out of there
2013-06-25 03:57:49 -04:00
yenatch
6630406043 gbz80disasm: local/global address conversion + fix find_label 2013-06-25 03:55:38 -04:00
yenatch
7804dedce4 gbz80disasm: detect data tables referenced in asm 2013-06-25 03:43:58 -04:00
yenatch
e199aaa8fd gbz80disasm: data detection
the is_data flag never did anything. now it does

encountering the end of a branch with outstanding labels will read anything between said labels as data
2013-06-25 03:24:38 -04:00
yenatch
dfb2416192 gbz80disasm: fix labels outside of banks 0 and 1 2013-06-15 14:11:50 -04:00
yenatch
2f21ff4ef5 gbz80disasm: only use gbhw/hram constants >= 0xff00 2013-06-14 02:19:35 -04:00
yenatch
399925fff5 gbz80disasm: rgbds uses brackets for ld hl, sp+x 2013-05-21 16:43:54 -04:00
Bryan Bishop
f10019710f load labels only once in gbz80disasm 2013-05-17 15:58:47 -05:00
yenatch
5521aa5ce0 gbz80disasm: include comments on unresolved backward relative jumps 2013-05-15 14:57:04 -04:00
yenatch
b38e287409 gbz80disasm: don't look for outstanding labels that are behind the origin 2013-05-15 14:40:20 -04:00
yenatch
a6fee3622a gbz80disasm: don't include comments on relative jumps 2013-05-15 14:39:43 -04:00
yenatch
81e42e41da gbz80disasm: reti is an ender 2013-05-15 14:39:43 -04:00
yenatch
3cf6603b45 gbz80disasm: space out blocks of asm 2013-05-15 14:39:42 -04:00
yenatch
82d723840b gbz80disasm: clean up $ff00+x handling 2013-05-15 14:39:19 -04:00
yenatch
1bdcac1fe1 gbz80disasm: read labels from wram/gbhw/hram 2013-05-14 21:01:46 -04:00
yenatch
aed0202999 gbz80disasm: bank 1 was being read as bank 0 2013-05-14 18:18:07 -04:00
yenatch
5b95c5aad7 transition gbz80disasm to use a bytearray instead of RomStr 2013-05-14 14:38:57 -04:00
yenatch
313e853e39 remove redundant code from find_label in gbz80disasm 2013-05-14 13:56:34 -04:00
yenatch
b9bd11e34d fix bank-checking for labels in gbz80disasm
bank 1 is not fixed like bank 0
2013-05-14 13:46:38 -04:00
Sanky
d01369178b make gbz80disasm understand bank:offset syntax 2013-05-08 01:21:55 +02:00
Bryan Bishop
01e10a11b2 update gbz80disasm for handling known fall-throughs
When disassembling a group of functions, sometimes there are other
functions known in advance. By passing in a list called stop_at to
gbz80disasm, it is possible to prevent disassembled asm from running on
for longer than necessary.
2013-02-27 21:41:03 -06:00
Bryan Bishop
381d3e76b7 include_last_address for disassembler
This is an extra option that is on by default for gbz80disasm, which is
useful in situations where you may not want the last address to be
included (like if the output of the disassembler is going to be sent to
to_asm anyway).
2013-02-27 20:03:18 -06: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
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
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
500d47f4cc add character encoding header in gbz80disasm.py 2013-01-27 16:43:03 -06:00
Bryan Bishop
3b20ea2916 Merge remote branch 'remotes/yenatch/master'
fixes #49
2012-12-23 02:57:21 -06: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
padz
1b54f73323 play nice w/ cygwin; undeprecate used command 2012-11-15 02:33:02 -05:00
Bryan Bishop
e1ff7f98de generate labels.json automagically in gbz80disasm 2012-09-10 22:30:58 -05:00
IIMarckus
fa019d2f51 Add some functions from Mobile Stadium. 2012-07-07 19:51:02 -06:00
Bryan Bishop
10a5a6518d somewhat improved disassembler 2012-06-10 12:24:33 -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
376f65a4fd temporarily disable label-usage (find_label) in gbz80disasm 2012-05-31 02:02:41 -05:00
Bryan Bishop
ece37237e3 don't delete tempt_opt_table in gbz80disasm 2012-04-26 00:32:38 -05:00
Bryan Bishop
f20786a432 gbz80disasm for crystal 2012-03-15 17:47:40 -05:00