map_block_dumper - create these .blk files

TODO: spit out new INCBIN lines to take advantage of these files.

hg-commit-id: f06654f42d78
This commit is contained in:
Bryan Bishop 2012-01-03 22:26:35 -06:00
parent 67d3093008
commit 39f6ddfa92
218 changed files with 1172 additions and 0 deletions

View file

@ -0,0 +1,46 @@
#!/usr/bin/python
#author: Bryan Bishop <kanzure@gmail.com>
#date: 2012-01-03
#purpose: extract .blk files from baserom.gbc
import extract_maps #rom, assert_rom, load_rom, calculate_pointer, load_map_pointers, read_all_map_headers, map_headers
from pretty_map_headers import map_name_cleaner
from analyze_incbins import offset_to_pointer
import sys
def extract_map_block_data(map_id, savefile=True):
map = extract_maps.map_headers[map_id]
if map["name"] == "FREEZE": return #skip this one
blocksdata_pointer = int(map["map_pointer"], 16)
y = int(map["y"], 16)
x = int(map["x"], 16)
size = x*y
#fetch the data from the rom
blocksdata = extract_maps.rom[blocksdata_pointer:blocksdata_pointer+size]
#clean up the filename and label (for pokered.asm)
cleaned_name = map_name_cleaner(map["name"], None)
label_text = cleaned_name.replace("_h", "Blocks")
filename = cleaned_name.replace("_h", "").lower()
if savefile:
print "Saving ../maps/" + filename + ".blk for map id=" + str(map_id)
fh = open("../maps/" + filename + ".blk", "w")
fh.write(blocksdata)
fh.close()
def get_all_map_blockdata():
for map in extract_maps.map_headers.keys():
extract_map_block_data(map)
if __name__ == "__main__":
#load map headers
extract_maps.load_rom()
extract_maps.load_map_pointers()
extract_maps.read_all_map_headers()
#extract_map_block_data(0)
get_all_map_blockdata()

1
maps/agatha.blk Normal file
View file

@ -0,0 +1 @@
GG6GGg66NeRN6eReg6eeRK6eRgR6hh

4
maps/battlecenterm.blk Normal file
View file

@ -0,0 +1,4 @@


!"#


6
maps/bikeshop.blk Normal file
View file

@ -0,0 +1,6 @@



2
maps/billshouse.blk Normal file
View file

@ -0,0 +1,2 @@

 

4
maps/bruno.blk Normal file
View file

@ -0,0 +1,4 @@


   

28
maps/celadoncity.blk Normal file
View file

@ -0,0 +1,28 @@
lllllllllllllllllllllll
oo
ooo
oooooo
n !UUUU !U !UUUUUUUUUmnhi !hiUhi ! ! ! !Umn7~hi7}~y7:~7~7~7~|rUUUhiUUUUUUUUUUUUUUUUUUUU7::sUUUUUUUUUUUUUUUUUUUUUUUUy0 VwwwwUwwwwUUUUUUUUUNTM ! !U ! !nwUUUUUUUUUgj7:~|~U7~7~nUUUUUUUUUCVwwVwUVwww5nUUUUUUUUUUUUUUUUUUUUUUmn !  ! !UU ! ! ! ! !
n7~7~7~UU7~|~|~7~|~
nUUUUUyUU !UUUUUUUUUUUU
n/7~UUUUUUUUUUUU
n
llllll26llll
nooooooooooooooooo6ooooo

1
maps/celadondiner.blk Normal file
View file

@ -0,0 +1 @@
,*.20 ! - ! 1()

View file

@ -0,0 +1,5 @@

4***C*///3 : : : :9!9!9!99!9!9!98!8!8!8 ()

1
maps/celadongym.blk Normal file
View file

@ -0,0 +1 @@
38:933<3=33;?>3344356344321

2
maps/celadonhotel.blk Normal file
View file

@ -0,0 +1,2 @@



4
maps/celadonhouse.blk Normal file
View file

@ -0,0 +1,4 @@
%      

1
maps/celadonhouse2.blk Normal file
View file

@ -0,0 +1 @@
D@?D BC FG 6A 6

1
maps/celadonmansion1.blk Normal file
View file

@ -0,0 +1 @@
$*   >

1
maps/celadonmansion2.blk Normal file
View file

@ -0,0 +1 @@
' +/ 

2
maps/celadonmansion3.blk Normal file
View file

@ -0,0 +1,2 @@
()#,-
 

1
maps/celadonmansion4.blk Normal file
View file

@ -0,0 +1 @@
E;=!"%&3 

1
maps/celadonmansion5.blk Normal file
View file

@ -0,0 +1 @@
  

1
maps/celadonmart1.blk Normal file
View file

@ -0,0 +1 @@
%    &  

4
maps/celadonmart2.blk Normal file
View file

@ -0,0 +1,4 @@
%      

2
maps/celadonmart3.blk Normal file
View file

@ -0,0 +1,2 @@
$$$$%     

4
maps/celadonmart4.blk Normal file
View file

@ -0,0 +1,4 @@
%     '

1
maps/celadonmart5.blk Normal file
View file

@ -0,0 +1 @@
6;??A6! <C*A6 ! A677777777A

1
maps/celadonmart6.blk Normal file
View file

@ -0,0 +1 @@
*+()

View file

@ -0,0 +1,2 @@
 !"#


View file

@ -0,0 +1 @@
?@@@?>>>>> =

25
maps/ceruleancity.blk Normal file
View file

@ -0,0 +1,25 @@
,,,,,,)CCTN
CCCCCC,,+WWW%CCTPCCCCCC,,)CCCCCC
N
CCCCCC,,)lllll6
mnllllm,,)UUUUUn
mnUUUUmWWp 0  0 111


N\  !
Pkkk
|r 

/\bQQN
tttttt111_NttN ! !ttt_NttN
V|~0 |s0 _NttN_Nttbllll6V2llllllllNttNNttPRRm]nN]MRRRRNtttttm'n
N'Mttttt

1
maps/ceruleangym.blk Normal file
View file

@ -0,0 +1 @@
!#"# 

1
maps/ceruleanhouse2.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/ceruleanhouse3.blk Normal file
View file

@ -0,0 +1 @@
= ==  ,  5

View file

@ -0,0 +1 @@
 ! "

1
maps/ceruleanmart.blk Normal file
View file

@ -0,0 +1 @@
  

View file

@ -0,0 +1,2 @@
 !"#


1
maps/cinnabarisland.blk Normal file
View file

@ -0,0 +1 @@
d !{{ d7:~{yd{{y{{{{{d !{{{{{d7:~ ! !{d{{y|r|s{-{{{{{{{C-kkkkkkkkk

1
maps/cinnibargym.blk Normal file
View file

@ -0,0 +1 @@
@aa@@aAAAADDDYDDDDkcDkckcDDDDDDDPXkcDkcDEDHUDDD,

1
maps/cinnibarmart.blk Normal file
View file

@ -0,0 +1 @@
  

View file

@ -0,0 +1,2 @@
 !"#


1
maps/copycatshousef1.blk Normal file
View file

@ -0,0 +1 @@
  

1
maps/copycatshousef2.blk Normal file
View file

@ -0,0 +1 @@
  

1
maps/daycarem.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/diglettscave.blk Normal file
View file

@ -0,0 +1 @@
,+>++++>

View file

@ -0,0 +1,2 @@
}}}}}'}
$}

View file

@ -0,0 +1,2 @@
}}}}}'}
$}

1
maps/fanclub.blk Normal file
View file

@ -0,0 +1 @@
 

1
maps/fightingdojo.blk Normal file
View file

@ -0,0 +1 @@
IJgIJKQPLKLKLK21LRFFo

4
maps/fuchsiacity.blk Normal file
View file

@ -0,0 +1,4 @@
 !zoooooz7:~zooooooznttmVUwnmnwVwVmzoo`wVwVwmzzzzzzznzzzzzzzzzzz !oooo`z !nlllmzz|szzzzzz7:~`wVwmzoooooyzznVUVzzzzzogmzznUlllll11NkkkPRR`Uwwww11NU_tnN>?????????;_t
nN$ !WWWW !%_8989nNX|~0|rY1<=<=1nNX11111111Y_Vw1wnNZ\ooo\[11nPRRRR>?;ttttPRRRRRn11111(,)1111>?;

1
maps/fuchsiagym.blk Normal file
View file

@ -0,0 +1 @@
-.0-/0/-/--/./0---21

1
maps/fuchsiahouse1.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/fuchsiahouse2.blk Normal file
View file

@ -0,0 +1 @@
)   

1
maps/fuchsiahouse3.blk Normal file
View file

@ -0,0 +1 @@
= ==  ,  5

1
maps/fuchsiamart.blk Normal file
View file

@ -0,0 +1 @@
  

View file

@ -0,0 +1 @@
589467777  

View file

@ -0,0 +1,2 @@
 !"#


1
maps/gary.blk Normal file
View file

@ -0,0 +1 @@
I12JKLKLR12o

1
maps/halloffameroom.blk Normal file
View file

@ -0,0 +1 @@
e7l

1
maps/indigoplateau.blk Normal file
View file

@ -0,0 +1 @@
!"'')))CB***,,,(CB(+++)))CB***,,,(CB(+++)))CB***,,,(CB(+++

BIN
maps/indigoplateaulobby.blk Normal file

Binary file not shown.

2
maps/lab1.blk Normal file
View file

@ -0,0 +1,2 @@
 
 

2
maps/lab2.blk Normal file
View file

@ -0,0 +1,2 @@

 

1
maps/lab3.blk Normal file
View file

@ -0,0 +1 @@
 

1
maps/lab4.blk Normal file
View file

@ -0,0 +1 @@
  

1
maps/lance.blk Normal file
View file

@ -0,0 +1 @@
I12JI12JK21LKLK21LKLK21LR12oK21LK21LRVrsNoKLIJKLKpKLKSFFoKLKLKUHHH[LRFFFFFFFo

1
maps/lavendartown.blk Normal file
View file

@ -0,0 +1 @@
WW%{{(hi,{ !{y(7}~,{|r{{$WW*{{{{{{{{y({{yy{{{({{{{{{{ !({{{|s({{{{{{{{{(???;{>???,

1
maps/lavenderhouse1.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/lavenderhouse2.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/lavendermart.blk Normal file
View file

@ -0,0 +1 @@
  

View file

@ -0,0 +1,2 @@
 !"#


1
maps/loreli.blk Normal file
View file

@ -0,0 +1 @@
!!$!!  DD

9
maps/mansion1.blk Normal file
View file

@ -0,0 +1,9 @@
@AAAAAAAAAAAAAB\S]\wGF@c]DCFSXWXUFPIIXF8G]D:;
FCC181]D?;
SJIIIXWQD?;
F]D?;
FHXWQD?;
F R]D?;
FDFD?;
F NDFD?;
FFHX?;WJIIIIII

1
maps/mansion2.blk Normal file
View file

@ -0,0 +1 @@
heejBAABAAA@aei\VFGp]\VXW8FDCCZ1FPIIIJ `cgAeiDwon d8FDZ8SIX8WQka*]8FnFD1FlOkaaBFlDVVlDGGSlDZFlHIIJIJm

1
maps/mansion3.blk Normal file
View file

@ -0,0 +1 @@
@AAsAeeBaaa@DVU\81wG1\Z18F\8gi VIIIQDo] 8FDG1]ItWRWIQ\]DoFHIIHIIJ

1
maps/mansion4.blk Normal file
View file

@ -0,0 +1 @@
`aaaBaaaabAAAABdFfwCCCFDGVXWIJIXWQDF@cgBAAAAAAABFD  FFFDFFFD  FFFPIIIJZaaYVQDFDFDVGDFDDnFDZwDFHIIIIIJIIIHIIIJ

1
maps/mtmoon1.blk Normal file
View file

@ -0,0 +1 @@
 !!!!!!!!!!!!!!!!!"( " " "(( !" !!"* " !!"$ !!!!!!!!"

1
maps/mtmoon2.blk Normal file
View file

@ -0,0 +1 @@
??????<==??????=<?????????=<???????<

1
maps/mtmoon3.blk Normal file
View file

@ -0,0 +1 @@
..................//......../fED/AB.@AB../=/)/333)+/> .....//../3333/0...../D))E/=HI333/33JGGGGK/....@AB./../)///,/=/88888888889999999999

View file

@ -0,0 +1,2 @@
 !"#


BIN
maps/museumf1.blk Normal file

Binary file not shown.

BIN
maps/museumf2.blk Normal file

Binary file not shown.

1
maps/namerater.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/oakslab.blk Normal file
View file

@ -0,0 +1 @@
efghhkkijmnhhhh

57
maps/pewtercity.blk Normal file
View file

@ -0,0 +1,57 @@
RRRRRRRRRRRRRRRooo?;tt  !oo
ttn,)ttuqqv|}~
4
ttn,)/7}:~B/B,)
n,)tttttt>??,)
(,,,)
  !$WW,)

|s
,),)ooooo
>??,) !1wVww1(,,,)
|rtnttttm$WW,)nttttmM
+%t
n/mM
)M
%QQQQQQQQQQ


4
maps/pewtergym.blk Normal file
View file

@ -0,0 +1,4 @@

     

1
maps/pewterhouse1.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/pewterhouse2.blk Normal file
View file

@ -0,0 +1 @@
   

1
maps/pewtermart.blk Normal file
View file

@ -0,0 +1 @@
  

View file

@ -0,0 +1,2 @@
 !"#


3
maps/pokemontower1.blk Normal file
View file

@ -0,0 +1,3 @@

 9 
9 %?? % 

2
maps/pokemontower2.blk Normal file
View file

@ -0,0 +1,2 @@
`[a[Q ^L666_ 
6RLL6RRRR6R6 WRRROX 666 SVT

3
maps/pokemontower3.blk Normal file
View file

@ -0,0 +1,3 @@

[Q 9OOOOX 
PPRQPQ 9NLLML VV SVT

3
maps/pokemontower4.blk Normal file
View file

@ -0,0 +1,3 @@

 [Q ^QOL_ 
fONMOOMOgNOg 9f NO SU

2
maps/pokemontower5.blk Normal file
View file

@ -0,0 +1,2 @@

[e66 WiL6LjX :66OO66PR636RQP66OL6 ^gOOh_ 666 

2
maps/pokemontower6.blk Normal file
View file

@ -0,0 +1,2 @@
`[a]66 ^NL6R6_ 
6666R6LZRPOOL66O6LLOO W6O6OQX O6R 0

1
maps/pokemontower7.blk Normal file
View file

@ -0,0 +1 @@
lm 9  9 9 59    1

1
maps/powerplant.blk Normal file
View file

@ -0,0 +1 @@
@aaaheeieeeeieeeeeeiDp1]F55]Dh*gic+aYF815]@cg\81]cDF81]D\1]1DF8]p\8qDF81]heeA@Aeic+aDVIXWIIQ\p1]IIIHIIIIIXRF\R]DF`a*\8]5555DFdDqDFD1aa*+abIIIIIIIIIIUFD8f81]hcghe*V11]\8k11]\1k*gaaeaa@c+aaeiD1\D FHX,WHIIIIIIIHIIIIIIJ

1
maps/rockethideout1.blk Normal file
View file

@ -0,0 +1 @@
.........@AAB...........DnoF......@AAAAcgAB....DF....@*+B  @*+B....DF  DF....DGGF  DGGF....F  F....@AAAAAABgB....444F,WJ....666F.......666F.......777oF.......HIIIIIIJ...

3
maps/rockethideout2.blk Normal file
View file

@ -0,0 +1,3 @@
.............................................@AAzAAAAA@ABAABD
UoF nFy9&F FD
 'V Fy5YFD5)@AAAABD)US,WJD ) F...D  YnF...D)& DF...HI3333333HIJ...

2
maps/rockethideout3.blk Normal file
View file

@ -0,0 +1,2 @@
..................................@AAAAAAAAAB....DnF....@AAAAcZIXF....y&FF....y&5WIQ....D5 &FF....D')F....D5oFIIIJ....y
`*qb.......D)df.......@A*gpF.......HIIIIIIJ...

1
maps/rockethideout4.blk Normal file
View file

@ -0,0 +1 @@
....`aaa@ABaaaB....dpFF....DGGRFGGF....PIIIDF F....D DF f....DG DnFXWQ....DGgpSJF....DFS,WJ....`aaaacF.......dF.......DGG F.......HIIIIIIJ...

View file

@ -0,0 +1 @@
DMGJLKJ KHFI

1
maps/rocktunnel1.blk Normal file
View file

@ -0,0 +1 @@
 " "(>( " " "( " " " "( " " " " "*>NQRMN

Some files were not shown because too many files have changed in this diff Show more