Преглед на файлове

added some debug features

SBird1337 преди 8 години
родител
ревизия
54c0743e8f
променени са 15 файла, в които са добавени 1179 реда и са изтрити 145 реда
  1. 5
    1
      assets.makefile
  2. Двоични данни
      assets/render/ascii.png
  3. 1
    0
      bpre.sym
  4. 2
    2
      data/moves/effect_table.S
  5. 126
    125
      makefile
  6. 9
    1
      nbproject/configurations.xml
  7. 755
    0
      nbproject/private/configurations.xml
  8. 118
    0
      src/debug/debug.c
  9. 83
    0
      src/include/assets/ascii.c
  10. 28
    0
      src/include/assets/ascii.h
  11. 1
    0
      src/include/bpre.h
  12. 21
    0
      src/include/debug.h
  13. 27
    8
      src/include/lcd.h
  14. 3
    1
      src/specials/custom_specials.c
  15. 0
    7
      src/specials/cutscene_meteor.c

+ 5
- 1
assets.makefile Целия файл

@@ -9,15 +9,17 @@ PNG_MET_SKY    := assets/meteor/bg1.png
9 9
 PNG_MET_FG     := assets/meteor/bg2.png
10 10
 PNG_MET_CLOUDS := assets/meteor/clouds.png
11 11
 PNG_MET_METEOR := assets/meteor/oam.png
12
+PNG_AS_T       := assets/render/ascii.png
12 13
 
13 14
 C_MET_BG     := src/assets/meteor/met_background.c
14 15
 C_MET_SKY    := src/assets/meteor/met_sky.c
15 16
 C_MET_FG     := src/assets/meteor/met_foreground.c
16 17
 C_MET_CLOUDS := src/assets/meteor/met_clouds.c
17 18
 C_MET_METEOR := src/assets/meteor/met_meteor.c
19
+C_AS_T       := src/include/assets/ascii.c
18 20
 
19 21
 .PHONY: all
20
-all: $(C_MET_BG) $(C_MET_SKY) $(C_MET_FG) $(C_MET_CLOUDS) $(C_MET_METEOR)
22
+all: $(C_MET_BG) $(C_MET_SKY) $(C_MET_FG) $(C_MET_CLOUDS) $(C_MET_METEOR) $(C_AS_T)
21 23
 
22 24
 
23 25
 
@@ -53,5 +55,7 @@ $(C_MET_CLOUDS): $(PNG_MET_CLOUDS)
53 55
 $(C_MET_METEOR): $(PNG_MET_METEOR)
54 56
 	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -ftc -o $@
55 57
 
58
+$(C_AS_T): $(PNG_AS_T)
59
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
56 60
 
57 61
 	

Двоични данни
assets/render/ascii.png Целия файл


+ 1
- 0
bpre.sym Целия файл

@@ -26,6 +26,7 @@ camera_move_and_redraw = 0x0805ACB4|1;
26 26
 calc_circle = 0x0807EE2C|1;
27 27
 random = 0x08044EC8|1;
28 28
 
29
+vram_decompress = 0x081E3B6C|1;
29 30
 pal_decompress_slice_to_faded_and_unfaded = 0x080703A8|1;
30 31
 gpu_tile_obj_decompress_alloc_tag_and_upload = 0x0800F035;
31 32
 gpu_pal_obj_alloc_tag_and_apply = 0x08008929;

+ 2
- 2
data/moves/effect_table.S Целия файл

@@ -4,8 +4,8 @@
4 4
 
5 5
 .global m_effect_table
6 6
 m_effect_table:
7
-	.word bs_power_trick    @for testing
8
-        @.word 0x081D6900 @0
7
+	@.word bs_power_trick    @for testing
8
+        .word 0x081D6900 @0
9 9
 	.word 0x081D696D @1
10 10
 	.word 0x081D69DC @2
11 11
 	.word 0x081D69E7 @3

+ 126
- 125
makefile Целия файл

@@ -1,125 +1,126 @@
1
-AS      := arm-none-eabi-as
2
-LD      := arm-none-eabi-ld
3
-OBJCOPY := arm-none-eabi-objcopy
4
-GRIT    := grit
5
-CC      := arm-none-eabi-gcc
6
-ARS     := armips
7
-MAKE    := make
8
-NM      := @arm-none-eabi-nm
9
-LAN		:= de
10
-STRAGB	:= string2agb
11
-
12
-export PATH := $(realpath ../tools):$(PATH)
13
-
14
-DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
15
-ASFLAGS   := -mthumb
16
-CFLAGS    := -mthumb -mno-thumb-interwork -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -O3 -std=gnu99 -Isrc/include $(DEFINES)
17
-GRITFLAGS := -ftc -fa
18
-LDFLAGS   := -z muldefs
19
-BLDPATH   := object
20
-OUTPATH	  := build
21
-SOURCEDIR := src
22
-STRINGDIR := string
23
-
24
-MAIN_OBJ  := $(BLDPATH)/linked.o
25
-SPRITES   := $(BLDPATH)/pkmn_sprites.o
26
-ICONS_AR  := $(BLDPATH)/pkmn_icons.a
27
-DYN_OVER  := built/dynamic_overworld.o
28
-
29
-SND_ROOT := sots-private/sound
30
-MUSIC_AR := $(SND_ROOT)/Music/music.a
31
-SMPL_AR  := $(SND_ROOT)/Samples/sample.a
32
-VOICE_AR := $(SND_ROOT)/Voicegroup/voice.a
33
-LIST_AR  := $(SND_ROOT)/Songtable/songlist.a
34
-CRY_AR   := $(SND_ROOT)/Crys/cry.a
35
-
36
-rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
37
-
38
-ASM_SRC_PP  := $(call rwildcard,src/,*.S)
39
-ASM_SRC     := $(call rwildcard,src/,*.s)
40
-C_SRC       := $(call rwildcard,src/,*.c)
41
-DATA_SRC_PP := $(call rwildcard,data/,*.S)
42
-DATA_SRC    := $(call rwildcard,data/,*.s)
43
-STRING		:= $(call rwildcard,string/$(LAN)/,*.txt)
44
-STRING_SRC	:= $(STRING:%.txt=%.S)
45
-
46
-STRING_OBJ	:= $(STRING_SRC:%.S=$(BLDPATH)/%.o)
47
-ASM_OBJ_PP  := $(ASM_SRC_PP:%.S=$(BLDPATH)/%.o)
48
-ASM_OBJ     := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
49
-C_OBJ       := $(C_SRC:%.c=$(BLDPATH)/%.o)
50
-DATA_OBJ_PP := $(DATA_SRC_PP:%.S=$(BLDPATH)/%.o)
51
-DATA_OBJ    := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
52
-ALL_OBJ     := $(C_OBJ) $(ASM_OBJ_PP) $(ASM_OBJ) $(DATA_OBJ_PP) $(DATA_OBJ)
53
-
54
-
55
-
56
-$(STRINGDIR)/%.S: $(STRINGDIR)/%.txt
57
-	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
58
-
59
-$(BLDPATH)/%.o: %.c $(ASSETS)
60
-	$(shell mkdir -p $(dir $@))
61
-	$(CC) $(CFLAGS) -c $< -o $@
62
-
63
-$(BLDPATH)/%.o: %.S
64
-	$(shell mkdir -p $(dir $@))
65
-	$(CC) $(CFLAGS) -c $< -o $@
66
-
67
-$(BLDPATH)/%.o: %.s
68
-	$(shell mkdir -p $(dir $@))
69
-	$(AS) $(ASFLAGS) $< -o $@
70
-
71
-all: rom
72
-
73
-.PHONY: rom
74
-rom: main.asm $(MAIN_OBJ)
75
-	$(ARS) $<
76
-	$(NM) $(BLDPATH)/linked.o -n -g --defined-only | \
77
-		sed -e '{s/^/0x/g};{/.*\sA\s.*/d};{s/\sT\s/ /g}' > $(OUTPATH)/__symbols.sym
78
-	@echo "*** SUCCESSFULLY BUILT PROJECT ***"
79
-	
80
-$(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(DYN_OVER) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $(STRING_OBJ)
81
-	$(LD) $(LDFLAGS) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group $^ --end-group
82
-
83
-.PHONY: clean
84
-clean:
85
-	rm -R -f build/*
86
-	rm -R -f object/*
87
-	$(MAKE) -C $(dir $(MUSIC_AR)) clean
88
-	$(MAKE) -C $(dir $(SMPL_AR)) clean
89
-	$(MAKE) -C $(dir $(VOICE_AR)) clean
90
-	$(MAKE) -C $(dir $(LIST_AR)) clean
91
-	$(MAKE) -C $(dir $(CRY_AR)) clean
92
-	$(MAKE) -f sprites.makefile clean
93
-	$(MAKE) -f icons.makefile clean
94
-
95
-.PHONY: $(ASSETS)
96
-$(ASSETS):
97
-	$(MAKE) -f assets.makefile
98
-
99
-.PHONY: $(SPRITES)
100
-$(SPRITES):
101
-	$(MAKE) -f sprites.makefile
102
-
103
-.PHONY: $(ICONS_AR)
104
-$(ICONS_AR):
105
-	$(MAKE) -f icons.makefile
106
-
107
-.PHONY: $(MUSIC_AR)
108
-$(MUSIC_AR):
109
-	$(MAKE) -C $(dir $@) all
110
-
111
-.PHONY: $(SMPL_AR)
112
-$(SMPL_AR):
113
-	$(MAKE) -C $(dir $@) all
114
-
115
-.PHONY: $(VOICE_AR)
116
-$(VOICE_AR):
117
-	$(MAKE) -C $(dir $@) all
118
-
119
-.PHONY: $(LIST_AR)
120
-$(LIST_AR):
121
-	$(MAKE) -C $(dir $@) all
122
-
123
-.PHONY: $(CRY_AR)
124
-$(CRY_AR):
125
-	$(MAKE) -C $(dir $@) all
1
+AS      := arm-none-eabi-as
2
+LD      := arm-none-eabi-ld
3
+OBJCOPY := arm-none-eabi-objcopy
4
+GRIT    := grit
5
+CC      := arm-none-eabi-gcc
6
+ARS     := armips
7
+MAKE    := make
8
+NM      := @arm-none-eabi-nm
9
+LAN		:= de
10
+STRAGB	:= string2agb
11
+
12
+export PATH := $(realpath ../tools):$(PATH)
13
+
14
+DEFINES   := -DBPRE -DSOFTWARE_VERSION=0
15
+ASFLAGS   := -mthumb
16
+CFLAGS    := -g -mthumb -mno-thumb-interwork -mcpu=arm7tdmi -fno-inline -mlong-calls -march=armv4t -O3 -std=gnu99 -Isrc/include $(DEFINES)
17
+GRITFLAGS := -ftc -fa
18
+LDFLAGS   := -z muldefs
19
+BLDPATH   := object
20
+OUTPATH	  := build
21
+SOURCEDIR := src
22
+STRINGDIR := string
23
+
24
+MAIN_OBJ  := $(BLDPATH)/linked.o
25
+SPRITES   := $(BLDPATH)/pkmn_sprites.o
26
+ICONS_AR  := $(BLDPATH)/pkmn_icons.a
27
+DYN_OVER  := built/dynamic_overworld.o
28
+
29
+SND_ROOT := sots-private/sound
30
+MUSIC_AR := $(SND_ROOT)/Music/music.a
31
+SMPL_AR  := $(SND_ROOT)/Samples/sample.a
32
+VOICE_AR := $(SND_ROOT)/Voicegroup/voice.a
33
+LIST_AR  := $(SND_ROOT)/Songtable/songlist.a
34
+CRY_AR   := $(SND_ROOT)/Crys/cry.a
35
+
36
+rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
37
+
38
+ASM_SRC_PP  := $(call rwildcard,src/,*.S)
39
+ASM_SRC     := $(call rwildcard,src/,*.s)
40
+C_SRC       := $(call rwildcard,src/,*.c)
41
+DATA_SRC_PP := $(call rwildcard,data/,*.S)
42
+DATA_SRC    := $(call rwildcard,data/,*.s)
43
+STRING		:= $(call rwildcard,string/$(LAN)/,*.txt)
44
+STRING_SRC	:= $(STRING:%.txt=%.S)
45
+
46
+STRING_OBJ	:= $(STRING_SRC:%.S=$(BLDPATH)/%.o)
47
+ASM_OBJ_PP  := $(ASM_SRC_PP:%.S=$(BLDPATH)/%.o)
48
+ASM_OBJ     := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
49
+C_OBJ       := $(C_SRC:%.c=$(BLDPATH)/%.o)
50
+DATA_OBJ_PP := $(DATA_SRC_PP:%.S=$(BLDPATH)/%.o)
51
+DATA_OBJ    := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
52
+ALL_OBJ     := $(C_OBJ) $(ASM_OBJ_PP) $(ASM_OBJ) $(DATA_OBJ_PP) $(DATA_OBJ)
53
+
54
+
55
+
56
+$(STRINGDIR)/%.S: $(STRINGDIR)/%.txt
57
+	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
58
+
59
+$(BLDPATH)/%.o: %.c $(ASSETS)
60
+	$(shell mkdir -p $(dir $@))
61
+	$(CC) $(CFLAGS) -c $< -o $@
62
+
63
+$(BLDPATH)/%.o: %.S
64
+	$(shell mkdir -p $(dir $@))
65
+	$(CC) $(CFLAGS) -c $< -o $@
66
+
67
+$(BLDPATH)/%.o: %.s
68
+	$(shell mkdir -p $(dir $@))
69
+	$(AS) $(ASFLAGS) $< -o $@
70
+
71
+all: rom
72
+
73
+.PHONY: rom
74
+rom: main.asm $(MAIN_OBJ)
75
+	$(ARS) $<
76
+	$(NM) $(BLDPATH)/linked.o -n -g --defined-only | \
77
+		sed -e '{s/^/0x/g};{/.*\sA\s.*/d};{s/\sT\s/ /g}' > $(OUTPATH)/__symbols.sym
78
+	@echo "*** SUCCESSFULLY BUILT PROJECT ***"
79
+	
80
+$(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(DYN_OVER) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $(STRING_OBJ)
81
+	$(MAKE) -f assets.makefile
82
+	$(LD) $(LDFLAGS) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group $^ --end-group
83
+
84
+.PHONY: clean
85
+clean:
86
+	rm -R -f build/*
87
+	rm -R -f object/*
88
+	$(MAKE) -C $(dir $(MUSIC_AR)) clean
89
+	$(MAKE) -C $(dir $(SMPL_AR)) clean
90
+	$(MAKE) -C $(dir $(VOICE_AR)) clean
91
+	$(MAKE) -C $(dir $(LIST_AR)) clean
92
+	$(MAKE) -C $(dir $(CRY_AR)) clean
93
+	$(MAKE) -f sprites.makefile clean
94
+	$(MAKE) -f icons.makefile clean
95
+
96
+.PHONY: $(ASSETS)
97
+$(ASSETS):
98
+	$(MAKE) -f assets.makefile
99
+
100
+.PHONY: $(SPRITES)
101
+$(SPRITES):
102
+	$(MAKE) -f sprites.makefile
103
+
104
+.PHONY: $(ICONS_AR)
105
+$(ICONS_AR):
106
+	$(MAKE) -f icons.makefile
107
+
108
+.PHONY: $(MUSIC_AR)
109
+$(MUSIC_AR):
110
+	$(MAKE) -C $(dir $@) all
111
+
112
+.PHONY: $(SMPL_AR)
113
+$(SMPL_AR):
114
+	$(MAKE) -C $(dir $@) all
115
+
116
+.PHONY: $(VOICE_AR)
117
+$(VOICE_AR):
118
+	$(MAKE) -C $(dir $@) all
119
+
120
+.PHONY: $(LIST_AR)
121
+$(LIST_AR):
122
+	$(MAKE) -C $(dir $@) all
123
+
124
+.PHONY: $(CRY_AR)
125
+$(CRY_AR):
126
+	$(MAKE) -C $(dir $@) all

+ 9
- 1
nbproject/configurations.xml Целия файл

@@ -4604,11 +4604,15 @@
4604 4604
           <in>entry_hazards_hook.S</in>
4605 4605
           <in>move_table.c</in>
4606 4606
         </df>
4607
+        <df name="debug">
4608
+          <in>debug.c</in>
4609
+        </df>
4607 4610
         <df name="encode">
4608 4611
           <in>crc32.c</in>
4609 4612
         </df>
4610 4613
         <df name="include">
4611 4614
           <in>battle_abilities.h</in>
4615
+          <in>debug.h</in>
4612 4616
           <in>item_effects.h</in>
4613 4617
           <in>items.h</in>
4614 4618
           <in>pokemon.h</in>
@@ -4696,7 +4700,7 @@
4696 4700
   <confs>
4697 4701
     <conf name="Default" type="0">
4698 4702
       <toolsSet>
4699
-        <compilerSet>default</compilerSet>
4703
+        <compilerSet>Cygwin|Cygwin</compilerSet>
4700 4704
         <dependencyChecking>false</dependencyChecking>
4701 4705
         <rebuildPropChanged>false</rebuildPropChanged>
4702 4706
       </toolsSet>
@@ -27211,10 +27215,14 @@
27211 27215
             tool="4"
27212 27216
             flavor2="0">
27213 27217
       </item>
27218
+      <item path="src/debug/debug.c" ex="false" tool="0" flavor2="0">
27219
+      </item>
27214 27220
       <item path="src/encode/crc32.c" ex="false" tool="0" flavor2="0">
27215 27221
       </item>
27216 27222
       <item path="src/include/battle_abilities.h" ex="false" tool="3" flavor2="0">
27217 27223
       </item>
27224
+      <item path="src/include/debug.h" ex="false" tool="3" flavor2="0">
27225
+      </item>
27218 27226
       <item path="src/include/item_effects.h" ex="false" tool="3" flavor2="0">
27219 27227
       </item>
27220 27228
       <item path="src/include/items.h" ex="false" tool="3" flavor2="0">

+ 755
- 0
nbproject/private/configurations.xml Целия файл

@@ -5,6 +5,8 @@
5 5
       <df name="assets">
6 6
         <df name="meteor">
7 7
         </df>
8
+        <df name="render">
9
+        </df>
8 10
       </df>
9 11
       <df name="base">
10 12
       </df>
@@ -3792,8 +3794,14 @@
3792 3794
             <df name="scripts">
3793 3795
             </df>
3794 3796
           </df>
3797
+          <df name="debug">
3798
+          </df>
3795 3799
           <df name="encode">
3796 3800
           </df>
3801
+          <df name="include">
3802
+            <df name="assets">
3803
+            </df>
3804
+          </df>
3797 3805
           <df name="interface">
3798 3806
           </df>
3799 3807
           <df name="item">
@@ -3893,7 +3901,726 @@
3893 3901
             <df name="RAW">
3894 3902
             </df>
3895 3903
             <df name="S">
3904
+              <in>cry_001.s</in>
3905
+              <in>cry_002.s</in>
3906
+              <in>cry_003.s</in>
3907
+              <in>cry_004.s</in>
3908
+              <in>cry_005.s</in>
3909
+              <in>cry_006.s</in>
3910
+              <in>cry_007.s</in>
3911
+              <in>cry_008.s</in>
3912
+              <in>cry_009.s</in>
3913
+              <in>cry_010.s</in>
3914
+              <in>cry_011.s</in>
3915
+              <in>cry_012.s</in>
3916
+              <in>cry_013.s</in>
3917
+              <in>cry_014.s</in>
3918
+              <in>cry_015.s</in>
3919
+              <in>cry_016.s</in>
3920
+              <in>cry_017.s</in>
3921
+              <in>cry_018.s</in>
3922
+              <in>cry_019.s</in>
3923
+              <in>cry_020.s</in>
3924
+              <in>cry_021.s</in>
3925
+              <in>cry_022.s</in>
3926
+              <in>cry_023.s</in>
3927
+              <in>cry_024.s</in>
3928
+              <in>cry_025.s</in>
3929
+              <in>cry_026.s</in>
3930
+              <in>cry_027.s</in>
3931
+              <in>cry_028.s</in>
3932
+              <in>cry_029.s</in>
3933
+              <in>cry_030.s</in>
3934
+              <in>cry_031.s</in>
3935
+              <in>cry_032.s</in>
3936
+              <in>cry_033.s</in>
3937
+              <in>cry_034.s</in>
3938
+              <in>cry_035.s</in>
3939
+              <in>cry_036.s</in>
3940
+              <in>cry_037.s</in>
3941
+              <in>cry_038.s</in>
3942
+              <in>cry_039.s</in>
3943
+              <in>cry_040.s</in>
3944
+              <in>cry_041.s</in>
3945
+              <in>cry_042.s</in>
3946
+              <in>cry_043.s</in>
3947
+              <in>cry_044.s</in>
3948
+              <in>cry_045.s</in>
3949
+              <in>cry_046.s</in>
3950
+              <in>cry_047.s</in>
3951
+              <in>cry_048.s</in>
3952
+              <in>cry_049.s</in>
3953
+              <in>cry_050.s</in>
3954
+              <in>cry_051.s</in>
3955
+              <in>cry_052.s</in>
3956
+              <in>cry_053.s</in>
3957
+              <in>cry_054.s</in>
3958
+              <in>cry_055.s</in>
3959
+              <in>cry_056.s</in>
3960
+              <in>cry_057.s</in>
3961
+              <in>cry_058.s</in>
3962
+              <in>cry_059.s</in>
3963
+              <in>cry_060.s</in>
3964
+              <in>cry_061.s</in>
3965
+              <in>cry_062.s</in>
3966
+              <in>cry_063.s</in>
3967
+              <in>cry_064.s</in>
3968
+              <in>cry_065.s</in>
3969
+              <in>cry_066.s</in>
3970
+              <in>cry_067.s</in>
3971
+              <in>cry_068.s</in>
3972
+              <in>cry_069.s</in>
3973
+              <in>cry_070.s</in>
3974
+              <in>cry_071.s</in>
3975
+              <in>cry_072.s</in>
3976
+              <in>cry_073.s</in>
3977
+              <in>cry_074.s</in>
3978
+              <in>cry_075.s</in>
3979
+              <in>cry_076.s</in>
3980
+              <in>cry_077.s</in>
3981
+              <in>cry_078.s</in>
3982
+              <in>cry_079.s</in>
3983
+              <in>cry_080.s</in>
3984
+              <in>cry_081.s</in>
3985
+              <in>cry_082.s</in>
3986
+              <in>cry_083.s</in>
3987
+              <in>cry_084.s</in>
3988
+              <in>cry_085.s</in>
3989
+              <in>cry_086.s</in>
3990
+              <in>cry_087.s</in>
3991
+              <in>cry_088.s</in>
3992
+              <in>cry_089.s</in>
3993
+              <in>cry_090.s</in>
3994
+              <in>cry_091.s</in>
3995
+              <in>cry_092.s</in>
3996
+              <in>cry_093.s</in>
3997
+              <in>cry_094.s</in>
3998
+              <in>cry_095.s</in>
3999
+              <in>cry_096.s</in>
4000
+              <in>cry_097.s</in>
4001
+              <in>cry_098.s</in>
4002
+              <in>cry_099.s</in>
4003
+              <in>cry_100.s</in>
4004
+              <in>cry_101.s</in>
4005
+              <in>cry_102.s</in>
4006
+              <in>cry_103.s</in>
4007
+              <in>cry_104.s</in>
4008
+              <in>cry_105.s</in>
4009
+              <in>cry_106.s</in>
4010
+              <in>cry_107.s</in>
4011
+              <in>cry_108.s</in>
4012
+              <in>cry_109.s</in>
4013
+              <in>cry_110.s</in>
4014
+              <in>cry_111.s</in>
4015
+              <in>cry_112.s</in>
4016
+              <in>cry_113.s</in>
4017
+              <in>cry_114.s</in>
4018
+              <in>cry_115.s</in>
4019
+              <in>cry_116.s</in>
4020
+              <in>cry_117.s</in>
4021
+              <in>cry_118.s</in>
4022
+              <in>cry_119.s</in>
4023
+              <in>cry_120.s</in>
4024
+              <in>cry_121.s</in>
4025
+              <in>cry_122.s</in>
4026
+              <in>cry_123.s</in>
4027
+              <in>cry_124.s</in>
4028
+              <in>cry_125.s</in>
4029
+              <in>cry_126.s</in>
4030
+              <in>cry_127.s</in>
4031
+              <in>cry_128.s</in>
4032
+              <in>cry_129.s</in>
4033
+              <in>cry_130.s</in>
4034
+              <in>cry_131.s</in>
4035
+              <in>cry_132.s</in>
4036
+              <in>cry_133.s</in>
4037
+              <in>cry_134.s</in>
4038
+              <in>cry_135.s</in>
4039
+              <in>cry_136.s</in>
4040
+              <in>cry_137.s</in>
4041
+              <in>cry_138.s</in>
4042
+              <in>cry_139.s</in>
4043
+              <in>cry_140.s</in>
4044
+              <in>cry_141.s</in>
4045
+              <in>cry_142.s</in>
4046
+              <in>cry_143.s</in>
4047
+              <in>cry_144.s</in>
4048
+              <in>cry_145.s</in>
4049
+              <in>cry_146.s</in>
4050
+              <in>cry_147.s</in>
4051
+              <in>cry_148.s</in>
4052
+              <in>cry_149.s</in>
4053
+              <in>cry_150.s</in>
4054
+              <in>cry_151.s</in>
4055
+              <in>cry_152.s</in>
4056
+              <in>cry_153.s</in>
4057
+              <in>cry_154.s</in>
4058
+              <in>cry_155.s</in>
4059
+              <in>cry_156.s</in>
4060
+              <in>cry_157.s</in>
4061
+              <in>cry_158.s</in>
4062
+              <in>cry_159.s</in>
4063
+              <in>cry_160.s</in>
4064
+              <in>cry_161.s</in>
4065
+              <in>cry_162.s</in>
4066
+              <in>cry_163.s</in>
4067
+              <in>cry_164.s</in>
4068
+              <in>cry_165.s</in>
4069
+              <in>cry_166.s</in>
4070
+              <in>cry_167.s</in>
4071
+              <in>cry_168.s</in>
4072
+              <in>cry_169.s</in>
4073
+              <in>cry_170.s</in>
4074
+              <in>cry_171.s</in>
4075
+              <in>cry_172.s</in>
4076
+              <in>cry_173.s</in>
4077
+              <in>cry_174.s</in>
4078
+              <in>cry_175.s</in>
4079
+              <in>cry_176.s</in>
4080
+              <in>cry_177.s</in>
4081
+              <in>cry_178.s</in>
4082
+              <in>cry_179.s</in>
4083
+              <in>cry_180.s</in>
4084
+              <in>cry_181.s</in>
4085
+              <in>cry_182.s</in>
4086
+              <in>cry_183.s</in>
4087
+              <in>cry_184.s</in>
4088
+              <in>cry_185.s</in>
4089
+              <in>cry_186.s</in>
4090
+              <in>cry_187.s</in>
4091
+              <in>cry_188.s</in>
4092
+              <in>cry_189.s</in>
4093
+              <in>cry_190.s</in>
4094
+              <in>cry_191.s</in>
4095
+              <in>cry_192.s</in>
4096
+              <in>cry_193.s</in>
4097
+              <in>cry_194.s</in>
4098
+              <in>cry_195.s</in>
4099
+              <in>cry_196.s</in>
4100
+              <in>cry_197.s</in>
4101
+              <in>cry_198.s</in>
4102
+              <in>cry_199.s</in>
4103
+              <in>cry_200.s</in>
4104
+              <in>cry_201.s</in>
4105
+              <in>cry_202.s</in>
4106
+              <in>cry_203.s</in>
4107
+              <in>cry_204.s</in>
4108
+              <in>cry_205.s</in>
4109
+              <in>cry_206.s</in>
4110
+              <in>cry_207.s</in>
4111
+              <in>cry_208.s</in>
4112
+              <in>cry_209.s</in>
4113
+              <in>cry_210.s</in>
4114
+              <in>cry_211.s</in>
4115
+              <in>cry_212.s</in>
4116
+              <in>cry_213.s</in>
4117
+              <in>cry_214.s</in>
4118
+              <in>cry_215.s</in>
4119
+              <in>cry_216.s</in>
4120
+              <in>cry_217.s</in>
4121
+              <in>cry_218.s</in>
4122
+              <in>cry_219.s</in>
4123
+              <in>cry_220.s</in>
4124
+              <in>cry_221.s</in>
4125
+              <in>cry_222.s</in>
4126
+              <in>cry_223.s</in>
4127
+              <in>cry_224.s</in>
4128
+              <in>cry_225.s</in>
4129
+              <in>cry_226.s</in>
4130
+              <in>cry_227.s</in>
4131
+              <in>cry_228.s</in>
4132
+              <in>cry_229.s</in>
4133
+              <in>cry_230.s</in>
4134
+              <in>cry_231.s</in>
4135
+              <in>cry_232.s</in>
4136
+              <in>cry_233.s</in>
4137
+              <in>cry_234.s</in>
4138
+              <in>cry_235.s</in>
4139
+              <in>cry_236.s</in>
4140
+              <in>cry_237.s</in>
4141
+              <in>cry_238.s</in>
4142
+              <in>cry_239.s</in>
4143
+              <in>cry_240.s</in>
4144
+              <in>cry_241.s</in>
4145
+              <in>cry_242.s</in>
4146
+              <in>cry_243.s</in>
4147
+              <in>cry_244.s</in>
4148
+              <in>cry_245.s</in>
4149
+              <in>cry_246.s</in>
4150
+              <in>cry_247.s</in>
4151
+              <in>cry_248.s</in>
4152
+              <in>cry_249.s</in>
4153
+              <in>cry_250.s</in>
4154
+              <in>cry_251.s</in>
4155
+              <in>cry_252.s</in>
4156
+              <in>cry_253.s</in>
4157
+              <in>cry_254.s</in>
4158
+              <in>cry_255.s</in>
4159
+              <in>cry_256.s</in>
4160
+              <in>cry_257.s</in>
4161
+              <in>cry_258.s</in>
4162
+              <in>cry_259.s</in>
4163
+              <in>cry_260.s</in>
4164
+              <in>cry_261.s</in>
4165
+              <in>cry_262.s</in>
4166
+              <in>cry_263.s</in>
4167
+              <in>cry_264.s</in>
4168
+              <in>cry_265.s</in>
4169
+              <in>cry_266.s</in>
4170
+              <in>cry_267.s</in>
4171
+              <in>cry_268.s</in>
4172
+              <in>cry_269.s</in>
4173
+              <in>cry_270.s</in>
4174
+              <in>cry_271.s</in>
4175
+              <in>cry_272.s</in>
4176
+              <in>cry_273.s</in>
4177
+              <in>cry_274.s</in>
4178
+              <in>cry_275.s</in>
4179
+              <in>cry_276.s</in>
4180
+              <in>cry_277.s</in>
4181
+              <in>cry_278.s</in>
4182
+              <in>cry_279.s</in>
4183
+              <in>cry_280.s</in>
4184
+              <in>cry_281.s</in>
4185
+              <in>cry_282.s</in>
4186
+              <in>cry_283.s</in>
4187
+              <in>cry_284.s</in>
4188
+              <in>cry_285.s</in>
4189
+              <in>cry_286.s</in>
4190
+              <in>cry_287.s</in>
4191
+              <in>cry_288.s</in>
4192
+              <in>cry_289.s</in>
4193
+              <in>cry_290.s</in>
4194
+              <in>cry_291.s</in>
4195
+              <in>cry_292.s</in>
4196
+              <in>cry_293.s</in>
4197
+              <in>cry_294.s</in>
4198
+              <in>cry_295.s</in>
4199
+              <in>cry_296.s</in>
4200
+              <in>cry_297.s</in>
4201
+              <in>cry_298.s</in>
4202
+              <in>cry_299.s</in>
4203
+              <in>cry_300.s</in>
4204
+              <in>cry_301.s</in>
4205
+              <in>cry_302.s</in>
4206
+              <in>cry_303.s</in>
4207
+              <in>cry_304.s</in>
4208
+              <in>cry_305.s</in>
4209
+              <in>cry_306.s</in>
4210
+              <in>cry_307.s</in>
4211
+              <in>cry_308.s</in>
4212
+              <in>cry_309.s</in>
4213
+              <in>cry_310.s</in>
4214
+              <in>cry_311.s</in>
4215
+              <in>cry_312.s</in>
4216
+              <in>cry_313.s</in>
4217
+              <in>cry_314.s</in>
4218
+              <in>cry_315.s</in>
4219
+              <in>cry_316.s</in>
4220
+              <in>cry_317.s</in>
4221
+              <in>cry_318.s</in>
4222
+              <in>cry_319.s</in>
4223
+              <in>cry_320.s</in>
4224
+              <in>cry_321.s</in>
4225
+              <in>cry_322.s</in>
4226
+              <in>cry_323.s</in>
4227
+              <in>cry_324.s</in>
4228
+              <in>cry_325.s</in>
4229
+              <in>cry_326.s</in>
4230
+              <in>cry_327.s</in>
4231
+              <in>cry_328.s</in>
4232
+              <in>cry_329.s</in>
4233
+              <in>cry_330.s</in>
4234
+              <in>cry_331.s</in>
4235
+              <in>cry_332.s</in>
4236
+              <in>cry_333.s</in>
4237
+              <in>cry_334.s</in>
4238
+              <in>cry_335.s</in>
4239
+              <in>cry_336.s</in>
4240
+              <in>cry_337.s</in>
4241
+              <in>cry_338.s</in>
4242
+              <in>cry_339.s</in>
4243
+              <in>cry_340.s</in>
4244
+              <in>cry_341.s</in>
4245
+              <in>cry_342.s</in>
4246
+              <in>cry_343.s</in>
4247
+              <in>cry_344.s</in>
4248
+              <in>cry_345.s</in>
4249
+              <in>cry_346.s</in>
4250
+              <in>cry_347.s</in>
4251
+              <in>cry_348.s</in>
4252
+              <in>cry_349.s</in>
4253
+              <in>cry_350.s</in>
4254
+              <in>cry_351.s</in>
4255
+              <in>cry_352.s</in>
4256
+              <in>cry_353.s</in>
4257
+              <in>cry_354.s</in>
4258
+              <in>cry_355.s</in>
4259
+              <in>cry_356.s</in>
4260
+              <in>cry_357.s</in>
4261
+              <in>cry_358.s</in>
4262
+              <in>cry_359.s</in>
4263
+              <in>cry_360.s</in>
4264
+              <in>cry_361.s</in>
4265
+              <in>cry_362.s</in>
4266
+              <in>cry_363.s</in>
4267
+              <in>cry_364.s</in>
4268
+              <in>cry_365.s</in>
4269
+              <in>cry_366.s</in>
4270
+              <in>cry_367.s</in>
4271
+              <in>cry_368.s</in>
4272
+              <in>cry_369.s</in>
4273
+              <in>cry_370.s</in>
4274
+              <in>cry_371.s</in>
4275
+              <in>cry_372.s</in>
4276
+              <in>cry_373.s</in>
4277
+              <in>cry_374.s</in>
4278
+              <in>cry_375.s</in>
4279
+              <in>cry_376.s</in>
4280
+              <in>cry_377.s</in>
4281
+              <in>cry_378.s</in>
4282
+              <in>cry_379.s</in>
4283
+              <in>cry_380.s</in>
4284
+              <in>cry_381.s</in>
4285
+              <in>cry_382.s</in>
4286
+              <in>cry_383.s</in>
4287
+              <in>cry_384.s</in>
4288
+              <in>cry_385.s</in>
4289
+              <in>cry_386.s</in>
4290
+              <in>cry_387.s</in>
4291
+              <in>cry_388.s</in>
4292
+              <in>cry_389.s</in>
4293
+              <in>cry_390.s</in>
4294
+              <in>cry_391.s</in>
4295
+              <in>cry_392.s</in>
4296
+              <in>cry_393.s</in>
4297
+              <in>cry_394.s</in>
4298
+              <in>cry_395.s</in>
4299
+              <in>cry_396.s</in>
4300
+              <in>cry_397.s</in>
4301
+              <in>cry_398.s</in>
4302
+              <in>cry_399.s</in>
4303
+              <in>cry_400.s</in>
4304
+              <in>cry_401.s</in>
4305
+              <in>cry_402.s</in>
4306
+              <in>cry_403.s</in>
4307
+              <in>cry_404.s</in>
4308
+              <in>cry_405.s</in>
4309
+              <in>cry_406.s</in>
4310
+              <in>cry_407.s</in>
4311
+              <in>cry_408.s</in>
4312
+              <in>cry_409.s</in>
4313
+              <in>cry_410.s</in>
4314
+              <in>cry_411.s</in>
4315
+              <in>cry_412.s</in>
4316
+              <in>cry_413.s</in>
4317
+              <in>cry_414.s</in>
4318
+              <in>cry_415.s</in>
4319
+              <in>cry_416.s</in>
4320
+              <in>cry_417.s</in>
4321
+              <in>cry_418.s</in>
4322
+              <in>cry_419.s</in>
4323
+              <in>cry_420.s</in>
4324
+              <in>cry_421.s</in>
4325
+              <in>cry_422.s</in>
4326
+              <in>cry_423.s</in>
4327
+              <in>cry_424.s</in>
4328
+              <in>cry_425.s</in>
4329
+              <in>cry_426.s</in>
4330
+              <in>cry_427.s</in>
4331
+              <in>cry_428.s</in>
4332
+              <in>cry_429.s</in>
4333
+              <in>cry_430.s</in>
4334
+              <in>cry_431.s</in>
4335
+              <in>cry_432.s</in>
4336
+              <in>cry_433.s</in>
4337
+              <in>cry_434.s</in>
4338
+              <in>cry_435.s</in>
4339
+              <in>cry_436.s</in>
4340
+              <in>cry_437.s</in>
4341
+              <in>cry_438.s</in>
4342
+              <in>cry_439.s</in>
4343
+              <in>cry_440.s</in>
4344
+              <in>cry_441.s</in>
4345
+              <in>cry_442.s</in>
4346
+              <in>cry_443.s</in>
4347
+              <in>cry_444.s</in>
4348
+              <in>cry_445.s</in>
4349
+              <in>cry_446.s</in>
4350
+              <in>cry_447.s</in>
4351
+              <in>cry_448.s</in>
4352
+              <in>cry_449.s</in>
4353
+              <in>cry_450.s</in>
4354
+              <in>cry_451.s</in>
4355
+              <in>cry_452.s</in>
4356
+              <in>cry_453.s</in>
4357
+              <in>cry_454.s</in>
4358
+              <in>cry_455.s</in>
4359
+              <in>cry_456.s</in>
4360
+              <in>cry_457.s</in>
4361
+              <in>cry_458.s</in>
4362
+              <in>cry_459.s</in>
4363
+              <in>cry_460.s</in>
4364
+              <in>cry_461.s</in>
4365
+              <in>cry_462.s</in>
4366
+              <in>cry_463.s</in>
4367
+              <in>cry_464.s</in>
4368
+              <in>cry_465.s</in>
4369
+              <in>cry_466.s</in>
4370
+              <in>cry_467.s</in>
4371
+              <in>cry_468.s</in>
4372
+              <in>cry_469.s</in>
4373
+              <in>cry_470.s</in>
4374
+              <in>cry_471.s</in>
4375
+              <in>cry_472.s</in>
4376
+              <in>cry_473.s</in>
4377
+              <in>cry_474.s</in>
4378
+              <in>cry_475.s</in>
4379
+              <in>cry_476.s</in>
4380
+              <in>cry_477.s</in>
4381
+              <in>cry_478.s</in>
4382
+              <in>cry_479.s</in>
4383
+              <in>cry_480.s</in>
4384
+              <in>cry_481.s</in>
4385
+              <in>cry_482.s</in>
4386
+              <in>cry_483.s</in>
4387
+              <in>cry_484.s</in>
4388
+              <in>cry_485.s</in>
4389
+              <in>cry_486.s</in>
4390
+              <in>cry_487.s</in>
4391
+              <in>cry_488.s</in>
4392
+              <in>cry_489.s</in>
4393
+              <in>cry_490.s</in>
4394
+              <in>cry_491.s</in>
3896 4395
               <in>cry_492.s</in>
4396
+              <in>cry_492_zenith.s</in>
4397
+              <in>cry_493.s</in>
4398
+              <in>cry_494.s</in>
4399
+              <in>cry_495.s</in>
4400
+              <in>cry_496.s</in>
4401
+              <in>cry_497.s</in>
4402
+              <in>cry_498.s</in>
4403
+              <in>cry_499.s</in>
4404
+              <in>cry_500.s</in>
4405
+              <in>cry_501.s</in>
4406
+              <in>cry_502.s</in>
4407
+              <in>cry_503.s</in>
4408
+              <in>cry_504.s</in>
4409
+              <in>cry_505.s</in>
4410
+              <in>cry_506.s</in>
4411
+              <in>cry_507.s</in>
4412
+              <in>cry_508.s</in>
4413
+              <in>cry_509.s</in>
4414
+              <in>cry_510.s</in>
4415
+              <in>cry_511.s</in>
4416
+              <in>cry_512.s</in>
4417
+              <in>cry_513.s</in>
4418
+              <in>cry_514.s</in>
4419
+              <in>cry_515.s</in>
4420
+              <in>cry_516.s</in>
4421
+              <in>cry_517.s</in>
4422
+              <in>cry_518.s</in>
4423
+              <in>cry_519.s</in>
4424
+              <in>cry_520.s</in>
4425
+              <in>cry_521.s</in>
4426
+              <in>cry_522.s</in>
4427
+              <in>cry_523.s</in>
4428
+              <in>cry_524.s</in>
4429
+              <in>cry_525.s</in>
4430
+              <in>cry_526.s</in>
4431
+              <in>cry_527.s</in>
4432
+              <in>cry_528.s</in>
4433
+              <in>cry_529.s</in>
4434
+              <in>cry_530.s</in>
4435
+              <in>cry_531.s</in>
4436
+              <in>cry_532.s</in>
4437
+              <in>cry_533.s</in>
4438
+              <in>cry_534.s</in>
4439
+              <in>cry_535.s</in>
4440
+              <in>cry_536.s</in>
4441
+              <in>cry_537.s</in>
4442
+              <in>cry_538.s</in>
4443
+              <in>cry_539.s</in>
4444
+              <in>cry_540.s</in>
4445
+              <in>cry_541.s</in>
4446
+              <in>cry_542.s</in>
4447
+              <in>cry_543.s</in>
4448
+              <in>cry_544.s</in>
4449
+              <in>cry_545.s</in>
4450
+              <in>cry_546.s</in>
4451
+              <in>cry_547.s</in>
4452
+              <in>cry_548.s</in>
4453
+              <in>cry_549.s</in>
4454
+              <in>cry_550.s</in>
4455
+              <in>cry_551.s</in>
4456
+              <in>cry_552.s</in>
4457
+              <in>cry_553.s</in>
4458
+              <in>cry_554.s</in>
4459
+              <in>cry_555.s</in>
4460
+              <in>cry_556.s</in>
4461
+              <in>cry_557.s</in>
4462
+              <in>cry_558.s</in>
4463
+              <in>cry_559.s</in>
4464
+              <in>cry_560.s</in>
4465
+              <in>cry_561.s</in>
4466
+              <in>cry_562.s</in>
4467
+              <in>cry_563.s</in>
4468
+              <in>cry_564.s</in>
4469
+              <in>cry_565.s</in>
4470
+              <in>cry_566.s</in>
4471
+              <in>cry_567.s</in>
4472
+              <in>cry_568.s</in>
4473
+              <in>cry_569.s</in>
4474
+              <in>cry_570.s</in>
4475
+              <in>cry_571.s</in>
4476
+              <in>cry_572.s</in>
4477
+              <in>cry_573.s</in>
4478
+              <in>cry_574.s</in>
4479
+              <in>cry_575.s</in>
4480
+              <in>cry_576.s</in>
4481
+              <in>cry_577.s</in>
4482
+              <in>cry_578.s</in>
4483
+              <in>cry_579.s</in>
4484
+              <in>cry_580.s</in>
4485
+              <in>cry_581.s</in>
4486
+              <in>cry_582.s</in>
4487
+              <in>cry_583.s</in>
4488
+              <in>cry_584.s</in>
4489
+              <in>cry_585.s</in>
4490
+              <in>cry_586.s</in>
4491
+              <in>cry_587.s</in>
4492
+              <in>cry_588.s</in>
4493
+              <in>cry_589.s</in>
4494
+              <in>cry_590.s</in>
4495
+              <in>cry_591.s</in>
4496
+              <in>cry_592.s</in>
4497
+              <in>cry_593.s</in>
4498
+              <in>cry_594.s</in>
4499
+              <in>cry_595.s</in>
4500
+              <in>cry_596.s</in>
4501
+              <in>cry_597.s</in>
4502
+              <in>cry_598.s</in>
4503
+              <in>cry_599.s</in>
4504
+              <in>cry_600.s</in>
4505
+              <in>cry_601.s</in>
4506
+              <in>cry_602.s</in>
4507
+              <in>cry_603.s</in>
4508
+              <in>cry_604.s</in>
4509
+              <in>cry_605.s</in>
4510
+              <in>cry_606.s</in>
4511
+              <in>cry_607.s</in>
4512
+              <in>cry_608.s</in>
4513
+              <in>cry_609.s</in>
4514
+              <in>cry_610.s</in>
4515
+              <in>cry_611.s</in>
4516
+              <in>cry_612.s</in>
4517
+              <in>cry_613.s</in>
4518
+              <in>cry_614.s</in>
4519
+              <in>cry_615.s</in>
4520
+              <in>cry_616.s</in>
4521
+              <in>cry_617.s</in>
4522
+              <in>cry_618.s</in>
4523
+              <in>cry_619.s</in>
4524
+              <in>cry_620.s</in>
4525
+              <in>cry_621.s</in>
4526
+              <in>cry_622.s</in>
4527
+              <in>cry_623.s</in>
4528
+              <in>cry_624.s</in>
4529
+              <in>cry_625.s</in>
4530
+              <in>cry_626.s</in>
4531
+              <in>cry_627.s</in>
4532
+              <in>cry_628.s</in>
4533
+              <in>cry_629.s</in>
4534
+              <in>cry_630.s</in>
4535
+              <in>cry_631.s</in>
4536
+              <in>cry_632.s</in>
4537
+              <in>cry_633.s</in>
4538
+              <in>cry_634.s</in>
4539
+              <in>cry_635.s</in>
4540
+              <in>cry_636.s</in>
4541
+              <in>cry_637.s</in>
4542
+              <in>cry_638.s</in>
4543
+              <in>cry_639.s</in>
4544
+              <in>cry_640.s</in>
4545
+              <in>cry_641.s</in>
4546
+              <in>cry_642.s</in>
4547
+              <in>cry_643.s</in>
4548
+              <in>cry_644.s</in>
4549
+              <in>cry_645.s</in>
4550
+              <in>cry_646.s</in>
4551
+              <in>cry_647.s</in>
4552
+              <in>cry_648.s</in>
4553
+              <in>cry_649.s</in>
4554
+              <in>cry_650.s</in>
4555
+              <in>cry_651.s</in>
4556
+              <in>cry_652.s</in>
4557
+              <in>cry_653.s</in>
4558
+              <in>cry_654.s</in>
4559
+              <in>cry_655.s</in>
4560
+              <in>cry_656.s</in>
4561
+              <in>cry_657.s</in>
4562
+              <in>cry_658.s</in>
4563
+              <in>cry_659.s</in>
4564
+              <in>cry_660.s</in>
4565
+              <in>cry_661.s</in>
4566
+              <in>cry_662.s</in>
4567
+              <in>cry_663.s</in>
4568
+              <in>cry_664.s</in>
4569
+              <in>cry_665.s</in>
4570
+              <in>cry_666.s</in>
4571
+              <in>cry_667.s</in>
4572
+              <in>cry_668.s</in>
4573
+              <in>cry_669.s</in>
4574
+              <in>cry_670.s</in>
4575
+              <in>cry_671.s</in>
4576
+              <in>cry_672.s</in>
4577
+              <in>cry_673.s</in>
4578
+              <in>cry_674.s</in>
4579
+              <in>cry_675.s</in>
4580
+              <in>cry_676.s</in>
4581
+              <in>cry_677.s</in>
4582
+              <in>cry_678.s</in>
4583
+              <in>cry_679.s</in>
4584
+              <in>cry_680.s</in>
4585
+              <in>cry_681.s</in>
4586
+              <in>cry_682.s</in>
4587
+              <in>cry_683.s</in>
4588
+              <in>cry_684.s</in>
4589
+              <in>cry_685.s</in>
4590
+              <in>cry_686.s</in>
4591
+              <in>cry_687.s</in>
4592
+              <in>cry_688.s</in>
4593
+              <in>cry_689.s</in>
4594
+              <in>cry_690.s</in>
4595
+              <in>cry_691.s</in>
4596
+              <in>cry_692.s</in>
4597
+              <in>cry_693.s</in>
4598
+              <in>cry_694.s</in>
4599
+              <in>cry_695.s</in>
4600
+              <in>cry_696.s</in>
4601
+              <in>cry_697.s</in>
4602
+              <in>cry_698.s</in>
4603
+              <in>cry_699.s</in>
4604
+              <in>cry_700.s</in>
4605
+              <in>cry_701.s</in>
4606
+              <in>cry_702.s</in>
4607
+              <in>cry_703.s</in>
4608
+              <in>cry_704.s</in>
4609
+              <in>cry_705.s</in>
4610
+              <in>cry_706.s</in>
4611
+              <in>cry_707.s</in>
4612
+              <in>cry_708.s</in>
4613
+              <in>cry_709.s</in>
4614
+              <in>cry_710.s</in>
4615
+              <in>cry_711.s</in>
4616
+              <in>cry_712.s</in>
4617
+              <in>cry_713.s</in>
4618
+              <in>cry_714.s</in>
4619
+              <in>cry_715.s</in>
4620
+              <in>cry_716.s</in>
4621
+              <in>cry_717.s</in>
4622
+              <in>cry_718.s</in>
4623
+              <in>cry_NULL.s</in>
3897 4624
             </df>
3898 4625
             <df name="TABLE">
3899 4626
               <in>_forward_crytable.s</in>
@@ -4600,6 +5327,16 @@
4600 5327
             </df>
4601 5328
             <df name="SFX">
4602 5329
             </df>
5330
+            <df name="temp">
5331
+              <df name="chords">
5332
+              </df>
5333
+              <df name="chords_looped">
5334
+              </df>
5335
+              <df name="chords_normalized">
5336
+              </df>
5337
+              <df name="guitar">
5338
+              </df>
5339
+            </df>
4603 5340
             <df name="WAV">
4604 5341
             </df>
4605 5342
           </df>
@@ -4744,10 +5481,17 @@
4744 5481
           <in>entry_hazards_hook.S</in>
4745 5482
           <in>move_table.c</in>
4746 5483
         </df>
5484
+        <df name="debug">
5485
+          <in>debug.c</in>
5486
+        </df>
4747 5487
         <df name="encode">
4748 5488
           <in>crc32.c</in>
4749 5489
         </df>
4750 5490
         <df name="include">
5491
+          <df name="assets">
5492
+            <in>ascii.c</in>
5493
+            <in>ascii.h</in>
5494
+          </df>
4751 5495
           <in>abilities.h</in>
4752 5496
           <in>attack_names.h</in>
4753 5497
           <in>battle.h</in>
@@ -4759,6 +5503,7 @@
4759 5503
           <in>callback.h</in>
4760 5504
           <in>config.h</in>
4761 5505
           <in>custom_structs.h</in>
5506
+          <in>debug.h</in>
4762 5507
           <in>fade.h</in>
4763 5508
           <in>item_effects.h</in>
4764 5509
           <in>items.h</in>
@@ -4867,8 +5612,18 @@
4867 5612
         <gdb_interceptlist>
4868 5613
           <gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
4869 5614
         </gdb_interceptlist>
5615
+        <gdb_signals>
5616
+        </gdb_signals>
4870 5617
         <gdb_options>
4871 5618
           <DebugOptions>
5619
+            <option name="gdb_init_file"
5620
+                    value="C:\cygwin64\home\auerp\sots\emu\gdbinit.gdb"/>
5621
+            <option name="gdb_source_dirs" value="src"/>
5622
+            <option name="debug_command" value="&quot;../emu/mgba.exe&quot; -g &quot;build/pkmn_sots.gba&quot;"/>
5623
+            <option name="debug_dir"
5624
+                    value="C:\cygwin64\home\auerp\sots\source_of_the_sovereign\."/>
5625
+            <option name="symbol_file"
5626
+                    value="C:\cygwin64\home\auerp\sots\source_of_the_sovereign\object\linked.o"/>
4872 5627
           </DebugOptions>
4873 5628
         </gdb_options>
4874 5629
         <gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>

+ 118
- 0
src/debug/debug.c Целия файл

@@ -0,0 +1,118 @@
1
+#include <bpre.h>
2
+#include <debug.h>
3
+#include <assets/ascii.h>
4
+
5
+void set_background(u16 color) {
6
+    u16* bgc = (u16*) 0x020375f8;
7
+    *bgc = color;
8
+    return;
9
+}
10
+
11
+void debug_scene() {
12
+    if (superstate.multi_purpose_state_tracker == 0) {
13
+        print_memory->row = 0;
14
+        print_memory->line = 0;
15
+        print_memory->color = 0;
16
+        gpu_tile_bg_drop_all_sets(0);
17
+        gpu_tile_bg_drop_all_sets(1);
18
+        gpu_tile_bg_drop_all_sets(2);
19
+        gpu_tile_bg_drop_all_sets(3);
20
+
21
+        bg_vram_setup(0, standard_bg, 4);
22
+
23
+        gpu_bg_show(0);
24
+        gpu_bg_show(1);
25
+        gpu_bg_show(2);
26
+        gpu_bg_show(3);
27
+
28
+        gpu_sync_bg_visibility_and_mode();
29
+        reset_scrolling_debug();
30
+        obj_delete_all();
31
+        memset((void*) 0x06000000, 0, 0x17fe0);
32
+        memset((void*) 0x020375F8, 0, 0x400);
33
+        superstate.multi_purpose_state_tracker++;
34
+    } else if (superstate.multi_purpose_state_tracker == 1) {
35
+        vram_decompress((void*) asciiTiles, (void*) 0x06000000);
36
+        memcpy((void*) 0x020375F8, (void*) asciiPal, 0x60);
37
+        set_background(0x0000);
38
+        superstate.multi_purpose_state_tracker++;
39
+    } else if (superstate.multi_purpose_state_tracker == 2) {
40
+        init_unit_test();
41
+        superstate.multi_purpose_state_tracker++;
42
+    }
43
+    return;
44
+}
45
+
46
+void some_test() {
47
+    set_callback2(debug_scene);
48
+    superstate.multi_purpose_state_tracker = 0;
49
+
50
+    return;
51
+}
52
+
53
+void reset_scrolling_debug() {
54
+    lcd_io_set_func(0x14, 0x0);
55
+    lcd_io_set_func(0x16, 0x0);
56
+    lcd_io_set_func(0x18, 0x0);
57
+    lcd_io_set_func(0x1A, 0x0);
58
+    lcd_io_set_func(0x1C, 0x0);
59
+    lcd_io_set_func(0x1E, 0x0);
60
+
61
+    return;
62
+}
63
+
64
+void init_unit_test() {
65
+    print("Hello\nWorld!\xFE\x2\nHello\nWorld!");
66
+}
67
+
68
+void print_string(u16 line, u16 row, u8 color, char* pBuf) {
69
+    while (*pBuf) {
70
+        print_character(line, row++, *pBuf++, color);
71
+    }
72
+    return;
73
+}
74
+
75
+void print(char* str) {
76
+    while(*str)
77
+    {
78
+        if(*str== '\n')
79
+        {
80
+            print_memory->line++;
81
+            print_memory->row = 0;
82
+        }
83
+        else if(*str == '\xFE')
84
+        {
85
+            str++;
86
+            u8 c = *str;
87
+            if(c > 2)
88
+                c = 0;
89
+            print_memory->color=c;
90
+        }
91
+        else
92
+        {
93
+            print_character(print_memory->line, print_memory->row, *str, print_memory->color);
94
+            print_memory->row++;
95
+        }
96
+        str++;
97
+    }
98
+    return;
99
+}
100
+
101
+void print_character(u16 line, u16 row, char character, u8 color) {
102
+    if (color > 2)
103
+        color = 0;
104
+    u16 position = (32 * line) + row;
105
+    union t_map_entry map_entry;
106
+    map_entry.entry.tile = char_to_byte(character);
107
+    map_entry.entry.pal = color;
108
+    u16* ptr = (u16*) (0x0600C800 + (position * 2));
109
+    *ptr = map_entry.short_map;
110
+    return;
111
+}
112
+
113
+u8 char_to_byte(char character) {
114
+    if (character >= 0x20 && character <= 0x7E)
115
+        return character - 0x20;
116
+    else
117
+        return 3;
118
+}

+ 83
- 0
src/include/assets/ascii.c Целия файл

@@ -0,0 +1,83 @@
1
+
2
+//{{BLOCK(ascii)
3
+
4
+//======================================================================
5
+//
6
+//	ascii, 256x24@4, 
7
+//	+ palette 256 entries, not compressed
8
+//	+ 96 tiles lz77 compressed
9
+//	Total size: 512 + 644 = 1156
10
+//
11
+//	Time-stamp: 2016-08-17, 18:10:07
12
+//	Exported by Cearn's GBA Image Transmogrifier, v0.8.13
13
+//	( http://www.coranac.com/projects/#grit )
14
+//
15
+//======================================================================
16
+
17
+const unsigned int asciiTiles[161] __attribute__((aligned(4))) __attribute__((visibility("hidden")))=
18
+{
19
+	0x000C0010,0xF0000033,0x1005A001,0x5003F001,0x1E20BC17,0xF0032011,0x303E5038,0x3E11111F,
20
+	0x07900111,0x5F103360,0x3C001B20,0x47108E11,0x10100110,0x30675007,0x01790111,0x2B204310,
21
+	0x6D300D60,0x83400111,0x000700CD,0x10101120,0x116B0019,0x50FF9440,0x40A2F0BF,0x106B400A,
22
+	0x3003501F,0xFF1E608C,0x24400F70,0x9F104FC0,0xE300BB10,0x0F30E810,0x0043F1FF,0xA0AC209F,
23
+	0xF001F0DB,0x108A61B3,0x2EF0FF3F,0x63B001F0,0x06B0E070,0xAF303F41,0x11FFC701,0x307B0177,
24
+	0x518B310D,0xF25B119F,0xFF3F9007,0xAB5063E0,0x9B011F90,0x5F90CD31,0x33219801,0x22B721FF,
25
+	0x308C7127,0x428222F3,0x103FF01B,0x9A40FF3F,0xBF70CB60,0x9FC03331,0xF360BFF0,0xC0FF3FD0,
26
+	0x9198711F,0xF0D3D18A,0xA10FF00F,0xFF1C12DF,0x04801A32,0x03F2FBF1,0x3C508A73,0xDFC14750,
27
+
28
+	0x8303A2FF,0x03FF61BF,0x93033062,0x311FB18B,0x0170FF8B,0x1F908F40,0xB4420BA0,0x76C11B03,
29
+	0x50FFE623,0x90BF53CF,0x40530459,0x22FF61E6,0xFF3E7303,0x1FF00F91,0xDF623E84,0xBB70AB24,
30
+	0xD1904F51,0x34DFF0FF,0x7103F593,0xA31CF01F,0x43D9623F,0x0720FF52,0x3F41E922,0xDFA05AF0,
31
+	0x01105D25,0x117F3F05,0x6D35A401,0x1F707535,0xFB348505,0xA0FF6915,0x91BFA11F,0xC11F73BB,
32
+	0x21E6C5BF,0xFF01C0BE,0x8F826305,0x4383FFC1,0x5F255F94,0x9FF36425,0x8600F1FF,0xA301F05F,
33
+	0x7117F0DF,0x467F61B3,0x3F11FFA5,0x51114711,0x51363F61,0xBF45E761,0xF0FF5534,0x6420D11F,
34
+	0x345BC5AF,0x96D346C7,0xFF67665B,0x13931F52,0x335108E0,0x9FA503F0,0x01F073F6,0x95F5C6FF,
35
+	0xF0EF96DF,0x21276601,0x73234300,0x7BF5FF3F,0x67A6FFA3,0x3FC30394,0xE7D47BD3,0xC4FF4762,
36
+
37
+	0xF1FF559F,0xC3F0D067,0xF0EF55FB,0xFFFFA3BF,0xC4E4EF98,0x28582058,0x8FB403B0,0xEF54D774,
38
+	0xF057F0FF,0x49C4675F,0xC6039443,0xF1BFF01F,0x3FE3FF3F,0x07B43FF0,0x07973FF1,0x7B77A479,
39
+	0x91FFEEF6,0x81E3A9FF,0x28BFE136,0xF263B92B,0xFF1FF01F,0xE5A9CBA3,0xB3DA03B4,0x4F3AF573,
40
+	0x5FF05FE1,0xD403BAFF,0x88A76707,0x7AC27873,0xC8FBF15F,0x33C0FC9F,0xF76A1BFA,0x01F0B5F3,
41
+	0x000101D0,
42
+};
43
+
44
+const unsigned short asciiPal[256] __attribute__((aligned(4))) __attribute__((visibility("hidden")))=
45
+{
46
+	0x7C1F,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
47
+	0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
48
+	0x7C1F,0x03E0,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
49
+	0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
50
+	0x7C1F,0x001F,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
51
+	0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
52
+	0x7FFF,0x7FFF,0x7FFF,0x18C6,0x18C6,0x18C6,0x18C6,0x18C6,
53
+	0x1CE7,0x1CE7,0x1CE7,0x1CE7,0x1CE7,0x1CE7,0x1CE7,0x1CE7,
54
+
55
+	0x2108,0x2108,0x2108,0x2108,0x2108,0x2108,0x2108,0x2108,
56
+	0x2529,0x2529,0x2529,0x2529,0x2529,0x2529,0x2529,0x2529,
57
+	0x294A,0x294A,0x294A,0x294A,0x294A,0x294A,0x294A,0x294A,
58
+	0x2D6B,0x2D6B,0x2D6B,0x2D6B,0x2D6B,0x2D6B,0x2D6B,0x2D6B,
59
+	0x318C,0x318C,0x318C,0x318C,0x318C,0x318C,0x318C,0x318C,
60
+	0x35AD,0x35AD,0x35AD,0x35AD,0x35AD,0x35AD,0x35AD,0x35AD,
61
+	0x39CE,0x39CE,0x39CE,0x39CE,0x39CE,0x39CE,0x39CE,0x39CE,
62
+	0x3DEF,0x3DEF,0x3DEF,0x3DEF,0x3DEF,0x3DEF,0x3DEF,0x3DEF,
63
+
64
+	0x4210,0x4210,0x4210,0x4210,0x4210,0x4210,0x4210,0x4210,
65
+	0x4631,0x4631,0x4631,0x4631,0x4631,0x4631,0x4631,0x4631,
66
+	0x4A52,0x4A52,0x4A52,0x4A52,0x4A52,0x4A52,0x4A52,0x4A52,
67
+	0x4E73,0x4E73,0x4E73,0x4E73,0x4E73,0x4E73,0x4E73,0x4E73,
68
+	0x5294,0x5294,0x5294,0x5294,0x5294,0x5294,0x5294,0x5294,
69
+	0x56B5,0x56B5,0x56B5,0x56B5,0x56B5,0x56B5,0x56B5,0x56B5,
70
+	0x5AD6,0x5AD6,0x5AD6,0x5AD6,0x5AD6,0x5AD6,0x5AD6,0x5AD6,
71
+	0x5EF7,0x5EF7,0x5EF7,0x5EF7,0x5EF7,0x5EF7,0x5EF7,0x5EF7,
72
+
73
+	0x6318,0x6318,0x6318,0x6318,0x6318,0x6318,0x6318,0x6318,
74
+	0x6739,0x6739,0x6739,0x6739,0x6739,0x6739,0x6739,0x6739,
75
+	0x6B5A,0x6B5A,0x6B5A,0x6B5A,0x6B5A,0x6B5A,0x6B5A,0x6B5A,
76
+	0x6F7B,0x6F7B,0x6F7B,0x6F7B,0x6F7B,0x6F7B,0x6F7B,0x6F7B,
77
+	0x739C,0x739C,0x739C,0x739C,0x739C,0x739C,0x739C,0x739C,
78
+	0x77BD,0x77BD,0x77BD,0x77BD,0x77BD,0x77BD,0x77BD,0x77BD,
79
+	0x7BDE,0x7BDE,0x7BDE,0x7BDE,0x7BDE,0x7BDE,0x7BDE,0x7BDE,
80
+	0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
81
+};
82
+
83
+//}}BLOCK(ascii)

+ 28
- 0
src/include/assets/ascii.h Целия файл

@@ -0,0 +1,28 @@
1
+
2
+//{{BLOCK(ascii)
3
+
4
+//======================================================================
5
+//
6
+//	ascii, 256x24@4, 
7
+//	+ palette 256 entries, not compressed
8
+//	+ 96 tiles lz77 compressed
9
+//	Total size: 512 + 644 = 1156
10
+//
11
+//	Time-stamp: 2016-08-17, 18:10:07
12
+//	Exported by Cearn's GBA Image Transmogrifier, v0.8.13
13
+//	( http://www.coranac.com/projects/#grit )
14
+//
15
+//======================================================================
16
+
17
+#ifndef GRIT_ASCII_H
18
+#define GRIT_ASCII_H
19
+
20
+#define asciiTilesLen 644
21
+extern const unsigned int asciiTiles[161];
22
+
23
+#define asciiPalLen 512
24
+extern const unsigned short asciiPal[256];
25
+
26
+#endif // GRIT_ASCII_H
27
+
28
+//}}BLOCK(ascii)

+ 1
- 0
src/include/bpre.h Целия файл

@@ -14,6 +14,7 @@ void clear_flag(u16 flag);
14 14
 u16 random();
15 15
 void* malloc(int size);
16 16
 void free(void* address);
17
+void* memcpy (void * destination, const void* source, u32 num);
17 18
 
18 19
 //debug
19 20
 void agbprintf(const char* pBuf, ...);

+ 21
- 0
src/include/debug.h Целия файл

@@ -0,0 +1,21 @@
1
+#ifndef DEBUG_H
2
+#define DEBUG_H
3
+
4
+struct print_engine{
5
+    u8 line;
6
+    u8 row;
7
+    u8 color;
8
+};
9
+
10
+static struct print_engine* print_memory = (struct print_engine*)(0x0203FFF0);
11
+
12
+void some_test();
13
+void reset_scrolling_debug();
14
+void init_unit_test();
15
+void debug_scene();
16
+u8 char_to_byte(char character);
17
+void print_character(u16 line, u16 row, char character, u8 color);
18
+void print_string(u16 line, u16 row, u8 color, char* pBuf);
19
+
20
+#endif /* DEBUG_H */
21
+

+ 27
- 8
src/include/lcd.h Целия файл

@@ -3,14 +3,32 @@
3 3
 
4 4
 #include "objects.h"
5 5
 
6
-struct bg_config
7
-{
8
-	u32 id : 2;
9
-	u32 char_base : 2;
10
-	u32 map_base : 5;
11
-	u32 size: 2;
12
-	u32 colormode : 1;
13
-	u32 priority : 2;
6
+struct bg_config {
7
+    u32 id : 2;
8
+    u32 char_base : 2;
9
+    u32 map_base : 5;
10
+    u32 size : 2;
11
+    u32 colormode : 1;
12
+    u32 priority : 2;
13
+};
14
+
15
+struct map_entry {
16
+    u16 tile : 10;
17
+    u16 hflip : 1;
18
+    u16 vflip : 1;
19
+    u16 pal : 4;
20
+};
21
+
22
+union t_map_entry{
23
+    u16 short_map;
24
+    struct map_entry entry;
25
+};
26
+
27
+static struct bg_config standard_bg[4] = {
28
+    {0, 0, 0x19, 0, 0, 0},
29
+    {1, 1, 0x1A, 0, 0, 1},
30
+    {2, 2, 0x1B, 0, 0, 2},
31
+    {3, 3, 0x1C, 0, 0, 3}
14 32
 };
15 33
 
16 34
 u8 gpu_copy_to_vram_by_bgid(u8 bg_id, void* source, u16 byte_size, u16 start_tile, u8 mode);
@@ -22,6 +40,7 @@ void bg_nullify_tilemap(u8 bg_id);
22 40
 void* bg_get_tilemap(u8 bg_id);
23 41
 void bg_send_tilemap(u8 bg_id);
24 42
 void wram_decompress(void* src, void* dst);
43
+void vram_decompress(void* src, void* dst);
25 44
 void pal_decompress_slice_to_faded_and_unfaded(void* src, u16 start, u16 end);
26 45
 void gpu_bg_show(u8 id);
27 46
 void gpu_bg_hide(u8 id);

+ 3
- 1
src/specials/custom_specials.c Целия файл

@@ -1,6 +1,7 @@
1 1
 #include <bpre.h>
2 2
 #include "cutscene_meteor.h"
3 3
 #include "camera_move.h"
4
+#include <debug.h>
4 5
 
5 6
 void init_script()
6 7
 {
@@ -10,10 +11,11 @@ void init_script()
10 11
   }
11 12
 }
12 13
 
13
-static callback special_routines[3] = {
14
+static callback special_routines[4] = {
14 15
 	play_meteor,
15 16
 	sp_move_camera,
16 17
 	init_script,
18
+        some_test,
17 19
 };
18 20
 
19 21
 

+ 0
- 7
src/specials/cutscene_meteor.c Целия файл

@@ -157,13 +157,6 @@ void end_playback()
157 157
 	free(memory->cloud_map);
158 158
 }
159 159
 
160
-static struct bg_config standard_bg[4] = {
161
-	{0,0,0x19,0,0,0},
162
-	{1,1,0x1A,0,0,1},
163
-	{2,2,0x1B,0,0,2},
164
-	{3,3,0x1C,0,0,3}
165
-};
166
-
167 160
 void setup_scrolling()
168 161
 {
169 162
 	lcd_io_set_func(0x14, 0x0);