From f2fb01012831c2e3fd8a17e32f1b02d487a2b314 Mon Sep 17 00:00:00 2001 From: lephe Date: Thu, 5 May 2016 13:30:49 +0200 Subject: [PATCH] Changed test application name to 'ginttest'. Added build instructions to README. --- Makefile | 28 ++--- README.md | 15 ++- addin.c | 311 ------------------------------------------------------ addin.g1a | Bin 12280 -> 0 bytes addin.ld | 104 ------------------ libc.a | Bin 1770 -> 1770 bytes libgint.a | Bin 22334 -> 22334 bytes 7 files changed, 29 insertions(+), 429 deletions(-) delete mode 100644 addin.c delete mode 100644 addin.g1a delete mode 100644 addin.ld diff --git a/Makefile b/Makefile index 0a75411..9fdcb10 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,9 @@ ob = sh3eb-elf-objcopy wr = g1a-wrapper # Output files -g1a = addin.g1a -bin = build/addin.bin -elf = build/addin.elf +g1a = ginttest.g1a +bin = build/ginttest.bin +elf = build/ginttest.elf # Command-line options cflags = -m3 -mb -nostdlib -ffreestanding \ @@ -51,7 +51,7 @@ obj-std = $(addprefix build/, $(addsuffix .o, $(src-std))) hdr-std = $(addprefix include/, $(hea-std)) # Test application. -src-app = addin.c +src-app = ginttest.c res-app = icon.o swords.o sprites.o symbol.o symbol2.o @@ -59,7 +59,7 @@ res-app = icon.o swords.o sprites.o symbol.o symbol2.o # Building rules. # -all: build libgint.a libc.a addin.g1a +all: build libgint.a libc.a ginttest.g1a build: mkdir -p build @@ -74,12 +74,12 @@ libc.a: $(obj-std) @ echo "\033[32;1mStandard file size: "`stat -c %s libc.a` \ "bytes\033[0m" -addin.g1a: libgint.a $(src-app) $(res-app) - $(cc) $(src-app) $(res-app) -T addin.ld -o $(elf) $(cflags) $(lib) +ginttest.g1a: libgint.a $(src-app) $(res-app) + $(cc) $(src-app) $(res-app) -T ginttest.ld -o $(elf) $(cflags) $(lib) $(ob) -R .comment -R .bss -O binary $(elf) $(bin) - $(wr) $(bin) -o addin.g1a -i icon.bmp + $(wr) $(bin) -o ginttest.g1a -i icon.bmp @ echo "\033[32;1mBinary file size: "`stat -c %s $(bin)`" bytes\033[0m" -# @ sh3eb-elf-objdump -h build/addin.elf +# @ sh3eb-elf-objdump -h build/ginttest.elf build/%.c.o: src/%.c $(hdr-lib) $(hdr-std) $(cc) $(cflags) -O2 -c $< -o $@ @@ -104,10 +104,12 @@ build/gint.c.o: src/gint.c $(hdr-lib) $(hdr-std) clean: @ rm -f $(obj-lib) $(obj-std) $(obj-app) $(bin) $(elf) -fclean: clean +mrproper: clean @ rm -f build/* - @ rm -f addin.g1a libc.a libgint.a -re: fclean all + @ rm -f ginttest.g1a libc.a libgint.a +distclean: mrproper + +re: distclean all @@ -116,4 +118,4 @@ re: fclean all # install: - usb-connector SEND addin.g1a addin.g1a fls0 + usb-connector SEND ginttest.g1a ginttest.g1a fls0 diff --git a/README.md b/README.md index 84791dd..4a94658 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ gint project ============ -gint (pronounce guin) is a low-level library for fx-9860G calculators. It +gint (pronounce 'guin') is a low-level library for fx-9860G calculators. It provides the tools needed to develop programs under Linux using the gcc toolchain (sh3eb-elf). @@ -31,3 +31,16 @@ Public Interface gint's API provides access to keyboard, timers, clock and more. It does some powerful drawing and offers reliable multi-getkey, a gray engine, facilitates register access and implements a few standard functions. + + + +Building and installing +----------------------- + +The easiest way to build gint is simply to enter a terminal and execute `make`. +This will build the following components : +* `libgint.a`, the gint library +* `libc.a`, a (very) few standard procedures +* `ginttest.g1a`, a test application + +The common `clean`, `mrproper`, and `distclean` rules will clean the directory. diff --git a/addin.c b/addin.c deleted file mode 100644 index 5133959..0000000 --- a/addin.c +++ /dev/null @@ -1,311 +0,0 @@ -#include -#include -#include -#include -#include - -extern void __Print(const char *msg, int x, int y); -extern unsigned int gint_vbr, bgint, egint, gint_data; -#define print __Print - -void print_hex(unsigned int n, int x, int y) -{ - char ch[11] = "0x"; - int i; - - for(i = 0; i < 8; i++) - { - ch[9 - i] = (n & 0xf) + '0' + 39 * ((n & 0xf) > 9); - n >>= 4; - } - ch[10] = 0; - print(ch, x, y); -} -void print_bin(unsigned char n, int x, int y) -{ - char ch[9]; - int i; - - for(i = 0; i < 8;i ++) - { - ch[7 - i] = (n & 1) + '0'; - n >>= 1; - } - ch[8] = 0; - print(ch, x, y); -} - -void print_hexa(unsigned int n, int digits, int x, int y) -{ - char ch[20]; - int i; - - for(i = digits - 1; i >= 0; i--) - { - ch[i] = (n & 0xf) + '0' + 39 * ((n & 0xf) > 9); - n >>= 4; - } - - ch[digits] = 0; - print(ch, x, y); -} - -// Don't forget to enable key state debugging in the interrupt handler. -void keyboard_test(void) -{ - const char *names[] = { - "MPU_Unkown", - "MPU_SH7337", - "MPU_SH7355", - "MPU_SH7305", - "MPU_SH7724", - "Error" - }; - int x = 0; - char str[3]; - int keys[4] = { 0 }; - int i; - - print(names[MPU_CURRENT < 5 ? MPU_CURRENT : 5], 0, 0); - - print("gint size:", 0, 1); - print_hex(&egint - &bgint, 11, 1); - - while(1) - { - multigetkey(keys, 4, 0); - - if(keys[0] == KEY_EXIT && keys[1] == KEY_NONE) break; - - #define hexa(h) ('0' + (h) + 39 * ((h) > 9)) - - x = (x + 1) & 15; - str[0] = hexa(x); - str[1] = 0; - print(str, 20, 0); - - for(i = 0; i < 4; i++) - { - str[0] = hexa((keys[i] >> 4) & 0x0f); - str[1] = hexa(keys[i] & 0x0f); - str[2] = 0; - print(str, 19, i + 3); - } - - #undef hexa - } -} - -/* -const unsigned char data[1024] = { -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 7, 159, 0, 0, 1, 192, 0, 0, 0, 0, 0, 121, 240, 0, 0, 0, -31, 191, 192, 0, 3, 224, 27, 216, 0, 0, 1, 251, 252, 0, 0, 0, 57, 247, 222, -30, 7, 240, 36, 36, 62, 25, 131, 159, 24, 255, 129, 224, 0, 227, 142, 126, 1, -192, 45, 172, 127, 127, 192, 14, 1, 255, 199, 224, 0, 227, 140, 240, 1, 192, -26, 88, 115, 127, 224, 14, 57, 221, 207, 0, 0, 227, 13, 192, 1, 192, 34, 68, -120, 30, 0, 14, 25, 156, 220, 0, 0, 227, 253, 252, 1, 192, 36, 36, 126, 28, -0, 14, 219, 156, 223, 192, 0, 227, 253, 252, 1, 192, 36, 36, 31, 12, 0, 46, -27, 140, 223, 192, 0, 227, 141, 193, 193, 192, 40, 20, 7, 140, 0, 206, 25, 140, -220, 28, 0, 227, 140, 225, 129, 199, 24, 24, 99, 156, 1, 14, 25, 204, 206, 24, -0, 227, 142, 127, 1, 195, 39, 228, 255, 156, 2, 14, 24, 237, 199, 240, 1, 247, -222, 62, 1, 198, 44, 44, 223, 30, 2, 31, 28, 237, 131, 224, 1, 224, 0, 0, 3, -254, 27, 216, 0, 0, 4, 30, 0, 0, 0, 0, 3, 192, 0, 0, 7, 252, 0, 0, 0, 0, 4, -60, 1, 249, 240, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 4, 0, 97, 240, 56, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 224, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, 47, 192, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 32, 255, 128, 63, 128, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 32, 255, 0, 48, 78, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 15, 176, 255, 0, 112, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 8, 56, 255, 0, -96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 8, 60, 255, 0, 224, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 130, 56, 126, 255, 3, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 192, -62, 255, 15, 224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 14, 191, 255, 192, 0, -0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 6, 129, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 6, 0, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 7, 128, 63, 192, -1, 0, 96, 1, 224, 1, 0, 0, 0, 2, 0, 0, 7, 0, 31, 192, 0, 0, 95, 1, 11, 68, 88, -0, 0, 4, 0, 0, 7, 128, 31, 192, 0, 1, 192, 129, 204, 85, 100, 0, 0, 8, 0, 0, -15, 128, 63, 224, 0, 0, 95, 1, 8, 85, 68, 0, 1, 144, 0, 0, 31, 128, 143, 224, -64, 0, 96, 1, 232, 41, 68, 0, 2, 96, 0, 31, 255, 129, 7, 248, 96, 0, 0, 0, 0, -0, 0, 0, 4, 0, 0, 96, 254, 129, 7, 254, 96, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 128, -254, 131, 135, 255, 224, 0, 0, 1, 192, 64, 16, 0, 8, 0, 7, 0, 254, 131, 255, -63, 224, 0, 0, 1, 38, 113, 208, 0, 8, 0, 13, 0, 222, 147, 254, 31, 224, 0, 0, -1, 41, 74, 80, 0, 8, 0, 25, 0, 222, 67, 254, 31, 160, 0, 0, 1, 41, 74, 80, 0, -12, 0, 49, 0, 222, 19, 254, 62, 48, 0, 0, 1, 198, 113, 208, 0, 2, 0, 32, 128, -222, 195, 255, 252, 56, 0, 0, 0, 0, 0, 0, 0, 2, 0, 124, 64, 220, 151, 135, 248, -127, 0, 0, 0, 0, 0, 0, 0, 2, 0, 66, 32, 221, 223, 7, 240, 255, 0, 0, 0, 0, 0, -0, 0, 2, 0, 129, 23, 93, 159, 15, 241, 131, 0, 0, 0, 0, 0, 0, 0, 4, 0, 128, -136, 217, 95, 3, 226, 9, 0, 0, 1, 240, 0, 0, 0, 4, 0, 128, 72, 89, 95, 129, -228, 18, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 72, 73, 127, 128, 224, 36, 0, 0, 0, 0, -0, 0, 0, 28, 1, 0, 76, 129, 127, 192, 96, 8, 0, 0, 0, 0, 0, 0, 0, 16, 1, 0, -231, 203, 124, 96, 64, 0, 0, 0, 0, 0, 0, 0, 0, 16, 1, 1, 28, 123, 240, 12, 64, -1, 0, 0, 0, 0, 0, 0, 0, 16, 1, 2, 28, 143, 128, 15, 192, 7, 0, 0, 0, 0, 0, 0, -0, 16, 1, 4, 17, 143, 24, 15, 192, 14, 0, 0, 0, 0, 0, 0, 0, 28, 1, 4, 1, 135, -24, 31, 192, 24, 0, 0, 0, 0, 0, 0, 0, 18, 1, 62, 1, 135, 248, 63, 224, 192, -0, 0, 0, 0, 0, 0, 0, 35, 1, 195, 1, 135, 128, 254, 126, 1, 0, 0, 0, 0, 0, 0, -0, 35, 193, 131, 195, 135, 255, 248, 112, 1, 0, 0, 0, 0, 0, 0, 0, 67, 241, 131, -14, 207, 255, 192, 224, 3, 0, 0, 0, 0, 0, 0, 3, 67, 15, 143, 56, 255, 7, 1, -224, 7, 0, 0, 0, 0, 0, 0, 28, 130, 7, 255, 112, 204, 7, 131, 224, 31, 0, 0, -0, 0, 0, 0, 32, 134, 30, 29, 120, 156, 7, 255, 224, 127, 0, 0, 0, 0, 0, 63, -197, 206, 60, 56, 192, 248, 15, 255, 248, 255, 0, 0, 0, 0, 0, 120, 5, 227, 248, -56, 195, 248, 127, 191, 254, 63, 0, 0, 0, 0, 7, 254, 255, 193, 255, 15, 193, -255, 15, 31, 252, 31 }; -*/ - - -/* -static const unsigned char icon[76] = { -0, 0, 0, 0, 51, 156, 10, 68, 74, 82, 11, 68, 74, 82, 234, 196, 122, 82, 10, -68, 75, 156, 10, 68, 0, 0, 0, 4, 0, 254, 0, 4, 0, 130, 124, 4, 0, 130, 68, 4, -0, 2, 4, 4, 3, 238, 196, 4, 2, 170, 93, 252, 0, 254, 65, 252, 7, 40, 65, 252, -5, 232, 65, 252, 7, 15, 193, 252, 0, 0, 1, 252, 127, 255, 255, 252 }; - -char *ML_vram_adress(void) -{ - return display_getVRAM(); -} - -void ML_bmp_or_cl(const unsigned char *bmp, int x, int y, int width, int height) -{ - unsigned short line; - char shift, *screen, *p; - int i, j, real_width, begin_x, end_x, begin_y, end_y; - char bool1=1, bool2=1, bool3; - if(!bmp || x<1-width || x>127 || y<1-height || y>63 || height<1 || width<1) return; - p = (char*)&line; - real_width = (width-1>>3<<3)+8; - if(y < 0) begin_y = -y; - else begin_y = 0; - if(y+height > 64) end_y = 64-y; - else end_y = height; - shift = 8-(x&7); - if(x<0) - { - begin_x = -x>>3; - if(shift != 8) bool1 = 0; - } else begin_x = 0; - if(x+real_width > 128) end_x = 15-(x>>3), bool2 = 0; - else end_x = real_width-1>>3; - bool3 = (end_x == real_width-1>>3); - screen = ML_vram_adress()+(y+begin_y<<4)+(x>>3); - - for(i=begin_y ; i>3)+begin_x] << shift; - if(bool1) screen[begin_x] |= *p; - if(shift!=8) screen[begin_x+1] |= *(p+1); - for(j=begin_x+1 ; j>3)+j] << shift; - screen[j] |= *p; - if(shift!=8) screen[j+1] |= *(p+1); - } - } - line = bmp[i*(real_width>>3)+end_x]; - if(bool3) line &= -1< -#include <7305.h> - -/* -unsigned int exec(void (*f)(void)) -{ - int t, s, dt, ds; - - t = (int)RTC.R64CNT; - s = 10 * (RTC.RSECCNT.TENS) + RTC.RSECCNT.ONES; - - (*f)(); - - dt = (int)RTC.R64CNT - t; - ds = (10 * (RTC.RSECCNT.TENS) + RTC.RSECCNT.ONES) - s; - if(dt < 0) ds--, dt += 64; - - return (ds << 8) | dt; -} - -void btest_ml_icon(void) -{ - int i; - for(i = 0; i < 5000; i++) - { - ML_bmp_or_cl(icon, 0, 30, 30, 19); - } -} -void btest_gint_icon(void) -{ - extern Image binary_icon_start; - - int i; - for(i = 0; i < 5000; i++) - { - dimage(&binary_icon_start, 0, 0, Blend_Or); - } -} -*/ - -int main(void) -{ - extern Image binary_symbol_start; - extern Image binary_symbol2_start; - extern Image binary_icon_start; - extern Image binary_sprites_start; - extern Image binary_swords_start; - - extern const void *vrams[4]; - - Image *sybl = &binary_symbol_start; - Image *sybl2 = &binary_symbol2_start; - - dclear(); - dreverse_area(0, 0, 127, 30); - - dimage(sybl, 0, 0, Blend_Or); - dimage(sybl, 20, 0, Blend_And); - dimage(sybl, 40, 0, Blend_Or | Blend_And); - dimage(sybl, 90, 0, Blend_Or | Blend_Invert); - - dimage(sybl2, 0, 20, Blend_Or); - dimage(sybl2, 20, 20, Blend_And); - dimage(sybl2, 28, 20, Blend_And); - dimage(sybl2, 40, 20, Blend_Or | Blend_And); - dimage(sybl2, 90, 20, Blend_Or | Blend_Invert); - - dimage(&binary_icon_start, 2, 35, Blend_Or); - - dreverse_area(35, 31, 127, 63); - dimage(&binary_sprites_start, 50, 31, Blend_And); - - dupdate(); -/* - do key = getkey(); - while(key != KEY_EXE && key != KEY_EXIT); - if(key == KEY_EXIT) return 0; - - print("h'sszz 64z=1s", 0, 0); - print("ML", 14, 0); - print("gint", 17, 0); - print("---------------------", 0, 1); - - print("30*19 icon", 0, 2); - print(wait, 12, 2); - print_hexa(exec(btest_ml_icon), 4, 12, 2); - print(wait, 17, 2); - print_hexa(exec(btest_gint_icon), 4, 17, 2); -*/ - while(getkey() != KEY_EXE); - - dclear(); - dimage(&binary_swords_start, 20, 20, Blend_Or); - dupdate(); - - while(getkey() != KEY_EXE); - return 0; -} diff --git a/addin.g1a b/addin.g1a deleted file mode 100644 index 422f6b622535548e0a9724593cff6c5a2fe68910..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12280 zcmeHtdt6gjzVF)Efg~hI9)Kv3ot*~{MRx)yL774zC_Z|4sYS=>?49ruPsN~1gj7U zghKL*_k@BoKbk~SmPt{pWisFv#3AoaB1Ay={`X(C09RDBedi;EFynKJm}Y)4bK=9r zIoeB$Ez+UNzBqnyg3>8L5vIi!$snpGkVKnck-H{qg#CKnkf?M9LD|YHI*Y^&rGkSN zIT`Jms1ov;A>yj$2Jw-`BE62x$6JM5vqg#|=HqSmc{NV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4Y>Oxcd6FBmW5|g;gBp0EB|@T?fS9|Gu}t_ZIlx0^eKU|3eGFyCXr4k_lwOnP_GO zvzpn=lrVdI-*PBszvY-W`z=Q>{<@)qgfprXr;r4H%TYR3GFCiRG-e;Ojd5e_SWb9O zAbfkV1efFYhArrFWed8R#FxXZ`k&yfuTR6IFnrG8vP@H8GOLJ{8F~2rcS>^Ne&g@!(O}rq2lU#gh z|C*%(L`E=f%NEn5w#9=+kCEjTC5l=Jd>ea|nL!7Zc%%hxdgH1}b7Ow3Jz&s0O3%(Z zB$;_f#|Pmz#g-*yW5SLzXQq0+Xw#3 z{r@zGIse&x<}zPB(|>OC@vgt^>aRM^zrgdmE>~Tt`q`g5s>?{D>^f-;HmuX-6)OyJ zhF9pkN1?nyWI0*3=&2js28m&PbS_&3J)0Ku$e!)pQjChXJxW@UNgt*Z`!9dV&M2C&Z5RJY~lN$l%r*K`T!0<|E3EQa4W6u>Uu;mPKV7pfg>mF@2mc2pvTgm!UQ5B1= zx7Hwy$$gZ*opvM%>KH}=n}W`qIfEqdeMKz(CdJqP@Vy6o;}H%a0>TOiW(buK&d>Uf rV8(x-1@I51`KpK)v4`N+K`e~&fAz&4`XdqRd#_zKHgi{n-?#lgvo0#0 diff --git a/addin.ld b/addin.ld deleted file mode 100644 index 512f5db..0000000 --- a/addin.ld +++ /dev/null @@ -1,104 +0,0 @@ -/* - This linker script links the object files when generating the ELF - output. Note how symbols romdata, bbss, ebss, bdata and edata are used - in the initialization routine (crt0.c) to initialize the application. - - Two ram areas are specified. It happens, if I'm not wrong, that the - "real ram" is accessed directly while the "common" ram is accessed - through the mmu. The interrupt handler resides in "real ram" because it - couldn't execute well in ram. While SH7335 and SH7355 had no problems, - executing the interrupt handler in the common ram on SH7305-based new - models caused trouble to the OS, apparently overwriting ram data. -*/ - -OUTPUT_ARCH(sh3) -ENTRY(_start) - -MEMORY -{ - rom : o = 0x00300200, l = 512k - ram : o = 0x08100000, l = 64k - /* The "real ram" accessible length remains unknown because some parts - are used by the system. At least 12k seem accessible. Use with care. */ - realram : o = 0x8800d000, l = 12k -} - -SECTIONS -{ - /* - ROM sections : binary code and read-only data. - */ - - .text : { - /* Initialization code. */ - *(.pretext.entry) - *(.pretext) - - _bctors = . ; - *(.ctors) - _ectors = . ; - _bdtors = . ; - *(.dtors) - _edtors = . ; - - *(.text) - *(.text.*) - } > rom - - .rodata : { - *(.rodata) - *(.rodata.*) - - _romdata = ALIGN(4) ; - } > rom - - - - /* - RAM sections : bss section and read/write data. - The BSS section is meant to be stripped from the ELF file (to - reduce the binary size) and initialized with zeros in the - initialization routine, therefore its location is undefined. - */ - - .bss : { - _bbss = . ; - *(.bss) - _ebss = . ; - } > ram - - .data : AT(_romdata) ALIGN(4) { - _bdata = . ; - *(.data) - *(.data.*) - _edata = . ; - } > ram - - .cc : AT(_romdata + SIZEOF(.data)) ALIGN(4) { - *(.eh_frame) - *(.jcr) - - _gint_data = _romdata + SIZEOF(.data) + SIZEOF(.cc) ; - } > ram - - - - /* - Real RAM : interrupt handler. - */ - - .gint_int : AT(_gint_data) ALIGN(4) { - /* The vbr needs to be 0x100-aligned because of an ld issue. */ - . = ALIGN(0x100) ; - _gint_vbr = . ; - - _bgint = . ; - - /* Interrupt handler. */ - . = _gint_vbr + 0x600 ; - *(.gint.int.entry) - *(.gint.int) - - _egint = . ; - } > realram -} diff --git a/libc.a b/libc.a index c4d5af7614c29a71f622bcbc46e4f1576930db0a..3e386fd80cf75192d69f4aa939c5512715bd0234 100644 GIT binary patch delta 33 icmaFG`-*ph9E-WBh0#Q%JTSd+N(mE~v6+YY9y0*0;|Zz& delta 33 jcmaFG`-*ph9E+imxy3}KJP>WZaY_jjSYR^`^F3w&t=S2k diff --git a/libgint.a b/libgint.a index e392e536edc6ceb46103c0f3de295d9ae8acf1ac..5af816a41d190f59ec47824583012a8825ada2cf 100644 GIT binary patch delta 173 zcmdnDj&a{Q#tCvP=B5@#8$AABLwE^d;+y-q=Q4qLn+^DMI3TP9 zu?Y|{uzGGuQ#O#e(PRTY@y*fllAI78$gF-1MHYnIX`Q9q5FW_nZi}5@Q$YH}Hpf|W S2_W<}d+&spx!ED;9}57;pf0Nb delta 173 zcmdnDj&a{Q#tCvPhDPS*8}bI4Mi4&+-aSq+z=kf@=pPFJv&JrO