changeset 222:c9a855de1d07

enabled pokedex printing.
author Robert McIntyre <rlm@mit.edu>
date Sat, 24 Mar 2012 03:10:56 -0500
parents 2fac825a4de9
children 3dfb9dd3db9d
files clojure/com/aurellem/exp/cartography clojure/com/aurellem/exp/play.clj clojure/com/aurellem/gb/constants.clj clojure/com/aurellem/gb/items.clj clojure/com/aurellem/gb/pokedex.clj clojure/com/aurellem/gb/species.clj clojure/com/aurellem/gb/util.clj
diffstat 7 files changed, 860 insertions(+), 445 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/cartography	Sat Mar 24 00:13:06 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/cartography	Sat Mar 24 03:10:56 2012 -0500
     1.3 @@ -7,480 +7,480 @@
     1.4  D168                   Pokemon 6 Species
     1.5  D169                   End-of-List Sentinel (0xFF)
     1.6  D16A                   Pokemon 1 Color Map
     1.7 -D16B                   /h				  
     1.8 -D16C                   \l Pokemon 1 Current Hit Points  
     1.9 -D16D                   Unused				  
    1.10 -D16E                   Status				  
    1.11 +D16B                   /h				
    1.12 +D16C                   \l Pokemon 1 Current Hit Points
    1.13 +D16D                   Unused				
    1.14 +D16E                   Status				
    1.15  D16F                   Type 1  (does not affect display)
    1.16  D170                   Type 2  (does not affect display)
    1.17 -D171                   Scratch Area 				  
    1.18 -D172                   Move 1 ID 			  
    1.19 -D173                   Move 2 ID  			  
    1.20 -D174                   Move 3 ID  			  
    1.21 -D175                   Move 4 ID                          
    1.22 +D171                   Scratch Area 				
    1.23 +D172                   Move 1 ID 			
    1.24 +D173                   Move 2 ID  			
    1.25 +D174                   Move 3 ID  			
    1.26 +D175                   Move 4 ID
    1.27  D176                   /h   Pokemon 1 OT ID
    1.28  D177                   \l
    1.29 -D178                   /h				    
    1.30 -D179                   |m   Pokemon 1 Experience Points   
    1.31 -D17A                   \l				    
    1.32 -D17B                   /h HP Stat Expeience		    
    1.33 -D17C                   \l	  				    
    1.34 +D178                   /h				
    1.35 +D179                   |m   Pokemon 1 Experience Points
    1.36 +D17A                   \l				
    1.37 +D17B                   /h HP Stat Expeience		
    1.38 +D17C                   \l	  				
    1.39  D17D                   /h Attack Stat Experience
    1.40 -D17E                   \l	  				    
    1.41 +D17E                   \l	  				
    1.42  D17F                   /h Defense Stat Experience
    1.43 -D180                   \l	  				    
    1.44 +D180                   \l	  				
    1.45  D181                   /h Speed Stat Experience
    1.46 -D182                   \l	  				    
    1.47 +D182                   \l	  				
    1.48  D183                   /h Special Stat Experience
    1.49 -D184                   \l				    
    1.50 +D184                   \l				
    1.51  D185                   Diversification -- Defense, Attack (HP)
    1.52 -D186                   Diversification -- Special, Speed (HP)  
    1.53 -D187                   Current/Maximum PP Move 1		    
    1.54 -D188                   Current/Maximum PP Move 2		    
    1.55 -D189                   Current/Maximum PP Move 3		    
    1.56 -D18A                   Current/Maximum PP Move 4		    
    1.57 -D18B                   Current Level			    
    1.58 -D18C                   /h   Pokemon 1 Total Hit Points    
    1.59 -D18D                   \l				    
    1.60 -D18E                   /h   Pokemon 1 Attack      	    
    1.61 -D18F                   \l				    
    1.62 -D190                   /h   Pokemon 1 Defense     	    
    1.63 -D191                   \l				    
    1.64 -D192                   /h   Pokemon 1 Speed       	    
    1.65 -D193                   \l				    
    1.66 -D194                   /h   Pokemon 1 Special     	    
    1.67 -D195                   \l                                   
    1.68 -D196                   Pokemon 2 Color Map 
    1.69 +D186                   Diversification -- Special, Speed (HP)
    1.70 +D187                   Current/Maximum PP Move 1		
    1.71 +D188                   Current/Maximum PP Move 2		
    1.72 +D189                   Current/Maximum PP Move 3		
    1.73 +D18A                   Current/Maximum PP Move 4		
    1.74 +D18B                   Current Level			
    1.75 +D18C                   /h   Pokemon 1 Total Hit Points
    1.76 +D18D                   \l				
    1.77 +D18E                   /h   Pokemon 1 Attack      	
    1.78 +D18F                   \l				
    1.79 +D190                   /h   Pokemon 1 Defense     	
    1.80 +D191                   \l				
    1.81 +D192                   /h   Pokemon 1 Speed       	
    1.82 +D193                   \l				
    1.83 +D194                   /h   Pokemon 1 Special     	
    1.84 +D195                   \l
    1.85 +D196                   Pokemon 2 Color Map
    1.86  D197                   /h
    1.87  D198                   \l Pokemon 2 Current Hit Points
    1.88 -D199                   Unused 
    1.89 -D19A                   Status				   
    1.90 -D19B                   Type 1  (does not affect display) 
    1.91 -D19C                   Type 2  (does not affect display) 
    1.92 -D19D                   Scratch Area 				   
    1.93 -D19E                   Move 1 ID 
    1.94 -D19F                   Move 2 ID  
    1.95 -D1A0                   Move 3 ID  
    1.96 -D1A1                   Move 4 ID                         
    1.97 -D1A2                   /h   Pokemon 2 OT ID  
    1.98 -D1A3                   \l				      
    1.99 -D1A4                   /h				      
   1.100 -D1A5                   |m   Pokemon 2 Experience Points     
   1.101 -D1A6                   \l				      
   1.102 -D1A7                   /h HP Stat Expeience		      
   1.103 -D1A8                   \l	 			      
   1.104 +D199                   Unused
   1.105 +D19A                   Status				
   1.106 +D19B                   Type 1  (does not affect display)
   1.107 +D19C                   Type 2  (does not affect display)
   1.108 +D19D                   Scratch Area 				
   1.109 +D19E                   Move 1 ID
   1.110 +D19F                   Move 2 ID
   1.111 +D1A0                   Move 3 ID
   1.112 +D1A1                   Move 4 ID
   1.113 +D1A2                   /h   Pokemon 2 OT ID
   1.114 +D1A3                   \l				
   1.115 +D1A4                   /h				
   1.116 +D1A5                   |m   Pokemon 2 Experience Points
   1.117 +D1A6                   \l				
   1.118 +D1A7                   /h HP Stat Expeience		
   1.119 +D1A8                   \l	 			
   1.120  D1A9                   /h Attack Stat Experience
   1.121 -D1AA                   \l	 			      
   1.122 +D1AA                   \l	 			
   1.123  D1AB                   /h Defense Stat Experience
   1.124 -D1AC                   \l	 			      
   1.125 +D1AC                   \l	 			
   1.126  D1AD                   /h Speed Stat Experience
   1.127 -D1AE                   \l	 			      
   1.128 +D1AE                   \l	 			
   1.129  D1AF                   /h Special Stat Experience
   1.130 -D1B0                   \l				      
   1.131 -D1B1                   Diversification -- Defense, Attack (HP)   
   1.132 -D1B2                   Diversification -- Special, Speed (HP)       
   1.133 -D1B3                   Current/Maximum PP Move 1	      
   1.134 -D1B4                   Current/Maximum PP Move 2	      
   1.135 -D1B5                   Current/Maximum PP Move 3	      
   1.136 -D1B6                   Current/Maximum PP Move 4	      
   1.137 -D1B7                   Current Level			      
   1.138 -D1B8                   /h   Pokemon 2 Total Hit Points      
   1.139 -D1B9                   \l				      
   1.140 -D1BA                   /h   Pokemon 2 Attack      	      
   1.141 -D1BB                   \l				      
   1.142 -D1BC                   /h   Pokemon 2 Defense     	      
   1.143 -D1BD                   \l				      
   1.144 -D1BE                   /h   Pokemon 2 Speed       	      
   1.145 -D1BF                   \l				      
   1.146 -D1C0                   /h   Pokemon 2 Special     	      
   1.147 -D1C1                   \l                                     
   1.148 -D1C2                   Pokemon 3 Color Map 
   1.149 -D1C3                   /h				   
   1.150 -D1C4                   \l Pokemon 3 Current Hit Points  
   1.151 -D1C5                   Unused 				  
   1.152 -D1C6                   Status				  
   1.153 -D1C7                   Type 1  (does not affect display)  
   1.154 -D1C8                   Type 2  (does not affect display)	  
   1.155 -D1C9                   Scratch Area 				   
   1.156 -D1CA                   Move 1 ID 			  
   1.157 -D1CB                   Move 2 ID  			  
   1.158 -D1CC                   Move 3 ID  			  
   1.159 -D1CD                   Move 4 ID                            
   1.160 +D1B0                   \l				
   1.161 +D1B1                   Diversification -- Defense, Attack (HP)
   1.162 +D1B2                   Diversification -- Special, Speed (HP)
   1.163 +D1B3                   Current/Maximum PP Move 1	
   1.164 +D1B4                   Current/Maximum PP Move 2	
   1.165 +D1B5                   Current/Maximum PP Move 3	
   1.166 +D1B6                   Current/Maximum PP Move 4	
   1.167 +D1B7                   Current Level			
   1.168 +D1B8                   /h   Pokemon 2 Total Hit Points
   1.169 +D1B9                   \l				
   1.170 +D1BA                   /h   Pokemon 2 Attack      	
   1.171 +D1BB                   \l				
   1.172 +D1BC                   /h   Pokemon 2 Defense     	
   1.173 +D1BD                   \l				
   1.174 +D1BE                   /h   Pokemon 2 Speed       	
   1.175 +D1BF                   \l				
   1.176 +D1C0                   /h   Pokemon 2 Special     	
   1.177 +D1C1                   \l
   1.178 +D1C2                   Pokemon 3 Color Map
   1.179 +D1C3                   /h				
   1.180 +D1C4                   \l Pokemon 3 Current Hit Points
   1.181 +D1C5                   Unused 				
   1.182 +D1C6                   Status				
   1.183 +D1C7                   Type 1  (does not affect display)
   1.184 +D1C8                   Type 2  (does not affect display)	
   1.185 +D1C9                   Scratch Area 				
   1.186 +D1CA                   Move 1 ID 			
   1.187 +D1CB                   Move 2 ID  			
   1.188 +D1CC                   Move 3 ID  			
   1.189 +D1CD                   Move 4 ID
   1.190  D1CE                   /h   Pokemon 3 OT ID
   1.191  D1CF                   \l
   1.192 -D1D0                   /h				    
   1.193 -D1D1                   |m   Pokemon 3 Experience Points   
   1.194 -D1D2                   \l				    
   1.195 -D1D3                   /h HP Stat Expeience	    
   1.196 -D1D4                   \l	  				    
   1.197 +D1D0                   /h				
   1.198 +D1D1                   |m   Pokemon 3 Experience Points
   1.199 +D1D2                   \l				
   1.200 +D1D3                   /h HP Stat Expeience	
   1.201 +D1D4                   \l	  				
   1.202  D1D5                   /h Attack Stat Experience
   1.203 -D1D6                   \l	  				    
   1.204 +D1D6                   \l	  				
   1.205  D1D7                   /h Defense Stat Experience
   1.206 -D1D8                   \l	  				    
   1.207 +D1D8                   \l	  				
   1.208  D1D9                   /h Speed Stat Experience
   1.209 -D1DA                   \l	  				    
   1.210 +D1DA                   \l	  				
   1.211  D1DB                   /h Special Stat Experience
   1.212 -D1DC                   \l				    
   1.213 -D1DD                   Diversification -- Defense, Attack (HP)	    
   1.214 -D1DE                   Diversification -- Special, Speed (HP)     
   1.215 -D1DF                   Current/Maximum PP Move 1		    
   1.216 -D1E0                   Current/Maximum PP Move 2		    
   1.217 -D1E1                   Current/Maximum PP Move 3		    
   1.218 -D1E2                   Current/Maximum PP Move 4		    
   1.219 -D1E3                   Current Level			    
   1.220 -D1E4                   /h   Pokemon 3 Total Hit Points    
   1.221 -D1E5                   \l				    
   1.222 -D1E6                   /h   Pokemon 3 Attack      	    
   1.223 -D1E7                   \l				    
   1.224 -D1E8                   /h   Pokemon 3 Defense     	    
   1.225 -D1E9                   \l				    
   1.226 -D1EA                   /h   Pokemon 3 Speed       	    
   1.227 -D1EB                   \l				    
   1.228 -D1EC                   /h   Pokemon 3 Special     	    
   1.229 -D1ED                   \l                                   
   1.230 +D1DC                   \l				
   1.231 +D1DD                   Diversification -- Defense, Attack (HP)	
   1.232 +D1DE                   Diversification -- Special, Speed (HP)
   1.233 +D1DF                   Current/Maximum PP Move 1		
   1.234 +D1E0                   Current/Maximum PP Move 2		
   1.235 +D1E1                   Current/Maximum PP Move 3		
   1.236 +D1E2                   Current/Maximum PP Move 4		
   1.237 +D1E3                   Current Level			
   1.238 +D1E4                   /h   Pokemon 3 Total Hit Points
   1.239 +D1E5                   \l				
   1.240 +D1E6                   /h   Pokemon 3 Attack      	
   1.241 +D1E7                   \l				
   1.242 +D1E8                   /h   Pokemon 3 Defense     	
   1.243 +D1E9                   \l				
   1.244 +D1EA                   /h   Pokemon 3 Speed       	
   1.245 +D1EB                   \l				
   1.246 +D1EC                   /h   Pokemon 3 Special     	
   1.247 +D1ED                   \l
   1.248  D1EE                   Pokemon 4 Color Map
   1.249 -D1EF                   /h				  
   1.250 -D1F0                   \l Pokemon 4 Current Hit Points  
   1.251 -D1F1                   Unused 				  
   1.252 -D1F2                   Status				    
   1.253 -D1F3                   Type 1  (does not affect display) 
   1.254 -D1F4                   Type 2  (does not affect display)  
   1.255 -D1F5                   Scratch Area 				    
   1.256 -D1F6                   Move 1 ID 			  
   1.257 -D1F7                   Move 2 ID  			  
   1.258 -D1F8                   Move 3 ID  			  
   1.259 -D1F9                   Move 4 ID                          
   1.260 +D1EF                   /h				
   1.261 +D1F0                   \l Pokemon 4 Current Hit Points
   1.262 +D1F1                   Unused 				
   1.263 +D1F2                   Status				
   1.264 +D1F3                   Type 1  (does not affect display)
   1.265 +D1F4                   Type 2  (does not affect display)
   1.266 +D1F5                   Scratch Area 				
   1.267 +D1F6                   Move 1 ID 			
   1.268 +D1F7                   Move 2 ID  			
   1.269 +D1F8                   Move 3 ID  			
   1.270 +D1F9                   Move 4 ID
   1.271  D1FA                   /h   Pokemon 4 OT ID
   1.272  D1FB                   \l
   1.273 -D1FC                   /h				    
   1.274 -D1FD                   |m   Pokemon 4 Experience Points   
   1.275 -D1FE                   \l				    
   1.276 -D1FF                   /h HP Stat Expeience    
   1.277 -D200                   \l	  				    
   1.278 +D1FC                   /h				
   1.279 +D1FD                   |m   Pokemon 4 Experience Points
   1.280 +D1FE                   \l				
   1.281 +D1FF                   /h HP Stat Expeience
   1.282 +D200                   \l	  				
   1.283  D201                   /h Attack Stat Experience
   1.284 -D202                   \l	  				    
   1.285 +D202                   \l	  				
   1.286  D203                   /h Defense Stat Experience
   1.287 -D204                   \l	  				    
   1.288 +D204                   \l	  				
   1.289  D205                   /h Speed Stat Experience
   1.290 -D206                   \l	  				    
   1.291 +D206                   \l	  				
   1.292  D207                   /h Special Stat Experience
   1.293 -D208                   \l				    
   1.294 -D209                   Diversification -- Defense, Attack (HP)	    
   1.295 -D20A                   Diversification -- Special, Speed (HP)	    
   1.296 -D20B                   Current/Maximum PP Move 1		    
   1.297 -D20C                   Current/Maximum PP Move 2		    
   1.298 -D20D                   Current/Maximum PP Move 3		    
   1.299 -D20E                   Current/Maximum PP Move 4		    
   1.300 -D20F                   Current Level			    
   1.301 -D210                   /h   Pokemon 4 Total Hit Points    
   1.302 -D211                   \l				    
   1.303 -D212                   /h   Pokemon 4 Attack      	    
   1.304 -D213                   \l				    
   1.305 -D214                   /h   Pokemon 4 Defense     	    
   1.306 -D215                   \l				    
   1.307 -D216                   /h   Pokemon 4 Speed       	    
   1.308 -D217                   \l				    
   1.309 -D218                   /h   Pokemon 4 Special     	    
   1.310 -D219                   \l                                   
   1.311 +D208                   \l				
   1.312 +D209                   Diversification -- Defense, Attack (HP)	
   1.313 +D20A                   Diversification -- Special, Speed (HP)	
   1.314 +D20B                   Current/Maximum PP Move 1		
   1.315 +D20C                   Current/Maximum PP Move 2		
   1.316 +D20D                   Current/Maximum PP Move 3		
   1.317 +D20E                   Current/Maximum PP Move 4		
   1.318 +D20F                   Current Level			
   1.319 +D210                   /h   Pokemon 4 Total Hit Points
   1.320 +D211                   \l				
   1.321 +D212                   /h   Pokemon 4 Attack      	
   1.322 +D213                   \l				
   1.323 +D214                   /h   Pokemon 4 Defense     	
   1.324 +D215                   \l				
   1.325 +D216                   /h   Pokemon 4 Speed       	
   1.326 +D217                   \l				
   1.327 +D218                   /h   Pokemon 4 Special     	
   1.328 +D219                   \l
   1.329  D21A                   Pokemon 5 Color Map
   1.330 -D21B                   /h				    
   1.331 -D21C                   \l Pokemon 5 Current Hit Points      
   1.332 -D21D                   Unused 				    
   1.333 -D21E                   Status				      
   1.334 -D21F                   Type 1  (does not affect display)    
   1.335 -D220                   Type 2  (does not affect display)	    
   1.336 -D221                   Scratch Area 				      
   1.337 -D222                   Move 1 ID 			    
   1.338 -D223                   Move 2 ID  			    
   1.339 -D224                   Move 3 ID  			    
   1.340 -D225                   Move 4 ID                            
   1.341 -D226                   /h   Pokemon 5 OT ID		    
   1.342 -D227                   \l				    
   1.343 -D228                   /h				    
   1.344 -D229                   |m   Pokemon 5 Experience Points      
   1.345 -D22A                   \l				     
   1.346 -D22B                   /h HP Stat Expeience		     
   1.347 -D22C                   \l	  				     
   1.348 +D21B                   /h				
   1.349 +D21C                   \l Pokemon 5 Current Hit Points
   1.350 +D21D                   Unused 				
   1.351 +D21E                   Status				
   1.352 +D21F                   Type 1  (does not affect display)
   1.353 +D220                   Type 2  (does not affect display)	
   1.354 +D221                   Scratch Area 				
   1.355 +D222                   Move 1 ID 			
   1.356 +D223                   Move 2 ID  			
   1.357 +D224                   Move 3 ID  			
   1.358 +D225                   Move 4 ID
   1.359 +D226                   /h   Pokemon 5 OT ID		
   1.360 +D227                   \l				
   1.361 +D228                   /h				
   1.362 +D229                   |m   Pokemon 5 Experience Points
   1.363 +D22A                   \l				
   1.364 +D22B                   /h HP Stat Expeience		
   1.365 +D22C                   \l	  				
   1.366  D22D                   /h Attack Stat Experience
   1.367 -D22E                   \l	  				     
   1.368 +D22E                   \l	  				
   1.369  D22F                   /h Defense Stat Experience
   1.370 -D230                   \l	  				     
   1.371 +D230                   \l	  				
   1.372  D231                   /h Speed Stat Experience
   1.373 -D232                   \l	  				     
   1.374 +D232                   \l	  				
   1.375  D233                   /h Special Stat Experience
   1.376 -D234                   \l				     
   1.377 -D235                   Diversification -- Defense, Attack (HP)     
   1.378 -D236                   Diversification -- Special, Speed (HP)    
   1.379 -D237                   Current/Maximum PP Move 1		     
   1.380 -D238                   Current/Maximum PP Move 2		     
   1.381 -D239                   Current/Maximum PP Move 3		     
   1.382 -D23A                   Current/Maximum PP Move 4		     
   1.383 -D23B                   Current Level			     
   1.384 -D23C                   /h   Pokemon 5 Total Hit Points       
   1.385 -D23D                   \l				     
   1.386 -D23E                   /h   Pokemon 5 Attack      	     
   1.387 -D23F                   \l				     
   1.388 -D240                   /h   Pokemon 5 Defense     	     
   1.389 -D241                   \l				     
   1.390 -D242                   /h   Pokemon 5 Speed       	     
   1.391 -D243                   \l				     
   1.392 -D244                   /h   Pokemon 5 Special     	     
   1.393 -D245                   \l                                    
   1.394 -D246                   Pokemon 6 Color Map 
   1.395 -D247                   /h				    
   1.396 -D248                   \l Pokemon 6 Current Hit Points      
   1.397 -D249                   Unused 				    
   1.398 -D24A                   Status				     
   1.399 -D24B                   Type 1  (does not affect display)    
   1.400 -D24C                   Type 2  (does not affect display)	    
   1.401 -D24D                   Scratch Area 				      
   1.402 -D24E                   Move 1 ID 			    
   1.403 -D24F                   Move 2 ID  			    
   1.404 -D250                   Move 3 ID  			    
   1.405 -D251                   Move 4 ID                            
   1.406 -D252                   /h   Pokemon 6 OT ID		    
   1.407 -D253                   \l				    
   1.408 -D254                   /h				     
   1.409 -D255                   |m   Pokemon 6 Experience Points      
   1.410 -D256                   \l				     
   1.411 -D257                   /h HP Stat Expeience     
   1.412 -D258                   \l	  				     
   1.413 +D234                   \l				
   1.414 +D235                   Diversification -- Defense, Attack (HP)
   1.415 +D236                   Diversification -- Special, Speed (HP)
   1.416 +D237                   Current/Maximum PP Move 1		
   1.417 +D238                   Current/Maximum PP Move 2		
   1.418 +D239                   Current/Maximum PP Move 3		
   1.419 +D23A                   Current/Maximum PP Move 4		
   1.420 +D23B                   Current Level			
   1.421 +D23C                   /h   Pokemon 5 Total Hit Points
   1.422 +D23D                   \l				
   1.423 +D23E                   /h   Pokemon 5 Attack      	
   1.424 +D23F                   \l				
   1.425 +D240                   /h   Pokemon 5 Defense     	
   1.426 +D241                   \l				
   1.427 +D242                   /h   Pokemon 5 Speed       	
   1.428 +D243                   \l				
   1.429 +D244                   /h   Pokemon 5 Special     	
   1.430 +D245                   \l
   1.431 +D246                   Pokemon 6 Color Map
   1.432 +D247                   /h				
   1.433 +D248                   \l Pokemon 6 Current Hit Points
   1.434 +D249                   Unused 				
   1.435 +D24A                   Status				
   1.436 +D24B                   Type 1  (does not affect display)
   1.437 +D24C                   Type 2  (does not affect display)	
   1.438 +D24D                   Scratch Area 				
   1.439 +D24E                   Move 1 ID 			
   1.440 +D24F                   Move 2 ID  			
   1.441 +D250                   Move 3 ID  			
   1.442 +D251                   Move 4 ID
   1.443 +D252                   /h   Pokemon 6 OT ID		
   1.444 +D253                   \l				
   1.445 +D254                   /h				
   1.446 +D255                   |m   Pokemon 6 Experience Points
   1.447 +D256                   \l				
   1.448 +D257                   /h HP Stat Expeience
   1.449 +D258                   \l	  				
   1.450  D259                   /h Attack Stat Experience
   1.451 -D25A                   \l	  				     
   1.452 +D25A                   \l	  				
   1.453  D25B                   /h Defense Stat Experience
   1.454 -D25C                   \l	  				     
   1.455 +D25C                   \l	  				
   1.456  D25D                   /h Speed Stat Experience
   1.457 -D25E                   \l	  				     
   1.458 +D25E                   \l	  				
   1.459  D25F                   /h Special Stat Experience
   1.460 -D260                   \l				     
   1.461 -D261                   Diversification -- Defense, Attack (HP)  
   1.462 -D262                   Diversification -- Special, Speed (HP)  
   1.463 -D263                   Current/Maximum PP Move 1		     
   1.464 -D264                   Current/Maximum PP Move 2		     
   1.465 -D265                   Current/Maximum PP Move 3		     
   1.466 -D266                   Current/Maximum PP Move 4		     
   1.467 -D267                   Current Level			     
   1.468 -D268                   /h   Pokemon 6 Total Hit Points       
   1.469 -D269                   \l				     
   1.470 -D26A                   /h   Pokemon 6 Attack      	     
   1.471 -D26B                   \l				     
   1.472 -D26C                   /h   Pokemon 6 Defense     	     
   1.473 -D26D                   \l				     
   1.474 -D26E                   /h   Pokemon 6 Speed       	     
   1.475 -D26F                   \l				     
   1.476 -D270                   /h   Pokemon 6 Special     	     
   1.477 -D271                   \l                                    
   1.478 -D272                    ---	      
   1.479 -D273                   /	      
   1.480 -D274                   |	      
   1.481 -D275                   |	      
   1.482 -D276                   |	      
   1.483 +D260                   \l				
   1.484 +D261                   Diversification -- Defense, Attack (HP)
   1.485 +D262                   Diversification -- Special, Speed (HP)
   1.486 +D263                   Current/Maximum PP Move 1		
   1.487 +D264                   Current/Maximum PP Move 2		
   1.488 +D265                   Current/Maximum PP Move 3		
   1.489 +D266                   Current/Maximum PP Move 4		
   1.490 +D267                   Current Level			
   1.491 +D268                   /h   Pokemon 6 Total Hit Points
   1.492 +D269                   \l				
   1.493 +D26A                   /h   Pokemon 6 Attack      	
   1.494 +D26B                   \l				
   1.495 +D26C                   /h   Pokemon 6 Defense     	
   1.496 +D26D                   \l				
   1.497 +D26E                   /h   Pokemon 6 Speed       	
   1.498 +D26F                   \l				
   1.499 +D270                   /h   Pokemon 6 Special     	
   1.500 +D271                   \l
   1.501 +D272                    ---	
   1.502 +D273                   /	
   1.503 +D274                   |	
   1.504 +D275                   |	
   1.505 +D276                   |	
   1.506  D277                   |  OT pokemon 1
   1.507 -D278                   |	      
   1.508 -D279                   |	      
   1.509 -D27A                   |	      
   1.510 -D27B                   \	      
   1.511 -D27C                    ---            
   1.512 -D27D                    ---	      
   1.513 -D27E                   /	      
   1.514 -D27F                   |	      
   1.515 -D280                   |	      
   1.516 -D281                   |	      
   1.517 +D278                   |	
   1.518 +D279                   |	
   1.519 +D27A                   |	
   1.520 +D27B                   \	
   1.521 +D27C                    ---
   1.522 +D27D                    ---	
   1.523 +D27E                   /	
   1.524 +D27F                   |	
   1.525 +D280                   |	
   1.526 +D281                   |	
   1.527  D282                   |  OT pokemon 2
   1.528 -D283                   |	      
   1.529 -D284                   |	      
   1.530 -D285                   |	      
   1.531 -D286                   \	      
   1.532 -D287                    ---           
   1.533 -D288                    ---	      
   1.534 -D289                   /	      
   1.535 -D28A                   |	      
   1.536 -D28B                   |	      
   1.537 -D28C                   |	      
   1.538 +D283                   |	
   1.539 +D284                   |	
   1.540 +D285                   |	
   1.541 +D286                   \	
   1.542 +D287                    ---
   1.543 +D288                    ---	
   1.544 +D289                   /	
   1.545 +D28A                   |	
   1.546 +D28B                   |	
   1.547 +D28C                   |	
   1.548  D28D                   |  OT pokemon 3
   1.549 -D28E                   |	      
   1.550 -D28F                   |	      
   1.551 -D290                   |	      
   1.552 -D291                   \	      
   1.553 -D292                    ---           
   1.554 -D293                    ---	      
   1.555 -D294                   /	      
   1.556 -D295                   |	      
   1.557 -D296                   |	      
   1.558 -D297                   |	      
   1.559 +D28E                   |	
   1.560 +D28F                   |	
   1.561 +D290                   |	
   1.562 +D291                   \	
   1.563 +D292                    ---
   1.564 +D293                    ---	
   1.565 +D294                   /	
   1.566 +D295                   |	
   1.567 +D296                   |	
   1.568 +D297                   |	
   1.569  D298                   |  OT pokemon 4
   1.570 -D299                   |	      
   1.571 -D29A                   |	      
   1.572 -D29B                   |	      
   1.573 -D29C                   \	      
   1.574 -D29D                    ---           
   1.575 -D29E                    ---	      
   1.576 -D29F                   /	      
   1.577 -D2A0                   |	      
   1.578 -D2A1                   |	      
   1.579 -D2A2                   |	      
   1.580 +D299                   |	
   1.581 +D29A                   |	
   1.582 +D29B                   |	
   1.583 +D29C                   \	
   1.584 +D29D                    ---
   1.585 +D29E                    ---	
   1.586 +D29F                   /	
   1.587 +D2A0                   |	
   1.588 +D2A1                   |	
   1.589 +D2A2                   |	
   1.590  D2A3                   |  OT pokemon 5
   1.591 -D2A4                   |	      
   1.592 -D2A5                   |	      
   1.593 -D2A6                   |	      
   1.594 -D2A7                   \	      
   1.595 -D2A8                    ---           
   1.596 -D2A9                    ---	      
   1.597 -D2AA                   /	      
   1.598 -D2AB                   |	      
   1.599 -D2AC                   |	      
   1.600 -D2AD                   |	      
   1.601 +D2A4                   |	
   1.602 +D2A5                   |	
   1.603 +D2A6                   |	
   1.604 +D2A7                   \	
   1.605 +D2A8                    ---
   1.606 +D2A9                    ---	
   1.607 +D2AA                   /	
   1.608 +D2AB                   |	
   1.609 +D2AC                   |	
   1.610 +D2AD                   |	
   1.611  D2AE                   |  OT pokemon 6
   1.612 -D2AF                   |	      
   1.613 -D2B0                   |	      
   1.614 -D2B1                   |	      
   1.615 -D2B2                   \	      
   1.616 -D2B3                    ---           
   1.617 -D2B4                    ---	      	 
   1.618 -D2B5                   /	      	 
   1.619 -D2B6                   |	      	 
   1.620 -D2B7                   |	      	 
   1.621 -D2B8                   |	      	 
   1.622 -D2B9                   |  Pokemon 1 Name 
   1.623 -D2BA                   |	      	 
   1.624 -D2BB                   |	      	 
   1.625 -D2BC                   |	      	 
   1.626 -D2BD                   \	      	 
   1.627 -D2BE                    ---              
   1.628 -D2BF                    ---	      	 
   1.629 -D2C0                   /	      	 
   1.630 -D2C1                   |	      	 
   1.631 -D2C2                   |	      	 
   1.632 -D2C3                   |	      	 
   1.633 -D2C4                   |  Pokemon 2 Name 
   1.634 -D2C5                   |	      	 
   1.635 -D2C6                   |	      	 
   1.636 -D2C7                   |	      	 
   1.637 -D2C8                   \	      	 
   1.638 -D2C9                    ---              
   1.639 -D2CA                    ---	      	 
   1.640 -D2CB                   /	      	 
   1.641 -D2CC                   |	      	 
   1.642 -D2CD                   |	      	 
   1.643 -D2CE                   |	      	 
   1.644 -D2CF                   |  Pokemon 3 Name 
   1.645 -D2D0                   |	      	 
   1.646 -D2D1                   |	      	 
   1.647 -D2D2                   |	      	 
   1.648 -D2D3                   \	      	 
   1.649 -D2D4                    ---              
   1.650 -D2D5                    ---	      	 
   1.651 -D2D6                   /	      	 
   1.652 -D2D7                   |	      	 
   1.653 -D2D8                   |	      	 
   1.654 -D2D9                   |	      	 
   1.655 -D2DA                   |  Pokemon 4 Name 
   1.656 -D2DB                   |	      	 
   1.657 -D2DC                   |	      	 
   1.658 -D2DD                   |	      	 
   1.659 -D2DE                   \	      	 
   1.660 -D2DF                    ---              
   1.661 -D2E0                    ---	      	 
   1.662 -D2E1                   /	      	 
   1.663 -D2E2                   |	      	 
   1.664 -D2E3                   |	      	 
   1.665 -D2E4                   |	      	 
   1.666 -D2E5                   |  Pokemon 5 Name 
   1.667 -D2E6                   |	      	 
   1.668 -D2E7                   |	      	 
   1.669 -D2E8                   |	      	 
   1.670 -D2E9                   \	      	 
   1.671 -D2EA                    ---              
   1.672 -D2EB                    ---	      	 
   1.673 -D2EC                   /	      	 
   1.674 -D2ED                   |	      	 
   1.675 -D2EE                   |	      	 
   1.676 -D2EF                   |	      	 
   1.677 -D2F0                   |  Pokemon 6 Name 
   1.678 -D2F1                   |	      	 
   1.679 -D2F2                   |	      	 
   1.680 -D2F3                   |	      	 
   1.681 -D2F4                   \	      	 
   1.682 -D2F5                    ---              
   1.683 -D2F6                   
   1.684 -D2F7                   
   1.685 -D2F8                   
   1.686 -D2F9                   
   1.687 -D2FA                   
   1.688 -D2FB                   
   1.689 -D2FC                   
   1.690 -D2FD                   
   1.691 -D2FE                   
   1.692 -D2FF                   
   1.693 -D300                   
   1.694 -D301                   
   1.695 -D302                   
   1.696 -D303                   
   1.697 -D304                   
   1.698 -D305                   
   1.699 -D306                   
   1.700 -D307                   
   1.701 -D308                   
   1.702 -D309                   
   1.703 -D30A                   
   1.704 -D30B                   
   1.705 -D30C                   
   1.706 -D30D                   
   1.707 -D30E                   
   1.708 -D30F                   
   1.709 -D310                   
   1.710 -D311                   
   1.711 -D312                   
   1.712 -D313                   
   1.713 -D314                   
   1.714 -D315                   
   1.715 -D316                   
   1.716 -D317                   
   1.717 -D318                   
   1.718 -D319                   
   1.719 -D31A                   
   1.720 -D31B              
   1.721 -D31C                   
   1.722 -D31D                   
   1.723 -D31E                   
   1.724 -D31F                   
   1.725 -D320                   
   1.726 -D321                   
   1.727 -D322                   
   1.728 -D323                   
   1.729 -D324                   
   1.730 -D325                   
   1.731 -D326                   
   1.732 -D327                   
   1.733 -D328                   
   1.734 -D329                   
   1.735 -D32A                   
   1.736 -D32B                   
   1.737 -D32C                   
   1.738 -D32D                   
   1.739 -D32E                   
   1.740 -D32F                   
   1.741 -D330                   
   1.742 -D331                   
   1.743 -D332                   
   1.744 -D333                   
   1.745 -D334                   
   1.746 -D335                   
   1.747 -D336                   
   1.748 -D337                   
   1.749 -D338                   
   1.750 -D339                   
   1.751 -D33A                   
   1.752 -D33B                   
   1.753 -D33C                   
   1.754 -D33D                   
   1.755 -D33E                   
   1.756 -D33F                   
   1.757 -D340                   
   1.758 -D341                   
   1.759 -D342                   
   1.760 -D343                   
   1.761 -D344                   
   1.762 +D2AF                   |	
   1.763 +D2B0                   |	
   1.764 +D2B1                   |	
   1.765 +D2B2                   \	
   1.766 +D2B3                    ---
   1.767 +D2B4                    ---	      	
   1.768 +D2B5                   /	      	
   1.769 +D2B6                   |	      	
   1.770 +D2B7                   |	      	
   1.771 +D2B8                   |	      	
   1.772 +D2B9                   |  Pokemon 1 Name
   1.773 +D2BA                   |	      	
   1.774 +D2BB                   |	      	
   1.775 +D2BC                   |	      	
   1.776 +D2BD                   \	      	
   1.777 +D2BE                    ---
   1.778 +D2BF                    ---	      	
   1.779 +D2C0                   /	      	
   1.780 +D2C1                   |	      	
   1.781 +D2C2                   |	      	
   1.782 +D2C3                   |	      	
   1.783 +D2C4                   |  Pokemon 2 Name
   1.784 +D2C5                   |	      	
   1.785 +D2C6                   |	      	
   1.786 +D2C7                   |	      	
   1.787 +D2C8                   \	      	
   1.788 +D2C9                    ---
   1.789 +D2CA                    ---	      	
   1.790 +D2CB                   /	      	
   1.791 +D2CC                   |	      	
   1.792 +D2CD                   |	      	
   1.793 +D2CE                   |	      	
   1.794 +D2CF                   |  Pokemon 3 Name
   1.795 +D2D0                   |	      	
   1.796 +D2D1                   |	      	
   1.797 +D2D2                   |	      	
   1.798 +D2D3                   \	      	
   1.799 +D2D4                    ---
   1.800 +D2D5                    ---	      	
   1.801 +D2D6                   /	      	
   1.802 +D2D7                   |	      	
   1.803 +D2D8                   |	      	
   1.804 +D2D9                   |	      	
   1.805 +D2DA                   |  Pokemon 4 Name
   1.806 +D2DB                   |	      	
   1.807 +D2DC                   |	      	
   1.808 +D2DD                   |	      	
   1.809 +D2DE                   \	      	
   1.810 +D2DF                    ---
   1.811 +D2E0                    ---	      	
   1.812 +D2E1                   /	      	
   1.813 +D2E2                   |	      	
   1.814 +D2E3                   |	      	
   1.815 +D2E4                   |	      	
   1.816 +D2E5                   |  Pokemon 5 Name
   1.817 +D2E6                   |	      	
   1.818 +D2E7                   |	      	
   1.819 +D2E8                   |	      	
   1.820 +D2E9                   \	      	
   1.821 +D2EA                    ---
   1.822 +D2EB                    ---	      	
   1.823 +D2EC                   /	      	
   1.824 +D2ED                   |	      	
   1.825 +D2EE                   |	      	
   1.826 +D2EF                   |	      	
   1.827 +D2F0                   |  Pokemon 6 Name
   1.828 +D2F1                   |	      	
   1.829 +D2F2                   |	      	
   1.830 +D2F3                   |	      	
   1.831 +D2F4                   \	      	
   1.832 +D2F5                    ---
   1.833 +D2F6                   Pokedex Caught 1-8    
   1.834 +D2F7                   Pokedex Caught 9-16   
   1.835 +D2F8                   Pokedex Caught 17-24  
   1.836 +D2F9                   Pokedex Caught 25-32  
   1.837 +D2FA                   Pokedex Caught 33-40  
   1.838 +D2FB                   Pokedex Caught 41-48  
   1.839 +D2FC                   Pokedex Caught 49-56  
   1.840 +D2FD                   Pokedex Caught 57-64  
   1.841 +D2FE                   Pokedex Caught 65-72  
   1.842 +D2FF                   Pokedex Caught 73-80  
   1.843 +D300                   Pokedex Caught 81-88  
   1.844 +D301                   Pokedex Caught 89-96  
   1.845 +D302                   Pokedex Caught 97-104 
   1.846 +D303                   Pokedex Caught 105-112
   1.847 +D304                   Pokedex Caught 113-120
   1.848 +D305                   Pokedex Caught 121-128
   1.849 +D306                   Pokedex Caught 129-136
   1.850 +D307                   Pokedex Caught 137-144
   1.851 +D308                   Pokedex Caught 145-152
   1.852 +D309                   Pokedex Seen 1-8    
   1.853 +D30A                   Pokedex Seen 9-16   
   1.854 +D30B                   Pokedex Seen 17-24  
   1.855 +D30C                   Pokedex Seen 25-32  
   1.856 +D30D                   Pokedex Seen 33-40  
   1.857 +D30E                   Pokedex Seen 41-48  
   1.858 +D30F                   Pokedex Seen 49-56  
   1.859 +D310                   Pokedex Seen 57-64  
   1.860 +D311                   Pokedex Seen 65-72  
   1.861 +D312                   Pokedex Seen 73-80  
   1.862 +D313                   Pokedex Seen 81-88  
   1.863 +D314                   Pokedex Seen 89-96  
   1.864 +D315                   Pokedex Seen 97-104 
   1.865 +D316                   Pokedex Seen 105-112
   1.866 +D317                   Pokedex Seen 113-120
   1.867 +D318                   Pokedex Seen 121-128
   1.868 +D319                   Pokedex Seen 129-136
   1.869 +D31A                   Pokedex Seen 137-144
   1.870 +D31B                   Pokedex Seen 145-152
   1.871 +D31C                   Number of Held Items
   1.872 +D31D                   Item  1 Type    
   1.873 +D31E                   Item  1 Quantity
   1.874 +D31F                   Item  2 Type    
   1.875 +D320                   Item  2 Quantity
   1.876 +D321                   Item  3 Type    
   1.877 +D322                   Item  3 Quantity
   1.878 +D323                   Item  4 Type    
   1.879 +D324                   Item  4 Quantity
   1.880 +D325                   Item  5 Type    
   1.881 +D326                   Item  5 Quantity
   1.882 +D327                   Item  6 Type    
   1.883 +D328                   Item  6 Quantity
   1.884 +D329                   Item  7 Type    
   1.885 +D32A                   Item  7 Quantity
   1.886 +D32B                   Item  8 Type    
   1.887 +D32C                   Item  8 Quantity
   1.888 +D32D                   Item  9 Type    
   1.889 +D32E                   Item  9 Quantity
   1.890 +D32F                   Item 10 Type    
   1.891 +D330                   Item 10 Quantity
   1.892 +D331                   Item 11 Type    
   1.893 +D332                   Item 11 Quantity
   1.894 +D333                   Item 12 Type    
   1.895 +D334                   Item 12 Quantity
   1.896 +D335                   Item 13 Type    
   1.897 +D336                   Item 13 Quantity
   1.898 +D337                   Item 14 Type    
   1.899 +D338                   Item 14 Quantity
   1.900 +D339                   Item 15 Type    
   1.901 +D33A                   Item 15 Quantity
   1.902 +D33B                   Item 16 Type    
   1.903 +D33C                   Item 16 Quantity
   1.904 +D33D                   Item 17 Type    
   1.905 +D33E                   Item 17 Quantity
   1.906 +D33F                   Item 18 Type    
   1.907 +D340                   Item 18 Quantity
   1.908 +D341                   Item 19 Type    
   1.909 +D342                   Item 19 Quantity
   1.910 +D343                   Item 20 Type    
   1.911 +D344                   Item 20 Quantity
   1.912  D345                   
   1.913  D346                   
   1.914  D347                   
     2.1 --- a/clojure/com/aurellem/exp/play.clj	Sat Mar 24 00:13:06 2012 -0500
     2.2 +++ b/clojure/com/aurellem/exp/play.clj	Sat Mar 24 03:10:56 2012 -0500
     2.3 @@ -3,8 +3,9 @@
     2.4    (:use (com.aurellem.gb gb-driver util constants
     2.5                           assembly saves
     2.6                           items pokemon status types
     2.7 -                         characters species moves))
     2.8 +                         characters species moves
     2.9 +                         pokedex))
    2.10 +  
    2.11    (:import java.io.File)
    2.12    (:import [com.aurellem.gb.gb_driver SaveState]))
    2.13  
    2.14 -
     3.1 --- a/clojure/com/aurellem/gb/constants.clj	Sat Mar 24 00:13:06 2012 -0500
     3.2 +++ b/clojure/com/aurellem/gb/constants.clj	Sat Mar 24 03:10:56 2012 -0500
     3.3 @@ -7,4 +7,6 @@
     3.4  (def name-width 11)
     3.5  
     3.6  (def pokemon-record-begin 0xD162)
     3.7 -(def pokemon-record-end 0xD2F5)
     3.8 \ No newline at end of file
     3.9 +(def pokemon-record-end 0xD2F5)
    3.10 +
    3.11 +(def D-memory-end 0xD41B)
    3.12 \ No newline at end of file
     4.1 --- a/clojure/com/aurellem/gb/items.clj	Sat Mar 24 00:13:06 2012 -0500
     4.2 +++ b/clojure/com/aurellem/gb/items.clj	Sat Mar 24 03:10:56 2012 -0500
     4.3 @@ -1,6 +1,5 @@
     4.4  (ns com.aurellem.gb.items
     4.5    (:use (com.aurellem.gb gb-driver util))
     4.6 -  ;; this is bullshit
     4.7    (:import [com.aurellem.gb.gb_driver SaveState]))
     4.8  
     4.9  (defn game-name
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/clojure/com/aurellem/gb/pokedex.clj	Sat Mar 24 03:10:56 2012 -0500
     5.3 @@ -0,0 +1,76 @@
     5.4 +(ns com.aurellem.gb.pokedex
     5.5 +  (:use (com.aurellem.gb gb-driver util species))
     5.6 +  (:import [com.aurellem.gb.gb_driver SaveState]))
     5.7 +
     5.8 +(def pokedex-seen-start-address 0xD309)
     5.9 +
    5.10 +(def pokedex-captured-start-address 0xD2F6)
    5.11 +
    5.12 +(defn pokedex-offset [capture? species-num]
    5.13 +  (+ (if capture?
    5.14 +       pokedex-captured-start-address
    5.15 +       pokedex-seen-start-address)
    5.16 +     (int (/ species-num 8))))
    5.17 +  
    5.18 +(defn read-pokedex
    5.19 +  ([^SaveState state capture? species-num]
    5.20 +     (bit-test
    5.21 +      (aget (memory state)
    5.22 +            (pokedex-offset capture? species-num))
    5.23 +      (rem species-num 8))))
    5.24 +
    5.25 +(defn set-pokedex
    5.26 +  ([^SaveState state capture? set? species-num]
    5.27 +     (let [target (pokedex-offset capture? species-num)
    5.28 +           current-bits
    5.29 +           (aget (memory state)
    5.30 +                 (pokedex-offset capture? species-num))
    5.31 +           bit-offset (rem species-num 8)]
    5.32 +       (set-memory
    5.33 +        state target
    5.34 +        (if set?
    5.35 +          (bit-set   current-bits bit-offset)
    5.36 +          (bit-clear current-bits bit-offset))))))
    5.37 +
    5.38 +(defn read-pokedex-seen
    5.39 +  ([^SaveState state species-num]
    5.40 +     (read-pokedex state false species-num))
    5.41 +  ([species-num]
    5.42 +     (read-pokedex-seen @current-state species-num)))
    5.43 +
    5.44 +(defn set-pokedex-seen
    5.45 +  ([^SaveState state species-num]
    5.46 +     (set-pokedex state false species-num))
    5.47 +  ([species-num]
    5.48 +     (set-pokedex-seen @current-state species-num)))
    5.49 +
    5.50 +(defn read-pokedex-captured
    5.51 +  ([^SaveState state species-num]
    5.52 +     (read-pokedex state true species-num))
    5.53 +  ([species-num]
    5.54 +     (read-pokedex-captured @current-state species-num)))
    5.55 +
    5.56 +(defn set-pokedex-captured
    5.57 +  ([^SaveState state species-num]
    5.58 +     (set-pokedex state true species-num))
    5.59 +  ([species-num]
    5.60 +     (set-pokedex-captured @current-state species-num)))
    5.61 +
    5.62 +(defn print-pokedex
    5.63 +  ([^SaveState state]
    5.64 +     (println "+-----------+-------+-------+")
    5.65 +     (println "|Pokemon    | Seen? | Capt? |")
    5.66 +     (println "+-----------+-------+-------+")
    5.67 +     (dorun
    5.68 +      (map
    5.69 +       #(printf "|%-11s|%s|%s|\n" %1 %2 %3)
    5.70 +       (map #(.toUpperCase (.substring (str %) 1))
    5.71 +            (map pokedex-num->species-name (range 1 152)))
    5.72 +       (map #(if % "   X   " "       ")
    5.73 +            (map read-pokedex-seen (range 152)))
    5.74 +       (map #(if % "   X   " "       ")
    5.75 +            (map read-pokedex-captured (range 152)))))
    5.76 +     (println "+-----------+-------+-------+"))
    5.77 +
    5.78 +  ([] (print-pokedex @current-state)))
    5.79 +     
    5.80 \ No newline at end of file
     6.1 --- a/clojure/com/aurellem/gb/species.clj	Sat Mar 24 00:13:06 2012 -0500
     6.2 +++ b/clojure/com/aurellem/gb/species.clj	Sat Mar 24 03:10:56 2012 -0500
     6.3 @@ -3,10 +3,12 @@
     6.4                           constants))
     6.5    (:import [com.aurellem.gb.gb_driver SaveState]))
     6.6  
     6.7 +
     6.8 +
     6.9  (def species-code->species-name
    6.10    {0x01  :rhydon
    6.11     0x02  :kangaskhan
    6.12 -   0x03  :nidoran-male
    6.13 +   0x03  :nidoran♂
    6.14     0x04  :clefairy
    6.15     0x05  :spearow
    6.16     0x06  :voltorb
    6.17 @@ -18,7 +20,7 @@
    6.18     0x0C  :exeggcute
    6.19     0x0D  :grimer
    6.20     0x0E  :gengar
    6.21 -   0x0F  :nidoran-female
    6.22 +   0x0F  :nidoran♀
    6.23     0x10  :nidoqueen
    6.24     0x11  :cubone
    6.25     0x12  :rhyhorn
    6.26 @@ -72,15 +74,15 @@
    6.27     0x4D  :meowth
    6.28     0x4E  :krabby
    6.29     0x52  :vulpix
    6.30 -   0x53  :ninetails
    6.31 +   0x53  :ninetales
    6.32     0x54  :pikachu
    6.33 -   0x55  :riachu
    6.34 +   0x55  :raichu
    6.35     0x58  :dratini
    6.36     0x59  :dragonair
    6.37     0x5A  :kabuto
    6.38     0x5B  :kabutops
    6.39     0x5C  :horsea
    6.40 -   0x5D  :sedra
    6.41 +   0x5D  :seadra
    6.42     0x60  :sandshrew
    6.43     0x61  :sandslash
    6.44     0x62  :omanyte
    6.45 @@ -120,7 +122,7 @@
    6.46     0x8B  :cloyster
    6.47     0x8D  :electrode
    6.48     0x8E  :clefable
    6.49 -   0x8F  :wheezing
    6.50 +   0x8F  :weezing
    6.51     0x90  :persian
    6.52     0x91  :marowak
    6.53     0x93  :haunter
    6.54 @@ -153,7 +155,7 @@
    6.55     0xBA  :gloom
    6.56     0xBB  :vileplume
    6.57     0xBC  :bellsprout
    6.58 -   0xBD  :weepenbell
    6.59 +   0xBD  :weepinbell
    6.60     0xBE  :victreebel})
    6.61  
    6.62  (def species-ID-1 0xD163)
    6.63 @@ -212,4 +214,313 @@
    6.64    ([poke-num new-species]
    6.65       (set-species2 @current-state poke-num new-species)))
    6.66  
    6.67 -     
    6.68 \ No newline at end of file
    6.69 +
    6.70 +(def pokedex-num->species-name
    6.71 +  {1       :bulbasaur     
    6.72 +   2       :ivysaur       
    6.73 +   3       :venusaur      
    6.74 +   4       :charmander    
    6.75 +   5       :charmeleon    
    6.76 +   6       :charizard     
    6.77 +   7       :squirtle      
    6.78 +   8       :wartortle     
    6.79 +   9       :blastoise     
    6.80 +   10      :caterpie      
    6.81 +   11      :metapod       
    6.82 +   12      :butterfree    
    6.83 +   13      :weedle        
    6.84 +   14      :kakuna        
    6.85 +   15      :beedrill      
    6.86 +   16      :pidgey        
    6.87 +   17      :pidgeotto     
    6.88 +   18      :pidgeot       
    6.89 +   19      :rattata       
    6.90 +   20      :raticate      
    6.91 +   21      :spearow       
    6.92 +   22      :fearow        
    6.93 +   23      :ekans         
    6.94 +   24      :arbok         
    6.95 +   25      :pikachu       
    6.96 +   26      :raichu        
    6.97 +   27      :sandshrew     
    6.98 +   28      :sandslash     
    6.99 +   29      :nidoran♀      
   6.100 +   30      :nidorina      
   6.101 +   31      :nidoqueen     
   6.102 +   32      :nidoran♂      
   6.103 +   33      :nidorino      
   6.104 +   34      :nidoking      
   6.105 +   35      :clefairy      
   6.106 +   36      :clefable      
   6.107 +   37      :vulpix        
   6.108 +   38      :ninetales     
   6.109 +   39      :jigglypuff    
   6.110 +   40      :wigglytuff    
   6.111 +   41      :zubat         
   6.112 +   42      :golbat        
   6.113 +   43      :oddish        
   6.114 +   44      :gloom         
   6.115 +   45      :vileplume     
   6.116 +   46      :paras         
   6.117 +   47      :parasect      
   6.118 +   48      :venonat       
   6.119 +   49      :venomoth      
   6.120 +   50      :diglett       
   6.121 +   51      :dugtrio       
   6.122 +   52      :meowth        
   6.123 +   53      :persian       
   6.124 +   54      :psyduck       
   6.125 +   55      :golduck       
   6.126 +   56      :mankey        
   6.127 +   57      :primeape      
   6.128 +   58      :growlithe     
   6.129 +   59      :arcanine      
   6.130 +   60      :poliwag       
   6.131 +   61      :poliwhirl     
   6.132 +   62      :poliwrath     
   6.133 +   63      :abra          
   6.134 +   64      :kadabra       
   6.135 +   65      :alakazam      
   6.136 +   66      :machop        
   6.137 +   67      :machoke       
   6.138 +   68      :machamp       
   6.139 +   69      :bellsprout    
   6.140 +   70      :weepinbell    
   6.141 +   71      :victreebel    
   6.142 +   72      :tentacool     
   6.143 +   73      :tentacruel    
   6.144 +   74      :geodude       
   6.145 +   75      :graveler      
   6.146 +   76      :golem         
   6.147 +   77      :ponyta        
   6.148 +   78      :rapidash      
   6.149 +   79      :slowpoke      
   6.150 +   80      :slowbro       
   6.151 +   81      :magnemite     
   6.152 +   82      :magneton      
   6.153 +   83      :farfetch    
   6.154 +   84      :doduo         
   6.155 +   85      :dodrio        
   6.156 +   86      :seel          
   6.157 +   87      :dewgong       
   6.158 +   88      :grimer        
   6.159 +   89      :muk           
   6.160 +   90      :shellder      
   6.161 +   91      :cloyster      
   6.162 +   92      :gastly        
   6.163 +   93      :haunter       
   6.164 +   94      :gengar        
   6.165 +   95      :onix          
   6.166 +   96      :drowzee       
   6.167 +   97      :hypno         
   6.168 +   98      :krabby        
   6.169 +   99      :kingler       
   6.170 +   100     :voltorb       
   6.171 +   101     :electrode     
   6.172 +   102     :exeggcute     
   6.173 +   103     :exeggutor     
   6.174 +   104     :cubone        
   6.175 +   105     :marowak       
   6.176 +   106     :hitmonlee     
   6.177 +   107     :hitmonchan    
   6.178 +   108     :lickitung     
   6.179 +   109     :koffing       
   6.180 +   110     :weezing       
   6.181 +   111     :rhyhorn       
   6.182 +   112     :rhydon        
   6.183 +   113     :chansey       
   6.184 +   114     :tangela       
   6.185 +   115     :kangaskhan    
   6.186 +   116     :horsea        
   6.187 +   117     :seadra        
   6.188 +   118     :goldeen       
   6.189 +   119     :seaking       
   6.190 +   120     :staryu        
   6.191 +   121     :starmie       
   6.192 +   122     :mr-mime      
   6.193 +   123     :scyther       
   6.194 +   124     :jynx          
   6.195 +   125     :electabuzz    
   6.196 +   126     :magmar        
   6.197 +   127     :pinsir        
   6.198 +   128     :tauros        
   6.199 +   129     :magikarp      
   6.200 +   130     :gyarados      
   6.201 +   131     :lapras        
   6.202 +   132     :ditto         
   6.203 +   133     :eevee         
   6.204 +   134     :vaporeon      
   6.205 +   135     :jolteon       
   6.206 +   136     :flareon       
   6.207 +   137     :porygon       
   6.208 +   138     :omanyte       
   6.209 +   139     :omastar       
   6.210 +   140     :kabuto        
   6.211 +   141     :kabutops      
   6.212 +   142     :aerodactyl    
   6.213 +   143     :snorlax       
   6.214 +   144     :articuno      
   6.215 +   145     :zapdos        
   6.216 +   146     :moltres       
   6.217 +   147     :dratini       
   6.218 +   148     :dragonair     
   6.219 +   149     :dragonite     
   6.220 +   150     :mewtwo         
   6.221 +   151     :mew})
   6.222 +         
   6.223 +
   6.224 +
   6.225 +
   6.226 +
   6.227 +
   6.228 +           
   6.229 +           
   6.230 +           
   6.231 +           
   6.232 +           
   6.233 +           
   6.234 +           
   6.235 +           
   6.236 +           
   6.237 +           
   6.238 +           
   6.239 +           
   6.240 +           
   6.241 +           
   6.242 +           
   6.243 +           
   6.244 +           
   6.245 +           
   6.246 +           
   6.247 +           
   6.248 +           
   6.249 +           
   6.250 +           
   6.251 +           
   6.252 +           
   6.253 +           
   6.254 +           
   6.255 +           
   6.256 +           
   6.257 +           
   6.258 +           
   6.259 +           
   6.260 +           
   6.261 +           
   6.262 +           
   6.263 +           
   6.264 +           
   6.265 +           
   6.266 +           
   6.267 +           
   6.268 +           
   6.269 +           
   6.270 +           
   6.271 +           
   6.272 +           
   6.273 +           
   6.274 +           
   6.275 +           
   6.276 +           
   6.277 +           
   6.278 +           
   6.279 +           
   6.280 +           
   6.281 +           
   6.282 +           
   6.283 +           
   6.284 +           
   6.285 +           
   6.286 +           
   6.287 +           
   6.288 +           
   6.289 +           
   6.290 +           
   6.291 +           
   6.292 +           
   6.293 +           
   6.294 +           
   6.295 +           
   6.296 +           
   6.297 +           
   6.298 +           
   6.299 +           
   6.300 +           
   6.301 +           
   6.302 +           
   6.303 +           
   6.304 +           
   6.305 +           
   6.306 +           
   6.307 +           
   6.308 +           
   6.309 +           
   6.310 +           
   6.311 +           
   6.312 +           
   6.313 +           
   6.314 +           
   6.315 +           
   6.316 +           
   6.317 +           
   6.318 +           
   6.319 +           
   6.320 +           
   6.321 +           
   6.322 +           
   6.323 +           
   6.324 +           
   6.325 +           
   6.326 +           
   6.327 +           
   6.328 +           
   6.329 +           
   6.330 +           
   6.331 +           
   6.332 +           
   6.333 +           
   6.334 +           
   6.335 +           
   6.336 +           
   6.337 +           
   6.338 +           
   6.339 +           
   6.340 +           
   6.341 +           
   6.342 +           
   6.343 +           
   6.344 +           
   6.345 +           
   6.346 +           
   6.347 +           
   6.348 +           
   6.349 +           
   6.350 +           
   6.351 +           
   6.352 +           
   6.353 +           
   6.354 +           
   6.355 +           
   6.356 +           
   6.357 +           
   6.358 +           
   6.359 +           
   6.360 +           
   6.361 +           
   6.362 +           
   6.363 +           
   6.364 +           
   6.365 +           
   6.366 +           
   6.367 +           
   6.368 +           
   6.369 +           
   6.370 +           
   6.371 +           
   6.372 +           
   6.373 +           
   6.374 +           
   6.375 +           
   6.376 +           
   6.377 +           
   6.378 +           
   6.379 \ No newline at end of file
     7.1 --- a/clojure/com/aurellem/gb/util.clj	Sat Mar 24 00:13:06 2012 -0500
     7.2 +++ b/clojure/com/aurellem/gb/util.clj	Sat Mar 24 03:10:56 2012 -0500
     7.3 @@ -1,8 +1,8 @@
     7.4  (ns com.aurellem.gb.util
     7.5 -  (:use (com.aurellem.gb gb-driver vbm))
     7.6 +  (:use (com.aurellem.gb gb-driver vbm constants))
     7.7 +  (:import java.io.File)
     7.8    (:import [com.aurellem.gb.gb_driver SaveState]))
     7.9  
    7.10 -
    7.11  (defn A [state]
    7.12    (bit-shift-right (bit-and 0x0000FF00 (AF state)) 8))
    7.13  
    7.14 @@ -145,4 +145,30 @@
    7.15       (+ (glue-bytes m l)
    7.16          (bit-shift-left h 16))))
    7.17  
    7.18 +(def cartography
    7.19 +  (File. user-home
    7.20 +         "proj/vba-clojure/clojure/com/aurellem/exp/cartography"))
    7.21  
    7.22 +
    7.23 +
    7.24 +(defn print-D-memory
    7.25 +  ([^SaveState state]
    7.26 +     
    7.27 +     (let [descriptions
    7.28 +           (clojure.string/split-lines
    7.29 +            (slurp cartography))]
    7.30 +       (dorun
    7.31 +        (map
    7.32 +         (fn [line data desc]
    7.33 +           (printf "%04X  %02X%s\n"
    7.34 +                   line data (apply str
    7.35 +                                    (drop 20 desc))))
    7.36 +         (range pokemon-record-begin
    7.37 +                (inc D-memory-end))
    7.38 +         
    7.39 +         (subvec (vec (memory state))
    7.40 +                 pokemon-record-begin
    7.41 +                 (inc D-memory-end))
    7.42 +         descriptions))))
    7.43 +  ([] (print-D-memory @current-state)))
    7.44 +