From 66dcf910bd4744d8ced56cb9586aa937a1a2d4c5 Mon Sep 17 00:00:00 2001 From: vg Date: Tue, 7 Jul 2020 16:24:01 +0200 Subject: first commit --- .gitignore | 2 + Program the AVR with test code.desktop | 6 + README.txt | 8 + SN74HC05N-Texas-Instruments porte inverseuse.pdf | Bin 0 -> 449586 bytes avr-test/Makefile | 168 + avr-test/avr-fusedump.bash | 102 + avr-test/ledcube.bin | Bin 0 -> 4402 bytes avr-test/ledcube.elf | Bin 0 -> 32968 bytes avr-test/ledcube.hex | 277 + avr-test/ledcube.lst | 3367 ++++++ avr-test/ledcube.map | 783 ++ avr-test/ledcube.srec | 278 + avr-test/ledcube_eeprom.bin | 0 avr-test/ledcube_eeprom.hex | 1 + avr-test/ledcube_eeprom.srec | 2 + avr-test/mc | 1 + avr-test/src/cube.h | 32 + avr-test/src/draw.cpp | 559 + avr-test/src/draw.h | 71 + avr-test/src/effect.cpp | 1021 ++ avr-test/src/effect.h | 54 + avr-test/src/fuses.txt | 6 + avr-test/src/lisence.txt | 5 + avr-test/src/main.c.old | 285 + avr-test/src/main.cpp | 508 + avr-test/src/main.h | 45 + avr-test/tags | 150 + avr-test2/Makefile | 170 + avr-test2/avr-fusedump.bash | 102 + avr-test2/ledcube.bin | Bin 0 -> 978 bytes avr-test2/ledcube.elf | Bin 0 -> 28954 bytes avr-test2/ledcube.hex | 63 + avr-test2/ledcube.lst | 827 ++ avr-test2/ledcube.map | 819 ++ avr-test2/ledcube.srec | 64 + avr-test2/ledcube_eeprom.bin | 0 avr-test2/ledcube_eeprom.hex | 1 + avr-test2/ledcube_eeprom.srec | 2 + avr-test2/mc | 1 + avr-test2/os | 11922 +++++++++++++++++++ avr-test2/src/cube.h | 32 + avr-test2/src/draw.cpp | 559 + avr-test2/src/draw.h | 71 + avr-test2/src/effect.cpp | 1331 +++ avr-test2/src/effect.h | 54 + avr-test2/src/font.cpp | 104 + avr-test2/src/font.h | 13 + avr-test2/src/fuses.txt | 6 + avr-test2/src/gameoflife.cpp | 135 + avr-test2/src/gameoflife.h | 9 + avr-test2/src/launch_effect.cpp | 182 + avr-test2/src/launch_effect.h | 15 + avr-test2/src/lisence.txt | 5 + avr-test2/src/main.cpp | 450 + avr-test2/src/main.cpp.bakup | 447 + avr-test2/src/main.h | 50 + avr-test2/tags | 213 + characteristique_composants | 10 + cube | 1 + cube_gl/Makefile | 14 + cube_gl/effect.cpp | 776 ++ cube_gl/effect.h | 26 + cube_gl/font.cpp | 109 + cube_gl/font.h | 13 + cube_gl/ledcube.cpp | 522 + cube_gl/ledcube.cpp.bak | 155 + cube_pc_test1/3d.c | 344 + cube_pc_test1/3d.h | 16 + cube_pc_test1/Makefile | 4 + cube_pc_test1/algoline.c | 128 + cube_pc_test1/cube | Bin 0 -> 40126 bytes cube_pc_test1/cube.c | 83 + cube_pc_test1/cube.h | 25 + cube_pc_test1/draw.c | 682 ++ cube_pc_test1/draw.h | 52 + cube_pc_test1/draw.lst | 2472 ++++ cube_pc_test1/draw_3d.c | 96 + cube_pc_test1/draw_3d.h | 26 + cube_pc_test1/effect.c | 1478 +++ cube_pc_test1/effect.h | 57 + cube_pc_test1/effect.lst | 5902 +++++++++ cube_pc_test1/font.c | 158 + cube_pc_test1/font.h | 13 + cube_pc_test1/gameoflife.c | 148 + cube_pc_test1/gameoflife.h | 9 + cube_pc_test1/launch_effect.c | 61 + cube_pc_test1/launch_effect.h | 15 + cube_pc_test1/lisence.txt | 5 + cube_pc_test1/main.c | 81 + cube_pc_test1/main.h | 4 + hic-git/here-will-be-final-project-files | 0 identty.py | 19 + instructables/arduinocube/arduinocube.pde | 790 ++ instructables/cube8/Makefile | 514 + instructables/cube8/cube.h | 32 + instructables/cube8/draw.c | 559 + instructables/cube8/draw.h | 71 + instructables/cube8/effect.c | 1331 +++ instructables/cube8/effect.h | 54 + instructables/cube8/font.c | 104 + instructables/cube8/font.h | 13 + instructables/cube8/fuses.txt | 6 + instructables/cube8/gameoflife.c | 135 + instructables/cube8/gameoflife.h | 9 + instructables/cube8/launch_effect.c | 182 + instructables/cube8/launch_effect.h | 15 + instructables/cube8/lisence.txt | 5 + instructables/cube8/main.c | 285 + instructables/cube8/main.h | 45 + instructables/cube_pc/3d.c | 344 + instructables/cube_pc/3d.h | 16 + instructables/cube_pc/Makefile | 4 + instructables/cube_pc/cube | Bin 0 -> 44142 bytes instructables/cube_pc/cube.c | 83 + instructables/cube_pc/cube.h | 25 + instructables/cube_pc/draw.c | 682 ++ instructables/cube_pc/draw.h | 52 + instructables/cube_pc/draw.lst | 2472 ++++ instructables/cube_pc/draw_3d.c | 96 + instructables/cube_pc/draw_3d.h | 26 + instructables/cube_pc/effect.c | 1478 +++ instructables/cube_pc/effect.h | 57 + instructables/cube_pc/effect.lst | 5902 +++++++++ instructables/cube_pc/font.c | 158 + instructables/cube_pc/font.h | 13 + instructables/cube_pc/gameoflife.c | 148 + instructables/cube_pc/gameoflife.h | 9 + instructables/cube_pc/launch_effect.c | 182 + instructables/cube_pc/launch_effect.h | 15 + instructables/cube_pc/lisence.txt | 5 + instructables/cube_pc/main.c | 81 + instructables/cube_pc/main.h | 4 + instructables/pricelist.xls | Bin 0 -> 12288 bytes reinit.py | 18 + schemas | 54 + test/Makefile | 6 + test/applet/HardwareSerial.d | 28 + test/applet/Makefile | 231 + test/applet/Print.d | 22 + test/applet/WInterrupts.d | 24 + test/applet/WMath.d | 3 + test/applet/board | 1 + test/applet/core.a | Bin 0 -> 65636 bytes test/applet/pins_arduino.d | 24 + test/applet/test.cpp | 827 ++ test/applet/test.d | 0 test/applet/test.elf | Bin 0 -> 18361 bytes test/applet/test.hex | 315 + test/applet/wiring.d | 22 + test/applet/wiring_analog.d | 24 + test/applet/wiring_digital.d | 24 + test/applet/wiring_pulse.d | 24 + test/applet/wiring_shift.d | 22 + test/ardmake.conf | 3 + test/ardmake/hardware/boards.txt | 338 + .../hardware/bootloaders/atmega/ATmegaBOOT_168.c | 1054 ++ .../atmega/ATmegaBOOT_168_atmega1280.hex | 245 + .../atmega/ATmegaBOOT_168_atmega328.hex | 125 + .../atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex | 124 + .../atmega/ATmegaBOOT_168_diecimila.hex | 126 + .../bootloaders/atmega/ATmegaBOOT_168_ng.hex | 110 + .../bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex | 126 + test/ardmake/hardware/bootloaders/atmega/Makefile | 224 + .../hardware/bootloaders/atmega8/ATmegaBOOT.c | 507 + .../hardware/bootloaders/atmega8/ATmegaBOOT.hex | 66 + test/ardmake/hardware/bootloaders/atmega8/Makefile | 88 + .../hardware/bootloaders/bt/ATmegaBOOT_168.c | 1038 ++ .../hardware/bootloaders/bt/ATmegaBOOT_168.hex | 121 + .../bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex | 162 + test/ardmake/hardware/bootloaders/bt/Makefile | 109 + .../bootloaders/lilypad/LilyPadBOOT_168.hex | 117 + .../hardware/bootloaders/lilypad/src/ATmegaBOOT.c | 979 ++ .../hardware/bootloaders/lilypad/src/Makefile | 84 + .../ardmake/hardware/bootloaders/optiboot/Makefile | 239 + test/ardmake/hardware/bootloaders/optiboot/makeall | 13 + .../hardware/bootloaders/optiboot/optiboot.c | 536 + .../bootloaders/optiboot/optiboot_atmega328.hex | 33 + .../bootloaders/optiboot/optiboot_atmega328.lst | 520 + .../optiboot/optiboot_atmega328_pro_8MHz.hex | 33 + .../optiboot/optiboot_atmega328_pro_8MHz.lst | 520 + .../bootloaders/optiboot/optiboot_diecimila.hex | 33 + .../bootloaders/optiboot/optiboot_diecimila.lst | 520 + .../bootloaders/optiboot/optiboot_lilypad.hex | 34 + .../bootloaders/optiboot/optiboot_lilypad.lst | 533 + .../optiboot/optiboot_lilypad_resonator.hex | 34 + .../optiboot/optiboot_lilypad_resonator.lst | 533 + .../bootloaders/optiboot/optiboot_luminet.hex | 42 + .../bootloaders/optiboot/optiboot_luminet.lst | 604 + .../bootloaders/optiboot/optiboot_pro_16MHz.hex | 33 + .../bootloaders/optiboot/optiboot_pro_16MHz.lst | 520 + .../bootloaders/optiboot/optiboot_pro_20mhz.hex | 33 + .../bootloaders/optiboot/optiboot_pro_20mhz.lst | 520 + .../bootloaders/optiboot/optiboot_pro_8MHz.hex | 34 + .../bootloaders/optiboot/optiboot_pro_8MHz.lst | 533 + .../ardmake/hardware/bootloaders/stk500v2/Makefile | 588 + .../hardware/bootloaders/stk500v2/STK500V2.pnproj | 1 + .../hardware/bootloaders/stk500v2/STK500V2.pnps | 1 + .../bootloaders/stk500v2/avrinterruptnames.h | 742 ++ .../hardware/bootloaders/stk500v2/command.h | 114 + .../hardware/bootloaders/stk500v2/stk500boot.c | 1996 ++++ .../hardware/bootloaders/stk500v2/stk500boot.ppg | 1 + .../stk500v2/stk500boot_v2_mega2560.hex | 513 + .../hardware/cores/arduino/HardwareSerial.cpp | 303 + .../hardware/cores/arduino/HardwareSerial.d | 28 + .../hardware/cores/arduino/HardwareSerial.h | 76 + test/ardmake/hardware/cores/arduino/Makefile | 250 + test/ardmake/hardware/cores/arduino/Print.cpp | 220 + test/ardmake/hardware/cores/arduino/Print.d | 22 + test/ardmake/hardware/cores/arduino/Print.h | 66 + .../ardmake/hardware/cores/arduino/README.Makefile | 11 + test/ardmake/hardware/cores/arduino/Stream.h | 35 + test/ardmake/hardware/cores/arduino/Tone.cpp | 601 + test/ardmake/hardware/cores/arduino/WCharacter.h | 168 + test/ardmake/hardware/cores/arduino/WConstants.h | 1 + test/ardmake/hardware/cores/arduino/WInterrupts.c | 249 + test/ardmake/hardware/cores/arduino/WInterrupts.d | 24 + test/ardmake/hardware/cores/arduino/WMath.cpp | 60 + test/ardmake/hardware/cores/arduino/WMath.d | 3 + test/ardmake/hardware/cores/arduino/WProgram.h | 63 + test/ardmake/hardware/cores/arduino/WString.cpp | 443 + test/ardmake/hardware/cores/arduino/WString.h | 112 + test/ardmake/hardware/cores/arduino/binary.h | 515 + test/ardmake/hardware/cores/arduino/main.cpp | 14 + test/ardmake/hardware/cores/arduino/main.cxx | 12 + test/ardmake/hardware/cores/arduino/pins_arduino.c | 465 + test/ardmake/hardware/cores/arduino/pins_arduino.d | 24 + test/ardmake/hardware/cores/arduino/pins_arduino.h | 88 + test/ardmake/hardware/cores/arduino/wiring.c | 289 + test/ardmake/hardware/cores/arduino/wiring.d | 22 + test/ardmake/hardware/cores/arduino/wiring.h | 135 + .../ardmake/hardware/cores/arduino/wiring_analog.c | 259 + .../ardmake/hardware/cores/arduino/wiring_analog.d | 24 + .../hardware/cores/arduino/wiring_digital.c | 166 + .../hardware/cores/arduino/wiring_digital.d | 24 + .../hardware/cores/arduino/wiring_private.h | 68 + test/ardmake/hardware/cores/arduino/wiring_pulse.c | 69 + test/ardmake/hardware/cores/arduino/wiring_pulse.d | 24 + test/ardmake/hardware/cores/arduino/wiring_shift.c | 55 + test/ardmake/hardware/cores/arduino/wiring_shift.d | 22 + .../firmwares/MEGA-dfu_and_usbserial_combined.hex | 234 + test/ardmake/hardware/firmwares/README.txt | 33 + .../firmwares/UNO-dfu_and_usbserial_combined.hex | 234 + .../firmwares/arduino-usbdfu/Arduino-usbdfu.c | 728 ++ .../firmwares/arduino-usbdfu/Arduino-usbdfu.h | 220 + .../hardware/firmwares/arduino-usbdfu/Board/LEDs.h | 110 + .../firmwares/arduino-usbdfu/Descriptors.c | 189 + .../firmwares/arduino-usbdfu/Descriptors.h | 177 + .../hardware/firmwares/arduino-usbdfu/makefile | 710 ++ .../hardware/firmwares/arduino-usbdfu/readme.txt | 7 + .../arduino-usbserial/Arduino-usbserial-mega.hex | 256 + .../arduino-usbserial/Arduino-usbserial-uno.hex | 256 + .../arduino-usbserial/Arduino-usbserial.c | 242 + .../arduino-usbserial/Arduino-usbserial.h | 79 + .../firmwares/arduino-usbserial/Board/LEDs.h | 110 + .../firmwares/arduino-usbserial/Descriptors.c | 277 + .../firmwares/arduino-usbserial/Descriptors.h | 88 + .../arduino-usbserial/Lib/LightweightRingBuff.h | 197 + .../hardware/firmwares/arduino-usbserial/makefile | 776 ++ .../firmwares/arduino-usbserial/readme.txt | 13 + test/ardmake/hardware/programmers.txt | 20 + test/arduino_make.sh | 1359 +++ test/arduinocube/arduinocube.pde | 812 ++ test/build | 1 + test/test.pde | 812 ++ test/test.pde.backup | 843 ++ test_serial.py | 34 + todo | 4 + 267 files changed, 85986 insertions(+) create mode 100644 .gitignore create mode 100644 Program the AVR with test code.desktop create mode 100644 README.txt create mode 100644 SN74HC05N-Texas-Instruments porte inverseuse.pdf create mode 100644 avr-test/Makefile create mode 100755 avr-test/avr-fusedump.bash create mode 100755 avr-test/ledcube.bin create mode 100755 avr-test/ledcube.elf create mode 100644 avr-test/ledcube.hex create mode 100644 avr-test/ledcube.lst create mode 100644 avr-test/ledcube.map create mode 100755 avr-test/ledcube.srec create mode 100755 avr-test/ledcube_eeprom.bin create mode 100644 avr-test/ledcube_eeprom.hex create mode 100755 avr-test/ledcube_eeprom.srec create mode 120000 avr-test/mc create mode 100644 avr-test/src/cube.h create mode 100644 avr-test/src/draw.cpp create mode 100644 avr-test/src/draw.h create mode 100644 avr-test/src/effect.cpp create mode 100644 avr-test/src/effect.h create mode 100644 avr-test/src/fuses.txt create mode 100644 avr-test/src/lisence.txt create mode 100644 avr-test/src/main.c.old create mode 100644 avr-test/src/main.cpp create mode 100644 avr-test/src/main.h create mode 100644 avr-test/tags create mode 100644 avr-test2/Makefile create mode 100755 avr-test2/avr-fusedump.bash create mode 100755 avr-test2/ledcube.bin create mode 100755 avr-test2/ledcube.elf create mode 100644 avr-test2/ledcube.hex create mode 100644 avr-test2/ledcube.lst create mode 100644 avr-test2/ledcube.map create mode 100755 avr-test2/ledcube.srec create mode 100755 avr-test2/ledcube_eeprom.bin create mode 100644 avr-test2/ledcube_eeprom.hex create mode 100755 avr-test2/ledcube_eeprom.srec create mode 120000 avr-test2/mc create mode 100644 avr-test2/os create mode 100644 avr-test2/src/cube.h create mode 100644 avr-test2/src/draw.cpp create mode 100644 avr-test2/src/draw.h create mode 100644 avr-test2/src/effect.cpp create mode 100644 avr-test2/src/effect.h create mode 100644 avr-test2/src/font.cpp create mode 100644 avr-test2/src/font.h create mode 100644 avr-test2/src/fuses.txt create mode 100644 avr-test2/src/gameoflife.cpp create mode 100644 avr-test2/src/gameoflife.h create mode 100644 avr-test2/src/launch_effect.cpp create mode 100644 avr-test2/src/launch_effect.h create mode 100644 avr-test2/src/lisence.txt create mode 100644 avr-test2/src/main.cpp create mode 100644 avr-test2/src/main.cpp.bakup create mode 100644 avr-test2/src/main.h create mode 100644 avr-test2/tags create mode 100644 characteristique_composants create mode 120000 cube create mode 100644 cube_gl/Makefile create mode 100644 cube_gl/effect.cpp create mode 100644 cube_gl/effect.h create mode 100644 cube_gl/font.cpp create mode 100644 cube_gl/font.h create mode 100644 cube_gl/ledcube.cpp create mode 100644 cube_gl/ledcube.cpp.bak create mode 100644 cube_pc_test1/3d.c create mode 100644 cube_pc_test1/3d.h create mode 100644 cube_pc_test1/Makefile create mode 100644 cube_pc_test1/algoline.c create mode 100755 cube_pc_test1/cube create mode 100644 cube_pc_test1/cube.c create mode 100644 cube_pc_test1/cube.h create mode 100644 cube_pc_test1/draw.c create mode 100644 cube_pc_test1/draw.h create mode 100644 cube_pc_test1/draw.lst create mode 100644 cube_pc_test1/draw_3d.c create mode 100644 cube_pc_test1/draw_3d.h create mode 100644 cube_pc_test1/effect.c create mode 100644 cube_pc_test1/effect.h create mode 100644 cube_pc_test1/effect.lst create mode 100644 cube_pc_test1/font.c create mode 100644 cube_pc_test1/font.h create mode 100644 cube_pc_test1/gameoflife.c create mode 100644 cube_pc_test1/gameoflife.h create mode 100644 cube_pc_test1/launch_effect.c create mode 100644 cube_pc_test1/launch_effect.h create mode 100644 cube_pc_test1/lisence.txt create mode 100644 cube_pc_test1/main.c create mode 100644 cube_pc_test1/main.h create mode 100644 hic-git/here-will-be-final-project-files create mode 100755 identty.py create mode 100644 instructables/arduinocube/arduinocube.pde create mode 100644 instructables/cube8/Makefile create mode 100644 instructables/cube8/cube.h create mode 100644 instructables/cube8/draw.c create mode 100644 instructables/cube8/draw.h create mode 100644 instructables/cube8/effect.c create mode 100644 instructables/cube8/effect.h create mode 100644 instructables/cube8/font.c create mode 100644 instructables/cube8/font.h create mode 100644 instructables/cube8/fuses.txt create mode 100644 instructables/cube8/gameoflife.c create mode 100644 instructables/cube8/gameoflife.h create mode 100644 instructables/cube8/launch_effect.c create mode 100644 instructables/cube8/launch_effect.h create mode 100644 instructables/cube8/lisence.txt create mode 100644 instructables/cube8/main.c create mode 100644 instructables/cube8/main.h create mode 100644 instructables/cube_pc/3d.c create mode 100644 instructables/cube_pc/3d.h create mode 100644 instructables/cube_pc/Makefile create mode 100755 instructables/cube_pc/cube create mode 100644 instructables/cube_pc/cube.c create mode 100644 instructables/cube_pc/cube.h create mode 100644 instructables/cube_pc/draw.c create mode 100644 instructables/cube_pc/draw.h create mode 100644 instructables/cube_pc/draw.lst create mode 100644 instructables/cube_pc/draw_3d.c create mode 100644 instructables/cube_pc/draw_3d.h create mode 100644 instructables/cube_pc/effect.c create mode 100644 instructables/cube_pc/effect.h create mode 100644 instructables/cube_pc/effect.lst create mode 100644 instructables/cube_pc/font.c create mode 100644 instructables/cube_pc/font.h create mode 100644 instructables/cube_pc/gameoflife.c create mode 100644 instructables/cube_pc/gameoflife.h create mode 100644 instructables/cube_pc/launch_effect.c create mode 100644 instructables/cube_pc/launch_effect.h create mode 100644 instructables/cube_pc/lisence.txt create mode 100644 instructables/cube_pc/main.c create mode 100644 instructables/cube_pc/main.h create mode 100644 instructables/pricelist.xls create mode 100755 reinit.py create mode 100644 schemas create mode 100644 test/Makefile create mode 100644 test/applet/HardwareSerial.d create mode 100644 test/applet/Makefile create mode 100644 test/applet/Print.d create mode 100644 test/applet/WInterrupts.d create mode 100644 test/applet/WMath.d create mode 100644 test/applet/board create mode 100644 test/applet/core.a create mode 100644 test/applet/pins_arduino.d create mode 100644 test/applet/test.cpp create mode 100644 test/applet/test.d create mode 100644 test/applet/test.elf create mode 100644 test/applet/test.hex create mode 100644 test/applet/wiring.d create mode 100644 test/applet/wiring_analog.d create mode 100644 test/applet/wiring_digital.d create mode 100644 test/applet/wiring_pulse.d create mode 100644 test/applet/wiring_shift.d create mode 100644 test/ardmake.conf create mode 100644 test/ardmake/hardware/boards.txt create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168.c create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_ng.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega/Makefile create mode 100644 test/ardmake/hardware/bootloaders/atmega8/ATmegaBOOT.c create mode 100644 test/ardmake/hardware/bootloaders/atmega8/ATmegaBOOT.hex create mode 100644 test/ardmake/hardware/bootloaders/atmega8/Makefile create mode 100644 test/ardmake/hardware/bootloaders/bt/ATmegaBOOT_168.c create mode 100644 test/ardmake/hardware/bootloaders/bt/ATmegaBOOT_168.hex create mode 100644 test/ardmake/hardware/bootloaders/bt/ATmegaBOOT_168_atmega328_bt.hex create mode 100644 test/ardmake/hardware/bootloaders/bt/Makefile create mode 100644 test/ardmake/hardware/bootloaders/lilypad/LilyPadBOOT_168.hex create mode 100644 test/ardmake/hardware/bootloaders/lilypad/src/ATmegaBOOT.c create mode 100644 test/ardmake/hardware/bootloaders/lilypad/src/Makefile create mode 100644 test/ardmake/hardware/bootloaders/optiboot/Makefile create mode 100644 test/ardmake/hardware/bootloaders/optiboot/makeall create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot.c create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.lst create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.hex create mode 100644 test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.lst create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/Makefile create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnproj create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnps create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/avrinterruptnames.h create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/command.h create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/stk500boot.c create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/stk500boot.ppg create mode 100644 test/ardmake/hardware/bootloaders/stk500v2/stk500boot_v2_mega2560.hex create mode 100644 test/ardmake/hardware/cores/arduino/HardwareSerial.cpp create mode 100644 test/ardmake/hardware/cores/arduino/HardwareSerial.d create mode 100644 test/ardmake/hardware/cores/arduino/HardwareSerial.h create mode 100644 test/ardmake/hardware/cores/arduino/Makefile create mode 100644 test/ardmake/hardware/cores/arduino/Print.cpp create mode 100644 test/ardmake/hardware/cores/arduino/Print.d create mode 100644 test/ardmake/hardware/cores/arduino/Print.h create mode 100644 test/ardmake/hardware/cores/arduino/README.Makefile create mode 100644 test/ardmake/hardware/cores/arduino/Stream.h create mode 100644 test/ardmake/hardware/cores/arduino/Tone.cpp create mode 100644 test/ardmake/hardware/cores/arduino/WCharacter.h create mode 100644 test/ardmake/hardware/cores/arduino/WConstants.h create mode 100644 test/ardmake/hardware/cores/arduino/WInterrupts.c create mode 100644 test/ardmake/hardware/cores/arduino/WInterrupts.d create mode 100644 test/ardmake/hardware/cores/arduino/WMath.cpp create mode 100644 test/ardmake/hardware/cores/arduino/WMath.d create mode 100644 test/ardmake/hardware/cores/arduino/WProgram.h create mode 100644 test/ardmake/hardware/cores/arduino/WString.cpp create mode 100644 test/ardmake/hardware/cores/arduino/WString.h create mode 100644 test/ardmake/hardware/cores/arduino/binary.h create mode 100644 test/ardmake/hardware/cores/arduino/main.cpp create mode 100644 test/ardmake/hardware/cores/arduino/main.cxx create mode 100644 test/ardmake/hardware/cores/arduino/pins_arduino.c create mode 100644 test/ardmake/hardware/cores/arduino/pins_arduino.d create mode 100644 test/ardmake/hardware/cores/arduino/pins_arduino.h create mode 100644 test/ardmake/hardware/cores/arduino/wiring.c create mode 100644 test/ardmake/hardware/cores/arduino/wiring.d create mode 100644 test/ardmake/hardware/cores/arduino/wiring.h create mode 100644 test/ardmake/hardware/cores/arduino/wiring_analog.c create mode 100644 test/ardmake/hardware/cores/arduino/wiring_analog.d create mode 100644 test/ardmake/hardware/cores/arduino/wiring_digital.c create mode 100644 test/ardmake/hardware/cores/arduino/wiring_digital.d create mode 100644 test/ardmake/hardware/cores/arduino/wiring_private.h create mode 100644 test/ardmake/hardware/cores/arduino/wiring_pulse.c create mode 100644 test/ardmake/hardware/cores/arduino/wiring_pulse.d create mode 100644 test/ardmake/hardware/cores/arduino/wiring_shift.c create mode 100644 test/ardmake/hardware/cores/arduino/wiring_shift.d create mode 100644 test/ardmake/hardware/firmwares/MEGA-dfu_and_usbserial_combined.hex create mode 100644 test/ardmake/hardware/firmwares/README.txt create mode 100644 test/ardmake/hardware/firmwares/UNO-dfu_and_usbserial_combined.hex create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.c create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/Board/LEDs.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.c create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/makefile create mode 100644 test/ardmake/hardware/firmwares/arduino-usbdfu/readme.txt create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-mega.hex create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-uno.hex create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.c create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Board/LEDs.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.c create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/Lib/LightweightRingBuff.h create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/makefile create mode 100644 test/ardmake/hardware/firmwares/arduino-usbserial/readme.txt create mode 100644 test/ardmake/hardware/programmers.txt create mode 100755 test/arduino_make.sh create mode 100644 test/arduinocube/arduinocube.pde create mode 120000 test/build create mode 100644 test/test.pde create mode 100644 test/test.pde.backup create mode 100755 test_serial.py create mode 100644 todo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fb930d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.log +*.o diff --git a/Program the AVR with test code.desktop b/Program the AVR with test code.desktop new file mode 100644 index 0000000..b303a3e --- /dev/null +++ b/Program the AVR with test code.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Link to Program the AVR with test code +Type=Link +URL=http://www.instructables.com/id/Led-Cube-8x8x8/step46/Program-the-AVR-with-test-code/ +Icon=gnome-fs-bookmark diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..31af8bb --- /dev/null +++ b/README.txt @@ -0,0 +1,8 @@ +This repository is an archive of the mess I did for an early project of a led +cube named hic: + + The Cube Hic. + +There is various files from different sources with various copyright notices, +please refer to thoses. Some are written by me and licence is under MIT public +licence. diff --git a/SN74HC05N-Texas-Instruments porte inverseuse.pdf b/SN74HC05N-Texas-Instruments porte inverseuse.pdf new file mode 100644 index 0000000..d66e0d9 Binary files /dev/null and b/SN74HC05N-Texas-Instruments porte inverseuse.pdf differ diff --git a/avr-test/Makefile b/avr-test/Makefile new file mode 100644 index 0000000..4e97a43 --- /dev/null +++ b/avr-test/Makefile @@ -0,0 +1,168 @@ +PRG = ledcube +OBJ = main.o draw.o effect.o +#MCU_TARGET = at90s2313 +#MCU_TARGET = at90s2333 +#MCU_TARGET = at90s4414 +#MCU_TARGET = at90s4433 +#MCU_TARGET = at90s4434 +#MCU_TARGET = at90s8515 +#MCU_TARGET = at90s8535 +#MCU_TARGET = atmega128 +#MCU_TARGET = atmega1280 +#MCU_TARGET = atmega1281 +#MCU_TARGET = atmega1284p +#MCU_TARGET = atmega16 +#MCU_TARGET = atmega163 +#MCU_TARGET = atmega164p +#MCU_TARGET = atmega165 +#MCU_TARGET = atmega165p +#MCU_TARGET = atmega168 +#MCU_TARGET = atmega169 +#MCU_TARGET = atmega169p +#MCU_TARGET = atmega2560 +#MCU_TARGET = atmega2561 +#MCU_TARGET = atmega32 +#MCU_TARGET = atmega324p +#MCU_TARGET = atmega325 +#MCU_TARGET = atmega3250 +#MCU_TARGET = atmega329 +#MCU_TARGET = atmega3290 +#MCU_TARGET = atmega48 +#MCU_TARGET = atmega64 +#MCU_TARGET = atmega640 +#MCU_TARGET = atmega644 +#MCU_TARGET = atmega644p +#MCU_TARGET = atmega645 +#MCU_TARGET = atmega6450 +#MCU_TARGET = atmega649 +#MCU_TARGET = atmega6490 +MCU_TARGET = atmega8 +#MCU_TARGET = atmega8515 +#MCU_TARGET = atmega8535 +#MCU_TARGET = atmega88 +#MCU_TARGET = attiny2313 +#MCU_TARGET = attiny24 +#MCU_TARGET = attiny25 +#MCU_TARGET = attiny26 +#MCU_TARGET = attiny261 +#MCU_TARGET = attiny44 +#MCU_TARGET = attiny45 +#MCU_TARGET = attiny461 +#MCU_TARGET = attiny84 +#MCU_TARGET = attiny85 +#MCU_TARGET = attiny861 + +#OPTIMIZE = -O2 +OPTIMIZE = -Os + +# One must use -ffunction-sections (compiler switch) AND -Wl,-gc-sections +# (linker switch) to have the linker "garbage collect" (or remove) unused +# sections. The -ffunction-sections switch places all functions within their +# own section. You must use both together to make this work. +DEFS = -ffunction-sections +LIBS = -Wl,-gc-sections +# You should not have to change anything below here. + +CC = avr-gcc +CXX = avr-g++ + +# Override is only needed by avr-lib build system. + +override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) #-fno-exceptions -fno-rtti +override LDFLAGS = -Wl,-Map,$(PRG).map --relax + +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump + +%.o: src/%.cpp + $(CXX) $(CFLAGS) -c -o $@ $^ + +all: $(PRG).elf lst text eeprom + avr-size --mcu=$(MCU_TARGET) -C $(PRG).elf + +$(PRG).elf: $(OBJ) + $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +# dependency: +#demo.o: demo.c iocompat.h +#%.o: %.c + +clean: + rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak + rm -rf *.lst *.map $(EXTRA_CLEAN_FILES) + +lst: $(PRG).lst + +%.lst: %.elf + $(OBJDUMP) -h -S $< > $@ + +# Rules for building the .text rom images + +text: hex bin srec + +hex: $(PRG).hex +bin: $(PRG).bin +srec: $(PRG).srec + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ + +# Rules for building the .eeprom rom images + +eeprom: ehex ebin esrec + +ehex: $(PRG)_eeprom.hex +ebin: $(PRG)_eeprom.bin +esrec: $(PRG)_eeprom.srec + +%_eeprom.hex: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@ \ + || { echo empty $@ not generated; exit 0; } + +%_eeprom.srec: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@ \ + || { echo empty $@ not generated; exit 0; } + +%_eeprom.bin: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@ \ + || { echo empty $@ not generated; exit 0; } + +# Every thing below here is used by avr-libc's build system and can be ignored +# by the casual user. + +FIG2DEV = fig2dev +EXTRA_CLEAN_FILES = *.hex *.bin *.srec + +dox: eps png pdf + +eps: $(PRG).eps +png: $(PRG).png +pdf: $(PRG).pdf + +%.eps: %.fig + $(FIG2DEV) -L eps $< $@ + +%.pdf: %.fig + $(FIG2DEV) -L pdf $< $@ + +%.png: %.fig + $(FIG2DEV) -L png $< $@ + +flash: + # for atmega8 : + avrdude -p m8 -c stk500v2 -P /dev/ttyUSB0 -e -U flash:w:$(PRG).hex + # for attiny25 + #avrdude -p t25 -c stk500v2 -P /dev/ttyUSB0 -e -U flash:w:$(PRG).hex + +a: all flash + +size: + avr-size --mcu=$(MCU_TARGET) -t -A $(PRG).elf + avr-size --mcu=$(MCU_TARGET) -C $(PRG).elf + avr-nm --size-sort $(PRG).elf diff --git a/avr-test/avr-fusedump.bash b/avr-test/avr-fusedump.bash new file mode 100755 index 0000000..d6c6e50 --- /dev/null +++ b/avr-test/avr-fusedump.bash @@ -0,0 +1,102 @@ +#!/bin/bash +############################################################################# +#Bash script to dump the fuse bits for AVR microcontrollers and open +#the Engbedded Atmel AVR Fuse Calculator with the current fuse settings. +# +#05-Nov-2009 +#Craig Heffner +#http://www.hackingwithgum.com +############################################################################# + +LFUSE=lfuse +HFUSE=hfuse +EFUSE=efuse +URL="http://www.engbedded.com/cgi-bin/fcx.cgi?P=MMCU&V_LOW=$LFUSE&V_HIGH=$HFUSE&V_EXTENDED=$EFUSE&O_HEX=Apply+values" +ADSUCCESS=OK +ADOK=0 +FUSE="" +DATA="" +ADARGS="" + +#Loop through all the arguments to the script and concatenate them into $ADARGS. +#These arguments get passed directly to avrdude. +while [ $# -ne 0 ] +do + #If this argument is -p, then the next one is the chip name + if [ "$1" == "-p" ] && [ "$2" != "" ] + then + URL=$(echo $URL | sed -e "s/MMCU/$2/") + fi + + ADARGS="$ADARGS $1" + shift +done + +#Does the user need usage help? +if [ "$ADARGS" == "" ] || [ "$ADARGS" == "-h" ] || [ "$ADARGS" == "--help" ] +then + echo "" + echo "Usage: $0 -c -p " + echo "" + echo -e "\tExample: $0 -c usbtiny -p ATmega8" + echo "" + echo -e "Note that the argument supplied to -p is case-sensitive.\nIt should look exactly as it does in the Engbedded Web site's select box.\n" + exit +fi + +#Dump fuse info with avrdude and loop through the output word by word +for WORD in $(avrdude $ADARGS -q -U lfuse:r:-:i -U hfuse:r:-:i -U efuse:r:-:i 2>&1) +do + #Check for the success indicator + if [ "$WORD" == "$ADSUCCESS" ] + then + ADOK=1 + fi + + #Look for keywords "lfuse", "hfuse", or "efuse". They appear + #just before the corresponding fuse values are displayed. + if [ $(echo $WORD | grep $LFUSE) ] + then + FUSE=$LFUSE + elif [ $(echo $WORD | grep $HFUSE) ] + then + FUSE=$HFUSE + elif [ $(echo $WORD | grep $EFUSE) ] + then + FUSE=$EFUSE + fi + + #Have we seen one of the fuse keywords? + if [ "$FUSE" != "" ] + then + #Displayed fuse values start with a colon + DATA=$(echo $WORD | grep -e "^:") + + if [ "$DATA" != "" ] + then + #Pull out the fuse byte; 9th and 10th characters in the displayed value + DATA=${DATA:9:2} + + #Display the fuse value and update the Engbedded URL with the value + echo -e "$FUSE\t0x$DATA" + URL=$(echo $URL | sed -e "s/$FUSE/$DATA/") + + #Clear these in order to look for the next fuse + FUSE="" + DATA="" + fi + fi +done + +#If there was an error, let the user know. +#Else, open the Engbedded URL. +if [ $ADOK -ne 1 ] +then + echo "Avrdude failed! Check your programmer and chip arguments." +else + #Show the URL + #echo $URL + + #Open the URL automatically + firefox $URL & +fi diff --git a/avr-test/ledcube.bin b/avr-test/ledcube.bin new file mode 100755 index 0000000..ed47c62 Binary files /dev/null and b/avr-test/ledcube.bin differ diff --git a/avr-test/ledcube.elf b/avr-test/ledcube.elf new file mode 100755 index 0000000..7143293 Binary files /dev/null and b/avr-test/ledcube.elf differ diff --git a/avr-test/ledcube.hex b/avr-test/ledcube.hex new file mode 100644 index 0000000..ac788ca --- /dev/null +++ b/avr-test/ledcube.hex @@ -0,0 +1,277 @@ +:1000000012C02CC02BC070C029C028C027C026C079 +:1000100025C025C023C022C021C020C01FC01EC0D3 +:100020001DC01CC01BC011241FBECFE5D4E0DEBF25 +:10003000CDBF10E0A4E6B0E001C01D92AC3EB10718 +:10004000E1F710E0A0E6B0E0EEE2F1E102C00590D9 +:100050000D92A436B107D9F7D9D067C8D1CF1F9276 +:100060000F920FB60F921124EF92FF920F931F93EE +:100070002F933F934F935F938F939F93E090E5006F +:10008000F090E6000091E7001091E800A8019701C8 +:100090002E5F3F4F4F4F5F4F9091EB00892F8A5F4C +:1000A0008093EB008D3748F097579093EB00A801B1 +:1000B00097012D5F3F4F4F4F5F4F2093E5003093E7 +:1000C000E6004093E7005093E8009F918F915F9185 +:1000D0004F913F912F911F910F91FF90EF900F90B3 +:1000E0000FBE0F901F9018951F920F920FB60F9290 +:1000F00011242F933F934F935F936F938F939F930D +:10010000AF93BF93EF93FF9385B3877D85BB6091DA +:10011000E90057E0A62FB0E0E52FF0E033E0EE0F66 +:10012000FF1F3A95E1F7EA0FFB1FEC59FF4F4081A3 +:10013000AC9888B3942F91708E7F982B98BBAC9A13 +:10014000AC9838B3842F90E095958795282F21702F +:100150003E7F232B28BBAC9AAC9838B395958795F6 +:10016000282F21703E7F232B28BBAC9AAC9838B344 +:1001700095958795282F21703E7F232B28BBAC9A1D +:10018000AC9838B395958795282F21703E7F232B07 +:1001900028BBAC9AAC9838B395958795282F2170D9 +:1001A0003E7F232B28BBAC9AAC9828B395958795B6 +:1001B00081702E7F822B88BBAC9AAC9888B3441F89 +:1001C0004427441F8E7F482B48BBAC9A515008F0FF +:1001D000A3CF85B3962F9862887F982B95BB962FD7 +:1001E0009F5F983008F090E09093E900FF91EF91C5 +:1001F000BF91AF919F918F916F915F914F913F917F +:100200002F910F900FBE0F901F901895EF92FF92B5 +:100210000F931F9312BE83B7836083BF89B781603A +:1002200089BF8BE083BD85B5856085BD85B5886058 +:1002300085BD14BC89B7806889BF12BA18BA15BACF +:100240008FEF81BB87BB84BB789420E0EE24E394DE +:10025000FF24FA9414C080E090E0422F50E0FC01AB +:1002600063E0EE0FFF1F6A95E1F7E40FF51FEC590D +:10027000FF4FF08201968830910589F72F5F283073 +:1002800050F3E092A4002091E5003091E600409107 +:10029000E7005091E8008091E5009091E600A09180 +:1002A000E700B091E800821B930BA40BB50B885EAE +:1002B0009340A040B04078F31092A40084E190E015 +:1002C0006CED70E040ED57E05DD584E690E084D2BF +:1002D00085E090E061E070E0F7D484E190E068EEC2 +:1002E00073E047D482E090E06AE770E04FEF5FEFA1 +:1002F00024E630E008EE13E09CD1B1D510E088E7A9 +:1003000060E070E046E950E021E030E05ED388E74D +:1003100061E070E046E950E021E030E056D389E743 +:1003200060E070E046E950E021E030E04ED389E73C +:1003300061E070E046E950E021E030E046D38AE732 +:1003400060E070E046E950E021E030E03ED38AE72B +:1003500061E070E046E950E021E030E036D31F5F15 +:100360001A3069F620E077CF75D60895089778F4AB +:1003700077FD0DC06830710554F457FD08C090E05A +:10038000483051050CF091E081E0982701C090E0E1 +:10039000892F0895FF920F931F93CF93DF93F82E29 +:1003A0008B01EA01E3DF8823A9F0FE0193E0EE0F61 +:1003B000FF1F9A95E1F7E00FF11FEC59FF4F2081E5 +:1003C00081E090E002C0880F991FFA94E2F78095CF +:1003D00082238083DF91CF911F910F91FF90089529 +:1003E000FF920F931F93CF93DF93F82E8B01EA01B7 +:1003F000BDDF8823A1F0FE0133E0EE0FFF1F3A9529 +:10040000E1F7E00FF11FEC59FF4F208181E090E010 +:1004100002C0880F991FFA94E2F7282B2083DF91FE +:10042000CF911F910F91FF900895FF920F931F930B +:10043000CF93DF93F82E8B01EA0198DF882389F0B0 +:1004400043E0CC0FDD1F4A95E1F7C00FD11FCC5917 +:10045000DF4F888190E002C095958795FA94E2F786 +:100460008170DF91CF911F910F91FF9008952130FE +:10047000310511F4B5DF08958DDF089540E050E0B7 +:1004800010C0FB01E20FF31FEC59FF4F80832F5F79 +:100490003F4F28303105A9F74F5F5F4F4830510576 +:1004A00049F020E030E0BA01E3E0660F771FEA95FB +:1004B000E1F7E7CF08950BC020E000000000000046 +:1004C0000000000000002F5F2A35B9F70197009760 +:1004D00099F708952F923F924F925F926F927F9279 +:1004E0009F92AF92BF92CF92DF92EF92FF920F93C3 +:1004F0001F93CF93DF93982E5B01CC24DD2447E03C +:10050000242E312C8FEFA8168FEFB80611F4760148 +:1005100003C07101EC18FD0800E010E02701089409 +:100520004108510837010894611C711C36C08FEFD7 +:10053000A8168FEFB80611F4C30101C0C201AC01C7 +:100540008AE7981641F4C801BE016FDF282FC80161 +:10055000BE01A70117C089E7981649F4C801BA017E +:10056000AE0163DF282FC801B701AE010BC088E7D9 +:10057000981651F4CA01BE01A80157DF282FC70100 +:10058000BE01A80130E073DF2196C830D10579F6AD +:100590000F5F1F4F0830110519F0C0E0D0E0C7CF42 +:1005A0000894C11CD11C88E0C816D10409F0AACF58 +:1005B0008FEFA8168FEFB80619F0EE24FF2403C0C2 +:1005C00037E0E32EF12C00E010E01EC08AE7981619 +:1005D00021F4C801BE01A7010DC089E7981621F4D6 +:1005E000C801B701AE0106C088E7981621F4C7011B +:1005F000BE01A801CFDE2196C830D10539F70F5FC3 +:100600001F4F0830110519F0C0E0D0E0DFCFDF91B7 +:10061000CF911F910F91FF90EF90DF90CF90BF90FF +:10062000AF909F907F906F905F904F903F902F90F2 +:1006300008952F923F924F925F926F927F928F9286 +:100640009F92AF92BF92CF92DF92EF92FF920F9361 +:100650001F93DF93CF93CDB7DEB72E970FB6F894E5 +:10066000DEBF0FBECDBF9A8389837C836B835E839D +:100670004D8338872F831A8709874F5F5F4F21F497 +:1006800097E0292E312C02C02224332489E0682EE1 +:10069000712C89819A81681A790A66DEB30132D495 +:1006A0006C0162DEB3012ED47C014424552475C054 +:1006B0005BDE8C0159DE9C01C80163E070E022D44E +:1006C00001978C0D9D1D9E878D87181619061CF4A9 +:1006D0008615970514F0DE86CD86C90163E070E0CB +:1006E00011D48C01015010400E0D1F1D1016110663 +:1006F0001CF4061517050CF087018B816D817E8136 +:10070000E9DE8D849E84AA24BB2430C0EB81FC8169 +:10071000EA37F10521F4C401B601A10115C08B81AE +:100720009C818937910521F4C401B101A6010CC057 +:10073000EB81FC81E837F10541F44D855E854E0D76 +:100740005F1DC1016B857C854BDE0894E11CF11CAB +:100750000894C11CD11C89819A81E816F906B4F26B +:100760000894A11CB11C0894811C911CE981FA8198 +:10077000AE16BF064CF46801EE24FF24C501800FBD +:10078000911F9C878B87E7CF89859A8594DE089493 +:10079000411C511CCD84DE847801EF81F8854E1612 +:1007A0005F060CF485CF2E960FB6F894DEBF0FBE11 +:1007B000CDBFCF91DF911F910F91FF90EF90DF9010 +:1007C000CF90BF90AF909F908F907F906F905F90F1 +:1007D0004F903F902F900895AF92BF92CF92DF92AB +:1007E000EF92FF920F931F93CF93DF935C01CC2482 +:1007F000DD242AC0B9DD64E070E084D3EC01EE248E +:10080000FF2415C0B1DD8C01AFDD9C01C80168E09B +:1008100070E078D3FC01C90168E070E073D3BC01DB +:10082000CF0147E050E0DCDD0894E11CF11CEC1640 +:10083000FD0644F388EE93E03EDE8AE76FEF7FEF3C +:1008400049DE0894C11CD11CCA14DB049CF2DF9160 +:10085000CF911F910F91FF90EF90DF90CF90BF90BD +:10086000AF9008957F928F929F92AF92BF92CF9256 +:10087000DF92EF92FF920F931F93CF93DF93E82EB7 +:10088000F62E742E6901C0E0D0E0F7E08F2E912C97 +:10089000E8E0AE2EB12C87E0781661F484010C1BE1 +:1008A0001D0BA5014C1B5D0B8E2D90E06F2D70E094 +:1008B00071DD09C0AE01415050408E2D90E06F2D8A +:1008C00070E068DD8E018E2D90E06F2D70E0A80144 +:1008D00087DDC601F0DD2196C830D105E1F6DF9154 +:1008E000CF911F910F91FF90EF90DF90CF90BF902D +:1008F000AF909F908F907F9008954F925F926F92EC +:100900007F929F92AF92BF92CF92DF92EF92FF922F +:100910000F931F93CF93DF93982E162F072F3A0133 +:1009200080E0ACDD212F302FC9016C01C0E0D0E0A8 +:1009300057E0452E512C34C06114710431F0F5019B +:100940008081A201481B510904C0F7018081482F12 +:1009500050E0FAE79F1619F4CE01B8010DC089E7FF +:10096000981621F4CE01BA01A80106C098E799169D +:1009700021F4CA01B801AE0133DD0F5F1F4F0894A7 +:10098000A11CB11C0894E11CF11C08301105A1F652 +:100990002196E8E0F0E0CE0EDF1EC830D10529F048 +:1009A0005601760100E010E0C7CFDF91CF911F9193 +:1009B0000F91FF90EF90DF90CF90BF90AF909F90FE +:1009C0007F906F905F904F9008952F923F924F923B +:1009D0005F926F927F928F929F92AF92BF92CF92CF +:1009E000DF92EF92FF920F931F93DF93CF93CDB7D8 +:1009F000DEB7C158D0400FB6F894DEBF0FBECDBFF2 +:100A0000CF57DF4F8883C158D0402B013A014901AD +:100A100071E4A72EB12CAC0EBD1EF50161E8C62E07 +:100A2000D12CCC0EDD1E1192EC15FD05E1F700E096 +:100A300010E01E010894211C311C81E088169104ED +:100A4000B9F412C091DC60E470E05CD2E1E4F0E063 +:100A5000EC0FFD1FE80FF91F8081882399F70F5FC6 +:100A60001F4F91E0908316C0003411055CF312C053 +:100A700082E08816910471F4003411055CF4E1E41D +:100A8000F0E0EC0FFD1FE00FF11F80818F5F80838E +:100A90000F5F1F4FF501EE24FF249081892F8150B5 +:100AA000863010F49F5F90838081873019F408941A +:100AB000E11CF11C3196EC15FD0579F7D101F5012A +:100AC00080814114510419F097E0981B892F8C9371 +:100AD00031961196EC15FD0599F7C301ECDCCF5763 +:100AE000DF4F8881C158D040B10140E050E005DFC0 +:100AF00082B394E0892782BB80E4E816F10409F010 +:100B00009CCFCF57DF4F0FB6F894DEBF0FBECDBFDF +:100B1000CF91DF911F910F91FF90EF90DF90CF90D9 +:100B2000BF90AF909F908F907F906F905F904F900D +:100B30003F902F900895AC01DC01FB0120E030E0F4 +:100B40009C918081981710F49F5F9C939C91808169 +:100B5000891710F491509C932F5F3F4F1196319657 +:100B60002034310569F78AE7BA0140E050E0C5DE7C +:100B700008952F923F924F925F926F927F928F9241 +:100B80009F92AF92BF92CF92DF92EF92FF920F931C +:100B90001F93DF93CF93CDB7DEB7C058D0400FB6C9 +:100BA000F894DEBF0FBECDBF2C017B0100E010E04A +:100BB0005E010894A11CB11C24E0922E91E4C92E80 +:100BC000D12CCC0EDD1EF501E00FF11F9082CCDBA5 +:100BD000F601E00FF11F68E070E094D180830F5FB1 +:100BE0001F4F0034110579F700E010E081E4A82ED2 +:100BF000B12CAC0EBD1E6E010894C11CD11C370176 +:100C0000C601B5014AE797DFC30155DC0F5F1F4FEF +:100C100008301105A9F75701AA0CBB1CAA0CBB1C74 +:100C2000CC24DD24A1E48A2E912C8C0E9D1E1E0165 +:100C30000894211C311C2BC000E010E0C101B4015C +:100C40004AE779DFC30137DC0F5F1F4F083011051A +:100C5000A9F7C50130DCEE24FF2486DB8C0184DBA0 +:100C60009C01C80160E470E04DD1F401E80FF91F68 +:100C7000C90168E070E046D180830894E11CF11C52 +:100C800080E2E816F10449F70894C11CD11CC41491 +:100C9000D50494F2C058DF4F0FB6F894DEBF0FBEF4 +:100CA000CDBFCF91DF911F910F91FF90EF90DF901B +:100CB000CF90BF90AF909F908F907F906F905F90FC +:100CC0004F903F902F9008958F929F92AF92BF9236 +:100CD000CF92DF92EF92FF920F931F93CF93DF9308 +:100CE0004C018B016130710511F480E001C08FEF80 +:100CF000C5DBC0E0D0E038DB68E070E003D1B82E9F +:100D0000A92E32DB68E070E0FDD0D82EC92E2CDB96 +:100D100068E070E0F7D0F82EE92E0115110551F4C6 +:100D20008B2D9A2D6D2D7C2D4F2D5E2D7EDB8130F0 +:100D300011F70CC001301105F1F68B2D9A2D6D2D98 +:100D40007C2D4F2D5E2D71DB8823A9F68B2D9A2DDE +:100D50006D2D7C2D4F2D5E2D980189DBC401ABDB01 +:100D6000219681E0CF3FD80731F6DF91CF911F91D7 +:100D70000F91FF90EF90DF90CF90BF90AF909F903A +:100D80008F9008956F927F928F929F92AF92BF92B1 +:100D9000DF92EF92FF920F931F93CF93DF933C016B +:100DA0005B014A0180E06ADB00E010E01CC0DCDA95 +:100DB00062E070E0A7D0AC0133E0440F551F3A95D4 +:100DC000E1F7481B590BC801BE010ADB2196C83068 +:100DD000D10569F70F5F1F4F0830110521F4DD249D +:100DE000EE24FF2429C0C0E0D0E0E1CFBDDAEC0161 +:100DF000BBDA68E070E086D0082F8E15E1F0CE01F6 +:100E000068E070E07FD0182F8D15A9F090E0602F7A +:100E100070E040E050E009DB882321F0812F602F53 +:100E200040E003C0812F602F47E095011BDDC40126 +:100E300042DBD12EE02EF3948F2D90E0861597059E +:100E4000ACF2DF91CF911F910F91FF90EF90DF9067 +:100E5000BF90AF909F908F907F906F900895EF928A +:100E6000FF920F931F93CF93DF9380E007DB00E0A7 +:100E700010E04FEEE42E42E0F42E3AC080E0FEDABD +:100E8000CE0119DB8FEFFADA84E690E014DBCE01B5 +:100E900066EF7FEF37D088EE93E034D06F5070402C +:100EA000C60FD71F1C161D064CF388EE93E003DB1C +:100EB000CEEED2E080E0E2DAC7018C1B9D0BFBDABC +:100EC0008FEFDCDA84E690E0F6DACE0166EF7FEFB2 +:100ED00019D088EE93E016D06F507040C60FD71F20 +:100EE0001C161D063CF30F5F1F4F0230110519F051 +:100EF000CEEED2E0C3CFDF91CF911F910F91FF9043 +:100F0000EF90089597FB092E07260AD077FD04D0AD +:100F10000CD006D000201AF4709561957F4F08958B +:100F2000F6F7909581959F4F0895AA1BBB1B51E141 +:100F300007C0AA1FBB1FA617B70710F0A61BB70B49 +:100F4000881F991F5A95A9F780959095BC01CD01EE +:100F500008952F923F924F925F926F927F928F925D +:100F60009F92AF92BF92CF92DF92EF92FF920F9338 +:100F70001F93CF93DF93CDB7DEB7CA1BDB0B0FB642 +:100F8000F894DEBF0FBECDBF09942A8839884888FF +:100F90005F846E847D848C849B84AA84B984C88495 +:100FA000DF80EE80FD800C811B81AA81B981CE0F8C +:100FB000D11D0FB6F894DEBF0FBECDBFED01089571 +:100FC000A0E0B0E0E5EEF7E0CCCFEC01A880B9807E +:100FD000CA80DB80A114B104C104D10441F484E2CD +:100FE000A82E89EDB82E8BE5C82E87E0D82EC60135 +:100FF000B5012DE133EF41E050E05AD027EA31E46A +:1010000040E050E036D07B018C01C601B5012DE1F6 +:1010100033EF41E050E04CD0CA01B9012CEE34EF7F +:101020004FEF5FEF26D06E0D7F1D801F911F97FF42 +:1010300004C06150704080409048688379838A83FF +:101040009B839B013F77C901CDB7DEB7EAE0A5CF0F +:10105000B7DF089580E690E0B3DF0895A0E0B0E048 +:101060008093600090936100A0936200B09363004E +:101070000895629FD001739FF001829FE00DF11DE2 +:10108000649FE00DF11D929FF00D839FF00D749F02 +:10109000F00D659FF00D9927729FB00DE11DF91FAE +:1010A000639FB00DE11DF91FBD01CF01112408950B +:1010B00097FB092E05260ED057FD04D014D00AD078 +:1010C000001C38F450954095309521953F4F4F4F77 +:1010D0005F4F0895F6F790958095709561957F4FD5 +:1010E0008F4F9F4F0895A1E21A2EAA1BBB1BFD0133 +:1010F0000DC0AA1FBB1FEE1FFF1FA217B307E407F7 +:10110000F50720F0A21BB30BE40BF50B661F771F4E +:10111000881F991F1A9469F760957095809590952E +:0E1120009B01AC01BD01CF010895F894FFCFF3 +:04112E0001000000BC +:00000001FF diff --git a/avr-test/ledcube.lst b/avr-test/ledcube.lst new file mode 100644 index 0000000..6fde88b --- /dev/null +++ b/avr-test/ledcube.lst @@ -0,0 +1,3367 @@ + +ledcube.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 0000112e 00000000 00000000 00000094 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .data 00000004 00800060 0000112e 000011c2 2**0 + CONTENTS, ALLOC, LOAD, DATA + 2 .bss 00000088 00800064 00800064 000011c6 2**0 + ALLOC + 3 .stab 00004284 00000000 00000000 000011c8 2**2 + CONTENTS, READONLY, DEBUGGING + 4 .stabstr 00001cbd 00000000 00000000 0000544c 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> + 2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> + 4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> + 6: 70 c0 rjmp .+224 ; 0xe8 <__vector_3> + 8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> + a: 28 c0 rjmp .+80 ; 0x5c <__bad_interrupt> + c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> + e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> + 10: 25 c0 rjmp .+74 ; 0x5c <__bad_interrupt> + 12: 25 c0 rjmp .+74 ; 0x5e <__vector_9> + 14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> + 16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> + 18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> + 1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> + 1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> + 1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> + 20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> + 22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> + 24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> + +00000026 <__ctors_end>: + 26: 11 24 eor r1, r1 + 28: 1f be out 0x3f, r1 ; 63 + 2a: cf e5 ldi r28, 0x5F ; 95 + 2c: d4 e0 ldi r29, 0x04 ; 4 + 2e: de bf out 0x3e, r29 ; 62 + 30: cd bf out 0x3d, r28 ; 61 + +00000032 <__do_clear_bss>: + 32: 10 e0 ldi r17, 0x00 ; 0 + 34: a4 e6 ldi r26, 0x64 ; 100 + 36: b0 e0 ldi r27, 0x00 ; 0 + 38: 01 c0 rjmp .+2 ; 0x3c <.do_clear_bss_start> + +0000003a <.do_clear_bss_loop>: + 3a: 1d 92 st X+, r1 + +0000003c <.do_clear_bss_start>: + 3c: ac 3e cpi r26, 0xEC ; 236 + 3e: b1 07 cpc r27, r17 + 40: e1 f7 brne .-8 ; 0x3a <.do_clear_bss_loop> + +00000042 <__do_copy_data>: + 42: 10 e0 ldi r17, 0x00 ; 0 + 44: a0 e6 ldi r26, 0x60 ; 96 + 46: b0 e0 ldi r27, 0x00 ; 0 + 48: ee e2 ldi r30, 0x2E ; 46 + 4a: f1 e1 ldi r31, 0x11 ; 17 + 4c: 02 c0 rjmp .+4 ; 0x52 <.do_copy_data_start> + +0000004e <.do_copy_data_loop>: + 4e: 05 90 lpm r0, Z+ + 50: 0d 92 st X+, r0 + +00000052 <.do_copy_data_start>: + 52: a4 36 cpi r26, 0x64 ; 100 + 54: b1 07 cpc r27, r17 + 56: d9 f7 brne .-10 ; 0x4e <.do_copy_data_loop> + 58: d9 d0 rcall .+434 ; 0x20c
+ 5a: 67 c8 rjmp .-3890 ; 0xfffff12a <__eeprom_end+0xff7ef12a> + +0000005c <__bad_interrupt>: + 5c: d1 cf rjmp .-94 ; 0x0 <__vectors> + +0000005e <__vector_9>: +//volatile uint32_t timer0_overflow_count = 0; +volatile uint32_t timer0_millis = 0; +//static uint8_t timer0_fract = 0; + + +ISR(TIMER0_OVF_vect) + 5e: 1f 92 push r1 + 60: 0f 92 push r0 + 62: 0f b6 in r0, 0x3f ; 63 + 64: 0f 92 push r0 + 66: 11 24 eor r1, r1 + 68: ef 92 push r14 + 6a: ff 92 push r15 + 6c: 0f 93 push r16 + 6e: 1f 93 push r17 + 70: 2f 93 push r18 + 72: 3f 93 push r19 + 74: 4f 93 push r20 + 76: 5f 93 push r21 + 78: 8f 93 push r24 + 7a: 9f 93 push r25 +{ + // copy these to local variables so they can be stored in registers + // (volatile variables must be read from memory on every access) + uint32_t m = timer0_millis; + 7c: e0 90 e5 00 lds r14, 0x00E5 + 80: f0 90 e6 00 lds r15, 0x00E6 + 84: 00 91 e7 00 lds r16, 0x00E7 + 88: 10 91 e8 00 lds r17, 0x00E8 + //uint8_t f = timer0_fract; + static uint8_t timer0_fract = 0; + + m += MILLIS_INC; + 8c: a8 01 movw r20, r16 + 8e: 97 01 movw r18, r14 + 90: 2e 5f subi r18, 0xFE ; 254 + 92: 3f 4f sbci r19, 0xFF ; 255 + 94: 4f 4f sbci r20, 0xFF ; 255 + 96: 5f 4f sbci r21, 0xFF ; 255 + //f += FRACT_INC; + timer0_fract += FRACT_INC; + 98: 90 91 eb 00 lds r25, 0x00EB + 9c: 89 2f mov r24, r25 + 9e: 8a 5f subi r24, 0xFA ; 250 + a0: 80 93 eb 00 sts 0x00EB, r24 + //if (f >= FRACT_MAX) { + if (timer0_fract >= FRACT_MAX) { + a4: 8d 37 cpi r24, 0x7D ; 125 + a6: 48 f0 brcs .+18 ; 0xba <__vector_9+0x5c> + //f -= FRACT_MAX; + timer0_fract -= FRACT_MAX; + a8: 97 57 subi r25, 0x77 ; 119 + aa: 90 93 eb 00 sts 0x00EB, r25 + ++m; + ae: a8 01 movw r20, r16 + b0: 97 01 movw r18, r14 + b2: 2d 5f subi r18, 0xFD ; 253 + b4: 3f 4f sbci r19, 0xFF ; 255 + b6: 4f 4f sbci r20, 0xFF ; 255 + b8: 5f 4f sbci r21, 0xFF ; 255 + } + + //timer0_fract = f; + timer0_millis = m; + ba: 20 93 e5 00 sts 0x00E5, r18 + be: 30 93 e6 00 sts 0x00E6, r19 + c2: 40 93 e7 00 sts 0x00E7, r20 + c6: 50 93 e8 00 sts 0x00E8, r21 + //if (timer0_overflow_count & 0x1) + //if (m - last_time >= 5) { + //debounce_keys(); // called nearly each 2ms (0,002048s) + //last_time = m; + //} +} + ca: 9f 91 pop r25 + cc: 8f 91 pop r24 + ce: 5f 91 pop r21 + d0: 4f 91 pop r20 + d2: 3f 91 pop r19 + d4: 2f 91 pop r18 + d6: 1f 91 pop r17 + d8: 0f 91 pop r16 + da: ff 90 pop r15 + dc: ef 90 pop r14 + de: 0f 90 pop r0 + e0: 0f be out 0x3f, r0 ; 63 + e2: 0f 90 pop r0 + e4: 1f 90 pop r1 + e6: 18 95 reti + +000000e8 <__vector_3>: +// current_layer = current_layer_ & 0x07; +// +// PORTC |= 0x28; // layer and latch high +//} + +ISR(TIMER2_COMP_vect) + e8: 1f 92 push r1 + ea: 0f 92 push r0 + ec: 0f b6 in r0, 0x3f ; 63 + ee: 0f 92 push r0 + f0: 11 24 eor r1, r1 + f2: 2f 93 push r18 + f4: 3f 93 push r19 + f6: 4f 93 push r20 + f8: 5f 93 push r21 + fa: 6f 93 push r22 + fc: 8f 93 push r24 + fe: 9f 93 push r25 + 100: af 93 push r26 + 102: bf 93 push r27 + 104: ef 93 push r30 + 106: ff 93 push r31 +{ + //if (!in_wait) return; + PORTC &= ~0x28; // layer and latch low + 108: 85 b3 in r24, 0x15 ; 21 + 10a: 87 7d andi r24, 0xD7 ; 215 + 10c: 85 bb out 0x15, r24 ; 21 + unsigned char current_layer_ = current_layer; + 10e: 60 91 e9 00 lds r22, 0x00E9 + 112: 57 e0 ldi r21, 0x07 ; 7 + + for (unsigned char j = 7; j < 255; --j) { + //for (char j = 0; j < 4; ++j) { + unsigned char val = cube[j][current_layer_]; + 114: a6 2f mov r26, r22 + 116: b0 e0 ldi r27, 0x00 ; 0 + 118: e5 2f mov r30, r21 + 11a: f0 e0 ldi r31, 0x00 ; 0 + 11c: 33 e0 ldi r19, 0x03 ; 3 + 11e: ee 0f add r30, r30 + 120: ff 1f adc r31, r31 + 122: 3a 95 dec r19 + 124: e1 f7 brne .-8 ; 0x11e <__vector_3+0x36> + 126: ea 0f add r30, r26 + 128: fb 1f adc r31, r27 + 12a: ec 59 subi r30, 0x9C ; 156 + 12c: ff 4f sbci r31, 0xFF ; 255 + 12e: 40 81 ld r20, Z + PORTC &= ~0x10; + 130: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val ) & 0x01); + 132: 88 b3 in r24, 0x18 ; 24 + 134: 94 2f mov r25, r20 + 136: 91 70 andi r25, 0x01 ; 1 + 138: 8e 7f andi r24, 0xFE ; 254 + 13a: 98 2b or r25, r24 + 13c: 98 bb out 0x18, r25 ; 24 + PORTC |= 0x10; + 13e: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 140: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 1) & 0x01); + 142: 38 b3 in r19, 0x18 ; 24 + 144: 84 2f mov r24, r20 + 146: 90 e0 ldi r25, 0x00 ; 0 + 148: 95 95 asr r25 + 14a: 87 95 ror r24 + 14c: 28 2f mov r18, r24 + 14e: 21 70 andi r18, 0x01 ; 1 + 150: 3e 7f andi r19, 0xFE ; 254 + 152: 23 2b or r18, r19 + 154: 28 bb out 0x18, r18 ; 24 + PORTC |= 0x10; + 156: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 158: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 2) & 0x01); + 15a: 38 b3 in r19, 0x18 ; 24 + 15c: 95 95 asr r25 + 15e: 87 95 ror r24 + 160: 28 2f mov r18, r24 + 162: 21 70 andi r18, 0x01 ; 1 + 164: 3e 7f andi r19, 0xFE ; 254 + 166: 23 2b or r18, r19 + 168: 28 bb out 0x18, r18 ; 24 + PORTC |= 0x10; + 16a: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 16c: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 3) & 0x01); + 16e: 38 b3 in r19, 0x18 ; 24 + 170: 95 95 asr r25 + 172: 87 95 ror r24 + 174: 28 2f mov r18, r24 + 176: 21 70 andi r18, 0x01 ; 1 + 178: 3e 7f andi r19, 0xFE ; 254 + 17a: 23 2b or r18, r19 + 17c: 28 bb out 0x18, r18 ; 24 + PORTC |= 0x10; + 17e: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 180: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 4) & 0x01); + 182: 38 b3 in r19, 0x18 ; 24 + 184: 95 95 asr r25 + 186: 87 95 ror r24 + 188: 28 2f mov r18, r24 + 18a: 21 70 andi r18, 0x01 ; 1 + 18c: 3e 7f andi r19, 0xFE ; 254 + 18e: 23 2b or r18, r19 + 190: 28 bb out 0x18, r18 ; 24 + PORTC |= 0x10; + 192: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 194: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 5) & 0x01); + 196: 38 b3 in r19, 0x18 ; 24 + 198: 95 95 asr r25 + 19a: 87 95 ror r24 + 19c: 28 2f mov r18, r24 + 19e: 21 70 andi r18, 0x01 ; 1 + 1a0: 3e 7f andi r19, 0xFE ; 254 + 1a2: 23 2b or r18, r19 + 1a4: 28 bb out 0x18, r18 ; 24 + PORTC |= 0x10; + 1a6: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 1a8: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 6) & 0x01); + 1aa: 28 b3 in r18, 0x18 ; 24 + 1ac: 95 95 asr r25 + 1ae: 87 95 ror r24 + 1b0: 81 70 andi r24, 0x01 ; 1 + 1b2: 2e 7f andi r18, 0xFE ; 254 + 1b4: 82 2b or r24, r18 + 1b6: 88 bb out 0x18, r24 ; 24 + PORTC |= 0x10; + 1b8: ac 9a sbi 0x15, 4 ; 21 + PORTC &= ~0x10; + 1ba: ac 98 cbi 0x15, 4 ; 21 + PORTB = (PORTB & ~0x01) | ((val >> 7) & 0x01); + 1bc: 88 b3 in r24, 0x18 ; 24 + 1be: 44 1f adc r20, r20 + 1c0: 44 27 eor r20, r20 + 1c2: 44 1f adc r20, r20 + 1c4: 8e 7f andi r24, 0xFE ; 254 + 1c6: 48 2b or r20, r24 + 1c8: 48 bb out 0x18, r20 ; 24 + //PORTD = val; + PORTC |= 0x10; + 1ca: ac 9a sbi 0x15, 4 ; 21 +{ + //if (!in_wait) return; + PORTC &= ~0x28; // layer and latch low + unsigned char current_layer_ = current_layer; + + for (unsigned char j = 7; j < 255; --j) { + 1cc: 51 50 subi r21, 0x01 ; 1 + 1ce: 08 f0 brcs .+2 ; 0x1d2 <__vector_3+0xea> + 1d0: a3 cf rjmp .-186 ; 0x118 <__vector_3+0x30> + PORTB = (PORTB & ~0x01) | ((val >> 7) & 0x01); + //PORTD = val; + PORTC |= 0x10; + } + + PORTC = (PORTC & ~0x07) | current_layer_ | 0x28; + 1d2: 85 b3 in r24, 0x15 ; 21 + 1d4: 96 2f mov r25, r22 + 1d6: 98 62 ori r25, 0x28 ; 40 + 1d8: 88 7f andi r24, 0xF8 ; 248 + 1da: 98 2b or r25, r24 + 1dc: 95 bb out 0x15, r25 ; 21 + ++current_layer_; + 1de: 96 2f mov r25, r22 + 1e0: 9f 5f subi r25, 0xFF ; 255 + if (current_layer_ > 7) current_layer_ = 0; + 1e2: 98 30 cpi r25, 0x08 ; 8 + 1e4: 08 f0 brcs .+2 ; 0x1e8 <__vector_3+0x100> + 1e6: 90 e0 ldi r25, 0x00 ; 0 + //current_layer = current_layer_ & 0x07; + current_layer = current_layer_; + 1e8: 90 93 e9 00 sts 0x00E9, r25 + + //PORTC |= 0x28; // layer and latch high +} + 1ec: ff 91 pop r31 + 1ee: ef 91 pop r30 + 1f0: bf 91 pop r27 + 1f2: af 91 pop r26 + 1f4: 9f 91 pop r25 + 1f6: 8f 91 pop r24 + 1f8: 6f 91 pop r22 + 1fa: 5f 91 pop r21 + 1fc: 4f 91 pop r20 + 1fe: 3f 91 pop r19 + 200: 2f 91 pop r18 + 202: 0f 90 pop r0 + 204: 0f be out 0x3f, r0 ; 63 + 206: 0f 90 pop r0 + 208: 1f 90 pop r1 + 20a: 18 95 reti + +0000020c
: + *****************************************************************************/ +#include "main.h" +#include "effect.h" +#include "draw.h" + +int main() + 20c: ef 92 push r14 + 20e: ff 92 push r15 + 210: 0f 93 push r16 + 212: 1f 93 push r17 + * Initialisation + * ======================================================================= + */ + + //*** init time management + TCNT0 = 0; // init timer count to 0 + 214: 12 be out 0x32, r1 ; 50 + TCCR0 |= 0x03; // prescaler: 64 + 216: 83 b7 in r24, 0x33 ; 51 + 218: 83 60 ori r24, 0x03 ; 3 + 21a: 83 bf out 0x33, r24 ; 51 + TIMSK |= 0x01; // enable timer 0 overflow interrupt + 21c: 89 b7 in r24, 0x39 ; 57 + 21e: 81 60 ori r24, 0x01 ; 1 + 220: 89 bf out 0x39, r24 ; 57 + + // Timer 2 + // Frame buffer interrupt + // 14745600/128/11 = 10472.72 interrupts per second + // 10472.72/8 = 1309 frames per second + OCR2 = 11; // interrupt at counter = 10 + 222: 8b e0 ldi r24, 0x0B ; 11 + 224: 83 bd out 0x23, r24 ; 35 + TCCR2 |= (1 << CS20) | (0 << CS21) | (1 << CS22); // Prescaler = 128. + 226: 85 b5 in r24, 0x25 ; 37 + 228: 85 60 ori r24, 0x05 ; 5 + 22a: 85 bd out 0x25, r24 ; 37 + TCCR2 |= (1 << WGM21); // CTC mode. Reset counter when OCR2 is reached. + 22c: 85 b5 in r24, 0x25 ; 37 + 22e: 88 60 ori r24, 0x08 ; 8 + 230: 85 bd out 0x25, r24 ; 37 + TCNT2 = 0x00; // initial counter value = 0; + 232: 14 bc out 0x24, r1 ; 36 + TIMSK |= (1 << OCIE2); // Enable CTC interrupt + 234: 89 b7 in r24, 0x39 ; 57 + 236: 80 68 ori r24, 0x80 ; 128 + 238: 89 bf out 0x39, r24 ; 57 + + PORTD = 0; + 23a: 12 ba out 0x12, r1 ; 18 + PORTB = 0; + 23c: 18 ba out 0x18, r1 ; 24 + PORTC = 0; + 23e: 15 ba out 0x15, r1 ; 21 + DDRD = 0xff; + 240: 8f ef ldi r24, 0xFF ; 255 + 242: 81 bb out 0x11, r24 ; 17 + DDRB = 0xff; + 244: 87 bb out 0x17, r24 ; 23 + DDRC = 0xff; + 246: 84 bb out 0x14, r24 ; 20 + + //*** set interupts + sei(); + 248: 78 94 sei + 24a: 20 e0 ldi r18, 0x00 ; 0 + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + 24c: ee 24 eor r14, r14 + 24e: e3 94 inc r14 + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0xFF; + 250: ff 24 eor r15, r15 + 252: fa 94 dec r15 + 254: 14 c0 rjmp .+40 ; 0x27e + DDRD = 0xff; + DDRB = 0xff; + DDRC = 0xff; + + //*** set interupts + sei(); + 256: 80 e0 ldi r24, 0x00 ; 0 + 258: 90 e0 ldi r25, 0x00 ; 0 + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0xFF; + 25a: 42 2f mov r20, r18 + 25c: 50 e0 ldi r21, 0x00 ; 0 + 25e: fc 01 movw r30, r24 + 260: 63 e0 ldi r22, 0x03 ; 3 + 262: ee 0f add r30, r30 + 264: ff 1f adc r31, r31 + 266: 6a 95 dec r22 + 268: e1 f7 brne .-8 ; 0x262 + 26a: e4 0f add r30, r20 + 26c: f5 1f adc r31, r21 + 26e: ec 59 subi r30, 0x9C ; 156 + 270: ff 4f sbci r31, 0xFF ; 255 + 272: f0 82 st Z, r15 + 274: 01 96 adiw r24, 0x01 ; 1 + for (;;) { + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + 276: 88 30 cpi r24, 0x08 ; 8 + 278: 91 05 cpc r25, r1 + 27a: 89 f7 brne .-30 ; 0x25e + + for (;;) { + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + 27c: 2f 5f subi r18, 0xFF ; 255 + 27e: 28 30 cpi r18, 0x08 ; 8 + 280: 50 f3 brcs .-44 ; 0x256 + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + 282: e0 92 a4 00 sts 0x00A4, r14 +} +*/ + +inline uint32_t millis() +{ + return timer0_millis; + 286: 20 91 e5 00 lds r18, 0x00E5 + 28a: 30 91 e6 00 lds r19, 0x00E6 + 28e: 40 91 e7 00 lds r20, 0x00E7 + 292: 50 91 e8 00 lds r21, 0x00E8 + 296: 80 91 e5 00 lds r24, 0x00E5 + 29a: 90 91 e6 00 lds r25, 0x00E6 + 29e: a0 91 e7 00 lds r26, 0x00E7 + 2a2: b0 91 e8 00 lds r27, 0x00E8 + +void delay(uint32_t ms) +{ + in_wait = true; + uint32_t time1 = millis(); + while ((millis()) - time1 < ms); + 2a6: 82 1b sub r24, r18 + 2a8: 93 0b sbc r25, r19 + 2aa: a4 0b sbc r26, r20 + 2ac: b5 0b sbc r27, r21 + 2ae: 88 5e subi r24, 0xE8 ; 232 + 2b0: 93 40 sbci r25, 0x03 ; 3 + 2b2: a0 40 sbci r26, 0x00 ; 0 + 2b4: b0 40 sbci r27, 0x00 ; 0 + 2b6: 78 f3 brcs .-34 ; 0x296 + in_wait = false; + 2b8: 10 92 a4 00 sts 0x00A4, r1 + delay(1000); + + // Show the effects in a predefined order + //for (char i=0; i + effect_rain(100); + 2ca: 84 e6 ldi r24, 0x64 ; 100 + 2cc: 90 e0 ldi r25, 0x00 ; 0 + 2ce: 84 d2 rcall .+1288 ; 0x7d8 <_Z11effect_raini> + effect_random_filler(5,1); + 2d0: 85 e0 ldi r24, 0x05 ; 5 + 2d2: 90 e0 ldi r25, 0x00 ; 0 + 2d4: 61 e0 ldi r22, 0x01 ; 1 + 2d6: 70 e0 ldi r23, 0x00 ; 0 + 2d8: f7 d4 rcall .+2542 ; 0xcc8 <_Z20effect_random_fillerii> + effect_z_updown(20,1000); + 2da: 84 e1 ldi r24, 0x14 ; 20 + 2dc: 90 e0 ldi r25, 0x00 ; 0 + 2de: 68 ee ldi r22, 0xE8 ; 232 + 2e0: 73 e0 ldi r23, 0x03 ; 3 + 2e2: 47 d4 rcall .+2190 ; 0xb72 <_Z15effect_z_updownii> + effect_wormsqueeze (2, AXIS_Z, -1, 100, 1000); + 2e4: 82 e0 ldi r24, 0x02 ; 2 + 2e6: 90 e0 ldi r25, 0x00 ; 0 + 2e8: 6a e7 ldi r22, 0x7A ; 122 + 2ea: 70 e0 ldi r23, 0x00 ; 0 + 2ec: 4f ef ldi r20, 0xFF ; 255 + 2ee: 5f ef ldi r21, 0xFF ; 255 + 2f0: 24 e6 ldi r18, 0x64 ; 100 + 2f2: 30 e0 ldi r19, 0x00 ; 0 + 2f4: 08 ee ldi r16, 0xE8 ; 232 + 2f6: 13 e0 ldi r17, 0x03 ; 3 + 2f8: 9c d1 rcall .+824 ; 0x632 <_Z18effect_wormsqueezeiiiii> + effect_blinky2(); + 2fa: b1 d5 rcall .+2914 ; 0xe5e <_Z14effect_blinky2v> + 2fc: 10 e0 ldi r17, 0x00 ; 0 + // Comment the two lines above and uncomment this + // if you want the effects in a random order. + //launch_effect(rand()%EFFECTS_TOTAL); + + for (char i = 0; i < 10; ++i) { + effect_boxside_randsend_parallel (AXIS_X, 0, 150, 1); + 2fe: 88 e7 ldi r24, 0x78 ; 120 + 300: 60 e0 ldi r22, 0x00 ; 0 + 302: 70 e0 ldi r23, 0x00 ; 0 + 304: 46 e9 ldi r20, 0x96 ; 150 + 306: 50 e0 ldi r21, 0x00 ; 0 + 308: 21 e0 ldi r18, 0x01 ; 1 + 30a: 30 e0 ldi r19, 0x00 ; 0 + 30c: 5e d3 rcall .+1724 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> + effect_boxside_randsend_parallel (AXIS_X, 1, 150, 1); + 30e: 88 e7 ldi r24, 0x78 ; 120 + 310: 61 e0 ldi r22, 0x01 ; 1 + 312: 70 e0 ldi r23, 0x00 ; 0 + 314: 46 e9 ldi r20, 0x96 ; 150 + 316: 50 e0 ldi r21, 0x00 ; 0 + 318: 21 e0 ldi r18, 0x01 ; 1 + 31a: 30 e0 ldi r19, 0x00 ; 0 + 31c: 56 d3 rcall .+1708 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> + effect_boxside_randsend_parallel (AXIS_Y, 0, 150, 1); + 31e: 89 e7 ldi r24, 0x79 ; 121 + 320: 60 e0 ldi r22, 0x00 ; 0 + 322: 70 e0 ldi r23, 0x00 ; 0 + 324: 46 e9 ldi r20, 0x96 ; 150 + 326: 50 e0 ldi r21, 0x00 ; 0 + 328: 21 e0 ldi r18, 0x01 ; 1 + 32a: 30 e0 ldi r19, 0x00 ; 0 + 32c: 4e d3 rcall .+1692 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> + effect_boxside_randsend_parallel (AXIS_Y, 1, 150, 1); + 32e: 89 e7 ldi r24, 0x79 ; 121 + 330: 61 e0 ldi r22, 0x01 ; 1 + 332: 70 e0 ldi r23, 0x00 ; 0 + 334: 46 e9 ldi r20, 0x96 ; 150 + 336: 50 e0 ldi r21, 0x00 ; 0 + 338: 21 e0 ldi r18, 0x01 ; 1 + 33a: 30 e0 ldi r19, 0x00 ; 0 + 33c: 46 d3 rcall .+1676 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> + effect_boxside_randsend_parallel (AXIS_Z, 0, 150, 1); + 33e: 8a e7 ldi r24, 0x7A ; 122 + 340: 60 e0 ldi r22, 0x00 ; 0 + 342: 70 e0 ldi r23, 0x00 ; 0 + 344: 46 e9 ldi r20, 0x96 ; 150 + 346: 50 e0 ldi r21, 0x00 ; 0 + 348: 21 e0 ldi r18, 0x01 ; 1 + 34a: 30 e0 ldi r19, 0x00 ; 0 + 34c: 3e d3 rcall .+1660 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> + effect_boxside_randsend_parallel (AXIS_Z, 1, 150, 1); + 34e: 8a e7 ldi r24, 0x7A ; 122 + 350: 61 e0 ldi r22, 0x01 ; 1 + 352: 70 e0 ldi r23, 0x00 ; 0 + 354: 46 e9 ldi r20, 0x96 ; 150 + 356: 50 e0 ldi r21, 0x00 ; 0 + 358: 21 e0 ldi r18, 0x01 ; 1 + 35a: 30 e0 ldi r19, 0x00 ; 0 + 35c: 36 d3 rcall .+1644 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> + // Show the effects in a random order. + // Comment the two lines above and uncomment this + // if you want the effects in a random order. + //launch_effect(rand()%EFFECTS_TOTAL); + + for (char i = 0; i < 10; ++i) { + 35e: 1f 5f subi r17, 0xFF ; 255 + 360: 1a 30 cpi r17, 0x0A ; 10 + 362: 69 f6 brne .-102 ; 0x2fe + 364: 20 e0 ldi r18, 0x00 ; 0 + 366: 77 cf rjmp .-274 ; 0x256 + +00000368 <_Z6myrandv>: +// static short rand = 0; +// rand=(rand*109+89)%251; +// return rand; +//} + +int myrand() { return rand(); } + 368: 75 d6 rcall .+3306 ; 0x1054 + 36a: 08 95 ret + +0000036c <_Z7inrangeiii>: +} + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + 36c: 08 97 sbiw r24, 0x08 ; 8 + 36e: 78 f4 brcc .+30 ; 0x38e <_Z7inrangeiii+0x22> + 370: 77 fd sbrc r23, 7 + 372: 0d c0 rjmp .+26 ; 0x38e <_Z7inrangeiii+0x22> + 374: 68 30 cpi r22, 0x08 ; 8 + 376: 71 05 cpc r23, r1 + 378: 54 f4 brge .+20 ; 0x38e <_Z7inrangeiii+0x22> + 37a: 57 fd sbrc r21, 7 + 37c: 08 c0 rjmp .+16 ; 0x38e <_Z7inrangeiii+0x22> + 37e: 90 e0 ldi r25, 0x00 ; 0 + 380: 48 30 cpi r20, 0x08 ; 8 + 382: 51 05 cpc r21, r1 + 384: 0c f0 brlt .+2 ; 0x388 <_Z7inrangeiii+0x1c> + 386: 91 e0 ldi r25, 0x01 ; 1 + 388: 81 e0 ldi r24, 0x01 ; 1 + 38a: 98 27 eor r25, r24 + 38c: 01 c0 rjmp .+2 ; 0x390 <_Z7inrangeiii+0x24> + 38e: 90 e0 ldi r25, 0x00 ; 0 + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + 390: 89 2f mov r24, r25 + 392: 08 95 ret + +00000394 <_Z8clrvoxeliii>: + if (inrange(x,y,z)) + fb[z][y] |= (1 << x); +} + +// Set a single voxel to OFF +void clrvoxel(int x, int y, int z) + 394: ff 92 push r15 + 396: 0f 93 push r16 + 398: 1f 93 push r17 + 39a: cf 93 push r28 + 39c: df 93 push r29 + 39e: f8 2e mov r15, r24 + 3a0: 8b 01 movw r16, r22 + 3a2: ea 01 movw r28, r20 +{ + if (inrange(x,y,z)) + 3a4: e3 df rcall .-58 ; 0x36c <_Z7inrangeiii> + 3a6: 88 23 and r24, r24 + 3a8: a9 f0 breq .+42 ; 0x3d4 <_Z8clrvoxeliii+0x40> + cube[z][y] &= ~(1 << x); + 3aa: fe 01 movw r30, r28 + 3ac: 93 e0 ldi r25, 0x03 ; 3 + 3ae: ee 0f add r30, r30 + 3b0: ff 1f adc r31, r31 + 3b2: 9a 95 dec r25 + 3b4: e1 f7 brne .-8 ; 0x3ae <_Z8clrvoxeliii+0x1a> + 3b6: e0 0f add r30, r16 + 3b8: f1 1f adc r31, r17 + 3ba: ec 59 subi r30, 0x9C ; 156 + 3bc: ff 4f sbci r31, 0xFF ; 255 + 3be: 20 81 ld r18, Z + 3c0: 81 e0 ldi r24, 0x01 ; 1 + 3c2: 90 e0 ldi r25, 0x00 ; 0 + 3c4: 02 c0 rjmp .+4 ; 0x3ca <_Z8clrvoxeliii+0x36> + 3c6: 88 0f add r24, r24 + 3c8: 99 1f adc r25, r25 + 3ca: fa 94 dec r15 + 3cc: e2 f7 brpl .-8 ; 0x3c6 <_Z8clrvoxeliii+0x32> + 3ce: 80 95 com r24 + 3d0: 82 23 and r24, r18 + 3d2: 80 83 st Z, r24 +} + 3d4: df 91 pop r29 + 3d6: cf 91 pop r28 + 3d8: 1f 91 pop r17 + 3da: 0f 91 pop r16 + 3dc: ff 90 pop r15 + 3de: 08 95 ret + +000003e0 <_Z8setvoxeliii>: +#include "draw.h" +#include "string.h" + +// Set a single voxel to ON +void setvoxel(int x, int y, int z) + 3e0: ff 92 push r15 + 3e2: 0f 93 push r16 + 3e4: 1f 93 push r17 + 3e6: cf 93 push r28 + 3e8: df 93 push r29 + 3ea: f8 2e mov r15, r24 + 3ec: 8b 01 movw r16, r22 + 3ee: ea 01 movw r28, r20 +{ + if (inrange(x,y,z)) + 3f0: bd df rcall .-134 ; 0x36c <_Z7inrangeiii> + 3f2: 88 23 and r24, r24 + 3f4: a1 f0 breq .+40 ; 0x41e <_Z8setvoxeliii+0x3e> + cube[z][y] |= (1 << x); + 3f6: fe 01 movw r30, r28 + 3f8: 33 e0 ldi r19, 0x03 ; 3 + 3fa: ee 0f add r30, r30 + 3fc: ff 1f adc r31, r31 + 3fe: 3a 95 dec r19 + 400: e1 f7 brne .-8 ; 0x3fa <_Z8setvoxeliii+0x1a> + 402: e0 0f add r30, r16 + 404: f1 1f adc r31, r17 + 406: ec 59 subi r30, 0x9C ; 156 + 408: ff 4f sbci r31, 0xFF ; 255 + 40a: 20 81 ld r18, Z + 40c: 81 e0 ldi r24, 0x01 ; 1 + 40e: 90 e0 ldi r25, 0x00 ; 0 + 410: 02 c0 rjmp .+4 ; 0x416 <_Z8setvoxeliii+0x36> + 412: 88 0f add r24, r24 + 414: 99 1f adc r25, r25 + 416: fa 94 dec r15 + 418: e2 f7 brpl .-8 ; 0x412 <_Z8setvoxeliii+0x32> + 41a: 28 2b or r18, r24 + 41c: 20 83 st Z, r18 +} + 41e: df 91 pop r29 + 420: cf 91 pop r28 + 422: 1f 91 pop r17 + 424: 0f 91 pop r16 + 426: ff 90 pop r15 + 428: 08 95 ret + +0000042a <_Z8getvoxeliii>: + return 0; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) + 42a: ff 92 push r15 + 42c: 0f 93 push r16 + 42e: 1f 93 push r17 + 430: cf 93 push r28 + 432: df 93 push r29 + 434: f8 2e mov r15, r24 + 436: 8b 01 movw r16, r22 + 438: ea 01 movw r28, r20 +{ + if (inrange(x,y,z)) + 43a: 98 df rcall .-208 ; 0x36c <_Z7inrangeiii> + 43c: 88 23 and r24, r24 + 43e: 89 f0 breq .+34 ; 0x462 <__stack+0x3> + { + if (cube[z][y] & (1 << x)) + 440: 43 e0 ldi r20, 0x03 ; 3 + 442: cc 0f add r28, r28 + 444: dd 1f adc r29, r29 + 446: 4a 95 dec r20 + 448: e1 f7 brne .-8 ; 0x442 <_Z8getvoxeliii+0x18> + 44a: c0 0f add r28, r16 + 44c: d1 1f adc r29, r17 + 44e: cc 59 subi r28, 0x9C ; 156 + 450: df 4f sbci r29, 0xFF ; 255 + 452: 88 81 ld r24, Y + 454: 90 e0 ldi r25, 0x00 ; 0 + 456: 02 c0 rjmp .+4 ; 0x45c <_Z8getvoxeliii+0x32> + 458: 95 95 asr r25 + 45a: 87 95 ror r24 + 45c: fa 94 dec r15 + 45e: e2 f7 brpl .-8 ; 0x458 <_Z8getvoxeliii+0x2e> + 460: 81 70 andi r24, 0x01 ; 1 + } + } else + { + return 0; + } +} + 462: df 91 pop r29 + 464: cf 91 pop r28 + 466: 1f 91 pop r17 + 468: 0f 91 pop r16 + 46a: ff 90 pop r15 + 46c: 08 95 ret + +0000046e <_Z10altervoxeliiii>: + +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + 46e: 21 30 cpi r18, 0x01 ; 1 + 470: 31 05 cpc r19, r1 + 472: 11 f4 brne .+4 ; 0x478 <_Z10altervoxeliiii+0xa> + { + setvoxel(x,y,z); + 474: b5 df rcall .-150 ; 0x3e0 <_Z8setvoxeliii> + 476: 08 95 ret + } else + { + clrvoxel(x,y,z); + 478: 8d df rcall .-230 ; 0x394 <_Z8clrvoxeliii> + 47a: 08 95 ret + +0000047c <_Z4fillh>: +} + +// Fill a value into all 64 byts of the cube buffer +// Mostly used for clearing. fill(0x00) +// or setting all on. fill(0xff) +void fill (unsigned char pattern) + 47c: 40 e0 ldi r20, 0x00 ; 0 + 47e: 50 e0 ldi r21, 0x00 ; 0 + 480: 10 c0 rjmp .+32 ; 0x4a2 <_Z4fillh+0x26> + int y; + for (z=0;z +// or setting all on. fill(0xff) +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z + 4a2: 20 e0 ldi r18, 0x00 ; 0 + 4a4: 30 e0 ldi r19, 0x00 ; 0 + { + for (y=0;y + 4b2: e7 cf rjmp .-50 ; 0x482 <_Z4fillh+0x6> + 4b4: 08 95 ret + +000004b6 <_Z8delay_msj>: +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) + 4b6: 0b c0 rjmp .+22 ; 0x4ce <_Z8delay_msj+0x18> +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + 4b8: 20 e0 ldi r18, 0x00 ; 0 + ... + for ( y = 0 ; y < 90 ; y++){ + 4c6: 2f 5f subi r18, 0xFF ; 255 + 4c8: 2a 35 cpi r18, 0x5A ; 90 + 4ca: b9 f7 brne .-18 ; 0x4ba <_Z8delay_msj+0x4> +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + 4cc: 01 97 sbiw r24, 0x01 ; 1 + 4ce: 00 97 sbiw r24, 0x00 ; 0 + 4d0: 99 f7 brne .-26 ; 0x4b8 <_Z8delay_msj+0x2> + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + 4d2: 08 95 ret + +000004d4 <_Z5shiftci>: + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) + 4d4: 2f 92 push r2 + 4d6: 3f 92 push r3 + 4d8: 4f 92 push r4 + 4da: 5f 92 push r5 + 4dc: 6f 92 push r6 + 4de: 7f 92 push r7 + 4e0: 9f 92 push r9 + 4e2: af 92 push r10 + 4e4: bf 92 push r11 + 4e6: cf 92 push r12 + 4e8: df 92 push r13 + 4ea: ef 92 push r14 + 4ec: ff 92 push r15 + 4ee: 0f 93 push r16 + 4f0: 1f 93 push r17 + 4f2: cf 93 push r28 + 4f4: df 93 push r29 + 4f6: 98 2e mov r9, r24 + 4f8: 5b 01 movw r10, r22 + 4fa: cc 24 eor r12, r12 + 4fc: dd 24 eor r13, r13 + int ii, iii; + int state; + + for (i = 0; i < CUBE_SIZE; i++) + { + if (direction == -1) + 4fe: 47 e0 ldi r20, 0x07 ; 7 + 500: 24 2e mov r2, r20 + 502: 31 2c mov r3, r1 + 504: 8f ef ldi r24, 0xFF ; 255 + 506: a8 16 cp r10, r24 + 508: 8f ef ldi r24, 0xFF ; 255 + 50a: b8 06 cpc r11, r24 + 50c: 11 f4 brne .+4 ; 0x512 <_Z5shiftci+0x3e> + 50e: 76 01 movw r14, r12 + 510: 03 c0 rjmp .+6 ; 0x518 <_Z5shiftci+0x44> + 512: 71 01 movw r14, r2 + 514: ec 18 sub r14, r12 + 516: fd 08 sbc r15, r13 + 518: 00 e0 ldi r16, 0x00 ; 0 + 51a: 10 e0 ldi r17, 0x00 ; 0 + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + 51c: 27 01 movw r4, r14 + 51e: 08 94 sec + 520: 41 08 sbc r4, r1 + 522: 51 08 sbc r5, r1 + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (direction == -1) + { + iii = ii+1; + 524: 37 01 movw r6, r14 + 526: 08 94 sec + 528: 61 1c adc r6, r1 + 52a: 71 1c adc r7, r1 + 52c: 36 c0 rjmp .+108 ; 0x59a <_Z5shiftci+0xc6> + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (direction == -1) + 52e: 8f ef ldi r24, 0xFF ; 255 + 530: a8 16 cp r10, r24 + 532: 8f ef ldi r24, 0xFF ; 255 + 534: b8 06 cpc r11, r24 + 536: 11 f4 brne .+4 ; 0x53c <_Z5shiftci+0x68> + { + iii = ii+1; + 538: c3 01 movw r24, r6 + 53a: 01 c0 rjmp .+2 ; 0x53e <_Z5shiftci+0x6a> + } else + { + iii = ii-1; + 53c: c2 01 movw r24, r4 + 53e: ac 01 movw r20, r24 + } + + if (axis == AXIS_Z) + 540: 8a e7 ldi r24, 0x7A ; 122 + 542: 98 16 cp r9, r24 + 544: 41 f4 brne .+16 ; 0x556 <_Z5shiftci+0x82> + { + state = getvoxel(x,y,iii); + 546: c8 01 movw r24, r16 + 548: be 01 movw r22, r28 + 54a: 6f df rcall .-290 ; 0x42a <_Z8getvoxeliii> + 54c: 28 2f mov r18, r24 + altervoxel(x,y,ii,state); + 54e: c8 01 movw r24, r16 + 550: be 01 movw r22, r28 + 552: a7 01 movw r20, r14 + 554: 17 c0 rjmp .+46 ; 0x584 <_Z5shiftci+0xb0> + } + + if (axis == AXIS_Y) + 556: 89 e7 ldi r24, 0x79 ; 121 + 558: 98 16 cp r9, r24 + 55a: 49 f4 brne .+18 ; 0x56e <_Z5shiftci+0x9a> + { + state = getvoxel(x,iii,y); + 55c: c8 01 movw r24, r16 + 55e: ba 01 movw r22, r20 + 560: ae 01 movw r20, r28 + 562: 63 df rcall .-314 ; 0x42a <_Z8getvoxeliii> + 564: 28 2f mov r18, r24 + altervoxel(x,ii,y,state); + 566: c8 01 movw r24, r16 + 568: b7 01 movw r22, r14 + 56a: ae 01 movw r20, r28 + 56c: 0b c0 rjmp .+22 ; 0x584 <_Z5shiftci+0xb0> + } + + if (axis == AXIS_X) + 56e: 88 e7 ldi r24, 0x78 ; 120 + 570: 98 16 cp r9, r24 + 572: 51 f4 brne .+20 ; 0x588 <_Z5shiftci+0xb4> + { + state = getvoxel(iii,y,x); + 574: ca 01 movw r24, r20 + 576: be 01 movw r22, r28 + 578: a8 01 movw r20, r16 + 57a: 57 df rcall .-338 ; 0x42a <_Z8getvoxeliii> + 57c: 28 2f mov r18, r24 + altervoxel(ii,y,x,state); + 57e: c7 01 movw r24, r14 + 580: be 01 movw r22, r28 + 582: a8 01 movw r20, r16 + 584: 30 e0 ldi r19, 0x00 ; 0 + 586: 73 df rcall .-282 ; 0x46e <_Z10altervoxeliiii> + } + + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + 588: 21 96 adiw r28, 0x01 ; 1 + 58a: c8 30 cpi r28, 0x08 ; 8 + 58c: d1 05 cpc r29, r1 + 58e: 79 f6 brne .-98 ; 0x52e <_Z5shiftci+0x5a> + { + ii = (7-i); + } + + + for (x = 0; x < CUBE_SIZE; x++) + 590: 0f 5f subi r16, 0xFF ; 255 + 592: 1f 4f sbci r17, 0xFF ; 255 + 594: 08 30 cpi r16, 0x08 ; 8 + 596: 11 05 cpc r17, r1 + 598: 19 f0 breq .+6 ; 0x5a0 <_Z5shiftci+0xcc> + 59a: c0 e0 ldi r28, 0x00 ; 0 + 59c: d0 e0 ldi r29, 0x00 ; 0 + 59e: c7 cf rjmp .-114 ; 0x52e <_Z5shiftci+0x5a> +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < CUBE_SIZE; i++) + 5a0: 08 94 sec + 5a2: c1 1c adc r12, r1 + 5a4: d1 1c adc r13, r1 + 5a6: 88 e0 ldi r24, 0x08 ; 8 + 5a8: c8 16 cp r12, r24 + 5aa: d1 04 cpc r13, r1 + 5ac: 09 f0 breq .+2 ; 0x5b0 <_Z5shiftci+0xdc> + 5ae: aa cf rjmp .-172 ; 0x504 <_Z5shiftci+0x30> + } + } + } + } + + if (direction == -1) + 5b0: 8f ef ldi r24, 0xFF ; 255 + 5b2: a8 16 cp r10, r24 + 5b4: 8f ef ldi r24, 0xFF ; 255 + 5b6: b8 06 cpc r11, r24 + 5b8: 19 f0 breq .+6 ; 0x5c0 <_Z5shiftci+0xec> + 5ba: ee 24 eor r14, r14 + 5bc: ff 24 eor r15, r15 + 5be: 03 c0 rjmp .+6 ; 0x5c6 <_Z5shiftci+0xf2> + 5c0: 37 e0 ldi r19, 0x07 ; 7 + 5c2: e3 2e mov r14, r19 + 5c4: f1 2c mov r15, r1 + 5c6: 00 e0 ldi r16, 0x00 ; 0 + 5c8: 10 e0 ldi r17, 0x00 ; 0 + 5ca: 1e c0 rjmp .+60 ; 0x608 <_Z5shiftci+0x134> + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (axis == AXIS_Z) + 5cc: 8a e7 ldi r24, 0x7A ; 122 + 5ce: 98 16 cp r9, r24 + 5d0: 21 f4 brne .+8 ; 0x5da <_Z5shiftci+0x106> + clrvoxel(x,y,i); + 5d2: c8 01 movw r24, r16 + 5d4: be 01 movw r22, r28 + 5d6: a7 01 movw r20, r14 + 5d8: 0d c0 rjmp .+26 ; 0x5f4 <_Z5shiftci+0x120> + + if (axis == AXIS_Y) + 5da: 89 e7 ldi r24, 0x79 ; 121 + 5dc: 98 16 cp r9, r24 + 5de: 21 f4 brne .+8 ; 0x5e8 <_Z5shiftci+0x114> + clrvoxel(x,i,y); + 5e0: c8 01 movw r24, r16 + 5e2: b7 01 movw r22, r14 + 5e4: ae 01 movw r20, r28 + 5e6: 06 c0 rjmp .+12 ; 0x5f4 <_Z5shiftci+0x120> + + if (axis == AXIS_X) + 5e8: 88 e7 ldi r24, 0x78 ; 120 + 5ea: 98 16 cp r9, r24 + 5ec: 21 f4 brne .+8 ; 0x5f6 <_Z5shiftci+0x122> + clrvoxel(i,y,x); + 5ee: c7 01 movw r24, r14 + 5f0: be 01 movw r22, r28 + 5f2: a8 01 movw r20, r16 + 5f4: cf de rcall .-610 ; 0x394 <_Z8clrvoxeliii> + i = 0; + } + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + 5f6: 21 96 adiw r28, 0x01 ; 1 + 5f8: c8 30 cpi r28, 0x08 ; 8 + 5fa: d1 05 cpc r29, r1 + 5fc: 39 f7 brne .-50 ; 0x5cc <_Z5shiftci+0xf8> + } else + { + i = 0; + } + + for (x = 0; x < CUBE_SIZE; x++) + 5fe: 0f 5f subi r16, 0xFF ; 255 + 600: 1f 4f sbci r17, 0xFF ; 255 + 602: 08 30 cpi r16, 0x08 ; 8 + 604: 11 05 cpc r17, r1 + 606: 19 f0 breq .+6 ; 0x60e <_Z5shiftci+0x13a> + 608: c0 e0 ldi r28, 0x00 ; 0 + 60a: d0 e0 ldi r29, 0x00 ; 0 + 60c: df cf rjmp .-66 ; 0x5cc <_Z5shiftci+0xf8> + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + 60e: df 91 pop r29 + 610: cf 91 pop r28 + 612: 1f 91 pop r17 + 614: 0f 91 pop r16 + 616: ff 90 pop r15 + 618: ef 90 pop r14 + 61a: df 90 pop r13 + 61c: cf 90 pop r12 + 61e: bf 90 pop r11 + 620: af 90 pop r10 + 622: 9f 90 pop r9 + 624: 7f 90 pop r7 + 626: 6f 90 pop r6 + 628: 5f 90 pop r5 + 62a: 4f 90 pop r4 + 62c: 3f 90 pop r3 + 62e: 2f 90 pop r2 + 630: 08 95 ret + +00000632 <_Z18effect_wormsqueezeiiiii>: + x = effect_telcstairs_do(x,val,delay); + } + } +} + +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) + 632: 2f 92 push r2 + 634: 3f 92 push r3 + 636: 4f 92 push r4 + 638: 5f 92 push r5 + 63a: 6f 92 push r6 + 63c: 7f 92 push r7 + 63e: 8f 92 push r8 + 640: 9f 92 push r9 + 642: af 92 push r10 + 644: bf 92 push r11 + 646: cf 92 push r12 + 648: df 92 push r13 + 64a: ef 92 push r14 + 64c: ff 92 push r15 + 64e: 0f 93 push r16 + 650: 1f 93 push r17 + 652: df 93 push r29 + 654: cf 93 push r28 + 656: cd b7 in r28, 0x3d ; 61 + 658: de b7 in r29, 0x3e ; 62 + 65a: 2e 97 sbiw r28, 0x0e ; 14 + 65c: 0f b6 in r0, 0x3f ; 63 + 65e: f8 94 cli + 660: de bf out 0x3e, r29 ; 62 + 662: 0f be out 0x3f, r0 ; 63 + 664: cd bf out 0x3d, r28 ; 61 + 666: 9a 83 std Y+2, r25 ; 0x02 + 668: 89 83 std Y+1, r24 ; 0x01 + 66a: 7c 83 std Y+4, r23 ; 0x04 + 66c: 6b 83 std Y+3, r22 ; 0x03 + 66e: 5e 83 std Y+6, r21 ; 0x06 + 670: 4d 83 std Y+5, r20 ; 0x05 + 672: 38 87 std Y+8, r19 ; 0x08 + 674: 2f 83 std Y+7, r18 ; 0x07 + 676: 1a 87 std Y+10, r17 ; 0x0a + 678: 09 87 std Y+9, r16 ; 0x09 +{ + int x, y, i,j,k, dx, dy; + int cube_size; + int origin = 0; + + if (direction == -1) + 67a: 4f 5f subi r20, 0xFF ; 255 + 67c: 5f 4f sbci r21, 0xFF ; 255 + 67e: 21 f4 brne .+8 ; 0x688 <_Z18effect_wormsqueezeiiiii+0x56> + 680: 97 e0 ldi r25, 0x07 ; 7 + 682: 29 2e mov r2, r25 + 684: 31 2c mov r3, r1 + 686: 02 c0 rjmp .+4 ; 0x68c <_Z18effect_wormsqueezeiiiii+0x5a> + 688: 22 24 eor r2, r2 + 68a: 33 24 eor r3, r3 + origin = 7; + + cube_size = 8-(size-1); + 68c: 89 e0 ldi r24, 0x09 ; 9 + 68e: 68 2e mov r6, r24 + 690: 71 2c mov r7, r1 + 692: 89 81 ldd r24, Y+1 ; 0x01 + 694: 9a 81 ldd r25, Y+2 ; 0x02 + 696: 68 1a sub r6, r24 + 698: 79 0a sbc r7, r25 + + x = myrand()%cube_size; + 69a: 66 de rcall .-820 ; 0x368 <_Z6myrandv> + 69c: b3 01 movw r22, r6 + 69e: 32 d4 rcall .+2148 ; 0xf04 <__divmodhi4> + 6a0: 6c 01 movw r12, r24 + y = myrand()%cube_size; + 6a2: 62 de rcall .-828 ; 0x368 <_Z6myrandv> + 6a4: b3 01 movw r22, r6 + 6a6: 2e d4 rcall .+2140 ; 0xf04 <__divmodhi4> + 6a8: 7c 01 movw r14, r24 + 6aa: 44 24 eor r4, r4 + 6ac: 55 24 eor r5, r5 + 6ae: 75 c0 rjmp .+234 ; 0x79a <_Z18effect_wormsqueezeiiiii+0x168> + + for (i=0; i + 6b2: 8c 01 movw r16, r24 + dy = ((myrand()%3)-1); + 6b4: 59 de rcall .-846 ; 0x368 <_Z6myrandv> + 6b6: 9c 01 movw r18, r24 + + if ((x+dx) > 0 && (x+dx) < cube_size) + 6b8: c8 01 movw r24, r16 + 6ba: 63 e0 ldi r22, 0x03 ; 3 + 6bc: 70 e0 ldi r23, 0x00 ; 0 + 6be: 22 d4 rcall .+2116 ; 0xf04 <__divmodhi4> + 6c0: 01 97 sbiw r24, 0x01 ; 1 + 6c2: 8c 0d add r24, r12 + 6c4: 9d 1d adc r25, r13 + 6c6: 9e 87 std Y+14, r25 ; 0x0e + 6c8: 8d 87 std Y+13, r24 ; 0x0d + 6ca: 18 16 cp r1, r24 + 6cc: 19 06 cpc r1, r25 + 6ce: 1c f4 brge .+6 ; 0x6d6 <_Z18effect_wormsqueezeiiiii+0xa4> + 6d0: 86 15 cp r24, r6 + 6d2: 97 05 cpc r25, r7 + 6d4: 14 f0 brlt .+4 ; 0x6da <_Z18effect_wormsqueezeiiiii+0xa8> + 6d6: de 86 std Y+14, r13 ; 0x0e + 6d8: cd 86 std Y+13, r12 ; 0x0d + x += dx; + + if ((y+dy) > 0 && (y+dy) < cube_size) + 6da: c9 01 movw r24, r18 + 6dc: 63 e0 ldi r22, 0x03 ; 3 + 6de: 70 e0 ldi r23, 0x00 ; 0 + 6e0: 11 d4 rcall .+2082 ; 0xf04 <__divmodhi4> + 6e2: 8c 01 movw r16, r24 + 6e4: 01 50 subi r16, 0x01 ; 1 + 6e6: 10 40 sbci r17, 0x00 ; 0 + 6e8: 0e 0d add r16, r14 + 6ea: 1f 1d adc r17, r15 + 6ec: 10 16 cp r1, r16 + 6ee: 11 06 cpc r1, r17 + 6f0: 1c f4 brge .+6 ; 0x6f8 <_Z18effect_wormsqueezeiiiii+0xc6> + 6f2: 06 15 cp r16, r6 + 6f4: 17 05 cpc r17, r7 + 6f6: 0c f0 brlt .+2 ; 0x6fa <_Z18effect_wormsqueezeiiiii+0xc8> + 6f8: 87 01 movw r16, r14 + y += dy; + + shift(axis, direction); + 6fa: 8b 81 ldd r24, Y+3 ; 0x03 + 6fc: 6d 81 ldd r22, Y+5 ; 0x05 + 6fe: 7e 81 ldd r23, Y+6 ; 0x06 + 700: e9 de rcall .-558 ; 0x4d4 <_Z5shiftci> + 702: 8d 84 ldd r8, Y+13 ; 0x0d + 704: 9e 84 ldd r9, Y+14 ; 0x0e + 706: aa 24 eor r10, r10 + 708: bb 24 eor r11, r11 + 70a: 30 c0 rjmp .+96 ; 0x76c <_Z18effect_wormsqueezeiiiii+0x13a> + + for (j=0; j + setvoxel(x+j,y+k,origin); + 716: c4 01 movw r24, r8 + 718: b6 01 movw r22, r12 + 71a: a1 01 movw r20, r2 + 71c: 15 c0 rjmp .+42 ; 0x748 <_Z18effect_wormsqueezeiiiii+0x116> + + if (axis == AXIS_Y) + 71e: 8b 81 ldd r24, Y+3 ; 0x03 + 720: 9c 81 ldd r25, Y+4 ; 0x04 + 722: 89 37 cpi r24, 0x79 ; 121 + 724: 91 05 cpc r25, r1 + 726: 21 f4 brne .+8 ; 0x730 <_Z18effect_wormsqueezeiiiii+0xfe> + setvoxel(x+j,origin,y+k); + 728: c4 01 movw r24, r8 + 72a: b1 01 movw r22, r2 + 72c: a6 01 movw r20, r12 + 72e: 0c c0 rjmp .+24 ; 0x748 <_Z18effect_wormsqueezeiiiii+0x116> + + if (axis == AXIS_X) + 730: eb 81 ldd r30, Y+3 ; 0x03 + 732: fc 81 ldd r31, Y+4 ; 0x04 + 734: e8 37 cpi r30, 0x78 ; 120 + 736: f1 05 cpc r31, r1 + 738: 41 f4 brne .+16 ; 0x74a <_Z18effect_wormsqueezeiiiii+0x118> + setvoxel(origin,y+j,x+k); + 73a: 4d 85 ldd r20, Y+13 ; 0x0d + 73c: 5e 85 ldd r21, Y+14 ; 0x0e + 73e: 4e 0d add r20, r14 + 740: 5f 1d adc r21, r15 + 742: c1 01 movw r24, r2 + 744: 6b 85 ldd r22, Y+11 ; 0x0b + 746: 7c 85 ldd r23, Y+12 ; 0x0c + 748: 4b de rcall .-874 ; 0x3e0 <_Z8setvoxeliii> + shift(axis, direction); + + + for (j=0; j + y += dy; + + shift(axis, direction); + + + for (j=0; j + 776: 68 01 movw r12, r16 + 778: ee 24 eor r14, r14 + 77a: ff 24 eor r15, r15 + + if (axis == AXIS_Y) + setvoxel(x+j,origin,y+k); + + if (axis == AXIS_X) + setvoxel(origin,y+j,x+k); + 77c: c5 01 movw r24, r10 + 77e: 80 0f add r24, r16 + 780: 91 1f adc r25, r17 + 782: 9c 87 std Y+12, r25 ; 0x0c + 784: 8b 87 std Y+11, r24 ; 0x0b + 786: e7 cf rjmp .-50 ; 0x756 <_Z18effect_wormsqueezeiiiii+0x124> + } + } + + delay_ms(delay); + 788: 89 85 ldd r24, Y+9 ; 0x09 + 78a: 9a 85 ldd r25, Y+10 ; 0x0a + 78c: 94 de rcall .-728 ; 0x4b6 <_Z8delay_msj> + cube_size = 8-(size-1); + + x = myrand()%cube_size; + y = myrand()%cube_size; + + for (i=0; i + 7a4: 85 cf rjmp .-246 ; 0x6b0 <_Z18effect_wormsqueezeiiiii+0x7e> + } + } + + delay_ms(delay); + } +} + 7a6: 2e 96 adiw r28, 0x0e ; 14 + 7a8: 0f b6 in r0, 0x3f ; 63 + 7aa: f8 94 cli + 7ac: de bf out 0x3e, r29 ; 62 + 7ae: 0f be out 0x3f, r0 ; 63 + 7b0: cd bf out 0x3d, r28 ; 61 + 7b2: cf 91 pop r28 + 7b4: df 91 pop r29 + 7b6: 1f 91 pop r17 + 7b8: 0f 91 pop r16 + 7ba: ff 90 pop r15 + 7bc: ef 90 pop r14 + 7be: df 90 pop r13 + 7c0: cf 90 pop r12 + 7c2: bf 90 pop r11 + 7c4: af 90 pop r10 + 7c6: 9f 90 pop r9 + 7c8: 8f 90 pop r8 + 7ca: 7f 90 pop r7 + 7cc: 6f 90 pop r6 + 7ce: 5f 90 pop r5 + 7d0: 4f 90 pop r4 + 7d2: 3f 90 pop r3 + 7d4: 2f 90 pop r2 + 7d6: 08 95 ret + +000007d8 <_Z11effect_raini>: + } + } +} + + +void effect_rain (int iterations) + 7d8: af 92 push r10 + 7da: bf 92 push r11 + 7dc: cf 92 push r12 + 7de: df 92 push r13 + 7e0: ef 92 push r14 + 7e2: ff 92 push r15 + 7e4: 0f 93 push r16 + 7e6: 1f 93 push r17 + 7e8: cf 93 push r28 + 7ea: df 93 push r29 + 7ec: 5c 01 movw r10, r24 + 7ee: cc 24 eor r12, r12 + 7f0: dd 24 eor r13, r13 + 7f2: 2a c0 rjmp .+84 ; 0x848 <_Z11effect_raini+0x70> + int rnd_y; + int rnd_num; + + for (ii=0;ii + 7f6: 64 e0 ldi r22, 0x04 ; 4 + 7f8: 70 e0 ldi r23, 0x00 ; 0 + 7fa: 84 d3 rcall .+1800 ; 0xf04 <__divmodhi4> + 7fc: ec 01 movw r28, r24 + 7fe: ee 24 eor r14, r14 + 800: ff 24 eor r15, r15 + 802: 15 c0 rjmp .+42 ; 0x82e <_Z11effect_raini+0x56> + + for (i=0; i < rnd_num;i++) + { + rnd_x = myrand()%8; + 804: b1 dd rcall .-1182 ; 0x368 <_Z6myrandv> + 806: 8c 01 movw r16, r24 + rnd_y = myrand()%8; + 808: af dd rcall .-1186 ; 0x368 <_Z6myrandv> + 80a: 9c 01 movw r18, r24 + setvoxel(rnd_x,rnd_y,7); + 80c: c8 01 movw r24, r16 + 80e: 68 e0 ldi r22, 0x08 ; 8 + 810: 70 e0 ldi r23, 0x00 ; 0 + 812: 78 d3 rcall .+1776 ; 0xf04 <__divmodhi4> + 814: fc 01 movw r30, r24 + 816: c9 01 movw r24, r18 + 818: 68 e0 ldi r22, 0x08 ; 8 + 81a: 70 e0 ldi r23, 0x00 ; 0 + 81c: 73 d3 rcall .+1766 ; 0xf04 <__divmodhi4> + 81e: bc 01 movw r22, r24 + 820: cf 01 movw r24, r30 + 822: 47 e0 ldi r20, 0x07 ; 7 + 824: 50 e0 ldi r21, 0x00 ; 0 + 826: dc dd rcall .-1096 ; 0x3e0 <_Z8setvoxeliii> + + for (ii=0;ii + rnd_x = myrand()%8; + rnd_y = myrand()%8; + setvoxel(rnd_x,rnd_y,7); + } + + delay_ms(1000); + 834: 88 ee ldi r24, 0xE8 ; 232 + 836: 93 e0 ldi r25, 0x03 ; 3 + 838: 3e de rcall .-900 ; 0x4b6 <_Z8delay_msj> + shift(AXIS_Z,-1); + 83a: 8a e7 ldi r24, 0x7A ; 122 + 83c: 6f ef ldi r22, 0xFF ; 255 + 83e: 7f ef ldi r23, 0xFF ; 255 + 840: 49 de rcall .-878 ; 0x4d4 <_Z5shiftci> + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;ii + } + + delay_ms(1000); + shift(AXIS_Z,-1); + } +} + 84e: df 91 pop r29 + 850: cf 91 pop r28 + 852: 1f 91 pop r17 + 854: 0f 91 pop r16 + 856: ff 90 pop r15 + 858: ef 90 pop r14 + 85a: df 90 pop r13 + 85c: cf 90 pop r12 + 85e: bf 90 pop r11 + 860: af 90 pop r10 + 862: 08 95 ret + +00000864 <_Z11sendvoxel_zhhhi>: +} + + +// Send a voxel flying from one side of the cube to the other +// If its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) + 864: 7f 92 push r7 + 866: 8f 92 push r8 + 868: 9f 92 push r9 + 86a: af 92 push r10 + 86c: bf 92 push r11 + 86e: cf 92 push r12 + 870: df 92 push r13 + 872: ef 92 push r14 + 874: ff 92 push r15 + 876: 0f 93 push r16 + 878: 1f 93 push r17 + 87a: cf 93 push r28 + 87c: df 93 push r29 + 87e: e8 2e mov r14, r24 + 880: f6 2e mov r15, r22 + 882: 74 2e mov r7, r20 + 884: 69 01 movw r12, r18 + 886: c0 e0 ldi r28, 0x00 ; 0 + 888: d0 e0 ldi r29, 0x00 ; 0 + 88a: f7 e0 ldi r31, 0x07 ; 7 + 88c: 8f 2e mov r8, r31 + 88e: 91 2c mov r9, r1 + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + 890: e8 e0 ldi r30, 0x08 ; 8 + 892: ae 2e mov r10, r30 + 894: b1 2c mov r11, r1 +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + { + if (z == 7) + 896: 87 e0 ldi r24, 0x07 ; 7 + 898: 78 16 cp r7, r24 + 89a: 61 f4 brne .+24 ; 0x8b4 <_Z11sendvoxel_zhhhi+0x50> +} + + +// Send a voxel flying from one side of the cube to the other +// If its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) + 89c: 84 01 movw r16, r8 + 89e: 0c 1b sub r16, r28 + 8a0: 1d 0b sbc r17, r29 + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + 8a2: a5 01 movw r20, r10 + 8a4: 4c 1b sub r20, r28 + 8a6: 5d 0b sbc r21, r29 + 8a8: 8e 2d mov r24, r14 + 8aa: 90 e0 ldi r25, 0x00 ; 0 + 8ac: 6f 2d mov r22, r15 + 8ae: 70 e0 ldi r23, 0x00 ; 0 + 8b0: 71 dd rcall .-1310 ; 0x394 <_Z8clrvoxeliii> + 8b2: 09 c0 rjmp .+18 ; 0x8c6 <_Z11sendvoxel_zhhhi+0x62> + } else + { + ii = i; + clrvoxel(x,y,ii-1); + 8b4: ae 01 movw r20, r28 + 8b6: 41 50 subi r20, 0x01 ; 1 + 8b8: 50 40 sbci r21, 0x00 ; 0 + 8ba: 8e 2d mov r24, r14 + 8bc: 90 e0 ldi r25, 0x00 ; 0 + 8be: 6f 2d mov r22, r15 + 8c0: 70 e0 ldi r23, 0x00 ; 0 + 8c2: 68 dd rcall .-1328 ; 0x394 <_Z8clrvoxeliii> + 8c4: 8e 01 movw r16, r28 + } + setvoxel(x,y,ii); + 8c6: 8e 2d mov r24, r14 + 8c8: 90 e0 ldi r25, 0x00 ; 0 + 8ca: 6f 2d mov r22, r15 + 8cc: 70 e0 ldi r23, 0x00 ; 0 + 8ce: a8 01 movw r20, r16 + 8d0: 87 dd rcall .-1266 ; 0x3e0 <_Z8setvoxeliii> + delay_ms(delay); + 8d2: c6 01 movw r24, r12 + 8d4: f0 dd rcall .-1056 ; 0x4b6 <_Z8delay_msj> +// Send a voxel flying from one side of the cube to the other +// If its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + 8d6: 21 96 adiw r28, 0x01 ; 1 + 8d8: c8 30 cpi r28, 0x08 ; 8 + 8da: d1 05 cpc r29, r1 + 8dc: e1 f6 brne .-72 ; 0x896 <_Z11sendvoxel_zhhhi+0x32> + clrvoxel(x,y,ii-1); + } + setvoxel(x,y,ii); + delay_ms(delay); + } +} + 8de: df 91 pop r29 + 8e0: cf 91 pop r28 + 8e2: 1f 91 pop r17 + 8e4: 0f 91 pop r16 + 8e6: ff 90 pop r15 + 8e8: ef 90 pop r14 + 8ea: df 90 pop r13 + 8ec: cf 90 pop r12 + 8ee: bf 90 pop r11 + 8f0: af 90 pop r10 + 8f2: 9f 90 pop r9 + 8f4: 8f 90 pop r8 + 8f6: 7f 90 pop r7 + 8f8: 08 95 ret + +000008fa <_Z19draw_positions_axiscPhi>: + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) + 8fa: 4f 92 push r4 + 8fc: 5f 92 push r5 + 8fe: 6f 92 push r6 + 900: 7f 92 push r7 + 902: 9f 92 push r9 + 904: af 92 push r10 + 906: bf 92 push r11 + 908: cf 92 push r12 + 90a: df 92 push r13 + 90c: ef 92 push r14 + 90e: ff 92 push r15 + 910: 0f 93 push r16 + 912: 1f 93 push r17 + 914: cf 93 push r28 + 916: df 93 push r29 + 918: 98 2e mov r9, r24 + 91a: 16 2f mov r17, r22 + 91c: 07 2f mov r16, r23 + 91e: 3a 01 movw r6, r20 +{ + int x, y, p; + + fill(0x00); + 920: 80 e0 ldi r24, 0x00 ; 0 + 922: ac dd rcall .-1192 ; 0x47c <_Z4fillh> + 924: 21 2f mov r18, r17 + 926: 30 2f mov r19, r16 + 928: c9 01 movw r24, r18 + 92a: 6c 01 movw r12, r24 + 92c: c0 e0 ldi r28, 0x00 ; 0 + 92e: d0 e0 ldi r29, 0x00 ; 0 + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + 930: 57 e0 ldi r21, 0x07 ; 7 + 932: 45 2e mov r4, r21 + 934: 51 2c mov r5, r1 + 936: 34 c0 rjmp .+104 ; 0x9a0 <_Z19draw_positions_axiscPhi+0xa6> + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + 938: 61 14 cp r6, r1 + 93a: 71 04 cpc r7, r1 + 93c: 31 f0 breq .+12 ; 0x94a <_Z19draw_positions_axiscPhi+0x50> + { + p = (7-positions[(x*8)+y]); + 93e: f5 01 movw r30, r10 + 940: 80 81 ld r24, Z + 942: a2 01 movw r20, r4 + 944: 48 1b sub r20, r24 + 946: 51 09 sbc r21, r1 + 948: 04 c0 rjmp .+8 ; 0x952 <_Z19draw_positions_axiscPhi+0x58> + } else + { + p = positions[(x*8)+y]; + 94a: f7 01 movw r30, r14 + 94c: 80 81 ld r24, Z + 94e: 48 2f mov r20, r24 + 950: 50 e0 ldi r21, 0x00 ; 0 + } + + if (axis == AXIS_Z) + 952: fa e7 ldi r31, 0x7A ; 122 + 954: 9f 16 cp r9, r31 + 956: 19 f4 brne .+6 ; 0x95e <_Z19draw_positions_axiscPhi+0x64> + setvoxel(x,y,p); + 958: ce 01 movw r24, r28 + 95a: b8 01 movw r22, r16 + 95c: 0d c0 rjmp .+26 ; 0x978 <_Z19draw_positions_axiscPhi+0x7e> + + if (axis == AXIS_Y) + 95e: 89 e7 ldi r24, 0x79 ; 121 + 960: 98 16 cp r9, r24 + 962: 21 f4 brne .+8 ; 0x96c <_Z19draw_positions_axiscPhi+0x72> + setvoxel(x,p,y); + 964: ce 01 movw r24, r28 + 966: ba 01 movw r22, r20 + 968: a8 01 movw r20, r16 + 96a: 06 c0 rjmp .+12 ; 0x978 <_Z19draw_positions_axiscPhi+0x7e> + + if (axis == AXIS_X) + 96c: 98 e7 ldi r25, 0x78 ; 120 + 96e: 99 16 cp r9, r25 + 970: 21 f4 brne .+8 ; 0x97a <_Z19draw_positions_axiscPhi+0x80> + setvoxel(p,y,x); + 972: ca 01 movw r24, r20 + 974: b8 01 movw r22, r16 + 976: ae 01 movw r20, r28 + 978: 33 dd rcall .-1434 ; 0x3e0 <_Z8setvoxeliii> + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + 97a: 0f 5f subi r16, 0xFF ; 255 + 97c: 1f 4f sbci r17, 0xFF ; 255 + 97e: 08 94 sec + 980: a1 1c adc r10, r1 + 982: b1 1c adc r11, r1 + 984: 08 94 sec + 986: e1 1c adc r14, r1 + 988: f1 1c adc r15, r1 + 98a: 08 30 cpi r16, 0x08 ; 8 + 98c: 11 05 cpc r17, r1 + 98e: a1 f6 brne .-88 ; 0x938 <_Z19draw_positions_axiscPhi+0x3e> +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + 990: 21 96 adiw r28, 0x01 ; 1 + 992: e8 e0 ldi r30, 0x08 ; 8 + 994: f0 e0 ldi r31, 0x00 ; 0 + 996: ce 0e add r12, r30 + 998: df 1e adc r13, r31 + 99a: c8 30 cpi r28, 0x08 ; 8 + 99c: d1 05 cpc r29, r1 + 99e: 29 f0 breq .+10 ; 0x9aa <_Z19draw_positions_axiscPhi+0xb0> + 9a0: 56 01 movw r10, r12 + 9a2: 76 01 movw r14, r12 + 9a4: 00 e0 ldi r16, 0x00 ; 0 + 9a6: 10 e0 ldi r17, 0x00 ; 0 + 9a8: c7 cf rjmp .-114 ; 0x938 <_Z19draw_positions_axiscPhi+0x3e> + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + 9aa: df 91 pop r29 + 9ac: cf 91 pop r28 + 9ae: 1f 91 pop r17 + 9b0: 0f 91 pop r16 + 9b2: ff 90 pop r15 + 9b4: ef 90 pop r14 + 9b6: df 90 pop r13 + 9b8: cf 90 pop r12 + 9ba: bf 90 pop r11 + 9bc: af 90 pop r10 + 9be: 9f 90 pop r9 + 9c0: 7f 90 pop r7 + 9c2: 6f 90 pop r6 + 9c4: 5f 90 pop r5 + 9c6: 4f 90 pop r4 + 9c8: 08 95 ret + +000009ca <_Z32effect_boxside_randsend_parallelciii>: + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) + 9ca: 2f 92 push r2 + 9cc: 3f 92 push r3 + 9ce: 4f 92 push r4 + 9d0: 5f 92 push r5 + 9d2: 6f 92 push r6 + 9d4: 7f 92 push r7 + 9d6: 8f 92 push r8 + 9d8: 9f 92 push r9 + 9da: af 92 push r10 + 9dc: bf 92 push r11 + 9de: cf 92 push r12 + 9e0: df 92 push r13 + 9e2: ef 92 push r14 + 9e4: ff 92 push r15 + 9e6: 0f 93 push r16 + 9e8: 1f 93 push r17 + 9ea: df 93 push r29 + 9ec: cf 93 push r28 + 9ee: cd b7 in r28, 0x3d ; 61 + 9f0: de b7 in r29, 0x3e ; 62 + 9f2: c1 58 subi r28, 0x81 ; 129 + 9f4: d0 40 sbci r29, 0x00 ; 0 + 9f6: 0f b6 in r0, 0x3f ; 63 + 9f8: f8 94 cli + 9fa: de bf out 0x3e, r29 ; 62 + 9fc: 0f be out 0x3f, r0 ; 63 + 9fe: cd bf out 0x3d, r28 ; 61 + a00: cf 57 subi r28, 0x7F ; 127 + a02: df 4f sbci r29, 0xFF ; 255 + a04: 88 83 st Y, r24 + a06: c1 58 subi r28, 0x81 ; 129 + a08: d0 40 sbci r29, 0x00 ; 0 + a0a: 2b 01 movw r4, r22 + a0c: 3a 01 movw r6, r20 + a0e: 49 01 movw r8, r18 + a10: 71 e4 ldi r23, 0x41 ; 65 + a12: a7 2e mov r10, r23 + a14: b1 2c mov r11, r1 + a16: ac 0e add r10, r28 + a18: bd 1e adc r11, r29 + a1a: f5 01 movw r30, r10 + a1c: 61 e8 ldi r22, 0x81 ; 129 + a1e: c6 2e mov r12, r22 + a20: d1 2c mov r13, r1 + a22: cc 0e add r12, r28 + a24: dd 1e adc r13, r29 + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + a26: 11 92 st Z+, r1 + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + a28: ec 15 cp r30, r12 + a2a: fd 05 cpc r31, r13 + a2c: e1 f7 brne .-8 ; 0xa26 <_Z32effect_boxside_randsend_parallelciii+0x5c> + a2e: 00 e0 ldi r16, 0x00 ; 0 + a30: 10 e0 ldi r17, 0x00 ; 0 + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + a32: 1e 01 movw r2, r28 + a34: 08 94 sec + a36: 21 1c adc r2, r1 + a38: 31 1c adc r3, r1 + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + a3a: 81 e0 ldi r24, 0x01 ; 1 + a3c: 88 16 cp r8, r24 + a3e: 91 04 cpc r9, r1 + a40: b9 f4 brne .+46 ; 0xa70 <_Z32effect_boxside_randsend_parallelciii+0xa6> + a42: 12 c0 rjmp .+36 ; 0xa68 <_Z32effect_boxside_randsend_parallelciii+0x9e> + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = myrand()%64; + a44: 91 dc rcall .-1758 ; 0x368 <_Z6myrandv> + a46: 60 e4 ldi r22, 0x40 ; 64 + a48: 70 e0 ldi r23, 0x00 ; 0 + a4a: 5c d2 rcall .+1208 ; 0xf04 <__divmodhi4> + if (pos[i] == 0) + a4c: e1 e4 ldi r30, 0x41 ; 65 + a4e: f0 e0 ldi r31, 0x00 ; 0 + a50: ec 0f add r30, r28 + a52: fd 1f adc r31, r29 + a54: e8 0f add r30, r24 + a56: f9 1f adc r31, r25 + a58: 80 81 ld r24, Z + a5a: 88 23 and r24, r24 + a5c: 99 f7 brne .-26 ; 0xa44 <_Z32effect_boxside_randsend_parallelciii+0x7a> + { + sent++; + a5e: 0f 5f subi r16, 0xFF ; 255 + a60: 1f 4f sbci r17, 0xFF ; 255 + pos[i] += 1; + a62: 91 e0 ldi r25, 0x01 ; 1 + a64: 90 83 st Z, r25 + a66: 16 c0 rjmp .+44 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + a68: 00 34 cpi r16, 0x40 ; 64 + a6a: 11 05 cpc r17, r1 + a6c: 5c f3 brlt .-42 ; 0xa44 <_Z32effect_boxside_randsend_parallelciii+0x7a> + a6e: 12 c0 rjmp .+36 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + a70: 82 e0 ldi r24, 0x02 ; 2 + a72: 88 16 cp r8, r24 + a74: 91 04 cpc r9, r1 + a76: 71 f4 brne .+28 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> + { + if (sent<64) + a78: 00 34 cpi r16, 0x40 ; 64 + a7a: 11 05 cpc r17, r1 + a7c: 5c f4 brge .+22 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> + { + pos[sent] += 1; + a7e: e1 e4 ldi r30, 0x41 ; 65 + a80: f0 e0 ldi r31, 0x00 ; 0 + a82: ec 0f add r30, r28 + a84: fd 1f adc r31, r29 + a86: e0 0f add r30, r16 + a88: f1 1f adc r31, r17 + a8a: 80 81 ld r24, Z + a8c: 8f 5f subi r24, 0xFF ; 255 + a8e: 80 83 st Z, r24 + sent++; + a90: 0f 5f subi r16, 0xFF ; 255 + a92: 1f 4f sbci r17, 0xFF ; 255 + a94: f5 01 movw r30, r10 + a96: ee 24 eor r14, r14 + a98: ff 24 eor r15, r15 + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + a9a: 90 81 ld r25, Z + a9c: 89 2f mov r24, r25 + a9e: 81 50 subi r24, 0x01 ; 1 + aa0: 86 30 cpi r24, 0x06 ; 6 + aa2: 10 f4 brcc .+4 ; 0xaa8 <_Z32effect_boxside_randsend_parallelciii+0xde> + { + pos[i] += 1; + aa4: 9f 5f subi r25, 0xFF ; 255 + aa6: 90 83 st Z, r25 + } + + if (pos[i] == 7) + aa8: 80 81 ld r24, Z + aaa: 87 30 cpi r24, 0x07 ; 7 + aac: 19 f4 brne .+6 ; 0xab4 <_Z32effect_boxside_randsend_parallelciii+0xea> + done++; + aae: 08 94 sec + ab0: e1 1c adc r14, r1 + ab2: f1 1c adc r15, r1 + ab4: 31 96 adiw r30, 0x01 ; 1 + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + ab6: ec 15 cp r30, r12 + ab8: fd 05 cpc r31, r13 + aba: 79 f7 brne .-34 ; 0xa9a <_Z32effect_boxside_randsend_parallelciii+0xd0> + abc: d1 01 movw r26, r2 + abe: f5 01 movw r30, r10 + ac0: 80 81 ld r24, Z + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + ac2: 41 14 cp r4, r1 + ac4: 51 04 cpc r5, r1 + ac6: 19 f0 breq .+6 ; 0xace <_Z32effect_boxside_randsend_parallelciii+0x104> + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + ac8: 97 e0 ldi r25, 0x07 ; 7 + aca: 98 1b sub r25, r24 + acc: 89 2f mov r24, r25 + ace: 8c 93 st X, r24 + ad0: 31 96 adiw r30, 0x01 ; 1 + ad2: 11 96 adiw r26, 0x01 ; 1 + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + ad4: ec 15 cp r30, r12 + ad6: fd 05 cpc r31, r13 + ad8: 99 f7 brne .-26 ; 0xac0 <_Z32effect_boxside_randsend_parallelciii+0xf6> + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + ada: c3 01 movw r24, r6 + adc: ec dc rcall .-1576 ; 0x4b6 <_Z8delay_msj> + draw_positions_axis(axis,cubepos,0); + ade: cf 57 subi r28, 0x7F ; 127 + ae0: df 4f sbci r29, 0xFF ; 255 + ae2: 88 81 ld r24, Y + ae4: c1 58 subi r28, 0x81 ; 129 + ae6: d0 40 sbci r29, 0x00 ; 0 + ae8: b1 01 movw r22, r2 + aea: 40 e0 ldi r20, 0x00 ; 0 + aec: 50 e0 ldi r21, 0x00 ; 0 + aee: 05 df rcall .-502 ; 0x8fa <_Z19draw_positions_axiscPhi> + LED_PORT ^= LED_RED; + af0: 82 b3 in r24, 0x12 ; 18 + af2: 94 e0 ldi r25, 0x04 ; 4 + af4: 89 27 eor r24, r25 + af6: 82 bb out 0x12, r24 ; 18 + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + af8: 80 e4 ldi r24, 0x40 ; 64 + afa: e8 16 cp r14, r24 + afc: f1 04 cpc r15, r1 + afe: 09 f0 breq .+2 ; 0xb02 <_Z32effect_boxside_randsend_parallelciii+0x138> + b00: 9c cf rjmp .-200 ; 0xa3a <_Z32effect_boxside_randsend_parallelciii+0x70> + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + LED_PORT ^= LED_RED; + } + +} + b02: cf 57 subi r28, 0x7F ; 127 + b04: df 4f sbci r29, 0xFF ; 255 + b06: 0f b6 in r0, 0x3f ; 63 + b08: f8 94 cli + b0a: de bf out 0x3e, r29 ; 62 + b0c: 0f be out 0x3f, r0 ; 63 + b0e: cd bf out 0x3d, r28 ; 61 + b10: cf 91 pop r28 + b12: df 91 pop r29 + b14: 1f 91 pop r17 + b16: 0f 91 pop r16 + b18: ff 90 pop r15 + b1a: ef 90 pop r14 + b1c: df 90 pop r13 + b1e: cf 90 pop r12 + b20: bf 90 pop r11 + b22: af 90 pop r10 + b24: 9f 90 pop r9 + b26: 8f 90 pop r8 + b28: 7f 90 pop r7 + b2a: 6f 90 pop r6 + b2c: 5f 90 pop r5 + b2e: 4f 90 pop r4 + b30: 3f 90 pop r3 + b32: 2f 90 pop r2 + b34: 08 95 ret + +00000b36 <_Z20effect_z_updown_movePhS_c>: + + } + +} + +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis) + b36: ac 01 movw r20, r24 + b38: dc 01 movw r26, r24 + b3a: fb 01 movw r30, r22 + b3c: 20 e0 ldi r18, 0x00 ; 0 + b3e: 30 e0 ldi r19, 0x00 ; 0 +{ + int px; + for (px=0; px<64; px++) + { + if (positions[px] + { + positions[px]++; + b48: 9f 5f subi r25, 0xFF ; 255 + b4a: 9c 93 st X, r25 + } + if (positions[px]>destinations[px]) + b4c: 9c 91 ld r25, X + b4e: 80 81 ld r24, Z + b50: 89 17 cp r24, r25 + b52: 10 f4 brcc .+4 ; 0xb58 <_Z20effect_z_updown_movePhS_c+0x22> + { + positions[px]--; + b54: 91 50 subi r25, 0x01 ; 1 + b56: 9c 93 st X, r25 +} + +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis) +{ + int px; + for (px=0; px<64; px++) + b58: 2f 5f subi r18, 0xFF ; 255 + b5a: 3f 4f sbci r19, 0xFF ; 255 + b5c: 11 96 adiw r26, 0x01 ; 1 + b5e: 31 96 adiw r30, 0x01 ; 1 + b60: 20 34 cpi r18, 0x40 ; 64 + b62: 31 05 cpc r19, r1 + b64: 69 f7 brne .-38 ; 0xb40 <_Z20effect_z_updown_movePhS_c+0xa> + { + positions[px]--; + } + } + + draw_positions_axis (AXIS_Z, positions,0); + b66: 8a e7 ldi r24, 0x7A ; 122 + b68: ba 01 movw r22, r20 + b6a: 40 e0 ldi r20, 0x00 ; 0 + b6c: 50 e0 ldi r21, 0x00 ; 0 + b6e: c5 de rcall .-630 ; 0x8fa <_Z19draw_positions_axiscPhi> +} + b70: 08 95 ret + +00000b72 <_Z15effect_z_updownii>: + delay_ms(1000); + shift(AXIS_Z,-1); + } +} + +void effect_z_updown (int iterations, int delay) + b72: 2f 92 push r2 + b74: 3f 92 push r3 + b76: 4f 92 push r4 + b78: 5f 92 push r5 + b7a: 6f 92 push r6 + b7c: 7f 92 push r7 + b7e: 8f 92 push r8 + b80: 9f 92 push r9 + b82: af 92 push r10 + b84: bf 92 push r11 + b86: cf 92 push r12 + b88: df 92 push r13 + b8a: ef 92 push r14 + b8c: ff 92 push r15 + b8e: 0f 93 push r16 + b90: 1f 93 push r17 + b92: df 93 push r29 + b94: cf 93 push r28 + b96: cd b7 in r28, 0x3d ; 61 + b98: de b7 in r29, 0x3e ; 62 + b9a: c0 58 subi r28, 0x80 ; 128 + b9c: d0 40 sbci r29, 0x00 ; 0 + b9e: 0f b6 in r0, 0x3f ; 63 + ba0: f8 94 cli + ba2: de bf out 0x3e, r29 ; 62 + ba4: 0f be out 0x3f, r0 ; 63 + ba6: cd bf out 0x3d, r28 ; 61 + ba8: 2c 01 movw r4, r24 + baa: 7b 01 movw r14, r22 + bac: 00 e0 ldi r16, 0x00 ; 0 + bae: 10 e0 ldi r17, 0x00 ; 0 + + int i,y,move; + + for (i=0; i<64; i++) + { + positions[i] = 4; + bb0: 5e 01 movw r10, r28 + bb2: 08 94 sec + bb4: a1 1c adc r10, r1 + bb6: b1 1c adc r11, r1 + bb8: 24 e0 ldi r18, 0x04 ; 4 + bba: 92 2e mov r9, r18 + destinations[i] = myrand()%8; + bbc: 91 e4 ldi r25, 0x41 ; 65 + bbe: c9 2e mov r12, r25 + bc0: d1 2c mov r13, r1 + bc2: cc 0e add r12, r28 + bc4: dd 1e adc r13, r29 + + int i,y,move; + + for (i=0; i<64; i++) + { + positions[i] = 4; + bc6: f5 01 movw r30, r10 + bc8: e0 0f add r30, r16 + bca: f1 1f adc r31, r17 + bcc: 90 82 st Z, r9 + destinations[i] = myrand()%8; + bce: cc db rcall .-2152 ; 0x368 <_Z6myrandv> + bd0: f6 01 movw r30, r12 + bd2: e0 0f add r30, r16 + bd4: f1 1f adc r31, r17 + bd6: 68 e0 ldi r22, 0x08 ; 8 + bd8: 70 e0 ldi r23, 0x00 ; 0 + bda: 94 d1 rcall .+808 ; 0xf04 <__divmodhi4> + bdc: 80 83 st Z, r24 + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,y,move; + + for (i=0; i<64; i++) + bde: 0f 5f subi r16, 0xFF ; 255 + be0: 1f 4f sbci r17, 0xFF ; 255 + be2: 00 34 cpi r16, 0x40 ; 64 + be4: 11 05 cpc r17, r1 + be6: 79 f7 brne .-34 ; 0xbc6 <_Z15effect_z_updownii+0x54> + be8: 00 e0 ldi r16, 0x00 ; 0 + bea: 10 e0 ldi r17, 0x00 ; 0 + destinations[i] = myrand()%8; + } + + for (i=0; i<8; i++) + { + effect_z_updown_move(positions, destinations, AXIS_Z); + bec: 81 e4 ldi r24, 0x41 ; 65 + bee: a8 2e mov r10, r24 + bf0: b1 2c mov r11, r1 + bf2: ac 0e add r10, r28 + bf4: bd 1e adc r11, r29 + bf6: 6e 01 movw r12, r28 + bf8: 08 94 sec + bfa: c1 1c adc r12, r1 + bfc: d1 1c adc r13, r1 + delay_ms(delay); + bfe: 37 01 movw r6, r14 + destinations[i] = myrand()%8; + } + + for (i=0; i<8; i++) + { + effect_z_updown_move(positions, destinations, AXIS_Z); + c00: c6 01 movw r24, r12 + c02: b5 01 movw r22, r10 + c04: 4a e7 ldi r20, 0x7A ; 122 + c06: 97 df rcall .-210 ; 0xb36 <_Z20effect_z_updown_movePhS_c> + delay_ms(delay); + c08: c3 01 movw r24, r6 + c0a: 55 dc rcall .-1878 ; 0x4b6 <_Z8delay_msj> + { + positions[i] = 4; + destinations[i] = myrand()%8; + } + + for (i=0; i<8; i++) + c0c: 0f 5f subi r16, 0xFF ; 255 + c0e: 1f 4f sbci r17, 0xFF ; 255 + c10: 08 30 cpi r16, 0x08 ; 8 + c12: 11 05 cpc r17, r1 + c14: a9 f7 brne .-22 ; 0xc00 <_Z15effect_z_updownii+0x8e> + { + effect_z_updown_move(positions, destinations, AXIS_Z); + delay_ms(delay); + } + + delay_ms(delay*4); + c16: 57 01 movw r10, r14 + c18: aa 0c add r10, r10 + c1a: bb 1c adc r11, r11 + c1c: aa 0c add r10, r10 + c1e: bb 1c adc r11, r11 + c20: cc 24 eor r12, r12 + c22: dd 24 eor r13, r13 + + for (i=0;i + delay_ms(delay); + } + + delay_ms(delay*4); + c38: 00 e0 ldi r16, 0x00 ; 0 + c3a: 10 e0 ldi r17, 0x00 ; 0 + + for (i=0;i + delay_ms(delay); + c44: c3 01 movw r24, r6 + c46: 37 dc rcall .-1938 ; 0x4b6 <_Z8delay_msj> + delay_ms(delay); + } + + for (i=0;i + { + effect_z_updown_move(positions, destinations, AXIS_Z); + delay_ms(delay); + } + + delay_ms(delay*4); + c52: c5 01 movw r24, r10 + c54: 30 dc rcall .-1952 ; 0x4b6 <_Z8delay_msj> + c56: ee 24 eor r14, r14 + c58: ff 24 eor r15, r15 + + + for (y=0;y<32;y++) + { + destinations[myrand()%64] = myrand()%8; + c5a: 86 db rcall .-2292 ; 0x368 <_Z6myrandv> + c5c: 8c 01 movw r16, r24 + c5e: 84 db rcall .-2296 ; 0x368 <_Z6myrandv> + c60: 9c 01 movw r18, r24 + c62: c8 01 movw r24, r16 + c64: 60 e4 ldi r22, 0x40 ; 64 + c66: 70 e0 ldi r23, 0x00 ; 0 + c68: 4d d1 rcall .+666 ; 0xf04 <__divmodhi4> + c6a: f4 01 movw r30, r8 + c6c: e8 0f add r30, r24 + c6e: f9 1f adc r31, r25 + c70: c9 01 movw r24, r18 + c72: 68 e0 ldi r22, 0x08 ; 8 + c74: 70 e0 ldi r23, 0x00 ; 0 + c76: 46 d1 rcall .+652 ; 0xf04 <__divmodhi4> + c78: 80 83 st Z, r24 + } + + delay_ms(delay*4); + + + for (y=0;y<32;y++) + c7a: 08 94 sec + c7c: e1 1c adc r14, r1 + c7e: f1 1c adc r15, r1 + c80: 80 e2 ldi r24, 0x20 ; 32 + c82: e8 16 cp r14, r24 + c84: f1 04 cpc r15, r1 + c86: 49 f7 brne .-46 ; 0xc5a <_Z15effect_z_updownii+0xe8> + { + effect_z_updown_move(positions, destinations, AXIS_Z); + delay_ms(delay); + } + + for (i=0;i + destinations[myrand()%64] = myrand()%8; + } + + } + +} + c94: c0 58 subi r28, 0x80 ; 128 + c96: df 4f sbci r29, 0xFF ; 255 + c98: 0f b6 in r0, 0x3f ; 63 + c9a: f8 94 cli + c9c: de bf out 0x3e, r29 ; 62 + c9e: 0f be out 0x3f, r0 ; 63 + ca0: cd bf out 0x3d, r28 ; 61 + ca2: cf 91 pop r28 + ca4: df 91 pop r29 + ca6: 1f 91 pop r17 + ca8: 0f 91 pop r16 + caa: ff 90 pop r15 + cac: ef 90 pop r14 + cae: df 90 pop r13 + cb0: cf 90 pop r12 + cb2: bf 90 pop r11 + cb4: af 90 pop r10 + cb6: 9f 90 pop r9 + cb8: 8f 90 pop r8 + cba: 7f 90 pop r7 + cbc: 6f 90 pop r6 + cbe: 5f 90 pop r5 + cc0: 4f 90 pop r4 + cc2: 3f 90 pop r3 + cc4: 2f 90 pop r2 + cc6: 08 95 ret + +00000cc8 <_Z20effect_random_fillerii>: + iterations--; + } +} + +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) + cc8: 8f 92 push r8 + cca: 9f 92 push r9 + ccc: af 92 push r10 + cce: bf 92 push r11 + cd0: cf 92 push r12 + cd2: df 92 push r13 + cd4: ef 92 push r14 + cd6: ff 92 push r15 + cd8: 0f 93 push r16 + cda: 1f 93 push r17 + cdc: cf 93 push r28 + cde: df 93 push r29 + ce0: 4c 01 movw r8, r24 + ce2: 8b 01 movw r16, r22 +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + ce4: 61 30 cpi r22, 0x01 ; 1 + ce6: 71 05 cpc r23, r1 + ce8: 11 f4 brne .+4 ; 0xcee <_Z20effect_random_fillerii+0x26> + { + fill(0x00); + cea: 80 e0 ldi r24, 0x00 ; 0 + cec: 01 c0 rjmp .+2 ; 0xcf0 <_Z20effect_random_fillerii+0x28> + } else + { + fill(0xff); + cee: 8f ef ldi r24, 0xFF ; 255 + cf0: c5 db rcall .-2166 ; 0x47c <_Z4fillh> + cf2: c0 e0 ldi r28, 0x00 ; 0 + cf4: d0 e0 ldi r29, 0x00 ; 0 + } + + while (loop<511) + { + x = myrand()%8; + cf6: 38 db rcall .-2448 ; 0x368 <_Z6myrandv> + cf8: 68 e0 ldi r22, 0x08 ; 8 + cfa: 70 e0 ldi r23, 0x00 ; 0 + cfc: 03 d1 rcall .+518 ; 0xf04 <__divmodhi4> + cfe: b8 2e mov r11, r24 + d00: a9 2e mov r10, r25 + y = myrand()%8; + d02: 32 db rcall .-2460 ; 0x368 <_Z6myrandv> + d04: 68 e0 ldi r22, 0x08 ; 8 + d06: 70 e0 ldi r23, 0x00 ; 0 + d08: fd d0 rcall .+506 ; 0xf04 <__divmodhi4> + d0a: d8 2e mov r13, r24 + d0c: c9 2e mov r12, r25 + z = myrand()%8; + d0e: 2c db rcall .-2472 ; 0x368 <_Z6myrandv> + d10: 68 e0 ldi r22, 0x08 ; 8 + d12: 70 e0 ldi r23, 0x00 ; 0 + d14: f7 d0 rcall .+494 ; 0xf04 <__divmodhi4> + d16: f8 2e mov r15, r24 + d18: e9 2e mov r14, r25 + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + d1a: 01 15 cp r16, r1 + d1c: 11 05 cpc r17, r1 + d1e: 51 f4 brne .+20 ; 0xd34 <_Z20effect_random_fillerii+0x6c> + d20: 8b 2d mov r24, r11 + d22: 9a 2d mov r25, r10 + d24: 6d 2d mov r22, r13 + d26: 7c 2d mov r23, r12 + d28: 4f 2d mov r20, r15 + d2a: 5e 2d mov r21, r14 + d2c: 7e db rcall .-2308 ; 0x42a <_Z8getvoxeliii> + d2e: 81 30 cpi r24, 0x01 ; 1 + d30: 11 f7 brne .-60 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> + d32: 0c c0 rjmp .+24 ; 0xd4c <_Z20effect_random_fillerii+0x84> + d34: 01 30 cpi r16, 0x01 ; 1 + d36: 11 05 cpc r17, r1 + d38: f1 f6 brne .-68 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> + d3a: 8b 2d mov r24, r11 + d3c: 9a 2d mov r25, r10 + d3e: 6d 2d mov r22, r13 + d40: 7c 2d mov r23, r12 + d42: 4f 2d mov r20, r15 + d44: 5e 2d mov r21, r14 + d46: 71 db rcall .-2334 ; 0x42a <_Z8getvoxeliii> + d48: 88 23 and r24, r24 + d4a: a9 f6 brne .-86 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> + { + altervoxel(x,y,z,state); + d4c: 8b 2d mov r24, r11 + d4e: 9a 2d mov r25, r10 + d50: 6d 2d mov r22, r13 + d52: 7c 2d mov r23, r12 + d54: 4f 2d mov r20, r15 + d56: 5e 2d mov r21, r14 + d58: 98 01 movw r18, r16 + d5a: 89 db rcall .-2286 ; 0x46e <_Z10altervoxeliiii> + delay_ms(delay); + d5c: c4 01 movw r24, r8 + d5e: ab db rcall .-2218 ; 0x4b6 <_Z8delay_msj> + loop++; + d60: 21 96 adiw r28, 0x01 ; 1 + } else + { + fill(0xff); + } + + while (loop<511) + d62: 81 e0 ldi r24, 0x01 ; 1 + d64: cf 3f cpi r28, 0xFF ; 255 + d66: d8 07 cpc r29, r24 + d68: 31 f6 brne .-116 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + d6a: df 91 pop r29 + d6c: cf 91 pop r28 + d6e: 1f 91 pop r17 + d70: 0f 91 pop r16 + d72: ff 90 pop r15 + d74: ef 90 pop r14 + d76: df 90 pop r13 + d78: cf 90 pop r12 + d7a: bf 90 pop r11 + d7c: af 90 pop r10 + d7e: 9f 90 pop r9 + d80: 8f 90 pop r8 + d82: 08 95 ret + +00000d84 <_Z17sendvoxels_rand_ziii>: + } +} + +// For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 +// for n iterations, a random voxel is sent to the opposite side of where it was. +void sendvoxels_rand_z (int iterations, int delay, int wait) + d84: 6f 92 push r6 + d86: 7f 92 push r7 + d88: 8f 92 push r8 + d8a: 9f 92 push r9 + d8c: af 92 push r10 + d8e: bf 92 push r11 + d90: df 92 push r13 + d92: ef 92 push r14 + d94: ff 92 push r15 + d96: 0f 93 push r16 + d98: 1f 93 push r17 + d9a: cf 93 push r28 + d9c: df 93 push r29 + d9e: 3c 01 movw r6, r24 + da0: 5b 01 movw r10, r22 + da2: 4a 01 movw r8, r20 +{ + unsigned char x, y, last_x = 0, last_y = 0, i; + + fill(0x00); + da4: 80 e0 ldi r24, 0x00 ; 0 + da6: 6a db rcall .-2348 ; 0x47c <_Z4fillh> + da8: 00 e0 ldi r16, 0x00 ; 0 + daa: 10 e0 ldi r17, 0x00 ; 0 + dac: 1c c0 rjmp .+56 ; 0xde6 <_Z17sendvoxels_rand_ziii+0x62> + { + for (y=0;y<8;y++) + { + // Then set a voxel either at the top or at the bottom + // myrand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. + setvoxel(x,y,((myrand()%2)*7)); + dae: dc da rcall .-2632 ; 0x368 <_Z6myrandv> + db0: 62 e0 ldi r22, 0x02 ; 2 + db2: 70 e0 ldi r23, 0x00 ; 0 + db4: a7 d0 rcall .+334 ; 0xf04 <__divmodhi4> + db6: ac 01 movw r20, r24 + db8: 33 e0 ldi r19, 0x03 ; 3 + dba: 44 0f add r20, r20 + dbc: 55 1f adc r21, r21 + dbe: 3a 95 dec r19 + dc0: e1 f7 brne .-8 ; 0xdba <_Z17sendvoxels_rand_ziii+0x36> + dc2: 48 1b sub r20, r24 + dc4: 59 0b sbc r21, r25 + dc6: c8 01 movw r24, r16 + dc8: be 01 movw r22, r28 + dca: 0a db rcall .-2540 ; 0x3e0 <_Z8setvoxeliii> + dcc: 21 96 adiw r28, 0x01 ; 1 + fill(0x00); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + dce: c8 30 cpi r28, 0x08 ; 8 + dd0: d1 05 cpc r29, r1 + dd2: 69 f7 brne .-38 ; 0xdae <_Z17sendvoxels_rand_ziii+0x2a> + dd4: 0f 5f subi r16, 0xFF ; 255 + dd6: 1f 4f sbci r17, 0xFF ; 255 + unsigned char x, y, last_x = 0, last_y = 0, i; + + fill(0x00); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + dd8: 08 30 cpi r16, 0x08 ; 8 + dda: 11 05 cpc r17, r1 + ddc: 21 f4 brne .+8 ; 0xde6 <_Z17sendvoxels_rand_ziii+0x62> + dde: dd 24 eor r13, r13 + de0: ee 24 eor r14, r14 + de2: ff 24 eor r15, r15 + de4: 29 c0 rjmp .+82 ; 0xe38 <_Z17sendvoxels_rand_ziii+0xb4> + de6: c0 e0 ldi r28, 0x00 ; 0 + de8: d0 e0 ldi r29, 0x00 ; 0 + dea: e1 cf rjmp .-62 ; 0xdae <_Z17sendvoxels_rand_ziii+0x2a> + } + + for (i=0;i + dee: ec 01 movw r28, r24 + y = myrand()%8; + df0: bb da rcall .-2698 ; 0x368 <_Z6myrandv> + df2: 68 e0 ldi r22, 0x08 ; 8 + df4: 70 e0 ldi r23, 0x00 ; 0 + df6: 86 d0 rcall .+268 ; 0xf04 <__divmodhi4> + df8: 08 2f mov r16, r24 + // but not the sameone twice in a row + if (y != last_y && x != last_x) + dfa: 8e 15 cp r24, r14 + dfc: e1 f0 breq .+56 ; 0xe36 <_Z17sendvoxels_rand_ziii+0xb2> + } + + for (i=0;i + e06: 18 2f mov r17, r24 + y = myrand()%8; + // but not the sameone twice in a row + if (y != last_y && x != last_x) + e08: 8d 15 cp r24, r13 + e0a: a9 f0 breq .+42 ; 0xe36 <_Z17sendvoxels_rand_ziii+0xb2> + { + // If the voxel at this x,y is at the bottom + if (getvoxel(x,y,0)) + e0c: 90 e0 ldi r25, 0x00 ; 0 + e0e: 60 2f mov r22, r16 + e10: 70 e0 ldi r23, 0x00 ; 0 + e12: 40 e0 ldi r20, 0x00 ; 0 + e14: 50 e0 ldi r21, 0x00 ; 0 + e16: 09 db rcall .-2542 ; 0x42a <_Z8getvoxeliii> + e18: 88 23 and r24, r24 + e1a: 21 f0 breq .+8 ; 0xe24 <_Z17sendvoxels_rand_ziii+0xa0> + { + // send it to the top + sendvoxel_z(x,y,0,delay); + e1c: 81 2f mov r24, r17 + e1e: 60 2f mov r22, r16 + e20: 40 e0 ldi r20, 0x00 ; 0 + e22: 03 c0 rjmp .+6 ; 0xe2a <_Z17sendvoxels_rand_ziii+0xa6> + } else + { + // if its at the top, send it to the bottom + sendvoxel_z(x,y,7,delay); + e24: 81 2f mov r24, r17 + e26: 60 2f mov r22, r16 + e28: 47 e0 ldi r20, 0x07 ; 7 + e2a: 95 01 movw r18, r10 + e2c: 1b dd rcall .-1482 ; 0x864 <_Z11sendvoxel_zhhhi> + } + delay_ms(wait); + e2e: c4 01 movw r24, r8 + e30: 42 db rcall .-2428 ; 0x4b6 <_Z8delay_msj> + e32: d1 2e mov r13, r17 + e34: e0 2e mov r14, r16 + // myrand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. + setvoxel(x,y,((myrand()%2)*7)); + } + } + + for (i=0;i + last_y = y; + last_x = x; + } + } + +} + e42: df 91 pop r29 + e44: cf 91 pop r28 + e46: 1f 91 pop r17 + e48: 0f 91 pop r16 + e4a: ff 90 pop r15 + e4c: ef 90 pop r14 + e4e: df 90 pop r13 + e50: bf 90 pop r11 + e52: af 90 pop r10 + e54: 9f 90 pop r9 + e56: 8f 90 pop r8 + e58: 7f 90 pop r7 + e5a: 6f 90 pop r6 + e5c: 08 95 ret + +00000e5e <_Z14effect_blinky2v>: + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() + e5e: ef 92 push r14 + e60: ff 92 push r15 + e62: 0f 93 push r16 + e64: 1f 93 push r17 + e66: cf 93 push r28 + e68: df 93 push r29 +{ + int i,r; + fill(0x00); + e6a: 80 e0 ldi r24, 0x00 ; 0 + e6c: 07 db rcall .-2546 ; 0x47c <_Z4fillh> + e6e: 00 e0 ldi r16, 0x00 ; 0 + e70: 10 e0 ldi r17, 0x00 ; 0 + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + e72: 4f ee ldi r20, 0xEF ; 239 + e74: e4 2e mov r14, r20 + e76: 42 e0 ldi r20, 0x02 ; 2 + e78: f4 2e mov r15, r20 + e7a: 3a c0 rjmp .+116 ; 0xef0 <_Z14effect_blinky2v+0x92> + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + e7c: 80 e0 ldi r24, 0x00 ; 0 + e7e: fe da rcall .-2564 ; 0x47c <_Z4fillh> + delay_ms(i); + e80: ce 01 movw r24, r28 + e82: 19 db rcall .-2510 ; 0x4b6 <_Z8delay_msj> + + fill(0xff); + e84: 8f ef ldi r24, 0xFF ; 255 + e86: fa da rcall .-2572 ; 0x47c <_Z4fillh> + delay_ms(100); + e88: 84 e6 ldi r24, 0x64 ; 100 + e8a: 90 e0 ldi r25, 0x00 ; 0 + e8c: 14 db rcall .-2520 ; 0x4b6 <_Z8delay_msj> + + i = i - (15+(1000/(i/10))); + e8e: ce 01 movw r24, r28 + e90: 66 ef ldi r22, 0xF6 ; 246 + e92: 7f ef ldi r23, 0xFF ; 255 + e94: 37 d0 rcall .+110 ; 0xf04 <__divmodhi4> + e96: 88 ee ldi r24, 0xE8 ; 232 + e98: 93 e0 ldi r25, 0x03 ; 3 + e9a: 34 d0 rcall .+104 ; 0xf04 <__divmodhi4> + e9c: 6f 50 subi r22, 0x0F ; 15 + e9e: 70 40 sbci r23, 0x00 ; 0 + ea0: c6 0f add r28, r22 + ea2: d7 1f adc r29, r23 + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + ea4: 1c 16 cp r1, r28 + ea6: 1d 06 cpc r1, r29 + ea8: 4c f3 brlt .-46 ; 0xe7c <_Z14effect_blinky2v+0x1e> + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + eaa: 88 ee ldi r24, 0xE8 ; 232 + eac: 93 e0 ldi r25, 0x03 ; 3 + eae: 03 db rcall .-2554 ; 0x4b6 <_Z8delay_msj> + eb0: ce ee ldi r28, 0xEE ; 238 + eb2: d2 e0 ldi r29, 0x02 ; 2 + + i = 750; + while (i>0) + { + fill(0x00); + eb4: 80 e0 ldi r24, 0x00 ; 0 + eb6: e2 da rcall .-2620 ; 0x47c <_Z4fillh> + delay_ms(751-i); + eb8: c7 01 movw r24, r14 + eba: 8c 1b sub r24, r28 + ebc: 9d 0b sbc r25, r29 + ebe: fb da rcall .-2570 ; 0x4b6 <_Z8delay_msj> + + fill(0xff); + ec0: 8f ef ldi r24, 0xFF ; 255 + ec2: dc da rcall .-2632 ; 0x47c <_Z4fillh> + delay_ms(100); + ec4: 84 e6 ldi r24, 0x64 ; 100 + ec6: 90 e0 ldi r25, 0x00 ; 0 + ec8: f6 da rcall .-2580 ; 0x4b6 <_Z8delay_msj> + + i = i - (15+(1000/(i/10))); + eca: ce 01 movw r24, r28 + ecc: 66 ef ldi r22, 0xF6 ; 246 + ece: 7f ef ldi r23, 0xFF ; 255 + ed0: 19 d0 rcall .+50 ; 0xf04 <__divmodhi4> + ed2: 88 ee ldi r24, 0xE8 ; 232 + ed4: 93 e0 ldi r25, 0x03 ; 3 + ed6: 16 d0 rcall .+44 ; 0xf04 <__divmodhi4> + ed8: 6f 50 subi r22, 0x0F ; 15 + eda: 70 40 sbci r23, 0x00 ; 0 + edc: c6 0f add r28, r22 + ede: d7 1f adc r29, r23 + } + + delay_ms(1000); + + i = 750; + while (i>0) + ee0: 1c 16 cp r1, r28 + ee2: 1d 06 cpc r1, r29 + ee4: 3c f3 brlt .-50 ; 0xeb4 <_Z14effect_blinky2v+0x56> +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + ee6: 0f 5f subi r16, 0xFF ; 255 + ee8: 1f 4f sbci r17, 0xFF ; 255 + eea: 02 30 cpi r16, 0x02 ; 2 + eec: 11 05 cpc r17, r1 + eee: 19 f0 breq .+6 ; 0xef6 <_Z14effect_blinky2v+0x98> + ef0: ce ee ldi r28, 0xEE ; 238 + ef2: d2 e0 ldi r29, 0x02 ; 2 + ef4: c3 cf rjmp .-122 ; 0xe7c <_Z14effect_blinky2v+0x1e> + + i = i - (15+(1000/(i/10))); + } + } + +} + ef6: df 91 pop r29 + ef8: cf 91 pop r28 + efa: 1f 91 pop r17 + efc: 0f 91 pop r16 + efe: ff 90 pop r15 + f00: ef 90 pop r14 + f02: 08 95 ret + +00000f04 <__divmodhi4>: + f04: 97 fb bst r25, 7 + f06: 09 2e mov r0, r25 + f08: 07 26 eor r0, r23 + f0a: 0a d0 rcall .+20 ; 0xf20 <__divmodhi4_neg1> + f0c: 77 fd sbrc r23, 7 + f0e: 04 d0 rcall .+8 ; 0xf18 <__divmodhi4_neg2> + f10: 0c d0 rcall .+24 ; 0xf2a <__udivmodhi4> + f12: 06 d0 rcall .+12 ; 0xf20 <__divmodhi4_neg1> + f14: 00 20 and r0, r0 + f16: 1a f4 brpl .+6 ; 0xf1e <__divmodhi4_exit> + +00000f18 <__divmodhi4_neg2>: + f18: 70 95 com r23 + f1a: 61 95 neg r22 + f1c: 7f 4f sbci r23, 0xFF ; 255 + +00000f1e <__divmodhi4_exit>: + f1e: 08 95 ret + +00000f20 <__divmodhi4_neg1>: + f20: f6 f7 brtc .-4 ; 0xf1e <__divmodhi4_exit> + f22: 90 95 com r25 + f24: 81 95 neg r24 + f26: 9f 4f sbci r25, 0xFF ; 255 + f28: 08 95 ret + +00000f2a <__udivmodhi4>: + f2a: aa 1b sub r26, r26 + f2c: bb 1b sub r27, r27 + f2e: 51 e1 ldi r21, 0x11 ; 17 + f30: 07 c0 rjmp .+14 ; 0xf40 <__udivmodhi4_ep> + +00000f32 <__udivmodhi4_loop>: + f32: aa 1f adc r26, r26 + f34: bb 1f adc r27, r27 + f36: a6 17 cp r26, r22 + f38: b7 07 cpc r27, r23 + f3a: 10 f0 brcs .+4 ; 0xf40 <__udivmodhi4_ep> + f3c: a6 1b sub r26, r22 + f3e: b7 0b sbc r27, r23 + +00000f40 <__udivmodhi4_ep>: + f40: 88 1f adc r24, r24 + f42: 99 1f adc r25, r25 + f44: 5a 95 dec r21 + f46: a9 f7 brne .-22 ; 0xf32 <__udivmodhi4_loop> + f48: 80 95 com r24 + f4a: 90 95 com r25 + f4c: bc 01 movw r22, r24 + f4e: cd 01 movw r24, r26 + f50: 08 95 ret + +00000f52 <__prologue_saves__>: + f52: 2f 92 push r2 + f54: 3f 92 push r3 + f56: 4f 92 push r4 + f58: 5f 92 push r5 + f5a: 6f 92 push r6 + f5c: 7f 92 push r7 + f5e: 8f 92 push r8 + f60: 9f 92 push r9 + f62: af 92 push r10 + f64: bf 92 push r11 + f66: cf 92 push r12 + f68: df 92 push r13 + f6a: ef 92 push r14 + f6c: ff 92 push r15 + f6e: 0f 93 push r16 + f70: 1f 93 push r17 + f72: cf 93 push r28 + f74: df 93 push r29 + f76: cd b7 in r28, 0x3d ; 61 + f78: de b7 in r29, 0x3e ; 62 + f7a: ca 1b sub r28, r26 + f7c: db 0b sbc r29, r27 + f7e: 0f b6 in r0, 0x3f ; 63 + f80: f8 94 cli + f82: de bf out 0x3e, r29 ; 62 + f84: 0f be out 0x3f, r0 ; 63 + f86: cd bf out 0x3d, r28 ; 61 + f88: 09 94 ijmp + +00000f8a <__epilogue_restores__>: + f8a: 2a 88 ldd r2, Y+18 ; 0x12 + f8c: 39 88 ldd r3, Y+17 ; 0x11 + f8e: 48 88 ldd r4, Y+16 ; 0x10 + f90: 5f 84 ldd r5, Y+15 ; 0x0f + f92: 6e 84 ldd r6, Y+14 ; 0x0e + f94: 7d 84 ldd r7, Y+13 ; 0x0d + f96: 8c 84 ldd r8, Y+12 ; 0x0c + f98: 9b 84 ldd r9, Y+11 ; 0x0b + f9a: aa 84 ldd r10, Y+10 ; 0x0a + f9c: b9 84 ldd r11, Y+9 ; 0x09 + f9e: c8 84 ldd r12, Y+8 ; 0x08 + fa0: df 80 ldd r13, Y+7 ; 0x07 + fa2: ee 80 ldd r14, Y+6 ; 0x06 + fa4: fd 80 ldd r15, Y+5 ; 0x05 + fa6: 0c 81 ldd r16, Y+4 ; 0x04 + fa8: 1b 81 ldd r17, Y+3 ; 0x03 + faa: aa 81 ldd r26, Y+2 ; 0x02 + fac: b9 81 ldd r27, Y+1 ; 0x01 + fae: ce 0f add r28, r30 + fb0: d1 1d adc r29, r1 + fb2: 0f b6 in r0, 0x3f ; 63 + fb4: f8 94 cli + fb6: de bf out 0x3e, r29 ; 62 + fb8: 0f be out 0x3f, r0 ; 63 + fba: cd bf out 0x3d, r28 ; 61 + fbc: ed 01 movw r28, r26 + fbe: 08 95 ret + +00000fc0 : + fc0: a0 e0 ldi r26, 0x00 ; 0 + fc2: b0 e0 ldi r27, 0x00 ; 0 + fc4: e5 ee ldi r30, 0xE5 ; 229 + fc6: f7 e0 ldi r31, 0x07 ; 7 + fc8: cc cf rjmp .-104 ; 0xf62 <__prologue_saves__+0x10> + fca: ec 01 movw r28, r24 + fcc: a8 80 ld r10, Y + fce: b9 80 ldd r11, Y+1 ; 0x01 + fd0: ca 80 ldd r12, Y+2 ; 0x02 + fd2: db 80 ldd r13, Y+3 ; 0x03 + fd4: a1 14 cp r10, r1 + fd6: b1 04 cpc r11, r1 + fd8: c1 04 cpc r12, r1 + fda: d1 04 cpc r13, r1 + fdc: 41 f4 brne .+16 ; 0xfee + fde: 84 e2 ldi r24, 0x24 ; 36 + fe0: a8 2e mov r10, r24 + fe2: 89 ed ldi r24, 0xD9 ; 217 + fe4: b8 2e mov r11, r24 + fe6: 8b e5 ldi r24, 0x5B ; 91 + fe8: c8 2e mov r12, r24 + fea: 87 e0 ldi r24, 0x07 ; 7 + fec: d8 2e mov r13, r24 + fee: c6 01 movw r24, r12 + ff0: b5 01 movw r22, r10 + ff2: 2d e1 ldi r18, 0x1D ; 29 + ff4: 33 ef ldi r19, 0xF3 ; 243 + ff6: 41 e0 ldi r20, 0x01 ; 1 + ff8: 50 e0 ldi r21, 0x00 ; 0 + ffa: 5a d0 rcall .+180 ; 0x10b0 <__divmodsi4> + ffc: 27 ea ldi r18, 0xA7 ; 167 + ffe: 31 e4 ldi r19, 0x41 ; 65 + 1000: 40 e0 ldi r20, 0x00 ; 0 + 1002: 50 e0 ldi r21, 0x00 ; 0 + 1004: 36 d0 rcall .+108 ; 0x1072 <__mulsi3> + 1006: 7b 01 movw r14, r22 + 1008: 8c 01 movw r16, r24 + 100a: c6 01 movw r24, r12 + 100c: b5 01 movw r22, r10 + 100e: 2d e1 ldi r18, 0x1D ; 29 + 1010: 33 ef ldi r19, 0xF3 ; 243 + 1012: 41 e0 ldi r20, 0x01 ; 1 + 1014: 50 e0 ldi r21, 0x00 ; 0 + 1016: 4c d0 rcall .+152 ; 0x10b0 <__divmodsi4> + 1018: ca 01 movw r24, r20 + 101a: b9 01 movw r22, r18 + 101c: 2c ee ldi r18, 0xEC ; 236 + 101e: 34 ef ldi r19, 0xF4 ; 244 + 1020: 4f ef ldi r20, 0xFF ; 255 + 1022: 5f ef ldi r21, 0xFF ; 255 + 1024: 26 d0 rcall .+76 ; 0x1072 <__mulsi3> + 1026: 6e 0d add r22, r14 + 1028: 7f 1d adc r23, r15 + 102a: 80 1f adc r24, r16 + 102c: 91 1f adc r25, r17 + 102e: 97 ff sbrs r25, 7 + 1030: 04 c0 rjmp .+8 ; 0x103a + 1032: 61 50 subi r22, 0x01 ; 1 + 1034: 70 40 sbci r23, 0x00 ; 0 + 1036: 80 40 sbci r24, 0x00 ; 0 + 1038: 90 48 sbci r25, 0x80 ; 128 + 103a: 68 83 st Y, r22 + 103c: 79 83 std Y+1, r23 ; 0x01 + 103e: 8a 83 std Y+2, r24 ; 0x02 + 1040: 9b 83 std Y+3, r25 ; 0x03 + 1042: 9b 01 movw r18, r22 + 1044: 3f 77 andi r19, 0x7F ; 127 + 1046: c9 01 movw r24, r18 + 1048: cd b7 in r28, 0x3d ; 61 + 104a: de b7 in r29, 0x3e ; 62 + 104c: ea e0 ldi r30, 0x0A ; 10 + 104e: a5 cf rjmp .-182 ; 0xf9a <__epilogue_restores__+0x10> + +00001050 : + 1050: b7 df rcall .-146 ; 0xfc0 + 1052: 08 95 ret + +00001054 : + 1054: 80 e6 ldi r24, 0x60 ; 96 + 1056: 90 e0 ldi r25, 0x00 ; 0 + 1058: b3 df rcall .-154 ; 0xfc0 + 105a: 08 95 ret + +0000105c : + 105c: a0 e0 ldi r26, 0x00 ; 0 + 105e: b0 e0 ldi r27, 0x00 ; 0 + 1060: 80 93 60 00 sts 0x0060, r24 + 1064: 90 93 61 00 sts 0x0061, r25 + 1068: a0 93 62 00 sts 0x0062, r26 + 106c: b0 93 63 00 sts 0x0063, r27 + 1070: 08 95 ret + +00001072 <__mulsi3>: + 1072: 62 9f mul r22, r18 + 1074: d0 01 movw r26, r0 + 1076: 73 9f mul r23, r19 + 1078: f0 01 movw r30, r0 + 107a: 82 9f mul r24, r18 + 107c: e0 0d add r30, r0 + 107e: f1 1d adc r31, r1 + 1080: 64 9f mul r22, r20 + 1082: e0 0d add r30, r0 + 1084: f1 1d adc r31, r1 + 1086: 92 9f mul r25, r18 + 1088: f0 0d add r31, r0 + 108a: 83 9f mul r24, r19 + 108c: f0 0d add r31, r0 + 108e: 74 9f mul r23, r20 + 1090: f0 0d add r31, r0 + 1092: 65 9f mul r22, r21 + 1094: f0 0d add r31, r0 + 1096: 99 27 eor r25, r25 + 1098: 72 9f mul r23, r18 + 109a: b0 0d add r27, r0 + 109c: e1 1d adc r30, r1 + 109e: f9 1f adc r31, r25 + 10a0: 63 9f mul r22, r19 + 10a2: b0 0d add r27, r0 + 10a4: e1 1d adc r30, r1 + 10a6: f9 1f adc r31, r25 + 10a8: bd 01 movw r22, r26 + 10aa: cf 01 movw r24, r30 + 10ac: 11 24 eor r1, r1 + 10ae: 08 95 ret + +000010b0 <__divmodsi4>: + 10b0: 97 fb bst r25, 7 + 10b2: 09 2e mov r0, r25 + 10b4: 05 26 eor r0, r21 + 10b6: 0e d0 rcall .+28 ; 0x10d4 <__divmodsi4_neg1> + 10b8: 57 fd sbrc r21, 7 + 10ba: 04 d0 rcall .+8 ; 0x10c4 <__divmodsi4_neg2> + 10bc: 14 d0 rcall .+40 ; 0x10e6 <__udivmodsi4> + 10be: 0a d0 rcall .+20 ; 0x10d4 <__divmodsi4_neg1> + 10c0: 00 1c adc r0, r0 + 10c2: 38 f4 brcc .+14 ; 0x10d2 <__divmodsi4_exit> + +000010c4 <__divmodsi4_neg2>: + 10c4: 50 95 com r21 + 10c6: 40 95 com r20 + 10c8: 30 95 com r19 + 10ca: 21 95 neg r18 + 10cc: 3f 4f sbci r19, 0xFF ; 255 + 10ce: 4f 4f sbci r20, 0xFF ; 255 + 10d0: 5f 4f sbci r21, 0xFF ; 255 + +000010d2 <__divmodsi4_exit>: + 10d2: 08 95 ret + +000010d4 <__divmodsi4_neg1>: + 10d4: f6 f7 brtc .-4 ; 0x10d2 <__divmodsi4_exit> + 10d6: 90 95 com r25 + 10d8: 80 95 com r24 + 10da: 70 95 com r23 + 10dc: 61 95 neg r22 + 10de: 7f 4f sbci r23, 0xFF ; 255 + 10e0: 8f 4f sbci r24, 0xFF ; 255 + 10e2: 9f 4f sbci r25, 0xFF ; 255 + 10e4: 08 95 ret + +000010e6 <__udivmodsi4>: + 10e6: a1 e2 ldi r26, 0x21 ; 33 + 10e8: 1a 2e mov r1, r26 + 10ea: aa 1b sub r26, r26 + 10ec: bb 1b sub r27, r27 + 10ee: fd 01 movw r30, r26 + 10f0: 0d c0 rjmp .+26 ; 0x110c <__udivmodsi4_ep> + +000010f2 <__udivmodsi4_loop>: + 10f2: aa 1f adc r26, r26 + 10f4: bb 1f adc r27, r27 + 10f6: ee 1f adc r30, r30 + 10f8: ff 1f adc r31, r31 + 10fa: a2 17 cp r26, r18 + 10fc: b3 07 cpc r27, r19 + 10fe: e4 07 cpc r30, r20 + 1100: f5 07 cpc r31, r21 + 1102: 20 f0 brcs .+8 ; 0x110c <__udivmodsi4_ep> + 1104: a2 1b sub r26, r18 + 1106: b3 0b sbc r27, r19 + 1108: e4 0b sbc r30, r20 + 110a: f5 0b sbc r31, r21 + +0000110c <__udivmodsi4_ep>: + 110c: 66 1f adc r22, r22 + 110e: 77 1f adc r23, r23 + 1110: 88 1f adc r24, r24 + 1112: 99 1f adc r25, r25 + 1114: 1a 94 dec r1 + 1116: 69 f7 brne .-38 ; 0x10f2 <__udivmodsi4_loop> + 1118: 60 95 com r22 + 111a: 70 95 com r23 + 111c: 80 95 com r24 + 111e: 90 95 com r25 + 1120: 9b 01 movw r18, r22 + 1122: ac 01 movw r20, r24 + 1124: bd 01 movw r22, r26 + 1126: cf 01 movw r24, r30 + 1128: 08 95 ret + +0000112a <_exit>: + 112a: f8 94 cli + +0000112c <__stop_program>: + 112c: ff cf rjmp .-2 ; 0x112c <__stop_program> diff --git a/avr-test/ledcube.map b/avr-test/ledcube.map new file mode 100644 index 0000000..eaa732b --- /dev/null +++ b/avr-test/ledcube.map @@ -0,0 +1,783 @@ +Archive member included because of file (symbol) + +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + effect.o (__divmodhi4) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o (exit) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + main.o (__do_clear_bss) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + draw.o (__fixunssfsi) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) (__subsf3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + draw.o (__mulsf3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + draw.o (__divsf3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) (__gesf2) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + draw.o (__floatsisf) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + effect.o (__fixsfsi) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__thenan_sf) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) (__udivmodhi4) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__prologue_saves__) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__epilogue_restores__) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) (__do_copy_data) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) (__clzsi2) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__pack_f) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__unpack_f) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) (__fpcmp_parts_f) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) (__clz_tab) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + effect.o (cos) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) (__fp_rempio2) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) (__fp_sinus) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) (__fp_splitA) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + effect.o (sin) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) (__addsf3x) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_inf) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) (__fp_mpack_finite) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) (__fp_nan) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) (__fp_powsodd) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_pscA) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_pscB) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) (__fp_round) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_zero) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) (__fp_powser) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) (__mulsf3x) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + main.o (rand) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) (__mulsi3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) (__divmodsi4) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) (__udivmodsi4) + +Discarded input sections + + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + .text 0x00000000 0x0 main.o + .data 0x00000000 0x0 main.o + .text._Z5delaym + 0x00000000 0x52 main.o + .text._Z9clear_ledv + 0x00000000 0x36 main.o + .text 0x00000000 0x0 draw.o + .data 0x00000000 0x0 draw.o + .bss 0x00000000 0x0 draw.o + .text._Z11tmpclrvoxeliii + 0x00000000 0x4c draw.o + .text._Z11tmpsetvoxeliii + 0x00000000 0x4a draw.o + .text._Z8flpvoxeliii + 0x00000000 0x4a draw.o + .text._Z8argorderiiPiS_ + 0x00000000 0x24 draw.o + .text._Z10setplane_zi + 0x00000000 0x2e draw.o + .text._Z10clrplane_zi + 0x00000000 0x2c draw.o + .text._Z10setplane_xi + 0x00000000 0x56 draw.o + .text._Z10clrplane_xi + 0x00000000 0x58 draw.o + .text._Z10setplane_yi + 0x00000000 0x2e draw.o + .text._Z10clrplane_yi + 0x00000000 0x2c draw.o + .text._Z8setplanech + 0x00000000 0x74 draw.o + .text._Z8clrplanech + 0x00000000 0x70 draw.o + .text._Z7tmpfillh + 0x00000000 0x3a draw.o + .text._Z10box_fillediiiiii + 0x00000000 0x96 draw.o + .text._Z9box_wallsiiiiii + 0x00000000 0xe8 draw.o + .text._Z13box_wireframeiiiiii + 0x00000000 0x12e draw.o + .text._Z8bytelineii + 0x00000000 0x28 draw.o + .text._Z8flipbytec + 0x00000000 0x70 draw.o + .text._Z4lineiiiiii + 0x00000000 0x1da draw.o + .text._Z8mirror_zv + 0x00000000 0x84 draw.o + .text._Z8mirror_xv + 0x00000000 0xba draw.o + .text._Z8mirror_yv + 0x00000000 0xde draw.o + .text._Z8tmp2cubev + 0x00000000 0x14 draw.o + .text 0x00000000 0x0 effect.o + .data 0x00000000 0x0 effect.o + .bss 0x00000000 0x0 effect.o + .text._Z15effect_pathmovePhi + 0x00000000 0xa6 effect.o + .text._Z20effect_telcstairs_doiii + 0x00000000 0x48 effect.o + .text._Z17effect_telcstairsiii + 0x00000000 0x3e effect.o + .text._Z27effect_random_sparkle_flashiii + 0x00000000 0x98 effect.o + .text._Z21effect_random_sparklev + 0x00000000 0x32 effect.o + .text._Z14effect_loadbari + 0x00000000 0xa6 effect.o + .text._Z30effect_axis_updown_randsuspendciii + 0x00000000 0x15c effect.o + .text._Z10boingboingjihh + 0x00000000 0x538 effect.o + .text._Z16sendplane_rand_zhii + 0x00000000 0x6c effect.o + .text._Z19effect_box_woopwoopii + 0x00000000 0x7a effect.o + .text._Z22effect_box_shrink_growiiij + 0x00000000 0x100 effect.o + .text._Z16effect_planboingii + 0x00000000 0x46 effect.o + .text._Z11effect_testv + 0x00000000 0xa4 effect.o + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .text.libgcc 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .text 0x00000000 0x50 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + .text 0x00000000 0x338 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + .text 0x00000000 0x1ea /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + .text 0x00000000 0x14e /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + .text 0x00000000 0x56 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + .text 0x00000000 0xb4 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + .text 0x00000000 0xa2 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + .data 0x00000000 0x8 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .text.libgcc 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .text 0x00000000 0x9e /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + .text 0x00000000 0x1aa /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + .text 0x00000000 0xf0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + .text 0x00000000 0xb2 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + .data 0x00000000 0x100 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .text.avr-libc.fplib + 0x00000000 0x6 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .text.avr-libc.fplib + 0x00000000 0x50 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .text.avr-libc.fplib + 0x00000000 0x22 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .progmem.gcc_fplib + 0x00000000 0x1e /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .text.avr-libc.fplib + 0x00000000 0x44 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .text.avr-libc.fplib + 0x00000000 0xc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .text.avr-libc.fplib + 0x00000000 0xc0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .text.avr-libc.fplib + 0x00000000 0xc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .text.avr-libc.fplib + 0x00000000 0x1c /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .text.avr-libc.fplib + 0x00000000 0x6 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .text.avr-libc.fplib + 0x00000000 0x22 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .text.avr-libc.fplib + 0x00000000 0xe /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .text.avr-libc.fplib + 0x00000000 0xe /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .text.avr-libc.fplib + 0x00000000 0x22 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .text.avr-libc.fplib + 0x00000000 0xe /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .text.avr-libc.fplib + 0x00000000 0x4a /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .text.avr-libc.fplib + 0x00000000 0xc2 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00002000 xr +data 0x00800060 0x0000ffa0 rw !x +eeprom 0x00810000 0x00010000 rw !x +fuse 0x00820000 0x00000400 rw !x +lock 0x00830000 0x00000400 rw !x +signature 0x00840000 0x00000400 rw !x +*default* 0x00000000 0xffffffff + +Linker script and memory map + +LOAD /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o +LOAD main.o +LOAD draw.o +LOAD effect.o +LOAD /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a +LOAD /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a +LOAD /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a +LOAD /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a +LOAD /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x00000000 0x112e + *(.vectors) + .vectors 0x00000000 0x26 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + 0x00000000 __vectors + 0x00000000 __vector_default + *(.vectors) + *(.progmem.gcc*) + *(.progmem*) + 0x00000026 . = ALIGN (0x2) + 0x00000026 __trampolines_start = . + *(.trampolines) + .trampolines 0x00000026 0x0 linker stubs + *(.trampolines*) + 0x00000026 __trampolines_end = . + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x00000026 __ctors_start = . + *(.ctors) + 0x00000026 __ctors_end = . + 0x00000026 __dtors_start = . + *(.dtors) + 0x00000026 __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x00000026 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + 0x00000026 __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x00000026 0xc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x00000032 0x10 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + 0x00000032 __do_clear_bss + .init4 0x00000042 0x16 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + 0x00000042 __do_copy_data + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x00000058 0x4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + *(.init9) + *(.text) + .text 0x0000005c 0x2 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + 0x0000005c __vector_1 + 0x0000005c __vector_12 + 0x0000005c __bad_interrupt + 0x0000005c __vector_6 + 0x0000005c __vector_11 + 0x0000005c __vector_13 + 0x0000005c __vector_17 + 0x0000005c __vector_7 + 0x0000005c __vector_5 + 0x0000005c __vector_4 + 0x0000005c __vector_2 + 0x0000005c __vector_15 + 0x0000005c __vector_8 + 0x0000005c __vector_14 + 0x0000005c __vector_10 + 0x0000005c __vector_16 + 0x0000005c __vector_18 + 0x0000005e . = ALIGN (0x2) + *(.text.*) + .text.__vector_9 + 0x0000005e 0x8a main.o + 0x0000005e __vector_9 + .text.__vector_3 + 0x000000e8 0x124 main.o + 0x000000e8 __vector_3 + .text.main 0x0000020c 0x15c main.o + 0x0000020c main + .text._Z6myrandv + 0x00000368 0x4 main.o + 0x00000368 myrand() + .text._Z7inrangeiii + 0x0000036c 0x28 draw.o + 0x0000036c inrange(int, int, int) + .text._Z8clrvoxeliii + 0x00000394 0x4c draw.o + 0x00000394 clrvoxel(int, int, int) + .text._Z8setvoxeliii + 0x000003e0 0x4a draw.o + 0x000003e0 setvoxel(int, int, int) + .text._Z8getvoxeliii + 0x0000042a 0x44 draw.o + 0x0000042a getvoxel(int, int, int) + .text._Z10altervoxeliiii + 0x0000046e 0xe draw.o + 0x0000046e altervoxel(int, int, int, int) + .text._Z4fillh + 0x0000047c 0x3a draw.o + 0x0000047c fill(unsigned char) + .text._Z8delay_msj + 0x000004b6 0x1e draw.o + 0x000004b6 delay_ms(unsigned int) + .text._Z5shiftci + 0x000004d4 0x15e draw.o + 0x000004d4 shift(char, int) + .text._Z18effect_wormsqueezeiiiii + 0x00000632 0x1a6 effect.o + 0x00000632 effect_wormsqueeze(int, int, int, int, int) + .text._Z11effect_raini + 0x000007d8 0x8c effect.o + 0x000007d8 effect_rain(int) + .text._Z11sendvoxel_zhhhi + 0x00000864 0x96 effect.o + 0x00000864 sendvoxel_z(unsigned char, unsigned char, unsigned char, int) + .text._Z19draw_positions_axiscPhi + 0x000008fa 0xd0 effect.o + 0x000008fa draw_positions_axis(char, unsigned char*, int) + .text._Z32effect_boxside_randsend_parallelciii + 0x000009ca 0x16c effect.o + 0x000009ca effect_boxside_randsend_parallel(char, int, int, int) + .text._Z20effect_z_updown_movePhS_c + 0x00000b36 0x3c effect.o + 0x00000b36 effect_z_updown_move(unsigned char*, unsigned char*, char) + .text._Z15effect_z_updownii + 0x00000b72 0x156 effect.o + 0x00000b72 effect_z_updown(int, int) + .text._Z20effect_random_fillerii + 0x00000cc8 0xbc effect.o + 0x00000cc8 effect_random_filler(int, int) + .text._Z17sendvoxels_rand_ziii + 0x00000d84 0xda effect.o + 0x00000d84 sendvoxels_rand_z(int, int, int) + .text._Z14effect_blinky2v + 0x00000e5e 0xa6 effect.o + 0x00000e5e effect_blinky2() + .text.libgcc 0x00000f04 0x26 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + 0x00000f04 __divmodhi4 + 0x00000f04 _div + .text.libgcc 0x00000f2a 0x28 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + 0x00000f2a __udivmodhi4 + .text.libgcc 0x00000f52 0x38 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + 0x00000f52 __prologue_saves__ + .text.libgcc 0x00000f8a 0x36 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + 0x00000f8a __epilogue_restores__ + .text.avr-libc + 0x00000fc0 0xb2 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + 0x00001050 rand_r + 0x00001054 rand + 0x0000105c srand + .text.libgcc 0x00001072 0x3e /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + 0x00001072 __mulsi3 + .text.libgcc 0x000010b0 0x36 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + 0x000010b0 __divmodsi4 + .text.libgcc 0x000010e6 0x44 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + 0x000010e6 __udivmodsi4 + 0x0000112a . = ALIGN (0x2) + *(.fini9) + .fini9 0x0000112a 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + 0x0000112a exit + 0x0000112a _exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x0000112a 0x4 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + *(.fini0) + 0x0000112e _etext = . + +.data 0x00800060 0x4 load address 0x0000112e + 0x00800060 PROVIDE (__data_start, .) + *(.data) + .data 0x00800060 0x4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + *(.data*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.d*) + 0x00800064 . = ALIGN (0x2) + 0x00800064 _edata = . + 0x00800064 PROVIDE (__data_end, .) + +.bss 0x00800064 0x88 + 0x00800064 PROVIDE (__bss_start, .) + *(.bss) + .bss 0x00800064 0x88 main.o + 0x00800064 cube + 0x008000a4 in_wait + 0x008000a5 fb + 0x008000e5 timer0_millis + 0x008000e9 current_layer + 0x008000ea pgm_mode + *(.bss*) + *(COMMON) + 0x008000ec PROVIDE (__bss_end, .) + 0x0000112e __data_load_start = LOADADDR (.data) + 0x00001132 __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x008000ec 0x0 + 0x008000ec PROVIDE (__noinit_start, .) + *(.noinit*) + 0x008000ec PROVIDE (__noinit_end, .) + 0x008000ec _end = . + 0x008000ec PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.stab 0x00000000 0x4284 + *(.stab) + .stab 0x00000000 0x6b4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + .stab 0x000006b4 0x948 main.o + 0xa2c (size before relaxing) + .stab 0x00000ffc 0x9c0 draw.o + 0x16ec (size before relaxing) + .stab 0x000019bc 0xf24 effect.o + 0x1d64 (size before relaxing) + .stab 0x000028e0 0x54 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + 0x60 (size before relaxing) + .stab 0x00002934 0x21c /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + 0x228 (size before relaxing) + .stab 0x00002b50 0xfc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + 0x108 (size before relaxing) + .stab 0x00002c4c 0x1d4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + 0x1e0 (size before relaxing) + .stab 0x00002e20 0x78 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + 0x84 (size before relaxing) + .stab 0x00002e98 0x4bc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + 0x4c8 (size before relaxing) + .stab 0x00003354 0x78 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + 0x84 (size before relaxing) + .stab 0x000033cc 0xe4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + 0xf0 (size before relaxing) + .stab 0x000034b0 0x54 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + 0x60 (size before relaxing) + .stab 0x00003504 0xfc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + 0x108 (size before relaxing) + .stab 0x00003600 0x84 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + 0x90 (size before relaxing) + .stab 0x00003684 0x84 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + 0x90 (size before relaxing) + .stab 0x00003708 0xfc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + 0x108 (size before relaxing) + .stab 0x00003804 0x90 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + 0x9c (size before relaxing) + .stab 0x00003894 0x1ec /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + 0x1f8 (size before relaxing) + .stab 0x00003a80 0x4d4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + 0x4e0 (size before relaxing) + .stab 0x00003f54 0x330 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + 0x33c (size before relaxing) + +.stabstr 0x00000000 0x1cbd + *(.stabstr) + .stabstr 0x00000000 0x1cbd /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment + *(.comment) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges + *(.debug_aranges) + +.debug_pubnames + *(.debug_pubnames) + +.debug_info + *(.debug_info) + *(.gnu.linkonce.wi.*) + +.debug_abbrev + *(.debug_abbrev) + +.debug_line + *(.debug_line) + +.debug_frame + *(.debug_frame) + +.debug_str + *(.debug_str) + +.debug_loc + *(.debug_loc) + +.debug_macinfo + *(.debug_macinfo) +OUTPUT(ledcube.elf elf32-avr) +LOAD linker stubs diff --git a/avr-test/ledcube.srec b/avr-test/ledcube.srec new file mode 100755 index 0000000..5e86a2f --- /dev/null +++ b/avr-test/ledcube.srec @@ -0,0 +1,278 @@ +S00F00006C6564637562652E7372656341 +S113000012C02CC02BC070C029C028C027C026C075 +S113001025C025C023C022C021C020C01FC01EC0CF +S11300201DC01CC01BC011241FBECFE5D4E0DEBF21 +S1130030CDBF10E0A4E6B0E001C01D92AC3EB10714 +S1130040E1F710E0A0E6B0E0EEE2F1E102C00590D5 +S11300500D92A436B107D9F7D9D067C8D1CF1F9272 +S11300600F920FB60F921124EF92FF920F931F93EA +S11300702F933F934F935F938F939F93E090E5006B +S1130080F090E6000091E7001091E800A8019701C4 +S11300902E5F3F4F4F4F5F4F9091EB00892F8A5F48 +S11300A08093EB008D3748F097579093EB00A801AD +S11300B097012D5F3F4F4F4F5F4F2093E5003093E3 +S11300C0E6004093E7005093E8009F918F915F9181 +S11300D04F913F912F911F910F91FF90EF900F90AF +S11300E00FBE0F901F9018951F920F920FB60F928C +S11300F011242F933F934F935F936F938F939F9309 +S1130100AF93BF93EF93FF9385B3877D85BB6091D6 +S1130110E90057E0A62FB0E0E52FF0E033E0EE0F62 +S1130120FF1F3A95E1F7EA0FFB1FEC59FF4F40819F +S1130130AC9888B3942F91708E7F982B98BBAC9A0F +S1130140AC9838B3842F90E095958795282F21702B +S11301503E7F232B28BBAC9AAC9838B395958795F2 +S1130160282F21703E7F232B28BBAC9AAC9838B340 +S113017095958795282F21703E7F232B28BBAC9A19 +S1130180AC9838B395958795282F21703E7F232B03 +S113019028BBAC9AAC9838B395958795282F2170D5 +S11301A03E7F232B28BBAC9AAC9828B395958795B2 +S11301B081702E7F822B88BBAC9AAC9888B3441F85 +S11301C04427441F8E7F482B48BBAC9A515008F0FB +S11301D0A3CF85B3962F9862887F982B95BB962FD3 +S11301E09F5F983008F090E09093E900FF91EF91C1 +S11301F0BF91AF919F918F916F915F914F913F917B +S11302002F910F900FBE0F901F901895EF92FF92B1 +S11302100F931F9312BE83B7836083BF89B7816036 +S113022089BF8BE083BD85B5856085BD85B5886054 +S113023085BD14BC89B7806889BF12BA18BA15BACB +S11302408FEF81BB87BB84BB789420E0EE24E394DA +S1130250FF24FA9414C080E090E0422F50E0FC01A7 +S113026063E0EE0FFF1F6A95E1F7E40FF51FEC5909 +S1130270FF4FF08201968830910589F72F5F28306F +S113028050F3E092A4002091E5003091E600409103 +S1130290E7005091E8008091E5009091E600A0917C +S11302A0E700B091E800821B930BA40BB50B885EAA +S11302B09340A040B04078F31092A40084E190E011 +S11302C06CED70E040ED57E05DD584E690E084D2BB +S11302D085E090E061E070E0F7D484E190E068EEBE +S11302E073E047D482E090E06AE770E04FEF5FEF9D +S11302F024E630E008EE13E09CD1B1D510E088E7A5 +S113030060E070E046E950E021E030E05ED388E749 +S113031061E070E046E950E021E030E056D389E73F +S113032060E070E046E950E021E030E04ED389E738 +S113033061E070E046E950E021E030E046D38AE72E +S113034060E070E046E950E021E030E03ED38AE727 +S113035061E070E046E950E021E030E036D31F5F11 +S11303601A3069F620E077CF75D60895089778F4A7 +S113037077FD0DC06830710554F457FD08C090E056 +S1130380483051050CF091E081E0982701C090E0DD +S1130390892F0895FF920F931F93CF93DF93F82E25 +S11303A08B01EA01E3DF8823A9F0FE0193E0EE0F5D +S11303B0FF1F9A95E1F7E00FF11FEC59FF4F2081E1 +S11303C081E090E002C0880F991FFA94E2F78095CB +S11303D082238083DF91CF911F910F91FF90089525 +S11303E0FF920F931F93CF93DF93F82E8B01EA01B3 +S11303F0BDDF8823A1F0FE0133E0EE0FFF1F3A9525 +S1130400E1F7E00FF11FEC59FF4F208181E090E00C +S113041002C0880F991FFA94E2F7282B2083DF91FA +S1130420CF911F910F91FF900895FF920F931F9307 +S1130430CF93DF93F82E8B01EA0198DF882389F0AC +S113044043E0CC0FDD1F4A95E1F7C00FD11FCC5913 +S1130450DF4F888190E002C095958795FA94E2F782 +S11304608170DF91CF911F910F91FF9008952130FA +S1130470310511F4B5DF08958DDF089540E050E0B3 +S113048010C0FB01E20FF31FEC59FF4F80832F5F75 +S11304903F4F28303105A9F74F5F5F4F4830510572 +S11304A049F020E030E0BA01E3E0660F771FEA95F7 +S11304B0E1F7E7CF08950BC020E000000000000042 +S11304C00000000000002F5F2A35B9F7019700975C +S11304D099F708952F923F924F925F926F927F9275 +S11304E09F92AF92BF92CF92DF92EF92FF920F93BF +S11304F01F93CF93DF93982E5B01CC24DD2447E038 +S1130500242E312C8FEFA8168FEFB80611F4760144 +S113051003C07101EC18FD0800E010E02701089405 +S11305204108510837010894611C711C36C08FEFD3 +S1130530A8168FEFB80611F4C30101C0C201AC01C3 +S11305408AE7981641F4C801BE016FDF282FC8015D +S1130550BE01A70117C089E7981649F4C801BA017A +S1130560AE0163DF282FC801B701AE010BC088E7D5 +S1130570981651F4CA01BE01A80157DF282FC701FC +S1130580BE01A80130E073DF2196C830D10579F6A9 +S11305900F5F1F4F0830110519F0C0E0D0E0C7CF3E +S11305A00894C11CD11C88E0C816D10409F0AACF54 +S11305B08FEFA8168FEFB80619F0EE24FF2403C0BE +S11305C037E0E32EF12C00E010E01EC08AE7981615 +S11305D021F4C801BE01A7010DC089E7981621F4D2 +S11305E0C801B701AE0106C088E7981621F4C70117 +S11305F0BE01A801CFDE2196C830D10539F70F5FBF +S11306001F4F0830110519F0C0E0D0E0DFCFDF91B3 +S1130610CF911F910F91FF90EF90DF90CF90BF90FB +S1130620AF909F907F906F905F904F903F902F90EE +S113063008952F923F924F925F926F927F928F9282 +S11306409F92AF92BF92CF92DF92EF92FF920F935D +S11306501F93DF93CF93CDB7DEB72E970FB6F894E1 +S1130660DEBF0FBECDBF9A8389837C836B835E8399 +S11306704D8338872F831A8709874F5F5F4F21F493 +S113068097E0292E312C02C02224332489E0682EDD +S1130690712C89819A81681A790A66DEB30132D491 +S11306A06C0162DEB3012ED47C014424552475C050 +S11306B05BDE8C0159DE9C01C80163E070E022D44A +S11306C001978C0D9D1D9E878D87181619061CF4A5 +S11306D08615970514F0DE86CD86C90163E070E0C7 +S11306E011D48C01015010400E0D1F1D101611065F +S11306F01CF4061517050CF087018B816D817E8132 +S1130700E9DE8D849E84AA24BB2430C0EB81FC8165 +S1130710EA37F10521F4C401B601A10115C08B81AA +S11307209C818937910521F4C401B101A6010CC053 +S1130730EB81FC81E837F10541F44D855E854E0D72 +S11307405F1DC1016B857C854BDE0894E11CF11CA7 +S11307500894C11CD11C89819A81E816F906B4F267 +S11307600894A11CB11C0894811C911CE981FA8194 +S1130770AE16BF064CF46801EE24FF24C501800FB9 +S1130780911F9C878B87E7CF89859A8594DE08948F +S1130790411C511CCD84DE847801EF81F8854E160E +S11307A05F060CF485CF2E960FB6F894DEBF0FBE0D +S11307B0CDBFCF91DF911F910F91FF90EF90DF900C +S11307C0CF90BF90AF909F908F907F906F905F90ED +S11307D04F903F902F900895AF92BF92CF92DF92A7 +S11307E0EF92FF920F931F93CF93DF935C01CC247E +S11307F0DD242AC0B9DD64E070E084D3EC01EE248A +S1130800FF2415C0B1DD8C01AFDD9C01C80168E097 +S113081070E078D3FC01C90168E070E073D3BC01D7 +S1130820CF0147E050E0DCDD0894E11CF11CEC163C +S1130830FD0644F388EE93E03EDE8AE76FEF7FEF38 +S113084049DE0894C11CD11CCA14DB049CF2DF915C +S1130850CF911F910F91FF90EF90DF90CF90BF90B9 +S1130860AF9008957F928F929F92AF92BF92CF9252 +S1130870DF92EF92FF920F931F93CF93DF93E82EB3 +S1130880F62E742E6901C0E0D0E0F7E08F2E912C93 +S1130890E8E0AE2EB12C87E0781661F484010C1BDD +S11308A01D0BA5014C1B5D0B8E2D90E06F2D70E090 +S11308B071DD09C0AE01415050408E2D90E06F2D86 +S11308C070E068DD8E018E2D90E06F2D70E0A80140 +S11308D087DDC601F0DD2196C830D105E1F6DF9150 +S11308E0CF911F910F91FF90EF90DF90CF90BF9029 +S11308F0AF909F908F907F9008954F925F926F92E8 +S11309007F929F92AF92BF92CF92DF92EF92FF922B +S11309100F931F93CF93DF93982E162F072F3A012F +S113092080E0ACDD212F302FC9016C01C0E0D0E0A4 +S113093057E0452E512C34C06114710431F0F50197 +S11309408081A201481B510904C0F7018081482F0E +S113095050E0FAE79F1619F4CE01B8010DC089E7FB +S1130960981621F4CE01BA01A80106C098E7991699 +S113097021F4CA01B801AE0133DD0F5F1F4F0894A3 +S1130980A11CB11C0894E11CF11C08301105A1F64E +S11309902196E8E0F0E0CE0EDF1EC830D10529F044 +S11309A05601760100E010E0C7CFDF91CF911F918F +S11309B00F91FF90EF90DF90CF90BF90AF909F90FA +S11309C07F906F905F904F9008952F923F924F9237 +S11309D05F926F927F928F929F92AF92BF92CF92CB +S11309E0DF92EF92FF920F931F93DF93CF93CDB7D4 +S11309F0DEB7C158D0400FB6F894DEBF0FBECDBFEE +S1130A00CF57DF4F8883C158D0402B013A014901A9 +S1130A1071E4A72EB12CAC0EBD1EF50161E8C62E03 +S1130A20D12CCC0EDD1E1192EC15FD05E1F700E092 +S1130A3010E01E010894211C311C81E088169104E9 +S1130A40B9F412C091DC60E470E05CD2E1E4F0E05F +S1130A50EC0FFD1FE80FF91F8081882399F70F5FC2 +S1130A601F4F91E0908316C0003411055CF312C04F +S1130A7082E08816910471F4003411055CF4E1E419 +S1130A80F0E0EC0FFD1FE00FF11F80818F5F80838A +S1130A900F5F1F4FF501EE24FF249081892F8150B1 +S1130AA0863010F49F5F90838081873019F4089416 +S1130AB0E11CF11C3196EC15FD0579F7D101F50126 +S1130AC080814114510419F097E0981B892F8C936D +S1130AD031961196EC15FD0599F7C301ECDCCF575F +S1130AE0DF4F8881C158D040B10140E050E005DFBC +S1130AF082B394E0892782BB80E4E816F10409F00C +S1130B009CCFCF57DF4F0FB6F894DEBF0FBECDBFDB +S1130B10CF91DF911F910F91FF90EF90DF90CF90D5 +S1130B20BF90AF909F908F907F906F905F904F9009 +S1130B303F902F900895AC01DC01FB0120E030E0F0 +S1130B409C918081981710F49F5F9C939C91808165 +S1130B50891710F491509C932F5F3F4F1196319653 +S1130B602034310569F78AE7BA0140E050E0C5DE78 +S1130B7008952F923F924F925F926F927F928F923D +S1130B809F92AF92BF92CF92DF92EF92FF920F9318 +S1130B901F93DF93CF93CDB7DEB7C058D0400FB6C5 +S1130BA0F894DEBF0FBECDBF2C017B0100E010E046 +S1130BB05E010894A11CB11C24E0922E91E4C92E7C +S1130BC0D12CCC0EDD1EF501E00FF11F9082CCDBA1 +S1130BD0F601E00FF11F68E070E094D180830F5FAD +S1130BE01F4F0034110579F700E010E081E4A82ECE +S1130BF0B12CAC0EBD1E6E010894C11CD11C370172 +S1130C00C601B5014AE797DFC30155DC0F5F1F4FEB +S1130C1008301105A9F75701AA0CBB1CAA0CBB1C70 +S1130C20CC24DD24A1E48A2E912C8C0E9D1E1E0161 +S1130C300894211C311C2BC000E010E0C101B40158 +S1130C404AE779DFC30137DC0F5F1F4F0830110516 +S1130C50A9F7C50130DCEE24FF2486DB8C0184DB9C +S1130C609C01C80160E470E04DD1F401E80FF91F64 +S1130C70C90168E070E046D180830894E11CF11C4E +S1130C8080E2E816F10449F70894C11CD11CC4148D +S1130C90D50494F2C058DF4F0FB6F894DEBF0FBEF0 +S1130CA0CDBFCF91DF911F910F91FF90EF90DF9017 +S1130CB0CF90BF90AF909F908F907F906F905F90F8 +S1130CC04F903F902F9008958F929F92AF92BF9232 +S1130CD0CF92DF92EF92FF920F931F93CF93DF9304 +S1130CE04C018B016130710511F480E001C08FEF7C +S1130CF0C5DBC0E0D0E038DB68E070E003D1B82E9B +S1130D00A92E32DB68E070E0FDD0D82EC92E2CDB92 +S1130D1068E070E0F7D0F82EE92E0115110551F4C2 +S1130D208B2D9A2D6D2D7C2D4F2D5E2D7EDB8130EC +S1130D3011F70CC001301105F1F68B2D9A2D6D2D94 +S1130D407C2D4F2D5E2D71DB8823A9F68B2D9A2DDA +S1130D506D2D7C2D4F2D5E2D980189DBC401ABDBFD +S1130D60219681E0CF3FD80731F6DF91CF911F91D3 +S1130D700F91FF90EF90DF90CF90BF90AF909F9036 +S1130D808F9008956F927F928F929F92AF92BF92AD +S1130D90DF92EF92FF920F931F93CF93DF933C0167 +S1130DA05B014A0180E06ADB00E010E01CC0DCDA91 +S1130DB062E070E0A7D0AC0133E0440F551F3A95D0 +S1130DC0E1F7481B590BC801BE010ADB2196C83064 +S1130DD0D10569F70F5F1F4F0830110521F4DD2499 +S1130DE0EE24FF2429C0C0E0D0E0E1CFBDDAEC015D +S1130DF0BBDA68E070E086D0082F8E15E1F0CE01F2 +S1130E0068E070E07FD0182F8D15A9F090E0602F76 +S1130E1070E040E050E009DB882321F0812F602F4F +S1130E2040E003C0812F602F47E095011BDDC40122 +S1130E3042DBD12EE02EF3948F2D90E0861597059A +S1130E40ACF2DF91CF911F910F91FF90EF90DF9063 +S1130E50BF90AF909F908F907F906F900895EF9286 +S1130E60FF920F931F93CF93DF9380E007DB00E0A3 +S1130E7010E04FEEE42E42E0F42E3AC080E0FEDAB9 +S1130E80CE0119DB8FEFFADA84E690E014DBCE01B1 +S1130E9066EF7FEF37D088EE93E034D06F50704028 +S1130EA0C60FD71F1C161D064CF388EE93E003DB18 +S1130EB0CEEED2E080E0E2DAC7018C1B9D0BFBDAB8 +S1130EC08FEFDCDA84E690E0F6DACE0166EF7FEFAE +S1130ED019D088EE93E016D06F507040C60FD71F1C +S1130EE01C161D063CF30F5F1F4F0230110519F04D +S1130EF0CEEED2E0C3CFDF91CF911F910F91FF903F +S1130F00EF90089597FB092E07260AD077FD04D0A9 +S1130F100CD006D000201AF4709561957F4F089587 +S1130F20F6F7909581959F4F0895AA1BBB1B51E13D +S1130F3007C0AA1FBB1FA617B70710F0A61BB70B45 +S1130F40881F991F5A95A9F780959095BC01CD01EA +S1130F5008952F923F924F925F926F927F928F9259 +S1130F609F92AF92BF92CF92DF92EF92FF920F9334 +S1130F701F93CF93DF93CDB7DEB7CA1BDB0B0FB63E +S1130F80F894DEBF0FBECDBF09942A8839884888FB +S1130F905F846E847D848C849B84AA84B984C88491 +S1130FA0DF80EE80FD800C811B81AA81B981CE0F88 +S1130FB0D11D0FB6F894DEBF0FBECDBFED0108956D +S1130FC0A0E0B0E0E5EEF7E0CCCFEC01A880B9807A +S1130FD0CA80DB80A114B104C104D10441F484E2C9 +S1130FE0A82E89EDB82E8BE5C82E87E0D82EC60131 +S1130FF0B5012DE133EF41E050E05AD027EA31E466 +S113100040E050E036D07B018C01C601B5012DE1F2 +S113101033EF41E050E04CD0CA01B9012CEE34EF7B +S11310204FEF5FEF26D06E0D7F1D801F911F97FF3E +S113103004C06150704080409048688379838A83FB +S11310409B839B013F77C901CDB7DEB7EAE0A5CF0B +S1131050B7DF089580E690E0B3DF0895A0E0B0E044 +S11310608093600090936100A0936200B09363004A +S11310700895629FD001739FF001829FE00DF11DDE +S1131080649FE00DF11D929FF00D839FF00D749FFE +S1131090F00D659FF00D9927729FB00DE11DF91FAA +S11310A0639FB00DE11DF91FBD01CF011124089507 +S11310B097FB092E05260ED057FD04D014D00AD074 +S11310C0001C38F450954095309521953F4F4F4F73 +S11310D05F4F0895F6F790958095709561957F4FD1 +S11310E08F4F9F4F0895A1E21A2EAA1BBB1BFD012F +S11310F00DC0AA1FBB1FEE1FFF1FA217B307E407F3 +S1131100F50720F0A21BB30BE40BF50B661F771F4A +S1131110881F991F1A9469F760957095809590952A +S11111209B01AC01BD01CF010895F894FFCFEF +S107112E01000000B8 +S9030000FC diff --git a/avr-test/ledcube_eeprom.bin b/avr-test/ledcube_eeprom.bin new file mode 100755 index 0000000..e69de29 diff --git a/avr-test/ledcube_eeprom.hex b/avr-test/ledcube_eeprom.hex new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/avr-test/ledcube_eeprom.hex @@ -0,0 +1 @@ +:00000001FF diff --git a/avr-test/ledcube_eeprom.srec b/avr-test/ledcube_eeprom.srec new file mode 100755 index 0000000..e2abc36 --- /dev/null +++ b/avr-test/ledcube_eeprom.srec @@ -0,0 +1,2 @@ +S01600006C6564637562655F656570726F6D2E7372656353 +S9030000FC diff --git a/avr-test/mc b/avr-test/mc new file mode 120000 index 0000000..a573d03 --- /dev/null +++ b/avr-test/mc @@ -0,0 +1 @@ +/home/calendros/downloads/shelve/datasheet/2011/mc \ No newline at end of file diff --git a/avr-test/src/cube.h b/avr-test/src/cube.h new file mode 100644 index 0000000..01f19da --- /dev/null +++ b/avr-test/src/cube.h @@ -0,0 +1,32 @@ +#ifndef CUBE_H +#define CUBE_H + +// Some of the functions are created to be portable +// These functions will work on cubes of different sizes by +// changing this constant +#define CUBE_SIZE 8 +#define CUBE_BYTES 64 + +// If you change this to anything greather than 8, you also have +// change how the cube buffer works and probably all the functions +// in draw.c + +// Cube buffer +// Data from this array is loaded onto the cube for each duty cycle +extern volatile unsigned char cube[CUBE_SIZE][CUBE_SIZE]; + +// Framebuffer +// Animations that take a lot of time to compute are temporarily +// stored to this array, then loaded into cube[8][8] when the image +// is ready to be displayed +extern volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; + +// Some effects can render on different axis +// for example send pixels along an axis +// for better readability, we use the following predefined constants +#define AXIS_X 0x78 +#define AXIS_Y 0x79 +#define AXIS_Z 0x7a + +#endif + diff --git a/avr-test/src/draw.cpp b/avr-test/src/draw.cpp new file mode 100644 index 0000000..faaa346 --- /dev/null +++ b/avr-test/src/draw.cpp @@ -0,0 +1,559 @@ +#include "draw.h" +#include "string.h" + +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] |= (1 << x); +} + +// Set a single voxel in the temporary cube buffer to ON +void tmpsetvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[z][y] |= (1 << x); +} + +// Set a single voxel to OFF +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] &= ~(1 << x); +} + +// Set a single voxel to OFF +void tmpclrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[z][y] &= ~(1 << x); +} + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[z][y] & (1 << x)) + { + return 1; + } else + { + return 0; + } + } else + { + return 0; + } +} + +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[z][y] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +// This is usefull for functions that uses for loops, +// to avoid infinite loops +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z=0 && z=0 && x=0 && x=0 && y=0 && y> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +// Draw a line between any coordinates in 3d space. +// Uses integer values for input, so dont expect smooth animations. +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + // For each step of x, y increments by: + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + +// Copies the contents of fb (temp cube buffer) into the rendering buffer +void tmp2cube (void) +{ + memcpy((void*)cube, (const void*)fb, 64); // copy the current cube into a buffer. +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < CUBE_SIZE; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + +// Flip the cube 180 degrees along the y axis. +void mirror_y (void) +{ + unsigned char buffer[CUBE_SIZE][CUBE_SIZE]; + unsigned char x,y,z; + + memcpy(buffer, (const void*)cube, CUBE_BYTES); // copy the current cube into a buffer. + + fill(0x00); + for (z=0; z +#include + +#include "cube.h" + +extern const unsigned char font[480]; + +// Red led on D2 +#define LED_RED 0x04 +// Green led D3 +#define LED_GREEN 0x08 +// Program led on D4 +#define LED_PGM 0x10; +// Leds connected to port D +#define LED_PORT PORTD +// Programming button on D5 +#define PGM_BTN 0x20 + +void delay_ms (uint16_t x); + + +void setvoxel(int x, int y, int z); +void clrvoxel(int x, int y, int z); +void tmpsetvoxel(int x, int y, int z); +void tmpclrvoxel(int x, int y, int z); + +unsigned char inrange(int x, int y, int z); +unsigned char getvoxel(int x, int y, int z); +void flpvoxel(int x, int y, int z); + +void altervoxel(int x, int y, int z, int state); +void setplane_z(int z); +void clrplane_z(int z); +void setplane_x(int x); +void clrplane_x(int x); +void setplane_y(int y); +void clrplane_y(int y); + +void setplane (char axis, unsigned char i); +void clrplane (char axis, unsigned char i); + +void setline_z(int x, int y, int z1, int z2); +void setline_x(int z, int y, int x1, int x2); +void setline_y(int z, int x, int y1, int y2); +void clrline_z(int x, int y, int z1, int z2); +void clrline_x(int z, int y, int x1, int x2); +void clrline_y(int z, int x, int y1, int y2); +void fill(unsigned char pattern); +void tmpfill(unsigned char pattern); +void line(int x1, int y1, int z1, int x2, int y2, int z2); +void drawchar(char chr, int offset, int layer); +char flipbyte(char byte); +void charfly (char chr, int direction, char axis, int mode, uint16_t delay); +void strfly (char * str, int direction, char axis, int mode, uint16_t delay, uint16_t pause); +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2); +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2); +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2); +char byteline (int start, int end); + +void tmp2cube (void); +void shift (char axis, int direction); + +void mirror_x(void); +void mirror_y(void); +void mirror_z(void); + +#endif + diff --git a/avr-test/src/effect.cpp b/avr-test/src/effect.cpp new file mode 100644 index 0000000..1f47155 --- /dev/null +++ b/avr-test/src/effect.cpp @@ -0,0 +1,1021 @@ +#include "effect.h" +#include "draw.h" +#include +#include + +//char myrand(); +int myrand(); + +void effect_test (void) +{ + + int x,y,i; + + for (i=0;i<1000;i++) + { + x = sin(i/8)*2+3.5; + y = cos(i/8)*2+3.5; + + setvoxel(x,y,1); + setvoxel(x,y,1); + delay_ms(1000); + fill(0x00); + } + +} + + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay) +{ + int x, i, xyz; + for (x=0;x 7) + xyz = i-8; // at i > 7, i 8-15 becomes xyz 0-7. + + fill(0x00); delay_ms(1); + cli(); // disable interrupts while the cube is being rotated + box_wireframe(0,0,0,xyz,xyz,xyz); + + if (flip > 0) // upside-down + mirror_z(); + + if (rot == 1 || rot == 3) + mirror_y(); + + if (rot == 2 || rot == 3) + mirror_x(); + + sei(); // enable interrupts + delay_ms(delay); + fill(0x00); + } + } +} + +// Creates a wireframe box that shrinks or grows out from the center of the cube. +void effect_box_woopwoop (int delay, int grow) +{ + int i,ii; + + fill(0x00); + for (i=0;i<4;i++) + { + ii = i; + if (grow > 0) + ii = 3-i; + + box_wireframe(4+ii,4+ii,4+ii,3-ii,3-ii,3-ii); + delay_ms(delay); + fill(0x00); + } +} + + +// Send a voxel flying from one side of the cube to the other +// If its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + } else + { + ii = i; + clrvoxel(x,y,ii-1); + } + setvoxel(x,y,ii); + delay_ms(delay); + } +} + +// Send all the voxels from one side of the cube to the other +// Start at z and send to the opposite side. +// Sends in random order. +void sendplane_rand_z (unsigned char z, int delay, int wait) +{ + unsigned char loop = 16; + unsigned char x, y; + + fill(0x00); + + setplane_z(z); + + // Send voxels at random untill all 16 have crossed the cube. + while(loop) + { + x = myrand()%4; + y = myrand()%4; + if (getvoxel(x,y,z)) + { + // Send the voxel flying + sendvoxel_z(x,y,z,delay); + delay_ms(wait); + loop--; // one down, loop-- to go. when this hits 0, the loop exits. + } + } +} + +// For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 +// for n iterations, a random voxel is sent to the opposite side of where it was. +void sendvoxels_rand_z (int iterations, int delay, int wait) +{ + unsigned char x, y, last_x = 0, last_y = 0, i; + + fill(0x00); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + // Then set a voxel either at the top or at the bottom + // myrand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. + setvoxel(x,y,((myrand()%2)*7)); + } + } + + for (i=0;i=0;i--) + { + snake[i][0] = snake[i-1][0]; + snake[i][1] = snake[i-1][1]; + snake[i][2] = snake[i-1][2]; + } + snake[0][0] = x; + snake[0][1] = y; + snake[0][2] = z; + + for (i=0;i<8;i++) + { + setvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + delay_ms(delay); + for (i=0;i<8;i++) + { + clrvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + } + + + iterations--; + } +} + +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = myrand()%8; + y = myrand()%8; + z = myrand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;iidestinations[px]) + { + positions[px]--; + } + } + + draw_positions_axis (AXIS_Z, positions,0); +} + +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert) +{ + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,px; + + // Set 64 random positions + for (i=0; i<64; i++) + { + positions[i] = 0; // Set all starting positions to 0 + destinations[i] = myrand()%8; + } + + // Loop 8 times to allow destination 7 to reach all the way + for (i=0; i<8; i++) + { + // For every iteration, move all position one step closer to their destination + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = myrand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + LED_PORT ^= LED_RED; + } + +} + + + + +// Light all leds layer by layer, +// then unset layer by layer +void effect_loadbar(int delay) +{ + fill(0x00); + + int z,y; + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0xff; + + delay_ms(delay); + } + + delay_ms(delay*3); + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0x00; + + delay_ms(delay); + } +} + + +// Set n number of voxels at random positions +void effect_random_sparkle_flash (int iterations, int voxels, int delay) +{ + int i; + int v; + for (i = 0; i < iterations; i++) + { + for (v=0;v<=voxels;v++) + setvoxel(myrand()%8,myrand()%8,myrand()%8); + + delay_ms(delay); + fill(0x00); + } +} + +// blink 1 random voxel, blink 2 random voxels..... blink 20 random voxels +// and back to 1 again. +void effect_random_sparkle (void) +{ + int i; + + for (i=1;i<20;i++) + { + effect_random_sparkle_flash(5,i,200); + } + + for (i=20;i>=1;i--) + { + effect_random_sparkle_flash(5,i,200); + } + +} + +int effect_telcstairs_do(int x, int val, int delay) +{ + int y,z; + + for(y = 0, z = x; y <= z; y++, x--) + { + if(x < CUBE_SIZE && y < CUBE_SIZE) + { + cube[x][y] = val; + } + } + delay_ms(delay); + return z; +} + +void effect_telcstairs (int invert, int delay, int val) +{ + int x; + + if(invert) + { + for(x = CUBE_SIZE*2; x >= 0; x--) + { + x = effect_telcstairs_do(x,val,delay); + } + } + else + { + for(x = 0; x < CUBE_SIZE*2; x++) + { + x = effect_telcstairs_do(x,val,delay); + } + } +} + +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) +{ + int x, y, i,j,k, dx, dy; + int cube_size; + int origin = 0; + + if (direction == -1) + origin = 7; + + cube_size = 8-(size-1); + + x = myrand()%cube_size; + y = myrand()%cube_size; + + for (i=0; i 0 && (x+dx) < cube_size) + x += dx; + + if ((y+dy) > 0 && (y+dy) < cube_size) + y += dy; + + shift(axis, direction); + + + for (j=0; j=1;i--) + { + for (z=0;z<8;z++) + { + + state = getvoxel(((path[(i-1)]>>4) & 0x0f), (path[(i-1)] & 0x0f), z); + altervoxel(((path[i]>>4) & 0x0f), (path[i] & 0x0f), z, state); + } + } + for (i=0;i<8;i++) + clrvoxel(((path[0]>>4) & 0x0f), (path[0] & 0x0f),i); +} + + diff --git a/avr-test/src/effect.h b/avr-test/src/effect.h new file mode 100644 index 0000000..3398082 --- /dev/null +++ b/avr-test/src/effect.h @@ -0,0 +1,54 @@ +#ifndef EFFECT_H +#define EFFECT_H + +#include +#include +#include + +#include "cube.h" + +void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay); + +void effect_hollow_1 (int iterations, uint16_t delay); +void effect_hollow_2 (int iterations, int corner, uint16_t delay); + +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay); +void sendplane_rand_z (unsigned char z, int delay, int wait); +void sendvoxels_rand_z (int iterations, int delay, int wait); +void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode); + +void effect_planboing (int plane, int speed); + +void effect_random_filler (int delay, int state); + +void effect_z_updown (int iterations, int delay); +void effect_rain(int iterations); +void effect_stringfly2(char * str); +void effect_blinky2(void); +void draw_positions_axis (char axis, unsigned char positions[64], int invert); +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert); + +void effect_random_sparkle_flash (int iterations, int voxels, int delay); +void effect_random_sparkle (void); + +void effect_box_woopwoop (int delay, int grow); +void effect_telcstairs (int invert, int delay, int val); +void effect_loadbar(int delay); + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode); +void effect_smileyspin (int count, int delay, char bitmap); +void effect_pathmove (unsigned char *path, int length); +void effect_rand_patharound (int iterations, int delay); +void effect_pathspiral (int iterations, int delay); +void effect_path_text (int delay, char *str); +void effect_path_bitmap (int delay, char bitmap, int iterations); +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay); + +void effect_z_updown (int iterations, int delay); +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis); + + + + +#endif + diff --git a/avr-test/src/fuses.txt b/avr-test/src/fuses.txt new file mode 100644 index 0000000..f24e5f5 --- /dev/null +++ b/avr-test/src/fuses.txt @@ -0,0 +1,6 @@ + +lfuse: 0b11101111 +hfuse: 0b11001001 + + + diff --git a/avr-test/src/lisence.txt b/avr-test/src/lisence.txt new file mode 100644 index 0000000..812dab5 --- /dev/null +++ b/avr-test/src/lisence.txt @@ -0,0 +1,5 @@ +Created by Christian Moen (christian@lynet.no) and Ståle Kristoffersen (staalekb@ifi.uio.no) 2011. + +Lisence: http://creativecommons.org/licenses/by-nc-sa/3.0/ + +Happy hacking!! :D diff --git a/avr-test/src/main.c.old b/avr-test/src/main.c.old new file mode 100644 index 0000000..be31861 --- /dev/null +++ b/avr-test/src/main.c.old @@ -0,0 +1,285 @@ +/* + * Code to controll an 8x8x8 ledcube using avr + * http://www.instructables.com/id/Led-Cube-8x8x8/ + * See lisence.txt for lisence. + */ +#include "main.h" +#include "effect.h" +#include "launch_effect.h" +#include "draw.h" + +// Main loop +// the AVR enters this function at boot time +int main (void) +{ + + // This function initiates IO ports, timers, interrupts and + // serial communications + ioinit(); + + // This variable specifies which layer is currently being drawn by the + // cube interrupt routine. We assign a value to it to make sure it's not >7. + current_layer = 1; + + int i; + + // Boot wait + // This function serves 3 purposes + // 1) We delay starting up any interrupts, as drawing the cube causes a lot + // noise that can confuse the ISP programmer. + // 2) Listen for button press. One button means go into rs232 mode, + // The other means go into autonomous mode and start doing stuff. + // 3) Random seed. The bootwait function counts forever from 0 to 255. + // Whenever you press the button, this counter stops, and the number it + // stopped at is used as a random seed. This ensures true randomness at + // every boot. Without this (or some similar process) the cube would + // produce the same "random" sequence every time + i = bootwait(); + + // Enable interrupts + // This starts the routine that draws the cube content + sei(); + + // Result for bootwait() is 2: + // Go to rs232 mode. this function loops forever. + if (i == 2) + { + rs232(); + } + + // Result of bootwait() is something other than 2: + // Do awesome effects. Loop forever. + while (1) + { + // Show the effects in a predefined order + for (i=0; i> 8; + UBRRL = MYUBRR; + // UCSRC - USART control register + // bit 7-6 sync/ascyn 00 = async, 01 = sync + // bit 5-4 parity 00 = disabled + // bit 3 stop bits 0 = 1 bit 1 = 2 bits + // bit 2-1 frame length 11 = 8 + // bit 0 clock polarity = 0 + UCSRC = 0b10000110; + // Enable RS232, tx and rx + UCSRB = (1< +#include + +#include // rand +} + +//char myrand() +//{ +// static short rand = 0; +// rand=(rand*109+89)%251; +// return rand; +//} + +int myrand() { return rand(); } + +#define CUBE_SIZE 8 + +//#define AXIS_X 1 +//#define AXIS_Y 2 +//#define AXIS_Z 3 + +volatile unsigned char cube[8][8]; +//volatile unsigned char current_layer = 0; +extern volatile unsigned char current_layer; +volatile bool in_wait = false; + +volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; +/***************************************************************************** + * TIME MANAGEMENT + *****************************************************************************/ + +#define F_CPU 8000000UL + +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) +#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) + +// the prescaler is set so that timer0 ticks every 64 clock cycles, and the +// the overflow handler is called every 256 ticks. +#define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(64 * 256)) + +// the whole number of milliseconds per timer0 overflow +#define MILLIS_INC (MICROSECONDS_PER_TIMER0_OVERFLOW / 1000) + +// the fractional number of milliseconds per timer0 overflow. we shift right +// by three to fit these numbers into a byte. (for the clock speeds we care +// about - 8 and 16 MHz - this doesn't lose precision.) +#define FRACT_INC ((MICROSECONDS_PER_TIMER0_OVERFLOW % 1000) >> 3) +#define FRACT_MAX (1000 >> 3) + +//volatile uint32_t timer0_overflow_count = 0; +volatile uint32_t timer0_millis = 0; +//static uint8_t timer0_fract = 0; + + +ISR(TIMER0_OVF_vect) +{ + // copy these to local variables so they can be stored in registers + // (volatile variables must be read from memory on every access) + uint32_t m = timer0_millis; + //uint8_t f = timer0_fract; + static uint8_t timer0_fract = 0; + + m += MILLIS_INC; + //f += FRACT_INC; + timer0_fract += FRACT_INC; + //if (f >= FRACT_MAX) { + if (timer0_fract >= FRACT_MAX) { + //f -= FRACT_MAX; + timer0_fract -= FRACT_MAX; + ++m; + } + + //timer0_fract = f; + timer0_millis = m; + //timer0_overflow_count++; + +//static uint32_t last_time = 0; + //if (timer0_overflow_count & 0x1) + //if (m - last_time >= 5) { + //debounce_keys(); // called nearly each 2ms (0,002048s) + //last_time = m; + //} +} + +/* +inline uint32_t millis() +{ + uint32_t m; + uint8_t oldSREG = SREG; + + // disable interrupts while we read timer0_millis or we might get an + // inconsistent value (e.g. in the middle of a write to timer0_millis) + cli(); + m = timer0_millis; + SREG = oldSREG; + + return m; +} +*/ + +inline uint32_t millis() +{ + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + uint32_t time1 = millis(); + while ((millis()) - time1 < ms); + in_wait = false; +} +//void delay_ms(uint16_t x) +//{ +// in_wait = true; +// uint8_t y, z; +// for ( ; x > 0 ; x--){ +// for ( y = 0 ; y < 90 ; y++){ +// for ( z = 0 ; z < 6 ; z++){ +// asm volatile ("nop"); +// } +// } +// } +// in_wait = false; +//} + + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +//unsigned char inrange(int x, int y, int z) +//{ +// if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) +// { +// return 1; +// } else +// { +// // One of the coordinates was outside the cube. +// return 0; +// } +//} + +//bool get_led(unsigned char x, unsigned char y, unsigned char z) +//{ +// /* +// assert(x >= 0 && x <= 7); +// assert(y >= 0 && y <= 7); +// assert(z >= 0 && z <= 7); +// */ +// +// if (inrange(x, y, z)) { +// return cube[y][z] & (1 << x); +// } +// +// return false; +//} + +//void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +//{ +// +// if (!inrange(x, y, z)) { +// return; +// } +// +// /* +// assert(x >= 0 && x <= 7); +// assert(y >= 0 && y <= 7); +// assert(z >= 0 && z <= 7); +// */ +// +// if (on) { +// cube[y][z] |= ((unsigned char)1) << x; +// } +// else { +// cube[y][z] &= ~(((unsigned char)1) << x); +// } +//} + +void clear_led() +{ + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0; + } + } +} + +/***************************************************************************** + * RENDER + *****************************************************************************/ + +//ISR(TIMER2_COMP_vect) +//{ +// //if (!in_wait) return; +// PORTC &= ~0x28; // layer and latch low +// unsigned char current_layer_ = current_layer; +// +// for (char j = 0; j < 8; ++j) { +// //for (char j = 0; j < 4; ++j) { +// unsigned char val = cube[7-j][current_layer_]; +// //unsigned char val2 = cube[3-j][current_layer_]; +// for (char i = 0; i < 8; ++i/*, val >>= 1*/) { +// PORTC &= ~0x10; +// //PORTD = (PORTD & ~0x80) | ((val2 << (7-i)) & 0x80); +// PORTB = (PORTB & ~0x01) | ((val >> i) & 0x01); +// //PORTB |= 0x01; +// +// //PORTD |= 0x80; +// //PORTD = (PORTD & ~0x40) | (((val << (7-i)) & 0x80) >> 1); +// PORTC |= 0x10; +// } +// } +// +// PORTC = (PORTC & ~0x07) | current_layer_; +// ++current_layer_; +// current_layer = current_layer_ & 0x07; +// +// PORTC |= 0x28; // layer and latch high +//} + +ISR(TIMER2_COMP_vect) +{ + //if (!in_wait) return; + PORTC &= ~0x28; // layer and latch low + unsigned char current_layer_ = current_layer; + + for (unsigned char j = 7; j < 255; --j) { + //for (char j = 0; j < 4; ++j) { + unsigned char val = cube[j][current_layer_]; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val ) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 1) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 2) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 3) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 4) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 5) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 6) & 0x01); + PORTC |= 0x10; + PORTC &= ~0x10; + PORTB = (PORTB & ~0x01) | ((val >> 7) & 0x01); + //PORTD = val; + PORTC |= 0x10; + } + + PORTC = (PORTC & ~0x07) | current_layer_ | 0x28; + ++current_layer_; + if (current_layer_ > 7) current_layer_ = 0; + //current_layer = current_layer_ & 0x07; + current_layer = current_layer_; + + //PORTC |= 0x28; // layer and latch high +} + + + +//void draw_positions_axis (char axis, unsigned char positions[64], int invert) +//{ +// int x, y, p; +// +// //fill(0x00); +// clear_led(); +// +// for (x=0; x<8; x++) +// { +// for (y=0; y<8; y++) +// { +// if (invert) +// { +// p = (7-positions[(x*8)+y]); +// } else +// { +// p = positions[(x*8)+y]; +// } +// +// if (axis == AXIS_Z) +// //setvoxel(x,y,p); +// set_led(x, y, p, true); +// +// if (axis == AXIS_Y) +// //setvoxel(x,p,y); +// set_led(x,p,y, true); +// +// if (axis == AXIS_X) +// set_led(p,y,x, true); +// } +// } +// +//} + + + + +//void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +//{ +// int i; +// int done; +// unsigned char cubepos[64]; +// unsigned char pos[64]; +// int notdone = 1; +// int notdone2 = 1; +// int sent = 0; +// +// for (i=0;i<64;i++) +// { +// pos[i] = 0; +// } +// +// while (notdone) +// { +// if (mode == 1) +// { +// notdone2 = 1; +// while (notdone2 && sent<64) +// { +// i = myrand()%64; +// if (pos[i] == 0) +// { +// sent++; +// pos[i] += 1; +// notdone2 = 0; +// } +// } +// } else if (mode == 2) +// { +// if (sent<64) +// { +// pos[sent] += 1; +// sent++; +// } +// } +// +// done = 0; +// for (i=0;i<64;i++) +// { +// if (pos[i] > 0 && pos[i] <7) +// { +// pos[i] += 1; +// } +// +// if (pos[i] == 7) +// done++; +// } +// +// if (done == 64) +// notdone = 0; +// +// for (i=0;i<64;i++) +// { +// if (origin == 0) +// { +// cubepos[i] = pos[i]; +// } else +// { +// cubepos[i] = (7-pos[i]); +// } +// } +// +// +// delay_ms(delay); +// draw_positions_axis(axis,cubepos,0); +// +// } +// +//} + + + +/***************************************************************************** + * MAIN + *****************************************************************************/ +#include "main.h" +#include "effect.h" +#include "draw.h" + +int main() +{ + /* + * ======================================================================= + * Initialisation + * ======================================================================= + */ + + //*** init time management + TCNT0 = 0; // init timer count to 0 + TCCR0 |= 0x03; // prescaler: 64 + TIMSK |= 0x01; // enable timer 0 overflow interrupt + + // Timer 2 + // Frame buffer interrupt + // 14745600/128/11 = 10472.72 interrupts per second + // 10472.72/8 = 1309 frames per second + OCR2 = 11; // interrupt at counter = 10 + TCCR2 |= (1 << CS20) | (0 << CS21) | (1 << CS22); // Prescaler = 128. + TCCR2 |= (1 << WGM21); // CTC mode. Reset counter when OCR2 is reached. + TCNT2 = 0x00; // initial counter value = 0; + TIMSK |= (1 << OCIE2); // Enable CTC interrupt + + PORTD = 0; + PORTB = 0; + PORTC = 0; + DDRD = 0xff; + DDRB = 0xff; + DDRC = 0xff; + + //*** set interupts + sei(); + + /* + * ======================================================================= + * MAIN LOOP + * ======================================================================= + */ + + for (;;) { + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0xFF; + } + } + //continue; + delay(1000); + + // Show the effects in a predefined order + //for (char i=0; i +#include +#include +#include + +#include "cube.h" + +// Define USART stuff +#define FOSC 14745600 +#define BAUD 38400 +#define MYUBRR (((((FOSC * 10) / (16L * BAUD)) + 5) / 10) - 1) + +#define DATA_BUS PORTA +#define LAYER_SELECT PORTC +#define LATCH_ADDR PORTB +#define LATCH_MASK 0x07 +#define LATCH_MASK_INV 0xf8 +#define OE_PORT PORTB +#define OE_MASK 0x08 + +// Red led on D2 +#define LED_RED 0x04 +// Green led D3 +#define LED_GREEN 0x08 +// Program led on D4 +#define LED_PGM 0x10; +// Leds connected to port D +#define LED_PORT PORTD +// Rs232 button on D5 +#define RS232_BTN 0x20 +// Main button on B4 +#define MAIN_BTN 0x10 + +void ioinit (void); +void bootmsg (void); + +volatile unsigned char current_layer; +volatile unsigned char pgm_mode; +void rs232(void); +unsigned int bootwait (void); +#endif + diff --git a/avr-test/tags b/avr-test/tags new file mode 100644 index 0000000..94663e7 --- /dev/null +++ b/avr-test/tags @@ -0,0 +1,150 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +-mcu Makefile /^ avr-size --mcu=$(MCU_TARGET) -C $(PRG).elf$/;" m +AXIS_X src/cube.h 27;" d +AXIS_Y src/cube.h 28;" d +AXIS_Z src/cube.h 29;" d +BAUD src/main.h 13;" d +CC Makefile /^CC = avr-gcc$/;" m +CUBE_BYTES src/cube.h 8;" d +CUBE_H src/cube.h 2;" d +CUBE_SIZE src/cube.h 7;" d +CUBE_SIZE src/main.cpp 30;" d file: +CXX Makefile /^CXX = avr-g++$/;" m +DATA_BUS src/main.h 16;" d +DEFS Makefile /^DEFS =$/;" m +DFLAGS Makefile /^override LDFLAGS = -Wl,-Map,$(PRG).map --relax$/;" m +EEMEM src/font.cpp /^volatile const unsigned char bitmaps[6][8] EEMEM = {$/;" v +EEMEM src/font.cpp /^volatile const unsigned char font[455] EEMEM = {$/;" v +EXTRA_CLEAN_FILES Makefile /^EXTRA_CLEAN_FILES = *.hex *.bin *.srec$/;" m +FIG2DEV Makefile /^FIG2DEV = fig2dev$/;" m +FLAGS Makefile /^override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) #-fno-exceptions -fno-rtti$/;" m +FOSC src/main.h 12;" d +FRACT_INC src/main.cpp 62;" d file: +FRACT_MAX src/main.cpp 63;" d file: +F_CPU src/main.cpp 46;" d file: +GOL_CREATE_MAX /home/calendros/work/ledcube/avr/src/gameoflife.cpp 9;" d file: +GOL_CREATE_MIN /home/calendros/work/ledcube/avr/src/gameoflife.cpp 8;" d file: +GOL_TERMINATE_CROWDED /home/calendros/work/ledcube/avr/src/gameoflife.cpp 12;" d file: +GOL_TERMINATE_LONELY /home/calendros/work/ledcube/avr/src/gameoflife.cpp 11;" d file: +GOL_WRAP /home/calendros/work/ledcube/avr/src/gameoflife.cpp 18;" d file: +GOL_X /home/calendros/work/ledcube/avr/src/gameoflife.cpp 14;" d file: +GOL_Y /home/calendros/work/ledcube/avr/src/gameoflife.cpp 15;" d file: +GOL_Z /home/calendros/work/ledcube/avr/src/gameoflife.cpp 16;" d file: +ISR src/main.cpp /^ISR(TIMER0_OVF_vect)$/;" f signature:(TIMER0_OVF_vect) +ISR src/main.cpp /^ISR(TIMER2_COMP_vect)$/;" f signature:(TIMER2_COMP_vect) +LATCH_ADDR src/main.h 18;" d +LATCH_MASK src/main.h 19;" d +LATCH_MASK_INV src/main.h 20;" d +LAYER_SELECT src/main.h 17;" d +LED_GREEN src/main.h 27;" d +LED_PGM src/main.h 29;" d +LED_PORT src/main.h 31;" d +LED_RED src/main.h 25;" d +LIBS Makefile /^LIBS =$/;" m +MAIN_BTN src/main.h 35;" d +MAIN_H src/main.h 2;" d +MCU_TARGET Makefile /^MCU_TARGET = atmega8$/;" m +MICROSECONDS_PER_TIMER0_OVERFLOW src/main.cpp 54;" d file: +MILLIS_INC src/main.cpp 57;" d file: +MYUBRR src/main.h 14;" d +OBJ Makefile /^OBJ = main.o draw.o effect.o font.o launch_effect.o$/;" m +OBJCOPY Makefile /^OBJCOPY = avr-objcopy$/;" m +OBJDUMP Makefile /^OBJDUMP = avr-objdump$/;" m +OE_MASK src/main.h 22;" d +OE_PORT src/main.h 21;" d +OPTIMIZE Makefile /^OPTIMIZE = -Os$/;" m +PRG Makefile /^PRG = ledcube$/;" m +PROGMEM src/font.cpp /^const unsigned char paths[44] PROGMEM = {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17,$/;" v +RS232_BTN src/main.h 33;" d +altervoxel src/draw.cpp /^void altervoxel(int x, int y, int z, int state)$/;" f signature:(int x, int y, int z, int state) +argorder src/draw.cpp /^void argorder(int ix1, int ix2, int *ox1, int *ox2)$/;" f signature:(int ix1, int ix2, int *ox1, int *ox2) +boingboing /home/calendros/work/ledcube/avr/src/effect.cpp /^void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode)$/;" f signature:(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode) +bootmsg src/main.h /^void bootmsg (void);$/;" p signature:(void) +bootwait src/main.h /^unsigned int bootwait (void);$/;" p signature:(void) +box_filled src/draw.cpp /^void box_filled(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_walls src/draw.cpp /^void box_walls(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_wireframe src/draw.cpp /^void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +byteline src/draw.cpp /^char byteline (int start, int end)$/;" f signature:(int start, int end) +clear_led src/main.cpp /^void clear_led()$/;" f signature:() +clockCyclesPerMicrosecond src/main.cpp 48;" d file: +clockCyclesToMicroseconds src/main.cpp 49;" d file: +clrplane src/draw.cpp /^void clrplane (char axis, unsigned char i)$/;" f signature:(char axis, unsigned char i) +clrplane_x src/draw.cpp /^void clrplane_x (int x)$/;" f signature:(int x) +clrplane_y src/draw.cpp /^void clrplane_y (int y)$/;" f signature:(int y) +clrplane_z src/draw.cpp /^void clrplane_z (int z)$/;" f signature:(int z) +clrvoxel src/draw.cpp /^void clrvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +cube src/cube.h /^volatile unsigned char cube[CUBE_SIZE][CUBE_SIZE];$/;" v +current_layer src/main.h /^volatile unsigned char current_layer;$/;" v +delay src/main.cpp /^void delay(uint32_t ms)$/;" f signature:(uint32_t ms) +delay_ms src/draw.cpp /^void delay_ms(uint16_t x)$/;" f signature:(uint16_t x) +draw_positions_axis /home/calendros/work/ledcube/avr/src/effect.cpp /^void draw_positions_axis (char axis, unsigned char positions[64], int invert)$/;" f signature:(char axis, unsigned char positions[64], int invert) +effect_axis_updown_randsuspend /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert)$/;" f signature:(char axis, int delay, int sleep, int invert) +effect_blinky2 /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_blinky2()$/;" f signature:() +effect_box_shrink_grow /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay)$/;" f signature:(int iterations, int rot, int flip, uint16_t delay) +effect_box_woopwoop /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_box_woopwoop (int delay, int grow)$/;" f signature:(int delay, int grow) +effect_boxside_randsend_parallel /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode)$/;" f signature:(char axis, int origin, int delay, int mode) +effect_loadbar /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_loadbar(int delay)$/;" f signature:(int delay) +effect_path_bitmap /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_path_bitmap (int delay, char bitmap, int iterations)$/;" f signature:(int delay, char bitmap, int iterations) +effect_path_text /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_path_text (int delay, char *str)$/;" f signature:(int delay, char *str) +effect_pathmove /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_pathmove (unsigned char *path, int length)$/;" f signature:(unsigned char *path, int length) +effect_pathspiral /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_pathspiral (int iterations, int delay)$/;" f signature:(int iterations, int delay) +effect_planboing /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_planboing (int plane, int speed)$/;" f signature:(int plane, int speed) +effect_rain /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_rain (int iterations)$/;" f signature:(int iterations) +effect_rand_patharound /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_rand_patharound (int iterations, int delay)$/;" f signature:(int iterations, int delay) +effect_random_filler /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_random_filler (int delay, int state)$/;" f signature:(int delay, int state) +effect_random_sparkle /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_random_sparkle (void)$/;" f signature:(void) +effect_random_sparkle_flash /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_random_sparkle_flash (int iterations, int voxels, int delay)$/;" f signature:(int iterations, int voxels, int delay) +effect_smileyspin /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_smileyspin (int count, int delay, char bitmap)$/;" f signature:(int count, int delay, char bitmap) +effect_stringfly2 /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_stringfly2(char * str)$/;" f signature:(char * str) +effect_telcstairs /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_telcstairs (int invert, int delay, int val)$/;" f signature:(int invert, int delay, int val) +effect_telcstairs_do /home/calendros/work/ledcube/avr/src/effect.cpp /^int effect_telcstairs_do(int x, int val, int delay)$/;" f signature:(int x, int val, int delay) +effect_test /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_test (void)$/;" f signature:(void) +effect_wormsqueeze /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay)$/;" f signature:(int size, int axis, int direction, int iterations, int delay) +effect_z_updown /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_z_updown (int iterations, int delay)$/;" f signature:(int iterations, int delay) +effect_z_updown_move /home/calendros/work/ledcube/avr/src/effect.cpp /^void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis)$/;" f signature:(unsigned char positions[64], unsigned char destinations[64], char axis) +fb src/cube.h /^volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE];$/;" v +fill src/draw.cpp /^void fill (unsigned char pattern)$/;" f signature:(unsigned char pattern) +flipbyte src/draw.cpp /^char flipbyte (char byte)$/;" f signature:(char byte) +flpvoxel src/draw.cpp /^void flpvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +font_getbitmap src/font.cpp /^void font_getbitmap (char bitmap, unsigned char dst[8])$/;" f signature:(char bitmap, unsigned char dst[8]) +font_getbitmappixel src/font.cpp /^unsigned char font_getbitmappixel ( char bitmap, char x, char y)$/;" f signature:( char bitmap, char x, char y) +font_getchar src/font.cpp /^void font_getchar (char chr, unsigned char dst[5])$/;" f signature:(char chr, unsigned char dst[5]) +font_getpath src/font.cpp /^void font_getpath (unsigned char path, unsigned char *destination, int length)$/;" f signature:(unsigned char path, unsigned char *destination, int length) +getvoxel src/draw.cpp /^unsigned char getvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +gol_count_changes /home/calendros/work/ledcube/avr/src/gameoflife.cpp /^int gol_count_changes (void)$/;" f signature:(void) +gol_count_neighbors /home/calendros/work/ledcube/avr/src/gameoflife.cpp /^unsigned char gol_count_neighbors (int x, int y, int z)$/;" f signature:(int x, int y, int z) +gol_nextgen /home/calendros/work/ledcube/avr/src/gameoflife.cpp /^void gol_nextgen (void)$/;" f signature:(void) +gol_play /home/calendros/work/ledcube/avr/src/gameoflife.cpp /^void gol_play (int iterations, uint16_t delay)$/;" f signature:(int iterations, uint16_t delay) +in_wait src/main.cpp /^volatile bool in_wait = false;$/;" v +inrange src/draw.cpp /^unsigned char inrange(int x, int y, int z)$/;" f signature:(int x, int y, int z) +ioinit src/main.h /^void ioinit (void);$/;" p signature:(void) +launch_effect src/launch_effect.cpp /^void launch_effect (int effect)$/;" f signature:(int effect) +line src/draw.cpp /^void line(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +main src/main.cpp /^int main()$/;" f signature:() +microsecondsToClockCycles src/main.cpp 50;" d file: +millis src/main.cpp /^inline uint32_t millis()$/;" f signature:() +mirror_x src/draw.cpp /^void mirror_x (void)$/;" f signature:(void) +mirror_y src/draw.cpp /^void mirror_y (void)$/;" f signature:(void) +mirror_z src/draw.cpp /^void mirror_z (void)$/;" f signature:(void) +pgm_mode src/main.h /^volatile unsigned char pgm_mode;$/;" v +rand src/main.cpp /^int rand(void);$/;" p file: signature:(void) +rs232 src/main.h /^void rs232(void);$/;" p signature:(void) +sendplane_rand_z /home/calendros/work/ledcube/avr/src/effect.cpp /^void sendplane_rand_z (unsigned char z, int delay, int wait)$/;" f signature:(unsigned char z, int delay, int wait) +sendvoxel_z /home/calendros/work/ledcube/avr/src/effect.cpp /^void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay)$/;" f signature:(unsigned char x, unsigned char y, unsigned char z, int delay) +sendvoxels_rand_z /home/calendros/work/ledcube/avr/src/effect.cpp /^void sendvoxels_rand_z (int iterations, int delay, int wait)$/;" f signature:(int iterations, int delay, int wait) +setplane src/draw.cpp /^void setplane (char axis, unsigned char i)$/;" f signature:(char axis, unsigned char i) +setplane_x src/draw.cpp /^void setplane_x (int x)$/;" f signature:(int x) +setplane_y src/draw.cpp /^void setplane_y (int y)$/;" f signature:(int y) +setplane_z src/draw.cpp /^void setplane_z (int z)$/;" f signature:(int z) +setvoxel src/draw.cpp /^void setvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +shift src/draw.cpp /^void shift (char axis, int direction)$/;" f signature:(char axis, int direction) +timer0_millis src/main.cpp /^volatile uint32_t timer0_millis = 0;$/;" v +tmp2cube src/draw.cpp /^void tmp2cube (void)$/;" f signature:(void) +tmpclrvoxel src/draw.cpp /^void tmpclrvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +tmpfill src/draw.cpp /^void tmpfill (unsigned char pattern)$/;" f signature:(unsigned char pattern) +tmpsetvoxel src/draw.cpp /^void tmpsetvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) diff --git a/avr-test2/Makefile b/avr-test2/Makefile new file mode 100644 index 0000000..82fe716 --- /dev/null +++ b/avr-test2/Makefile @@ -0,0 +1,170 @@ +PRG = ledcube +OBJ = launch_effect.o main.o draw.o effect.o font.o gameoflife.o +#MCU_TARGET = at90s2313 +#MCU_TARGET = at90s2333 +#MCU_TARGET = at90s4414 +#MCU_TARGET = at90s4433 +#MCU_TARGET = at90s4434 +#MCU_TARGET = at90s8515 +#MCU_TARGET = at90s8535 +#MCU_TARGET = atmega128 +#MCU_TARGET = atmega1280 +#MCU_TARGET = atmega1281 +#MCU_TARGET = atmega1284p +#MCU_TARGET = atmega16 +#MCU_TARGET = atmega163 +#MCU_TARGET = atmega164p +#MCU_TARGET = atmega165 +#MCU_TARGET = atmega165p +#MCU_TARGET = atmega168 +#MCU_TARGET = atmega169 +#MCU_TARGET = atmega169p +#MCU_TARGET = atmega2560 +#MCU_TARGET = atmega2561 +#MCU_TARGET = atmega32 +#MCU_TARGET = atmega324p +#MCU_TARGET = atmega325 +#MCU_TARGET = atmega3250 +#MCU_TARGET = atmega329 +#MCU_TARGET = atmega3290 +#MCU_TARGET = atmega48 +#MCU_TARGET = atmega64 +#MCU_TARGET = atmega640 +#MCU_TARGET = atmega644 +#MCU_TARGET = atmega644p +#MCU_TARGET = atmega645 +#MCU_TARGET = atmega6450 +#MCU_TARGET = atmega649 +#MCU_TARGET = atmega6490 +MCU_TARGET = atmega8 +#MCU_TARGET = atmega8515 +#MCU_TARGET = atmega8535 +#MCU_TARGET = atmega88 +#MCU_TARGET = attiny2313 +#MCU_TARGET = attiny24 +#MCU_TARGET = attiny25 +#MCU_TARGET = attiny26 +#MCU_TARGET = attiny261 +#MCU_TARGET = attiny44 +#MCU_TARGET = attiny45 +#MCU_TARGET = attiny461 +#MCU_TARGET = attiny84 +#MCU_TARGET = attiny85 +#MCU_TARGET = attiny861 + +#OPTIMIZE = -O2 +OPTIMIZE = -Os + +# One must use -ffunction-sections (compiler switch) AND -Wl,-gc-sections +# (linker switch) to have the linker "garbage collect" (or remove) unused +# sections. The -ffunction-sections switch places all functions within their +# own section. You must use both together to make this work. +DEFS = -ffunction-sections -DF_CPU=16000000UL +LIBS = -Wl,-gc-sections +# You should not have to change anything below here. + +CC = avr-gcc +CXX = avr-g++ + +# Override is only needed by avr-lib build system. + +override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) #-fno-exceptions -fno-rtti +override LDFLAGS = -Wl,-Map,$(PRG).map --relax + +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump + +%.o: src/%.cpp + $(CXX) $(CFLAGS) -c -o $@ $^ + +all: $(PRG).elf lst text eeprom + avr-size --mcu=$(MCU_TARGET) -C $(PRG).elf + +$(PRG).elf: $(OBJ) + $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +# dependency: +#demo.o: demo.c iocompat.h +#%.o: %.c + +clean: + rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak + rm -rf *.lst *.map $(EXTRA_CLEAN_FILES) + +lst: $(PRG).lst + +%.lst: %.elf + $(OBJDUMP) -h -S $< > $@ + +# Rules for building the .text rom images + +text: hex bin srec + +hex: $(PRG).hex +bin: $(PRG).bin +srec: $(PRG).srec + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ + +# Rules for building the .eeprom rom images + +eeprom: ehex ebin esrec + +ehex: $(PRG)_eeprom.hex +ebin: $(PRG)_eeprom.bin +esrec: $(PRG)_eeprom.srec + +%_eeprom.hex: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@ \ + || { echo empty $@ not generated; exit 0; } + +%_eeprom.srec: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@ \ + || { echo empty $@ not generated; exit 0; } + +%_eeprom.bin: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@ \ + || { echo empty $@ not generated; exit 0; } + +# Every thing below here is used by avr-libc's build system and can be ignored +# by the casual user. + +FIG2DEV = fig2dev +EXTRA_CLEAN_FILES = *.hex *.bin *.srec + +dox: eps png pdf + +eps: $(PRG).eps +png: $(PRG).png +pdf: $(PRG).pdf + +%.eps: %.fig + $(FIG2DEV) -L eps $< $@ + +%.pdf: %.fig + $(FIG2DEV) -L pdf $< $@ + +%.png: %.fig + $(FIG2DEV) -L png $< $@ + +flash: + # for atmega8 : + avrdude -p m8 -c stk500v2 -P \ + /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A800dAli-if00-port0 \ + -e -U flash:w:$(PRG).hex + # for attiny25 + #avrdude -p t25 -c stk500v2 -P /dev/ttyUSB0 -e -U flash:w:$(PRG).hex + +a: all flash + +size: + avr-size --mcu=$(MCU_TARGET) -t -A $(PRG).elf + avr-size --mcu=$(MCU_TARGET) -C $(PRG).elf + avr-nm --size-sort $(PRG).elf diff --git a/avr-test2/avr-fusedump.bash b/avr-test2/avr-fusedump.bash new file mode 100755 index 0000000..d6c6e50 --- /dev/null +++ b/avr-test2/avr-fusedump.bash @@ -0,0 +1,102 @@ +#!/bin/bash +############################################################################# +#Bash script to dump the fuse bits for AVR microcontrollers and open +#the Engbedded Atmel AVR Fuse Calculator with the current fuse settings. +# +#05-Nov-2009 +#Craig Heffner +#http://www.hackingwithgum.com +############################################################################# + +LFUSE=lfuse +HFUSE=hfuse +EFUSE=efuse +URL="http://www.engbedded.com/cgi-bin/fcx.cgi?P=MMCU&V_LOW=$LFUSE&V_HIGH=$HFUSE&V_EXTENDED=$EFUSE&O_HEX=Apply+values" +ADSUCCESS=OK +ADOK=0 +FUSE="" +DATA="" +ADARGS="" + +#Loop through all the arguments to the script and concatenate them into $ADARGS. +#These arguments get passed directly to avrdude. +while [ $# -ne 0 ] +do + #If this argument is -p, then the next one is the chip name + if [ "$1" == "-p" ] && [ "$2" != "" ] + then + URL=$(echo $URL | sed -e "s/MMCU/$2/") + fi + + ADARGS="$ADARGS $1" + shift +done + +#Does the user need usage help? +if [ "$ADARGS" == "" ] || [ "$ADARGS" == "-h" ] || [ "$ADARGS" == "--help" ] +then + echo "" + echo "Usage: $0 -c -p " + echo "" + echo -e "\tExample: $0 -c usbtiny -p ATmega8" + echo "" + echo -e "Note that the argument supplied to -p is case-sensitive.\nIt should look exactly as it does in the Engbedded Web site's select box.\n" + exit +fi + +#Dump fuse info with avrdude and loop through the output word by word +for WORD in $(avrdude $ADARGS -q -U lfuse:r:-:i -U hfuse:r:-:i -U efuse:r:-:i 2>&1) +do + #Check for the success indicator + if [ "$WORD" == "$ADSUCCESS" ] + then + ADOK=1 + fi + + #Look for keywords "lfuse", "hfuse", or "efuse". They appear + #just before the corresponding fuse values are displayed. + if [ $(echo $WORD | grep $LFUSE) ] + then + FUSE=$LFUSE + elif [ $(echo $WORD | grep $HFUSE) ] + then + FUSE=$HFUSE + elif [ $(echo $WORD | grep $EFUSE) ] + then + FUSE=$EFUSE + fi + + #Have we seen one of the fuse keywords? + if [ "$FUSE" != "" ] + then + #Displayed fuse values start with a colon + DATA=$(echo $WORD | grep -e "^:") + + if [ "$DATA" != "" ] + then + #Pull out the fuse byte; 9th and 10th characters in the displayed value + DATA=${DATA:9:2} + + #Display the fuse value and update the Engbedded URL with the value + echo -e "$FUSE\t0x$DATA" + URL=$(echo $URL | sed -e "s/$FUSE/$DATA/") + + #Clear these in order to look for the next fuse + FUSE="" + DATA="" + fi + fi +done + +#If there was an error, let the user know. +#Else, open the Engbedded URL. +if [ $ADOK -ne 1 ] +then + echo "Avrdude failed! Check your programmer and chip arguments." +else + #Show the URL + #echo $URL + + #Open the URL automatically + firefox $URL & +fi diff --git a/avr-test2/ledcube.bin b/avr-test2/ledcube.bin new file mode 100755 index 0000000..59a9fde Binary files /dev/null and b/avr-test2/ledcube.bin differ diff --git a/avr-test2/ledcube.elf b/avr-test2/ledcube.elf new file mode 100755 index 0000000..4d60a4d Binary files /dev/null and b/avr-test2/ledcube.elf differ diff --git a/avr-test2/ledcube.hex b/avr-test2/ledcube.hex new file mode 100644 index 0000000..0c48192 --- /dev/null +++ b/avr-test2/ledcube.hex @@ -0,0 +1,63 @@ +:1000000012C02CC02BC07FC029C028C027C026C06A +:1000100025C025C023C022C021C020C01FC01EC0D3 +:100020001DC01CC01BC011241FBECFE5D4E0DEBF25 +:10003000CDBF10E0A0E6B0E0E2EDF3E002C0059035 +:100040000D92A036B107D9F710E0A0E6B0E001C0EC +:100050001D92A83EB107E1F706D1B9C1D1CF1F92D9 +:100060000F920FB60F9211242F933F934F935F93EC +:100070008F939F932091E3003091E4004091E5003D +:100080005091E6002F5F3F4F4F4F5F4F9091E70039 +:10009000892F8D5F8093E7008D3738F09A579093C2 +:1000A000E7002F5F3F4F4F4F5F4F2093E3003093A8 +:1000B000E4004093E5005093E6009F918F915F919B +:1000C0004F913F912F910F900FBE0F901F90189559 +:1000D00020E030E014C0FC0143E0EE0FFF1F4A9522 +:1000E000E1F7E20FF31FEE59FF4F108201968830BF +:1000F000910589F72F5F3F4F2830310519F080E0D7 +:1001000090E0E9CF08951F920F920FB60F9211243D +:100110002F933F934F936F937F938F939F93EF937F +:10012000FF93939895984091600020E030E0642F11 +:1001300070E0F90183E0EE0FFF1F8A95E1F7E60F0B +:10014000F71FEE59FF4F9081949895BB82B3907C36 +:100150008F73982B92BB949A2F5F3F4F28303105B5 +:1001600041F788B3887F842B88BB959A4F5F47708F +:1001700040936000939AFF91EF919F918F917F91AF +:100180006F914F913F912F910F900FBE0F901F9045 +:10019000189540E050E020E030E05F9BFECF8CB14E +:1001A00090E08F3F910531F45F9BFECF8CB190E0E2 +:1001B000009779F3FA0193E0EE0FFF1F9A95E1F7AC +:1001C000E20FF31FED55FF4F80832730310541F4D7 +:1001D0004730510511F4F1D0DCCF4F5F5F4FDBCFDB +:1001E0002F5F3F4FDACFEF92FF920F931F93CF9382 +:1001F000DF93F82EE22E062F10E0C42FD0E090E01F +:10020000B801AE01C6D0882339F1B80123E0660FEA +:10021000771F2A95E1F7EE2079F0FB01EC0FFD1F27 +:10022000EE59FF4F208181E090E002C0880F991FB6 +:10023000FA94E2F7282B0FC0FB01EC0FFD1FEE59DB +:10024000FF4F208181E090E002C0880F991FFA944F +:10025000E2F7809528232083DF91CF911F910F91A2 +:10026000FF90EF900895DF92EF92FF920F931F930C +:1002700012BE83B7836083BF89B7816089BF8BE07B +:1002800083BD85B5856085BD85B5886085BD14BC99 +:1002900089B7806889BF12BA18BA15BA8FEF81BBC7 +:1002A00087BB84BB10BC89E189B986E880BD88E141 +:1002B0008AB978946EDF20E0EE24E394DD24DA94AA +:1002C00014C080E090E0422F50E0FC0133E0EE0FDC +:1002D000FF1F3A95E1F7E40FF51FEE59FF4FD0826B +:1002E00001968830910589F72F5F283050F3E0920E +:1002F000A2002091E3003091E4004091E50050918C +:10030000E6008091E3009091E400A091E500B091B7 +:10031000E600821B930BA40BB50B88589341A040B9 +:10032000B04078F31092A200D3DEFF2430C0812FBA +:10033000602F4F2D21E057DFE092A2002091E300D3 +:100340003091E4004091E5005091E6008091E30097 +:100350009091E400A091E500B091E600821B930B20 +:10036000A40BB50B84369105A105B10578F3109265 +:10037000A2001F5F1830D9F60F5F083011F010E0AF +:10038000D6CFF39488E0F81611F420E09ACF00E07D +:10039000F6CF089778F477FD0DC06830710554F4F6 +:1003A00057FD08C090E0483051050CF091E081E025 +:1003B000982701C090E0892F0895A2E6B0E0E3EA13 +:1003C000F0E080E401900D928150E1F70895F894F7 +:0203D000FFCF5D +:00000001FF diff --git a/avr-test2/ledcube.lst b/avr-test2/ledcube.lst new file mode 100644 index 0000000..3d7bf39 --- /dev/null +++ b/avr-test2/ledcube.lst @@ -0,0 +1,827 @@ + +ledcube.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000003d2 00000000 00000000 00000074 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .bss 00000088 00800060 00800060 00000446 2**0 + ALLOC + 2 .stab 00003f90 00000000 00000000 00000448 2**2 + CONTENTS, READONLY, DEBUGGING + 3 .stabstr 00002106 00000000 00000000 000043d8 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00000000 <__vectors>: + 0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> + 2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> + 4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> + 6: 7f c0 rjmp .+254 ; 0x106 <__vector_3> + 8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> + a: 28 c0 rjmp .+80 ; 0x5c <__bad_interrupt> + c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> + e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> + 10: 25 c0 rjmp .+74 ; 0x5c <__bad_interrupt> + 12: 25 c0 rjmp .+74 ; 0x5e <__vector_9> + 14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> + 16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> + 18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> + 1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> + 1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> + 1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> + 20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> + 22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> + 24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> + +00000026 <__ctors_end>: + 26: 11 24 eor r1, r1 + 28: 1f be out 0x3f, r1 ; 63 + 2a: cf e5 ldi r28, 0x5F ; 95 + 2c: d4 e0 ldi r29, 0x04 ; 4 + 2e: de bf out 0x3e, r29 ; 62 + 30: cd bf out 0x3d, r28 ; 61 + +00000032 <__do_copy_data>: + 32: 10 e0 ldi r17, 0x00 ; 0 + 34: a0 e6 ldi r26, 0x60 ; 96 + 36: b0 e0 ldi r27, 0x00 ; 0 + 38: e2 ed ldi r30, 0xD2 ; 210 + 3a: f3 e0 ldi r31, 0x03 ; 3 + 3c: 02 c0 rjmp .+4 ; 0x42 <.do_copy_data_start> + +0000003e <.do_copy_data_loop>: + 3e: 05 90 lpm r0, Z+ + 40: 0d 92 st X+, r0 + +00000042 <.do_copy_data_start>: + 42: a0 36 cpi r26, 0x60 ; 96 + 44: b1 07 cpc r27, r17 + 46: d9 f7 brne .-10 ; 0x3e <.do_copy_data_loop> + +00000048 <__do_clear_bss>: + 48: 10 e0 ldi r17, 0x00 ; 0 + 4a: a0 e6 ldi r26, 0x60 ; 96 + 4c: b0 e0 ldi r27, 0x00 ; 0 + 4e: 01 c0 rjmp .+2 ; 0x52 <.do_clear_bss_start> + +00000050 <.do_clear_bss_loop>: + 50: 1d 92 st X+, r1 + +00000052 <.do_clear_bss_start>: + 52: a8 3e cpi r26, 0xE8 ; 232 + 54: b1 07 cpc r27, r17 + 56: e1 f7 brne .-8 ; 0x50 <.do_clear_bss_loop> + 58: 06 d1 rcall .+524 ; 0x266
+ 5a: b9 c1 rjmp .+882 ; 0x3ce <_exit> + +0000005c <__bad_interrupt>: + 5c: d1 cf rjmp .-94 ; 0x0 <__vectors> + +0000005e <__vector_9>: +//volatile uint32_t timer0_overflow_count = 0; +volatile uint32_t timer0_millis = 0; +//static uint8_t timer0_fract = 0; + + +ISR(TIMER0_OVF_vect) + 5e: 1f 92 push r1 + 60: 0f 92 push r0 + 62: 0f b6 in r0, 0x3f ; 63 + 64: 0f 92 push r0 + 66: 11 24 eor r1, r1 + 68: 2f 93 push r18 + 6a: 3f 93 push r19 + 6c: 4f 93 push r20 + 6e: 5f 93 push r21 + 70: 8f 93 push r24 + 72: 9f 93 push r25 +{ + // copy these to local variables so they can be stored in registers + // (volatile variables must be read from memory on every access) + uint32_t m = timer0_millis; + 74: 20 91 e3 00 lds r18, 0x00E3 + 78: 30 91 e4 00 lds r19, 0x00E4 + 7c: 40 91 e5 00 lds r20, 0x00E5 + 80: 50 91 e6 00 lds r21, 0x00E6 + //uint8_t f = timer0_fract; + static uint8_t timer0_fract = 0; + + m += MILLIS_INC; + 84: 2f 5f subi r18, 0xFF ; 255 + 86: 3f 4f sbci r19, 0xFF ; 255 + 88: 4f 4f sbci r20, 0xFF ; 255 + 8a: 5f 4f sbci r21, 0xFF ; 255 + //f += FRACT_INC; + timer0_fract += FRACT_INC; + 8c: 90 91 e7 00 lds r25, 0x00E7 + 90: 89 2f mov r24, r25 + 92: 8d 5f subi r24, 0xFD ; 253 + 94: 80 93 e7 00 sts 0x00E7, r24 + //if (f >= FRACT_MAX) { + if (timer0_fract >= FRACT_MAX) { + 98: 8d 37 cpi r24, 0x7D ; 125 + 9a: 38 f0 brcs .+14 ; 0xaa <__vector_9+0x4c> + //f -= FRACT_MAX; + timer0_fract -= FRACT_MAX; + 9c: 9a 57 subi r25, 0x7A ; 122 + 9e: 90 93 e7 00 sts 0x00E7, r25 + ++m; + a2: 2f 5f subi r18, 0xFF ; 255 + a4: 3f 4f sbci r19, 0xFF ; 255 + a6: 4f 4f sbci r20, 0xFF ; 255 + a8: 5f 4f sbci r21, 0xFF ; 255 + } + + //timer0_fract = f; + timer0_millis = m; + aa: 20 93 e3 00 sts 0x00E3, r18 + ae: 30 93 e4 00 sts 0x00E4, r19 + b2: 40 93 e5 00 sts 0x00E5, r20 + b6: 50 93 e6 00 sts 0x00E6, r21 + //if (timer0_overflow_count & 0x1) + //if (m - last_time >= 5) { + //debounce_keys(); // called nearly each 2ms (0,002048s) + //last_time = m; + //} +} + ba: 9f 91 pop r25 + bc: 8f 91 pop r24 + be: 5f 91 pop r21 + c0: 4f 91 pop r20 + c2: 3f 91 pop r19 + c4: 2f 91 pop r18 + c6: 0f 90 pop r0 + c8: 0f be out 0x3f, r0 ; 63 + ca: 0f 90 pop r0 + cc: 1f 90 pop r1 + ce: 18 95 reti + +000000d0 <_Z9clear_ledv>: + else { + cube[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() + d0: 20 e0 ldi r18, 0x00 ; 0 + d2: 30 e0 ldi r19, 0x00 ; 0 + d4: 14 c0 rjmp .+40 ; 0xfe <_Z9clear_ledv+0x2e> +{ + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0; + d6: fc 01 movw r30, r24 + d8: 43 e0 ldi r20, 0x03 ; 3 + da: ee 0f add r30, r30 + dc: ff 1f adc r31, r31 + de: 4a 95 dec r20 + e0: e1 f7 brne .-8 ; 0xda <_Z9clear_ledv+0xa> + e2: e2 0f add r30, r18 + e4: f3 1f adc r31, r19 + e6: ee 59 subi r30, 0x9E ; 158 + e8: ff 4f sbci r31, 0xFF ; 255 + ea: 10 82 st Z, r1 + ec: 01 96 adiw r24, 0x01 ; 1 +} + +void clear_led() +{ + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + ee: 88 30 cpi r24, 0x08 ; 8 + f0: 91 05 cpc r25, r1 + f2: 89 f7 brne .-30 ; 0xd6 <_Z9clear_ledv+0x6> + f4: 2f 5f subi r18, 0xFF ; 255 + f6: 3f 4f sbci r19, 0xFF ; 255 + } +} + +void clear_led() +{ + for (unsigned char z = 0; z < 8; ++z) { + f8: 28 30 cpi r18, 0x08 ; 8 + fa: 31 05 cpc r19, r1 + fc: 19 f0 breq .+6 ; 0x104 <_Z9clear_ledv+0x34> + fe: 80 e0 ldi r24, 0x00 ; 0 + 100: 90 e0 ldi r25, 0x00 ; 0 + 102: e9 cf rjmp .-46 ; 0xd6 <_Z9clear_ledv+0x6> + 104: 08 95 ret + +00000106 <__vector_3>: + +/***************************************************************************** + * RENDER + *****************************************************************************/ + +ISR(TIMER2_COMP_vect) + 106: 1f 92 push r1 + 108: 0f 92 push r0 + 10a: 0f b6 in r0, 0x3f ; 63 + 10c: 0f 92 push r0 + 10e: 11 24 eor r1, r1 + 110: 2f 93 push r18 + 112: 3f 93 push r19 + 114: 4f 93 push r20 + 116: 6f 93 push r22 + 118: 7f 93 push r23 + 11a: 8f 93 push r24 + 11c: 9f 93 push r25 + 11e: ef 93 push r30 + 120: ff 93 push r31 +{ + PORTD &= ~0x08; // layer down, should be done before latch + 122: 93 98 cbi 0x12, 3 ; 18 + PORTD &= ~0x20; // latch low + 124: 95 98 cbi 0x12, 5 ; 18 + unsigned char current_layer_ = current_layer; + 126: 40 91 60 00 lds r20, 0x0060 + 12a: 20 e0 ldi r18, 0x00 ; 0 + 12c: 30 e0 ldi r19, 0x00 ; 0 + for (unsigned char j = 0; j < 8; ++j) { + unsigned char val = cube[j][current_layer_]; + 12e: 64 2f mov r22, r20 + 130: 70 e0 ldi r23, 0x00 ; 0 + 132: f9 01 movw r30, r18 + 134: 83 e0 ldi r24, 0x03 ; 3 + 136: ee 0f add r30, r30 + 138: ff 1f adc r31, r31 + 13a: 8a 95 dec r24 + 13c: e1 f7 brne .-8 ; 0x136 <__vector_3+0x30> + 13e: e6 0f add r30, r22 + 140: f7 1f adc r31, r23 + 142: ee 59 subi r30, 0x9E ; 158 + 144: ff 4f sbci r31, 0xFF ; 255 + 146: 90 81 ld r25, Z + PORTD &= ~0x10; + 148: 94 98 cbi 0x12, 4 ; 18 + PORTC = val; + 14a: 95 bb out 0x15, r25 ; 21 + PORTD = (PORTD & ~0xC0) | (val & 0xC0); + 14c: 82 b3 in r24, 0x12 ; 18 + 14e: 90 7c andi r25, 0xC0 ; 192 + 150: 8f 73 andi r24, 0x3F ; 63 + 152: 98 2b or r25, r24 + 154: 92 bb out 0x12, r25 ; 18 + PORTD |= 0x10; + 156: 94 9a sbi 0x12, 4 ; 18 + 158: 2f 5f subi r18, 0xFF ; 255 + 15a: 3f 4f sbci r19, 0xFF ; 255 +ISR(TIMER2_COMP_vect) +{ + PORTD &= ~0x08; // layer down, should be done before latch + PORTD &= ~0x20; // latch low + unsigned char current_layer_ = current_layer; + for (unsigned char j = 0; j < 8; ++j) { + 15c: 28 30 cpi r18, 0x08 ; 8 + 15e: 31 05 cpc r19, r1 + 160: 41 f7 brne .-48 ; 0x132 <__vector_3+0x2c> + PORTD &= ~0x10; + PORTC = val; + PORTD = (PORTD & ~0xC0) | (val & 0xC0); + PORTD |= 0x10; + } + PORTB = (PORTB & ~0x07) | current_layer_; + 162: 88 b3 in r24, 0x18 ; 24 + 164: 88 7f andi r24, 0xF8 ; 248 + 166: 84 2b or r24, r20 + 168: 88 bb out 0x18, r24 ; 24 + PORTD |= 0x20; + 16a: 95 9a sbi 0x12, 5 ; 18 + ++current_layer_; + current_layer = current_layer_ & 0x07; + 16c: 4f 5f subi r20, 0xFF ; 255 + 16e: 47 70 andi r20, 0x07 ; 7 + 170: 40 93 60 00 sts 0x0060, r20 + PORTD |= 0x08; // layer, should be done in the end and must be after latch + 174: 93 9a sbi 0x12, 3 ; 18 +} + 176: ff 91 pop r31 + 178: ef 91 pop r30 + 17a: 9f 91 pop r25 + 17c: 8f 91 pop r24 + 17e: 7f 91 pop r23 + 180: 6f 91 pop r22 + 182: 4f 91 pop r20 + 184: 3f 91 pop r19 + 186: 2f 91 pop r18 + 188: 0f 90 pop r0 + 18a: 0f be out 0x3f, r0 ; 63 + 18c: 0f 90 pop r0 + 18e: 1f 90 pop r1 + 190: 18 95 reti + +00000192 : + +void tmp2cube (void); +// Take input from a computer and load it onto the cube buffer +void rs232(void) + 192: 40 e0 ldi r20, 0x00 ; 0 + 194: 50 e0 ldi r21, 0x00 ; 0 + 196: 20 e0 ldi r18, 0x00 ; 0 + 198: 30 e0 ldi r19, 0x00 ; 0 + // Should switch state every time the code + // is waiting for a byte to be received. + //LED_PORT ^= LED_RED; + + // Wait until a byte has been received + while ( !(UCSRA & (1< + + // Load the received byte from rs232 into a buffer. + tempval = UDR; + 19e: 8c b1 in r24, 0x0c ; 12 + 1a0: 90 e0 ldi r25, 0x00 ; 0 + // are reset to 0. This way the x and y counters are + // always the same on the computer and in the cube. + // To send an 0xff byte, you have to send it twice! + + // Go into sync escape mode + if (tempval == 0xff) + 1a2: 8f 3f cpi r24, 0xFF ; 255 + 1a4: 91 05 cpc r25, r1 + 1a6: 31 f4 brne .+12 ; 0x1b4 + { + // Wait for the next byte + while ( !(UCSRA & (1< + // Get the next byte + tempval = UDR; + 1ac: 8c b1 in r24, 0x0c ; 12 + 1ae: 90 e0 ldi r25, 0x00 ; 0 + + // Sync signal is received. + // Reset x and y counters to 0. + if (tempval == 0x00) + 1b0: 00 97 sbiw r24, 0x00 ; 0 + 1b2: 79 f3 breq .-34 ; 0x192 + } + + if (escape == 0) + { + // Load data into the current position in the buffer + fb[x][y] = tempval; + 1b4: fa 01 movw r30, r20 + 1b6: 93 e0 ldi r25, 0x03 ; 3 + 1b8: ee 0f add r30, r30 + 1ba: ff 1f adc r31, r31 + 1bc: 9a 95 dec r25 + 1be: e1 f7 brne .-8 ; 0x1b8 + 1c0: e2 0f add r30, r18 + 1c2: f3 1f adc r31, r19 + 1c4: ed 55 subi r30, 0x5D ; 93 + 1c6: ff 4f sbci r31, 0xFF ; 255 + 1c8: 80 83 st Z, r24 + + // Check if we have reached the limits of the buffer array. + if (y == 7) + 1ca: 27 30 cpi r18, 0x07 ; 7 + 1cc: 31 05 cpc r19, r1 + 1ce: 41 f4 brne .+16 ; 0x1e0 + { + if (x == 7) + 1d0: 47 30 cpi r20, 0x07 ; 7 + 1d2: 51 05 cpc r21, r1 + 1d4: 11 f4 brne .+4 ; 0x1da + { + // All data is loaded. Reset both counters + y = 0; + x = 0; + // Copy the data onto the cube. + tmp2cube(); + 1d6: f1 d0 rcall .+482 ; 0x3ba <_Z8tmp2cubev> + 1d8: dc cf rjmp .-72 ; 0x192 + } else + { + // A layer is loaded, reset y and increment x. + x++; + 1da: 4f 5f subi r20, 0xFF ; 255 + 1dc: 5f 4f sbci r21, 0xFF ; 255 + 1de: db cf rjmp .-74 ; 0x196 + y = 0; + } + } else + { + // We are in the middle of loading a layer. increment y. + y++; + 1e0: 2f 5f subi r18, 0xFF ; 255 + 1e2: 3f 4f sbci r19, 0xFF ; 255 + 1e4: da cf rjmp .-76 ; 0x19a + +000001e6 <_Z7set_ledhhhb>: +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z); +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) + 1e6: ef 92 push r14 + 1e8: ff 92 push r15 + 1ea: 0f 93 push r16 + 1ec: 1f 93 push r17 + 1ee: cf 93 push r28 + 1f0: df 93 push r29 + 1f2: f8 2e mov r15, r24 + 1f4: e2 2e mov r14, r18 +{ + + if (!inrange(x, y, z)) { + 1f6: 06 2f mov r16, r22 + 1f8: 10 e0 ldi r17, 0x00 ; 0 + 1fa: c4 2f mov r28, r20 + 1fc: d0 e0 ldi r29, 0x00 ; 0 + 1fe: 90 e0 ldi r25, 0x00 ; 0 + 200: b8 01 movw r22, r16 + 202: ae 01 movw r20, r28 + 204: c6 d0 rcall .+396 ; 0x392 <_Z7inrangeiii> + 206: 88 23 and r24, r24 + 208: 39 f1 breq .+78 ; 0x258 <_Z7set_ledhhhb+0x72> + 20a: b8 01 movw r22, r16 + 20c: 23 e0 ldi r18, 0x03 ; 3 + 20e: 66 0f add r22, r22 + 210: 77 1f adc r23, r23 + 212: 2a 95 dec r18 + 214: e1 f7 brne .-8 ; 0x20e <_Z7set_ledhhhb+0x28> + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + 216: ee 20 and r14, r14 + 218: 79 f0 breq .+30 ; 0x238 <_Z7set_ledhhhb+0x52> + cube[y][z] |= ((unsigned char)1) << x; + 21a: fb 01 movw r30, r22 + 21c: ec 0f add r30, r28 + 21e: fd 1f adc r31, r29 + 220: ee 59 subi r30, 0x9E ; 158 + 222: ff 4f sbci r31, 0xFF ; 255 + 224: 20 81 ld r18, Z + 226: 81 e0 ldi r24, 0x01 ; 1 + 228: 90 e0 ldi r25, 0x00 ; 0 + 22a: 02 c0 rjmp .+4 ; 0x230 <_Z7set_ledhhhb+0x4a> + 22c: 88 0f add r24, r24 + 22e: 99 1f adc r25, r25 + 230: fa 94 dec r15 + 232: e2 f7 brpl .-8 ; 0x22c <_Z7set_ledhhhb+0x46> + 234: 28 2b or r18, r24 + 236: 0f c0 rjmp .+30 ; 0x256 <_Z7set_ledhhhb+0x70> + } + else { + cube[y][z] &= ~(((unsigned char)1) << x); + 238: fb 01 movw r30, r22 + 23a: ec 0f add r30, r28 + 23c: fd 1f adc r31, r29 + 23e: ee 59 subi r30, 0x9E ; 158 + 240: ff 4f sbci r31, 0xFF ; 255 + 242: 20 81 ld r18, Z + 244: 81 e0 ldi r24, 0x01 ; 1 + 246: 90 e0 ldi r25, 0x00 ; 0 + 248: 02 c0 rjmp .+4 ; 0x24e <_Z7set_ledhhhb+0x68> + 24a: 88 0f add r24, r24 + 24c: 99 1f adc r25, r25 + 24e: fa 94 dec r15 + 250: e2 f7 brpl .-8 ; 0x24a <_Z7set_ledhhhb+0x64> + 252: 80 95 com r24 + 254: 28 23 and r18, r24 + 256: 20 83 st Z, r18 + } +} + 258: df 91 pop r29 + 25a: cf 91 pop r28 + 25c: 1f 91 pop r17 + 25e: 0f 91 pop r16 + 260: ff 90 pop r15 + 262: ef 90 pop r14 + 264: 08 95 ret + +00000266
: + +/***************************************************************************** + * MAIN + *****************************************************************************/ + +int main() + 266: df 92 push r13 + 268: ef 92 push r14 + 26a: ff 92 push r15 + 26c: 0f 93 push r16 + 26e: 1f 93 push r17 + * Initialisation + * ======================================================================= + */ + + //*** init time management + TCNT0 = 0; // init timer count to 0 + 270: 12 be out 0x32, r1 ; 50 + TCCR0 |= 0x03; // prescaler: 64 + 272: 83 b7 in r24, 0x33 ; 51 + 274: 83 60 ori r24, 0x03 ; 3 + 276: 83 bf out 0x33, r24 ; 51 + TIMSK |= 0x01; // enable timer 0 overflow interrupt + 278: 89 b7 in r24, 0x39 ; 57 + 27a: 81 60 ori r24, 0x01 ; 1 + 27c: 89 bf out 0x39, r24 ; 57 + + // Timer 2 + // Frame buffer interrupt + // 14745600/128/11 = 10472.72 interrupts per second + // 10472.72/8 = 1309 frames per second + OCR2 = 11; // interrupt at counter = 10 + 27e: 8b e0 ldi r24, 0x0B ; 11 + 280: 83 bd out 0x23, r24 ; 35 + TCCR2 |= (1 << CS20) | (0 << CS21) | (1 << CS22); // Prescaler = 128. + 282: 85 b5 in r24, 0x25 ; 37 + 284: 85 60 ori r24, 0x05 ; 5 + 286: 85 bd out 0x25, r24 ; 37 + TCCR2 |= (1 << WGM21); // CTC mode. Reset counter when OCR2 is reached. + 288: 85 b5 in r24, 0x25 ; 37 + 28a: 88 60 ori r24, 0x08 ; 8 + 28c: 85 bd out 0x25, r24 ; 37 + TCNT2 = 0x00; // initial counter value = 0; + 28e: 14 bc out 0x24, r1 ; 36 + TIMSK |= (1 << OCIE2); // Enable CTC interrupt + 290: 89 b7 in r24, 0x39 ; 57 + 292: 80 68 ori r24, 0x80 ; 128 + 294: 89 bf out 0x39, r24 ; 57 + + PORTD = 0; + 296: 12 ba out 0x12, r1 ; 18 + PORTB = 0; + 298: 18 ba out 0x18, r1 ; 24 + PORTC = 0; + 29a: 15 ba out 0x15, r1 ; 21 + DDRD = 0xff; + 29c: 8f ef ldi r24, 0xFF ; 255 + 29e: 81 bb out 0x11, r24 ; 17 + DDRB = 0xff; + 2a0: 87 bb out 0x17, r24 ; 23 + DDRC = 0xff; + 2a2: 84 bb out 0x14, r24 ; 20 + ////UDR = 0x00; // send an empty byte to indicate powerup. + +#if 1 +#define BAUDRATE 38400 +#define BAUD_PRESCALLER (((F_CPU / (BAUDRATE * 16UL))) - 1) + UBRRH = (uint8_t)(BAUD_PRESCALLER>>8); + 2a4: 10 bc out 0x20, r1 ; 32 + UBRRL = (uint8_t)(BAUD_PRESCALLER); + 2a6: 89 e1 ldi r24, 0x19 ; 25 + 2a8: 89 b9 out 0x09, r24 ; 9 + //UBRRH = (uint8_t)(0); + //UBRRL = (uint8_t)(0); + UCSRC = (1< + 2b6: 20 e0 ldi r18, 0x00 ; 0 + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + 2b8: ee 24 eor r14, r14 + 2ba: e3 94 inc r14 + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0xFF; + 2bc: dd 24 eor r13, r13 + 2be: da 94 dec r13 + 2c0: 14 c0 rjmp .+40 ; 0x2ea + + //while (1) { delay(1000); UDR = 'a'; } + //while (1) { UDR = 'a'; } + //DDRD |= 0x02; while (1) { delay(1000); PORTD ^= 0x02; } + + rs232(); + 2c2: 80 e0 ldi r24, 0x00 ; 0 + 2c4: 90 e0 ldi r25, 0x00 ; 0 + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0xFF; + 2c6: 42 2f mov r20, r18 + 2c8: 50 e0 ldi r21, 0x00 ; 0 + 2ca: fc 01 movw r30, r24 + 2cc: 33 e0 ldi r19, 0x03 ; 3 + 2ce: ee 0f add r30, r30 + 2d0: ff 1f adc r31, r31 + 2d2: 3a 95 dec r19 + 2d4: e1 f7 brne .-8 ; 0x2ce + 2d6: e4 0f add r30, r20 + 2d8: f5 1f adc r31, r21 + 2da: ee 59 subi r30, 0x9E ; 158 + 2dc: ff 4f sbci r31, 0xFF ; 255 + 2de: d0 82 st Z, r13 + 2e0: 01 96 adiw r24, 0x01 ; 1 + for (;;) { + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + 2e2: 88 30 cpi r24, 0x08 ; 8 + 2e4: 91 05 cpc r25, r1 + 2e6: 89 f7 brne .-30 ; 0x2ca + + for (;;) { + + //clear_led(); + //delay_ms(1000); + for (unsigned char z = 0; z < 8; ++z) { + 2e8: 2f 5f subi r18, 0xFF ; 255 + 2ea: 28 30 cpi r18, 0x08 ; 8 + 2ec: 50 f3 brcs .-44 ; 0x2c2 + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + 2ee: e0 92 a2 00 sts 0x00A2, r14 +} +*/ + +inline uint32_t millis() +{ + return timer0_millis; + 2f2: 20 91 e3 00 lds r18, 0x00E3 + 2f6: 30 91 e4 00 lds r19, 0x00E4 + 2fa: 40 91 e5 00 lds r20, 0x00E5 + 2fe: 50 91 e6 00 lds r21, 0x00E6 + 302: 80 91 e3 00 lds r24, 0x00E3 + 306: 90 91 e4 00 lds r25, 0x00E4 + 30a: a0 91 e5 00 lds r26, 0x00E5 + 30e: b0 91 e6 00 lds r27, 0x00E6 + +void delay(uint32_t ms) +{ + in_wait = true; + uint32_t time1 = millis(); + while ((millis()) - time1 < ms); + 312: 82 1b sub r24, r18 + 314: 93 0b sbc r25, r19 + 316: a4 0b sbc r26, r20 + 318: b5 0b sbc r27, r21 + 31a: 88 58 subi r24, 0x88 ; 136 + 31c: 93 41 sbci r25, 0x13 ; 19 + 31e: a0 40 sbci r26, 0x00 ; 0 + 320: b0 40 sbci r27, 0x00 ; 0 + 322: 78 f3 brcs .-34 ; 0x302 + in_wait = false; + 324: 10 92 a2 00 sts 0x00A2, r1 + } + } + //continue; + delay(5000); + + clear_led(); + 328: d3 de rcall .-602 ; 0xd0 <_Z9clear_ledv> + 32a: ff 24 eor r15, r15 + 32c: 30 c0 rjmp .+96 ; 0x38e + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + for (char x = 0; x < 8; ++x) { + set_led(x, y, z, true); + 32e: 81 2f mov r24, r17 + 330: 60 2f mov r22, r16 + 332: 4f 2d mov r20, r15 + 334: 21 e0 ldi r18, 0x01 ; 1 + 336: 57 df rcall .-338 ; 0x1e6 <_Z7set_ledhhhb> + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + 338: e0 92 a2 00 sts 0x00A2, r14 +} +*/ + +inline uint32_t millis() +{ + return timer0_millis; + 33c: 20 91 e3 00 lds r18, 0x00E3 + 340: 30 91 e4 00 lds r19, 0x00E4 + 344: 40 91 e5 00 lds r20, 0x00E5 + 348: 50 91 e6 00 lds r21, 0x00E6 + 34c: 80 91 e3 00 lds r24, 0x00E3 + 350: 90 91 e4 00 lds r25, 0x00E4 + 354: a0 91 e5 00 lds r26, 0x00E5 + 358: b0 91 e6 00 lds r27, 0x00E6 + +void delay(uint32_t ms) +{ + in_wait = true; + uint32_t time1 = millis(); + while ((millis()) - time1 < ms); + 35c: 82 1b sub r24, r18 + 35e: 93 0b sbc r25, r19 + 360: a4 0b sbc r26, r20 + 362: b5 0b sbc r27, r21 + 364: 84 36 cpi r24, 0x64 ; 100 + 366: 91 05 cpc r25, r1 + 368: a1 05 cpc r26, r1 + 36a: b1 05 cpc r27, r1 + 36c: 78 f3 brcs .-34 ; 0x34c + in_wait = false; + 36e: 10 92 a2 00 sts 0x00A2, r1 + delay(5000); + + clear_led(); + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + for (char x = 0; x < 8; ++x) { + 372: 1f 5f subi r17, 0xFF ; 255 + 374: 18 30 cpi r17, 0x08 ; 8 + 376: d9 f6 brne .-74 ; 0x32e + //continue; + delay(5000); + + clear_led(); + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + 378: 0f 5f subi r16, 0xFF ; 255 + 37a: 08 30 cpi r16, 0x08 ; 8 + 37c: 11 f0 breq .+4 ; 0x382 + 37e: 10 e0 ldi r17, 0x00 ; 0 + 380: d6 cf rjmp .-84 ; 0x32e + } + //continue; + delay(5000); + + clear_led(); + for (char z = 0; z < 8; ++z) { + 382: f3 94 inc r15 + 384: 88 e0 ldi r24, 0x08 ; 8 + 386: f8 16 cp r15, r24 + 388: 11 f4 brne .+4 ; 0x38e + 38a: 20 e0 ldi r18, 0x00 ; 0 + 38c: 9a cf rjmp .-204 ; 0x2c2 + 38e: 00 e0 ldi r16, 0x00 ; 0 + 390: f6 cf rjmp .-20 ; 0x37e + +00000392 <_Z7inrangeiii>: + 392: 08 97 sbiw r24, 0x08 ; 8 + 394: 78 f4 brcc .+30 ; 0x3b4 <_Z7inrangeiii+0x22> + 396: 77 fd sbrc r23, 7 + 398: 0d c0 rjmp .+26 ; 0x3b4 <_Z7inrangeiii+0x22> + 39a: 68 30 cpi r22, 0x08 ; 8 + 39c: 71 05 cpc r23, r1 + 39e: 54 f4 brge .+20 ; 0x3b4 <_Z7inrangeiii+0x22> + 3a0: 57 fd sbrc r21, 7 + 3a2: 08 c0 rjmp .+16 ; 0x3b4 <_Z7inrangeiii+0x22> + 3a4: 90 e0 ldi r25, 0x00 ; 0 + 3a6: 48 30 cpi r20, 0x08 ; 8 + 3a8: 51 05 cpc r21, r1 + 3aa: 0c f0 brlt .+2 ; 0x3ae <_Z7inrangeiii+0x1c> + 3ac: 91 e0 ldi r25, 0x01 ; 1 + 3ae: 81 e0 ldi r24, 0x01 ; 1 + 3b0: 98 27 eor r25, r24 + 3b2: 01 c0 rjmp .+2 ; 0x3b6 <_Z7inrangeiii+0x24> + 3b4: 90 e0 ldi r25, 0x00 ; 0 + 3b6: 89 2f mov r24, r25 + 3b8: 08 95 ret + +000003ba <_Z8tmp2cubev>: + 3ba: a2 e6 ldi r26, 0x62 ; 98 + 3bc: b0 e0 ldi r27, 0x00 ; 0 + 3be: e3 ea ldi r30, 0xA3 ; 163 + 3c0: f0 e0 ldi r31, 0x00 ; 0 + 3c2: 80 e4 ldi r24, 0x40 ; 64 + 3c4: 01 90 ld r0, Z+ + 3c6: 0d 92 st X+, r0 + 3c8: 81 50 subi r24, 0x01 ; 1 + 3ca: e1 f7 brne .-8 ; 0x3c4 <_Z8tmp2cubev+0xa> + 3cc: 08 95 ret + +000003ce <_exit>: + 3ce: f8 94 cli + +000003d0 <__stop_program>: + 3d0: ff cf rjmp .-2 ; 0x3d0 <__stop_program> diff --git a/avr-test2/ledcube.map b/avr-test2/ledcube.map new file mode 100644 index 0000000..ac0c8eb --- /dev/null +++ b/avr-test2/ledcube.map @@ -0,0 +1,819 @@ +Archive member included because of file (symbol) + +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + effect.o (__divmodhi4) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o (exit) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + launch_effect.o (__do_copy_data) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + main.o (__do_clear_bss) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + draw.o (__fixunssfsi) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) (__subsf3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + draw.o (__mulsf3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + draw.o (__divsf3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) (__gesf2) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + draw.o (__floatsisf) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + effect.o (__fixsfsi) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__thenan_sf) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) (__udivmodhi4) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__prologue_saves__) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__epilogue_restores__) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) (__clzsi2) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__pack_f) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) (__unpack_f) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) (__fpcmp_parts_f) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) (__clz_tab) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + effect.o (cos) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) (__fp_rempio2) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) (__fp_sinus) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) (__fp_splitA) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + effect.o (sin) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) (__addsf3x) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_inf) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) (__fp_mpack_finite) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) (__fp_nan) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) (__fp_powsodd) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_pscA) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_pscB) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) (__fp_round) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) (__fp_zero) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) (__fp_powser) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) (__mulsf3x) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + effect.o (rand) +/usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(eerd_byte_atmega8.o) + font.o (__eerd_byte_m8) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) (__mulsi3) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) (__divmodsi4) +/usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) (__udivmodsi4) + +Discarded input sections + + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + .text 0x00000000 0x0 launch_effect.o + .data 0x00000000 0x16 launch_effect.o + .bss 0x00000000 0x0 launch_effect.o + .text._Z13launch_effecti + 0x00000000 0x122 launch_effect.o + .progmem.gcc_sw_table + 0x00000000 0x36 launch_effect.o + .text 0x00000000 0x0 main.o + .data 0x00000000 0x0 main.o + .text._Z5delaym + 0x00000000 0x52 main.o + .text 0x00000000 0x0 draw.o + .data 0x00000000 0x0 draw.o + .bss 0x00000000 0x0 draw.o + .text._Z11tmpclrvoxeliii + 0x00000000 0x4c draw.o + .text._Z8clrvoxeliii + 0x00000000 0x4c draw.o + .text._Z11tmpsetvoxeliii + 0x00000000 0x4a draw.o + .text._Z8setvoxeliii + 0x00000000 0x4a draw.o + .text._Z8getvoxeliii + 0x00000000 0x44 draw.o + .text._Z10altervoxeliiii + 0x00000000 0xe draw.o + .text._Z8flpvoxeliii + 0x00000000 0x4a draw.o + .text._Z8argorderiiPiS_ + 0x00000000 0x24 draw.o + .text._Z10setplane_zi + 0x00000000 0x2e draw.o + .text._Z10clrplane_zi + 0x00000000 0x2c draw.o + .text._Z10setplane_xi + 0x00000000 0x56 draw.o + .text._Z10clrplane_xi + 0x00000000 0x58 draw.o + .text._Z10setplane_yi + 0x00000000 0x2e draw.o + .text._Z10clrplane_yi + 0x00000000 0x2c draw.o + .text._Z8setplanech + 0x00000000 0x74 draw.o + .text._Z8clrplanech + 0x00000000 0x70 draw.o + .text._Z4fillh + 0x00000000 0x3a draw.o + .text._Z7tmpfillh + 0x00000000 0x3a draw.o + .text._Z10box_fillediiiiii + 0x00000000 0x96 draw.o + .text._Z9box_wallsiiiiii + 0x00000000 0xe8 draw.o + .text._Z13box_wireframeiiiiii + 0x00000000 0x12e draw.o + .text._Z8bytelineii + 0x00000000 0x28 draw.o + .text._Z8flipbytec + 0x00000000 0x70 draw.o + .text._Z4lineiiiiii + 0x00000000 0x1da draw.o + .text._Z8delay_msj + 0x00000000 0x1e draw.o + .text._Z5shiftci + 0x00000000 0x15e draw.o + .text._Z8mirror_zv + 0x00000000 0x84 draw.o + .text._Z8mirror_xv + 0x00000000 0xba draw.o + .text._Z8mirror_yv + 0x00000000 0xde draw.o + .text 0x00000000 0x0 effect.o + .data 0x00000000 0x20 effect.o + .bss 0x00000000 0x0 effect.o + .text._Z20effect_telcstairs_doiii + 0x00000000 0x48 effect.o + .text._Z17effect_telcstairsiii + 0x00000000 0x3e effect.o + .text._Z11sendvoxel_zhhhi + 0x00000000 0x96 effect.o + .text._Z15effect_pathmovePhi + 0x00000000 0xa6 effect.o + .text._Z18effect_path_bitmapici + 0x00000000 0x114 effect.o + .text._Z16effect_path_textiPc + 0x00000000 0x130 effect.o + .text._Z17effect_pathspiralii + 0x00000000 0x92 effect.o + .text._Z22effect_rand_patharoundii + 0x00000000 0xc6 effect.o + .text._Z17effect_smileyspiniic + 0x00000000 0x42a effect.o + .text._Z27effect_random_sparkle_flashiii + 0x00000000 0x98 effect.o + .text._Z21effect_random_sparklev + 0x00000000 0x32 effect.o + .text._Z14effect_loadbari + 0x00000000 0xa6 effect.o + .text._Z19draw_positions_axiscPhi + 0x00000000 0xd0 effect.o + .text._Z32effect_boxside_randsend_parallelciii + 0x00000000 0x16c effect.o + .text._Z30effect_axis_updown_randsuspendciii + 0x00000000 0x15c effect.o + .text._Z20effect_z_updown_movePhS_c + 0x00000000 0x3c effect.o + .text._Z15effect_z_updownii + 0x00000000 0x156 effect.o + .text._Z20effect_random_fillerii + 0x00000000 0xbc effect.o + .text._Z17sendvoxels_rand_ziii + 0x00000000 0xda effect.o + .text._Z14effect_blinky2v + 0x00000000 0xa6 effect.o + .text._Z18effect_wormsqueezeiiiii + 0x00000000 0x1a6 effect.o + .text._Z11effect_raini + 0x00000000 0x8c effect.o + .text._Z17effect_stringfly2PKc + 0x00000000 0x10e effect.o + .text._Z10boingboingjihh + 0x00000000 0x538 effect.o + .text._Z16sendplane_rand_zhii + 0x00000000 0x6c effect.o + .text._Z19effect_box_woopwoopii + 0x00000000 0x7a effect.o + .text._Z22effect_box_shrink_growiiij + 0x00000000 0x100 effect.o + .text._Z16effect_planboingii + 0x00000000 0x46 effect.o + .text._Z11effect_testv + 0x00000000 0xa4 effect.o + .text 0x00000000 0x0 font.o + .data 0x00000000 0x2c font.o + .bss 0x00000000 0x0 font.o + .text._Z12font_getpathhPhi + 0x00000000 0x32 font.o + .text._Z19font_getbitmappixelccc + 0x00000000 0x2c font.o + .text._Z14font_getbitmapcPh + 0x00000000 0x4a font.o + .text._Z12font_getcharcPh + 0x00000000 0x46 font.o + .eeprom 0x00000000 0x1f7 font.o + .text 0x00000000 0x0 gameoflife.o + .data 0x00000000 0x0 gameoflife.o + .bss 0x00000000 0x0 gameoflife.o + .text._Z17gol_count_changesv + 0x00000000 0x58 gameoflife.o + .text._Z19gol_count_neighborsiii + 0x00000000 0xd0 gameoflife.o + .text._Z11gol_nextgenv + 0x00000000 0x8c gameoflife.o + .text._Z8gol_playij + 0x00000000 0x48 gameoflife.o + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .text.libgcc 0x00000000 0x26 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodhi4.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .text.libgcc 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .text.libgcc 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + .text 0x00000000 0x50 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fixunssfsi.o) + .text 0x00000000 0x338 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_addsub_sf.o) + .text 0x00000000 0x1ea /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mul_sf.o) + .text 0x00000000 0x14e /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_div_sf.o) + .text 0x00000000 0x56 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_ge_sf.o) + .text 0x00000000 0xb4 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_si_to_sf.o) + .text 0x00000000 0xa2 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_sf_to_si.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + .data 0x00000000 0x8 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_thenan_sf.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .text.libgcc 0x00000000 0x28 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodhi4.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .text.libgcc 0x00000000 0x38 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_prologue.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .text.libgcc 0x00000000 0x36 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_epilogue.o) + .text 0x00000000 0x9e /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clzsi2.o) + .text 0x00000000 0x1aa /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_pack_sf.o) + .text 0x00000000 0xf0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_unpack_sf.o) + .text 0x00000000 0xb2 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_fpcmp_parts_sf.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + .data 0x00000000 0x100 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clz.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .text.avr-libc.fplib + 0x00000000 0x6 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .text.avr-libc.fplib + 0x00000000 0x50 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .text.avr-libc.fplib + 0x00000000 0x22 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .progmem.gcc_fplib + 0x00000000 0x1e /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .text.avr-libc.fplib + 0x00000000 0x44 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .text.avr-libc.fplib + 0x00000000 0xc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .text.avr-libc.fplib + 0x00000000 0xc0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .text.avr-libc.fplib + 0x00000000 0xc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .text.avr-libc.fplib + 0x00000000 0x1c /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .text.avr-libc.fplib + 0x00000000 0x6 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .text.avr-libc.fplib + 0x00000000 0x22 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .text.avr-libc.fplib + 0x00000000 0xe /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .text.avr-libc.fplib + 0x00000000 0xe /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .text.avr-libc.fplib + 0x00000000 0x22 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .text.avr-libc.fplib + 0x00000000 0xe /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .text.avr-libc.fplib + 0x00000000 0x4a /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .text.avr-libc.fplib + 0x00000000 0xc2 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + .data 0x00000000 0x4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + .text.avr-libc + 0x00000000 0xb2 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(eerd_byte_atmega8.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(eerd_byte_atmega8.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(eerd_byte_atmega8.o) + .text.avr-libc + 0x00000000 0x10 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(eerd_byte_atmega8.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .text.libgcc 0x00000000 0x3e /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_mulsi3.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .text.libgcc 0x00000000 0x36 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_divmodsi4.o) + .text 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + .data 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + .bss 0x00000000 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + .text.libgcc 0x00000000 0x44 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_udivmodsi4.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00002000 xr +data 0x00800060 0x0000ffa0 rw !x +eeprom 0x00810000 0x00010000 rw !x +fuse 0x00820000 0x00000400 rw !x +lock 0x00830000 0x00000400 rw !x +signature 0x00840000 0x00000400 rw !x +*default* 0x00000000 0xffffffff + +Linker script and memory map + +LOAD /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o +LOAD launch_effect.o +LOAD main.o +LOAD draw.o +LOAD effect.o +LOAD font.o +LOAD gameoflife.o +LOAD /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a +LOAD /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a +LOAD /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a +LOAD /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a +LOAD /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x00000000 0x3d2 + *(.vectors) + .vectors 0x00000000 0x26 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + 0x00000000 __vectors + 0x00000000 __vector_default + *(.vectors) + *(.progmem.gcc*) + *(.progmem*) + 0x00000026 . = ALIGN (0x2) + 0x00000026 __trampolines_start = . + *(.trampolines) + .trampolines 0x00000026 0x0 linker stubs + *(.trampolines*) + 0x00000026 __trampolines_end = . + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x00000026 __ctors_start = . + *(.ctors) + 0x00000026 __ctors_end = . + 0x00000026 __dtors_start = . + *(.dtors) + 0x00000026 __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x00000026 0x0 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + 0x00000026 __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x00000026 0xc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x00000032 0x16 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_copy_data.o) + 0x00000032 __do_copy_data + .init4 0x00000048 0x10 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_clear_bss.o) + 0x00000048 __do_clear_bss + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x00000058 0x4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + *(.init9) + *(.text) + .text 0x0000005c 0x2 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + 0x0000005c __vector_1 + 0x0000005c __vector_12 + 0x0000005c __bad_interrupt + 0x0000005c __vector_6 + 0x0000005c __vector_11 + 0x0000005c __vector_13 + 0x0000005c __vector_17 + 0x0000005c __vector_7 + 0x0000005c __vector_5 + 0x0000005c __vector_4 + 0x0000005c __vector_2 + 0x0000005c __vector_15 + 0x0000005c __vector_8 + 0x0000005c __vector_14 + 0x0000005c __vector_10 + 0x0000005c __vector_16 + 0x0000005c __vector_18 + 0x0000005e . = ALIGN (0x2) + *(.text.*) + .text.__vector_9 + 0x0000005e 0x72 main.o + 0x0000005e __vector_9 + .text._Z9clear_ledv + 0x000000d0 0x36 main.o + 0x000000d0 clear_led() + .text.__vector_3 + 0x00000106 0x8c main.o + 0x00000106 __vector_3 + .text.rs232 0x00000192 0x54 main.o + 0x00000192 rs232 + .text._Z7set_ledhhhb + 0x000001e6 0x80 main.o + 0x000001e6 set_led(unsigned char, unsigned char, unsigned char, bool) + .text.main 0x00000266 0x12c main.o + 0x00000266 main + .text._Z7inrangeiii + 0x00000392 0x28 draw.o + 0x00000392 inrange(int, int, int) + .text._Z8tmp2cubev + 0x000003ba 0x14 draw.o + 0x000003ba tmp2cube() + 0x000003ce . = ALIGN (0x2) + *(.fini9) + .fini9 0x000003ce 0x0 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + 0x000003ce exit + 0x000003ce _exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x000003ce 0x4 /usr/lib/gcc/avr/4.3.5/avr4/libgcc.a(_exit.o) + *(.fini0) + 0x000003d2 _etext = . + +.data 0x00800060 0x0 load address 0x000003d2 + 0x00800060 PROVIDE (__data_start, .) + *(.data) + *(.data*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.d*) + 0x00800060 . = ALIGN (0x2) + 0x00800060 _edata = . + 0x00800060 PROVIDE (__data_end, .) + +.bss 0x00800060 0x88 + 0x00800060 PROVIDE (__bss_start, .) + *(.bss) + .bss 0x00800060 0x88 main.o + 0x00800060 current_layer + 0x00800061 pgm_mode + 0x00800062 cube + 0x008000a2 in_wait + 0x008000a3 fb + 0x008000e3 timer0_millis + *(.bss*) + *(COMMON) + 0x008000e8 PROVIDE (__bss_end, .) + 0x000003d2 __data_load_start = LOADADDR (.data) + 0x000003d2 __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x008000e8 0x0 + 0x008000e8 PROVIDE (__noinit_start, .) + *(.noinit*) + 0x008000e8 PROVIDE (__noinit_end, .) + 0x008000e8 _end = . + 0x008000e8 PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.stab 0x00000000 0x3f90 + *(.stab) + .stab 0x00000000 0x6b4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + .stab 0x000006b4 0x3cc launch_effect.o + 0x534 (size before relaxing) + .stab 0x00000a80 0xa50 main.o + 0xad4 (size before relaxing) + .stab 0x000014d0 0x5ac draw.o + 0x16ec (size before relaxing) + .stab 0x00001a7c 0x51c effect.o + 0x2604 (size before relaxing) + .stab 0x00001f98 0x3c0 font.o + 0x5d0 (size before relaxing) + .stab 0x00002358 0x3b4 gameoflife.o + 0x678 (size before relaxing) + .stab 0x0000270c 0x54 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(cos.o) + 0x60 (size before relaxing) + .stab 0x00002760 0x21c /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_rempio2.o) + 0x228 (size before relaxing) + .stab 0x0000297c 0xfc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_sinus.o) + 0x108 (size before relaxing) + .stab 0x00002a78 0x1d4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_split3.o) + 0x1e0 (size before relaxing) + .stab 0x00002c4c 0x78 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(sin.o) + 0x84 (size before relaxing) + .stab 0x00002cc4 0x4bc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(addsf3x.o) + 0x4c8 (size before relaxing) + .stab 0x00003180 0x78 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_inf.o) + 0x84 (size before relaxing) + .stab 0x000031f8 0xe4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_mpack.o) + 0xf0 (size before relaxing) + .stab 0x000032dc 0x54 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_nan.o) + 0x60 (size before relaxing) + .stab 0x00003330 0xfc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powsodd.o) + 0x108 (size before relaxing) + .stab 0x0000342c 0x84 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscA.o) + 0x90 (size before relaxing) + .stab 0x000034b0 0x84 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_pscB.o) + 0x90 (size before relaxing) + .stab 0x00003534 0xfc /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_round.o) + 0x108 (size before relaxing) + .stab 0x00003630 0x90 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_zero.o) + 0x9c (size before relaxing) + .stab 0x000036c0 0x1ec /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(fp_powser.o) + 0x1f8 (size before relaxing) + .stab 0x000038ac 0x4d4 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libm.a(mulsf3x.o) + 0x4e0 (size before relaxing) + .stab 0x00003d80 0x180 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(rand.o) + 0x33c (size before relaxing) + .stab 0x00003f00 0x90 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/libc.a(eerd_byte_atmega8.o) + 0x9c (size before relaxing) + +.stabstr 0x00000000 0x2106 + *(.stabstr) + .stabstr 0x00000000 0x2106 /usr/lib/gcc/avr/4.3.5/../../../avr/lib/avr4/crtm8.o + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment + *(.comment) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges + *(.debug_aranges) + +.debug_pubnames + *(.debug_pubnames) + +.debug_info + *(.debug_info) + *(.gnu.linkonce.wi.*) + +.debug_abbrev + *(.debug_abbrev) + +.debug_line + *(.debug_line) + +.debug_frame + *(.debug_frame) + +.debug_str + *(.debug_str) + +.debug_loc + *(.debug_loc) + +.debug_macinfo + *(.debug_macinfo) +OUTPUT(ledcube.elf elf32-avr) +LOAD linker stubs diff --git a/avr-test2/ledcube.srec b/avr-test2/ledcube.srec new file mode 100755 index 0000000..108ec18 --- /dev/null +++ b/avr-test2/ledcube.srec @@ -0,0 +1,64 @@ +S00F00006C6564637562652E7372656341 +S113000012C02CC02BC07FC029C028C027C026C066 +S113001025C025C023C022C021C020C01FC01EC0CF +S11300201DC01CC01BC011241FBECFE5D4E0DEBF21 +S1130030CDBF10E0A0E6B0E0E2EDF3E002C0059031 +S11300400D92A036B107D9F710E0A0E6B0E001C0E8 +S11300501D92A83EB107E1F706D1B9C1D1CF1F92D5 +S11300600F920FB60F9211242F933F934F935F93E8 +S11300708F939F932091E3003091E4004091E50039 +S11300805091E6002F5F3F4F4F4F5F4F9091E70035 +S1130090892F8D5F8093E7008D3738F09A579093BE +S11300A0E7002F5F3F4F4F4F5F4F2093E3003093A4 +S11300B0E4004093E5005093E6009F918F915F9197 +S11300C04F913F912F910F900FBE0F901F90189555 +S11300D020E030E014C0FC0143E0EE0FFF1F4A951E +S11300E0E1F7E20FF31FEE59FF4F108201968830BB +S11300F0910589F72F5F3F4F2830310519F080E0D3 +S113010090E0E9CF08951F920F920FB60F92112439 +S11301102F933F934F936F937F938F939F93EF937B +S1130120FF93939895984091600020E030E0642F0D +S113013070E0F90183E0EE0FFF1F8A95E1F7E60F07 +S1130140F71FEE59FF4F9081949895BB82B3907C32 +S11301508F73982B92BB949A2F5F3F4F28303105B1 +S113016041F788B3887F842B88BB959A4F5F47708B +S113017040936000939AFF91EF919F918F917F91AB +S11301806F914F913F912F910F900FBE0F901F9041 +S1130190189540E050E020E030E05F9BFECF8CB14A +S11301A090E08F3F910531F45F9BFECF8CB190E0DE +S11301B0009779F3FA0193E0EE0FFF1F9A95E1F7A8 +S11301C0E20FF31FED55FF4F80832730310541F4D3 +S11301D04730510511F4F1D0DCCF4F5F5F4FDBCFD7 +S11301E02F5F3F4FDACFEF92FF920F931F93CF937E +S11301F0DF93F82EE22E062F10E0C42FD0E090E01B +S1130200B801AE01C6D0882339F1B80123E0660FE6 +S1130210771F2A95E1F7EE2079F0FB01EC0FFD1F23 +S1130220EE59FF4F208181E090E002C0880F991FB2 +S1130230FA94E2F7282B0FC0FB01EC0FFD1FEE59D7 +S1130240FF4F208181E090E002C0880F991FFA944B +S1130250E2F7809528232083DF91CF911F910F919E +S1130260FF90EF900895DF92EF92FF920F931F9308 +S113027012BE83B7836083BF89B7816089BF8BE077 +S113028083BD85B5856085BD85B5886085BD14BC95 +S113029089B7806889BF12BA18BA15BA8FEF81BBC3 +S11302A087BB84BB10BC89E189B986E880BD88E13D +S11302B08AB978946EDF20E0EE24E394DD24DA94A6 +S11302C014C080E090E0422F50E0FC0133E0EE0FD8 +S11302D0FF1F3A95E1F7E40FF51FEE59FF4FD08267 +S11302E001968830910589F72F5F283050F3E0920A +S11302F0A2002091E3003091E4004091E500509188 +S1130300E6008091E3009091E400A091E500B091B3 +S1130310E600821B930BA40BB50B88589341A040B5 +S1130320B04078F31092A200D3DEFF2430C0812FB6 +S1130330602F4F2D21E057DFE092A2002091E300CF +S11303403091E4004091E5005091E6008091E30093 +S11303509091E400A091E500B091E600821B930B1C +S1130360A40BB50B84369105A105B10578F3109261 +S1130370A2001F5F1830D9F60F5F083011F010E0AB +S1130380D6CFF39488E0F81611F420E09ACF00E079 +S1130390F6CF089778F477FD0DC06830710554F4F2 +S11303A057FD08C090E0483051050CF091E081E021 +S11303B0982701C090E0892F0895A2E6B0E0E3EA0F +S11303C0F0E080E401900D928150E1F70895F894F3 +S10503D0FFCF59 +S9030000FC diff --git a/avr-test2/ledcube_eeprom.bin b/avr-test2/ledcube_eeprom.bin new file mode 100755 index 0000000..e69de29 diff --git a/avr-test2/ledcube_eeprom.hex b/avr-test2/ledcube_eeprom.hex new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/avr-test2/ledcube_eeprom.hex @@ -0,0 +1 @@ +:00000001FF diff --git a/avr-test2/ledcube_eeprom.srec b/avr-test2/ledcube_eeprom.srec new file mode 100755 index 0000000..e2abc36 --- /dev/null +++ b/avr-test2/ledcube_eeprom.srec @@ -0,0 +1,2 @@ +S01600006C6564637562655F656570726F6D2E7372656353 +S9030000FC diff --git a/avr-test2/mc b/avr-test2/mc new file mode 120000 index 0000000..a573d03 --- /dev/null +++ b/avr-test2/mc @@ -0,0 +1 @@ +/home/calendros/downloads/shelve/datasheet/2011/mc \ No newline at end of file diff --git a/avr-test2/os b/avr-test2/os new file mode 100644 index 0000000..e5cfb20 --- /dev/null +++ b/avr-test2/os @@ -0,0 +1,11922 @@ +%!PS-Adobe-3.0 +%%Creator: (ImageMagick) +%%Title: (os) +%%CreationDate: (2011-08-27T21:54:51+02:00) +%%BoundingBox: -0 -0 482 314 +%%HiResBoundingBox: 0 0 482 314 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Orientation: Portrait +%%PageOrder: Ascend +%%Pages: 1 +%%EndComments + +%%BeginDefaults +%%EndDefaults + +%%BeginProlog +% +% Display a color image. The image is displayed in color on +% Postscript viewers or printers that support color, otherwise +% it is displayed as grayscale. +% +/DirectClassPacket +{ + % + % Get a DirectClass packet. + % + % Parameters: + % red. + % green. + % blue. + % length: number of pixels minus one of this color (optional). + % + currentfile color_packet readhexstring pop pop + compression 0 eq + { + /number_pixels 3 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add 3 mul def + } ifelse + 0 3 number_pixels 1 sub + { + pixels exch color_packet putinterval + } for + pixels 0 number_pixels getinterval +} bind def + +/DirectClassImage +{ + % + % Display a DirectClass image. + % + systemdict /colorimage known + { + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { DirectClassPacket } false 3 colorimage + } + { + % + % No colorimage operator; convert to grayscale. + % + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { GrayDirectClassPacket } image + } ifelse +} bind def + +/GrayDirectClassPacket +{ + % + % Get a DirectClass packet; convert to grayscale. + % + % Parameters: + % red + % green + % blue + % length: number of pixels minus one of this color (optional). + % + currentfile color_packet readhexstring pop pop + color_packet 0 get 0.299 mul + color_packet 1 get 0.587 mul add + color_packet 2 get 0.114 mul add + cvi + /gray_packet exch def + compression 0 eq + { + /number_pixels 1 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add def + } ifelse + 0 1 number_pixels 1 sub + { + pixels exch gray_packet put + } for + pixels 0 number_pixels getinterval +} bind def + +/GrayPseudoClassPacket +{ + % + % Get a PseudoClass packet; convert to grayscale. + % + % Parameters: + % index: index into the colormap. + % length: number of pixels minus one of this color (optional). + % + currentfile byte readhexstring pop 0 get + /offset exch 3 mul def + /color_packet colormap offset 3 getinterval def + color_packet 0 get 0.299 mul + color_packet 1 get 0.587 mul add + color_packet 2 get 0.114 mul add + cvi + /gray_packet exch def + compression 0 eq + { + /number_pixels 1 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add def + } ifelse + 0 1 number_pixels 1 sub + { + pixels exch gray_packet put + } for + pixels 0 number_pixels getinterval +} bind def + +/PseudoClassPacket +{ + % + % Get a PseudoClass packet. + % + % Parameters: + % index: index into the colormap. + % length: number of pixels minus one of this color (optional). + % + currentfile byte readhexstring pop 0 get + /offset exch 3 mul def + /color_packet colormap offset 3 getinterval def + compression 0 eq + { + /number_pixels 3 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add 3 mul def + } ifelse + 0 3 number_pixels 1 sub + { + pixels exch color_packet putinterval + } for + pixels 0 number_pixels getinterval +} bind def + +/PseudoClassImage +{ + % + % Display a PseudoClass image. + % + % Parameters: + % class: 0-PseudoClass or 1-Grayscale. + % + currentfile buffer readline pop + token pop /class exch def pop + class 0 gt + { + currentfile buffer readline pop + token pop /depth exch def pop + /grays columns 8 add depth sub depth mul 8 idiv string def + columns rows depth + [ + columns 0 0 + rows neg 0 rows + ] + { currentfile grays readhexstring pop } image + } + { + % + % Parameters: + % colors: number of colors in the colormap. + % colormap: red, green, blue color packets. + % + currentfile buffer readline pop + token pop /colors exch def pop + /colors colors 3 mul def + /colormap colors string def + currentfile colormap readhexstring pop pop + systemdict /colorimage known + { + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { PseudoClassPacket } false 3 colorimage + } + { + % + % No colorimage operator; convert to grayscale. + % + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { GrayPseudoClassPacket } image + } ifelse + } ifelse +} bind def + +/DisplayImage +{ + % + % Display a DirectClass or PseudoClass image. + % + % Parameters: + % x & y translation. + % x & y scale. + % label pointsize. + % image label. + % image columns & rows. + % class: 0-DirectClass or 1-PseudoClass. + % compression: 0-none or 1-RunlengthEncoded. + % hex color packets. + % + gsave + /buffer 512 string def + /byte 1 string def + /color_packet 3 string def + /pixels 768 string def + + currentfile buffer readline pop + token pop /x exch def + token pop /y exch def pop + x y translate + currentfile buffer readline pop + token pop /x exch def + token pop /y exch def pop + currentfile buffer readline pop + token pop /pointsize exch def pop + /Times-Roman findfont pointsize scalefont setfont + x y scale + currentfile buffer readline pop + token pop /columns exch def + token pop /rows exch def pop + currentfile buffer readline pop + token pop /class exch def pop + currentfile buffer readline pop + token pop /compression exch def pop + class 0 gt { PseudoClassImage } { DirectClassImage } ifelse + showpage +} bind def +%%EndProlog +%%Page: 1 1 +%%PageBoundingBox: 0 0 482 314 +DisplayImage +0 0 +482 314 +12 +482 314 +0 +0 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000062A7ED9FFFFF2EBE9E9E9E8DEC291531D05000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000002113A7AB5D7E3E5E4DCC18B49180400000002113A7AB5D7E3E5E4DCC18B49 +180400000110408BBEDAEEFFFFFFCE691E03000000000000000000000000000000000000000000 +0D45AEF3FFF9EEEAE8E2D5BA8B5424090100000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000083089D5CD76250500000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000002113A7AB5D7E3E5E4DCC18B49180400000110408BBEDAEEFFFFFFCE +691E030000000317498CBFDEEFF6F7F7F2E0BC894C1A0400000000000000000000000000000000 +000000000000000000000000000000000000000000000C3F9CDBF0F3FAFFFFFFFCF5F2E5B25315 +0E45AEF3FFF9EEEAE8E2D5BA8B5424090100000000000000000000000000000000000000000002 +113A7AB5D7E3E5E4DCC18B4918040000000000000000031A59B2F2FFE795370A00000002113A7A +B5D7E3E5E4DCC18B4918040001114496CDE6EFF3F5F7F4E6C8995D240800000000000000000000 +000000000000000000000000071F5390C2DFEEF3F4F3E4B4652105000002113A7AB5D7E3E5E4DC +C18B49180400000002113A7AB5D7E3E5E4DCC18B49180400000110408BBEDAEEFFFFFFCE691E03 +00000000000000000000000000000000000000000000052576D4FFFFF9F3F2F2F2F2F2F2E9C16E +24050000000000000000000000000000000000000000021138666D4A1B04000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000031C60B9E7F2F2F2F3FAFF +FFFFFDF5F2F2F2ECCB7F2E08000000000000000000000000000000000000000000000000000000 +000000000000000F4CB9E6B4490E00000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000062467A8C6CFDDF8F8BD4E0F000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D45AEF3FFF9 +EEEAE8E2D5BA8B5424090100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000083089D5CD76250500000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000C3F9CDBF0F3FAFFFFFFFCF5F2E5B25315 +01000000000000000000000000000000000000000000021138666D4A1B04000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000021138666D +4A1B04000000000000000000000000083089D5CD76250500000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000062467A8C6CFDDF8F8BD4E0F000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000A3795DFDA893008000000000000000000000000 +00021138666D4A1B040000000000000000000000000000000000093592DACC7223050000000000 +00000000000000000000000000052576D4FFFFF9F3F2F2F2F2F2F2E9C48A84BEE7F2F2F2F3FAFF +FFFFFDF5F2F2F2ECCB7F2E08000000062A7ED6E7A5400C0000010E3C93DFE59F3D0B0000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000009348FDCE0994311020A3181D4E5A949100109348FDCE0994311020A31 +81D4E5A94910010009203D42322C54B3EACC691E03000000000000000000000000000000000000 +0000000D45AEEACF702204010C2B67B2E7DB8C350A000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000010A1D2E2D19080100000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000009348FDCE0994311020A3181D4E5A94910010009203D42322C54 +B3EACC691E0300000003163C564B2C110402081F4D98E1EDB04B11010000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000F4EBDF1CC661C0300 +0000000D45AEEACF702204010C2B67B2E7DB8C350A000000000000000000000000000000000000 +0009348FDCE0994311020A3181D4E5A9491001000000000216509FC4B4BDE5E095370A00000934 +8FDCE0994311020A3181D4E5A94910010513211C0D03000004133981D5EFBA5414010000000000 +00000000000000000000000000052674CDE9C175330F02000614231E0C020009348FDCE0994311 +020A3181D4E5A949100109348FDCE0994311020A3181D4E5A94910010009203D42322C54B3EACC +691E0300000000000000000000000000000000000000000000052576D2E7A8420C000000000000 +00000000000000000000000000000000000000000000000000042270CCDB933609000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0F4BB8EFCE6B1F0400000000000000000000000000000000000000000000000000000000000000 +000000000000000000000F4CB9E6B4490E00000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000E47B1E6BC4E0F000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000D45AE +EACF702204010C2B67B2E7DB8C350A000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010A1D2E2D19080100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000F4EBDF1CC661C0300 +00000000000000000000000000000000000000000000000000042270CCDB933609000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000422 +70CCDB933609000000000000000000000000010A1D2E2D19080100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000E47B1E6BC4E0F000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000A3795DFDA893008000000000000000000 +00000000042270CCDB9336090000000000000000000000000000000000093592DACC7223050000 +00000000000000000000000000000000052576D2E7A8420C000000000000000000000000000000 +0F4BB8EFCE6B1F0400000000000000000000062A7ED6E7A5400C000004184EA4E5DE9034090F4C +B9E6B4490E000000072C82D3D3822C0700051D5598C9E3E9E4E0DFDFCE9A481301000000000000 +000000000000000000000000072F86D9E199390B04070507297BD4E5A440132F86D9E199390B04 +070507297BD4E5A4400C0000000000000D46AFEACC691E03000000000000000000000000000000 +0000000000000D45AEEACF70220400000008328CDDE6A13E0B0004184883B8D8E5E5E2E1DABF8C +4D1A051350B1E2BA591702000000000E43A4E0C5681E030C3B8DBCC9D4ECF8D376250500000000 +00000003153F78ADD1DFE2E2E3E0D0A56021050004184883B8D8E5E5E2E1DABF8C4D1A04000000 +000000000000000000000000000000072F86D9E199390B04070507297BD4E5A4400C0000000000 +000D46AFEACC691E0300000000000000000000000000011354BDEFC9641C03000000000316457C +9384531E05000000000000000000000000000000000000000000000000000000000F4EBDF1CC66 +1C03000000000D45AEEACF70220400000008328CDDE6A13E0B0000000000000000000000000000 +000000072F86D9E199390B04070507297BD4E5A4400C000002134899C3964B418BDADF95370A00 +072F86D9E199390B04070507297BD4E5A4400C00000000000000020A1D458BD8E8AC4B11010000 +00000316457C9384531E050000000006297CD3DE973A0B00000000000000000000072F86D9E199 +390B04070507297BD4E5A440132F86D9E199390B04070507297BD4E5A4400C0000000000000D46 +AFEACC691E0300000000000000000000000000000000000000000000052576D2E7A8420C000000 +000000000000000F4CB9E6B4490E000000072C82D3D3822C123787B9C8D0E5FDFFEED6CAC7C7BD +924411010F4CB9E6B4490E000000072C82D3D3822C070000052474CCDAA37C91AEBBC1C9D2CE9F +460F04184883B8D8E5E5E2E1DABF8C4D1A04000000000000000000000000000000000000000000 +0000000F4BB8EFCE6B1F0400000000000004184883B8D8E5E5E2E1DABF8C4D1A0400000003153F +78ADD1DFE2E2E3E0D0A56021050F4CB9E9C88D95BCD8EAF6EECB8C421302000F4CB9ECD39FA0B5 +BECADEE4C98C421302000006215896C7DEE4E4E4E1CFA5692E0C0100000000000E47B1E6BC4E0F +000000000000000006215896C7DEE4E4E4E1CFA5692E0C0100010B2D6AABD9EFF1E6D5B7A0BCE4 +CD72231343A2DFC86E2204000000000A3792DCD6832D0700000000000000000000000000000000 +0D45AEEACF70220400000008328CDDE6A13E0B0004184883B8D8E5E5E2E1DABF8C4D1A051350B1 +E2BA591702000000000E43A4E0C5681E030C3B8DBCC9D4ECF8D37625050000000000000003153F +78ADD1DFE2E2E3E0D0A56021050004184883B8D8E5E5E2E1DABF8C4D1A040000051D5598C9E3E9 +E4E0DFDFCE9A4813010000000000000000000000000000000000000000000000000F4EBDF1CC66 +1C0300000000000F4CB9ECD39FA0B5BECADEE4C98C4213020B3787B9C8D0E5FDFFEED6CAC7C7BD +924411010004184883B8D8E5E5E2E1DABF8C4D1A04000000052474CCDAA37C91AEBBC1C9D2CE9F +461E4CB9ECD39FA0B5BECADEE4C98C42130200062363A5CDDDE1E0DEDBD8C9A1672E0C010B3787 +B9C8D0E5FDFFEED6CAC7C7BD92441101000C3B8DBCC9D4ECF8D376250500000000000006215896 +C7DEE4E4E4E1CFA5692E0C01000F4CB9ECD39FA0B5BECADEE4C98C42130200062363A5CDDDE1E0 +DEDBD8C9A1672E0C0100000000000E47B1E6BC4E0F000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000A3795DFDA893008000000000000 +0000000B3787B9C8D0E5FDFFEED6CAC7C7BD92441101010C2E6CACD9EDEDDECBB2A1BEE4CD7223 +05000000000000000000000000000000000000052576D2E7A8420C000000000000000000000000 +0000000F4BB8EFCE6B1F0400000000000000000000062A7ED9FFFEEFE7E7EEFBFFF9CC833A0F01 +000F4CB9E6B4490E000000072C82D3D3822C07072C82D6E09A3C0B00000006121B120600000000 +0000000000000000000000000000000C43A9E8D2783F64C2F1D3793D5FC4F1C2572044A9E8D278 +3F64C2F1D3793D5FC4F1C257140100000000000D46AFEACC691E03000000000000000000000000 +0000000000000000000D45AEEACF702204000000021A62C9F3C65C1A1B5AB1D6AB5D2409010006 +2368BFDDA5440F124DAEE0BB5A180200000F45A6E0C3641D030000000000083089D5CD76250500 +0000000002154FAAE4D4893E1102000006172B2912061A5AB1D6AB5D24090100062368BFDDA544 +0E00000000000000000000000000000000000C43A9E8D2783F64C2F1D3793D5FC4F1C257140100 +000000000D46AFEACC691E0300000000000000000000000005236BC0E3BC662004000000000005 +2677D6FEE4903409000000000000000000000000000000000000000000000000000000000F4EBD +F1CC661C03000000000D45AEEACF702204000000021A62C9F3C65C170100000000000000000000 +0000000000000C43A9E8D2783F64C2F1D3793D5FC4F1C25714020F4093C8A854180B3089DADF95 +370A000C43A9E8D2783F64C2F1D3793D5FC4F1C257140100000B3B95D7F5FFFFFFD79044140200 +0000000000052677D6FEE4903409000000000C41A6E4D08D83A5C6D6DDDACAA8733911020C43A9 +E8D2783F64C2F1D3793D5FC4F1C2572044A9E8D2783F64C2F1D3793D5FC4F1C257140100000000 +000D46AFEACC691E0300000000000000000000000000000000000000000000052576D4FFFFF6EF +EEEEEEEEEEE5BE6D24050F4CB9E6B4490E000000072C82D3D3822C07000000042270CCDB933609 +000000000000000F4CB9E6B4490E000000072C82D3D3822C070000052474D3FCE7A04D16030000 +01060B0A1C5AB1D6AB5D24090100062368BFDDA5440E0000000000000000000000000000000000 +0000000000000F4BB8EFCE6B1F0400000000031A5AB1D6AB5D24090100062368BFDDA5440E0215 +4FAAE4D4893E1102000006172B2912030F4CBAF7EEAD5D250B08236AC9EFC35E19020F4CBAF5E4 +96401001011454BAEAC35E19041757B5E7CB752A0801041E5FB7E7CB732505000000000E47B1E6 +BC4E0F000000000000021757B5E7CB752A0801041E5FB7E7CB732509216BC6E8BF70310F0A1E51 +9EE7FDD3722305093690D9D07C290600000D409FDFCA7023050000000000000000000000000000 +0000000D45AEEACF702204000000021A62C9F3C65C1A1B5AB1D6AB5D24090100062368BFDDA544 +0F124DAEE0BB5A180200000F45A6E0C3641D030000000000083089D5CD76250500000000000215 +4FAAE4D4893E1102000006172B2912061A5AB1D6AB5D24090100062368BFDDA5440E072C82D6E0 +9A3C0B00000006121B1206000000000000000000000000000000000000000000000000000F4EBD +F1CC661C0300000000000F4CBAF5E496401001011454BAEAC35E1902000000042270CCDB933609 +000000000000031A5AB1D6AB5D24090100062368BFDDA5440E0000052474D3FCE7A04D16030000 +01060B07114CBAF5E496401001011454BAEAC35E1902020D1F211306000000011249A4DDC2641C +03000000042270CCDB933609000000000000000000000000083089D5CD76250500000000021757 +B5E7CB752A0801041E5FB7E7CB7325050F4CBAF5E496401001011454BAEAC35E1902020D1F2113 +06000000011249A4DDC2641C03000000000E47B1E6BC4E0F000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000A3795DFDA893008000000 +00000000000000000000042270CCDB93360900000000000004226EC8E8BF6F300E04124499E6FD +D3722305000000000000000000000000000000000000052576D4FFFFF6EFEEEEEEEEEEE5BE6D24 +0500000000000F4BB8EFCE6B1F0400000000000000000000062A7ED6E7A5400C000003133D85CF +DFA74D14114CB9E6B4490E000000072C82D3D3822C0702144A9FDFE9C9A489745C3C1B07010000 +0000000000000000000000000000000000000C43A9E8D2762813243227121959C4F1C3572044A9 +E8D2762813243227121959C4F1C357140100000000000D46AFEACC691E03000000000000000000 +0000000000000000000000000D45AEEACF702204000000021A61C9F3C65D2448AEF0F6DAC8C3C3 +C3C3C3C4CAD7DAB66420051049AADFBB5B18030F46A7DFBF601B03000000000000083089D5CD76 +250500000000000B3EA0E2CD7022040000000000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7 +DAB6642004000000000000000000000000000000000C43A9E8D2762813243227121959C4F1C357 +140100000000000D46AFEACC691E03000000000000000000010F3882C9DEAF5F1F050000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0F4EBDF1CC661C03000000000D45AEEACF702204000000021A61C9F3C65D170200000000000000 +0000000000000000000C43A9E8D2762813243227121959C4F1C358203A8BCAB868210400083089 +DADF95370A000C43A9E8D2762813243227121959C4F1C35714010000000000000005174389D0E4 +B157180300000000000000000000000000000000000C43A9F1FFD9904C2009051952A6E5DD8E34 +1543A9E8D2762813243227121959C4F1C3572044A9E8D2762813243227121959C4F1C357140100 +000000000D46AFEACC691E0300000000000000000000000000000000000000000000052576D2E7 +A8420C000000000000000000000F4CB9E6B4490E000000072C82D3D3822C07000000042270CCDB +933609000000000000000F4CB9E6B4490E000000072C82D3D3822C070000052474CFE29F3D0B00 +0000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200400000000000000000000000000 +0000000000000000000F4BB8EFCE6B1F04000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +200F3EA0E2CD702204000000000000000000000F4CB9EABB5011000000083088D6D27F2B060F4C +B9E9B94E10000000072E85D4D27F2B103999DED0772605000000011559C3ECBA4F10000000000E +47B1E6BC4E0F0000000000000A3999DED0772605000000011559C3ECBA4F1E49B3E9C55D170100 +00000B3FA2E3CF72230500062A7DD1D68A3109114AAADFBD5F1B03000000000000000000000000 +0000000000000D45AEEACF702204000000021A61C9F3C65D2448AEF0F6DAC8C3C3C3C3C3C4CAD7 +DAB66420051049AADFBB5B18030F46A7DFBF601B03000000000000083089D5CD76250500000000 +000B3EA0E2CD7022040000000000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200614 +4A9FDFE9C9A489745C3C1B07010000000000000000000000000000000000000000000000000000 +0F4EBDF1CC661C0300000000000F4CB9E9B94E10000000072E85D4D27F2B06000000042270CCDB +9336090000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200400052474CFE29F3D0B00 +000000000000000F4CB9E9B94E10000000072E85D4D27F2B06020F346A9BBCCBCECDCCCDD5E9F9 +DC872F08000000042270CCDB933609000000000000000000000000083089D5CD76250500000000 +0A3999DED0772605000000011559C3ECBA4F100F4CB9E9B94E10000000072E85D4D27F2B06020F +346A9BBCCBCECDCCCDD5E9F9DC872F08000000000E47B1E6BC4E0F000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000A3795DFDA893008 +00000000000000000000000000042270CCDB9336090000000000000E49B3EAC55D17020000000C +40A4E4CF722305000000000000000000000000000000000000052576D2E7A8420C000000000000 +0000000000000000000F4BB8EFCE6B1F0400000000000000000000062A7ED6E7A5400C00000000 +08318ADBE19739184BB6E6B64B0F000000083089D7D4822C0700000001091C344C6685AEDBF0D3 +843008000000000000000000000000000000000000072F87D9E199390A00000006287BD4E6A440 +132F87D9E199390A00000006287BD4E6A4400C0000000000000D46AFEACC691E03000000000000 +0000000000000000000000000000000D45AEEACF70220400000008328CDEE7A23F1846AEE7C762 +1A02000000000000000000000000000F46A6DDBB5C284AA8DEBC5D190200000000000000083089 +D5CD76250500000000000B3EA0E2CD7022040000000000000000000D46AEE7C7621A0200000000 +000000000000000000000000000000000000000000000000072F87D9E199390A00000006287BD4 +E6A4400C0000000000000D46AFEACC691E0300000000000000092A6DB8DFC47C340D0100000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000F4EBDF1CC661C03000000000D45AEEACF70220400000008328CDEE7A23F0B0000000000 +000000000000000000000000072F87D9E199390A00000006287BD4E6A4453273C7ECEDE7E5E5E5 +E6ECFAFFFFFCEBCC8B3D3987D9E199390A00000006287BD4E6A4400C0000000000000000000006 +297BD4E5A4400C0000000000000000000000000000000000083189DAE096380A000000001254C1 +F0C4591C3087D9E199390A00000006287BD4E6A440132F87D9E199390A00000006287BD4E6A440 +0C0000000000000D46AFEACC691E03000000000000000000000000000000000000000000000525 +76D2E7A8420C000000000000000000000E4BB6E6B64B0F000000083089D7D4822C070000000422 +70CCDB933609000000000000000E4BB6E6B64B0F000000083089D7D4822C070000052474CCD68B +3108000000000000000D46AEE7C7621A0200000000000000000000000000000000000000000000 +0000000000000000000000000F4BB8EFCE6B1F04000000000D46AEE7C7621A0200000000000000 +000000000B3EA0E2CD702204000000000000000000000F4CB9E6B4490E000000072C82D3D3822C +070F4CB9E6B4490E000000072C82D3D3822C113999DED0772605000000011559C3ECBA4F100000 +00000D47B1E6BB4E0F0000000000000A3999DED0772605000000011559C3ECBA4F1E49B3E9C45B +16010000000B3EA1E3CF722305000004206BC5D99A5161B5DDAE4F130100000000000000000000 +0000000000000000000D45AEEACF70220400000008328CDEE7A23F1846AEE7C7621A0200000000 +0000000000000000000F46A6DDBB5C284AA8DEBC5D190200000000000000083089D5CD76250500 +000000000B3EA0E2CD7022040000000000000000000D46AEE7C7621A0200000000000000000000 +0000000001091C344C6685AEDBF0D3843008000000000000000000000000000000000000000000 +0000000F4EBDF1CC661C0300000000000F4CB9E6B4490E000000072C82D3D3822C070000000422 +70CCDB9336090000000000000D46AEE7C7621A0200000000000000000000000000052474CCD68B +310800000000000000000F4CB9E6B4490E000000072C82D3D3822C0F318AD9DD98471503000008 +3088D8DA8C3208000000042270CCDB933609000000000000000000000000083089D5CD76250500 +0000000A3999DED0772605000000011559C3ECBA4F100F4CB9E6B4490E000000072C82D3D3822C +0F318AD9DD984715030000083088D8DA8C3208000000000D47B1E6BB4E0F000000000000000000 +00000002070F13120C050000000000000000000000000000000000000000000000000A3795DFDA +89300800000000000000000000000000042270CCDB9336090000000000000E48B2E9C258150100 +00000B3D9FE1CE722305000000000000000000000000000000000000052576D2E7A8420C000000 +0000000000000000000000000F4BB8EFCE6B1F0400000000000000000000062A7ED6E7A5400C00 +0001092A6FC6EECC6F220D3794DED5822C0700062268C5F4DA822C07030F23251506000000041F +67C8EAB44B0F000000000000000000000000000000000000000A3691DDE09A4411030B3282D4E6 +AA4A11010A3691DDE09A4411030B3282D4E6AA4A11010000000000000D46AFEACC691E03000000 +0000000000000000000000000000000000000D45AEEACF702204020D2E69B4E8DD8F370B031A5A +B5E7D082380F020000020E273D3718050000000E43A3DCCCA5C2E0B95A18020000000000000000 +083089D5CD762505000000000002154FAAE4D3863B100200000411232410061A5AB5E7D082380F +020000020E273D3718050000000000000000000000000000000000000A3691DDE09A4411030B32 +82D4E6AA4A11010000000000000D46AFEACC691E0300000000051E5AA7D9CC8A40120200000000 +00000000000000000317477F9787551F0500000000000000000000000000000000000000000000 +0000000000000F4EBDF1CC661C03000000000D45AEEACF702204020D2E69B4E8DD8F370B000000 +000000000000000000000000000000000A3691DDE09A4411030B3282D4E6AA4A11010000000000 +000000083089DADF95370A00000A3691DDE09A4411030B3282D4E6AA4A11061A3A3E2810030000 +020F377DCCEECA6E2305000000000317477F9787551F0500000000000B3A96DACC7E3710030210 +4298E0E197380A0A3691DDE09A4411030B3282D4E6AA4A11010A3691DDE09A4411030B3282D4E6 +AA4A11010000000000000D46AFEACC691E03000000000000000000000000000000000000000000 +00052576D2E7A8420C00000000000000000000093794DED5822C0700062268C5F4DA822C070000 +0002175DC5EBB8511301000000000000093794DED5822C0700062268C5F4DA822C070000052474 +CCD68B310800000000000000031A5AB5E7D082380F020000020E273D3718050000000000000000 +0000000000000000000000000000000F4BB8EFCE6B1F0400000000031A5AB5E7D082380F020000 +020E273D37180502154FAAE4D3863B100200000411232410030F4CB9E6B4490E000000072C82D3 +D3822C070F4CB9E6B4490E000000072C82D3D3822C091757B5E7C972280700041C5CB5E7CB7325 +05000000000A3795DED5812E080000000000021757B5E7C972280700041C5CB5E7CB732509216B +C5E5B55B1B0405184A98E4FCD372230500000002185AB7E9EDF2E4A0420E000000000000000000 +0000000000000000000000000D45AEEACF702204020D2E69B4E8DD8F370B031A5AB5E7D082380F +020000020E273D3718050000000E43A3DCCCA5C2E0B95A18020000000000000000083089D5CD76 +2505000000000002154FAAE4D3863B100200000411232410061A5AB5E7D082380F020000020E27 +3D371805030F23251506000000041F67C8EAB44B0F000000000000000000000000000000000000 +0000000000000F4EBDF1CC661C0300000000000F4CB9E6B4490E000000072C82D3D3822C070000 +0002175DC5EBB85113010000000000031A5AB5E7D082380F020000020E273D3718050000052474 +CCD68B310800000000000000000F4CB9E6B4490E000000072C82D3D3822C123EA0E3D177260500 +00092F7FD6FBE18C320800000002175DC5EBB85113010000000000000000000000083089D5CD76 +250500000000021757B5E7C972280700041C5CB5E7CB7325050F4CB9E6B4490E000000072C82D3 +D3822C123EA0E3D17726050000092F7FD6FBE18C3208000000000A3795DED5812E080000000000 +0000000000021A62CAFEF0A5400C00000000000000000000000000000000000000000000000A37 +95DFDA8930080000000000000000000000000002175DC5EBB8511301000000000004216CC5DCA2 +49130200082C7ED8F9D3722305000000000000000000000000000000000000052576D2E7A8420C +0000000000000000000000000000000F4BB8EFCE6B1F0400000000000000000000062A7ED9FFFF +F5EFEDEDEDECE4CCA2692D0B010007276BB1DDE5D4C2BBAE9FB6E1D5822C0707276DB0D5E1E2E1 +E4E9E7D2A76A2C0A01000000000000000000000000000000000000000002123D7DB8DAE7E9E8DF +C38E4C1A0400000002123D7DB8DAE7E9E8DFC38E4C1A040000000B3A95D7EFF3F9FFFFFFFDF5F2 +E5B1511401000000000000000000000000000000000D45AEF3FFFBF2EEECE6D8BC8F57270A0100 +000004184680B3D4DFDFDFE2E5E1CFA7682606000000000D40A0EDFFF9B956160200000002174F +9BC2CCCED8EEFFFEE9D5CDCCC093410F000003154079AED0DDDEDEDFDED0A66121050004184680 +B3D4DFDFDFE2E5E1CFA76826060000000000000000000000000000000000000002123D7DB8DAE7 +E9E8DFC38E4C1A040000000B3A95D7EFF3F9FFFFFFFDF5F2E5B1511D3691E4FFFFFAF3F2F2F2F2 +F2F2EBCA7D2D0700000000052677D6FEE490340900000000000000000000000000000000000000 +000000000C3F9CDBF0F3FAFFFFFFFCF5F2E5B253150E45AEF3FFFBF2EEECE6D8BC8F57270A0100 +000000000000000000000000000000000000000002123D7DB8DAE7E9E8DFC38E4C1A0400000000 +000000000000083089DADF95370A00000002123D7DB8DAE7E9E8DFC38E4C1A0400082E79B8DCEE +F4F4F3F4F1E4C7995E2609000000000000052677D6FEE490340900000000000003144180B9DBE8 +E7E5E4DBBC85461603000002123D7DB8DAE7E9E8DFC38E4C1A0400000002123D7DB8DAE7E9E8DF +C38E4C1A040000000B3A95D7EFF3F9FFFFFFFDF5F2E5B151140100000000000000000000000000 +00000000052576D2E7A8420C000000000000000000000007276BB1DDE5D4C2BBAE9FB6E1D5822C +070000000003184F98CDE0DCD4D1C5994712010007276BB1DDE5D4C2BBAE9FB6E1D5822C070000 +052474CCD68B310800000000000000000004184680B3D4DFDFDFE2E5E1CFA76826060000000000 +0000000000000000000000000000000000000F4BB8EFCE6B1F0400000000000004184680B3D4DF +DFDFE2E5E1CFA7682606000003154079AED0DDDEDEDFDED0A66121050F4CB9E6B4490E00000007 +2C82D3D3822C070F4CB9E6B4490E000000072C82D3D3822C070006215997C7DDE1E0E0DFCFA66A +2E0C01000000000000072669AFDEEEE9E1D2A45015020006215997C7DDE1E0E0DFCFA66A2E0C01 +00010B2D6BABD5E3E1DAD1B6A1BEE3C8691E0300000000011351B7F2E392370A00000000000000 +0000000000000000000000000000000D45AEF3FFFBF2EEECE6D8BC8F57270A0100000004184680 +B3D4DFDFDFE2E5E1CFA7682606000000000D40A0EDFFF9B956160200000002174F9BC2CCCED8EE +FFFEE9D5CDCCC093410F000003154079AED0DDDEDEDFDED0A66121050004184680B3D4DFDFDFE2 +E5E1CFA768260607276DB0D5E1E2E1E4E9E7D2A76A2C0A01000000000000000000000000000000 +000000000C3F9CDBF0F3FAFFFFFFFCF5F2E5B25315010F4CB9E6B4490E000000072C82D3D3822C +070000000003184F98CDE0DCD4D1C5994712010004184680B3D4DFDFDFE2E5E1CFA76826060000 +052474CCD68B310800000000000000000F4CB9E6B4490E000000072C82D3D3822C07072564A6CF +D7C9B7AEADA597ADDEDA8C32080000000003184F98CDE0DCD4D1C599471203174F9BC2CCCED8EE +FFFEE9D5CDCCC093410F0006215997C7DDE1E0E0DFCFA66A2E0C01000F4CB9E6B4490E00000007 +2C82D3D3822C07072564A6CFD7C9B7AEADA597ADDEDA8C32080000000000072669AFDEEEE9E1D2 +A45015020000000008338EE0EFB659190300000000000000000000000000000000000000000000 +000A3795E6FFFFF7F3F2F2F2F2F2F2EFD9983C0B00000003184F98CDE0DCD4D1C599471201010C +2E6CACD4DBCAB8B2B1B1CDEBCE722305000000000000000000000000000000000000052576D2E7 +A8420C0000000000000000000000000000000F4BB8EFCE6B1F0400000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000002070A0601000000042068C1D99A3B0A00000000011044A0E2D4802C070000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000052574CAD1853008000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000111479DD0DAD6D2D0D2D0BA894A18040001134CA1D5E8E4C587401202000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000F0B19BF221D660601000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000317498CBFDEEFF6F7F7F2E0BC894C1A040001114496CDE6EFF3F5 +F7F4E6C8995D2408000317498CBFDEEFF6F7F7F2E0BC894C1A0400000000000000000000000000 +0000000000000B3C9EE4D9852E07000000031D68CCF0BC4D0F010B2B659FCDE8F2F1EDECE7D6B1 +722B08062A7ED9FFFFF2EBE9E9E9E8DEC291531D05000000000000000000000000000000000000 +00000337131CCB2729EF2928DC221D710802000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000130E20EF2924800801000000000000000000 +000000000000000000000001321725EF2929EF2929D91809090000000000000000000000000000 +00000000000000000000000000000000000A3385C6B25E1C0300000B3C9EE4D9852E0700000003 +1D68CCF0BC4D0F000000000B3D9EEBFFF8B75214010000000C3FA3EDFFFAEFEAEAEBEAE0C5955A +230A1C60B9E7F2F2F2F3FAFFFFFFFDF5F2F2F2ECCB7F2E080112489FCA9B461101000000000000 +000000000000000000000000000000000000000C3F9CDBF0F3FAFFFFFFFCF5F2E5B25315010000 +02113872AACFE2E9ECEEEDDEB7732B070000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000003163C564B2C110402081F4D98E1EDB04B11010513211C0D +03000004133981D5EFBA541404163C564B2C110402081F4D98E1EDB04B11010000000000000000 +0000000000000000000B3C9EE4D9852E07000000031D68CCF0BC4D142674CCE3AF5F270C020001 +0B2139361805062A7ED6E7A5400C0000010E3C93DFE59F3D0B0000000000000000000000000000 +000000080816D12929D61B13580E1071181C900B02000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000804062A0912BC2929D91809090000000000000000000000 +000000000000000000000000000000000000031A5DB8D59A3E0C000000000B3C9EE4D9852E0700 +0000031D68CCF0BC4D0F000000093693D8D5B4CFE0AC4A100000000C3FA3E5D47B28060002103D +8CDBF1BE5D190200000000000F4BB8EFCE6B1F04000000000000000000072C80CEC97526050000 +0000000000000000000000000000000000000000000000000000000F4EBDF1CC661C0300000000 +00021858B4E8D68D4315030001091E373719050000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000011354BDEFC9641C030000 +0000000000020A1D458BD8E8AC4B1101000000000000000000011354BDEFC9641C030000000000 +0000000000000000000000000B3C9EE4D9852E07000000031D68CCF0BC4D1A3C9DE5E1953A0B00 +000000000000000000062A7ED6E7A5400C000004184EA4E5DE9034090000000000000000000000 +0000000000000C0B1CE62928B511060800000000000000000000022A1019BF2528EF2928D52018 +550601000001291523EF29249C1A20D82829EF261C420408822429EF2929EF2924800801000000 +0001076D1D23DF2829EF2928DA211A5B060100000000020CAE2929D91809090000000000000000 +0000000000000000000000000000000000000000041F69C6DC9B3C0B00000000000B3C9EE4D985 +2E07000000031D68CCF0BC4D0F0000083088D5CE7A4267C2DFA3420D00000C3FA3E5D47B280600 +00000B3FA2E8DF90340900000000000F4BB8EFCE6B1F0400000000000000000000062B7FD2D484 +2D07000000000000000000000000000000000000000000000000000000000F4EBDF1CC661C0300 +000000041F6ACBEFBF5A1702000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000005236BC0E3BC662004 +000000000B3B95D7F5FFFFFFD7904414020000000000000000000005236BC0E3BC662004000000 +0000000000000000000000000000000B3C9EE4D9852E07000000031D68CCF0BC4D100C337EC7F3 +F8E3C7AD9579593615050000062A7ED9FFFEEFE7E7EEFBFFF9CC833A0F01000000000000000000 +00000000000000000001030A872329EF2929E7231D8610080F0000080816CE2928BC160E420C11 +952429ED20111F0101291523EF2929D81C124609093F0E0D2301011606073B1322EF2924800801 +0000000001065613104A0A082F0A11A62629E51C0B0D000000020CAE2929D91809090000000000 +0000000000000000000000000000000000000000000000114EB6E8BF56140100000000000B3C9E +E4D9852E07000000031D68CCF0BC4D0F0006297CD1D98D330E2575CFDE993A0A000C3FA3E5D47B +2806000312408EDBEBB355170200000000000F4BB8EFCE6B1F0400000000000000000000000C42 +A7E4C8671D030000000000000000000000000000000000000000000000000000000F4EBDF1CC66 +1C03000000000A3999E3E195370900000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000010F3882C9DEAF5F1F +05000000000000000000000005174389D0E4B15718030000000000010F3882C9DEAF5F1F050000 +0000000000000000000000000000000000000B3C9EE3D9852E07000000031D68CCF0BB4D0F0000 +00020C213B556D87A8D0F0E9AF591B092A7ED6E7A5400C000003133D85CFDFA74D140200000000 +0000000000000000000000000000000101053A1017A72328EF2929BF1307271322EF2929EF2929 +EF2929EF2929EF281C420201291523EF29226A0601000000000000000000000000130E20EF2924 +800801000000010208651A20D22628EE2929EF2929EF21121E010000020CAE2929D91809090000 +0000000000000000000000000000000000000000000000000004206DCCE4A5410C000000000000 +0B3C9EE3D9852E07000000031D68CCF0BB4D0F042371CDE2A2400C0008318BDADB8E33090C3FA3 +EDFFF8EBE9F0FDFFFACE873F1202000000000000000F4BB8EFCE6B1F0400000000000000000000 +00083088D8D98A31080000000000000000000000000000000000000000000000000000000F4EBD +F1CC661C03000000000A3A99E3E195370900000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000092A6DB8DFC47C34 +0D0100000000000000000000000000000006297BD4E5A4400C000000092A6DB8DFC47C340D0100 +00000000000000000000000000000000000000000008318BD9D8883008000000031F6ACBE5A842 +0C00000000000000000000031D66C9EFBD52182A7ED6E7A5400C0000000008318ADBE197390A00 +05246DBCE1E9E9E9E5CA863309000000000103000000000000020A932629EF21113D1322EF2923 +810C082B07072B07072B07050C0001291523EF2920590400000000000000000000000000130E20 +EF29248008010000011D1121EF2928BA140C32080D8F2529EF221323010000020CAC2829DC190A +0A000000000000000000000000000000000000000000000000000000021A62C7E8AF460D000000 +00000008318BD9D8883008000000031F6ACBE5A8420F1E67C9FCFFF1E8E5E5E5E7EEFCFFDB832D +133FA3E5D47B28060310377ECAE5B9631F040000000000000F4BB8EFCE6B1F0400000000000000 +00000000093692DCD47F2B06000000000000000000000000000000000000000000000000000000 +0F4EBDF1CC661C030000000004206BCCEFBF5A1702000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000051E5AA7D9CC8A40 +120200000000000000051A3A3E2810030000020F377DCCEECA6E2305051E5AA7D9CC8A40120200 +000000000000000000000000000000000000000000000000031B61C0E7BF67220600031852A8E2 +D079280A183C5040200901000003144393DDE39C3B102A7ED6E7A5400C000001092A6FC6EECC6F +2204000000000000000000000000000000000D0B1BC31E1871100F5A131BD52929E41C0B170817 +D12929D81C134F0B0C4F11169C190E1A0001291523EF2920590400000000000000020205260708 +3B1322EF2925960E092B0706311322EF2926960B03130A15C92929EF22132301000001098B2529 +EF2419560A0829050203000000000000000000000000000000000000000000000A3999DECD7123 +040000000000031B61C0E7BF67220600031852A8E2D0792A1F5DC0EABE5A1702000000000E46AA +E8D2773244A3E5D47B2806000000072C7ED2E5AB4F1502000000000F4BB8EFCE6B1F0400000000 +000000000000011658BDE5B14C1000000000000000000000000000000000000000000000000000 +0000000F4EBDF1CC661C030000000000031A5BB8EAD68C4215030000071B343519050000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000093591E4FFFF +FAF3F2F2F2F2F2F2EBCA7D2D0F2E79B8DCEEF4F4F3F4F1E4C7995E260900093591E4FFFFFAF3F2 +F2F2F2F2F2EBCA7D2D07000000000000000000000000000000000000000A2B67A3CFE6ECECECE9 +D7AF75360F01041C5598C7E3EFF1EDEBEAE7D9B783461703062A7ED9FFFFF5EFEDEDEDECE4CCA2 +692D0B010000000000000000000000000000000000070610952024E42929EF2927D01E164A0501 +0000022B1019BB2527EF2929EE2724B5170B120001291523EF29205904000000000000000B0A1A +E02929EF2929EF2929EF2929EF292164080B7F1F25EB2928DC221FB92629EF2213230100000001 +24111CCE2829EF2929EF200F1500000000000000000000000000000000000000000000000E419E +D9BD601B030000000000000A2B67A3CFE6ECECECE9D7AF7536101554B9ECCC6C20040000000000 +011454B9EDCC7960A7E5D47B28060000000002144EAAE6D68430080000000F4BB8EFCE6B1F0400 +000000000000000001114AA9DBB355160200000000000000000000000000000000000000000000 +000C3F9CDBF0F3FAFFFFFFFCF5F2E5B2531501000003133B76ADD1E3E9EBEDECDDB6722A070000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00072B7DC7C3722505000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000003195BB3CF943D0D000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000010D32636B4216030000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000010E35656A40150300000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000F0B19BF221D660601000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000083089D5CD76250500000000000000000000000000000009 +3592DACC7223050E49B5F7FFF8EDEBEDF3F4E9CFA3692D0B010000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000093592DACC7223 +050000000000000000000000000000000000000000000000000000000000000000000000000000 +00021138666D4A1B04000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000002113A7AB5D7E3E5E4DCC18B49180400000000000000000000000000000000000000000000 +071F5390C2DFEEF3F4F3E4B4652105000002113A7AB5D7E3E5E4DCC18B49180400000002113A7A +B5D7E3E5E4DCC18B49180400000110408BBEDAEEFFFFFFCE691E03000000000000000000000000 +00000000000000000000052576D4FFFFF9F3F2F2F2F2F2F2E9C48A84BEE7F2F2F2F3FAFFFFFFFD +F5F2F2F2ECCB8245518CBFDEEFF6F7F7F2E0BC894C1A040001114496CDE6EFF3F5F7F4E6C8995D +2408000317498CBFDEEFF6F7F7F2E0BC894C1A0400000000000000000000000000000000000000 +0B3C9EE4D9852E07000000031D68CCF0BC4D0F010B2B659FCDE8F2F1EDECE7D6B1722B08062A7E +D9FFFFF2EBE9E9E9E8DEC291531D0500000000000000000000000000000000000000000337131C +CB2729EF2928DC221D710802000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000130E20EF2924800801000000000000000000000000000000 +000000000001321725EF2929EF2929D91809090000000000000000000000000000000000000000 +00000000000000000000000A3385C6B25E1C0300000B3C9EE4D9852E07000000031D68CCF0BC4D +0F000000000B3D9EEBFFF8B75214010000000C3FA3EDFFFAEFEAEAEBEAE0C5955A230A1C60B9E7 +F2F2F2F3FAFFFFFFFDF5F2F2F2ECCB7F2E080112489FCA9B461101000000000000000000000000 +000000000000000000000000000C3F9CDBF0F3FAFFFFFFFCF5F2E5B2531501000002113872AACF +E2E9ECEEEDDEB7732B070000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010A1D2E2D19080100000000000000000000000000 +0000093592DACC7223050E49B5EDCC691E030006184185D3F3CD71230500000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000093592DA +CC7223050000000000000000000000000000000000000000000000000000000000000000000000 +00000000042270CCDB933609000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000009348FDCE0994311020A3181D4E5A94910010000000000000000000000000000000000 +00052674CDE9C175330F02000614231E0C020009348FDCE0994311020A3181D4E5A94910010934 +8FDCE0994311020A3181D4E5A94910010009203D42322C54B3EACC691E03000000000000000000 +00000000000000000000000000052576D2E7A8420C0000000000000000000000000000000F4BB8 +EFCE6B1F040000000003163C564B2C110402081F4D98E1EDB04B11010513211C0D030000041339 +81D5EFBA541404163C564B2C110402081F4D98E1EDB04B11010000000000000000000000000000 +0000000B3C9EE4D9852E07000000031D68CCF0BC4D142674CCE3AF5F270C0200010B2139361805 +062A7ED6E7A5400C0000010E3C93DFE59F3D0B0000000000000000000000000000000000080816 +D12929D61B13580E1071181C900B02000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000804062A0912BC2929D91809090000000000000000000000000000000000 +000000000000000000000000031A5DB8D59A3E0C000000000B3C9EE4D9852E07000000031D68CC +F0BC4D0F000000093693D8D5B4CFE0AC4A100000000C3FA3E5D47B28060002103D8CDBF1BE5D19 +0200000000000F4BB8EFCE6B1F04000000000000000000072C80CEC97526050000000000000000 +0000000000000000000000000000000000000000000F4EBDF1CC661C030000000000021858B4E8 +D68D4315030001091E373719050000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000C3B8DBCC9D4ECF8D37625050000000000010C2E6CAC +D9EDEDDECBB2A1BEE4CD7223050E49B5EDCC691E03000000093590E0E7A23F0B00052474CCDAA3 +7C91AEBBC1C9D2CE9F460F06215896C7DEE4E4E4E1CFA5692E0C0100010C2E6CACD9EDEDDECBB2 +A1BEE4CD7223050F4CB9E6B4490E000000072C82D3D3822C07000003153F78ADD1DFE2E2E3E0D0 +A56021103787B9C8D0E5FDFFEED6CAC7C7BD924411010000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000072F86D9E199390B04070507297BD4E5A440112267B8DBB25F1E040002154DA1DA +CA7E3010297CD3DE973A0B00000000000000000000072F86D9E199390B04070507297BD4E5A440 +132F86D9E199390B04070507297BD4E5A4400C0000000000000D46AFEACC691E03000000000000 +00000000000000000000000000000000052576D2E7A8420C000000000000000000000000000000 +0F4BB8EFCE6B1F040000000000000000000000000000011354BDEFC9641C030000000000000002 +0A1D458BD8E8AC4B1101000000000000000000011354BDEFC9641C030000000000000000000000 +0000000000000B3C9EE4D9852E07000000031D68CCF0BC4D1A3C9DE5E1953A0B00000000000000 +000000062A7ED6E7A5400C000004184EA4E5DE9034090000000000000000000000000000000000 +0C0B1CE62928B511060800000000000000000000022A1019BF2528EF2928D52018550601000001 +291523EF29249C1A20D82829EF261C420408822429EF2929EF29248008010000000001076D1D23 +DF2829EF2928DA211A5B060100000000020CAE2929D91809090000000000000000000000000000 +0000000000000000000000000000041F69C6DC9B3C0B00000000000B3C9EE4D9852E0700000003 +1D68CCF0BC4D0F0000083088D5CE7A4267C2DFA3420D00000C3FA3E5D47B28060000000B3FA2E8 +DF90340900000000000F4BB8EFCE6B1F0400000000000000000000062B7FD2D4842D0700000000 +0000000000000000000000000000000000000000000000000F4EBDF1CC661C0300000000041F6A +CBEFBF5A1702000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000083089D5CD7625050000000004226E +C8E8BF6F300E04124499E6FDD37223050E49B5EDCC691E03020C244F92DAF3C86B210400052474 +D3FCE7A04D1603000001060B091957B5E7CB752A0801041E5FB7E7CB732509226EC8E8BF6F300E +04124499E6FDD37223050F4CB9E6B4490E000000072C82D3D3822C0702154FAAE4D4893E110200 +0006172B291203000000042270CCDB933609000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000C43A9E8D2783F64C2F1D3793D5FC4F1C2571401031B58AAD9BB6E3F5EAC +DBBE6E2607000C41A6E4D08D83A5C6D6DDDACAA8733911020C43A9E8D2783F64C2F1D3793D5FC4 +F1C2572044A9E8D2783F64C2F1D3793D5FC4F1C257140100000000000D46AFEACC691E03000000 +00000000000000000000000000000000000000052576D4FFFFF6EFEEEEEEEEEEE5BE6D24050000 +0000000F4BB8EFCE6B1F040000000000000000000000000005236BC0E3BC662004000000000B3B +95D7F5FFFFFFD7904414020000000000000000000005236BC0E3BC662004000000000000000000 +0000000000000000000B3C9EE4D9852E07000000031D68CCF0BC4D100C337EC7F3F8E3C7AD9579 +593615050000062A7ED9FFFEEFE7E7EEFBFFF9CC833A0F01000000000000000000000000000000 +00000001030A872329EF2929E7231D8610080F0000080816CE2928BC160E420C11952429ED2011 +1F0101291523EF2929D81C124609093F0E0D2301011606073B1322EF2924800801000000000106 +5613104A0A082F0A11A62629E51C0B0D000000020CAE2929D91809090000000000000000000000 +0000000000000000000000000000000000114EB6E8BF56140100000000000B3C9EE4D9852E0700 +0000031D68CCF0BC4D0F0006297CD1D98D330E2575CFDE993A0A000C3FA3E5D47B280600031240 +8EDBEBB355170200000000000F4BB8EFCE6B1F0400000000000000000000000C42A7E4C8671D03 +0000000000000000000000000000000000000000000000000000000F4EBDF1CC661C0300000000 +0A3999E3E195370900000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000083089D5CD76250500000000 +0E49B3EAC55D17020000000C40A4E4CF7223050E49B5F7FFF5EAE6E7E9E4D6BC925C2609000000 +052474CFE29F3D0B000000000000000A3999DED0772605000000011559C3ECBA4F1E49B3EAC55D +17020000000C40A4E4CF7223050F4CB9E6B4490E000000072C82D3D3822C070B3EA0E2CD702204 +00000000000000000000000000042270CCDB933609000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000C43A9E8D2762813243227121959C4F1C3571401000002144A9FE6 +FEF1B6601E040000000C43A9F1FFD9904C2009051952A6E5DD8E341543A9E8D276281324322712 +1959C4F1C3572044A9E8D2762813243227121959C4F1C357140100000000000D46AFEACC691E03 +00000000000000000000000000000000000000000000052576D2E7A8420C000000000000000000 +0000000000000F4BB8EFCE6B1F0400000000000000000000010F3882C9DEAF5F1F050000000000 +00000000000005174389D0E4B15718030000000000010F3882C9DEAF5F1F050000000000000000 +0000000000000000000000000B3C9EE3D9852E07000000031D68CCF0BB4D0F000000020C213B55 +6D87A8D0F0E9AF591B092A7ED6E7A5400C000003133D85CFDFA74D140200000000000000000000 +0000000000000000000101053A1017A72328EF2929BF1307271322EF2929EF2929EF2929EF2929 +EF281C420201291523EF29226A0601000000000000000000000000130E20EF2924800801000000 +010208651A20D22628EE2929EF2929EF21121E010000020CAE2929D91809090000000000000000 +0000000000000000000000000000000000000004206DCCE4A5410C0000000000000B3C9EE3D985 +2E07000000031D68CCF0BB4D0F042371CDE2A2400C0008318BDADB8E33090C3FA3EDFFF8EBE9F0 +FDFFFACE873F1202000000000000000F4BB8EFCE6B1F040000000000000000000000083088D8D9 +8A31080000000000000000000000000000000000000000000000000000000F4EBDF1CC661C0300 +0000000A3A99E3E195370900000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000083089D5CD76250500 +0000000E48B2E9C25815010000000B3D9FE1CE7223050E49B5EDCC691E03000000000000000000 +000000052474CCD68B3108000000000000000A3999DED0772605000000011559C3ECBA4F1E48B2 +E9C25815010000000B3D9FE1CE7223050E4BB6E6B64B0F000000083089D7D4822C070B3EA0E2CD +70220400000000000000000000000000042270CCDB933609000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000072F87D9E199390A00000006287BD4E6A4400C000000092C +77C5E8E8EBD48D3D0F010000083189DAE096380A000000001254C1F0C4591C3087D9E199390A00 +000006287BD4E6A440132F87D9E199390A00000006287BD4E6A4400C0000000000000D46AFEACC +691E0300000000000000000000000000000000000000000000052576D2E7A8420C000000000000 +0000000000000000000F4BB8EFCE6B1F040000000000000000092A6DB8DFC47C340D0100000000 +000000000000000000000006297BD4E5A4400C000000092A6DB8DFC47C340D0100000000000000 +00000000000000000000000000000008318BD9D8883008000000031F6ACBE5A8420C0000000000 +0000000000031D66C9EFBD52182A7ED6E7A5400C0000000008318ADBE197390A0005246DBCE1E9 +E9E9E5CA863309000000000103000000000000020A932629EF21113D1322EF2923810C082B0707 +2B07072B07050C0001291523EF2920590400000000000000000000000000130E20EF2924800801 +0000011D1121EF2928BA140C32080D8F2529EF221323010000020CAC2829DC190A0A0000000000 +00000000000000000000000000000000000000000000021A62C7E8AF460D00000000000008318B +D9D8883008000000031F6ACBE5A8420F1E67C9FCFFF1E8E5E5E5E7EEFCFFDB832D133FA3E5D47B +28060310377ECAE5B9631F040000000000000F4BB8EFCE6B1F0400000000000000000000000936 +92DCD47F2B060000000000000000000000000000000000000000000000000000000F4EBDF1CC66 +1C030000000004206BCCEFBF5A1702000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083089D5CD76 +25050000000004216CC5DCA249130200082C7ED8F9D37223050E49B5EDCC691E03000000000000 +000000000000052474CCD68B310800000000000000021757B5E7C972280700041C5CB5E7CB7325 +09216CC5DCA249130200082C7ED8F9D3722305093794DED5822C0700062268C5F4DA822C070215 +4FAAE4D3863B1002000004112324100300000002175DC5EBB85113010000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000A3691DDE09A4411030B3282D4E6AA4A1101010D +3888D0D696441D3683CEDA9E4B1502000B3A96DACC7E37100302104298E0E197380A0A3691DDE0 +9A4411030B3282D4E6AA4A11010A3691DDE09A4411030B3282D4E6AA4A11010000000000000D46 +AFEACC691E0300000000000000000000000000000000000000000000052576D2E7A8420C000000 +0000000000000000000000000F4BB8EFCE6B1F040000000000051E5AA7D9CC8A40120200000000 +000000051A3A3E2810030000020F377DCCEECA6E2305051E5AA7D9CC8A40120200000000000000 +000000000000000000000000000000000000031B61C0E7BF67220600031852A8E2D079280A183C +5040200901000003144393DDE39C3B102A7ED6E7A5400C000001092A6FC6EECC6F220400000000 +0000000000000000000000000D0B1BC31E1871100F5A131BD52929E41C0B170817D12929D81C13 +4F0B0C4F11169C190E1A0001291523EF29205904000000000000000202052607083B1322EF2925 +960E092B0706311322EF2926960B03130A15C92929EF22132301000001098B2529EF2419560A08 +29050203000000000000000000000000000000000000000000000A3999DECD7123040000000000 +031B61C0E7BF67220600031852A8E2D0792A1F5DC0EABE5A1702000000000E46AAE8D2773244A3 +E5D47B2806000000072C7ED2E5AB4F1502000000000F4BB8EFCE6B1F0400000000000000000000 +011658BDE5B14C10000000000000000000000000000000000000000000000000000000000F4EBD +F1CC661C030000000000031A5BB8EAD68C4215030000071B343519050000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000002174F9BC2CCCED8EE +FFFEE9D5CDCCC093410F010C2E6CACD4DBCAB8B2B1B1CDEBCE7223050E49B5EDCC691E03000000 +000000000000000000052474CCD68B310800000000000000000006215997C7DDE1E0E0DFCFA66A +2E0C0100010C2E6CACD4DBCAB8B2B1B1CDEBCE7223050007276BB1DDE5D4C2BBAE9FB6E1D5822C +07000003154079AED0DDDEDEDFDED0A66121050000000003184F98CDE0DCD4D1C5994712010000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000002123D7DB8DAE7E9E8DFC38E4C1A0402 +134799D9D48C3A0E010000082B77C6DFAF5B1C0403144180B9DBE8E7E5E4DBBC85461603000002 +123D7DB8DAE7E9E8DFC38E4C1A0400000002123D7DB8DAE7E9E8DFC38E4C1A040000000B3A95D7 +EFF3F9FFFFFFFDF5F2E5B15114010000000000000000000000000000000000052576D2E7A8420C +0000000000000000000000000000000F4BB8EFCE6B1F0400000000093591E4FFFFFAF3F2F2F2F2 +F2F2EBCA7D2D0F2E79B8DCEEF4F4F3F4F1E4C7995E260900093591E4FFFFFAF3F2F2F2F2F2F2EB +CA7D2D07000000000000000000000000000000000000000A2B67A3CFE6ECECECE9D7AF75360F01 +041C5598C7E3EFF1EDEBEAE7D9B783461703062A7ED9FFFFF5EFEDEDEDECE4CCA2692D0B010000 +000000000000000000000000000000070610952024E42929EF2927D01E164A05010000022B1019 +BB2527EF2929EE2724B5170B120001291523EF29205904000000000000000B0A1AE02929EF2929 +EF2929EF2929EF292164080B7F1F25EB2928DC221FB92629EF221323010000000124111CCE2829 +EF2929EF200F1500000000000000000000000000000000000000000000000E419ED9BD601B0300 +00000000000A2B67A3CFE6ECECECE9D7AF7536101554B9ECCC6C20040000000000011454B9EDCC +7960A7E5D47B28060000000002144EAAE6D68430080000000F4BB8EFCE6B1F0400000000000000 +000001114AA9DBB355160200000000000000000000000000000000000000000000000C3F9CDBF0 +F3FAFFFFFFFCF5F2E5B2531501000003133B76ADD1E3E9EBEDECDDB6722A070000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000072B7DC7C3 +722505000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000003195BB3CF943D0D000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000001 +0D32636B4216030000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000010E35656A40150300000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000F0B19BF221D660601000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000083089D5CD7625050000000000000337131CCB2729EF2928 +DC221D710802000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000130E20EF2924800801000000000000000000000000000000000000000001 +321725EF2929EF2929D91809090000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000001114496CDE6EFF3F5F7F4E6C8995D240800000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010A1D2E2D19080100000000080816D12929D61B13 +580E1071181C900B02000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000804062A0912BC2929D91809090000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000513211C0D03000004133981D5EFBA5414010000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000C3B8DBCC9D4ECF8D3762505000000000C0B1CE62928 +B511060800000000000000000000022A1019BF2528EF2928D52018550601000001291523EF2924 +9C1A20D82829EF261C420408822429EF2929EF29248008010000000001076D1D23DF2829EF2928 +DA211A5B060100000000020CAE2929D91809090000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000020A1D458BD8E8AC4B11010000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000083089D5CD7625050000000001030A +872329EF2929E7231D8610080F0000080816CE2928BC160E420C11952429ED20111F0101291523 +EF2929D81C124609093F0E0D2301011606073B1322EF29248008010000000001065613104A0A08 +2F0A11A62629E51C0B0D000000020CAE2929D91809090000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000B3B95D7F5FFFFFFD79044140200 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000083089D5CD76250500000000 +0000000101053A1017A72328EF2929BF1307271322EF2929EF2929EF2929EF2929EF281C420201 +291523EF29226A0601000000000000000000000000130E20EF2924800801000000010208651A20 +D22628EE2929EF2929EF21121E010000020CAE2929D91809090000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000005174389D0E4 +B15718030000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000083089D5CD76250500 +00000000000103000000000000020A932629EF21113D1322EF2923810C082B07072B07072B0705 +0C0001291523EF2920590400000000000000000000000000130E20EF29248008010000011D1121 +EF2928BA140C32080D8F2529EF221323010000020CAC2829DC190A0A0000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000006 +297BD4E5A4400C0000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083089D5CD76 +2505000000000D0B1BC31E1871100F5A131BD52929E41C0B170817D12929D81C134F0B0C4F1116 +9C190E1A0001291523EF29205904000000000000000202052607083B1322EF2925960E092B0706 +311322EF2926960B03130A15C92929EF22132301000001098B2529EF2419560A08290502030000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000051A3A3E2810030000 +020F377DCCEECA6E23050000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000002174F9BC2CCCED8EE +FFFEE9D5CDCCC09341160610952024E42929EF2927D01E164A05010000022B1019BB2527EF2929 +EE2724B5170B120001291523EF29205904000000000000000B0A1AE02929EF2929EF2929EF2929 +EF292164080B7F1F25EB2928DC221FB92629EF221323010000000124111CCE2829EF2929EF200F +150000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000082E79B8DCEE +F4F4F3F4F1E4C7995E260900000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000F4190BEC4A6662406000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000006244997AD7FA8AD7FA89D4B25070000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000005246573A8AA5B310A0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000021D1771E234726507030000000000000000000000000000000000 +0000000000000000000000000005072E6C1B414A07030000000000000000000000000000000000 +000000000000021D1771E234726507030000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000020D2238474C53575355544A41331D0C0200 +00020D233A444E565355574A2F1103000000020D2238474C53575355544A41331D0C0200000000 +020B1A2E40474F565355544734180600000107172B3F4C5055554B43331B0A0200000004102537 +47525355574F4A3E29140601000000031C6A6198A6341805000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002162971C2666133060100000000000000000000000000000000 +00000000000000000000000000000A3489D0D99E44110100000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041F67 +C3EEECC56A2005000000000000000000000000000000000000000A3489D0D99E4415236BC6EEEC +BF611B0300000000000000000000000000011352B5EEEECF802D07000000000000000000000000 +00000000000000000000000000000000000000000A3489D0D99E44110100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000061F4F727A714D1F060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00061F4F727A714D1F0600000000000623609EC3D8E7EEECEEE6D2B68B53210700000000031C6A +6198A6341805000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +000000000000000000000000000000000000000000000000000001060C1A1F1D48887FA89D4B25 +070000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000005246573A8AA5B310A0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0410005B6300937B009A75004B1D00031D1771E234726507030000000000000000000000000000 +000000000000000000000000000000000C0E5CD73482940D070000000000000000000000000000 +000000000000000000021D1771E234726507030000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000310253330241D1A18213245555752 +412109010310283937353B4955574A2F11030000000310253330241D1A18213245555752412109 +01020C264753554F3A2A201B1E262B281505000415355153554C382F38455457513D1D0701091F +4257534D39251E2331485753482A0D0200000002152A78CA6C6E42090100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005257B679EAD361804000000000000000000000000000000 +000000000000000000000000000000021550A9DDC97C2C07000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +041F67C3EEECC56A20050000000000000000000000000000000000021550A9DDC97C2C0705226B +C6EEECBF611B030000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000021550A9DDC97C2C07000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000C3E9FE3ECE19C3C0B0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000C3E9FE3ECE19C3C0B0000000000082C6A8E84685246455C89C3EDEEEAB65A19030000 +0002152A78CA6C6E42090100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000D216CC6728663120400000000000000051139 +626094A67FA8AD788D702F1603041D4F598FA17DA8AD7FA49E66694212050000000007327E7EA8 +9D4B250700000000000000081F32688A74A4AD7FA29A62623E120503124C907FA89B59758E77A7 +A970714311030003153D4F8AA37EA19459657E77A8AA5B310A00051E4191AD7F927151829C7DA8 +AD77723007071D31688A74A5AD7E9D90564C27080100010B273D76957AA8AD7FA7A46D71411003 +020E007C81005D26000401000D1E00827A0029221771E2347265080C381C73E1347C9212110602 +1757206ECF338ADF317398171F0F0111612A8AE2348AE2348AE2348AE23482940D070102175720 +6ECF338ADF317398171F0F00021D1771E2347265080C381C73E1347C92121106021757206ECF33 +8ADF317398171F0F00000000000000112B00715300170300000000000000000000000000020C26 +475753482A0D02000000000005193A53574A2F1103000000000000000000000000020C26475753 +482A0D040E284857503C1C070000000000000000000313314D5753411E070105163A5353533D18 +0506193B54524529120A0F213E54524322090100000000020B3A9E719D9E2B1002000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000D216CC6728663120400000000000000000000000000 +0000000000000000000000000000000000062570C1DEB25A1A0D3996DDE6B14E12010000000000 +000B3B9ADFE6AF4E1C295B92BED9E7EEEBDCC7A16A3510020000062979CCEEEECD9B98B7D7E9EC +EEDEA0452C67C3EEECC56A23153B80C7EDECD69A531D06000000000000062570C1DEB25A1A0300 +05226BC6EEECCD9794B8D9E8E8D19F5C200500072D82D2ECEEEEECEEEECF802D07000000000000 +07215186B4CFE4EEECEEE1C69A591F0500000000000000062570C1DEB25A1A03000007296CA7C9 +DEEAECEEEEE6D9BF935B230A2068C0EEEEC269210400011452B1E8EED5853108062979CCEEEECD +9B98B7D7E9ECEEDEA0410D000000000000000000000000000000041E66C0EEEEECEEEEECEEEEEC +EEEEECE19C3C0B010B2A5D92BED9E6EEEEE4D4B78A55220700020F3672A6CDE4ECEEEEEBE2CC9E +5A1E081E66C0EEEEECEEEEECEEEEECEEEEECE19C3C0B000000000000000005226BC6EEECCA7426 +0600000000020B3A9E719D9E2B1002000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000020A06202208222208232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B06000000000000031A +5167A8AD7A815E323739325059301905041A3E3943361F222220467877A8A6562E0A0000000732 +7E7EA89D4B25070000000000051859957FA488433B3025456C70A8AC64471A144C907FA8AC6654 +342960977FA896411E10246FA37FA89D595855518EAC7FA8AA5B310A00051E4191AD7FA89C564A +331C242D2A351E1A55937FA8A05B57493E70987FA89E4E2B0C0D3F877FA89C4F3B241724323044 +300D03255300893A000610005863009C7C00888300562F1771E234788C1E6AD9347C9413110500 +04281A75E23480A21B3A6E2379E2347E8B0D0B110718331565DC3485A3151F290916190205281A +75E23480A21B3A6E2379E2347E8B0D0A1E1771E234788C1E6AD9347C941311050004281A75E234 +80A21B3A6E2379E2347E8B0D0801000000001D4B00C38F00280600000000000000000000000005 +153249555743270E0200000000000005193A53574A2F1103000000000000000000000005153249 +555743270E02041636505750474548525753534C39251004051A3C53574E3C303E4D4631374D53 +554621090101091E384F57535557535342230D0200000000000000031B69629FC84F2C0B00030B +0D161F11181F11181F11181F11181F111B291533350C232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208232B143133 +131A1F11181F11181F11181F11181F11161605072C428FCF6E6F3B0600000000010A2A619DC9E0 +E8DBBC94694224152147716F340B00000000000C3A92D5D4933D0D01031A5FBEE7CF7C2D163156 +685E3C192060BFE9CD83557ECAEEECDCAB7A65749DD1EEECD9933C0E01062979CCEEEEECD7A169 +4634323F4F4B262667C3EEECCE9389B7E5ECD79C541E0600000000000000000C3A92D5D4933D0D +01000005226BC6EEECEECF966F76A4DCEEECCE7A2A07010715232B3B6FC1EEEECF802D07000000 +0006256FC1ECEEE5B5825D4D4E5D717A5A23070000000000000C3A92D5D4933D0D010000000724 +566B5E4A3B302F3C62A5DFECE4A14112236EC7EEEAB55616020E42A1E3ECD98E350900062979CC +EEEEECD7A1694634323F4F4B23070000000000000000000000000000000005112029355EAFE7EC +E6AC5D352B2B261A0A092E7DCDEEE6BC7E5241466094D2ECECBB63211B59BAEEECD79452312B33 +445B5F42180405112029355EAFE7ECE6AC5D352B2B261A0A02000000000000010F3C89CFEEEDBF +6E2506000000000000031B69629FC84F2C0B00030B0D161F11181F11181F11181F11181F111B29 +1533350C2322082222082222082222082222082018000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +010C3F887FA897431F0500000000000000000106214950849877A3AC7FA8AD7FA8AD6848160200 +0007327E7EA89D4B2507000000000318398BAD7FA8AD7FA8AD7FA8AD7FA8AD7B7333184C907FA8 +8F391803062D757AA8A1502D253F90AD7F8E521304010A38807DA8AA5B310A00051E4191AD7F8A +4D1103000000000002143488AD7F915816050002134565A8AD715C220A276571A8AD7F9A8B5863 +522B1E0A02004C7600481000406E008438000A1100768A0061341771E2348AE2348AE22B402301 +000001105D2A8AE22D46280100030637B3348AC81D1B0700000C0E5CD73482940D070000000001 +105D2A8AE22D46280100030637B3348AC81D1D241771E2348AE2348AE22B402301000001105D2A +8AE22D46280100030637B3348AC81D1B0700000000000000000000000000000000000000000003 +0D253C51574D3B210B02000000000000000005193A53574A2F11030000000000000000030D253C +51574D3B210B02000004173751575353442C20202B41545354421E0D1B3C53574D36180C0C0C13 +2D4B535546210B0B203E54534B37231D223046555144290D0200000000000110505A9FCF5B3E16 +0213555C9FCF729FCF729FCF729FCF729FCF72A7D740E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234DADA +669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000009317796 +7E58403E4F729EC7E4EEEEECDAA1591E05000000031959AFDEC5712606000000093690D7E4AB53 +4D9DDFEEECB25C4C91D9E5AD6672BFEEEECC792A0600031B5FBDECEED3822F07062979CCEEEEC2 +692104000000000000041F67C3EEECEEEEECEEEEC36F24060000000000000000031959AFDEC571 +26060000000005226BC6EEECC87024050D42A4E6ECDD96390A00000000011352B5EEEECF802D07 +000000021759BBEEECD07E2C0700000000000000000000000000031959AFDEC571260600000000 +010C2E6596B9D1DEE5EDEEECEEEEECEEC2651E092877CBECE5A34418358CD9EEDA943A0B000006 +2979CCEEEEC26921040000000000000000021238688186858686858371461A0400000000000C3E +9FE3ECE19C3C0B0000000005226BC3EEEEECEEEEECEEEEECEEEEECEEE6A24117378BD3ECEEEED9 +BFA58B71502B0E0200000000000C3E9FE3ECE19C3C0B00000000000000000000072564ABE3EEDB +A45B1F0600000000000000000110505A9FCF5B3E160213555C9FCF729FCF729FCF729FCF729FCF +72A7D740E2E234E2E234E2E234E2E234E2E234E2E234E2A9000000000000000000000D4627DFDC +27603A0B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +000000010C3F887FA897431F050000000000000003153587AD7FA4863F332419356872A8AD6A4E +1902000007317C7DA89F4E28070000000003183A8CAD7F905E25211F171E1F171E1F15140C134C +907FA88B341302062C7379A8A1502D253F90AD7F894A1003000831797BA8AA5B310A00051E4191 +AD7F84400C01000000000002143488AD7F915816050002134565A8AD715C22040002081E363658 +6C5E94AC7FA5823410657B00370D00658100440D0000000037690060341771E23483A71E5ECC34 +85A514100401105D2A8AE22D46270100030637B3348AC81D1B0700000B0E5CD73482940D070000 +000001105D2A8AE22D46270100030637B3348AC81D1D241771E23483A71E5ECC3485A514100401 +105D2A8AE22D46270100030637B3348AC81D1B0700000000000000000000000000000000000002 +0A1E364D574E3D240D03000000000000000000000005193A53574A2F11030000000000020A1E36 +4D574E3D240D03000000000003112D4B57534422090100071D4253554A291115314D5753411E07 +000416395353533D1809183A5257472B0F0200010921455355441F0801000000000214585D9FCF +58381100041113202D19222D19222D19222D19222D19263B1E474A1033310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B343E1C45481B242D19222D19222D19222D19222D192020070A374C98CF69602F040000000000 +02030200000000000000010611160F06000000000000072A78C9DBAA5116020000000002175AB8 +E7D09B9CC5C3A9C1CAA791C2E7CB794468BFEEEECC79290600031B5FBDECEED3822F07062979CC +EEEEB9591602000000000000041F67C3EEECE2B08AA1D7ECE6AE5A1C040000000000072A78C9DB +AA511602000000000005226BC6EEECBF611B030C3E9FE3ECDE96390A00000000011352B5EEEECF +802D07000000021759BBEEECD07E2C07000000000000000000000000072A78C9DBAA5116020000 +0000041D64BEEEEEE6B97747312F4A8FD6ECEEC76D2305072D7FCEEED9955F82CBEEE09A3F0D00 +0000062979CCEEEEB9591602000000000000000005216AC3EEEEECEEEEECEED585310800000000 +000B3E9FE3ECE19C3C0B0000000005226CC4EEEECB81452E2B2B2B2B2B2B2B281D0C020003102B +4A667C94AFCFEDEEE7B35B1B030000000B3E9FE3ECE19C3C0B00000000000000051C539BD9EEDE +AB63260800000000000000000000000214585D9FCF58381100041113202D19222D19222D19222D +19222D19263B1E474A1033310B31310B31310B31310B31310B2E23000000000000000000000D46 +27DED6223B0B00000000000000000000000000000000000000000000000000031C3384CF727A4A +0A010000000000031A5168A8AD7A816033383A32515A311C1C388AAD7F9B6D220D0E1E56917FA8 +AD6A4E1902000004246473A8AD70653E1E201E110A081A5C977FA89C554D39232F39345A714E3B +16134C907FA88B341302062C7379A8A1502A122470A37FA78E4539343B7AA47FA8AA5B310A0005 +1E4191AD7F84400C01000000000000051756937FA89F5A55473C6E977FA89F4F2B0A0621473B3F +301B1E1F22528A7FA897451D4A74004E13003D6B007D3200050D006F880061341771E234726508 +0F492382E2315E4B0505291B75E2347FA01A396B2278E2347F8C0D08010000080B50CC348ABF1C +2B300A16190205291B75E2347FA01A396B2278E2347F8C0D0A1E1771E2347265080F492382E231 +5E4B0505291B75E2347FA01A396B2278E2347F8C0D080100000000122D00745500180300000000 +04142E49575352442E24212020211F1C120701020A171F2023314555574F3F2C22201D140C162E +49575352442E24212020211F1C1207010414334F5353452E22222D425453513B19060515355153 +554C393038455457513D1D07030F294857534C39272127334857534E3513030000000000052681 +6A9FB83F2007000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000031C3384CF727A4A0A0100 +000000000000000000000000000000000000000000000001104299D9D289350A00000000000000 +083288D5EEE9E7CB824C6EBEE7E8ECE4A745152B79CBEEECDBA87762719BCFEEECDA933D0E0106 +2979CCEEEEB9591602000000000000041F67C3EEECC56A23194DA0E1EEDFA24F16030001104299 +D9D289350A0000000000000005226BC6EEECBF611B030C3E9FE3ECDE96390C0A1A262B2C3B6FC1 +EEEED79551312B2920110A2570C2ECEEE5B5845F4F505D727B5B24070001104299D9D289350A00 +0000000000042069C1EEEED9954013133879C8EEECEEC76D230500083186D5EEE5D6E6ECE3A144 +0F00000000062979CCEEEEB9591602000000000000000000000000000000000000000000000000 +0000000008338AD7ECEEC9804B322C261A0A0A3182D0EEECD7A06C4E42434E617E9B93521A0D2E +626E5942322A2B3F73BEEDECD07F2C0700000008338AD7ECEEC9804B322C261A0B0E3783CCEEEC +E6B982655B5A5B5B584D32130300000000000526816A9FB83F2007000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D4627DED6223B0B000000000000000000000000000000000000000000000000000005124BAD +7294851E090000000000000006123B646195A67FA8AD798F723016050A2C5C6199AA7FA59F6A7D +8676A8AD6A4E1902000000051A3371957BA8AD7FA8AD633C0F01091F31668771A1AD7FA8AC7994 +83462D10134C907FA88B341302062C7379A8A150290703163F518DA57FA3995F6F8579A8AA5B31 +0A00051E4191AD7F84400C010000000000000000081F336A8C75A5AD7F9D92574E290901000626 +5E6194A47FA8AD7FA59F65653C10041F4B00924700080E00515C008F73007D700050301771E234 +7265070304073BB0338AD021291303195A216FCF338AE131749B18201000000000000002186525 +79DA348AE23482940D070102195A216FCF338AE131749B18201000021D1771E234726507030407 +3BB0338AD021291303195A216FCF338AE131749B182010000000000000001D4B00C38F00280600 +0000010A23435557535557535557535557534D341203061B415753555753555753555753555237 +1F28435557535557535557535557534D341203000107172A3D4B4F5557514D44301C0A02000001 +07172B3F4D5055554B43331C0A020000010512273848525355574F4A3F2A170801000000000007 +1656B6728F77190600000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000005124BAD729485 +1E090000000000000000000000000000000000000000000000041D60B7DCBD6820050000000000 +000000011552B5EDECE3A041153185D5EEECCA732506010B2B5F95C0DAE8EEEDDDC9A36D381102 +0000062979CCEEEEB9591602000000000000041F67C3EEECC56A2005052066BAE9EEDB9746161F +60B7DCBD682005000000000000000005226BC6EEECBF611B030C3E9FE3ECDE9639153B97DFEEEC +EEEEECEEEEECEEEEECEEEEBF621C0308235289B6D1E5EEECEEE3C99D5A1F05041D60B7DCBD6820 +05000000000000000002133E7FB5D7EAEEE7DBC6B0B8DDECEEC76D2305000009368FD9ECEEEEE4 +A74A110100000000062979CCEEEEB9591602000000000000000000000000000000000000000000 +0000000000000000082A6AA6D0E6ECEEEEECE19C3C0B010C2B5C8FBAD4E3EEEEECEDE2CFB4843F +120D3681B6D0E2EDECEEEEE8DABD8E521E060000000000082A6AA6D0E6ECEEEEECE19C3F2661BE +EEEEECEEEEECEEEEECEEEEECD98D340900000000071656B6728F77190600000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000D4627DED6223B0B000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010800687B00763B000D0300000000010000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000832448FC959451C020000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000010F46 +5096C34F3311010000000000000000000000000000000000000000083080CDDA9F491201000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +083080CDDA9F491201000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083080CDDA9F +491201000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000832448FC959451C020000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D4727DED6223C0B000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000107004455008E7A009B7F006A2600 +010000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000031647384F4B110500000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000040D31623A3F25050100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000031647384F4B110500000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000197631E1E12E6615000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D4627DED6223B0B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D4627DED6223B0B000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D4627DED6223B0B000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000B02317A04150A00000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000093592DACC7223050000000000000000000000000000000000000000 +000000000000000000000000000000000000000000083089D5CD76250500000000000000000000 +000000000000000000000000000000000000041E5BA3D4E5E3DCD5B9782D080000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000011147A4DDC269200400000000000000000000093592DACC7223 +050000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000011147A4DDC2692004000000021138666D4A1B04000000000000000000000211 +38666D4A1B040000000000000000000000000000000000000000000000000B3C9EE4D9852E0700 +0000031D68CCF0BC4D0F010B2B659FCDE8F2F1EDECE7D6B1722B08062A7ED9FFFFF2EBE9E9E9E8 +DEC291531D05000002113A7AB5D7E3E5E4DCC18B49180400000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000D4627DED6223B0B000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D4D053D4701 +020000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000093592DACC7223050000000000000000000000000000000000 +000000000000000000000000000000000000000000000000010A1D2E2D19080100000000000000 +0000000000000000000000000000000000000000021B63C6E1A3400C0000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000041F67C1DDA64911010000000000000000000000093592DA +CC7223050000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000041F67C1DDA649110100000000042270CCDB933609000000000000000000 +00042270CCDB9336090000000000000000000000000000000000000000000000000B3C9EE4D985 +2E07000000031D68CCF0BC4D142674CCE3AF5F270C0200010B2139361805062A7ED6E7A5400C00 +00010E3C93DFE59F3D0B09348FDCE0994311020A3181D4E5A94910010000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000D4627DED6223B0B000000000000 +00000000000000000000000000000000000000000D216CC67286631204000000000F4E04375A03 +181B00010000000000000000000000000000072A032D5002090300000000000000000000021A03 +4080030E0400000000000000000000000000000000000000000000000F4CB9E6B4490E00000007 +2C82D3D3822C07010C2E6CACD9EDEDDECBB2A1BEE4CD7223050004184883B8D8E5E5E2E1DABF8C +4D1A051350B1E2BA591702000000000E43A4E0C5681E030C3B8DBCC9D4ECF8D376250500000000 +000F4CB9ECD39FA0B5BECADEE4C98C421302000B3889B9C8D0E4FCFFEED5CAC7C3AB6F29070006 +215896C7DEE4E4E4E1CFA5692E0C01000000000000000000000000000000000000000000000000 +000000000000000000000000000F4CB9ECD39FA0B5BECADEE4C98C421302000000000000000000 +000000000000000000000000000000000009338AD6D3842E08000000010C2E6CACD9EDEDDECBB2 +A1BEE4CD7223050004184883B8D8E5E5E2E1DABF8C4D1A051350B1E2BA591702000000000E43A4 +E0C5681E0300000000000009338AD6D3842E0800000B3787B9C8D0E5FDFFEED6CAC7C7BD924411 +0C3787B9C8D0E5FDFFEED6CAC7C7BD9244110F43A2DFC86E2204000000000A3792DCD68338439E +E4D9852E07000000031D68CCF0BC4D1A3C9DE5E1953A0B00000000000000000000062A7ED6E7A5 +400C000004184EA4E5DE9034102F86D9E199390B04070507297BD4E5A4400C0000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000D4627DFDA25542B08232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B060000000000010801 +153E03347B05457A04293B010906000000000000000C48054E8A03100500000000000000000000 +000702338A05201200000000000000000000000000000000000000000000000F4CB9E6B4490E00 +0000072C82D3D3822C0B226EC8E8BF6F300E04124499E6FDD37223081A5AB1D6AB5D2409010006 +2368BFDDA5440F124DAEE0BB5A180200000F45A6E0C3641D030000000000083089D5CD76250500 +000000000F4CBAF5E496401001011454BAEAC35E19020000000004206DC9D99235090000000000 +021757B5E7CB752A0801041E5FB7E7CB7325050000000000000000000000000000000000000000 +000000000000000000000000000000000F4CBAF5E496401001011454BAEAC35E19020000000000 +00000000000000000000000000000000000001144FACDEBC601C0300000004226EC8E8BF6F300E +04124499E6FDD37223081A5AB1D6AB5D24090100062368BFDDA5440F124DAEE0BB5A180200000F +45A6E0C3641D03000000000001144FACDEBC601C0300000000000000042270CCDB933609000000 +00000000000000042270CCDB93360900000000000000093690D9D07C290600000D409FDFCA7023 +103C9EE4D9852E07000000031D68CCF0BC4D100C337EC7F3F8E3C7AD9579593615050000062A7E +D9FFFEEFE7E7EEFBFFF9CC833A0F010C43A9E8D2783F64C2F1D3793D5FC4F1C257140100000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +0000000000000000000418022872064E8D04130700000000000000000000000000000000000000 +0000000005012A82052A1E00000000000000000000000000000000000000000000000F4CB9E6B4 +490E000000072C82D3D3822C1549B3EAC55D17020000000C40A4E4CF72231246AEF0F6DAC8C3C3 +C3C3C3C4CAD7DAB66420051049AADFBB5B18030F46A7DFBF601B03000000000000083089D5CD76 +250500000000000F4CB9E9B94E10000000072E85D4D27F2B060000000004206DC9D99235090000 +0000000A3999DED0772605000000011559C3ECBA4F100000000000000000000000000000000000 +000000000000000000000000000000000000000F4CB9E9B94E10000000072E85D4D27F2B060000 +0000000000000000000000000000000000000000052370C8DC9D410E01000000000E49B3EAC55D +17020000000C40A4E4CF72231246AEF0F6DAC8C3C3C3C3C3C4CAD7DAB66420051049AADFBB5B18 +030F46A7DFBF601B030000000000052370C8DC9D410E010000000000000000042270CCDB933609 +00000000000000000000042270CCDB9336090000000000000000062A7DD1D68A3109114AAADFBD +5F1B030B3C9EE3D9852E07000000031D68CCF0BB4D0F000000020C213B556D87A8D0F0E9AF591B +092A7ED6E7A5400C000003133D85CFDFA74D2045A9E8D2762813243227121959C4F1C357140100 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000030E082E31 +0B31310B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +0000000000000210011B4A043A8105406C03212B01040100000000000000000000000000000000 +0000000000000005012D8505271A00000000000000000000000000000000000000000000000E4B +B6E6B64B0F000000083089D7D4822C1548B2E9C25815010000000B3D9FE1CE72231246AEE7C762 +1A02000000000000000000000000000F46A6DDBB5C284AA8DEBC5D190200000000000000083089 +D5CD76250500000000000F4CB9E6B4490E000000072C82D3D3822C070000000004206DC9D99235 +0900000000000A3999DED0772605000000011559C3ECBA4F100000000000000000000000000000 +00000000000005246DBCE1E9E9E9E5CA8633090000000F4CB9E6B4490E000000072C82D3D3822C +070000000000000000000000000000000000000000000B3993DACE7A29060000000000000E48B2 +E9C25815010000000B3D9FE1CE72231246AEE7C7621A02000000000000000000000000000F46A6 +DDBB5C284AA8DEBC5D190200000000000B3993DACE7A290600000000000000000000042270CCDB +93360900000000000000000000042270CCDB93360900000000000000000004206BC5D99A5161B5 +DDAE4F13010008318BD9D8883008000000031F6ACBE5A8420C00000000000000000000031D66C9 +EFBD52182A7ED6E7A5400C0000000008318ADBE197403987D9E199390A00000006287BD4E6A440 +0C0000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000031C3384CF727A4A +0A01000000000D4805468705314B02100E00000000000000000000000000072B032E5202090300 +000000000000000000000D023A8A04170A00000000000000000000000000000000000000000000 +00093794DED5822C0700062268C5F4DA822C0B216CC5DCA249130200082C7ED8F9D37223081A5A +B5E7D082380F020000020E273D3718050000000E43A3DCCCA5C2E0B95A18020000000000000000 +083089D5CD76250500000000000F4CB9E6B4490E000000072C82D3D3822C070000000004206DC9 +D99235090000000000021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000 +000000000000000000000000000000000000000000000000000F4CB9E6B4490E000000072C82D3 +D3822C0700000000000000000000000000000000000000021757B4DEB458180200000000000000 +04216CC5DCA249130200082C7ED8F9D37223081A5AB5E7D082380F020000020E273D3718050000 +000E43A3DCCCA5C2E0B95A180200000000021757B4DEB458180200000000000000000000000217 +5DC5EBB851130100000000000000000002175DC5EBB851130100000000000000000002185AB7E9 +EDF2E4A0420E000000031B61C0E7BF67220600031852A8E2D079280A183C504020090100000314 +4393DDE39C3B102A7ED6E7A5400C000001092A6FC6EECC6F220E3691DDE09A4411030B3282D4E6 +AA4A11010000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000005124BAD +7294851E0900000000030E010301000000000000000000000000000000000000000C48054E8A03 +100500000000000000000000052D04436C02070100000000000000000000000000000000000000 +000000000007276BB1DDE5D4C2BBAE9FB6E1D5822C07010C2E6CACD4DBCAB8B2B1B1CDEBCE7223 +050004184680B3D4DFDFDFE2E5E1CFA7682606000000000D40A0EDFFF9B956160200000002174F +9BC2CCCED8EEFFFEE9D5CDCCC093410F0F4CB9E6B4490E000000072C82D3D3822C070000000004 +206DC9D99235090000000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000 +000000000000000000000000000000000000000000000000000000000F4CB9E6B4490E00000007 +2C82D3D3822C07000000000000000000000000000000000000062879CEDA943A0B000000000000 +00000000010C2E6CACD4DBCAB8B2B1B1CDEBCE7223050004184680B3D4DFDFDFE2E5E1CFA76826 +06000000000D40A0EDFFF9B956160200000000062879CEDA943A0B000000000000000000000000 +000003184F98CDE0DCD4D1C5994712010000000003184F98CDE0DCD4D1C5994712010000000001 +1351B7F2E392370A0000000000000A2B67A3CFE6ECECECE9D7AF75360F01041C5598C7E3EFF1ED +EBEAE7D9B783461703062A7ED9FFFFF5EFEDEDEDECE4CCA2692D0B010002123D7DB8DAE7E9E8DF +C38E4C1A0400000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002011C6C052D2500000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000E409CDCC871240500000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000E409CDCC871240500000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00011044A0E2D4802C070000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +0000000000000000000000000000000008011F4002060200000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +01134CA1D5E8E4C587401202000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000093592DACC7223050000000000000000000000000000000000000000000000000000000000 +000000000000000000000000083089D5CD76250500000000000000000000000000000000000000 +000000000000000000041E5BA3D4E5E3DCD5B9782D080000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000009 +3592DACC7223050000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000021138666D4A1B04000000000000 +000000000000000000000000000000000000000000000000041E5BA3D4E5E3DCD5B9782D080000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000093592DACC7223050000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000093592DACC7223050000000000000000000000000000000000000000000000000000 +000000000000000000000000000000010A1D2E2D19080100000000000000000000000000000000 +0000000000000000000000021B63C6E1A3400C0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000093592DACC7223050000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000042270CCDB933609000000 +0000000000000000000000000000000000000000000000000000021B63C6E1A3400C0000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000093592DACC7223050000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000F4CB9E6B4490E000000072C82D3D3822C07010C +2E6CACD9EDEDDECBB2A1BEE4CD7223050004184883B8D8E5E5E2E1DABF8C4D1A051350B1E2BA59 +1702000000000E43A4E0C5681E030C3B8DBCC9D4ECF8D376250500000000000F4CB9ECD39FA0B5 +BECADEE4C98C421302000B3889B9C8D0E4FCFFEED5CAC7C3AB6F29070006215896C7DEE4E4E4E1 +CFA5692E0C0100000000000316457C9384531E0500000000000000000000000000000000000000 +00000000000003153F78ADD1DFE2E2E3E0D0A56021050006215896C7DEE4E4E4E1CFA5692E0C06 +2372CDE8D2CCDCEDE1B999AACDE6EDCF87382C72CDE8D2CCDCEDE1B999AACDE6EDCF8733090623 +63A5CDDDE1E0DEDBD8C9A1672E0C01000F4CB9ECD39FA0B5BECADEE4C98C42130200010C2E6CAC +D9EDEDDECBB2A1BEE4CD7223050000000000000000000000000000000000000F4CB9ECD39FA0B5 +BECADEE4C98C421302000006215896C7DEE4E4E4E1CFA5692E0C010B3787B9C8D0E5FDFFEED6CA +C7C7BD924411010000000000000000000000000000000000000B3889B9C8D0E4FCFFEED5CAC7C3 +AB6F29070006215896C7DEE4E4E4E1CFA5692E0C01000F4CB9E6B4490E000000072C82D3D3822C +070F4CB9ECD39FA0B5BECADEE4C98C42130200010C2E6CACD9EDEDDECBB2A1BEE4CD7223050000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000F4CB9E6B4490E000000072C82D3D3822C +0B226EC8E8BF6F300E04124499E6FDD37223081A5AB1D6AB5D24090100062368BFDDA5440F124D +AEE0BB5A180200000F45A6E0C3641D030000000000083089D5CD76250500000000000F4CBAF5E4 +96401001011454BAEAC35E19020000000004206DC9D99235090000000000021757B5E7CB752A08 +01041E5FB7E7CB73250500000000052677D6FEE490340900000000000000000000000000000000 +0000000000000002154FAAE4D4893E1102000006172B2912051757B5E7CB752A0801041E5FB7E7 +CB732A2872CEDF9B3D1D50BBF2D87E2E266AC3C5754576CEDF9B3D1D50BBF2D87E2E266AC3C570 +22060D1F211306000000011249A4DDC2641C030F4CBAF5E496401001011454BAEAC35E1906226E +C8E8BF6F300E04124499E6FDD37223050000000000000000000000000000000000000F4CBAF5E4 +96401001011454BAEAC35E19041757B5E7CB752A0801041E5FB7E7CB732505000000042270CCDB +933609000000000000000000000000000000000000000000000000000000000004206DC9D99235 +090000000000021757B5E7CB752A0801041E5FB7E7CB7325050F4CB9E6B4490E000000072C82D3 +D3822C070F4CBAF5E496401001011454BAEAC35E1906226EC8E8BF6F300E04124499E6FDD37223 +050000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000F4CB9E6B4490E000000072C82D3 +D3822C1549B3EAC55D17020000000C40A4E4CF72231246AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +20051049AADFBB5B18030F46A7DFBF601B03000000000000083089D5CD76250500000000000F4C +B9E9B94E10000000072E85D4D27F2B060000000004206DC9D992350900000000000A3999DED077 +2605000000011559C3ECBA4F100000000000000000000000000000000000000000000000000000 +000000000000000000000B3EA0E2CD7022040000000000000000000A3999DED077260500000001 +1559C3ECBA543372C9CC7927103A9ADBBF5815114EB5D8A05E7CC9CC7927103A9ADBBF5815114E +B5D89B3B0C0F346A9BBCCBCECDCCCDD5E9F9DC872F080F4CB9E9B94E10000000072E85D4D27F2B +1449B3EAC55D17020000000C40A4E4CF7223050000000000000000000000000000000000000F4C +B9E9B94E10000000072E85D4D27F2B103999DED0772605000000011559C3ECBA4F100000000422 +70CCDB933609000000000000000000000000000000000000000000000000000000000004206DC9 +D992350900000000000A3999DED0772605000000011559C3ECBA4F100F4CB9E6B4490E00000007 +2C82D3D3822C070F4CB9E9B94E10000000072E85D4D27F2B1449B3EAC55D17020000000C40A4E4 +CF7223050000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000E4BB6E6B64B0F00000008 +3089D7D4822C1548B2E9C25815010000000B3D9FE1CE72231246AEE7C7621A0200000000000000 +0000000000000F46A6DDBB5C284AA8DEBC5D190200000000000000083089D5CD76250500000000 +000F4CB9E6B4490E000000072C82D3D3822C070000000004206DC9D992350900000000000A3999 +DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000000000 +000000000000000000000000000B3EA0E2CD7022040000000000000000000A3999DED077260500 +0000011559C3ECBA543372C8C872230E3693D6BA51100E49B1DAA9637EC8C872230E3693D6BA51 +100E49B1DAA4483D8AD9DD984715030000083088D8DA8C32080F4CB9E6B4490E000000072C82D3 +D3822C1548B2E9C25815010000000B3D9FE1CE7223050000000000000000000000000000000000 +000F4CB9E6B4490E000000072C82D3D3822C113999DED0772605000000011559C3ECBA4F100000 +00042270CCDB933609000000000000000000000000000000000000000000000000000000000004 +206DC9D992350900000000000A3999DED0772605000000011559C3ECBA4F100E4BB6E6B64B0F00 +0000083089D7D4822C070F4CB9E6B4490E000000072C82D3D3822C1548B2E9C25815010000000B +3D9FE1CE7223050000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000093794DED5822C07 +00062268C5F4DA822C0B216CC5DCA249130200082C7ED8F9D37223081A5AB5E7D082380F020000 +020E273D3718050000000E43A3DCCCA5C2E0B95A18020000000000000000083089D5CD76250500 +000000000F4CB9E6B4490E000000072C82D3D3822C070000000004206DC9D99235090000000000 +021757B5E7C972280700041C5CB5E7CB732505000000000317477F9787551F0500000000000000 +0000000000000000000000000000000002154FAAE4D3863B100200000411232410051757B5E7C9 +72280700041C5CB5E7CB732A2872C8C872230E3693D6BA51100E49B1DAA9637EC8C872230E3693 +D6BA51100E49B1DAA44B4AA0E3D17726050000092F7FD6FBE18C32080F4CB9E6B4490E00000007 +2C82D3D3822C0B216CC5DCA249130200082C7ED8F9D37223050000000000000000000000000000 +000000000F4CB9E6B4490E000000072C82D3D3822C091757B5E7C972280700041C5CB5E7CB7325 +0500000002175DC5EBB85113010000000000000000000000000000000000000000000000000000 +000004206DC9D99235090000000000021757B5E7C972280700041C5CB5E7CB732505093794DED5 +822C0700062268C5F4DA822C070F4CB9E6B4490E000000072C82D3D3822C0B216CC5DCA2491302 +00082C7ED8F9D37223050000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000007276BB1 +DDE5D4C2BBAE9FB6E1D5822C07010C2E6CACD4DBCAB8B2B1B1CDEBCE7223050004184680B3D4DF +DFDFE2E5E1CFA7682606000000000D40A0EDFFF9B956160200000002174F9BC2CCCED8EEFFFEE9 +D5CDCCC093410F0F4CB9E6B4490E000000072C82D3D3822C070000000004206DC9D99235090000 +000000000006215997C7DDE1E0E0DFCFA66A2E0C010000000000052677D6FEE490340900000000 +00000000000000000000000000000000000000000003154079AED0DDDEDEDFDED0A66121050006 +215997C7DDE1E0E0DFCFA66A2E0C062372C8C872230E3693D6BA51100E49B1DAA9637EC8C87223 +0E3693D6BA51100E49B1DAA440132564A6CFD7C9B7AEADA597ADDEDA8C32080F4CB9E6B4490E00 +0000072C82D3D3822C07010C2E6CACD4DBCAB8B2B1B1CDEBCE7223050000000000000000000000 +000000000000000F4CB9E6B4490E000000072C82D3D3822C070006215997C7DDE1E0E0DFCFA66A +2E0C01000000000003184F98CDE0DCD4D1C5994712010000000000000000000000000000000000 +000000000004206DC9D99235090000000000000006215997C7DDE1E0E0DFCFA66A2E0C01000007 +276BB1DDE5D4C2BBAE9FB6E1D5822C070F4CB9E6B4490E000000072C82D3D3822C07010C2E6CAC +D4DBCAB8B2B1B1CDEBCE7223050000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000F4190BEC4A6662406000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000006244997AD7FA8AD7FA89D4B25070000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000005246573A8AA5B310A0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000021D1771E234726507030000000000000000000000000000000000 +0000000000000000000000000005072E6C1B414A07030000000000000000000000000000000000 +000000000000021D1771E234726507030000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000020D2238474C53575355544A41331D0C0200 +00020D233A444E565355574A2F11030000000000000000000003102C4A53555744250B01000000 +020B1A2E40474F565355544734180601091B36484D53575355564D463A25120501000106142A3B +4A535355534941301A0A0200000000031C6A6198A6341805000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002162971C2666133060100000000000000000000000000000000 +00000000000000000000000000000A3489D0D99E44110100000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041F67 +C3EEECC56A2005000000000000000000000000000000000000000A3489D0D99E4415236BC6EEEC +BF611B0300000000000000000000000000011352B5EEEECF802D07000000000000000000000000 +00000000000000000000000000000000000000000A3489D0D99E44110100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000061F4F727A714D1F060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00061F4F727A714D1F0600000000000623609EC3D8E7EEECEEE6D2B68B53210700000000031C6A +6198A6341805000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +000000000000000000000000000000000000000000000000000001060C1A1F1D48887FA89D4B25 +070000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000005246573A8AA5B310A0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0410005B6300937B009A75004B1D00031D1771E234726507030000000000000000000000000000 +000000000000000000000000000000000C0E5CD73482940D070000000000000000000000000000 +000000000000000000021D1771E234726507030000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000310253330241D1A18213245555752 +412109010310283937353B4955574A2F11030000000000000000020E2943545753555744250B01 +00020C264753554F3A2A201B1E262B281505010817292E2723201E232F3F51575347290C04112E +4B575246301F1C293B5057503C1C070000000002152A78CA6C6E42090100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005257B679EAD361804000000000000000000000000000000 +000000000000000000000000000000021550A9DDC97C2C07000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +041F67C3EEECC56A20050000000000000000000000000000000000021550A9DDC97C2C0705226B +C6EEECBF611B030000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000021550A9DDC97C2C07000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000C3E9FE3ECE19C3C0B0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000C3E9FE3ECE19C3C0B0000000000082C6A8E84685246455C89C3EDEEEAB65A19030000 +0002152A78CA6C6E42090100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000D216CC6728663120400000000000000051139 +626094A67FA8AD788D702F1603041D4F598FA17DA8AD7FA49E66694212050000000007327E7EA8 +9D4B250700000000000000081F32688A74A4AD7FA29A62623E120503124C907FA89B59758E77A7 +A970714311030003153D4F8AA37EA19459657E77A8AA5B310A00051E4191AD7F927151829C7DA8 +AD77723007071D31688A74A5AD7E9D90564C27080100010B273D76957AA8AD7FA7A46D71411003 +020E007C81005D26000401000D1E00827A0029221771E2347265080C381C73E1347C9212110602 +1757206ECF338ADF317398171F0F0111612A8AE2348AE2348AE2348AE23482940D070102175720 +6ECF338ADF317398171F0F00021D1771E2347265080C381C73E1347C92121106021757206ECF33 +8ADF317398171F0F00000000000000112B00715300170300000000000000000000000000020C26 +475753482A0D02000000000005193A53574A2F1103000000000000020C23415247353345555744 +250B01020E284857503C1C070000000000000000000000000000020507090F1B2F4A575343240B +0A2041555744250C010005183C5553513B160400000000020B3A9E719D9E2B1002000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000D216CC6728663120400000000000000000000000000 +0000000000000000000000000000000000062570C1DEB25A1A0D3996DDE6B14E12010000000000 +000B3B9ADFE6AF4E1C295B92BED9E7EEEBDCC7A16A3510020000062979CCEEEECD9B98B7D7E9EC +EEDEA0452C67C3EEECC56A23153B80C7EDECD69A531D06000000000000062570C1DEB25A1A0300 +05226BC6EEECCD9794B8D9E8E8D19F5C200500072D82D2ECEEEEECEEEECF802D07000000000000 +07215186B4CFE4EEECEEE1C69A591F0500000000000000062570C1DEB25A1A03000007296CA7C9 +DEEAECEEEEE6D9BF935B230A2068C0EEEEC269210400011452B1E8EED5853108062979CCEEEECD +9B98B7D7E9ECEEDEA0410D000000000000000000000000000000041E66C0EEEEECEEEEECEEEEEC +EEEEECE19C3C0B010B2A5D92BED9E6EEEEE4D4B78A55220700020F3672A6CDE4ECEEEEEBE2CC9E +5A1E081E66C0EEEEECEEEEECEEEEECEEEEECE19C3C0B000000000000000005226BC6EEECCA7426 +0600000000020B3A9E719D9E2B1002000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000020A06202208222208232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B06000000000000031A +5167A8AD7A815E323739325059301905041A3E3943361F222220467877A8A6562E0A0000000732 +7E7EA89D4B25070000000000051859957FA488433B3025456C70A8AC64471A144C907FA8AC6654 +342960977FA896411E10246FA37FA89D595855518EAC7FA8AA5B310A00051E4191AD7FA89C564A +331C242D2A351E1A55937FA8A05B57493E70987FA89E4E2B0C0D3F877FA89C4F3B241724323044 +300D03255300893A000610005863009C7C00888300562F1771E234788C1E6AD9347C9413110500 +04281A75E23480A21B3A6E2379E2347E8B0D0B110718331565DC3485A3151F290916190205281A +75E23480A21B3A6E2379E2347E8B0D0A1E1771E234788C1E6AD9347C941311050004281A75E234 +80A21B3A6E2379E2347E8B0D0801000000001D4B00C38F00280600000000000000000000000005 +153249555743270E0200000000000005193A53574A2F1103000000000109203F4D4A32150E2242 +555744250B01041636505750474548525753534C392510040000000005183C55535557534D3B21 +0C0200051A3B535750402714101D334C575355441E080000000000031B69629FC84F2C0B00030B +0D161F11181F11181F11181F11181F111B291533350C232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208232B143133 +131A1F11181F11181F11181F11181F11161605072C428FCF6E6F3B0600000000010A2A619DC9E0 +E8DBBC94694224152147716F340B00000000000C3A92D5D4933D0D01031A5FBEE7CF7C2D163156 +685E3C192060BFE9CD83557ECAEEECDCAB7A65749DD1EEECD9933C0E01062979CCEEEEECD7A169 +4634323F4F4B262667C3EEECCE9389B7E5ECD79C541E0600000000000000000C3A92D5D4933D0D +01000005226BC6EEECEECF966F76A4DCEEECCE7A2A07010715232B3B6FC1EEEECF802D07000000 +0006256FC1ECEEE5B5825D4D4E5D717A5A23070000000000000C3A92D5D4933D0D010000000724 +566B5E4A3B302F3C62A5DFECE4A14112236EC7EEEAB55616020E42A1E3ECD98E350900062979CC +EEEEECD7A1694634323F4F4B23070000000000000000000000000000000005112029355EAFE7EC +E6AC5D352B2B261A0A092E7DCDEEE6BC7E5241466094D2ECECBB63211B59BAEEECD79452312B33 +445B5F42180405112029355EAFE7ECE6AC5D352B2B261A0A02000000000000010F3C89CFEEEDBF +6E2506000000000000031B69629FC84F2C0B00030B0D161F11181F11181F11181F11181F111B29 +1533350C2322082222082222082222082222082018000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +010C3F887FA897431F0500000000000000000106214950849877A3AC7FA8AD7FA8AD6848160200 +0007327E7EA89D4B2507000000000318398BAD7FA8AD7FA8AD7FA8AD7FA8AD7B7333184C907FA8 +8F391803062D757AA8A1502D253F90AD7F8E521304010A38807DA8AA5B310A00051E4191AD7F8A +4D1103000000000002143488AD7F915816050002134565A8AD715C220A276571A8AD7F9A8B5863 +522B1E0A02004C7600481000406E008438000A1100768A0061341771E2348AE2348AE22B402301 +000001105D2A8AE22D46280100030637B3348AC81D1B0700000C0E5CD73482940D070000000001 +105D2A8AE22D46280100030637B3348AC81D1D241771E2348AE2348AE22B402301000001105D2A +8AE22D46280100030637B3348AC81D1B0700000000000000000000000000000000000000000003 +0D253C51574D3B210B02000000000000000005193A53574A2F1103000001071A374E50381D0C07 +0E254355574528100505173751575353442C20202B41545354421E08010000010610171B222E3B +4D575243270C0204132D475255575355575150575355431D0700000000000110505A9FCF5B3E16 +0213555C9FCF729FCF729FCF729FCF729FCF72A7D740E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234DADA +669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000009317796 +7E58403E4F729EC7E4EEEEECDAA1591E05000000031959AFDEC5712606000000093690D7E4AB53 +4D9DDFEEECB25C4C91D9E5AD6672BFEEEECC792A0600031B5FBDECEED3822F07062979CCEEEEC2 +692104000000000000041F67C3EEECEEEEECEEEEC36F24060000000000000000031959AFDEC571 +26060000000005226BC6EEECC87024050D42A4E6ECDD96390A00000000011352B5EEEECF802D07 +000000021759BBEEECD07E2C0700000000000000000000000000031959AFDEC571260600000000 +010C2E6596B9D1DEE5EDEEECEEEEECEEC2651E092877CBECE5A34418358CD9EEDA943A0B000006 +2979CCEEEEC26921040000000000000000021238688186858686858371461A0400000000000C3E +9FE3ECE19C3C0B0000000005226BC3EEEEECEEEEECEEEEECEEEEECEEE6A24117378BD3ECEEEED9 +BFA58B71502B0E0200000000000C3E9FE3ECE19C3C0B00000000000000000000072564ABE3EEDB +A45B1F0600000000000000000110505A9FCF5B3E160213555C9FCF729FCF729FCF729FCF729FCF +72A7D740E2E234E2E234E2E234E2E234E2E234E2E234E2A9000000000000000000000D4627DFDC +27603A0B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +000000010C3F887FA897431F050000000000000003153587AD7FA4863F332419356872A8AD6A4E +1902000007317C7DA89F4E28070000000003183A8CAD7F905E25211F171E1F171E1F15140C134C +907FA88B341302062C7379A8A1502D253F90AD7F894A1003000831797BA8AA5B310A00051E4191 +AD7F84400C01000000000002143488AD7F915816050002134565A8AD715C22040002081E363658 +6C5E94AC7FA5823410657B00370D00658100440D0000000037690060341771E23483A71E5ECC34 +85A514100401105D2A8AE22D46270100030637B3348AC81D1B0700000B0E5CD73482940D070000 +000001105D2A8AE22D46270100030637B3348AC81D1D241771E23483A71E5ECC3485A514100401 +105D2A8AE22D46270100030637B3348AC81D1B0700000000000000000000000000000000000002 +0A1E364D574E3D240D03000000000000000000000005193A53574A2F11030000020E2B47555753 +5557535557535557535554391A152D4B57534422090100071D4253554A290E0200000000000000 +00020D29495355431D0700000002050B10100E0D15324E534F36140400000000000214585D9FCF +58381100041113202D19222D19222D19222D19222D19263B1E474A1033310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B343E1C45481B242D19222D19222D19222D19222D192020070A374C98CF69602F040000000000 +02030200000000000000010611160F06000000000000072A78C9DBAA5116020000000002175AB8 +E7D09B9CC5C3A9C1CAA791C2E7CB794468BFEEEECC79290600031B5FBDECEED3822F07062979CC +EEEEB9591602000000000000041F67C3EEECE2B08AA1D7ECE6AE5A1C040000000000072A78C9DB +AA511602000000000005226BC6EEECBF611B030C3E9FE3ECDE96390A00000000011352B5EEEECF +802D07000000021759BBEEECD07E2C07000000000000000000000000072A78C9DBAA5116020000 +0000041D64BEEEEEE6B97747312F4A8FD6ECEEC76D2305072D7FCEEED9955F82CBEEE09A3F0D00 +0000062979CCEEEEB9591602000000000000000005216AC3EEEEECEEEEECEED585310800000000 +000B3E9FE3ECE19C3C0B0000000005226CC4EEEECB81452E2B2B2B2B2B2B2B281D0C020003102B +4A667C94AFCFEDEEE7B35B1B030000000B3E9FE3ECE19C3C0B00000000000000051C539BD9EEDE +AB63260800000000000000000000000214585D9FCF58381100041113202D19222D19222D19222D +19222D19263B1E474A1033310B31310B31310B31310B31310B2E23000000000000000000000D46 +27DED6223B0B00000000000000000000000000000000000000000000000000031C3384CF727A4A +0A010000000000031A5168A8AD7A816033383A32515A311C1C388AAD7F9B6D220D0E1E56917FA8 +AD6A4E1902000004246473A8AD70653E1E201E110A081A5C977FA89C554D39232F39345A714E3B +16134C907FA88B341302062C7379A8A1502A122470A37FA78E4539343B7AA47FA8AA5B310A0005 +1E4191AD7F84400C01000000000000051756937FA89F5A55473C6E977FA89F4F2B0A0621473B3F +301B1E1F22528A7FA897451D4A74004E13003D6B007D3200050D006F880061341771E234726508 +0F492382E2315E4B0505291B75E2347FA01A396B2278E2347F8C0D08010000080B50CC348ABF1C +2B300A16190205291B75E2347FA01A396B2278E2347F8C0D0A1E1771E2347265080F492382E231 +5E4B0505291B75E2347FA01A396B2278E2347F8C0D080100000000122D00745500180300000000 +04142E49575352442E24212020211F1C120701020A171F2023314555574F3F2C22201D140B0C12 +1617161717171D3047555749321E0F060514334F5353452E22222D425453513B190A162D363228 +25232126303C4D57534D331203030E2129231D1B1C25354554574A301304000000000000052681 +6A9FB83F2007000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000031C3384CF727A4A0A0100 +000000000000000000000000000000000000000000000001104299D9D289350A00000000000000 +083288D5EEE9E7CB824C6EBEE7E8ECE4A745152B79CBEEECDBA87762719BCFEEECDA933D0E0106 +2979CCEEEEB9591602000000000000041F67C3EEECC56A23194DA0E1EEDFA24F16030001104299 +D9D289350A0000000000000005226BC6EEECBF611B030C3E9FE3ECDE96390C0A1A262B2C3B6FC1 +EEEED79551312B2920110A2570C2ECEEE5B5845F4F505D727B5B24070001104299D9D289350A00 +0000000000042069C1EEEED9954013133879C8EEECEEC76D230500083186D5EEE5D6E6ECE3A144 +0F00000000062979CCEEEEB9591602000000000000000000000000000000000000000000000000 +0000000008338AD7ECEEC9804B322C261A0A0A3182D0EEECD7A06C4E42434E617E9B93521A0D2E +626E5942322A2B3F73BEEDECD07F2C0700000008338AD7ECEEC9804B322C261A0B0E3783CCEEEC +E6B982655B5A5B5B584D32130300000000000526816A9FB83F2007000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D4627DED6223B0B000000000000000000000000000000000000000000000000000005124BAD +7294851E090000000000000006123B646195A67FA8AD798F723016050A2C5C6199AA7FA59F6A7D +8676A8AD6A4E1902000000051A3371957BA8AD7FA8AD633C0F01091F31668771A1AD7FA8AC7994 +83462D10134C907FA88B341302062C7379A8A150290703163F518DA57FA3995F6F8579A8AA5B31 +0A00051E4191AD7F84400C010000000000000000081F336A8C75A5AD7F9D92574E290901000626 +5E6194A47FA8AD7FA59F65653C10041F4B00924700080E00515C008F73007D700050301771E234 +7265070304073BB0338AD021291303195A216FCF338AE131749B18201000000000000002186525 +79DA348AE23482940D070102195A216FCF338AE131749B18201000021D1771E234726507030407 +3BB0338AD021291303195A216FCF338AE131749B182010000000000000001D4B00C38F00280600 +0000010A23435557535557535557535557534D341203061B415753555753555753555753555236 +150400000000000001092142555744250B0100000107172A3D4B4F5557514D44301C0A0204132C +414D4F55575355564D463B271406010003102C454E555753514D4033200E040000000000000007 +1656B6728F77190600000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000005124BAD729485 +1E090000000000000000000000000000000000000000000000041D60B7DCBD6820050000000000 +000000011552B5EDECE3A041153185D5EEECCA732506010B2B5F95C0DAE8EEEDDDC9A36D381102 +0000062979CCEEEEB9591602000000000000041F67C3EEECC56A2005052066BAE9EEDB9746161F +60B7DCBD682005000000000000000005226BC6EEECBF611B030C3E9FE3ECDE9639153B97DFEEEC +EEEEECEEEEECEEEEECEEEEBF621C0308235289B6D1E5EEECEEE3C99D5A1F05041D60B7DCBD6820 +05000000000000000002133E7FB5D7EAEEE7DBC6B0B8DDECEEC76D2305000009368FD9ECEEEEE4 +A74A110100000000062979CCEEEEB9591602000000000000000000000000000000000000000000 +0000000000000000082A6AA6D0E6ECEEEEECE19C3C0B010C2B5C8FBAD4E3EEEEECEDE2CFB4843F +120D3681B6D0E2EDECEEEEE8DABD8E521E060000000000082A6AA6D0E6ECEEEEECE19C3F2661BE +EEEEECEEEEECEEEEECEEEEECD98D340900000000071656B6728F77190600000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000D4627DED6223B0B000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010800687B00763B000D0300000000010000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000832448FC959451C020000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000010F46 +5096C34F3311010000000000000000000000000000000000000000083080CDDA9F491201000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +083080CDDA9F491201000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083080CDDA9F +491201000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000832448FC959451C020000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D4727DED6223C0B000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000107004455008E7A009B7F006A2600 +010000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000031647384F4B110500000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000040D31623A3F25050100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000031647384F4B110500000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000197631E1E12E6615000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D4627DED6223B0B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D4627DED6223B0B000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D4627DED6223B0B000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000002900008E0000 +020000000000000000000000000000000000000000062467A8C6CFDDF8F8BD4E0F000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000D4627DED6223B0B000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000020000930000 +32000000000000000000000000000000000000000000000000000000000E47B1E6BC4E0F000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000D4627DED6223B0B000000000000 +00000000000000000000000000000000000000000D216CC6728663120400000000280000900000 +3E0000030000000000000000000000000000120000760000180000000000000000000000190000 +B0000009000000000000000000000000000000000000000000000000000000000E47B1E6BC4E0F +0000000000000000051D5598C9E3E9E4E0DFDFCE9A481301000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000D4627DFDA25542B08232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B060000000000020000 +370000890000B300006A00001900000000000000001E0000CB00002A0000000000000000000000 +3E000099000001000000000000000000000000000000000000000000000000000000000E47B1E6 +BC4E0F00000000000000072C82D6E09A3C0B00000006121B120600000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +0000000000000000000B0000680000CC0000320000000000000000000000000000000000000000 +00000057000084000000000000000000000000000000000000000000000000000000000000000E +47B1E6BC4E0F0000000000000002144A9FDFE9C9A489745C3C1B07010000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000030E082E31 +0B31310B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +000000000000060000460000960000A600005600000A0000000000000000000000000000000000 +0000000000004E00008C0000000000000000000000000000000000000000000000000000000000 +00000D47B1E6BB4E0F0000000000000000000001091C344C6685AEDBF0D3843008000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000031C3384CF727A4A +0A0100000000220000B800007F00002A0000000000000000000000000000120000790000190000 +0000000000000000002E0000A40000030000000000000000000000000000000000000000000000 +00000000000A3795DED5812E08000000000000030F23251506000000041F67C8EAB44B0F000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000005124BAD +7294851E09000000000800000800000000000000000000000000000000000000001E0000CB0000 +2A00000000000000000000000B0000AE0000160000000000000000000000000000000000000000 +000000000000000000072669AFDEEEE9E1D2A450150207276DB0D5E1E2E1E4E9E7D2A76A2C0A01 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000006400005B0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000A0000560000020000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000010D461F71D5348AE23487A10F080000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000090B51CD3487A10F080000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000005331F7EE233614003000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000003201873E2346F5C06020000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000062467A8C6CFDDF8F8BD4E0F000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000F4CB9E6B4490E00000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041E5B +A3D4E5E3DCD5B9782D080000000000041E5BA3D4E5E3DCD5B9782D080000000000000000000000 +00000000000000000000000000000000000000000000000000000000021138666D4A1B04000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000021D812F8AE2348AE234 +7E860B05000000000000000000000000000000000000000000000000000000000000000000090B +51CD3487A10F080000000000000000000000000000000000000000000000000000000000000000 +00000005331F7EE233614003000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000021D812F +8AE2348AE2347E860B0500000000000000000000010D461F71D5348AE23487A10F080000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000083089D5CD76250500000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000329A2338AD62437340A171B02010000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000090B51CD3487A10F080000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005331F7EE233614003000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000003201873E2346F5C06 +020000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000E47B1E6BC4E0F000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000F4CB9E6B4490E00000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000002 +1B63C6E1A3400C00000000000000000000021B63C6E1A3400C0000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000042270CCDB933609 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000051608183416 +6DE2347E860B050000000000000000000000000000000000000000000000000000000000000000 +00090B51CD3487A10F080000000000000000000000000000000000000000000000000000000000 +00000000000005331F7EE233614003000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0516081834166DE2347E860B05000000000000000000000329A2338AD62437340A171B02010000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000010A1D2E2D19080100000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000007093F9F2C81DE348AE2337EB62034210212622A +8AE22B3D1F0100010430A8338ACA1D1C080118732D8AE22D5A90287CDE348AD323260C00000000 +000000000000000000000000021D1771E2348AE2348AE2348AE23487A10F0C2B1C79E2346A4E04 +010D1067E2347C810B0502031F6C2577D8348AE23483C223341C010001021859206ECE338AE232 +7BAE1E312002000507318C2B82DF32769E1F65D33487A10F0C2B1C79E2346A4E04010D1067E234 +7C810D268F3083BF2979D7306B8F2373D933798E1011341F7EE23473932474D73485C5243C2902 +01000000000000000000000000000000000005331F7EE2336E862170D53385C3233A2802010709 +3F9F2C81DE348AE2337EB6203421010002031F6C2577D8348AE23483C223341C0103201873E234 +7790216BCF3387C723361E01000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000E47B1E6BC4E0F00000000000000062363A5CDDDE1E0DEDBD8 +C9A1672E0C01000F4CB9E6B4490E000000072C82D3D3822C070F4CB9ECD39FA0B5BECADEE4C98C +42130200000003153F78ADD1DFE2E2E3E0D0A56021050F4CB9E9C88D95BCD8EAF6EECB8C421302 +000000000000000000000000000000000000000004184883B8D8E5E5E2E1DABF8C4D1A04000B38 +89B9C8D0E4FCFFEED5CAC7C3AB6F29070B3889B9C8D0E4FCFFEED5CAC7C3AB6F29070004184883 +B8D8E5E5E2E1DABF8C4D1A0400000003153F78ADD1DFE2E2E3E0D0A56021103787B9C8D0E5FDFF +EED6CAC7C7BD924411010000000000000000000000000000000000000006215896C7DEE4E4E4E1 +CFA5692E0C01000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D1065DF347E860B0500000000000001021859206ECE338AE2327BAE1E312002000507318C2B +82DF32769E1F65D33487A10F080000041F124EAB2E84E2348AD62C595407072B1C79E2346A4E04 +010D1067E2347C810B0A331F7EE2336E862170D53385C3233A28020101021859206ECE338AE232 +7BAE1E3120020000000000000000000000000000000000000001021859206ECE338AE2327BAE1E +312002000000000D1065DF347E860B050000000000021D1771E2348AE2348AE2348AE23487A10F +080000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000052372CDE8D2CCDCEDE1B999AACDE6EDCF873309062363A5CD +DDE1E0DEDBD8C9A1672E0C0100000C3B8DBCC9D4ECF8D376250500000000000F4CB9ECD39FA0B5 +BECADEE4C98C421302000000000000000000000000000000000000000006215896C7DEE4E4E4E1 +CFA5692E0C01000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000006083266152B380B1B391660D43484980E +0A221873E234695205010D0E5DD7347E870C05000118732D8AE2347C981729320B244B11140700 +00000000000000000000000000000000040413270C3EB6348ACF212F2F09171B02052B1C79E234 +6A4E04010D1067E2347C810B0616146CE2347C8D121D290B285615261701042B1C77E2336D7812 +26421556C73489B1161B432282E2347E9F1B44902C89E23487A10F0C2B1C79E2346A4E04010D10 +67E2347C810D268F318AC61F42932F8ADB2745782A88D6232A3E1F7EE23488B61C2F481968DA34 +88AA130F030000000000000000000000000000000005331F7EE2348AC823466F2175E23488AA13 +0F09083266152B380B1B391660D43484980E0916146CE2347C8D121D290B285615261701032018 +73E2348AC52140702480E234787409040000000000000000000000000000000000000000000000 +00000000000000000000000000000000000E47B1E6BC4E0F00000000000000020D1F2113060000 +00011249A4DDC2641C030F4CB9E6B4490E000000072C82D3D3822C070F4CBAF5E4964010010114 +54BAEAC35E190202154FAAE4D4893E1102000006172B2912030F4CBAF7EEAD5D250B08236AC9EF +C35E19020000000000000000000000000000000000031A5AB1D6AB5D24090100062368BFDDA544 +0E0000000004206DC9D99235090000000000000000000004206DC9D99235090000000000031A5A +B1D6AB5D24090100062368BFDDA5440E02154FAAE4D4893E1102000006172B2912030000000422 +70CCDB933609000000000000000000000000000000000000000000000000021757B5E7CB752A08 +01041E5FB7E7CB7325050000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000D1065DF347E860B050000000000042B1C77E2336D781226421556C73489B1161B4322 +82E2347E9F1B44902C89E23487A10F08050840B7348AD9284B59112D5919475508082B1C79E234 +6A4E04010D1067E2347C810B0A331F7EE2348AC823466F2175E23488AA13132E1C77E2336D7812 +26421556C73489B116120400000000000000000000000000000000042B1C77E2336D7812264215 +56C73489B116120400000D1065DF347E860B05000000000000040413270C3EB6348ACF212F2F09 +171B02010000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000052372CEDF9B3D1D50BBF2D87E2E266AC3C57022060D +1F211306000000011249A4DDC2641C030000000000083089D5CD76250500000000000F4CBAF5E4 +96401001011454BAEAC35E19020000000000000000000000000000000000021757B5E7CB752A08 +01041E5FB7E7CB7325050000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000010C0A3A8F2979D33289E2348AE234 +8AB81611090945C134859B0F0E331F7EE23056370200000118732D8AE22B3D1F01000000000000 +0000000A35174B801D4E801D4C6B100F04000000000000032CAA348AC71C1B0700000000042B1C +79E2346A4E04010D1067E2347C810B050B0C51C8348AE2306F9D1F414C0908020113662B8AE234 +8AE2348AE2348AE2348ADA253D7C2C8AE22C41230101121166DE3487A10F0C2B1C79E2346A4E04 +010D1067E2347C810D268F3188AA1118592987C71D213E2080DE2731421F7EE2346C5705010104 +2DA6338AD020200A0000000000000000000000000000000005331F7EE2346F5F0602020531AC34 +8AD02021150A3A8F2979D33289E2348AE2348AB816110E0C51C8348AE2306F9D1F414C09080200 +03201873E234746A08030C0E5FDA34808F0D060000000000000000000000000000000000000000 +00000000000000000000000000000000000000000E47B1E6BC4E0F00000000000000020F346A9B +BCCBCECDCCCDD5E9F9DC872F080F4CB9E6B4490E000000072C82D3D3822C070F4CB9E9B94E1000 +0000072E85D4D27F2B060B3EA0E2CD702204000000000000000000000F4CB9EABB501100000008 +3088D6D27F2B0600000000000000000000000000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7 +DAB664200400000004206DC9D99235090000000000000000000004206DC9D99235090000000000 +0D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200F3EA0E2CD702204000000000000000000000000 +00042270CCDB9336090000000000000000000000000000000000000000000000000A3999DED077 +2605000000011559C3ECBA4F100000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D1065DF347E860B05000000000113662B8AE2348AE2348AE2348AE2348ADA25 +3D7C2C8AE22C41230101121166DE3487A10F0916146CE23479780A040000000000000000042B1C +79E2346A4E04010D1067E2347C810B0A331F7EE2346F5F0602020531AC348AD02134702B8AE234 +8AE2348AE2348AE2348ADA24260C0000000000000000000000000000000113662B8AE2348AE234 +8AE2348AE2348ADA24260C00000D1065DF347E860B0500000000000000000000032CAA348AC71C +1B0700000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000052372C9CC7927103A9ADBBF5815114EB5D89B +3B0C0F346A9BBCCBCECDCCCDD5E9F9DC872F080000000000083089D5CD76250500000000000F4C +B9E9B94E10000000072E85D4D27F2B0600000000000000000000000000000000000A3999DED077 +2605000000011559C3ECBA4F100000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000001115F2A8AE2336B71101D2C10 +53CB348ABD181404021A792D8ACF21377B2D8AD522250C0000000118732D8AE229331500000000 +00000000000113652B8AE2348AE2348ACA1D1C08000000000000032CAA348AC71C1B0700000000 +042B1C79E2346B51040213126BE2347C810B050000020F092B611B56A72E89E23368570715672B +8AE22D4B420A1929091929091926081E722C8AE22A3B1C01000E0F60DA3487A10F0C2B1C79E234 +6B51040213126BE2347C810D268F3188AA1117582987C71C213D2080DE2833421F7EE234716107 +02020532AE348AD020200A0000000000000000000000000000000005331F7EE2346E5C06020104 +30AA348AD02131692A8AE2336B71101D2C1053CB348ABD18140400020F092B611B56A72E89E233 +68570604201873E2346F5C06020C0E5CD734818F0D060000000000000000000000000000000000 +00000000000000000000000000000000000000000000000D47B1E6BB4E0F00000000000008318A +D9DD984715030000083088D8DA8C32080E4BB6E6B64B0F000000083089D7D4822C070F4CB9E6B4 +490E000000072C82D3D3822C070B3EA0E2CD702204000000000000000000000F4CB9E6B4490E00 +0000072C82D3D3822C0700000000000000000000000000000000000D46AEE7C7621A0200000000 +000000000000000000000004206DC9D99235090000000000000000000004206DC9D99235090000 +0000000D46AEE7C7621A0200000000000000000000000B3EA0E2CD702204000000000000000000 +00000000042270CCDB9336090000000000000000000000000000000000000000000000000A3999 +DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000C0F63DE347F8B0C06000000000113672B8AE22D4B420A192909192909 +1926081E722C8AE22A3B1C01000E0F60DA3487A10F0916146CE23479780A040000000000000000 +042B1C79E2346B51040213126BE2347C810B0A331F7EE2346E5C0602010430AA348AD02134712B +8AE22D4B420A19290919290919260607020000000000000000000000000000000113672B8AE22D +4B420A192909192909192606070200000C0F63DE347F8B0C0600000000000000000000032CAA34 +8AC71C1B0700000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000052372C8C872230E3693D6BA51100E49 +B1DAA4483D8AD9DD984715030000083088D8DA8C32080000000000083089D5CD76250500000000 +000F4CB9E6B4490E000000072C82D3D3822C0700000000000000000000000000000000000A3999 +DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000112632B8AE230573D04 +0B351B74E2348ABD18140400052F1E7BE2327CDA3483990F09000000000118732D8AE229331500 +0000000000000000000000000000000000000000000000000000000000032CAA348AC71C1B0700 +000000021C1670E2347F941429652684E2347C810B050A0A396914263009193C196EE13479790A +092E1D79E2347C98182D3F0F2D5C1C5A8B1218432382E234717B122A692683E23487A10F0A1C16 +70E2347F941429652684E2347C810D268F3188AA1117582987C71C213D2080DE2833421F7EE234 +8AC823466F2175E13488AB140F030000000326993087D42734190100000005331F7EE2348AC522 +43692073E03488AA1421662B8AE230573D040B351B74E2348ABD18140E0A396914263009193C19 +6EE13479790A07201873E2346F5C06020C0E5CD734818F0D060000000000000000000000000000 +00000000000000000000000000000000000000000000000000000A3795DED5812E080000000000 +0B3EA0E3D17726050000092F7FD6FBE18C3208093794DED5822C0700062268C5F4DA822C070F4C +B9E6B4490E000000072C82D3D3822C0702154FAAE4D3863B100200000411232410030F4CB9E6B4 +490E000000072C82D3D3822C070000000000000000000000000000000000031A5AB5E7D082380F +020000020E273D3718050000000004206DC9D99235090000000000000000000004206DC9D99235 +090000000000031A5AB5E7D082380F020000020E273D37180502154FAAE4D3863B100200000411 +2324100300000002175DC5EBB8511301000000000000000000000317477F9787551F0500000000 +021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000080B50CC348AC71F32350A181E03072E1D79E2347C98182D3F0F +2D5C1C5A8B1218432382E234717B122A692683E23487A10F08050841B8348AD9284C5A112F5919 +475708061C1670E2347F941429652684E2347C810B0A331F7EE2348AC52243692073E03488AA13 +13311D79E2347C98182D3F0F2D5C1C5A8B120F030000000326993087D427341901000000052E1D +79E2347C98182D3F0F2D5C1C5A8B120F030000080B50CC348AC71F32350A181E03020000000003 +2CAA348AC71C1B0700000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000052372C8C872230E3693D6BA51 +100E49B1DAA44B4AA0E3D17726050000092F7FD6FBE18C32080000000000083089D5CD76250500 +000000000F4CB9E6B4490E000000072C82D3D3822C07000000000317477F9787551F0500000000 +021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000001120E4AAC2F +88E2337FBC276BD2348ABD1814040000090C53CF348AE23261460401000000000118732D8AE229 +3315000000000000000000000000000000000000000000000000000000000000032CAA348AC71C +1B07000000000004052D8C2C86E23277A32379E2347C810B050B0C4BAD2E83E1348AE2337FB41F +301C010001031958206CC9328AE23489D62E687D0E0A070732902C83E1337AA9226AD63487A10F +0804052D8C2C86E23277A32379E2347C810D268F3188AA1117582987C71C213D2080DE2833421F +7EE2336F882272D73486C5243C2A020100000000032AA7348AE22A391B0100000005331F7EE233 +6E842170D53486C6243C2A0202120E4AAC2F88E2337FBC276BD2348ABD18140F0C4BAD2E83E134 +8AE2337FB41F301C0103201873E2346F5C06020C0E5CD734818F0D060000000000000000000000 +000000000000000000000000000000000000000000000000000000000000072669AFDEEEE9E1D2 +A4501502072564A6CFD7C9B7AEADA597ADDEDA8C32080007276BB1DDE5D4C2BBAE9FB6E1D5822C +070F4CB9E6B4490E000000072C82D3D3822C07000003154079AED0DDDEDEDFDED0A66121050F4C +B9E6B4490E000000072C82D3D3822C070000000000000000000000000000000000000004184680 +B3D4DFDFDFE2E5E1CFA76826060000000004206DC9D99235090000000000000000000004206DC9 +D99235090000000000000004184680B3D4DFDFDFE2E5E1CFA7682606000003154079AED0DDDEDE +DFDED0A66121050000000003184F98CDE0DCD4D1C59947120100000000052677D6FEE490340900 +000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000001155B2377DB348AE2348AAF130C02031958206CC932 +8AE23489D62E687D0E0A070732902C83E1337AA9226AD63487A10F08000005211250AD2E85E234 +8AD72C5B55070304052D8C2C86E23277A32379E2347C810B0A331F7EE2336E842170D53486C624 +3C2A020101031958206CC9328AE23489D62E687D0E0A02000000032AA7348AE22A391B01000000 +0001031958206CC9328AE23489D62E687D0E0A0200000001155B2377DB348AE2348AAF130C0100 +0000032CAA348AC71C1B0700000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000052372C8C872230E3693 +D6BA51100E49B1DAA440132564A6CFD7C9B7AEADA597ADDEDA8C320A174F9BC2CCCED8EEFFFEE9 +D5CDCCC093410F0F4CB9E6B4490E000000072C82D3D3822C0700000000052677D6FEE490340900 +000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +05331F7EE233614003000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000005331F7EE233614003000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000006204E686E6E6E6E6E6E6E6E6E6E6E6E6E +6E6E69542C0D010000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000093E206EBA253B2301000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000093592DACC7223050000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000021D812F8AE2348AE2347E860B050000000000000000000000000000000000000000000000 +00000000000000000000090B51CD3487A10F080000000000000000000000000000000000000000 +00000000000000000000000000000005331F7EE233614003000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000005331F7EE233614003 +0000000000000000000000000000000B4E288AE22E4A2B02000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000062467A8C6CFDDF8F8 +BD4E0F000000000000000000000000000000000000000000000000000000000000000000000009 +3592DACC7223050000000000000000000000000000000000000000000000000000000000000000 +000000000F4FBDE9B5490E00000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000F4CB9E6B4490E00000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000A3897E8FFFCBF5C180200011049ACF3FFF9B5490E00000000000000000000 +00000000000000042270CCDE99390A000000000000000000000000000000000000000000000000 +000000000000000000041E5BA3D4E5E3DCD5B9782D080000000000083089D5CD76250500000000 +062467A8C6CFDDF8F8BD4E0F000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000093592DACC7223050000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000516081834166DE2347E860B050000000000000000000000000000000000000000 +00000000000000000000000000090B51CD3487A10F080000000000000000000000000000000000 +00000000000000000000000000000000000005331F7EE233614003000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000005331F7EE233 +614003000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000E +47B1E6BC4E0F000000000000000000000000000000000000000000000000000000000000000000 +0000093592DACC7223050000000000000000000000000000000000000000000000000000000000 +000000000000000F4FBDE9B5490E00000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000F4CB9E6B4490E00000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000A3897E0E8D2D6B45A18031048A2CFCEEAF0B5490E00000000000000 +00000000000000000000042270CCDE99390A000000000000000000000000000000000000000000 +0000000000000000000000021B63C6E1A3400C0000000000000000000000010A1D2E2D19080100 +00000000000000000E47B1E6BC4E0F000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000010C2E6CACD9EDEDDECBB2A1BEE4CD7223050000 +052474CCDAA37C91AEBBC1C9D2CE9F46152363A5CDDDE1E0DEDBD8C9A1672E163B99DBC4631B03 +00000000000000000E48ACDEB14D11000000000000000000000000000000000006215896C7DEE4 +E4E4E1CFA5692E0C01000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D1065DF347E860B0500000000000001021859206ECE338AE232 +7BAE1E312002000507318C2B82DF32769E1F65D33487A10F080000041F124EAB2E84E2348AD62C +595407072B1C79E2346A4E04010D1067E2347C810B0A331F7EE2336E862170D53385C3233A2802 +0101021859206ECE338AE2327BAE1E31200200000000000000000000000000000000000005331F +7EE2336E862170D53385C3233A280201070A4BC7348AE2348AE22E4A2B0200000003201873E234 +7B9F2471D43487C723361E01000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000E47B1E6BC4E0F000000000000000004184883B8D8E5E5E2E1DABF8C4D1A0400010C2E6CAC +D9EDEDDECBB2A1BEE4CD722305000003153F78ADD1DFE2E2E3E0D0A56021050F4CB9E6B4490E00 +0000072C82D3D3822C070F4FBDEED3A2ABCBDFE5E6DDBB80401302000004184883B8D8E5E5E2E1 +DABF8C4D1A04000000000000000000000000000000000000000F4CB9E9C88D95BCD8EAF6EECB8C +421302000004184883B8D8E5E5E2E1DABF8C4D1A04052267B8DBB25F1E040002154DA1DACA7E30 +0A0000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000A3897DCCE8B86B9AF5A284AA1BD8E7FC7EAB549142363A5CD +DDE1E0DEDBD8C9A1672E0C0100042270CCDE99390A010E3478BDDAB7702E0B0104184883B8D8E5 +E5E2E1DABF8C4D1A04000B3889B9C8D0E4FCFFEED5CAC7C3AB6F2907000C3B8DBCC9D4ECF8D376 +25050000000000000000000E47B1E6BC4E0F000000000000000004184883B8D8E5E5E2E1DABF8C +4D1A04000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000004226EC8E8BF6F300E04124499E6FDD37223 +050000052474D3FCE7A04D1603000001060B07040D1F211306000000011249A4DDC2652F55B6DD +A7430D020F27362C1203083088D3C76B1F04000000000000000000000000000000021757B5E7CB +752A0801041E5FB7E7CB7325050000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D1065DF347E860B050000000000042B1C77E2336D7812 +26421556C73489B1161B432282E2347E9F1B44902C89E23487A10F08050840B7348AD9284B5911 +2D5919475508082B1C79E2346A4E04010D1067E2347C810B0A331F7EE2348AC823466F2175E234 +88AA13132E1C77E2336D781226421556C73489B116120400000000000000000000000000000000 +05331F7EE2348AC823466F2175E23488AA130F04020C220922692B8AE22E4A2B02000000032018 +73E23489B51A294A1E79E234787409040000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000E47B1E6BC4E0F000000000000031A5AB1D6AB5D24090100062368BFDDA54412226E +C8E8BF6F300E04124499E6FDD372230502154FAAE4D4893E1102000006172B2912030F4CB9E6B4 +490E000000072C82D3D3822C070F4FBFFBF4B8672B0B03114499DFDB8D330B1A5AB1D6AB5D2409 +0100062368BFDDA5440E0000000000000000000000000000000000000F4CBAF7EEAD5D250B0823 +6AC9EFC35E19051A5AB1D6AB5D24090100062368BFDDA5440E00031B58AAD9BB6E3F5EACDBBE6E +260700000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000A3897DCCA713F6AB6BEA1B9C07D3E5BC0EAB549100D +1F211306000000011249A4DDC2641C03042270CCDE9B48417BBFD9B46D2C0A0100031A5AB1D6AB +5D24090100062368BFDDA5440E0000000004206DC9D99235090000000000000000000000083089 +D5CD7625050000000000000000000E47B1E6BC4E0F000000000000031A5AB1D6AB5D2409010006 +2368BFDDA5440E0000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000E49B3EAC55D17020000000C40A4E4 +CF7223050000052474CFE29F3D0B0000000000000000020F346A9BBCCBCECDCCCDD5E9F9DC8733 +2B71C9CF7F2F2567C7F0D67F2E2161C0D48E3409000000000000000000000000000000000A3999 +DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D1065DF347E860B05000000000113662B8AE234 +8AE2348AE2348AE2348ADA253D7C2C8AE22C41230101121166DE3487A10F0916146CE23479780A +040000000000000000042B1C79E2346A4E04010D1067E2347C810B0A331F7EE2346F5F06020205 +31AC348AD02134702B8AE2348AE2348AE2348AE2348ADA24260C00000000000000000000000000 +00000005331F7EE2346F5F0602020531AC348AD020200A000000000B4E288AE22E4A2B02000000 +03201873E234726607030C0E5ED934808F0D060000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000E47B1E6BC4E0F0000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +2E4DB3EAC55D17020000000C40A4E4CF7223050B3EA0E2CD702204000000000000000000000F4C +B9E6B4490E000000072C82D3D3822C070F4FBFEFC15513010000000C42A8E5C9672A49AEF0F6DA +C8C3C3C3C3C3C4CAD7DAB664200400000000000000000000000000000000000F4CB9EABB501100 +0000083088D6D27F2B1346AEF0F6DAC8C3C3C3C3C3C4CAD7DAB6642004000002144A9FE6FEF1B6 +601E04000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000A3897DCCA6D242368C9F7DB822D1A54C0EAB5 +49100F346A9BBCCBCECDCCCDD5E9F9DC872F08042270CFF7F1EDFCFFDD87320A000000000D46AE +F0F6DAC8C3C3C3C3C3C4CAD7DAB664200400000004206DC9D99235090000000000000000000000 +083089D5CD7625050000000000000000000E47B1E6BC4E0F0000000000000D46AEF0F6DAC8C3C3 +C3C3C3C4CAD7DAB664200400000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000E48B2E9C25815010000000B +3D9FE1CE7223050000052474CCD68B31080000000000000008318AD9DD984715030000083088D8 +DA8C32113794D5BC6D69A6AC8BA4AD7563A8D8AD4A0F0000000000000000000000000000000000 +0A3999DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000C0F63DE347F8B0C06000000000113672B +8AE22D4B420A1929091929091926081E722C8AE22A3B1C01000E0F60DA3487A10F0916146CE234 +79780A040000000000000000042B1C79E2346B51040213126BE2347C810B0A331F7EE2346E5C06 +02010430AA348AD02134712B8AE22D4B420A192909192909192606070200000000000000000000 +00000000000005331F7EE2346E5C0602010430AA348AD020200A000000000B4E288AE22E4A2B02 +00000003201873E2346F5C06020C0E5CD734818F0D060000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000D47B1E6BB4E0F0000000000000D46AEE7C7621A0200000000000000 +0000000E48B2E9C25815010000000B3D9FE1CE7223050B3EA0E2CD702204000000000000000000 +000E4BB6E6B64B0F000000083089D7D4822C070F4FBFEFC15513010000000C42A8E5C8662949AE +E7C7621A0200000000000000000000000000000000000000000000000000000000000F4CB9E6B4 +490E000000072C82D3D3822C1446AEE7C7621A020000000000000000000000000000092C77C5E8 +E8EBD48D3D0F010000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000A3897DCCA6D200507141D180A021254 +C0EAB5513F8AD9DD984715030000083088D8DA8C3208042270CFEFC370415FAEE3D084340B0100 +0D46AEE7C7621A0200000000000000000000000000000004206DC9D99235090000000000000000 +000000083089D5CD7625050000000000000000000D47B1E6BB4E0F0000000000000D46AEE7C762 +1A0200000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000004216CC5DCA2491302 +00082C7ED8F9D37223050000052474CCD68B3108000000000000000B3EA0E3D17726050000092F +7FD6FBE18C3208114EB1E2DDD3B05B294AA1CFD5E3C4671D03000000000317477F9787551F0500 +000000021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000080B50CC348AC71F32350A181E03 +072E1D79E2347C98182D3F0F2D5C1C5A8B1218432382E234717B122A692683E23487A10F080508 +41B8348AD9284C5A112F5919475708061C1670E2347F941429652684E2347C810B0A331F7EE234 +8AC52243692073E03488AA1313311D79E2347C98182D3F0F2D5C1C5A8B120F0300000003269930 +87D42734190100000005331F7EE2348AC52243692073E03488AA13100C0616290A22692B8AE22F +574D0B1927070C241873E2346F5C06020C0E5CD734818F0D060000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000A3795DED5812E080000000000031A5AB5E7D082380F020000 +020E273D371809216CC5DCA249130200082C7ED8F9D372230502154FAAE4D3863B100200000411 +23241003093794DED5822C0700062268C5F4DA822C070F4FBFFBF3B563270A03104196DDDA8B32 +0B1A5AB5E7D082380F020000020E273D371805000000000317477F9787551F0500000000000F4C +B9E6B4490E000000072C82D3D3822C0A1A5AB5E7D082380F020000020E273D371805010D3888D0 +D696441D3683CEDA9E4B1502000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000A3897DCCA6D20040000000000 +001254C0EAB5544CA0E3D17726050000092F7FD6FBE18C3208042270CCDE99390A031750A6E2D8 +8F3D0F041A5AB5E7D082380F020000020E273D3718050000000004206DC9D99235090000000000 +000000000000083089D5CD7625050000000000000000000A3795DED5812E080000000000031A5A +B5E7D082380F020000020E273D3718050000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000010C2E6CAC +D4DBCAB8B2B1B1CDEBCE7223050000052474CCD68B31080000000000000000072564A6CFD7C9B7 +AEADA597ADDEDA8C320804206DCFF6CF6E21061555BAF2DF8A31080000000000052677D6FEE490 +340900000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000001155B2377DB348AE234 +8AAF130C02031958206CC9328AE23489D62E687D0E0A070732902C83E1337AA9226AD63487A10F +08000005211250AD2E85E2348AD72C5B55070304052D8C2C86E23277A32379E2347C810B0A331F +7EE2336E842170D53486C6243C2A020101031958206CC9328AE23489D62E687D0E0A0200000003 +2AA7348AE22A391B0100000005331F7EE2336E842170D53486C6243C2A0207382181E2348AE234 +8AE2348AE2348AE22A3C3B1873E2346F5C06020C0E5CD734818F0D060000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000072669AFDEEEE9E1D2A45015020004184680B3D4DF +DFDFE2E5E1CFA7682606010C2E6CACD4DBCAB8B2B1B1CDEBCE722305000003154079AED0DDDEDE +DFDED0A66121050007276BB1DDE5D4C2BBAE9FB6E1D5822C070F4FBEEFD5A6B1D0E0E2E3DBBB81 +401303000004184680B3D4DFDFDFE2E5E1CFA768260600000000052677D6FEE490340900000000 +000F4CB9E6B4490E000000072C82D3D3822C070004184680B3D4DFDFDFE2E5E1CFA76828194799 +D9D48C3A0E010000082B77C6DFAF5B1C0400000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000A3897DCCA6D20040000 +000000001254C0EAB549152564A6CFD7C9B7AEADA597ADDEDA8C3208042270CCDE99390A000002 +14499EE0DE9B461206184680B3D4DFDFDFE2E5E1CFA76826060000000004206DC9D99235090000 +00000002174F9BC2CCCED8EEFFFEE9D5CDCCC093410F0000000000072669AFDEEEE9E1D2A45015 +020004184680B3D4DFDFDFE2E5E1CFA76826060000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000093E206EBA253B2301000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041E5B +A3D4E5E3DCD5B9782D080000000000041E5BA3D4E5E3DCD5B9782D080000000000000000000000 +00000000000000000000000000000000000000000000000000000000021138666D4A1B04000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000021D812F8AE2348AE2347E860B050000000000000000000000000000000000000000000000 +00000000000000000000090B51CD3487A10F080000000000000000000000000000000000000000 +00000000000000000000000000000005331F7EE233614003000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +05331F7EE2336140030000000000000000000000000000000B4E288AE22E4A2B02000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000062467A8C6CFDDF8F8 +BD4E0F000000000000000000000000000000000000000000000000000000000000000000000009 +3592DACC7223050000000000000000000000000000000000000000000000000000000000000000 +000000000F4FBDE9B5490E00000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000062467A8C6CFDDF8F8BD4E0F000000000000000000 +00000000000000000000000000000000000000021138666D4A1B04000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000002 +1B63C6E1A3400C00000000000000000000021B63C6E1A3400C0000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000042270CCDB933609 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000516081834166DE2347E860B050000000000000000000000000000000000000000 +00000000000000000000000000090B51CD3487A10F080000000000000000000000000000000000 +00000000000000000000000000000000000005331F7EE233614003000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000005331F7EE233614003000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000E +47B1E6BC4E0F000000000000000000000000000000000000000000000000000000000000000000 +0000093592DACC7223050000000000000000000000000000000000000000000000000000000000 +000000000000000F4FBDE9B5490E00000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000E47B1E6BC4E0F000000000000 +00000000000000000000000000000000000000000000042270CCDB933609000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000004184883B8D8E5E5E2E1DABF8C4D1A04000B38 +89B9C8D0E4FCFFEED5CAC7C3AB6F29070B3889B9C8D0E4FCFFEED5CAC7C3AB6F29070004184883 +B8D8E5E5E2E1DABF8C4D1A0400000003153F78ADD1DFE2E2E3E0D0A56021103787B9C8D0E5FDFF +EED6CAC7C7BD924411010000000000000000000000000000000000000006215896C7DEE4E4E4E1 +CFA5692E0C01000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D1065DF347E860B0500000000000001021859206ECE338AE232 +7BAE1E312002000507318C2B82DF32769E1F65D33487A10F080000041F124EAB2E84E2348AD62C +595407072B1C79E2346A4E04010D1067E2347C810B0A331F7EE2336E862170D53385C3233A2802 +0101021859206ECE338AE2327BAE1E312002000000000000000000000000000000000000000102 +1859206ECE338AE2327BAE1E3120020001021859206ECE338AE2327BAE1E31200205331F7EE234 +73932474D73485C5243C290201000118732D8AE22D5A90287CDE348AD323260D021757206ECF33 +8ADF317398171F0F03228F3083BF2979D7306B8F2373D933798E100C0200000000000000000000 +00000000000005331F7EE2336E862170D53385C3233A280201070A4BC7348AE2348AE22E4A2B02 +00000003201873E2347B9F2471D43487C723361E01000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000E47B1E6BC4E0F000000000000000004184883B8D8E5E5E2E1DABF8C4D1A0400010C2E6CAC +D9EDEDDECBB2A1BEE4CD722305000003153F78ADD1DFE2E2E3E0D0A56021050F4CB9E6B4490E00 +0000072C82D3D3822C070F4FBDEED3A2ABCBDFE5E6DDBB80401302000004184883B8D8E5E5E2E1 +DABF8C4D1A0400000000000000000000000000000000000000000000000E47B1E6BC4E0F000000 +0000000000051D5598C9E3E9E4E0DFDFCE9A4813010B3787B9C8D0E5FDFFEED6CAC7C7BD924411 +010000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000A0D8FCF32BFB42ED7CF288F982BD9DE2E8E44040200021F4D +1DABC732E2E234D6BE22541D010000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000031A5AB1D6AB5D24090100062368BFDDA544 +0E0000000004206DC9D99235090000000000000000000004206DC9D99235090000000000031A5A +B1D6AB5D24090100062368BFDDA5440E02154FAAE4D4893E1102000006172B2912030000000422 +70CCDB933609000000000000000000000000000000000000000000000000021757B5E7CB752A08 +01041E5FB7E7CB7325050000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D1065DF347E860B050000000000042B1C77E2336D7812 +26421556C73489B1161B432282E2347E9F1B44902C89E23487A10F08050840B7348AD9284B5911 +2D5919475508082B1C79E2346A4E04010D1067E2347C810B0A331F7EE2348AC823466F2175E234 +88AA13132E1C77E2336D781226421556C73489B116120400000000000000000000000000000000 +042B1C77E2336D781226421556C73489B116162F1C77E2336D781226421556C73489B11617361F +7EE23488B61C2F481968DA3488AA130F030118732D8AE2347C981729320B244B11182F1A75E234 +80A21B3A6E2379E2347E8B102A90318AC61F42932F8ADB2745782A88D623250C00000000000000 +00000000000000000005331F7EE2348AC823466F2175E23488AA130F04020C220922692B8AE22E +4A2B0200000003201873E23489B51A294A1E79E234787409040000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000E47B1E6BC4E0F000000000000031A5AB1D6AB5D24090100062368BFDDA54412226E +C8E8BF6F300E04124499E6FDD372230502154FAAE4D4893E1102000006172B2912030F4CB9E6B4 +490E000000072C82D3D3822C070F4FBFFBF4B8672B0B03114499DFDB8D330B1A5AB1D6AB5D2409 +0100062368BFDDA5440E000000000000000000000000000000000000000000000E47B1E6BC4E0F +00000000000000072C82D6E09A3C0B00000006121B12060000000000042270CCDB933609000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000A0D8FD334C6881993CE34DBA91A78B733D6980E1123 +18B7E234D9AE1C594A11596C1B5522010000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7 +DAB664200400000004206DC9D99235090000000000000000000004206DC9D99235090000000000 +0D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200F3EA0E2CD702204000000000000000000000000 +00042270CCDB9336090000000000000000000000000000000000000000000000000A3999DED077 +2605000000011559C3ECBA4F100000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D1065DF347E860B05000000000113662B8AE234 +8AE2348AE2348AE2348ADA253D7C2C8AE22C41230101121166DE3487A10F0916146CE23479780A +040000000000000000042B1C79E2346A4E04010D1067E2347C810B0A331F7EE2346F5F06020205 +31AC348AD02134702B8AE2348AE2348AE2348AE2348ADA24260C00000000000000000000000000 +00000113662B8AE2348AE2348AE2348AE2348ADA2539712B8AE2348AE2348AE2348AE2348ADA24 +2B3E1F7EE2346C57050101042DA6338AD020200A0118732D8AE22B3D1F01000000000001105D2A +8AE22D46280100030637B3348AC81F3D963188AA1118592987C71D213E2080DE272C0F00000000 +00000000000000000000000005331F7EE2346F5F0602020531AC348AD020200A000000000B4E28 +8AE22E4A2B0200000003201873E234726607030C0E5ED934808F0D060000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000E47B1E6BC4E0F0000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +2E4DB3EAC55D17020000000C40A4E4CF7223050B3EA0E2CD702204000000000000000000000F4C +B9E6B4490E000000072C82D3D3822C070F4FBFEFC15513010000000C42A8E5C9672A49AEF0F6DA +C8C3C3C3C3C3C4CAD7DAB66420040000000000000000000000000000000000000000000E47B1E6 +BC4E0F0000000000000002144A9FDFE9C9A489745C3C1B0701000000000000042270CCDB933609 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000A0D8FD333AA4B0959B433C77C0C3E8D30DEA9 +11255529E2E22D782A020000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000D46AEE7C7621A0200000000 +000000000000000000000004206DC9D99235090000000000000000000004206DC9D99235090000 +0000000D46AEE7C7621A0200000000000000000000000B3EA0E2CD702204000000000000000000 +00000000042270CCDB9336090000000000000000000000000000000000000000000000000A3999 +DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000C0F63DE347F8B0C06000000000113672B +8AE22D4B420A1929091929091926081E722C8AE22A3B1C01000E0F60DA3487A10F0916146CE234 +79780A040000000000000000042B1C79E2346B51040213126BE2347C810B0A331F7EE2346E5C06 +02010430AA348AD02134712B8AE22D4B420A192909192909192606070200000000000000000000 +00000000000113672B8AE22D4B420A1929091929091926071B692B8AE22D4B420A192909192909 +1926060C341F7EE23471610702020532AE348AD020200A0118732D8AE229331500000000000001 +105D2A8AE22D46270100030637B3348AC81F3D963188AA1117582987C71C213D2080DE282D1000 +00000000000000000000000000000005331F7EE2346E5C0602010430AA348AD020200A00000000 +0B4E288AE22E4A2B0200000003201873E2346F5C06020C0E5CD734818F0D060000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000D47B1E6BB4E0F0000000000000D46AEE7C7621A0200000000000000 +0000000E48B2E9C25815010000000B3D9FE1CE7223050B3EA0E2CD702204000000000000000000 +000E4BB6E6B64B0F000000083089D7D4822C070F4FBFEFC15513010000000C42A8E5C8662949AE +E7C7621A020000000000000000000000000000000000000000000000000000000000000000000D +47B1E6BB4E0F0000000000000000000001091C344C6685AEDBF0D384300800000000042270CCDB +933609000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000A0D8FD333AA4A0958B333C77B0C3D8C +30DEAC12265529E2E22D782A020000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000031A5AB5E7D082380F +020000020E273D3718050000000004206DC9D99235090000000000000000000004206DC9D99235 +090000000000031A5AB5E7D082380F020000020E273D37180502154FAAE4D3863B100200000411 +2324100300000002175DC5EBB8511301000000000000000000000317477F9787551F0500000000 +021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000080B50CC348AC71F32350A181E03 +072E1D79E2347C98182D3F0F2D5C1C5A8B1218432382E234717B122A692683E23487A10F080508 +41B8348AD9284C5A112F5919475708061C1670E2347F941429652684E2347C810B0A331F7EE234 +8AC52243692073E03488AA1313311D79E2347C98182D3F0F2D5C1C5A8B120F0300000000000000 +000000000000000000052E1D79E2347C98182D3F0F2D5C1C5A8B1214311D79E2347C98182D3F0F +2D5C1C5A8B1215351F7EE2348AC823466F2175E13488AB140F030118732D8AE229331500000000 +00000004291B75E2347FA01A396B2278E2347F8C102A903188AA1117582987C71C213D2080DE28 +2D100000000326993087D42734190100000005331F7EE2348AC52243692073E03488AA13100C06 +16290A22692B8AE22F574D0B1927070C241873E2346F5C06020C0E5CD734818F0D060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000A3795DED5812E080000000000031A5AB5E7D082380F020000 +020E273D371809216CC5DCA249130200082C7ED8F9D372230502154FAAE4D3863B100200000411 +23241003093794DED5822C0700062268C5F4DA822C070F4FBFFBF3B563270A03104196DDDA8B32 +0B1A5AB5E7D082380F020000020E273D371805000000000317477F9787551F0500000000000000 +00000A3795DED5812E08000000000000030F23251506000000041F67C8EAB44B0F000000000217 +5DC5EBB85113010000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000A0D8FD333AA4A0958B333C77B +0C3D8C30DEAC11152318B8E234D9AE1D5A4B12596D1B5723010000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000004184680 +B3D4DFDFDFE2E5E1CFA76826060000000004206DC9D99235090000000000000000000004206DC9 +D99235090000000000000004184680B3D4DFDFDFE2E5E1CFA7682606000003154079AED0DDDEDE +DFDED0A66121050000000003184F98CDE0DCD4D1C59947120100000000052677D6FEE490340900 +000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000001155B2377DB348AE234 +8AAF130C02031958206CC9328AE23489D62E687D0E0A070732902C83E1337AA9226AD63487A10F +08000005211250AD2E85E2348AD72C5B55070304052D8C2C86E23277A32379E2347C810B0A331F +7EE2336E842170D53486C6243C2A020101031958206CC9328AE23489D62E687D0E0A0200000000 +0000000000000000000000000001031958206CC9328AE23489D62E687D0E0A03031958206CC932 +8AE23489D62E687D0E10341F7EE2336F882272D73486C5243C2A0201000118732D8AE229331500 +000000000000000102195A216FCF338AE131749B18201003228F3188AA1117582987C71C213D20 +80DE282D10000000032AA7348AE22A391B0100000005331F7EE2336E842170D53486C6243C2A02 +07382181E2348AE2348AE2348AE2348AE22A3C3B1873E2346F5C06020C0E5CD734818F0D060000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000072669AFDEEEE9E1D2A45015020004184680B3D4DF +DFDFE2E5E1CFA7682606010C2E6CACD4DBCAB8B2B1B1CDEBCE722305000003154079AED0DDDEDE +DFDED0A66121050007276BB1DDE5D4C2BBAE9FB6E1D5822C070F4FBEEFD5A6B1D0E0E2E3DBBB81 +401303000004184680B3D4DFDFDFE2E5E1CFA768260600000000052677D6FEE490340900000000 +000000000000072669AFDEEEE9E1D2A450150207276DB0D5E1E2E1E4E9E7D2A76A2C0A01000000 +000003184F98CDE0DCD4D1C5994712010000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000A0D8FD333AA4A0958B3 +33C77B0C3D8C30DEAC11100002214F1EADC832E2E234D7C022551D010000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000005331F7EE233614003000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005331F7EE233614003000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D1066DF348AE2348AE2348AE2348AE2348AE2346F5F07020000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000041E5BA3D4E5E3DCD5B9782D080000000000000000 +00000000000000000000000000000000000000000000000000000000000000021138666D4A1B04 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000062467A8C6CFDDF8F8BD4E0F000000000000000000000000000000000000000000000000 +0000000000000000000000093592DACC7223050000000000000000000000000000000000000000 +000000000000000000000000000000000F4FBDE9B5490E00000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000F4CB9E6B4490E00000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000062467A8C6CFDDF8F8 +BD4E0F000000000000000000000000000000000000000000000000000000000000000000000009 +3592DACC7223050000000000000000000000000000000000000000000000000000000000000000 +000000000F4FBDE9B5490E00000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000021B63C6E1A3400C0000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000042270CCDB +933609000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000E47B1E6BC4E0F000000000000000000000000000000000000000000 +0000000000000000000000000000093592DACC7223050000000000000000000000000000000000 +000000000000000000000000000000000000000F4FBDE9B5490E00000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000F4CB9E6B4490E00000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000E +47B1E6BC4E0F000000000000000000000000000000000000000000000000000000000000000000 +0000093592DACC7223050000000000000000000000000000000000000000000000000000000000 +000000000000000F4FBDE9B5490E00000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000B3889B9C8D0E4FCFFEED5CAC7C3AB6F29070006 +215896C7DEE4E4E4E1CFA5692E0C01000F4CB9ECD39FA0B5BECADEE4C98C4213020B3787B9C8D0 +E5FDFFEED6CAC7C7BD924411010000000000000000000000000000000000000006215896C7DEE4 +E4E4E1CFA5692E0C01000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000E47B1E6BC4E0F000000000000000004184883B8D8E5E5E2E1 +DABF8C4D1A0400010C2E6CACD9EDEDDECBB2A1BEE4CD722305000003153F78ADD1DFE2E2E3E0D0 +A56021050F4CB9E6B4490E000000072C82D3D3822C070F4FBDEED3A2ABCBDFE5E6DDBB80401302 +000004184883B8D8E5E5E2E1DABF8C4D1A04000000000000000000000000000000000000000004 +184883B8D8E5E5E2E1DABF8C4D1A04000004184883B8D8E5E5E2E1DABF8C4D1A04001254C0F0DA +B1ACB1B4BAC6CBB47D3D1202000000052474CCDAA37C91AEBBC1C9D2CE9F460F06215896C7DEE4 +E4E4E1CFA5692E0C062372CDE8D2CCDCEDE1B999AACDE6EDCF8733090000000000000000000000 +000000000000000F4CB9E9C88D95BCD8EAF6EECB8C421302000004184883B8D8E5E5E2E1DABF8C +4D1A04052267B8DBB25F1E040002154DA1DACA7E300A0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000E47B1E6BC4E0F000000000000000004184883B8D8E5E5E2E1DABF8C4D1A0400010C2E6CAC +D9EDEDDECBB2A1BEE4CD722305000003153F78ADD1DFE2E2E3E0D0A56021050F4CB9E6B4490E00 +0000072C82D3D3822C070F4FBDEED3A2ABCBDFE5E6DDBB80401302000004184883B8D8E5E5E2E1 +DABF8C4D1A040000000000000000000000000000000000052372CDE8D2CCDCEDE1B999AACDE6ED +CF873309062363A5CDDDE1E0DEDBD8C9A1672E0C01001254C0F0DAB1ACB1B4BAC6CBB47D3D1202 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000010D1A4C916298CF729FCE6C898B2B14040000061451B3 +729FB44A66A1679CCF72948C1F09000416474078B66D9FCF7296AE4A3B1B020000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000004206DC9D99235090000000000 +021757B5E7CB752A0801041E5FB7E7CB7325050F4CBAF5E496401001011454BAEAC35E19020000 +00042270CCDB933609000000000000000000000000000000000000000000000000021757B5E7CB +752A0801041E5FB7E7CB7325050000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000E47B1E6BC4E0F000000000000031A5AB1D6AB5D2409 +0100062368BFDDA54412226EC8E8BF6F300E04124499E6FDD372230502154FAAE4D4893E110200 +0006172B2912030F4CB9E6B4490E000000072C82D3D3822C070F4FBFFBF4B8672B0B03114499DF +DB8D330B1A5AB1D6AB5D24090100062368BFDDA5440E0000000000000000000000000000000000 +031A5AB1D6AB5D24090100062368BFDDA544111A5AB1D6AB5D24090100062368BFDDA5440E1254 +C2F9E89A400F01000A3489D7D68730080000052474D3FCE7A04D1603000001060B091957B5E7CB +752A0801041E5FB7E7CB732A2872CEDF9B3D1D50BBF2D87E2E266AC3C570220400000000000000 +000000000000000000000F4CBAF7EEAD5D250B08236AC9EFC35E19051A5AB1D6AB5D2409010006 +2368BFDDA5440E00031B58AAD9BB6E3F5EACDBBE6E260700000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000E47B1E6BC4E0F000000000000031A5AB1D6AB5D24090100062368BFDDA54412226E +C8E8BF6F300E04124499E6FDD372230502154FAAE4D4893E1102000006172B2912030F4CB9E6B4 +490E000000072C82D3D3822C070F4FBFFBF4B8672B0B03114499DFDB8D330B1A5AB1D6AB5D2409 +0100062368BFDDA5440E00000000000000000000000000000000052372CEDF9B3D1D50BBF2D87E +2E266AC3C57022060D1F211306000000011249A4DDC2641C031254C2F9E89A400F01000A3489D7 +D68730080000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000001104E599FCF676348181D2D213C54201003000006 +1451B3729FCF676B5C22232C1E35421109203581CF72999F3E3E43263E633B3C1F030000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000004206DC9D99235090000 +0000000A3999DED0772605000000011559C3ECBA4F100F4CB9E9B94E10000000072E85D4D27F2B +06000000042270CCDB9336090000000000000000000000000000000000000000000000000A3999 +DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000E47B1E6BC4E0F0000000000000D46AEF0F6DA +C8C3C3C3C3C3C4CAD7DAB6642E4DB3EAC55D17020000000C40A4E4CF7223050B3EA0E2CD702204 +000000000000000000000F4CB9E6B4490E000000072C82D3D3822C070F4FBFEFC1551301000000 +0C42A8E5C9672A49AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200400000000000000000000000000 +0000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB6642D4AAEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +201654C1EDBB4F10000000000D44ABE6C661190200052474CFE29F3D0B000000000000000A3999 +DED0772605000000011559C3ECBA543372C9CC7927103A9ADBBF5815114EB5D89B3B0A00000000 +000000000000000000000000000F4CB9EABB5011000000083088D6D27F2B1346AEF0F6DAC8C3C3 +C3C3C3C4CAD7DAB6642004000002144A9FE6FEF1B6601E04000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000E47B1E6BC4E0F0000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +2E4DB3EAC55D17020000000C40A4E4CF7223050B3EA0E2CD702204000000000000000000000F4C +B9E6B4490E000000072C82D3D3822C070F4FBFEFC15513010000000C42A8E5C9672A49AEF0F6DA +C8C3C3C3C3C3C4CAD7DAB6642004000000000000000000000000000000052372C9CC7927103A9A +DBBF5815114EB5D89B3B0C0F346A9BBCCBCECDCCCDD5E9F9DC872F081254C1EDBB4F1000000000 +0D44ABE6C661190200000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000730438DCF729FBE5C6E7A363625070100 +0000061451B3729FAA33160300000000000001104E599FCF645426040000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000004206DC9D99235 +0900000000000A3999DED0772605000000011559C3ECBA4F100F4CB9E6B4490E000000072C82D3 +D3822C07000000042270CCDB933609000000000000000000000000000000000000000000000000 +0A3999DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000D47B1E6BB4E0F0000000000000D46AE +E7C7621A02000000000000000000000E48B2E9C25815010000000B3D9FE1CE7223050B3EA0E2CD +702204000000000000000000000E4BB6E6B64B0F000000083089D7D4822C070F4FBFEFC1551301 +0000000C42A8E5C8662949AEE7C7621A0200000000000000000000000000000000000000000000 +0000000000000D46AEE7C7621A02000000000000000000000D46AEE7C7621A0200000000000000 +000000001254C1EFBF5312000000000D46AFE8C7621A0200052474CCD68B310800000000000000 +0A3999DED0772605000000011559C3ECBA543372C8C872230E3693D6BA51100E49B1DAA4400C00 +000000000000000000000000000000000F4CB9E6B4490E000000072C82D3D3822C1446AEE7C762 +1A020000000000000000000000000000092C77C5E8E8EBD48D3D0F010000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000D47B1E6BB4E0F0000000000000D46AEE7C7621A0200000000000000 +0000000E48B2E9C25815010000000B3D9FE1CE7223050B3EA0E2CD702204000000000000000000 +000E4BB6E6B64B0F000000083089D7D4822C070F4FBFEFC15513010000000C42A8E5C8662949AE +E7C7621A02000000000000000000000000000000000000000000000000000000052372C8C87223 +0E3693D6BA51100E49B1DAA4483D8AD9DD984715030000083088D8DA8C32081254C1EFBF531200 +0000000D46AFE8C7621A0200000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000010B2523446D4775B6729FCB +563D180100061451B3729FA22A0F0200000000000001104E599FCF645426040000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000004206DC9 +D99235090000000000021757B5E7C972280700041C5CB5E7CB7325050F4CB9E6B4490E00000007 +2C82D3D3822C0700000002175DC5EBB8511301000000000000000000000317477F9787551F0500 +000000021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000A3795DED5812E080000000000 +031A5AB5E7D082380F020000020E273D371809216CC5DCA249130200082C7ED8F9D37223050215 +4FAAE4D3863B10020000041123241003093794DED5822C0700062268C5F4DA822C070F4FBFFBF3 +B563270A03104196DDDA8B320B1A5AB5E7D082380F020000020E273D3718050000000000000000 +000000000000000000031A5AB5E7D082380F020000020E273D3718081A5AB5E7D082380F020000 +020E273D3718051254C2FBF2B05618030212479EE1D98931080000052474CCD68B310800000000 +000000021757B5E7C972280700041C5CB5E7CB732A2872C8C872230E3693D6BA51100E49B1DAA4 +400C0000000317477F9787551F0500000000000F4CB9E6B4490E000000072C82D3D3822C0A1A5A +B5E7D082380F020000020E273D371805010D3888D0D696441D3683CEDA9E4B1502000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000A3795DED5812E080000000000031A5AB5E7D082380F020000 +020E273D371809216CC5DCA249130200082C7ED8F9D372230502154FAAE4D3863B100200000411 +23241003093794DED5822C0700062268C5F4DA822C070F4FBFFBF3B563270A03104196DDDA8B32 +0B1A5AB5E7D082380F020000020E273D371805000000000317477F9787551F05000000052372C8 +C872230E3693D6BA51100E49B1DAA44B4AA0E3D17726050000092F7FD6FBE18C32081254C2FBF2 +B05618030212479EE1D98931080000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000007292F4A4E202225152A65 +5B9ECF6455270400061451B3729FA22A0F020000000000000004203682CF72999F3F4045263E64 +3B3D20030000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000004 +206DC9D99235090000000000000006215997C7DDE1E0E0DFCFA66A2E0C01000F4CB9E6B4490E00 +0000072C82D3D3822C070000000003184F98CDE0DCD4D1C59947120100000000052677D6FEE490 +340900000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000072669AFDEEEE9E1D2 +A45015020004184680B3D4DFDFDFE2E5E1CFA7682606010C2E6CACD4DBCAB8B2B1B1CDEBCE7223 +05000003154079AED0DDDEDEDFDED0A66121050007276BB1DDE5D4C2BBAE9FB6E1D5822C070F4F +BEEFD5A6B1D0E0E2E3DBBB81401303000004184680B3D4DFDFDFE2E5E1CFA76826060000000000 +000000000000000000000000000004184680B3D4DFDFDFE2E5E1CFA76826060004184680B3D4DF +DFDFE2E5E1CFA76826061254C0EDD2A5AEC8D7DFE3DCBB813F1302000000052474CCD68B310800 +000000000000000006215997C7DDE1E0E0DFCFA66A2E0C062372C8C872230E3693D6BA51100E49 +B1DAA4400C000000052677D6FEE490340900000000000F4CB9E6B4490E000000072C82D3D3822C +070004184680B3D4DFDFDFE2E5E1CFA76828194799D9D48C3A0E010000082B77C6DFAF5B1C0400 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000072669AFDEEEE9E1D2A45015020004184680B3D4DF +DFDFE2E5E1CFA7682606010C2E6CACD4DBCAB8B2B1B1CDEBCE722305000003154079AED0DDDEDE +DFDED0A66121050007276BB1DDE5D4C2BBAE9FB6E1D5822C070F4FBEEFD5A6B1D0E0E2E3DBBB81 +401303000004184680B3D4DFDFDFE2E5E1CFA768260600000000052677D6FEE490340900000005 +2372C8C872230E3693D6BA51100E49B1DAA440132564A6CFD7C9B7AEADA597ADDEDA8C32081254 +C0EDD2A5AEC8D7DFE3DCBB813F1302000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000072F3E7AB76C9ECF +729FCC697F7C2714050000061451B3729FA22A0F02000000000000000000041748427AB76E9FCF +7298B04B3C1B020000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000001254C0E7AF460D00000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +001254C0E7AF460D00000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000001254C0E7AF460D00000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000001254C0E7AF460D00000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0006204E686E6E6E6E6E6E6E6E6E6E6E6E6E6E6E69542C0D010000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000041E5BA3D4E5E3DCD5 +B9782D0E2467A8C6CFDDF8F8BD4E0F000000000000000000000000083089D5CD76250500000000 +000000000000041E5BA3D4E5E3DCD5B9782D080000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000021D812F8AE2348AE2347E860B050000000000000000000000000000000000000000000000 +00000000000000000000090B51CD3487A10F080000000000000000000000000000000000000000 +00000000000000000000000000000005331F7EE233614003000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000021D812F8AE2348AE234 +7E860B05000000000000000000000000000000000000000000000000000000000000000000090B +51CD3487A10F080000000000000000000000000000000000000000000000000000000000000000 +00000005331F7EE233614003000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000021138666D4A1B04000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000021B63C6E1A340 +0C000000000000000000000E47B1E6BC4E0F000000000000000000000000010A1D2E2D19080100 +0000000000000000021B63C6E1A3400C0000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000516081834166DE2347E860B050000000000000000000000000000000000000000 +00000000000000000000000000090B51CD3487A10F080000000000000000000000000000000000 +00000000000000000000000000000000000005331F7EE233614003000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000051608183416 +6DE2347E860B050000000000000000000000000000000000000000000000000000000000000000 +00090B51CD3487A10F080000000000000000000000000000000000000000000000000000000000 +00000000000005331F7EE233614003000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000042270CCDB933609000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000010B2D6AABD9EFF1E6D5B7A0BCE4CD7223050623 +63A5CDDDE1E0DEDBD8C9A1672E0C062372CDE8D2CCDCEDE1B999AACDE6EDCF8733090004184883 +B8D8E5E5E2E1DABF8C4D1A04000006215896C7DEE4E4E4E1CFA5692E0C01000B3889B9C8D0E4FC +FFEED5CAC7C3AB6F2907000000000E47B1E6BC4E0F00000000000000000C3B8DBCC9D4ECF8D376 +250500000000000B3889B9C8D0E4FCFFEED5CAC7C3AB6F29070004184883B8D8E5E5E2E1DABF8C +4D1A04000000000000000000000000000000000000000006215896C7DEE4E4E4E1CFA5692E0C01 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D1065DF347E860B0500000000000001021859206ECE338AE232 +7BAE1E312002000507318C2B82DF32769E1F65D33487A10F080000041F124EAB2E84E2348AD62C +595407072B1C79E2346A4E04010D1067E2347C810B0A331F7EE2336E862170D53385C3233A2802 +0101021859206ECE338AE2327BAE1E312002000000000000000000000000000000000000000102 +1859206ECE338AE2327BAE1E3120020001021859206ECE338AE2327BAE1E31200205331F7EE234 +73932474D73485C5243C290201000118732D8AE22D5A90287CDE348AD323260D021757206ECF33 +8ADF317398171F0F03228F3083BF2979D7306B8F2373D933798E100C0200000000000000000000 +0000000000000002031F6C2577D8348AE23483C223341C0100000118732D8AE22D5A90287CDE34 +8AD323260D021859206ECE338AE2327BAE1E312002000000041F124EAB2E84E2348AD62C595407 +030000000000000000000000000000000000000000000000000000000000000000000000000000 +000D1065DF347E860B0500000000000001021859206ECE338AE2327BAE1E312002000507318C2B +82DF32769E1F65D33487A10F080000041F124EAB2E84E2348AD62C595407072B1C79E2346A4E04 +010D1067E2347C810B0A331F7EE2336E862170D53385C3233A28020101021859206ECE338AE232 +7BAE1E3120020000000000000000000000000000000000000002031F6C2577D8348AE23483C223 +341C0100000118732D8AE22D5A90287CDE348AD323260D021859206ECE338AE2327BAE1E312002 +000000041F124EAB2E84E2348AD62C595407030000000000000000000000000000000000000000 +0000000000000000000000000000000B3787B9C8D0E5FDFFEED6CAC7C7BD92441101062363A5CD +DDE1E0DEDBD8C9A1672E0C0100010B2D6AABD9EFF1E6D5B7A0BCE4CD72230500051D5598C9E3E9 +E4E0DFDFCE9A481301000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000004216BC6E8BF70310F0A1E519EE7FDD37223 +05020D1F211306000000011249A4DDC264212672CEDF9B3D1D50BBF2D87E2E266AC3C570251E5A +B1D6AB5D24090100062368BFDDA544101757B5E7CB752A0801041E5FB7E7CB7325050000000004 +206DC9D9923509000000000000000000000E47B1E6BC4E0F000000000000000000000000083089 +D5CD76250500000000000000000004206DC9D99235090000000000031A5AB1D6AB5D2409010006 +2368BFDDA5440E0000000000000000000000000000000000021757B5E7CB752A0801041E5FB7E7 +CB7325050000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D1065DF347E860B050000000000042B1C77E2336D7812 +26421556C73489B1161B432282E2347E9F1B44902C89E23487A10F08050840B7348AD9284B5911 +2D5919475508082B1C79E2346A4E04010D1067E2347C810B0A331F7EE2348AC823466F2175E234 +88AA13132E1C77E2336D781226421556C73489B116120400000000000000000000000000000000 +042B1C77E2336D781226421556C73489B116162F1C77E2336D781226421556C73489B11617361F +7EE23488B61C2F481968DA3488AA130F030118732D8AE2347C981729320B244B11182F1A75E234 +80A21B3A6E2379E2347E8B102A90318AC61F42932F8ADB2745782A88D623250C00000000000000 +0000000000000000000116146CE2347C8D121D290B28561526170100000118732D8AE2347C9817 +29320B244B1118331C77E2336D781226421556C73489B11612090840B7348AD9284B59112D5919 +475508040000000000000000000000000000000000000000000000000000000000000000000000 +000000000D1065DF347E860B050000000000042B1C77E2336D781226421556C73489B1161B4322 +82E2347E9F1B44902C89E23487A10F08050840B7348AD9284B59112D5919475508082B1C79E234 +6A4E04010D1067E2347C810B0A331F7EE2348AC823466F2175E23488AA13132E1C77E2336D7812 +26421556C73489B1161204000000000000000000000000000000000116146CE2347C8D121D290B +28561526170100000118732D8AE2347C981729320B244B1118331C77E2336D781226421556C734 +89B11612090840B7348AD9284B59112D5919475508040000000000000000000000000000000000 +00000000000000000000000000000000000000000000042270CCDB93360900000000000000020D +1F211306000000011249A4DDC2641C07216BC6E8BF70310F0A1E519EE7FDD3722305072C82D6E0 +9A3C0B00000006121B120600000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000E49B3E9C55D17010000000B3FA2E3 +CF722305020F346A9BBCCBCECDCCCDD5E9F9DC87342B72C9CC7927103A9ADBBF5815114EB5D89B +4850AEF0F6DAC8C3C3C3C3C3C4CAD7DAB6642A3D99DED0772605000000011559C3ECBA4F100000 +000004206DC9D9923509000000000000000000000E47B1E6BC4E0F000000000000000000000000 +083089D5CD76250500000000000000000004206DC9D992350900000000000D46AEF0F6DAC8C3C3 +C3C3C3C4CAD7DAB6642004000000000000000000000000000000000A3999DED077260500000001 +1559C3ECBA4F100000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D1065DF347E860B05000000000113662B8AE234 +8AE2348AE2348AE2348ADA253D7C2C8AE22C41230101121166DE3487A10F0916146CE23479780A +040000000000000000042B1C79E2346A4E04010D1067E2347C810B0A331F7EE2346F5F06020205 +31AC348AD02134702B8AE2348AE2348AE2348AE2348ADA24260C00000000000000000000000000 +00000113662B8AE2348AE2348AE2348AE2348ADA2539712B8AE2348AE2348AE2348AE2348ADA24 +2B3E1F7EE2346C57050101042DA6338AD020200A0118732D8AE22B3D1F01000000000001105D2A +8AE22D46280100030637B3348AC81F3D963188AA1118592987C71D213E2080DE272C0F00000000 +000000000000000000000000000B0C51C8348AE2306F9D1F414C0908020000000118732D8AE22B +3D1F0100000000000113662B8AE2348AE2348AE2348AE2348ADA242722146CE23479780A040000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D1065DF347E860B05000000000113662B8AE2348AE2348AE2348AE2348ADA25 +3D7C2C8AE22C41230101121166DE3487A10F0916146CE23479780A040000000000000000042B1C +79E2346A4E04010D1067E2347C810B0A331F7EE2346F5F0602020531AC348AD02134702B8AE234 +8AE2348AE2348AE2348ADA24260C00000000000000000000000000000000000B0C51C8348AE230 +6F9D1F414C0908020000000118732D8AE22B3D1F0100000000000113662B8AE2348AE2348AE234 +8AE2348ADA242722146CE23479780A040000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000042270CCDB933609000000000000 +00020F346A9BBCCBCECDCCCDD5E9F9DC872F1649B3E9C55D17010000000B3FA2E3CF7223050214 +4A9FDFE9C9A489745C3C1B07010000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000E49B3E9C45B16010000000B +3EA1E3CF72230D318AD9DD984715030000083088D8DA8C372B72C8C872230E3693D6BA51100E49 +B1DAA44D52AEE7C7621A02000000000000000000000A3999DED0772605000000011559C3ECBA4F +100000000004206DC9D9923509000000000000000000000D47B1E6BB4E0F000000000000000000 +000000083089D5CD76250500000000000000000004206DC9D992350900000000000D46AEE7C762 +1A02000000000000000000000000000000000000000000000000000000000A3999DED077260500 +0000011559C3ECBA4F100000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000C0F63DE347F8B0C06000000000113672B +8AE22D4B420A1929091929091926081E722C8AE22A3B1C01000E0F60DA3487A10F0916146CE234 +79780A040000000000000000042B1C79E2346B51040213126BE2347C810B0A331F7EE2346E5C06 +02010430AA348AD02134712B8AE22D4B420A192909192909192606070200000000000000000000 +00000000000113672B8AE22D4B420A1929091929091926071B692B8AE22D4B420A192909192909 +1926060C341F7EE23471610702020532AE348AD020200A0118732D8AE229331500000000000001 +105D2A8AE22D46270100030637B3348AC81F3D963188AA1117582987C71C213D2080DE282D1000 +000000000000000000000000000000000000020F092B611B56A72E89E23368570602000118732D +8AE22933150000000000000113672B8AE22D4B420A1929091929091926060818146CE23479780A +040000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000C0F63DE347F8B0C06000000000113672B8AE22D4B420A192909192909 +1926081E722C8AE22A3B1C01000E0F60DA3487A10F0916146CE23479780A040000000000000000 +042B1C79E2346B51040213126BE2347C810B0A331F7EE2346E5C0602010430AA348AD02134712B +8AE22D4B420A192909192909192606070200000000000000000000000000000000000000020F09 +2B611B56A72E89E23368570602000118732D8AE22933150000000000000113672B8AE22D4B420A +1929091929091926060818146CE23479780A040000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000042270CCDB933609000000 +00000008318AD9DD984715030000083088D8DA8C321649B3E9C45B16010000000B3EA1E3CF7223 +0500000001091C344C6685AEDBF0D3843008000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000004216BC5E5B55B1B04 +05184A98E4FCD37223103EA0E3D17726050000092F7FD6FBE18C372B72C8C872230E3693D6BA51 +100E49B1DAA443265AB5E7D082380F020000020E273D3718071757B5E7C972280700041C5CB5E7 +CB7325050000000004206DC9D9923509000000000000000000000A3795DED5812E080000000000 +000000000000083089D5CD76250500000000000000000004206DC9D99235090000000000031A5A +B5E7D082380F020000020E273D371805000000000317477F9787551F0500000000021757B5E7C9 +72280700041C5CB5E7CB7325050000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000080B50CC348AC71F32350A181E03 +072E1D79E2347C98182D3F0F2D5C1C5A8B1218432382E234717B122A692683E23487A10F080508 +41B8348AD9284C5A112F5919475708061C1670E2347F941429652684E2347C810B0A331F7EE234 +8AC52243692073E03488AA1313311D79E2347C98182D3F0F2D5C1C5A8B120F0300000000000000 +000000000000000000052E1D79E2347C98182D3F0F2D5C1C5A8B1214311D79E2347C98182D3F0F +2D5C1C5A8B1215351F7EE2348AC823466F2175E13488AB140F030118732D8AE229331500000000 +00000004291B75E2347FA01A396B2278E2347F8C102A903188AA1117582987C71C213D2080DE28 +2D100000000326993087D427341901000000000A0A396914263009193C196EE13479790A040001 +18732D8AE229331500000000000000052E1D79E2347C98182D3F0F2D5C1C5A8B120F080841B834 +8AD9284C5A112F5919475708040000000000000000000000000000000000000000000000000000 +00000000000000000000000000080B50CC348AC71F32350A181E03072E1D79E2347C98182D3F0F +2D5C1C5A8B1218432382E234717B122A692683E23487A10F08050841B8348AD9284C5A112F5919 +475708061C1670E2347F941429652684E2347C810B0A331F7EE2348AC52243692073E03488AA13 +13311D79E2347C98182D3F0F2D5C1C5A8B120F030000000326993087D427341901000000000A0A +396914263009193C196EE13479790A04000118732D8AE229331500000000000000052E1D79E234 +7C98182D3F0F2D5C1C5A8B120F080841B8348AD9284C5A112F5919475708040000000000000000 +0000000000000000000000000000000000000000000000000000000000000002175DC5EBB85113 +0100000000000B3EA0E3D17726050000092F7FD6FBE18C320C216BC5E5B55B1B0405184A98E4FC +D3722305030F23251506000000041F67C8EAB44B0F000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000010B2D6BAB +D5E3E1DAD1B6A1BEE3C8691E03072564A6CFD7C9B7AEADA597ADDEDA8C372B72C8C872230E3693 +D6BA51100E49B1DAA4400C04184680B3D4DFDFDFE2E5E1CFA76826060006215997C7DDE1E0E0DF +CFA66A2E0C01000000000004206DC9D99235090000000000000000000000072669AFDEEEE9E1D2 +A4501504174F9BC2CCCED8EEFFFEE9D5CDCCC093410F0000000004206DC9D99235090000000000 +000004184680B3D4DFDFDFE2E5E1CFA768260600000000052677D6FEE490340900000000000006 +215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000001155B2377DB348AE234 +8AAF130C02031958206CC9328AE23489D62E687D0E0A070732902C83E1337AA9226AD63487A10F +08000005211250AD2E85E2348AD72C5B55070304052D8C2C86E23277A32379E2347C810B0A331F +7EE2336E842170D53486C6243C2A020101031958206CC9328AE23489D62E687D0E0A0200000000 +0000000000000000000000000001031958206CC9328AE23489D62E687D0E0A03031958206CC932 +8AE23489D62E687D0E10341F7EE2336F882272D73486C5243C2A0201000118732D8AE229331500 +000000000000000102195A216FCF338AE131749B18201003228F3188AA1117582987C71C213D20 +80DE282D10000000032AA7348AE22A391B01000000000B0C4BAD2E83E1348AE2337FB41F301C01 +00000118732D8AE2293315000000000000000001031958206CC9328AE23489D62E687D0E0A0200 +05211250AD2E85E2348AD72C5B5507030000000000000000000000000000000000000000000000 +000000000000000000000000000000000001155B2377DB348AE2348AAF130C02031958206CC932 +8AE23489D62E687D0E0A070732902C83E1337AA9226AD63487A10F08000005211250AD2E85E234 +8AD72C5B55070304052D8C2C86E23277A32379E2347C810B0A331F7EE2336E842170D53486C624 +3C2A020101031958206CC9328AE23489D62E687D0E0A02000000032AA7348AE22A391B01000000 +000B0C4BAD2E83E1348AE2337FB41F301C0100000118732D8AE229331500000000000000000103 +1958206CC9328AE23489D62E687D0E0A020005211250AD2E85E2348AD72C5B5507030000000000 +000000000000000000000000000000000000000000000000000000000000000000000003184F98 +CDE0DCD4D1C599471201072564A6CFD7C9B7AEADA597ADDEDA8C3208010B2D6BABD5E3E1DAD1B6 +A1BEE3C8691E0307276DB0D5E1E2E1E4E9E7D2A76A2C0A01000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000002 +070A0601000000042068C1D99A3B0A000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000005331F7EE233614003000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000002070A06010000 +00042068C1D99A3B0A000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000111479DD0DAD6D2D0D2D0BA894A180400000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005331F7EE233614003000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000111479DD0 +DAD6D2D0D2D0BA894A180400000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D1066DF348AE2348AE2348AE2348AE2348AE2346F5F07020000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000F4190BEC4A6662406000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000006244997AD7FA8AD7FA89D4B25070000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000005246573A8AA5B310A0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000021D1771E234726507030000000000000000000000000000000000 +0000000000000000000000000005072E6C1B414A07030000000000000000000000000000000000 +000000000000021D1771E234726507030000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000020D2238474C53575355544A41331D0C0200 +00020D233A444E565355574A2F110300000000051A40575355575355575355574D351404020D22 +38474C53575355544A41331D0C020001091B36484D53575355564D463A25120501000000020B1A +2E40474F5653555447341806000000031C6A6198A6341805000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002162971C2666133060100000000000000000000000000000000 +00000000000000000000000000000A3489D0D99E44110100000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041F67 +C3EEECC56A2005000000000000000000000000000000000000000A3489D0D99E4415236BC6EEEC +BF611B0300000000000000000000000000011352B5EEEECF802D07000000000000000000000000 +00000000000000000000000000000000000000000A3489D0D99E44110100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000061F4F727A714D1F060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00061F4F727A714D1F0600000000000623609EC3D8E7EEECEEE6D2B68B53210700000000031C6A +6198A6341805000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +000000000000000000000000000000000000000000000000000001060C1A1F1D48887FA89D4B25 +070000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000005246573A8AA5B310A0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0410005B6300937B009A75004B1D00031D1771E234726507030000000000000000000000000000 +000000000000000000000000000000000C0E5CD73482940D070000000000000000000000000000 +000000000000000000021D1771E234726507030000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000310253330241D1A18213245555752 +412109010310283937353B4955574A2F110300000000051A405651432F2220212020211C130701 +0310253330241D1A18213245555752412109020817292E2723201E232F3F51575347290C02020C +264753554F3A2A201B1E262B2815050000000002152A78CA6C6E42090100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005257B679EAD361804000000000000000000000000000000 +000000000000000000000000000000021550A9DDC97C2C07000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +041F67C3EEECC56A20050000000000000000000000000000000000021550A9DDC97C2C0705226B +C6EEECBF611B030000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000021550A9DDC97C2C07000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000C3E9FE3ECE19C3C0B0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000C3E9FE3ECE19C3C0B0000000000082C6A8E84685246455C89C3EDEEEAB65A19030000 +0002152A78CA6C6E42090100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000D216CC6728663120400000000000000051139 +626094A67FA8AD788D702F1603041D4F598FA17DA8AD7FA49E66694212050000000007327E7EA8 +9D4B250700000000000000081F32688A74A4AD7FA29A62623E120503124C907FA89B59758E77A7 +A970714311030003153D4F8AA37EA19459657E77A8AA5B310A00051E4191AD7F927151829C7DA8 +AD77723007071D31688A74A5AD7E9D90564C27080100010B273D76957AA8AD7FA7A46D71411003 +020E007C81005D26000401000D1E00827A0029221771E2347265080C381C73E1347C9212110602 +1757206ECF338ADF317398171F0F0111612A8AE2348AE2348AE2348AE23482940D070102175720 +6ECF338ADF317398171F0F00021D1771E2347265080C381C73E1347C92121106021757206ECF33 +8ADF317398171F0F00000000000000112B00715300170300000000000000000000000000020C26 +475753482A0D02000000000005193A53574A2F110300000000051A40564E361605010100000000 +000000000000000000000000020C26475753482A0D0200000000020507090F1B2F4A575343240A +030E284857503C1C070000000000000000000000000000020B3A9E719D9E2B1002000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000D216CC6728663120400000000000000000000000000 +0000000000000000000000000000000000062570C1DEB25A1A0D3996DDE6B14E12010000000000 +000B3B9ADFE6AF4E1C295B92BED9E7EEEBDCC7A16A3510020000062979CCEEEECD9B98B7D7E9EC +EEDEA0452C67C3EEECC56A23153B80C7EDECD69A531D06000000000000062570C1DEB25A1A0300 +05226BC6EEECCD9794B8D9E8E8D19F5C200500072D82D2ECEEEEECEEEECF802D07000000000000 +07215186B4CFE4EEECEEE1C69A591F0500000000000000062570C1DEB25A1A03000007296CA7C9 +DEEAECEEEEE6D9BF935B230A2068C0EEEEC269210400011452B1E8EED5853108062979CCEEEECD +9B98B7D7E9ECEEDEA0410D000000000000000000000000000000041E66C0EEEEECEEEEECEEEEEC +EEEEECE19C3C0B010B2A5D92BED9E6EEEEE4D4B78A55220700020F3672A6CDE4ECEEEEEBE2CC9E +5A1E081E66C0EEEEECEEEEECEEEEECEEEEECE19C3C0B000000000000000005226BC6EEECCA7426 +0600000000020B3A9E719D9E2B1002000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000020A06202208222208232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B06000000000000031A +5167A8AD7A815E323739325059301905041A3E3943361F222220467877A8A6562E0A0000000732 +7E7EA89D4B25070000000000051859957FA488433B3025456C70A8AC64471A144C907FA8AC6654 +342960977FA896411E10246FA37FA89D595855518EAC7FA8AA5B310A00051E4191AD7FA89C564A +331C242D2A351E1A55937FA8A05B57493E70987FA89E4E2B0C0D3F877FA89C4F3B241724323044 +300D03255300893A000610005863009C7C00888300562F1771E234788C1E6AD9347C9413110500 +04281A75E23480A21B3A6E2379E2347E8B0D0B110718331565DC3485A3151F290916190205281A +75E23480A21B3A6E2379E2347E8B0D0A1E1771E234788C1E6AD9347C941311050004281A75E234 +80A21B3A6E2379E2347E8B0D0801000000001D4B00C38F00280600000000000000000000000005 +153249555743270E0200000000000005193A53574A2F110300000000051A405753555753555750 +483A24100400000000000000000005153249555743270E020000000005183C55535557534D3B21 +0C0200041636505750474548525753534C39251004000000000000031B69629FC84F2C0B00030B +0D161F11181F11181F11181F11181F111B291533350C232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208232B143133 +131A1F11181F11181F11181F11181F11161605072C428FCF6E6F3B0600000000010A2A619DC9E0 +E8DBBC94694224152147716F340B00000000000C3A92D5D4933D0D01031A5FBEE7CF7C2D163156 +685E3C192060BFE9CD83557ECAEEECDCAB7A65749DD1EEECD9933C0E01062979CCEEEEECD7A169 +4634323F4F4B262667C3EEECCE9389B7E5ECD79C541E0600000000000000000C3A92D5D4933D0D +01000005226BC6EEECEECF966F76A4DCEEECCE7A2A07010715232B3B6FC1EEEECF802D07000000 +0006256FC1ECEEE5B5825D4D4E5D717A5A23070000000000000C3A92D5D4933D0D010000000724 +566B5E4A3B302F3C62A5DFECE4A14112236EC7EEEAB55616020E42A1E3ECD98E350900062979CC +EEEEECD7A1694634323F4F4B23070000000000000000000000000000000005112029355EAFE7EC +E6AC5D352B2B261A0A092E7DCDEEE6BC7E5241466094D2ECECBB63211B59BAEEECD79452312B33 +445B5F42180405112029355EAFE7ECE6AC5D352B2B261A0A02000000000000010F3C89CFEEEDBF +6E2506000000000000031B69629FC84F2C0B00030B0D161F11181F11181F11181F11181F111B29 +1533350C2322082222082222082222082222082018000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +010C3F887FA897431F0500000000000000000106214950849877A3AC7FA8AD7FA8AD6848160200 +0007327E7EA89D4B2507000000000318398BAD7FA8AD7FA8AD7FA8AD7FA8AD7B7333184C907FA8 +8F391803062D757AA8A1502D253F90AD7F8E521304010A38807DA8AA5B310A00051E4191AD7F8A +4D1103000000000002143488AD7F915816050002134565A8AD715C220A276571A8AD7F9A8B5863 +522B1E0A02004C7600481000406E008438000A1100768A0061341771E2348AE2348AE22B402301 +000001105D2A8AE22D46280100030637B3348AC81D1B0700000C0E5CD73482940D070000000001 +105D2A8AE22D46280100030637B3348AC81D1D241771E2348AE2348AE22B402301000001105D2A +8AE22D46280100030637B3348AC81D1B0700000000000000000000000000000000000000000003 +0D253C51574D3B210B02000000000000000005193A53574A2F110300000000030E2026201B1A1C +24303E4F5753482C0E0200000000030D253C51574D3B210B02000000000000010610171B222E3B +4D575243270C06173751575353442C20202B41545354421E0801000000000110505A9FCF5B3E16 +0213555C9FCF729FCF729FCF729FCF729FCF72A7D740E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234DADA +669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000009317796 +7E58403E4F729EC7E4EEEEECDAA1591E05000000031959AFDEC5712606000000093690D7E4AB53 +4D9DDFEEECB25C4C91D9E5AD6672BFEEEECC792A0600031B5FBDECEED3822F07062979CCEEEEC2 +692104000000000000041F67C3EEECEEEEECEEEEC36F24060000000000000000031959AFDEC571 +26060000000005226BC6EEECC87024050D42A4E6ECDD96390A00000000011352B5EEEECF802D07 +000000021759BBEEECD07E2C0700000000000000000000000000031959AFDEC571260600000000 +010C2E6596B9D1DEE5EDEEECEEEEECEEC2651E092877CBECE5A34418358CD9EEDA943A0B000006 +2979CCEEEEC26921040000000000000000021238688186858686858371461A0400000000000C3E +9FE3ECE19C3C0B0000000005226BC3EEEEECEEEEECEEEEECEEEEECEEE6A24117378BD3ECEEEED9 +BFA58B71502B0E0200000000000C3E9FE3ECE19C3C0B00000000000000000000072564ABE3EEDB +A45B1F0600000000000000000110505A9FCF5B3E160213555C9FCF729FCF729FCF729FCF729FCF +72A7D740E2E234E2E234E2E234E2E234E2E234E2E234E2A9000000000000000000000D4627DFDC +27603A0B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +000000010C3F887FA897431F050000000000000003153587AD7FA4863F332419356872A8AD6A4E +1902000007317C7DA89F4E28070000000003183A8CAD7F905E25211F171E1F171E1F15140C134C +907FA88B341302062C7379A8A1502D253F90AD7F894A1003000831797BA8AA5B310A00051E4191 +AD7F84400C01000000000002143488AD7F915816050002134565A8AD715C22040002081E363658 +6C5E94AC7FA5823410657B00370D00658100440D0000000037690060341771E23483A71E5ECC34 +85A514100401105D2A8AE22D46270100030637B3348AC81D1B0700000B0E5CD73482940D070000 +000001105D2A8AE22D46270100030637B3348AC81D1D241771E23483A71E5ECC3485A514100401 +105D2A8AE22D46270100030637B3348AC81D1B0700000000000000000000000000000000000002 +0A1E364D574E3D240D03000000000000000000000005193A53574A2F1103000000000000000000 +0000000003102F4D53543F190500020A1E364D574E3D240D030000000000000000000000000000 +00020D29495355431D0A112D4B57534422090100071D4253554A290E02000000000214585D9FCF +58381100041113202D19222D19222D19222D19222D19263B1E474A1033310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B343E1C45481B242D19222D19222D19222D19222D192020070A374C98CF69602F040000000000 +02030200000000000000010611160F06000000000000072A78C9DBAA5116020000000002175AB8 +E7D09B9CC5C3A9C1CAA791C2E7CB794468BFEEEECC79290600031B5FBDECEED3822F07062979CC +EEEEB9591602000000000000041F67C3EEECE2B08AA1D7ECE6AE5A1C040000000000072A78C9DB +AA511602000000000005226BC6EEECBF611B030C3E9FE3ECDE96390A00000000011352B5EEEECF +802D07000000021759BBEEECD07E2C07000000000000000000000000072A78C9DBAA5116020000 +0000041D64BEEEEEE6B97747312F4A8FD6ECEEC76D2305072D7FCEEED9955F82CBEEE09A3F0D00 +0000062979CCEEEEB9591602000000000000000005216AC3EEEEECEEEEECEED585310800000000 +000B3E9FE3ECE19C3C0B0000000005226CC4EEEECB81452E2B2B2B2B2B2B2B281D0C020003102B +4A667C94AFCFEDEEE7B35B1B030000000B3E9FE3ECE19C3C0B00000000000000051C539BD9EEDE +AB63260800000000000000000000000214585D9FCF58381100041113202D19222D19222D19222D +19222D19263B1E474A1033310B31310B31310B31310B31310B2E23000000000000000000000D46 +27DED6223B0B00000000000000000000000000000000000000000000000000031C3384CF727A4A +0A010000000000031A5168A8AD7A816033383A32515A311C1C388AAD7F9B6D220D0E1E56917FA8 +AD6A4E1902000004246473A8AD70653E1E201E110A081A5C977FA89C554D39232F39345A714E3B +16134C907FA88B341302062C7379A8A1502A122470A37FA78E4539343B7AA47FA8AA5B310A0005 +1E4191AD7F84400C01000000000000051756937FA89F5A55473C6E977FA89F4F2B0A0621473B3F +301B1E1F22528A7FA897451D4A74004E13003D6B007D3200050D006F880061341771E234726508 +0F492382E2315E4B0505291B75E2347FA01A396B2278E2347F8C0D08010000080B50CC348ABF1C +2B300A16190205291B75E2347FA01A396B2278E2347F8C0D0A1E1771E2347265080F492382E231 +5E4B0505291B75E2347FA01A396B2278E2347F8C0D080100000000122D00745500180300000000 +04142E49575352442E24212020211F1C120701020A171F2023314555574F3F2C22201D130A0F1F +2A29221F1E1E24303F50575346290D06142E49575352442E24212020211F1C120705152D363228 +25232126303C4D57534D3312030414334F5353452E22222D425453513B19060000000000052681 +6A9FB83F2007000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000031C3384CF727A4A0A0100 +000000000000000000000000000000000000000000000001104299D9D289350A00000000000000 +083288D5EEE9E7CB824C6EBEE7E8ECE4A745152B79CBEEECDBA87762719BCFEEECDA933D0E0106 +2979CCEEEEB9591602000000000000041F67C3EEECC56A23194DA0E1EEDFA24F16030001104299 +D9D289350A0000000000000005226BC6EEECBF611B030C3E9FE3ECDE96390C0A1A262B2C3B6FC1 +EEEED79551312B2920110A2570C2ECEEE5B5845F4F505D727B5B24070001104299D9D289350A00 +0000000000042069C1EEEED9954013133879C8EEECEEC76D230500083186D5EEE5D6E6ECE3A144 +0F00000000062979CCEEEEB9591602000000000000000000000000000000000000000000000000 +0000000008338AD7ECEEC9804B322C261A0A0A3182D0EEECD7A06C4E42434E617E9B93521A0D2E +626E5942322A2B3F73BEEDECD07F2C0700000008338AD7ECEEC9804B322C261A0B0E3783CCEEEC +E6B982655B5A5B5B584D32130300000000000526816A9FB83F2007000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D4627DED6223B0B000000000000000000000000000000000000000000000000000005124BAD +7294851E090000000000000006123B646195A67FA8AD798F723016050A2C5C6199AA7FA59F6A7D +8676A8AD6A4E1902000000051A3371957BA8AD7FA8AD633C0F01091F31668771A1AD7FA8AC7994 +83462D10134C907FA88B341302062C7379A8A150290703163F518DA57FA3995F6F8579A8AA5B31 +0A00051E4191AD7F84400C010000000000000000081F336A8C75A5AD7F9D92574E290901000626 +5E6194A47FA8AD7FA59F65653C10041F4B00924700080E00515C008F73007D700050301771E234 +7265070304073BB0338AD021291303195A216FCF338AE131749B18201000000000000002186525 +79DA348AE23482940D070102195A216FCF338AE131749B18201000021D1771E234726507030407 +3BB0338AD021291303195A216FCF338AE131749B182010000000000000001D4B00C38F00280600 +0000010A23435557535557535557535557534D341203061B415753555753555753555753555236 +1814283F4E5055575355534940311D0C03010A23435557535557535557535557534D341207132C +414D4F55575355564D463B2714060100000107172A3D4B4F5557514D44301C0A02000000000007 +1656B6728F77190600000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000005124BAD729485 +1E090000000000000000000000000000000000000000000000041D60B7DCBD6820050000000000 +000000011552B5EDECE3A041153185D5EEECCA732506010B2B5F95C0DAE8EEEDDDC9A36D381102 +0000062979CCEEEEB9591602000000000000041F67C3EEECC56A2005052066BAE9EEDB9746161F +60B7DCBD682005000000000000000005226BC6EEECBF611B030C3E9FE3ECDE9639153B97DFEEEC +EEEEECEEEEECEEEEECEEEEBF621C0308235289B6D1E5EEECEEE3C99D5A1F05041D60B7DCBD6820 +05000000000000000002133E7FB5D7EAEEE7DBC6B0B8DDECEEC76D2305000009368FD9ECEEEEE4 +A74A110100000000062979CCEEEEB9591602000000000000000000000000000000000000000000 +0000000000000000082A6AA6D0E6ECEEEEECE19C3C0B010C2B5C8FBAD4E3EEEEECEDE2CFB4843F +120D3681B6D0E2EDECEEEEE8DABD8E521E060000000000082A6AA6D0E6ECEEEEECE19C3F2661BE +EEEEECEEEEECEEEEECEEEEECD98D340900000000071656B6728F77190600000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000D4627DED6223B0B000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010800687B00763B000D0300000000010000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000832448FC959451C020000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000010F46 +5096C34F3311010000000000000000000000000000000000000000083080CDDA9F491201000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +083080CDDA9F491201000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083080CDDA9F +491201000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000832448FC959451C020000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D4727DED6223C0B000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000107004455008E7A009B7F006A2600 +010000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000031647384F4B110500000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000040D31623A3F25050100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000031647384F4B110500000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000197631E1E12E6615000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D4627DED6223B0B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D4627DED6223B0B000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D4627DED6223B0B000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000B02317A04150A00000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000083089D5CD76250500000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000011147A4DDC26920040000000000083089 +D5CD762505000000000000000000000000000000093592DACC7223050000000000000000000000 +00000000000000000000000000000000000000000000000000000000021138666D4A1B04000000 +000000000000000000083089D5CD76250500000000000000000000041E5BA3D4E5E3DCD5B9782D +080000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000D4627DED6223B0B000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D4D053D4701 +020000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000010A1D2E2D19080100000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000041F67C1DDA6491101000000000000 +010A1D2E2D190801000000000000000000000000000000093592DACC7223050000000000000000 +00000000000000000000000000000000000000000000000000000000000000042270CCDB933609 +000000000000000000000000010A1D2E2D190801000000000000000000021B63C6E1A3400C0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000D4627DED6223B0B000000000000 +00000000000000000000000000000000000000000D216CC67286631204000000000F4E04375A03 +181B00010000000000000000000000000000072A032D5002090300000000000000000000021A03 +4080030E04000000000000000000000000000000000000000000011350B1E2BA59170200000000 +0E43A4E0C5681E030C3B8DBCC9D4ECF8D3762505000000052372CDE8D2CCDCEDE1B999AACDE6ED +CF8733090000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000009338AD6D3842E08000000000C +3B8DBCC9D4ECF8D37625050000000000010C2E6CACD9EDEDDECBB2A1BEE4CD7223050004184883 +B8D8E5E5E2E1DABF8C4D1A04000F4CB9ECD39FA0B5BECADEE4C98C4213020B3787B9C8D0E5FDFF +EED6CAC7C7BD92441101000C3B8DBCC9D4ECF8D376250500000000000B3889B9C8D0E4FCFFEED5 +CAC7C3AB6F291543A2DFC86E2204000000000A3792DCD6832D0700000000000000000000000000 +000000001254C0F0DAB1ACB1B4BAC6CBB47D3D12020E43A2DFC86E2204000000000A3792DCD683 +2D0700000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000D4627DFDA25542B08232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B060000000000010801 +153E03347B05457A04293B010906000000000000000C48054E8A03100500000000000000000000 +000702338A0520120000000000000000000000000000000000000000000001124DAEE0BB5A1802 +00000F45A6E0C3641D030000000000083089D5CD762505000000052372CEDF9B3D1D50BBF2D87E +2E266AC3C570220400000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000001144FACDEBC601C03000000 +000000000000083089D5CD7625050000000004226EC8E8BF6F300E04124499E6FDD37223081A5A +B1D6AB5D24090100062368BFDDA5440E0F4CBAF5E496401001011454BAEAC35E19020000000422 +70CCDB933609000000000000000000000000083089D5CD76250500000000000000000004206DC9 +D9923509000000000000093690D9D07C290600000D409FDFCA7023050000000000000000000000 +000000000000001254C2F9E89A400F01000A3489D7D6873008093690D9D07C290600000D409FDF +CA7023050000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +0000000000000000000418022872064E8D04130700000000000000000000000000000000000000 +0000000005012A82052A1E0000000000000000000000000000000000000000000000011049AADF +BB5B18030F46A7DFBF601B03000000000000083089D5CD762505000000052372C9CC7927103A9A +DBBF5815114EB5D89B3B0A00000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000052370C8DC9D410E0100 +000000000000000000083089D5CD762505000000000E49B3EAC55D17020000000C40A4E4CF7223 +1246AEF0F6DAC8C3C3C3C3C3C4CAD7DAB66420134CB9E9B94E10000000072E85D4D27F2B060000 +00042270CCDB933609000000000000000000000000083089D5CD76250500000000000000000004 +206DC9D992350900000000000000062A7DD1D68A3109114AAADFBD5F1B03000000000000000000 +000000000000000000001254C1EDBB4F10000000000D44ABE6C6611902062A7DD1D68A3109114A +AADFBD5F1B03000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000030E082E31 +0B31310B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +0000000000000210011B4A043A8105406C03212B01040100000000000000000000000000000000 +0000000000000005012D8505271A00000000000000000000000000000000000000000000000000 +0F46A6DDBB5C284AA8DEBC5D190200000000000000083089D5CD762505000000052372C8C87223 +0E3693D6BA51100E49B1DAA4400C00000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000B3993DACE7A2906 +000000000000000000000000083089D5CD762505000000000E48B2E9C25815010000000B3D9FE1 +CE72231246AEE7C7621A0200000000000000000000000F4CB9E6B4490E000000072C82D3D3822C +07000000042270CCDB933609000000000000000000000000083089D5CD76250500000000000000 +000004206DC9D9923509000000000000000004206BC5D99A5161B5DDAE4F130100000000000000 +000000000000000000000000001254C1EFBF5312000000000D46AFE8C7621A020004206BC5D99A +5161B5DDAE4F130100000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000031C3384CF727A4A +0A01000000000D4805468705314B02100E00000000000000000000000000072B032E5202090300 +000000000000000000000D023A8A04170A00000000000000000000000000000000000000000000 +000000000E43A3DCCCA5C2E0B95A18020000000000000000083089D5CD762505000000052372C8 +C872230E3693D6BA51100E49B1DAA4400C00000000000000000000000000000000000000000003 +17477F9787551F050000000000000000000317477F9787551F05000000000000021757B4DEB458 +180200000000000000000000000000083089D5CD7625050000000004216CC5DCA249130200082C +7ED8F9D37223081A5AB5E7D082380F020000020E273D3718050F4CB9E6B4490E000000072C82D3 +D3822C0700000002175DC5EBB85113010000000000000000000000083089D5CD76250500000000 +000000000004206DC9D992350900000000000000000002185AB7E9EDF2E4A0420E000000000000 +00000317477F9787551F0500000000001254C2FBF2B05618030212479EE1D98931080000000218 +5AB7E9EDF2E4A0420E000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000005124BAD +7294851E0900000000030E010301000000000000000000000000000000000000000C48054E8A03 +100500000000000000000000052D04436C02070100000000000000000000000000000000000000 +00000000000000000D40A0EDFFF9B956160200000002174F9BC2CCCED8EEFFFEE9D5CDCCC09346 +3272C8C872230E3693D6BA51100E49B1DAA4400C00000000000000000000000000000000000000 +0000052677D6FEE4903409000000000000000000052677D6FEE49034090000000000062879CEDA +943A0B00000000000000000002174F9BC2CCCED8EEFFFEE9D5CDCCC093410F010C2E6CACD4DBCA +B8B2B1B1CDEBCE7223050004184680B3D4DFDFDFE2E5E1CFA76826060F4CB9E6B4490E00000007 +2C82D3D3822C070000000003184F98CDE0DCD4D1C599471203174F9BC2CCCED8EEFFFEE9D5CDCC +C093410F0000000004206DC9D992350900000000000000000000011351B7F2E392370A00000000 +0000000000052677D6FEE490340900000000001254C0EDD2A5AEC8D7DFE3DCBB813F1302000000 +0000011351B7F2E392370A00000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002011C6C052D2500000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000E409C +DCC871240500000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000011044A0E2D4802C070000 +000000000000000000000000000000000000000000001254C0E7AF460D00000000000000000000 +00000000011044A0E2D4802C070000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +0000000000000000000000000000000008011F4002060200000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000001134CA1D5E8E4C587401202 +000000000000000000000000000000000000000000000000001254C0E7AF460D00000000000000 +00000001134CA1D5E8E4C587401202000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000F4190BEC4A6662406000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000006244997AD7FA8AD7FA89D4B25070000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000005246573A8AA5B310A0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000021D1771E234726507030000000000000000000000000000000000 +0000000000000000000000000005072E6C1B414A07030000000000000000000000000000000000 +000000000000021D1771E234726507030000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000020D2238474C53575355544A41331D0C0200 +00020D233A444E565355574A2F110300000000051A40575355575355575355574D351404020D22 +38474C53575355544A41331D0C020000051A40575355575355575355574D35140400020D233A44 +4E565355574A2F1103000000000000031C6A6198A6341805000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002162971C2666133060100000000000000000000000000000000 +00000000000000000000000000000A3489D0D99E44110100000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041F67 +C3EEECC56A2005000000000000000000000000000000000000000A3489D0D99E4415236BC6EEEC +BF611B0300000000000000000000000000011352B5EEEECF802D07000000000000000000000000 +00000000000000000000000000000000000000000A3489D0D99E44110100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000061F4F727A714D1F060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00061F4F727A714D1F0600000000000623609EC3D8E7EEECEEE6D2B68B53210700000000031C6A +6198A6341805000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +000000000000000000000000000000000000000000000000000001060C1A1F1D48887FA89D4B25 +070000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000005246573A8AA5B310A0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0410005B6300937B009A75004B1D00031D1771E234726507030000000000000000000000000000 +000000000000000000000000000000000C0E5CD73482940D070000000000000000000000000000 +000000000000000000021D1771E234726507030000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000310253330241D1A18213245555752 +412109010310283937353B4955574A2F110300000000051A405651432F2220212020211C130701 +0310253330241D1A1821324555575241210901051A405651432F2220212020211C130701000310 +283937353B4955574A2F11030000000000000002152A78CA6C6E42090100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005257B679EAD361804000000000000000000000000000000 +000000000000000000000000000000021550A9DDC97C2C07000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +041F67C3EEECC56A20050000000000000000000000000000000000021550A9DDC97C2C0705226B +C6EEECBF611B030000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000021550A9DDC97C2C07000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000C3E9FE3ECE19C3C0B0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000C3E9FE3ECE19C3C0B0000000000082C6A8E84685246455C89C3EDEEEAB65A19030000 +0002152A78CA6C6E42090100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000D216CC6728663120400000000000000051139 +626094A67FA8AD788D702F1603041D4F598FA17DA8AD7FA49E66694212050000000007327E7EA8 +9D4B250700000000000000081F32688A74A4AD7FA29A62623E120503124C907FA89B59758E77A7 +A970714311030003153D4F8AA37EA19459657E77A8AA5B310A00051E4191AD7F927151829C7DA8 +AD77723007071D31688A74A5AD7E9D90564C27080100010B273D76957AA8AD7FA7A46D71411003 +020E007C81005D26000401000D1E00827A0029221771E2347265080C381C73E1347C9212110602 +1757206ECF338ADF317398171F0F0111612A8AE2348AE2348AE2348AE23482940D070102175720 +6ECF338ADF317398171F0F00021D1771E2347265080C381C73E1347C92121106021757206ECF33 +8ADF317398171F0F00000000000000112B00715300170300000000000000000000000000020C26 +475753482A0D02000000000005193A53574A2F110300000000051A40564E361605010100000000 +000000000000000000000000020C26475753482A0D02051A40564E361605010100000000000000 +00000000000005193A53574A2F11030000000000000000020B3A9E719D9E2B1002000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000D216CC6728663120400000000000000000000000000 +0000000000000000000000000000000000062570C1DEB25A1A0D3996DDE6B14E12010000000000 +000B3B9ADFE6AF4E1C295B92BED9E7EEEBDCC7A16A3510020000062979CCEEEECD9B98B7D7E9EC +EEDEA0452C67C3EEECC56A23153B80C7EDECD69A531D06000000000000062570C1DEB25A1A0300 +05226BC6EEECCD9794B8D9E8E8D19F5C200500072D82D2ECEEEEECEEEECF802D07000000000000 +07215186B4CFE4EEECEEE1C69A591F0500000000000000062570C1DEB25A1A03000007296CA7C9 +DEEAECEEEEE6D9BF935B230A2068C0EEEEC269210400011452B1E8EED5853108062979CCEEEECD +9B98B7D7E9ECEEDEA0410D000000000000000000000000000000041E66C0EEEEECEEEEECEEEEEC +EEEEECE19C3C0B010B2A5D92BED9E6EEEEE4D4B78A55220700020F3672A6CDE4ECEEEEEBE2CC9E +5A1E081E66C0EEEEECEEEEECEEEEECEEEEECE19C3C0B000000000000000005226BC6EEECCA7426 +0600000000020B3A9E719D9E2B1002000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000020A06202208222208232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B06000000000000031A +5167A8AD7A815E323739325059301905041A3E3943361F222220467877A8A6562E0A0000000732 +7E7EA89D4B25070000000000051859957FA488433B3025456C70A8AC64471A144C907FA8AC6654 +342960977FA896411E10246FA37FA89D595855518EAC7FA8AA5B310A00051E4191AD7FA89C564A +331C242D2A351E1A55937FA8A05B57493E70987FA89E4E2B0C0D3F877FA89C4F3B241724323044 +300D03255300893A000610005863009C7C00888300562F1771E234788C1E6AD9347C9413110500 +04281A75E23480A21B3A6E2379E2347E8B0D0B110718331565DC3485A3151F290916190205281A +75E23480A21B3A6E2379E2347E8B0D0A1E1771E234788C1E6AD9347C941311050004281A75E234 +80A21B3A6E2379E2347E8B0D0801000000001D4B00C38F00280600000000000000000000000005 +153249555743270E0200000000000005193A53574A2F110300000000051A405753555753555750 +483A24100400000000000000000005153249555743270E0200051A405753555753555750483A24 +10040000000000000005193A53574A2F1103000000000000000000031B69629FC84F2C0B00030B +0D161F11181F11181F11181F11181F111B291533350C232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208232B143133 +131A1F11181F11181F11181F11181F11161605072C428FCF6E6F3B0600000000010A2A619DC9E0 +E8DBBC94694224152147716F340B00000000000C3A92D5D4933D0D01031A5FBEE7CF7C2D163156 +685E3C192060BFE9CD83557ECAEEECDCAB7A65749DD1EEECD9933C0E01062979CCEEEEECD7A169 +4634323F4F4B262667C3EEECCE9389B7E5ECD79C541E0600000000000000000C3A92D5D4933D0D +01000005226BC6EEECEECF966F76A4DCEEECCE7A2A07010715232B3B6FC1EEEECF802D07000000 +0006256FC1ECEEE5B5825D4D4E5D717A5A23070000000000000C3A92D5D4933D0D010000000724 +566B5E4A3B302F3C62A5DFECE4A14112236EC7EEEAB55616020E42A1E3ECD98E350900062979CC +EEEEECD7A1694634323F4F4B23070000000000000000000000000000000005112029355EAFE7EC +E6AC5D352B2B261A0A092E7DCDEEE6BC7E5241466094D2ECECBB63211B59BAEEECD79452312B33 +445B5F42180405112029355EAFE7ECE6AC5D352B2B261A0A02000000000000010F3C89CFEEEDBF +6E2506000000000000031B69629FC84F2C0B00030B0D161F11181F11181F11181F11181F111B29 +1533350C2322082222082222082222082222082018000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +010C3F887FA897431F0500000000000000000106214950849877A3AC7FA8AD7FA8AD6848160200 +0007327E7EA89D4B2507000000000318398BAD7FA8AD7FA8AD7FA8AD7FA8AD7B7333184C907FA8 +8F391803062D757AA8A1502D253F90AD7F8E521304010A38807DA8AA5B310A00051E4191AD7F8A +4D1103000000000002143488AD7F915816050002134565A8AD715C220A276571A8AD7F9A8B5863 +522B1E0A02004C7600481000406E008438000A1100768A0061341771E2348AE2348AE22B402301 +000001105D2A8AE22D46280100030637B3348AC81D1B0700000C0E5CD73482940D070000000001 +105D2A8AE22D46280100030637B3348AC81D1D241771E2348AE2348AE22B402301000001105D2A +8AE22D46280100030637B3348AC81D1B0700000000000000000000000000000000000000000003 +0D253C51574D3B210B02000000000000000005193A53574A2F110300000000030E2026201B1A1C +24303E4F5753482C0E0200000000030D253C51574D3B210B02000000030E2026201B1A1C24303E +4F5753482C0E02000000000005193A53574A2F11030000000000000000000110505A9FCF5B3E16 +0213555C9FCF729FCF729FCF729FCF729FCF72A7D740E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234DADA +669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000009317796 +7E58403E4F729EC7E4EEEEECDAA1591E05000000031959AFDEC5712606000000093690D7E4AB53 +4D9DDFEEECB25C4C91D9E5AD6672BFEEEECC792A0600031B5FBDECEED3822F07062979CCEEEEC2 +692104000000000000041F67C3EEECEEEEECEEEEC36F24060000000000000000031959AFDEC571 +26060000000005226BC6EEECC87024050D42A4E6ECDD96390A00000000011352B5EEEECF802D07 +000000021759BBEEECD07E2C0700000000000000000000000000031959AFDEC571260600000000 +010C2E6596B9D1DEE5EDEEECEEEEECEEC2651E092877CBECE5A34418358CD9EEDA943A0B000006 +2979CCEEEEC26921040000000000000000021238688186858686858371461A0400000000000C3E +9FE3ECE19C3C0B0000000005226BC3EEEEECEEEEECEEEEECEEEEECEEE6A24117378BD3ECEEEED9 +BFA58B71502B0E0200000000000C3E9FE3ECE19C3C0B00000000000000000000072564ABE3EEDB +A45B1F0600000000000000000110505A9FCF5B3E160213555C9FCF729FCF729FCF729FCF729FCF +72A7D740E2E234E2E234E2E234E2E234E2E234E2E234E2A9000000000000000000000D4627DFDC +27603A0B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +000000010C3F887FA897431F050000000000000003153587AD7FA4863F332419356872A8AD6A4E +1902000007317C7DA89F4E28070000000003183A8CAD7F905E25211F171E1F171E1F15140C134C +907FA88B341302062C7379A8A1502D253F90AD7F894A1003000831797BA8AA5B310A00051E4191 +AD7F84400C01000000000002143488AD7F915816050002134565A8AD715C22040002081E363658 +6C5E94AC7FA5823410657B00370D00658100440D0000000037690060341771E23483A71E5ECC34 +85A514100401105D2A8AE22D46270100030637B3348AC81D1B0700000B0E5CD73482940D070000 +000001105D2A8AE22D46270100030637B3348AC81D1D241771E23483A71E5ECC3485A514100401 +105D2A8AE22D46270100030637B3348AC81D1B0700000000000000000000000000000000000002 +0A1E364D574E3D240D03000000000000000000000005193A53574A2F1103000000000000000000 +0000000003102F4D53543F190500020A1E364D574E3D240D030000000000000000000000000000 +0003102F4D53543F1905000000000005193A53574A2F11030000000000000000000214585D9FCF +58381100041113202D19222D19222D19222D19222D19263B1E474A1033310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B343E1C45481B242D19222D19222D19222D19222D192020070A374C98CF69602F040000000000 +02030200000000000000010611160F06000000000000072A78C9DBAA5116020000000002175AB8 +E7D09B9CC5C3A9C1CAA791C2E7CB794468BFEEEECC79290600031B5FBDECEED3822F07062979CC +EEEEB9591602000000000000041F67C3EEECE2B08AA1D7ECE6AE5A1C040000000000072A78C9DB +AA511602000000000005226BC6EEECBF611B030C3E9FE3ECDE96390A00000000011352B5EEEECF +802D07000000021759BBEEECD07E2C07000000000000000000000000072A78C9DBAA5116020000 +0000041D64BEEEEEE6B97747312F4A8FD6ECEEC76D2305072D7FCEEED9955F82CBEEE09A3F0D00 +0000062979CCEEEEB9591602000000000000000005216AC3EEEEECEEEEECEED585310800000000 +000B3E9FE3ECE19C3C0B0000000005226CC4EEEECB81452E2B2B2B2B2B2B2B281D0C020003102B +4A667C94AFCFEDEEE7B35B1B030000000B3E9FE3ECE19C3C0B00000000000000051C539BD9EEDE +AB63260800000000000000000000000214585D9FCF58381100041113202D19222D19222D19222D +19222D19263B1E474A1033310B31310B31310B31310B31310B2E23000000000000000000000D46 +27DED6223B0B00000000000000000000000000000000000000000000000000031C3384CF727A4A +0A010000000000031A5168A8AD7A816033383A32515A311C1C388AAD7F9B6D220D0E1E56917FA8 +AD6A4E1902000004246473A8AD70653E1E201E110A081A5C977FA89C554D39232F39345A714E3B +16134C907FA88B341302062C7379A8A1502A122470A37FA78E4539343B7AA47FA8AA5B310A0005 +1E4191AD7F84400C01000000000000051756937FA89F5A55473C6E977FA89F4F2B0A0621473B3F +301B1E1F22528A7FA897451D4A74004E13003D6B007D3200050D006F880061341771E234726508 +0F492382E2315E4B0505291B75E2347FA01A396B2278E2347F8C0D08010000080B50CC348ABF1C +2B300A16190205291B75E2347FA01A396B2278E2347F8C0D0A1E1771E2347265080F492382E231 +5E4B0505291B75E2347FA01A396B2278E2347F8C0D080100000000122D00745500180300000000 +04142E49575352442E24212020211F1C120701020A171F2023314555574F3F2C22201D130A0F1F +2A29221F1E1E24303F50575346290D06142E49575352442E24212020211F1C1207030D1F2A2922 +1F1E1E24303F50575346290D02020A171F2023314555574F3F2C22201D13080100000000052681 +6A9FB83F2007000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000031C3384CF727A4A0A0100 +000000000000000000000000000000000000000000000001104299D9D289350A00000000000000 +083288D5EEE9E7CB824C6EBEE7E8ECE4A745152B79CBEEECDBA87762719BCFEEECDA933D0E0106 +2979CCEEEEB9591602000000000000041F67C3EEECC56A23194DA0E1EEDFA24F16030001104299 +D9D289350A0000000000000005226BC6EEECBF611B030C3E9FE3ECDE96390C0A1A262B2C3B6FC1 +EEEED79551312B2920110A2570C2ECEEE5B5845F4F505D727B5B24070001104299D9D289350A00 +0000000000042069C1EEEED9954013133879C8EEECEEC76D230500083186D5EEE5D6E6ECE3A144 +0F00000000062979CCEEEEB9591602000000000000000000000000000000000000000000000000 +0000000008338AD7ECEEC9804B322C261A0A0A3182D0EEECD7A06C4E42434E617E9B93521A0D2E +626E5942322A2B3F73BEEDECD07F2C0700000008338AD7ECEEC9804B322C261A0B0E3783CCEEEC +E6B982655B5A5B5B584D32130300000000000526816A9FB83F2007000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D4627DED6223B0B000000000000000000000000000000000000000000000000000005124BAD +7294851E090000000000000006123B646195A67FA8AD798F723016050A2C5C6199AA7FA59F6A7D +8676A8AD6A4E1902000000051A3371957BA8AD7FA8AD633C0F01091F31668771A1AD7FA8AC7994 +83462D10134C907FA88B341302062C7379A8A150290703163F518DA57FA3995F6F8579A8AA5B31 +0A00051E4191AD7F84400C010000000000000000081F336A8C75A5AD7F9D92574E290901000626 +5E6194A47FA8AD7FA59F65653C10041F4B00924700080E00515C008F73007D700050301771E234 +7265070304073BB0338AD021291303195A216FCF338AE131749B18201000000000000002186525 +79DA348AE23482940D070102195A216FCF338AE131749B18201000021D1771E234726507030407 +3BB0338AD021291303195A216FCF338AE131749B182010000000000000001D4B00C38F00280600 +0000010A23435557535557535557535557534D341203061B415753555753555753555753555236 +1814283F4E5055575355534940311D0C03010A23435557535557535557535557534D3412061028 +3F4E5055575355534940311D0C030000061B415753555753555753555753555236150400000007 +1656B6728F77190600000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000005124BAD729485 +1E090000000000000000000000000000000000000000000000041D60B7DCBD6820050000000000 +000000011552B5EDECE3A041153185D5EEECCA732506010B2B5F95C0DAE8EEEDDDC9A36D381102 +0000062979CCEEEEB9591602000000000000041F67C3EEECC56A2005052066BAE9EEDB9746161F +60B7DCBD682005000000000000000005226BC6EEECBF611B030C3E9FE3ECDE9639153B97DFEEEC +EEEEECEEEEECEEEEECEEEEBF621C0308235289B6D1E5EEECEEE3C99D5A1F05041D60B7DCBD6820 +05000000000000000002133E7FB5D7EAEEE7DBC6B0B8DDECEEC76D2305000009368FD9ECEEEEE4 +A74A110100000000062979CCEEEEB9591602000000000000000000000000000000000000000000 +0000000000000000082A6AA6D0E6ECEEEEECE19C3C0B010C2B5C8FBAD4E3EEEEECEDE2CFB4843F +120D3681B6D0E2EDECEEEEE8DABD8E521E060000000000082A6AA6D0E6ECEEEEECE19C3F2661BE +EEEEECEEEEECEEEEECEEEEECD98D340900000000071656B6728F77190600000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000D4627DED6223B0B000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010800687B00763B000D0300000000010000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000832448FC959451C020000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000010F46 +5096C34F3311010000000000000000000000000000000000000000083080CDDA9F491201000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +083080CDDA9F491201000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083080CDDA9F +491201000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000832448FC959451C020000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D4727DED6223C0B000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000107004455008E7A009B7F006A2600 +010000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000031647384F4B110500000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000040D31623A3F25050100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000031647384F4B110500000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000197631E1E12E6615000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D4627DED6223B0B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D4627DED6223B0B000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D4627DED6223B0B000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000B02317A04150A00000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000083089D5CD76250500000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000011147A4DDC26920040000000000083089 +D5CD762505000000000000000000000000000000093592DACC7223050000000000000000000000 +00000000000000000000000000000000000000000000000000000000021138666D4A1B04000000 +00000000000000021138666D4A1B04000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000D4627DED6223B0B000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D4D053D4701 +020000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000010A1D2E2D19080100000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000041F67C1DDA6491101000000000000 +010A1D2E2D190801000000000000000000000000000000093592DACC7223050000000000000000 +00000000000000000000000000000000000000000000000000000000000000042270CCDB933609 +00000000000000000000042270CCDB933609000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000D4627DED6223B0B000000000000 +00000000000000000000000000000000000000000D216CC67286631204000000000F4E04375A03 +181B00010000000000000000000000000000072A032D5002090300000000000000000000021A03 +4080030E04000000000000000000000000000000000000000000011350B1E2BA59170200000000 +0E43A4E0C5681E030C3B8DBCC9D4ECF8D3762505000000052372CDE8D2CCDCEDE1B999AACDE6ED +CF8733090000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000009338AD6D3842E08000000000C +3B8DBCC9D4ECF8D37625050000000000010C2E6CACD9EDEDDECBB2A1BEE4CD7223050004184883 +B8D8E5E5E2E1DABF8C4D1A04000F4CB9ECD39FA0B5BECADEE4C98C4213020B3787B9C8D0E5FDFF +EED6CAC7C7BD9244110C3787B9C8D0E5FDFFEED6CAC7C7BD9244110F43A2DFC86E220400000000 +0A3792DCD6832D0700000000000000000000000000000000001254C0F0DAB1ACB1B4BAC6CBB47D +3D12020E43A2DFC86E2204000000000A3792DCD6832D0700000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000D4627DFDA25542B08232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B060000000000010801 +153E03347B05457A04293B010906000000000000000C48054E8A03100500000000000000000000 +000702338A0520120000000000000000000000000000000000000000000001124DAEE0BB5A1802 +00000F45A6E0C3641D030000000000083089D5CD762505000000052372CEDF9B3D1D50BBF2D87E +2E266AC3C570220400000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000001144FACDEBC601C03000000 +000000000000083089D5CD7625050000000004226EC8E8BF6F300E04124499E6FDD37223081A5A +B1D6AB5D24090100062368BFDDA5440E0F4CBAF5E496401001011454BAEAC35E19020000000422 +70CCDB93360900000000000000000000042270CCDB93360900000000000000093690D9D07C2906 +00000D409FDFCA7023050000000000000000000000000000000000001254C2F9E89A400F01000A +3489D7D6873008093690D9D07C290600000D409FDFCA7023050000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +0000000000000000000418022872064E8D04130700000000000000000000000000000000000000 +0000000005012A82052A1E0000000000000000000000000000000000000000000000011049AADF +BB5B18030F46A7DFBF601B03000000000000083089D5CD762505000000052372C9CC7927103A9A +DBBF5815114EB5D89B3B0A00000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000052370C8DC9D410E0100 +000000000000000000083089D5CD762505000000000E49B3EAC55D17020000000C40A4E4CF7223 +1246AEF0F6DAC8C3C3C3C3C3C4CAD7DAB66420134CB9E9B94E10000000072E85D4D27F2B060000 +00042270CCDB93360900000000000000000000042270CCDB9336090000000000000000062A7DD1 +D68A3109114AAADFBD5F1B03000000000000000000000000000000000000001254C1EDBB4F1000 +0000000D44ABE6C6611902062A7DD1D68A3109114AAADFBD5F1B03000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000030E082E31 +0B31310B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +0000000000000210011B4A043A8105406C03212B01040100000000000000000000000000000000 +0000000000000005012D8505271A00000000000000000000000000000000000000000000000000 +0F46A6DDBB5C284AA8DEBC5D190200000000000000083089D5CD762505000000052372C8C87223 +0E3693D6BA51100E49B1DAA4400C00000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000B3993DACE7A2906 +000000000000000000000000083089D5CD762505000000000E48B2E9C25815010000000B3D9FE1 +CE72231246AEE7C7621A0200000000000000000000000F4CB9E6B4490E000000072C82D3D3822C +07000000042270CCDB93360900000000000000000000042270CCDB933609000000000000000000 +04206BC5D99A5161B5DDAE4F130100000000000000000000000000000000000000001254C1EFBF +5312000000000D46AFE8C7621A020004206BC5D99A5161B5DDAE4F130100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000031C3384CF727A4A +0A01000000000D4805468705314B02100E00000000000000000000000000072B032E5202090300 +000000000000000000000D023A8A04170A00000000000000000000000000000000000000000000 +000000000E43A3DCCCA5C2E0B95A18020000000000000000083089D5CD762505000000052372C8 +C872230E3693D6BA51100E49B1DAA4400C00000000000000000000000000000000000000000003 +17477F9787551F050000000000000000000317477F9787551F05000000000000021757B4DEB458 +180200000000000000000000000000083089D5CD7625050000000004216CC5DCA249130200082C +7ED8F9D37223081A5AB5E7D082380F020000020E273D3718050F4CB9E6B4490E000000072C82D3 +D3822C0700000002175DC5EBB851130100000000000000000002175DC5EBB85113010000000000 +0000000002185AB7E9EDF2E4A0420E00000000000000000317477F9787551F0500000000001254 +C2FBF2B05618030212479EE1D989310800000002185AB7E9EDF2E4A0420E000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000005124BAD +7294851E0900000000030E010301000000000000000000000000000000000000000C48054E8A03 +100500000000000000000000052D04436C02070100000000000000000000000000000000000000 +00000000000000000D40A0EDFFF9B956160200000002174F9BC2CCCED8EEFFFEE9D5CDCCC09346 +3272C8C872230E3693D6BA51100E49B1DAA4400C00000000000000000000000000000000000000 +0000052677D6FEE4903409000000000000000000052677D6FEE49034090000000000062879CEDA +943A0B00000000000000000002174F9BC2CCCED8EEFFFEE9D5CDCCC093410F010C2E6CACD4DBCA +B8B2B1B1CDEBCE7223050004184680B3D4DFDFDFE2E5E1CFA76826060F4CB9E6B4490E00000007 +2C82D3D3822C070000000003184F98CDE0DCD4D1C5994712010000000003184F98CDE0DCD4D1C5 +9947120100000000011351B7F2E392370A000000000000000000052677D6FEE490340900000000 +001254C0EDD2A5AEC8D7DFE3DCBB813F13020000000000011351B7F2E392370A00000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002011C6C052D2500000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000E409C +DCC871240500000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000011044A0E2D4802C070000000000000000000000000000000000000000 +000000001254C0E7AF460D0000000000000000000000000000011044A0E2D4802C070000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +0000000000000000000000000000000008011F4002060200000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000001134CA1D5E8E4C587401202000000000000000000000000000000000000 +000000000000001254C0E7AF460D0000000000000000000001134CA1D5E8E4C587401202000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000E49B5F7FFF8EDEBEDF3F4E9CFA3692D0B010000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000E49B5F7FFFDF5F2F2F2F2F2F2F1DFA3421A45AEF5FFEEA3440F0000000F4BB8EDC877 +76BAE7F2F2F2F3FAFFFFFFFDF5F2F2F2ECCB7F3C51B5F7FFFDF5F2F2F2F2F2F2F1DFA342193FA3 +EDFFFAEFEAEAEBEAE0C5955A230700000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000021138666D4A1B04000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000093592DACC7223050000000000000000 +00000000000000000000000000021138666D4A1B04000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000021138666D4A1B04000000000000000000000000083089D5CD76250500000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000E49B5EDCC691E030006184185D3F3CD71230500000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000E49B5EDCC691E030000000000000000000D45AEF2FFF6EAB2541602000F4BB8 +EDC55B1601000000000F4BB8EFCE6B1F0400000000000E49B5EDCC691E03000000000000000000 +0C3FA3E5D47B28060002103D8CDBF1BE5D19020000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000042270CCDB933609000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000093592DACC7223050000000000 +00000000000000000000000000000000042270CCDB933609000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000042270CCDB933609000000000000000000000000010A1D2E2D19080100000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000E49B5EDCC691E03000000093590E0E7A23F0B00 +052474CCDAA37C91AEBBC1C9D2CE9F460F04184883B8D8E5E5E2E1DABF8C4D1A040000051D5598 +C9E3E9E4E0DFDFCE9A4813010000051D5598C9E3E9E4E0DFDFCE9A481301000000000000000000 +000000000000000000000E49B5EDCC691E030000000000000000000D45AEE8D297A4D2BF661E04 +0F4BB8EDC55B1601000000000F4BB8EFCE6B1F0400000000000E49B5EDCC691E03000000000000 +0000000C3FA3E5D47B28060000000B3FA2E8DF9034090000000000000000000000000000000000 +000006215896C7DEE4E4E4E1CFA5692E0C01000000052474CCDAA37C91AEBBC1C9D2CE9F460F00 +0000000000000000000000000000000B3787B9C8D0E5FDFFEED6CAC7C7BD9244110F43A2DFC86E +2204000000000A3792DCD6832D1954C0F0DAB1ACB1B4BAC6CBB47D3D1202000004184883B8D8E5 +E5E2E1DABF8C4D1A0400000000000000000000000000000000000000000003153F78ADD1DFE2E2 +E3E0D0A56021050006215896C7DEE4E4E4E1CFA5692E0C062372CDE8D2CCDCEDE1B999AACDE6ED +CF87382C72CDE8D2CCDCEDE1B999AACDE6EDCF873309062363A5CDDDE1E0DEDBD8C9A1672E0C01 +000F4CB9ECD39FA0B5BECADEE4C98C42130200010C2E6CACD9EDEDDECBB2A1BEE4CD7223050000 +0000000000000000000000000000000B3787B9C8D0E5FDFFEED6CAC7C7BD924411010006215896 +C7DEE4E4E4E1CFA5692E0C0100000000000000000000000000000000000000000003153F78ADD1 +DFE2E2E3E0D0A56021050006215896C7DEE4E4E4E1CFA5692E0C01000F4CB9ECD39FA0B5BECADE +E4C98C4213020B3787B9C8D0E5FDFFEED6CAC7C7BD92441101000C3B8DBCC9D4ECF8D376250500 +000000000F4CB9ECD39FA0B5BECADEE4C98C421302000F4CB9E6B4490E000000072C82D3D3822C +070004184883B8D8E5E5E2E1DABF8C4D1A04000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000E49B5EDCC691E03020C244F92DAF3C86B +210400052474D3FCE7A04D1603000001060B0A1C5AB1D6AB5D24090100062368BFDDA5440E072C +82D6E09A3C0B00000006121B12060000072C82D6E09A3C0B00000006121B120600000000000000 +000000000000000000000000000E49B5F7FFFAF1EEEEEEEEEEEEE6C172271345AEE8C96B4277C6 +C97A28154BB8EDC55B1601000000000F4BB8EFCE6B1F0400000000000E49B5F7FFFAF1EEEEEEEE +EEEEE6C17227123FA3E5D47B2806000312408EDBEBB35517020000000000000000000000000000 +000000021757B5E7CB752A0801041E5FB7E7CB7325050000052474D3FCE7A04D1603000001060B +07020000000000000000000000000000000000000000042270CCDB933609000000000000000936 +90D9D07C290600000D409FDFCA7023051254C2F9E89A400F01000A3489D7D687300B1A5AB1D6AB +5D24090100062368BFDDA5440E00000000000000000000000000000000000002154FAAE4D4893E +1102000006172B2912051757B5E7CB752A0801041E5FB7E7CB732A2872CEDF9B3D1D50BBF2D87E +2E266AC3C5754576CEDF9B3D1D50BBF2D87E2E266AC3C57022060D1F211306000000011249A4DD +C2641C030F4CBAF5E496401001011454BAEAC35E1906226EC8E8BF6F300E04124499E6FDD37223 +05000000000000000000000000000000000000000000042270CCDB933609000000000000021757 +B5E7CB752A0801041E5FB7E7CB73250500000000000000000000000000000000000002154FAAE4 +D4893E1102000006172B2912051757B5E7CB752A0801041E5FB7E7CB7325050F4CBAF5E4964010 +01011454BAEAC35E1902000000042270CCDB933609000000000000000000000000083089D5CD76 +250500000000000F4CBAF5E496401001011454BAEAC35E19020F4CB9E6B4490E000000072C82D3 +D3822C0A1A5AB1D6AB5D24090100062368BFDDA5440E0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000E49B5F7FFF5EAE6E7E9E4D6BC92 +5C2609000000052474CFE29F3D0B000000000000000D46AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664 +2006144A9FDFE9C9A489745C3C1B070100000002144A9FDFE9C9A489745C3C1B07010000000000 +000000000000000000000000000000000E49B5EDCC691E030000000000000000000D45AEE8C966 +201F61BBD08D4455B8EDC55B1601000000000F4BB8EFCE6B1F0400000000000E49B5EDCC691E03 +0000000000000000000C3FA3EDFFF8EBE9F0FDFFFACE873F120200000000000000000000000000 +0000000000000A3999DED0772605000000011559C3ECBA4F100000052474CFE29F3D0B00000000 +00000000000000000000000000000000000000000000000000042270CCDB933609000000000000 +0000062A7DD1D68A3109114AAADFBD5F1B03001254C1EDBB4F10000000000D44ABE6C6612648AE +F0F6DAC8C3C3C3C3C3C4CAD7DAB664200400000000000000000000000000000000000B3EA0E2CD +7022040000000000000000000A3999DED0772605000000011559C3ECBA543372C9CC7927103A9A +DBBF5815114EB5D8A05E7CC9CC7927103A9ADBBF5815114EB5D89B3B0C0F346A9BBCCBCECDCCCD +D5E9F9DC872F080F4CB9E9B94E10000000072E85D4D27F2B1449B3EAC55D17020000000C40A4E4 +CF722305000000000000000000000000000000000000000000042270CCDB933609000000000000 +0A3999DED0772605000000011559C3ECBA4F100000000000000000000000000000000000000B3E +A0E2CD7022040000000000000000000A3999DED0772605000000011559C3ECBA4F100F4CB9E9B9 +4E10000000072E85D4D27F2B06000000042270CCDB933609000000000000000000000000083089 +D5CD76250500000000000F4CB9E9B94E10000000072E85D4D27F2B060F4CB9E6B4490E00000007 +2C82D3D3822C1446AEF0F6DAC8C3C3C3C3C3C4CAD7DAB664200400000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000E49B5EDCC691E03000000 +000000000000000000052474CCD68B3108000000000000000D46AEE7C7621A0200000000000000 +0000000000000001091C344C6685AEDBF0D38430080000000001091C344C6685AEDBF0D3843008 +000000000000000000000000000000000000000E49B5EDCC691E030000000000000000000D45AE +E8C9661C05134FACD3AE8FC7EDC55B1601000000000F4BB8EFCE6B1F0400000000000E49B5EDCC +691E030000000000000000000C3FA3E5D47B28060310377ECAE5B9631F04000000000000000000 +0000000000000000000A3999DED0772605000000011559C3ECBA4F100000052474CCD68B310800 +00000000000000000000000000000000000000000000000000000000042270CCDB933609000000 +00000000000004206BC5D99A5161B5DDAE4F130100001254C1EFBF5312000000000D46AFE8C762 +2748AEE7C7621A0200000000000000000000000000000000000000000000000000000000000B3E +A0E2CD7022040000000000000000000A3999DED0772605000000011559C3ECBA543372C8C87223 +0E3693D6BA51100E49B1DAA9637EC8C872230E3693D6BA51100E49B1DAA4483D8AD9DD98471503 +0000083088D8DA8C32080F4CB9E6B4490E000000072C82D3D3822C1548B2E9C25815010000000B +3D9FE1CE722305000000000000000000000000000000000000000000042270CCDB933609000000 +0000000A3999DED0772605000000011559C3ECBA4F100000000000000000000000000000000000 +000B3EA0E2CD7022040000000000000000000A3999DED0772605000000011559C3ECBA4F100F4C +B9E6B4490E000000072C82D3D3822C07000000042270CCDB933609000000000000000000000000 +083089D5CD76250500000000000F4CB9E6B4490E000000072C82D3D3822C070E4BB6E6B64B0F00 +0000083089D7D4822C1446AEE7C7621A0200000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000E49B5EDCC691E03 +000000000000000000000000052474CCD68B310800000000000000031A5AB5E7D082380F020000 +020E273D371805030F23251506000000041F67C8EAB44B0F00030F23251506000000041F67C8EA +B44B0F000000000000000000000000000000000000000E49B5EDCC691E03000000000000000000 +0D45AEE8C9661C03000D3F9BE0F5FFFCC55B1601000000000F4BB8EFCE6B1F0400000000000E49 +B5EDCC691E030000000000000000000C3FA3E5D47B2806000000072C7ED2E5AB4F150200000000 +000000000000000000000000021757B5E7C972280700041C5CB5E7CB7325050000052474CCD68B +3108000000000000000000000000000000000000000000000000000000000002175DC5EBB85113 +0100000000000000000002185AB7E9EDF2E4A0420E000000001254C2FBF2B05618030212479EE1 +D989310B1A5AB5E7D082380F020000020E273D3718050000000000000000000000000000000000 +0002154FAAE4D3863B100200000411232410051757B5E7C972280700041C5CB5E7CB732A2872C8 +C872230E3693D6BA51100E49B1DAA9637EC8C872230E3693D6BA51100E49B1DAA44B4AA0E3D177 +26050000092F7FD6FBE18C32080F4CB9E6B4490E000000072C82D3D3822C0B216CC5DCA2491302 +00082C7ED8F9D372230500000000000000000000000000000000000000000002175DC5EBB85113 +010000000000021757B5E7C972280700041C5CB5E7CB7325050000000000000000000000000000 +0000000002154FAAE4D3863B100200000411232410051757B5E7C972280700041C5CB5E7CB7325 +050F4CB9E6B4490E000000072C82D3D3822C0700000002175DC5EBB85113010000000000000000 +000000083089D5CD76250500000000000F4CB9E6B4490E000000072C82D3D3822C07093794DED5 +822C0700062268C5F4DA822C0A1A5AB5E7D082380F020000020E273D3718050000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000E49B5EDCC +691E03000000000000000000000000052474CCD68B310800000000000000000004184680B3D4DF +DFDFE2E5E1CFA768260607276DB0D5E1E2E1E4E9E7D2A76A2C0A010007276DB0D5E1E2E1E4E9E7 +D2A76A2C0A01000000000000000000000000000000000000000E49B5F7FFFDF5F2F2F2F2F2F2F2 +E7B9602948AEE8C9661C03000008318AE0FFFFC65B1601000000000F4BB8EFCE6B1F0400000000 +000E49B5F7FFFDF5F2F2F2F2F2F2F2E7B9602842A3E5D47B28060000000002144EAAE6D6843008 +000000000000000000000000000000000006215997C7DDE1E0E0DFCFA66A2E0C01000000052474 +CCD68B310800000000000000000000000000000000000000000000000000000000000003184F98 +CDE0DCD4D1C59947120100000000011351B7F2E392370A00000000001254C0EDD2A5AEC8D7DFE3 +DCBB813F1302000004184680B3D4DFDFDFE2E5E1CFA76826060000000000000000000000000000 +00000000000003154079AED0DDDEDEDFDED0A66121050006215997C7DDE1E0E0DFCFA66A2E0C06 +2372C8C872230E3693D6BA51100E49B1DAA9637EC8C872230E3693D6BA51100E49B1DAA4401325 +64A6CFD7C9B7AEADA597ADDEDA8C32080F4CB9E6B4490E000000072C82D3D3822C07010C2E6CAC +D4DBCAB8B2B1B1CDEBCE7223050000000000000000000000000000000000000000000003184F98 +CDE0DCD4D1C5994712010006215997C7DDE1E0E0DFCFA66A2E0C01000000000000000000000000 +00000000000000000003154079AED0DDDEDEDFDED0A66121050006215997C7DDE1E0E0DFCFA66A +2E0C01000F4CB9E6B4490E000000072C82D3D3822C070000000003184F98CDE0DCD4D1C5994712 +03174F9BC2CCCED8EEFFFEE9D5CDCCC093410F0F4CB9E6B4490E000000072C82D3D3822C070007 +276BB1DDE5D4C2BBAE9FB6E1D5822C070004184680B3D4DFDFDFE2E5E1CFA76826060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000011044A0E2D4802C070000000000001254C0E7AF460D00 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000001134CA1D5E8E4C587401202000000000000001254C0E7AF +460D00000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000F4190BEC4A6662406000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000006244997AD7FA8AD7FA89D4B25070000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000005246573A8AA5B310A0000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000021D1771E234726507030000000000000000000000000000000000 +0000000000000000000000000005072E6C1B414A07030000000000000000000000000000000000 +000000000000021D1771E234726507030000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000020D2238474C53575355544A41331D0C0200 +00020D233A444E565355574A2F110300000000051A40575355575355575355574D351404000000 +0000000003102C4A53555744250B0101091B36484D53575355564D463A2512050100020D233A44 +4E565355574A2F1103000000000000031C6A6198A6341805000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002162971C2666133060100000000000000000000000000000000 +00000000000000000000000000000A3489D0D99E44110100000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000041F67 +C3EEECC56A2005000000000000000000000000000000000000000A3489D0D99E4415236BC6EEEC +BF611B0300000000000000000000000000011352B5EEEECF802D07000000000000000000000000 +00000000000000000000000000000000000000000A3489D0D99E44110100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000061F4F727A714D1F060000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00061F4F727A714D1F0600000000000623609EC3D8E7EEECEEE6D2B68B53210700000000031C6A +6198A6341805000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +000000000000000000000000000000000000000000000000000001060C1A1F1D48887FA89D4B25 +070000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000005246573A8AA5B310A0000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0410005B6300937B009A75004B1D00031D1771E234726507030000000000000000000000000000 +000000000000000000000000000000000C0E5CD73482940D070000000000000000000000000000 +000000000000000000021D1771E234726507030000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000310253330241D1A18213245555752 +412109010310283937353B4955574A2F110300000000051A405651432F2220212020211C130701 +0000000000020E2943545753555744250B01010817292E2723201E232F3F51575347290C020310 +283937353B4955574A2F11030000000000000002152A78CA6C6E42090100000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000005257B679EAD361804000000000000000000000000000000 +000000000000000000000000000000021550A9DDC97C2C07000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +041F67C3EEECC56A20050000000000000000000000000000000000021550A9DDC97C2C0705226B +C6EEECBF611B030000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000021550A9DDC97C2C07000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000C3E9FE3ECE19C3C0B0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000C3E9FE3ECE19C3C0B0000000000082C6A8E84685246455C89C3EDEEEAB65A19030000 +0002152A78CA6C6E42090100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000D216CC6728663120400000000000000051139 +626094A67FA8AD788D702F1603041D4F598FA17DA8AD7FA49E66694212050000000007327E7EA8 +9D4B250700000000000000081F32688A74A4AD7FA29A62623E120503124C907FA89B59758E77A7 +A970714311030003153D4F8AA37EA19459657E77A8AA5B310A00051E4191AD7F927151829C7DA8 +AD77723007071D31688A74A5AD7E9D90564C27080100010B273D76957AA8AD7FA7A46D71411003 +020E007C81005D26000401000D1E00827A0029221771E2347265080C381C73E1347C9212110602 +1757206ECF338ADF317398171F0F0111612A8AE2348AE2348AE2348AE23482940D070102175720 +6ECF338ADF317398171F0F00021D1771E2347265080C381C73E1347C92121106021757206ECF33 +8ADF317398171F0F00000000000000112B00715300170300000000000000000000000000020C26 +475753482A0D02000000000005193A53574A2F110300000000051A40564E361605010100000000 +000000000000020C23415247353345555744250B010000000000020507090F1B2F4A575343240A +01000000000005193A53574A2F11030000000000000000020B3A9E719D9E2B1002000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000D216CC6728663120400000000000000000000000000 +0000000000000000000000000000000000062570C1DEB25A1A0D3996DDE6B14E12010000000000 +000B3B9ADFE6AF4E1C295B92BED9E7EEEBDCC7A16A3510020000062979CCEEEECD9B98B7D7E9EC +EEDEA0452C67C3EEECC56A23153B80C7EDECD69A531D06000000000000062570C1DEB25A1A0300 +05226BC6EEECCD9794B8D9E8E8D19F5C200500072D82D2ECEEEEECEEEECF802D07000000000000 +07215186B4CFE4EEECEEE1C69A591F0500000000000000062570C1DEB25A1A03000007296CA7C9 +DEEAECEEEEE6D9BF935B230A2068C0EEEEC269210400011452B1E8EED5853108062979CCEEEECD +9B98B7D7E9ECEEDEA0410D000000000000000000000000000000041E66C0EEEEECEEEEECEEEEEC +EEEEECE19C3C0B010B2A5D92BED9E6EEEEE4D4B78A55220700020F3672A6CDE4ECEEEEEBE2CC9E +5A1E081E66C0EEEEECEEEEECEEEEECEEEEECE19C3C0B000000000000000005226BC6EEECCA7426 +0600000000020B3A9E719D9E2B1002000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000020A06202208222208232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B06000000000000031A +5167A8AD7A815E323739325059301905041A3E3943361F222220467877A8A6562E0A0000000732 +7E7EA89D4B25070000000000051859957FA488433B3025456C70A8AC64471A144C907FA8AC6654 +342960977FA896411E10246FA37FA89D595855518EAC7FA8AA5B310A00051E4191AD7FA89C564A +331C242D2A351E1A55937FA8A05B57493E70987FA89E4E2B0C0D3F877FA89C4F3B241724323044 +300D03255300893A000610005863009C7C00888300562F1771E234788C1E6AD9347C9413110500 +04281A75E23480A21B3A6E2379E2347E8B0D0B110718331565DC3485A3151F290916190205281A +75E23480A21B3A6E2379E2347E8B0D0A1E1771E234788C1E6AD9347C941311050004281A75E234 +80A21B3A6E2379E2347E8B0D0801000000001D4B00C38F00280600000000000000000000000005 +153249555743270E0200000000000005193A53574A2F110300000000051A405753555753555750 +483A24100400000109203F4D4A32150E2242555744250B010000000005183C55535557534D3B21 +0C020000000000000005193A53574A2F1103000000000000000000031B69629FC84F2C0B00030B +0D161F11181F11181F11181F11181F111B291533350C232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A +0A232208222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322 +08222208222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222 +08222208222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222 +08222208252E0E403A0A232208222208222208222208252E0E403A0A2322082222082222082222 +08252E0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208252E +0E403A0A232208222208222208222208252E0E403A0A232208222208222208222208232B143133 +131A1F11181F11181F11181F11181F11161605072C428FCF6E6F3B0600000000010A2A619DC9E0 +E8DBBC94694224152147716F340B00000000000C3A92D5D4933D0D01031A5FBEE7CF7C2D163156 +685E3C192060BFE9CD83557ECAEEECDCAB7A65749DD1EEECD9933C0E01062979CCEEEEECD7A169 +4634323F4F4B262667C3EEECCE9389B7E5ECD79C541E0600000000000000000C3A92D5D4933D0D +01000005226BC6EEECEECF966F76A4DCEEECCE7A2A07010715232B3B6FC1EEEECF802D07000000 +0006256FC1ECEEE5B5825D4D4E5D717A5A23070000000000000C3A92D5D4933D0D010000000724 +566B5E4A3B302F3C62A5DFECE4A14112236EC7EEEAB55616020E42A1E3ECD98E350900062979CC +EEEEECD7A1694634323F4F4B23070000000000000000000000000000000005112029355EAFE7EC +E6AC5D352B2B261A0A092E7DCDEEE6BC7E5241466094D2ECECBB63211B59BAEEECD79452312B33 +445B5F42180405112029355EAFE7ECE6AC5D352B2B261A0A02000000000000010F3C89CFEEEDBF +6E2506000000000000031B69629FC84F2C0B00030B0D161F11181F11181F11181F11181F111B29 +1533350C2322082222082222082222082222082018000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +010C3F887FA897431F0500000000000000000106214950849877A3AC7FA8AD7FA8AD6848160200 +0007327E7EA89D4B2507000000000318398BAD7FA8AD7FA8AD7FA8AD7FA8AD7B7333184C907FA8 +8F391803062D757AA8A1502D253F90AD7F8E521304010A38807DA8AA5B310A00051E4191AD7F8A +4D1103000000000002143488AD7F915816050002134565A8AD715C220A276571A8AD7F9A8B5863 +522B1E0A02004C7600481000406E008438000A1100768A0061341771E2348AE2348AE22B402301 +000001105D2A8AE22D46280100030637B3348AC81D1B0700000C0E5CD73482940D070000000001 +105D2A8AE22D46280100030637B3348AC81D1D241771E2348AE2348AE22B402301000001105D2A +8AE22D46280100030637B3348AC81D1B0700000000000000000000000000000000000000000003 +0D253C51574D3B210B02000000000000000005193A53574A2F110300000000030E2026201B1A1C +24303E4F5753482C0F091A374E50381D0C070E254355574528100501000000010610171B222E3B +4D575243270C02000000000005193A53574A2F11030000000000000000000110505A9FCF5B3E16 +0213555C9FCF729FCF729FCF729FCF729FCF72A7D740E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E2 +34E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234E2E234DADA +669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000009317796 +7E58403E4F729EC7E4EEEEECDAA1591E05000000031959AFDEC5712606000000093690D7E4AB53 +4D9DDFEEECB25C4C91D9E5AD6672BFEEEECC792A0600031B5FBDECEED3822F07062979CCEEEEC2 +692104000000000000041F67C3EEECEEEEECEEEEC36F24060000000000000000031959AFDEC571 +26060000000005226BC6EEECC87024050D42A4E6ECDD96390A00000000011352B5EEEECF802D07 +000000021759BBEEECD07E2C0700000000000000000000000000031959AFDEC571260600000000 +010C2E6596B9D1DEE5EDEEECEEEEECEEC2651E092877CBECE5A34418358CD9EEDA943A0B000006 +2979CCEEEEC26921040000000000000000021238688186858686858371461A0400000000000C3E +9FE3ECE19C3C0B0000000005226BC3EEEEECEEEEECEEEEECEEEEECEEE6A24117378BD3ECEEEED9 +BFA58B71502B0E0200000000000C3E9FE3ECE19C3C0B00000000000000000000072564ABE3EEDB +A45B1F0600000000000000000110505A9FCF5B3E160213555C9FCF729FCF729FCF729FCF729FCF +72A7D740E2E234E2E234E2E234E2E234E2E234E2E234E2A9000000000000000000000D4627DFDC +27603A0B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +000000010C3F887FA897431F050000000000000003153587AD7FA4863F332419356872A8AD6A4E +1902000007317C7DA89F4E28070000000003183A8CAD7F905E25211F171E1F171E1F15140C134C +907FA88B341302062C7379A8A1502D253F90AD7F894A1003000831797BA8AA5B310A00051E4191 +AD7F84400C01000000000002143488AD7F915816050002134565A8AD715C22040002081E363658 +6C5E94AC7FA5823410657B00370D00658100440D0000000037690060341771E23483A71E5ECC34 +85A514100401105D2A8AE22D46270100030637B3348AC81D1B0700000B0E5CD73482940D070000 +000001105D2A8AE22D46270100030637B3348AC81D1D241771E23483A71E5ECC3485A514100401 +105D2A8AE22D46270100030637B3348AC81D1B0700000000000000000000000000000000000002 +0A1E364D574E3D240D03000000000000000000000005193A53574A2F1103000000000000000000 +0000000003102F4D53543F1B132B47555753555753555753555753555439170400000000000000 +00020D29495355431D07000000000005193A53574A2F11030000000000000000000214585D9FCF +58381100041113202D19222D19222D19222D19222D19263B1E474A1033310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643 +145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C53 +0E33310B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E3331 +0B31310B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B3131 +0B31310B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B3131 +0B31310B3643145C530E33310B31310B31310B31310B3643145C530E33310B31310B31310B3131 +0B343E1C45481B242D19222D19222D19222D19222D192020070A374C98CF69602F040000000000 +02030200000000000000010611160F06000000000000072A78C9DBAA5116020000000002175AB8 +E7D09B9CC5C3A9C1CAA791C2E7CB794468BFEEEECC79290600031B5FBDECEED3822F07062979CC +EEEEB9591602000000000000041F67C3EEECE2B08AA1D7ECE6AE5A1C040000000000072A78C9DB +AA511602000000000005226BC6EEECBF611B030C3E9FE3ECDE96390A00000000011352B5EEEECF +802D07000000021759BBEEECD07E2C07000000000000000000000000072A78C9DBAA5116020000 +0000041D64BEEEEEE6B97747312F4A8FD6ECEEC76D2305072D7FCEEED9955F82CBEEE09A3F0D00 +0000062979CCEEEEB9591602000000000000000005216AC3EEEEECEEEEECEED585310800000000 +000B3E9FE3ECE19C3C0B0000000005226CC4EEEECB81452E2B2B2B2B2B2B2B281D0C020003102B +4A667C94AFCFEDEEE7B35B1B030000000B3E9FE3ECE19C3C0B00000000000000051C539BD9EEDE +AB63260800000000000000000000000214585D9FCF58381100041113202D19222D19222D19222D +19222D19263B1E474A1033310B31310B31310B31310B31310B2E23000000000000000000000D46 +27DED6223B0B00000000000000000000000000000000000000000000000000031C3384CF727A4A +0A010000000000031A5168A8AD7A816033383A32515A311C1C388AAD7F9B6D220D0E1E56917FA8 +AD6A4E1902000004246473A8AD70653E1E201E110A081A5C977FA89C554D39232F39345A714E3B +16134C907FA88B341302062C7379A8A1502A122470A37FA78E4539343B7AA47FA8AA5B310A0005 +1E4191AD7F84400C01000000000000051756937FA89F5A55473C6E977FA89F4F2B0A0621473B3F +301B1E1F22528A7FA897451D4A74004E13003D6B007D3200050D006F880061341771E234726508 +0F492382E2315E4B0505291B75E2347FA01A396B2278E2347F8C0D08010000080B50CC348ABF1C +2B300A16190205291B75E2347FA01A396B2278E2347F8C0D0A1E1771E2347265080F492382E231 +5E4B0505291B75E2347FA01A396B2278E2347F8C0D080100000000122D00745500180300000000 +04142E49575352442E24212020211F1C120701020A171F2023314555574F3F2C22201D130A0F1F +2A29221F1E1E24303F50575346290D050B121617161717171D3047555749321E0F0A162D363228 +25232126303C4D57534D331203020A171F2023314555574F3F2C22201D13080100000000052681 +6A9FB83F2007000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000031C3384CF727A4A0A0100 +000000000000000000000000000000000000000000000001104299D9D289350A00000000000000 +083288D5EEE9E7CB824C6EBEE7E8ECE4A745152B79CBEEECDBA87762719BCFEEECDA933D0E0106 +2979CCEEEEB9591602000000000000041F67C3EEECC56A23194DA0E1EEDFA24F16030001104299 +D9D289350A0000000000000005226BC6EEECBF611B030C3E9FE3ECDE96390C0A1A262B2C3B6FC1 +EEEED79551312B2920110A2570C2ECEEE5B5845F4F505D727B5B24070001104299D9D289350A00 +0000000000042069C1EEEED9954013133879C8EEECEEC76D230500083186D5EEE5D6E6ECE3A144 +0F00000000062979CCEEEEB9591602000000000000000000000000000000000000000000000000 +0000000008338AD7ECEEC9804B322C261A0A0A3182D0EEECD7A06C4E42434E617E9B93521A0D2E +626E5942322A2B3F73BEEDECD07F2C0700000008338AD7ECEEC9804B322C261A0B0E3783CCEEEC +E6B982655B5A5B5B584D32130300000000000526816A9FB83F2007000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000D4627DED6223B0B000000000000000000000000000000000000000000000000000005124BAD +7294851E090000000000000006123B646195A67FA8AD798F723016050A2C5C6199AA7FA59F6A7D +8676A8AD6A4E1902000000051A3371957BA8AD7FA8AD633C0F01091F31668771A1AD7FA8AC7994 +83462D10134C907FA88B341302062C7379A8A150290703163F518DA57FA3995F6F8579A8AA5B31 +0A00051E4191AD7F84400C010000000000000000081F336A8C75A5AD7F9D92574E290901000626 +5E6194A47FA8AD7FA59F65653C10041F4B00924700080E00515C008F73007D700050301771E234 +7265070304073BB0338AD021291303195A216FCF338AE131749B18201000000000000002186525 +79DA348AE23482940D070102195A216FCF338AE131749B18201000021D1771E234726507030407 +3BB0338AD021291303195A216FCF338AE131749B182010000000000000001D4B00C38F00280600 +0000010A23435557535557535557535557534D341203061B415753555753555753555753555236 +1814283F4E5055575355534940311D0C0300000000000000000001092142555744250B0104132C +414D4F55575355564D463B2714060100061B415753555753555753555753555236150400000007 +1656B6728F77190600000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000005124BAD729485 +1E090000000000000000000000000000000000000000000000041D60B7DCBD6820050000000000 +000000011552B5EDECE3A041153185D5EEECCA732506010B2B5F95C0DAE8EEEDDDC9A36D381102 +0000062979CCEEEEB9591602000000000000041F67C3EEECC56A2005052066BAE9EEDB9746161F +60B7DCBD682005000000000000000005226BC6EEECBF611B030C3E9FE3ECDE9639153B97DFEEEC +EEEEECEEEEECEEEEECEEEEBF621C0308235289B6D1E5EEECEEE3C99D5A1F05041D60B7DCBD6820 +05000000000000000002133E7FB5D7EAEEE7DBC6B0B8DDECEEC76D2305000009368FD9ECEEEEE4 +A74A110100000000062979CCEEEEB9591602000000000000000000000000000000000000000000 +0000000000000000082A6AA6D0E6ECEEEEECE19C3C0B010C2B5C8FBAD4E3EEEEECEDE2CFB4843F +120D3681B6D0E2EDECEEEEE8DABD8E521E060000000000082A6AA6D0E6ECEEEEECE19C3F2661BE +EEEEECEEEEECEEEEECEEEEECD98D340900000000071656B6728F77190600000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000D4627DED6223B0B000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000010800687B00763B000D0300000000010000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000832448FC959451C020000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000010F46 +5096C34F3311010000000000000000000000000000000000000000083080CDDA9F491201000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +083080CDDA9F491201000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000083080CDDA9F +491201000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000832448FC959451C020000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000D4727DED6223C0B000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000107004455008E7A009B7F006A2600 +010000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000031647384F4B110500000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000040D31623A3F25050100000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000031647384F4B110500000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000197631E1E12E6615000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000D4627DED6223B0B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000D4627DED6223B0B000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000D4627DED6223B0B000000000000000000000000 +0000000000000000000000000000000002162971C2666133060100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000B02317A04150A00000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000011147A4DDC26920040000 +000000083089D5CD762505000000000000000000000000000000093592DACC7223050000000000 +00000000000000000000000000000000000000000000000000000000000000000000021138666D +4A1B0400000000000000000000021138666D4A1B04000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000D4627DED6223B0B000000000000000000 +00000000000000000000000000000000000005257B679EAD361804000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D4D053D4701 +020000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000041F67C1DDA6491101 +000000000000010A1D2E2D190801000000000000000000000000000000093592DACC7223050000 +000000000000000000000000000000000000000000000000000000000000000000000000000422 +70CCDB93360900000000000000000000042270CCDB933609000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000D4627DED6223B0B000000000000 +00000000000000000000000000000000000000000D216CC67286631204000000000F4E04375A03 +181B00010000000000000000000000000000072A032D5002090300000000000000000000021A03 +4080030E0400000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000009338AD6D3842E +08000000000C3B8DBCC9D4ECF8D37625050000000000010C2E6CACD9EDEDDECBB2A1BEE4CD7223 +050004184883B8D8E5E5E2E1DABF8C4D1A04000F4CB9ECD39FA0B5BECADEE4C98C4213020B3787 +B9C8D0E5FDFFEED6CAC7C7BD9244110C3787B9C8D0E5FDFFEED6CAC7C7BD9244110F43A2DFC86E +2204000000000A3792DCD6832D0700000000000000000000000000000000001254C0F0DAB1ACB1 +B4BAC6CBB47D3D12020E43A2DFC86E2204000000000A3792DCD6832D0700000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000D4627DFDA25542B08232B +143236141C2011181F11181F11181F11181F11161605072C428FCF6E6F3B060000000000010801 +153E03347B05457A04293B010906000000000000000C48054E8A03100500000000000000000000 +000702338A05201200000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000001144FACDEBC +601C03000000000000000000083089D5CD7625050000000004226EC8E8BF6F300E04124499E6FD +D37223081A5AB1D6AB5D24090100062368BFDDA5440E0F4CBAF5E496401001011454BAEAC35E19 +02000000042270CCDB93360900000000000000000000042270CCDB933609000000000000000936 +90D9D07C290600000D409FDFCA7023050000000000000000000000000000000000001254C2F9E8 +9A400F01000A3489D7D6873008093690D9D07C290600000D409FDFCA7023050000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000D4627E2E234E2E2 +34DADA669FCF729FCF729FCF729FCF729FCF729FCF729F9B23113C519CCF635426030000000000 +0000000000000000000418022872064E8D04130700000000000000000000000000000000000000 +0000000005012A82052A1E00000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000052370C8 +DC9D410E0100000000000000000000083089D5CD762505000000000E49B3EAC55D17020000000C +40A4E4CF72231246AEF0F6DAC8C3C3C3C3C3C4CAD7DAB66420134CB9E9B94E10000000072E85D4 +D27F2B06000000042270CCDB93360900000000000000000000042270CCDB933609000000000000 +0000062A7DD1D68A3109114AAADFBD5F1B03000000000000000000000000000000000000001254 +C1EDBB4F10000000000D44ABE6C6611902062A7DD1D68A3109114AAADFBD5F1B03000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000030E082E31 +0B31310B343E1C454C1E282E19222D19222D19222D19222D192020070A374C98CF69602F040000 +0000000000000210011B4A043A8105406C03212B01040100000000000000000000000000000000 +0000000000000005012D8505271A00000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000B39 +93DACE7A2906000000000000000000000000083089D5CD762505000000000E48B2E9C258150100 +00000B3D9FE1CE72231246AEE7C7621A0200000000000000000000000F4CB9E6B4490E00000007 +2C82D3D3822C07000000042270CCDB93360900000000000000000000042270CCDB933609000000 +00000000000004206BC5D99A5161B5DDAE4F130100000000000000000000000000000000000000 +001254C1EFBF5312000000000D46AFE8C7621A020004206BC5D99A5161B5DDAE4F130100000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000031C3384CF727A4A +0A01000000000D4805468705314B02100E00000000000000000000000000072B032E5202090300 +000000000000000000000D023A8A04170A00000000000000000000000000000000000000000000 +00000000000317477F9787551F050000000000000000000317477F9787551F0500000000000002 +1757B4DEB458180200000000000000000000000000083089D5CD7625050000000004216CC5DCA2 +49130200082C7ED8F9D37223081A5AB5E7D082380F020000020E273D3718050F4CB9E6B4490E00 +0000072C82D3D3822C0700000002175DC5EBB851130100000000000000000002175DC5EBB85113 +0100000000000000000002185AB7E9EDF2E4A0420E00000000000000000317477F9787551F0500 +000000001254C2FBF2B05618030212479EE1D989310800000002185AB7E9EDF2E4A0420E000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000005124BAD +7294851E0900000000030E010301000000000000000000000000000000000000000C48054E8A03 +100500000000000000000000052D04436C02070100000000000000000000000000000000000000 +0000000000000000052677D6FEE4903409000000000000000000052677D6FEE490340900000000 +00062879CEDA943A0B00000000000000000002174F9BC2CCCED8EEFFFEE9D5CDCCC093410F010C +2E6CACD4DBCAB8B2B1B1CDEBCE7223050004184680B3D4DFDFDFE2E5E1CFA76826060F4CB9E6B4 +490E000000072C82D3D3822C070000000003184F98CDE0DCD4D1C5994712010000000003184F98 +CDE0DCD4D1C59947120100000000011351B7F2E392370A000000000000000000052677D6FEE490 +340900000000001254C0EDD2A5AEC8D7DFE3DCBB813F13020000000000011351B7F2E392370A00 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +010F465096C34F3311010000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000002011C6C052D2500000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000E409CDCC871240500000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000011044A0E2D4802C070000000000000000000000000000 +000000000000000000001254C0E7AF460D0000000000000000000000000000011044A0E2D4802C +070000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000040D31623A3F25050100000000000000000000000000000000000000000000000000 +0000000000000000000000000000000008011F4002060200000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000001134CA1D5E8E4C587401202000000000000000000000000 +000000000000000000000000001254C0E7AF460D0000000000000000000001134CA1D5E8E4C587 +401202000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000 + +%%PageTrailer +%%Trailer +%%EOF diff --git a/avr-test2/src/cube.h b/avr-test2/src/cube.h new file mode 100644 index 0000000..01f19da --- /dev/null +++ b/avr-test2/src/cube.h @@ -0,0 +1,32 @@ +#ifndef CUBE_H +#define CUBE_H + +// Some of the functions are created to be portable +// These functions will work on cubes of different sizes by +// changing this constant +#define CUBE_SIZE 8 +#define CUBE_BYTES 64 + +// If you change this to anything greather than 8, you also have +// change how the cube buffer works and probably all the functions +// in draw.c + +// Cube buffer +// Data from this array is loaded onto the cube for each duty cycle +extern volatile unsigned char cube[CUBE_SIZE][CUBE_SIZE]; + +// Framebuffer +// Animations that take a lot of time to compute are temporarily +// stored to this array, then loaded into cube[8][8] when the image +// is ready to be displayed +extern volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; + +// Some effects can render on different axis +// for example send pixels along an axis +// for better readability, we use the following predefined constants +#define AXIS_X 0x78 +#define AXIS_Y 0x79 +#define AXIS_Z 0x7a + +#endif + diff --git a/avr-test2/src/draw.cpp b/avr-test2/src/draw.cpp new file mode 100644 index 0000000..faaa346 --- /dev/null +++ b/avr-test2/src/draw.cpp @@ -0,0 +1,559 @@ +#include "draw.h" +#include "string.h" + +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] |= (1 << x); +} + +// Set a single voxel in the temporary cube buffer to ON +void tmpsetvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[z][y] |= (1 << x); +} + +// Set a single voxel to OFF +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] &= ~(1 << x); +} + +// Set a single voxel to OFF +void tmpclrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[z][y] &= ~(1 << x); +} + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[z][y] & (1 << x)) + { + return 1; + } else + { + return 0; + } + } else + { + return 0; + } +} + +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[z][y] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +// This is usefull for functions that uses for loops, +// to avoid infinite loops +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z=0 && z=0 && x=0 && x=0 && y=0 && y> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +// Draw a line between any coordinates in 3d space. +// Uses integer values for input, so dont expect smooth animations. +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + // For each step of x, y increments by: + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + +// Copies the contents of fb (temp cube buffer) into the rendering buffer +void tmp2cube (void) +{ + memcpy((void*)cube, (const void*)fb, 64); // copy the current cube into a buffer. +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < CUBE_SIZE; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + +// Flip the cube 180 degrees along the y axis. +void mirror_y (void) +{ + unsigned char buffer[CUBE_SIZE][CUBE_SIZE]; + unsigned char x,y,z; + + memcpy(buffer, (const void*)cube, CUBE_BYTES); // copy the current cube into a buffer. + + fill(0x00); + for (z=0; z +#include + +#include "cube.h" + +extern const unsigned char font[480]; + +// Red led on D2 +#define LED_RED 0x04 +// Green led D3 +#define LED_GREEN 0x08 +// Program led on D4 +#define LED_PGM 0x10; +// Leds connected to port D +#define LED_PORT PORTD +// Programming button on D5 +#define PGM_BTN 0x20 + +void delay_ms (uint16_t x); + + +void setvoxel(int x, int y, int z); +void clrvoxel(int x, int y, int z); +void tmpsetvoxel(int x, int y, int z); +void tmpclrvoxel(int x, int y, int z); + +unsigned char inrange(int x, int y, int z); +unsigned char getvoxel(int x, int y, int z); +void flpvoxel(int x, int y, int z); + +void altervoxel(int x, int y, int z, int state); +void setplane_z(int z); +void clrplane_z(int z); +void setplane_x(int x); +void clrplane_x(int x); +void setplane_y(int y); +void clrplane_y(int y); + +void setplane (char axis, unsigned char i); +void clrplane (char axis, unsigned char i); + +void setline_z(int x, int y, int z1, int z2); +void setline_x(int z, int y, int x1, int x2); +void setline_y(int z, int x, int y1, int y2); +void clrline_z(int x, int y, int z1, int z2); +void clrline_x(int z, int y, int x1, int x2); +void clrline_y(int z, int x, int y1, int y2); +void fill(unsigned char pattern); +void tmpfill(unsigned char pattern); +void line(int x1, int y1, int z1, int x2, int y2, int z2); +void drawchar(char chr, int offset, int layer); +char flipbyte(char byte); +void charfly (char chr, int direction, char axis, int mode, uint16_t delay); +void strfly (char * str, int direction, char axis, int mode, uint16_t delay, uint16_t pause); +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2); +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2); +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2); +char byteline (int start, int end); + +void tmp2cube (void); +void shift (char axis, int direction); + +void mirror_x(void); +void mirror_y(void); +void mirror_z(void); + +#endif + diff --git a/avr-test2/src/effect.cpp b/avr-test2/src/effect.cpp new file mode 100644 index 0000000..d44da4d --- /dev/null +++ b/avr-test2/src/effect.cpp @@ -0,0 +1,1331 @@ +#include "effect.h" +#include "draw.h" +#include "font.h" +#include +#include + +void effect_test (void) +{ + + int x,y,i; + + for (i=0;i<1000;i++) + { + x = sin(i/8)*2+3.5; + y = cos(i/8)*2+3.5; + + setvoxel(x,y,1); + setvoxel(x,y,1); + delay_ms(1000); + fill(0x00); + } + +} + + +void effect_stringfly2(const char * str) +{ + int x,y,i; + unsigned char chr[5]; + + while (*str) + { + font_getchar(*str++, chr); + + // Put a character on the back of the cube + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + setvoxel(7,x+2,y); + } + } + } + + // Shift the entire contents of the cube forward by 6 steps + // before placing the next character + for (i = 0; i<6; i++) + { + delay_ms(1000); + shift(AXIS_X,-1); + } + } + // Shift the last character out of the cube. + for (i = 0; i<8; i++) + { + delay_ms(1000); + shift(AXIS_X,-1); + } + +} + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay) +{ + int x, i, xyz; + for (x=0;x 7) + xyz = i-8; // at i > 7, i 8-15 becomes xyz 0-7. + + fill(0x00); delay_ms(1); + cli(); // disable interrupts while the cube is being rotated + box_wireframe(0,0,0,xyz,xyz,xyz); + + if (flip > 0) // upside-down + mirror_z(); + + if (rot == 1 || rot == 3) + mirror_y(); + + if (rot == 2 || rot == 3) + mirror_x(); + + sei(); // enable interrupts + delay_ms(delay); + fill(0x00); + } + } +} + +// Creates a wireframe box that shrinks or grows out from the center of the cube. +void effect_box_woopwoop (int delay, int grow) +{ + int i,ii; + + fill(0x00); + for (i=0;i<4;i++) + { + ii = i; + if (grow > 0) + ii = 3-i; + + box_wireframe(4+ii,4+ii,4+ii,3-ii,3-ii,3-ii); + delay_ms(delay); + fill(0x00); + } +} + + +// Send a voxel flying from one side of the cube to the other +// If its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + } else + { + ii = i; + clrvoxel(x,y,ii-1); + } + setvoxel(x,y,ii); + delay_ms(delay); + } +} + +// Send all the voxels from one side of the cube to the other +// Start at z and send to the opposite side. +// Sends in random order. +void sendplane_rand_z (unsigned char z, int delay, int wait) +{ + unsigned char loop = 16; + unsigned char x, y; + + fill(0x00); + + setplane_z(z); + + // Send voxels at random untill all 16 have crossed the cube. + while(loop) + { + x = rand()%4; + y = rand()%4; + if (getvoxel(x,y,z)) + { + // Send the voxel flying + sendvoxel_z(x,y,z,delay); + delay_ms(wait); + loop--; // one down, loop-- to go. when this hits 0, the loop exits. + } + } +} + +// For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 +// for n iterations, a random voxel is sent to the opposite side of where it was. +void sendvoxels_rand_z (int iterations, int delay, int wait) +{ + unsigned char x, y, last_x = 0, last_y = 0, i; + + fill(0x00); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + // Then set a voxel either at the top or at the bottom + // rand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. + setvoxel(x,y,((rand()%2)*7)); + } + } + + for (i=0;i=0;i--) + { + snake[i][0] = snake[i-1][0]; + snake[i][1] = snake[i-1][1]; + snake[i][2] = snake[i-1][2]; + } + snake[0][0] = x; + snake[0][1] = y; + snake[0][2] = z; + + for (i=0;i<8;i++) + { + setvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + delay_ms(delay); + for (i=0;i<8;i++) + { + clrvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + } + + + iterations--; + } +} + +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;iidestinations[px]) + { + positions[px]--; + } + } + + draw_positions_axis (AXIS_Z, positions,0); +} + +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert) +{ + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,px; + + // Set 64 random positions + for (i=0; i<64; i++) + { + positions[i] = 0; // Set all starting positions to 0 + destinations[i] = rand()%8; + } + + // Loop 8 times to allow destination 7 to reach all the way + for (i=0; i<8; i++) + { + // For every iteration, move all position one step closer to their destination + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + LED_PORT ^= LED_RED; + } + +} + + + + +// Light all leds layer by layer, +// then unset layer by layer +void effect_loadbar(int delay) +{ + fill(0x00); + + int z,y; + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0xff; + + delay_ms(delay); + } + + delay_ms(delay*3); + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0x00; + + delay_ms(delay); + } +} + + +// Set n number of voxels at random positions +void effect_random_sparkle_flash (int iterations, int voxels, int delay) +{ + int i; + int v; + for (i = 0; i < iterations; i++) + { + for (v=0;v<=voxels;v++) + setvoxel(rand()%8,rand()%8,rand()%8); + + delay_ms(delay); + fill(0x00); + } +} + +// blink 1 random voxel, blink 2 random voxels..... blink 20 random voxels +// and back to 1 again. +void effect_random_sparkle (void) +{ + int i; + + for (i=1;i<20;i++) + { + effect_random_sparkle_flash(5,i,200); + } + + for (i=20;i>=1;i--) + { + effect_random_sparkle_flash(5,i,200); + } + +} + +int effect_telcstairs_do(int x, int val, int delay) +{ + int y,z; + + for(y = 0, z = x; y <= z; y++, x--) + { + if(x < CUBE_SIZE && y < CUBE_SIZE) + { + cube[x][y] = val; + } + } + delay_ms(delay); + return z; +} + +void effect_telcstairs (int invert, int delay, int val) +{ + int x; + + if(invert) + { + for(x = CUBE_SIZE*2; x >= 0; x--) + { + x = effect_telcstairs_do(x,val,delay); + } + } + else + { + for(x = 0; x < CUBE_SIZE*2; x++) + { + x = effect_telcstairs_do(x,val,delay); + } + } +} + +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) +{ + int x, y, i,j,k, dx, dy; + int cube_size; + int origin = 0; + + if (direction == -1) + origin = 7; + + cube_size = 8-(size-1); + + x = rand()%cube_size; + y = rand()%cube_size; + + for (i=0; i 0 && (x+dx) < cube_size) + x += dx; + + if ((y+dy) > 0 && (y+dy) < cube_size) + y += dy; + + shift(axis, direction); + + + for (j=0; j=1;i--) + { + for (z=0;z<8;z++) + { + + state = getvoxel(((path[(i-1)]>>4) & 0x0f), (path[(i-1)] & 0x0f), z); + altervoxel(((path[i]>>4) & 0x0f), (path[i] & 0x0f), z, state); + } + } + for (i=0;i<8;i++) + clrvoxel(((path[0]>>4) & 0x0f), (path[0] & 0x0f),i); +} + +void effect_rand_patharound (int iterations, int delay) +{ + int z, dz, i; + z = 4; + unsigned char path[28]; + + font_getpath(0,path,28); + + for (i = 0; i < iterations; i++) + { + dz = ((rand()%3)-1); + z += dz; + + if (z>7) + z = 7; + + if (z<0) + z = 0; + + effect_pathmove(path, 28); + setvoxel(0,7,z); + delay_ms(delay); + } +} + +void effect_pathspiral (int iterations, int delay) +{ + int z, i; + z = 4; + unsigned char path[16]; + + font_getpath(1,path,16); + + for (i = 0; i < iterations; i++) + { + setvoxel(4,0,i%8); + delay_ms(delay); + effect_pathmove(path, 28); + + } +} + +void effect_path_text (int delay, char *str) +{ + int z, i,ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + unsigned char chr[5]; + unsigned char stripe; + + while (*str) + { + //charfly(*str++, direction, axis, mode, delay); + + + font_getchar(*str++, chr); + + for (ii=0;ii<5;ii++) + { + //stripe = pgm_read_byte(&font[(chr*5)+ii]); + stripe = chr[ii]; + + for (z=0;z<8;z++) + { + if ((stripe>>(7-z)) & 0x01) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + effect_pathmove(path, 28); + delay_ms(delay); + } + + effect_pathmove(path, 28); + delay_ms(delay); + } + for (i=0;i<28;i++) + { + effect_pathmove(path, 28); + delay_ms(delay); + } +} + +void effect_path_bitmap (int delay, char bitmap, int iterations) +{ + int z, i, ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + for (i=0; i < iterations; i++) + { + for (ii=0;ii<8;ii++) + { + for (z=0;z<8;z++) + { + if (font_getbitmappixel(bitmap,(7-z),ii)) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + delay_ms(delay); + effect_pathmove(path, 28); + } + + for (ii=0;ii<20;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } + } + for (ii=0;ii<10;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } +} + + + diff --git a/avr-test2/src/effect.h b/avr-test2/src/effect.h new file mode 100644 index 0000000..2622acc --- /dev/null +++ b/avr-test2/src/effect.h @@ -0,0 +1,54 @@ +#ifndef EFFECT_H +#define EFFECT_H + +#include +#include +#include + +#include "cube.h" + +void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay); + +void effect_hollow_1 (int iterations, uint16_t delay); +void effect_hollow_2 (int iterations, int corner, uint16_t delay); + +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay); +void sendplane_rand_z (unsigned char z, int delay, int wait); +void sendvoxels_rand_z (int iterations, int delay, int wait); +void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode); + +void effect_planboing (int plane, int speed); + +void effect_random_filler (int delay, int state); + +void effect_z_updown (int iterations, int delay); +void effect_rain(int iterations); +void effect_stringfly2(const char * str); +void effect_blinky2(void); +void draw_positions_axis (char axis, unsigned char positions[64], int invert); +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert); + +void effect_random_sparkle_flash (int iterations, int voxels, int delay); +void effect_random_sparkle (void); + +void effect_box_woopwoop (int delay, int grow); +void effect_telcstairs (int invert, int delay, int val); +void effect_loadbar(int delay); + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode); +void effect_smileyspin (int count, int delay, char bitmap); +void effect_pathmove (unsigned char *path, int length); +void effect_rand_patharound (int iterations, int delay); +void effect_pathspiral (int iterations, int delay); +void effect_path_text (int delay, char *str); +void effect_path_bitmap (int delay, char bitmap, int iterations); +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay); + +void effect_z_updown (int iterations, int delay); +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis); + + + + +#endif + diff --git a/avr-test2/src/font.cpp b/avr-test2/src/font.cpp new file mode 100644 index 0000000..ffb5185 --- /dev/null +++ b/avr-test2/src/font.cpp @@ -0,0 +1,104 @@ +#include "font.h" +#include + +volatile const unsigned char font[455] EEMEM = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] EEMEM = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] /* PROGMEM */ = {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + for (i = 0; i < length; i++) + destination[i] = pgm_read_byte(&paths[i+offset]); +} + +void font_getchar (char chr, unsigned char dst[5]) +{ + uint8_t i; + chr -= 32; // our bitmap font starts at ascii char 32. + + for (i = 0; i < 5; i++) + dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&font[(chr*5)+i]); +} + +void font_getbitmap (char bitmap, unsigned char dst[8]) +{ + int i; + + for (i = 0; i < 8; i++) + dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&bitmaps[(uint8_t)bitmap][(uint8_t)i]); + +} + +unsigned char font_getbitmappixel ( char bitmap, char x, char y) +{ + uint8_t tmp = eeprom_read_byte((uint8_t*)&bitmaps[(uint8_t)bitmap][(uint8_t)x]); + return (tmp >> y) & 0x01; +} + + + + diff --git a/avr-test2/src/font.h b/avr-test2/src/font.h new file mode 100644 index 0000000..006414b --- /dev/null +++ b/avr-test2/src/font.h @@ -0,0 +1,13 @@ +#ifndef FONT_H +#define FONT_H + +#include + +void font_getchar (char chr, unsigned char dst[5]); +void font_getpath (unsigned char path, unsigned char *destination, int length); +void font_getbitmap (char bitmap, unsigned char dst[8]); +unsigned char font_getbitmappixel ( char bitmap, char x, char y); + + + +#endif diff --git a/avr-test2/src/fuses.txt b/avr-test2/src/fuses.txt new file mode 100644 index 0000000..f24e5f5 --- /dev/null +++ b/avr-test2/src/fuses.txt @@ -0,0 +1,6 @@ + +lfuse: 0b11101111 +hfuse: 0b11001001 + + + diff --git a/avr-test2/src/gameoflife.cpp b/avr-test2/src/gameoflife.cpp new file mode 100644 index 0000000..0a3683a --- /dev/null +++ b/avr-test2/src/gameoflife.cpp @@ -0,0 +1,135 @@ +#include +#include "gameoflife.h" +#include "cube.h" +#include "draw.h" + +// Game of Life for the 4x4x4 and 8x8x8 led cube + +#define GOL_CREATE_MIN 3 +#define GOL_CREATE_MAX 3 + +#define GOL_TERMINATE_LONELY 1 +#define GOL_TERMINATE_CROWDED 4 + +#define GOL_X 8 +#define GOL_Y 8 +#define GOL_Z 8 + +#define GOL_WRAP 0x01 + + + +void gol_play (int iterations, uint16_t delay) +{ + int i; + + for (i = 0; i < iterations; i++) + { + LED_PORT ^= LED_GREEN; + + gol_nextgen(); + + if (gol_count_changes() == 0) + return; + + tmp2cube(); + + delay_ms(delay); + + //led_red(1); + } +} + +void gol_nextgen (void) +{ + int x,y,z; + unsigned char neigh; + + tmpfill(0x00); + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + for (z = 0; z < GOL_Z; z++) + { + neigh = gol_count_neighbors(x, y, z); + + // Current voxel is alive. + if (getvoxel(x,y,z) == 0x01) + { + if (neigh <= GOL_TERMINATE_LONELY) + { + tmpclrvoxel(x,y,z); + } else if(neigh >= GOL_TERMINATE_CROWDED) + { + tmpclrvoxel(x,y,z); + } else + { + tmpsetvoxel(x,y,z); + } + // Current voxel is dead. + } else + { + if (neigh >= GOL_CREATE_MIN && neigh <= GOL_CREATE_MAX) + tmpsetvoxel(x,y,z); + } + } + } + } +} + +unsigned char gol_count_neighbors (int x, int y, int z) +{ + int ix, iy, iz; // offset 1 in each direction in each dimension + int nx, ny, nz; // neighbours address. + + unsigned char neigh = 0; // number of alive neighbours. + + for (ix = -1; ix < 2; ix++) + { + for (iy = -1; iy < 2; iy++) + { + for (iz = -1; iz < 2; iz++) + { + // Your not your own neighbour, exclude 0,0,0, offset. + if ( !(ix == 0 && iy == 0 && iz == 0) ) + { + if (GOL_WRAP == 0x01) + { + nx = (x+ix)%GOL_X; + ny = (y+iy)%GOL_Y; + nz = (z+iz)%GOL_Z; + } else + { + nx = x+ix; + ny = y+iy; + nz = z+iz; + } + + if ( getvoxel(nx, ny, nz) ) + neigh++; + } + } + } + } + return neigh; +} + +int gol_count_changes (void) +{ + int x,y; + int i = 0; + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + if (fb[x][y] != cube[x][y]) + i++; + } + } + + return i; +} + diff --git a/avr-test2/src/gameoflife.h b/avr-test2/src/gameoflife.h new file mode 100644 index 0000000..e53b900 --- /dev/null +++ b/avr-test2/src/gameoflife.h @@ -0,0 +1,9 @@ +#ifndef GOL_H +#define GOL_H + +void gol_play (int iterations, uint16_t delay); +unsigned char gol_count_neighbors (int x, int y, int z); +void gol_nextgen (void); +int gol_count_changes (void); + +#endif diff --git a/avr-test2/src/launch_effect.cpp b/avr-test2/src/launch_effect.cpp new file mode 100644 index 0000000..19b8d86 --- /dev/null +++ b/avr-test2/src/launch_effect.cpp @@ -0,0 +1,182 @@ +#include "launch_effect.h" +#include "effect.h" +#include "draw.h" +#include "gameoflife.h" + +void launch_effect (int effect) +{ + int i; + unsigned char ii; + + fill(0x00); + + switch (effect) + { + case 0x00: + //effect_rain(100); + break; + + + case 1: + //sendvoxels_rand_z(20,220,2000); + break; + + case 2: + //effect_random_filler(5,1); + //effect_random_filler(5,0); + //effect_random_filler(5,1); + //effect_random_filler(5,0); + break; + + case 3: + //effect_z_updown(20,1000); + break; + + case 4: + effect_wormsqueeze (2, AXIS_Z, -1, 100, 1000); + break; + + case 5: + //effect_blinky2(); + break; + + case 6: + for (ii=0;ii<8;ii++) + { + effect_box_shrink_grow (1, ii%4, ii & 0x04, 450); + } + + effect_box_woopwoop(800,0); + effect_box_woopwoop(800,1); + effect_box_woopwoop(800,0); + effect_box_woopwoop(800,1); + break; + + case 7: + //effect_planboing (AXIS_Z, 400); + //effect_planboing (AXIS_X, 400); + //effect_planboing (AXIS_Y, 400); + //effect_planboing (AXIS_Z, 400); + //effect_planboing (AXIS_X, 400); + //effect_planboing (AXIS_Y, 400); + //fill(0x00); + break; + + case 8: + fill(0x00); + effect_telcstairs(0,800,0xff); + effect_telcstairs(0,800,0x00); + effect_telcstairs(1,800,0xff); + effect_telcstairs(1,800,0xff); + break; + + case 9: + //effect_axis_updown_randsuspend(AXIS_Z, 550,5000,0); + //effect_axis_updown_randsuspend(AXIS_Z, 550,5000,1); + //effect_axis_updown_randsuspend(AXIS_Z, 550,5000,0); + //effect_axis_updown_randsuspend(AXIS_Z, 550,5000,1); + //effect_axis_updown_randsuspend(AXIS_X, 550,5000,0); + //effect_axis_updown_randsuspend(AXIS_X, 550,5000,1); + //effect_axis_updown_randsuspend(AXIS_Y, 550,5000,0); + //effect_axis_updown_randsuspend(AXIS_Y, 550,5000,1); + break; + + case 10: + //effect_loadbar(700); + break; + + case 11: + //effect_wormsqueeze (1, AXIS_Z, 1, 100, 1000); + break; + + + case 12: + effect_stringfly2("INSTRUCTABLES"); + break; + + case 13: + //fill(0x00); + //// Create a random starting point for the Game of Life effect. + //for (i = 0; i < 20;i++) + //{ + // setvoxel(rand()%4,rand()%4,rand()%4); + //} + + //gol_play(20, 400); + break; + + case 14: + //effect_boxside_randsend_parallel (AXIS_Z, 0 , 200,1); + //delay_ms(1500); + //effect_boxside_randsend_parallel (AXIS_Z, 1 , 200,1); + //delay_ms(1500); + + //effect_boxside_randsend_parallel (AXIS_Z, 0 , 200,2); + //delay_ms(1500); + //effect_boxside_randsend_parallel (AXIS_Z, 1 , 200,2); + //delay_ms(1500); + + //effect_boxside_randsend_parallel (AXIS_Y, 0 , 200,1); + //delay_ms(1500); + //effect_boxside_randsend_parallel (AXIS_Y, 1 , 200,1); + //delay_ms(1500); + break; + + case 15: + boingboing(250, 600, 0x01, 0x02); + break; + + case 16: + //effect_smileyspin(2,1000,0); + break; + + case 17: + //effect_pathspiral(100,500); + break; + + case 18: + //effect_path_bitmap(700,2,3); + break; + + case 19: + //effect_smileyspin(2,1000,1); + break; + + case 20: + effect_path_text(1000,"TG"); + break; + + case 21: + effect_rand_patharound(200,500); + break; + + case 22: + effect_wormsqueeze (1, AXIS_Z, -1, 100, 1000); + break; + + case 23: + effect_smileyspin(2,1000,2); + break; + + case 24: + effect_random_sparkle(); + break; + + case 25: + effect_wormsqueeze (1, AXIS_Z, -1, 100, 1000); + break; + + case 26: + boingboing(250, 600, 0x01, 0x03); + break; + + // In case the effect number is out of range: + default: + effect_stringfly2("FAIL"); + break; + + + + } +} + diff --git a/avr-test2/src/launch_effect.h b/avr-test2/src/launch_effect.h new file mode 100644 index 0000000..072822a --- /dev/null +++ b/avr-test2/src/launch_effect.h @@ -0,0 +1,15 @@ +#ifndef LAUNCH_H +#define LAUNCH_H + +#include "cube.h" + +// Total number of effects +// Used in the main loop to loop through all the effects one by bone. +// Set this number one higher than the highest number inside switch() +// in launch_effect() in launch_effect.c +#define EFFECTS_TOTAL 27 + +void launch_effect (int effect); + +#endif + diff --git a/avr-test2/src/lisence.txt b/avr-test2/src/lisence.txt new file mode 100644 index 0000000..812dab5 --- /dev/null +++ b/avr-test2/src/lisence.txt @@ -0,0 +1,5 @@ +Created by Christian Moen (christian@lynet.no) and StÃ¥le Kristoffersen (staalekb@ifi.uio.no) 2011. + +Lisence: http://creativecommons.org/licenses/by-nc-sa/3.0/ + +Happy hacking!! :D diff --git a/avr-test2/src/main.cpp b/avr-test2/src/main.cpp new file mode 100644 index 0000000..dfebb37 --- /dev/null +++ b/avr-test2/src/main.cpp @@ -0,0 +1,450 @@ +/* (c) copyright N.C. 2011 + * vim: ts=2 sw=2 et ai + */ + +// ATMEL ATMEGA8 +// +// +-\/-+ +// (RESET) PC6 1| |28 PC5 (ADC5/SCL) +// (RXD) PD0 2| |27 PC4 (ADC4/SDA) +// (TXD) PD1 3| |26 PC3 (ADC3) +// (INT0) PD2 4| |25 PC2 (ADC2) +// (INT1) PD3 5| |24 PC1 (ADC1) +// (XCK/T0) PD4 6| |23 PC0 (ADC0) +// VCC 7| |22 GND +// GND 8| |21 AREF +// (XTAL1/TOSC1) PB6 9| |20 AVCC +// (XTAL2/TOSC2) PB7 10| |19 PB5 (SCK) +// (T1) PD5 11| |18 PB4 (MISO) +// (AIN0) PD6 12| |17 PB3 (MOSI/OC2) +// (AIN1) PD7 13| |16 PB2 (SS/OC1B) +// (ICP1) PB0 14| |15 PB1 (OC1A) +// +----+ + +extern "C" { +#include +#include + +#include // rand + + +#include "main.h" +#include "effect.h" +#include "launch_effect.h" +//#include "draw.h" + +} + +//int myrand() { return rand(); } + +#define CUBE_SIZE 8 + +//#define AXIS_X 1 +//#define AXIS_Y 2 +//#define AXIS_Z 3 + +volatile unsigned char cube[8][8]; +//volatile unsigned char current_layer = 0; +extern volatile unsigned char current_layer; +volatile bool in_wait = false; + +volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; +/***************************************************************************** + * TIME MANAGEMENT + *****************************************************************************/ + +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) +#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) + +// the prescaler is set so that timer0 ticks every 64 clock cycles, and the +// the overflow handler is called every 256 ticks. +#define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(64 * 256)) + +// the whole number of milliseconds per timer0 overflow +#define MILLIS_INC (MICROSECONDS_PER_TIMER0_OVERFLOW / 1000) + +// the fractional number of milliseconds per timer0 overflow. we shift right +// by three to fit these numbers into a byte. (for the clock speeds we care +// about - 8 and 16 MHz - this doesn't lose precision.) +#define FRACT_INC ((MICROSECONDS_PER_TIMER0_OVERFLOW % 1000) >> 3) +#define FRACT_MAX (1000 >> 3) + +//volatile uint32_t timer0_overflow_count = 0; +volatile uint32_t timer0_millis = 0; +//static uint8_t timer0_fract = 0; + + +ISR(TIMER0_OVF_vect) +{ + // copy these to local variables so they can be stored in registers + // (volatile variables must be read from memory on every access) + uint32_t m = timer0_millis; + //uint8_t f = timer0_fract; + static uint8_t timer0_fract = 0; + + m += MILLIS_INC; + //f += FRACT_INC; + timer0_fract += FRACT_INC; + //if (f >= FRACT_MAX) { + if (timer0_fract >= FRACT_MAX) { + //f -= FRACT_MAX; + timer0_fract -= FRACT_MAX; + ++m; + } + + //timer0_fract = f; + timer0_millis = m; + //timer0_overflow_count++; + +//static uint32_t last_time = 0; + //if (timer0_overflow_count & 0x1) + //if (m - last_time >= 5) { + //debounce_keys(); // called nearly each 2ms (0,002048s) + //last_time = m; + //} +} + +/* +inline uint32_t millis() +{ + uint32_t m; + uint8_t oldSREG = SREG; + + // disable interrupts while we read timer0_millis or we might get an + // inconsistent value (e.g. in the middle of a write to timer0_millis) + cli(); + m = timer0_millis; + SREG = oldSREG; + + return m; +} +*/ + +inline uint32_t millis() +{ + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + uint32_t time1 = millis(); + while ((millis()) - time1 < ms); + in_wait = false; +} +//void delay_ms(uint16_t x) +//{ +// in_wait = true; +// uint8_t y, z; +// for ( ; x > 0 ; x--){ +// for ( y = 0 ; y < 90 ; y++){ +// for ( z = 0 ; z < 6 ; z++){ +// asm volatile ("nop"); +// } +// } +// } +// in_wait = false; +//} + + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z); +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +{ + + if (!inrange(x, y, z)) { + return; + } + + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + cube[y][z] |= ((unsigned char)1) << x; + } + else { + cube[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() +{ + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0; + } + } +} + +/***************************************************************************** + * RENDER + *****************************************************************************/ + +ISR(TIMER2_COMP_vect) +{ + PORTD &= ~0x08; // layer down, should be done before latch + PORTD &= ~0x20; // latch low + unsigned char current_layer_ = current_layer; + for (unsigned char j = 0; j < 8; ++j) { + unsigned char val = cube[j][current_layer_]; + PORTD &= ~0x10; + PORTC = val; + PORTD = (PORTD & ~0xC0) | (val & 0xC0); + PORTD |= 0x10; + } + PORTB = (PORTB & ~0x07) | current_layer_; + PORTD |= 0x20; + ++current_layer_; + current_layer = current_layer_ & 0x07; + PORTD |= 0x08; // layer, should be done in the end and must be after latch +} + +void tmp2cube (void); +// Take input from a computer and load it onto the cube buffer +void rs232(void) +{ + int tempval; + int x = 0; + int y = 0; + int escape = 0; + + while (1) + { + // Switch state on red LED for debugging + // Should switch state every time the code + // is waiting for a byte to be received. + //LED_PORT ^= LED_RED; + + // Wait until a byte has been received + while ( !(UCSRA & (1<> 8; + //UBRRL = BAUD_PRESCALE; + //// UCSRC - USART control register + //// bit 7-6 sync/ascyn 00 = async, 01 = sync + //// bit 5-4 parity 00 = disabled + //// bit 3 stop bits 0 = 1 bit 1 = 2 bits + //// bit 2-1 frame length 11 = 8 + //// bit 0 clock polarity = 0 + ////UCSRC = 0b10000110; + //// Enable RS232, tx and rx + //UCSRB = (1<>8); + UBRRL = (uint8_t)(BAUD_PRESCALLER); + //UBRRH = (uint8_t)(0); + //UBRRL = (uint8_t)(0); + UCSRC = (1< +#include + +#include // rand + + +#include "main.h" +#include "effect.h" +#include "launch_effect.h" +//#include "draw.h" + +} + +//int myrand() { return rand(); } + +#define CUBE_SIZE 8 + +//#define AXIS_X 1 +//#define AXIS_Y 2 +//#define AXIS_Z 3 + +volatile unsigned char cube[8][8]; +//volatile unsigned char current_layer = 0; +extern volatile unsigned char current_layer; +volatile bool in_wait = false; + +volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; +/***************************************************************************** + * TIME MANAGEMENT + *****************************************************************************/ + +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) +#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() ) + +// the prescaler is set so that timer0 ticks every 64 clock cycles, and the +// the overflow handler is called every 256 ticks. +#define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(64 * 256)) + +// the whole number of milliseconds per timer0 overflow +#define MILLIS_INC (MICROSECONDS_PER_TIMER0_OVERFLOW / 1000) + +// the fractional number of milliseconds per timer0 overflow. we shift right +// by three to fit these numbers into a byte. (for the clock speeds we care +// about - 8 and 16 MHz - this doesn't lose precision.) +#define FRACT_INC ((MICROSECONDS_PER_TIMER0_OVERFLOW % 1000) >> 3) +#define FRACT_MAX (1000 >> 3) + +//volatile uint32_t timer0_overflow_count = 0; +volatile uint32_t timer0_millis = 0; +//static uint8_t timer0_fract = 0; + + +ISR(TIMER0_OVF_vect) +{ + // copy these to local variables so they can be stored in registers + // (volatile variables must be read from memory on every access) + uint32_t m = timer0_millis; + //uint8_t f = timer0_fract; + static uint8_t timer0_fract = 0; + + m += MILLIS_INC; + //f += FRACT_INC; + timer0_fract += FRACT_INC; + //if (f >= FRACT_MAX) { + if (timer0_fract >= FRACT_MAX) { + //f -= FRACT_MAX; + timer0_fract -= FRACT_MAX; + ++m; + } + + //timer0_fract = f; + timer0_millis = m; + //timer0_overflow_count++; + +//static uint32_t last_time = 0; + //if (timer0_overflow_count & 0x1) + //if (m - last_time >= 5) { + //debounce_keys(); // called nearly each 2ms (0,002048s) + //last_time = m; + //} +} + +/* +inline uint32_t millis() +{ + uint32_t m; + uint8_t oldSREG = SREG; + + // disable interrupts while we read timer0_millis or we might get an + // inconsistent value (e.g. in the middle of a write to timer0_millis) + cli(); + m = timer0_millis; + SREG = oldSREG; + + return m; +} +*/ + +inline uint32_t millis() +{ + return timer0_millis; +} + +void delay(uint32_t ms) +{ + in_wait = true; + uint32_t time1 = millis(); + while ((millis()) - time1 < ms); + in_wait = false; +} +//void delay_ms(uint16_t x) +//{ +// in_wait = true; +// uint8_t y, z; +// for ( ; x > 0 ; x--){ +// for ( y = 0 ; y < 90 ; y++){ +// for ( z = 0 ; z < 6 ; z++){ +// asm volatile ("nop"); +// } +// } +// } +// in_wait = false; +//} + + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z); +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +{ + + if (!inrange(x, y, z)) { + return; + } + + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + cube[y][z] |= ((unsigned char)1) << x; + } + else { + cube[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() +{ + for (unsigned char z = 0; z < 8; ++z) { + for (unsigned char y = 0; y < 8; ++y) { + cube[y][z] = 0; + } + } +} + +/***************************************************************************** + * RENDER + *****************************************************************************/ + +ISR(TIMER2_COMP_vect) +{ + //if (!in_wait) return; + PORTD &= ~0x20; // layer and latch low + unsigned char current_layer_ = current_layer; + for (unsigned char j = 0; j < 8; ++j) { + //for (char j = 0; j < 4; ++j) { + unsigned char val = cube[j][current_layer_]; + PORTD &= ~0x10; + PORTC = val; + PORTD = (PORTD & ~0xC0) | (val & 0xC0); + PORTD |= 0x10; + } + PORTB = (PORTB & ~0x07) | current_layer_; + PORTD |= 0x20; + ++current_layer_; + current_layer = current_layer_ & 0x07; + //if (current_layer_ > 7) current_layer_ = 0; + //current_layer = current_layer_; + //PORTC |= 0x28; // layer and latch high +} + +void tmp2cube (void); +// Take input from a computer and load it onto the cube buffer +void rs232(void) +{ + int tempval; + int x = 0; + int y = 0; + int escape = 0; + + while (1) + { + // Switch state on red LED for debugging + // Should switch state every time the code + // is waiting for a byte to be received. + //LED_PORT ^= LED_RED; + + // Wait until a byte has been received + while ( !(UCSRA & (1<> 8; + //UBRRL = BAUD_PRESCALE; + //// UCSRC - USART control register + //// bit 7-6 sync/ascyn 00 = async, 01 = sync + //// bit 5-4 parity 00 = disabled + //// bit 3 stop bits 0 = 1 bit 1 = 2 bits + //// bit 2-1 frame length 11 = 8 + //// bit 0 clock polarity = 0 + ////UCSRC = 0b10000110; + //// Enable RS232, tx and rx + //UCSRB = (1<>8); + UBRRL = (uint8_t)(BAUD_PRESCALLER); + UCSRC = (1< +#include +#include +#include + +#include "cube.h" + +// Define USART stuff +//#define FOSC 14745600 +#define FOSC 16000000 +#define BAUD 38400 +#define MYUBRR (((((FOSC * 10) / (16L * BAUD)) + 5) / 10) - 1) + +#define DATA_BUS PORTA +#define LAYER_SELECT PORTC +#define LATCH_ADDR PORTB +#define LATCH_MASK 0x07 +#define LATCH_MASK_INV 0xf8 +#define OE_PORT PORTB +#define OE_MASK 0x08 + +// Red led on D2 +#define LED_RED 0x04 +// Green led D3 +#define LED_GREEN 0x08 +// Program led on D4 +#define LED_PGM 0x10; +// Leds connected to port D +#define LED_PORT PORTD +// Rs232 button on D5 +#define RS232_BTN 0x20 +// Main button on B4 +#define MAIN_BTN 0x10 + +void ioinit (void); +void bootmsg (void); + +volatile unsigned char current_layer; +volatile unsigned char pgm_mode; +void rs232(void); +unsigned int bootwait (void); +#endif + diff --git a/avr-test2/tags b/avr-test2/tags new file mode 100644 index 0000000..9266c01 --- /dev/null +++ b/avr-test2/tags @@ -0,0 +1,213 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +-mcu Makefile /^ avr-size --mcu=$(MCU_TARGET) -C $(PRG).elf$/;" m +AXIS_X src/cube.h 27;" d +AXIS_Y src/cube.h 28;" d +AXIS_Z src/cube.h 29;" d +BAUD src/main.h 18;" d +BAUDRATE src/main.cpp 356;" d file: +BAUDRATE src/main.cpp 364;" d file: +BAUD_PRESCALLER src/main.cpp 357;" d file: +BAUD_PRESCALLER src/main.cpp 365;" d file: +CC Makefile /^CC = avr-gcc$/;" m +CUBE_BYTES src/cube.h 8;" d +CUBE_H src/cube.h 2;" d +CUBE_SIZE src/cube.h 7;" d +CUBE_SIZE src/main.cpp 40;" d file: +CXX Makefile /^CXX = avr-g++$/;" m +DATA_BUS src/main.h 21;" d +DEFS Makefile /^DEFS = -ffunction-sections$/;" m +DFLAGS Makefile /^override LDFLAGS = -Wl,-Map,$(PRG).map --relax$/;" m +DRAW_H src/draw.h 2;" d +EEMEM src/font.cpp /^volatile const unsigned char bitmaps[6][8] EEMEM = {$/;" v +EEMEM src/font.cpp /^volatile const unsigned char font[455] EEMEM = {$/;" v +EFFECT_H src/effect.h 2;" d +EXTRA_CLEAN_FILES Makefile /^EXTRA_CLEAN_FILES = *.hex *.bin *.srec$/;" m +FIG2DEV Makefile /^FIG2DEV = fig2dev$/;" m +FLAGS Makefile /^override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) #-fno-exceptions -fno-rtti$/;" m +FOSC src/main.h 17;" d +FRACT_INC src/main.cpp 70;" d file: +FRACT_MAX src/main.cpp 71;" d file: +ISR src/main.cpp /^ISR(TIMER0_OVF_vect)$/;" f +ISR src/main.cpp /^ISR(TIMER2_COMP_vect)$/;" f +LATCH_ADDR src/main.h 23;" d +LATCH_MASK src/main.h 24;" d +LATCH_MASK_INV src/main.h 25;" d +LAYER_SELECT src/main.h 22;" d +LED_GREEN src/draw.h 14;" d +LED_GREEN src/main.h 32;" d +LED_PGM src/draw.h 16;" d +LED_PGM src/main.h 34;" d +LED_PORT src/draw.h 18;" d +LED_PORT src/main.h 36;" d +LED_RED src/draw.h 12;" d +LED_RED src/main.h 30;" d +LIBS Makefile /^LIBS = -Wl,-gc-sections$/;" m +MAIN_BTN src/main.h 40;" d +MAIN_H src/main.h 6;" d +MCU_TARGET Makefile /^MCU_TARGET = atmega8$/;" m +MICROSECONDS_PER_TIMER0_OVERFLOW src/main.cpp 62;" d file: +MILLIS_INC src/main.cpp 65;" d file: +MYUBRR src/main.h 19;" d +OBJ Makefile /^OBJ = main.o draw.o effect.o font.o gameoflife.o launch_effect.o$/;" m +OBJCOPY Makefile /^OBJCOPY = avr-objcopy$/;" m +OBJDUMP Makefile /^OBJDUMP = avr-objdump$/;" m +OE_MASK src/main.h 27;" d +OE_PORT src/main.h 26;" d +OPTIMIZE Makefile /^OPTIMIZE = -Os$/;" m +PGM_BTN src/draw.h 20;" d +PRG Makefile /^PRG = ledcube$/;" m +RS232_BTN src/main.h 38;" d +altervoxel src/draw.cpp /^void altervoxel(int x, int y, int z, int state)$/;" f signature:(int x, int y, int z, int state) +altervoxel src/draw.h /^void altervoxel(int x, int y, int z, int state);$/;" p signature:(int x, int y, int z, int state) +argorder src/draw.cpp /^void argorder(int ix1, int ix2, int *ox1, int *ox2)$/;" f signature:(int ix1, int ix2, int *ox1, int *ox2) +boingboing src/effect.cpp /^void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode)$/;" f signature:(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode) +boingboing src/effect.h /^void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode);$/;" p signature:(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode) +box_filled src/draw.cpp /^void box_filled(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_filled src/draw.h /^void box_filled(int x1, int y1, int z1, int x2, int y2, int z2);$/;" p signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_walls src/draw.cpp /^void box_walls(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_walls src/draw.h /^void box_walls(int x1, int y1, int z1, int x2, int y2, int z2);$/;" p signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_wireframe src/draw.cpp /^void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +box_wireframe src/draw.h /^void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2);$/;" p signature:(int x1, int y1, int z1, int x2, int y2, int z2) +byteline src/draw.cpp /^char byteline (int start, int end)$/;" f signature:(int start, int end) +byteline src/draw.h /^char byteline (int start, int end);$/;" p signature:(int start, int end) +charfly src/draw.h /^void charfly (char chr, int direction, char axis, int mode, uint16_t delay);$/;" p signature:(char chr, int direction, char axis, int mode, uint16_t delay) +clear_led src/main.cpp /^void clear_led()$/;" f +clockCyclesPerMicrosecond src/main.cpp 56;" d file: +clockCyclesToMicroseconds src/main.cpp 57;" d file: +clrline_x src/draw.h /^void clrline_x(int z, int y, int x1, int x2);$/;" p signature:(int z, int y, int x1, int x2) +clrline_y src/draw.h /^void clrline_y(int z, int x, int y1, int y2);$/;" p signature:(int z, int x, int y1, int y2) +clrline_z src/draw.h /^void clrline_z(int x, int y, int z1, int z2);$/;" p signature:(int x, int y, int z1, int z2) +clrplane src/draw.cpp /^void clrplane (char axis, unsigned char i)$/;" f signature:(char axis, unsigned char i) +clrplane src/draw.h /^void clrplane (char axis, unsigned char i);$/;" p signature:(char axis, unsigned char i) +clrplane_x src/draw.cpp /^void clrplane_x (int x)$/;" f signature:(int x) +clrplane_x src/draw.h /^void clrplane_x(int x);$/;" p signature:(int x) +clrplane_y src/draw.cpp /^void clrplane_y (int y)$/;" f signature:(int y) +clrplane_y src/draw.h /^void clrplane_y(int y);$/;" p signature:(int y) +clrplane_z src/draw.cpp /^void clrplane_z (int z)$/;" f signature:(int z) +clrplane_z src/draw.h /^void clrplane_z(int z);$/;" p signature:(int z) +clrvoxel src/draw.cpp /^void clrvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +clrvoxel src/draw.h /^void clrvoxel(int x, int y, int z);$/;" p signature:(int x, int y, int z) +cube src/main.cpp /^volatile unsigned char cube[8][8];$/;" v +current_layer src/main.h /^volatile unsigned char current_layer;$/;" v +delay src/main.cpp /^void delay(uint32_t ms)$/;" f +delay_ms src/draw.cpp /^void delay_ms(uint16_t x)$/;" f signature:(uint16_t x) +delay_ms src/draw.h /^void delay_ms (uint16_t x);$/;" p signature:(uint16_t x) +draw_positions_axis src/effect.cpp /^void draw_positions_axis (char axis, unsigned char positions[64], int invert)$/;" f signature:(char axis, unsigned char positions[64], int invert) +draw_positions_axis src/effect.h /^void draw_positions_axis (char axis, unsigned char positions[64], int invert);$/;" p signature:(char axis, unsigned char positions[64], int invert) +drawchar src/draw.h /^void drawchar(char chr, int offset, int layer);$/;" p signature:(char chr, int offset, int layer) +effect_axis_updown_randsuspend src/effect.cpp /^void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert)$/;" f signature:(char axis, int delay, int sleep, int invert) +effect_axis_updown_randsuspend src/effect.h /^void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert);$/;" p signature:(char axis, int delay, int sleep, int invert) +effect_blinky2 src/effect.cpp /^void effect_blinky2()$/;" f signature:() +effect_blinky2 src/effect.h /^void effect_blinky2(void);$/;" p signature:(void) +effect_box_shrink_grow src/effect.cpp /^void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay)$/;" f signature:(int iterations, int rot, int flip, uint16_t delay) +effect_box_shrink_grow src/effect.h /^void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay);$/;" p signature:(int iterations, int rot, int flip, uint16_t delay) +effect_box_woopwoop src/effect.cpp /^void effect_box_woopwoop (int delay, int grow)$/;" f signature:(int delay, int grow) +effect_box_woopwoop src/effect.h /^void effect_box_woopwoop (int delay, int grow);$/;" p signature:(int delay, int grow) +effect_boxside_randsend_parallel src/effect.cpp /^void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode)$/;" f signature:(char axis, int origin, int delay, int mode) +effect_boxside_randsend_parallel src/effect.h /^void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode);$/;" p signature:(char axis, int origin, int delay, int mode) +effect_hollow_1 src/effect.h /^void effect_hollow_1 (int iterations, uint16_t delay);$/;" p signature:(int iterations, uint16_t delay) +effect_hollow_2 src/effect.h /^void effect_hollow_2 (int iterations, int corner, uint16_t delay);$/;" p signature:(int iterations, int corner, uint16_t delay) +effect_loadbar src/effect.cpp /^void effect_loadbar(int delay)$/;" f signature:(int delay) +effect_loadbar src/effect.h /^void effect_loadbar(int delay);$/;" p signature:(int delay) +effect_path_bitmap src/effect.cpp /^void effect_path_bitmap (int delay, char bitmap, int iterations)$/;" f signature:(int delay, char bitmap, int iterations) +effect_path_bitmap src/effect.h /^void effect_path_bitmap (int delay, char bitmap, int iterations);$/;" p signature:(int delay, char bitmap, int iterations) +effect_path_text src/effect.cpp /^void effect_path_text (int delay, char *str)$/;" f signature:(int delay, char *str) +effect_path_text src/effect.h /^void effect_path_text (int delay, char *str);$/;" p signature:(int delay, char *str) +effect_pathmove src/effect.cpp /^void effect_pathmove (unsigned char *path, int length)$/;" f signature:(unsigned char *path, int length) +effect_pathmove src/effect.h /^void effect_pathmove (unsigned char *path, int length);$/;" p signature:(unsigned char *path, int length) +effect_pathspiral src/effect.cpp /^void effect_pathspiral (int iterations, int delay)$/;" f signature:(int iterations, int delay) +effect_pathspiral src/effect.h /^void effect_pathspiral (int iterations, int delay);$/;" p signature:(int iterations, int delay) +effect_planboing src/effect.cpp /^void effect_planboing (int plane, int speed)$/;" f signature:(int plane, int speed) +effect_planboing src/effect.h /^void effect_planboing (int plane, int speed);$/;" p signature:(int plane, int speed) +effect_rain src/effect.cpp /^void effect_rain (int iterations)$/;" f signature:(int iterations) +effect_rain src/effect.h /^void effect_rain(int iterations);$/;" p signature:(int iterations) +effect_rand_patharound src/effect.cpp /^void effect_rand_patharound (int iterations, int delay)$/;" f signature:(int iterations, int delay) +effect_rand_patharound src/effect.h /^void effect_rand_patharound (int iterations, int delay);$/;" p signature:(int iterations, int delay) +effect_random_filler src/effect.cpp /^void effect_random_filler (int delay, int state)$/;" f signature:(int delay, int state) +effect_random_filler src/effect.h /^void effect_random_filler (int delay, int state);$/;" p signature:(int delay, int state) +effect_random_sparkle src/effect.cpp /^void effect_random_sparkle (void)$/;" f signature:(void) +effect_random_sparkle src/effect.h /^void effect_random_sparkle (void);$/;" p signature:(void) +effect_random_sparkle_flash src/effect.cpp /^void effect_random_sparkle_flash (int iterations, int voxels, int delay)$/;" f signature:(int iterations, int voxels, int delay) +effect_random_sparkle_flash src/effect.h /^void effect_random_sparkle_flash (int iterations, int voxels, int delay);$/;" p signature:(int iterations, int voxels, int delay) +effect_smileyspin src/effect.cpp /^void effect_smileyspin (int count, int delay, char bitmap)$/;" f signature:(int count, int delay, char bitmap) +effect_smileyspin src/effect.h /^void effect_smileyspin (int count, int delay, char bitmap);$/;" p signature:(int count, int delay, char bitmap) +effect_stringfly2 src/effect.cpp /^void effect_stringfly2(char * str)$/;" f signature:(char * str) +effect_stringfly2 src/effect.h /^void effect_stringfly2(char * str);$/;" p signature:(char * str) +effect_telcstairs src/effect.cpp /^void effect_telcstairs (int invert, int delay, int val)$/;" f signature:(int invert, int delay, int val) +effect_telcstairs src/effect.h /^void effect_telcstairs (int invert, int delay, int val);$/;" p signature:(int invert, int delay, int val) +effect_telcstairs_do src/effect.cpp /^int effect_telcstairs_do(int x, int val, int delay)$/;" f signature:(int x, int val, int delay) +effect_test src/effect.cpp /^void effect_test (void)$/;" f signature:(void) +effect_wormsqueeze src/effect.cpp /^void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay)$/;" f signature:(int size, int axis, int direction, int iterations, int delay) +effect_wormsqueeze src/effect.h /^void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay);$/;" p signature:(int size, int axis, int direction, int iterations, int delay) +effect_z_updown src/effect.cpp /^void effect_z_updown (int iterations, int delay)$/;" f signature:(int iterations, int delay) +effect_z_updown src/effect.h /^void effect_z_updown (int iterations, int delay);$/;" p signature:(int iterations, int delay) +effect_z_updown_move src/effect.cpp /^void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis)$/;" f signature:(unsigned char positions[64], unsigned char destinations[64], char axis) +effect_z_updown_move src/effect.h /^void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis);$/;" p signature:(unsigned char positions[64], unsigned char destinations[64], char axis) +fb src/main.cpp /^volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE];$/;" v +fill src/draw.cpp /^void fill (unsigned char pattern)$/;" f signature:(unsigned char pattern) +fill src/draw.h /^void fill(unsigned char pattern);$/;" p signature:(unsigned char pattern) +flipbyte src/draw.cpp /^char flipbyte (char byte)$/;" f signature:(char byte) +flipbyte src/draw.h /^char flipbyte(char byte);$/;" p signature:(char byte) +flpvoxel src/draw.cpp /^void flpvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +flpvoxel src/draw.h /^void flpvoxel(int x, int y, int z);$/;" p signature:(int x, int y, int z) +font_getbitmap src/font.cpp /^void font_getbitmap (char bitmap, unsigned char dst[8])$/;" f signature:(char bitmap, unsigned char dst[8]) +font_getbitmappixel src/font.cpp /^unsigned char font_getbitmappixel ( char bitmap, char x, char y)$/;" f signature:( char bitmap, char x, char y) +font_getchar src/font.cpp /^void font_getchar (char chr, unsigned char dst[5])$/;" f signature:(char chr, unsigned char dst[5]) +font_getpath src/font.cpp /^void font_getpath (unsigned char path, unsigned char *destination, int length)$/;" f signature:(unsigned char path, unsigned char *destination, int length) +getvoxel src/draw.cpp /^unsigned char getvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +getvoxel src/draw.h /^unsigned char getvoxel(int x, int y, int z);$/;" p signature:(int x, int y, int z) +in_wait src/main.cpp /^volatile bool in_wait = false;$/;" v +inrange src/draw.cpp /^unsigned char inrange(int x, int y, int z)$/;" f signature:(int x, int y, int z) +inrange src/draw.h /^unsigned char inrange(int x, int y, int z);$/;" p signature:(int x, int y, int z) +launch_effect src/launch_effect.cpp /^void launch_effect (int effect)$/;" f signature:(int effect) +line src/draw.cpp /^void line(int x1, int y1, int z1, int x2, int y2, int z2)$/;" f signature:(int x1, int y1, int z1, int x2, int y2, int z2) +line src/draw.h /^void line(int x1, int y1, int z1, int x2, int y2, int z2);$/;" p signature:(int x1, int y1, int z1, int x2, int y2, int z2) +main src/main.cpp /^int main()$/;" f +microsecondsToClockCycles src/main.cpp 58;" d file: +millis src/main.cpp /^inline uint32_t millis()$/;" f +mirror_x src/draw.cpp /^void mirror_x (void)$/;" f signature:(void) +mirror_x src/draw.h /^void mirror_x(void);$/;" p signature:(void) +mirror_y src/draw.cpp /^void mirror_y (void)$/;" f signature:(void) +mirror_y src/draw.h /^void mirror_y(void);$/;" p signature:(void) +mirror_z src/draw.cpp /^void mirror_z (void)$/;" f signature:(void) +mirror_z src/draw.h /^void mirror_z(void);$/;" p signature:(void) +paths src/font.cpp /^const unsigned char paths[44] \/* PROGMEM *\/ = {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17,$/;" v +pgm_mode src/main.h /^volatile unsigned char pgm_mode;$/;" v +rs232 src/main.cpp /^void rs232(void)$/;" f +sendplane_rand_z src/effect.cpp /^void sendplane_rand_z (unsigned char z, int delay, int wait)$/;" f signature:(unsigned char z, int delay, int wait) +sendplane_rand_z src/effect.h /^void sendplane_rand_z (unsigned char z, int delay, int wait);$/;" p signature:(unsigned char z, int delay, int wait) +sendvoxel_z src/effect.cpp /^void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay)$/;" f signature:(unsigned char x, unsigned char y, unsigned char z, int delay) +sendvoxel_z src/effect.h /^void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay);$/;" p signature:(unsigned char x, unsigned char y, unsigned char z, int delay) +sendvoxels_rand_z src/effect.cpp /^void sendvoxels_rand_z (int iterations, int delay, int wait)$/;" f signature:(int iterations, int delay, int wait) +sendvoxels_rand_z src/effect.h /^void sendvoxels_rand_z (int iterations, int delay, int wait);$/;" p signature:(int iterations, int delay, int wait) +set_led src/main.cpp /^void set_led(unsigned char x, unsigned char y, unsigned char z, bool on)$/;" f +setline_x src/draw.h /^void setline_x(int z, int y, int x1, int x2);$/;" p signature:(int z, int y, int x1, int x2) +setline_y src/draw.h /^void setline_y(int z, int x, int y1, int y2);$/;" p signature:(int z, int x, int y1, int y2) +setline_z src/draw.h /^void setline_z(int x, int y, int z1, int z2);$/;" p signature:(int x, int y, int z1, int z2) +setplane src/draw.cpp /^void setplane (char axis, unsigned char i)$/;" f signature:(char axis, unsigned char i) +setplane src/draw.h /^void setplane (char axis, unsigned char i);$/;" p signature:(char axis, unsigned char i) +setplane_x src/draw.cpp /^void setplane_x (int x)$/;" f signature:(int x) +setplane_x src/draw.h /^void setplane_x(int x);$/;" p signature:(int x) +setplane_y src/draw.cpp /^void setplane_y (int y)$/;" f signature:(int y) +setplane_y src/draw.h /^void setplane_y(int y);$/;" p signature:(int y) +setplane_z src/draw.cpp /^void setplane_z (int z)$/;" f signature:(int z) +setplane_z src/draw.h /^void setplane_z(int z);$/;" p signature:(int z) +setvoxel src/draw.cpp /^void setvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +setvoxel src/draw.h /^void setvoxel(int x, int y, int z);$/;" p signature:(int x, int y, int z) +shift src/draw.cpp /^void shift (char axis, int direction)$/;" f signature:(char axis, int direction) +shift src/draw.h /^void shift (char axis, int direction);$/;" p signature:(char axis, int direction) +strfly src/draw.h /^void strfly (char * str, int direction, char axis, int mode, uint16_t delay, uint16_t pause);$/;" p signature:(char * str, int direction, char axis, int mode, uint16_t delay, uint16_t pause) +timer0_millis src/main.cpp /^volatile uint32_t timer0_millis = 0;$/;" v +tmp2cube src/draw.cpp /^void tmp2cube (void)$/;" f signature:(void) +tmp2cube src/draw.h /^void tmp2cube (void);$/;" p signature:(void) +tmpclrvoxel src/draw.cpp /^void tmpclrvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +tmpclrvoxel src/draw.h /^void tmpclrvoxel(int x, int y, int z);$/;" p signature:(int x, int y, int z) +tmpfill src/draw.cpp /^void tmpfill (unsigned char pattern)$/;" f signature:(unsigned char pattern) +tmpfill src/draw.h /^void tmpfill(unsigned char pattern);$/;" p signature:(unsigned char pattern) +tmpsetvoxel src/draw.cpp /^void tmpsetvoxel(int x, int y, int z)$/;" f signature:(int x, int y, int z) +tmpsetvoxel src/draw.h /^void tmpsetvoxel(int x, int y, int z);$/;" p signature:(int x, int y, int z) diff --git a/characteristique_composants b/characteristique_composants new file mode 100644 index 0000000..d4bb3cf --- /dev/null +++ b/characteristique_composants @@ -0,0 +1,10 @@ +Perte des leds: 2.18v - 2.26v + +Ghosting effect: Il faut court-circuiter la diode de détrompement, elle +consomme trop et a pour effet de sous-alimenter les ic, et le signal devient +moins clair sur les 4 derniers shifters, surement du a la différence de +longueur de cable entre les deux séries de shifters (effet radio). + +cube: z0 en bas, z7 en haut; y0 au fond (ordre écran quand on regarde le cube + de haut), y7 devant; x0 à gauche x7 à droite (ordre écran ordi + toujours respecté). diff --git a/cube b/cube new file mode 120000 index 0000000..e07bc18 --- /dev/null +++ b/cube @@ -0,0 +1 @@ +instructables/cube_pc/cube \ No newline at end of file diff --git a/cube_gl/Makefile b/cube_gl/Makefile new file mode 100644 index 0000000..7c21b70 --- /dev/null +++ b/cube_gl/Makefile @@ -0,0 +1,14 @@ +CFLAGS=`pkg-config glu --cflags` `sdl-config --cflags` -lglut -ansi -Wall -m32 +LIBS=`pkg-config glu --libs` `sdl-config --libs` +OBJS=ledcube.o effect.o font.o + +%.o:%.cpp + g++ $(CFLAGS) -o $@ -c $< + +all: ledcube + +clean: + rm -f ledcube $(OBJS) + +ledcube: $(OBJS) + g++ $(CFLAGS) $(LIBS) $(OBJS) -o $@ diff --git a/cube_gl/effect.cpp b/cube_gl/effect.cpp new file mode 100644 index 0000000..4288fa0 --- /dev/null +++ b/cube_gl/effect.cpp @@ -0,0 +1,776 @@ + +#include "effect.h" +#include "font.h" +#include +#include +#include + +#define CUBE_SIZE 8 +#define CUBE_BYTES CUBE_SIZE*CUBE_SIZE +#define AXIS_Z 2 +#define AXIS_Y 1 +#define AXIS_X 0 + +unsigned char leds[8][8]; +volatile bool led_change = false; + +//unsigned char pow2[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; +//const unsigned char pow2[8] = {128, 64, 32, 16, 8, 4, 2, 1}; + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +bool get_led(unsigned char x, unsigned char y, unsigned char z) +{ + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (inrange(x, y, z)) { + return leds[y][z] & (1 << x); + } + + return false; +} + +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +{ + + if (!inrange(x, y, z)) { + return; + } + + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + leds[y][z] |= ((unsigned char)1) << x; + } + else { + leds[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() +{ + memset(leds, 0, sizeof(leds)); +} + +void set_voxel(int x, int y, int z) +{ + set_led(x, y, z, true); +} + +void clr_voxel(int x, int y, int z) +{ + set_led(x, y, z, false); +} + +void fill(char val) +{ + memset(leds, val, sizeof(leds)); +} + +void delay(unsigned t) +{ + led_change = true; + SDL_Delay(t); +} + +/***************************************************************************** + * EFFECTS + *****************************************************************************/ + +void test_effect() +{ + static int active_layer = 0; + + for (int k = 0; k < 8; ++k) { + //std::cout << "boo" << std::endl; + for (int j = 0; j < 8; ++j) { + //std::cout << "boo2" << std::endl; + if (k == active_layer) { + //std::cerr << "active" << std::endl; + leds[j][k] = 0xFF; + } + else leds[j][k] = 0; + } + } + ++active_layer; + if (active_layer >= 8) { + active_layer = 0; + } +} + + +void sendvoxels_z(int x, int y, int z, int delay) +{ + assert(z == 0 || z == 7); + + if (z == 7) { + for (int i = 0; i < 7; ++i) { + set_led(x, y, i, false); + set_led(x, y, i+1, true); + led_change = true; + SDL_Delay(delay); + } + } + else { + for(int i = 6; i >= 0; --i) { + set_led(x, y, i + 1, false); + set_led(x, y, i, true); + led_change = true; + SDL_Delay(delay); + } + } +} + + +void sendvoxels_random_z_effect(int maxiters, + int delay, /* speed of movement */ + int wait) /* delay between 2 movement */ +{ + clear_led(); // clear the cube + for (int j = 0; j < 8; ++j) { + for (int i = 0; i < 8; ++i) { + if (rand()%2) { + set_led(i, j, 0, true); + } + else { + set_led(i, j, 7, true); + } + } + } + + int previous_x = 0, previous_y = 0; + for (int n = 0; n < maxiters ; ++n ) { + int x = rand()%8, y = rand()%8; + + if (previous_x == x && previous_y == y) { + --n; + continue; + } + + if (get_led(x, y, 0)) { + sendvoxels_z(x, y, 7, delay); + } + else if (get_led(x, y, 7)) { + sendvoxels_z(x, y, 0, delay); + } + SDL_Delay(wait); + } + +} + +void rain_effect(int iterations) +{ + + for (int i = 0; i < iterations ; ++i) { + + // clear layer 7 + for (int j = 0 ; j < 8; ++j) { + leds[j][7] = 0; + } + + // place pixels at random x and y coord at layer 7 + int n = rand()%4; + for (int i2 = 0; i2 < n; ++i2) { + set_led(rand()%8, rand()%8, 7, 1); + } + + led_change = true; + SDL_Delay(90); + + // shift down + for (int k = 0; k < 7; ++k) { + for (int j = 0 ; j < 8; ++j) { + leds[j][k] = leds[j][k+1]; + } + } + } +} + +void set_plane(int axis, unsigned char index, bool on = true) +{ + switch(axis) { + case 0: // X + for (int k = 0; k < 8; ++k) { + for (int j = 0; j < 8; ++j) { + set_led(index, j, k, on); + } + } + break; + case 1: // Y + for (int k = 0; k < 8; ++k) { + for (int i = 0; i < 8; ++i) { + set_led(i, index, k, on); + } + } + break; + case 2: // Z + for (int j = 0; j < 8; ++j) { + for (int i = 0; i < 8; ++i) { + set_led(i, j, index, on); + } + } + break; + default: + assert(false); + } +} + +void planboing(int plane, int speed) +{ + for (int i = 0; i < 8; ++i) { + clear_led(); // clear cube + set_plane(plane, i); + led_change = true; + SDL_Delay(speed); + } + for (int i = 7; i >= 0; --i) { + clear_led(); // clear cube + set_plane(plane, i); + led_change = true; + SDL_Delay(speed); + } +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + //int state; + + for (i = 0; i < CUBE_SIZE; i++) { + if (direction == -1) { + ii = i; + } + else { + ii = (7-i); + } + + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == 2) + { + set_led(x, y, ii, get_led(x, y, iii)); + //state = get_led(x,y,iii); + //set_led(x,y,ii,state?false:true); + } + + if (axis == 1) + { + set_led(x, ii, y, get_led(x, iii, y)); + //state = get_led(x,iii,y); + //altervoxel(x,ii,y,state); + //set_led(x,ii,y,state?false:true); + } + + if (axis == 0) + { + set_led(ii, y, x, get_led(iii, y, x)); + //state = get_led(iii,y,x); + //set_led(ii,y,x,state?false:true); + } + } + } + } + + if (direction == -1) { + i = 7; + } + else { + i = 0; + } + + /* + for (x = 0; x < CUBE_SIZE; x++) { + for (y = 0; y < CUBE_SIZE; y++) { + if (axis == AXIS_Z) set_led(x,y,i, false); + if (axis == AXIS_Y) set_led(x,i,y, false); + if (axis == AXIS_X) set_led(i,y,x, false); + } + } + + */ + set_plane(axis, i, false); +} + + +// Flips a byte 180 degrees. +// MSB becomes LSB, LSB becomes MSB. +char flipbyte (char byte) +{ + char flop = 0x00; + + flop = (flop & 0b11111110) | (0b00000001 & (byte >> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +// Flip the cube 180 degrees along the y axis. +void mirror_y (void) +{ + unsigned char buffer[CUBE_SIZE][CUBE_SIZE]; + unsigned char x,y,z; + + memcpy(buffer, leds, CUBE_BYTES); // copy the current cube into a buffer. + + //fill(0x00); + clear_led(); + for (z=0; zix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +// Returns a byte with a row of 1's drawn in it. +// byteline(2,5) gives 0b00111100 +char byteline (int start, int end) +{ + return ((0xff< 7 ? it2 - 8: 7 - it2; + + clear_led(); + + box_wireframe(0, 0, 0, xyz, xyz, xyz); + + if (flip > 0) mirror_z(); + if (rot == 1 || rot == 3) mirror_y(); + if (rot == 2 || rot == 3) mirror_x(); + + led_change = true; + SDL_Delay(delay); + } + } +} + +void effect_box_woopwoop (int delay, int grow) +{ + int i,ii; + + //fill(0x00); + clear_led(); + for (i=0;i<4;i++) + { + ii = i; + if (grow > 0) + ii = 3-i; + + box_wireframe(4+ii,4+ii,4+ii,3-ii,3-ii,3-ii); + led_change = true; + SDL_Delay(delay); + clear_led(); + //delay_ms(delay); + //fill(0x00); + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + //fill(0x00); + clear_led(); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + //if (axis == AXIS_Z) + if (axis == 2) + set_led(x,y,p, true); + + if (axis == 1) + set_led(x,p,y, true); + + if (axis == 0) + set_led(p,y,x, true); + } + } + +} + + + +void effect_axis_updown_randsuspend(char axis, + int delay, int sleep, int invert) +{ + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,px; + + // Set 64 random positions + for (i=0; i<64; i++) + { + positions[i] = 0; // Set all starting positions to 0 + destinations[i] = rand()%8; + } + + // Loop 8 times to allow destination 7 to reach all the way + for (i=0; i<8; i++) + { + // For every iteration, move all position one step closer to their destination + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + led_change = true; + SDL_Delay(delay); + //delay_ms(delay); + } +} + +void effect_stringfly2(const char* str) +{ + //int x,y,i; + unsigned char x,y,i; + unsigned char chr[5]; + int delay = 80; + + clear_led(); + + while (*str) + { + font_getchar(*str++, chr); + + // Put a character on the back of the cube + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + //setvoxel(7,x+2,y); + //set_led(7,x+2,y); + set_led(x+2, 7, y); + } + } + } + + //led_change = true; + //SDL_Delay(1000); + //clear_led(); + //continue; + + // Shift the entire contents of the cube forward by 6 steps + // before placing the next character + for (i = 0; i<6; i++) + { + led_change = true; + //delay_ms(1000); + //SDL_Delay(1000); + SDL_Delay(delay); + //shift(AXIS_X,-1); + shift(1,-1); + //set_plane(1, 7, false); + } + } + + //return; + // Shift the last character out of the cube. + for (i = 0; i<8; i++) + { + led_change = true; + SDL_Delay(delay); + //delay_ms(1000); + //shift(AXIS_X,-1); + shift(1,-1); + } +} + +float distance2d (float x1, float y1, float x2, float y2) +{ + float dist; + dist = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); + + return dist; +} + +float distance3d (float x1, float y1, float z1, float x2, float y2, float z2) +{ + float dist; + dist = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(z1-z2)); + + return dist; +} + + + + +// Display a sine wave running out from the center of the cube. +void ripples (int iterations, int delay) +{ + float distance, height, ripple_interval; + int x,y,i; + + clear_led(); + //fill(0x00); + + for (i=0;i + +volatile const unsigned char font[455] /*EEMEM*/ = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] /*EEMEM*/ = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] /*PROGMEM */= {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +/* +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + for (i = 0; i < length; i++) + destination[i] = pgm_read_byte(&paths[i+offset]); +} +*/ + +void font_getchar (char chr, unsigned char dst[5]) +{ + //uint8_t i; + unsigned char i; + chr -= 32; // our bitmap font starts at ascii char 32. + + for (i = 0; i < 5; i++) + //dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&font[(chr*5)+i]); + dst[i] = font[(chr*5)+i]; +} + +/* +void font_getbitmap (char bitmap, unsigned char dst[8]) +{ + int i; + + for (i = 0; i < 8; i++) + dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&bitmaps[(uint8_t)bitmap][(uint8_t)i]); + +} + +unsigned char font_getbitmappixel ( char bitmap, char x, char y) +{ + uint8_t tmp = eeprom_read_byte((uint8_t*)&bitmaps[(uint8_t)bitmap][(uint8_t)x]); + return (tmp >> y) & 0x01; +} + +*/ + + diff --git a/cube_gl/font.h b/cube_gl/font.h new file mode 100644 index 0000000..536801e --- /dev/null +++ b/cube_gl/font.h @@ -0,0 +1,13 @@ +#ifndef FONT_H +#define FONT_H + +//#include + +void font_getchar (char chr, unsigned char dst[5]); +//void font_getpath (unsigned char path, unsigned char *destination, int length); +//void font_getbitmap (char bitmap, unsigned char dst[8]); +//unsigned char font_getbitmappixel ( char bitmap, char x, char y); + + + +#endif diff --git a/cube_gl/ledcube.cpp b/cube_gl/ledcube.cpp new file mode 100644 index 0000000..91c869c --- /dev/null +++ b/cube_gl/ledcube.cpp @@ -0,0 +1,522 @@ +/* +* Copyright 2010 - Jean-Baptiste Fasquel +* ISTIA - Angers university +* Jean-Baptiste.Fasquel@univ-angers.fr +*/ +//#include "stdafx.h" +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "effect.h" + +#include +#include + +volatile bool thread_must_quit = false; +//unsigned char pow2[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; +//const unsigned char pow2[8] = {128, 64, 32, 16, 8, 4, 2, 1}; + +const float ViewedPointX = 0.0; +const float ViewedPointY = 0.0; +const float ViewedPointZ = 0.0; + +const float CurrentViewUpX = 0; +const float CurrentViewUpY = 1; +const float CurrentViewUpZ = 0; + +float CurrentCameraPosX; +float CurrentCameraPosY; +float CurrentCameraPosZ; + +int nbCaseX = 10; +int nbCaseZ = 10; + +// 3.14159 +const float CPI = M_PI; +const float C2PI = 2*CPI; + +float current_angle = CPI/2; +float current_angle2 = 0;//CPI/2; +const float angle_delta = 0.2; +float dist = 20; +const float dist_delta = 1; + +enum direction_en { + D_LEFT, + D_RIGHT +}; + +void update_camera() +{ + //CurrentCameraPosX = dist * cosf(current_angle); + //CurrentCameraPosZ = dist * sinf(current_angle); + + CurrentCameraPosX = dist*cosf(current_angle)*cosf(current_angle2); + CurrentCameraPosZ = dist*sinf(current_angle)*cosf(current_angle2); + CurrentCameraPosY = dist*sinf(current_angle2); //* cosf(current_angle); + + //CurrentCameraPosX = dist*sinf(current_angle)*sinf(current_angle2); + //CurrentCameraPosZ = dist*sinf(current_angle)*cosf(current_angle2); + //CurrentCameraPosY = dist*cosf(current_angle2); + + //glRotatef(current_angle, 0, 0, 1); + //glRotatef(current_angle2, 0, 1, 0); + glutPostRedisplay(); +} + +void rotate_camera(direction_en dir) +{ + switch(dir) { + case D_LEFT: + current_angle += angle_delta; + break; + case D_RIGHT: + current_angle -= angle_delta; + break; + } + if (current_angle > C2PI) { + current_angle -= C2PI; + } + else if (current_angle < -C2PI) { + current_angle += C2PI; + } +} + +/// Draw axis +void drawAxis() +{ + glDisable(GL_LIGHTING); + glLineWidth(1); + glBegin(GL_LINES); + //(0,x) en rouge + glColor3d(1,0,0); + glVertex3i(0,0,0); + glVertex3i(1,0,0); + //(O,y) en vert + glColor3d(0,1,0); + glVertex3i(0,0,0); + glVertex3i(0,1,0); + //(O,z) en bleu + glColor3d(0,0,1); + glVertex3i(0,0,0); + glVertex3i(0,0,1); + glEnd(); + glEnable(GL_LIGHTING); +} + +/// DrawQuad +void drawQuad() +{ + glBegin(GL_QUADS); + glVertex3f(0.0,0.0,0.0); + glVertex3f(0.0,0.0,1.0); + glVertex3f(1.0,0.0,1.0); + glVertex3f(1.0,0.0,0.0); + glEnd(); +} + +/// DrawDamier +void drawDamier() +{ + float black[3]={0.0,0.0,0.0}; + float white[3]={1.0,1.0,1.0}; + for( int i = -nbCaseX ; i <= nbCaseX ; i++ ) + { + for( int k = -nbCaseZ ; k <= nbCaseZ ; k++ ) + { + int c=pow((float)(-1),i+k); // (-1)^{i+k} + c < 0 ? glColor3fv(white) : glColor3fv(black); ; + glPushMatrix(); + glTranslatef((GLfloat )i,0.0,(GLfloat )k); + drawQuad(); + glPopMatrix(); + } + } +} + +float led_size = 0.1; +float led_spacing = 1.4; + +void draw_led(bool on) +{ + glPushMatrix(); + //glTranslatef(4, 0, 4); + //glTranslatef(0.05,0.05,0.05); + //glColor3f(on?1.0:0.3, 0.2, 0.2); + glColor4f(on?1.0:0.5, on?0.6:0.4, on?0.6:0.4, on?1:0.3); + glutSolidCube(led_size); + glPopMatrix(); +} + +void draw_ledcube() +{ + glPushMatrix(); + + float translate_size = -led_spacing*8/2; + glTranslatef(translate_size, translate_size, -translate_size); + + for (int k = 0; k < 8; ++k) { + glPushMatrix(); + for (int j = 0; j < 8; ++j) { + glPushMatrix(); + for (int i = 0; i < 8; ++i) { + //draw_led((i+j*k)%2); + //draw_led(leds[j][k] & pow2[i]); + //if (i == j && j == k && k == 0) draw_led(true); else + draw_led(get_led(i, j, k)); + glTranslatef(led_spacing, 0, 0); + } + glPopMatrix(); + glTranslatef(0, 0, -led_spacing); + } + glPopMatrix(); + glTranslatef(0, led_spacing, 0); + } + + glPopMatrix(); +} + +///(Re)Configure la caméra et affiche le contenu de la scène +void Displayfct() +{ + glClearColor(0,0,0,0); // selectionne la couleur noire (qui est celle par défaut) + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + //Model view pour définir la caméra + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); // Restaure la matrice de modélisation-visualisation + + //glRotatef(current_angle, 0, 1, 0); + //glRotatef(current_angle2, 1, 0, 1); + + gluLookAt(CurrentCameraPosX, CurrentCameraPosY , CurrentCameraPosZ, + ViewedPointX, ViewedPointY, ViewedPointZ, CurrentViewUpX, + CurrentViewUpY, CurrentViewUpZ); + //Draw axis + //drawAxis(); + //Draw damier + //drawDamier(); + //Draw ilot + //drawIlot(); + + // draw led cube + draw_ledcube(); + + //vide tous les buffers et exécute toutes les commandes en attente + //glFlush(); + glutSwapBuffers(); +} +///Invoqué pour le changement de taille de la fenêtre avant le Displayfct() +void ReshapeFunc(int w,int h) +{ + //printf("ReshapeFunc: %d, %d\n",w,h); + glViewport(0,0,w,h); // Ajustement de la taille de la fenêtre + glMatrixMode(GL_PROJECTION); // Choisit la matrice de projection + glLoadIdentity(); + glFrustum(-1.,1.,-1.,1.,1.,40.); +} + +void animation(int x) +{ + ((void)x); + + //test_effect(); // 100 ms + //rain_effect(); // 100 ms + //plane_effect(); // 50ms + + if (led_change) { + led_change = false; + glutPostRedisplay(); + } + + glutTimerFunc(40, animation, 0); +} + +void IdleFunct() +{ + static int nbRedisplay = 0 ; + + //Pour éviter de surcharger la machine pendant trop longtemps + if( nbRedisplay < 100 ) { + rotate_camera(D_RIGHT); + update_camera(); + nbRedisplay = 0; + } + else { + ++nbRedisplay ; + } +} + +///Gère les menus +void MainMenuCallBack(int selection) +{ + static bool idle_active = false; + static bool light0_active = true; + static bool light1_active = true; + switch(selection) + { + case 0: + if (idle_active) { + idle_active = false; + glutIdleFunc(0); + } + else { + idle_active = true; + glutIdleFunc(IdleFunct); + } + break; + case 1 : + thread_must_quit = true; + exit(0); + break; + case 2 : /* toggle light 0 */ + if (light0_active) { + glDisable(GL_LIGHT0); + light0_active = false; + } + else { + glEnable(GL_LIGHT0); + light0_active = true; + } + glutPostRedisplay(); + break; + case 3 : /* toggle light 1 */ + if (light1_active) { + glDisable(GL_LIGHT1); + light1_active = false; + } + else { + glEnable(GL_LIGHT1); + light1_active = true; + } + glutPostRedisplay(); + break; + default: + return; + break; + } +} + +void initgl() +{ + glClearColor(0.0,0.0,0.0,0.0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glShadeModel(GL_SMOOTH) ; //en GL_FLAT: on voit les détails de la sphère + glEnable(GL_DEPTH_TEST) ; + + glEnable(GL_LIGHTING); + glEnable(GL_COLOR_MATERIAL); //sinon, pas de couleurs + + ///Light0 + GLfloat lightColor0[4] = {1.0,1.0,0.5,1.0}; + glLightfv(GL_LIGHT0,GL_AMBIENT,lightColor0); + GLfloat lightPos0[4] = {1.0,0.0,1.0,0.0}; + glLightfv(GL_LIGHT0,GL_POSITION,lightPos0); + glEnable(GL_LIGHT0) ; + + ///Light1 + GLfloat lightColor1[4] = {0.5,1.0,1.0,1.0}; + glLightfv(GL_LIGHT1,GL_AMBIENT,lightColor1); + GLfloat lightPos1[4] = {-1.0,0.0,1.0,0.0}; + glLightfv(GL_LIGHT1,GL_POSITION,lightPos1); + glEnable(GL_LIGHT1) ; + + //CurrentCameraPosX = dist * cosf(current_angle); + //CurrentCameraPosZ = dist * sinf(current_angle); + + + glEnable(GL_BLEND); // activation blending pour la transparence + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + /* + for (int i = 0; i < 8; ++i) { + for (int j = 0; j < 8; ++j) { + leds[i][j] = 0xF0; + } + } + */ + + srand(time(0)); + animation(0); + update_camera(); +} + +void keyboardfunc(unsigned char key, int x, int y) +{ + if (key == 0x1b || key == 'q' || key == 'Q') { + thread_must_quit = true; + exit(0); + } +} + +void specialfunc(int key, int x, int y) +{ + switch(key) { + case GLUT_KEY_UP: + dist -= dist_delta; + break; + case GLUT_KEY_DOWN: + dist += dist_delta; + break; + case GLUT_KEY_LEFT: + rotate_camera(D_LEFT); + break; + case GLUT_KEY_RIGHT: + rotate_camera(D_RIGHT); + break; + } + + if (dist < 1) { + dist = 1; + } + + update_camera(); +} + +bool mouse_update_camera = false; +int mouse_x; +int mouse_y; + +#if !defined(GLUT_WHEEL_UP) +# define GLUT_WHEEL_UP 3 +# define GLUT_WHEEL_DOWN 4 +#endif + +void mousefunc(int button, int state, int x, int y) +{ + if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN) { + mouse_x = x; + mouse_y = y; + mouse_update_camera = true; + } + else if (button == GLUT_WHEEL_UP && state == GLUT_UP) { + dist -= dist_delta; + update_camera(); + } + else if (button == GLUT_WHEEL_DOWN && state == GLUT_UP) { + dist += dist_delta; + update_camera(); + } + else { + //std::cerr << "button : " << button << std::endl; + mouse_update_camera = false; + } +} + +void motionfunc(int x, int y) +{ + if (mouse_update_camera) { + int diff_x = x - mouse_x; + int diff_y = y - mouse_y; + mouse_x = x; + mouse_y = y; + //std::cout << mouse_x - x << " " << mouse_y - y << std::endl; + + float scale_factor = 0.05; + + current_angle += diff_x * scale_factor; + current_angle2 += diff_y * scale_factor; + + if (current_angle2 >= CPI/2) { + current_angle2 = CPI/2 - 0.0001; + } + else if(current_angle2 <= -CPI/2) { + current_angle2 = - CPI/2 + 0.0001; + } + + //CurrentCameraPosY += diff_y * 0.2; + //CurrentCameraPosY += diff_y * 0.2; + update_camera(); + } +} + +SDL_Thread* thread = 0; +void sdl_exit_thread() +{ + if (thread) { + ; + //SDL_WaitThread(thread, 0); + } +} + +int thread_func(void* unused) +{ + ((void)unused); + while (!thread_must_quit) { + launch_effect(rand()%TOTAL_EFFECTS); + //launch_effect(12); + + //rain_effect(1000); + //for (int i = 0; i < 6; ++i) { + // //planboing(i%3, 50); + //} + ////sendvoxels_random_z_effect(1000, 50, 100); + //for (int i = 0; i < 8; ++i) { + // box_shrink_grow_effect(1, i%4, i & 0x4, 50); + //} + //effect_box_woopwoop(80, 0); + //effect_box_woopwoop(80, 1); + //effect_box_woopwoop(80, 0); + //effect_box_woopwoop(80, 1); + //SDL_Delay(40); + } + return 0; +} + +int main(int argc,char **argv) +{ + //Initialisation de la fenêtre + glutInit(&argc,argv); + glutInitWindowPosition(100,100); + glutInitWindowSize(400,400); + glutInitDisplayMode(GLUT_RGBA |GLUT_DOUBLE | GLUT_DEPTH); + glutCreateWindow("TD1"); + + if (SDL_Init(SDL_INIT_TIMER) < 0) { + std::cerr << "Error: " << SDL_GetError() << std::endl; + exit(1); + } + atexit(SDL_Quit); + + //Initialisation d'opengl + initgl(); + + //Menu + glutCreateMenu(MainMenuCallBack); + glutAddMenuEntry("Toggle animation", 0); + glutAddMenuEntry("Toggle light 0", 2); + glutAddMenuEntry("Toggle light 1", 3); + glutAddMenuEntry("Quitter",1); + glutAttachMenu(GLUT_RIGHT_BUTTON); + + //Callbacks + glutDisplayFunc(Displayfct); + glutReshapeFunc(ReshapeFunc); + glutSpecialFunc(specialfunc); + glutKeyboardFunc(keyboardfunc); + glutMouseFunc(mousefunc); + glutMotionFunc(motionfunc); + + + // thread + thread = SDL_CreateThread(thread_func, 0); + if (!thread) { + std::cerr << "Error creating thread : " << SDL_GetError() << std::endl; + exit(1); + } + atexit(sdl_exit_thread); + + //Infinite loop + glutMainLoop(); + + thread_must_quit = true; + + return 0; +} diff --git a/cube_gl/ledcube.cpp.bak b/cube_gl/ledcube.cpp.bak new file mode 100644 index 0000000..2fd6bd7 --- /dev/null +++ b/cube_gl/ledcube.cpp.bak @@ -0,0 +1,155 @@ +#include +#include +#include +#include + +//angle of rotation +float xpos = 0, ypos = 0, zpos = 0, xrot = 0, yrot = 0, angle=0.0; + +float lastx, lasty; + +//positions of the cubes +float positionz[10]; +float positionx[10]; + +void cubepositions (void) { //set the positions of the cubes + + for (int i=0;i<10;i++) + { + positionz[i] = rand()%5 + 5; + positionx[i] = rand()%5 + 5; + } +} + +//draw the cube +void cube (void) { + for (int i=0;i<10;i++) + { + glPushMatrix(); + glTranslated(-positionx[i + 1] * 10, 0, -positionz[i + 1] * + 10); //translate the cube + glutSolidCube(2); //draw the cube + glPopMatrix(); + } +} + +void init (void) { + cubepositions(); +} + +void enable (void) { + glEnable (GL_DEPTH_TEST); //enable the depth testing + glEnable (GL_LIGHTING); //enable the lighting + glEnable (GL_LIGHT0); //enable LIGHT0, our Diffuse Light + glShadeModel (GL_SMOOTH); //set the shader to smooth shader + +} + +void camera (void) { + glRotatef(xrot,1.0,0.0,0.0); //rotate our camera on teh x-axis (left and right) + glRotatef(yrot,0.0,1.0,0.0); //rotate our camera on the y-axis (up and down) + glTranslated(-xpos,-ypos,-zpos); //translate the screen to the position of our camera +} + +void display (void) { + glClearColor (1.0,0.0,0.0,1.0); //clear the screen to black + glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //clear the color buffer and the depth buffer + glLoadIdentity(); + camera(); + enable(); + cube(); //call the cube drawing function + glutSwapBuffers(); //swap the buffers + angle++; //increase the angle +} + +void reshape (int w, int h) { + glViewport (0, 0, (GLsizei)w, (GLsizei)h); //set the viewport to the current window specifications + glMatrixMode (GL_PROJECTION); //set the matrix to projection + + glLoadIdentity (); + gluPerspective (60, (GLfloat)w / (GLfloat)h, 1.0, 1000.0); //set the perspective (angle of sight, width, height, , depth) + glMatrixMode (GL_MODELVIEW); //set the matrix back to model + +} + +void keyboard (unsigned char key, int x, int y) { + if (key=='q') + { + xrot += 1; + if (xrot >360) xrot -= 360; + } + + if (key=='z') + { + xrot -= 1; + if (xrot < -360) xrot += 360; + } + + if (key=='w') + { + float xrotrad, yrotrad; + yrotrad = (yrot / 180 * 3.141592654f); + xrotrad = (xrot / 180 * 3.141592654f); + xpos += float(sin(yrotrad)) ; + zpos -= float(cos(yrotrad)) ; + ypos -= float(sin(xrotrad)) ; + } + + if (key=='s') + { + float xrotrad, yrotrad; + yrotrad = (yrot / 180 * 3.141592654f); + xrotrad = (xrot / 180 * 3.141592654f); + xpos -= float(sin(yrotrad)); + zpos += float(cos(yrotrad)) ; + ypos += float(sin(xrotrad)); + } + + if (key=='d') + { + float yrotrad; + yrotrad = (yrot / 180 * 3.141592654f); + xpos += float(cos(yrotrad)) * 0.2; + zpos += float(sin(yrotrad)) * 0.2; + } + + if (key=='a') + { + float yrotrad; + yrotrad = (yrot / 180 * 3.141592654f); + xpos -= float(cos(yrotrad)) * 0.2; + zpos -= float(sin(yrotrad)) * 0.2; + } + + if (key==27) + { + exit(0); + } +} + +void mouseMovement(int x, int y) { + int diffx=x-lastx; //check the difference between the current x and the last x position + int diffy=y-lasty; //check the difference between the current y and the last y position + lastx=x; //set lastx to the current x position + lasty=y; //set lasty to the current y position + xrot += (float) diffy; //set the xrot to xrot with the addition of the difference in the y position + yrot += (float) diffx; //set the xrot to yrot with the addition of the difference in the x position +} + +int main (int argc, char **argv) { + glutInit (&argc, argv); + glutInitDisplayMode (GLUT_DOUBLE | GLUT_DEPTH); + glutInitWindowSize (500, 500); + glutInitWindowPosition (100, 100); + glutCreateWindow ("A basic OpenGL Window"); + init (); + glutDisplayFunc (display); + glutIdleFunc (display); + glutReshapeFunc (reshape); + glutPassiveMotionFunc(mouseMovement); //check for mouse movement + glutKeyboardFunc (keyboard); + glutMainLoop (); + return 0; +} + + diff --git a/cube_pc_test1/3d.c b/cube_pc_test1/3d.c new file mode 100644 index 0000000..e1ddeaf --- /dev/null +++ b/cube_pc_test1/3d.c @@ -0,0 +1,344 @@ +#include "draw.h" +#include "draw_3d.h" +#include "3d.h" +#include +#include +#include +#include +#include + +void linespin (int iterations, int delay) +{ + float top_x, top_y, top_z, bot_x, bot_y, bot_z, sin_base; + float center_x, center_y; + + center_x = 4; + center_y = 4; + + int i, z; + for (i=0;idiameter && distance +#include + +#define RADIUS 0.25 + +void draw_line(int Xa, int Ya, int Za, + int Xb, int Yb, int Zb) { + int Xc=0; + int Yc=0; + int Zc=0; + int Xd=0; + int Yd=0; + int Zd=0; + float D=0; + int x=0; + int y=0; + int z=0; + + /* Affectation des valeurs de Xa, Ya, Za, Xb, Yb, et Zb à + Xc, Yc, Zc, Xd, Yd et Zd de telle sorte que cela + corresponde pour les calculs vectoriels. */ + + if ( Xa > Xb) { + Xd=Xa; + Xc=Xb; + } + else { + Xc=Xa; + Xd=Xb; + } + + if ( Ya > Yb) { + Yd=Ya; + Yc=Yb; + } + else { + Yc=Ya; + Yd=Yb; + } + + if ( Za > Zb) { + Zd=Za; + Zc=Zb; + } + else { + Zc=Za; + Zd=Zb; + } + + /* On parcours les diodes en conjuguant les trois boucles for.*/ + + for ( x=Xc ; x<=Xd ; x++) { + for ( y=Yc ; y<=Yd ; y++) { + for ( z=Zc ; z<=Zd ; z++) { + + /* Cette horrible formule calcule la distance de la LED testée + à la droite (AB) ; Désolé, je ne savais pas comment la mettre sur 2 lignes */ + + D=(pow(Zb*y+Yb*Za-Za*y-z*Yb-Zb*Ya+z*Ya,2)+pow(z*Xb-z*Xa+Zb*Xa-x*Zb+x*Za-Xb*Za,2)+pow(x*Yb-x*Ya+Xb*Ya-y*Xb+y*Xa-Yb*Xa,2))/((Xb-Xa)*(Xb-Xa)+(Yb-Ya)*(Yb-Ya)+(Zb-Za)*(Zb-Za)); + if (D <= RADIUS) { /* Cette constante, par défaut à 2.5, représente la largeur et la précision de la droite */ + setvoxel(x,y,z); /* C'était bien ça la fonction pour allumer la LED ? mes souvenirs sont embrouillés... */ + } + } + } + } +} + +void draw_linef(float Xa, float Ya, float Za, + float Xb, float Yb, float Zb) { + int Xc=0; + int Yc=0; + int Zc=0; + int Xd=0; + int Yd=0; + int Zd=0; + float D=0; + float x=0; + float y=0; + float z=0; + + /* Affectation des valeurs de Xa, Ya, Za, Xb, Yb, et Zb à + Xc, Yc, Zc, Xd, Yd et Zd de telle sorte que cela + corresponde pour les calculs vectoriels. */ + + if ( Xa > Xb) { + Xd=Xa; + Xc=Xb; + } + else { + Xc=Xa; + Xd=Xb; + } + + if ( Ya > Yb) { + Yd=Ya; + Yc=Yb; + } + else { + Yc=Ya; + Yd=Yb; + } + + if ( Za > Zb) { + Zd=Za; + Zc=Zb; + } + else { + Zc=Za; + Zd=Zb; + } + + /* On parcours les diodes en conjuguant les trois boucles for.*/ + + for ( x=Xc ; x<=Xd ; x++) { + for ( y=Yc ; y<=Yd ; y++) { + for ( z=Zc ; z<=Zd ; z++) { + + /* Cette horrible formule calcule la distance de la LED testée + à la droite (AB) ; Désolé, je ne savais pas comment la mettre sur 2 lignes */ + + D=(pow(Zb*y+Yb*Za-Za*y-z*Yb-Zb*Ya+z*Ya,2)+pow(z*Xb-z*Xa+Zb*Xa-x*Zb+x*Za-Xb*Za,2)+pow(x*Yb-x*Ya+Xb*Ya-y*Xb+y*Xa-Yb*Xa,2))/((Xb-Xa)*(Xb-Xa)+(Yb-Ya)*(Yb-Ya)+(Zb-Za)*(Zb-Za)); + if (D <= RADIUS) { /* Cette constante, par défaut à 2.5, représente la largeur et la précision de la droite */ + setvoxel(x,y,z); /* C'était bien ça la fonction pour allumer la LED ? mes souvenirs sont embrouillés... */ + } + } + } + } +} diff --git a/cube_pc_test1/cube b/cube_pc_test1/cube new file mode 100755 index 0000000..3d1df3b Binary files /dev/null and b/cube_pc_test1/cube differ diff --git a/cube_pc_test1/cube.c b/cube_pc_test1/cube.c new file mode 100644 index 0000000..e0066e4 --- /dev/null +++ b/cube_pc_test1/cube.c @@ -0,0 +1,83 @@ +#include +#include +#include "cube.h" +#include +#include +#include + +void cube_push (unsigned char data[8][8]) +{ + int x,y,i; + + i= 0; + + unsigned char buffer[200]; + + buffer[i++] = 0xff; // escape + buffer[i++] = 0x00; // reset to 0,0 + + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + buffer[i++] = data[x][y]; + if (data[x][y] == 0xff) + { + buffer[i++] = data[x][y]; + } + } + } + + write(tty,&buffer,i); +} + +int cube_init (const char* tty_path) +{ + + //FILE *ftty; + + //ftty = fopen("/dev/ttyUSB0","a"); + + + struct termios io; + + //char *tty_path = "/dev/ttyUSB0"; + //char *tty_path = "/dev/ttyUSB1"; + + //tty = open(tty_path, O_RDWR | O_NOCTTY | O_NDELAY); // <- ORIGINAL + tty = open(tty_path, O_RDWR); + + + if (tty <0) {perror(tty_path); exit(-1); } + + bzero(&io, sizeof(io)); + //io.c_cflag = B2400 | CRTSCTS | CS8 | CLOCAL | CREAD; + //io.c_cflag = B2400 | CRTSCTS | PARENB | CS8 | CLOCAL | CREAD; + io.c_cflag = B38400 | PARENB | CS8 | CLOCAL | CREAD; + //io.c_cflag = B19200 | PARENB | CS8 | CLOCAL | CREAD; + io.c_iflag = IGNPAR; + io.c_oflag = 0; + + // set input mode (non-canonical, no echo,...) + io.c_lflag &= ~OPOST; + //io.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + + io.c_cc[VTIME] = 0; // inter-character timer unused + io.c_cc[VMIN] = 0; // blocking read until 5 chars received + + // Flush buffer + tcflush(tty, TCIFLUSH); + + //cfsetospeed(&io, B1000000); + //cfsetispeed(&io, B1000000); + + // write config to tty + tcsetattr(tty,TCSANOW,&io); + + + //fcntl(tty, F_SETFL, 0); + + + + return 1; +} diff --git a/cube_pc_test1/cube.h b/cube_pc_test1/cube.h new file mode 100644 index 0000000..bac730e --- /dev/null +++ b/cube_pc_test1/cube.h @@ -0,0 +1,25 @@ + +#define AXIS_X 0x78 +#define AXIS_Y 0x79 +#define AXIS_Z 0x7a + +#define CUBE_SIZE 8 + +int LED_PORT; +int LED_RED; +int LED_GREEN; + +volatile unsigned char cube[8][8]; +volatile unsigned char rs232_cube[8][8]; +unsigned char fb[8][8]; + +int tty; + +// FILE *ftty; + +// func dsfs +void cube_putchar (unsigned char data); +int cube_init (const char* tty_path); +void cube_push (unsigned char data[8][8]); + + diff --git a/cube_pc_test1/draw.c b/cube_pc_test1/draw.c new file mode 100644 index 0000000..549d109 --- /dev/null +++ b/cube_pc_test1/draw.c @@ -0,0 +1,682 @@ +#include "draw.h" +#include "draw_3d.h" +#include + + +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] |= (1 << x); + +} + +void tmpsetvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[y][z] |= (1 << x); +} + +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] &= ~(1 << x); +} + +void tmpclrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[y][z] &= ~(1 << x); +} + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < 8 && y >= 0 && y < 8 && z >= 0 && z < 8) + { + return 0x01; + } else + { + // One of the coordinates was outside the cube. + return 0x00; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[y][z] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[y][z] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[i][z] = 0xff; + } +} + + +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[i][z] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[y][z] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[y][z] = 0x00; + } +} + + +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] = pattern; + } + } +} + +void tmpfill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + fb[z][y] = pattern; + } + } +} + + +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + cube[iy][iz] |= byteline(x1,x2); + } + } + +} + +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + if (iy == y1 || iy == y2 || iz == z1 || iz == z2) + { + cube[iy][iz] = byteline(x1,x2); + } else + { + cube[iy][iz] |= ((0x01 << x1) | (0x01 << x2)); + } + } + } + +} + + +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + // Lines along X axis + cube[y1][z1] = byteline(x1,x2); + cube[y1][z2] = byteline(x1,x2); + cube[y2][z1] = byteline(x1,x2); + cube[y2][z2] = byteline(x1,x2); + + // Lines along Y axis + for (iy=y1;iy<=y2;iy++) + { + setvoxel(x1,iy,z1); + setvoxel(x1,iy,z2); + setvoxel(x2,iy,z1); + setvoxel(x2,iy,z2); + } + + // Lines along Z axis + for (iz=z1;iz<=z2;iz++) + { + setvoxel(x1,y1,iz); + setvoxel(x1,y2,iz); + setvoxel(x2,y1,iz); + setvoxel(x2,y2,iz); + } + +} + +// Returns a byte with a row of 1's drawn in it. +// byteline(2,5) gives 0b00111100 +char byteline (int start, int end) +{ + return ((0xff<> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +void delay_ms(int x) +{ + memcpy(rs232_cube, cube, 64); + usleep(x*80); +} + +// Copies the contents of fb (temp cube buffer) into the rendering buffer +void tmp2cube (void) +{ + int y, z; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] = fb[y][z]; + } + } +} + +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,x,y,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + + + +void line_3d (int x1, int y1, int z1, int x2, int y2, int z2) +{ + int i, dx, dy, dz, l, m, n, x_inc, y_inc, z_inc, + err_1, err_2, dx2, dy2, dz2; + int pixel[3]; + pixel[0] = x1; + pixel[1] = y1; + pixel[2] = z1; + dx = x2 - x1; + dy = y2 - y1; + dz = z2 - z1; + x_inc = (dx < 0) ? -1 : 1; + l = abs(dx); + y_inc = (dy < 0) ? -1 : 1; + m = abs(dy); + z_inc = (dz < 0) ? -1 : 1; + n = abs(dz); + dx2 = l << 1; + dy2 = m << 1; + dz2 = n << 1; + if ((l >= m) && (l >= n)) { + err_1 = dy2 - l; + err_2 = dz2 - l; + for (i = 0; i < l; i++) { + //PUT_PIXEL(pixel); + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dx2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dx2; + } + err_1 += dy2; + err_2 += dz2; + pixel[0] += x_inc; + } + } else if ((m >= l) && (m >= n)) { + err_1 = dx2 - m; + err_2 = dz2 - m; + for (i = 0; i < m; i++) { + //PUT_PIXEL(pixel); + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[0] += x_inc; + err_1 -= dy2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dy2; + } + err_1 += dx2; + err_2 += dz2; + pixel[1] += y_inc; + } + } else { + err_1 = dy2 - n; + err_2 = dx2 - n; + for (i = 0; i < n; i++) { + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dz2; + } + if (err_2 > 0) { + pixel[0] += x_inc; + err_2 -= dz2; + } + err_1 += dy2; + err_2 += dx2; + pixel[2] += z_inc; + } + } + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); +} + + +void line_3d_float (vertex point1, vertex point2) +{ + float x1, y1, z1, x2, y2, z2; + + x1 = point1.x; + y1 = point1.y; + z1 = point1.z; + x2 = point2.x; + y2 = point2.y; + z2 = point2.z; + + + float i; + float dx, dy, dz, l, m, n, x_inc, y_inc, z_inc, + err_1, err_2, dx2, dy2, dz2; + float pixel[3]; + pixel[0] = x1; + pixel[1] = y1; + pixel[2] = z1; + dx = x2 - x1; + dy = y2 - y1; + dz = z2 - z1; + x_inc = (dx < 0) ? -1 : 1; + l = abs(dx); + y_inc = (dy < 0) ? -1 : 1; + m = abs(dy); + z_inc = (dz < 0) ? -1 : 1; + n = abs(dz); + dx2 = l*l; + dy2 = m*m; + dz2 = n*n; + if ((l >= m) && (l >= n)) { + err_1 = dy2 - l; + err_2 = dz2 - l; + for (i = 0; i < l; i++) { + //PUT_PIXEL(pixel); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dx2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dx2; + } + err_1 += dy2; + err_2 += dz2; + pixel[0] += x_inc; + } + } else if ((m >= l) && (m >= n)) { + err_1 = dx2 - m; + err_2 = dz2 - m; + for (i = 0; i < m; i++) { + //PUT_PIXEL(pixel); + //setvoxel(pixel[0]/scale,pixel[1]/scale,pixel[2]/scale); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[0] += x_inc; + err_1 -= dy2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dy2; + } + err_1 += dx2; + err_2 += dz2; + pixel[1] += y_inc; + } + } else { + err_1 = dy2 - n; + err_2 = dx2 - n; + for (i = 0; i < n; i++) { + //setvoxel(pixel[0]/scale,pixel[1]/scale,pixel[2]/scale); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dz2; + } + if (err_2 > 0) { + pixel[0] += x_inc; + err_2 -= dz2; + } + err_1 += dy2; + err_2 += dx2; + pixel[2] += z_inc; + } + } + //setvoxel(pixel[0]/scale,pixel[1]/scale,pixel[2]/scale); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); +} + +// Flip the cube 180 degrees along the x axis +void mirror_x (void) +{ + unsigned char buffer[8][8]; + unsigned char y,z; + + memcpy(buffer, cube, 64); // copy the current cube into a buffer. + + fill(0x00); + + for (z=0; z<8; z++) + { + for (y=0; y<8; y++) + { + cube[y][z] = flipbyte(buffer[y][z]); + } + } +} +// Flip the cube 180 degrees along the y axis. +void mirror_y (void) +{ + unsigned char buffer[8][8]; + unsigned char x,y,z; + + memcpy(buffer, cube, 64); // copy the current cube into a buffer. + + fill(0x00); + for (z=0; z<8; z++) + { + for (y=0; y<8; y++) + { + for (x=0; x<8; x++) + { + if (buffer[y][z] & (0x01 << x)) + setvoxel(x,7-y,z); + } + } + } + +} +// flip the cube 180 degrees along the z axis +void mirror_z (void) +{ + unsigned char buffer[8][8]; + unsigned char z, y; + + memcpy(buffer, cube, 64); // copy the current cube into a buffer. + + for (y=0; y<8; y++) + { + for (z=0; z<8; z++) + { + cube[7-z][y] = buffer[y][z]; + } + } +} + + + + diff --git a/cube_pc_test1/draw.h b/cube_pc_test1/draw.h new file mode 100644 index 0000000..a1c7e85 --- /dev/null +++ b/cube_pc_test1/draw.h @@ -0,0 +1,52 @@ +#ifndef DRAW_H +#define DRAW_H + + +#include "cube.h" + +extern const unsigned char font[480]; + + + +void delay_ms (int x); + + +void setvoxel(int x, int y, int z); +void clrvoxel(int x, int y, int z); +void tmpsetvoxel(int x, int y, int z); +void tmpclrvoxel(int x, int y, int z); + +unsigned char inrange(int x, int y, int z); +unsigned char getvoxel(int x, int y, int z); +void flpvoxel(int x, int y, int z); + +void altervoxel(int x, int y, int z, int state); +void setplane_z(int z); +void clrplane_z(int z); +void setplane_x(int x); +void clrplane_x(int x); +void setplane_y(int y); +void clrplane_y(int y); +void setline_z(int x, int y, int z1, int z2); +void setline_x(int z, int y, int x1, int x2); +void setline_y(int z, int x, int y1, int y2); +void clrline_z(int x, int y, int z1, int z2); +void clrline_x(int z, int y, int x1, int x2); +void clrline_y(int z, int x, int y1, int y2); +void fill(unsigned char pattern); +void tmpfill(unsigned char pattern); +void line(int x1, int y1, int z1, int x2, int y2, int z2); +void drawchar(char chr, int offset, int layer); +char flipbyte(char byte); +void charfly (char chr, int direction, char axis, int mode, int delay); +void strfly (char * str, int direction, char axis, int mode, int delay, int pause); +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2); +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2); +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2); +char byteline (int start, int end); + +void tmp2cube (void); +void shift (char axis, int direction); + +#endif + diff --git a/cube_pc_test1/draw.lst b/cube_pc_test1/draw.lst new file mode 100644 index 0000000..8881094 --- /dev/null +++ b/cube_pc_test1/draw.lst @@ -0,0 +1,2472 @@ + 1 .file "draw.c" + 2 __SREG__ = 0x3f + 3 __SP_H__ = 0x3e + 4 __SP_L__ = 0x3d + 5 __CCP__ = 0x34 + 6 __tmp_reg__ = 0 + 7 __zero_reg__ = 1 + 8 .global __do_copy_data + 9 .global __do_clear_bss + 17 .Ltext0: + 18 .global setvoxel + 20 setvoxel: + 21 .LFB2: + 22 .LM1: + 23 .LVL0: + 24 /* prologue: function */ + 25 /* frame size = 0 */ + 26 0000 DC01 movw r26,r24 + 27 .LBB94: + 28 .LBB95: + 29 .LM2: + 30 0002 8830 cpi r24,8 + 31 0004 9105 cpc r25,__zero_reg__ + 32 0006 00F4 brsh .L3 + 33 0008 77FD sbrc r23,7 + 34 000a 00C0 rjmp .L3 + 35 000c 6830 cpi r22,8 + 36 000e 7105 cpc r23,__zero_reg__ + 37 0010 04F4 brge .L3 + 38 0012 57FD sbrc r21,7 + 39 0014 00C0 rjmp .L3 + 40 0016 4830 cpi r20,8 + 41 0018 5105 cpc r21,__zero_reg__ + 42 001a 04F4 brge .L3 + 43 .LBE95: + 44 .LBE94: + 45 .LM3: + 46 001c FA01 movw r30,r20 + 47 001e 83E0 ldi r24,3 + 48 0020 EE0F 1: lsl r30 + 49 0022 FF1F rol r31 + 50 0024 8A95 dec r24 + 51 0026 01F4 brne 1b + 52 .LVL1: + 53 0028 E60F add r30,r22 + 54 002a F71F adc r31,r23 + 55 002c E050 subi r30,lo8(-(cube)) + 56 002e F040 sbci r31,hi8(-(cube)) + 57 0030 2081 ld r18,Z + 58 0032 81E0 ldi r24,lo8(1) + 59 0034 90E0 ldi r25,hi8(1) + 60 0036 00C0 rjmp 2f + 61 0038 880F 1: lsl r24 + 62 003a 991F rol r25 + 63 003c AA95 2: dec r26 + 64 003e 02F4 brpl 1b + 65 0040 282B or r18,r24 + 66 0042 2083 st Z,r18 + 67 .LVL2: + 68 .L3: + 69 0044 0895 ret + 70 .LFE2: + 72 .global tmpsetvoxel + 74 tmpsetvoxel: + 75 .LFB3: + 76 .LM4: + 77 .LVL3: + 78 /* prologue: function */ + 79 /* frame size = 0 */ + 80 0046 DC01 movw r26,r24 + 81 .LBB96: + 82 .LBB97: + 83 .LM5: + 84 0048 8830 cpi r24,8 + 85 004a 9105 cpc r25,__zero_reg__ + 86 004c 00F4 brsh .L6 + 87 004e 77FD sbrc r23,7 + 88 0050 00C0 rjmp .L6 + 89 0052 6830 cpi r22,8 + 90 0054 7105 cpc r23,__zero_reg__ + 91 0056 04F4 brge .L6 + 92 0058 57FD sbrc r21,7 + 93 005a 00C0 rjmp .L6 + 94 005c 4830 cpi r20,8 + 95 005e 5105 cpc r21,__zero_reg__ + 96 0060 04F4 brge .L6 + 97 .LBE97: + 98 .LBE96: + 99 .LM6: + 100 0062 FA01 movw r30,r20 + 101 0064 93E0 ldi r25,3 + 102 0066 EE0F 1: lsl r30 + 103 0068 FF1F rol r31 + 104 006a 9A95 dec r25 + 105 006c 01F4 brne 1b + 106 006e E60F add r30,r22 + 107 0070 F71F adc r31,r23 + 108 0072 E050 subi r30,lo8(-(fb)) + 109 0074 F040 sbci r31,hi8(-(fb)) + 110 0076 2081 ld r18,Z + 111 0078 81E0 ldi r24,lo8(1) + 112 007a 90E0 ldi r25,hi8(1) + 113 .LVL4: + 114 007c 00C0 rjmp 2f + 115 007e 880F 1: lsl r24 + 116 0080 991F rol r25 + 117 0082 AA95 2: dec r26 + 118 0084 02F4 brpl 1b + 119 0086 282B or r18,r24 + 120 0088 2083 st Z,r18 + 121 .LVL5: + 122 .L6: + 123 008a 0895 ret + 124 .LFE3: + 126 .global clrvoxel + 128 clrvoxel: + 129 .LFB4: + 130 .LM7: + 131 .LVL6: + 132 /* prologue: function */ + 133 /* frame size = 0 */ + 134 008c DC01 movw r26,r24 + 135 .LBB98: + 136 .LBB99: + 137 .LM8: + 138 008e 8830 cpi r24,8 + 139 0090 9105 cpc r25,__zero_reg__ + 140 0092 00F4 brsh .L9 + 141 0094 77FD sbrc r23,7 + 142 0096 00C0 rjmp .L9 + 143 0098 6830 cpi r22,8 + 144 009a 7105 cpc r23,__zero_reg__ + 145 009c 04F4 brge .L9 + 146 009e 57FD sbrc r21,7 + 147 00a0 00C0 rjmp .L9 + 148 00a2 4830 cpi r20,8 + 149 00a4 5105 cpc r21,__zero_reg__ + 150 00a6 04F4 brge .L9 + 151 .LBE99: + 152 .LBE98: + 153 .LM9: + 154 00a8 FA01 movw r30,r20 + 155 00aa 23E0 ldi r18,3 + 156 00ac EE0F 1: lsl r30 + 157 00ae FF1F rol r31 + 158 00b0 2A95 dec r18 + 159 00b2 01F4 brne 1b + 160 00b4 E60F add r30,r22 + 161 00b6 F71F adc r31,r23 + 162 00b8 E050 subi r30,lo8(-(cube)) + 163 00ba F040 sbci r31,hi8(-(cube)) + 164 00bc 2081 ld r18,Z + 165 00be 81E0 ldi r24,lo8(1) + 166 00c0 90E0 ldi r25,hi8(1) + 167 .LVL7: + 168 00c2 00C0 rjmp 2f + 169 00c4 880F 1: lsl r24 + 170 00c6 991F rol r25 + 171 00c8 AA95 2: dec r26 + 172 00ca 02F4 brpl 1b + 173 00cc 8095 com r24 + 174 00ce 8223 and r24,r18 + 175 00d0 8083 st Z,r24 + 176 .LVL8: + 177 .L9: + 178 00d2 0895 ret + 179 .LFE4: + 181 .global tmpclrvoxel + 183 tmpclrvoxel: + 184 .LFB5: + 185 .LM10: + 186 .LVL9: + 187 /* prologue: function */ + 188 /* frame size = 0 */ + 189 00d4 DC01 movw r26,r24 + 190 .LBB100: + 191 .LBB101: + 192 .LM11: + 193 00d6 8830 cpi r24,8 + 194 00d8 9105 cpc r25,__zero_reg__ + 195 00da 00F4 brsh .L12 + 196 00dc 77FD sbrc r23,7 + 197 00de 00C0 rjmp .L12 + 198 00e0 6830 cpi r22,8 + 199 00e2 7105 cpc r23,__zero_reg__ + 200 00e4 04F4 brge .L12 + 201 00e6 57FD sbrc r21,7 + 202 00e8 00C0 rjmp .L12 + 203 00ea 4830 cpi r20,8 + 204 00ec 5105 cpc r21,__zero_reg__ + 205 00ee 04F4 brge .L12 + 206 .LBE101: + 207 .LBE100: + 208 .LM12: + 209 00f0 FA01 movw r30,r20 + 210 00f2 33E0 ldi r19,3 + 211 00f4 EE0F 1: lsl r30 + 212 00f6 FF1F rol r31 + 213 00f8 3A95 dec r19 + 214 00fa 01F4 brne 1b + 215 00fc E60F add r30,r22 + 216 00fe F71F adc r31,r23 + 217 0100 E050 subi r30,lo8(-(fb)) + 218 0102 F040 sbci r31,hi8(-(fb)) + 219 0104 2081 ld r18,Z + 220 0106 81E0 ldi r24,lo8(1) + 221 0108 90E0 ldi r25,hi8(1) + 222 .LVL10: + 223 010a 00C0 rjmp 2f + 224 010c 880F 1: lsl r24 + 225 010e 991F rol r25 + 226 0110 AA95 2: dec r26 + 227 0112 02F4 brpl 1b + 228 0114 8095 com r24 + 229 0116 8223 and r24,r18 + 230 0118 8083 st Z,r24 + 231 .LVL11: + 232 .L12: + 233 011a 0895 ret + 234 .LFE5: + 236 .global inrange + 238 inrange: + 239 .LFB6: + 240 .LM13: + 241 .LVL12: + 242 /* prologue: function */ + 243 /* frame size = 0 */ + 244 .LM14: + 245 011c 0897 sbiw r24,8 + 246 011e 00F4 brsh .L14 + 247 0120 77FD sbrc r23,7 + 248 0122 00C0 rjmp .L14 + 249 0124 6830 cpi r22,8 + 250 0126 7105 cpc r23,__zero_reg__ + 251 0128 04F4 brge .L14 + 252 012a 57FD sbrc r21,7 + 253 012c 00C0 rjmp .L14 + 254 012e 90E0 ldi r25,lo8(0) + 255 0130 4830 cpi r20,8 + 256 0132 5105 cpc r21,__zero_reg__ + 257 0134 04F0 brlt .L15 + 258 0136 91E0 ldi r25,lo8(1) + 259 .L15: + 260 0138 81E0 ldi r24,lo8(1) + 261 .LVL13: + 262 013a 9827 eor r25,r24 + 263 013c 00C0 rjmp .L16 + 264 .LVL14: + 265 .L14: + 266 013e 90E0 ldi r25,lo8(0) + 267 .L16: + 268 .LM15: + 269 0140 892F mov r24,r25 + 270 .LVL15: + 271 /* epilogue start */ + 272 0142 0895 ret + 273 .LFE6: + 275 .global getvoxel + 277 getvoxel: + 278 .LFB7: + 279 .LM16: + 280 .LVL16: + 281 /* prologue: function */ + 282 /* frame size = 0 */ + 283 0144 9C01 movw r18,r24 + 284 0146 FA01 movw r30,r20 + 285 .LBB102: + 286 .LBB103: + 287 .LM17: + 288 0148 8830 cpi r24,8 + 289 014a 9105 cpc r25,__zero_reg__ + 290 014c 00F4 brsh .L19 + 291 .LVL17: + 292 014e 77FD sbrc r23,7 + 293 0150 00C0 rjmp .L19 + 294 0152 6830 cpi r22,8 + 295 0154 7105 cpc r23,__zero_reg__ + 296 0156 04F4 brge .L19 + 297 0158 57FD sbrc r21,7 + 298 015a 00C0 rjmp .L19 + 299 .LVL18: + 300 015c 4830 cpi r20,8 + 301 015e 5105 cpc r21,__zero_reg__ + 302 0160 04F4 brge .L19 + 303 .LBE103: + 304 .LBE102: + 305 .LM18: + 306 0162 43E0 ldi r20,3 + 307 0164 EE0F 1: lsl r30 + 308 0166 FF1F rol r31 + 309 0168 4A95 dec r20 + 310 016a 01F4 brne 1b + 311 .LVL19: + 312 016c E60F add r30,r22 + 313 016e F71F adc r31,r23 + 314 0170 E050 subi r30,lo8(-(cube)) + 315 0172 F040 sbci r31,hi8(-(cube)) + 316 0174 8081 ld r24,Z + 317 .LVL20: + 318 0176 90E0 ldi r25,lo8(0) + 319 0178 00C0 rjmp 2f + 320 017a 9595 1: asr r25 + 321 017c 8795 ror r24 + 322 017e 2A95 2: dec r18 + 323 0180 02F4 brpl 1b + 324 0182 8170 andi r24,lo8(1) + 325 0184 0895 ret + 326 .LVL21: + 327 .L19: + 328 0186 80E0 ldi r24,lo8(0) + 329 .LVL22: + 330 .LM19: + 331 0188 0895 ret + 332 .LFE7: + 334 .global altervoxel + 336 altervoxel: + 337 .LFB8: + 338 .LM20: + 339 .LVL23: + 340 /* prologue: function */ + 341 /* frame size = 0 */ + 342 018a DC01 movw r26,r24 + 343 .LM21: + 344 018c 2130 cpi r18,1 + 345 018e 3105 cpc r19,__zero_reg__ + 346 0190 01F4 brne .L23 + 347 .LVL24: + 348 .LBB104: + 349 .LBB105: + 350 .LBB106: + 351 .LBB107: + 352 .LM22: + 353 0192 8830 cpi r24,8 + 354 0194 9105 cpc r25,__zero_reg__ + 355 0196 00F4 brsh .L25 + 356 .LVL25: + 357 0198 77FD sbrc r23,7 + 358 019a 00C0 rjmp .L25 + 359 019c 6830 cpi r22,8 + 360 019e 7105 cpc r23,__zero_reg__ + 361 01a0 04F4 brge .L25 + 362 01a2 57FD sbrc r21,7 + 363 01a4 00C0 rjmp .L25 + 364 01a6 4830 cpi r20,8 + 365 01a8 5105 cpc r21,__zero_reg__ + 366 01aa 04F4 brge .L25 + 367 .LBE107: + 368 .LBE106: + 369 .LM23: + 370 01ac FA01 movw r30,r20 + 371 01ae 53E0 ldi r21,3 + 372 01b0 EE0F 1: lsl r30 + 373 01b2 FF1F rol r31 + 374 01b4 5A95 dec r21 + 375 01b6 01F4 brne 1b + 376 01b8 E60F add r30,r22 + 377 01ba F71F adc r31,r23 + 378 01bc E050 subi r30,lo8(-(cube)) + 379 01be F040 sbci r31,hi8(-(cube)) + 380 01c0 8081 ld r24,Z + 381 .LVL26: + 382 01c2 00C0 rjmp 2f + 383 01c4 220F 1: lsl r18 + 384 01c6 331F rol r19 + 385 01c8 AA95 2: dec r26 + 386 01ca 02F4 brpl 1b + 387 .LVL27: + 388 01cc 822B or r24,r18 + 389 01ce 8083 st Z,r24 + 390 01d0 0895 ret + 391 .LVL28: + 392 .L23: + 393 .LBE105: + 394 .LBE104: + 395 .LM24: + 396 01d2 0E94 0000 call clrvoxel + 397 .LVL29: + 398 .L25: + 399 01d6 0895 ret + 400 .LFE8: + 402 .global flpvoxel + 404 flpvoxel: + 405 .LFB9: + 406 .LM25: + 407 .LVL30: + 408 /* prologue: function */ + 409 /* frame size = 0 */ + 410 01d8 DC01 movw r26,r24 + 411 .LBB108: + 412 .LBB109: + 413 .LM26: + 414 01da 8830 cpi r24,8 + 415 01dc 9105 cpc r25,__zero_reg__ + 416 01de 00F4 brsh .L28 + 417 01e0 77FD sbrc r23,7 + 418 01e2 00C0 rjmp .L28 + 419 01e4 6830 cpi r22,8 + 420 01e6 7105 cpc r23,__zero_reg__ + 421 01e8 04F4 brge .L28 + 422 01ea 57FD sbrc r21,7 + 423 01ec 00C0 rjmp .L28 + 424 01ee 4830 cpi r20,8 + 425 01f0 5105 cpc r21,__zero_reg__ + 426 01f2 04F4 brge .L28 + 427 .LBE109: + 428 .LBE108: + 429 .LM27: + 430 01f4 FA01 movw r30,r20 + 431 01f6 B3E0 ldi r27,3 + 432 01f8 EE0F 1: lsl r30 + 433 01fa FF1F rol r31 + 434 01fc BA95 dec r27 + 435 01fe 01F4 brne 1b + 436 0200 E60F add r30,r22 + 437 0202 F71F adc r31,r23 + 438 0204 E050 subi r30,lo8(-(cube)) + 439 0206 F040 sbci r31,hi8(-(cube)) + 440 0208 2081 ld r18,Z + 441 020a 81E0 ldi r24,lo8(1) + 442 020c 90E0 ldi r25,hi8(1) + 443 .LVL31: + 444 020e 00C0 rjmp 2f + 445 0210 880F 1: lsl r24 + 446 0212 991F rol r25 + 447 0214 AA95 2: dec r26 + 448 0216 02F4 brpl 1b + 449 0218 2827 eor r18,r24 + 450 021a 2083 st Z,r18 + 451 .LVL32: + 452 .L28: + 453 021c 0895 ret + 454 .LFE9: + 456 .global argorder + 458 argorder: + 459 .LFB10: + 460 .LM28: + 461 .LVL33: + 462 021e CF93 push r28 + 463 0220 DF93 push r29 + 464 /* prologue: function */ + 465 /* frame size = 0 */ + 466 0222 FC01 movw r30,r24 + 467 0224 DA01 movw r26,r20 + 468 0226 E901 movw r28,r18 + 469 .LM29: + 470 0228 6817 cp r22,r24 + 471 022a 7907 cpc r23,r25 + 472 022c 04F4 brge .L30 + 473 .LVL34: + 474 022e CB01 movw r24,r22 + 475 .LVL35: + 476 0230 BF01 movw r22,r30 + 477 .LVL36: + 478 0232 FC01 movw r30,r24 + 479 .LVL37: + 480 .L30: + 481 .LM30: + 482 0234 ED93 st X+,r30 + 483 0236 FC93 st X,r31 + 484 .LM31: + 485 0238 7983 std Y+1,r23 + 486 023a 6883 st Y,r22 + 487 /* epilogue start */ + 488 .LM32: + 489 023c DF91 pop r29 + 490 023e CF91 pop r28 + 491 .LVL38: + 492 0240 0895 ret + 493 .LFE10: + 495 .global setplane_z + 497 setplane_z: + 498 .LFB11: + 499 .LM33: + 500 .LVL39: + 501 /* prologue: function */ + 502 /* frame size = 0 */ + 503 .LM34: + 504 0242 8830 cpi r24,8 + 505 0244 9105 cpc r25,__zero_reg__ + 506 0246 00F4 brsh .L35 + 507 0248 20E0 ldi r18,lo8(0) + 508 024a 30E0 ldi r19,hi8(0) + 509 .LVL40: + 510 .LM35: + 511 024c 43E0 ldi r20,3 + 512 024e 880F 1: lsl r24 + 513 0250 991F rol r25 + 514 0252 4A95 dec r20 + 515 0254 01F4 brne 1b + 516 .LVL41: + 517 0256 4FEF ldi r20,lo8(-1) + 518 .L34: + 519 0258 FC01 movw r30,r24 + 520 025a E20F add r30,r18 + 521 025c F31F adc r31,r19 + 522 025e E050 subi r30,lo8(-(cube)) + 523 0260 F040 sbci r31,hi8(-(cube)) + 524 0262 4083 st Z,r20 + 525 .LM36: + 526 0264 2F5F subi r18,lo8(-(1)) + 527 0266 3F4F sbci r19,hi8(-(1)) + 528 0268 2830 cpi r18,8 + 529 026a 3105 cpc r19,__zero_reg__ + 530 026c 01F4 brne .L34 + 531 .LVL42: + 532 .L35: + 533 026e 0895 ret + 534 .LFE11: + 536 .global clrplane_z + 538 clrplane_z: + 539 .LFB12: + 540 .LM37: + 541 .LVL43: + 542 /* prologue: function */ + 543 /* frame size = 0 */ + 544 .LM38: + 545 0270 8830 cpi r24,8 + 546 0272 9105 cpc r25,__zero_reg__ + 547 0274 00F4 brsh .L40 + 548 0276 20E0 ldi r18,lo8(0) + 549 0278 30E0 ldi r19,hi8(0) + 550 .LVL44: + 551 .LM39: + 552 027a 53E0 ldi r21,3 + 553 027c 880F 1: lsl r24 + 554 027e 991F rol r25 + 555 0280 5A95 dec r21 + 556 0282 01F4 brne 1b + 557 .LVL45: + 558 .L39: + 559 0284 FC01 movw r30,r24 + 560 0286 E20F add r30,r18 + 561 0288 F31F adc r31,r19 + 562 028a E050 subi r30,lo8(-(cube)) + 563 028c F040 sbci r31,hi8(-(cube)) + 564 028e 1082 st Z,__zero_reg__ + 565 .LM40: + 566 0290 2F5F subi r18,lo8(-(1)) + 567 0292 3F4F sbci r19,hi8(-(1)) + 568 0294 2830 cpi r18,8 + 569 0296 3105 cpc r19,__zero_reg__ + 570 0298 01F4 brne .L39 + 571 .LVL46: + 572 .L40: + 573 029a 0895 ret + 574 .LFE12: + 576 .global setplane_x + 578 setplane_x: + 579 .LFB13: + 580 .LM41: + 581 .LVL47: + 582 /* prologue: function */ + 583 /* frame size = 0 */ + 584 029c 9C01 movw r18,r24 + 585 .LM42: + 586 029e 8830 cpi r24,8 + 587 02a0 9105 cpc r25,__zero_reg__ + 588 02a2 00F4 brsh .L46 + 589 .LM43: + 590 02a4 81E0 ldi r24,lo8(1) + 591 02a6 90E0 ldi r25,hi8(1) + 592 .LVL48: + 593 02a8 00C0 rjmp 2f + 594 02aa 880F 1: lsl r24 + 595 02ac 991F rol r25 + 596 02ae 2A95 2: dec r18 + 597 02b0 02F4 brpl 1b + 598 02b2 982F mov r25,r24 + 599 02b4 40E0 ldi r20,lo8(0) + 600 02b6 50E0 ldi r21,hi8(0) + 601 .LVL49: + 602 02b8 00C0 rjmp .L44 + 603 .LVL50: + 604 .L45: + 605 02ba FB01 movw r30,r22 + 606 02bc E20F add r30,r18 + 607 02be F31F adc r31,r19 + 608 02c0 E050 subi r30,lo8(-(cube)) + 609 02c2 F040 sbci r31,hi8(-(cube)) + 610 02c4 8081 ld r24,Z + 611 02c6 892B or r24,r25 + 612 02c8 8083 st Z,r24 + 613 .LM44: + 614 02ca 2F5F subi r18,lo8(-(1)) + 615 02cc 3F4F sbci r19,hi8(-(1)) + 616 02ce 2830 cpi r18,8 + 617 02d0 3105 cpc r19,__zero_reg__ + 618 02d2 01F4 brne .L45 + 619 .LM45: + 620 02d4 4F5F subi r20,lo8(-(1)) + 621 02d6 5F4F sbci r21,hi8(-(1)) + 622 02d8 4830 cpi r20,8 + 623 02da 5105 cpc r21,__zero_reg__ + 624 02dc 01F0 breq .L46 + 625 .LVL51: + 626 .L44: + 627 02de 20E0 ldi r18,lo8(0) + 628 02e0 30E0 ldi r19,hi8(0) + 629 .LVL52: + 630 .LM46: + 631 02e2 BA01 movw r22,r20 + 632 02e4 E3E0 ldi r30,3 + 633 02e6 660F 1: lsl r22 + 634 02e8 771F rol r23 + 635 02ea EA95 dec r30 + 636 02ec 01F4 brne 1b + 637 02ee 00C0 rjmp .L45 + 638 .LVL53: + 639 .L46: + 640 02f0 0895 ret + 641 .LFE13: + 643 .global clrplane_x + 645 clrplane_x: + 646 .LFB14: + 647 .LM47: + 648 .LVL54: + 649 /* prologue: function */ + 650 /* frame size = 0 */ + 651 02f2 9C01 movw r18,r24 + 652 .LM48: + 653 02f4 8830 cpi r24,8 + 654 02f6 9105 cpc r25,__zero_reg__ + 655 02f8 00F4 brsh .L52 + 656 .LM49: + 657 02fa 81E0 ldi r24,lo8(1) + 658 02fc 90E0 ldi r25,hi8(1) + 659 .LVL55: + 660 02fe 00C0 rjmp 2f + 661 0300 880F 1: lsl r24 + 662 0302 991F rol r25 + 663 0304 2A95 2: dec r18 + 664 0306 02F4 brpl 1b + 665 0308 982F mov r25,r24 + 666 030a 9095 com r25 + 667 030c 40E0 ldi r20,lo8(0) + 668 030e 50E0 ldi r21,hi8(0) + 669 .LVL56: + 670 0310 00C0 rjmp .L50 + 671 .LVL57: + 672 .L51: + 673 0312 FB01 movw r30,r22 + 674 0314 E20F add r30,r18 + 675 0316 F31F adc r31,r19 + 676 0318 E050 subi r30,lo8(-(cube)) + 677 031a F040 sbci r31,hi8(-(cube)) + 678 031c 8081 ld r24,Z + 679 031e 8923 and r24,r25 + 680 0320 8083 st Z,r24 + 681 .LM50: + 682 0322 2F5F subi r18,lo8(-(1)) + 683 0324 3F4F sbci r19,hi8(-(1)) + 684 0326 2830 cpi r18,8 + 685 0328 3105 cpc r19,__zero_reg__ + 686 032a 01F4 brne .L51 + 687 .LM51: + 688 032c 4F5F subi r20,lo8(-(1)) + 689 032e 5F4F sbci r21,hi8(-(1)) + 690 0330 4830 cpi r20,8 + 691 0332 5105 cpc r21,__zero_reg__ + 692 0334 01F0 breq .L52 + 693 .LVL58: + 694 .L50: + 695 0336 20E0 ldi r18,lo8(0) + 696 0338 30E0 ldi r19,hi8(0) + 697 .LVL59: + 698 .LM52: + 699 033a BA01 movw r22,r20 + 700 033c F3E0 ldi r31,3 + 701 033e 660F 1: lsl r22 + 702 0340 771F rol r23 + 703 0342 FA95 dec r31 + 704 0344 01F4 brne 1b + 705 0346 00C0 rjmp .L51 + 706 .LVL60: + 707 .L52: + 708 0348 0895 ret + 709 .LFE14: + 711 .global setplane_y + 713 setplane_y: + 714 .LFB15: + 715 .LM53: + 716 .LVL61: + 717 /* prologue: function */ + 718 /* frame size = 0 */ + 719 .LM54: + 720 034a 8830 cpi r24,8 + 721 034c 9105 cpc r25,__zero_reg__ + 722 034e 00F4 brsh .L57 + 723 0350 20E0 ldi r18,lo8(0) + 724 0352 30E0 ldi r19,hi8(0) + 725 .LVL62: + 726 .LM55: + 727 0354 4FEF ldi r20,lo8(-1) + 728 .L56: + 729 0356 F901 movw r30,r18 + 730 0358 A3E0 ldi r26,3 + 731 035a EE0F 1: lsl r30 + 732 035c FF1F rol r31 + 733 035e AA95 dec r26 + 734 0360 01F4 brne 1b + 735 0362 E80F add r30,r24 + 736 0364 F91F adc r31,r25 + 737 0366 E050 subi r30,lo8(-(cube)) + 738 0368 F040 sbci r31,hi8(-(cube)) + 739 036a 4083 st Z,r20 + 740 .LM56: + 741 036c 2F5F subi r18,lo8(-(1)) + 742 036e 3F4F sbci r19,hi8(-(1)) + 743 0370 2830 cpi r18,8 + 744 0372 3105 cpc r19,__zero_reg__ + 745 0374 01F4 brne .L56 + 746 .L57: + 747 0376 0895 ret + 748 .LFE15: + 750 .global clrplane_y + 752 clrplane_y: + 753 .LFB16: + 754 .LM57: + 755 .LVL63: + 756 /* prologue: function */ + 757 /* frame size = 0 */ + 758 .LM58: + 759 0378 8830 cpi r24,8 + 760 037a 9105 cpc r25,__zero_reg__ + 761 037c 00F4 brsh .L62 + 762 037e 20E0 ldi r18,lo8(0) + 763 0380 30E0 ldi r19,hi8(0) + 764 .LVL64: + 765 .L61: + 766 .LM59: + 767 0382 F901 movw r30,r18 + 768 0384 B3E0 ldi r27,3 + 769 0386 EE0F 1: lsl r30 + 770 0388 FF1F rol r31 + 771 038a BA95 dec r27 + 772 038c 01F4 brne 1b + 773 038e E80F add r30,r24 + 774 0390 F91F adc r31,r25 + 775 0392 E050 subi r30,lo8(-(cube)) + 776 0394 F040 sbci r31,hi8(-(cube)) + 777 0396 1082 st Z,__zero_reg__ + 778 .LM60: + 779 0398 2F5F subi r18,lo8(-(1)) + 780 039a 3F4F sbci r19,hi8(-(1)) + 781 039c 2830 cpi r18,8 + 782 039e 3105 cpc r19,__zero_reg__ + 783 03a0 01F4 brne .L61 + 784 .L62: + 785 03a2 0895 ret + 786 .LFE16: + 788 .global fill + 790 fill: + 791 .LFB17: + 792 .LM61: + 793 .LVL65: + 794 /* prologue: function */ + 795 /* frame size = 0 */ + 796 .LM62: + 797 03a4 40E0 ldi r20,lo8(0) + 798 03a6 50E0 ldi r21,hi8(0) + 799 .LVL66: + 800 03a8 00C0 rjmp .L65 + 801 .LVL67: + 802 .L66: + 803 .LM63: + 804 03aa FB01 movw r30,r22 + 805 03ac E20F add r30,r18 + 806 03ae F31F adc r31,r19 + 807 03b0 E050 subi r30,lo8(-(cube)) + 808 03b2 F040 sbci r31,hi8(-(cube)) + 809 03b4 8083 st Z,r24 + 810 .LM64: + 811 03b6 2F5F subi r18,lo8(-(1)) + 812 03b8 3F4F sbci r19,hi8(-(1)) + 813 03ba 2830 cpi r18,8 + 814 03bc 3105 cpc r19,__zero_reg__ + 815 03be 01F4 brne .L66 + 816 .LM65: + 817 03c0 4F5F subi r20,lo8(-(1)) + 818 03c2 5F4F sbci r21,hi8(-(1)) + 819 03c4 4830 cpi r20,8 + 820 03c6 5105 cpc r21,__zero_reg__ + 821 03c8 01F0 breq .L68 + 822 .L65: + 823 03ca 20E0 ldi r18,lo8(0) + 824 03cc 30E0 ldi r19,hi8(0) + 825 .LM66: + 826 03ce BA01 movw r22,r20 + 827 03d0 93E0 ldi r25,3 + 828 03d2 660F 1: lsl r22 + 829 03d4 771F rol r23 + 830 03d6 9A95 dec r25 + 831 03d8 01F4 brne 1b + 832 03da 00C0 rjmp .L66 + 833 .L68: + 834 03dc 0895 ret + 835 .LFE17: + 837 .global tmpfill + 839 tmpfill: + 840 .LFB18: + 841 .LM67: + 842 .LVL68: + 843 /* prologue: function */ + 844 /* frame size = 0 */ + 845 .LM68: + 846 03de 40E0 ldi r20,lo8(0) + 847 03e0 50E0 ldi r21,hi8(0) + 848 .LVL69: + 849 03e2 00C0 rjmp .L71 + 850 .LVL70: + 851 .L72: + 852 .LM69: + 853 03e4 FB01 movw r30,r22 + 854 03e6 E20F add r30,r18 + 855 03e8 F31F adc r31,r19 + 856 03ea E050 subi r30,lo8(-(fb)) + 857 03ec F040 sbci r31,hi8(-(fb)) + 858 03ee 8083 st Z,r24 + 859 .LM70: + 860 03f0 2F5F subi r18,lo8(-(1)) + 861 03f2 3F4F sbci r19,hi8(-(1)) + 862 03f4 2830 cpi r18,8 + 863 03f6 3105 cpc r19,__zero_reg__ + 864 03f8 01F4 brne .L72 + 865 .LM71: + 866 03fa 4F5F subi r20,lo8(-(1)) + 867 03fc 5F4F sbci r21,hi8(-(1)) + 868 03fe 4830 cpi r20,8 + 869 0400 5105 cpc r21,__zero_reg__ + 870 0402 01F0 breq .L74 + 871 .L71: + 872 0404 20E0 ldi r18,lo8(0) + 873 0406 30E0 ldi r19,hi8(0) + 874 .LM72: + 875 0408 BA01 movw r22,r20 + 876 040a E3E0 ldi r30,3 + 877 040c 660F 1: lsl r22 + 878 040e 771F rol r23 + 879 0410 EA95 dec r30 + 880 0412 01F4 brne 1b + 881 0414 00C0 rjmp .L72 + 882 .L74: + 883 0416 0895 ret + 884 .LFE18: + 886 .global box_filled + 888 box_filled: + 889 .LFB19: + 890 .LM73: + 891 .LVL71: + 892 0418 EF92 push r14 + 893 .LVL72: + 894 041a FF92 push r15 + 895 041c 0F93 push r16 + 896 .LVL73: + 897 041e 1F93 push r17 + 898 0420 CF93 push r28 + 899 0422 DF93 push r29 + 900 /* prologue: function */ + 901 /* frame size = 0 */ + 902 0424 DC01 movw r26,r24 + 903 0426 EB01 movw r28,r22 + 904 0428 F901 movw r30,r18 + 905 .LBB110: + 906 .LBB111: + 907 .LM74: + 908 042a 2817 cp r18,r24 + 909 042c 3907 cpc r19,r25 + 910 042e 04F4 brge .L77 + 911 .LVL74: + 912 0430 D901 movw r26,r18 + 913 .LVL75: + 914 0432 FC01 movw r30,r24 + 915 .LVL76: + 916 .L77: + 917 .LBE111: + 918 .LBE110: + 919 .LBB112: + 920 .LBB113: + 921 0434 0C17 cp r16,r28 + 922 0436 1D07 cpc r17,r29 + 923 .LVL77: + 924 0438 04F4 brge .L78 + 925 043a CE01 movw r24,r28 + 926 .LVL78: + 927 043c E801 movw r28,r16 + 928 .LVL79: + 929 043e 8C01 movw r16,r24 + 930 .LVL80: + 931 .L78: + 932 .LBE113: + 933 .LBE112: + 934 .LBB114: + 935 .LBB115: + 936 0440 E416 cp r14,r20 + 937 0442 F506 cpc r15,r21 + 938 .LVL81: + 939 0444 04F4 brge .L79 + 940 0446 CA01 movw r24,r20 + 941 .LVL82: + 942 0448 A701 movw r20,r14 + 943 .LVL83: + 944 044a 7C01 movw r14,r24 + 945 .LVL84: + 946 .L79: + 947 .LBE115: + 948 .LBE114: + 949 .LBB116: + 950 .LBB117: + 951 .LM75: + 952 044c 3196 adiw r30,1 + 953 044e 8FEF ldi r24,lo8(255) + 954 0450 90E0 ldi r25,hi8(255) + 955 0452 9C01 movw r18,r24 + 956 0454 00C0 rjmp 2f + 957 0456 220F 1: lsl r18 + 958 0458 331F rol r19 + 959 045a EA95 2: dec r30 + 960 045c 02F4 brpl 1b + 961 045e 2095 com r18 + 962 0460 00C0 rjmp 2f + 963 0462 880F 1: lsl r24 + 964 0464 991F rol r25 + 965 0466 AA95 2: dec r26 + 966 0468 02F4 brpl 1b + 967 046a 2823 and r18,r24 + 968 046c 00C0 rjmp .L80 + 969 .LVL85: + 970 .L81: + 971 .LBE117: + 972 .LBE116: + 973 .LM76: + 974 046e FB01 movw r30,r22 + 975 .LVL86: + 976 0470 EA0F add r30,r26 + 977 0472 FB1F adc r31,r27 + 978 0474 E050 subi r30,lo8(-(cube)) + 979 0476 F040 sbci r31,hi8(-(cube)) + 980 0478 8081 ld r24,Z + 981 047a 822B or r24,r18 + 982 047c 8083 st Z,r24 + 983 .LM77: + 984 047e 1196 adiw r26,1 + 985 .LVL87: + 986 .L83: + 987 0480 0A17 cp r16,r26 + 988 0482 1B07 cpc r17,r27 + 989 0484 04F4 brge .L81 + 990 .LM78: + 991 0486 4F5F subi r20,lo8(-(1)) + 992 0488 5F4F sbci r21,hi8(-(1)) + 993 .LVL88: + 994 .L80: + 995 048a E416 cp r14,r20 + 996 048c F506 cpc r15,r21 + 997 048e 04F0 brlt .L84 + 998 0490 DE01 movw r26,r28 + 999 .LVL89: + 1000 .LM79: + 1001 0492 BA01 movw r22,r20 + 1002 0494 F3E0 ldi r31,3 + 1003 0496 660F 1: lsl r22 + 1004 0498 771F rol r23 + 1005 049a FA95 dec r31 + 1006 049c 01F4 brne 1b + 1007 049e 00C0 rjmp .L83 + 1008 .LVL90: + 1009 .L84: + 1010 /* epilogue start */ + 1011 .LM80: + 1012 04a0 DF91 pop r29 + 1013 04a2 CF91 pop r28 + 1014 .LVL91: + 1015 04a4 1F91 pop r17 + 1016 04a6 0F91 pop r16 + 1017 .LVL92: + 1018 04a8 FF90 pop r15 + 1019 04aa EF90 pop r14 + 1020 .LVL93: + 1021 04ac 0895 ret + 1022 .LFE19: + 1024 .global box_walls + 1026 box_walls: + 1027 .LFB20: + 1028 .LM81: + 1029 .LVL94: + 1030 04ae CF92 push r12 + 1031 04b0 DF92 push r13 + 1032 04b2 EF92 push r14 + 1033 .LVL95: + 1034 04b4 FF92 push r15 + 1035 04b6 0F93 push r16 + 1036 .LVL96: + 1037 04b8 1F93 push r17 + 1038 04ba CF93 push r28 + 1039 04bc DF93 push r29 + 1040 /* prologue: function */ + 1041 /* frame size = 0 */ + 1042 04be DC01 movw r26,r24 + 1043 04c0 F901 movw r30,r18 + 1044 .LBB118: + 1045 .LBB119: + 1046 .LM82: + 1047 04c2 2817 cp r18,r24 + 1048 04c4 3907 cpc r19,r25 + 1049 04c6 04F4 brge .L86 + 1050 04c8 D901 movw r26,r18 + 1051 .LVL97: + 1052 04ca FC01 movw r30,r24 + 1053 .LVL98: + 1054 .L86: + 1055 .LBE119: + 1056 .LBE118: + 1057 .LBB120: + 1058 .LBB121: + 1059 04cc 0617 cp r16,r22 + 1060 04ce 1707 cpc r17,r23 + 1061 .LVL99: + 1062 04d0 04F4 brge .L87 + 1063 04d2 CB01 movw r24,r22 + 1064 .LVL100: + 1065 04d4 B801 movw r22,r16 + 1066 .LVL101: + 1067 04d6 8C01 movw r16,r24 + 1068 .LVL102: + 1069 .L87: + 1070 .LBE121: + 1071 .LBE120: + 1072 .LBB122: + 1073 .LBB123: + 1074 04d8 E416 cp r14,r20 + 1075 04da F506 cpc r15,r21 + 1076 .LVL103: + 1077 04dc 04F4 brge .L88 + 1078 04de CA01 movw r24,r20 + 1079 .LVL104: + 1080 04e0 A701 movw r20,r14 + 1081 .LVL105: + 1082 04e2 7C01 movw r14,r24 + 1083 .LVL106: + 1084 .L88: + 1085 .LBE123: + 1086 .LBE122: + 1087 .LM83: + 1088 04e4 81E0 ldi r24,lo8(1) + 1089 04e6 90E0 ldi r25,hi8(1) + 1090 04e8 9C01 movw r18,r24 + 1091 04ea 0E2E mov r0,r30 + 1092 04ec 00C0 rjmp 2f + 1093 04ee 220F 1: lsl r18 + 1094 04f0 331F rol r19 + 1095 04f2 0A94 2: dec r0 + 1096 04f4 02F4 brpl 1b + 1097 04f6 0A2E mov r0,r26 + 1098 04f8 00C0 rjmp 2f + 1099 04fa 880F 1: lsl r24 + 1100 04fc 991F rol r25 + 1101 04fe 0A94 2: dec r0 + 1102 0500 02F4 brpl 1b + 1103 0502 C22E mov r12,r18 + 1104 0504 C82A or r12,r24 + 1105 .LBB124: + 1106 .LBB125: + 1107 .LM84: + 1108 0506 3196 adiw r30,1 + 1109 0508 8FEF ldi r24,lo8(255) + 1110 050a 90E0 ldi r25,hi8(255) + 1111 050c 9C01 movw r18,r24 + 1112 050e 00C0 rjmp 2f + 1113 0510 220F 1: lsl r18 + 1114 0512 331F rol r19 + 1115 0514 EA95 2: dec r30 + 1116 0516 02F4 brpl 1b + 1117 0518 D22E mov r13,r18 + 1118 051a D094 com r13 + 1119 051c 00C0 rjmp 2f + 1120 051e 880F 1: lsl r24 + 1121 0520 991F rol r25 + 1122 0522 AA95 2: dec r26 + 1123 0524 02F4 brpl 1b + 1124 0526 D822 and r13,r24 + 1125 0528 9A01 movw r18,r20 + 1126 .LVL107: + 1127 052a 00C0 rjmp .L89 + 1128 .LVL108: + 1129 .L93: + 1130 .LBE125: + 1131 .LBE124: + 1132 .LM85: + 1133 052c A617 cp r26,r22 + 1134 052e B707 cpc r27,r23 + 1135 0530 01F0 breq .L90 + 1136 0532 A017 cp r26,r16 + 1137 0534 B107 cpc r27,r17 + 1138 0536 01F0 breq .L90 + 1139 0538 2417 cp r18,r20 + 1140 053a 3507 cpc r19,r21 + 1141 053c 01F0 breq .L90 + 1142 053e 2E15 cp r18,r14 + 1143 0540 3F05 cpc r19,r15 + 1144 0542 01F4 brne .L91 + 1145 .L90: + 1146 .LM86: + 1147 0544 FE01 movw r30,r28 + 1148 .LVL109: + 1149 0546 EA0F add r30,r26 + 1150 0548 FB1F adc r31,r27 + 1151 054a E050 subi r30,lo8(-(cube)) + 1152 054c F040 sbci r31,hi8(-(cube)) + 1153 054e D082 st Z,r13 + 1154 0550 00C0 rjmp .L92 + 1155 .LVL110: + 1156 .L91: + 1157 .LM87: + 1158 0552 FE01 movw r30,r28 + 1159 .LVL111: + 1160 0554 EA0F add r30,r26 + 1161 0556 FB1F adc r31,r27 + 1162 0558 E050 subi r30,lo8(-(cube)) + 1163 055a F040 sbci r31,hi8(-(cube)) + 1164 055c 8081 ld r24,Z + 1165 055e 8C29 or r24,r12 + 1166 0560 8083 st Z,r24 + 1167 .L92: + 1168 .LM88: + 1169 0562 1196 adiw r26,1 + 1170 .LVL112: + 1171 .L95: + 1172 0564 0A17 cp r16,r26 + 1173 0566 1B07 cpc r17,r27 + 1174 0568 04F4 brge .L93 + 1175 .LM89: + 1176 056a 2F5F subi r18,lo8(-(1)) + 1177 056c 3F4F sbci r19,hi8(-(1)) + 1178 .LVL113: + 1179 .L89: + 1180 056e E216 cp r14,r18 + 1181 0570 F306 cpc r15,r19 + 1182 0572 04F0 brlt .L96 + 1183 0574 DB01 movw r26,r22 + 1184 .LVL114: + 1185 .LM90: + 1186 0576 E901 movw r28,r18 + 1187 0578 83E0 ldi r24,3 + 1188 057a CC0F 1: lsl r28 + 1189 057c DD1F rol r29 + 1190 057e 8A95 dec r24 + 1191 0580 01F4 brne 1b + 1192 0582 00C0 rjmp .L95 + 1193 .LVL115: + 1194 .L96: + 1195 /* epilogue start */ + 1196 .LM91: + 1197 0584 DF91 pop r29 + 1198 0586 CF91 pop r28 + 1199 0588 1F91 pop r17 + 1200 058a 0F91 pop r16 + 1201 .LVL116: + 1202 058c FF90 pop r15 + 1203 058e EF90 pop r14 + 1204 .LVL117: + 1205 0590 DF90 pop r13 + 1206 0592 CF90 pop r12 + 1207 0594 0895 ret + 1208 .LFE20: + 1210 .global box_wireframe + 1212 box_wireframe: + 1213 .LFB21: + 1214 .LM92: + 1215 .LVL118: + 1216 0596 8F92 push r8 + 1217 0598 9F92 push r9 + 1218 059a AF92 push r10 + 1219 059c BF92 push r11 + 1220 059e CF92 push r12 + 1221 05a0 DF92 push r13 + 1222 05a2 EF92 push r14 + 1223 .LVL119: + 1224 05a4 FF92 push r15 + 1225 05a6 0F93 push r16 + 1226 .LVL120: + 1227 05a8 1F93 push r17 + 1228 05aa CF93 push r28 + 1229 05ac DF93 push r29 + 1230 /* prologue: function */ + 1231 /* frame size = 0 */ + 1232 05ae 4C01 movw r8,r24 + 1233 05b0 6B01 movw r12,r22 + 1234 05b2 EA01 movw r28,r20 + 1235 05b4 5901 movw r10,r18 + 1236 .LBB126: + 1237 .LBB127: + 1238 .LM93: + 1239 05b6 2817 cp r18,r24 + 1240 05b8 3907 cpc r19,r25 + 1241 05ba 04F4 brge .L98 + 1242 .LVL121: + 1243 05bc 4901 movw r8,r18 + 1244 .LVL122: + 1245 05be 5C01 movw r10,r24 + 1246 .LVL123: + 1247 .L98: + 1248 .LBE127: + 1249 .LBE126: + 1250 .LBB128: + 1251 .LBB129: + 1252 05c0 0C15 cp r16,r12 + 1253 05c2 1D05 cpc r17,r13 + 1254 .LVL124: + 1255 05c4 04F4 brge .L99 + 1256 05c6 C601 movw r24,r12 + 1257 .LVL125: + 1258 05c8 6801 movw r12,r16 + 1259 .LVL126: + 1260 05ca 8C01 movw r16,r24 + 1261 .LVL127: + 1262 .L99: + 1263 .LBE129: + 1264 .LBE128: + 1265 .LBB130: + 1266 .LBB131: + 1267 05cc EC16 cp r14,r28 + 1268 05ce FD06 cpc r15,r29 + 1269 .LVL128: + 1270 05d0 04F4 brge .L100 + 1271 05d2 CE01 movw r24,r28 + 1272 .LVL129: + 1273 05d4 E701 movw r28,r14 + 1274 .LVL130: + 1275 05d6 7C01 movw r14,r24 + 1276 .LVL131: + 1277 .L100: + 1278 .LBE131: + 1279 .LBE130: + 1280 .LBB132: + 1281 .LBB133: + 1282 .LM94: + 1283 05d8 0894 sec + 1284 05da A11C adc r10,__zero_reg__ + 1285 05dc B11C adc r11,__zero_reg__ + 1286 05de 8FEF ldi r24,lo8(255) + 1287 05e0 90E0 ldi r25,hi8(255) + 1288 05e2 9C01 movw r18,r24 + 1289 05e4 0A2C mov r0,r10 + 1290 05e6 00C0 rjmp 2f + 1291 05e8 220F 1: lsl r18 + 1292 05ea 331F rol r19 + 1293 05ec 0A94 2: dec r0 + 1294 05ee 02F4 brpl 1b + 1295 05f0 0894 sec + 1296 05f2 A108 sbc r10,__zero_reg__ + 1297 05f4 B108 sbc r11,__zero_reg__ + 1298 05f6 2095 com r18 + 1299 05f8 082C mov r0,r8 + 1300 05fa 00C0 rjmp 2f + 1301 05fc 880F 1: lsl r24 + 1302 05fe 991F rol r25 + 1303 0600 0A94 2: dec r0 + 1304 0602 02F4 brpl 1b + 1305 0604 2823 and r18,r24 + 1306 .LBE133: + 1307 .LBE132: + 1308 .LM95: + 1309 0606 BE01 movw r22,r28 + 1310 0608 83E0 ldi r24,3 + 1311 060a 660F 1: lsl r22 + 1312 060c 771F rol r23 + 1313 060e 8A95 dec r24 + 1314 0610 01F4 brne 1b + 1315 0612 FB01 movw r30,r22 + 1316 0614 EC0D add r30,r12 + 1317 0616 FD1D adc r31,r13 + 1318 0618 E050 subi r30,lo8(-(cube)) + 1319 061a F040 sbci r31,hi8(-(cube)) + 1320 061c 2083 st Z,r18 + 1321 .LM96: + 1322 061e FB01 movw r30,r22 + 1323 0620 E00F add r30,r16 + 1324 0622 F11F adc r31,r17 + 1325 0624 E050 subi r30,lo8(-(cube)) + 1326 0626 F040 sbci r31,hi8(-(cube)) + 1327 0628 2083 st Z,r18 + 1328 .LM97: + 1329 062a A701 movw r20,r14 + 1330 062c B3E0 ldi r27,3 + 1331 062e 440F 1: lsl r20 + 1332 0630 551F rol r21 + 1333 0632 BA95 dec r27 + 1334 0634 01F4 brne 1b + 1335 0636 FA01 movw r30,r20 + 1336 0638 EC0D add r30,r12 + 1337 063a FD1D adc r31,r13 + 1338 063c E050 subi r30,lo8(-(cube)) + 1339 063e F040 sbci r31,hi8(-(cube)) + 1340 0640 2083 st Z,r18 + 1341 .LM98: + 1342 0642 FA01 movw r30,r20 + 1343 0644 E00F add r30,r16 + 1344 0646 F11F adc r31,r17 + 1345 0648 E050 subi r30,lo8(-(cube)) + 1346 064a F040 sbci r31,hi8(-(cube)) + 1347 064c 2083 st Z,r18 + 1348 .LBB134: + 1349 .LBB135: + 1350 .LM99: + 1351 064e 81E0 ldi r24,lo8(1) + 1352 0650 90E0 ldi r25,hi8(1) + 1353 0652 9C01 movw r18,r24 + 1354 0654 082C mov r0,r8 + 1355 0656 00C0 rjmp 2f + 1356 0658 220F 1: lsl r18 + 1357 065a 331F rol r19 + 1358 065c 0A94 2: dec r0 + 1359 065e 02F4 brpl 1b + 1360 .LBE135: + 1361 .LBE134: + 1362 .LBB139: + 1363 .LBB140: + 1364 0660 0A2C mov r0,r10 + 1365 0662 00C0 rjmp 2f + 1366 0664 880F 1: lsl r24 + 1367 0666 991F rol r25 + 1368 0668 0A94 2: dec r0 + 1369 066a 02F4 brpl 1b + 1370 066c 982F mov r25,r24 + 1371 066e D601 movw r26,r12 + 1372 .LVL132: + 1373 0670 00C0 rjmp .L101 + 1374 .L106: + 1375 .LBE140: + 1376 .LBE139: + 1377 .LBB144: + 1378 .LBB138: + 1379 .LBB136: + 1380 .LBB137: + 1381 .LM100: + 1382 0672 88E0 ldi r24,lo8(8) + 1383 0674 8816 cp r8,r24 + 1384 0676 9104 cpc r9,__zero_reg__ + 1385 0678 00F4 brsh .L102 + 1386 067a B7FD sbrc r27,7 + 1387 067c 00C0 rjmp .L102 + 1388 067e A830 cpi r26,8 + 1389 0680 B105 cpc r27,__zero_reg__ + 1390 0682 04F4 brge .L102 + 1391 0684 D7FD sbrc r29,7 + 1392 0686 00C0 rjmp .L103 + 1393 0688 C830 cpi r28,8 + 1394 068a D105 cpc r29,__zero_reg__ + 1395 068c 04F4 brge .L103 + 1396 .LBE137: + 1397 .LBE136: + 1398 .LM101: + 1399 068e FB01 movw r30,r22 + 1400 0690 EA0F add r30,r26 + 1401 0692 FB1F adc r31,r27 + 1402 0694 E050 subi r30,lo8(-(cube)) + 1403 0696 F040 sbci r31,hi8(-(cube)) + 1404 0698 8081 ld r24,Z + 1405 069a 822B or r24,r18 + 1406 069c 8083 st Z,r24 + 1407 .L103: + 1408 .LBE138: + 1409 .LBE144: + 1410 .LBB145: + 1411 .LBB146: + 1412 .LBB147: + 1413 .LBB148: + 1414 .LM102: + 1415 069e F7FC sbrc r15,7 + 1416 06a0 00C0 rjmp .L102 + 1417 06a2 88E0 ldi r24,lo8(8) + 1418 06a4 E816 cp r14,r24 + 1419 06a6 F104 cpc r15,__zero_reg__ + 1420 06a8 04F4 brge .L102 + 1421 .LBE148: + 1422 .LBE147: + 1423 .LM103: + 1424 06aa FA01 movw r30,r20 + 1425 06ac EA0F add r30,r26 + 1426 06ae FB1F adc r31,r27 + 1427 06b0 E050 subi r30,lo8(-(cube)) + 1428 06b2 F040 sbci r31,hi8(-(cube)) + 1429 06b4 8081 ld r24,Z + 1430 06b6 822B or r24,r18 + 1431 06b8 8083 st Z,r24 + 1432 .L102: + 1433 .LBE146: + 1434 .LBE145: + 1435 .LBB149: + 1436 .LBB143: + 1437 .LBB141: + 1438 .LBB142: + 1439 .LM104: + 1440 06ba 88E0 ldi r24,lo8(8) + 1441 06bc A816 cp r10,r24 + 1442 06be B104 cpc r11,__zero_reg__ + 1443 06c0 00F4 brsh .L104 + 1444 06c2 B7FD sbrc r27,7 + 1445 06c4 00C0 rjmp .L104 + 1446 06c6 A830 cpi r26,8 + 1447 06c8 B105 cpc r27,__zero_reg__ + 1448 06ca 04F4 brge .L104 + 1449 06cc D7FD sbrc r29,7 + 1450 06ce 00C0 rjmp .L105 + 1451 06d0 C830 cpi r28,8 + 1452 06d2 D105 cpc r29,__zero_reg__ + 1453 06d4 04F4 brge .L105 + 1454 .LBE142: + 1455 .LBE141: + 1456 .LM105: + 1457 06d6 FB01 movw r30,r22 + 1458 06d8 EA0F add r30,r26 + 1459 06da FB1F adc r31,r27 + 1460 06dc E050 subi r30,lo8(-(cube)) + 1461 06de F040 sbci r31,hi8(-(cube)) + 1462 06e0 8081 ld r24,Z + 1463 06e2 892B or r24,r25 + 1464 06e4 8083 st Z,r24 + 1465 .L105: + 1466 .LBE143: + 1467 .LBE149: + 1468 .LBB150: + 1469 .LBB151: + 1470 .LBB152: + 1471 .LBB153: + 1472 .LM106: + 1473 06e6 F7FC sbrc r15,7 + 1474 06e8 00C0 rjmp .L104 + 1475 06ea 88E0 ldi r24,lo8(8) + 1476 06ec E816 cp r14,r24 + 1477 06ee F104 cpc r15,__zero_reg__ + 1478 06f0 04F4 brge .L104 + 1479 .LBE153: + 1480 .LBE152: + 1481 .LM107: + 1482 06f2 FA01 movw r30,r20 + 1483 06f4 EA0F add r30,r26 + 1484 06f6 FB1F adc r31,r27 + 1485 06f8 E050 subi r30,lo8(-(cube)) + 1486 06fa F040 sbci r31,hi8(-(cube)) + 1487 06fc 8081 ld r24,Z + 1488 06fe 892B or r24,r25 + 1489 0700 8083 st Z,r24 + 1490 .L104: + 1491 .LBE151: + 1492 .LBE150: + 1493 .LM108: + 1494 0702 1196 adiw r26,1 + 1495 .L101: + 1496 0704 0A17 cp r16,r26 + 1497 0706 1B07 cpc r17,r27 + 1498 0708 04F0 brlt .+2 + 1499 070a 00C0 rjmp .L106 + 1500 070c AE01 movw r20,r28 + 1501 .LVL133: + 1502 070e 00C0 rjmp .L107 + 1503 .L112: + 1504 .LBB154: + 1505 .LBB155: + 1506 .LBB156: + 1507 .LBB157: + 1508 .LM109: + 1509 0710 88E0 ldi r24,lo8(8) + 1510 0712 8816 cp r8,r24 + 1511 0714 9104 cpc r9,__zero_reg__ + 1512 0716 00F4 brsh .L108 + 1513 0718 D7FC sbrc r13,7 + 1514 071a 00C0 rjmp .L109 + 1515 071c 88E0 ldi r24,lo8(8) + 1516 071e C816 cp r12,r24 + 1517 0720 D104 cpc r13,__zero_reg__ + 1518 0722 04F4 brge .L109 + 1519 0724 57FD sbrc r21,7 + 1520 0726 00C0 rjmp .L109 + 1521 0728 4830 cpi r20,8 + 1522 072a 5105 cpc r21,__zero_reg__ + 1523 072c 04F4 brge .L109 + 1524 .LBE157: + 1525 .LBE156: + 1526 .LM110: + 1527 072e FA01 movw r30,r20 + 1528 0730 A3E0 ldi r26,3 + 1529 0732 EE0F 1: lsl r30 + 1530 0734 FF1F rol r31 + 1531 0736 AA95 dec r26 + 1532 0738 01F4 brne 1b + 1533 .LVL134: + 1534 073a EC0D add r30,r12 + 1535 073c FD1D adc r31,r13 + 1536 073e E050 subi r30,lo8(-(cube)) + 1537 0740 F040 sbci r31,hi8(-(cube)) + 1538 0742 8081 ld r24,Z + 1539 0744 822B or r24,r18 + 1540 0746 8083 st Z,r24 + 1541 .LVL135: + 1542 .L109: + 1543 .LBE155: + 1544 .LBE154: + 1545 .LBB158: + 1546 .LBB159: + 1547 .LBB160: + 1548 .LBB161: + 1549 .LM111: + 1550 0748 17FD sbrc r17,7 + 1551 074a 00C0 rjmp .L108 + 1552 074c 0830 cpi r16,8 + 1553 074e 1105 cpc r17,__zero_reg__ + 1554 0750 04F4 brge .L108 + 1555 0752 57FD sbrc r21,7 + 1556 0754 00C0 rjmp .L108 + 1557 0756 4830 cpi r20,8 + 1558 0758 5105 cpc r21,__zero_reg__ + 1559 075a 04F4 brge .L108 + 1560 .LBE161: + 1561 .LBE160: + 1562 .LM112: + 1563 075c FA01 movw r30,r20 + 1564 075e 73E0 ldi r23,3 + 1565 0760 EE0F 1: lsl r30 + 1566 0762 FF1F rol r31 + 1567 0764 7A95 dec r23 + 1568 0766 01F4 brne 1b + 1569 0768 E00F add r30,r16 + 1570 076a F11F adc r31,r17 + 1571 076c E050 subi r30,lo8(-(cube)) + 1572 076e F040 sbci r31,hi8(-(cube)) + 1573 0770 8081 ld r24,Z + 1574 0772 822B or r24,r18 + 1575 0774 8083 st Z,r24 + 1576 .L108: + 1577 .LBE159: + 1578 .LBE158: + 1579 .LBB162: + 1580 .LBB163: + 1581 .LBB164: + 1582 .LBB165: + 1583 .LM113: + 1584 0776 88E0 ldi r24,lo8(8) + 1585 0778 A816 cp r10,r24 + 1586 077a B104 cpc r11,__zero_reg__ + 1587 077c 00F4 brsh .L110 + 1588 077e D7FC sbrc r13,7 + 1589 0780 00C0 rjmp .L111 + 1590 0782 88E0 ldi r24,lo8(8) + 1591 0784 C816 cp r12,r24 + 1592 0786 D104 cpc r13,__zero_reg__ + 1593 0788 04F4 brge .L111 + 1594 078a 57FD sbrc r21,7 + 1595 078c 00C0 rjmp .L111 + 1596 078e 4830 cpi r20,8 + 1597 0790 5105 cpc r21,__zero_reg__ + 1598 0792 04F4 brge .L111 + 1599 .LBE165: + 1600 .LBE164: + 1601 .LM114: + 1602 0794 FA01 movw r30,r20 + 1603 0796 63E0 ldi r22,3 + 1604 0798 EE0F 1: lsl r30 + 1605 079a FF1F rol r31 + 1606 079c 6A95 dec r22 + 1607 079e 01F4 brne 1b + 1608 07a0 EC0D add r30,r12 + 1609 07a2 FD1D adc r31,r13 + 1610 07a4 E050 subi r30,lo8(-(cube)) + 1611 07a6 F040 sbci r31,hi8(-(cube)) + 1612 07a8 8081 ld r24,Z + 1613 07aa 892B or r24,r25 + 1614 07ac 8083 st Z,r24 + 1615 .L111: + 1616 .LBE163: + 1617 .LBE162: + 1618 .LBB166: + 1619 .LBB167: + 1620 .LBB168: + 1621 .LBB169: + 1622 .LM115: + 1623 07ae 17FD sbrc r17,7 + 1624 07b0 00C0 rjmp .L110 + 1625 07b2 0830 cpi r16,8 + 1626 07b4 1105 cpc r17,__zero_reg__ + 1627 07b6 04F4 brge .L110 + 1628 07b8 57FD sbrc r21,7 + 1629 07ba 00C0 rjmp .L110 + 1630 07bc 4830 cpi r20,8 + 1631 07be 5105 cpc r21,__zero_reg__ + 1632 07c0 04F4 brge .L110 + 1633 .LBE169: + 1634 .LBE168: + 1635 .LM116: + 1636 07c2 FA01 movw r30,r20 + 1637 07c4 33E0 ldi r19,3 + 1638 07c6 EE0F 1: lsl r30 + 1639 07c8 FF1F rol r31 + 1640 07ca 3A95 dec r19 + 1641 07cc 01F4 brne 1b + 1642 07ce E00F add r30,r16 + 1643 07d0 F11F adc r31,r17 + 1644 07d2 E050 subi r30,lo8(-(cube)) + 1645 07d4 F040 sbci r31,hi8(-(cube)) + 1646 07d6 8081 ld r24,Z + 1647 07d8 892B or r24,r25 + 1648 07da 8083 st Z,r24 + 1649 .L110: + 1650 .LBE167: + 1651 .LBE166: + 1652 .LM117: + 1653 07dc 4F5F subi r20,lo8(-(1)) + 1654 07de 5F4F sbci r21,hi8(-(1)) + 1655 .L107: + 1656 07e0 E416 cp r14,r20 + 1657 07e2 F506 cpc r15,r21 + 1658 07e4 04F0 brlt .+2 + 1659 07e6 00C0 rjmp .L112 + 1660 /* epilogue start */ + 1661 .LM118: + 1662 07e8 DF91 pop r29 + 1663 07ea CF91 pop r28 + 1664 .LVL136: + 1665 07ec 1F91 pop r17 + 1666 07ee 0F91 pop r16 + 1667 .LVL137: + 1668 07f0 FF90 pop r15 + 1669 07f2 EF90 pop r14 + 1670 .LVL138: + 1671 07f4 DF90 pop r13 + 1672 07f6 CF90 pop r12 + 1673 .LVL139: + 1674 07f8 BF90 pop r11 + 1675 07fa AF90 pop r10 + 1676 .LVL140: + 1677 07fc 9F90 pop r9 + 1678 07fe 8F90 pop r8 + 1679 .LVL141: + 1680 0800 0895 ret + 1681 .LFE21: + 1683 .global byteline + 1685 byteline: + 1686 .LFB22: + 1687 .LM119: + 1688 .LVL142: + 1689 /* prologue: function */ + 1690 /* frame size = 0 */ + 1691 .LM120: + 1692 0802 6F5F subi r22,lo8(-(1)) + 1693 0804 7F4F sbci r23,hi8(-(1)) + 1694 .LVL143: + 1695 0806 2FEF ldi r18,lo8(255) + 1696 0808 30E0 ldi r19,hi8(255) + 1697 080a A901 movw r20,r18 + 1698 080c 00C0 rjmp 2f + 1699 080e 440F 1: lsl r20 + 1700 0810 551F rol r21 + 1701 0812 6A95 2: dec r22 + 1702 0814 02F4 brpl 1b + 1703 0816 BA01 movw r22,r20 + 1704 .LVL144: + 1705 0818 6095 com r22 + 1706 081a 00C0 rjmp 2f + 1707 081c 220F 1: lsl r18 + 1708 081e 331F rol r19 + 1709 0820 8A95 2: dec r24 + 1710 0822 02F4 brpl 1b + 1711 .LM121: + 1712 0824 862F mov r24,r22 + 1713 .LVL145: + 1714 0826 8223 and r24,r18 + 1715 /* epilogue start */ + 1716 0828 0895 ret + 1717 .LFE22: + 1719 .global flipbyte + 1721 flipbyte: + 1722 .LFB23: + 1723 .LM122: + 1724 .LVL146: + 1725 /* prologue: function */ + 1726 /* frame size = 0 */ + 1727 082a 482F mov r20,r24 + 1728 .LM123: + 1729 082c 282F mov r18,r24 + 1730 082e 30E0 ldi r19,lo8(0) + 1731 0830 8295 swap r24 + 1732 .LVL147: + 1733 0832 8695 lsr r24 + 1734 0834 8270 andi r24,lo8(2) + 1735 0836 942F mov r25,r20 + 1736 0838 991F rol r25 + 1737 083a 9927 clr r25 + 1738 083c 991F rol r25 + 1739 083e 892B or r24,r25 + 1740 0840 942F mov r25,r20 + 1741 0842 9695 lsr r25 + 1742 0844 9695 lsr r25 + 1743 0846 9695 lsr r25 + 1744 0848 9470 andi r25,lo8(4) + 1745 084a 892B or r24,r25 + 1746 084c 4695 lsr r20 + 1747 084e 4870 andi r20,lo8(8) + 1748 0850 842B or r24,r20 + 1749 0852 220F lsl r18 + 1750 0854 331F rol r19 + 1751 0856 922F mov r25,r18 + 1752 0858 9071 andi r25,lo8(16) + 1753 085a 892B or r24,r25 + 1754 085c 220F lsl r18 + 1755 085e 331F rol r19 + 1756 0860 220F lsl r18 + 1757 0862 331F rol r19 + 1758 0864 922F mov r25,r18 + 1759 0866 9072 andi r25,lo8(32) + 1760 0868 892B or r24,r25 + 1761 086a 220F lsl r18 + 1762 086c 331F rol r19 + 1763 086e 220F lsl r18 + 1764 0870 331F rol r19 + 1765 .LVL148: + 1766 0872 922F mov r25,r18 + 1767 0874 9074 andi r25,lo8(64) + 1768 0876 892B or r24,r25 + 1769 0878 220F lsl r18 + 1770 087a 331F rol r19 + 1771 087c 220F lsl r18 + 1772 087e 331F rol r19 + 1773 .LM124: + 1774 0880 822B or r24,r18 + 1775 /* epilogue start */ + 1776 0882 0895 ret + 1777 .LFE23: + 1779 .global line + 1781 line: + 1782 .LFB24: + 1783 .LM125: + 1784 .LVL149: + 1785 0884 2F92 push r2 + 1786 0886 3F92 push r3 + 1787 0888 4F92 push r4 + 1788 088a 5F92 push r5 + 1789 088c 6F92 push r6 + 1790 088e 7F92 push r7 + 1791 0890 8F92 push r8 + 1792 0892 9F92 push r9 + 1793 0894 AF92 push r10 + 1794 0896 BF92 push r11 + 1795 0898 CF92 push r12 + 1796 089a DF92 push r13 + 1797 089c EF92 push r14 + 1798 .LVL150: + 1799 089e FF92 push r15 + 1800 08a0 0F93 push r16 + 1801 .LVL151: + 1802 08a2 1F93 push r17 + 1803 08a4 DF93 push r29 + 1804 08a6 CF93 push r28 + 1805 08a8 CDB7 in r28,__SP_L__ + 1806 08aa DEB7 in r29,__SP_H__ + 1807 08ac 6297 sbiw r28,18 + 1808 08ae 0FB6 in __tmp_reg__,__SREG__ + 1809 08b0 F894 cli + 1810 08b2 DEBF out __SP_H__,r29 + 1811 08b4 0FBE out __SREG__,__tmp_reg__ + 1812 08b6 CDBF out __SP_L__,r28 + 1813 /* prologue: function */ + 1814 /* frame size = 18 */ + 1815 08b8 4C01 movw r8,r24 + 1816 08ba 5B01 movw r10,r22 + 1817 08bc 2A01 movw r4,r20 + 1818 08be 3901 movw r6,r18 + 1819 08c0 6701 movw r12,r14 + 1820 .LVL152: + 1821 .LM126: + 1822 08c2 2817 cp r18,r24 + 1823 08c4 3907 cpc r19,r25 + 1824 08c6 04F4 brge .L119 + 1825 .LVL153: + 1826 08c8 3401 movw r6,r8 + 1827 .LVL154: + 1828 08ca 4901 movw r8,r18 + 1829 08cc C801 movw r24,r16 + 1830 .LVL155: + 1831 08ce 8B01 movw r16,r22 + 1832 .LVL156: + 1833 08d0 5C01 movw r10,r24 + 1834 08d2 6A01 movw r12,r20 + 1835 08d4 2701 movw r4,r14 + 1836 .LVL157: + 1837 .L119: + 1838 08d6 1301 movw r2,r6 + 1839 08d8 2818 sub r2,r8 + 1840 08da 3908 sbc r3,r9 + 1841 .LM127: + 1842 08dc 0A15 cp r16,r10 + 1843 08de 1B05 cpc r17,r11 + 1844 08e0 04F4 brge .L120 + 1845 .LM128: + 1846 08e2 B501 movw r22,r10 + 1847 08e4 601B sub r22,r16 + 1848 08e6 710B sbc r23,r17 + 1849 08e8 8827 clr r24 + 1850 08ea 77FD sbrc r23,7 + 1851 08ec 8095 com r24 + 1852 08ee 982F mov r25,r24 + 1853 08f0 00C0 rjmp .L128 + 1854 .LVL158: + 1855 .L120: + 1856 .LM129: + 1857 08f2 0A19 sub r16,r10 + 1858 08f4 1B09 sbc r17,r11 + 1859 08f6 B801 movw r22,r16 + 1860 08f8 8827 clr r24 + 1861 08fa 77FD sbrc r23,7 + 1862 08fc 8095 com r24 + 1863 08fe 982F mov r25,r24 + 1864 .L128: + 1865 0900 0E94 0000 call __floatsisf + 1866 0904 7B01 movw r14,r22 + 1867 0906 8C01 movw r16,r24 + 1868 0908 B101 movw r22,r2 + 1869 090a 8827 clr r24 + 1870 090c 77FD sbrc r23,7 + 1871 090e 8095 com r24 + 1872 0910 982F mov r25,r24 + 1873 0912 0E94 0000 call __floatsisf + 1874 0916 9B01 movw r18,r22 + 1875 0918 AC01 movw r20,r24 + 1876 091a C801 movw r24,r16 + 1877 091c B701 movw r22,r14 + 1878 091e 0E94 0000 call __divsf3 + 1879 0922 6D83 std Y+5,r22 + 1880 0924 7E83 std Y+6,r23 + 1881 0926 8F83 std Y+7,r24 + 1882 0928 9887 std Y+8,r25 + 1883 .LVL159: + 1884 092a 1301 movw r2,r6 + 1885 092c 2818 sub r2,r8 + 1886 092e 3908 sbc r3,r9 + 1887 .LM130: + 1888 0930 C414 cp r12,r4 + 1889 0932 D504 cpc r13,r5 + 1890 0934 04F4 brge .L122 + 1891 .LM131: + 1892 0936 B201 movw r22,r4 + 1893 0938 6C19 sub r22,r12 + 1894 093a 7D09 sbc r23,r13 + 1895 093c 8827 clr r24 + 1896 093e 77FD sbrc r23,7 + 1897 0940 8095 com r24 + 1898 0942 982F mov r25,r24 + 1899 0944 00C0 rjmp .L129 + 1900 .L122: + 1901 .LM132: + 1902 0946 C418 sub r12,r4 + 1903 0948 D508 sbc r13,r5 + 1904 094a B601 movw r22,r12 + 1905 094c 8827 clr r24 + 1906 094e 77FD sbrc r23,7 + 1907 0950 8095 com r24 + 1908 0952 982F mov r25,r24 + 1909 .L129: + 1910 0954 0E94 0000 call __floatsisf + 1911 0958 7B01 movw r14,r22 + 1912 095a 8C01 movw r16,r24 + 1913 095c B101 movw r22,r2 + 1914 095e 8827 clr r24 + 1915 0960 77FD sbrc r23,7 + 1916 0962 8095 com r24 + 1917 0964 982F mov r25,r24 + 1918 0966 0E94 0000 call __floatsisf + 1919 096a 9B01 movw r18,r22 + 1920 096c AC01 movw r20,r24 + 1921 096e C801 movw r24,r16 + 1922 0970 B701 movw r22,r14 + 1923 0972 0E94 0000 call __divsf3 + 1924 0976 6983 std Y+1,r22 + 1925 0978 7A83 std Y+2,r23 + 1926 097a 8B83 std Y+3,r24 + 1927 097c 9C83 std Y+4,r25 + 1928 .LVL160: + 1929 .LM133: + 1930 097e 382C mov r3,r8 + 1931 .LVL161: + 1932 .LM134: + 1933 0980 C501 movw r24,r10 + 1934 0982 AA27 clr r26 + 1935 0984 97FD sbrc r25,7 + 1936 0986 A095 com r26 + 1937 0988 BA2F mov r27,r26 + 1938 098a 8987 std Y+9,r24 + 1939 098c 9A87 std Y+10,r25 + 1940 098e AB87 std Y+11,r26 + 1941 0990 BC87 std Y+12,r27 + 1942 0992 C201 movw r24,r4 + 1943 0994 AA27 clr r26 + 1944 0996 97FD sbrc r25,7 + 1945 0998 A095 com r26 + 1946 099a BA2F mov r27,r26 + 1947 099c 8D87 std Y+13,r24 + 1948 099e 9E87 std Y+14,r25 + 1949 09a0 AF87 std Y+15,r26 + 1950 09a2 B88B std Y+16,r27 + 1951 09a4 00C0 rjmp .L124 + 1952 .L126: + 1953 .LBB170: + 1954 .LBB172: + 1955 .LBB174: + 1956 .LBB176: + 1957 .LM135: + 1958 09a6 A989 ldd r26,Y+17 + 1959 09a8 BA89 ldd r27,Y+18 + 1960 09aa A830 cpi r26,8 + 1961 09ac B105 cpc r27,__zero_reg__ + 1962 09ae 00F0 brlo .+2 + 1963 09b0 00C0 rjmp .L125 + 1964 .LBE176: + 1965 .LBE174: + 1966 .LBE172: + 1967 .LBE170: + 1968 .LM136: + 1969 09b2 BD01 movw r22,r26 + 1970 09b4 6819 sub r22,r8 + 1971 09b6 7909 sbc r23,r9 + 1972 09b8 8827 clr r24 + 1973 09ba 77FD sbrc r23,7 + 1974 09bc 8095 com r24 + 1975 09be 982F mov r25,r24 + 1976 09c0 0E94 0000 call __floatsisf + 1977 09c4 5B01 movw r10,r22 + 1978 09c6 6C01 movw r12,r24 + 1979 .LVL162: + 1980 .LM137: + 1981 09c8 6D81 ldd r22,Y+5 + 1982 09ca 7E81 ldd r23,Y+6 + 1983 09cc 8F81 ldd r24,Y+7 + 1984 09ce 9885 ldd r25,Y+8 + 1985 09d0 A601 movw r20,r12 + 1986 09d2 9501 movw r18,r10 + 1987 09d4 0E94 0000 call __mulsf3 + 1988 09d8 7B01 movw r14,r22 + 1989 09da 8C01 movw r16,r24 + 1990 09dc 6985 ldd r22,Y+9 + 1991 09de 7A85 ldd r23,Y+10 + 1992 09e0 8B85 ldd r24,Y+11 + 1993 09e2 9C85 ldd r25,Y+12 + 1994 09e4 0E94 0000 call __floatsisf + 1995 09e8 9B01 movw r18,r22 + 1996 09ea AC01 movw r20,r24 + 1997 09ec C801 movw r24,r16 + 1998 09ee B701 movw r22,r14 + 1999 09f0 0E94 0000 call __addsf3 + 2000 09f4 0E94 0000 call __fixunssfsi + 2001 09f8 462E mov r4,r22 + 2002 .LVL163: + 2003 09fa 5524 clr r5 + 2004 .LBB180: + 2005 .LBB171: + 2006 .LBB173: + 2007 .LBB175: + 2008 .LM138: + 2009 09fc B8E0 ldi r27,lo8(8) + 2010 09fe 4B16 cp r4,r27 + 2011 0a00 5104 cpc r5,__zero_reg__ + 2012 0a02 04F4 brge .L125 + 2013 .LBE175: + 2014 .LBE173: + 2015 .LBE171: + 2016 .LBE180: + 2017 .LM139: + 2018 0a04 6981 ldd r22,Y+1 + 2019 0a06 7A81 ldd r23,Y+2 + 2020 0a08 8B81 ldd r24,Y+3 + 2021 0a0a 9C81 ldd r25,Y+4 + 2022 0a0c A601 movw r20,r12 + 2023 0a0e 9501 movw r18,r10 + 2024 0a10 0E94 0000 call __mulsf3 + 2025 0a14 7B01 movw r14,r22 + 2026 0a16 8C01 movw r16,r24 + 2027 0a18 6D85 ldd r22,Y+13 + 2028 0a1a 7E85 ldd r23,Y+14 + 2029 0a1c 8F85 ldd r24,Y+15 + 2030 0a1e 9889 ldd r25,Y+16 + 2031 0a20 0E94 0000 call __floatsisf + 2032 0a24 9B01 movw r18,r22 + 2033 0a26 AC01 movw r20,r24 + 2034 0a28 C801 movw r24,r16 + 2035 0a2a B701 movw r22,r14 + 2036 0a2c 0E94 0000 call __addsf3 + 2037 0a30 0E94 0000 call __fixunssfsi + 2038 0a34 70E0 ldi r23,lo8(0) + 2039 .LBB181: + 2040 .LBB179: + 2041 .LBB178: + 2042 .LBB177: + 2043 .LM140: + 2044 0a36 6830 cpi r22,8 + 2045 0a38 7105 cpc r23,__zero_reg__ + 2046 0a3a 04F4 brge .L125 + 2047 .LBE177: + 2048 .LBE178: + 2049 .LM141: + 2050 0a3c FB01 movw r30,r22 + 2051 0a3e 73E0 ldi r23,3 + 2052 0a40 EE0F 1: lsl r30 + 2053 0a42 FF1F rol r31 + 2054 0a44 7A95 dec r23 + 2055 0a46 01F4 brne 1b + 2056 0a48 E40D add r30,r4 + 2057 0a4a F51D adc r31,r5 + 2058 0a4c E050 subi r30,lo8(-(cube)) + 2059 0a4e F040 sbci r31,hi8(-(cube)) + 2060 0a50 2081 ld r18,Z + 2061 0a52 81E0 ldi r24,lo8(1) + 2062 0a54 90E0 ldi r25,hi8(1) + 2063 0a56 0988 ldd r0,Y+17 + 2064 0a58 00C0 rjmp 2f + 2065 0a5a 880F 1: lsl r24 + 2066 0a5c 991F rol r25 + 2067 0a5e 0A94 2: dec r0 + 2068 0a60 02F4 brpl 1b + 2069 0a62 282B or r18,r24 + 2070 0a64 2083 st Z,r18 + 2071 .LVL164: + 2072 .L125: + 2073 .LBE179: + 2074 .LBE181: + 2075 .LM142: + 2076 0a66 3394 inc r3 + 2077 .L124: + 2078 0a68 E32D mov r30,r3 + 2079 0a6a F0E0 ldi r31,lo8(0) + 2080 0a6c FA8B std Y+18,r31 + 2081 0a6e E98B std Y+17,r30 + 2082 0a70 6E16 cp r6,r30 + 2083 0a72 7F06 cpc r7,r31 + 2084 0a74 04F0 brlt .+2 + 2085 0a76 00C0 rjmp .L126 + 2086 /* epilogue start */ + 2087 .LM143: + 2088 0a78 6296 adiw r28,18 + 2089 0a7a 0FB6 in __tmp_reg__,__SREG__ + 2090 0a7c F894 cli + 2091 0a7e DEBF out __SP_H__,r29 + 2092 0a80 0FBE out __SREG__,__tmp_reg__ + 2093 0a82 CDBF out __SP_L__,r28 + 2094 0a84 CF91 pop r28 + 2095 0a86 DF91 pop r29 + 2096 0a88 1F91 pop r17 + 2097 0a8a 0F91 pop r16 + 2098 .LVL165: + 2099 0a8c FF90 pop r15 + 2100 0a8e EF90 pop r14 + 2101 0a90 DF90 pop r13 + 2102 0a92 CF90 pop r12 + 2103 .LVL166: + 2104 0a94 BF90 pop r11 + 2105 0a96 AF90 pop r10 + 2106 .LVL167: + 2107 0a98 9F90 pop r9 + 2108 0a9a 8F90 pop r8 + 2109 .LVL168: + 2110 0a9c 7F90 pop r7 + 2111 0a9e 6F90 pop r6 + 2112 .LVL169: + 2113 0aa0 5F90 pop r5 + 2114 0aa2 4F90 pop r4 + 2115 .LVL170: + 2116 0aa4 3F90 pop r3 + 2117 .LVL171: + 2118 0aa6 2F90 pop r2 + 2119 0aa8 0895 ret + 2120 .LFE24: + 2122 .global delay_ms + 2124 delay_ms: + 2125 .LFB25: + 2126 .LM144: + 2127 .LVL172: + 2128 /* prologue: function */ + 2129 /* frame size = 0 */ + 2130 0aaa 00C0 rjmp .L131 + 2131 .LVL173: + 2132 .L133: + 2133 .LM145: + 2134 0aac 20E0 ldi r18,lo8(0) + 2135 .L132: + 2136 .LM146: + 2137 /* #APP */ + 2138 ; 350 "draw.c" 1 + 2139 0aae 0000 nop + 2140 ; 0 "" 2 + 2141 ; 350 "draw.c" 1 + 2142 0ab0 0000 nop + 2143 ; 0 "" 2 + 2144 ; 350 "draw.c" 1 + 2145 0ab2 0000 nop + 2146 ; 0 "" 2 + 2147 ; 350 "draw.c" 1 + 2148 0ab4 0000 nop + 2149 ; 0 "" 2 + 2150 ; 350 "draw.c" 1 + 2151 0ab6 0000 nop + 2152 ; 0 "" 2 + 2153 ; 350 "draw.c" 1 + 2154 0ab8 0000 nop + 2155 ; 0 "" 2 + 2156 .LM147: + 2157 /* #NOAPP */ + 2158 0aba 2F5F subi r18,lo8(-(1)) + 2159 0abc 2A35 cpi r18,lo8(90) + 2160 0abe 01F4 brne .L132 + 2161 .LM148: + 2162 0ac0 0197 sbiw r24,1 + 2163 .LVL174: + 2164 .L131: + 2165 0ac2 0097 sbiw r24,0 + 2166 0ac4 01F4 brne .L133 + 2167 /* epilogue start */ + 2168 .LM149: + 2169 0ac6 0895 ret + 2170 .LFE25: + 2172 .global tmp2cube + 2174 tmp2cube: + 2175 .LFB26: + 2176 .LM150: + 2177 /* prologue: function */ + 2178 /* frame size = 0 */ + 2179 .LM151: + 2180 0ac8 40E0 ldi r20,lo8(0) + 2181 0aca 50E0 ldi r21,hi8(0) + 2182 .LVL175: + 2183 0acc 00C0 rjmp .L137 + 2184 .LVL176: + 2185 .L138: + 2186 .LM152: + 2187 0ace FB01 movw r30,r22 + 2188 0ad0 E20F add r30,r18 + 2189 0ad2 F31F adc r31,r19 + 2190 0ad4 DF01 movw r26,r30 + 2191 0ad6 A050 subi r26,lo8(-(fb)) + 2192 0ad8 B040 sbci r27,hi8(-(fb)) + 2193 0ada 8C91 ld r24,X + 2194 0adc E050 subi r30,lo8(-(cube)) + 2195 0ade F040 sbci r31,hi8(-(cube)) + 2196 0ae0 8083 st Z,r24 + 2197 .LM153: + 2198 0ae2 2F5F subi r18,lo8(-(1)) + 2199 0ae4 3F4F sbci r19,hi8(-(1)) + 2200 0ae6 2830 cpi r18,8 + 2201 0ae8 3105 cpc r19,__zero_reg__ + 2202 0aea 01F4 brne .L138 + 2203 .LM154: + 2204 0aec 4F5F subi r20,lo8(-(1)) + 2205 0aee 5F4F sbci r21,hi8(-(1)) + 2206 0af0 4830 cpi r20,8 + 2207 0af2 5105 cpc r21,__zero_reg__ + 2208 0af4 01F0 breq .L140 + 2209 .L137: + 2210 0af6 20E0 ldi r18,lo8(0) + 2211 0af8 30E0 ldi r19,hi8(0) + 2212 .LM155: + 2213 0afa BA01 movw r22,r20 + 2214 0afc E3E0 ldi r30,3 + 2215 0afe 660F 1: lsl r22 + 2216 0b00 771F rol r23 + 2217 0b02 EA95 dec r30 + 2218 0b04 01F4 brne 1b + 2219 0b06 00C0 rjmp .L138 + 2220 .L140: + 2221 0b08 0895 ret + 2222 .LFE26: + 2224 .global shift + 2226 shift: + 2227 .LFB27: + 2228 .LM156: + 2229 .LVL177: + 2230 0b0a 2F92 push r2 + 2231 0b0c 3F92 push r3 + 2232 0b0e 4F92 push r4 + 2233 0b10 5F92 push r5 + 2234 0b12 6F92 push r6 + 2235 0b14 7F92 push r7 + 2236 0b16 9F92 push r9 + 2237 0b18 AF92 push r10 + 2238 0b1a BF92 push r11 + 2239 0b1c CF92 push r12 + 2240 0b1e DF92 push r13 + 2241 0b20 EF92 push r14 + 2242 0b22 FF92 push r15 + 2243 0b24 0F93 push r16 + 2244 0b26 1F93 push r17 + 2245 0b28 CF93 push r28 + 2246 0b2a DF93 push r29 + 2247 /* prologue: function */ + 2248 /* frame size = 0 */ + 2249 0b2c 982E mov r9,r24 + 2250 0b2e 5B01 movw r10,r22 + 2251 .LM157: + 2252 0b30 CC24 clr r12 + 2253 0b32 DD24 clr r13 + 2254 .LVL178: + 2255 .LM158: + 2256 0b34 A7E0 ldi r26,lo8(7) + 2257 0b36 2A2E mov r2,r26 + 2258 0b38 312C mov r3,__zero_reg__ + 2259 .LVL179: + 2260 .L153: + 2261 0b3a 8FEF ldi r24,lo8(-1) + 2262 0b3c A816 cp r10,r24 + 2263 0b3e 8FEF ldi r24,hi8(-1) + 2264 0b40 B806 cpc r11,r24 + 2265 0b42 01F4 brne .L143 + 2266 0b44 7601 movw r14,r12 + 2267 0b46 00C0 rjmp .L144 + 2268 .L143: + 2269 0b48 7101 movw r14,r2 + 2270 0b4a EC18 sub r14,r12 + 2271 0b4c FD08 sbc r15,r13 + 2272 .L144: + 2273 0b4e 00E0 ldi r16,lo8(0) + 2274 0b50 10E0 ldi r17,hi8(0) + 2275 .LM159: + 2276 0b52 2701 movw r4,r14 + 2277 .LVL180: + 2278 0b54 0894 sec + 2279 0b56 4108 sbc r4,__zero_reg__ + 2280 0b58 5108 sbc r5,__zero_reg__ + 2281 .LM160: + 2282 0b5a 3701 movw r6,r14 + 2283 .LVL181: + 2284 0b5c 0894 sec + 2285 0b5e 611C adc r6,__zero_reg__ + 2286 0b60 711C adc r7,__zero_reg__ + 2287 0b62 00C0 rjmp .L145 + 2288 .LVL182: + 2289 .L151: + 2290 .LM161: + 2291 0b64 8FEF ldi r24,lo8(-1) + 2292 0b66 A816 cp r10,r24 + 2293 0b68 8FEF ldi r24,hi8(-1) + 2294 0b6a B806 cpc r11,r24 + 2295 0b6c 01F4 brne .L146 + 2296 .LM162: + 2297 0b6e C301 movw r24,r6 + 2298 0b70 00C0 rjmp .L166 + 2299 .L146: + 2300 .LM163: + 2301 0b72 C201 movw r24,r4 + 2302 .LVL183: + 2303 .L166: + 2304 0b74 AC01 movw r20,r24 + 2305 .LM164: + 2306 0b76 8AE7 ldi r24,lo8(122) + 2307 0b78 9816 cp r9,r24 + 2308 0b7a 01F4 brne .L148 + 2309 .LVL184: + 2310 .LM165: + 2311 0b7c C801 movw r24,r16 + 2312 0b7e BE01 movw r22,r28 + 2313 0b80 0E94 0000 call getvoxel + 2314 0b84 282F mov r18,r24 + 2315 .LM166: + 2316 0b86 C801 movw r24,r16 + 2317 0b88 BE01 movw r22,r28 + 2318 0b8a A701 movw r20,r14 + 2319 0b8c 00C0 rjmp .L167 + 2320 .LVL185: + 2321 .L148: + 2322 .LM167: + 2323 0b8e 89E7 ldi r24,lo8(121) + 2324 0b90 9816 cp r9,r24 + 2325 0b92 01F4 brne .L150 + 2326 .LM168: + 2327 0b94 C801 movw r24,r16 + 2328 0b96 BA01 movw r22,r20 + 2329 0b98 AE01 movw r20,r28 + 2330 0b9a 0E94 0000 call getvoxel + 2331 0b9e 282F mov r18,r24 + 2332 .LM169: + 2333 0ba0 C801 movw r24,r16 + 2334 0ba2 B701 movw r22,r14 + 2335 0ba4 00C0 rjmp .L169 + 2336 .LVL186: + 2337 .L150: + 2338 .LM170: + 2339 0ba6 88E7 ldi r24,lo8(120) + 2340 0ba8 9816 cp r9,r24 + 2341 0baa 01F4 brne .L149 + 2342 .LM171: + 2343 0bac CA01 movw r24,r20 + 2344 0bae BE01 movw r22,r28 + 2345 0bb0 A801 movw r20,r16 + 2346 0bb2 0E94 0000 call getvoxel + 2347 0bb6 282F mov r18,r24 + 2348 .LM172: + 2349 0bb8 C701 movw r24,r14 + 2350 0bba B801 movw r22,r16 + 2351 .L169: + 2352 0bbc AE01 movw r20,r28 + 2353 .L167: + 2354 0bbe 30E0 ldi r19,lo8(0) + 2355 0bc0 0E94 0000 call altervoxel + 2356 .LVL187: + 2357 .L149: + 2358 .LM173: + 2359 0bc4 2196 adiw r28,1 + 2360 0bc6 C830 cpi r28,8 + 2361 0bc8 D105 cpc r29,__zero_reg__ + 2362 0bca 01F4 brne .L151 + 2363 .LM174: + 2364 0bcc 0F5F subi r16,lo8(-(1)) + 2365 0bce 1F4F sbci r17,hi8(-(1)) + 2366 0bd0 0830 cpi r16,8 + 2367 0bd2 1105 cpc r17,__zero_reg__ + 2368 0bd4 01F0 breq .L152 + 2369 .L145: + 2370 0bd6 C0E0 ldi r28,lo8(0) + 2371 0bd8 D0E0 ldi r29,hi8(0) + 2372 0bda 00C0 rjmp .L151 + 2373 .L152: + 2374 .LM175: + 2375 0bdc 0894 sec + 2376 0bde C11C adc r12,__zero_reg__ + 2377 0be0 D11C adc r13,__zero_reg__ + 2378 0be2 88E0 ldi r24,lo8(8) + 2379 0be4 C816 cp r12,r24 + 2380 0be6 D104 cpc r13,__zero_reg__ + 2381 0be8 01F0 breq .+2 + 2382 0bea 00C0 rjmp .L153 + 2383 .LM176: + 2384 0bec 8FEF ldi r24,lo8(-1) + 2385 0bee A816 cp r10,r24 + 2386 0bf0 8FEF ldi r24,hi8(-1) + 2387 0bf2 B806 cpc r11,r24 + 2388 0bf4 01F0 breq .L154 + 2389 0bf6 EE24 clr r14 + 2390 0bf8 FF24 clr r15 + 2391 .LVL188: + 2392 0bfa 00C0 rjmp .L155 + 2393 .LVL189: + 2394 .L154: + 2395 0bfc F7E0 ldi r31,lo8(7) + 2396 0bfe EF2E mov r14,r31 + 2397 0c00 F12C mov r15,__zero_reg__ + 2398 .LVL190: + 2399 .L155: + 2400 0c02 00E0 ldi r16,lo8(0) + 2401 0c04 10E0 ldi r17,hi8(0) + 2402 .LVL191: + 2403 0c06 00C0 rjmp .L156 + 2404 .L160: + 2405 .LM177: + 2406 0c08 8AE7 ldi r24,lo8(122) + 2407 0c0a 9816 cp r9,r24 + 2408 0c0c 01F4 brne .L157 + 2409 .LM178: + 2410 0c0e C801 movw r24,r16 + 2411 0c10 BE01 movw r22,r28 + 2412 0c12 A701 movw r20,r14 + 2413 0c14 00C0 rjmp .L168 + 2414 .LVL192: + 2415 .L157: + 2416 .LM179: + 2417 0c16 89E7 ldi r24,lo8(121) + 2418 0c18 9816 cp r9,r24 + 2419 0c1a 01F4 brne .L159 + 2420 .LM180: + 2421 0c1c C801 movw r24,r16 + 2422 0c1e B701 movw r22,r14 + 2423 0c20 AE01 movw r20,r28 + 2424 0c22 00C0 rjmp .L168 + 2425 .LVL193: + 2426 .L159: + 2427 .LM181: + 2428 0c24 88E7 ldi r24,lo8(120) + 2429 0c26 9816 cp r9,r24 + 2430 0c28 01F4 brne .L158 + 2431 .LM182: + 2432 0c2a C701 movw r24,r14 + 2433 0c2c BE01 movw r22,r28 + 2434 0c2e A801 movw r20,r16 + 2435 .L168: + 2436 0c30 0E94 0000 call clrvoxel + 2437 .LVL194: + 2438 .L158: + 2439 .LM183: + 2440 0c34 2196 adiw r28,1 + 2441 0c36 C830 cpi r28,8 + 2442 0c38 D105 cpc r29,__zero_reg__ + 2443 0c3a 01F4 brne .L160 + 2444 .LM184: + 2445 0c3c 0F5F subi r16,lo8(-(1)) + 2446 0c3e 1F4F sbci r17,hi8(-(1)) + 2447 0c40 0830 cpi r16,8 + 2448 0c42 1105 cpc r17,__zero_reg__ + 2449 0c44 01F0 breq .L162 + 2450 .L156: + 2451 0c46 C0E0 ldi r28,lo8(0) + 2452 0c48 D0E0 ldi r29,hi8(0) + 2453 0c4a 00C0 rjmp .L160 + 2454 .L162: + 2455 /* epilogue start */ + 2456 .LM185: + 2457 0c4c DF91 pop r29 + 2458 0c4e CF91 pop r28 + 2459 .LVL195: + 2460 0c50 1F91 pop r17 + 2461 0c52 0F91 pop r16 + 2462 .LVL196: + 2463 0c54 FF90 pop r15 + 2464 0c56 EF90 pop r14 + 2465 .LVL197: + 2466 0c58 DF90 pop r13 + 2467 0c5a CF90 pop r12 + 2468 0c5c BF90 pop r11 + 2469 0c5e AF90 pop r10 + 2470 .LVL198: + 2471 0c60 9F90 pop r9 + 2472 .LVL199: + 2473 0c62 7F90 pop r7 + 2474 0c64 6F90 pop r6 + 2475 .LVL200: + 2476 0c66 5F90 pop r5 + 2477 0c68 4F90 pop r4 + 2478 .LVL201: + 2479 0c6a 3F90 pop r3 + 2480 0c6c 2F90 pop r2 + 2481 0c6e 0895 ret + 2482 .LFE27: + 2484 .comm cube,64,1 + 2485 .comm fb,64,1 + 2710 .Letext0: +DEFINED SYMBOLS + *ABS*:0000000000000000 draw.c + /tmp/ccqCtm9Q.s:2 *ABS*:000000000000003f __SREG__ + /tmp/ccqCtm9Q.s:3 *ABS*:000000000000003e __SP_H__ + /tmp/ccqCtm9Q.s:4 *ABS*:000000000000003d __SP_L__ + /tmp/ccqCtm9Q.s:5 *ABS*:0000000000000034 __CCP__ + /tmp/ccqCtm9Q.s:6 *ABS*:0000000000000000 __tmp_reg__ + /tmp/ccqCtm9Q.s:7 *ABS*:0000000000000001 __zero_reg__ + /tmp/ccqCtm9Q.s:20 .text:0000000000000000 setvoxel + *COM*:0000000000000040 cube + /tmp/ccqCtm9Q.s:74 .text:0000000000000046 tmpsetvoxel + *COM*:0000000000000040 fb + /tmp/ccqCtm9Q.s:128 .text:000000000000008c clrvoxel + /tmp/ccqCtm9Q.s:183 .text:00000000000000d4 tmpclrvoxel + /tmp/ccqCtm9Q.s:238 .text:000000000000011c inrange + /tmp/ccqCtm9Q.s:277 .text:0000000000000144 getvoxel + /tmp/ccqCtm9Q.s:336 .text:000000000000018a altervoxel + /tmp/ccqCtm9Q.s:404 .text:00000000000001d8 flpvoxel + /tmp/ccqCtm9Q.s:458 .text:000000000000021e argorder + /tmp/ccqCtm9Q.s:497 .text:0000000000000242 setplane_z + /tmp/ccqCtm9Q.s:538 .text:0000000000000270 clrplane_z + /tmp/ccqCtm9Q.s:578 .text:000000000000029c setplane_x + /tmp/ccqCtm9Q.s:645 .text:00000000000002f2 clrplane_x + /tmp/ccqCtm9Q.s:713 .text:000000000000034a setplane_y + /tmp/ccqCtm9Q.s:752 .text:0000000000000378 clrplane_y + /tmp/ccqCtm9Q.s:790 .text:00000000000003a4 fill + /tmp/ccqCtm9Q.s:839 .text:00000000000003de tmpfill + /tmp/ccqCtm9Q.s:888 .text:0000000000000418 box_filled + /tmp/ccqCtm9Q.s:1026 .text:00000000000004ae box_walls + /tmp/ccqCtm9Q.s:1212 .text:0000000000000596 box_wireframe + /tmp/ccqCtm9Q.s:1685 .text:0000000000000802 byteline + /tmp/ccqCtm9Q.s:1721 .text:000000000000082a flipbyte + /tmp/ccqCtm9Q.s:1781 .text:0000000000000884 line + /tmp/ccqCtm9Q.s:2124 .text:0000000000000aaa delay_ms + /tmp/ccqCtm9Q.s:2174 .text:0000000000000ac8 tmp2cube + /tmp/ccqCtm9Q.s:2226 .text:0000000000000b0a shift + +UNDEFINED SYMBOLS +__do_copy_data +__do_clear_bss +__floatsisf +__divsf3 +__mulsf3 +__addsf3 +__fixunssfsi diff --git a/cube_pc_test1/draw_3d.c b/cube_pc_test1/draw_3d.c new file mode 100644 index 0000000..c3201d9 --- /dev/null +++ b/cube_pc_test1/draw_3d.c @@ -0,0 +1,96 @@ +#include "draw_3d.h" +#include + + +vertex point_rotate_around_point (vertex point, vertex center, float rotation_x, float rotation_y, float rotation_z) +{ + float x, y, z; + float sx,cx, sy,cy, sz,cz; + float xy,xz, yx,yz, zx,zy; + vertex newpoint; + + // Center all the points around 0,0,0 + x = point.x - center.x; + y = point.y - center.y; + z = point.z - center.z; + + // Precalculate sinus and cosinus for each axis rotation + sx = sin(rotation_x); + cx = cos(rotation_x); + + sy = sin(rotation_y); + cy = cos(rotation_y); + + sz = sin(rotation_z); + cz = cos(rotation_z); + + + // Rotation around x + xy = cx*y - sx*z; + xz = sx*y + cx*z; + + // Rotation around y + yz = cy*xz - sy*x; + yx = sy*xz + cy*x; + + // Rotation around z + zx = cz*yx - sz*xy; + zy = sz*yx + cz*xy; + + newpoint.x = zx + center.x; + newpoint.y = zy + center.y; + newpoint.z = yz + center.z; + + + return newpoint; +} + + +// Calculate all 8 corners of a cube. +void calculate_cube_corners (vertex pnt[8], vertex center, float size) +{ + + // Distance from center on any axis. + float dist = size/2; + + // Points + // X Y Z + + pnt[0].x = center.x+dist; pnt[0].y = center.y+dist; pnt[0].z = center.z+dist; // 0 right, front, upper + pnt[1].x = center.x-dist; pnt[1].y = center.y+dist; pnt[1].z = center.z+dist; // 1 left, front, upper + pnt[2].x = center.x+dist; pnt[2].y = center.y-dist; pnt[2].z = center.z+dist; // 2 right, back, upper + pnt[3].x = center.x-dist; pnt[3].y = center.y-dist; pnt[3].z = center.z+dist; // 3 left, back, uppper + pnt[4].x = center.x+dist; pnt[4].y = center.y+dist; pnt[4].z = center.z-dist; // 4 right, front, lower + pnt[5].x = center.x-dist; pnt[5].y = center.y+dist; pnt[5].z = center.z-dist; // 5 left, front, lower + pnt[6].x = center.x+dist; pnt[6].y = center.y-dist; pnt[6].z = center.z-dist; // 6 right, back, lower + pnt[7].x = center.x-dist; pnt[7].y = center.y-dist; pnt[7].z = center.z-dist; // 7 left, bakc, lower + + +} + +void draw_cube_wireframe (vertex pnt[8]) +{ + int i; + + // upper "lid" + line_3d ((int)pnt[0].x,(int)pnt[0].y,(int)pnt[0].z,(int)pnt[1].x,(int)pnt[1].y,(int)pnt[1].z); + line_3d ((int)pnt[2].x,(int)pnt[2].y,(int)pnt[2].z,(int)pnt[3].x,(int)pnt[3].y,(int)pnt[3].z); + line_3d ((int)pnt[1].x,(int)pnt[1].y,(int)pnt[1].z,(int)pnt[3].x,(int)pnt[3].y,(int)pnt[3].z); + line_3d ((int)pnt[2].x,(int)pnt[2].y,(int)pnt[2].z,(int)pnt[0].x,(int)pnt[0].y,(int)pnt[0].z); + + // lower "lid" + line_3d ((int)pnt[4].x,(int)pnt[4].y,(int)pnt[4].z,(int)pnt[5].x,(int)pnt[5].y,(int)pnt[5].z); + line_3d ((int)pnt[6].x,(int)pnt[6].y,(int)pnt[6].z,(int)pnt[7].x,(int)pnt[7].y,(int)pnt[7].z); + line_3d ((int)pnt[5].x,(int)pnt[5].y,(int)pnt[5].z,(int)pnt[7].x,(int)pnt[7].y,(int)pnt[7].z); + line_3d ((int)pnt[6].x,(int)pnt[6].y,(int)pnt[6].z,(int)pnt[4].x,(int)pnt[4].y,(int)pnt[4].z); + + // side walls + line_3d ((int)pnt[0].x,(int)pnt[0].y,(int)pnt[0].z,(int)pnt[4].x,(int)pnt[4].y,(int)pnt[4].z); + line_3d ((int)pnt[1].x,(int)pnt[1].y,(int)pnt[1].z,(int)pnt[5].x,(int)pnt[5].y,(int)pnt[5].z); + line_3d ((int)pnt[2].x,(int)pnt[2].y,(int)pnt[2].z,(int)pnt[6].x,(int)pnt[6].y,(int)pnt[6].z); + line_3d ((int)pnt[3].x,(int)pnt[3].y,(int)pnt[3].z,(int)pnt[7].x,(int)pnt[7].y,(int)pnt[7].z); + +} + + + diff --git a/cube_pc_test1/draw_3d.h b/cube_pc_test1/draw_3d.h new file mode 100644 index 0000000..0f56033 --- /dev/null +++ b/cube_pc_test1/draw_3d.h @@ -0,0 +1,26 @@ +#include + +#ifndef DRAW3D_H +#define DRAW3D_H + + +typedef struct { + float x; + float y; + float z; +} vertex; + +typedef struct { + int x; + int y; + int z; +} intvertex; + +vertex point_rotate_around_point (vertex point, vertex center, float rotation_x, float rotation_y, float rotation_z); + +void rotate_cube_contents(float rx, float ry, float rz); + +void calculate_cube_corners (vertex points[8], vertex center, float size); + + +#endif diff --git a/cube_pc_test1/effect.c b/cube_pc_test1/effect.c new file mode 100644 index 0000000..e6ed54a --- /dev/null +++ b/cube_pc_test1/effect.c @@ -0,0 +1,1478 @@ +#include "effect.h" +#include "draw.h" +#include "font.h" +#include + +void effect_test (void) +{ + + int x,y,i; + + for (i=0;i<1000;i++) + { + x = sin(i/8)*2+3.5; + y = cos(i/8)*2+3.5; + + setvoxel(x,y,1); + setvoxel(x,y,1); + delay_ms(1000); + fill(0x00); + } + +} + + +//void effext_stringfly2 (char *str, char axis, char mirror, char direction, int delay, int space) +void effect_stringfly2(char * str) +{ + int x,y,i,ii; + int state; + + unsigned char chr[5]; + + while (*str) + { + font_getchar(*str++, chr); + + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + setvoxel(7,x+2,y); + } + } + } + + for (ii = 0; ii<6; ii++) + { + delay_ms(1500); + for (i = 0; i < 7; i++) + { + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + state = getvoxel(i+1,x,y); + altervoxel(i,x,y,state); + } + } + } + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + clrvoxel(7,x,y); + } + } + } + } + for (ii = 0; ii<8; ii++) + { + delay_ms(1500); + for (i = 0; i < 7; i++) + { + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + state = getvoxel(i+1,x,y); + altervoxel(i,x,y,state); + } + } + } + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + clrvoxel(7,x,y); + } + } + } + +} + +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + if (plane == AXIS_Z) + setplane_z(i); + + if (plane == AXIS_X) + setplane_x(i); + + if (plane == AXIS_Y) + setplane_y(i); + + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + if (plane == AXIS_Z) + setplane_z(i); + + if (plane == AXIS_X) + setplane_x(i); + + if (plane == AXIS_Y) + setplane_y(i); + + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +void effect_box_shrink_grow (int iterations, int mode, int direction, uint16_t delay) +{ + int x; + int i; + + int x1 = 0; + int y1 = 0; + int z1 = 0; + int x2 = 0; + int y2 = 0; + int z2 = 0; + + + for (x=0;x=0;i--) + { + if(direction == 0) + { + // Dette funker også.. + // memcpy(test, (int[]){1, 2, 3, 4, 5, 6}, 6 * sizeof(int)); + x1=0; y1=0; z1=0; x2=i; y2=i; z2=i; + } + + if(direction == 1) // fail + { + x1=0; y1=0; z1=7-i; x2=i; y2=i; z2=7; + } + + if(direction == 2) + { + x1=0; y1=7; z1=0; x2=i; y2=7-i; z2=i; + } + + if(direction == 3) //fail + { + x1=0; y1=7; z1=7; x2=i; y2=7-i; z2=7-i; + } + + if(direction == 4) //fail + { + x1=7; y1=0; z1=0; x2=7-i; y2=i; z2=i; + } + + if(direction == 5) + { + x1=7; y1=0; z1=7; x2=7-i; y2=i; z2=7-i; + } + + if(direction == 6) //fail + { + x1=7; y1=7; z1=0; x2=7-i; y2=7-i; z2=i; + } + + if(direction == 7) + { + x1=7; y1=7; z1=7; x2=7-i; y2=7-i; z2=7-i; + } + + if (mode == 3) + { + box_filled(x1,y1,z1,x2,y2,z2); + } + else if (mode == 2) + { + box_walls(x1,y1,z1,x2,y2,z2); + } + else + { + box_wireframe(x1,y1,z1,x2,y2,z2); + } + + delay_ms(delay); + fill(0x00); + } + for (i=0;i<8;i++) + { + if(direction == 0) + { + x1=0; y1=0; z1=0; x2=i; y2=i; z2=i; + } + + if(direction == 1) // fail + { + x1=0; y1=0; z1=7-i; x2=i; y2=i; z2=7; + } + + if(direction == 2) + { + x1=0; y1=7; z1=0; x2=i; y2=7-i; z2=i; + } + + if(direction == 3) //fail + { + x1=0; y1=7; z1=7; x2=i; y2=7-i; z2=7-i; + } + + if(direction == 4) //fail + { + x1=7; y1=0; z1=0; x2=7-i; y2=i; z2=i; + } + + if(direction == 5) + { + x1=7; y1=0; z1=7; x2=7-i; y2=i; z2=7-i; + } + + if(direction == 6) //fail + { + x1=7; y1=7; z1=0; x2=7-i; y2=7-i; z2=i; + } + + if(direction == 7) + { + x1=7; y1=7; z1=7; x2=7-i; y2=7-i; z2=7-i; + } + + if (mode == 3) + { + box_filled(x1,y1,z1,x2,y2,z2); + } + else if (mode == 2) + { + box_walls(x1,y1,z1,x2,y2,z2); + } + else + { + box_wireframe(x1,y1,z1,x2,y2,z2); + } + + delay_ms(delay); + fill(0x00); + } + } +} + + +void effect_box_woopwoop (int delay, int grow) +{ + int i; + + fill(0x00); + if (grow == 1) + { + for (i=0;i<4;i++) + { + box_wireframe(4+i,4+i,4+i,3-i,3-i,3-i); + delay_ms(delay); + fill(0x00); + } + } else + { + for (i=3;i>=0;i--) + { + box_wireframe(4+i,4+i,4+i,3-i,3-i,3-i); + delay_ms(delay); + fill(0x00); + } + } +} + + +// Send a voxel flying from one side of the cube to the other +// It its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + } else + { + ii = i; + clrvoxel(x,y,ii-1); + } + setvoxel(x,y,ii); + delay_ms(delay); + } +} + +// Send all the voxels from one side of the cube to the other +// Start at z and send to the opposite side. +// Sends in random order. +void sendplane_rand_z (unsigned char z, int delay, int wait) +{ + unsigned char loop = 16; + unsigned char x, y; + + fill(0x00); + + setplane_z(z); + + // Send voxels at random untill all 16 have crossed the cube. + while(loop) + { + x = rand()%4; + y = rand()%4; + if (getvoxel(x,y,z)) + { + // Send the voxel flying + sendvoxel_z(x,y,z,delay); + delay_ms(wait); + loop--; // one down, loop-- to go. when this hits 0, the loop exits. + } + } +} + +// For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 +// for n iterations, a random voxel is sent to the opposite side of where it was. +void sendvoxels_rand_z (int iterations, int delay, int wait) +{ + unsigned char x, y, last_x, last_y, i; + + last_x = 0; + last_y = 0; + + fill(0x00); + + //srand(123); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + // Then set a voxel either at the top or at the bottom + if (rand()%2 == 0) + { + + setvoxel(x,y,0); + } else + { + setvoxel(x,y,7); + } + + + } + } + + for (i=0;i=0;i--) + { + snake[i][0] = snake[i-1][0]; + snake[i][1] = snake[i-1][1]; + snake[i][2] = snake[i-1][2]; + } + snake[0][0] = x; + snake[0][1] = y; + snake[0][2] = z; + + for (i=0;i<8;i++) + { + setvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + delay_ms(delay); + for (i=0;i<8;i++) + { + clrvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + } + + + iterations--; + } +} + +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;iidestinations[px]) + { + positions[px]--; + } + } + + draw_positions_axis (AXIS_Z, positions,0); +} + +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert) +{ + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,px; + + for (i=0; i<64; i++) + { + positions[i] = 0; + destinations[i] = rand()%8; + } + + for (i=0; i<8; i++) + { + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } + + for (i=0; i<64; i++) + { + destinations[i] = 7; + } + + delay_ms(sleep); + + for (i=0; i<8; i++) + { + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } + + + +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + LED_PORT ^= LED_RED; + } + +} + + + + +// Light all leds layer by layer, +// then unset layer by layer +void effect_loadbar(int delay) +{ + fill(0x00); + + int z,y; + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0xff; + + delay_ms(delay); + } + + delay_ms(delay*3); + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0x00; + + delay_ms(delay); + } +} + + +// Set n number of voxels at random positions +void effect_random_sparkle_flash (int iterations, int voxels, int delay) +{ + int i; + int v; + for (i = 0; i < iterations; i++) + { + for (v=0;v<=voxels;v++) + setvoxel(rand()%8,rand()%8,rand()%8); + + delay_ms(delay); + fill(0x00); + } +} + +// blink 1 random voxel, blink 2 random voxels..... blink 20 random voxels +// and back to 1 again. +void effect_random_sparkle (void) +{ + int i; + + for (i=1;i<20;i++) + { + effect_random_sparkle_flash(5,i,200); + } + + for (i=20;i>=1;i--) + { + effect_random_sparkle_flash(5,i,200); + } + +} + +int effect_telcstairs_do(int x, int val, int delay) +{ + int y,z; + + for(y = 0, z = x; y <= z; y++, x--) + { + if(x < CUBE_SIZE && y < CUBE_SIZE) + { + cube[x][y] = val; + } + } + delay_ms(delay); + return z; +} + +void effect_telcstairs (int invert, int delay, int val) +{ + int x; + + if(invert) + { + for(x = CUBE_SIZE*2; x >= 0; x--) + { + x = effect_telcstairs_do(x,val,delay); + } + } + else + { + for(x = 0; x < CUBE_SIZE*2; x++) + { + x = effect_telcstairs_do(x,val,delay); + } + } +} + +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) +{ + int x, y, i,j,k, dx, dy; + int cube_size; + int origin = 0; + + if (direction == -1) + origin = 7; + + cube_size = 8-(size-1); + + x = rand()%cube_size; + y = rand()%cube_size; + + for (i=0; i 0 && (x+dx) < cube_size) + x += dx; + + if ((y+dy) > 0 && (y+dy) < cube_size) + y += dy; + + shift(axis, direction); + + + for (j=0; j=1;i--) + { + for (z=0;z<8;z++) + { + + state = getvoxel(((path[(i-1)]>>4) & 0x0f), (path[(i-1)] & 0x0f), z); + altervoxel(((path[i]>>4) & 0x0f), (path[i] & 0x0f), z, state); + } + } + for (i=0;i<8;i++) + clrvoxel(((path[0]>>4) & 0x0f), (path[0] & 0x0f),i); +} + +void effect_rand_patharound (int iterations, int delay) +{ + int z, dz, i; + z = 4; + unsigned char path[28]; + + font_getpath(0,path,28); + + for (i = 0; i < iterations; i++) + { + dz = ((rand()%3)-1); + z += dz; + + if (z>7) + z = 7; + + if (z<0) + z = 0; + + effect_pathmove(path, 28); + setvoxel(0,7,z); + delay_ms(delay); + } +} + +void effect_pathspiral (int iterations, int delay) +{ + int z, i; + z = 4; + unsigned char path[16]; + + font_getpath(1,path,16); + + for (i = 0; i < iterations; i++) + { + setvoxel(4,0,i%8); + delay_ms(delay); + effect_pathmove(path, 28); + + } +} + +void effect_path_text (int delay, char *str) +{ + int z, i,ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + unsigned char chr[5]; + unsigned char stripe; + + while (*str) + { + //charfly(*str++, direction, axis, mode, delay); + + + font_getchar(*str++, chr); + + for (ii=0;ii<5;ii++) + { + //stripe = pgm_read_byte(&font[(chr*5)+ii]); + stripe = chr[ii]; + + for (z=0;z<8;z++) + { + if ((stripe>>(7-z)) & 0x01) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + effect_pathmove(path, 28); + delay_ms(delay); + } + + effect_pathmove(path, 28); + delay_ms(delay); + } + for (i=0;i<28;i++) + { + effect_pathmove(path, 28); + delay_ms(delay); + } +} + +void effect_path_bitmap (int delay, char bitmap, int iterations) +{ + int z, i, ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + for (i=0; i < iterations; i++) + { + for (ii=0;ii<8;ii++) + { + for (z=0;z<8;z++) + { + if (font_getbitmappixel(bitmap,(7-z),ii)) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + delay_ms(delay); + effect_pathmove(path, 28); + } + + for (ii=0;ii<20;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } + } + for (ii=0;ii<10;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } +} + + + diff --git a/cube_pc_test1/effect.h b/cube_pc_test1/effect.h new file mode 100644 index 0000000..edaac18 --- /dev/null +++ b/cube_pc_test1/effect.h @@ -0,0 +1,57 @@ +#ifndef EFFECT_H +#define EFFECT_H + +//#include +//#include +#include +#include + +#include "cube.h" + + + +void effect_box_shrink_grow (int iterations, int mode, int direction, uint16_t delay); + +void effect_hollow_1 (int iterations, uint16_t delay); +void effect_hollow_2 (int iterations, int corner, uint16_t delay); + +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay); +void sendplane_rand_z (unsigned char z, int delay, int wait); +void sendvoxels_rand_z (int iterations, int delay, int wait); +void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode); + +void effect_planboing (int plane, int speed); + +void effect_random_filler (int delay, int state); + +void effect_z_updown (int iterations, int delay); +void effect_rain(int iterations); +void effect_stringfly2(char * str); +void effect_blinky2(void); +void draw_positions_axis (char axis, unsigned char positions[64], int invert); +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert); + +void effect_random_sparkle_flash (int iterations, int voxels, int delay); +void effect_random_sparkle (void); + +void effect_box_woopwoop (int delay, int grow); +void effect_telcstairs (int invert, int delay, int val); +void effect_loadbar(int delay); + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode); +void effect_smileyspin (int count, int delay, char bitmap); +void effect_pathmove (unsigned char *path, int length); +void effect_rand_patharound (int iterations, int delay); +void effect_pathspiral (int iterations, int delay); +void effect_path_text (int delay, char *str); +void effect_path_bitmap (int delay, char bitmap, int iterations); +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay); + +void effect_z_updown (int iterations, int delay); +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis); + + + + +#endif + diff --git a/cube_pc_test1/effect.lst b/cube_pc_test1/effect.lst new file mode 100644 index 0000000..7a08f0a --- /dev/null +++ b/cube_pc_test1/effect.lst @@ -0,0 +1,5902 @@ + 1 .file "effect.c" + 2 __SREG__ = 0x3f + 3 __SP_H__ = 0x3e + 4 __SP_L__ = 0x3d + 5 __CCP__ = 0x34 + 6 __tmp_reg__ = 0 + 7 __zero_reg__ = 1 + 8 .global __do_copy_data + 9 .global __do_clear_bss + 17 .Ltext0: + 18 .global effect_telcstairs_do + 20 effect_telcstairs_do: + 21 .LFB24: + 22 .LM1: + 23 .LVL0: + 24 0000 CF93 push r28 + 25 0002 DF93 push r29 + 26 /* prologue: function */ + 27 /* frame size = 0 */ + 28 0004 EC01 movw r28,r24 + 29 .LM2: + 30 0006 DC01 movw r26,r24 + 31 0008 20E0 ldi r18,lo8(0) + 32 000a 30E0 ldi r19,hi8(0) + 33 .LVL1: + 34 000c 00C0 rjmp .L2 + 35 .LVL2: + 36 .L4: + 37 .LM3: + 38 000e A830 cpi r26,8 + 39 0010 B105 cpc r27,__zero_reg__ + 40 0012 04F4 brge .L3 + 41 .LVL3: + 42 0014 2830 cpi r18,8 + 43 0016 3105 cpc r19,__zero_reg__ + 44 0018 04F4 brge .L3 + 45 .LM4: + 46 001a FD01 movw r30,r26 + 47 001c 83E0 ldi r24,3 + 48 001e EE0F 1: lsl r30 + 49 0020 FF1F rol r31 + 50 0022 8A95 dec r24 + 51 0024 01F4 brne 1b + 52 0026 E20F add r30,r18 + 53 0028 F31F adc r31,r19 + 54 002a E050 subi r30,lo8(-(cube)) + 55 002c F040 sbci r31,hi8(-(cube)) + 56 002e 6083 st Z,r22 + 57 .LVL4: + 58 .L3: + 59 .LM5: + 60 0030 2F5F subi r18,lo8(-(1)) + 61 0032 3F4F sbci r19,hi8(-(1)) + 62 0034 1197 sbiw r26,1 + 63 .LVL5: + 64 .L2: + 65 0036 C217 cp r28,r18 + 66 0038 D307 cpc r29,r19 + 67 003a 04F4 brge .L4 + 68 .LVL6: + 69 .LM6: + 70 003c CA01 movw r24,r20 + 71 003e 0E94 0000 call delay_ms + 72 .LVL7: + 73 .LM7: + 74 0042 CE01 movw r24,r28 + 75 .LVL8: + 76 /* epilogue start */ + 77 0044 DF91 pop r29 + 78 0046 CF91 pop r28 + 79 0048 0895 ret + 80 .LFE24: + 82 .global effect_telcstairs + 84 effect_telcstairs: + 85 .LFB25: + 86 .LM8: + 87 .LVL9: + 88 004a 0F93 push r16 + 89 004c 1F93 push r17 + 90 004e CF93 push r28 + 91 0050 DF93 push r29 + 92 /* prologue: function */ + 93 /* frame size = 0 */ + 94 0052 8B01 movw r16,r22 + 95 0054 EA01 movw r28,r20 + 96 .LM9: + 97 0056 892B or r24,r25 + 98 0058 01F0 breq .L7 + 99 .LVL10: + 100 005a 80E1 ldi r24,lo8(16) + 101 005c 90E0 ldi r25,hi8(16) + 102 .LVL11: + 103 .L8: + 104 .LM10: + 105 005e BE01 movw r22,r28 + 106 0060 A801 movw r20,r16 + 107 0062 0E94 0000 call effect_telcstairs_do + 108 .LVL12: + 109 .LM11: + 110 0066 0197 sbiw r24,1 + 111 .LVL13: + 112 0068 97FF sbrs r25,7 + 113 006a 00C0 rjmp .L8 + 114 006c 00C0 rjmp .L11 + 115 .LVL14: + 116 .L7: + 117 006e 80E0 ldi r24,lo8(0) + 118 0070 90E0 ldi r25,hi8(0) + 119 .LVL15: + 120 .L10: + 121 .LM12: + 122 0072 BE01 movw r22,r28 + 123 0074 A801 movw r20,r16 + 124 0076 0E94 0000 call effect_telcstairs_do + 125 .LVL16: + 126 .LM13: + 127 007a 0196 adiw r24,1 + 128 .LVL17: + 129 007c 8031 cpi r24,16 + 130 007e 9105 cpc r25,__zero_reg__ + 131 0080 04F0 brlt .L10 + 132 .L11: + 133 /* epilogue start */ + 134 .LM14: + 135 0082 DF91 pop r29 + 136 0084 CF91 pop r28 + 137 .LVL18: + 138 0086 1F91 pop r17 + 139 0088 0F91 pop r16 + 140 .LVL19: + 141 008a 0895 ret + 142 .LFE25: + 144 .global sendvoxel_z + 146 sendvoxel_z: + 147 .LFB10: + 148 .LM15: + 149 .LVL20: + 150 008c 7F92 push r7 + 151 008e 8F92 push r8 + 152 0090 9F92 push r9 + 153 0092 AF92 push r10 + 154 0094 BF92 push r11 + 155 0096 CF92 push r12 + 156 0098 DF92 push r13 + 157 009a EF92 push r14 + 158 009c FF92 push r15 + 159 009e 0F93 push r16 + 160 00a0 1F93 push r17 + 161 00a2 CF93 push r28 + 162 00a4 DF93 push r29 + 163 /* prologue: function */ + 164 /* frame size = 0 */ + 165 00a6 E82E mov r14,r24 + 166 00a8 F62E mov r15,r22 + 167 00aa 742E mov r7,r20 + 168 00ac 6901 movw r12,r18 + 169 .LM16: + 170 00ae C0E0 ldi r28,lo8(0) + 171 00b0 D0E0 ldi r29,hi8(0) + 172 .LVL21: + 173 00b2 27E0 ldi r18,lo8(7) + 174 00b4 822E mov r8,r18 + 175 00b6 912C mov r9,__zero_reg__ + 176 .LVL22: + 177 .LM17: + 178 00b8 98E0 ldi r25,lo8(8) + 179 00ba A92E mov r10,r25 + 180 00bc B12C mov r11,__zero_reg__ + 181 .LVL23: + 182 .L17: + 183 .LM18: + 184 00be 87E0 ldi r24,lo8(7) + 185 00c0 7816 cp r7,r24 + 186 00c2 01F4 brne .L15 + 187 .LM19: + 188 00c4 8401 movw r16,r8 + 189 00c6 0C1B sub r16,r28 + 190 00c8 1D0B sbc r17,r29 + 191 .LM20: + 192 00ca A501 movw r20,r10 + 193 00cc 4C1B sub r20,r28 + 194 00ce 5D0B sbc r21,r29 + 195 00d0 8E2D mov r24,r14 + 196 00d2 90E0 ldi r25,lo8(0) + 197 00d4 6F2D mov r22,r15 + 198 00d6 70E0 ldi r23,lo8(0) + 199 00d8 0E94 0000 call clrvoxel + 200 00dc 00C0 rjmp .L16 + 201 .LVL24: + 202 .L15: + 203 .LM21: + 204 00de AE01 movw r20,r28 + 205 00e0 4150 subi r20,lo8(-(-1)) + 206 00e2 5040 sbci r21,hi8(-(-1)) + 207 00e4 8E2D mov r24,r14 + 208 00e6 90E0 ldi r25,lo8(0) + 209 00e8 6F2D mov r22,r15 + 210 00ea 70E0 ldi r23,lo8(0) + 211 00ec 0E94 0000 call clrvoxel + 212 00f0 8E01 movw r16,r28 + 213 .L16: + 214 .LM22: + 215 00f2 8E2D mov r24,r14 + 216 00f4 90E0 ldi r25,lo8(0) + 217 00f6 6F2D mov r22,r15 + 218 00f8 70E0 ldi r23,lo8(0) + 219 00fa A801 movw r20,r16 + 220 00fc 0E94 0000 call setvoxel + 221 .LM23: + 222 0100 C601 movw r24,r12 + 223 0102 0E94 0000 call delay_ms + 224 .LM24: + 225 0106 2196 adiw r28,1 + 226 0108 C830 cpi r28,8 + 227 010a D105 cpc r29,__zero_reg__ + 228 010c 01F4 brne .L17 + 229 /* epilogue start */ + 230 .LM25: + 231 010e DF91 pop r29 + 232 0110 CF91 pop r28 + 233 .LVL25: + 234 0112 1F91 pop r17 + 235 0114 0F91 pop r16 + 236 .LVL26: + 237 0116 FF90 pop r15 + 238 .LVL27: + 239 0118 EF90 pop r14 + 240 .LVL28: + 241 011a DF90 pop r13 + 242 011c CF90 pop r12 + 243 .LVL29: + 244 011e BF90 pop r11 + 245 0120 AF90 pop r10 + 246 0122 9F90 pop r9 + 247 0124 8F90 pop r8 + 248 0126 7F90 pop r7 + 249 .LVL30: + 250 0128 0895 ret + 251 .LFE10: + 253 .global effect_pathmove + 255 effect_pathmove: + 256 .LFB28: + 257 .LM26: + 258 .LVL31: + 259 012a CF92 push r12 + 260 012c DF92 push r13 + 261 012e EF92 push r14 + 262 0130 FF92 push r15 + 263 0132 0F93 push r16 + 264 0134 1F93 push r17 + 265 0136 CF93 push r28 + 266 0138 DF93 push r29 + 267 /* prologue: function */ + 268 /* frame size = 0 */ + 269 013a 6C01 movw r12,r24 + 270 .LM27: + 271 013c 7B01 movw r14,r22 + 272 .LVL32: + 273 013e 0894 sec + 274 0140 E108 sbc r14,__zero_reg__ + 275 0142 F108 sbc r15,__zero_reg__ + 276 0144 8B01 movw r16,r22 + 277 0146 0250 subi r16,lo8(-(-2)) + 278 0148 1040 sbci r17,hi8(-(-2)) + 279 014a 080F add r16,r24 + 280 014c 191F adc r17,r25 + 281 014e 00C0 rjmp .L21 + 282 .LVL33: + 283 .L23: + 284 0150 C0E0 ldi r28,lo8(0) + 285 0152 D0E0 ldi r29,hi8(0) + 286 .LVL34: + 287 .L22: + 288 .LM28: + 289 0154 F801 movw r30,r16 + 290 0156 8081 ld r24,Z + 291 .LVL35: + 292 0158 682F mov r22,r24 + 293 .LVL36: + 294 015a 70E0 ldi r23,lo8(0) + 295 015c 6F70 andi r22,lo8(15) + 296 015e 7070 andi r23,hi8(15) + 297 0160 8295 swap r24 + 298 0162 8F70 andi r24,lo8(15) + 299 0164 90E0 ldi r25,lo8(0) + 300 0166 AE01 movw r20,r28 + 301 0168 0E94 0000 call getvoxel + 302 016c 282F mov r18,r24 + 303 .LVL37: + 304 .LM29: + 305 016e F801 movw r30,r16 + 306 0170 8181 ldd r24,Z+1 + 307 0172 682F mov r22,r24 + 308 0174 70E0 ldi r23,lo8(0) + 309 0176 6F70 andi r22,lo8(15) + 310 0178 7070 andi r23,hi8(15) + 311 017a 8295 swap r24 + 312 017c 8F70 andi r24,lo8(15) + 313 017e 90E0 ldi r25,lo8(0) + 314 0180 AE01 movw r20,r28 + 315 0182 30E0 ldi r19,lo8(0) + 316 0184 0E94 0000 call altervoxel + 317 .LVL38: + 318 .LM30: + 319 0188 2196 adiw r28,1 + 320 018a C830 cpi r28,8 + 321 018c D105 cpc r29,__zero_reg__ + 322 018e 01F4 brne .L22 + 323 .LM31: + 324 0190 0894 sec + 325 0192 E108 sbc r14,__zero_reg__ + 326 0194 F108 sbc r15,__zero_reg__ + 327 0196 0150 subi r16,lo8(-(-1)) + 328 0198 1040 sbci r17,hi8(-(-1)) + 329 .LVL39: + 330 .L21: + 331 019a 1E14 cp __zero_reg__,r14 + 332 019c 1F04 cpc __zero_reg__,r15 + 333 019e 04F0 brlt .L23 + 334 01a0 C0E0 ldi r28,lo8(0) + 335 01a2 D0E0 ldi r29,hi8(0) + 336 .LVL40: + 337 .L24: + 338 .LM32: + 339 01a4 F601 movw r30,r12 + 340 01a6 8081 ld r24,Z + 341 .LVL41: + 342 01a8 682F mov r22,r24 + 343 .LVL42: + 344 01aa 70E0 ldi r23,lo8(0) + 345 01ac 6F70 andi r22,lo8(15) + 346 01ae 7070 andi r23,hi8(15) + 347 01b0 8295 swap r24 + 348 01b2 8F70 andi r24,lo8(15) + 349 01b4 90E0 ldi r25,lo8(0) + 350 01b6 AE01 movw r20,r28 + 351 01b8 0E94 0000 call clrvoxel + 352 .LM33: + 353 01bc 2196 adiw r28,1 + 354 01be C830 cpi r28,8 + 355 01c0 D105 cpc r29,__zero_reg__ + 356 01c2 01F4 brne .L24 + 357 /* epilogue start */ + 358 .LM34: + 359 01c4 DF91 pop r29 + 360 01c6 CF91 pop r28 + 361 .LVL43: + 362 01c8 1F91 pop r17 + 363 01ca 0F91 pop r16 + 364 01cc FF90 pop r15 + 365 01ce EF90 pop r14 + 366 01d0 DF90 pop r13 + 367 01d2 CF90 pop r12 + 368 .LVL44: + 369 01d4 0895 ret + 370 .LFE28: + 372 .global effect_path_bitmap + 374 effect_path_bitmap: + 375 .LFB32: + 376 .LM35: + 377 .LVL45: + 378 01d6 5F92 push r5 + 379 01d8 6F92 push r6 + 380 01da 7F92 push r7 + 381 01dc 8F92 push r8 + 382 01de 9F92 push r9 + 383 01e0 AF92 push r10 + 384 01e2 BF92 push r11 + 385 01e4 CF92 push r12 + 386 01e6 DF92 push r13 + 387 01e8 EF92 push r14 + 388 01ea FF92 push r15 + 389 01ec 0F93 push r16 + 390 01ee 1F93 push r17 + 391 01f0 DF93 push r29 + 392 01f2 CF93 push r28 + 393 01f4 CDB7 in r28,__SP_L__ + 394 01f6 DEB7 in r29,__SP_H__ + 395 01f8 6C97 sbiw r28,28 + 396 01fa 0FB6 in __tmp_reg__,__SREG__ + 397 01fc F894 cli + 398 01fe DEBF out __SP_H__,r29 + 399 0200 0FBE out __SREG__,__tmp_reg__ + 400 0202 CDBF out __SP_L__,r28 + 401 /* prologue: function */ + 402 /* frame size = 28 */ + 403 0204 4C01 movw r8,r24 + 404 .LVL46: + 405 0206 562E mov r5,r22 + 406 0208 3A01 movw r6,r20 + 407 .LM36: + 408 020a 80E0 ldi r24,lo8(0) + 409 020c 5E01 movw r10,r28 + 410 020e 0894 sec + 411 0210 A11C adc r10,__zero_reg__ + 412 0212 B11C adc r11,__zero_reg__ + 413 0214 B501 movw r22,r10 + 414 .LVL47: + 415 0216 4CE1 ldi r20,lo8(28) + 416 0218 50E0 ldi r21,hi8(28) + 417 .LVL48: + 418 021a 0E94 0000 call font_getpath + 419 021e CC24 clr r12 + 420 0220 DD24 clr r13 + 421 .LVL49: + 422 0222 00C0 rjmp .L29 + 423 .LVL50: + 424 .L32: + 425 .LM37: + 426 0224 852D mov r24,r5 + 427 0226 6F2D mov r22,r15 + 428 0228 4E2D mov r20,r14 + 429 022a 0E94 0000 call font_getbitmappixel + 430 022e 8823 tst r24 + 431 0230 01F0 breq .L30 + 432 .LM38: + 433 0232 80E0 ldi r24,lo8(0) + 434 0234 90E0 ldi r25,hi8(0) + 435 0236 67E0 ldi r22,lo8(7) + 436 0238 70E0 ldi r23,hi8(7) + 437 023a A801 movw r20,r16 + 438 023c 0E94 0000 call setvoxel + 439 0240 00C0 rjmp .L31 + 440 .L30: + 441 .LM39: + 442 0242 80E0 ldi r24,lo8(0) + 443 0244 90E0 ldi r25,hi8(0) + 444 0246 67E0 ldi r22,lo8(7) + 445 0248 70E0 ldi r23,hi8(7) + 446 024a A801 movw r20,r16 + 447 024c 0E94 0000 call clrvoxel + 448 .L31: + 449 .LM40: + 450 0250 0F5F subi r16,lo8(-(1)) + 451 0252 1F4F sbci r17,hi8(-(1)) + 452 0254 FA94 dec r15 + 453 0256 8FEF ldi r24,lo8(-1) + 454 0258 F816 cp r15,r24 + 455 025a 01F4 brne .L32 + 456 .LM41: + 457 025c C401 movw r24,r8 + 458 025e 0E94 0000 call delay_ms + 459 .LM42: + 460 0262 C501 movw r24,r10 + 461 0264 6CE1 ldi r22,lo8(28) + 462 0266 70E0 ldi r23,hi8(28) + 463 0268 0E94 0000 call effect_pathmove + 464 026c E394 inc r14 + 465 .LM43: + 466 026e 88E0 ldi r24,lo8(8) + 467 0270 E816 cp r14,r24 + 468 0272 01F0 breq .L33 + 469 .LVL51: + 470 .L36: + 471 0274 00E0 ldi r16,lo8(0) + 472 0276 10E0 ldi r17,hi8(0) + 473 .LVL52: + 474 0278 37E0 ldi r19,lo8(7) + 475 027a F32E mov r15,r19 + 476 027c 00C0 rjmp .L32 + 477 .L33: + 478 027e 00E0 ldi r16,lo8(0) + 479 0280 10E0 ldi r17,hi8(0) + 480 .LVL53: + 481 .L34: + 482 .LM44: + 483 0282 C401 movw r24,r8 + 484 0284 0E94 0000 call delay_ms + 485 .LM45: + 486 0288 C501 movw r24,r10 + 487 028a 6CE1 ldi r22,lo8(28) + 488 028c 70E0 ldi r23,hi8(28) + 489 028e 0E94 0000 call effect_pathmove + 490 .LM46: + 491 0292 0F5F subi r16,lo8(-(1)) + 492 0294 1F4F sbci r17,hi8(-(1)) + 493 0296 0431 cpi r16,20 + 494 0298 1105 cpc r17,__zero_reg__ + 495 029a 01F4 brne .L34 + 496 .LM47: + 497 029c 0894 sec + 498 029e C11C adc r12,__zero_reg__ + 499 02a0 D11C adc r13,__zero_reg__ + 500 .L29: + 501 02a2 C614 cp r12,r6 + 502 02a4 D704 cpc r13,r7 + 503 02a6 04F4 brge .L35 + 504 02a8 EE24 clr r14 + 505 02aa 00C0 rjmp .L36 + 506 .L35: + 507 02ac 00E0 ldi r16,lo8(0) + 508 02ae 10E0 ldi r17,hi8(0) + 509 .LVL54: + 510 .LM48: + 511 02b0 7E01 movw r14,r28 + 512 02b2 0894 sec + 513 02b4 E11C adc r14,__zero_reg__ + 514 02b6 F11C adc r15,__zero_reg__ + 515 .L37: + 516 .LM49: + 517 02b8 C401 movw r24,r8 + 518 02ba 0E94 0000 call delay_ms + 519 .LM50: + 520 02be C701 movw r24,r14 + 521 02c0 6CE1 ldi r22,lo8(28) + 522 02c2 70E0 ldi r23,hi8(28) + 523 02c4 0E94 0000 call effect_pathmove + 524 .LM51: + 525 02c8 0F5F subi r16,lo8(-(1)) + 526 02ca 1F4F sbci r17,hi8(-(1)) + 527 02cc 0A30 cpi r16,10 + 528 02ce 1105 cpc r17,__zero_reg__ + 529 02d0 01F4 brne .L37 + 530 /* epilogue start */ + 531 .LM52: + 532 02d2 6C96 adiw r28,28 + 533 02d4 0FB6 in __tmp_reg__,__SREG__ + 534 02d6 F894 cli + 535 02d8 DEBF out __SP_H__,r29 + 536 02da 0FBE out __SREG__,__tmp_reg__ + 537 02dc CDBF out __SP_L__,r28 + 538 02de CF91 pop r28 + 539 02e0 DF91 pop r29 + 540 02e2 1F91 pop r17 + 541 02e4 0F91 pop r16 + 542 .LVL55: + 543 02e6 FF90 pop r15 + 544 02e8 EF90 pop r14 + 545 02ea DF90 pop r13 + 546 02ec CF90 pop r12 + 547 .LVL56: + 548 02ee BF90 pop r11 + 549 02f0 AF90 pop r10 + 550 02f2 9F90 pop r9 + 551 02f4 8F90 pop r8 + 552 02f6 7F90 pop r7 + 553 02f8 6F90 pop r6 + 554 .LVL57: + 555 02fa 5F90 pop r5 + 556 .LVL58: + 557 02fc 0895 ret + 558 .LFE32: + 560 .global effect_path_text + 562 effect_path_text: + 563 .LFB31: + 564 .LM53: + 565 .LVL59: + 566 02fe 2F92 push r2 + 567 0300 3F92 push r3 + 568 0302 4F92 push r4 + 569 0304 5F92 push r5 + 570 0306 6F92 push r6 + 571 0308 7F92 push r7 + 572 030a 8F92 push r8 + 573 030c 9F92 push r9 + 574 030e AF92 push r10 + 575 0310 BF92 push r11 + 576 0312 CF92 push r12 + 577 0314 DF92 push r13 + 578 0316 EF92 push r14 + 579 0318 FF92 push r15 + 580 031a 0F93 push r16 + 581 031c 1F93 push r17 + 582 031e DF93 push r29 + 583 0320 CF93 push r28 + 584 0322 CDB7 in r28,__SP_L__ + 585 0324 DEB7 in r29,__SP_H__ + 586 0326 A197 sbiw r28,33 + 587 0328 0FB6 in __tmp_reg__,__SREG__ + 588 032a F894 cli + 589 032c DEBF out __SP_H__,r29 + 590 032e 0FBE out __SREG__,__tmp_reg__ + 591 0330 CDBF out __SP_L__,r28 + 592 /* prologue: function */ + 593 /* frame size = 33 */ + 594 0332 3C01 movw r6,r24 + 595 .LVL60: + 596 0334 6B01 movw r12,r22 + 597 .LM54: + 598 0336 56E0 ldi r21,lo8(6) + 599 0338 852E mov r8,r21 + 600 033a 912C mov r9,__zero_reg__ + 601 033c 8C0E add r8,r28 + 602 033e 9D1E adc r9,r29 + 603 0340 80E0 ldi r24,lo8(0) + 604 0342 B401 movw r22,r8 + 605 .LVL61: + 606 0344 4CE1 ldi r20,lo8(28) + 607 0346 50E0 ldi r21,hi8(28) + 608 0348 0E94 0000 call font_getpath + 609 .LM55: + 610 034c 1E01 movw r2,r28 + 611 034e 0894 sec + 612 0350 211C adc r2,__zero_reg__ + 613 0352 311C adc r3,__zero_reg__ + 614 .LM56: + 615 0354 2401 movw r4,r8 + 616 0356 00C0 rjmp .L43 + 617 .LVL62: + 618 .L48: + 619 .LM57: + 620 0358 B101 movw r22,r2 + 621 035a 0E94 0000 call font_getchar + 622 035e 7101 movw r14,r2 + 623 .L47: + 624 .LM58: + 625 0360 F701 movw r30,r14 + 626 0362 8081 ld r24,Z + 627 .LVL63: + 628 0364 00E0 ldi r16,lo8(0) + 629 0366 10E0 ldi r17,hi8(0) + 630 .LM59: + 631 0368 A82E mov r10,r24 + 632 036a BB24 clr r11 + 633 .LVL64: + 634 .L46: + 635 036c 87E0 ldi r24,lo8(7) + 636 036e 90E0 ldi r25,hi8(7) + 637 0370 801B sub r24,r16 + 638 0372 910B sbc r25,r17 + 639 0374 9501 movw r18,r10 + 640 0376 00C0 rjmp 2f + 641 0378 3595 1: asr r19 + 642 037a 2795 ror r18 + 643 037c 8A95 2: dec r24 + 644 037e 02F4 brpl 1b + 645 0380 20FF sbrs r18,0 + 646 0382 00C0 rjmp .L44 + 647 .LM60: + 648 0384 80E0 ldi r24,lo8(0) + 649 0386 90E0 ldi r25,hi8(0) + 650 0388 67E0 ldi r22,lo8(7) + 651 038a 70E0 ldi r23,hi8(7) + 652 038c A801 movw r20,r16 + 653 038e 0E94 0000 call setvoxel + 654 0392 00C0 rjmp .L45 + 655 .L44: + 656 .LM61: + 657 0394 80E0 ldi r24,lo8(0) + 658 0396 90E0 ldi r25,hi8(0) + 659 0398 67E0 ldi r22,lo8(7) + 660 039a 70E0 ldi r23,hi8(7) + 661 039c A801 movw r20,r16 + 662 039e 0E94 0000 call clrvoxel + 663 .L45: + 664 .LM62: + 665 03a2 0F5F subi r16,lo8(-(1)) + 666 03a4 1F4F sbci r17,hi8(-(1)) + 667 03a6 0830 cpi r16,8 + 668 03a8 1105 cpc r17,__zero_reg__ + 669 03aa 01F4 brne .L46 + 670 .LM63: + 671 03ac C401 movw r24,r8 + 672 03ae 6CE1 ldi r22,lo8(28) + 673 03b0 70E0 ldi r23,hi8(28) + 674 03b2 0E94 0000 call effect_pathmove + 675 .LM64: + 676 03b6 C301 movw r24,r6 + 677 03b8 0E94 0000 call delay_ms + 678 03bc 0894 sec + 679 03be E11C adc r14,__zero_reg__ + 680 03c0 F11C adc r15,__zero_reg__ + 681 .LM65: + 682 03c2 E414 cp r14,r4 + 683 03c4 F504 cpc r15,r5 + 684 03c6 01F4 brne .L47 + 685 .LM66: + 686 03c8 0894 sec + 687 03ca C11C adc r12,__zero_reg__ + 688 03cc D11C adc r13,__zero_reg__ + 689 .LM67: + 690 03ce C201 movw r24,r4 + 691 03d0 6CE1 ldi r22,lo8(28) + 692 03d2 70E0 ldi r23,hi8(28) + 693 03d4 0E94 0000 call effect_pathmove + 694 .LM68: + 695 03d8 C301 movw r24,r6 + 696 03da 0E94 0000 call delay_ms + 697 .L43: + 698 .LM69: + 699 03de F601 movw r30,r12 + 700 03e0 8081 ld r24,Z + 701 03e2 8823 tst r24 + 702 03e4 01F0 breq .+2 + 703 03e6 00C0 rjmp .L48 + 704 03e8 00E0 ldi r16,lo8(0) + 705 03ea 10E0 ldi r17,hi8(0) + 706 .LVL65: + 707 .LM70: + 708 03ec 46E0 ldi r20,lo8(6) + 709 03ee E42E mov r14,r20 + 710 03f0 F12C mov r15,__zero_reg__ + 711 03f2 EC0E add r14,r28 + 712 03f4 FD1E adc r15,r29 + 713 .L49: + 714 03f6 C701 movw r24,r14 + 715 03f8 6CE1 ldi r22,lo8(28) + 716 03fa 70E0 ldi r23,hi8(28) + 717 03fc 0E94 0000 call effect_pathmove + 718 .LM71: + 719 0400 C301 movw r24,r6 + 720 0402 0E94 0000 call delay_ms + 721 .LM72: + 722 0406 0F5F subi r16,lo8(-(1)) + 723 0408 1F4F sbci r17,hi8(-(1)) + 724 040a 0C31 cpi r16,28 + 725 040c 1105 cpc r17,__zero_reg__ + 726 040e 01F4 brne .L49 + 727 /* epilogue start */ + 728 .LM73: + 729 0410 A196 adiw r28,33 + 730 0412 0FB6 in __tmp_reg__,__SREG__ + 731 0414 F894 cli + 732 0416 DEBF out __SP_H__,r29 + 733 0418 0FBE out __SREG__,__tmp_reg__ + 734 041a CDBF out __SP_L__,r28 + 735 041c CF91 pop r28 + 736 041e DF91 pop r29 + 737 0420 1F91 pop r17 + 738 0422 0F91 pop r16 + 739 .LVL66: + 740 0424 FF90 pop r15 + 741 0426 EF90 pop r14 + 742 0428 DF90 pop r13 + 743 042a CF90 pop r12 + 744 .LVL67: + 745 042c BF90 pop r11 + 746 .LVL68: + 747 042e AF90 pop r10 + 748 .LVL69: + 749 0430 9F90 pop r9 + 750 0432 8F90 pop r8 + 751 0434 7F90 pop r7 + 752 0436 6F90 pop r6 + 753 0438 5F90 pop r5 + 754 043a 4F90 pop r4 + 755 043c 3F90 pop r3 + 756 043e 2F90 pop r2 + 757 0440 0895 ret + 758 .LFE31: + 760 .global effect_pathspiral + 762 effect_pathspiral: + 763 .LFB30: + 764 .LM74: + 765 .LVL70: + 766 0442 9F92 push r9 + 767 0444 AF92 push r10 + 768 0446 BF92 push r11 + 769 0448 CF92 push r12 + 770 044a DF92 push r13 + 771 044c EF92 push r14 + 772 044e FF92 push r15 + 773 0450 0F93 push r16 + 774 0452 1F93 push r17 + 775 0454 DF93 push r29 + 776 0456 CF93 push r28 + 777 0458 CDB7 in r28,__SP_L__ + 778 045a DEB7 in r29,__SP_H__ + 779 045c 6097 sbiw r28,16 + 780 045e 0FB6 in __tmp_reg__,__SREG__ + 781 0460 F894 cli + 782 0462 DEBF out __SP_H__,r29 + 783 0464 0FBE out __SREG__,__tmp_reg__ + 784 0466 CDBF out __SP_L__,r28 + 785 /* prologue: function */ + 786 /* frame size = 16 */ + 787 0468 5C01 movw r10,r24 + 788 046a 6B01 movw r12,r22 + 789 .LM75: + 790 046c 81E0 ldi r24,lo8(1) + 791 .LVL71: + 792 046e 8E01 movw r16,r28 + 793 0470 0F5F subi r16,lo8(-(1)) + 794 0472 1F4F sbci r17,hi8(-(1)) + 795 0474 B801 movw r22,r16 + 796 .LVL72: + 797 0476 40E1 ldi r20,lo8(16) + 798 0478 50E0 ldi r21,hi8(16) + 799 047a 0E94 0000 call font_getpath + 800 047e EE24 clr r14 + 801 0480 FF24 clr r15 + 802 .LVL73: + 803 .LM76: + 804 0482 902E mov r9,r16 + 805 0484 012F mov r16,r17 + 806 0486 00C0 rjmp .L55 + 807 .L56: + 808 .LM77: + 809 0488 A701 movw r20,r14 + 810 048a 4770 andi r20,lo8(7) + 811 048c 5070 andi r21,hi8(7) + 812 048e 84E0 ldi r24,lo8(4) + 813 0490 90E0 ldi r25,hi8(4) + 814 0492 60E0 ldi r22,lo8(0) + 815 0494 70E0 ldi r23,hi8(0) + 816 0496 0E94 0000 call setvoxel + 817 .LM78: + 818 049a C601 movw r24,r12 + 819 049c 0E94 0000 call delay_ms + 820 .LM79: + 821 04a0 892D mov r24,r9 + 822 04a2 902F mov r25,r16 + 823 04a4 6CE1 ldi r22,lo8(28) + 824 04a6 70E0 ldi r23,hi8(28) + 825 04a8 0E94 0000 call effect_pathmove + 826 .LM80: + 827 04ac 0894 sec + 828 04ae E11C adc r14,__zero_reg__ + 829 04b0 F11C adc r15,__zero_reg__ + 830 .L55: + 831 04b2 EA14 cp r14,r10 + 832 04b4 FB04 cpc r15,r11 + 833 04b6 04F0 brlt .L56 + 834 /* epilogue start */ + 835 .LM81: + 836 04b8 6096 adiw r28,16 + 837 04ba 0FB6 in __tmp_reg__,__SREG__ + 838 04bc F894 cli + 839 04be DEBF out __SP_H__,r29 + 840 04c0 0FBE out __SREG__,__tmp_reg__ + 841 04c2 CDBF out __SP_L__,r28 + 842 04c4 CF91 pop r28 + 843 04c6 DF91 pop r29 + 844 04c8 1F91 pop r17 + 845 04ca 0F91 pop r16 + 846 04cc FF90 pop r15 + 847 04ce EF90 pop r14 + 848 .LVL74: + 849 04d0 DF90 pop r13 + 850 04d2 CF90 pop r12 + 851 .LVL75: + 852 04d4 BF90 pop r11 + 853 04d6 AF90 pop r10 + 854 .LVL76: + 855 04d8 9F90 pop r9 + 856 04da 0895 ret + 857 .LFE30: + 859 .global effect_rand_patharound + 861 effect_rand_patharound: + 862 .LFB29: + 863 .LM82: + 864 .LVL77: + 865 04dc 7F92 push r7 + 866 04de 8F92 push r8 + 867 04e0 9F92 push r9 + 868 04e2 AF92 push r10 + 869 04e4 BF92 push r11 + 870 04e6 CF92 push r12 + 871 04e8 DF92 push r13 + 872 04ea EF92 push r14 + 873 04ec FF92 push r15 + 874 04ee 0F93 push r16 + 875 04f0 1F93 push r17 + 876 04f2 DF93 push r29 + 877 04f4 CF93 push r28 + 878 04f6 CDB7 in r28,__SP_L__ + 879 04f8 DEB7 in r29,__SP_H__ + 880 04fa 6C97 sbiw r28,28 + 881 04fc 0FB6 in __tmp_reg__,__SREG__ + 882 04fe F894 cli + 883 0500 DEBF out __SP_H__,r29 + 884 0502 0FBE out __SREG__,__tmp_reg__ + 885 0504 CDBF out __SP_L__,r28 + 886 /* prologue: function */ + 887 /* frame size = 28 */ + 888 0506 4C01 movw r8,r24 + 889 0508 5B01 movw r10,r22 + 890 .LM83: + 891 050a 80E0 ldi r24,lo8(0) + 892 .LVL78: + 893 050c 8E01 movw r16,r28 + 894 050e 0F5F subi r16,lo8(-(1)) + 895 0510 1F4F sbci r17,hi8(-(1)) + 896 0512 B801 movw r22,r16 + 897 .LVL79: + 898 0514 4CE1 ldi r20,lo8(28) + 899 0516 50E0 ldi r21,hi8(28) + 900 0518 0E94 0000 call font_getpath + 901 051c 74E0 ldi r23,lo8(4) + 902 051e E72E mov r14,r23 + 903 0520 F12C mov r15,__zero_reg__ + 904 .LVL80: + 905 0522 CC24 clr r12 + 906 0524 DD24 clr r13 + 907 .LVL81: + 908 .LM84: + 909 0526 702E mov r7,r16 + 910 0528 012F mov r16,r17 + 911 052a 00C0 rjmp .L59 + 912 .L62: + 913 .LM85: + 914 052c 0E94 0000 call rand + 915 0530 0894 sec + 916 0532 E108 sbc r14,__zero_reg__ + 917 0534 F108 sbc r15,__zero_reg__ + 918 .LM86: + 919 0536 63E0 ldi r22,lo8(3) + 920 0538 70E0 ldi r23,hi8(3) + 921 053a 0E94 0000 call __divmodhi4 + 922 053e E80E add r14,r24 + 923 0540 F91E adc r15,r25 + 924 .LM87: + 925 0542 88E0 ldi r24,lo8(8) + 926 0544 E816 cp r14,r24 + 927 0546 F104 cpc r15,__zero_reg__ + 928 0548 04F0 brlt .L60 + 929 054a 67E0 ldi r22,lo8(7) + 930 054c E62E mov r14,r22 + 931 054e F12C mov r15,__zero_reg__ + 932 0550 00C0 rjmp .L61 + 933 .L60: + 934 .LM88: + 935 0552 F7FE sbrs r15,7 + 936 0554 00C0 rjmp .L61 + 937 0556 EE24 clr r14 + 938 0558 FF24 clr r15 + 939 .L61: + 940 .LM89: + 941 055a 872D mov r24,r7 + 942 055c 902F mov r25,r16 + 943 055e 6CE1 ldi r22,lo8(28) + 944 0560 70E0 ldi r23,hi8(28) + 945 0562 0E94 0000 call effect_pathmove + 946 .LM90: + 947 0566 80E0 ldi r24,lo8(0) + 948 0568 90E0 ldi r25,hi8(0) + 949 056a 67E0 ldi r22,lo8(7) + 950 056c 70E0 ldi r23,hi8(7) + 951 056e A701 movw r20,r14 + 952 0570 0E94 0000 call setvoxel + 953 .LM91: + 954 0574 C501 movw r24,r10 + 955 0576 0E94 0000 call delay_ms + 956 .LM92: + 957 057a 0894 sec + 958 057c C11C adc r12,__zero_reg__ + 959 057e D11C adc r13,__zero_reg__ + 960 .L59: + 961 0580 C814 cp r12,r8 + 962 0582 D904 cpc r13,r9 + 963 0584 04F0 brlt .L62 + 964 /* epilogue start */ + 965 .LM93: + 966 0586 6C96 adiw r28,28 + 967 0588 0FB6 in __tmp_reg__,__SREG__ + 968 058a F894 cli + 969 058c DEBF out __SP_H__,r29 + 970 058e 0FBE out __SREG__,__tmp_reg__ + 971 0590 CDBF out __SP_L__,r28 + 972 0592 CF91 pop r28 + 973 0594 DF91 pop r29 + 974 0596 1F91 pop r17 + 975 0598 0F91 pop r16 + 976 059a FF90 pop r15 + 977 059c EF90 pop r14 + 978 .LVL82: + 979 059e DF90 pop r13 + 980 05a0 CF90 pop r12 + 981 .LVL83: + 982 05a2 BF90 pop r11 + 983 05a4 AF90 pop r10 + 984 .LVL84: + 985 05a6 9F90 pop r9 + 986 05a8 8F90 pop r8 + 987 .LVL85: + 988 05aa 7F90 pop r7 + 989 05ac 0895 ret + 990 .LFE29: + 992 .global effect_stringfly2 + 994 effect_stringfly2: + 995 .LFB5: + 996 .LM94: + 997 .LVL86: + 998 05ae 2F92 push r2 + 999 05b0 3F92 push r3 + 1000 05b2 4F92 push r4 + 1001 05b4 5F92 push r5 + 1002 05b6 6F92 push r6 + 1003 05b8 7F92 push r7 + 1004 05ba 8F92 push r8 + 1005 05bc 9F92 push r9 + 1006 05be AF92 push r10 + 1007 05c0 BF92 push r11 + 1008 05c2 CF92 push r12 + 1009 05c4 DF92 push r13 + 1010 05c6 EF92 push r14 + 1011 05c8 FF92 push r15 + 1012 05ca 0F93 push r16 + 1013 05cc 1F93 push r17 + 1014 05ce DF93 push r29 + 1015 05d0 CF93 push r28 + 1016 05d2 00D0 rcall . + 1017 05d4 00D0 rcall . + 1018 05d6 0F92 push __tmp_reg__ + 1019 05d8 CDB7 in r28,__SP_L__ + 1020 05da DEB7 in r29,__SP_H__ + 1021 /* prologue: function */ + 1022 /* frame size = 5 */ + 1023 05dc 3C01 movw r6,r24 + 1024 .LM95: + 1025 05de 2E01 movw r4,r28 + 1026 05e0 0894 sec + 1027 05e2 411C adc r4,__zero_reg__ + 1028 05e4 511C adc r5,__zero_reg__ + 1029 .LM96: + 1030 05e6 F0E8 ldi r31,lo8(128) + 1031 05e8 2F2E mov r2,r31 + 1032 05ea 312C mov r3,__zero_reg__ + 1033 05ec 00C0 rjmp .L65 + 1034 .LVL87: + 1035 .L78: + 1036 .LM97: + 1037 05ee B201 movw r22,r4 + 1038 05f0 0E94 0000 call font_getchar + 1039 05f4 EE24 clr r14 + 1040 05f6 FF24 clr r15 + 1041 .LVL88: + 1042 05f8 00C0 rjmp .L66 + 1043 .LVL89: + 1044 .L68: + 1045 .LM98: + 1046 05fa 9101 movw r18,r2 + 1047 05fc 002E mov r0,r16 + 1048 05fe 00C0 rjmp 2f + 1049 0600 3595 1: asr r19 + 1050 0602 2795 ror r18 + 1051 0604 0A94 2: dec r0 + 1052 0606 02F4 brpl 1b + 1053 0608 F501 movw r30,r10 + 1054 060a 8081 ld r24,Z + 1055 060c 90E0 ldi r25,lo8(0) + 1056 060e 2823 and r18,r24 + 1057 0610 3923 and r19,r25 + 1058 0612 232B or r18,r19 + 1059 0614 01F0 breq .L67 + 1060 .LM99: + 1061 0616 87E0 ldi r24,lo8(7) + 1062 0618 90E0 ldi r25,hi8(7) + 1063 061a B601 movw r22,r12 + 1064 061c A801 movw r20,r16 + 1065 061e 0E94 0000 call setvoxel + 1066 .L67: + 1067 .LM100: + 1068 0622 0F5F subi r16,lo8(-(1)) + 1069 0624 1F4F sbci r17,hi8(-(1)) + 1070 0626 0830 cpi r16,8 + 1071 0628 1105 cpc r17,__zero_reg__ + 1072 062a 01F4 brne .L68 + 1073 .LM101: + 1074 062c 0894 sec + 1075 062e E11C adc r14,__zero_reg__ + 1076 0630 F11C adc r15,__zero_reg__ + 1077 0632 F5E0 ldi r31,lo8(5) + 1078 0634 EF16 cp r14,r31 + 1079 0636 F104 cpc r15,__zero_reg__ + 1080 0638 01F0 breq .L69 + 1081 .LVL90: + 1082 .L66: + 1083 063a 00E0 ldi r16,lo8(0) + 1084 063c 10E0 ldi r17,hi8(0) + 1085 .LM102: + 1086 063e 5201 movw r10,r4 + 1087 .LVL91: + 1088 0640 AE0C add r10,r14 + 1089 0642 BF1C adc r11,r15 + 1090 .LM103: + 1091 0644 E2E0 ldi r30,lo8(2) + 1092 0646 CE2E mov r12,r30 + 1093 0648 D12C mov r13,__zero_reg__ + 1094 064a CE0C add r12,r14 + 1095 064c DF1C adc r13,r15 + 1096 064e 00C0 rjmp .L68 + 1097 .L69: + 1098 .LM104: + 1099 0650 AA24 clr r10 + 1100 0652 BB24 clr r11 + 1101 .LVL92: + 1102 .L77: + 1103 .LM105: + 1104 0654 88EE ldi r24,lo8(1000) + 1105 0656 93E0 ldi r25,hi8(1000) + 1106 0658 0E94 0000 call delay_ms + 1107 065c CC24 clr r12 + 1108 065e DD24 clr r13 + 1109 .LVL93: + 1110 0660 00C0 rjmp .L70 + 1111 .L71: + 1112 .LM106: + 1113 0662 C401 movw r24,r8 + 1114 0664 B701 movw r22,r14 + 1115 0666 A801 movw r20,r16 + 1116 0668 0E94 0000 call getvoxel + 1117 066c 282F mov r18,r24 + 1118 .LM107: + 1119 066e C601 movw r24,r12 + 1120 0670 B701 movw r22,r14 + 1121 0672 A801 movw r20,r16 + 1122 0674 30E0 ldi r19,lo8(0) + 1123 0676 0E94 0000 call altervoxel + 1124 .LM108: + 1125 067a 0F5F subi r16,lo8(-(1)) + 1126 067c 1F4F sbci r17,hi8(-(1)) + 1127 067e 0830 cpi r16,8 + 1128 0680 1105 cpc r17,__zero_reg__ + 1129 0682 01F4 brne .L71 + 1130 .LM109: + 1131 0684 0894 sec + 1132 0686 E11C adc r14,__zero_reg__ + 1133 0688 F11C adc r15,__zero_reg__ + 1134 068a 88E0 ldi r24,lo8(8) + 1135 068c E816 cp r14,r24 + 1136 068e F104 cpc r15,__zero_reg__ + 1137 0690 01F0 breq .L72 + 1138 .L74: + 1139 0692 00E0 ldi r16,lo8(0) + 1140 0694 10E0 ldi r17,hi8(0) + 1141 0696 00C0 rjmp .L71 + 1142 .L72: + 1143 0698 6401 movw r12,r8 + 1144 .LM110: + 1145 069a E7E0 ldi r30,lo8(7) + 1146 069c 8E16 cp r8,r30 + 1147 069e 9104 cpc r9,__zero_reg__ + 1148 06a0 01F4 brne .L70 + 1149 .LVL94: + 1150 06a2 EE24 clr r14 + 1151 06a4 FF24 clr r15 + 1152 .LVL95: + 1153 06a6 00C0 rjmp .L73 + 1154 .LVL96: + 1155 .L70: + 1156 06a8 EE24 clr r14 + 1157 06aa FF24 clr r15 + 1158 .LM111: + 1159 06ac 4601 movw r8,r12 + 1160 06ae 0894 sec + 1161 06b0 811C adc r8,__zero_reg__ + 1162 06b2 911C adc r9,__zero_reg__ + 1163 06b4 00C0 rjmp .L74 + 1164 .LVL97: + 1165 .L75: + 1166 .LM112: + 1167 06b6 87E0 ldi r24,lo8(7) + 1168 06b8 90E0 ldi r25,hi8(7) + 1169 06ba B701 movw r22,r14 + 1170 06bc A801 movw r20,r16 + 1171 06be 0E94 0000 call clrvoxel + 1172 .LM113: + 1173 06c2 0F5F subi r16,lo8(-(1)) + 1174 06c4 1F4F sbci r17,hi8(-(1)) + 1175 06c6 0830 cpi r16,8 + 1176 06c8 1105 cpc r17,__zero_reg__ + 1177 06ca 01F4 brne .L75 + 1178 .LM114: + 1179 06cc 0894 sec + 1180 06ce E11C adc r14,__zero_reg__ + 1181 06d0 F11C adc r15,__zero_reg__ + 1182 06d2 F8E0 ldi r31,lo8(8) + 1183 06d4 EF16 cp r14,r31 + 1184 06d6 F104 cpc r15,__zero_reg__ + 1185 06d8 01F0 breq .L76 + 1186 .L73: + 1187 06da 00E0 ldi r16,lo8(0) + 1188 06dc 10E0 ldi r17,hi8(0) + 1189 06de 00C0 rjmp .L75 + 1190 .L76: + 1191 .LM115: + 1192 06e0 0894 sec + 1193 06e2 A11C adc r10,__zero_reg__ + 1194 06e4 B11C adc r11,__zero_reg__ + 1195 06e6 86E0 ldi r24,lo8(6) + 1196 06e8 A816 cp r10,r24 + 1197 06ea B104 cpc r11,__zero_reg__ + 1198 06ec 01F0 breq .+2 + 1199 06ee 00C0 rjmp .L77 + 1200 .LM116: + 1201 06f0 0894 sec + 1202 06f2 611C adc r6,__zero_reg__ + 1203 06f4 711C adc r7,__zero_reg__ + 1204 .LVL98: + 1205 .L65: + 1206 .LM117: + 1207 06f6 F301 movw r30,r6 + 1208 06f8 8081 ld r24,Z + 1209 06fa 8823 tst r24 + 1210 06fc 01F0 breq .+2 + 1211 06fe 00C0 rjmp .L78 + 1212 0700 AA24 clr r10 + 1213 0702 BB24 clr r11 + 1214 .LVL99: + 1215 .L86: + 1216 .LM118: + 1217 0704 88EE ldi r24,lo8(1000) + 1218 0706 93E0 ldi r25,hi8(1000) + 1219 0708 0E94 0000 call delay_ms + 1220 070c CC24 clr r12 + 1221 070e DD24 clr r13 + 1222 .LVL100: + 1223 0710 00C0 rjmp .L79 + 1224 .L80: + 1225 .LM119: + 1226 0712 C401 movw r24,r8 + 1227 0714 B701 movw r22,r14 + 1228 0716 A801 movw r20,r16 + 1229 0718 0E94 0000 call getvoxel + 1230 071c 282F mov r18,r24 + 1231 .LM120: + 1232 071e C601 movw r24,r12 + 1233 0720 B701 movw r22,r14 + 1234 0722 A801 movw r20,r16 + 1235 0724 30E0 ldi r19,lo8(0) + 1236 0726 0E94 0000 call altervoxel + 1237 .LM121: + 1238 072a 0F5F subi r16,lo8(-(1)) + 1239 072c 1F4F sbci r17,hi8(-(1)) + 1240 072e 0830 cpi r16,8 + 1241 0730 1105 cpc r17,__zero_reg__ + 1242 0732 01F4 brne .L80 + 1243 .LM122: + 1244 0734 0894 sec + 1245 0736 E11C adc r14,__zero_reg__ + 1246 0738 F11C adc r15,__zero_reg__ + 1247 073a F8E0 ldi r31,lo8(8) + 1248 073c EF16 cp r14,r31 + 1249 073e F104 cpc r15,__zero_reg__ + 1250 0740 01F0 breq .L81 + 1251 .L83: + 1252 0742 00E0 ldi r16,lo8(0) + 1253 0744 10E0 ldi r17,hi8(0) + 1254 0746 00C0 rjmp .L80 + 1255 .L81: + 1256 0748 6401 movw r12,r8 + 1257 .LM123: + 1258 074a 87E0 ldi r24,lo8(7) + 1259 074c 8816 cp r8,r24 + 1260 074e 9104 cpc r9,__zero_reg__ + 1261 0750 01F4 brne .L79 + 1262 .LVL101: + 1263 0752 EE24 clr r14 + 1264 0754 FF24 clr r15 + 1265 .LVL102: + 1266 0756 00C0 rjmp .L82 + 1267 .LVL103: + 1268 .L79: + 1269 0758 EE24 clr r14 + 1270 075a FF24 clr r15 + 1271 .LM124: + 1272 075c 4601 movw r8,r12 + 1273 075e 0894 sec + 1274 0760 811C adc r8,__zero_reg__ + 1275 0762 911C adc r9,__zero_reg__ + 1276 0764 00C0 rjmp .L83 + 1277 .LVL104: + 1278 .L84: + 1279 .LM125: + 1280 0766 87E0 ldi r24,lo8(7) + 1281 0768 90E0 ldi r25,hi8(7) + 1282 076a B701 movw r22,r14 + 1283 076c A801 movw r20,r16 + 1284 076e 0E94 0000 call clrvoxel + 1285 .LM126: + 1286 0772 0F5F subi r16,lo8(-(1)) + 1287 0774 1F4F sbci r17,hi8(-(1)) + 1288 0776 0830 cpi r16,8 + 1289 0778 1105 cpc r17,__zero_reg__ + 1290 077a 01F4 brne .L84 + 1291 .LM127: + 1292 077c 0894 sec + 1293 077e E11C adc r14,__zero_reg__ + 1294 0780 F11C adc r15,__zero_reg__ + 1295 0782 E8E0 ldi r30,lo8(8) + 1296 0784 EE16 cp r14,r30 + 1297 0786 F104 cpc r15,__zero_reg__ + 1298 0788 01F0 breq .L85 + 1299 .L82: + 1300 078a 00E0 ldi r16,lo8(0) + 1301 078c 10E0 ldi r17,hi8(0) + 1302 078e 00C0 rjmp .L84 + 1303 .L85: + 1304 .LM128: + 1305 0790 0894 sec + 1306 0792 A11C adc r10,__zero_reg__ + 1307 0794 B11C adc r11,__zero_reg__ + 1308 0796 F8E0 ldi r31,lo8(8) + 1309 0798 AF16 cp r10,r31 + 1310 079a B104 cpc r11,__zero_reg__ + 1311 079c 01F0 breq .+2 + 1312 079e 00C0 rjmp .L86 + 1313 /* epilogue start */ + 1314 .LM129: + 1315 07a0 0F90 pop __tmp_reg__ + 1316 07a2 0F90 pop __tmp_reg__ + 1317 07a4 0F90 pop __tmp_reg__ + 1318 07a6 0F90 pop __tmp_reg__ + 1319 07a8 0F90 pop __tmp_reg__ + 1320 07aa CF91 pop r28 + 1321 07ac DF91 pop r29 + 1322 07ae 1F91 pop r17 + 1323 07b0 0F91 pop r16 + 1324 .LVL105: + 1325 07b2 FF90 pop r15 + 1326 07b4 EF90 pop r14 + 1327 .LVL106: + 1328 07b6 DF90 pop r13 + 1329 07b8 CF90 pop r12 + 1330 07ba BF90 pop r11 + 1331 07bc AF90 pop r10 + 1332 .LVL107: + 1333 07be 9F90 pop r9 + 1334 07c0 8F90 pop r8 + 1335 .LVL108: + 1336 07c2 7F90 pop r7 + 1337 07c4 6F90 pop r6 + 1338 .LVL109: + 1339 07c6 5F90 pop r5 + 1340 07c8 4F90 pop r4 + 1341 07ca 3F90 pop r3 + 1342 07cc 2F90 pop r2 + 1343 07ce 0895 ret + 1344 .LFE5: + 1346 .global effect_smileyspin + 1348 effect_smileyspin: + 1349 .LFB27: + 1350 .LM130: + 1351 .LVL110: + 1352 07d0 2F92 push r2 + 1353 07d2 3F92 push r3 + 1354 07d4 4F92 push r4 + 1355 07d6 5F92 push r5 + 1356 07d8 6F92 push r6 + 1357 07da 7F92 push r7 + 1358 07dc 8F92 push r8 + 1359 07de 9F92 push r9 + 1360 07e0 AF92 push r10 + 1361 07e2 BF92 push r11 + 1362 07e4 CF92 push r12 + 1363 07e6 DF92 push r13 + 1364 07e8 EF92 push r14 + 1365 07ea FF92 push r15 + 1366 07ec 0F93 push r16 + 1367 07ee 1F93 push r17 + 1368 07f0 DF93 push r29 + 1369 07f2 CF93 push r28 + 1370 07f4 CDB7 in r28,__SP_L__ + 1371 07f6 DEB7 in r29,__SP_H__ + 1372 07f8 EC97 sbiw r28,60 + 1373 07fa 0FB6 in __tmp_reg__,__SREG__ + 1374 07fc F894 cli + 1375 07fe DEBF out __SP_H__,r29 + 1376 0800 0FBE out __SREG__,__tmp_reg__ + 1377 0802 CDBF out __SP_L__,r28 + 1378 /* prologue: function */ + 1379 /* frame size = 60 */ + 1380 0804 9FA7 std Y+47,r25 + 1381 0806 8EA7 std Y+46,r24 + 1382 0808 69AB std Y+49,r22 + 1383 080a 7AAB std Y+50,r23 + 1384 .LVL111: + 1385 080c 48AB std Y+48,r20 + 1386 .LM131: + 1387 080e DE01 movw r26,r28 + 1388 0810 1196 adiw r26,1 + 1389 0812 E0E0 ldi r30,lo8(C.30.2453) + 1390 0814 F0E0 ldi r31,hi8(C.30.2453) + 1391 0816 80E2 ldi r24,lo8(32) + 1392 .LVL112: + 1393 .L98: + 1394 0818 0190 ld r0,Z+ + 1395 081a 0D92 st X+,r0 + 1396 081c 8150 subi r24,lo8(-(-1)) + 1397 081e 01F4 brne .L98 + 1398 0820 1DA6 std Y+45,__zero_reg__ + 1399 0822 1CA6 std Y+44,__zero_reg__ + 1400 .LVL113: + 1401 .LBB2: + 1402 .LBB3: + 1403 .LM132: + 1404 0824 9E01 movw r18,r28 + 1405 0826 2F5F subi r18,lo8(-(1)) + 1406 0828 3F4F sbci r19,hi8(-(1)) + 1407 082a 3CAF std Y+60,r19 + 1408 082c 2BAF std Y+59,r18 + 1409 082e 00C0 rjmp .L99 + 1410 .LVL114: + 1411 .L132: + 1412 .LBE3: + 1413 .LBE2: + 1414 .LM133: + 1415 0830 2224 clr r2 + 1416 0832 3324 clr r3 + 1417 .LVL115: + 1418 0834 8824 clr r8 + 1419 0836 9924 clr r9 + 1420 .LVL116: + 1421 0838 4424 clr r4 + 1422 083a 5524 clr r5 + 1423 .LVL117: + 1424 .L107: + 1425 083c C401 movw r24,r8 + 1426 083e 0196 adiw r24,1 + 1427 .LVL118: + 1428 .LBB8: + 1429 .LBB4: + 1430 .LM134: + 1431 0840 2114 cp r2,__zero_reg__ + 1432 0842 3104 cpc r3,__zero_reg__ + 1433 0844 01F4 brne .L100 + 1434 .LM135: + 1435 0846 4C01 movw r8,r24 + 1436 .LM136: + 1437 0848 8430 cpi r24,4 + 1438 084a 9105 cpc r25,__zero_reg__ + 1439 084c 01F4 brne .L101 + 1440 084e 71E0 ldi r23,lo8(1) + 1441 0850 272E mov r2,r23 + 1442 0852 312C mov r3,__zero_reg__ + 1443 .LVL119: + 1444 0854 8824 clr r8 + 1445 0856 9924 clr r9 + 1446 .LVL120: + 1447 0858 00C0 rjmp .L101 + 1448 .LVL121: + 1449 .L100: + 1450 .LM137: + 1451 085a 4C01 movw r8,r24 + 1452 .LVL122: + 1453 .L101: + 1454 .LM138: + 1455 085c C401 movw r24,r8 + 1456 085e 63E0 ldi r22,3 + 1457 0860 880F 1: lsl r24 + 1458 0862 991F rol r25 + 1459 0864 6A95 dec r22 + 1460 0866 01F4 brne 1b + 1461 .LVL123: + 1462 .LM139: + 1463 0868 6BAC ldd r6,Y+59 + 1464 086a 7CAC ldd r7,Y+60 + 1465 086c 681A sub r6,r24 + 1466 086e 790A sbc r7,r25 + 1467 0870 AA24 clr r10 + 1468 0872 BB24 clr r11 + 1469 0874 E7E0 ldi r30,lo8(7) + 1470 0876 EFA3 std Y+39,r30 + 1471 .LM140: + 1472 0878 2FE1 ldi r18,lo8(31) + 1473 087a 30E0 ldi r19,hi8(31) + 1474 087c 620E add r6,r18 + 1475 087e 731E adc r7,r19 + 1476 0880 E1E0 ldi r30,lo8(1) + 1477 0882 F0E0 ldi r31,hi8(1) + 1478 0884 EC0F add r30,r28 + 1479 0886 FD1F adc r31,r29 + 1480 0888 E80F add r30,r24 + 1481 088a F91F adc r31,r25 + 1482 088c FAAF std Y+58,r31 + 1483 088e E9AF std Y+57,r30 + 1484 0890 00C0 rjmp .L102 + 1485 .L105: + 1486 .LM141: + 1487 0892 88A9 ldd r24,Y+48 + 1488 0894 6FA1 ldd r22,Y+39 + 1489 0896 402F mov r20,r16 + 1490 0898 0E94 0000 call font_getbitmappixel + 1491 .LVL124: + 1492 089c 8823 tst r24 + 1493 089e 01F0 breq .L103 + 1494 .LM142: + 1495 08a0 2114 cp r2,__zero_reg__ + 1496 08a2 3104 cpc r3,__zero_reg__ + 1497 08a4 01F4 brne .L104 + 1498 .LM143: + 1499 08a6 F701 movw r30,r14 + 1500 08a8 00C0 rjmp .L143 + 1501 .L104: + 1502 .LM144: + 1503 08aa F601 movw r30,r12 + 1504 .L143: + 1505 08ac 6081 ld r22,Z + 1506 08ae C801 movw r24,r16 + 1507 08b0 70E0 ldi r23,lo8(0) + 1508 08b2 A501 movw r20,r10 + 1509 08b4 0E94 0000 call setvoxel + 1510 .L103: + 1511 .LM145: + 1512 08b8 0F5F subi r16,lo8(-(1)) + 1513 08ba 1F4F sbci r17,hi8(-(1)) + 1514 08bc 0894 sec + 1515 08be C108 sbc r12,__zero_reg__ + 1516 08c0 D108 sbc r13,__zero_reg__ + 1517 08c2 0894 sec + 1518 08c4 E11C adc r14,__zero_reg__ + 1519 08c6 F11C adc r15,__zero_reg__ + 1520 08c8 0830 cpi r16,8 + 1521 08ca 1105 cpc r17,__zero_reg__ + 1522 08cc 01F4 brne .L105 + 1523 .LM146: + 1524 08ce 0894 sec + 1525 08d0 A11C adc r10,__zero_reg__ + 1526 08d2 B11C adc r11,__zero_reg__ + 1527 08d4 FFA1 ldd r31,Y+39 + 1528 08d6 F150 subi r31,lo8(-(-1)) + 1529 08d8 FFA3 std Y+39,r31 + 1530 08da FF3F cpi r31,lo8(-1) + 1531 08dc 01F0 breq .L106 + 1532 .LVL125: + 1533 .L102: + 1534 08de 6301 movw r12,r6 + 1535 08e0 E9AC ldd r14,Y+57 + 1536 08e2 FAAC ldd r15,Y+58 + 1537 08e4 00E0 ldi r16,lo8(0) + 1538 08e6 10E0 ldi r17,hi8(0) + 1539 08e8 00C0 rjmp .L105 + 1540 .LVL126: + 1541 .L106: + 1542 .LM147: + 1543 08ea 89A9 ldd r24,Y+49 + 1544 08ec 9AA9 ldd r25,Y+50 + 1545 08ee 0E94 0000 call delay_ms + 1546 .LM148: + 1547 08f2 80E0 ldi r24,lo8(0) + 1548 08f4 0E94 0000 call fill + 1549 .LM149: + 1550 08f8 0894 sec + 1551 08fa 411C adc r4,__zero_reg__ + 1552 08fc 511C adc r5,__zero_reg__ + 1553 08fe 27E0 ldi r18,lo8(7) + 1554 0900 4216 cp r4,r18 + 1555 0902 5104 cpc r5,__zero_reg__ + 1556 0904 01F0 breq .+2 + 1557 0906 00C0 rjmp .L107 + 1558 0908 1EA2 std Y+38,__zero_reg__ + 1559 090a 1DA2 std Y+37,__zero_reg__ + 1560 .LVL127: + 1561 090c 6624 clr r6 + 1562 090e 7724 clr r7 + 1563 .LVL128: + 1564 0910 2224 clr r2 + 1565 0912 3324 clr r3 + 1566 .LVL129: + 1567 .L115: + 1568 0914 C301 movw r24,r6 + 1569 0916 0196 adiw r24,1 + 1570 .LVL130: + 1571 .LBE4: + 1572 .LBB5: + 1573 .LM150: + 1574 0918 EDA1 ldd r30,Y+37 + 1575 091a FEA1 ldd r31,Y+38 + 1576 091c EF2B or r30,r31 + 1577 091e 01F4 brne .L108 + 1578 .LM151: + 1579 0920 3C01 movw r6,r24 + 1580 .LM152: + 1581 0922 8430 cpi r24,4 + 1582 0924 9105 cpc r25,__zero_reg__ + 1583 0926 01F4 brne .L109 + 1584 0928 21E0 ldi r18,lo8(1) + 1585 092a 30E0 ldi r19,hi8(1) + 1586 092c 3EA3 std Y+38,r19 + 1587 092e 2DA3 std Y+37,r18 + 1588 .LVL131: + 1589 0930 6624 clr r6 + 1590 0932 7724 clr r7 + 1591 .LVL132: + 1592 0934 00C0 rjmp .L109 + 1593 .LVL133: + 1594 .L108: + 1595 .LM153: + 1596 0936 3C01 movw r6,r24 + 1597 .LVL134: + 1598 .L109: + 1599 .LM154: + 1600 0938 C301 movw r24,r6 + 1601 093a 53E0 ldi r21,3 + 1602 093c 880F 1: lsl r24 + 1603 093e 991F rol r25 + 1604 0940 5A95 dec r21 + 1605 0942 01F4 brne 1b + 1606 .LM155: + 1607 0944 4BAC ldd r4,Y+59 + 1608 0946 5CAC ldd r5,Y+60 + 1609 .LVL135: + 1610 0948 481A sub r4,r24 + 1611 094a 590A sbc r5,r25 + 1612 094c 8824 clr r8 + 1613 094e 9924 clr r9 + 1614 0950 37E0 ldi r19,lo8(7) + 1615 0952 38A7 std Y+40,r19 + 1616 .LM156: + 1617 0954 EFE1 ldi r30,lo8(31) + 1618 0956 F0E0 ldi r31,hi8(31) + 1619 0958 4E0E add r4,r30 + 1620 095a 5F1E adc r5,r31 + 1621 095c 21E0 ldi r18,lo8(1) + 1622 095e 30E0 ldi r19,hi8(1) + 1623 0960 2C0F add r18,r28 + 1624 0962 3D1F adc r19,r29 + 1625 0964 280F add r18,r24 + 1626 0966 391F adc r19,r25 + 1627 0968 38AF std Y+56,r19 + 1628 096a 2FAB std Y+55,r18 + 1629 096c 00C0 rjmp .L110 + 1630 .LVL136: + 1631 .L113: + 1632 .LM157: + 1633 096e 4E2D mov r20,r14 + 1634 0970 4150 subi r20,lo8(-(-1)) + 1635 0972 88A9 ldd r24,Y+48 + 1636 0974 68A5 ldd r22,Y+40 + 1637 0976 0E94 0000 call font_getbitmappixel + 1638 097a 8823 tst r24 + 1639 097c 01F0 breq .L111 + 1640 .LM158: + 1641 097e 8DA1 ldd r24,Y+37 + 1642 0980 9EA1 ldd r25,Y+38 + 1643 0982 892B or r24,r25 + 1644 0984 01F4 brne .L112 + 1645 .LM159: + 1646 0986 F601 movw r30,r12 + 1647 0988 00C0 rjmp .L144 + 1648 .L112: + 1649 .LM160: + 1650 098a F501 movw r30,r10 + 1651 .L144: + 1652 098c 8081 ld r24,Z + 1653 098e 90E0 ldi r25,lo8(0) + 1654 0990 B801 movw r22,r16 + 1655 0992 A401 movw r20,r8 + 1656 0994 0E94 0000 call setvoxel + 1657 .L111: + 1658 0998 0894 sec + 1659 099a E11C adc r14,__zero_reg__ + 1660 099c F11C adc r15,__zero_reg__ + 1661 099e 0150 subi r16,lo8(-(-1)) + 1662 09a0 1040 sbci r17,hi8(-(-1)) + 1663 09a2 0894 sec + 1664 09a4 A108 sbc r10,__zero_reg__ + 1665 09a6 B108 sbc r11,__zero_reg__ + 1666 09a8 0894 sec + 1667 09aa C11C adc r12,__zero_reg__ + 1668 09ac D11C adc r13,__zero_reg__ + 1669 .LM161: + 1670 09ae F9E0 ldi r31,lo8(9) + 1671 09b0 EF16 cp r14,r31 + 1672 09b2 F104 cpc r15,__zero_reg__ + 1673 09b4 01F4 brne .L113 + 1674 .LM162: + 1675 09b6 0894 sec + 1676 09b8 811C adc r8,__zero_reg__ + 1677 09ba 911C adc r9,__zero_reg__ + 1678 09bc 28A5 ldd r18,Y+40 + 1679 09be 2150 subi r18,lo8(-(-1)) + 1680 09c0 28A7 std Y+40,r18 + 1681 09c2 2F3F cpi r18,lo8(-1) + 1682 09c4 01F0 breq .L114 + 1683 .LVL137: + 1684 .L110: + 1685 09c6 5201 movw r10,r4 + 1686 09c8 CFA8 ldd r12,Y+55 + 1687 09ca D8AC ldd r13,Y+56 + 1688 09cc 41E0 ldi r20,lo8(1) + 1689 09ce E42E mov r14,r20 + 1690 09d0 F12C mov r15,__zero_reg__ + 1691 09d2 07E0 ldi r16,lo8(7) + 1692 09d4 10E0 ldi r17,hi8(7) + 1693 .LVL138: + 1694 09d6 00C0 rjmp .L113 + 1695 .L114: + 1696 .LM163: + 1697 09d8 89A9 ldd r24,Y+49 + 1698 09da 9AA9 ldd r25,Y+50 + 1699 09dc 0E94 0000 call delay_ms + 1700 .LM164: + 1701 09e0 80E0 ldi r24,lo8(0) + 1702 09e2 0E94 0000 call fill + 1703 .LM165: + 1704 09e6 0894 sec + 1705 09e8 211C adc r2,__zero_reg__ + 1706 09ea 311C adc r3,__zero_reg__ + 1707 09ec 37E0 ldi r19,lo8(7) + 1708 09ee 2316 cp r2,r19 + 1709 09f0 3104 cpc r3,__zero_reg__ + 1710 09f2 01F0 breq .+2 + 1711 09f4 00C0 rjmp .L115 + 1712 09f6 1CA2 std Y+36,__zero_reg__ + 1713 09f8 1BA2 std Y+35,__zero_reg__ + 1714 .LVL139: + 1715 09fa 6624 clr r6 + 1716 09fc 7724 clr r7 + 1717 .LVL140: + 1718 09fe 1BA6 std Y+43,__zero_reg__ + 1719 0a00 1AA6 std Y+42,__zero_reg__ + 1720 .LVL141: + 1721 .L123: + 1722 0a02 C301 movw r24,r6 + 1723 0a04 0196 adiw r24,1 + 1724 .LVL142: + 1725 .LBE5: + 1726 .LBB6: + 1727 .LM166: + 1728 0a06 EBA1 ldd r30,Y+35 + 1729 0a08 FCA1 ldd r31,Y+36 + 1730 0a0a EF2B or r30,r31 + 1731 0a0c 01F4 brne .L116 + 1732 .LM167: + 1733 0a0e 3C01 movw r6,r24 + 1734 .LM168: + 1735 0a10 8430 cpi r24,4 + 1736 0a12 9105 cpc r25,__zero_reg__ + 1737 0a14 01F4 brne .L117 + 1738 0a16 21E0 ldi r18,lo8(1) + 1739 0a18 30E0 ldi r19,hi8(1) + 1740 0a1a 3CA3 std Y+36,r19 + 1741 0a1c 2BA3 std Y+35,r18 + 1742 .LVL143: + 1743 0a1e 6624 clr r6 + 1744 0a20 7724 clr r7 + 1745 .LVL144: + 1746 0a22 00C0 rjmp .L117 + 1747 .LVL145: + 1748 .L116: + 1749 .LM169: + 1750 0a24 3C01 movw r6,r24 + 1751 .LVL146: + 1752 .L117: + 1753 .LM170: + 1754 0a26 C301 movw r24,r6 + 1755 0a28 33E0 ldi r19,3 + 1756 0a2a 880F 1: lsl r24 + 1757 0a2c 991F rol r25 + 1758 0a2e 3A95 dec r19 + 1759 0a30 01F4 brne 1b + 1760 .LM171: + 1761 0a32 4BAC ldd r4,Y+59 + 1762 0a34 5CAC ldd r5,Y+60 + 1763 0a36 481A sub r4,r24 + 1764 0a38 590A sbc r5,r25 + 1765 0a3a AA24 clr r10 + 1766 0a3c BB24 clr r11 + 1767 .LVL147: + 1768 0a3e 27E0 ldi r18,lo8(7) + 1769 0a40 222E mov r2,r18 + 1770 .LVL148: + 1771 .LM172: + 1772 0a42 EFE1 ldi r30,lo8(31) + 1773 0a44 F0E0 ldi r31,hi8(31) + 1774 0a46 4E0E add r4,r30 + 1775 0a48 5F1E adc r5,r31 + 1776 0a4a 21E0 ldi r18,lo8(1) + 1777 0a4c 30E0 ldi r19,hi8(1) + 1778 0a4e 2C0F add r18,r28 + 1779 0a50 3D1F adc r19,r29 + 1780 0a52 280F add r18,r24 + 1781 0a54 391F adc r19,r25 + 1782 0a56 3EAB std Y+54,r19 + 1783 0a58 2DAB std Y+53,r18 + 1784 0a5a 00C0 rjmp .L118 + 1785 .L121: + 1786 .LM173: + 1787 0a5c 4801 movw r8,r16 + 1788 0a5e 0894 sec + 1789 0a60 8108 sbc r8,__zero_reg__ + 1790 0a62 9108 sbc r9,__zero_reg__ + 1791 .LM174: + 1792 0a64 88A9 ldd r24,Y+48 + 1793 0a66 622D mov r22,r2 + 1794 0a68 432D mov r20,r3 + 1795 0a6a 0E94 0000 call font_getbitmappixel + 1796 0a6e 8823 tst r24 + 1797 0a70 01F0 breq .L119 + 1798 .LM175: + 1799 0a72 8BA1 ldd r24,Y+35 + 1800 0a74 9CA1 ldd r25,Y+36 + 1801 0a76 892B or r24,r25 + 1802 0a78 01F4 brne .L120 + 1803 .LM176: + 1804 0a7a F701 movw r30,r14 + 1805 0a7c 00C0 rjmp .L145 + 1806 .L120: + 1807 .LM177: + 1808 0a7e F601 movw r30,r12 + 1809 .L145: + 1810 0a80 6081 ld r22,Z + 1811 0a82 C401 movw r24,r8 + 1812 0a84 70E0 ldi r23,lo8(0) + 1813 0a86 A501 movw r20,r10 + 1814 0a88 0E94 0000 call setvoxel + 1815 .L119: + 1816 0a8c 0F5F subi r16,lo8(-(1)) + 1817 0a8e 1F4F sbci r17,hi8(-(1)) + 1818 0a90 3A94 dec r3 + 1819 0a92 0894 sec + 1820 0a94 C108 sbc r12,__zero_reg__ + 1821 0a96 D108 sbc r13,__zero_reg__ + 1822 0a98 0894 sec + 1823 0a9a E11C adc r14,__zero_reg__ + 1824 0a9c F11C adc r15,__zero_reg__ + 1825 .LM178: + 1826 0a9e FFEF ldi r31,lo8(-1) + 1827 0aa0 3F16 cp r3,r31 + 1828 0aa2 01F4 brne .L121 + 1829 .LM179: + 1830 0aa4 0894 sec + 1831 0aa6 A11C adc r10,__zero_reg__ + 1832 0aa8 B11C adc r11,__zero_reg__ + 1833 0aaa 2A94 dec r2 + 1834 0aac 2F16 cp r2,r31 + 1835 0aae 01F0 breq .L122 + 1836 .L118: + 1837 0ab0 6201 movw r12,r4 + 1838 0ab2 EDA8 ldd r14,Y+53 + 1839 0ab4 FEA8 ldd r15,Y+54 + 1840 0ab6 01E0 ldi r16,lo8(1) + 1841 0ab8 10E0 ldi r17,hi8(1) + 1842 0aba 87E0 ldi r24,lo8(7) + 1843 0abc 382E mov r3,r24 + 1844 0abe 00C0 rjmp .L121 + 1845 .L122: + 1846 .LM180: + 1847 0ac0 89A9 ldd r24,Y+49 + 1848 0ac2 9AA9 ldd r25,Y+50 + 1849 0ac4 0E94 0000 call delay_ms + 1850 .LM181: + 1851 0ac8 80E0 ldi r24,lo8(0) + 1852 0aca 0E94 0000 call fill + 1853 .LM182: + 1854 0ace 2AA5 ldd r18,Y+42 + 1855 0ad0 3BA5 ldd r19,Y+43 + 1856 0ad2 2F5F subi r18,lo8(-(1)) + 1857 0ad4 3F4F sbci r19,hi8(-(1)) + 1858 0ad6 3BA7 std Y+43,r19 + 1859 0ad8 2AA7 std Y+42,r18 + 1860 .LVL149: + 1861 0ada 2730 cpi r18,7 + 1862 0adc 3105 cpc r19,__zero_reg__ + 1863 0ade 01F0 breq .+2 + 1864 0ae0 00C0 rjmp .L123 + 1865 0ae2 1AA2 std Y+34,__zero_reg__ + 1866 0ae4 19A2 std Y+33,__zero_reg__ + 1867 .LVL150: + 1868 0ae6 6624 clr r6 + 1869 0ae8 7724 clr r7 + 1870 .LVL151: + 1871 0aea 2224 clr r2 + 1872 0aec 3324 clr r3 + 1873 .LVL152: + 1874 .L131: + 1875 0aee C301 movw r24,r6 + 1876 0af0 0196 adiw r24,1 + 1877 .LVL153: + 1878 .LBE6: + 1879 .LBB7: + 1880 .LM183: + 1881 0af2 E9A1 ldd r30,Y+33 + 1882 0af4 FAA1 ldd r31,Y+34 + 1883 0af6 EF2B or r30,r31 + 1884 0af8 01F4 brne .L124 + 1885 .LM184: + 1886 0afa 3C01 movw r6,r24 + 1887 .LM185: + 1888 0afc 8430 cpi r24,4 + 1889 0afe 9105 cpc r25,__zero_reg__ + 1890 0b00 01F4 brne .L125 + 1891 0b02 21E0 ldi r18,lo8(1) + 1892 0b04 30E0 ldi r19,hi8(1) + 1893 0b06 3AA3 std Y+34,r19 + 1894 0b08 29A3 std Y+33,r18 + 1895 .LVL154: + 1896 0b0a 6624 clr r6 + 1897 0b0c 7724 clr r7 + 1898 .LVL155: + 1899 0b0e 00C0 rjmp .L125 + 1900 .LVL156: + 1901 .L124: + 1902 .LM186: + 1903 0b10 3C01 movw r6,r24 + 1904 .LVL157: + 1905 .L125: + 1906 .LM187: + 1907 0b12 C301 movw r24,r6 + 1908 0b14 B3E0 ldi r27,3 + 1909 0b16 880F 1: lsl r24 + 1910 0b18 991F rol r25 + 1911 0b1a BA95 dec r27 + 1912 0b1c 01F4 brne 1b + 1913 .LM188: + 1914 0b1e 4BAC ldd r4,Y+59 + 1915 0b20 5CAC ldd r5,Y+60 + 1916 0b22 481A sub r4,r24 + 1917 0b24 590A sbc r5,r25 + 1918 0b26 8824 clr r8 + 1919 0b28 9924 clr r9 + 1920 .LVL158: + 1921 0b2a 37E0 ldi r19,lo8(7) + 1922 0b2c 39A7 std Y+41,r19 + 1923 .LM189: + 1924 0b2e EFE1 ldi r30,lo8(31) + 1925 0b30 F0E0 ldi r31,hi8(31) + 1926 0b32 4E0E add r4,r30 + 1927 0b34 5F1E adc r5,r31 + 1928 0b36 21E0 ldi r18,lo8(1) + 1929 0b38 30E0 ldi r19,hi8(1) + 1930 0b3a 2C0F add r18,r28 + 1931 0b3c 3D1F adc r19,r29 + 1932 0b3e 280F add r18,r24 + 1933 0b40 391F adc r19,r25 + 1934 0b42 3CAB std Y+52,r19 + 1935 0b44 2BAB std Y+51,r18 + 1936 0b46 00C0 rjmp .L126 + 1937 .L129: + 1938 .LM190: + 1939 0b48 88A9 ldd r24,Y+48 + 1940 0b4a 69A5 ldd r22,Y+41 + 1941 0b4c 402F mov r20,r16 + 1942 0b4e 0E94 0000 call font_getbitmappixel + 1943 0b52 8823 tst r24 + 1944 0b54 01F0 breq .L127 + 1945 .LM191: + 1946 0b56 89A1 ldd r24,Y+33 + 1947 0b58 9AA1 ldd r25,Y+34 + 1948 0b5a 892B or r24,r25 + 1949 0b5c 01F4 brne .L128 + 1950 .LM192: + 1951 0b5e F601 movw r30,r12 + 1952 0b60 00C0 rjmp .L146 + 1953 .L128: + 1954 .LM193: + 1955 0b62 F501 movw r30,r10 + 1956 .L146: + 1957 0b64 8081 ld r24,Z + 1958 0b66 90E0 ldi r25,lo8(0) + 1959 0b68 B801 movw r22,r16 + 1960 0b6a A401 movw r20,r8 + 1961 0b6c 0E94 0000 call setvoxel + 1962 .L127: + 1963 0b70 0894 sec + 1964 0b72 E11C adc r14,__zero_reg__ + 1965 0b74 F11C adc r15,__zero_reg__ + 1966 0b76 0150 subi r16,lo8(-(-1)) + 1967 0b78 1040 sbci r17,hi8(-(-1)) + 1968 0b7a 0894 sec + 1969 0b7c A108 sbc r10,__zero_reg__ + 1970 0b7e B108 sbc r11,__zero_reg__ + 1971 0b80 0894 sec + 1972 0b82 C11C adc r12,__zero_reg__ + 1973 0b84 D11C adc r13,__zero_reg__ + 1974 .LM194: + 1975 0b86 F9E0 ldi r31,lo8(9) + 1976 0b88 EF16 cp r14,r31 + 1977 0b8a F104 cpc r15,__zero_reg__ + 1978 0b8c 01F4 brne .L129 + 1979 .LM195: + 1980 0b8e 0894 sec + 1981 0b90 811C adc r8,__zero_reg__ + 1982 0b92 911C adc r9,__zero_reg__ + 1983 0b94 29A5 ldd r18,Y+41 + 1984 0b96 2150 subi r18,lo8(-(-1)) + 1985 0b98 29A7 std Y+41,r18 + 1986 0b9a 2F3F cpi r18,lo8(-1) + 1987 0b9c 01F0 breq .L130 + 1988 .L126: + 1989 0b9e 5201 movw r10,r4 + 1990 0ba0 CBA8 ldd r12,Y+51 + 1991 0ba2 DCA8 ldd r13,Y+52 + 1992 0ba4 A1E0 ldi r26,lo8(1) + 1993 0ba6 EA2E mov r14,r26 + 1994 0ba8 F12C mov r15,__zero_reg__ + 1995 0baa 07E0 ldi r16,lo8(7) + 1996 0bac 10E0 ldi r17,hi8(7) + 1997 0bae 00C0 rjmp .L129 + 1998 .L130: + 1999 .LM196: + 2000 0bb0 89A9 ldd r24,Y+49 + 2001 0bb2 9AA9 ldd r25,Y+50 + 2002 0bb4 0E94 0000 call delay_ms + 2003 .LM197: + 2004 0bb8 80E0 ldi r24,lo8(0) + 2005 0bba 0E94 0000 call fill + 2006 .LM198: + 2007 0bbe 0894 sec + 2008 0bc0 211C adc r2,__zero_reg__ + 2009 0bc2 311C adc r3,__zero_reg__ + 2010 0bc4 37E0 ldi r19,lo8(7) + 2011 0bc6 2316 cp r2,r19 + 2012 0bc8 3104 cpc r3,__zero_reg__ + 2013 0bca 01F0 breq .+2 + 2014 0bcc 00C0 rjmp .L131 + 2015 .LBE7: + 2016 .LM199: + 2017 0bce 8CA5 ldd r24,Y+44 + 2018 0bd0 9DA5 ldd r25,Y+45 + 2019 0bd2 0196 adiw r24,1 + 2020 0bd4 9DA7 std Y+45,r25 + 2021 0bd6 8CA7 std Y+44,r24 + 2022 .LVL159: + 2023 .L99: + 2024 0bd8 ECA5 ldd r30,Y+44 + 2025 0bda FDA5 ldd r31,Y+45 + 2026 0bdc 2EA5 ldd r18,Y+46 + 2027 0bde 3FA5 ldd r19,Y+47 + 2028 0be0 E217 cp r30,r18 + 2029 0be2 F307 cpc r31,r19 + 2030 0be4 04F4 brge .+2 + 2031 0be6 00C0 rjmp .L132 + 2032 /* epilogue start */ + 2033 .LBE8: + 2034 .LM200: + 2035 0be8 EC96 adiw r28,60 + 2036 0bea 0FB6 in __tmp_reg__,__SREG__ + 2037 0bec F894 cli + 2038 0bee DEBF out __SP_H__,r29 + 2039 0bf0 0FBE out __SREG__,__tmp_reg__ + 2040 0bf2 CDBF out __SP_L__,r28 + 2041 0bf4 CF91 pop r28 + 2042 0bf6 DF91 pop r29 + 2043 0bf8 1F91 pop r17 + 2044 0bfa 0F91 pop r16 + 2045 0bfc FF90 pop r15 + 2046 0bfe EF90 pop r14 + 2047 0c00 DF90 pop r13 + 2048 0c02 CF90 pop r12 + 2049 0c04 BF90 pop r11 + 2050 0c06 AF90 pop r10 + 2051 0c08 9F90 pop r9 + 2052 0c0a 8F90 pop r8 + 2053 .LVL160: + 2054 0c0c 7F90 pop r7 + 2055 0c0e 6F90 pop r6 + 2056 .LVL161: + 2057 0c10 5F90 pop r5 + 2058 0c12 4F90 pop r4 + 2059 0c14 3F90 pop r3 + 2060 0c16 2F90 pop r2 + 2061 .LVL162: + 2062 0c18 0895 ret + 2063 .LFE27: + 2065 .global effect_random_sparkle_flash + 2067 effect_random_sparkle_flash: + 2068 .LFB22: + 2069 .LM201: + 2070 .LVL163: + 2071 0c1a 6F92 push r6 + 2072 0c1c 7F92 push r7 + 2073 0c1e 8F92 push r8 + 2074 0c20 9F92 push r9 + 2075 0c22 AF92 push r10 + 2076 0c24 BF92 push r11 + 2077 0c26 CF92 push r12 + 2078 0c28 DF92 push r13 + 2079 0c2a EF92 push r14 + 2080 0c2c FF92 push r15 + 2081 0c2e 0F93 push r16 + 2082 0c30 1F93 push r17 + 2083 0c32 CF93 push r28 + 2084 0c34 DF93 push r29 + 2085 /* prologue: function */ + 2086 /* frame size = 0 */ + 2087 0c36 3C01 movw r6,r24 + 2088 0c38 4B01 movw r8,r22 + 2089 0c3a 5A01 movw r10,r20 + 2090 .LM202: + 2091 0c3c CC24 clr r12 + 2092 0c3e DD24 clr r13 + 2093 .LVL164: + 2094 0c40 00C0 rjmp .L148 + 2095 .LVL165: + 2096 .L149: + 2097 .LM203: + 2098 0c42 0E94 0000 call rand + 2099 0c46 8C01 movw r16,r24 + 2100 0c48 0E94 0000 call rand + 2101 0c4c 7C01 movw r14,r24 + 2102 0c4e 0E94 0000 call rand + 2103 0c52 FC01 movw r30,r24 + 2104 0c54 C801 movw r24,r16 + 2105 0c56 68E0 ldi r22,lo8(8) + 2106 0c58 70E0 ldi r23,hi8(8) + 2107 0c5a 0E94 0000 call __divmodhi4 + 2108 0c5e 8C01 movw r16,r24 + 2109 0c60 C701 movw r24,r14 + 2110 0c62 68E0 ldi r22,lo8(8) + 2111 0c64 70E0 ldi r23,hi8(8) + 2112 0c66 0E94 0000 call __divmodhi4 + 2113 0c6a 9C01 movw r18,r24 + 2114 0c6c CF01 movw r24,r30 + 2115 0c6e 68E0 ldi r22,lo8(8) + 2116 0c70 70E0 ldi r23,hi8(8) + 2117 0c72 0E94 0000 call __divmodhi4 + 2118 0c76 AC01 movw r20,r24 + 2119 0c78 C801 movw r24,r16 + 2120 0c7a B901 movw r22,r18 + 2121 0c7c 0E94 0000 call setvoxel + 2122 .LM204: + 2123 0c80 2196 adiw r28,1 + 2124 .LVL166: + 2125 .L151: + 2126 0c82 8C16 cp r8,r28 + 2127 0c84 9D06 cpc r9,r29 + 2128 0c86 04F4 brge .L149 + 2129 .LM205: + 2130 0c88 C501 movw r24,r10 + 2131 0c8a 0E94 0000 call delay_ms + 2132 .LM206: + 2133 0c8e 80E0 ldi r24,lo8(0) + 2134 0c90 0E94 0000 call fill + 2135 .LM207: + 2136 0c94 0894 sec + 2137 0c96 C11C adc r12,__zero_reg__ + 2138 0c98 D11C adc r13,__zero_reg__ + 2139 .LVL167: + 2140 .L148: + 2141 0c9a C614 cp r12,r6 + 2142 0c9c D704 cpc r13,r7 + 2143 0c9e 04F4 brge .L152 + 2144 0ca0 C0E0 ldi r28,lo8(0) + 2145 0ca2 D0E0 ldi r29,hi8(0) + 2146 0ca4 00C0 rjmp .L151 + 2147 .L152: + 2148 /* epilogue start */ + 2149 .LM208: + 2150 0ca6 DF91 pop r29 + 2151 0ca8 CF91 pop r28 + 2152 .LVL168: + 2153 0caa 1F91 pop r17 + 2154 0cac 0F91 pop r16 + 2155 0cae FF90 pop r15 + 2156 0cb0 EF90 pop r14 + 2157 0cb2 DF90 pop r13 + 2158 0cb4 CF90 pop r12 + 2159 .LVL169: + 2160 0cb6 BF90 pop r11 + 2161 0cb8 AF90 pop r10 + 2162 .LVL170: + 2163 0cba 9F90 pop r9 + 2164 0cbc 8F90 pop r8 + 2165 .LVL171: + 2166 0cbe 7F90 pop r7 + 2167 0cc0 6F90 pop r6 + 2168 .LVL172: + 2169 0cc2 0895 ret + 2170 .LFE22: + 2172 .global effect_random_sparkle + 2174 effect_random_sparkle: + 2175 .LFB23: + 2176 .LM209: + 2177 0cc4 CF93 push r28 + 2178 0cc6 DF93 push r29 + 2179 /* prologue: function */ + 2180 /* frame size = 0 */ + 2181 .LM210: + 2182 0cc8 C1E0 ldi r28,lo8(1) + 2183 0cca D0E0 ldi r29,hi8(1) + 2184 .LVL173: + 2185 .L154: + 2186 .LM211: + 2187 0ccc 85E0 ldi r24,lo8(5) + 2188 0cce 90E0 ldi r25,hi8(5) + 2189 0cd0 BE01 movw r22,r28 + 2190 0cd2 48EC ldi r20,lo8(200) + 2191 0cd4 50E0 ldi r21,hi8(200) + 2192 0cd6 0E94 0000 call effect_random_sparkle_flash + 2193 .LM212: + 2194 0cda 2196 adiw r28,1 + 2195 0cdc C431 cpi r28,20 + 2196 0cde D105 cpc r29,__zero_reg__ + 2197 0ce0 01F4 brne .L154 + 2198 .L157: + 2199 .LM213: + 2200 0ce2 85E0 ldi r24,lo8(5) + 2201 0ce4 90E0 ldi r25,hi8(5) + 2202 0ce6 BE01 movw r22,r28 + 2203 0ce8 48EC ldi r20,lo8(200) + 2204 0cea 50E0 ldi r21,hi8(200) + 2205 0cec 0E94 0000 call effect_random_sparkle_flash + 2206 .LM214: + 2207 0cf0 2197 sbiw r28,1 + 2208 0cf2 01F4 brne .L157 + 2209 /* epilogue start */ + 2210 .LM215: + 2211 0cf4 DF91 pop r29 + 2212 0cf6 CF91 pop r28 + 2213 .LVL174: + 2214 0cf8 0895 ret + 2215 .LFE23: + 2217 .global effect_loadbar + 2219 effect_loadbar: + 2220 .LFB21: + 2221 .LM216: + 2222 .LVL175: + 2223 0cfa DF92 push r13 + 2224 0cfc EF92 push r14 + 2225 0cfe FF92 push r15 + 2226 0d00 0F93 push r16 + 2227 0d02 1F93 push r17 + 2228 0d04 CF93 push r28 + 2229 0d06 DF93 push r29 + 2230 /* prologue: function */ + 2231 /* frame size = 0 */ + 2232 0d08 8C01 movw r16,r24 + 2233 .LM217: + 2234 0d0a 80E0 ldi r24,lo8(0) + 2235 .LVL176: + 2236 0d0c 0E94 0000 call fill + 2237 0d10 C0E0 ldi r28,lo8(0) + 2238 0d12 D0E0 ldi r29,hi8(0) + 2239 .LVL177: + 2240 .LM218: + 2241 0d14 DD24 clr r13 + 2242 0d16 DA94 dec r13 + 2243 .LM219: + 2244 0d18 7801 movw r14,r16 + 2245 .LVL178: + 2246 0d1a 00C0 rjmp .L161 + 2247 .LVL179: + 2248 .L162: + 2249 .LM220: + 2250 0d1c F901 movw r30,r18 + 2251 0d1e E80F add r30,r24 + 2252 0d20 F91F adc r31,r25 + 2253 0d22 E050 subi r30,lo8(-(cube)) + 2254 0d24 F040 sbci r31,hi8(-(cube)) + 2255 0d26 D082 st Z,r13 + 2256 .LM221: + 2257 0d28 0196 adiw r24,1 + 2258 0d2a 8830 cpi r24,8 + 2259 0d2c 9105 cpc r25,__zero_reg__ + 2260 0d2e 01F4 brne .L162 + 2261 .LM222: + 2262 0d30 C701 movw r24,r14 + 2263 .LVL180: + 2264 0d32 0E94 0000 call delay_ms + 2265 .LM223: + 2266 0d36 2196 adiw r28,1 + 2267 0d38 C830 cpi r28,8 + 2268 0d3a D105 cpc r29,__zero_reg__ + 2269 0d3c 01F0 breq .L163 + 2270 .L161: + 2271 0d3e 80E0 ldi r24,lo8(0) + 2272 0d40 90E0 ldi r25,hi8(0) + 2273 .LVL181: + 2274 .LM224: + 2275 0d42 9E01 movw r18,r28 + 2276 0d44 A3E0 ldi r26,3 + 2277 0d46 220F 1: lsl r18 + 2278 0d48 331F rol r19 + 2279 0d4a AA95 dec r26 + 2280 0d4c 01F4 brne 1b + 2281 0d4e 00C0 rjmp .L162 + 2282 .LVL182: + 2283 .L163: + 2284 .LM225: + 2285 0d50 C801 movw r24,r16 + 2286 .LVL183: + 2287 0d52 880F lsl r24 + 2288 0d54 991F rol r25 + 2289 0d56 800F add r24,r16 + 2290 0d58 911F adc r25,r17 + 2291 0d5a 0E94 0000 call delay_ms + 2292 0d5e C0E0 ldi r28,lo8(0) + 2293 0d60 D0E0 ldi r29,hi8(0) + 2294 .LVL184: + 2295 0d62 00C0 rjmp .L164 + 2296 .LVL185: + 2297 .L165: + 2298 .LM226: + 2299 0d64 F901 movw r30,r18 + 2300 0d66 E80F add r30,r24 + 2301 0d68 F91F adc r31,r25 + 2302 0d6a E050 subi r30,lo8(-(cube)) + 2303 0d6c F040 sbci r31,hi8(-(cube)) + 2304 0d6e 1082 st Z,__zero_reg__ + 2305 .LM227: + 2306 0d70 0196 adiw r24,1 + 2307 0d72 8830 cpi r24,8 + 2308 0d74 9105 cpc r25,__zero_reg__ + 2309 0d76 01F4 brne .L165 + 2310 .LM228: + 2311 0d78 C701 movw r24,r14 + 2312 .LVL186: + 2313 0d7a 0E94 0000 call delay_ms + 2314 .LM229: + 2315 0d7e 2196 adiw r28,1 + 2316 0d80 C830 cpi r28,8 + 2317 0d82 D105 cpc r29,__zero_reg__ + 2318 0d84 01F0 breq .L167 + 2319 .L164: + 2320 0d86 80E0 ldi r24,lo8(0) + 2321 0d88 90E0 ldi r25,hi8(0) + 2322 .LVL187: + 2323 .LM230: + 2324 0d8a 9E01 movw r18,r28 + 2325 0d8c E3E0 ldi r30,3 + 2326 0d8e 220F 1: lsl r18 + 2327 0d90 331F rol r19 + 2328 0d92 EA95 dec r30 + 2329 0d94 01F4 brne 1b + 2330 0d96 00C0 rjmp .L165 + 2331 .LVL188: + 2332 .L167: + 2333 /* epilogue start */ + 2334 .LM231: + 2335 0d98 DF91 pop r29 + 2336 0d9a CF91 pop r28 + 2337 .LVL189: + 2338 0d9c 1F91 pop r17 + 2339 0d9e 0F91 pop r16 + 2340 .LVL190: + 2341 0da0 FF90 pop r15 + 2342 0da2 EF90 pop r14 + 2343 0da4 DF90 pop r13 + 2344 0da6 0895 ret + 2345 .LFE21: + 2347 .global draw_positions_axis + 2349 draw_positions_axis: + 2350 .LFB19: + 2351 .LM232: + 2352 .LVL191: + 2353 0da8 4F92 push r4 + 2354 0daa 5F92 push r5 + 2355 0dac 6F92 push r6 + 2356 0dae 7F92 push r7 + 2357 0db0 9F92 push r9 + 2358 0db2 AF92 push r10 + 2359 0db4 BF92 push r11 + 2360 0db6 CF92 push r12 + 2361 0db8 DF92 push r13 + 2362 0dba EF92 push r14 + 2363 0dbc FF92 push r15 + 2364 0dbe 0F93 push r16 + 2365 0dc0 1F93 push r17 + 2366 0dc2 CF93 push r28 + 2367 0dc4 DF93 push r29 + 2368 /* prologue: function */ + 2369 /* frame size = 0 */ + 2370 0dc6 982E mov r9,r24 + 2371 0dc8 162F mov r17,r22 + 2372 0dca 072F mov r16,r23 + 2373 .LVL192: + 2374 0dcc 3A01 movw r6,r20 + 2375 .LM233: + 2376 0dce 80E0 ldi r24,lo8(0) + 2377 .LVL193: + 2378 0dd0 0E94 0000 call fill + 2379 .LVL194: + 2380 0dd4 212F mov r18,r17 + 2381 0dd6 302F mov r19,r16 + 2382 0dd8 C901 movw r24,r18 + 2383 0dda 6C01 movw r12,r24 + 2384 0ddc C0E0 ldi r28,lo8(0) + 2385 0dde D0E0 ldi r29,hi8(0) + 2386 .LVL195: + 2387 .LM234: + 2388 0de0 B7E0 ldi r27,lo8(7) + 2389 0de2 4B2E mov r4,r27 + 2390 0de4 512C mov r5,__zero_reg__ + 2391 0de6 00C0 rjmp .L171 + 2392 .LVL196: + 2393 .L177: + 2394 .LM235: + 2395 0de8 6114 cp r6,__zero_reg__ + 2396 0dea 7104 cpc r7,__zero_reg__ + 2397 0dec 01F0 breq .L172 + 2398 .LM236: + 2399 0dee F501 movw r30,r10 + 2400 0df0 8081 ld r24,Z + 2401 0df2 A201 movw r20,r4 + 2402 .LVL197: + 2403 0df4 481B sub r20,r24 + 2404 0df6 5109 sbc r21,__zero_reg__ + 2405 0df8 00C0 rjmp .L173 + 2406 .L172: + 2407 .LM237: + 2408 0dfa F701 movw r30,r14 + 2409 0dfc 8081 ld r24,Z + 2410 0dfe 482F mov r20,r24 + 2411 0e00 50E0 ldi r21,lo8(0) + 2412 .L173: + 2413 .LM238: + 2414 0e02 FAE7 ldi r31,lo8(122) + 2415 0e04 9F16 cp r9,r31 + 2416 0e06 01F4 brne .L174 + 2417 .LM239: + 2418 0e08 CE01 movw r24,r28 + 2419 0e0a B801 movw r22,r16 + 2420 0e0c 00C0 rjmp .L181 + 2421 .L174: + 2422 .LM240: + 2423 0e0e 89E7 ldi r24,lo8(121) + 2424 0e10 9816 cp r9,r24 + 2425 0e12 01F4 brne .L176 + 2426 .LM241: + 2427 0e14 CE01 movw r24,r28 + 2428 0e16 BA01 movw r22,r20 + 2429 0e18 A801 movw r20,r16 + 2430 .LVL198: + 2431 0e1a 00C0 rjmp .L181 + 2432 .LVL199: + 2433 .L176: + 2434 .LM242: + 2435 0e1c 98E7 ldi r25,lo8(120) + 2436 0e1e 9916 cp r9,r25 + 2437 0e20 01F4 brne .L175 + 2438 .LM243: + 2439 0e22 CA01 movw r24,r20 + 2440 0e24 B801 movw r22,r16 + 2441 0e26 AE01 movw r20,r28 + 2442 .LVL200: + 2443 .L181: + 2444 0e28 0E94 0000 call setvoxel + 2445 .LVL201: + 2446 .L175: + 2447 .LM244: + 2448 0e2c 0F5F subi r16,lo8(-(1)) + 2449 0e2e 1F4F sbci r17,hi8(-(1)) + 2450 0e30 0894 sec + 2451 0e32 A11C adc r10,__zero_reg__ + 2452 0e34 B11C adc r11,__zero_reg__ + 2453 0e36 0894 sec + 2454 0e38 E11C adc r14,__zero_reg__ + 2455 0e3a F11C adc r15,__zero_reg__ + 2456 0e3c 0830 cpi r16,8 + 2457 0e3e 1105 cpc r17,__zero_reg__ + 2458 0e40 01F4 brne .L177 + 2459 .LM245: + 2460 0e42 2196 adiw r28,1 + 2461 0e44 E8E0 ldi r30,lo8(8) + 2462 0e46 F0E0 ldi r31,hi8(8) + 2463 0e48 CE0E add r12,r30 + 2464 0e4a DF1E adc r13,r31 + 2465 0e4c C830 cpi r28,8 + 2466 0e4e D105 cpc r29,__zero_reg__ + 2467 0e50 01F0 breq .L179 + 2468 .LVL202: + 2469 .L171: + 2470 0e52 5601 movw r10,r12 + 2471 0e54 7601 movw r14,r12 + 2472 0e56 00E0 ldi r16,lo8(0) + 2473 0e58 10E0 ldi r17,hi8(0) + 2474 .LVL203: + 2475 0e5a 00C0 rjmp .L177 + 2476 .L179: + 2477 /* epilogue start */ + 2478 .LM246: + 2479 0e5c DF91 pop r29 + 2480 0e5e CF91 pop r28 + 2481 .LVL204: + 2482 0e60 1F91 pop r17 + 2483 .LVL205: + 2484 0e62 0F91 pop r16 + 2485 .LVL206: + 2486 0e64 FF90 pop r15 + 2487 0e66 EF90 pop r14 + 2488 0e68 DF90 pop r13 + 2489 0e6a CF90 pop r12 + 2490 0e6c BF90 pop r11 + 2491 0e6e AF90 pop r10 + 2492 0e70 9F90 pop r9 + 2493 .LVL207: + 2494 0e72 7F90 pop r7 + 2495 0e74 6F90 pop r6 + 2496 .LVL208: + 2497 0e76 5F90 pop r5 + 2498 0e78 4F90 pop r4 + 2499 0e7a 0895 ret + 2500 .LFE19: + 2502 .global effect_boxside_randsend_parallel + 2504 effect_boxside_randsend_parallel: + 2505 .LFB20: + 2506 .LM247: + 2507 .LVL209: + 2508 0e7c 2F92 push r2 + 2509 0e7e 3F92 push r3 + 2510 0e80 4F92 push r4 + 2511 0e82 5F92 push r5 + 2512 0e84 6F92 push r6 + 2513 0e86 7F92 push r7 + 2514 0e88 8F92 push r8 + 2515 0e8a 9F92 push r9 + 2516 0e8c AF92 push r10 + 2517 0e8e BF92 push r11 + 2518 0e90 CF92 push r12 + 2519 0e92 DF92 push r13 + 2520 0e94 EF92 push r14 + 2521 0e96 FF92 push r15 + 2522 0e98 0F93 push r16 + 2523 0e9a 1F93 push r17 + 2524 0e9c DF93 push r29 + 2525 0e9e CF93 push r28 + 2526 0ea0 CDB7 in r28,__SP_L__ + 2527 0ea2 DEB7 in r29,__SP_H__ + 2528 0ea4 C158 subi r28,lo8(-(-129)) + 2529 0ea6 D040 sbci r29,hi8(-(-129)) + 2530 0ea8 0FB6 in __tmp_reg__,__SREG__ + 2531 0eaa F894 cli + 2532 0eac DEBF out __SP_H__,r29 + 2533 0eae 0FBE out __SREG__,__tmp_reg__ + 2534 0eb0 CDBF out __SP_L__,r28 + 2535 /* prologue: function */ + 2536 /* frame size = 129 */ + 2537 0eb2 CF57 subi r28,lo8(-129) + 2538 0eb4 DF4F sbci r29,hi8(-129) + 2539 0eb6 8883 st Y,r24 + 2540 0eb8 C158 subi r28,lo8(129) + 2541 0eba D040 sbci r29,hi8(129) + 2542 0ebc 2B01 movw r4,r22 + 2543 0ebe 3A01 movw r6,r20 + 2544 0ec0 4901 movw r8,r18 + 2545 .LM248: + 2546 0ec2 01E4 ldi r16,lo8(65) + 2547 0ec4 A02E mov r10,r16 + 2548 0ec6 B12C mov r11,__zero_reg__ + 2549 0ec8 AC0E add r10,r28 + 2550 0eca BD1E adc r11,r29 + 2551 0ecc F501 movw r30,r10 + 2552 0ece 11E8 ldi r17,lo8(129) + 2553 0ed0 C12E mov r12,r17 + 2554 0ed2 D12C mov r13,__zero_reg__ + 2555 0ed4 CC0E add r12,r28 + 2556 0ed6 DD1E adc r13,r29 + 2557 .LVL210: + 2558 .L183: + 2559 .LM249: + 2560 0ed8 1192 st Z+,__zero_reg__ + 2561 .LM250: + 2562 0eda EC15 cp r30,r12 + 2563 0edc FD05 cpc r31,r13 + 2564 0ede 01F4 brne .L183 + 2565 0ee0 00E0 ldi r16,lo8(0) + 2566 0ee2 10E0 ldi r17,hi8(0) + 2567 .LVL211: + 2568 .LM251: + 2569 0ee4 1E01 movw r2,r28 + 2570 0ee6 0894 sec + 2571 0ee8 211C adc r2,__zero_reg__ + 2572 0eea 311C adc r3,__zero_reg__ + 2573 .LVL212: + 2574 .L194: + 2575 .LM252: + 2576 0eec 81E0 ldi r24,lo8(1) + 2577 0eee 8816 cp r8,r24 + 2578 0ef0 9104 cpc r9,__zero_reg__ + 2579 0ef2 01F4 brne .L202 + 2580 0ef4 00C0 rjmp .L204 + 2581 .L196: + 2582 .LM253: + 2583 0ef6 0E94 0000 call rand + 2584 0efa 60E4 ldi r22,lo8(64) + 2585 0efc 70E0 ldi r23,hi8(64) + 2586 0efe 0E94 0000 call __divmodhi4 + 2587 .LM254: + 2588 0f02 E1E4 ldi r30,lo8(65) + 2589 0f04 F0E0 ldi r31,hi8(65) + 2590 0f06 EC0F add r30,r28 + 2591 0f08 FD1F adc r31,r29 + 2592 0f0a E80F add r30,r24 + 2593 0f0c F91F adc r31,r25 + 2594 .LVL213: + 2595 0f0e 8081 ld r24,Z + 2596 .LVL214: + 2597 0f10 8823 tst r24 + 2598 0f12 01F4 brne .L196 + 2599 .LM255: + 2600 0f14 0F5F subi r16,lo8(-(1)) + 2601 0f16 1F4F sbci r17,hi8(-(1)) + 2602 .LM256: + 2603 0f18 91E0 ldi r25,lo8(1) + 2604 0f1a 9083 st Z,r25 + 2605 0f1c 00C0 rjmp .L187 + 2606 .LVL215: + 2607 .L204: + 2608 .LM257: + 2609 0f1e 0034 cpi r16,64 + 2610 0f20 1105 cpc r17,__zero_reg__ + 2611 0f22 04F0 brlt .L196 + 2612 0f24 00C0 rjmp .L187 + 2613 .L202: + 2614 .LM258: + 2615 0f26 82E0 ldi r24,lo8(2) + 2616 0f28 8816 cp r8,r24 + 2617 0f2a 9104 cpc r9,__zero_reg__ + 2618 0f2c 01F4 brne .L187 + 2619 .LM259: + 2620 0f2e 0034 cpi r16,64 + 2621 0f30 1105 cpc r17,__zero_reg__ + 2622 0f32 04F4 brge .L187 + 2623 .LM260: + 2624 0f34 E1E4 ldi r30,lo8(65) + 2625 0f36 F0E0 ldi r31,hi8(65) + 2626 0f38 EC0F add r30,r28 + 2627 0f3a FD1F adc r31,r29 + 2628 0f3c E00F add r30,r16 + 2629 0f3e F11F adc r31,r17 + 2630 0f40 8081 ld r24,Z + 2631 0f42 8F5F subi r24,lo8(-(1)) + 2632 0f44 8083 st Z,r24 + 2633 .LM261: + 2634 0f46 0F5F subi r16,lo8(-(1)) + 2635 0f48 1F4F sbci r17,hi8(-(1)) + 2636 .L187: + 2637 0f4a F501 movw r30,r10 + 2638 0f4c EE24 clr r14 + 2639 0f4e FF24 clr r15 + 2640 .L190: + 2641 .LM262: + 2642 0f50 9081 ld r25,Z + 2643 0f52 892F mov r24,r25 + 2644 0f54 8150 subi r24,lo8(-(-1)) + 2645 0f56 8630 cpi r24,lo8(6) + 2646 0f58 00F4 brsh .L188 + 2647 .LM263: + 2648 0f5a 9F5F subi r25,lo8(-(1)) + 2649 0f5c 9083 st Z,r25 + 2650 .L188: + 2651 .LM264: + 2652 0f5e 8081 ld r24,Z + 2653 0f60 8730 cpi r24,lo8(7) + 2654 0f62 01F4 brne .L189 + 2655 .LM265: + 2656 0f64 0894 sec + 2657 0f66 E11C adc r14,__zero_reg__ + 2658 0f68 F11C adc r15,__zero_reg__ + 2659 .L189: + 2660 0f6a 3196 adiw r30,1 + 2661 .LM266: + 2662 0f6c EC15 cp r30,r12 + 2663 0f6e FD05 cpc r31,r13 + 2664 0f70 01F4 brne .L190 + 2665 0f72 D101 movw r26,r2 + 2666 0f74 F501 movw r30,r10 + 2667 .L193: + 2668 0f76 8081 ld r24,Z + 2669 .LM267: + 2670 0f78 4114 cp r4,__zero_reg__ + 2671 0f7a 5104 cpc r5,__zero_reg__ + 2672 0f7c 01F0 breq .L203 + 2673 .L191: + 2674 .LM268: + 2675 0f7e 97E0 ldi r25,lo8(7) + 2676 0f80 981B sub r25,r24 + 2677 0f82 892F mov r24,r25 + 2678 .L203: + 2679 0f84 8C93 st X,r24 + 2680 0f86 3196 adiw r30,1 + 2681 0f88 1196 adiw r26,1 + 2682 .LM269: + 2683 0f8a EC15 cp r30,r12 + 2684 0f8c FD05 cpc r31,r13 + 2685 0f8e 01F4 brne .L193 + 2686 .LM270: + 2687 0f90 C301 movw r24,r6 + 2688 0f92 0E94 0000 call delay_ms + 2689 .LM271: + 2690 0f96 CF57 subi r28,lo8(-129) + 2691 0f98 DF4F sbci r29,hi8(-129) + 2692 0f9a 8881 ld r24,Y + 2693 0f9c C158 subi r28,lo8(129) + 2694 0f9e D040 sbci r29,hi8(129) + 2695 0fa0 B101 movw r22,r2 + 2696 0fa2 40E0 ldi r20,lo8(0) + 2697 0fa4 50E0 ldi r21,hi8(0) + 2698 0fa6 0E94 0000 call draw_positions_axis + 2699 .LM272: + 2700 0faa 82B3 in r24,50-32 + 2701 0fac 94E0 ldi r25,lo8(4) + 2702 0fae 8927 eor r24,r25 + 2703 0fb0 82BB out 50-32,r24 + 2704 .LM273: + 2705 0fb2 80E4 ldi r24,lo8(64) + 2706 0fb4 E816 cp r14,r24 + 2707 0fb6 F104 cpc r15,__zero_reg__ + 2708 0fb8 01F0 breq .+2 + 2709 0fba 00C0 rjmp .L194 + 2710 /* epilogue start */ + 2711 .LM274: + 2712 0fbc CF57 subi r28,lo8(-(129)) + 2713 0fbe DF4F sbci r29,hi8(-(129)) + 2714 0fc0 0FB6 in __tmp_reg__,__SREG__ + 2715 0fc2 F894 cli + 2716 0fc4 DEBF out __SP_H__,r29 + 2717 0fc6 0FBE out __SREG__,__tmp_reg__ + 2718 0fc8 CDBF out __SP_L__,r28 + 2719 0fca CF91 pop r28 + 2720 0fcc DF91 pop r29 + 2721 0fce 1F91 pop r17 + 2722 0fd0 0F91 pop r16 + 2723 .LVL216: + 2724 0fd2 FF90 pop r15 + 2725 0fd4 EF90 pop r14 + 2726 .LVL217: + 2727 0fd6 DF90 pop r13 + 2728 0fd8 CF90 pop r12 + 2729 0fda BF90 pop r11 + 2730 0fdc AF90 pop r10 + 2731 0fde 9F90 pop r9 + 2732 0fe0 8F90 pop r8 + 2733 .LVL218: + 2734 0fe2 7F90 pop r7 + 2735 0fe4 6F90 pop r6 + 2736 .LVL219: + 2737 0fe6 5F90 pop r5 + 2738 0fe8 4F90 pop r4 + 2739 .LVL220: + 2740 0fea 3F90 pop r3 + 2741 0fec 2F90 pop r2 + 2742 0fee 0895 ret + 2743 .LFE20: + 2745 .global effect_axis_updown_randsuspend + 2747 effect_axis_updown_randsuspend: + 2748 .LFB18: + 2749 .LM275: + 2750 .LVL221: + 2751 0ff0 3F92 push r3 + 2752 0ff2 4F92 push r4 + 2753 0ff4 5F92 push r5 + 2754 0ff6 6F92 push r6 + 2755 0ff8 7F92 push r7 + 2756 0ffa 8F92 push r8 + 2757 0ffc 9F92 push r9 + 2758 0ffe AF92 push r10 + 2759 1000 BF92 push r11 + 2760 1002 CF92 push r12 + 2761 1004 DF92 push r13 + 2762 1006 EF92 push r14 + 2763 1008 FF92 push r15 + 2764 100a 0F93 push r16 + 2765 100c 1F93 push r17 + 2766 100e DF93 push r29 + 2767 1010 CF93 push r28 + 2768 1012 CDB7 in r28,__SP_L__ + 2769 1014 DEB7 in r29,__SP_H__ + 2770 1016 C058 subi r28,lo8(-(-128)) + 2771 1018 D040 sbci r29,hi8(-(-128)) + 2772 101a 0FB6 in __tmp_reg__,__SREG__ + 2773 101c F894 cli + 2774 101e DEBF out __SP_H__,r29 + 2775 1020 0FBE out __SREG__,__tmp_reg__ + 2776 1022 CDBF out __SP_L__,r28 + 2777 /* prologue: function */ + 2778 /* frame size = 128 */ + 2779 1024 382E mov r3,r24 + 2780 1026 2B01 movw r4,r22 + 2781 .LVL222: + 2782 1028 4A01 movw r8,r20 + 2783 102a 3901 movw r6,r18 + 2784 .LM276: + 2785 102c 00E0 ldi r16,lo8(0) + 2786 102e 10E0 ldi r17,hi8(0) + 2787 .LVL223: + 2788 .LM277: + 2789 1030 6E01 movw r12,r28 + 2790 1032 0894 sec + 2791 1034 C11C adc r12,__zero_reg__ + 2792 1036 D11C adc r13,__zero_reg__ + 2793 .LM278: + 2794 1038 91E4 ldi r25,lo8(65) + 2795 103a E92E mov r14,r25 + 2796 103c F12C mov r15,__zero_reg__ + 2797 103e EC0E add r14,r28 + 2798 1040 FD1E adc r15,r29 + 2799 .LVL224: + 2800 .L206: + 2801 .LM279: + 2802 1042 F601 movw r30,r12 + 2803 1044 E00F add r30,r16 + 2804 1046 F11F adc r31,r17 + 2805 1048 1082 st Z,__zero_reg__ + 2806 .LM280: + 2807 104a 0E94 0000 call rand + 2808 104e F701 movw r30,r14 + 2809 1050 E00F add r30,r16 + 2810 1052 F11F adc r31,r17 + 2811 1054 68E0 ldi r22,lo8(8) + 2812 1056 70E0 ldi r23,hi8(8) + 2813 1058 0E94 0000 call __divmodhi4 + 2814 105c 8083 st Z,r24 + 2815 .LM281: + 2816 105e 0F5F subi r16,lo8(-(1)) + 2817 1060 1F4F sbci r17,hi8(-(1)) + 2818 1062 0034 cpi r16,64 + 2819 1064 1105 cpc r17,__zero_reg__ + 2820 1066 01F4 brne .L206 + 2821 1068 EE24 clr r14 + 2822 106a FF24 clr r15 + 2823 .LVL225: + 2824 .LM282: + 2825 106c 5E01 movw r10,r28 + 2826 106e 0894 sec + 2827 1070 A11C adc r10,__zero_reg__ + 2828 1072 B11C adc r11,__zero_reg__ + 2829 1074 81E4 ldi r24,lo8(65) + 2830 1076 C82E mov r12,r24 + 2831 1078 D12C mov r13,__zero_reg__ + 2832 107a CC0E add r12,r28 + 2833 107c DD1E adc r13,r29 + 2834 107e 00C0 rjmp .L207 + 2835 .L210: + 2836 .LM283: + 2837 1080 D801 movw r26,r16 + 2838 1082 8C91 ld r24,X + 2839 1084 9081 ld r25,Z + 2840 1086 8917 cp r24,r25 + 2841 1088 00F4 brsh .L208 + 2842 .LM284: + 2843 108a 8F5F subi r24,lo8(-(1)) + 2844 108c 8C93 st X,r24 + 2845 .L208: + 2846 .LM285: + 2847 108e D801 movw r26,r16 + 2848 1090 8C91 ld r24,X + 2849 1092 9817 cp r25,r24 + 2850 1094 00F4 brsh .L209 + 2851 .LM286: + 2852 1096 8150 subi r24,lo8(-(-1)) + 2853 1098 8C93 st X,r24 + 2854 .L209: + 2855 109a 0F5F subi r16,lo8(-(1)) + 2856 109c 1F4F sbci r17,hi8(-(1)) + 2857 109e 3196 adiw r30,1 + 2858 .LM287: + 2859 10a0 0C15 cp r16,r12 + 2860 10a2 1D05 cpc r17,r13 + 2861 10a4 01F4 brne .L210 + 2862 .LM288: + 2863 10a6 832D mov r24,r3 + 2864 10a8 B501 movw r22,r10 + 2865 10aa A301 movw r20,r6 + 2866 10ac 0E94 0000 call draw_positions_axis + 2867 .LM289: + 2868 10b0 C201 movw r24,r4 + 2869 10b2 0E94 0000 call delay_ms + 2870 .LM290: + 2871 10b6 0894 sec + 2872 10b8 E11C adc r14,__zero_reg__ + 2873 10ba F11C adc r15,__zero_reg__ + 2874 10bc B8E0 ldi r27,lo8(8) + 2875 10be EB16 cp r14,r27 + 2876 10c0 F104 cpc r15,__zero_reg__ + 2877 10c2 01F0 breq .L211 + 2878 .L207: + 2879 10c4 8501 movw r16,r10 + 2880 10c6 F601 movw r30,r12 + 2881 10c8 00C0 rjmp .L210 + 2882 .L211: + 2883 10ca F801 movw r30,r16 + 2884 .LM291: + 2885 10cc 27E0 ldi r18,lo8(7) + 2886 .LM292: + 2887 10ce CE01 movw r24,r28 + 2888 10d0 8F57 subi r24,lo8(-(129)) + 2889 10d2 9F4F sbci r25,hi8(-(129)) + 2890 .L212: + 2891 .LM293: + 2892 10d4 2193 st Z+,r18 + 2893 .LM294: + 2894 10d6 E817 cp r30,r24 + 2895 10d8 F907 cpc r31,r25 + 2896 10da 01F4 brne .L212 + 2897 .LM295: + 2898 10dc C401 movw r24,r8 + 2899 10de 0E94 0000 call delay_ms + 2900 10e2 EE24 clr r14 + 2901 10e4 FF24 clr r15 + 2902 .LVL226: + 2903 .LM296: + 2904 10e6 4E01 movw r8,r28 + 2905 .LVL227: + 2906 10e8 0894 sec + 2907 10ea 811C adc r8,__zero_reg__ + 2908 10ec 911C adc r9,__zero_reg__ + 2909 10ee 00C0 rjmp .L213 + 2910 .L216: + 2911 .LM297: + 2912 10f0 8081 ld r24,Z + 2913 10f2 9C91 ld r25,X + 2914 10f4 8917 cp r24,r25 + 2915 10f6 00F4 brsh .L214 + 2916 .LM298: + 2917 10f8 8F5F subi r24,lo8(-(1)) + 2918 10fa 8083 st Z,r24 + 2919 .L214: + 2920 .LM299: + 2921 10fc 8081 ld r24,Z + 2922 10fe 9817 cp r25,r24 + 2923 1100 00F4 brsh .L215 + 2924 .LM300: + 2925 1102 8150 subi r24,lo8(-(-1)) + 2926 1104 8083 st Z,r24 + 2927 .L215: + 2928 1106 3196 adiw r30,1 + 2929 1108 1196 adiw r26,1 + 2930 .LM301: + 2931 110a E017 cp r30,r16 + 2932 110c F107 cpc r31,r17 + 2933 110e 01F4 brne .L216 + 2934 .LM302: + 2935 1110 832D mov r24,r3 + 2936 1112 B401 movw r22,r8 + 2937 1114 A301 movw r20,r6 + 2938 1116 0E94 0000 call draw_positions_axis + 2939 .LM303: + 2940 111a C201 movw r24,r4 + 2941 111c 0E94 0000 call delay_ms + 2942 .LM304: + 2943 1120 0894 sec + 2944 1122 E11C adc r14,__zero_reg__ + 2945 1124 F11C adc r15,__zero_reg__ + 2946 1126 88E0 ldi r24,lo8(8) + 2947 1128 E816 cp r14,r24 + 2948 112a F104 cpc r15,__zero_reg__ + 2949 112c 01F0 breq .L218 + 2950 .L213: + 2951 112e F501 movw r30,r10 + 2952 1130 D601 movw r26,r12 + 2953 1132 00C0 rjmp .L216 + 2954 .L218: + 2955 /* epilogue start */ + 2956 .LM305: + 2957 1134 C058 subi r28,lo8(-(128)) + 2958 1136 DF4F sbci r29,hi8(-(128)) + 2959 1138 0FB6 in __tmp_reg__,__SREG__ + 2960 113a F894 cli + 2961 113c DEBF out __SP_H__,r29 + 2962 113e 0FBE out __SREG__,__tmp_reg__ + 2963 1140 CDBF out __SP_L__,r28 + 2964 1142 CF91 pop r28 + 2965 1144 DF91 pop r29 + 2966 1146 1F91 pop r17 + 2967 1148 0F91 pop r16 + 2968 114a FF90 pop r15 + 2969 114c EF90 pop r14 + 2970 .LVL228: + 2971 114e DF90 pop r13 + 2972 1150 CF90 pop r12 + 2973 1152 BF90 pop r11 + 2974 1154 AF90 pop r10 + 2975 1156 9F90 pop r9 + 2976 1158 8F90 pop r8 + 2977 115a 7F90 pop r7 + 2978 115c 6F90 pop r6 + 2979 .LVL229: + 2980 115e 5F90 pop r5 + 2981 1160 4F90 pop r4 + 2982 1162 3F90 pop r3 + 2983 .LVL230: + 2984 1164 0895 ret + 2985 .LFE18: + 2987 .global effect_z_updown_move + 2989 effect_z_updown_move: + 2990 .LFB17: + 2991 .LM306: + 2992 .LVL231: + 2993 /* prologue: function */ + 2994 /* frame size = 0 */ + 2995 1166 AC01 movw r20,r24 + 2996 .LVL232: + 2997 .LM307: + 2998 1168 DC01 movw r26,r24 + 2999 116a FB01 movw r30,r22 + 3000 .LVL233: + 3001 116c 20E0 ldi r18,lo8(0) + 3002 116e 30E0 ldi r19,hi8(0) + 3003 .LVL234: + 3004 .L226: + 3005 .LM308: + 3006 1170 9C91 ld r25,X + 3007 1172 8081 ld r24,Z + 3008 1174 9817 cp r25,r24 + 3009 1176 00F4 brsh .L224 + 3010 .LM309: + 3011 1178 9F5F subi r25,lo8(-(1)) + 3012 117a 9C93 st X,r25 + 3013 .L224: + 3014 .LM310: + 3015 117c 9C91 ld r25,X + 3016 117e 8081 ld r24,Z + 3017 1180 8917 cp r24,r25 + 3018 1182 00F4 brsh .L225 + 3019 .LM311: + 3020 1184 9150 subi r25,lo8(-(-1)) + 3021 1186 9C93 st X,r25 + 3022 .L225: + 3023 .LM312: + 3024 1188 2F5F subi r18,lo8(-(1)) + 3025 118a 3F4F sbci r19,hi8(-(1)) + 3026 118c 1196 adiw r26,1 + 3027 118e 3196 adiw r30,1 + 3028 1190 2034 cpi r18,64 + 3029 1192 3105 cpc r19,__zero_reg__ + 3030 1194 01F4 brne .L226 + 3031 .LM313: + 3032 1196 8AE7 ldi r24,lo8(122) + 3033 1198 BA01 movw r22,r20 + 3034 119a 40E0 ldi r20,lo8(0) + 3035 119c 50E0 ldi r21,hi8(0) + 3036 119e 0E94 0000 call draw_positions_axis + 3037 .LVL235: + 3038 /* epilogue start */ + 3039 .LM314: + 3040 11a2 0895 ret + 3041 .LFE17: + 3043 .global effect_z_updown + 3045 effect_z_updown: + 3046 .LFB16: + 3047 .LM315: + 3048 .LVL236: + 3049 11a4 2F92 push r2 + 3050 11a6 3F92 push r3 + 3051 11a8 4F92 push r4 + 3052 11aa 5F92 push r5 + 3053 11ac 6F92 push r6 + 3054 11ae 7F92 push r7 + 3055 11b0 8F92 push r8 + 3056 11b2 9F92 push r9 + 3057 11b4 AF92 push r10 + 3058 11b6 BF92 push r11 + 3059 11b8 CF92 push r12 + 3060 11ba DF92 push r13 + 3061 11bc EF92 push r14 + 3062 11be FF92 push r15 + 3063 11c0 0F93 push r16 + 3064 11c2 1F93 push r17 + 3065 11c4 DF93 push r29 + 3066 11c6 CF93 push r28 + 3067 11c8 CDB7 in r28,__SP_L__ + 3068 11ca DEB7 in r29,__SP_H__ + 3069 11cc C058 subi r28,lo8(-(-128)) + 3070 11ce D040 sbci r29,hi8(-(-128)) + 3071 11d0 0FB6 in __tmp_reg__,__SREG__ + 3072 11d2 F894 cli + 3073 11d4 DEBF out __SP_H__,r29 + 3074 11d6 0FBE out __SREG__,__tmp_reg__ + 3075 11d8 CDBF out __SP_L__,r28 + 3076 /* prologue: function */ + 3077 /* frame size = 128 */ + 3078 11da 2C01 movw r4,r24 + 3079 11dc 7B01 movw r14,r22 + 3080 .LM316: + 3081 11de 00E0 ldi r16,lo8(0) + 3082 11e0 10E0 ldi r17,hi8(0) + 3083 .LVL237: + 3084 .LM317: + 3085 11e2 5E01 movw r10,r28 + 3086 11e4 0894 sec + 3087 11e6 A11C adc r10,__zero_reg__ + 3088 11e8 B11C adc r11,__zero_reg__ + 3089 11ea 64E0 ldi r22,lo8(4) + 3090 11ec 962E mov r9,r22 + 3091 .LVL238: + 3092 .LM318: + 3093 11ee 51E4 ldi r21,lo8(65) + 3094 11f0 C52E mov r12,r21 + 3095 11f2 D12C mov r13,__zero_reg__ + 3096 11f4 CC0E add r12,r28 + 3097 11f6 DD1E adc r13,r29 + 3098 .LVL239: + 3099 .L230: + 3100 .LM319: + 3101 11f8 F501 movw r30,r10 + 3102 11fa E00F add r30,r16 + 3103 11fc F11F adc r31,r17 + 3104 11fe 9082 st Z,r9 + 3105 .LM320: + 3106 1200 0E94 0000 call rand + 3107 1204 F601 movw r30,r12 + 3108 1206 E00F add r30,r16 + 3109 1208 F11F adc r31,r17 + 3110 120a 68E0 ldi r22,lo8(8) + 3111 120c 70E0 ldi r23,hi8(8) + 3112 120e 0E94 0000 call __divmodhi4 + 3113 1212 8083 st Z,r24 + 3114 .LM321: + 3115 1214 0F5F subi r16,lo8(-(1)) + 3116 1216 1F4F sbci r17,hi8(-(1)) + 3117 1218 0034 cpi r16,64 + 3118 121a 1105 cpc r17,__zero_reg__ + 3119 121c 01F4 brne .L230 + 3120 121e 00E0 ldi r16,lo8(0) + 3121 1220 10E0 ldi r17,hi8(0) + 3122 .LVL240: + 3123 .LM322: + 3124 1222 41E4 ldi r20,lo8(65) + 3125 1224 A42E mov r10,r20 + 3126 1226 B12C mov r11,__zero_reg__ + 3127 1228 AC0E add r10,r28 + 3128 122a BD1E adc r11,r29 + 3129 122c 6E01 movw r12,r28 + 3130 122e 0894 sec + 3131 1230 C11C adc r12,__zero_reg__ + 3132 1232 D11C adc r13,__zero_reg__ + 3133 .LM323: + 3134 1234 3701 movw r6,r14 + 3135 .LVL241: + 3136 .L231: + 3137 .LM324: + 3138 1236 C601 movw r24,r12 + 3139 1238 B501 movw r22,r10 + 3140 123a 4AE7 ldi r20,lo8(122) + 3141 123c 0E94 0000 call effect_z_updown_move + 3142 .LM325: + 3143 1240 C301 movw r24,r6 + 3144 1242 0E94 0000 call delay_ms + 3145 .LM326: + 3146 1246 0F5F subi r16,lo8(-(1)) + 3147 1248 1F4F sbci r17,hi8(-(1)) + 3148 124a 0830 cpi r16,8 + 3149 124c 1105 cpc r17,__zero_reg__ + 3150 124e 01F4 brne .L231 + 3151 .LM327: + 3152 1250 5701 movw r10,r14 + 3153 .LVL242: + 3154 1252 AA0C lsl r10 + 3155 1254 BB1C rol r11 + 3156 1256 AA0C lsl r10 + 3157 1258 BB1C rol r11 + 3158 125a CC24 clr r12 + 3159 125c DD24 clr r13 + 3160 .LVL243: + 3161 .LM328: + 3162 125e 21E4 ldi r18,lo8(65) + 3163 1260 822E mov r8,r18 + 3164 1262 912C mov r9,__zero_reg__ + 3165 1264 8C0E add r8,r28 + 3166 1266 9D1E adc r9,r29 + 3167 1268 1E01 movw r2,r28 + 3168 126a 0894 sec + 3169 126c 211C adc r2,__zero_reg__ + 3170 126e 311C adc r3,__zero_reg__ + 3171 1270 00C0 rjmp .L232 + 3172 .LVL244: + 3173 .L235: + 3174 .LM329: + 3175 1272 00E0 ldi r16,lo8(0) + 3176 1274 10E0 ldi r17,hi8(0) + 3177 .LVL245: + 3178 .L233: + 3179 .LM330: + 3180 1276 C101 movw r24,r2 + 3181 1278 B401 movw r22,r8 + 3182 127a 4AE7 ldi r20,lo8(122) + 3183 127c 0E94 0000 call effect_z_updown_move + 3184 .LM331: + 3185 1280 C301 movw r24,r6 + 3186 1282 0E94 0000 call delay_ms + 3187 .LM332: + 3188 1286 0F5F subi r16,lo8(-(1)) + 3189 1288 1F4F sbci r17,hi8(-(1)) + 3190 128a 0830 cpi r16,8 + 3191 128c 1105 cpc r17,__zero_reg__ + 3192 128e 01F4 brne .L233 + 3193 .LM333: + 3194 1290 C501 movw r24,r10 + 3195 1292 0E94 0000 call delay_ms + 3196 1296 EE24 clr r14 + 3197 1298 FF24 clr r15 + 3198 .LVL246: + 3199 .L234: + 3200 .LM334: + 3201 129a 0E94 0000 call rand + 3202 129e 8C01 movw r16,r24 + 3203 .LVL247: + 3204 12a0 0E94 0000 call rand + 3205 12a4 9C01 movw r18,r24 + 3206 12a6 C801 movw r24,r16 + 3207 12a8 60E4 ldi r22,lo8(64) + 3208 12aa 70E0 ldi r23,hi8(64) + 3209 12ac 0E94 0000 call __divmodhi4 + 3210 12b0 F401 movw r30,r8 + 3211 12b2 E80F add r30,r24 + 3212 12b4 F91F adc r31,r25 + 3213 12b6 C901 movw r24,r18 + 3214 12b8 68E0 ldi r22,lo8(8) + 3215 12ba 70E0 ldi r23,hi8(8) + 3216 12bc 0E94 0000 call __divmodhi4 + 3217 12c0 8083 st Z,r24 + 3218 .LM335: + 3219 12c2 0894 sec + 3220 12c4 E11C adc r14,__zero_reg__ + 3221 12c6 F11C adc r15,__zero_reg__ + 3222 12c8 8AE0 ldi r24,lo8(10) + 3223 12ca E816 cp r14,r24 + 3224 12cc F104 cpc r15,__zero_reg__ + 3225 12ce 01F4 brne .L234 + 3226 .LM336: + 3227 12d0 0894 sec + 3228 12d2 C11C adc r12,__zero_reg__ + 3229 12d4 D11C adc r13,__zero_reg__ + 3230 .LVL248: + 3231 .L232: + 3232 12d6 C414 cp r12,r4 + 3233 12d8 D504 cpc r13,r5 + 3234 12da 04F0 brlt .L235 + 3235 /* epilogue start */ + 3236 .LM337: + 3237 12dc C058 subi r28,lo8(-(128)) + 3238 12de DF4F sbci r29,hi8(-(128)) + 3239 12e0 0FB6 in __tmp_reg__,__SREG__ + 3240 12e2 F894 cli + 3241 12e4 DEBF out __SP_H__,r29 + 3242 12e6 0FBE out __SREG__,__tmp_reg__ + 3243 12e8 CDBF out __SP_L__,r28 + 3244 12ea CF91 pop r28 + 3245 12ec DF91 pop r29 + 3246 12ee 1F91 pop r17 + 3247 12f0 0F91 pop r16 + 3248 12f2 FF90 pop r15 + 3249 12f4 EF90 pop r14 + 3250 .LVL249: + 3251 12f6 DF90 pop r13 + 3252 12f8 CF90 pop r12 + 3253 .LVL250: + 3254 12fa BF90 pop r11 + 3255 12fc AF90 pop r10 + 3256 12fe 9F90 pop r9 + 3257 1300 8F90 pop r8 + 3258 1302 7F90 pop r7 + 3259 1304 6F90 pop r6 + 3260 1306 5F90 pop r5 + 3261 1308 4F90 pop r4 + 3262 .LVL251: + 3263 130a 3F90 pop r3 + 3264 130c 2F90 pop r2 + 3265 130e 0895 ret + 3266 .LFE16: + 3268 .global effect_random_filler + 3270 effect_random_filler: + 3271 .LFB14: + 3272 .LM338: + 3273 .LVL252: + 3274 1310 8F92 push r8 + 3275 1312 9F92 push r9 + 3276 1314 AF92 push r10 + 3277 1316 BF92 push r11 + 3278 1318 CF92 push r12 + 3279 131a DF92 push r13 + 3280 131c EF92 push r14 + 3281 131e FF92 push r15 + 3282 1320 0F93 push r16 + 3283 1322 1F93 push r17 + 3284 1324 CF93 push r28 + 3285 1326 DF93 push r29 + 3286 /* prologue: function */ + 3287 /* frame size = 0 */ + 3288 1328 4C01 movw r8,r24 + 3289 132a 8B01 movw r16,r22 + 3290 .LM339: + 3291 132c 6130 cpi r22,1 + 3292 132e 7105 cpc r23,__zero_reg__ + 3293 1330 01F4 brne .L242 + 3294 .LVL253: + 3295 .LM340: + 3296 1332 80E0 ldi r24,lo8(0) + 3297 1334 00C0 rjmp .L250 + 3298 .LVL254: + 3299 .L242: + 3300 .LM341: + 3301 1336 8FEF ldi r24,lo8(-1) + 3302 .L250: + 3303 1338 0E94 0000 call fill + 3304 .LVL255: + 3305 133c C0E0 ldi r28,lo8(0) + 3306 133e D0E0 ldi r29,hi8(0) + 3307 .LVL256: + 3308 .L248: + 3309 .LM342: + 3310 1340 0E94 0000 call rand + 3311 1344 68E0 ldi r22,lo8(8) + 3312 1346 70E0 ldi r23,hi8(8) + 3313 1348 0E94 0000 call __divmodhi4 + 3314 134c B82E mov r11,r24 + 3315 134e A92E mov r10,r25 + 3316 .LM343: + 3317 1350 0E94 0000 call rand + 3318 1354 68E0 ldi r22,lo8(8) + 3319 1356 70E0 ldi r23,hi8(8) + 3320 1358 0E94 0000 call __divmodhi4 + 3321 135c D82E mov r13,r24 + 3322 135e C92E mov r12,r25 + 3323 .LM344: + 3324 1360 0E94 0000 call rand + 3325 1364 68E0 ldi r22,lo8(8) + 3326 1366 70E0 ldi r23,hi8(8) + 3327 1368 0E94 0000 call __divmodhi4 + 3328 136c F82E mov r15,r24 + 3329 136e E92E mov r14,r25 + 3330 .LM345: + 3331 1370 0115 cp r16,__zero_reg__ + 3332 1372 1105 cpc r17,__zero_reg__ + 3333 1374 01F4 brne .L244 + 3334 1376 8B2D mov r24,r11 + 3335 1378 9A2D mov r25,r10 + 3336 137a 6D2D mov r22,r13 + 3337 137c 7C2D mov r23,r12 + 3338 137e 4F2D mov r20,r15 + 3339 1380 5E2D mov r21,r14 + 3340 1382 0E94 0000 call getvoxel + 3341 1386 8130 cpi r24,lo8(1) + 3342 1388 01F4 brne .L246 + 3343 138a 00C0 rjmp .L245 + 3344 .L244: + 3345 138c 0130 cpi r16,1 + 3346 138e 1105 cpc r17,__zero_reg__ + 3347 1390 01F4 brne .L246 + 3348 1392 8B2D mov r24,r11 + 3349 1394 9A2D mov r25,r10 + 3350 1396 6D2D mov r22,r13 + 3351 1398 7C2D mov r23,r12 + 3352 139a 4F2D mov r20,r15 + 3353 139c 5E2D mov r21,r14 + 3354 139e 0E94 0000 call getvoxel + 3355 13a2 8823 tst r24 + 3356 13a4 01F4 brne .L246 + 3357 .L245: + 3358 .LM346: + 3359 13a6 8B2D mov r24,r11 + 3360 13a8 9A2D mov r25,r10 + 3361 13aa 6D2D mov r22,r13 + 3362 13ac 7C2D mov r23,r12 + 3363 13ae 4F2D mov r20,r15 + 3364 13b0 5E2D mov r21,r14 + 3365 13b2 9801 movw r18,r16 + 3366 13b4 0E94 0000 call altervoxel + 3367 .LM347: + 3368 13b8 C401 movw r24,r8 + 3369 13ba 0E94 0000 call delay_ms + 3370 .LM348: + 3371 13be 2196 adiw r28,1 + 3372 .L246: + 3373 .LM349: + 3374 13c0 81E0 ldi r24,hi8(511) + 3375 13c2 CF3F cpi r28,lo8(511) + 3376 13c4 D807 cpc r29,r24 + 3377 13c6 04F4 brge .+2 + 3378 13c8 00C0 rjmp .L248 + 3379 /* epilogue start */ + 3380 .LM350: + 3381 13ca DF91 pop r29 + 3382 13cc CF91 pop r28 + 3383 .LVL257: + 3384 13ce 1F91 pop r17 + 3385 13d0 0F91 pop r16 + 3386 .LVL258: + 3387 13d2 FF90 pop r15 + 3388 13d4 EF90 pop r14 + 3389 13d6 DF90 pop r13 + 3390 13d8 CF90 pop r12 + 3391 13da BF90 pop r11 + 3392 13dc AF90 pop r10 + 3393 13de 9F90 pop r9 + 3394 13e0 8F90 pop r8 + 3395 .LVL259: + 3396 13e2 0895 ret + 3397 .LFE14: + 3399 .global sendvoxels_rand_z + 3401 sendvoxels_rand_z: + 3402 .LFB12: + 3403 .LM351: + 3404 .LVL260: + 3405 13e4 6F92 push r6 + 3406 13e6 7F92 push r7 + 3407 13e8 8F92 push r8 + 3408 13ea 9F92 push r9 + 3409 13ec AF92 push r10 + 3410 13ee BF92 push r11 + 3411 13f0 DF92 push r13 + 3412 13f2 EF92 push r14 + 3413 13f4 FF92 push r15 + 3414 13f6 0F93 push r16 + 3415 13f8 1F93 push r17 + 3416 13fa CF93 push r28 + 3417 13fc DF93 push r29 + 3418 /* prologue: function */ + 3419 /* frame size = 0 */ + 3420 13fe 3C01 movw r6,r24 + 3421 1400 5B01 movw r10,r22 + 3422 1402 4A01 movw r8,r20 + 3423 .LM352: + 3424 1404 80E0 ldi r24,lo8(0) + 3425 .LVL261: + 3426 1406 0E94 0000 call fill + 3427 .LVL262: + 3428 140a 00E0 ldi r16,lo8(0) + 3429 140c 10E0 ldi r17,hi8(0) + 3430 140e 00C0 rjmp .L252 + 3431 .L255: + 3432 .LM353: + 3433 1410 0E94 0000 call rand + 3434 1414 80FD sbrc r24,0 + 3435 1416 00C0 rjmp .L253 + 3436 .LM354: + 3437 1418 C801 movw r24,r16 + 3438 141a BE01 movw r22,r28 + 3439 141c 40E0 ldi r20,lo8(0) + 3440 141e 50E0 ldi r21,hi8(0) + 3441 1420 00C0 rjmp .L264 + 3442 .L253: + 3443 .LM355: + 3444 1422 C801 movw r24,r16 + 3445 1424 BE01 movw r22,r28 + 3446 1426 47E0 ldi r20,lo8(7) + 3447 1428 50E0 ldi r21,hi8(7) + 3448 .L264: + 3449 142a 0E94 0000 call setvoxel + 3450 142e 2196 adiw r28,1 + 3451 .LM356: + 3452 1430 C830 cpi r28,8 + 3453 1432 D105 cpc r29,__zero_reg__ + 3454 1434 01F4 brne .L255 + 3455 1436 0F5F subi r16,lo8(-(1)) + 3456 1438 1F4F sbci r17,hi8(-(1)) + 3457 .LM357: + 3458 143a 0830 cpi r16,8 + 3459 143c 1105 cpc r17,__zero_reg__ + 3460 143e 01F4 brne .L252 + 3461 1440 DD24 clr r13 + 3462 .LVL263: + 3463 1442 EE24 clr r14 + 3464 .LVL264: + 3465 1444 FF24 clr r15 + 3466 .LVL265: + 3467 1446 00C0 rjmp .L256 + 3468 .LVL266: + 3469 .L252: + 3470 1448 C0E0 ldi r28,lo8(0) + 3471 144a D0E0 ldi r29,hi8(0) + 3472 144c 00C0 rjmp .L255 + 3473 .LVL267: + 3474 .L260: + 3475 .LM358: + 3476 144e 0E94 0000 call rand + 3477 .LVL268: + 3478 1452 EC01 movw r28,r24 + 3479 .LM359: + 3480 1454 0E94 0000 call rand + 3481 1458 68E0 ldi r22,lo8(8) + 3482 145a 70E0 ldi r23,hi8(8) + 3483 145c 0E94 0000 call __divmodhi4 + 3484 1460 082F mov r16,r24 + 3485 .LM360: + 3486 1462 8E15 cp r24,r14 + 3487 1464 01F0 breq .L257 + 3488 .LVL269: + 3489 .LM361: + 3490 1466 CE01 movw r24,r28 + 3491 .LVL270: + 3492 1468 68E0 ldi r22,lo8(8) + 3493 146a 70E0 ldi r23,hi8(8) + 3494 146c 0E94 0000 call __divmodhi4 + 3495 1470 182F mov r17,r24 + 3496 .LM362: + 3497 1472 8D15 cp r24,r13 + 3498 1474 01F0 breq .L257 + 3499 .LVL271: + 3500 .LM363: + 3501 1476 90E0 ldi r25,lo8(0) + 3502 1478 602F mov r22,r16 + 3503 147a 70E0 ldi r23,lo8(0) + 3504 147c 40E0 ldi r20,lo8(0) + 3505 147e 50E0 ldi r21,hi8(0) + 3506 1480 0E94 0000 call getvoxel + 3507 .LVL272: + 3508 1484 8823 tst r24 + 3509 1486 01F0 breq .L258 + 3510 .LM364: + 3511 1488 812F mov r24,r17 + 3512 148a 602F mov r22,r16 + 3513 148c 40E0 ldi r20,lo8(0) + 3514 148e 00C0 rjmp .L265 + 3515 .L258: + 3516 .LM365: + 3517 1490 812F mov r24,r17 + 3518 1492 602F mov r22,r16 + 3519 1494 47E0 ldi r20,lo8(7) + 3520 .L265: + 3521 1496 9501 movw r18,r10 + 3522 1498 0E94 0000 call sendvoxel_z + 3523 .LM366: + 3524 149c C401 movw r24,r8 + 3525 149e 0E94 0000 call delay_ms + 3526 14a2 D12E mov r13,r17 + 3527 14a4 E02E mov r14,r16 + 3528 .LVL273: + 3529 .L257: + 3530 .LM367: + 3531 14a6 F394 inc r15 + 3532 .L256: + 3533 14a8 8F2D mov r24,r15 + 3534 14aa 90E0 ldi r25,lo8(0) + 3535 .LVL274: + 3536 14ac 8615 cp r24,r6 + 3537 14ae 9705 cpc r25,r7 + 3538 14b0 04F0 brlt .L260 + 3539 .LVL275: + 3540 /* epilogue start */ + 3541 .LM368: + 3542 14b2 DF91 pop r29 + 3543 14b4 CF91 pop r28 + 3544 14b6 1F91 pop r17 + 3545 .LVL276: + 3546 14b8 0F91 pop r16 + 3547 .LVL277: + 3548 14ba FF90 pop r15 + 3549 14bc EF90 pop r14 + 3550 .LVL278: + 3551 14be DF90 pop r13 + 3552 .LVL279: + 3553 14c0 BF90 pop r11 + 3554 14c2 AF90 pop r10 + 3555 .LVL280: + 3556 14c4 9F90 pop r9 + 3557 14c6 8F90 pop r8 + 3558 .LVL281: + 3559 14c8 7F90 pop r7 + 3560 14ca 6F90 pop r6 + 3561 .LVL282: + 3562 14cc 0895 ret + 3563 .LFE12: + 3565 .global effect_blinky2 + 3567 effect_blinky2: + 3568 .LFB7: + 3569 .LM369: + 3570 14ce EF92 push r14 + 3571 14d0 FF92 push r15 + 3572 14d2 0F93 push r16 + 3573 14d4 1F93 push r17 + 3574 14d6 CF93 push r28 + 3575 14d8 DF93 push r29 + 3576 /* prologue: function */ + 3577 /* frame size = 0 */ + 3578 .LM370: + 3579 14da 80E0 ldi r24,lo8(0) + 3580 14dc 0E94 0000 call fill + 3581 14e0 00E0 ldi r16,lo8(0) + 3582 14e2 10E0 ldi r17,hi8(0) + 3583 .LVL283: + 3584 .LM371: + 3585 14e4 7FEE ldi r23,lo8(751) + 3586 14e6 E72E mov r14,r23 + 3587 14e8 72E0 ldi r23,hi8(751) + 3588 14ea F72E mov r15,r23 + 3589 14ec 00C0 rjmp .L267 + 3590 .LVL284: + 3591 .L268: + 3592 .LM372: + 3593 14ee 80E0 ldi r24,lo8(0) + 3594 14f0 0E94 0000 call fill + 3595 .LM373: + 3596 14f4 CE01 movw r24,r28 + 3597 14f6 0E94 0000 call delay_ms + 3598 .LM374: + 3599 14fa 8FEF ldi r24,lo8(-1) + 3600 14fc 0E94 0000 call fill + 3601 .LM375: + 3602 1500 84E6 ldi r24,lo8(100) + 3603 1502 90E0 ldi r25,hi8(100) + 3604 1504 0E94 0000 call delay_ms + 3605 .LM376: + 3606 1508 CE01 movw r24,r28 + 3607 150a 66EF ldi r22,lo8(-10) + 3608 150c 7FEF ldi r23,hi8(-10) + 3609 150e 0E94 0000 call __divmodhi4 + 3610 1512 88EE ldi r24,lo8(1000) + 3611 1514 93E0 ldi r25,hi8(1000) + 3612 1516 0E94 0000 call __divmodhi4 + 3613 151a 6F50 subi r22,lo8(-(-15)) + 3614 151c 7040 sbci r23,hi8(-(-15)) + 3615 151e C60F add r28,r22 + 3616 1520 D71F adc r29,r23 + 3617 .LM377: + 3618 1522 1C16 cp __zero_reg__,r28 + 3619 1524 1D06 cpc __zero_reg__,r29 + 3620 1526 04F0 brlt .L268 + 3621 .LM378: + 3622 1528 88EE ldi r24,lo8(1000) + 3623 152a 93E0 ldi r25,hi8(1000) + 3624 152c 0E94 0000 call delay_ms + 3625 1530 CEEE ldi r28,lo8(750) + 3626 1532 D2E0 ldi r29,hi8(750) + 3627 .LVL285: + 3628 .L269: + 3629 .LM379: + 3630 1534 80E0 ldi r24,lo8(0) + 3631 1536 0E94 0000 call fill + 3632 .LM380: + 3633 153a C701 movw r24,r14 + 3634 153c 8C1B sub r24,r28 + 3635 153e 9D0B sbc r25,r29 + 3636 1540 0E94 0000 call delay_ms + 3637 .LM381: + 3638 1544 8FEF ldi r24,lo8(-1) + 3639 1546 0E94 0000 call fill + 3640 .LM382: + 3641 154a 84E6 ldi r24,lo8(100) + 3642 154c 90E0 ldi r25,hi8(100) + 3643 154e 0E94 0000 call delay_ms + 3644 .LM383: + 3645 1552 CE01 movw r24,r28 + 3646 1554 66EF ldi r22,lo8(-10) + 3647 1556 7FEF ldi r23,hi8(-10) + 3648 1558 0E94 0000 call __divmodhi4 + 3649 155c 88EE ldi r24,lo8(1000) + 3650 155e 93E0 ldi r25,hi8(1000) + 3651 1560 0E94 0000 call __divmodhi4 + 3652 1564 6F50 subi r22,lo8(-(-15)) + 3653 1566 7040 sbci r23,hi8(-(-15)) + 3654 1568 C60F add r28,r22 + 3655 156a D71F adc r29,r23 + 3656 .LM384: + 3657 156c 1C16 cp __zero_reg__,r28 + 3658 156e 1D06 cpc __zero_reg__,r29 + 3659 1570 04F0 brlt .L269 + 3660 .LM385: + 3661 1572 0F5F subi r16,lo8(-(1)) + 3662 1574 1F4F sbci r17,hi8(-(1)) + 3663 1576 0230 cpi r16,2 + 3664 1578 1105 cpc r17,__zero_reg__ + 3665 157a 01F0 breq .L271 + 3666 .L267: + 3667 157c CEEE ldi r28,lo8(750) + 3668 157e D2E0 ldi r29,hi8(750) + 3669 .LVL286: + 3670 1580 00C0 rjmp .L268 + 3671 .L271: + 3672 /* epilogue start */ + 3673 .LM386: + 3674 1582 DF91 pop r29 + 3675 1584 CF91 pop r28 + 3676 .LVL287: + 3677 1586 1F91 pop r17 + 3678 1588 0F91 pop r16 + 3679 .LVL288: + 3680 158a FF90 pop r15 + 3681 158c EF90 pop r14 + 3682 158e 0895 ret + 3683 .LFE7: + 3685 .global effect_wormsqueeze + 3687 effect_wormsqueeze: + 3688 .LFB26: + 3689 .LM387: + 3690 .LVL289: + 3691 1590 2F92 push r2 + 3692 1592 3F92 push r3 + 3693 1594 4F92 push r4 + 3694 1596 5F92 push r5 + 3695 1598 6F92 push r6 + 3696 159a 7F92 push r7 + 3697 159c 8F92 push r8 + 3698 159e 9F92 push r9 + 3699 15a0 AF92 push r10 + 3700 15a2 BF92 push r11 + 3701 15a4 CF92 push r12 + 3702 15a6 DF92 push r13 + 3703 15a8 EF92 push r14 + 3704 15aa FF92 push r15 + 3705 15ac 0F93 push r16 + 3706 .LVL290: + 3707 15ae 1F93 push r17 + 3708 15b0 DF93 push r29 + 3709 15b2 CF93 push r28 + 3710 15b4 CDB7 in r28,__SP_L__ + 3711 15b6 DEB7 in r29,__SP_H__ + 3712 15b8 2E97 sbiw r28,14 + 3713 15ba 0FB6 in __tmp_reg__,__SREG__ + 3714 15bc F894 cli + 3715 15be DEBF out __SP_H__,r29 + 3716 15c0 0FBE out __SREG__,__tmp_reg__ + 3717 15c2 CDBF out __SP_L__,r28 + 3718 /* prologue: function */ + 3719 /* frame size = 14 */ + 3720 15c4 9A83 std Y+2,r25 + 3721 15c6 8983 std Y+1,r24 + 3722 15c8 7C83 std Y+4,r23 + 3723 15ca 6B83 std Y+3,r22 + 3724 15cc 5E83 std Y+6,r21 + 3725 15ce 4D83 std Y+5,r20 + 3726 15d0 3887 std Y+8,r19 + 3727 15d2 2F83 std Y+7,r18 + 3728 15d4 1A87 std Y+10,r17 + 3729 15d6 0987 std Y+9,r16 + 3730 .LVL291: + 3731 .LM388: + 3732 15d8 4F5F subi r20,lo8(-1) + 3733 15da 5F4F sbci r21,hi8(-1) + 3734 .LVL292: + 3735 15dc 01F4 brne .L275 + 3736 .LVL293: + 3737 15de F7E0 ldi r31,lo8(7) + 3738 15e0 2F2E mov r2,r31 + 3739 15e2 312C mov r3,__zero_reg__ + 3740 .LVL294: + 3741 15e4 00C0 rjmp .L276 + 3742 .LVL295: + 3743 .L275: + 3744 15e6 2224 clr r2 + 3745 15e8 3324 clr r3 + 3746 .LVL296: + 3747 .L276: + 3748 .LM389: + 3749 15ea E9E0 ldi r30,lo8(9) + 3750 15ec 6E2E mov r6,r30 + 3751 15ee 712C mov r7,__zero_reg__ + 3752 .LVL297: + 3753 15f0 8981 ldd r24,Y+1 + 3754 15f2 9A81 ldd r25,Y+2 + 3755 15f4 681A sub r6,r24 + 3756 15f6 790A sbc r7,r25 + 3757 .LM390: + 3758 15f8 0E94 0000 call rand + 3759 .LVL298: + 3760 15fc B301 movw r22,r6 + 3761 15fe 0E94 0000 call __divmodhi4 + 3762 1602 6C01 movw r12,r24 + 3763 .LVL299: + 3764 .LM391: + 3765 1604 0E94 0000 call rand + 3766 .LVL300: + 3767 1608 B301 movw r22,r6 + 3768 160a 0E94 0000 call __divmodhi4 + 3769 160e 7C01 movw r14,r24 + 3770 .LVL301: + 3771 1610 4424 clr r4 + 3772 1612 5524 clr r5 + 3773 .LVL302: + 3774 1614 00C0 rjmp .L277 + 3775 .LVL303: + 3776 .L289: + 3777 .LM392: + 3778 1616 0E94 0000 call rand + 3779 161a 8C01 movw r16,r24 + 3780 .LM393: + 3781 161c 0E94 0000 call rand + 3782 1620 9C01 movw r18,r24 + 3783 .LM394: + 3784 1622 C801 movw r24,r16 + 3785 1624 63E0 ldi r22,lo8(3) + 3786 1626 70E0 ldi r23,hi8(3) + 3787 1628 0E94 0000 call __divmodhi4 + 3788 162c 0197 sbiw r24,1 + 3789 162e 8C0D add r24,r12 + 3790 1630 9D1D adc r25,r13 + 3791 1632 9E87 std Y+14,r25 + 3792 1634 8D87 std Y+13,r24 + 3793 .LVL304: + 3794 1636 1816 cp __zero_reg__,r24 + 3795 1638 1906 cpc __zero_reg__,r25 + 3796 163a 04F4 brge .L278 + 3797 163c 8615 cp r24,r6 + 3798 163e 9705 cpc r25,r7 + 3799 1640 04F0 brlt .L279 + 3800 .L278: + 3801 1642 DE86 std Y+14,r13 + 3802 1644 CD86 std Y+13,r12 + 3803 .L279: + 3804 .LM395: + 3805 1646 C901 movw r24,r18 + 3806 1648 63E0 ldi r22,lo8(3) + 3807 164a 70E0 ldi r23,hi8(3) + 3808 164c 0E94 0000 call __divmodhi4 + 3809 1650 8C01 movw r16,r24 + 3810 .LVL305: + 3811 1652 0150 subi r16,lo8(-(-1)) + 3812 1654 1040 sbci r17,hi8(-(-1)) + 3813 1656 0E0D add r16,r14 + 3814 1658 1F1D adc r17,r15 + 3815 165a 1016 cp __zero_reg__,r16 + 3816 165c 1106 cpc __zero_reg__,r17 + 3817 165e 04F4 brge .L280 + 3818 1660 0615 cp r16,r6 + 3819 1662 1705 cpc r17,r7 + 3820 1664 04F0 brlt .L281 + 3821 .L280: + 3822 1666 8701 movw r16,r14 + 3823 .L281: + 3824 .LM396: + 3825 1668 8B81 ldd r24,Y+3 + 3826 166a 6D81 ldd r22,Y+5 + 3827 166c 7E81 ldd r23,Y+6 + 3828 166e 0E94 0000 call shift + 3829 1672 8D84 ldd r8,Y+13 + 3830 1674 9E84 ldd r9,Y+14 + 3831 1676 AA24 clr r10 + 3832 1678 BB24 clr r11 + 3833 167a 00C0 rjmp .L282 + 3834 .LVL306: + 3835 .L286: + 3836 .LM397: + 3837 167c EB81 ldd r30,Y+3 + 3838 167e FC81 ldd r31,Y+4 + 3839 1680 EA37 cpi r30,122 + 3840 1682 F105 cpc r31,__zero_reg__ + 3841 1684 01F4 brne .L283 + 3842 .LVL307: + 3843 .LM398: + 3844 1686 C401 movw r24,r8 + 3845 1688 B601 movw r22,r12 + 3846 168a A101 movw r20,r2 + 3847 168c 00C0 rjmp .L291 + 3848 .L283: + 3849 .LM399: + 3850 168e 8B81 ldd r24,Y+3 + 3851 1690 9C81 ldd r25,Y+4 + 3852 1692 8937 cpi r24,121 + 3853 1694 9105 cpc r25,__zero_reg__ + 3854 1696 01F4 brne .L285 + 3855 .LM400: + 3856 1698 C401 movw r24,r8 + 3857 169a B101 movw r22,r2 + 3858 169c A601 movw r20,r12 + 3859 169e 00C0 rjmp .L291 + 3860 .L285: + 3861 .LM401: + 3862 16a0 EB81 ldd r30,Y+3 + 3863 16a2 FC81 ldd r31,Y+4 + 3864 16a4 E837 cpi r30,120 + 3865 16a6 F105 cpc r31,__zero_reg__ + 3866 16a8 01F4 brne .L284 + 3867 .LM402: + 3868 16aa 4D85 ldd r20,Y+13 + 3869 16ac 5E85 ldd r21,Y+14 + 3870 16ae 4E0D add r20,r14 + 3871 16b0 5F1D adc r21,r15 + 3872 16b2 C101 movw r24,r2 + 3873 16b4 6B85 ldd r22,Y+11 + 3874 16b6 7C85 ldd r23,Y+12 + 3875 .L291: + 3876 16b8 0E94 0000 call setvoxel + 3877 .L284: + 3878 .LM403: + 3879 16bc 0894 sec + 3880 16be E11C adc r14,__zero_reg__ + 3881 16c0 F11C adc r15,__zero_reg__ + 3882 16c2 0894 sec + 3883 16c4 C11C adc r12,__zero_reg__ + 3884 16c6 D11C adc r13,__zero_reg__ + 3885 .L288: + 3886 16c8 8981 ldd r24,Y+1 + 3887 16ca 9A81 ldd r25,Y+2 + 3888 16cc E816 cp r14,r24 + 3889 16ce F906 cpc r15,r25 + 3890 16d0 04F0 brlt .L286 + 3891 .LVL308: + 3892 .LM404: + 3893 16d2 0894 sec + 3894 16d4 A11C adc r10,__zero_reg__ + 3895 16d6 B11C adc r11,__zero_reg__ + 3896 16d8 0894 sec + 3897 16da 811C adc r8,__zero_reg__ + 3898 16dc 911C adc r9,__zero_reg__ + 3899 .LVL309: + 3900 .L282: + 3901 16de E981 ldd r30,Y+1 + 3902 16e0 FA81 ldd r31,Y+2 + 3903 16e2 AE16 cp r10,r30 + 3904 16e4 BF06 cpc r11,r31 + 3905 16e6 04F4 brge .L287 + 3906 16e8 6801 movw r12,r16 + 3907 16ea EE24 clr r14 + 3908 16ec FF24 clr r15 + 3909 .LM405: + 3910 16ee C501 movw r24,r10 + 3911 16f0 800F add r24,r16 + 3912 16f2 911F adc r25,r17 + 3913 16f4 9C87 std Y+12,r25 + 3914 16f6 8B87 std Y+11,r24 + 3915 16f8 00C0 rjmp .L288 + 3916 .LVL310: + 3917 .L287: + 3918 .LM406: + 3919 16fa 8985 ldd r24,Y+9 + 3920 16fc 9A85 ldd r25,Y+10 + 3921 16fe 0E94 0000 call delay_ms + 3922 .LM407: + 3923 1702 0894 sec + 3924 1704 411C adc r4,__zero_reg__ + 3925 1706 511C adc r5,__zero_reg__ + 3926 1708 CD84 ldd r12,Y+13 + 3927 170a DE84 ldd r13,Y+14 + 3928 170c 7801 movw r14,r16 + 3929 .LVL311: + 3930 .L277: + 3931 170e EF81 ldd r30,Y+7 + 3932 1710 F885 ldd r31,Y+8 + 3933 1712 4E16 cp r4,r30 + 3934 1714 5F06 cpc r5,r31 + 3935 1716 04F4 brge .+2 + 3936 1718 00C0 rjmp .L289 + 3937 /* epilogue start */ + 3938 .LM408: + 3939 171a 2E96 adiw r28,14 + 3940 171c 0FB6 in __tmp_reg__,__SREG__ + 3941 171e F894 cli + 3942 1720 DEBF out __SP_H__,r29 + 3943 1722 0FBE out __SREG__,__tmp_reg__ + 3944 1724 CDBF out __SP_L__,r28 + 3945 1726 CF91 pop r28 + 3946 1728 DF91 pop r29 + 3947 172a 1F91 pop r17 + 3948 172c 0F91 pop r16 + 3949 172e FF90 pop r15 + 3950 1730 EF90 pop r14 + 3951 .LVL312: + 3952 1732 DF90 pop r13 + 3953 1734 CF90 pop r12 + 3954 .LVL313: + 3955 1736 BF90 pop r11 + 3956 1738 AF90 pop r10 + 3957 .LVL314: + 3958 173a 9F90 pop r9 + 3959 173c 8F90 pop r8 + 3960 173e 7F90 pop r7 + 3961 1740 6F90 pop r6 + 3962 .LVL315: + 3963 1742 5F90 pop r5 + 3964 1744 4F90 pop r4 + 3965 .LVL316: + 3966 1746 3F90 pop r3 + 3967 1748 2F90 pop r2 + 3968 .LVL317: + 3969 174a 0895 ret + 3970 .LFE26: + 3972 .global effect_rain + 3974 effect_rain: + 3975 .LFB15: + 3976 .LM409: + 3977 .LVL318: + 3978 174c AF92 push r10 + 3979 174e BF92 push r11 + 3980 1750 CF92 push r12 + 3981 1752 DF92 push r13 + 3982 1754 EF92 push r14 + 3983 1756 FF92 push r15 + 3984 1758 0F93 push r16 + 3985 175a 1F93 push r17 + 3986 175c CF93 push r28 + 3987 175e DF93 push r29 + 3988 /* prologue: function */ + 3989 /* frame size = 0 */ + 3990 1760 5C01 movw r10,r24 + 3991 .LM410: + 3992 1762 CC24 clr r12 + 3993 1764 DD24 clr r13 + 3994 .LVL319: + 3995 1766 00C0 rjmp .L293 + 3996 .LVL320: + 3997 .L296: + 3998 .LM411: + 3999 1768 0E94 0000 call rand + 4000 176c 64E0 ldi r22,lo8(4) + 4001 176e 70E0 ldi r23,hi8(4) + 4002 1770 0E94 0000 call __divmodhi4 + 4003 1774 EC01 movw r28,r24 + 4004 .LVL321: + 4005 1776 EE24 clr r14 + 4006 1778 FF24 clr r15 + 4007 177a 00C0 rjmp .L294 + 4008 .LVL322: + 4009 .L295: + 4010 .LM412: + 4011 177c 0E94 0000 call rand + 4012 1780 8C01 movw r16,r24 + 4013 .LM413: + 4014 1782 0E94 0000 call rand + 4015 1786 9C01 movw r18,r24 + 4016 .LM414: + 4017 1788 C801 movw r24,r16 + 4018 178a 68E0 ldi r22,lo8(8) + 4019 178c 70E0 ldi r23,hi8(8) + 4020 178e 0E94 0000 call __divmodhi4 + 4021 1792 FC01 movw r30,r24 + 4022 1794 C901 movw r24,r18 + 4023 1796 68E0 ldi r22,lo8(8) + 4024 1798 70E0 ldi r23,hi8(8) + 4025 179a 0E94 0000 call __divmodhi4 + 4026 179e BC01 movw r22,r24 + 4027 17a0 CF01 movw r24,r30 + 4028 17a2 47E0 ldi r20,lo8(7) + 4029 17a4 50E0 ldi r21,hi8(7) + 4030 17a6 0E94 0000 call setvoxel + 4031 .LM415: + 4032 17aa 0894 sec + 4033 17ac E11C adc r14,__zero_reg__ + 4034 17ae F11C adc r15,__zero_reg__ + 4035 .L294: + 4036 17b0 EC16 cp r14,r28 + 4037 17b2 FD06 cpc r15,r29 + 4038 17b4 04F0 brlt .L295 + 4039 .LM416: + 4040 17b6 88EE ldi r24,lo8(1000) + 4041 17b8 93E0 ldi r25,hi8(1000) + 4042 17ba 0E94 0000 call delay_ms + 4043 .LM417: + 4044 17be 8AE7 ldi r24,lo8(122) + 4045 17c0 6FEF ldi r22,lo8(-1) + 4046 17c2 7FEF ldi r23,hi8(-1) + 4047 17c4 0E94 0000 call shift + 4048 .LM418: + 4049 17c8 0894 sec + 4050 17ca C11C adc r12,__zero_reg__ + 4051 17cc D11C adc r13,__zero_reg__ + 4052 .LVL323: + 4053 .L293: + 4054 17ce CA14 cp r12,r10 + 4055 17d0 DB04 cpc r13,r11 + 4056 17d2 04F0 brlt .L296 + 4057 /* epilogue start */ + 4058 .LM419: + 4059 17d4 DF91 pop r29 + 4060 17d6 CF91 pop r28 + 4061 .LVL324: + 4062 17d8 1F91 pop r17 + 4063 17da 0F91 pop r16 + 4064 17dc FF90 pop r15 + 4065 17de EF90 pop r14 + 4066 .LVL325: + 4067 17e0 DF90 pop r13 + 4068 17e2 CF90 pop r12 + 4069 .LVL326: + 4070 17e4 BF90 pop r11 + 4071 17e6 AF90 pop r10 + 4072 .LVL327: + 4073 17e8 0895 ret + 4074 .LFE15: + 4076 .global boingboing + 4078 boingboing: + 4079 .LFB13: + 4080 .LM420: + 4081 .LVL328: + 4082 17ea 2F92 push r2 + 4083 17ec 3F92 push r3 + 4084 17ee 4F92 push r4 + 4085 17f0 5F92 push r5 + 4086 17f2 6F92 push r6 + 4087 17f4 7F92 push r7 + 4088 17f6 8F92 push r8 + 4089 17f8 9F92 push r9 + 4090 17fa AF92 push r10 + 4091 17fc BF92 push r11 + 4092 17fe CF92 push r12 + 4093 1800 DF92 push r13 + 4094 1802 EF92 push r14 + 4095 1804 FF92 push r15 + 4096 1806 0F93 push r16 + 4097 1808 1F93 push r17 + 4098 180a DF93 push r29 + 4099 180c CF93 push r28 + 4100 180e CDB7 in r28,__SP_L__ + 4101 1810 DEB7 in r29,__SP_H__ + 4102 1812 E897 sbiw r28,56 + 4103 1814 0FB6 in __tmp_reg__,__SREG__ + 4104 1816 F894 cli + 4105 1818 DEBF out __SP_H__,r29 + 4106 181a 0FBE out __SREG__,__tmp_reg__ + 4107 181c CDBF out __SP_L__,r28 + 4108 /* prologue: function */ + 4109 /* frame size = 56 */ + 4110 181e 9AAB std Y+50,r25 + 4111 1820 89AB std Y+49,r24 + 4112 1822 7CAB std Y+52,r23 + 4113 1824 6BAB std Y+51,r22 + 4114 1826 222E mov r2,r18 + 4115 .LM421: + 4116 1828 80E0 ldi r24,lo8(0) + 4117 .LVL329: + 4118 182a 0E94 0000 call fill + 4119 .LVL330: + 4120 182e FE01 movw r30,r28 + 4121 1830 3196 adiw r30,1 + 4122 .LM422: + 4123 1832 84E0 ldi r24,lo8(4) + 4124 1834 90E0 ldi r25,hi8(4) + 4125 .LM423: + 4126 1836 9E01 movw r18,r28 + 4127 1838 2F5C subi r18,lo8(-(49)) + 4128 183a 3F4F sbci r19,hi8(-(49)) + 4129 183c 3EAB std Y+54,r19 + 4130 183e 2DAB std Y+53,r18 + 4131 .L299: + 4132 .LM424: + 4133 1840 9183 std Z+1,r25 + 4134 1842 8083 st Z,r24 + 4135 .LM425: + 4136 1844 9383 std Z+3,r25 + 4137 1846 8283 std Z+2,r24 + 4138 .LM426: + 4139 1848 9583 std Z+5,r25 + 4140 184a 8483 std Z+4,r24 + 4141 184c 3696 adiw r30,6 + 4142 .LM427: + 4143 184e 2DA9 ldd r18,Y+53 + 4144 1850 3EA9 ldd r19,Y+54 + 4145 1852 E217 cp r30,r18 + 4146 1854 F307 cpc r31,r19 + 4147 1856 01F4 brne .L299 + 4148 .LM428: + 4149 1858 0E94 0000 call rand + 4150 185c 68E0 ldi r22,lo8(8) + 4151 185e 70E0 ldi r23,hi8(8) + 4152 1860 0E94 0000 call __divmodhi4 + 4153 1864 3C01 movw r6,r24 + 4154 .LVL331: + 4155 .LM429: + 4156 1866 0E94 0000 call rand + 4157 .LVL332: + 4158 186a 68E0 ldi r22,lo8(8) + 4159 186c 70E0 ldi r23,hi8(8) + 4160 186e 0E94 0000 call __divmodhi4 + 4161 1872 2C01 movw r4,r24 + 4162 .LVL333: + 4163 .LM430: + 4164 1874 0E94 0000 call rand + 4165 .LVL334: + 4166 1878 68E0 ldi r22,lo8(8) + 4167 187a 70E0 ldi r23,hi8(8) + 4168 187c 0E94 0000 call __divmodhi4 + 4169 1880 7C01 movw r14,r24 + 4170 .LVL335: + 4171 1882 E1E0 ldi r30,lo8(1) + 4172 1884 CE2E mov r12,r30 + 4173 1886 D12C mov r13,__zero_reg__ + 4174 .LVL336: + 4175 1888 71E0 ldi r23,lo8(1) + 4176 188a 872E mov r8,r23 + 4177 188c 912C mov r9,__zero_reg__ + 4178 .LVL337: + 4179 188e 61E0 ldi r22,lo8(1) + 4180 1890 A62E mov r10,r22 + 4181 1892 B12C mov r11,__zero_reg__ + 4182 .LVL338: + 4183 .LM431: + 4184 1894 CE01 movw r24,r28 + 4185 .LVL339: + 4186 1896 0B97 sbiw r24,11 + 4187 1898 98AF std Y+56,r25 + 4188 189a 8FAB std Y+55,r24 + 4189 189c 00C0 rjmp .L300 + 4190 .LVL340: + 4191 .L353: + 4192 .LM432: + 4193 189e 0E94 0000 call rand + 4194 18a2 63E0 ldi r22,lo8(3) + 4195 18a4 70E0 ldi r23,hi8(3) + 4196 18a6 0E94 0000 call __divmodhi4 + 4197 18aa 892B or r24,r25 + 4198 18ac 01F4 brne .L301 + 4199 .LM433: + 4200 18ae 0E94 0000 call rand + 4201 18b2 63E0 ldi r22,lo8(3) + 4202 18b4 70E0 ldi r23,hi8(3) + 4203 18b6 0E94 0000 call __divmodhi4 + 4204 .LM434: + 4205 18ba 0097 sbiw r24,0 + 4206 .LVL341: + 4207 18bc 01F4 brne .L302 + 4208 .LM435: + 4209 18be 0E94 0000 call rand + 4210 .LVL342: + 4211 18c2 63E0 ldi r22,lo8(3) + 4212 18c4 70E0 ldi r23,hi8(3) + 4213 18c6 0E94 0000 call __divmodhi4 + 4214 18ca 6C01 movw r12,r24 + 4215 18cc 0894 sec + 4216 18ce C108 sbc r12,__zero_reg__ + 4217 18d0 D108 sbc r13,__zero_reg__ + 4218 18d2 00C0 rjmp .L301 + 4219 .LVL343: + 4220 .L302: + 4221 .LM436: + 4222 18d4 8130 cpi r24,1 + 4223 18d6 9105 cpc r25,__zero_reg__ + 4224 18d8 01F4 brne .L303 + 4225 .LM437: + 4226 18da 0E94 0000 call rand + 4227 .LVL344: + 4228 18de 63E0 ldi r22,lo8(3) + 4229 18e0 70E0 ldi r23,hi8(3) + 4230 18e2 0E94 0000 call __divmodhi4 + 4231 18e6 4C01 movw r8,r24 + 4232 18e8 0894 sec + 4233 18ea 8108 sbc r8,__zero_reg__ + 4234 18ec 9108 sbc r9,__zero_reg__ + 4235 18ee 00C0 rjmp .L301 + 4236 .LVL345: + 4237 .L303: + 4238 .LM438: + 4239 18f0 8230 cpi r24,2 + 4240 18f2 9105 cpc r25,__zero_reg__ + 4241 18f4 01F4 brne .L301 + 4242 .LM439: + 4243 18f6 0E94 0000 call rand + 4244 .LVL346: + 4245 18fa 63E0 ldi r22,lo8(3) + 4246 18fc 70E0 ldi r23,hi8(3) + 4247 18fe 0E94 0000 call __divmodhi4 + 4248 1902 5C01 movw r10,r24 + 4249 1904 0894 sec + 4250 1906 A108 sbc r10,__zero_reg__ + 4251 1908 B108 sbc r11,__zero_reg__ + 4252 .LVL347: + 4253 .L301: + 4254 .LM440: + 4255 190a 9FEF ldi r25,lo8(-1) + 4256 190c C916 cp r12,r25 + 4257 190e 9FEF ldi r25,hi8(-1) + 4258 1910 D906 cpc r13,r25 + 4259 1912 01F4 brne .L304 + 4260 1914 4114 cp r4,__zero_reg__ + 4261 1916 5104 cpc r5,__zero_reg__ + 4262 1918 01F4 brne .L304 + 4263 .LM441: + 4264 191a 0E94 0000 call rand + 4265 .LVL348: + 4266 191e 63E0 ldi r22,lo8(3) + 4267 1920 70E0 ldi r23,hi8(3) + 4268 1922 0E94 0000 call __divmodhi4 + 4269 1926 0197 sbiw r24,1 + 4270 1928 01F0 breq .L305 + 4271 192a CC24 clr r12 + 4272 192c DD24 clr r13 + 4273 192e 00C0 rjmp .L360 + 4274 .L305: + 4275 1930 51E0 ldi r21,lo8(1) + 4276 1932 C52E mov r12,r21 + 4277 1934 D12C mov r13,__zero_reg__ + 4278 .L360: + 4279 1936 11E0 ldi r17,lo8(1) + 4280 1938 00C0 rjmp .L306 + 4281 .LVL349: + 4282 .L304: + 4283 193a 10E0 ldi r17,lo8(0) + 4284 .L306: + 4285 .LM442: + 4286 193c EFEF ldi r30,lo8(-1) + 4287 193e 8E16 cp r8,r30 + 4288 1940 EFEF ldi r30,hi8(-1) + 4289 1942 9E06 cpc r9,r30 + 4290 1944 01F4 brne .L307 + 4291 1946 6114 cp r6,__zero_reg__ + 4292 1948 7104 cpc r7,__zero_reg__ + 4293 194a 01F4 brne .L307 + 4294 .LM443: + 4295 194c 0E94 0000 call rand + 4296 .LVL350: + 4297 1950 63E0 ldi r22,lo8(3) + 4298 1952 70E0 ldi r23,hi8(3) + 4299 1954 0E94 0000 call __divmodhi4 + 4300 1958 0197 sbiw r24,1 + 4301 195a 01F0 breq .L308 + 4302 195c 8824 clr r8 + 4303 195e 9924 clr r9 + 4304 1960 00C0 rjmp .L361 + 4305 .L308: + 4306 1962 41E0 ldi r20,lo8(1) + 4307 1964 842E mov r8,r20 + 4308 1966 912C mov r9,__zero_reg__ + 4309 .L361: + 4310 1968 01E0 ldi r16,lo8(1) + 4311 196a 00C0 rjmp .L309 + 4312 .LVL351: + 4313 .L307: + 4314 196c 00E0 ldi r16,lo8(0) + 4315 .L309: + 4316 .LM444: + 4317 196e FFEF ldi r31,lo8(-1) + 4318 1970 AF16 cp r10,r31 + 4319 1972 FFEF ldi r31,hi8(-1) + 4320 1974 BF06 cpc r11,r31 + 4321 1976 01F4 brne .L310 + 4322 1978 E114 cp r14,__zero_reg__ + 4323 197a F104 cpc r15,__zero_reg__ + 4324 197c 01F4 brne .L310 + 4325 .LM445: + 4326 197e 0E94 0000 call rand + 4327 .LVL352: + 4328 1982 63E0 ldi r22,lo8(3) + 4329 1984 70E0 ldi r23,hi8(3) + 4330 1986 0E94 0000 call __divmodhi4 + 4331 198a 0197 sbiw r24,1 + 4332 198c 01F0 breq .L311 + 4333 198e AA24 clr r10 + 4334 1990 BB24 clr r11 + 4335 1992 00C0 rjmp .L362 + 4336 .L311: + 4337 1994 31E0 ldi r19,lo8(1) + 4338 1996 A32E mov r10,r19 + 4339 1998 B12C mov r11,__zero_reg__ + 4340 .L362: + 4341 199a 3324 clr r3 + 4342 199c 3394 inc r3 + 4343 199e 00C0 rjmp .L312 + 4344 .LVL353: + 4345 .L310: + 4346 19a0 3324 clr r3 + 4347 .L312: + 4348 .LM446: + 4349 19a2 21E0 ldi r18,lo8(1) + 4350 19a4 C216 cp r12,r18 + 4351 19a6 D104 cpc r13,__zero_reg__ + 4352 19a8 01F4 brne .L313 + 4353 19aa 37E0 ldi r19,lo8(7) + 4354 19ac 4316 cp r4,r19 + 4355 19ae 5104 cpc r5,__zero_reg__ + 4356 19b0 01F4 brne .L313 + 4357 .LM447: + 4358 19b2 0E94 0000 call rand + 4359 .LVL354: + 4360 19b6 63E0 ldi r22,lo8(3) + 4361 19b8 70E0 ldi r23,hi8(3) + 4362 19ba 0E94 0000 call __divmodhi4 + 4363 19be 0197 sbiw r24,1 + 4364 19c0 01F0 breq .L314 + 4365 19c2 CC24 clr r12 + 4366 19c4 DD24 clr r13 + 4367 19c6 00C0 rjmp .L363 + 4368 .L314: + 4369 19c8 CC24 clr r12 + 4370 19ca CA94 dec r12 + 4371 19cc DC2C mov r13,r12 + 4372 .L363: + 4373 19ce 11E0 ldi r17,lo8(1) + 4374 .LVL355: + 4375 .L313: + 4376 .LM448: + 4377 19d0 81E0 ldi r24,lo8(1) + 4378 19d2 8816 cp r8,r24 + 4379 19d4 9104 cpc r9,__zero_reg__ + 4380 .LVL356: + 4381 19d6 01F4 brne .L315 + 4382 19d8 97E0 ldi r25,lo8(7) + 4383 19da 6916 cp r6,r25 + 4384 19dc 7104 cpc r7,__zero_reg__ + 4385 19de 01F4 brne .L315 + 4386 .LM449: + 4387 19e0 0E94 0000 call rand + 4388 19e4 63E0 ldi r22,lo8(3) + 4389 19e6 70E0 ldi r23,hi8(3) + 4390 19e8 0E94 0000 call __divmodhi4 + 4391 19ec 0197 sbiw r24,1 + 4392 19ee 01F0 breq .L316 + 4393 19f0 8824 clr r8 + 4394 19f2 9924 clr r9 + 4395 19f4 00C0 rjmp .L364 + 4396 .L316: + 4397 19f6 8824 clr r8 + 4398 19f8 8A94 dec r8 + 4399 19fa 982C mov r9,r8 + 4400 .L364: + 4401 19fc 01E0 ldi r16,lo8(1) + 4402 .L315: + 4403 .LM450: + 4404 19fe E1E0 ldi r30,lo8(1) + 4405 1a00 AE16 cp r10,r30 + 4406 1a02 B104 cpc r11,__zero_reg__ + 4407 1a04 01F4 brne .L317 + 4408 1a06 F7E0 ldi r31,lo8(7) + 4409 1a08 EF16 cp r14,r31 + 4410 1a0a F104 cpc r15,__zero_reg__ + 4411 1a0c 01F4 brne .L317 + 4412 .LM451: + 4413 1a0e 0E94 0000 call rand + 4414 1a12 63E0 ldi r22,lo8(3) + 4415 1a14 70E0 ldi r23,hi8(3) + 4416 1a16 0E94 0000 call __divmodhi4 + 4417 1a1a 0197 sbiw r24,1 + 4418 1a1c 01F0 breq .L318 + 4419 1a1e AA24 clr r10 + 4420 1a20 BB24 clr r11 + 4421 1a22 00C0 rjmp .L365 + 4422 .L318: + 4423 1a24 AA24 clr r10 + 4424 1a26 AA94 dec r10 + 4425 1a28 BA2C mov r11,r10 + 4426 .L365: + 4427 1a2a 3324 clr r3 + 4428 1a2c 3394 inc r3 + 4429 .L317: + 4430 .LM452: + 4431 1a2e 1123 tst r17 + 4432 1a30 01F0 breq .L319 + 4433 .LM453: + 4434 1a32 8114 cp r8,__zero_reg__ + 4435 1a34 9104 cpc r9,__zero_reg__ + 4436 1a36 01F4 brne .L320 + 4437 .LM454: + 4438 1a38 27E0 ldi r18,lo8(7) + 4439 1a3a 6216 cp r6,r18 + 4440 1a3c 7104 cpc r7,__zero_reg__ + 4441 1a3e 01F0 breq .L321 + 4442 .LM455: + 4443 1a40 6114 cp r6,__zero_reg__ + 4444 1a42 7104 cpc r7,__zero_reg__ + 4445 1a44 01F0 breq .L322 + 4446 .LM456: + 4447 1a46 0E94 0000 call rand + 4448 1a4a 80FD sbrc r24,0 + 4449 1a4c 00C0 rjmp .L322 + 4450 .L321: + 4451 1a4e 8824 clr r8 + 4452 1a50 8A94 dec r8 + 4453 1a52 982C mov r9,r8 + 4454 1a54 00C0 rjmp .L320 + 4455 .L322: + 4456 1a56 21E0 ldi r18,lo8(1) + 4457 1a58 822E mov r8,r18 + 4458 1a5a 912C mov r9,__zero_reg__ + 4459 .L320: + 4460 .LM457: + 4461 1a5c A114 cp r10,__zero_reg__ + 4462 1a5e B104 cpc r11,__zero_reg__ + 4463 1a60 01F4 brne .L319 + 4464 .LM458: + 4465 1a62 37E0 ldi r19,lo8(7) + 4466 1a64 E316 cp r14,r19 + 4467 1a66 F104 cpc r15,__zero_reg__ + 4468 1a68 01F0 breq .L323 + 4469 .LM459: + 4470 1a6a E114 cp r14,__zero_reg__ + 4471 1a6c F104 cpc r15,__zero_reg__ + 4472 1a6e 01F0 breq .L324 + 4473 .LM460: + 4474 1a70 0E94 0000 call rand + 4475 1a74 80FD sbrc r24,0 + 4476 1a76 00C0 rjmp .L324 + 4477 .L323: + 4478 1a78 AA24 clr r10 + 4479 1a7a AA94 dec r10 + 4480 1a7c BA2C mov r11,r10 + 4481 1a7e 00C0 rjmp .L319 + 4482 .L324: + 4483 1a80 91E0 ldi r25,lo8(1) + 4484 1a82 A92E mov r10,r25 + 4485 1a84 B12C mov r11,__zero_reg__ + 4486 .L319: + 4487 .LM461: + 4488 1a86 0023 tst r16 + 4489 1a88 01F0 breq .L325 + 4490 .LM462: + 4491 1a8a C114 cp r12,__zero_reg__ + 4492 1a8c D104 cpc r13,__zero_reg__ + 4493 1a8e 01F4 brne .L326 + 4494 .LM463: + 4495 1a90 87E0 ldi r24,lo8(7) + 4496 1a92 4816 cp r4,r24 + 4497 1a94 5104 cpc r5,__zero_reg__ + 4498 1a96 01F0 breq .L327 + 4499 .LM464: + 4500 1a98 4114 cp r4,__zero_reg__ + 4501 1a9a 5104 cpc r5,__zero_reg__ + 4502 1a9c 01F0 breq .L328 + 4503 .LM465: + 4504 1a9e 0E94 0000 call rand + 4505 1aa2 80FD sbrc r24,0 + 4506 1aa4 00C0 rjmp .L328 + 4507 .L327: + 4508 1aa6 CC24 clr r12 + 4509 1aa8 CA94 dec r12 + 4510 1aaa DC2C mov r13,r12 + 4511 1aac 00C0 rjmp .L326 + 4512 .L328: + 4513 1aae 81E0 ldi r24,lo8(1) + 4514 1ab0 C82E mov r12,r24 + 4515 1ab2 D12C mov r13,__zero_reg__ + 4516 .L326: + 4517 .LM466: + 4518 1ab4 A114 cp r10,__zero_reg__ + 4519 1ab6 B104 cpc r11,__zero_reg__ + 4520 1ab8 01F4 brne .L325 + 4521 .LM467: + 4522 1aba 93E0 ldi r25,lo8(3) + 4523 1abc E916 cp r14,r25 + 4524 1abe F104 cpc r15,__zero_reg__ + 4525 1ac0 01F0 breq .L329 + 4526 .LM468: + 4527 1ac2 E114 cp r14,__zero_reg__ + 4528 1ac4 F104 cpc r15,__zero_reg__ + 4529 1ac6 01F0 breq .L330 + 4530 .LM469: + 4531 1ac8 0E94 0000 call rand + 4532 1acc 80FD sbrc r24,0 + 4533 1ace 00C0 rjmp .L330 + 4534 .L329: + 4535 1ad0 AA24 clr r10 + 4536 1ad2 AA94 dec r10 + 4537 1ad4 BA2C mov r11,r10 + 4538 1ad6 00C0 rjmp .L325 + 4539 .L330: + 4540 1ad8 01E0 ldi r16,lo8(1) + 4541 1ada A02E mov r10,r16 + 4542 1adc B12C mov r11,__zero_reg__ + 4543 .LVL357: + 4544 .L325: + 4545 .LM470: + 4546 1ade 3320 tst r3 + 4547 1ae0 01F0 breq .L331 + 4548 .LM471: + 4549 1ae2 8114 cp r8,__zero_reg__ + 4550 1ae4 9104 cpc r9,__zero_reg__ + 4551 1ae6 01F4 brne .L332 + 4552 .LM472: + 4553 1ae8 E7E0 ldi r30,lo8(7) + 4554 1aea 6E16 cp r6,r30 + 4555 1aec 7104 cpc r7,__zero_reg__ + 4556 1aee 01F0 breq .L333 + 4557 .LM473: + 4558 1af0 6114 cp r6,__zero_reg__ + 4559 1af2 7104 cpc r7,__zero_reg__ + 4560 1af4 01F0 breq .L334 + 4561 .LM474: + 4562 1af6 0E94 0000 call rand + 4563 1afa 80FD sbrc r24,0 + 4564 1afc 00C0 rjmp .L334 + 4565 .L333: + 4566 1afe 8824 clr r8 + 4567 1b00 8A94 dec r8 + 4568 1b02 982C mov r9,r8 + 4569 1b04 00C0 rjmp .L332 + 4570 .L334: + 4571 1b06 11E0 ldi r17,lo8(1) + 4572 1b08 812E mov r8,r17 + 4573 1b0a 912C mov r9,__zero_reg__ + 4574 .LVL358: + 4575 .L332: + 4576 .LM475: + 4577 1b0c C114 cp r12,__zero_reg__ + 4578 1b0e D104 cpc r13,__zero_reg__ + 4579 1b10 01F4 brne .L331 + 4580 .LM476: + 4581 1b12 F7E0 ldi r31,lo8(7) + 4582 1b14 4F16 cp r4,r31 + 4583 1b16 5104 cpc r5,__zero_reg__ + 4584 1b18 01F4 brne .L335 + 4585 1b1a CC24 clr r12 + 4586 1b1c CA94 dec r12 + 4587 1b1e DC2C mov r13,r12 + 4588 1b20 00C0 rjmp .L336 + 4589 .L335: + 4590 .LM477: + 4591 1b22 4114 cp r4,__zero_reg__ + 4592 1b24 5104 cpc r5,__zero_reg__ + 4593 1b26 01F4 brne .L337 + 4594 1b28 B1E0 ldi r27,lo8(1) + 4595 1b2a CB2E mov r12,r27 + 4596 1b2c D12C mov r13,__zero_reg__ + 4597 1b2e 00C0 rjmp .L338 + 4598 .L337: + 4599 .LM478: + 4600 1b30 0E94 0000 call rand + 4601 1b34 80FF sbrs r24,0 + 4602 1b36 00C0 rjmp .L339 + 4603 1b38 A1E0 ldi r26,lo8(1) + 4604 1b3a CA2E mov r12,r26 + 4605 1b3c D12C mov r13,__zero_reg__ + 4606 1b3e 00C0 rjmp .L340 + 4607 .L331: + 4608 .LM479: + 4609 1b40 4114 cp r4,__zero_reg__ + 4610 1b42 5104 cpc r5,__zero_reg__ + 4611 1b44 01F4 brne .L341 + 4612 .L338: + 4613 1b46 6114 cp r6,__zero_reg__ + 4614 1b48 7104 cpc r7,__zero_reg__ + 4615 1b4a 01F4 brne .L342 + 4616 1b4c E114 cp r14,__zero_reg__ + 4617 1b4e F104 cpc r15,__zero_reg__ + 4618 1b50 01F0 breq .L343 + 4619 1b52 27E0 ldi r18,lo8(7) + 4620 1b54 E216 cp r14,r18 + 4621 1b56 F104 cpc r15,__zero_reg__ + 4622 1b58 01F4 brne .L341 + 4623 1b5a 00C0 rjmp .L343 + 4624 .L342: + 4625 1b5c 37E0 ldi r19,lo8(7) + 4626 1b5e 6316 cp r6,r19 + 4627 1b60 7104 cpc r7,__zero_reg__ + 4628 1b62 01F4 brne .L341 + 4629 1b64 E114 cp r14,__zero_reg__ + 4630 1b66 F104 cpc r15,__zero_reg__ + 4631 1b68 01F0 breq .L343 + 4632 1b6a 87E0 ldi r24,lo8(7) + 4633 1b6c E816 cp r14,r24 + 4634 1b6e F104 cpc r15,__zero_reg__ + 4635 1b70 01F0 breq .L343 + 4636 .L341: + 4637 1b72 97E0 ldi r25,lo8(7) + 4638 1b74 4916 cp r4,r25 + 4639 1b76 5104 cpc r5,__zero_reg__ + 4640 1b78 01F4 brne .L340 + 4641 .L336: + 4642 1b7a 6114 cp r6,__zero_reg__ + 4643 1b7c 7104 cpc r7,__zero_reg__ + 4644 1b7e 01F4 brne .L344 + 4645 1b80 E114 cp r14,__zero_reg__ + 4646 1b82 F104 cpc r15,__zero_reg__ + 4647 1b84 01F0 breq .L343 + 4648 1b86 E7E0 ldi r30,lo8(7) + 4649 1b88 EE16 cp r14,r30 + 4650 1b8a F104 cpc r15,__zero_reg__ + 4651 1b8c 01F4 brne .L340 + 4652 1b8e 00C0 rjmp .L343 + 4653 .L344: + 4654 1b90 F7E0 ldi r31,lo8(7) + 4655 1b92 6F16 cp r6,r31 + 4656 1b94 7104 cpc r7,__zero_reg__ + 4657 1b96 01F4 brne .L340 + 4658 1b98 E114 cp r14,__zero_reg__ + 4659 1b9a F104 cpc r15,__zero_reg__ + 4660 1b9c 01F0 breq .L343 + 4661 1b9e 27E0 ldi r18,lo8(7) + 4662 1ba0 E216 cp r14,r18 + 4663 1ba2 F104 cpc r15,__zero_reg__ + 4664 1ba4 01F4 brne .L340 + 4665 .L343: + 4666 .LM480: + 4667 1ba6 0E94 0000 call rand + 4668 1baa 63E0 ldi r22,lo8(3) + 4669 1bac 70E0 ldi r23,hi8(3) + 4670 1bae 0E94 0000 call __divmodhi4 + 4671 .LM481: + 4672 1bb2 0097 sbiw r24,0 + 4673 .LVL359: + 4674 1bb4 01F4 brne .L345 + 4675 1bb6 CC24 clr r12 + 4676 1bb8 DD24 clr r13 + 4677 1bba 00C0 rjmp .L340 + 4678 .L345: + 4679 .LM482: + 4680 1bbc 8130 cpi r24,1 + 4681 1bbe 9105 cpc r25,__zero_reg__ + 4682 1bc0 01F4 brne .L346 + 4683 1bc2 8824 clr r8 + 4684 1bc4 9924 clr r9 + 4685 1bc6 00C0 rjmp .L340 + 4686 .L346: + 4687 .LM483: + 4688 1bc8 8230 cpi r24,2 + 4689 1bca 9105 cpc r25,__zero_reg__ + 4690 1bcc 01F4 brne .L340 + 4691 1bce AA24 clr r10 + 4692 1bd0 BB24 clr r11 + 4693 .L340: + 4694 .LM484: + 4695 1bd2 4C0C add r4,r12 + 4696 1bd4 5D1C adc r5,r13 + 4697 .LM485: + 4698 1bd6 680C add r6,r8 + 4699 1bd8 791C adc r7,r9 + 4700 .LM486: + 4701 1bda EA0C add r14,r10 + 4702 1bdc FB1C adc r15,r11 + 4703 .LM487: + 4704 1bde 31E0 ldi r19,lo8(1) + 4705 1be0 2316 cp r2,r19 + 4706 1be2 01F4 brne .L347 + 4707 .LM488: + 4708 1be4 C201 movw r24,r4 + 4709 .LVL360: + 4710 1be6 B301 movw r22,r6 + 4711 1be8 A701 movw r20,r14 + 4712 1bea 0E94 0000 call setvoxel + 4713 .LM489: + 4714 1bee 8BA9 ldd r24,Y+51 + 4715 1bf0 9CA9 ldd r25,Y+52 + 4716 1bf2 0E94 0000 call delay_ms + 4717 .LM490: + 4718 1bf6 C201 movw r24,r4 + 4719 1bf8 B301 movw r22,r6 + 4720 1bfa A701 movw r20,r14 + 4721 1bfc 0E94 0000 call clrvoxel + 4722 1c00 00C0 rjmp .L348 + 4723 .LVL361: + 4724 .L347: + 4725 .LM491: + 4726 1c02 82E0 ldi r24,lo8(2) + 4727 .LVL362: + 4728 1c04 2816 cp r2,r24 + 4729 1c06 01F4 brne .L349 + 4730 .LM492: + 4731 1c08 C201 movw r24,r4 + 4732 1c0a B301 movw r22,r6 + 4733 1c0c A701 movw r20,r14 + 4734 1c0e 0E94 0000 call flpvoxel + 4735 .LM493: + 4736 1c12 8BA9 ldd r24,Y+51 + 4737 1c14 9CA9 ldd r25,Y+52 + 4738 1c16 0E94 0000 call delay_ms + 4739 1c1a 00C0 rjmp .L348 + 4740 .L349: + 4741 .LM494: + 4742 1c1c 93E0 ldi r25,lo8(3) + 4743 1c1e 2916 cp r2,r25 + 4744 1c20 01F0 breq .+2 + 4745 1c22 00C0 rjmp .L348 + 4746 1c24 FE01 movw r30,r28 + 4747 1c26 B596 adiw r30,37 + 4748 .L350: + 4749 .LM495: + 4750 1c28 8081 ld r24,Z + 4751 1c2a 9181 ldd r25,Z+1 + 4752 1c2c 9783 std Z+7,r25 + 4753 1c2e 8683 std Z+6,r24 + 4754 .LM496: + 4755 1c30 8281 ldd r24,Z+2 + 4756 1c32 9381 ldd r25,Z+3 + 4757 1c34 9187 std Z+9,r25 + 4758 1c36 8087 std Z+8,r24 + 4759 .LM497: + 4760 1c38 8481 ldd r24,Z+4 + 4761 1c3a 9581 ldd r25,Z+5 + 4762 1c3c 9387 std Z+11,r25 + 4763 1c3e 8287 std Z+10,r24 + 4764 1c40 3697 sbiw r30,6 + 4765 .LM498: + 4766 1c42 2FA9 ldd r18,Y+55 + 4767 1c44 38AD ldd r19,Y+56 + 4768 1c46 E217 cp r30,r18 + 4769 1c48 F307 cpc r31,r19 + 4770 1c4a 01F4 brne .L350 + 4771 .LM499: + 4772 1c4c 5A82 std Y+2,r5 + 4773 1c4e 4982 std Y+1,r4 + 4774 .LM500: + 4775 1c50 7C82 std Y+4,r7 + 4776 1c52 6B82 std Y+3,r6 + 4777 .LM501: + 4778 1c54 FE82 std Y+6,r15 + 4779 1c56 ED82 std Y+5,r14 + 4780 1c58 8E01 movw r16,r28 + 4781 .LVL363: + 4782 1c5a 0F5F subi r16,lo8(-(1)) + 4783 1c5c 1F4F sbci r17,hi8(-(1)) + 4784 .L351: + 4785 .LM502: + 4786 1c5e F801 movw r30,r16 + 4787 1c60 6281 ldd r22,Z+2 + 4788 1c62 7381 ldd r23,Z+3 + 4789 1c64 4481 ldd r20,Z+4 + 4790 1c66 5581 ldd r21,Z+5 + 4791 1c68 8081 ld r24,Z + 4792 1c6a 9181 ldd r25,Z+1 + 4793 1c6c 0E94 0000 call setvoxel + 4794 1c70 0A5F subi r16,lo8(-(6)) + 4795 1c72 1F4F sbci r17,hi8(-(6)) + 4796 .LM503: + 4797 1c74 2DA9 ldd r18,Y+53 + 4798 1c76 3EA9 ldd r19,Y+54 + 4799 1c78 0217 cp r16,r18 + 4800 1c7a 1307 cpc r17,r19 + 4801 1c7c 01F4 brne .L351 + 4802 .LM504: + 4803 1c7e 8BA9 ldd r24,Y+51 + 4804 1c80 9CA9 ldd r25,Y+52 + 4805 1c82 0E94 0000 call delay_ms + 4806 1c86 8E01 movw r16,r28 + 4807 1c88 0F5F subi r16,lo8(-(1)) + 4808 1c8a 1F4F sbci r17,hi8(-(1)) + 4809 .L352: + 4810 .LM505: + 4811 1c8c F801 movw r30,r16 + 4812 1c8e 6281 ldd r22,Z+2 + 4813 1c90 7381 ldd r23,Z+3 + 4814 1c92 4481 ldd r20,Z+4 + 4815 1c94 5581 ldd r21,Z+5 + 4816 1c96 8081 ld r24,Z + 4817 1c98 9181 ldd r25,Z+1 + 4818 1c9a 0E94 0000 call clrvoxel + 4819 1c9e 0A5F subi r16,lo8(-(6)) + 4820 1ca0 1F4F sbci r17,hi8(-(6)) + 4821 .LM506: + 4822 1ca2 2DA9 ldd r18,Y+53 + 4823 1ca4 3EA9 ldd r19,Y+54 + 4824 1ca6 0217 cp r16,r18 + 4825 1ca8 1307 cpc r17,r19 + 4826 1caa 01F4 brne .L352 + 4827 .LVL364: + 4828 .L348: + 4829 .LM507: + 4830 1cac 89A9 ldd r24,Y+49 + 4831 1cae 9AA9 ldd r25,Y+50 + 4832 1cb0 0197 sbiw r24,1 + 4833 1cb2 9AAB std Y+50,r25 + 4834 1cb4 89AB std Y+49,r24 + 4835 .LVL365: + 4836 .L300: + 4837 .LM508: + 4838 1cb6 E9A9 ldd r30,Y+49 + 4839 1cb8 FAA9 ldd r31,Y+50 + 4840 1cba EF2B or r30,r31 + 4841 1cbc 01F0 breq .+2 + 4842 1cbe 00C0 rjmp .L353 + 4843 1cc0 00C0 rjmp .L366 + 4844 .L339: + 4845 .LM509: + 4846 1cc2 CC24 clr r12 + 4847 1cc4 CA94 dec r12 + 4848 1cc6 DC2C mov r13,r12 + 4849 1cc8 00C0 rjmp .L340 + 4850 .L366: + 4851 /* epilogue start */ + 4852 1cca E896 adiw r28,56 + 4853 1ccc 0FB6 in __tmp_reg__,__SREG__ + 4854 1cce F894 cli + 4855 1cd0 DEBF out __SP_H__,r29 + 4856 1cd2 0FBE out __SREG__,__tmp_reg__ + 4857 1cd4 CDBF out __SP_L__,r28 + 4858 1cd6 CF91 pop r28 + 4859 1cd8 DF91 pop r29 + 4860 1cda 1F91 pop r17 + 4861 .LVL366: + 4862 1cdc 0F91 pop r16 + 4863 .LVL367: + 4864 1cde FF90 pop r15 + 4865 1ce0 EF90 pop r14 + 4866 .LVL368: + 4867 1ce2 DF90 pop r13 + 4868 1ce4 CF90 pop r12 + 4869 .LVL369: + 4870 1ce6 BF90 pop r11 + 4871 1ce8 AF90 pop r10 + 4872 .LVL370: + 4873 1cea 9F90 pop r9 + 4874 1cec 8F90 pop r8 + 4875 .LVL371: + 4876 1cee 7F90 pop r7 + 4877 1cf0 6F90 pop r6 + 4878 .LVL372: + 4879 1cf2 5F90 pop r5 + 4880 1cf4 4F90 pop r4 + 4881 .LVL373: + 4882 1cf6 3F90 pop r3 + 4883 .LVL374: + 4884 1cf8 2F90 pop r2 + 4885 .LVL375: + 4886 1cfa 0895 ret + 4887 .LFE13: + 4889 .global sendplane_rand_z + 4891 sendplane_rand_z: + 4892 .LFB11: + 4893 .LM510: + 4894 .LVL376: + 4895 1cfc CF92 push r12 + 4896 1cfe DF92 push r13 + 4897 1d00 EF92 push r14 + 4898 1d02 FF92 push r15 + 4899 1d04 0F93 push r16 + 4900 1d06 1F93 push r17 + 4901 1d08 CF93 push r28 + 4902 1d0a DF93 push r29 + 4903 /* prologue: function */ + 4904 /* frame size = 0 */ + 4905 1d0c F82E mov r15,r24 + 4906 1d0e 6B01 movw r12,r22 + 4907 1d10 EA01 movw r28,r20 + 4908 .LM511: + 4909 1d12 80E0 ldi r24,lo8(0) + 4910 .LVL377: + 4911 1d14 0E94 0000 call fill + 4912 .LVL378: + 4913 .LM512: + 4914 1d18 8F2D mov r24,r15 + 4915 1d1a 90E0 ldi r25,lo8(0) + 4916 1d1c 0E94 0000 call setplane_z + 4917 1d20 10E1 ldi r17,lo8(16) + 4918 .LVL379: + 4919 .L372: + 4920 .LM513: + 4921 1d22 0E94 0000 call rand + 4922 1d26 64E0 ldi r22,lo8(4) + 4923 1d28 70E0 ldi r23,hi8(4) + 4924 1d2a 0E94 0000 call __divmodhi4 + 4925 1d2e E82E mov r14,r24 + 4926 .LM514: + 4927 1d30 0E94 0000 call rand + 4928 1d34 64E0 ldi r22,lo8(4) + 4929 1d36 70E0 ldi r23,hi8(4) + 4930 1d38 0E94 0000 call __divmodhi4 + 4931 1d3c 082F mov r16,r24 + 4932 .LM515: + 4933 1d3e 8E2D mov r24,r14 + 4934 1d40 90E0 ldi r25,lo8(0) + 4935 1d42 602F mov r22,r16 + 4936 1d44 70E0 ldi r23,lo8(0) + 4937 1d46 4F2D mov r20,r15 + 4938 1d48 50E0 ldi r21,lo8(0) + 4939 1d4a 0E94 0000 call getvoxel + 4940 1d4e 8823 tst r24 + 4941 1d50 01F0 breq .L372 + 4942 .LM516: + 4943 1d52 8E2D mov r24,r14 + 4944 1d54 602F mov r22,r16 + 4945 1d56 4F2D mov r20,r15 + 4946 1d58 9601 movw r18,r12 + 4947 1d5a 0E94 0000 call sendvoxel_z + 4948 .LM517: + 4949 1d5e CE01 movw r24,r28 + 4950 1d60 0E94 0000 call delay_ms + 4951 .LM518: + 4952 1d64 1150 subi r17,lo8(-(-1)) + 4953 .LM519: + 4954 1d66 01F4 brne .L372 + 4955 /* epilogue start */ + 4956 .LM520: + 4957 1d68 DF91 pop r29 + 4958 1d6a CF91 pop r28 + 4959 .LVL380: + 4960 1d6c 1F91 pop r17 + 4961 .LVL381: + 4962 1d6e 0F91 pop r16 + 4963 1d70 FF90 pop r15 + 4964 .LVL382: + 4965 1d72 EF90 pop r14 + 4966 1d74 DF90 pop r13 + 4967 1d76 CF90 pop r12 + 4968 .LVL383: + 4969 1d78 0895 ret + 4970 .LFE11: + 4972 .global effect_box_woopwoop + 4974 effect_box_woopwoop: + 4975 .LFB9: + 4976 .LM521: + 4977 .LVL384: + 4978 1d7a AF92 push r10 + 4979 1d7c BF92 push r11 + 4980 1d7e CF92 push r12 + 4981 1d80 DF92 push r13 + 4982 1d82 EF92 push r14 + 4983 1d84 FF92 push r15 + 4984 1d86 0F93 push r16 + 4985 1d88 1F93 push r17 + 4986 1d8a CF93 push r28 + 4987 1d8c DF93 push r29 + 4988 /* prologue: function */ + 4989 /* frame size = 0 */ + 4990 1d8e 6C01 movw r12,r24 + 4991 1d90 8B01 movw r16,r22 + 4992 .LM522: + 4993 1d92 80E0 ldi r24,lo8(0) + 4994 .LVL385: + 4995 1d94 0E94 0000 call fill + 4996 .LVL386: + 4997 .LM523: + 4998 1d98 0130 cpi r16,1 + 4999 1d9a 1105 cpc r17,__zero_reg__ + 5000 1d9c 01F4 brne .L374 + 5001 1d9e C3E0 ldi r28,lo8(3) + 5002 1da0 D0E0 ldi r29,hi8(3) + 5003 1da2 A7E0 ldi r26,lo8(7) + 5004 1da4 AA2E mov r10,r26 + 5005 1da6 B12C mov r11,__zero_reg__ + 5006 .L375: + 5007 1da8 A501 movw r20,r10 + 5008 1daa 4C1B sub r20,r28 + 5009 1dac 5D0B sbc r21,r29 + 5010 .LM524: + 5011 1dae CA01 movw r24,r20 + 5012 1db0 BA01 movw r22,r20 + 5013 1db2 9E01 movw r18,r28 + 5014 1db4 8E01 movw r16,r28 + 5015 .LVL387: + 5016 1db6 7E01 movw r14,r28 + 5017 1db8 0E94 0000 call box_wireframe + 5018 .LM525: + 5019 1dbc C601 movw r24,r12 + 5020 1dbe 0E94 0000 call delay_ms + 5021 .LM526: + 5022 1dc2 80E0 ldi r24,lo8(0) + 5023 1dc4 0E94 0000 call fill + 5024 1dc8 2197 sbiw r28,1 + 5025 .LM527: + 5026 1dca 8FEF ldi r24,hi8(-1) + 5027 1dcc CF3F cpi r28,lo8(-1) + 5028 1dce D807 cpc r29,r24 + 5029 1dd0 01F4 brne .L375 + 5030 1dd2 00C0 rjmp .L378 + 5031 .LVL388: + 5032 .L374: + 5033 1dd4 C0E0 ldi r28,lo8(0) + 5034 1dd6 D0E0 ldi r29,hi8(0) + 5035 1dd8 F7E0 ldi r31,lo8(7) + 5036 1dda AF2E mov r10,r31 + 5037 1ddc B12C mov r11,__zero_reg__ + 5038 .L377: + 5039 1dde A501 movw r20,r10 + 5040 1de0 4C1B sub r20,r28 + 5041 1de2 5D0B sbc r21,r29 + 5042 .LM528: + 5043 1de4 CA01 movw r24,r20 + 5044 1de6 BA01 movw r22,r20 + 5045 1de8 9E01 movw r18,r28 + 5046 1dea 8E01 movw r16,r28 + 5047 .LVL389: + 5048 1dec 7E01 movw r14,r28 + 5049 1dee 0E94 0000 call box_wireframe + 5050 .LM529: + 5051 1df2 C601 movw r24,r12 + 5052 1df4 0E94 0000 call delay_ms + 5053 .LM530: + 5054 1df8 80E0 ldi r24,lo8(0) + 5055 1dfa 0E94 0000 call fill + 5056 1dfe 2196 adiw r28,1 + 5057 .LM531: + 5058 1e00 C430 cpi r28,4 + 5059 1e02 D105 cpc r29,__zero_reg__ + 5060 1e04 01F4 brne .L377 + 5061 .L378: + 5062 /* epilogue start */ + 5063 .LM532: + 5064 1e06 DF91 pop r29 + 5065 1e08 CF91 pop r28 + 5066 1e0a 1F91 pop r17 + 5067 1e0c 0F91 pop r16 + 5068 1e0e FF90 pop r15 + 5069 1e10 EF90 pop r14 + 5070 1e12 DF90 pop r13 + 5071 1e14 CF90 pop r12 + 5072 .LVL390: + 5073 1e16 BF90 pop r11 + 5074 1e18 AF90 pop r10 + 5075 1e1a 0895 ret + 5076 .LFE9: + 5078 .global effect_box_shrink_grow + 5080 effect_box_shrink_grow: + 5081 .LFB8: + 5082 .LM533: + 5083 .LVL391: + 5084 1e1c 2F92 push r2 + 5085 1e1e 3F92 push r3 + 5086 1e20 4F92 push r4 + 5087 1e22 5F92 push r5 + 5088 1e24 6F92 push r6 + 5089 1e26 7F92 push r7 + 5090 1e28 8F92 push r8 + 5091 1e2a 9F92 push r9 + 5092 1e2c AF92 push r10 + 5093 1e2e BF92 push r11 + 5094 1e30 CF92 push r12 + 5095 1e32 DF92 push r13 + 5096 1e34 EF92 push r14 + 5097 1e36 FF92 push r15 + 5098 1e38 0F93 push r16 + 5099 1e3a 1F93 push r17 + 5100 1e3c DF93 push r29 + 5101 1e3e CF93 push r28 + 5102 1e40 CDB7 in r28,__SP_L__ + 5103 1e42 DEB7 in r29,__SP_H__ + 5104 1e44 2C97 sbiw r28,12 + 5105 1e46 0FB6 in __tmp_reg__,__SREG__ + 5106 1e48 F894 cli + 5107 1e4a DEBF out __SP_H__,r29 + 5108 1e4c 0FBE out __SREG__,__tmp_reg__ + 5109 1e4e CDBF out __SP_L__,r28 + 5110 /* prologue: function */ + 5111 /* frame size = 12 */ + 5112 1e50 9C83 std Y+4,r25 + 5113 1e52 8B83 std Y+3,r24 + 5114 1e54 7E83 std Y+6,r23 + 5115 1e56 6D83 std Y+5,r22 + 5116 1e58 5887 std Y+8,r21 + 5117 1e5a 4F83 std Y+7,r20 + 5118 1e5c 3A87 std Y+10,r19 + 5119 1e5e 2987 std Y+9,r18 + 5120 .LM534: + 5121 1e60 1A82 std Y+2,__zero_reg__ + 5122 1e62 1982 std Y+1,__zero_reg__ + 5123 .LVL392: + 5124 1e64 8824 clr r8 + 5125 1e66 9924 clr r9 + 5126 .LVL393: + 5127 1e68 AA24 clr r10 + 5128 1e6a BB24 clr r11 + 5129 .LVL394: + 5130 1e6c CC24 clr r12 + 5131 1e6e DD24 clr r13 + 5132 .LVL395: + 5133 1e70 2224 clr r2 + 5134 1e72 3324 clr r3 + 5135 .LVL396: + 5136 1e74 4424 clr r4 + 5137 1e76 5524 clr r5 + 5138 .LVL397: + 5139 1e78 6624 clr r6 + 5140 1e7a 7724 clr r7 + 5141 .LVL398: + 5142 1e7c 00C0 rjmp .L382 + 5143 .LVL399: + 5144 .L409: + 5145 .LM535: + 5146 1e7e 1C86 std Y+12,__zero_reg__ + 5147 1e80 1B86 std Y+11,__zero_reg__ + 5148 .L395: + 5149 1e82 87E0 ldi r24,lo8(7) + 5150 1e84 90E0 ldi r25,hi8(7) + 5151 .LVL400: + 5152 1e86 2B85 ldd r18,Y+11 + 5153 1e88 3C85 ldd r19,Y+12 + 5154 1e8a 821B sub r24,r18 + 5155 1e8c 930B sbc r25,r19 + 5156 .LM536: + 5157 1e8e EF81 ldd r30,Y+7 + 5158 1e90 F885 ldd r31,Y+8 + 5159 1e92 3097 sbiw r30,0 + 5160 1e94 01F4 brne .+2 + 5161 1e96 00C0 rjmp .L383 + 5162 .LM537: + 5163 1e98 3197 sbiw r30,1 + 5164 1e9a 01F4 brne .L384 + 5165 1e9c 6901 movw r12,r18 + 5166 1e9e 47E0 ldi r20,lo8(7) + 5167 1ea0 642E mov r6,r20 + 5168 1ea2 712C mov r7,__zero_reg__ + 5169 1ea4 00C0 rjmp .L385 + 5170 .LVL401: + 5171 .L384: + 5172 .LM538: + 5173 1ea6 2F81 ldd r18,Y+7 + 5174 1ea8 3885 ldd r19,Y+8 + 5175 1eaa 2230 cpi r18,2 + 5176 1eac 3105 cpc r19,__zero_reg__ + 5177 1eae 01F4 brne .L386 + 5178 1eb0 4B84 ldd r4,Y+11 + 5179 1eb2 5C84 ldd r5,Y+12 + 5180 1eb4 1C01 movw r2,r24 + 5181 1eb6 3C01 movw r6,r24 + 5182 1eb8 8824 clr r8 + 5183 1eba 9924 clr r9 + 5184 1ebc 37E0 ldi r19,lo8(7) + 5185 1ebe A32E mov r10,r19 + 5186 1ec0 B12C mov r11,__zero_reg__ + 5187 1ec2 CC24 clr r12 + 5188 1ec4 DD24 clr r13 + 5189 1ec6 00C0 rjmp .L387 + 5190 .LVL402: + 5191 .L386: + 5192 .LM539: + 5193 1ec8 EF81 ldd r30,Y+7 + 5194 1eca F885 ldd r31,Y+8 + 5195 1ecc 3397 sbiw r30,3 + 5196 1ece 01F4 brne .L388 + 5197 1ed0 4B84 ldd r4,Y+11 + 5198 1ed2 5C84 ldd r5,Y+12 + 5199 1ed4 1C01 movw r2,r24 + 5200 1ed6 3201 movw r6,r4 + 5201 1ed8 8824 clr r8 + 5202 1eda 9924 clr r9 + 5203 1edc 27E0 ldi r18,lo8(7) + 5204 1ede A22E mov r10,r18 + 5205 1ee0 B12C mov r11,__zero_reg__ + 5206 1ee2 97E0 ldi r25,lo8(7) + 5207 1ee4 C92E mov r12,r25 + 5208 1ee6 D12C mov r13,__zero_reg__ + 5209 1ee8 00C0 rjmp .L389 + 5210 .LVL403: + 5211 .L388: + 5212 .LM540: + 5213 1eea 2F81 ldd r18,Y+7 + 5214 1eec 3885 ldd r19,Y+8 + 5215 1eee 2430 cpi r18,4 + 5216 1ef0 3105 cpc r19,__zero_reg__ + 5217 1ef2 01F4 brne .L390 + 5218 1ef4 2B84 ldd r2,Y+11 + 5219 1ef6 3C84 ldd r3,Y+12 + 5220 1ef8 2C01 movw r4,r24 + 5221 1efa 3C01 movw r6,r24 + 5222 1efc 87E0 ldi r24,lo8(7) + 5223 1efe 882E mov r8,r24 + 5224 1f00 912C mov r9,__zero_reg__ + 5225 .LVL404: + 5226 1f02 AA24 clr r10 + 5227 1f04 BB24 clr r11 + 5228 1f06 00C0 rjmp .L415 + 5229 .LVL405: + 5230 .L390: + 5231 .LM541: + 5232 1f08 EF81 ldd r30,Y+7 + 5233 1f0a F885 ldd r31,Y+8 + 5234 1f0c 3597 sbiw r30,5 + 5235 1f0e 01F4 brne .L387 + 5236 1f10 2B84 ldd r2,Y+11 + 5237 1f12 3C84 ldd r3,Y+12 + 5238 1f14 2C01 movw r4,r24 + 5239 1f16 3101 movw r6,r2 + 5240 1f18 07E0 ldi r16,lo8(7) + 5241 1f1a 802E mov r8,r16 + 5242 1f1c 912C mov r9,__zero_reg__ + 5243 1f1e AA24 clr r10 + 5244 1f20 BB24 clr r11 + 5245 1f22 00C0 rjmp .L414 + 5246 .LVL406: + 5247 .L387: + 5248 .LM542: + 5249 1f24 2F81 ldd r18,Y+7 + 5250 1f26 3885 ldd r19,Y+8 + 5251 1f28 2630 cpi r18,6 + 5252 1f2a 3105 cpc r19,__zero_reg__ + 5253 1f2c 01F4 brne .L389 + 5254 1f2e 2B84 ldd r2,Y+11 + 5255 1f30 3C84 ldd r3,Y+12 + 5256 1f32 2101 movw r4,r2 + 5257 1f34 3C01 movw r6,r24 + 5258 1f36 17E0 ldi r17,lo8(7) + 5259 1f38 812E mov r8,r17 + 5260 1f3a 912C mov r9,__zero_reg__ + 5261 1f3c B7E0 ldi r27,lo8(7) + 5262 1f3e AB2E mov r10,r27 + 5263 1f40 B12C mov r11,__zero_reg__ + 5264 .L415: + 5265 1f42 CC24 clr r12 + 5266 1f44 DD24 clr r13 + 5267 1f46 00C0 rjmp .L391 + 5268 .LVL407: + 5269 .L389: + 5270 .LM543: + 5271 1f48 8F81 ldd r24,Y+7 + 5272 1f4a 9885 ldd r25,Y+8 + 5273 .LVL408: + 5274 1f4c 0797 sbiw r24,7 + 5275 1f4e 01F4 brne .L391 + 5276 1f50 2B84 ldd r2,Y+11 + 5277 1f52 3C84 ldd r3,Y+12 + 5278 1f54 2101 movw r4,r2 + 5279 1f56 3101 movw r6,r2 + 5280 1f58 A7E0 ldi r26,lo8(7) + 5281 1f5a 8A2E mov r8,r26 + 5282 1f5c 912C mov r9,__zero_reg__ + 5283 1f5e F7E0 ldi r31,lo8(7) + 5284 1f60 AF2E mov r10,r31 + 5285 1f62 B12C mov r11,__zero_reg__ + 5286 .LVL409: + 5287 .L414: + 5288 1f64 E7E0 ldi r30,lo8(7) + 5289 1f66 CE2E mov r12,r30 + 5290 1f68 D12C mov r13,__zero_reg__ + 5291 .L391: + 5292 .LM544: + 5293 1f6a ED81 ldd r30,Y+5 + 5294 1f6c FE81 ldd r31,Y+6 + 5295 1f6e 3397 sbiw r30,3 + 5296 1f70 01F4 brne .L392 + 5297 .LM545: + 5298 1f72 C401 movw r24,r8 + 5299 .LVL410: + 5300 1f74 B501 movw r22,r10 + 5301 1f76 A601 movw r20,r12 + 5302 1f78 9101 movw r18,r2 + 5303 1f7a 8201 movw r16,r4 + 5304 1f7c 7301 movw r14,r6 + 5305 1f7e 0E94 0000 call box_filled + 5306 1f82 00C0 rjmp .L393 + 5307 .LVL411: + 5308 .L392: + 5309 .LM546: + 5310 1f84 2D81 ldd r18,Y+5 + 5311 1f86 3E81 ldd r19,Y+6 + 5312 1f88 2230 cpi r18,2 + 5313 1f8a 3105 cpc r19,__zero_reg__ + 5314 1f8c 01F4 brne .L394 + 5315 .LM547: + 5316 1f8e C401 movw r24,r8 + 5317 .LVL412: + 5318 1f90 B501 movw r22,r10 + 5319 1f92 A601 movw r20,r12 + 5320 1f94 9101 movw r18,r2 + 5321 1f96 8201 movw r16,r4 + 5322 1f98 7301 movw r14,r6 + 5323 1f9a 0E94 0000 call box_walls + 5324 1f9e 00C0 rjmp .L393 + 5325 .LVL413: + 5326 .L394: + 5327 .LM548: + 5328 1fa0 C401 movw r24,r8 + 5329 .LVL414: + 5330 1fa2 B501 movw r22,r10 + 5331 1fa4 A601 movw r20,r12 + 5332 1fa6 9101 movw r18,r2 + 5333 1fa8 8201 movw r16,r4 + 5334 1faa 7301 movw r14,r6 + 5335 1fac 0E94 0000 call box_wireframe + 5336 .L393: + 5337 .LM549: + 5338 1fb0 8985 ldd r24,Y+9 + 5339 1fb2 9A85 ldd r25,Y+10 + 5340 1fb4 0E94 0000 call delay_ms + 5341 .LM550: + 5342 1fb8 80E0 ldi r24,lo8(0) + 5343 1fba 0E94 0000 call fill + 5344 1fbe 8B85 ldd r24,Y+11 + 5345 1fc0 9C85 ldd r25,Y+12 + 5346 1fc2 0196 adiw r24,1 + 5347 1fc4 9C87 std Y+12,r25 + 5348 1fc6 8B87 std Y+11,r24 + 5349 .LM551: + 5350 1fc8 0897 sbiw r24,8 + 5351 1fca 01F0 breq .+2 + 5352 1fcc 00C0 rjmp .L395 + 5353 1fce E7E0 ldi r30,lo8(7) + 5354 1fd0 F0E0 ldi r31,hi8(7) + 5355 1fd2 FC87 std Y+12,r31 + 5356 1fd4 EB87 std Y+11,r30 + 5357 .L408: + 5358 1fd6 87E0 ldi r24,lo8(7) + 5359 1fd8 90E0 ldi r25,hi8(7) + 5360 .LVL415: + 5361 1fda 2B85 ldd r18,Y+11 + 5362 1fdc 3C85 ldd r19,Y+12 + 5363 1fde 821B sub r24,r18 + 5364 1fe0 930B sbc r25,r19 + 5365 .LM552: + 5366 1fe2 EF81 ldd r30,Y+7 + 5367 1fe4 F885 ldd r31,Y+8 + 5368 1fe6 3097 sbiw r30,0 + 5369 1fe8 01F4 brne .+2 + 5370 1fea 00C0 rjmp .L396 + 5371 .LM553: + 5372 1fec 3197 sbiw r30,1 + 5373 1fee 01F4 brne .L397 + 5374 1ff0 6901 movw r12,r18 + 5375 1ff2 77E0 ldi r23,lo8(7) + 5376 1ff4 672E mov r6,r23 + 5377 1ff6 712C mov r7,__zero_reg__ + 5378 1ff8 00C0 rjmp .L398 + 5379 .L397: + 5380 .LM554: + 5381 1ffa 2F81 ldd r18,Y+7 + 5382 1ffc 3885 ldd r19,Y+8 + 5383 1ffe 2230 cpi r18,2 + 5384 2000 3105 cpc r19,__zero_reg__ + 5385 2002 01F4 brne .L399 + 5386 2004 4B84 ldd r4,Y+11 + 5387 2006 5C84 ldd r5,Y+12 + 5388 2008 1C01 movw r2,r24 + 5389 200a 3C01 movw r6,r24 + 5390 200c 8824 clr r8 + 5391 200e 9924 clr r9 + 5392 2010 67E0 ldi r22,lo8(7) + 5393 2012 A62E mov r10,r22 + 5394 2014 B12C mov r11,__zero_reg__ + 5395 2016 CC24 clr r12 + 5396 2018 DD24 clr r13 + 5397 201a 00C0 rjmp .L400 + 5398 .LVL416: + 5399 .L399: + 5400 .LM555: + 5401 201c EF81 ldd r30,Y+7 + 5402 201e F885 ldd r31,Y+8 + 5403 2020 3397 sbiw r30,3 + 5404 2022 01F4 brne .L401 + 5405 2024 4B84 ldd r4,Y+11 + 5406 2026 5C84 ldd r5,Y+12 + 5407 2028 1C01 movw r2,r24 + 5408 202a 3201 movw r6,r4 + 5409 202c 8824 clr r8 + 5410 202e 9924 clr r9 + 5411 2030 57E0 ldi r21,lo8(7) + 5412 2032 A52E mov r10,r21 + 5413 2034 B12C mov r11,__zero_reg__ + 5414 2036 47E0 ldi r20,lo8(7) + 5415 2038 C42E mov r12,r20 + 5416 203a D12C mov r13,__zero_reg__ + 5417 203c 00C0 rjmp .L402 + 5418 .LVL417: + 5419 .L401: + 5420 .LM556: + 5421 203e 2F81 ldd r18,Y+7 + 5422 2040 3885 ldd r19,Y+8 + 5423 2042 2430 cpi r18,4 + 5424 2044 3105 cpc r19,__zero_reg__ + 5425 2046 01F4 brne .L403 + 5426 2048 2B84 ldd r2,Y+11 + 5427 204a 3C84 ldd r3,Y+12 + 5428 204c 2C01 movw r4,r24 + 5429 204e 3C01 movw r6,r24 + 5430 2050 37E0 ldi r19,lo8(7) + 5431 2052 832E mov r8,r19 + 5432 2054 912C mov r9,__zero_reg__ + 5433 2056 AA24 clr r10 + 5434 2058 BB24 clr r11 + 5435 205a 00C0 rjmp .L417 + 5436 .LVL418: + 5437 .L403: + 5438 .LM557: + 5439 205c EF81 ldd r30,Y+7 + 5440 205e F885 ldd r31,Y+8 + 5441 2060 3597 sbiw r30,5 + 5442 2062 01F4 brne .L400 + 5443 2064 2B84 ldd r2,Y+11 + 5444 2066 3C84 ldd r3,Y+12 + 5445 2068 2C01 movw r4,r24 + 5446 206a 3101 movw r6,r2 + 5447 206c 27E0 ldi r18,lo8(7) + 5448 206e 822E mov r8,r18 + 5449 2070 912C mov r9,__zero_reg__ + 5450 2072 AA24 clr r10 + 5451 2074 BB24 clr r11 + 5452 2076 00C0 rjmp .L416 + 5453 .LVL419: + 5454 .L400: + 5455 .LM558: + 5456 2078 2F81 ldd r18,Y+7 + 5457 207a 3885 ldd r19,Y+8 + 5458 207c 2630 cpi r18,6 + 5459 207e 3105 cpc r19,__zero_reg__ + 5460 2080 01F4 brne .L402 + 5461 2082 2B84 ldd r2,Y+11 + 5462 2084 3C84 ldd r3,Y+12 + 5463 2086 2101 movw r4,r2 + 5464 2088 3C01 movw r6,r24 + 5465 208a 97E0 ldi r25,lo8(7) + 5466 208c 892E mov r8,r25 + 5467 208e 912C mov r9,__zero_reg__ + 5468 2090 87E0 ldi r24,lo8(7) + 5469 2092 A82E mov r10,r24 + 5470 2094 B12C mov r11,__zero_reg__ + 5471 .LVL420: + 5472 .L417: + 5473 2096 CC24 clr r12 + 5474 2098 DD24 clr r13 + 5475 209a 00C0 rjmp .L404 + 5476 .LVL421: + 5477 .L402: + 5478 .LM559: + 5479 209c 8F81 ldd r24,Y+7 + 5480 209e 9885 ldd r25,Y+8 + 5481 .LVL422: + 5482 20a0 0797 sbiw r24,7 + 5483 20a2 01F4 brne .L404 + 5484 20a4 2B84 ldd r2,Y+11 + 5485 20a6 3C84 ldd r3,Y+12 + 5486 20a8 2101 movw r4,r2 + 5487 20aa 3101 movw r6,r2 + 5488 20ac 07E0 ldi r16,lo8(7) + 5489 20ae 802E mov r8,r16 + 5490 20b0 912C mov r9,__zero_reg__ + 5491 20b2 17E0 ldi r17,lo8(7) + 5492 20b4 A12E mov r10,r17 + 5493 20b6 B12C mov r11,__zero_reg__ + 5494 .LVL423: + 5495 .L416: + 5496 20b8 B7E0 ldi r27,lo8(7) + 5497 20ba CB2E mov r12,r27 + 5498 20bc D12C mov r13,__zero_reg__ + 5499 .LVL424: + 5500 .L404: + 5501 .LM560: + 5502 20be ED81 ldd r30,Y+5 + 5503 20c0 FE81 ldd r31,Y+6 + 5504 20c2 3397 sbiw r30,3 + 5505 20c4 01F4 brne .L405 + 5506 .LM561: + 5507 20c6 C401 movw r24,r8 + 5508 .LVL425: + 5509 20c8 B501 movw r22,r10 + 5510 20ca A601 movw r20,r12 + 5511 20cc 9101 movw r18,r2 + 5512 20ce 8201 movw r16,r4 + 5513 20d0 7301 movw r14,r6 + 5514 20d2 0E94 0000 call box_filled + 5515 20d6 00C0 rjmp .L406 + 5516 .LVL426: + 5517 .L405: + 5518 .LM562: + 5519 20d8 2D81 ldd r18,Y+5 + 5520 20da 3E81 ldd r19,Y+6 + 5521 20dc 2230 cpi r18,2 + 5522 20de 3105 cpc r19,__zero_reg__ + 5523 20e0 01F4 brne .L407 + 5524 .LM563: + 5525 20e2 C401 movw r24,r8 + 5526 .LVL427: + 5527 20e4 B501 movw r22,r10 + 5528 20e6 A601 movw r20,r12 + 5529 20e8 9101 movw r18,r2 + 5530 20ea 8201 movw r16,r4 + 5531 20ec 7301 movw r14,r6 + 5532 20ee 0E94 0000 call box_walls + 5533 20f2 00C0 rjmp .L406 + 5534 .LVL428: + 5535 .L407: + 5536 .LM564: + 5537 20f4 C401 movw r24,r8 + 5538 .LVL429: + 5539 20f6 B501 movw r22,r10 + 5540 20f8 A601 movw r20,r12 + 5541 20fa 9101 movw r18,r2 + 5542 20fc 8201 movw r16,r4 + 5543 20fe 7301 movw r14,r6 + 5544 2100 0E94 0000 call box_wireframe + 5545 .L406: + 5546 .LM565: + 5547 2104 8985 ldd r24,Y+9 + 5548 2106 9A85 ldd r25,Y+10 + 5549 2108 0E94 0000 call delay_ms + 5550 .LM566: + 5551 210c 80E0 ldi r24,lo8(0) + 5552 210e 0E94 0000 call fill + 5553 2112 8B85 ldd r24,Y+11 + 5554 2114 9C85 ldd r25,Y+12 + 5555 2116 0197 sbiw r24,1 + 5556 2118 9C87 std Y+12,r25 + 5557 211a 8B87 std Y+11,r24 + 5558 .LM567: + 5559 211c 8F5F subi r24,lo8(-1) + 5560 211e 9F4F sbci r25,hi8(-1) + 5561 2120 01F0 breq .+2 + 5562 2122 00C0 rjmp .L408 + 5563 .LM568: + 5564 2124 2981 ldd r18,Y+1 + 5565 2126 3A81 ldd r19,Y+2 + 5566 2128 2F5F subi r18,lo8(-(1)) + 5567 212a 3F4F sbci r19,hi8(-(1)) + 5568 212c 3A83 std Y+2,r19 + 5569 212e 2983 std Y+1,r18 + 5570 .LVL430: + 5571 .L382: + 5572 2130 8981 ldd r24,Y+1 + 5573 2132 9A81 ldd r25,Y+2 + 5574 2134 EB81 ldd r30,Y+3 + 5575 2136 FC81 ldd r31,Y+4 + 5576 2138 8E17 cp r24,r30 + 5577 213a 9F07 cpc r25,r31 + 5578 213c 04F4 brge .+2 + 5579 213e 00C0 rjmp .L409 + 5580 2140 00C0 rjmp .L418 + 5581 .LVL431: + 5582 .L383: + 5583 .LM569: + 5584 2142 3C01 movw r6,r24 + 5585 2144 CC24 clr r12 + 5586 2146 DD24 clr r13 + 5587 .L385: + 5588 2148 1C01 movw r2,r24 + 5589 214a 2C01 movw r4,r24 + 5590 214c 8824 clr r8 + 5591 214e 9924 clr r9 + 5592 2150 AA24 clr r10 + 5593 2152 BB24 clr r11 + 5594 2154 00C0 rjmp .L390 + 5595 .LVL432: + 5596 .L396: + 5597 2156 3C01 movw r6,r24 + 5598 2158 CC24 clr r12 + 5599 215a DD24 clr r13 + 5600 .L398: + 5601 215c 1C01 movw r2,r24 + 5602 215e 2C01 movw r4,r24 + 5603 2160 8824 clr r8 + 5604 2162 9924 clr r9 + 5605 2164 AA24 clr r10 + 5606 2166 BB24 clr r11 + 5607 2168 00C0 rjmp .L403 + 5608 .LVL433: + 5609 .L418: + 5610 /* epilogue start */ + 5611 216a 2C96 adiw r28,12 + 5612 216c 0FB6 in __tmp_reg__,__SREG__ + 5613 216e F894 cli + 5614 2170 DEBF out __SP_H__,r29 + 5615 2172 0FBE out __SREG__,__tmp_reg__ + 5616 2174 CDBF out __SP_L__,r28 + 5617 2176 CF91 pop r28 + 5618 2178 DF91 pop r29 + 5619 217a 1F91 pop r17 + 5620 217c 0F91 pop r16 + 5621 217e FF90 pop r15 + 5622 2180 EF90 pop r14 + 5623 2182 DF90 pop r13 + 5624 2184 CF90 pop r12 + 5625 .LVL434: + 5626 2186 BF90 pop r11 + 5627 2188 AF90 pop r10 + 5628 .LVL435: + 5629 218a 9F90 pop r9 + 5630 218c 8F90 pop r8 + 5631 .LVL436: + 5632 218e 7F90 pop r7 + 5633 2190 6F90 pop r6 + 5634 .LVL437: + 5635 2192 5F90 pop r5 + 5636 2194 4F90 pop r4 + 5637 .LVL438: + 5638 2196 3F90 pop r3 + 5639 2198 2F90 pop r2 + 5640 .LVL439: + 5641 219a 0895 ret + 5642 .LFE8: + 5644 .global effect_planboing + 5646 effect_planboing: + 5647 .LFB6: + 5648 .LM570: + 5649 .LVL440: + 5650 219c EF92 push r14 + 5651 219e FF92 push r15 + 5652 21a0 0F93 push r16 + 5653 21a2 1F93 push r17 + 5654 21a4 CF93 push r28 + 5655 21a6 DF93 push r29 + 5656 /* prologue: function */ + 5657 /* frame size = 0 */ + 5658 21a8 8C01 movw r16,r24 + 5659 21aa 7B01 movw r14,r22 + 5660 .LVL441: + 5661 .LM571: + 5662 21ac C0E0 ldi r28,lo8(0) + 5663 21ae D0E0 ldi r29,hi8(0) + 5664 .LVL442: + 5665 .L423: + 5666 .LM572: + 5667 21b0 80E0 ldi r24,lo8(0) + 5668 21b2 0E94 0000 call fill + 5669 .LM573: + 5670 21b6 0A37 cpi r16,122 + 5671 21b8 1105 cpc r17,__zero_reg__ + 5672 21ba 01F4 brne .L420 + 5673 .LM574: + 5674 21bc CE01 movw r24,r28 + 5675 21be 0E94 0000 call setplane_z + 5676 21c2 00C0 rjmp .L421 + 5677 .L420: + 5678 .LM575: + 5679 21c4 0837 cpi r16,120 + 5680 21c6 1105 cpc r17,__zero_reg__ + 5681 21c8 01F4 brne .L422 + 5682 .LM576: + 5683 21ca CE01 movw r24,r28 + 5684 21cc 0E94 0000 call setplane_x + 5685 21d0 00C0 rjmp .L421 + 5686 .L422: + 5687 .LM577: + 5688 21d2 0937 cpi r16,121 + 5689 21d4 1105 cpc r17,__zero_reg__ + 5690 21d6 01F4 brne .L421 + 5691 .LM578: + 5692 21d8 CE01 movw r24,r28 + 5693 21da 0E94 0000 call setplane_y + 5694 .L421: + 5695 .LM579: + 5696 21de C701 movw r24,r14 + 5697 21e0 0E94 0000 call delay_ms + 5698 .LM580: + 5699 21e4 2196 adiw r28,1 + 5700 21e6 C830 cpi r28,8 + 5701 21e8 D105 cpc r29,__zero_reg__ + 5702 21ea 01F4 brne .L423 + 5703 21ec C7E0 ldi r28,lo8(7) + 5704 21ee D0E0 ldi r29,hi8(7) + 5705 .LVL443: + 5706 .L427: + 5707 .LM581: + 5708 21f0 80E0 ldi r24,lo8(0) + 5709 21f2 0E94 0000 call fill + 5710 .LM582: + 5711 21f6 0A37 cpi r16,122 + 5712 21f8 1105 cpc r17,__zero_reg__ + 5713 21fa 01F4 brne .L424 + 5714 .LM583: + 5715 21fc CE01 movw r24,r28 + 5716 21fe 0E94 0000 call setplane_z + 5717 2202 00C0 rjmp .L425 + 5718 .L424: + 5719 .LM584: + 5720 2204 0837 cpi r16,120 + 5721 2206 1105 cpc r17,__zero_reg__ + 5722 2208 01F4 brne .L426 + 5723 .LM585: + 5724 220a CE01 movw r24,r28 + 5725 220c 0E94 0000 call setplane_x + 5726 2210 00C0 rjmp .L425 + 5727 .L426: + 5728 .LM586: + 5729 2212 0937 cpi r16,121 + 5730 2214 1105 cpc r17,__zero_reg__ + 5731 2216 01F4 brne .L425 + 5732 .LM587: + 5733 2218 CE01 movw r24,r28 + 5734 221a 0E94 0000 call setplane_y + 5735 .L425: + 5736 .LM588: + 5737 221e C701 movw r24,r14 + 5738 2220 0E94 0000 call delay_ms + 5739 .LM589: + 5740 2224 2197 sbiw r28,1 + 5741 2226 8FEF ldi r24,hi8(-1) + 5742 2228 CF3F cpi r28,lo8(-1) + 5743 222a D807 cpc r29,r24 + 5744 222c 01F4 brne .L427 + 5745 /* epilogue start */ + 5746 .LM590: + 5747 222e DF91 pop r29 + 5748 2230 CF91 pop r28 + 5749 .LVL444: + 5750 2232 1F91 pop r17 + 5751 2234 0F91 pop r16 + 5752 .LVL445: + 5753 2236 FF90 pop r15 + 5754 2238 EF90 pop r14 + 5755 223a 0895 ret + 5756 .LFE6: + 5758 .global effect_test + 5760 effect_test: + 5761 .LFB4: + 5762 .LM591: + 5763 223c AF92 push r10 + 5764 223e BF92 push r11 + 5765 2240 CF92 push r12 + 5766 2242 DF92 push r13 + 5767 2244 EF92 push r14 + 5768 2246 FF92 push r15 + 5769 2248 0F93 push r16 + 5770 224a 1F93 push r17 + 5771 224c CF93 push r28 + 5772 224e DF93 push r29 + 5773 /* prologue: function */ + 5774 /* frame size = 0 */ + 5775 .LM592: + 5776 2250 C0E0 ldi r28,lo8(0) + 5777 2252 D0E0 ldi r29,hi8(0) + 5778 .LVL446: + 5779 .L432: + 5780 .LM593: + 5781 2254 BE01 movw r22,r28 + 5782 2256 53E0 ldi r21,3 + 5783 2258 7595 1: asr r23 + 5784 225a 6795 ror r22 + 5785 225c 5A95 dec r21 + 5786 225e 01F4 brne 1b + 5787 2260 8827 clr r24 + 5788 2262 77FD sbrc r23,7 + 5789 2264 8095 com r24 + 5790 2266 982F mov r25,r24 + 5791 2268 0E94 0000 call __floatsisf + 5792 226c 7B01 movw r14,r22 + 5793 226e 8C01 movw r16,r24 + 5794 2270 0E94 0000 call sin + 5795 2274 9B01 movw r18,r22 + 5796 2276 AC01 movw r20,r24 + 5797 2278 0E94 0000 call __addsf3 + 5798 227c 20E0 ldi r18,lo8(0x40600000) + 5799 227e 30E0 ldi r19,hi8(0x40600000) + 5800 2280 40E6 ldi r20,hlo8(0x40600000) + 5801 2282 50E4 ldi r21,hhi8(0x40600000) + 5802 2284 0E94 0000 call __addsf3 + 5803 2288 0E94 0000 call __fixsfsi + 5804 228c 5B01 movw r10,r22 + 5805 228e 6C01 movw r12,r24 + 5806 .LM594: + 5807 2290 C801 movw r24,r16 + 5808 2292 B701 movw r22,r14 + 5809 2294 0E94 0000 call cos + 5810 2298 9B01 movw r18,r22 + 5811 229a AC01 movw r20,r24 + 5812 229c 0E94 0000 call __addsf3 + 5813 22a0 20E0 ldi r18,lo8(0x40600000) + 5814 22a2 30E0 ldi r19,hi8(0x40600000) + 5815 22a4 40E6 ldi r20,hlo8(0x40600000) + 5816 22a6 50E4 ldi r21,hhi8(0x40600000) + 5817 22a8 0E94 0000 call __addsf3 + 5818 22ac 0E94 0000 call __fixsfsi + 5819 22b0 7B01 movw r14,r22 + 5820 22b2 8C01 movw r16,r24 + 5821 .LM595: + 5822 22b4 C501 movw r24,r10 + 5823 22b6 B701 movw r22,r14 + 5824 22b8 41E0 ldi r20,lo8(1) + 5825 22ba 50E0 ldi r21,hi8(1) + 5826 22bc 0E94 0000 call setvoxel + 5827 .LM596: + 5828 22c0 C501 movw r24,r10 + 5829 22c2 B701 movw r22,r14 + 5830 22c4 41E0 ldi r20,lo8(1) + 5831 22c6 50E0 ldi r21,hi8(1) + 5832 22c8 0E94 0000 call setvoxel + 5833 .LM597: + 5834 22cc 88EE ldi r24,lo8(1000) + 5835 22ce 93E0 ldi r25,hi8(1000) + 5836 22d0 0E94 0000 call delay_ms + 5837 .LM598: + 5838 22d4 80E0 ldi r24,lo8(0) + 5839 22d6 0E94 0000 call fill + 5840 .LM599: + 5841 22da 2196 adiw r28,1 + 5842 22dc 83E0 ldi r24,hi8(1000) + 5843 22de C83E cpi r28,lo8(1000) + 5844 22e0 D807 cpc r29,r24 + 5845 22e2 01F0 breq .+2 + 5846 22e4 00C0 rjmp .L432 + 5847 /* epilogue start */ + 5848 .LM600: + 5849 22e6 DF91 pop r29 + 5850 22e8 CF91 pop r28 + 5851 .LVL447: + 5852 22ea 1F91 pop r17 + 5853 22ec 0F91 pop r16 + 5854 22ee FF90 pop r15 + 5855 22f0 EF90 pop r14 + 5856 22f2 DF90 pop r13 + 5857 22f4 CF90 pop r12 + 5858 22f6 BF90 pop r11 + 5859 22f8 AF90 pop r10 + 5860 22fa 0895 ret + 5861 .LFE4: + 5863 .data + 5866 C.30.2453: + 5867 0000 00 .byte 0 + 5868 0001 01 .byte 1 + 5869 0002 02 .byte 2 + 5870 0003 03 .byte 3 + 5871 0004 04 .byte 4 + 5872 0005 05 .byte 5 + 5873 0006 06 .byte 6 + 5874 0007 07 .byte 7 + 5875 0008 01 .byte 1 + 5876 0009 01 .byte 1 + 5877 000a 02 .byte 2 + 5878 000b 03 .byte 3 + 5879 000c 04 .byte 4 + 5880 000d 05 .byte 5 + 5881 000e 06 .byte 6 + 5882 000f 06 .byte 6 + 5883 0010 02 .byte 2 + 5884 0011 02 .byte 2 + 5885 0012 03 .byte 3 + 5886 0013 03 .byte 3 + 5887 0014 04 .byte 4 + 5888 0015 04 .byte 4 + 5889 0016 05 .byte 5 + 5890 0017 05 .byte 5 + 5891 0018 03 .byte 3 + 5892 0019 03 .byte 3 + 5893 001a 03 .byte 3 + 5894 001b 03 .byte 3 + 5895 001c 04 .byte 4 + 5896 001d 04 .byte 4 + 5897 001e 04 .byte 4 + 5898 001f 04 .byte 4 + 5899 .comm cube,64,1 + 5900 .comm fb,64,1 + 6149 .Letext0: +DEFINED SYMBOLS + *ABS*:0000000000000000 effect.c + /tmp/ccaJZNIL.s:2 *ABS*:000000000000003f __SREG__ + /tmp/ccaJZNIL.s:3 *ABS*:000000000000003e __SP_H__ + /tmp/ccaJZNIL.s:4 *ABS*:000000000000003d __SP_L__ + /tmp/ccaJZNIL.s:5 *ABS*:0000000000000034 __CCP__ + /tmp/ccaJZNIL.s:6 *ABS*:0000000000000000 __tmp_reg__ + /tmp/ccaJZNIL.s:7 *ABS*:0000000000000001 __zero_reg__ + /tmp/ccaJZNIL.s:20 .text:0000000000000000 effect_telcstairs_do + *COM*:0000000000000040 cube + /tmp/ccaJZNIL.s:84 .text:000000000000004a effect_telcstairs + /tmp/ccaJZNIL.s:146 .text:000000000000008c sendvoxel_z + /tmp/ccaJZNIL.s:255 .text:000000000000012a effect_pathmove + /tmp/ccaJZNIL.s:374 .text:00000000000001d6 effect_path_bitmap + /tmp/ccaJZNIL.s:562 .text:00000000000002fe effect_path_text + /tmp/ccaJZNIL.s:762 .text:0000000000000442 effect_pathspiral + /tmp/ccaJZNIL.s:861 .text:00000000000004dc effect_rand_patharound + /tmp/ccaJZNIL.s:994 .text:00000000000005ae effect_stringfly2 + /tmp/ccaJZNIL.s:1348 .text:00000000000007d0 effect_smileyspin + /tmp/ccaJZNIL.s:5866 .data:0000000000000000 C.30.2453 + /tmp/ccaJZNIL.s:2067 .text:0000000000000c1a effect_random_sparkle_flash + /tmp/ccaJZNIL.s:2174 .text:0000000000000cc4 effect_random_sparkle + /tmp/ccaJZNIL.s:2219 .text:0000000000000cfa effect_loadbar + /tmp/ccaJZNIL.s:2349 .text:0000000000000da8 draw_positions_axis + /tmp/ccaJZNIL.s:2504 .text:0000000000000e7c effect_boxside_randsend_parallel + /tmp/ccaJZNIL.s:2747 .text:0000000000000ff0 effect_axis_updown_randsuspend + /tmp/ccaJZNIL.s:2989 .text:0000000000001166 effect_z_updown_move + /tmp/ccaJZNIL.s:3045 .text:00000000000011a4 effect_z_updown + /tmp/ccaJZNIL.s:3270 .text:0000000000001310 effect_random_filler + /tmp/ccaJZNIL.s:3401 .text:00000000000013e4 sendvoxels_rand_z + /tmp/ccaJZNIL.s:3567 .text:00000000000014ce effect_blinky2 + /tmp/ccaJZNIL.s:3687 .text:0000000000001590 effect_wormsqueeze + /tmp/ccaJZNIL.s:3974 .text:000000000000174c effect_rain + /tmp/ccaJZNIL.s:4078 .text:00000000000017ea boingboing + /tmp/ccaJZNIL.s:4891 .text:0000000000001cfc sendplane_rand_z + /tmp/ccaJZNIL.s:4974 .text:0000000000001d7a effect_box_woopwoop + /tmp/ccaJZNIL.s:5080 .text:0000000000001e1c effect_box_shrink_grow + /tmp/ccaJZNIL.s:5646 .text:000000000000219c effect_planboing + /tmp/ccaJZNIL.s:5760 .text:000000000000223c effect_test + *COM*:0000000000000040 fb + +UNDEFINED SYMBOLS +__do_copy_data +__do_clear_bss +delay_ms +clrvoxel +setvoxel +getvoxel +altervoxel +font_getpath +font_getbitmappixel +font_getchar +rand +__divmodhi4 +fill +shift +flpvoxel +setplane_z +box_wireframe +box_filled +box_walls +setplane_x +setplane_y +__floatsisf +sin +__addsf3 +__fixsfsi +cos diff --git a/cube_pc_test1/font.c b/cube_pc_test1/font.c new file mode 100644 index 0000000..9868e9a --- /dev/null +++ b/cube_pc_test1/font.c @@ -0,0 +1,158 @@ +#include "font.h" +//#include + +#define EEMEM +#define PROGMEM + +volatile const unsigned char font[455] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] EEMEM = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] PROGMEM = {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + //for (i = 0; i < length; i++) + // destination[i] = pgm_read_byte(&paths[i+offset]); +} + +void font_getchar (char chr, unsigned char dst[5]) +{ + int i; + chr -= 32; + + unsigned char font[455] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z + }; + for (i = 0; i < 5; i++) + { + dst[i] = font[(chr*5)+i]; + } + +} + +void font_getbitmap (char bitmap, unsigned char dst[8]) +{ + int i; + + //for (i = 0; i < 8; i++) + // dst[i] = eeprom_read_byte(&bitmaps[bitmap][i]); + +} + +unsigned char font_getbitmappixel ( char bitmap, char x, char y) +{ + //unsigned char tmp = eeprom_read_byte(&bitmaps[bitmap][x]); + //return (tmp >> y) & 0x01; +} + + + + diff --git a/cube_pc_test1/font.h b/cube_pc_test1/font.h new file mode 100644 index 0000000..1558204 --- /dev/null +++ b/cube_pc_test1/font.h @@ -0,0 +1,13 @@ +#ifndef FONT_H +#define FONT_H + +//#include + +void font_getchar (char chr, unsigned char dst[5]); +void font_getpath (unsigned char path, unsigned char *destination, int length); +void font_getbitmap (char bitmap, unsigned char dst[8]); +unsigned char font_getbitmappixel ( char bitmap, char x, char y); + + + +#endif diff --git a/cube_pc_test1/gameoflife.c b/cube_pc_test1/gameoflife.c new file mode 100644 index 0000000..52d630b --- /dev/null +++ b/cube_pc_test1/gameoflife.c @@ -0,0 +1,148 @@ +#include "gameoflife.h" +#include "cube.h" +#include "draw.h" + +// Game of Life for the 4x4x4 and 8x8x8 led cube + +// Original rules: +// live cells: +// fewer than two neighbour: die +// two or three neighbours: live +// more than three neighbours: die +// dead cells: +// exactly three live neighbours becomes alive + +// This is 3d space, so the cell can have life on two more sides. +// We have to tweak the rules a bit to make it work: + +// Create life in a dead cell if neighbours == 4 +#define GOL_CREATE_MIN 4 +#define GOL_CREATE_MAX 4 + +// Underpopulation +#define GOL_TERMINATE_LONELY 3 +// Overpopulation +#define GOL_TERMINATE_CROWDED 5 + +#define GOL_X 8 +#define GOL_Y 8 +#define GOL_Z 8 + +#define GOL_WRAP 0 + + + +void gol_play (int iterations, int delay) +{ + int i; + + for (i = 0; i < iterations; i++) + { + LED_PORT ^= LED_GREEN; + + gol_nextgen(); + + if (gol_count_changes() == 0) + return; + + tmp2cube(); + + delay_ms(delay); + + //led_red(1); + } +} + +void gol_nextgen (void) +{ + int x,y,z; + unsigned char neigh; + + tmpfill(0x00); + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + for (z = 0; z < GOL_Z; z++) + { + neigh = gol_count_neighbors(x, y, z); + + // Current voxel is alive. + if (getvoxel(x,y,z) == 0x01) + { + if (neigh <= GOL_TERMINATE_LONELY) + { + tmpclrvoxel(x,y,z); + } else if(neigh >= GOL_TERMINATE_CROWDED) + { + tmpclrvoxel(x,y,z); + } else + { + tmpsetvoxel(x,y,z); + } + // Current voxel is dead. + } else + { + if (neigh >= GOL_CREATE_MIN && neigh <= GOL_CREATE_MAX) + tmpsetvoxel(x,y,z); + } + } + } + } +} + +unsigned char gol_count_neighbors (int x, int y, int z) +{ + int ix, iy, iz; // offset 1 in each direction in each dimension + int nx, ny, nz; // neighbours address. + + unsigned char neigh = 0; // number of alive neighbours. + + for (ix = -1; ix < 2; ix++) + { + for (iy = -1; iy < 2; iy++) + { + for (iz = -1; iz < 2; iz++) + { + // Your not your own neighbour, exclude 0,0,0, offset. + if ( !(ix == 0 && iy == 0 && iz == 0) ) + { + if (GOL_WRAP == 0x01) + { + nx = (x+ix)%GOL_X; + ny = (y+iy)%GOL_Y; + nz = (z+iz)%GOL_Z; + } else + { + nx = x+ix; + ny = y+iy; + nz = z+iz; + } + + if ( getvoxel(nx, ny, nz) ) + neigh++; + } + } + } + } + return neigh; +} + +int gol_count_changes (void) +{ + int x,y; + int i = 0; + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + if (fb[x][y] != cube[x][y]) + i++; + } + } + + return i; +} + diff --git a/cube_pc_test1/gameoflife.h b/cube_pc_test1/gameoflife.h new file mode 100644 index 0000000..8e88be6 --- /dev/null +++ b/cube_pc_test1/gameoflife.h @@ -0,0 +1,9 @@ +#ifndef GOL_H +#define GOL_H + +void gol_play (int iterations, int delay); +unsigned char gol_count_neighbors (int x, int y, int z); +void gol_nextgen (void); +int gol_count_changes (void); + +#endif diff --git a/cube_pc_test1/launch_effect.c b/cube_pc_test1/launch_effect.c new file mode 100644 index 0000000..26664eb --- /dev/null +++ b/cube_pc_test1/launch_effect.c @@ -0,0 +1,61 @@ +#include "launch_effect.h" +#include "effect.h" +#include "draw.h" +#include "gameoflife.h" + +#include + +void draw_line(int Xa, int Ya, int Za, + int Xb, int Yb, int Zb); + +void draw_linef(float Xa, float Ya, float Za, + float Xb, float Yb, float Zb); + +void launch_effect (int effect) +{ + + /* + for (x = 0; x < 7; ++x) { + fill(0); + draw_line(x, 0, 4, 7-x, 7, 4); + delay_ms(1000); + } + + for (y = 0; y < 7; ++y) { + fill(0); + draw_line(0, 7-y, 4, 7, y, 4); + delay_ms(1000); + } + + for (x = 0; x < 7; ++x) { + fill(0); + draw_line(7-x, 7, 4, x, 0, 4); + delay_ms(1000); + } + + for (y = 0; y < 7; ++y) { + fill(0); + draw_line(7, y, 4, 0, 7-y, 4); + delay_ms(1000); + } + */ + /* + float d; + for (d = 0; d < 6.3; d += 0.1) { + fill(0); + float c = cosf(d)*10, s = sinf(d)*10; + draw_linef(c + 3.5, s + 3.5, 4, -c + 3.5, -s + 3.5, 4); + delay_ms(1000); + } + */ + int i; + float x = 0, y = 1; + for (i = 0; i < 28; ++i) { + fill(0); + x = 1.06 * (x - 3.5) + 3.5; + y = 1.06 * (y - 3.5) + 3.5; + draw_line(x, y, 4, -x, -y, 4); + delay_ms(1000); + } +} + diff --git a/cube_pc_test1/launch_effect.h b/cube_pc_test1/launch_effect.h new file mode 100644 index 0000000..072822a --- /dev/null +++ b/cube_pc_test1/launch_effect.h @@ -0,0 +1,15 @@ +#ifndef LAUNCH_H +#define LAUNCH_H + +#include "cube.h" + +// Total number of effects +// Used in the main loop to loop through all the effects one by bone. +// Set this number one higher than the highest number inside switch() +// in launch_effect() in launch_effect.c +#define EFFECTS_TOTAL 27 + +void launch_effect (int effect); + +#endif + diff --git a/cube_pc_test1/lisence.txt b/cube_pc_test1/lisence.txt new file mode 100644 index 0000000..812dab5 --- /dev/null +++ b/cube_pc_test1/lisence.txt @@ -0,0 +1,5 @@ +Created by Christian Moen (christian@lynet.no) and StÃ¥le Kristoffersen (staalekb@ifi.uio.no) 2011. + +Lisence: http://creativecommons.org/licenses/by-nc-sa/3.0/ + +Happy hacking!! :D diff --git a/cube_pc_test1/main.c b/cube_pc_test1/main.c new file mode 100644 index 0000000..61e4f9a --- /dev/null +++ b/cube_pc_test1/main.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include "cube.h" +#include "draw.h" +#include "draw_3d.h" +#include "effect.h" +#include "gameoflife.h" +#include "launch_effect.h" + +void *cube_updater (unsigned char rs232_cube[8][8]); + +int main (int argc, char **argv) +{ + + if (argc < 2) { + fprintf(stderr, "Please indicate device to use.\n"); + return 1; + } + + cube_init(argv[1]); + + pthread_t cube_thread; + int iret, i, x; + + iret = pthread_create (&cube_thread, NULL, cube_updater, rs232_cube); + + + while (1) + { + for (i = 0; i < 0; i++) { + effect_blinky2(); + } + for (i=0; i +#include +#define AXIS_X 1 +#define AXIS_Y 2 +#define AXIS_Z 3 + +volatile unsigned char cube[8][8]; +volatile int current_layer = 0; + +void setup() +{ + int i; + + for(i=0; i<14; i++) + pinMode(i, OUTPUT); + + // pinMode(A0, OUTPUT) as specified in the arduino reference didn't work. So I accessed the registers directly. + DDRC = 0xff; + PORTC = 0x00; + + // Reset any PWM configuration that the arduino may have set up automagically! + TCCR2A = 0x00; + TCCR2B = 0x00; + + TCCR2A |= (0x01 << WGM21); // CTC mode. clear counter on TCNT2 == OCR2A + OCR2A = 10; // Interrupt every 25600th cpu cycle (256*100) + TCNT2 = 0x00; // start counting at 0 + TCCR2B |= (0x01 << CS22) | (0x01 << CS21); // Start the clock with a 256 prescaler + + TIMSK2 |= (0x01 << OCIE2A); +} + +ISR (TIMER2_COMPA_vect) +{ + int i; + + // all layer selects off + PORTC = 0x00; + PORTB &= 0x0f; + + PORTB |= 0x08; // output enable off. + + for (i=0; i<8; i++) + { + PORTD = cube[current_layer][i]; + PORTB = (PORTB & 0xF8) | (0x07 & (i+1)); + } + + PORTB &= 0b00110111; // Output enable on. + + if (current_layer < 6) + { + PORTC = (0x01 << current_layer); + } else if (current_layer == 6) + { + digitalWrite(12, HIGH); + } else + { + digitalWrite(13, HIGH); + } + + current_layer++; + + if (current_layer == 8) + current_layer = 0; +} + +void loop() +{ + int i,x,y,z; + + while (true) + { + + effect_planboing(AXIS_Z, 400); + effect_planboing(AXIS_Y, 400); + effect_planboing(AXIS_X, 400); + + effect_blinky2(); + + effect_random_filler(75,1); + effect_random_filler(75,0); + + effect_rain(100); + + effect_boxside_randsend_parallel (AXIS_X, 0, 150, 1); + effect_boxside_randsend_parallel (AXIS_X, 1, 150, 1); + effect_boxside_randsend_parallel (AXIS_Y, 0, 150, 1); + effect_boxside_randsend_parallel (AXIS_Y, 1, 150, 1); + effect_boxside_randsend_parallel (AXIS_Z, 0, 150, 1); + effect_boxside_randsend_parallel (AXIS_Z, 1, 150, 1); + + } +} + + +// ========================================================================================== +// Effect functions +// ========================================================================================== + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + + } + +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;ii0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +// ========================================================================================== +// Draw functions +// ========================================================================================== + + +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] |= (1 << x); +} + + +// Set a single voxel to ON +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] &= ~(1 << x); +} + + + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < 8 && y >= 0 && y < 8 && z >= 0 && z < 8) + { + return 0x01; + } else + { + // One of the coordinates was outside the cube. + return 0x00; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[z][y] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[z][y] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +// This is usefull for functions that uses for loops, +// to avoid infinite loops +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0xff; + } +} + +// Clears voxels in the same manner as above +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0x00; + } +} + +void setplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + setplane_x(i); + break; + + case AXIS_Y: + setplane_y(i); + break; + + case AXIS_Z: + setplane_z(i); + break; + } +} + +void clrplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + clrplane_x(i); + break; + + case AXIS_Y: + clrplane_y(i); + break; + + case AXIS_Z: + clrplane_z(i); + break; + } +} + +// Fill a value into all 64 byts of the cube buffer +// Mostly used for clearing. fill(0x00) +// or setting all on. fill(0xff) +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] = pattern; + } + } +} + + + +// Draw a box with all walls drawn and all voxels inside set +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + cube[iz][iy] |= byteline(x1,x2); + } + } + +} + +// Darw a hollow box with side walls. +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + if (iy == y1 || iy == y2 || iz == z1 || iz == z2) + { + cube[iz][iy] = byteline(x1,x2); + } else + { + cube[iz][iy] |= ((0x01 << x1) | (0x01 << x2)); + } + } + } + +} + +// Draw a wireframe box. This only draws the corners and edges, +// no walls. +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + // Lines along X axis + cube[z1][y1] = byteline(x1,x2); + cube[z1][y2] = byteline(x1,x2); + cube[z2][y1] = byteline(x1,x2); + cube[z2][y2] = byteline(x1,x2); + + // Lines along Y axis + for (iy=y1;iy<=y2;iy++) + { + setvoxel(x1,iy,z1); + setvoxel(x1,iy,z2); + setvoxel(x2,iy,z1); + setvoxel(x2,iy,z2); + } + + // Lines along Z axis + for (iz=z1;iz<=z2;iz++) + { + setvoxel(x1,y1,iz); + setvoxel(x1,y2,iz); + setvoxel(x2,y1,iz); + setvoxel(x2,y2,iz); + } + +} + +// Returns a byte with a row of 1's drawn in it. +// byteline(2,5) gives 0b00111100 +char byteline (int start, int end) +{ + return ((0xff<> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +// Draw a line between any coordinates in 3d space. +// Uses integer values for input, so dont expect smooth animations. +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + // For each step of x, y increments by: + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + + + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + diff --git a/instructables/cube8/Makefile b/instructables/cube8/Makefile new file mode 100644 index 0000000..e9b81d7 --- /dev/null +++ b/instructables/cube8/Makefile @@ -0,0 +1,514 @@ +# Hey Emacs, this is a -*- makefile -*- +#---------------------------------------------------------------------------- +# WinAVR Makefile Template written by Eric B. Weddington, J�rg Wunsch, et al. +# +# Released to the Public Domain +# +# Additional material for this makefile was written by: +# Peter Fleury +# Tim Henigan +# Colin O'Flynn +# Reiner Patommel +# Markus Pfaff +# Sander Pool +# Frederik Rouleau +# +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device, using avrdude. +# Please customize the avrdude settings below first! +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + + +# MCU name +MCU = atmega32 +#MCU = attiny13 + + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +#F_CPU = 8000000 +#1.8432*8*1000000 +F_CPU = 14745600 + +# Output format. (can be srec, ihex, binary) +FORMAT = ihex + + +# Target file name (without extension). +TARGET = main + + +# List C source files here. (C dependencies are automatically generated.) +SRC = $(TARGET).c draw.c effect.c font.c launch_effect.c gameoflife.c + + +# List Assembler source files here. +# Make them always end in a capital .S. Files ending in a lowercase .s +# will not be considered source files but generated files (assembler +# output from the compiler), and will be deleted upon "make clean"! +# Even though the DOS/Win* filesystem matches both .s and .S the same, +# it will preserve the spelling of the filenames, and gcc itself does +# care about how the name is spelled on its command-line. +ASRC = + + +# Optimization level, can be [0, 1, 2, 3, s]. +# 0 = turn off optimization. s = optimize for size. +# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) +OPT = s + + +# Debugging format. +# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. +# AVR Studio 4.10 requires dwarf-2. +# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. +DEBUG = dwarf-2 + + +# List any extra directories to look for include files here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRAINCDIRS = + + +# Compiler flag to set the C Standard level. +# c89 = "ANSI" C +# gnu89 = c89 plus GCC extensions +# c99 = ISO C99 standard (not yet fully implemented) +# gnu99 = c99 plus GCC extensions +CSTANDARD = -std=gnu99 + + +# Place -D or -U options here +CDEFS = -DF_CPU=$(F_CPU)UL + + +# Place -I options here +CINCS = + + + +#---------------- Compiler Options ---------------- +# -g*: generate debugging information +# -O*: optimization level +# -f...: tuning, see GCC manual and avr-libc documentation +# -Wall...: warning level +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns...: create assembler listing +CFLAGS = -g$(DEBUG) +CFLAGS += $(CDEFS) $(CINCS) +CFLAGS += -O$(OPT) +CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums +CFLAGS += -Wall -Wstrict-prototypes +CFLAGS += -Wa,-adhlns=$(<:.c=.lst) +CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +CFLAGS += $(CSTANDARD) + + +#---------------- Assembler Options ---------------- +# -Wa,...: tell GCC to pass this to the assembler. +# -ahlms: create listing +# -gstabs: have the assembler create line number information; note that +# for use in COFF files, additional information about filenames +# and function names needs to be present in the assembler source +# files -- see avr-libc docs [FIXME: not yet described there] +ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs + + +#---------------- Library Options ---------------- +# Minimalistic printf version +PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min + +# Floating point printf version (requires MATH_LIB = -lm below) +PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt + +# If this is left blank, then it will use the Standard printf version. +PRINTF_LIB = +#PRINTF_LIB = $(PRINTF_LIB_MIN) +#PRINTF_LIB = $(PRINTF_LIB_FLOAT) + + +# Minimalistic scanf version +SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min + +# Floating point + %[ scanf version (requires MATH_LIB = -lm below) +SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt + +# If this is left blank, then it will use the Standard scanf version. +SCANF_LIB = +#SCANF_LIB = $(SCANF_LIB_MIN) +#SCANF_LIB = $(SCANF_LIB_FLOAT) + + +MATH_LIB = -lm + + + +#---------------- External Memory Options ---------------- + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# used for variables (.data/.bss) and heap (malloc()). +#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# only used for heap (malloc()). +#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff + +EXTMEMOPTS = + + + +#---------------- Linker Options ---------------- +# -Wl,...: tell GCC to pass this to linker. +# -Map: create map file +# --cref: add cross reference to map file +LDFLAGS = -Wl,-Map=$(TARGET).map,--cref +LDFLAGS += $(EXTMEMOPTS) +LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) + + + +#---------------- Programming Options (avrdude) ---------------- + +# Programming hardware: alf avr910 avrisp bascom bsd +# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 +# +# Type: avrdude -c ? +# to get a full listing. +AVRDUDE_PROGRAMMER = usbtiny +#AVRDUDE_PROGRAMMER = ponyser + +# com1 = serial port. Use lpt1 to connect to parallel port. +#AVRDUDE_PORT = lpt1 +#AVRDUDE_PORT = COM1 + +AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex +#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep + + +# Uncomment the following if you want avrdude's erase cycle counter. +# Note that this counter needs to be initialized first using -Yn, +# see avrdude manual. +#AVRDUDE_ERASE_COUNTER = -y + +# Uncomment the following if you do /not/ wish a verification to be +# performed after programming the device. +#AVRDUDE_NO_VERIFY = -V + +# Increase verbosity level. Please use this when submitting bug +# reports about avrdude. See +# to submit bug reports. +#AVRDUDE_VERBOSE = -v -v + +AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) +AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) +AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) +AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) + + + +#---------------- Debugging Options ---------------- + +# For simulavr only - target MCU frequency. +DEBUG_MFREQ = $(F_CPU) + +# Set the DEBUG_UI to either gdb or insight. +# DEBUG_UI = gdb +DEBUG_UI = insight + +# Set the debugging back-end to either avarice, simulavr. +DEBUG_BACKEND = avarice +#DEBUG_BACKEND = simulavr + +# GDB Init Filename. +GDBINIT_FILE = __avr_gdbinit + +# When using avarice settings for the JTAG +JTAG_DEV = /dev/com1 + +# Debugging port used to communicate between GDB / avarice / simulavr. +DEBUG_PORT = 4242 + +# Debugging host used to communicate between GDB / avarice / simulavr, normally +# just set to localhost unless doing some sort of crazy debugging when +# avarice is running on a different computer. +DEBUG_HOST = localhost + + + +#============================================================================ + + +# Define programs and commands. +SHELL = sh +CC = avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +SIZE = avr-size +NM = avr-nm +AVRDUDE = avrdude +REMOVE = rm -f +COPY = cp +WINSHELL = cmd + + +# Define Messages +# English +MSG_ERRORS_NONE = Errors: none +MSG_BEGIN = -------- begin -------- +MSG_END = -------- end -------- +MSG_SIZE_BEFORE = Size before: +MSG_SIZE_AFTER = Size after: +MSG_COFF = Converting to AVR COFF: +MSG_EXTENDED_COFF = Converting to AVR Extended COFF: +MSG_FLASH = Creating load file for Flash: +MSG_EEPROM = Creating load file for EEPROM: +MSG_EXTENDED_LISTING = Creating Extended Listing: +MSG_SYMBOL_TABLE = Creating Symbol Table: +MSG_LINKING = Linking: +MSG_COMPILING = Compiling: +MSG_ASSEMBLING = Assembling: +MSG_CLEANING = Cleaning project: + + + + +# Define all object files. +OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) + +# Define all listing files. +LST = $(SRC:.c=.lst) $(ASRC:.S=.lst) + + +# Compiler flags to generate dependency files. +GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d + + +# Combine all necessary flags and optional flags. +# Add target processor to flags. +ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) +ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) + + + + + +# Default target. +all: begin gccversion sizebefore build sizeafter end + +build: elf hex eep lss sym + +elf: $(TARGET).elf +hex: $(TARGET).hex +eep: $(TARGET).eep +lss: $(TARGET).lss +sym: $(TARGET).sym + + + +# Eye candy. +# AVR Studio 3.x does not check make's exit code but relies on +# the following magic strings to be generated by the compile job. +begin: + @echo + @echo $(MSG_BEGIN) + +end: + @echo $(MSG_END) + @echo + + +# Display size of file. +HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex +ELFSIZE = $(SIZE) -A $(TARGET).elf +AVRMEM = avr-mem.sh $(TARGET).elf $(MCU) + +sizebefore: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ + $(AVRMEM) 2>/dev/null; echo; fi + +sizeafter: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \ + $(AVRMEM) 2>/dev/null; echo; fi + + + +# Display compiler version information. +gccversion : + @$(CC) --version + + + +# Program the device. +program: $(TARGET).hex $(TARGET).eep + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) + + +# Generate avr-gdb config/init file which does the following: +# define the reset signal, load the target file, connect to target, and set +# a breakpoint at main(). +gdb-config: + @$(REMOVE) $(GDBINIT_FILE) + @echo define reset >> $(GDBINIT_FILE) + @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) + @echo end >> $(GDBINIT_FILE) + @echo file $(TARGET).elf >> $(GDBINIT_FILE) + @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) +ifeq ($(DEBUG_BACKEND),simulavr) + @echo load >> $(GDBINIT_FILE) +endif + @echo break main >> $(GDBINIT_FILE) + +debug: gdb-config $(TARGET).elf +ifeq ($(DEBUG_BACKEND), avarice) + @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. + @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ + $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) + @$(WINSHELL) /c pause + +else + @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ + $(DEBUG_MFREQ) --port $(DEBUG_PORT) +endif + @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) + + + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT=$(OBJCOPY) --debugging \ +--change-section-address .data-0x800000 \ +--change-section-address .bss-0x800000 \ +--change-section-address .noinit-0x800000 \ +--change-section-address .eeprom-0x810000 + + +coff: $(TARGET).elf + @echo + @echo $(MSG_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-avr $< $(TARGET).cof + + +extcoff: $(TARGET).elf + @echo + @echo $(MSG_EXTENDED_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof + + + +# Create final output files (.hex, .eep) from ELF output file. +%.hex: %.elf + @echo + @echo $(MSG_FLASH) $@ + $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ + +%.eep: %.elf + @echo + @echo $(MSG_EEPROM) $@ + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ + +# Create extended listing file from ELF output file. +%.lss: %.elf + @echo + @echo $(MSG_EXTENDED_LISTING) $@ + $(OBJDUMP) -h -S $< > $@ + +# Create a symbol table from ELF output file. +%.sym: %.elf + @echo + @echo $(MSG_SYMBOL_TABLE) $@ + $(NM) -n $< > $@ + + + +# Link: create ELF output file from object files. +.SECONDARY : $(TARGET).elf +.PRECIOUS : $(OBJ) +%.elf: $(OBJ) + @echo + @echo $(MSG_LINKING) $@ + $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) + + +# Compile: create object files from C source files. +%.o : %.c + @echo + @echo $(MSG_COMPILING) $< + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +# Compile: create assembler files from C source files. +%.s : %.c + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +# Assemble: create object files from assembler source files. +%.o : %.S + @echo + @echo $(MSG_ASSEMBLING) $< + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + +# Create preprocessed source for use in sending a bug report. +%.i : %.c + $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ + + +# Target: clean project. +clean: begin clean_list end + +clean_list : + @echo + @echo $(MSG_CLEANING) + $(REMOVE) $(TARGET).hex + $(REMOVE) $(TARGET).eep + $(REMOVE) $(TARGET).cof + $(REMOVE) $(TARGET).elf + $(REMOVE) $(TARGET).map + $(REMOVE) $(TARGET).sym + $(REMOVE) $(TARGET).lss + $(REMOVE) $(OBJ) + $(REMOVE) $(LST) + $(REMOVE) $(SRC:.c=.s) + $(REMOVE) $(SRC:.c=.d) + $(REMOVE) .dep/* + + + +# Include the dependency files. +-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) + + +# Listing of phony targets. +.PHONY : all begin finish end sizebefore sizeafter gccversion \ +build elf hex eep lss sym coff extcoff \ +clean clean_list program debug gdb-config + +install: + avrdude -c usbtiny -p m32 -B 1 -U flash:w:main.hex + avrdude -c usbtiny -p m32 -B 1 -U eeprom:w:main.eep + diff --git a/instructables/cube8/cube.h b/instructables/cube8/cube.h new file mode 100644 index 0000000..6eb4a2d --- /dev/null +++ b/instructables/cube8/cube.h @@ -0,0 +1,32 @@ +#ifndef CUBE_H +#define CUBE_H + +// Some of the functions are created to be portable +// These functions will work on cubes of different sizes by +// changing this constant +#define CUBE_SIZE 8 +#define CUBE_BYTES 64 + +// If you change this to anything greather than 8, you also have +// change how the cube buffer works and probably all the functions +// in draw.c + +// Cube buffer +// Data from this array is loaded onto the cube for each duty cycle +volatile unsigned char cube[CUBE_SIZE][CUBE_SIZE]; + +// Framebuffer +// Animations that take a lot of time to compute are temporarily +// stored to this array, then loaded into cube[8][8] when the image +// is ready to be displayed +volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; + +// Some effects can render on different axis +// for example send pixels along an axis +// for better readability, we use the following predefined constants +#define AXIS_X 0x78 +#define AXIS_Y 0x79 +#define AXIS_Z 0x7a + +#endif + diff --git a/instructables/cube8/draw.c b/instructables/cube8/draw.c new file mode 100644 index 0000000..3cb30e0 --- /dev/null +++ b/instructables/cube8/draw.c @@ -0,0 +1,559 @@ +#include "draw.h" +#include "string.h" + +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] |= (1 << x); +} + +// Set a single voxel in the temporary cube buffer to ON +void tmpsetvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[z][y] |= (1 << x); +} + +// Set a single voxel to OFF +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] &= ~(1 << x); +} + +// Set a single voxel to OFF +void tmpclrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[z][y] &= ~(1 << x); +} + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[z][y] & (1 << x)) + { + return 1; + } else + { + return 0; + } + } else + { + return 0; + } +} + +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[z][y] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +// This is usefull for functions that uses for loops, +// to avoid infinite loops +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z=0 && z=0 && x=0 && x=0 && y=0 && y> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +// Draw a line between any coordinates in 3d space. +// Uses integer values for input, so dont expect smooth animations. +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + // For each step of x, y increments by: + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + +// Copies the contents of fb (temp cube buffer) into the rendering buffer +void tmp2cube (void) +{ + memcpy(cube, fb, 64); // copy the current cube into a buffer. +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < CUBE_SIZE; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < CUBE_SIZE; x++) + { + for (y = 0; y < CUBE_SIZE; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + +// Flip the cube 180 degrees along the y axis. +void mirror_y (void) +{ + unsigned char buffer[CUBE_SIZE][CUBE_SIZE]; + unsigned char x,y,z; + + memcpy(buffer, cube, CUBE_BYTES); // copy the current cube into a buffer. + + fill(0x00); + for (z=0; z +#include + +#include "cube.h" + +extern const unsigned char font[480]; + +// Red led on D2 +#define LED_RED 0x04 +// Green led D3 +#define LED_GREEN 0x08 +// Program led on D4 +#define LED_PGM 0x10; +// Leds connected to port D +#define LED_PORT PORTD +// Programming button on D5 +#define PGM_BTN 0x20 + +void delay_ms (uint16_t x); + + +void setvoxel(int x, int y, int z); +void clrvoxel(int x, int y, int z); +void tmpsetvoxel(int x, int y, int z); +void tmpclrvoxel(int x, int y, int z); + +unsigned char inrange(int x, int y, int z); +unsigned char getvoxel(int x, int y, int z); +void flpvoxel(int x, int y, int z); + +void altervoxel(int x, int y, int z, int state); +void setplane_z(int z); +void clrplane_z(int z); +void setplane_x(int x); +void clrplane_x(int x); +void setplane_y(int y); +void clrplane_y(int y); + +void setplane (char axis, unsigned char i); +void clrplane (char axis, unsigned char i); + +void setline_z(int x, int y, int z1, int z2); +void setline_x(int z, int y, int x1, int x2); +void setline_y(int z, int x, int y1, int y2); +void clrline_z(int x, int y, int z1, int z2); +void clrline_x(int z, int y, int x1, int x2); +void clrline_y(int z, int x, int y1, int y2); +void fill(unsigned char pattern); +void tmpfill(unsigned char pattern); +void line(int x1, int y1, int z1, int x2, int y2, int z2); +void drawchar(char chr, int offset, int layer); +char flipbyte(char byte); +void charfly (char chr, int direction, char axis, int mode, uint16_t delay); +void strfly (char * str, int direction, char axis, int mode, uint16_t delay, uint16_t pause); +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2); +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2); +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2); +char byteline (int start, int end); + +void tmp2cube (void); +void shift (char axis, int direction); + +void mirror_x(void); +void mirror_y(void); +void mirror_z(void); + +#endif + diff --git a/instructables/cube8/effect.c b/instructables/cube8/effect.c new file mode 100644 index 0000000..9e76d79 --- /dev/null +++ b/instructables/cube8/effect.c @@ -0,0 +1,1331 @@ +#include "effect.h" +#include "draw.h" +#include "font.h" +#include +#include + +void effect_test (void) +{ + + int x,y,i; + + for (i=0;i<1000;i++) + { + x = sin(i/8)*2+3.5; + y = cos(i/8)*2+3.5; + + setvoxel(x,y,1); + setvoxel(x,y,1); + delay_ms(1000); + fill(0x00); + } + +} + + +void effect_stringfly2(char * str) +{ + int x,y,i; + unsigned char chr[5]; + + while (*str) + { + font_getchar(*str++, chr); + + // Put a character on the back of the cube + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + setvoxel(7,x+2,y); + } + } + } + + // Shift the entire contents of the cube forward by 6 steps + // before placing the next character + for (i = 0; i<6; i++) + { + delay_ms(1000); + shift(AXIS_X,-1); + } + } + // Shift the last character out of the cube. + for (i = 0; i<8; i++) + { + delay_ms(1000); + shift(AXIS_X,-1); + } + +} + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay) +{ + int x, i, xyz; + for (x=0;x 7) + xyz = i-8; // at i > 7, i 8-15 becomes xyz 0-7. + + fill(0x00); delay_ms(1); + cli(); // disable interrupts while the cube is being rotated + box_wireframe(0,0,0,xyz,xyz,xyz); + + if (flip > 0) // upside-down + mirror_z(); + + if (rot == 1 || rot == 3) + mirror_y(); + + if (rot == 2 || rot == 3) + mirror_x(); + + sei(); // enable interrupts + delay_ms(delay); + fill(0x00); + } + } +} + +// Creates a wireframe box that shrinks or grows out from the center of the cube. +void effect_box_woopwoop (int delay, int grow) +{ + int i,ii; + + fill(0x00); + for (i=0;i<4;i++) + { + ii = i; + if (grow > 0) + ii = 3-i; + + box_wireframe(4+ii,4+ii,4+ii,3-ii,3-ii,3-ii); + delay_ms(delay); + fill(0x00); + } +} + + +// Send a voxel flying from one side of the cube to the other +// If its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + } else + { + ii = i; + clrvoxel(x,y,ii-1); + } + setvoxel(x,y,ii); + delay_ms(delay); + } +} + +// Send all the voxels from one side of the cube to the other +// Start at z and send to the opposite side. +// Sends in random order. +void sendplane_rand_z (unsigned char z, int delay, int wait) +{ + unsigned char loop = 16; + unsigned char x, y; + + fill(0x00); + + setplane_z(z); + + // Send voxels at random untill all 16 have crossed the cube. + while(loop) + { + x = rand()%4; + y = rand()%4; + if (getvoxel(x,y,z)) + { + // Send the voxel flying + sendvoxel_z(x,y,z,delay); + delay_ms(wait); + loop--; // one down, loop-- to go. when this hits 0, the loop exits. + } + } +} + +// For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 +// for n iterations, a random voxel is sent to the opposite side of where it was. +void sendvoxels_rand_z (int iterations, int delay, int wait) +{ + unsigned char x, y, last_x = 0, last_y = 0, i; + + fill(0x00); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + // Then set a voxel either at the top or at the bottom + // rand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. + setvoxel(x,y,((rand()%2)*7)); + } + } + + for (i=0;i=0;i--) + { + snake[i][0] = snake[i-1][0]; + snake[i][1] = snake[i-1][1]; + snake[i][2] = snake[i-1][2]; + } + snake[0][0] = x; + snake[0][1] = y; + snake[0][2] = z; + + for (i=0;i<8;i++) + { + setvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + delay_ms(delay); + for (i=0;i<8;i++) + { + clrvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + } + + + iterations--; + } +} + +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;iidestinations[px]) + { + positions[px]--; + } + } + + draw_positions_axis (AXIS_Z, positions,0); +} + +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert) +{ + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,px; + + // Set 64 random positions + for (i=0; i<64; i++) + { + positions[i] = 0; // Set all starting positions to 0 + destinations[i] = rand()%8; + } + + // Loop 8 times to allow destination 7 to reach all the way + for (i=0; i<8; i++) + { + // For every iteration, move all position one step closer to their destination + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + LED_PORT ^= LED_RED; + } + +} + + + + +// Light all leds layer by layer, +// then unset layer by layer +void effect_loadbar(int delay) +{ + fill(0x00); + + int z,y; + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0xff; + + delay_ms(delay); + } + + delay_ms(delay*3); + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0x00; + + delay_ms(delay); + } +} + + +// Set n number of voxels at random positions +void effect_random_sparkle_flash (int iterations, int voxels, int delay) +{ + int i; + int v; + for (i = 0; i < iterations; i++) + { + for (v=0;v<=voxels;v++) + setvoxel(rand()%8,rand()%8,rand()%8); + + delay_ms(delay); + fill(0x00); + } +} + +// blink 1 random voxel, blink 2 random voxels..... blink 20 random voxels +// and back to 1 again. +void effect_random_sparkle (void) +{ + int i; + + for (i=1;i<20;i++) + { + effect_random_sparkle_flash(5,i,200); + } + + for (i=20;i>=1;i--) + { + effect_random_sparkle_flash(5,i,200); + } + +} + +int effect_telcstairs_do(int x, int val, int delay) +{ + int y,z; + + for(y = 0, z = x; y <= z; y++, x--) + { + if(x < CUBE_SIZE && y < CUBE_SIZE) + { + cube[x][y] = val; + } + } + delay_ms(delay); + return z; +} + +void effect_telcstairs (int invert, int delay, int val) +{ + int x; + + if(invert) + { + for(x = CUBE_SIZE*2; x >= 0; x--) + { + x = effect_telcstairs_do(x,val,delay); + } + } + else + { + for(x = 0; x < CUBE_SIZE*2; x++) + { + x = effect_telcstairs_do(x,val,delay); + } + } +} + +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) +{ + int x, y, i,j,k, dx, dy; + int cube_size; + int origin = 0; + + if (direction == -1) + origin = 7; + + cube_size = 8-(size-1); + + x = rand()%cube_size; + y = rand()%cube_size; + + for (i=0; i 0 && (x+dx) < cube_size) + x += dx; + + if ((y+dy) > 0 && (y+dy) < cube_size) + y += dy; + + shift(axis, direction); + + + for (j=0; j=1;i--) + { + for (z=0;z<8;z++) + { + + state = getvoxel(((path[(i-1)]>>4) & 0x0f), (path[(i-1)] & 0x0f), z); + altervoxel(((path[i]>>4) & 0x0f), (path[i] & 0x0f), z, state); + } + } + for (i=0;i<8;i++) + clrvoxel(((path[0]>>4) & 0x0f), (path[0] & 0x0f),i); +} + +void effect_rand_patharound (int iterations, int delay) +{ + int z, dz, i; + z = 4; + unsigned char path[28]; + + font_getpath(0,path,28); + + for (i = 0; i < iterations; i++) + { + dz = ((rand()%3)-1); + z += dz; + + if (z>7) + z = 7; + + if (z<0) + z = 0; + + effect_pathmove(path, 28); + setvoxel(0,7,z); + delay_ms(delay); + } +} + +void effect_pathspiral (int iterations, int delay) +{ + int z, i; + z = 4; + unsigned char path[16]; + + font_getpath(1,path,16); + + for (i = 0; i < iterations; i++) + { + setvoxel(4,0,i%8); + delay_ms(delay); + effect_pathmove(path, 28); + + } +} + +void effect_path_text (int delay, char *str) +{ + int z, i,ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + unsigned char chr[5]; + unsigned char stripe; + + while (*str) + { + //charfly(*str++, direction, axis, mode, delay); + + + font_getchar(*str++, chr); + + for (ii=0;ii<5;ii++) + { + //stripe = pgm_read_byte(&font[(chr*5)+ii]); + stripe = chr[ii]; + + for (z=0;z<8;z++) + { + if ((stripe>>(7-z)) & 0x01) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + effect_pathmove(path, 28); + delay_ms(delay); + } + + effect_pathmove(path, 28); + delay_ms(delay); + } + for (i=0;i<28;i++) + { + effect_pathmove(path, 28); + delay_ms(delay); + } +} + +void effect_path_bitmap (int delay, char bitmap, int iterations) +{ + int z, i, ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + for (i=0; i < iterations; i++) + { + for (ii=0;ii<8;ii++) + { + for (z=0;z<8;z++) + { + if (font_getbitmappixel(bitmap,(7-z),ii)) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + delay_ms(delay); + effect_pathmove(path, 28); + } + + for (ii=0;ii<20;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } + } + for (ii=0;ii<10;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } +} + + + diff --git a/instructables/cube8/effect.h b/instructables/cube8/effect.h new file mode 100644 index 0000000..3398082 --- /dev/null +++ b/instructables/cube8/effect.h @@ -0,0 +1,54 @@ +#ifndef EFFECT_H +#define EFFECT_H + +#include +#include +#include + +#include "cube.h" + +void effect_box_shrink_grow (int iterations, int rot, int flip, uint16_t delay); + +void effect_hollow_1 (int iterations, uint16_t delay); +void effect_hollow_2 (int iterations, int corner, uint16_t delay); + +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay); +void sendplane_rand_z (unsigned char z, int delay, int wait); +void sendvoxels_rand_z (int iterations, int delay, int wait); +void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode); + +void effect_planboing (int plane, int speed); + +void effect_random_filler (int delay, int state); + +void effect_z_updown (int iterations, int delay); +void effect_rain(int iterations); +void effect_stringfly2(char * str); +void effect_blinky2(void); +void draw_positions_axis (char axis, unsigned char positions[64], int invert); +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert); + +void effect_random_sparkle_flash (int iterations, int voxels, int delay); +void effect_random_sparkle (void); + +void effect_box_woopwoop (int delay, int grow); +void effect_telcstairs (int invert, int delay, int val); +void effect_loadbar(int delay); + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode); +void effect_smileyspin (int count, int delay, char bitmap); +void effect_pathmove (unsigned char *path, int length); +void effect_rand_patharound (int iterations, int delay); +void effect_pathspiral (int iterations, int delay); +void effect_path_text (int delay, char *str); +void effect_path_bitmap (int delay, char bitmap, int iterations); +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay); + +void effect_z_updown (int iterations, int delay); +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis); + + + + +#endif + diff --git a/instructables/cube8/font.c b/instructables/cube8/font.c new file mode 100644 index 0000000..c67b098 --- /dev/null +++ b/instructables/cube8/font.c @@ -0,0 +1,104 @@ +#include "font.h" +#include + +volatile const unsigned char font[455] EEMEM = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] EEMEM = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] PROGMEM = {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + for (i = 0; i < length; i++) + destination[i] = pgm_read_byte(&paths[i+offset]); +} + +void font_getchar (char chr, unsigned char dst[5]) +{ + uint8_t i; + chr -= 32; // our bitmap font starts at ascii char 32. + + for (i = 0; i < 5; i++) + dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&font[(chr*5)+i]); +} + +void font_getbitmap (char bitmap, unsigned char dst[8]) +{ + int i; + + for (i = 0; i < 8; i++) + dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&bitmaps[(uint8_t)bitmap][(uint8_t)i]); + +} + +unsigned char font_getbitmappixel ( char bitmap, char x, char y) +{ + uint8_t tmp = eeprom_read_byte((uint8_t*)&bitmaps[(uint8_t)bitmap][(uint8_t)x]); + return (tmp >> y) & 0x01; +} + + + + diff --git a/instructables/cube8/font.h b/instructables/cube8/font.h new file mode 100644 index 0000000..006414b --- /dev/null +++ b/instructables/cube8/font.h @@ -0,0 +1,13 @@ +#ifndef FONT_H +#define FONT_H + +#include + +void font_getchar (char chr, unsigned char dst[5]); +void font_getpath (unsigned char path, unsigned char *destination, int length); +void font_getbitmap (char bitmap, unsigned char dst[8]); +unsigned char font_getbitmappixel ( char bitmap, char x, char y); + + + +#endif diff --git a/instructables/cube8/fuses.txt b/instructables/cube8/fuses.txt new file mode 100644 index 0000000..f24e5f5 --- /dev/null +++ b/instructables/cube8/fuses.txt @@ -0,0 +1,6 @@ + +lfuse: 0b11101111 +hfuse: 0b11001001 + + + diff --git a/instructables/cube8/gameoflife.c b/instructables/cube8/gameoflife.c new file mode 100644 index 0000000..0a3683a --- /dev/null +++ b/instructables/cube8/gameoflife.c @@ -0,0 +1,135 @@ +#include +#include "gameoflife.h" +#include "cube.h" +#include "draw.h" + +// Game of Life for the 4x4x4 and 8x8x8 led cube + +#define GOL_CREATE_MIN 3 +#define GOL_CREATE_MAX 3 + +#define GOL_TERMINATE_LONELY 1 +#define GOL_TERMINATE_CROWDED 4 + +#define GOL_X 8 +#define GOL_Y 8 +#define GOL_Z 8 + +#define GOL_WRAP 0x01 + + + +void gol_play (int iterations, uint16_t delay) +{ + int i; + + for (i = 0; i < iterations; i++) + { + LED_PORT ^= LED_GREEN; + + gol_nextgen(); + + if (gol_count_changes() == 0) + return; + + tmp2cube(); + + delay_ms(delay); + + //led_red(1); + } +} + +void gol_nextgen (void) +{ + int x,y,z; + unsigned char neigh; + + tmpfill(0x00); + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + for (z = 0; z < GOL_Z; z++) + { + neigh = gol_count_neighbors(x, y, z); + + // Current voxel is alive. + if (getvoxel(x,y,z) == 0x01) + { + if (neigh <= GOL_TERMINATE_LONELY) + { + tmpclrvoxel(x,y,z); + } else if(neigh >= GOL_TERMINATE_CROWDED) + { + tmpclrvoxel(x,y,z); + } else + { + tmpsetvoxel(x,y,z); + } + // Current voxel is dead. + } else + { + if (neigh >= GOL_CREATE_MIN && neigh <= GOL_CREATE_MAX) + tmpsetvoxel(x,y,z); + } + } + } + } +} + +unsigned char gol_count_neighbors (int x, int y, int z) +{ + int ix, iy, iz; // offset 1 in each direction in each dimension + int nx, ny, nz; // neighbours address. + + unsigned char neigh = 0; // number of alive neighbours. + + for (ix = -1; ix < 2; ix++) + { + for (iy = -1; iy < 2; iy++) + { + for (iz = -1; iz < 2; iz++) + { + // Your not your own neighbour, exclude 0,0,0, offset. + if ( !(ix == 0 && iy == 0 && iz == 0) ) + { + if (GOL_WRAP == 0x01) + { + nx = (x+ix)%GOL_X; + ny = (y+iy)%GOL_Y; + nz = (z+iz)%GOL_Z; + } else + { + nx = x+ix; + ny = y+iy; + nz = z+iz; + } + + if ( getvoxel(nx, ny, nz) ) + neigh++; + } + } + } + } + return neigh; +} + +int gol_count_changes (void) +{ + int x,y; + int i = 0; + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + if (fb[x][y] != cube[x][y]) + i++; + } + } + + return i; +} + diff --git a/instructables/cube8/gameoflife.h b/instructables/cube8/gameoflife.h new file mode 100644 index 0000000..e53b900 --- /dev/null +++ b/instructables/cube8/gameoflife.h @@ -0,0 +1,9 @@ +#ifndef GOL_H +#define GOL_H + +void gol_play (int iterations, uint16_t delay); +unsigned char gol_count_neighbors (int x, int y, int z); +void gol_nextgen (void); +int gol_count_changes (void); + +#endif diff --git a/instructables/cube8/launch_effect.c b/instructables/cube8/launch_effect.c new file mode 100644 index 0000000..01b56c6 --- /dev/null +++ b/instructables/cube8/launch_effect.c @@ -0,0 +1,182 @@ +#include "launch_effect.h" +#include "effect.h" +#include "draw.h" +#include "gameoflife.h" + +void launch_effect (int effect) +{ + int i; + unsigned char ii; + + fill(0x00); + + switch (effect) + { + case 0x00: + effect_rain(100); + break; + + + case 1: + sendvoxels_rand_z(20,220,2000); + break; + + case 2: + effect_random_filler(5,1); + effect_random_filler(5,0); + effect_random_filler(5,1); + effect_random_filler(5,0); + break; + + case 3: + effect_z_updown(20,1000); + break; + + case 4: + effect_wormsqueeze (2, AXIS_Z, -1, 100, 1000); + break; + + case 5: + effect_blinky2(); + break; + + case 6: + for (ii=0;ii<8;ii++) + { + effect_box_shrink_grow (1, ii%4, ii & 0x04, 450); + } + + effect_box_woopwoop(800,0); + effect_box_woopwoop(800,1); + effect_box_woopwoop(800,0); + effect_box_woopwoop(800,1); + break; + + case 7: + effect_planboing (AXIS_Z, 400); + effect_planboing (AXIS_X, 400); + effect_planboing (AXIS_Y, 400); + effect_planboing (AXIS_Z, 400); + effect_planboing (AXIS_X, 400); + effect_planboing (AXIS_Y, 400); + fill(0x00); + break; + + case 8: + fill(0x00); + effect_telcstairs(0,800,0xff); + effect_telcstairs(0,800,0x00); + effect_telcstairs(1,800,0xff); + effect_telcstairs(1,800,0xff); + break; + + case 9: + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,1); + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,1); + effect_axis_updown_randsuspend(AXIS_X, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_X, 550,5000,1); + effect_axis_updown_randsuspend(AXIS_Y, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_Y, 550,5000,1); + break; + + case 10: + effect_loadbar(700); + break; + + case 11: + effect_wormsqueeze (1, AXIS_Z, 1, 100, 1000); + break; + + + case 12: + effect_stringfly2("INSTRUCTABLES"); + break; + + case 13: + fill(0x00); + // Create a random starting point for the Game of Life effect. + for (i = 0; i < 20;i++) + { + setvoxel(rand()%4,rand()%4,rand()%4); + } + + gol_play(20, 400); + break; + + case 14: + effect_boxside_randsend_parallel (AXIS_Z, 0 , 200,1); + delay_ms(1500); + effect_boxside_randsend_parallel (AXIS_Z, 1 , 200,1); + delay_ms(1500); + + effect_boxside_randsend_parallel (AXIS_Z, 0 , 200,2); + delay_ms(1500); + effect_boxside_randsend_parallel (AXIS_Z, 1 , 200,2); + delay_ms(1500); + + effect_boxside_randsend_parallel (AXIS_Y, 0 , 200,1); + delay_ms(1500); + effect_boxside_randsend_parallel (AXIS_Y, 1 , 200,1); + delay_ms(1500); + break; + + case 15: + boingboing(250, 600, 0x01, 0x02); + break; + + case 16: + effect_smileyspin(2,1000,0); + break; + + case 17: + effect_pathspiral(100,500); + break; + + case 18: + effect_path_bitmap(700,2,3); + break; + + case 19: + effect_smileyspin(2,1000,1); + break; + + case 20: + effect_path_text(1000,"TG"); + break; + + case 21: + effect_rand_patharound(200,500); + break; + + case 22: + effect_wormsqueeze (1, AXIS_Z, -1, 100, 1000); + break; + + case 23: + effect_smileyspin(2,1000,2); + break; + + case 24: + effect_random_sparkle(); + break; + + case 25: + effect_wormsqueeze (1, AXIS_Z, -1, 100, 1000); + break; + + case 26: + boingboing(250, 600, 0x01, 0x03); + break; + + // In case the effect number is out of range: + default: + effect_stringfly2("FAIL"); + break; + + + + } +} + diff --git a/instructables/cube8/launch_effect.h b/instructables/cube8/launch_effect.h new file mode 100644 index 0000000..072822a --- /dev/null +++ b/instructables/cube8/launch_effect.h @@ -0,0 +1,15 @@ +#ifndef LAUNCH_H +#define LAUNCH_H + +#include "cube.h" + +// Total number of effects +// Used in the main loop to loop through all the effects one by bone. +// Set this number one higher than the highest number inside switch() +// in launch_effect() in launch_effect.c +#define EFFECTS_TOTAL 27 + +void launch_effect (int effect); + +#endif + diff --git a/instructables/cube8/lisence.txt b/instructables/cube8/lisence.txt new file mode 100644 index 0000000..812dab5 --- /dev/null +++ b/instructables/cube8/lisence.txt @@ -0,0 +1,5 @@ +Created by Christian Moen (christian@lynet.no) and StÃ¥le Kristoffersen (staalekb@ifi.uio.no) 2011. + +Lisence: http://creativecommons.org/licenses/by-nc-sa/3.0/ + +Happy hacking!! :D diff --git a/instructables/cube8/main.c b/instructables/cube8/main.c new file mode 100644 index 0000000..be31861 --- /dev/null +++ b/instructables/cube8/main.c @@ -0,0 +1,285 @@ +/* + * Code to controll an 8x8x8 ledcube using avr + * http://www.instructables.com/id/Led-Cube-8x8x8/ + * See lisence.txt for lisence. + */ +#include "main.h" +#include "effect.h" +#include "launch_effect.h" +#include "draw.h" + +// Main loop +// the AVR enters this function at boot time +int main (void) +{ + + // This function initiates IO ports, timers, interrupts and + // serial communications + ioinit(); + + // This variable specifies which layer is currently being drawn by the + // cube interrupt routine. We assign a value to it to make sure it's not >7. + current_layer = 1; + + int i; + + // Boot wait + // This function serves 3 purposes + // 1) We delay starting up any interrupts, as drawing the cube causes a lot + // noise that can confuse the ISP programmer. + // 2) Listen for button press. One button means go into rs232 mode, + // The other means go into autonomous mode and start doing stuff. + // 3) Random seed. The bootwait function counts forever from 0 to 255. + // Whenever you press the button, this counter stops, and the number it + // stopped at is used as a random seed. This ensures true randomness at + // every boot. Without this (or some similar process) the cube would + // produce the same "random" sequence every time + i = bootwait(); + + // Enable interrupts + // This starts the routine that draws the cube content + sei(); + + // Result for bootwait() is 2: + // Go to rs232 mode. this function loops forever. + if (i == 2) + { + rs232(); + } + + // Result of bootwait() is something other than 2: + // Do awesome effects. Loop forever. + while (1) + { + // Show the effects in a predefined order + for (i=0; i> 8; + UBRRL = MYUBRR; + // UCSRC - USART control register + // bit 7-6 sync/ascyn 00 = async, 01 = sync + // bit 5-4 parity 00 = disabled + // bit 3 stop bits 0 = 1 bit 1 = 2 bits + // bit 2-1 frame length 11 = 8 + // bit 0 clock polarity = 0 + UCSRC = 0b10000110; + // Enable RS232, tx and rx + UCSRB = (1< +#include +#include +#include + +#include "cube.h" + +// Define USART stuff +#define FOSC 14745600 +#define BAUD 38400 +#define MYUBRR (((((FOSC * 10) / (16L * BAUD)) + 5) / 10) - 1) + +#define DATA_BUS PORTA +#define LAYER_SELECT PORTC +#define LATCH_ADDR PORTB +#define LATCH_MASK 0x07 +#define LATCH_MASK_INV 0xf8 +#define OE_PORT PORTB +#define OE_MASK 0x08 + +// Red led on D2 +#define LED_RED 0x04 +// Green led D3 +#define LED_GREEN 0x08 +// Program led on D4 +#define LED_PGM 0x10; +// Leds connected to port D +#define LED_PORT PORTD +// Rs232 button on D5 +#define RS232_BTN 0x20 +// Main button on B4 +#define MAIN_BTN 0x10 + +void ioinit (void); +void bootmsg (void); + +volatile unsigned char current_layer; +volatile unsigned char pgm_mode; +void rs232(void); +unsigned int bootwait (void); +#endif + diff --git a/instructables/cube_pc/3d.c b/instructables/cube_pc/3d.c new file mode 100644 index 0000000..e1ddeaf --- /dev/null +++ b/instructables/cube_pc/3d.c @@ -0,0 +1,344 @@ +#include "draw.h" +#include "draw_3d.h" +#include "3d.h" +#include +#include +#include +#include +#include + +void linespin (int iterations, int delay) +{ + float top_x, top_y, top_z, bot_x, bot_y, bot_z, sin_base; + float center_x, center_y; + + center_x = 4; + center_y = 4; + + int i, z; + for (i=0;idiameter && distance +#include +#include "cube.h" +#include +#include +#include + +void cube_push (unsigned char data[8][8]) +{ + int x,y,i; + + i= 0; + + unsigned char buffer[200]; + + buffer[i++] = 0xff; // escape + buffer[i++] = 0x00; // reset to 0,0 + + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + buffer[i++] = data[x][y]; + if (data[x][y] == 0xff) + { + buffer[i++] = data[x][y]; + } + } + } + + write(tty,&buffer,i); +} + +int cube_init (const char* tty_path) +{ + + //FILE *ftty; + + //ftty = fopen("/dev/ttyUSB0","a"); + + + struct termios io; + + //char *tty_path = "/dev/ttyUSB0"; + //char *tty_path = "/dev/ttyUSB1"; + + //tty = open(tty_path, O_RDWR | O_NOCTTY | O_NDELAY); // <- ORIGINAL + tty = open(tty_path, O_RDWR); + + + if (tty <0) {perror(tty_path); exit(-1); } + + bzero(&io, sizeof(io)); + //io.c_cflag = B2400 | CRTSCTS | CS8 | CLOCAL | CREAD; + //io.c_cflag = B2400 | CRTSCTS | PARENB | CS8 | CLOCAL | CREAD; + io.c_cflag = B38400 | PARENB | CS8 | CLOCAL | CREAD; + //io.c_cflag = B19200 | PARENB | CS8 | CLOCAL | CREAD; + io.c_iflag = IGNPAR; + io.c_oflag = 0; + + // set input mode (non-canonical, no echo,...) + io.c_lflag &= ~OPOST; + //io.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + + io.c_cc[VTIME] = 0; // inter-character timer unused + io.c_cc[VMIN] = 0; // blocking read until 5 chars received + + // Flush buffer + tcflush(tty, TCIFLUSH); + + //cfsetospeed(&io, B1000000); + //cfsetispeed(&io, B1000000); + + // write config to tty + tcsetattr(tty,TCSANOW,&io); + + + //fcntl(tty, F_SETFL, 0); + + + + return 1; +} diff --git a/instructables/cube_pc/cube.h b/instructables/cube_pc/cube.h new file mode 100644 index 0000000..bac730e --- /dev/null +++ b/instructables/cube_pc/cube.h @@ -0,0 +1,25 @@ + +#define AXIS_X 0x78 +#define AXIS_Y 0x79 +#define AXIS_Z 0x7a + +#define CUBE_SIZE 8 + +int LED_PORT; +int LED_RED; +int LED_GREEN; + +volatile unsigned char cube[8][8]; +volatile unsigned char rs232_cube[8][8]; +unsigned char fb[8][8]; + +int tty; + +// FILE *ftty; + +// func dsfs +void cube_putchar (unsigned char data); +int cube_init (const char* tty_path); +void cube_push (unsigned char data[8][8]); + + diff --git a/instructables/cube_pc/draw.c b/instructables/cube_pc/draw.c new file mode 100644 index 0000000..549d109 --- /dev/null +++ b/instructables/cube_pc/draw.c @@ -0,0 +1,682 @@ +#include "draw.h" +#include "draw_3d.h" +#include + + +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] |= (1 << x); + +} + +void tmpsetvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[y][z] |= (1 << x); +} + +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] &= ~(1 << x); +} + +void tmpclrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + fb[y][z] &= ~(1 << x); +} + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < 8 && y >= 0 && y < 8 && z >= 0 && z < 8) + { + return 0x01; + } else + { + // One of the coordinates was outside the cube. + return 0x00; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[y][z] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[y][z] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[i][z] = 0xff; + } +} + + +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[i][z] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[y][z] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[y][z] = 0x00; + } +} + + +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] = pattern; + } + } +} + +void tmpfill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + fb[z][y] = pattern; + } + } +} + + +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + cube[iy][iz] |= byteline(x1,x2); + } + } + +} + +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + if (iy == y1 || iy == y2 || iz == z1 || iz == z2) + { + cube[iy][iz] = byteline(x1,x2); + } else + { + cube[iy][iz] |= ((0x01 << x1) | (0x01 << x2)); + } + } + } + +} + + +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + // Lines along X axis + cube[y1][z1] = byteline(x1,x2); + cube[y1][z2] = byteline(x1,x2); + cube[y2][z1] = byteline(x1,x2); + cube[y2][z2] = byteline(x1,x2); + + // Lines along Y axis + for (iy=y1;iy<=y2;iy++) + { + setvoxel(x1,iy,z1); + setvoxel(x1,iy,z2); + setvoxel(x2,iy,z1); + setvoxel(x2,iy,z2); + } + + // Lines along Z axis + for (iz=z1;iz<=z2;iz++) + { + setvoxel(x1,y1,iz); + setvoxel(x1,y2,iz); + setvoxel(x2,y1,iz); + setvoxel(x2,y2,iz); + } + +} + +// Returns a byte with a row of 1's drawn in it. +// byteline(2,5) gives 0b00111100 +char byteline (int start, int end) +{ + return ((0xff<> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +void delay_ms(int x) +{ + memcpy(rs232_cube, cube, 64); + usleep(x*80); +} + +// Copies the contents of fb (temp cube buffer) into the rendering buffer +void tmp2cube (void) +{ + int y, z; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[y][z] = fb[y][z]; + } + } +} + +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,x,y,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + + + +void line_3d (int x1, int y1, int z1, int x2, int y2, int z2) +{ + int i, dx, dy, dz, l, m, n, x_inc, y_inc, z_inc, + err_1, err_2, dx2, dy2, dz2; + int pixel[3]; + pixel[0] = x1; + pixel[1] = y1; + pixel[2] = z1; + dx = x2 - x1; + dy = y2 - y1; + dz = z2 - z1; + x_inc = (dx < 0) ? -1 : 1; + l = abs(dx); + y_inc = (dy < 0) ? -1 : 1; + m = abs(dy); + z_inc = (dz < 0) ? -1 : 1; + n = abs(dz); + dx2 = l << 1; + dy2 = m << 1; + dz2 = n << 1; + if ((l >= m) && (l >= n)) { + err_1 = dy2 - l; + err_2 = dz2 - l; + for (i = 0; i < l; i++) { + //PUT_PIXEL(pixel); + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dx2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dx2; + } + err_1 += dy2; + err_2 += dz2; + pixel[0] += x_inc; + } + } else if ((m >= l) && (m >= n)) { + err_1 = dx2 - m; + err_2 = dz2 - m; + for (i = 0; i < m; i++) { + //PUT_PIXEL(pixel); + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[0] += x_inc; + err_1 -= dy2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dy2; + } + err_1 += dx2; + err_2 += dz2; + pixel[1] += y_inc; + } + } else { + err_1 = dy2 - n; + err_2 = dx2 - n; + for (i = 0; i < n; i++) { + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dz2; + } + if (err_2 > 0) { + pixel[0] += x_inc; + err_2 -= dz2; + } + err_1 += dy2; + err_2 += dx2; + pixel[2] += z_inc; + } + } + setvoxel(pixel[0],pixel[1],pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); +} + + +void line_3d_float (vertex point1, vertex point2) +{ + float x1, y1, z1, x2, y2, z2; + + x1 = point1.x; + y1 = point1.y; + z1 = point1.z; + x2 = point2.x; + y2 = point2.y; + z2 = point2.z; + + + float i; + float dx, dy, dz, l, m, n, x_inc, y_inc, z_inc, + err_1, err_2, dx2, dy2, dz2; + float pixel[3]; + pixel[0] = x1; + pixel[1] = y1; + pixel[2] = z1; + dx = x2 - x1; + dy = y2 - y1; + dz = z2 - z1; + x_inc = (dx < 0) ? -1 : 1; + l = abs(dx); + y_inc = (dy < 0) ? -1 : 1; + m = abs(dy); + z_inc = (dz < 0) ? -1 : 1; + n = abs(dz); + dx2 = l*l; + dy2 = m*m; + dz2 = n*n; + if ((l >= m) && (l >= n)) { + err_1 = dy2 - l; + err_2 = dz2 - l; + for (i = 0; i < l; i++) { + //PUT_PIXEL(pixel); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dx2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dx2; + } + err_1 += dy2; + err_2 += dz2; + pixel[0] += x_inc; + } + } else if ((m >= l) && (m >= n)) { + err_1 = dx2 - m; + err_2 = dz2 - m; + for (i = 0; i < m; i++) { + //PUT_PIXEL(pixel); + //setvoxel(pixel[0]/scale,pixel[1]/scale,pixel[2]/scale); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + if (err_1 > 0) { + pixel[0] += x_inc; + err_1 -= dy2; + } + if (err_2 > 0) { + pixel[2] += z_inc; + err_2 -= dy2; + } + err_1 += dx2; + err_2 += dz2; + pixel[1] += y_inc; + } + } else { + err_1 = dy2 - n; + err_2 = dx2 - n; + for (i = 0; i < n; i++) { + //setvoxel(pixel[0]/scale,pixel[1]/scale,pixel[2]/scale); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); + if (err_1 > 0) { + pixel[1] += y_inc; + err_1 -= dz2; + } + if (err_2 > 0) { + pixel[0] += x_inc; + err_2 -= dz2; + } + err_1 += dy2; + err_2 += dx2; + pixel[2] += z_inc; + } + } + //setvoxel(pixel[0]/scale,pixel[1]/scale,pixel[2]/scale); + setvoxel((int)pixel[0],(int)pixel[1],(int)pixel[2]); + //printf("Setting %i %i %i \n", pixel[0],pixel[1],pixel[2]); + //PUT_PIXEL(pixel); +} + +// Flip the cube 180 degrees along the x axis +void mirror_x (void) +{ + unsigned char buffer[8][8]; + unsigned char y,z; + + memcpy(buffer, cube, 64); // copy the current cube into a buffer. + + fill(0x00); + + for (z=0; z<8; z++) + { + for (y=0; y<8; y++) + { + cube[y][z] = flipbyte(buffer[y][z]); + } + } +} +// Flip the cube 180 degrees along the y axis. +void mirror_y (void) +{ + unsigned char buffer[8][8]; + unsigned char x,y,z; + + memcpy(buffer, cube, 64); // copy the current cube into a buffer. + + fill(0x00); + for (z=0; z<8; z++) + { + for (y=0; y<8; y++) + { + for (x=0; x<8; x++) + { + if (buffer[y][z] & (0x01 << x)) + setvoxel(x,7-y,z); + } + } + } + +} +// flip the cube 180 degrees along the z axis +void mirror_z (void) +{ + unsigned char buffer[8][8]; + unsigned char z, y; + + memcpy(buffer, cube, 64); // copy the current cube into a buffer. + + for (y=0; y<8; y++) + { + for (z=0; z<8; z++) + { + cube[7-z][y] = buffer[y][z]; + } + } +} + + + + diff --git a/instructables/cube_pc/draw.h b/instructables/cube_pc/draw.h new file mode 100644 index 0000000..a1c7e85 --- /dev/null +++ b/instructables/cube_pc/draw.h @@ -0,0 +1,52 @@ +#ifndef DRAW_H +#define DRAW_H + + +#include "cube.h" + +extern const unsigned char font[480]; + + + +void delay_ms (int x); + + +void setvoxel(int x, int y, int z); +void clrvoxel(int x, int y, int z); +void tmpsetvoxel(int x, int y, int z); +void tmpclrvoxel(int x, int y, int z); + +unsigned char inrange(int x, int y, int z); +unsigned char getvoxel(int x, int y, int z); +void flpvoxel(int x, int y, int z); + +void altervoxel(int x, int y, int z, int state); +void setplane_z(int z); +void clrplane_z(int z); +void setplane_x(int x); +void clrplane_x(int x); +void setplane_y(int y); +void clrplane_y(int y); +void setline_z(int x, int y, int z1, int z2); +void setline_x(int z, int y, int x1, int x2); +void setline_y(int z, int x, int y1, int y2); +void clrline_z(int x, int y, int z1, int z2); +void clrline_x(int z, int y, int x1, int x2); +void clrline_y(int z, int x, int y1, int y2); +void fill(unsigned char pattern); +void tmpfill(unsigned char pattern); +void line(int x1, int y1, int z1, int x2, int y2, int z2); +void drawchar(char chr, int offset, int layer); +char flipbyte(char byte); +void charfly (char chr, int direction, char axis, int mode, int delay); +void strfly (char * str, int direction, char axis, int mode, int delay, int pause); +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2); +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2); +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2); +char byteline (int start, int end); + +void tmp2cube (void); +void shift (char axis, int direction); + +#endif + diff --git a/instructables/cube_pc/draw.lst b/instructables/cube_pc/draw.lst new file mode 100644 index 0000000..8881094 --- /dev/null +++ b/instructables/cube_pc/draw.lst @@ -0,0 +1,2472 @@ + 1 .file "draw.c" + 2 __SREG__ = 0x3f + 3 __SP_H__ = 0x3e + 4 __SP_L__ = 0x3d + 5 __CCP__ = 0x34 + 6 __tmp_reg__ = 0 + 7 __zero_reg__ = 1 + 8 .global __do_copy_data + 9 .global __do_clear_bss + 17 .Ltext0: + 18 .global setvoxel + 20 setvoxel: + 21 .LFB2: + 22 .LM1: + 23 .LVL0: + 24 /* prologue: function */ + 25 /* frame size = 0 */ + 26 0000 DC01 movw r26,r24 + 27 .LBB94: + 28 .LBB95: + 29 .LM2: + 30 0002 8830 cpi r24,8 + 31 0004 9105 cpc r25,__zero_reg__ + 32 0006 00F4 brsh .L3 + 33 0008 77FD sbrc r23,7 + 34 000a 00C0 rjmp .L3 + 35 000c 6830 cpi r22,8 + 36 000e 7105 cpc r23,__zero_reg__ + 37 0010 04F4 brge .L3 + 38 0012 57FD sbrc r21,7 + 39 0014 00C0 rjmp .L3 + 40 0016 4830 cpi r20,8 + 41 0018 5105 cpc r21,__zero_reg__ + 42 001a 04F4 brge .L3 + 43 .LBE95: + 44 .LBE94: + 45 .LM3: + 46 001c FA01 movw r30,r20 + 47 001e 83E0 ldi r24,3 + 48 0020 EE0F 1: lsl r30 + 49 0022 FF1F rol r31 + 50 0024 8A95 dec r24 + 51 0026 01F4 brne 1b + 52 .LVL1: + 53 0028 E60F add r30,r22 + 54 002a F71F adc r31,r23 + 55 002c E050 subi r30,lo8(-(cube)) + 56 002e F040 sbci r31,hi8(-(cube)) + 57 0030 2081 ld r18,Z + 58 0032 81E0 ldi r24,lo8(1) + 59 0034 90E0 ldi r25,hi8(1) + 60 0036 00C0 rjmp 2f + 61 0038 880F 1: lsl r24 + 62 003a 991F rol r25 + 63 003c AA95 2: dec r26 + 64 003e 02F4 brpl 1b + 65 0040 282B or r18,r24 + 66 0042 2083 st Z,r18 + 67 .LVL2: + 68 .L3: + 69 0044 0895 ret + 70 .LFE2: + 72 .global tmpsetvoxel + 74 tmpsetvoxel: + 75 .LFB3: + 76 .LM4: + 77 .LVL3: + 78 /* prologue: function */ + 79 /* frame size = 0 */ + 80 0046 DC01 movw r26,r24 + 81 .LBB96: + 82 .LBB97: + 83 .LM5: + 84 0048 8830 cpi r24,8 + 85 004a 9105 cpc r25,__zero_reg__ + 86 004c 00F4 brsh .L6 + 87 004e 77FD sbrc r23,7 + 88 0050 00C0 rjmp .L6 + 89 0052 6830 cpi r22,8 + 90 0054 7105 cpc r23,__zero_reg__ + 91 0056 04F4 brge .L6 + 92 0058 57FD sbrc r21,7 + 93 005a 00C0 rjmp .L6 + 94 005c 4830 cpi r20,8 + 95 005e 5105 cpc r21,__zero_reg__ + 96 0060 04F4 brge .L6 + 97 .LBE97: + 98 .LBE96: + 99 .LM6: + 100 0062 FA01 movw r30,r20 + 101 0064 93E0 ldi r25,3 + 102 0066 EE0F 1: lsl r30 + 103 0068 FF1F rol r31 + 104 006a 9A95 dec r25 + 105 006c 01F4 brne 1b + 106 006e E60F add r30,r22 + 107 0070 F71F adc r31,r23 + 108 0072 E050 subi r30,lo8(-(fb)) + 109 0074 F040 sbci r31,hi8(-(fb)) + 110 0076 2081 ld r18,Z + 111 0078 81E0 ldi r24,lo8(1) + 112 007a 90E0 ldi r25,hi8(1) + 113 .LVL4: + 114 007c 00C0 rjmp 2f + 115 007e 880F 1: lsl r24 + 116 0080 991F rol r25 + 117 0082 AA95 2: dec r26 + 118 0084 02F4 brpl 1b + 119 0086 282B or r18,r24 + 120 0088 2083 st Z,r18 + 121 .LVL5: + 122 .L6: + 123 008a 0895 ret + 124 .LFE3: + 126 .global clrvoxel + 128 clrvoxel: + 129 .LFB4: + 130 .LM7: + 131 .LVL6: + 132 /* prologue: function */ + 133 /* frame size = 0 */ + 134 008c DC01 movw r26,r24 + 135 .LBB98: + 136 .LBB99: + 137 .LM8: + 138 008e 8830 cpi r24,8 + 139 0090 9105 cpc r25,__zero_reg__ + 140 0092 00F4 brsh .L9 + 141 0094 77FD sbrc r23,7 + 142 0096 00C0 rjmp .L9 + 143 0098 6830 cpi r22,8 + 144 009a 7105 cpc r23,__zero_reg__ + 145 009c 04F4 brge .L9 + 146 009e 57FD sbrc r21,7 + 147 00a0 00C0 rjmp .L9 + 148 00a2 4830 cpi r20,8 + 149 00a4 5105 cpc r21,__zero_reg__ + 150 00a6 04F4 brge .L9 + 151 .LBE99: + 152 .LBE98: + 153 .LM9: + 154 00a8 FA01 movw r30,r20 + 155 00aa 23E0 ldi r18,3 + 156 00ac EE0F 1: lsl r30 + 157 00ae FF1F rol r31 + 158 00b0 2A95 dec r18 + 159 00b2 01F4 brne 1b + 160 00b4 E60F add r30,r22 + 161 00b6 F71F adc r31,r23 + 162 00b8 E050 subi r30,lo8(-(cube)) + 163 00ba F040 sbci r31,hi8(-(cube)) + 164 00bc 2081 ld r18,Z + 165 00be 81E0 ldi r24,lo8(1) + 166 00c0 90E0 ldi r25,hi8(1) + 167 .LVL7: + 168 00c2 00C0 rjmp 2f + 169 00c4 880F 1: lsl r24 + 170 00c6 991F rol r25 + 171 00c8 AA95 2: dec r26 + 172 00ca 02F4 brpl 1b + 173 00cc 8095 com r24 + 174 00ce 8223 and r24,r18 + 175 00d0 8083 st Z,r24 + 176 .LVL8: + 177 .L9: + 178 00d2 0895 ret + 179 .LFE4: + 181 .global tmpclrvoxel + 183 tmpclrvoxel: + 184 .LFB5: + 185 .LM10: + 186 .LVL9: + 187 /* prologue: function */ + 188 /* frame size = 0 */ + 189 00d4 DC01 movw r26,r24 + 190 .LBB100: + 191 .LBB101: + 192 .LM11: + 193 00d6 8830 cpi r24,8 + 194 00d8 9105 cpc r25,__zero_reg__ + 195 00da 00F4 brsh .L12 + 196 00dc 77FD sbrc r23,7 + 197 00de 00C0 rjmp .L12 + 198 00e0 6830 cpi r22,8 + 199 00e2 7105 cpc r23,__zero_reg__ + 200 00e4 04F4 brge .L12 + 201 00e6 57FD sbrc r21,7 + 202 00e8 00C0 rjmp .L12 + 203 00ea 4830 cpi r20,8 + 204 00ec 5105 cpc r21,__zero_reg__ + 205 00ee 04F4 brge .L12 + 206 .LBE101: + 207 .LBE100: + 208 .LM12: + 209 00f0 FA01 movw r30,r20 + 210 00f2 33E0 ldi r19,3 + 211 00f4 EE0F 1: lsl r30 + 212 00f6 FF1F rol r31 + 213 00f8 3A95 dec r19 + 214 00fa 01F4 brne 1b + 215 00fc E60F add r30,r22 + 216 00fe F71F adc r31,r23 + 217 0100 E050 subi r30,lo8(-(fb)) + 218 0102 F040 sbci r31,hi8(-(fb)) + 219 0104 2081 ld r18,Z + 220 0106 81E0 ldi r24,lo8(1) + 221 0108 90E0 ldi r25,hi8(1) + 222 .LVL10: + 223 010a 00C0 rjmp 2f + 224 010c 880F 1: lsl r24 + 225 010e 991F rol r25 + 226 0110 AA95 2: dec r26 + 227 0112 02F4 brpl 1b + 228 0114 8095 com r24 + 229 0116 8223 and r24,r18 + 230 0118 8083 st Z,r24 + 231 .LVL11: + 232 .L12: + 233 011a 0895 ret + 234 .LFE5: + 236 .global inrange + 238 inrange: + 239 .LFB6: + 240 .LM13: + 241 .LVL12: + 242 /* prologue: function */ + 243 /* frame size = 0 */ + 244 .LM14: + 245 011c 0897 sbiw r24,8 + 246 011e 00F4 brsh .L14 + 247 0120 77FD sbrc r23,7 + 248 0122 00C0 rjmp .L14 + 249 0124 6830 cpi r22,8 + 250 0126 7105 cpc r23,__zero_reg__ + 251 0128 04F4 brge .L14 + 252 012a 57FD sbrc r21,7 + 253 012c 00C0 rjmp .L14 + 254 012e 90E0 ldi r25,lo8(0) + 255 0130 4830 cpi r20,8 + 256 0132 5105 cpc r21,__zero_reg__ + 257 0134 04F0 brlt .L15 + 258 0136 91E0 ldi r25,lo8(1) + 259 .L15: + 260 0138 81E0 ldi r24,lo8(1) + 261 .LVL13: + 262 013a 9827 eor r25,r24 + 263 013c 00C0 rjmp .L16 + 264 .LVL14: + 265 .L14: + 266 013e 90E0 ldi r25,lo8(0) + 267 .L16: + 268 .LM15: + 269 0140 892F mov r24,r25 + 270 .LVL15: + 271 /* epilogue start */ + 272 0142 0895 ret + 273 .LFE6: + 275 .global getvoxel + 277 getvoxel: + 278 .LFB7: + 279 .LM16: + 280 .LVL16: + 281 /* prologue: function */ + 282 /* frame size = 0 */ + 283 0144 9C01 movw r18,r24 + 284 0146 FA01 movw r30,r20 + 285 .LBB102: + 286 .LBB103: + 287 .LM17: + 288 0148 8830 cpi r24,8 + 289 014a 9105 cpc r25,__zero_reg__ + 290 014c 00F4 brsh .L19 + 291 .LVL17: + 292 014e 77FD sbrc r23,7 + 293 0150 00C0 rjmp .L19 + 294 0152 6830 cpi r22,8 + 295 0154 7105 cpc r23,__zero_reg__ + 296 0156 04F4 brge .L19 + 297 0158 57FD sbrc r21,7 + 298 015a 00C0 rjmp .L19 + 299 .LVL18: + 300 015c 4830 cpi r20,8 + 301 015e 5105 cpc r21,__zero_reg__ + 302 0160 04F4 brge .L19 + 303 .LBE103: + 304 .LBE102: + 305 .LM18: + 306 0162 43E0 ldi r20,3 + 307 0164 EE0F 1: lsl r30 + 308 0166 FF1F rol r31 + 309 0168 4A95 dec r20 + 310 016a 01F4 brne 1b + 311 .LVL19: + 312 016c E60F add r30,r22 + 313 016e F71F adc r31,r23 + 314 0170 E050 subi r30,lo8(-(cube)) + 315 0172 F040 sbci r31,hi8(-(cube)) + 316 0174 8081 ld r24,Z + 317 .LVL20: + 318 0176 90E0 ldi r25,lo8(0) + 319 0178 00C0 rjmp 2f + 320 017a 9595 1: asr r25 + 321 017c 8795 ror r24 + 322 017e 2A95 2: dec r18 + 323 0180 02F4 brpl 1b + 324 0182 8170 andi r24,lo8(1) + 325 0184 0895 ret + 326 .LVL21: + 327 .L19: + 328 0186 80E0 ldi r24,lo8(0) + 329 .LVL22: + 330 .LM19: + 331 0188 0895 ret + 332 .LFE7: + 334 .global altervoxel + 336 altervoxel: + 337 .LFB8: + 338 .LM20: + 339 .LVL23: + 340 /* prologue: function */ + 341 /* frame size = 0 */ + 342 018a DC01 movw r26,r24 + 343 .LM21: + 344 018c 2130 cpi r18,1 + 345 018e 3105 cpc r19,__zero_reg__ + 346 0190 01F4 brne .L23 + 347 .LVL24: + 348 .LBB104: + 349 .LBB105: + 350 .LBB106: + 351 .LBB107: + 352 .LM22: + 353 0192 8830 cpi r24,8 + 354 0194 9105 cpc r25,__zero_reg__ + 355 0196 00F4 brsh .L25 + 356 .LVL25: + 357 0198 77FD sbrc r23,7 + 358 019a 00C0 rjmp .L25 + 359 019c 6830 cpi r22,8 + 360 019e 7105 cpc r23,__zero_reg__ + 361 01a0 04F4 brge .L25 + 362 01a2 57FD sbrc r21,7 + 363 01a4 00C0 rjmp .L25 + 364 01a6 4830 cpi r20,8 + 365 01a8 5105 cpc r21,__zero_reg__ + 366 01aa 04F4 brge .L25 + 367 .LBE107: + 368 .LBE106: + 369 .LM23: + 370 01ac FA01 movw r30,r20 + 371 01ae 53E0 ldi r21,3 + 372 01b0 EE0F 1: lsl r30 + 373 01b2 FF1F rol r31 + 374 01b4 5A95 dec r21 + 375 01b6 01F4 brne 1b + 376 01b8 E60F add r30,r22 + 377 01ba F71F adc r31,r23 + 378 01bc E050 subi r30,lo8(-(cube)) + 379 01be F040 sbci r31,hi8(-(cube)) + 380 01c0 8081 ld r24,Z + 381 .LVL26: + 382 01c2 00C0 rjmp 2f + 383 01c4 220F 1: lsl r18 + 384 01c6 331F rol r19 + 385 01c8 AA95 2: dec r26 + 386 01ca 02F4 brpl 1b + 387 .LVL27: + 388 01cc 822B or r24,r18 + 389 01ce 8083 st Z,r24 + 390 01d0 0895 ret + 391 .LVL28: + 392 .L23: + 393 .LBE105: + 394 .LBE104: + 395 .LM24: + 396 01d2 0E94 0000 call clrvoxel + 397 .LVL29: + 398 .L25: + 399 01d6 0895 ret + 400 .LFE8: + 402 .global flpvoxel + 404 flpvoxel: + 405 .LFB9: + 406 .LM25: + 407 .LVL30: + 408 /* prologue: function */ + 409 /* frame size = 0 */ + 410 01d8 DC01 movw r26,r24 + 411 .LBB108: + 412 .LBB109: + 413 .LM26: + 414 01da 8830 cpi r24,8 + 415 01dc 9105 cpc r25,__zero_reg__ + 416 01de 00F4 brsh .L28 + 417 01e0 77FD sbrc r23,7 + 418 01e2 00C0 rjmp .L28 + 419 01e4 6830 cpi r22,8 + 420 01e6 7105 cpc r23,__zero_reg__ + 421 01e8 04F4 brge .L28 + 422 01ea 57FD sbrc r21,7 + 423 01ec 00C0 rjmp .L28 + 424 01ee 4830 cpi r20,8 + 425 01f0 5105 cpc r21,__zero_reg__ + 426 01f2 04F4 brge .L28 + 427 .LBE109: + 428 .LBE108: + 429 .LM27: + 430 01f4 FA01 movw r30,r20 + 431 01f6 B3E0 ldi r27,3 + 432 01f8 EE0F 1: lsl r30 + 433 01fa FF1F rol r31 + 434 01fc BA95 dec r27 + 435 01fe 01F4 brne 1b + 436 0200 E60F add r30,r22 + 437 0202 F71F adc r31,r23 + 438 0204 E050 subi r30,lo8(-(cube)) + 439 0206 F040 sbci r31,hi8(-(cube)) + 440 0208 2081 ld r18,Z + 441 020a 81E0 ldi r24,lo8(1) + 442 020c 90E0 ldi r25,hi8(1) + 443 .LVL31: + 444 020e 00C0 rjmp 2f + 445 0210 880F 1: lsl r24 + 446 0212 991F rol r25 + 447 0214 AA95 2: dec r26 + 448 0216 02F4 brpl 1b + 449 0218 2827 eor r18,r24 + 450 021a 2083 st Z,r18 + 451 .LVL32: + 452 .L28: + 453 021c 0895 ret + 454 .LFE9: + 456 .global argorder + 458 argorder: + 459 .LFB10: + 460 .LM28: + 461 .LVL33: + 462 021e CF93 push r28 + 463 0220 DF93 push r29 + 464 /* prologue: function */ + 465 /* frame size = 0 */ + 466 0222 FC01 movw r30,r24 + 467 0224 DA01 movw r26,r20 + 468 0226 E901 movw r28,r18 + 469 .LM29: + 470 0228 6817 cp r22,r24 + 471 022a 7907 cpc r23,r25 + 472 022c 04F4 brge .L30 + 473 .LVL34: + 474 022e CB01 movw r24,r22 + 475 .LVL35: + 476 0230 BF01 movw r22,r30 + 477 .LVL36: + 478 0232 FC01 movw r30,r24 + 479 .LVL37: + 480 .L30: + 481 .LM30: + 482 0234 ED93 st X+,r30 + 483 0236 FC93 st X,r31 + 484 .LM31: + 485 0238 7983 std Y+1,r23 + 486 023a 6883 st Y,r22 + 487 /* epilogue start */ + 488 .LM32: + 489 023c DF91 pop r29 + 490 023e CF91 pop r28 + 491 .LVL38: + 492 0240 0895 ret + 493 .LFE10: + 495 .global setplane_z + 497 setplane_z: + 498 .LFB11: + 499 .LM33: + 500 .LVL39: + 501 /* prologue: function */ + 502 /* frame size = 0 */ + 503 .LM34: + 504 0242 8830 cpi r24,8 + 505 0244 9105 cpc r25,__zero_reg__ + 506 0246 00F4 brsh .L35 + 507 0248 20E0 ldi r18,lo8(0) + 508 024a 30E0 ldi r19,hi8(0) + 509 .LVL40: + 510 .LM35: + 511 024c 43E0 ldi r20,3 + 512 024e 880F 1: lsl r24 + 513 0250 991F rol r25 + 514 0252 4A95 dec r20 + 515 0254 01F4 brne 1b + 516 .LVL41: + 517 0256 4FEF ldi r20,lo8(-1) + 518 .L34: + 519 0258 FC01 movw r30,r24 + 520 025a E20F add r30,r18 + 521 025c F31F adc r31,r19 + 522 025e E050 subi r30,lo8(-(cube)) + 523 0260 F040 sbci r31,hi8(-(cube)) + 524 0262 4083 st Z,r20 + 525 .LM36: + 526 0264 2F5F subi r18,lo8(-(1)) + 527 0266 3F4F sbci r19,hi8(-(1)) + 528 0268 2830 cpi r18,8 + 529 026a 3105 cpc r19,__zero_reg__ + 530 026c 01F4 brne .L34 + 531 .LVL42: + 532 .L35: + 533 026e 0895 ret + 534 .LFE11: + 536 .global clrplane_z + 538 clrplane_z: + 539 .LFB12: + 540 .LM37: + 541 .LVL43: + 542 /* prologue: function */ + 543 /* frame size = 0 */ + 544 .LM38: + 545 0270 8830 cpi r24,8 + 546 0272 9105 cpc r25,__zero_reg__ + 547 0274 00F4 brsh .L40 + 548 0276 20E0 ldi r18,lo8(0) + 549 0278 30E0 ldi r19,hi8(0) + 550 .LVL44: + 551 .LM39: + 552 027a 53E0 ldi r21,3 + 553 027c 880F 1: lsl r24 + 554 027e 991F rol r25 + 555 0280 5A95 dec r21 + 556 0282 01F4 brne 1b + 557 .LVL45: + 558 .L39: + 559 0284 FC01 movw r30,r24 + 560 0286 E20F add r30,r18 + 561 0288 F31F adc r31,r19 + 562 028a E050 subi r30,lo8(-(cube)) + 563 028c F040 sbci r31,hi8(-(cube)) + 564 028e 1082 st Z,__zero_reg__ + 565 .LM40: + 566 0290 2F5F subi r18,lo8(-(1)) + 567 0292 3F4F sbci r19,hi8(-(1)) + 568 0294 2830 cpi r18,8 + 569 0296 3105 cpc r19,__zero_reg__ + 570 0298 01F4 brne .L39 + 571 .LVL46: + 572 .L40: + 573 029a 0895 ret + 574 .LFE12: + 576 .global setplane_x + 578 setplane_x: + 579 .LFB13: + 580 .LM41: + 581 .LVL47: + 582 /* prologue: function */ + 583 /* frame size = 0 */ + 584 029c 9C01 movw r18,r24 + 585 .LM42: + 586 029e 8830 cpi r24,8 + 587 02a0 9105 cpc r25,__zero_reg__ + 588 02a2 00F4 brsh .L46 + 589 .LM43: + 590 02a4 81E0 ldi r24,lo8(1) + 591 02a6 90E0 ldi r25,hi8(1) + 592 .LVL48: + 593 02a8 00C0 rjmp 2f + 594 02aa 880F 1: lsl r24 + 595 02ac 991F rol r25 + 596 02ae 2A95 2: dec r18 + 597 02b0 02F4 brpl 1b + 598 02b2 982F mov r25,r24 + 599 02b4 40E0 ldi r20,lo8(0) + 600 02b6 50E0 ldi r21,hi8(0) + 601 .LVL49: + 602 02b8 00C0 rjmp .L44 + 603 .LVL50: + 604 .L45: + 605 02ba FB01 movw r30,r22 + 606 02bc E20F add r30,r18 + 607 02be F31F adc r31,r19 + 608 02c0 E050 subi r30,lo8(-(cube)) + 609 02c2 F040 sbci r31,hi8(-(cube)) + 610 02c4 8081 ld r24,Z + 611 02c6 892B or r24,r25 + 612 02c8 8083 st Z,r24 + 613 .LM44: + 614 02ca 2F5F subi r18,lo8(-(1)) + 615 02cc 3F4F sbci r19,hi8(-(1)) + 616 02ce 2830 cpi r18,8 + 617 02d0 3105 cpc r19,__zero_reg__ + 618 02d2 01F4 brne .L45 + 619 .LM45: + 620 02d4 4F5F subi r20,lo8(-(1)) + 621 02d6 5F4F sbci r21,hi8(-(1)) + 622 02d8 4830 cpi r20,8 + 623 02da 5105 cpc r21,__zero_reg__ + 624 02dc 01F0 breq .L46 + 625 .LVL51: + 626 .L44: + 627 02de 20E0 ldi r18,lo8(0) + 628 02e0 30E0 ldi r19,hi8(0) + 629 .LVL52: + 630 .LM46: + 631 02e2 BA01 movw r22,r20 + 632 02e4 E3E0 ldi r30,3 + 633 02e6 660F 1: lsl r22 + 634 02e8 771F rol r23 + 635 02ea EA95 dec r30 + 636 02ec 01F4 brne 1b + 637 02ee 00C0 rjmp .L45 + 638 .LVL53: + 639 .L46: + 640 02f0 0895 ret + 641 .LFE13: + 643 .global clrplane_x + 645 clrplane_x: + 646 .LFB14: + 647 .LM47: + 648 .LVL54: + 649 /* prologue: function */ + 650 /* frame size = 0 */ + 651 02f2 9C01 movw r18,r24 + 652 .LM48: + 653 02f4 8830 cpi r24,8 + 654 02f6 9105 cpc r25,__zero_reg__ + 655 02f8 00F4 brsh .L52 + 656 .LM49: + 657 02fa 81E0 ldi r24,lo8(1) + 658 02fc 90E0 ldi r25,hi8(1) + 659 .LVL55: + 660 02fe 00C0 rjmp 2f + 661 0300 880F 1: lsl r24 + 662 0302 991F rol r25 + 663 0304 2A95 2: dec r18 + 664 0306 02F4 brpl 1b + 665 0308 982F mov r25,r24 + 666 030a 9095 com r25 + 667 030c 40E0 ldi r20,lo8(0) + 668 030e 50E0 ldi r21,hi8(0) + 669 .LVL56: + 670 0310 00C0 rjmp .L50 + 671 .LVL57: + 672 .L51: + 673 0312 FB01 movw r30,r22 + 674 0314 E20F add r30,r18 + 675 0316 F31F adc r31,r19 + 676 0318 E050 subi r30,lo8(-(cube)) + 677 031a F040 sbci r31,hi8(-(cube)) + 678 031c 8081 ld r24,Z + 679 031e 8923 and r24,r25 + 680 0320 8083 st Z,r24 + 681 .LM50: + 682 0322 2F5F subi r18,lo8(-(1)) + 683 0324 3F4F sbci r19,hi8(-(1)) + 684 0326 2830 cpi r18,8 + 685 0328 3105 cpc r19,__zero_reg__ + 686 032a 01F4 brne .L51 + 687 .LM51: + 688 032c 4F5F subi r20,lo8(-(1)) + 689 032e 5F4F sbci r21,hi8(-(1)) + 690 0330 4830 cpi r20,8 + 691 0332 5105 cpc r21,__zero_reg__ + 692 0334 01F0 breq .L52 + 693 .LVL58: + 694 .L50: + 695 0336 20E0 ldi r18,lo8(0) + 696 0338 30E0 ldi r19,hi8(0) + 697 .LVL59: + 698 .LM52: + 699 033a BA01 movw r22,r20 + 700 033c F3E0 ldi r31,3 + 701 033e 660F 1: lsl r22 + 702 0340 771F rol r23 + 703 0342 FA95 dec r31 + 704 0344 01F4 brne 1b + 705 0346 00C0 rjmp .L51 + 706 .LVL60: + 707 .L52: + 708 0348 0895 ret + 709 .LFE14: + 711 .global setplane_y + 713 setplane_y: + 714 .LFB15: + 715 .LM53: + 716 .LVL61: + 717 /* prologue: function */ + 718 /* frame size = 0 */ + 719 .LM54: + 720 034a 8830 cpi r24,8 + 721 034c 9105 cpc r25,__zero_reg__ + 722 034e 00F4 brsh .L57 + 723 0350 20E0 ldi r18,lo8(0) + 724 0352 30E0 ldi r19,hi8(0) + 725 .LVL62: + 726 .LM55: + 727 0354 4FEF ldi r20,lo8(-1) + 728 .L56: + 729 0356 F901 movw r30,r18 + 730 0358 A3E0 ldi r26,3 + 731 035a EE0F 1: lsl r30 + 732 035c FF1F rol r31 + 733 035e AA95 dec r26 + 734 0360 01F4 brne 1b + 735 0362 E80F add r30,r24 + 736 0364 F91F adc r31,r25 + 737 0366 E050 subi r30,lo8(-(cube)) + 738 0368 F040 sbci r31,hi8(-(cube)) + 739 036a 4083 st Z,r20 + 740 .LM56: + 741 036c 2F5F subi r18,lo8(-(1)) + 742 036e 3F4F sbci r19,hi8(-(1)) + 743 0370 2830 cpi r18,8 + 744 0372 3105 cpc r19,__zero_reg__ + 745 0374 01F4 brne .L56 + 746 .L57: + 747 0376 0895 ret + 748 .LFE15: + 750 .global clrplane_y + 752 clrplane_y: + 753 .LFB16: + 754 .LM57: + 755 .LVL63: + 756 /* prologue: function */ + 757 /* frame size = 0 */ + 758 .LM58: + 759 0378 8830 cpi r24,8 + 760 037a 9105 cpc r25,__zero_reg__ + 761 037c 00F4 brsh .L62 + 762 037e 20E0 ldi r18,lo8(0) + 763 0380 30E0 ldi r19,hi8(0) + 764 .LVL64: + 765 .L61: + 766 .LM59: + 767 0382 F901 movw r30,r18 + 768 0384 B3E0 ldi r27,3 + 769 0386 EE0F 1: lsl r30 + 770 0388 FF1F rol r31 + 771 038a BA95 dec r27 + 772 038c 01F4 brne 1b + 773 038e E80F add r30,r24 + 774 0390 F91F adc r31,r25 + 775 0392 E050 subi r30,lo8(-(cube)) + 776 0394 F040 sbci r31,hi8(-(cube)) + 777 0396 1082 st Z,__zero_reg__ + 778 .LM60: + 779 0398 2F5F subi r18,lo8(-(1)) + 780 039a 3F4F sbci r19,hi8(-(1)) + 781 039c 2830 cpi r18,8 + 782 039e 3105 cpc r19,__zero_reg__ + 783 03a0 01F4 brne .L61 + 784 .L62: + 785 03a2 0895 ret + 786 .LFE16: + 788 .global fill + 790 fill: + 791 .LFB17: + 792 .LM61: + 793 .LVL65: + 794 /* prologue: function */ + 795 /* frame size = 0 */ + 796 .LM62: + 797 03a4 40E0 ldi r20,lo8(0) + 798 03a6 50E0 ldi r21,hi8(0) + 799 .LVL66: + 800 03a8 00C0 rjmp .L65 + 801 .LVL67: + 802 .L66: + 803 .LM63: + 804 03aa FB01 movw r30,r22 + 805 03ac E20F add r30,r18 + 806 03ae F31F adc r31,r19 + 807 03b0 E050 subi r30,lo8(-(cube)) + 808 03b2 F040 sbci r31,hi8(-(cube)) + 809 03b4 8083 st Z,r24 + 810 .LM64: + 811 03b6 2F5F subi r18,lo8(-(1)) + 812 03b8 3F4F sbci r19,hi8(-(1)) + 813 03ba 2830 cpi r18,8 + 814 03bc 3105 cpc r19,__zero_reg__ + 815 03be 01F4 brne .L66 + 816 .LM65: + 817 03c0 4F5F subi r20,lo8(-(1)) + 818 03c2 5F4F sbci r21,hi8(-(1)) + 819 03c4 4830 cpi r20,8 + 820 03c6 5105 cpc r21,__zero_reg__ + 821 03c8 01F0 breq .L68 + 822 .L65: + 823 03ca 20E0 ldi r18,lo8(0) + 824 03cc 30E0 ldi r19,hi8(0) + 825 .LM66: + 826 03ce BA01 movw r22,r20 + 827 03d0 93E0 ldi r25,3 + 828 03d2 660F 1: lsl r22 + 829 03d4 771F rol r23 + 830 03d6 9A95 dec r25 + 831 03d8 01F4 brne 1b + 832 03da 00C0 rjmp .L66 + 833 .L68: + 834 03dc 0895 ret + 835 .LFE17: + 837 .global tmpfill + 839 tmpfill: + 840 .LFB18: + 841 .LM67: + 842 .LVL68: + 843 /* prologue: function */ + 844 /* frame size = 0 */ + 845 .LM68: + 846 03de 40E0 ldi r20,lo8(0) + 847 03e0 50E0 ldi r21,hi8(0) + 848 .LVL69: + 849 03e2 00C0 rjmp .L71 + 850 .LVL70: + 851 .L72: + 852 .LM69: + 853 03e4 FB01 movw r30,r22 + 854 03e6 E20F add r30,r18 + 855 03e8 F31F adc r31,r19 + 856 03ea E050 subi r30,lo8(-(fb)) + 857 03ec F040 sbci r31,hi8(-(fb)) + 858 03ee 8083 st Z,r24 + 859 .LM70: + 860 03f0 2F5F subi r18,lo8(-(1)) + 861 03f2 3F4F sbci r19,hi8(-(1)) + 862 03f4 2830 cpi r18,8 + 863 03f6 3105 cpc r19,__zero_reg__ + 864 03f8 01F4 brne .L72 + 865 .LM71: + 866 03fa 4F5F subi r20,lo8(-(1)) + 867 03fc 5F4F sbci r21,hi8(-(1)) + 868 03fe 4830 cpi r20,8 + 869 0400 5105 cpc r21,__zero_reg__ + 870 0402 01F0 breq .L74 + 871 .L71: + 872 0404 20E0 ldi r18,lo8(0) + 873 0406 30E0 ldi r19,hi8(0) + 874 .LM72: + 875 0408 BA01 movw r22,r20 + 876 040a E3E0 ldi r30,3 + 877 040c 660F 1: lsl r22 + 878 040e 771F rol r23 + 879 0410 EA95 dec r30 + 880 0412 01F4 brne 1b + 881 0414 00C0 rjmp .L72 + 882 .L74: + 883 0416 0895 ret + 884 .LFE18: + 886 .global box_filled + 888 box_filled: + 889 .LFB19: + 890 .LM73: + 891 .LVL71: + 892 0418 EF92 push r14 + 893 .LVL72: + 894 041a FF92 push r15 + 895 041c 0F93 push r16 + 896 .LVL73: + 897 041e 1F93 push r17 + 898 0420 CF93 push r28 + 899 0422 DF93 push r29 + 900 /* prologue: function */ + 901 /* frame size = 0 */ + 902 0424 DC01 movw r26,r24 + 903 0426 EB01 movw r28,r22 + 904 0428 F901 movw r30,r18 + 905 .LBB110: + 906 .LBB111: + 907 .LM74: + 908 042a 2817 cp r18,r24 + 909 042c 3907 cpc r19,r25 + 910 042e 04F4 brge .L77 + 911 .LVL74: + 912 0430 D901 movw r26,r18 + 913 .LVL75: + 914 0432 FC01 movw r30,r24 + 915 .LVL76: + 916 .L77: + 917 .LBE111: + 918 .LBE110: + 919 .LBB112: + 920 .LBB113: + 921 0434 0C17 cp r16,r28 + 922 0436 1D07 cpc r17,r29 + 923 .LVL77: + 924 0438 04F4 brge .L78 + 925 043a CE01 movw r24,r28 + 926 .LVL78: + 927 043c E801 movw r28,r16 + 928 .LVL79: + 929 043e 8C01 movw r16,r24 + 930 .LVL80: + 931 .L78: + 932 .LBE113: + 933 .LBE112: + 934 .LBB114: + 935 .LBB115: + 936 0440 E416 cp r14,r20 + 937 0442 F506 cpc r15,r21 + 938 .LVL81: + 939 0444 04F4 brge .L79 + 940 0446 CA01 movw r24,r20 + 941 .LVL82: + 942 0448 A701 movw r20,r14 + 943 .LVL83: + 944 044a 7C01 movw r14,r24 + 945 .LVL84: + 946 .L79: + 947 .LBE115: + 948 .LBE114: + 949 .LBB116: + 950 .LBB117: + 951 .LM75: + 952 044c 3196 adiw r30,1 + 953 044e 8FEF ldi r24,lo8(255) + 954 0450 90E0 ldi r25,hi8(255) + 955 0452 9C01 movw r18,r24 + 956 0454 00C0 rjmp 2f + 957 0456 220F 1: lsl r18 + 958 0458 331F rol r19 + 959 045a EA95 2: dec r30 + 960 045c 02F4 brpl 1b + 961 045e 2095 com r18 + 962 0460 00C0 rjmp 2f + 963 0462 880F 1: lsl r24 + 964 0464 991F rol r25 + 965 0466 AA95 2: dec r26 + 966 0468 02F4 brpl 1b + 967 046a 2823 and r18,r24 + 968 046c 00C0 rjmp .L80 + 969 .LVL85: + 970 .L81: + 971 .LBE117: + 972 .LBE116: + 973 .LM76: + 974 046e FB01 movw r30,r22 + 975 .LVL86: + 976 0470 EA0F add r30,r26 + 977 0472 FB1F adc r31,r27 + 978 0474 E050 subi r30,lo8(-(cube)) + 979 0476 F040 sbci r31,hi8(-(cube)) + 980 0478 8081 ld r24,Z + 981 047a 822B or r24,r18 + 982 047c 8083 st Z,r24 + 983 .LM77: + 984 047e 1196 adiw r26,1 + 985 .LVL87: + 986 .L83: + 987 0480 0A17 cp r16,r26 + 988 0482 1B07 cpc r17,r27 + 989 0484 04F4 brge .L81 + 990 .LM78: + 991 0486 4F5F subi r20,lo8(-(1)) + 992 0488 5F4F sbci r21,hi8(-(1)) + 993 .LVL88: + 994 .L80: + 995 048a E416 cp r14,r20 + 996 048c F506 cpc r15,r21 + 997 048e 04F0 brlt .L84 + 998 0490 DE01 movw r26,r28 + 999 .LVL89: + 1000 .LM79: + 1001 0492 BA01 movw r22,r20 + 1002 0494 F3E0 ldi r31,3 + 1003 0496 660F 1: lsl r22 + 1004 0498 771F rol r23 + 1005 049a FA95 dec r31 + 1006 049c 01F4 brne 1b + 1007 049e 00C0 rjmp .L83 + 1008 .LVL90: + 1009 .L84: + 1010 /* epilogue start */ + 1011 .LM80: + 1012 04a0 DF91 pop r29 + 1013 04a2 CF91 pop r28 + 1014 .LVL91: + 1015 04a4 1F91 pop r17 + 1016 04a6 0F91 pop r16 + 1017 .LVL92: + 1018 04a8 FF90 pop r15 + 1019 04aa EF90 pop r14 + 1020 .LVL93: + 1021 04ac 0895 ret + 1022 .LFE19: + 1024 .global box_walls + 1026 box_walls: + 1027 .LFB20: + 1028 .LM81: + 1029 .LVL94: + 1030 04ae CF92 push r12 + 1031 04b0 DF92 push r13 + 1032 04b2 EF92 push r14 + 1033 .LVL95: + 1034 04b4 FF92 push r15 + 1035 04b6 0F93 push r16 + 1036 .LVL96: + 1037 04b8 1F93 push r17 + 1038 04ba CF93 push r28 + 1039 04bc DF93 push r29 + 1040 /* prologue: function */ + 1041 /* frame size = 0 */ + 1042 04be DC01 movw r26,r24 + 1043 04c0 F901 movw r30,r18 + 1044 .LBB118: + 1045 .LBB119: + 1046 .LM82: + 1047 04c2 2817 cp r18,r24 + 1048 04c4 3907 cpc r19,r25 + 1049 04c6 04F4 brge .L86 + 1050 04c8 D901 movw r26,r18 + 1051 .LVL97: + 1052 04ca FC01 movw r30,r24 + 1053 .LVL98: + 1054 .L86: + 1055 .LBE119: + 1056 .LBE118: + 1057 .LBB120: + 1058 .LBB121: + 1059 04cc 0617 cp r16,r22 + 1060 04ce 1707 cpc r17,r23 + 1061 .LVL99: + 1062 04d0 04F4 brge .L87 + 1063 04d2 CB01 movw r24,r22 + 1064 .LVL100: + 1065 04d4 B801 movw r22,r16 + 1066 .LVL101: + 1067 04d6 8C01 movw r16,r24 + 1068 .LVL102: + 1069 .L87: + 1070 .LBE121: + 1071 .LBE120: + 1072 .LBB122: + 1073 .LBB123: + 1074 04d8 E416 cp r14,r20 + 1075 04da F506 cpc r15,r21 + 1076 .LVL103: + 1077 04dc 04F4 brge .L88 + 1078 04de CA01 movw r24,r20 + 1079 .LVL104: + 1080 04e0 A701 movw r20,r14 + 1081 .LVL105: + 1082 04e2 7C01 movw r14,r24 + 1083 .LVL106: + 1084 .L88: + 1085 .LBE123: + 1086 .LBE122: + 1087 .LM83: + 1088 04e4 81E0 ldi r24,lo8(1) + 1089 04e6 90E0 ldi r25,hi8(1) + 1090 04e8 9C01 movw r18,r24 + 1091 04ea 0E2E mov r0,r30 + 1092 04ec 00C0 rjmp 2f + 1093 04ee 220F 1: lsl r18 + 1094 04f0 331F rol r19 + 1095 04f2 0A94 2: dec r0 + 1096 04f4 02F4 brpl 1b + 1097 04f6 0A2E mov r0,r26 + 1098 04f8 00C0 rjmp 2f + 1099 04fa 880F 1: lsl r24 + 1100 04fc 991F rol r25 + 1101 04fe 0A94 2: dec r0 + 1102 0500 02F4 brpl 1b + 1103 0502 C22E mov r12,r18 + 1104 0504 C82A or r12,r24 + 1105 .LBB124: + 1106 .LBB125: + 1107 .LM84: + 1108 0506 3196 adiw r30,1 + 1109 0508 8FEF ldi r24,lo8(255) + 1110 050a 90E0 ldi r25,hi8(255) + 1111 050c 9C01 movw r18,r24 + 1112 050e 00C0 rjmp 2f + 1113 0510 220F 1: lsl r18 + 1114 0512 331F rol r19 + 1115 0514 EA95 2: dec r30 + 1116 0516 02F4 brpl 1b + 1117 0518 D22E mov r13,r18 + 1118 051a D094 com r13 + 1119 051c 00C0 rjmp 2f + 1120 051e 880F 1: lsl r24 + 1121 0520 991F rol r25 + 1122 0522 AA95 2: dec r26 + 1123 0524 02F4 brpl 1b + 1124 0526 D822 and r13,r24 + 1125 0528 9A01 movw r18,r20 + 1126 .LVL107: + 1127 052a 00C0 rjmp .L89 + 1128 .LVL108: + 1129 .L93: + 1130 .LBE125: + 1131 .LBE124: + 1132 .LM85: + 1133 052c A617 cp r26,r22 + 1134 052e B707 cpc r27,r23 + 1135 0530 01F0 breq .L90 + 1136 0532 A017 cp r26,r16 + 1137 0534 B107 cpc r27,r17 + 1138 0536 01F0 breq .L90 + 1139 0538 2417 cp r18,r20 + 1140 053a 3507 cpc r19,r21 + 1141 053c 01F0 breq .L90 + 1142 053e 2E15 cp r18,r14 + 1143 0540 3F05 cpc r19,r15 + 1144 0542 01F4 brne .L91 + 1145 .L90: + 1146 .LM86: + 1147 0544 FE01 movw r30,r28 + 1148 .LVL109: + 1149 0546 EA0F add r30,r26 + 1150 0548 FB1F adc r31,r27 + 1151 054a E050 subi r30,lo8(-(cube)) + 1152 054c F040 sbci r31,hi8(-(cube)) + 1153 054e D082 st Z,r13 + 1154 0550 00C0 rjmp .L92 + 1155 .LVL110: + 1156 .L91: + 1157 .LM87: + 1158 0552 FE01 movw r30,r28 + 1159 .LVL111: + 1160 0554 EA0F add r30,r26 + 1161 0556 FB1F adc r31,r27 + 1162 0558 E050 subi r30,lo8(-(cube)) + 1163 055a F040 sbci r31,hi8(-(cube)) + 1164 055c 8081 ld r24,Z + 1165 055e 8C29 or r24,r12 + 1166 0560 8083 st Z,r24 + 1167 .L92: + 1168 .LM88: + 1169 0562 1196 adiw r26,1 + 1170 .LVL112: + 1171 .L95: + 1172 0564 0A17 cp r16,r26 + 1173 0566 1B07 cpc r17,r27 + 1174 0568 04F4 brge .L93 + 1175 .LM89: + 1176 056a 2F5F subi r18,lo8(-(1)) + 1177 056c 3F4F sbci r19,hi8(-(1)) + 1178 .LVL113: + 1179 .L89: + 1180 056e E216 cp r14,r18 + 1181 0570 F306 cpc r15,r19 + 1182 0572 04F0 brlt .L96 + 1183 0574 DB01 movw r26,r22 + 1184 .LVL114: + 1185 .LM90: + 1186 0576 E901 movw r28,r18 + 1187 0578 83E0 ldi r24,3 + 1188 057a CC0F 1: lsl r28 + 1189 057c DD1F rol r29 + 1190 057e 8A95 dec r24 + 1191 0580 01F4 brne 1b + 1192 0582 00C0 rjmp .L95 + 1193 .LVL115: + 1194 .L96: + 1195 /* epilogue start */ + 1196 .LM91: + 1197 0584 DF91 pop r29 + 1198 0586 CF91 pop r28 + 1199 0588 1F91 pop r17 + 1200 058a 0F91 pop r16 + 1201 .LVL116: + 1202 058c FF90 pop r15 + 1203 058e EF90 pop r14 + 1204 .LVL117: + 1205 0590 DF90 pop r13 + 1206 0592 CF90 pop r12 + 1207 0594 0895 ret + 1208 .LFE20: + 1210 .global box_wireframe + 1212 box_wireframe: + 1213 .LFB21: + 1214 .LM92: + 1215 .LVL118: + 1216 0596 8F92 push r8 + 1217 0598 9F92 push r9 + 1218 059a AF92 push r10 + 1219 059c BF92 push r11 + 1220 059e CF92 push r12 + 1221 05a0 DF92 push r13 + 1222 05a2 EF92 push r14 + 1223 .LVL119: + 1224 05a4 FF92 push r15 + 1225 05a6 0F93 push r16 + 1226 .LVL120: + 1227 05a8 1F93 push r17 + 1228 05aa CF93 push r28 + 1229 05ac DF93 push r29 + 1230 /* prologue: function */ + 1231 /* frame size = 0 */ + 1232 05ae 4C01 movw r8,r24 + 1233 05b0 6B01 movw r12,r22 + 1234 05b2 EA01 movw r28,r20 + 1235 05b4 5901 movw r10,r18 + 1236 .LBB126: + 1237 .LBB127: + 1238 .LM93: + 1239 05b6 2817 cp r18,r24 + 1240 05b8 3907 cpc r19,r25 + 1241 05ba 04F4 brge .L98 + 1242 .LVL121: + 1243 05bc 4901 movw r8,r18 + 1244 .LVL122: + 1245 05be 5C01 movw r10,r24 + 1246 .LVL123: + 1247 .L98: + 1248 .LBE127: + 1249 .LBE126: + 1250 .LBB128: + 1251 .LBB129: + 1252 05c0 0C15 cp r16,r12 + 1253 05c2 1D05 cpc r17,r13 + 1254 .LVL124: + 1255 05c4 04F4 brge .L99 + 1256 05c6 C601 movw r24,r12 + 1257 .LVL125: + 1258 05c8 6801 movw r12,r16 + 1259 .LVL126: + 1260 05ca 8C01 movw r16,r24 + 1261 .LVL127: + 1262 .L99: + 1263 .LBE129: + 1264 .LBE128: + 1265 .LBB130: + 1266 .LBB131: + 1267 05cc EC16 cp r14,r28 + 1268 05ce FD06 cpc r15,r29 + 1269 .LVL128: + 1270 05d0 04F4 brge .L100 + 1271 05d2 CE01 movw r24,r28 + 1272 .LVL129: + 1273 05d4 E701 movw r28,r14 + 1274 .LVL130: + 1275 05d6 7C01 movw r14,r24 + 1276 .LVL131: + 1277 .L100: + 1278 .LBE131: + 1279 .LBE130: + 1280 .LBB132: + 1281 .LBB133: + 1282 .LM94: + 1283 05d8 0894 sec + 1284 05da A11C adc r10,__zero_reg__ + 1285 05dc B11C adc r11,__zero_reg__ + 1286 05de 8FEF ldi r24,lo8(255) + 1287 05e0 90E0 ldi r25,hi8(255) + 1288 05e2 9C01 movw r18,r24 + 1289 05e4 0A2C mov r0,r10 + 1290 05e6 00C0 rjmp 2f + 1291 05e8 220F 1: lsl r18 + 1292 05ea 331F rol r19 + 1293 05ec 0A94 2: dec r0 + 1294 05ee 02F4 brpl 1b + 1295 05f0 0894 sec + 1296 05f2 A108 sbc r10,__zero_reg__ + 1297 05f4 B108 sbc r11,__zero_reg__ + 1298 05f6 2095 com r18 + 1299 05f8 082C mov r0,r8 + 1300 05fa 00C0 rjmp 2f + 1301 05fc 880F 1: lsl r24 + 1302 05fe 991F rol r25 + 1303 0600 0A94 2: dec r0 + 1304 0602 02F4 brpl 1b + 1305 0604 2823 and r18,r24 + 1306 .LBE133: + 1307 .LBE132: + 1308 .LM95: + 1309 0606 BE01 movw r22,r28 + 1310 0608 83E0 ldi r24,3 + 1311 060a 660F 1: lsl r22 + 1312 060c 771F rol r23 + 1313 060e 8A95 dec r24 + 1314 0610 01F4 brne 1b + 1315 0612 FB01 movw r30,r22 + 1316 0614 EC0D add r30,r12 + 1317 0616 FD1D adc r31,r13 + 1318 0618 E050 subi r30,lo8(-(cube)) + 1319 061a F040 sbci r31,hi8(-(cube)) + 1320 061c 2083 st Z,r18 + 1321 .LM96: + 1322 061e FB01 movw r30,r22 + 1323 0620 E00F add r30,r16 + 1324 0622 F11F adc r31,r17 + 1325 0624 E050 subi r30,lo8(-(cube)) + 1326 0626 F040 sbci r31,hi8(-(cube)) + 1327 0628 2083 st Z,r18 + 1328 .LM97: + 1329 062a A701 movw r20,r14 + 1330 062c B3E0 ldi r27,3 + 1331 062e 440F 1: lsl r20 + 1332 0630 551F rol r21 + 1333 0632 BA95 dec r27 + 1334 0634 01F4 brne 1b + 1335 0636 FA01 movw r30,r20 + 1336 0638 EC0D add r30,r12 + 1337 063a FD1D adc r31,r13 + 1338 063c E050 subi r30,lo8(-(cube)) + 1339 063e F040 sbci r31,hi8(-(cube)) + 1340 0640 2083 st Z,r18 + 1341 .LM98: + 1342 0642 FA01 movw r30,r20 + 1343 0644 E00F add r30,r16 + 1344 0646 F11F adc r31,r17 + 1345 0648 E050 subi r30,lo8(-(cube)) + 1346 064a F040 sbci r31,hi8(-(cube)) + 1347 064c 2083 st Z,r18 + 1348 .LBB134: + 1349 .LBB135: + 1350 .LM99: + 1351 064e 81E0 ldi r24,lo8(1) + 1352 0650 90E0 ldi r25,hi8(1) + 1353 0652 9C01 movw r18,r24 + 1354 0654 082C mov r0,r8 + 1355 0656 00C0 rjmp 2f + 1356 0658 220F 1: lsl r18 + 1357 065a 331F rol r19 + 1358 065c 0A94 2: dec r0 + 1359 065e 02F4 brpl 1b + 1360 .LBE135: + 1361 .LBE134: + 1362 .LBB139: + 1363 .LBB140: + 1364 0660 0A2C mov r0,r10 + 1365 0662 00C0 rjmp 2f + 1366 0664 880F 1: lsl r24 + 1367 0666 991F rol r25 + 1368 0668 0A94 2: dec r0 + 1369 066a 02F4 brpl 1b + 1370 066c 982F mov r25,r24 + 1371 066e D601 movw r26,r12 + 1372 .LVL132: + 1373 0670 00C0 rjmp .L101 + 1374 .L106: + 1375 .LBE140: + 1376 .LBE139: + 1377 .LBB144: + 1378 .LBB138: + 1379 .LBB136: + 1380 .LBB137: + 1381 .LM100: + 1382 0672 88E0 ldi r24,lo8(8) + 1383 0674 8816 cp r8,r24 + 1384 0676 9104 cpc r9,__zero_reg__ + 1385 0678 00F4 brsh .L102 + 1386 067a B7FD sbrc r27,7 + 1387 067c 00C0 rjmp .L102 + 1388 067e A830 cpi r26,8 + 1389 0680 B105 cpc r27,__zero_reg__ + 1390 0682 04F4 brge .L102 + 1391 0684 D7FD sbrc r29,7 + 1392 0686 00C0 rjmp .L103 + 1393 0688 C830 cpi r28,8 + 1394 068a D105 cpc r29,__zero_reg__ + 1395 068c 04F4 brge .L103 + 1396 .LBE137: + 1397 .LBE136: + 1398 .LM101: + 1399 068e FB01 movw r30,r22 + 1400 0690 EA0F add r30,r26 + 1401 0692 FB1F adc r31,r27 + 1402 0694 E050 subi r30,lo8(-(cube)) + 1403 0696 F040 sbci r31,hi8(-(cube)) + 1404 0698 8081 ld r24,Z + 1405 069a 822B or r24,r18 + 1406 069c 8083 st Z,r24 + 1407 .L103: + 1408 .LBE138: + 1409 .LBE144: + 1410 .LBB145: + 1411 .LBB146: + 1412 .LBB147: + 1413 .LBB148: + 1414 .LM102: + 1415 069e F7FC sbrc r15,7 + 1416 06a0 00C0 rjmp .L102 + 1417 06a2 88E0 ldi r24,lo8(8) + 1418 06a4 E816 cp r14,r24 + 1419 06a6 F104 cpc r15,__zero_reg__ + 1420 06a8 04F4 brge .L102 + 1421 .LBE148: + 1422 .LBE147: + 1423 .LM103: + 1424 06aa FA01 movw r30,r20 + 1425 06ac EA0F add r30,r26 + 1426 06ae FB1F adc r31,r27 + 1427 06b0 E050 subi r30,lo8(-(cube)) + 1428 06b2 F040 sbci r31,hi8(-(cube)) + 1429 06b4 8081 ld r24,Z + 1430 06b6 822B or r24,r18 + 1431 06b8 8083 st Z,r24 + 1432 .L102: + 1433 .LBE146: + 1434 .LBE145: + 1435 .LBB149: + 1436 .LBB143: + 1437 .LBB141: + 1438 .LBB142: + 1439 .LM104: + 1440 06ba 88E0 ldi r24,lo8(8) + 1441 06bc A816 cp r10,r24 + 1442 06be B104 cpc r11,__zero_reg__ + 1443 06c0 00F4 brsh .L104 + 1444 06c2 B7FD sbrc r27,7 + 1445 06c4 00C0 rjmp .L104 + 1446 06c6 A830 cpi r26,8 + 1447 06c8 B105 cpc r27,__zero_reg__ + 1448 06ca 04F4 brge .L104 + 1449 06cc D7FD sbrc r29,7 + 1450 06ce 00C0 rjmp .L105 + 1451 06d0 C830 cpi r28,8 + 1452 06d2 D105 cpc r29,__zero_reg__ + 1453 06d4 04F4 brge .L105 + 1454 .LBE142: + 1455 .LBE141: + 1456 .LM105: + 1457 06d6 FB01 movw r30,r22 + 1458 06d8 EA0F add r30,r26 + 1459 06da FB1F adc r31,r27 + 1460 06dc E050 subi r30,lo8(-(cube)) + 1461 06de F040 sbci r31,hi8(-(cube)) + 1462 06e0 8081 ld r24,Z + 1463 06e2 892B or r24,r25 + 1464 06e4 8083 st Z,r24 + 1465 .L105: + 1466 .LBE143: + 1467 .LBE149: + 1468 .LBB150: + 1469 .LBB151: + 1470 .LBB152: + 1471 .LBB153: + 1472 .LM106: + 1473 06e6 F7FC sbrc r15,7 + 1474 06e8 00C0 rjmp .L104 + 1475 06ea 88E0 ldi r24,lo8(8) + 1476 06ec E816 cp r14,r24 + 1477 06ee F104 cpc r15,__zero_reg__ + 1478 06f0 04F4 brge .L104 + 1479 .LBE153: + 1480 .LBE152: + 1481 .LM107: + 1482 06f2 FA01 movw r30,r20 + 1483 06f4 EA0F add r30,r26 + 1484 06f6 FB1F adc r31,r27 + 1485 06f8 E050 subi r30,lo8(-(cube)) + 1486 06fa F040 sbci r31,hi8(-(cube)) + 1487 06fc 8081 ld r24,Z + 1488 06fe 892B or r24,r25 + 1489 0700 8083 st Z,r24 + 1490 .L104: + 1491 .LBE151: + 1492 .LBE150: + 1493 .LM108: + 1494 0702 1196 adiw r26,1 + 1495 .L101: + 1496 0704 0A17 cp r16,r26 + 1497 0706 1B07 cpc r17,r27 + 1498 0708 04F0 brlt .+2 + 1499 070a 00C0 rjmp .L106 + 1500 070c AE01 movw r20,r28 + 1501 .LVL133: + 1502 070e 00C0 rjmp .L107 + 1503 .L112: + 1504 .LBB154: + 1505 .LBB155: + 1506 .LBB156: + 1507 .LBB157: + 1508 .LM109: + 1509 0710 88E0 ldi r24,lo8(8) + 1510 0712 8816 cp r8,r24 + 1511 0714 9104 cpc r9,__zero_reg__ + 1512 0716 00F4 brsh .L108 + 1513 0718 D7FC sbrc r13,7 + 1514 071a 00C0 rjmp .L109 + 1515 071c 88E0 ldi r24,lo8(8) + 1516 071e C816 cp r12,r24 + 1517 0720 D104 cpc r13,__zero_reg__ + 1518 0722 04F4 brge .L109 + 1519 0724 57FD sbrc r21,7 + 1520 0726 00C0 rjmp .L109 + 1521 0728 4830 cpi r20,8 + 1522 072a 5105 cpc r21,__zero_reg__ + 1523 072c 04F4 brge .L109 + 1524 .LBE157: + 1525 .LBE156: + 1526 .LM110: + 1527 072e FA01 movw r30,r20 + 1528 0730 A3E0 ldi r26,3 + 1529 0732 EE0F 1: lsl r30 + 1530 0734 FF1F rol r31 + 1531 0736 AA95 dec r26 + 1532 0738 01F4 brne 1b + 1533 .LVL134: + 1534 073a EC0D add r30,r12 + 1535 073c FD1D adc r31,r13 + 1536 073e E050 subi r30,lo8(-(cube)) + 1537 0740 F040 sbci r31,hi8(-(cube)) + 1538 0742 8081 ld r24,Z + 1539 0744 822B or r24,r18 + 1540 0746 8083 st Z,r24 + 1541 .LVL135: + 1542 .L109: + 1543 .LBE155: + 1544 .LBE154: + 1545 .LBB158: + 1546 .LBB159: + 1547 .LBB160: + 1548 .LBB161: + 1549 .LM111: + 1550 0748 17FD sbrc r17,7 + 1551 074a 00C0 rjmp .L108 + 1552 074c 0830 cpi r16,8 + 1553 074e 1105 cpc r17,__zero_reg__ + 1554 0750 04F4 brge .L108 + 1555 0752 57FD sbrc r21,7 + 1556 0754 00C0 rjmp .L108 + 1557 0756 4830 cpi r20,8 + 1558 0758 5105 cpc r21,__zero_reg__ + 1559 075a 04F4 brge .L108 + 1560 .LBE161: + 1561 .LBE160: + 1562 .LM112: + 1563 075c FA01 movw r30,r20 + 1564 075e 73E0 ldi r23,3 + 1565 0760 EE0F 1: lsl r30 + 1566 0762 FF1F rol r31 + 1567 0764 7A95 dec r23 + 1568 0766 01F4 brne 1b + 1569 0768 E00F add r30,r16 + 1570 076a F11F adc r31,r17 + 1571 076c E050 subi r30,lo8(-(cube)) + 1572 076e F040 sbci r31,hi8(-(cube)) + 1573 0770 8081 ld r24,Z + 1574 0772 822B or r24,r18 + 1575 0774 8083 st Z,r24 + 1576 .L108: + 1577 .LBE159: + 1578 .LBE158: + 1579 .LBB162: + 1580 .LBB163: + 1581 .LBB164: + 1582 .LBB165: + 1583 .LM113: + 1584 0776 88E0 ldi r24,lo8(8) + 1585 0778 A816 cp r10,r24 + 1586 077a B104 cpc r11,__zero_reg__ + 1587 077c 00F4 brsh .L110 + 1588 077e D7FC sbrc r13,7 + 1589 0780 00C0 rjmp .L111 + 1590 0782 88E0 ldi r24,lo8(8) + 1591 0784 C816 cp r12,r24 + 1592 0786 D104 cpc r13,__zero_reg__ + 1593 0788 04F4 brge .L111 + 1594 078a 57FD sbrc r21,7 + 1595 078c 00C0 rjmp .L111 + 1596 078e 4830 cpi r20,8 + 1597 0790 5105 cpc r21,__zero_reg__ + 1598 0792 04F4 brge .L111 + 1599 .LBE165: + 1600 .LBE164: + 1601 .LM114: + 1602 0794 FA01 movw r30,r20 + 1603 0796 63E0 ldi r22,3 + 1604 0798 EE0F 1: lsl r30 + 1605 079a FF1F rol r31 + 1606 079c 6A95 dec r22 + 1607 079e 01F4 brne 1b + 1608 07a0 EC0D add r30,r12 + 1609 07a2 FD1D adc r31,r13 + 1610 07a4 E050 subi r30,lo8(-(cube)) + 1611 07a6 F040 sbci r31,hi8(-(cube)) + 1612 07a8 8081 ld r24,Z + 1613 07aa 892B or r24,r25 + 1614 07ac 8083 st Z,r24 + 1615 .L111: + 1616 .LBE163: + 1617 .LBE162: + 1618 .LBB166: + 1619 .LBB167: + 1620 .LBB168: + 1621 .LBB169: + 1622 .LM115: + 1623 07ae 17FD sbrc r17,7 + 1624 07b0 00C0 rjmp .L110 + 1625 07b2 0830 cpi r16,8 + 1626 07b4 1105 cpc r17,__zero_reg__ + 1627 07b6 04F4 brge .L110 + 1628 07b8 57FD sbrc r21,7 + 1629 07ba 00C0 rjmp .L110 + 1630 07bc 4830 cpi r20,8 + 1631 07be 5105 cpc r21,__zero_reg__ + 1632 07c0 04F4 brge .L110 + 1633 .LBE169: + 1634 .LBE168: + 1635 .LM116: + 1636 07c2 FA01 movw r30,r20 + 1637 07c4 33E0 ldi r19,3 + 1638 07c6 EE0F 1: lsl r30 + 1639 07c8 FF1F rol r31 + 1640 07ca 3A95 dec r19 + 1641 07cc 01F4 brne 1b + 1642 07ce E00F add r30,r16 + 1643 07d0 F11F adc r31,r17 + 1644 07d2 E050 subi r30,lo8(-(cube)) + 1645 07d4 F040 sbci r31,hi8(-(cube)) + 1646 07d6 8081 ld r24,Z + 1647 07d8 892B or r24,r25 + 1648 07da 8083 st Z,r24 + 1649 .L110: + 1650 .LBE167: + 1651 .LBE166: + 1652 .LM117: + 1653 07dc 4F5F subi r20,lo8(-(1)) + 1654 07de 5F4F sbci r21,hi8(-(1)) + 1655 .L107: + 1656 07e0 E416 cp r14,r20 + 1657 07e2 F506 cpc r15,r21 + 1658 07e4 04F0 brlt .+2 + 1659 07e6 00C0 rjmp .L112 + 1660 /* epilogue start */ + 1661 .LM118: + 1662 07e8 DF91 pop r29 + 1663 07ea CF91 pop r28 + 1664 .LVL136: + 1665 07ec 1F91 pop r17 + 1666 07ee 0F91 pop r16 + 1667 .LVL137: + 1668 07f0 FF90 pop r15 + 1669 07f2 EF90 pop r14 + 1670 .LVL138: + 1671 07f4 DF90 pop r13 + 1672 07f6 CF90 pop r12 + 1673 .LVL139: + 1674 07f8 BF90 pop r11 + 1675 07fa AF90 pop r10 + 1676 .LVL140: + 1677 07fc 9F90 pop r9 + 1678 07fe 8F90 pop r8 + 1679 .LVL141: + 1680 0800 0895 ret + 1681 .LFE21: + 1683 .global byteline + 1685 byteline: + 1686 .LFB22: + 1687 .LM119: + 1688 .LVL142: + 1689 /* prologue: function */ + 1690 /* frame size = 0 */ + 1691 .LM120: + 1692 0802 6F5F subi r22,lo8(-(1)) + 1693 0804 7F4F sbci r23,hi8(-(1)) + 1694 .LVL143: + 1695 0806 2FEF ldi r18,lo8(255) + 1696 0808 30E0 ldi r19,hi8(255) + 1697 080a A901 movw r20,r18 + 1698 080c 00C0 rjmp 2f + 1699 080e 440F 1: lsl r20 + 1700 0810 551F rol r21 + 1701 0812 6A95 2: dec r22 + 1702 0814 02F4 brpl 1b + 1703 0816 BA01 movw r22,r20 + 1704 .LVL144: + 1705 0818 6095 com r22 + 1706 081a 00C0 rjmp 2f + 1707 081c 220F 1: lsl r18 + 1708 081e 331F rol r19 + 1709 0820 8A95 2: dec r24 + 1710 0822 02F4 brpl 1b + 1711 .LM121: + 1712 0824 862F mov r24,r22 + 1713 .LVL145: + 1714 0826 8223 and r24,r18 + 1715 /* epilogue start */ + 1716 0828 0895 ret + 1717 .LFE22: + 1719 .global flipbyte + 1721 flipbyte: + 1722 .LFB23: + 1723 .LM122: + 1724 .LVL146: + 1725 /* prologue: function */ + 1726 /* frame size = 0 */ + 1727 082a 482F mov r20,r24 + 1728 .LM123: + 1729 082c 282F mov r18,r24 + 1730 082e 30E0 ldi r19,lo8(0) + 1731 0830 8295 swap r24 + 1732 .LVL147: + 1733 0832 8695 lsr r24 + 1734 0834 8270 andi r24,lo8(2) + 1735 0836 942F mov r25,r20 + 1736 0838 991F rol r25 + 1737 083a 9927 clr r25 + 1738 083c 991F rol r25 + 1739 083e 892B or r24,r25 + 1740 0840 942F mov r25,r20 + 1741 0842 9695 lsr r25 + 1742 0844 9695 lsr r25 + 1743 0846 9695 lsr r25 + 1744 0848 9470 andi r25,lo8(4) + 1745 084a 892B or r24,r25 + 1746 084c 4695 lsr r20 + 1747 084e 4870 andi r20,lo8(8) + 1748 0850 842B or r24,r20 + 1749 0852 220F lsl r18 + 1750 0854 331F rol r19 + 1751 0856 922F mov r25,r18 + 1752 0858 9071 andi r25,lo8(16) + 1753 085a 892B or r24,r25 + 1754 085c 220F lsl r18 + 1755 085e 331F rol r19 + 1756 0860 220F lsl r18 + 1757 0862 331F rol r19 + 1758 0864 922F mov r25,r18 + 1759 0866 9072 andi r25,lo8(32) + 1760 0868 892B or r24,r25 + 1761 086a 220F lsl r18 + 1762 086c 331F rol r19 + 1763 086e 220F lsl r18 + 1764 0870 331F rol r19 + 1765 .LVL148: + 1766 0872 922F mov r25,r18 + 1767 0874 9074 andi r25,lo8(64) + 1768 0876 892B or r24,r25 + 1769 0878 220F lsl r18 + 1770 087a 331F rol r19 + 1771 087c 220F lsl r18 + 1772 087e 331F rol r19 + 1773 .LM124: + 1774 0880 822B or r24,r18 + 1775 /* epilogue start */ + 1776 0882 0895 ret + 1777 .LFE23: + 1779 .global line + 1781 line: + 1782 .LFB24: + 1783 .LM125: + 1784 .LVL149: + 1785 0884 2F92 push r2 + 1786 0886 3F92 push r3 + 1787 0888 4F92 push r4 + 1788 088a 5F92 push r5 + 1789 088c 6F92 push r6 + 1790 088e 7F92 push r7 + 1791 0890 8F92 push r8 + 1792 0892 9F92 push r9 + 1793 0894 AF92 push r10 + 1794 0896 BF92 push r11 + 1795 0898 CF92 push r12 + 1796 089a DF92 push r13 + 1797 089c EF92 push r14 + 1798 .LVL150: + 1799 089e FF92 push r15 + 1800 08a0 0F93 push r16 + 1801 .LVL151: + 1802 08a2 1F93 push r17 + 1803 08a4 DF93 push r29 + 1804 08a6 CF93 push r28 + 1805 08a8 CDB7 in r28,__SP_L__ + 1806 08aa DEB7 in r29,__SP_H__ + 1807 08ac 6297 sbiw r28,18 + 1808 08ae 0FB6 in __tmp_reg__,__SREG__ + 1809 08b0 F894 cli + 1810 08b2 DEBF out __SP_H__,r29 + 1811 08b4 0FBE out __SREG__,__tmp_reg__ + 1812 08b6 CDBF out __SP_L__,r28 + 1813 /* prologue: function */ + 1814 /* frame size = 18 */ + 1815 08b8 4C01 movw r8,r24 + 1816 08ba 5B01 movw r10,r22 + 1817 08bc 2A01 movw r4,r20 + 1818 08be 3901 movw r6,r18 + 1819 08c0 6701 movw r12,r14 + 1820 .LVL152: + 1821 .LM126: + 1822 08c2 2817 cp r18,r24 + 1823 08c4 3907 cpc r19,r25 + 1824 08c6 04F4 brge .L119 + 1825 .LVL153: + 1826 08c8 3401 movw r6,r8 + 1827 .LVL154: + 1828 08ca 4901 movw r8,r18 + 1829 08cc C801 movw r24,r16 + 1830 .LVL155: + 1831 08ce 8B01 movw r16,r22 + 1832 .LVL156: + 1833 08d0 5C01 movw r10,r24 + 1834 08d2 6A01 movw r12,r20 + 1835 08d4 2701 movw r4,r14 + 1836 .LVL157: + 1837 .L119: + 1838 08d6 1301 movw r2,r6 + 1839 08d8 2818 sub r2,r8 + 1840 08da 3908 sbc r3,r9 + 1841 .LM127: + 1842 08dc 0A15 cp r16,r10 + 1843 08de 1B05 cpc r17,r11 + 1844 08e0 04F4 brge .L120 + 1845 .LM128: + 1846 08e2 B501 movw r22,r10 + 1847 08e4 601B sub r22,r16 + 1848 08e6 710B sbc r23,r17 + 1849 08e8 8827 clr r24 + 1850 08ea 77FD sbrc r23,7 + 1851 08ec 8095 com r24 + 1852 08ee 982F mov r25,r24 + 1853 08f0 00C0 rjmp .L128 + 1854 .LVL158: + 1855 .L120: + 1856 .LM129: + 1857 08f2 0A19 sub r16,r10 + 1858 08f4 1B09 sbc r17,r11 + 1859 08f6 B801 movw r22,r16 + 1860 08f8 8827 clr r24 + 1861 08fa 77FD sbrc r23,7 + 1862 08fc 8095 com r24 + 1863 08fe 982F mov r25,r24 + 1864 .L128: + 1865 0900 0E94 0000 call __floatsisf + 1866 0904 7B01 movw r14,r22 + 1867 0906 8C01 movw r16,r24 + 1868 0908 B101 movw r22,r2 + 1869 090a 8827 clr r24 + 1870 090c 77FD sbrc r23,7 + 1871 090e 8095 com r24 + 1872 0910 982F mov r25,r24 + 1873 0912 0E94 0000 call __floatsisf + 1874 0916 9B01 movw r18,r22 + 1875 0918 AC01 movw r20,r24 + 1876 091a C801 movw r24,r16 + 1877 091c B701 movw r22,r14 + 1878 091e 0E94 0000 call __divsf3 + 1879 0922 6D83 std Y+5,r22 + 1880 0924 7E83 std Y+6,r23 + 1881 0926 8F83 std Y+7,r24 + 1882 0928 9887 std Y+8,r25 + 1883 .LVL159: + 1884 092a 1301 movw r2,r6 + 1885 092c 2818 sub r2,r8 + 1886 092e 3908 sbc r3,r9 + 1887 .LM130: + 1888 0930 C414 cp r12,r4 + 1889 0932 D504 cpc r13,r5 + 1890 0934 04F4 brge .L122 + 1891 .LM131: + 1892 0936 B201 movw r22,r4 + 1893 0938 6C19 sub r22,r12 + 1894 093a 7D09 sbc r23,r13 + 1895 093c 8827 clr r24 + 1896 093e 77FD sbrc r23,7 + 1897 0940 8095 com r24 + 1898 0942 982F mov r25,r24 + 1899 0944 00C0 rjmp .L129 + 1900 .L122: + 1901 .LM132: + 1902 0946 C418 sub r12,r4 + 1903 0948 D508 sbc r13,r5 + 1904 094a B601 movw r22,r12 + 1905 094c 8827 clr r24 + 1906 094e 77FD sbrc r23,7 + 1907 0950 8095 com r24 + 1908 0952 982F mov r25,r24 + 1909 .L129: + 1910 0954 0E94 0000 call __floatsisf + 1911 0958 7B01 movw r14,r22 + 1912 095a 8C01 movw r16,r24 + 1913 095c B101 movw r22,r2 + 1914 095e 8827 clr r24 + 1915 0960 77FD sbrc r23,7 + 1916 0962 8095 com r24 + 1917 0964 982F mov r25,r24 + 1918 0966 0E94 0000 call __floatsisf + 1919 096a 9B01 movw r18,r22 + 1920 096c AC01 movw r20,r24 + 1921 096e C801 movw r24,r16 + 1922 0970 B701 movw r22,r14 + 1923 0972 0E94 0000 call __divsf3 + 1924 0976 6983 std Y+1,r22 + 1925 0978 7A83 std Y+2,r23 + 1926 097a 8B83 std Y+3,r24 + 1927 097c 9C83 std Y+4,r25 + 1928 .LVL160: + 1929 .LM133: + 1930 097e 382C mov r3,r8 + 1931 .LVL161: + 1932 .LM134: + 1933 0980 C501 movw r24,r10 + 1934 0982 AA27 clr r26 + 1935 0984 97FD sbrc r25,7 + 1936 0986 A095 com r26 + 1937 0988 BA2F mov r27,r26 + 1938 098a 8987 std Y+9,r24 + 1939 098c 9A87 std Y+10,r25 + 1940 098e AB87 std Y+11,r26 + 1941 0990 BC87 std Y+12,r27 + 1942 0992 C201 movw r24,r4 + 1943 0994 AA27 clr r26 + 1944 0996 97FD sbrc r25,7 + 1945 0998 A095 com r26 + 1946 099a BA2F mov r27,r26 + 1947 099c 8D87 std Y+13,r24 + 1948 099e 9E87 std Y+14,r25 + 1949 09a0 AF87 std Y+15,r26 + 1950 09a2 B88B std Y+16,r27 + 1951 09a4 00C0 rjmp .L124 + 1952 .L126: + 1953 .LBB170: + 1954 .LBB172: + 1955 .LBB174: + 1956 .LBB176: + 1957 .LM135: + 1958 09a6 A989 ldd r26,Y+17 + 1959 09a8 BA89 ldd r27,Y+18 + 1960 09aa A830 cpi r26,8 + 1961 09ac B105 cpc r27,__zero_reg__ + 1962 09ae 00F0 brlo .+2 + 1963 09b0 00C0 rjmp .L125 + 1964 .LBE176: + 1965 .LBE174: + 1966 .LBE172: + 1967 .LBE170: + 1968 .LM136: + 1969 09b2 BD01 movw r22,r26 + 1970 09b4 6819 sub r22,r8 + 1971 09b6 7909 sbc r23,r9 + 1972 09b8 8827 clr r24 + 1973 09ba 77FD sbrc r23,7 + 1974 09bc 8095 com r24 + 1975 09be 982F mov r25,r24 + 1976 09c0 0E94 0000 call __floatsisf + 1977 09c4 5B01 movw r10,r22 + 1978 09c6 6C01 movw r12,r24 + 1979 .LVL162: + 1980 .LM137: + 1981 09c8 6D81 ldd r22,Y+5 + 1982 09ca 7E81 ldd r23,Y+6 + 1983 09cc 8F81 ldd r24,Y+7 + 1984 09ce 9885 ldd r25,Y+8 + 1985 09d0 A601 movw r20,r12 + 1986 09d2 9501 movw r18,r10 + 1987 09d4 0E94 0000 call __mulsf3 + 1988 09d8 7B01 movw r14,r22 + 1989 09da 8C01 movw r16,r24 + 1990 09dc 6985 ldd r22,Y+9 + 1991 09de 7A85 ldd r23,Y+10 + 1992 09e0 8B85 ldd r24,Y+11 + 1993 09e2 9C85 ldd r25,Y+12 + 1994 09e4 0E94 0000 call __floatsisf + 1995 09e8 9B01 movw r18,r22 + 1996 09ea AC01 movw r20,r24 + 1997 09ec C801 movw r24,r16 + 1998 09ee B701 movw r22,r14 + 1999 09f0 0E94 0000 call __addsf3 + 2000 09f4 0E94 0000 call __fixunssfsi + 2001 09f8 462E mov r4,r22 + 2002 .LVL163: + 2003 09fa 5524 clr r5 + 2004 .LBB180: + 2005 .LBB171: + 2006 .LBB173: + 2007 .LBB175: + 2008 .LM138: + 2009 09fc B8E0 ldi r27,lo8(8) + 2010 09fe 4B16 cp r4,r27 + 2011 0a00 5104 cpc r5,__zero_reg__ + 2012 0a02 04F4 brge .L125 + 2013 .LBE175: + 2014 .LBE173: + 2015 .LBE171: + 2016 .LBE180: + 2017 .LM139: + 2018 0a04 6981 ldd r22,Y+1 + 2019 0a06 7A81 ldd r23,Y+2 + 2020 0a08 8B81 ldd r24,Y+3 + 2021 0a0a 9C81 ldd r25,Y+4 + 2022 0a0c A601 movw r20,r12 + 2023 0a0e 9501 movw r18,r10 + 2024 0a10 0E94 0000 call __mulsf3 + 2025 0a14 7B01 movw r14,r22 + 2026 0a16 8C01 movw r16,r24 + 2027 0a18 6D85 ldd r22,Y+13 + 2028 0a1a 7E85 ldd r23,Y+14 + 2029 0a1c 8F85 ldd r24,Y+15 + 2030 0a1e 9889 ldd r25,Y+16 + 2031 0a20 0E94 0000 call __floatsisf + 2032 0a24 9B01 movw r18,r22 + 2033 0a26 AC01 movw r20,r24 + 2034 0a28 C801 movw r24,r16 + 2035 0a2a B701 movw r22,r14 + 2036 0a2c 0E94 0000 call __addsf3 + 2037 0a30 0E94 0000 call __fixunssfsi + 2038 0a34 70E0 ldi r23,lo8(0) + 2039 .LBB181: + 2040 .LBB179: + 2041 .LBB178: + 2042 .LBB177: + 2043 .LM140: + 2044 0a36 6830 cpi r22,8 + 2045 0a38 7105 cpc r23,__zero_reg__ + 2046 0a3a 04F4 brge .L125 + 2047 .LBE177: + 2048 .LBE178: + 2049 .LM141: + 2050 0a3c FB01 movw r30,r22 + 2051 0a3e 73E0 ldi r23,3 + 2052 0a40 EE0F 1: lsl r30 + 2053 0a42 FF1F rol r31 + 2054 0a44 7A95 dec r23 + 2055 0a46 01F4 brne 1b + 2056 0a48 E40D add r30,r4 + 2057 0a4a F51D adc r31,r5 + 2058 0a4c E050 subi r30,lo8(-(cube)) + 2059 0a4e F040 sbci r31,hi8(-(cube)) + 2060 0a50 2081 ld r18,Z + 2061 0a52 81E0 ldi r24,lo8(1) + 2062 0a54 90E0 ldi r25,hi8(1) + 2063 0a56 0988 ldd r0,Y+17 + 2064 0a58 00C0 rjmp 2f + 2065 0a5a 880F 1: lsl r24 + 2066 0a5c 991F rol r25 + 2067 0a5e 0A94 2: dec r0 + 2068 0a60 02F4 brpl 1b + 2069 0a62 282B or r18,r24 + 2070 0a64 2083 st Z,r18 + 2071 .LVL164: + 2072 .L125: + 2073 .LBE179: + 2074 .LBE181: + 2075 .LM142: + 2076 0a66 3394 inc r3 + 2077 .L124: + 2078 0a68 E32D mov r30,r3 + 2079 0a6a F0E0 ldi r31,lo8(0) + 2080 0a6c FA8B std Y+18,r31 + 2081 0a6e E98B std Y+17,r30 + 2082 0a70 6E16 cp r6,r30 + 2083 0a72 7F06 cpc r7,r31 + 2084 0a74 04F0 brlt .+2 + 2085 0a76 00C0 rjmp .L126 + 2086 /* epilogue start */ + 2087 .LM143: + 2088 0a78 6296 adiw r28,18 + 2089 0a7a 0FB6 in __tmp_reg__,__SREG__ + 2090 0a7c F894 cli + 2091 0a7e DEBF out __SP_H__,r29 + 2092 0a80 0FBE out __SREG__,__tmp_reg__ + 2093 0a82 CDBF out __SP_L__,r28 + 2094 0a84 CF91 pop r28 + 2095 0a86 DF91 pop r29 + 2096 0a88 1F91 pop r17 + 2097 0a8a 0F91 pop r16 + 2098 .LVL165: + 2099 0a8c FF90 pop r15 + 2100 0a8e EF90 pop r14 + 2101 0a90 DF90 pop r13 + 2102 0a92 CF90 pop r12 + 2103 .LVL166: + 2104 0a94 BF90 pop r11 + 2105 0a96 AF90 pop r10 + 2106 .LVL167: + 2107 0a98 9F90 pop r9 + 2108 0a9a 8F90 pop r8 + 2109 .LVL168: + 2110 0a9c 7F90 pop r7 + 2111 0a9e 6F90 pop r6 + 2112 .LVL169: + 2113 0aa0 5F90 pop r5 + 2114 0aa2 4F90 pop r4 + 2115 .LVL170: + 2116 0aa4 3F90 pop r3 + 2117 .LVL171: + 2118 0aa6 2F90 pop r2 + 2119 0aa8 0895 ret + 2120 .LFE24: + 2122 .global delay_ms + 2124 delay_ms: + 2125 .LFB25: + 2126 .LM144: + 2127 .LVL172: + 2128 /* prologue: function */ + 2129 /* frame size = 0 */ + 2130 0aaa 00C0 rjmp .L131 + 2131 .LVL173: + 2132 .L133: + 2133 .LM145: + 2134 0aac 20E0 ldi r18,lo8(0) + 2135 .L132: + 2136 .LM146: + 2137 /* #APP */ + 2138 ; 350 "draw.c" 1 + 2139 0aae 0000 nop + 2140 ; 0 "" 2 + 2141 ; 350 "draw.c" 1 + 2142 0ab0 0000 nop + 2143 ; 0 "" 2 + 2144 ; 350 "draw.c" 1 + 2145 0ab2 0000 nop + 2146 ; 0 "" 2 + 2147 ; 350 "draw.c" 1 + 2148 0ab4 0000 nop + 2149 ; 0 "" 2 + 2150 ; 350 "draw.c" 1 + 2151 0ab6 0000 nop + 2152 ; 0 "" 2 + 2153 ; 350 "draw.c" 1 + 2154 0ab8 0000 nop + 2155 ; 0 "" 2 + 2156 .LM147: + 2157 /* #NOAPP */ + 2158 0aba 2F5F subi r18,lo8(-(1)) + 2159 0abc 2A35 cpi r18,lo8(90) + 2160 0abe 01F4 brne .L132 + 2161 .LM148: + 2162 0ac0 0197 sbiw r24,1 + 2163 .LVL174: + 2164 .L131: + 2165 0ac2 0097 sbiw r24,0 + 2166 0ac4 01F4 brne .L133 + 2167 /* epilogue start */ + 2168 .LM149: + 2169 0ac6 0895 ret + 2170 .LFE25: + 2172 .global tmp2cube + 2174 tmp2cube: + 2175 .LFB26: + 2176 .LM150: + 2177 /* prologue: function */ + 2178 /* frame size = 0 */ + 2179 .LM151: + 2180 0ac8 40E0 ldi r20,lo8(0) + 2181 0aca 50E0 ldi r21,hi8(0) + 2182 .LVL175: + 2183 0acc 00C0 rjmp .L137 + 2184 .LVL176: + 2185 .L138: + 2186 .LM152: + 2187 0ace FB01 movw r30,r22 + 2188 0ad0 E20F add r30,r18 + 2189 0ad2 F31F adc r31,r19 + 2190 0ad4 DF01 movw r26,r30 + 2191 0ad6 A050 subi r26,lo8(-(fb)) + 2192 0ad8 B040 sbci r27,hi8(-(fb)) + 2193 0ada 8C91 ld r24,X + 2194 0adc E050 subi r30,lo8(-(cube)) + 2195 0ade F040 sbci r31,hi8(-(cube)) + 2196 0ae0 8083 st Z,r24 + 2197 .LM153: + 2198 0ae2 2F5F subi r18,lo8(-(1)) + 2199 0ae4 3F4F sbci r19,hi8(-(1)) + 2200 0ae6 2830 cpi r18,8 + 2201 0ae8 3105 cpc r19,__zero_reg__ + 2202 0aea 01F4 brne .L138 + 2203 .LM154: + 2204 0aec 4F5F subi r20,lo8(-(1)) + 2205 0aee 5F4F sbci r21,hi8(-(1)) + 2206 0af0 4830 cpi r20,8 + 2207 0af2 5105 cpc r21,__zero_reg__ + 2208 0af4 01F0 breq .L140 + 2209 .L137: + 2210 0af6 20E0 ldi r18,lo8(0) + 2211 0af8 30E0 ldi r19,hi8(0) + 2212 .LM155: + 2213 0afa BA01 movw r22,r20 + 2214 0afc E3E0 ldi r30,3 + 2215 0afe 660F 1: lsl r22 + 2216 0b00 771F rol r23 + 2217 0b02 EA95 dec r30 + 2218 0b04 01F4 brne 1b + 2219 0b06 00C0 rjmp .L138 + 2220 .L140: + 2221 0b08 0895 ret + 2222 .LFE26: + 2224 .global shift + 2226 shift: + 2227 .LFB27: + 2228 .LM156: + 2229 .LVL177: + 2230 0b0a 2F92 push r2 + 2231 0b0c 3F92 push r3 + 2232 0b0e 4F92 push r4 + 2233 0b10 5F92 push r5 + 2234 0b12 6F92 push r6 + 2235 0b14 7F92 push r7 + 2236 0b16 9F92 push r9 + 2237 0b18 AF92 push r10 + 2238 0b1a BF92 push r11 + 2239 0b1c CF92 push r12 + 2240 0b1e DF92 push r13 + 2241 0b20 EF92 push r14 + 2242 0b22 FF92 push r15 + 2243 0b24 0F93 push r16 + 2244 0b26 1F93 push r17 + 2245 0b28 CF93 push r28 + 2246 0b2a DF93 push r29 + 2247 /* prologue: function */ + 2248 /* frame size = 0 */ + 2249 0b2c 982E mov r9,r24 + 2250 0b2e 5B01 movw r10,r22 + 2251 .LM157: + 2252 0b30 CC24 clr r12 + 2253 0b32 DD24 clr r13 + 2254 .LVL178: + 2255 .LM158: + 2256 0b34 A7E0 ldi r26,lo8(7) + 2257 0b36 2A2E mov r2,r26 + 2258 0b38 312C mov r3,__zero_reg__ + 2259 .LVL179: + 2260 .L153: + 2261 0b3a 8FEF ldi r24,lo8(-1) + 2262 0b3c A816 cp r10,r24 + 2263 0b3e 8FEF ldi r24,hi8(-1) + 2264 0b40 B806 cpc r11,r24 + 2265 0b42 01F4 brne .L143 + 2266 0b44 7601 movw r14,r12 + 2267 0b46 00C0 rjmp .L144 + 2268 .L143: + 2269 0b48 7101 movw r14,r2 + 2270 0b4a EC18 sub r14,r12 + 2271 0b4c FD08 sbc r15,r13 + 2272 .L144: + 2273 0b4e 00E0 ldi r16,lo8(0) + 2274 0b50 10E0 ldi r17,hi8(0) + 2275 .LM159: + 2276 0b52 2701 movw r4,r14 + 2277 .LVL180: + 2278 0b54 0894 sec + 2279 0b56 4108 sbc r4,__zero_reg__ + 2280 0b58 5108 sbc r5,__zero_reg__ + 2281 .LM160: + 2282 0b5a 3701 movw r6,r14 + 2283 .LVL181: + 2284 0b5c 0894 sec + 2285 0b5e 611C adc r6,__zero_reg__ + 2286 0b60 711C adc r7,__zero_reg__ + 2287 0b62 00C0 rjmp .L145 + 2288 .LVL182: + 2289 .L151: + 2290 .LM161: + 2291 0b64 8FEF ldi r24,lo8(-1) + 2292 0b66 A816 cp r10,r24 + 2293 0b68 8FEF ldi r24,hi8(-1) + 2294 0b6a B806 cpc r11,r24 + 2295 0b6c 01F4 brne .L146 + 2296 .LM162: + 2297 0b6e C301 movw r24,r6 + 2298 0b70 00C0 rjmp .L166 + 2299 .L146: + 2300 .LM163: + 2301 0b72 C201 movw r24,r4 + 2302 .LVL183: + 2303 .L166: + 2304 0b74 AC01 movw r20,r24 + 2305 .LM164: + 2306 0b76 8AE7 ldi r24,lo8(122) + 2307 0b78 9816 cp r9,r24 + 2308 0b7a 01F4 brne .L148 + 2309 .LVL184: + 2310 .LM165: + 2311 0b7c C801 movw r24,r16 + 2312 0b7e BE01 movw r22,r28 + 2313 0b80 0E94 0000 call getvoxel + 2314 0b84 282F mov r18,r24 + 2315 .LM166: + 2316 0b86 C801 movw r24,r16 + 2317 0b88 BE01 movw r22,r28 + 2318 0b8a A701 movw r20,r14 + 2319 0b8c 00C0 rjmp .L167 + 2320 .LVL185: + 2321 .L148: + 2322 .LM167: + 2323 0b8e 89E7 ldi r24,lo8(121) + 2324 0b90 9816 cp r9,r24 + 2325 0b92 01F4 brne .L150 + 2326 .LM168: + 2327 0b94 C801 movw r24,r16 + 2328 0b96 BA01 movw r22,r20 + 2329 0b98 AE01 movw r20,r28 + 2330 0b9a 0E94 0000 call getvoxel + 2331 0b9e 282F mov r18,r24 + 2332 .LM169: + 2333 0ba0 C801 movw r24,r16 + 2334 0ba2 B701 movw r22,r14 + 2335 0ba4 00C0 rjmp .L169 + 2336 .LVL186: + 2337 .L150: + 2338 .LM170: + 2339 0ba6 88E7 ldi r24,lo8(120) + 2340 0ba8 9816 cp r9,r24 + 2341 0baa 01F4 brne .L149 + 2342 .LM171: + 2343 0bac CA01 movw r24,r20 + 2344 0bae BE01 movw r22,r28 + 2345 0bb0 A801 movw r20,r16 + 2346 0bb2 0E94 0000 call getvoxel + 2347 0bb6 282F mov r18,r24 + 2348 .LM172: + 2349 0bb8 C701 movw r24,r14 + 2350 0bba B801 movw r22,r16 + 2351 .L169: + 2352 0bbc AE01 movw r20,r28 + 2353 .L167: + 2354 0bbe 30E0 ldi r19,lo8(0) + 2355 0bc0 0E94 0000 call altervoxel + 2356 .LVL187: + 2357 .L149: + 2358 .LM173: + 2359 0bc4 2196 adiw r28,1 + 2360 0bc6 C830 cpi r28,8 + 2361 0bc8 D105 cpc r29,__zero_reg__ + 2362 0bca 01F4 brne .L151 + 2363 .LM174: + 2364 0bcc 0F5F subi r16,lo8(-(1)) + 2365 0bce 1F4F sbci r17,hi8(-(1)) + 2366 0bd0 0830 cpi r16,8 + 2367 0bd2 1105 cpc r17,__zero_reg__ + 2368 0bd4 01F0 breq .L152 + 2369 .L145: + 2370 0bd6 C0E0 ldi r28,lo8(0) + 2371 0bd8 D0E0 ldi r29,hi8(0) + 2372 0bda 00C0 rjmp .L151 + 2373 .L152: + 2374 .LM175: + 2375 0bdc 0894 sec + 2376 0bde C11C adc r12,__zero_reg__ + 2377 0be0 D11C adc r13,__zero_reg__ + 2378 0be2 88E0 ldi r24,lo8(8) + 2379 0be4 C816 cp r12,r24 + 2380 0be6 D104 cpc r13,__zero_reg__ + 2381 0be8 01F0 breq .+2 + 2382 0bea 00C0 rjmp .L153 + 2383 .LM176: + 2384 0bec 8FEF ldi r24,lo8(-1) + 2385 0bee A816 cp r10,r24 + 2386 0bf0 8FEF ldi r24,hi8(-1) + 2387 0bf2 B806 cpc r11,r24 + 2388 0bf4 01F0 breq .L154 + 2389 0bf6 EE24 clr r14 + 2390 0bf8 FF24 clr r15 + 2391 .LVL188: + 2392 0bfa 00C0 rjmp .L155 + 2393 .LVL189: + 2394 .L154: + 2395 0bfc F7E0 ldi r31,lo8(7) + 2396 0bfe EF2E mov r14,r31 + 2397 0c00 F12C mov r15,__zero_reg__ + 2398 .LVL190: + 2399 .L155: + 2400 0c02 00E0 ldi r16,lo8(0) + 2401 0c04 10E0 ldi r17,hi8(0) + 2402 .LVL191: + 2403 0c06 00C0 rjmp .L156 + 2404 .L160: + 2405 .LM177: + 2406 0c08 8AE7 ldi r24,lo8(122) + 2407 0c0a 9816 cp r9,r24 + 2408 0c0c 01F4 brne .L157 + 2409 .LM178: + 2410 0c0e C801 movw r24,r16 + 2411 0c10 BE01 movw r22,r28 + 2412 0c12 A701 movw r20,r14 + 2413 0c14 00C0 rjmp .L168 + 2414 .LVL192: + 2415 .L157: + 2416 .LM179: + 2417 0c16 89E7 ldi r24,lo8(121) + 2418 0c18 9816 cp r9,r24 + 2419 0c1a 01F4 brne .L159 + 2420 .LM180: + 2421 0c1c C801 movw r24,r16 + 2422 0c1e B701 movw r22,r14 + 2423 0c20 AE01 movw r20,r28 + 2424 0c22 00C0 rjmp .L168 + 2425 .LVL193: + 2426 .L159: + 2427 .LM181: + 2428 0c24 88E7 ldi r24,lo8(120) + 2429 0c26 9816 cp r9,r24 + 2430 0c28 01F4 brne .L158 + 2431 .LM182: + 2432 0c2a C701 movw r24,r14 + 2433 0c2c BE01 movw r22,r28 + 2434 0c2e A801 movw r20,r16 + 2435 .L168: + 2436 0c30 0E94 0000 call clrvoxel + 2437 .LVL194: + 2438 .L158: + 2439 .LM183: + 2440 0c34 2196 adiw r28,1 + 2441 0c36 C830 cpi r28,8 + 2442 0c38 D105 cpc r29,__zero_reg__ + 2443 0c3a 01F4 brne .L160 + 2444 .LM184: + 2445 0c3c 0F5F subi r16,lo8(-(1)) + 2446 0c3e 1F4F sbci r17,hi8(-(1)) + 2447 0c40 0830 cpi r16,8 + 2448 0c42 1105 cpc r17,__zero_reg__ + 2449 0c44 01F0 breq .L162 + 2450 .L156: + 2451 0c46 C0E0 ldi r28,lo8(0) + 2452 0c48 D0E0 ldi r29,hi8(0) + 2453 0c4a 00C0 rjmp .L160 + 2454 .L162: + 2455 /* epilogue start */ + 2456 .LM185: + 2457 0c4c DF91 pop r29 + 2458 0c4e CF91 pop r28 + 2459 .LVL195: + 2460 0c50 1F91 pop r17 + 2461 0c52 0F91 pop r16 + 2462 .LVL196: + 2463 0c54 FF90 pop r15 + 2464 0c56 EF90 pop r14 + 2465 .LVL197: + 2466 0c58 DF90 pop r13 + 2467 0c5a CF90 pop r12 + 2468 0c5c BF90 pop r11 + 2469 0c5e AF90 pop r10 + 2470 .LVL198: + 2471 0c60 9F90 pop r9 + 2472 .LVL199: + 2473 0c62 7F90 pop r7 + 2474 0c64 6F90 pop r6 + 2475 .LVL200: + 2476 0c66 5F90 pop r5 + 2477 0c68 4F90 pop r4 + 2478 .LVL201: + 2479 0c6a 3F90 pop r3 + 2480 0c6c 2F90 pop r2 + 2481 0c6e 0895 ret + 2482 .LFE27: + 2484 .comm cube,64,1 + 2485 .comm fb,64,1 + 2710 .Letext0: +DEFINED SYMBOLS + *ABS*:0000000000000000 draw.c + /tmp/ccqCtm9Q.s:2 *ABS*:000000000000003f __SREG__ + /tmp/ccqCtm9Q.s:3 *ABS*:000000000000003e __SP_H__ + /tmp/ccqCtm9Q.s:4 *ABS*:000000000000003d __SP_L__ + /tmp/ccqCtm9Q.s:5 *ABS*:0000000000000034 __CCP__ + /tmp/ccqCtm9Q.s:6 *ABS*:0000000000000000 __tmp_reg__ + /tmp/ccqCtm9Q.s:7 *ABS*:0000000000000001 __zero_reg__ + /tmp/ccqCtm9Q.s:20 .text:0000000000000000 setvoxel + *COM*:0000000000000040 cube + /tmp/ccqCtm9Q.s:74 .text:0000000000000046 tmpsetvoxel + *COM*:0000000000000040 fb + /tmp/ccqCtm9Q.s:128 .text:000000000000008c clrvoxel + /tmp/ccqCtm9Q.s:183 .text:00000000000000d4 tmpclrvoxel + /tmp/ccqCtm9Q.s:238 .text:000000000000011c inrange + /tmp/ccqCtm9Q.s:277 .text:0000000000000144 getvoxel + /tmp/ccqCtm9Q.s:336 .text:000000000000018a altervoxel + /tmp/ccqCtm9Q.s:404 .text:00000000000001d8 flpvoxel + /tmp/ccqCtm9Q.s:458 .text:000000000000021e argorder + /tmp/ccqCtm9Q.s:497 .text:0000000000000242 setplane_z + /tmp/ccqCtm9Q.s:538 .text:0000000000000270 clrplane_z + /tmp/ccqCtm9Q.s:578 .text:000000000000029c setplane_x + /tmp/ccqCtm9Q.s:645 .text:00000000000002f2 clrplane_x + /tmp/ccqCtm9Q.s:713 .text:000000000000034a setplane_y + /tmp/ccqCtm9Q.s:752 .text:0000000000000378 clrplane_y + /tmp/ccqCtm9Q.s:790 .text:00000000000003a4 fill + /tmp/ccqCtm9Q.s:839 .text:00000000000003de tmpfill + /tmp/ccqCtm9Q.s:888 .text:0000000000000418 box_filled + /tmp/ccqCtm9Q.s:1026 .text:00000000000004ae box_walls + /tmp/ccqCtm9Q.s:1212 .text:0000000000000596 box_wireframe + /tmp/ccqCtm9Q.s:1685 .text:0000000000000802 byteline + /tmp/ccqCtm9Q.s:1721 .text:000000000000082a flipbyte + /tmp/ccqCtm9Q.s:1781 .text:0000000000000884 line + /tmp/ccqCtm9Q.s:2124 .text:0000000000000aaa delay_ms + /tmp/ccqCtm9Q.s:2174 .text:0000000000000ac8 tmp2cube + /tmp/ccqCtm9Q.s:2226 .text:0000000000000b0a shift + +UNDEFINED SYMBOLS +__do_copy_data +__do_clear_bss +__floatsisf +__divsf3 +__mulsf3 +__addsf3 +__fixunssfsi diff --git a/instructables/cube_pc/draw_3d.c b/instructables/cube_pc/draw_3d.c new file mode 100644 index 0000000..c3201d9 --- /dev/null +++ b/instructables/cube_pc/draw_3d.c @@ -0,0 +1,96 @@ +#include "draw_3d.h" +#include + + +vertex point_rotate_around_point (vertex point, vertex center, float rotation_x, float rotation_y, float rotation_z) +{ + float x, y, z; + float sx,cx, sy,cy, sz,cz; + float xy,xz, yx,yz, zx,zy; + vertex newpoint; + + // Center all the points around 0,0,0 + x = point.x - center.x; + y = point.y - center.y; + z = point.z - center.z; + + // Precalculate sinus and cosinus for each axis rotation + sx = sin(rotation_x); + cx = cos(rotation_x); + + sy = sin(rotation_y); + cy = cos(rotation_y); + + sz = sin(rotation_z); + cz = cos(rotation_z); + + + // Rotation around x + xy = cx*y - sx*z; + xz = sx*y + cx*z; + + // Rotation around y + yz = cy*xz - sy*x; + yx = sy*xz + cy*x; + + // Rotation around z + zx = cz*yx - sz*xy; + zy = sz*yx + cz*xy; + + newpoint.x = zx + center.x; + newpoint.y = zy + center.y; + newpoint.z = yz + center.z; + + + return newpoint; +} + + +// Calculate all 8 corners of a cube. +void calculate_cube_corners (vertex pnt[8], vertex center, float size) +{ + + // Distance from center on any axis. + float dist = size/2; + + // Points + // X Y Z + + pnt[0].x = center.x+dist; pnt[0].y = center.y+dist; pnt[0].z = center.z+dist; // 0 right, front, upper + pnt[1].x = center.x-dist; pnt[1].y = center.y+dist; pnt[1].z = center.z+dist; // 1 left, front, upper + pnt[2].x = center.x+dist; pnt[2].y = center.y-dist; pnt[2].z = center.z+dist; // 2 right, back, upper + pnt[3].x = center.x-dist; pnt[3].y = center.y-dist; pnt[3].z = center.z+dist; // 3 left, back, uppper + pnt[4].x = center.x+dist; pnt[4].y = center.y+dist; pnt[4].z = center.z-dist; // 4 right, front, lower + pnt[5].x = center.x-dist; pnt[5].y = center.y+dist; pnt[5].z = center.z-dist; // 5 left, front, lower + pnt[6].x = center.x+dist; pnt[6].y = center.y-dist; pnt[6].z = center.z-dist; // 6 right, back, lower + pnt[7].x = center.x-dist; pnt[7].y = center.y-dist; pnt[7].z = center.z-dist; // 7 left, bakc, lower + + +} + +void draw_cube_wireframe (vertex pnt[8]) +{ + int i; + + // upper "lid" + line_3d ((int)pnt[0].x,(int)pnt[0].y,(int)pnt[0].z,(int)pnt[1].x,(int)pnt[1].y,(int)pnt[1].z); + line_3d ((int)pnt[2].x,(int)pnt[2].y,(int)pnt[2].z,(int)pnt[3].x,(int)pnt[3].y,(int)pnt[3].z); + line_3d ((int)pnt[1].x,(int)pnt[1].y,(int)pnt[1].z,(int)pnt[3].x,(int)pnt[3].y,(int)pnt[3].z); + line_3d ((int)pnt[2].x,(int)pnt[2].y,(int)pnt[2].z,(int)pnt[0].x,(int)pnt[0].y,(int)pnt[0].z); + + // lower "lid" + line_3d ((int)pnt[4].x,(int)pnt[4].y,(int)pnt[4].z,(int)pnt[5].x,(int)pnt[5].y,(int)pnt[5].z); + line_3d ((int)pnt[6].x,(int)pnt[6].y,(int)pnt[6].z,(int)pnt[7].x,(int)pnt[7].y,(int)pnt[7].z); + line_3d ((int)pnt[5].x,(int)pnt[5].y,(int)pnt[5].z,(int)pnt[7].x,(int)pnt[7].y,(int)pnt[7].z); + line_3d ((int)pnt[6].x,(int)pnt[6].y,(int)pnt[6].z,(int)pnt[4].x,(int)pnt[4].y,(int)pnt[4].z); + + // side walls + line_3d ((int)pnt[0].x,(int)pnt[0].y,(int)pnt[0].z,(int)pnt[4].x,(int)pnt[4].y,(int)pnt[4].z); + line_3d ((int)pnt[1].x,(int)pnt[1].y,(int)pnt[1].z,(int)pnt[5].x,(int)pnt[5].y,(int)pnt[5].z); + line_3d ((int)pnt[2].x,(int)pnt[2].y,(int)pnt[2].z,(int)pnt[6].x,(int)pnt[6].y,(int)pnt[6].z); + line_3d ((int)pnt[3].x,(int)pnt[3].y,(int)pnt[3].z,(int)pnt[7].x,(int)pnt[7].y,(int)pnt[7].z); + +} + + + diff --git a/instructables/cube_pc/draw_3d.h b/instructables/cube_pc/draw_3d.h new file mode 100644 index 0000000..0f56033 --- /dev/null +++ b/instructables/cube_pc/draw_3d.h @@ -0,0 +1,26 @@ +#include + +#ifndef DRAW3D_H +#define DRAW3D_H + + +typedef struct { + float x; + float y; + float z; +} vertex; + +typedef struct { + int x; + int y; + int z; +} intvertex; + +vertex point_rotate_around_point (vertex point, vertex center, float rotation_x, float rotation_y, float rotation_z); + +void rotate_cube_contents(float rx, float ry, float rz); + +void calculate_cube_corners (vertex points[8], vertex center, float size); + + +#endif diff --git a/instructables/cube_pc/effect.c b/instructables/cube_pc/effect.c new file mode 100644 index 0000000..e6ed54a --- /dev/null +++ b/instructables/cube_pc/effect.c @@ -0,0 +1,1478 @@ +#include "effect.h" +#include "draw.h" +#include "font.h" +#include + +void effect_test (void) +{ + + int x,y,i; + + for (i=0;i<1000;i++) + { + x = sin(i/8)*2+3.5; + y = cos(i/8)*2+3.5; + + setvoxel(x,y,1); + setvoxel(x,y,1); + delay_ms(1000); + fill(0x00); + } + +} + + +//void effext_stringfly2 (char *str, char axis, char mirror, char direction, int delay, int space) +void effect_stringfly2(char * str) +{ + int x,y,i,ii; + int state; + + unsigned char chr[5]; + + while (*str) + { + font_getchar(*str++, chr); + + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + setvoxel(7,x+2,y); + } + } + } + + for (ii = 0; ii<6; ii++) + { + delay_ms(1500); + for (i = 0; i < 7; i++) + { + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + state = getvoxel(i+1,x,y); + altervoxel(i,x,y,state); + } + } + } + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + clrvoxel(7,x,y); + } + } + } + } + for (ii = 0; ii<8; ii++) + { + delay_ms(1500); + for (i = 0; i < 7; i++) + { + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + state = getvoxel(i+1,x,y); + altervoxel(i,x,y,state); + } + } + } + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + clrvoxel(7,x,y); + } + } + } + +} + +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + if (plane == AXIS_Z) + setplane_z(i); + + if (plane == AXIS_X) + setplane_x(i); + + if (plane == AXIS_Y) + setplane_y(i); + + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + if (plane == AXIS_Z) + setplane_z(i); + + if (plane == AXIS_X) + setplane_x(i); + + if (plane == AXIS_Y) + setplane_y(i); + + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +void effect_box_shrink_grow (int iterations, int mode, int direction, uint16_t delay) +{ + int x; + int i; + + int x1 = 0; + int y1 = 0; + int z1 = 0; + int x2 = 0; + int y2 = 0; + int z2 = 0; + + + for (x=0;x=0;i--) + { + if(direction == 0) + { + // Dette funker også.. + // memcpy(test, (int[]){1, 2, 3, 4, 5, 6}, 6 * sizeof(int)); + x1=0; y1=0; z1=0; x2=i; y2=i; z2=i; + } + + if(direction == 1) // fail + { + x1=0; y1=0; z1=7-i; x2=i; y2=i; z2=7; + } + + if(direction == 2) + { + x1=0; y1=7; z1=0; x2=i; y2=7-i; z2=i; + } + + if(direction == 3) //fail + { + x1=0; y1=7; z1=7; x2=i; y2=7-i; z2=7-i; + } + + if(direction == 4) //fail + { + x1=7; y1=0; z1=0; x2=7-i; y2=i; z2=i; + } + + if(direction == 5) + { + x1=7; y1=0; z1=7; x2=7-i; y2=i; z2=7-i; + } + + if(direction == 6) //fail + { + x1=7; y1=7; z1=0; x2=7-i; y2=7-i; z2=i; + } + + if(direction == 7) + { + x1=7; y1=7; z1=7; x2=7-i; y2=7-i; z2=7-i; + } + + if (mode == 3) + { + box_filled(x1,y1,z1,x2,y2,z2); + } + else if (mode == 2) + { + box_walls(x1,y1,z1,x2,y2,z2); + } + else + { + box_wireframe(x1,y1,z1,x2,y2,z2); + } + + delay_ms(delay); + fill(0x00); + } + for (i=0;i<8;i++) + { + if(direction == 0) + { + x1=0; y1=0; z1=0; x2=i; y2=i; z2=i; + } + + if(direction == 1) // fail + { + x1=0; y1=0; z1=7-i; x2=i; y2=i; z2=7; + } + + if(direction == 2) + { + x1=0; y1=7; z1=0; x2=i; y2=7-i; z2=i; + } + + if(direction == 3) //fail + { + x1=0; y1=7; z1=7; x2=i; y2=7-i; z2=7-i; + } + + if(direction == 4) //fail + { + x1=7; y1=0; z1=0; x2=7-i; y2=i; z2=i; + } + + if(direction == 5) + { + x1=7; y1=0; z1=7; x2=7-i; y2=i; z2=7-i; + } + + if(direction == 6) //fail + { + x1=7; y1=7; z1=0; x2=7-i; y2=7-i; z2=i; + } + + if(direction == 7) + { + x1=7; y1=7; z1=7; x2=7-i; y2=7-i; z2=7-i; + } + + if (mode == 3) + { + box_filled(x1,y1,z1,x2,y2,z2); + } + else if (mode == 2) + { + box_walls(x1,y1,z1,x2,y2,z2); + } + else + { + box_wireframe(x1,y1,z1,x2,y2,z2); + } + + delay_ms(delay); + fill(0x00); + } + } +} + + +void effect_box_woopwoop (int delay, int grow) +{ + int i; + + fill(0x00); + if (grow == 1) + { + for (i=0;i<4;i++) + { + box_wireframe(4+i,4+i,4+i,3-i,3-i,3-i); + delay_ms(delay); + fill(0x00); + } + } else + { + for (i=3;i>=0;i--) + { + box_wireframe(4+i,4+i,4+i,3-i,3-i,3-i); + delay_ms(delay); + fill(0x00); + } + } +} + + +// Send a voxel flying from one side of the cube to the other +// It its at the bottom, send it to the top.. +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) +{ + int i, ii; + for (i=0; i<8; i++) + { + if (z == 7) + { + ii = 7-i; + clrvoxel(x,y,ii+1); + } else + { + ii = i; + clrvoxel(x,y,ii-1); + } + setvoxel(x,y,ii); + delay_ms(delay); + } +} + +// Send all the voxels from one side of the cube to the other +// Start at z and send to the opposite side. +// Sends in random order. +void sendplane_rand_z (unsigned char z, int delay, int wait) +{ + unsigned char loop = 16; + unsigned char x, y; + + fill(0x00); + + setplane_z(z); + + // Send voxels at random untill all 16 have crossed the cube. + while(loop) + { + x = rand()%4; + y = rand()%4; + if (getvoxel(x,y,z)) + { + // Send the voxel flying + sendvoxel_z(x,y,z,delay); + delay_ms(wait); + loop--; // one down, loop-- to go. when this hits 0, the loop exits. + } + } +} + +// For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 +// for n iterations, a random voxel is sent to the opposite side of where it was. +void sendvoxels_rand_z (int iterations, int delay, int wait) +{ + unsigned char x, y, last_x, last_y, i; + + last_x = 0; + last_y = 0; + + fill(0x00); + + //srand(123); + + // Loop through all the X and Y coordinates + for (x=0;x<8;x++) + { + for (y=0;y<8;y++) + { + // Then set a voxel either at the top or at the bottom + if (rand()%2 == 0) + { + + setvoxel(x,y,0); + } else + { + setvoxel(x,y,7); + } + + + } + } + + for (i=0;i=0;i--) + { + snake[i][0] = snake[i-1][0]; + snake[i][1] = snake[i-1][1]; + snake[i][2] = snake[i-1][2]; + } + snake[0][0] = x; + snake[0][1] = y; + snake[0][2] = z; + + for (i=0;i<8;i++) + { + setvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + delay_ms(delay); + for (i=0;i<8;i++) + { + clrvoxel(snake[i][0],snake[i][1],snake[i][2]); + } + } + + + iterations--; + } +} + +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;iidestinations[px]) + { + positions[px]--; + } + } + + draw_positions_axis (AXIS_Z, positions,0); +} + +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert) +{ + unsigned char positions[64]; + unsigned char destinations[64]; + + int i,px; + + for (i=0; i<64; i++) + { + positions[i] = 0; + destinations[i] = rand()%8; + } + + for (i=0; i<8; i++) + { + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } + + for (i=0; i<64; i++) + { + destinations[i] = 7; + } + + delay_ms(sleep); + + for (i=0; i<8; i++) + { + for (px=0; px<64; px++) + { + if (positions[px]destinations[px]) + { + positions[px]--; + } + } + draw_positions_axis (axis, positions,invert); + delay_ms(delay); + } + + + +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + LED_PORT ^= LED_RED; + } + +} + + + + +// Light all leds layer by layer, +// then unset layer by layer +void effect_loadbar(int delay) +{ + fill(0x00); + + int z,y; + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0xff; + + delay_ms(delay); + } + + delay_ms(delay*3); + + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + cube[z][y] = 0x00; + + delay_ms(delay); + } +} + + +// Set n number of voxels at random positions +void effect_random_sparkle_flash (int iterations, int voxels, int delay) +{ + int i; + int v; + for (i = 0; i < iterations; i++) + { + for (v=0;v<=voxels;v++) + setvoxel(rand()%8,rand()%8,rand()%8); + + delay_ms(delay); + fill(0x00); + } +} + +// blink 1 random voxel, blink 2 random voxels..... blink 20 random voxels +// and back to 1 again. +void effect_random_sparkle (void) +{ + int i; + + for (i=1;i<20;i++) + { + effect_random_sparkle_flash(5,i,200); + } + + for (i=20;i>=1;i--) + { + effect_random_sparkle_flash(5,i,200); + } + +} + +int effect_telcstairs_do(int x, int val, int delay) +{ + int y,z; + + for(y = 0, z = x; y <= z; y++, x--) + { + if(x < CUBE_SIZE && y < CUBE_SIZE) + { + cube[x][y] = val; + } + } + delay_ms(delay); + return z; +} + +void effect_telcstairs (int invert, int delay, int val) +{ + int x; + + if(invert) + { + for(x = CUBE_SIZE*2; x >= 0; x--) + { + x = effect_telcstairs_do(x,val,delay); + } + } + else + { + for(x = 0; x < CUBE_SIZE*2; x++) + { + x = effect_telcstairs_do(x,val,delay); + } + } +} + +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) +{ + int x, y, i,j,k, dx, dy; + int cube_size; + int origin = 0; + + if (direction == -1) + origin = 7; + + cube_size = 8-(size-1); + + x = rand()%cube_size; + y = rand()%cube_size; + + for (i=0; i 0 && (x+dx) < cube_size) + x += dx; + + if ((y+dy) > 0 && (y+dy) < cube_size) + y += dy; + + shift(axis, direction); + + + for (j=0; j=1;i--) + { + for (z=0;z<8;z++) + { + + state = getvoxel(((path[(i-1)]>>4) & 0x0f), (path[(i-1)] & 0x0f), z); + altervoxel(((path[i]>>4) & 0x0f), (path[i] & 0x0f), z, state); + } + } + for (i=0;i<8;i++) + clrvoxel(((path[0]>>4) & 0x0f), (path[0] & 0x0f),i); +} + +void effect_rand_patharound (int iterations, int delay) +{ + int z, dz, i; + z = 4; + unsigned char path[28]; + + font_getpath(0,path,28); + + for (i = 0; i < iterations; i++) + { + dz = ((rand()%3)-1); + z += dz; + + if (z>7) + z = 7; + + if (z<0) + z = 0; + + effect_pathmove(path, 28); + setvoxel(0,7,z); + delay_ms(delay); + } +} + +void effect_pathspiral (int iterations, int delay) +{ + int z, i; + z = 4; + unsigned char path[16]; + + font_getpath(1,path,16); + + for (i = 0; i < iterations; i++) + { + setvoxel(4,0,i%8); + delay_ms(delay); + effect_pathmove(path, 28); + + } +} + +void effect_path_text (int delay, char *str) +{ + int z, i,ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + unsigned char chr[5]; + unsigned char stripe; + + while (*str) + { + //charfly(*str++, direction, axis, mode, delay); + + + font_getchar(*str++, chr); + + for (ii=0;ii<5;ii++) + { + //stripe = pgm_read_byte(&font[(chr*5)+ii]); + stripe = chr[ii]; + + for (z=0;z<8;z++) + { + if ((stripe>>(7-z)) & 0x01) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + effect_pathmove(path, 28); + delay_ms(delay); + } + + effect_pathmove(path, 28); + delay_ms(delay); + } + for (i=0;i<28;i++) + { + effect_pathmove(path, 28); + delay_ms(delay); + } +} + +void effect_path_bitmap (int delay, char bitmap, int iterations) +{ + int z, i, ii; + z = 4; + unsigned char path[28]; + font_getpath(0,path,28); + + for (i=0; i < iterations; i++) + { + for (ii=0;ii<8;ii++) + { + for (z=0;z<8;z++) + { + if (font_getbitmappixel(bitmap,(7-z),ii)) + { + setvoxel(0,7,z); + } else + { + clrvoxel(0,7,z); + } + + } + delay_ms(delay); + effect_pathmove(path, 28); + } + + for (ii=0;ii<20;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } + } + for (ii=0;ii<10;ii++) + { + delay_ms(delay); + effect_pathmove(path, 28); + } +} + + + diff --git a/instructables/cube_pc/effect.h b/instructables/cube_pc/effect.h new file mode 100644 index 0000000..edaac18 --- /dev/null +++ b/instructables/cube_pc/effect.h @@ -0,0 +1,57 @@ +#ifndef EFFECT_H +#define EFFECT_H + +//#include +//#include +#include +#include + +#include "cube.h" + + + +void effect_box_shrink_grow (int iterations, int mode, int direction, uint16_t delay); + +void effect_hollow_1 (int iterations, uint16_t delay); +void effect_hollow_2 (int iterations, int corner, uint16_t delay); + +void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay); +void sendplane_rand_z (unsigned char z, int delay, int wait); +void sendvoxels_rand_z (int iterations, int delay, int wait); +void boingboing(uint16_t iterations, int delay, unsigned char mode, unsigned char drawmode); + +void effect_planboing (int plane, int speed); + +void effect_random_filler (int delay, int state); + +void effect_z_updown (int iterations, int delay); +void effect_rain(int iterations); +void effect_stringfly2(char * str); +void effect_blinky2(void); +void draw_positions_axis (char axis, unsigned char positions[64], int invert); +void effect_axis_updown_randsuspend (char axis, int delay, int sleep, int invert); + +void effect_random_sparkle_flash (int iterations, int voxels, int delay); +void effect_random_sparkle (void); + +void effect_box_woopwoop (int delay, int grow); +void effect_telcstairs (int invert, int delay, int val); +void effect_loadbar(int delay); + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode); +void effect_smileyspin (int count, int delay, char bitmap); +void effect_pathmove (unsigned char *path, int length); +void effect_rand_patharound (int iterations, int delay); +void effect_pathspiral (int iterations, int delay); +void effect_path_text (int delay, char *str); +void effect_path_bitmap (int delay, char bitmap, int iterations); +void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay); + +void effect_z_updown (int iterations, int delay); +void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis); + + + + +#endif + diff --git a/instructables/cube_pc/effect.lst b/instructables/cube_pc/effect.lst new file mode 100644 index 0000000..7a08f0a --- /dev/null +++ b/instructables/cube_pc/effect.lst @@ -0,0 +1,5902 @@ + 1 .file "effect.c" + 2 __SREG__ = 0x3f + 3 __SP_H__ = 0x3e + 4 __SP_L__ = 0x3d + 5 __CCP__ = 0x34 + 6 __tmp_reg__ = 0 + 7 __zero_reg__ = 1 + 8 .global __do_copy_data + 9 .global __do_clear_bss + 17 .Ltext0: + 18 .global effect_telcstairs_do + 20 effect_telcstairs_do: + 21 .LFB24: + 22 .LM1: + 23 .LVL0: + 24 0000 CF93 push r28 + 25 0002 DF93 push r29 + 26 /* prologue: function */ + 27 /* frame size = 0 */ + 28 0004 EC01 movw r28,r24 + 29 .LM2: + 30 0006 DC01 movw r26,r24 + 31 0008 20E0 ldi r18,lo8(0) + 32 000a 30E0 ldi r19,hi8(0) + 33 .LVL1: + 34 000c 00C0 rjmp .L2 + 35 .LVL2: + 36 .L4: + 37 .LM3: + 38 000e A830 cpi r26,8 + 39 0010 B105 cpc r27,__zero_reg__ + 40 0012 04F4 brge .L3 + 41 .LVL3: + 42 0014 2830 cpi r18,8 + 43 0016 3105 cpc r19,__zero_reg__ + 44 0018 04F4 brge .L3 + 45 .LM4: + 46 001a FD01 movw r30,r26 + 47 001c 83E0 ldi r24,3 + 48 001e EE0F 1: lsl r30 + 49 0020 FF1F rol r31 + 50 0022 8A95 dec r24 + 51 0024 01F4 brne 1b + 52 0026 E20F add r30,r18 + 53 0028 F31F adc r31,r19 + 54 002a E050 subi r30,lo8(-(cube)) + 55 002c F040 sbci r31,hi8(-(cube)) + 56 002e 6083 st Z,r22 + 57 .LVL4: + 58 .L3: + 59 .LM5: + 60 0030 2F5F subi r18,lo8(-(1)) + 61 0032 3F4F sbci r19,hi8(-(1)) + 62 0034 1197 sbiw r26,1 + 63 .LVL5: + 64 .L2: + 65 0036 C217 cp r28,r18 + 66 0038 D307 cpc r29,r19 + 67 003a 04F4 brge .L4 + 68 .LVL6: + 69 .LM6: + 70 003c CA01 movw r24,r20 + 71 003e 0E94 0000 call delay_ms + 72 .LVL7: + 73 .LM7: + 74 0042 CE01 movw r24,r28 + 75 .LVL8: + 76 /* epilogue start */ + 77 0044 DF91 pop r29 + 78 0046 CF91 pop r28 + 79 0048 0895 ret + 80 .LFE24: + 82 .global effect_telcstairs + 84 effect_telcstairs: + 85 .LFB25: + 86 .LM8: + 87 .LVL9: + 88 004a 0F93 push r16 + 89 004c 1F93 push r17 + 90 004e CF93 push r28 + 91 0050 DF93 push r29 + 92 /* prologue: function */ + 93 /* frame size = 0 */ + 94 0052 8B01 movw r16,r22 + 95 0054 EA01 movw r28,r20 + 96 .LM9: + 97 0056 892B or r24,r25 + 98 0058 01F0 breq .L7 + 99 .LVL10: + 100 005a 80E1 ldi r24,lo8(16) + 101 005c 90E0 ldi r25,hi8(16) + 102 .LVL11: + 103 .L8: + 104 .LM10: + 105 005e BE01 movw r22,r28 + 106 0060 A801 movw r20,r16 + 107 0062 0E94 0000 call effect_telcstairs_do + 108 .LVL12: + 109 .LM11: + 110 0066 0197 sbiw r24,1 + 111 .LVL13: + 112 0068 97FF sbrs r25,7 + 113 006a 00C0 rjmp .L8 + 114 006c 00C0 rjmp .L11 + 115 .LVL14: + 116 .L7: + 117 006e 80E0 ldi r24,lo8(0) + 118 0070 90E0 ldi r25,hi8(0) + 119 .LVL15: + 120 .L10: + 121 .LM12: + 122 0072 BE01 movw r22,r28 + 123 0074 A801 movw r20,r16 + 124 0076 0E94 0000 call effect_telcstairs_do + 125 .LVL16: + 126 .LM13: + 127 007a 0196 adiw r24,1 + 128 .LVL17: + 129 007c 8031 cpi r24,16 + 130 007e 9105 cpc r25,__zero_reg__ + 131 0080 04F0 brlt .L10 + 132 .L11: + 133 /* epilogue start */ + 134 .LM14: + 135 0082 DF91 pop r29 + 136 0084 CF91 pop r28 + 137 .LVL18: + 138 0086 1F91 pop r17 + 139 0088 0F91 pop r16 + 140 .LVL19: + 141 008a 0895 ret + 142 .LFE25: + 144 .global sendvoxel_z + 146 sendvoxel_z: + 147 .LFB10: + 148 .LM15: + 149 .LVL20: + 150 008c 7F92 push r7 + 151 008e 8F92 push r8 + 152 0090 9F92 push r9 + 153 0092 AF92 push r10 + 154 0094 BF92 push r11 + 155 0096 CF92 push r12 + 156 0098 DF92 push r13 + 157 009a EF92 push r14 + 158 009c FF92 push r15 + 159 009e 0F93 push r16 + 160 00a0 1F93 push r17 + 161 00a2 CF93 push r28 + 162 00a4 DF93 push r29 + 163 /* prologue: function */ + 164 /* frame size = 0 */ + 165 00a6 E82E mov r14,r24 + 166 00a8 F62E mov r15,r22 + 167 00aa 742E mov r7,r20 + 168 00ac 6901 movw r12,r18 + 169 .LM16: + 170 00ae C0E0 ldi r28,lo8(0) + 171 00b0 D0E0 ldi r29,hi8(0) + 172 .LVL21: + 173 00b2 27E0 ldi r18,lo8(7) + 174 00b4 822E mov r8,r18 + 175 00b6 912C mov r9,__zero_reg__ + 176 .LVL22: + 177 .LM17: + 178 00b8 98E0 ldi r25,lo8(8) + 179 00ba A92E mov r10,r25 + 180 00bc B12C mov r11,__zero_reg__ + 181 .LVL23: + 182 .L17: + 183 .LM18: + 184 00be 87E0 ldi r24,lo8(7) + 185 00c0 7816 cp r7,r24 + 186 00c2 01F4 brne .L15 + 187 .LM19: + 188 00c4 8401 movw r16,r8 + 189 00c6 0C1B sub r16,r28 + 190 00c8 1D0B sbc r17,r29 + 191 .LM20: + 192 00ca A501 movw r20,r10 + 193 00cc 4C1B sub r20,r28 + 194 00ce 5D0B sbc r21,r29 + 195 00d0 8E2D mov r24,r14 + 196 00d2 90E0 ldi r25,lo8(0) + 197 00d4 6F2D mov r22,r15 + 198 00d6 70E0 ldi r23,lo8(0) + 199 00d8 0E94 0000 call clrvoxel + 200 00dc 00C0 rjmp .L16 + 201 .LVL24: + 202 .L15: + 203 .LM21: + 204 00de AE01 movw r20,r28 + 205 00e0 4150 subi r20,lo8(-(-1)) + 206 00e2 5040 sbci r21,hi8(-(-1)) + 207 00e4 8E2D mov r24,r14 + 208 00e6 90E0 ldi r25,lo8(0) + 209 00e8 6F2D mov r22,r15 + 210 00ea 70E0 ldi r23,lo8(0) + 211 00ec 0E94 0000 call clrvoxel + 212 00f0 8E01 movw r16,r28 + 213 .L16: + 214 .LM22: + 215 00f2 8E2D mov r24,r14 + 216 00f4 90E0 ldi r25,lo8(0) + 217 00f6 6F2D mov r22,r15 + 218 00f8 70E0 ldi r23,lo8(0) + 219 00fa A801 movw r20,r16 + 220 00fc 0E94 0000 call setvoxel + 221 .LM23: + 222 0100 C601 movw r24,r12 + 223 0102 0E94 0000 call delay_ms + 224 .LM24: + 225 0106 2196 adiw r28,1 + 226 0108 C830 cpi r28,8 + 227 010a D105 cpc r29,__zero_reg__ + 228 010c 01F4 brne .L17 + 229 /* epilogue start */ + 230 .LM25: + 231 010e DF91 pop r29 + 232 0110 CF91 pop r28 + 233 .LVL25: + 234 0112 1F91 pop r17 + 235 0114 0F91 pop r16 + 236 .LVL26: + 237 0116 FF90 pop r15 + 238 .LVL27: + 239 0118 EF90 pop r14 + 240 .LVL28: + 241 011a DF90 pop r13 + 242 011c CF90 pop r12 + 243 .LVL29: + 244 011e BF90 pop r11 + 245 0120 AF90 pop r10 + 246 0122 9F90 pop r9 + 247 0124 8F90 pop r8 + 248 0126 7F90 pop r7 + 249 .LVL30: + 250 0128 0895 ret + 251 .LFE10: + 253 .global effect_pathmove + 255 effect_pathmove: + 256 .LFB28: + 257 .LM26: + 258 .LVL31: + 259 012a CF92 push r12 + 260 012c DF92 push r13 + 261 012e EF92 push r14 + 262 0130 FF92 push r15 + 263 0132 0F93 push r16 + 264 0134 1F93 push r17 + 265 0136 CF93 push r28 + 266 0138 DF93 push r29 + 267 /* prologue: function */ + 268 /* frame size = 0 */ + 269 013a 6C01 movw r12,r24 + 270 .LM27: + 271 013c 7B01 movw r14,r22 + 272 .LVL32: + 273 013e 0894 sec + 274 0140 E108 sbc r14,__zero_reg__ + 275 0142 F108 sbc r15,__zero_reg__ + 276 0144 8B01 movw r16,r22 + 277 0146 0250 subi r16,lo8(-(-2)) + 278 0148 1040 sbci r17,hi8(-(-2)) + 279 014a 080F add r16,r24 + 280 014c 191F adc r17,r25 + 281 014e 00C0 rjmp .L21 + 282 .LVL33: + 283 .L23: + 284 0150 C0E0 ldi r28,lo8(0) + 285 0152 D0E0 ldi r29,hi8(0) + 286 .LVL34: + 287 .L22: + 288 .LM28: + 289 0154 F801 movw r30,r16 + 290 0156 8081 ld r24,Z + 291 .LVL35: + 292 0158 682F mov r22,r24 + 293 .LVL36: + 294 015a 70E0 ldi r23,lo8(0) + 295 015c 6F70 andi r22,lo8(15) + 296 015e 7070 andi r23,hi8(15) + 297 0160 8295 swap r24 + 298 0162 8F70 andi r24,lo8(15) + 299 0164 90E0 ldi r25,lo8(0) + 300 0166 AE01 movw r20,r28 + 301 0168 0E94 0000 call getvoxel + 302 016c 282F mov r18,r24 + 303 .LVL37: + 304 .LM29: + 305 016e F801 movw r30,r16 + 306 0170 8181 ldd r24,Z+1 + 307 0172 682F mov r22,r24 + 308 0174 70E0 ldi r23,lo8(0) + 309 0176 6F70 andi r22,lo8(15) + 310 0178 7070 andi r23,hi8(15) + 311 017a 8295 swap r24 + 312 017c 8F70 andi r24,lo8(15) + 313 017e 90E0 ldi r25,lo8(0) + 314 0180 AE01 movw r20,r28 + 315 0182 30E0 ldi r19,lo8(0) + 316 0184 0E94 0000 call altervoxel + 317 .LVL38: + 318 .LM30: + 319 0188 2196 adiw r28,1 + 320 018a C830 cpi r28,8 + 321 018c D105 cpc r29,__zero_reg__ + 322 018e 01F4 brne .L22 + 323 .LM31: + 324 0190 0894 sec + 325 0192 E108 sbc r14,__zero_reg__ + 326 0194 F108 sbc r15,__zero_reg__ + 327 0196 0150 subi r16,lo8(-(-1)) + 328 0198 1040 sbci r17,hi8(-(-1)) + 329 .LVL39: + 330 .L21: + 331 019a 1E14 cp __zero_reg__,r14 + 332 019c 1F04 cpc __zero_reg__,r15 + 333 019e 04F0 brlt .L23 + 334 01a0 C0E0 ldi r28,lo8(0) + 335 01a2 D0E0 ldi r29,hi8(0) + 336 .LVL40: + 337 .L24: + 338 .LM32: + 339 01a4 F601 movw r30,r12 + 340 01a6 8081 ld r24,Z + 341 .LVL41: + 342 01a8 682F mov r22,r24 + 343 .LVL42: + 344 01aa 70E0 ldi r23,lo8(0) + 345 01ac 6F70 andi r22,lo8(15) + 346 01ae 7070 andi r23,hi8(15) + 347 01b0 8295 swap r24 + 348 01b2 8F70 andi r24,lo8(15) + 349 01b4 90E0 ldi r25,lo8(0) + 350 01b6 AE01 movw r20,r28 + 351 01b8 0E94 0000 call clrvoxel + 352 .LM33: + 353 01bc 2196 adiw r28,1 + 354 01be C830 cpi r28,8 + 355 01c0 D105 cpc r29,__zero_reg__ + 356 01c2 01F4 brne .L24 + 357 /* epilogue start */ + 358 .LM34: + 359 01c4 DF91 pop r29 + 360 01c6 CF91 pop r28 + 361 .LVL43: + 362 01c8 1F91 pop r17 + 363 01ca 0F91 pop r16 + 364 01cc FF90 pop r15 + 365 01ce EF90 pop r14 + 366 01d0 DF90 pop r13 + 367 01d2 CF90 pop r12 + 368 .LVL44: + 369 01d4 0895 ret + 370 .LFE28: + 372 .global effect_path_bitmap + 374 effect_path_bitmap: + 375 .LFB32: + 376 .LM35: + 377 .LVL45: + 378 01d6 5F92 push r5 + 379 01d8 6F92 push r6 + 380 01da 7F92 push r7 + 381 01dc 8F92 push r8 + 382 01de 9F92 push r9 + 383 01e0 AF92 push r10 + 384 01e2 BF92 push r11 + 385 01e4 CF92 push r12 + 386 01e6 DF92 push r13 + 387 01e8 EF92 push r14 + 388 01ea FF92 push r15 + 389 01ec 0F93 push r16 + 390 01ee 1F93 push r17 + 391 01f0 DF93 push r29 + 392 01f2 CF93 push r28 + 393 01f4 CDB7 in r28,__SP_L__ + 394 01f6 DEB7 in r29,__SP_H__ + 395 01f8 6C97 sbiw r28,28 + 396 01fa 0FB6 in __tmp_reg__,__SREG__ + 397 01fc F894 cli + 398 01fe DEBF out __SP_H__,r29 + 399 0200 0FBE out __SREG__,__tmp_reg__ + 400 0202 CDBF out __SP_L__,r28 + 401 /* prologue: function */ + 402 /* frame size = 28 */ + 403 0204 4C01 movw r8,r24 + 404 .LVL46: + 405 0206 562E mov r5,r22 + 406 0208 3A01 movw r6,r20 + 407 .LM36: + 408 020a 80E0 ldi r24,lo8(0) + 409 020c 5E01 movw r10,r28 + 410 020e 0894 sec + 411 0210 A11C adc r10,__zero_reg__ + 412 0212 B11C adc r11,__zero_reg__ + 413 0214 B501 movw r22,r10 + 414 .LVL47: + 415 0216 4CE1 ldi r20,lo8(28) + 416 0218 50E0 ldi r21,hi8(28) + 417 .LVL48: + 418 021a 0E94 0000 call font_getpath + 419 021e CC24 clr r12 + 420 0220 DD24 clr r13 + 421 .LVL49: + 422 0222 00C0 rjmp .L29 + 423 .LVL50: + 424 .L32: + 425 .LM37: + 426 0224 852D mov r24,r5 + 427 0226 6F2D mov r22,r15 + 428 0228 4E2D mov r20,r14 + 429 022a 0E94 0000 call font_getbitmappixel + 430 022e 8823 tst r24 + 431 0230 01F0 breq .L30 + 432 .LM38: + 433 0232 80E0 ldi r24,lo8(0) + 434 0234 90E0 ldi r25,hi8(0) + 435 0236 67E0 ldi r22,lo8(7) + 436 0238 70E0 ldi r23,hi8(7) + 437 023a A801 movw r20,r16 + 438 023c 0E94 0000 call setvoxel + 439 0240 00C0 rjmp .L31 + 440 .L30: + 441 .LM39: + 442 0242 80E0 ldi r24,lo8(0) + 443 0244 90E0 ldi r25,hi8(0) + 444 0246 67E0 ldi r22,lo8(7) + 445 0248 70E0 ldi r23,hi8(7) + 446 024a A801 movw r20,r16 + 447 024c 0E94 0000 call clrvoxel + 448 .L31: + 449 .LM40: + 450 0250 0F5F subi r16,lo8(-(1)) + 451 0252 1F4F sbci r17,hi8(-(1)) + 452 0254 FA94 dec r15 + 453 0256 8FEF ldi r24,lo8(-1) + 454 0258 F816 cp r15,r24 + 455 025a 01F4 brne .L32 + 456 .LM41: + 457 025c C401 movw r24,r8 + 458 025e 0E94 0000 call delay_ms + 459 .LM42: + 460 0262 C501 movw r24,r10 + 461 0264 6CE1 ldi r22,lo8(28) + 462 0266 70E0 ldi r23,hi8(28) + 463 0268 0E94 0000 call effect_pathmove + 464 026c E394 inc r14 + 465 .LM43: + 466 026e 88E0 ldi r24,lo8(8) + 467 0270 E816 cp r14,r24 + 468 0272 01F0 breq .L33 + 469 .LVL51: + 470 .L36: + 471 0274 00E0 ldi r16,lo8(0) + 472 0276 10E0 ldi r17,hi8(0) + 473 .LVL52: + 474 0278 37E0 ldi r19,lo8(7) + 475 027a F32E mov r15,r19 + 476 027c 00C0 rjmp .L32 + 477 .L33: + 478 027e 00E0 ldi r16,lo8(0) + 479 0280 10E0 ldi r17,hi8(0) + 480 .LVL53: + 481 .L34: + 482 .LM44: + 483 0282 C401 movw r24,r8 + 484 0284 0E94 0000 call delay_ms + 485 .LM45: + 486 0288 C501 movw r24,r10 + 487 028a 6CE1 ldi r22,lo8(28) + 488 028c 70E0 ldi r23,hi8(28) + 489 028e 0E94 0000 call effect_pathmove + 490 .LM46: + 491 0292 0F5F subi r16,lo8(-(1)) + 492 0294 1F4F sbci r17,hi8(-(1)) + 493 0296 0431 cpi r16,20 + 494 0298 1105 cpc r17,__zero_reg__ + 495 029a 01F4 brne .L34 + 496 .LM47: + 497 029c 0894 sec + 498 029e C11C adc r12,__zero_reg__ + 499 02a0 D11C adc r13,__zero_reg__ + 500 .L29: + 501 02a2 C614 cp r12,r6 + 502 02a4 D704 cpc r13,r7 + 503 02a6 04F4 brge .L35 + 504 02a8 EE24 clr r14 + 505 02aa 00C0 rjmp .L36 + 506 .L35: + 507 02ac 00E0 ldi r16,lo8(0) + 508 02ae 10E0 ldi r17,hi8(0) + 509 .LVL54: + 510 .LM48: + 511 02b0 7E01 movw r14,r28 + 512 02b2 0894 sec + 513 02b4 E11C adc r14,__zero_reg__ + 514 02b6 F11C adc r15,__zero_reg__ + 515 .L37: + 516 .LM49: + 517 02b8 C401 movw r24,r8 + 518 02ba 0E94 0000 call delay_ms + 519 .LM50: + 520 02be C701 movw r24,r14 + 521 02c0 6CE1 ldi r22,lo8(28) + 522 02c2 70E0 ldi r23,hi8(28) + 523 02c4 0E94 0000 call effect_pathmove + 524 .LM51: + 525 02c8 0F5F subi r16,lo8(-(1)) + 526 02ca 1F4F sbci r17,hi8(-(1)) + 527 02cc 0A30 cpi r16,10 + 528 02ce 1105 cpc r17,__zero_reg__ + 529 02d0 01F4 brne .L37 + 530 /* epilogue start */ + 531 .LM52: + 532 02d2 6C96 adiw r28,28 + 533 02d4 0FB6 in __tmp_reg__,__SREG__ + 534 02d6 F894 cli + 535 02d8 DEBF out __SP_H__,r29 + 536 02da 0FBE out __SREG__,__tmp_reg__ + 537 02dc CDBF out __SP_L__,r28 + 538 02de CF91 pop r28 + 539 02e0 DF91 pop r29 + 540 02e2 1F91 pop r17 + 541 02e4 0F91 pop r16 + 542 .LVL55: + 543 02e6 FF90 pop r15 + 544 02e8 EF90 pop r14 + 545 02ea DF90 pop r13 + 546 02ec CF90 pop r12 + 547 .LVL56: + 548 02ee BF90 pop r11 + 549 02f0 AF90 pop r10 + 550 02f2 9F90 pop r9 + 551 02f4 8F90 pop r8 + 552 02f6 7F90 pop r7 + 553 02f8 6F90 pop r6 + 554 .LVL57: + 555 02fa 5F90 pop r5 + 556 .LVL58: + 557 02fc 0895 ret + 558 .LFE32: + 560 .global effect_path_text + 562 effect_path_text: + 563 .LFB31: + 564 .LM53: + 565 .LVL59: + 566 02fe 2F92 push r2 + 567 0300 3F92 push r3 + 568 0302 4F92 push r4 + 569 0304 5F92 push r5 + 570 0306 6F92 push r6 + 571 0308 7F92 push r7 + 572 030a 8F92 push r8 + 573 030c 9F92 push r9 + 574 030e AF92 push r10 + 575 0310 BF92 push r11 + 576 0312 CF92 push r12 + 577 0314 DF92 push r13 + 578 0316 EF92 push r14 + 579 0318 FF92 push r15 + 580 031a 0F93 push r16 + 581 031c 1F93 push r17 + 582 031e DF93 push r29 + 583 0320 CF93 push r28 + 584 0322 CDB7 in r28,__SP_L__ + 585 0324 DEB7 in r29,__SP_H__ + 586 0326 A197 sbiw r28,33 + 587 0328 0FB6 in __tmp_reg__,__SREG__ + 588 032a F894 cli + 589 032c DEBF out __SP_H__,r29 + 590 032e 0FBE out __SREG__,__tmp_reg__ + 591 0330 CDBF out __SP_L__,r28 + 592 /* prologue: function */ + 593 /* frame size = 33 */ + 594 0332 3C01 movw r6,r24 + 595 .LVL60: + 596 0334 6B01 movw r12,r22 + 597 .LM54: + 598 0336 56E0 ldi r21,lo8(6) + 599 0338 852E mov r8,r21 + 600 033a 912C mov r9,__zero_reg__ + 601 033c 8C0E add r8,r28 + 602 033e 9D1E adc r9,r29 + 603 0340 80E0 ldi r24,lo8(0) + 604 0342 B401 movw r22,r8 + 605 .LVL61: + 606 0344 4CE1 ldi r20,lo8(28) + 607 0346 50E0 ldi r21,hi8(28) + 608 0348 0E94 0000 call font_getpath + 609 .LM55: + 610 034c 1E01 movw r2,r28 + 611 034e 0894 sec + 612 0350 211C adc r2,__zero_reg__ + 613 0352 311C adc r3,__zero_reg__ + 614 .LM56: + 615 0354 2401 movw r4,r8 + 616 0356 00C0 rjmp .L43 + 617 .LVL62: + 618 .L48: + 619 .LM57: + 620 0358 B101 movw r22,r2 + 621 035a 0E94 0000 call font_getchar + 622 035e 7101 movw r14,r2 + 623 .L47: + 624 .LM58: + 625 0360 F701 movw r30,r14 + 626 0362 8081 ld r24,Z + 627 .LVL63: + 628 0364 00E0 ldi r16,lo8(0) + 629 0366 10E0 ldi r17,hi8(0) + 630 .LM59: + 631 0368 A82E mov r10,r24 + 632 036a BB24 clr r11 + 633 .LVL64: + 634 .L46: + 635 036c 87E0 ldi r24,lo8(7) + 636 036e 90E0 ldi r25,hi8(7) + 637 0370 801B sub r24,r16 + 638 0372 910B sbc r25,r17 + 639 0374 9501 movw r18,r10 + 640 0376 00C0 rjmp 2f + 641 0378 3595 1: asr r19 + 642 037a 2795 ror r18 + 643 037c 8A95 2: dec r24 + 644 037e 02F4 brpl 1b + 645 0380 20FF sbrs r18,0 + 646 0382 00C0 rjmp .L44 + 647 .LM60: + 648 0384 80E0 ldi r24,lo8(0) + 649 0386 90E0 ldi r25,hi8(0) + 650 0388 67E0 ldi r22,lo8(7) + 651 038a 70E0 ldi r23,hi8(7) + 652 038c A801 movw r20,r16 + 653 038e 0E94 0000 call setvoxel + 654 0392 00C0 rjmp .L45 + 655 .L44: + 656 .LM61: + 657 0394 80E0 ldi r24,lo8(0) + 658 0396 90E0 ldi r25,hi8(0) + 659 0398 67E0 ldi r22,lo8(7) + 660 039a 70E0 ldi r23,hi8(7) + 661 039c A801 movw r20,r16 + 662 039e 0E94 0000 call clrvoxel + 663 .L45: + 664 .LM62: + 665 03a2 0F5F subi r16,lo8(-(1)) + 666 03a4 1F4F sbci r17,hi8(-(1)) + 667 03a6 0830 cpi r16,8 + 668 03a8 1105 cpc r17,__zero_reg__ + 669 03aa 01F4 brne .L46 + 670 .LM63: + 671 03ac C401 movw r24,r8 + 672 03ae 6CE1 ldi r22,lo8(28) + 673 03b0 70E0 ldi r23,hi8(28) + 674 03b2 0E94 0000 call effect_pathmove + 675 .LM64: + 676 03b6 C301 movw r24,r6 + 677 03b8 0E94 0000 call delay_ms + 678 03bc 0894 sec + 679 03be E11C adc r14,__zero_reg__ + 680 03c0 F11C adc r15,__zero_reg__ + 681 .LM65: + 682 03c2 E414 cp r14,r4 + 683 03c4 F504 cpc r15,r5 + 684 03c6 01F4 brne .L47 + 685 .LM66: + 686 03c8 0894 sec + 687 03ca C11C adc r12,__zero_reg__ + 688 03cc D11C adc r13,__zero_reg__ + 689 .LM67: + 690 03ce C201 movw r24,r4 + 691 03d0 6CE1 ldi r22,lo8(28) + 692 03d2 70E0 ldi r23,hi8(28) + 693 03d4 0E94 0000 call effect_pathmove + 694 .LM68: + 695 03d8 C301 movw r24,r6 + 696 03da 0E94 0000 call delay_ms + 697 .L43: + 698 .LM69: + 699 03de F601 movw r30,r12 + 700 03e0 8081 ld r24,Z + 701 03e2 8823 tst r24 + 702 03e4 01F0 breq .+2 + 703 03e6 00C0 rjmp .L48 + 704 03e8 00E0 ldi r16,lo8(0) + 705 03ea 10E0 ldi r17,hi8(0) + 706 .LVL65: + 707 .LM70: + 708 03ec 46E0 ldi r20,lo8(6) + 709 03ee E42E mov r14,r20 + 710 03f0 F12C mov r15,__zero_reg__ + 711 03f2 EC0E add r14,r28 + 712 03f4 FD1E adc r15,r29 + 713 .L49: + 714 03f6 C701 movw r24,r14 + 715 03f8 6CE1 ldi r22,lo8(28) + 716 03fa 70E0 ldi r23,hi8(28) + 717 03fc 0E94 0000 call effect_pathmove + 718 .LM71: + 719 0400 C301 movw r24,r6 + 720 0402 0E94 0000 call delay_ms + 721 .LM72: + 722 0406 0F5F subi r16,lo8(-(1)) + 723 0408 1F4F sbci r17,hi8(-(1)) + 724 040a 0C31 cpi r16,28 + 725 040c 1105 cpc r17,__zero_reg__ + 726 040e 01F4 brne .L49 + 727 /* epilogue start */ + 728 .LM73: + 729 0410 A196 adiw r28,33 + 730 0412 0FB6 in __tmp_reg__,__SREG__ + 731 0414 F894 cli + 732 0416 DEBF out __SP_H__,r29 + 733 0418 0FBE out __SREG__,__tmp_reg__ + 734 041a CDBF out __SP_L__,r28 + 735 041c CF91 pop r28 + 736 041e DF91 pop r29 + 737 0420 1F91 pop r17 + 738 0422 0F91 pop r16 + 739 .LVL66: + 740 0424 FF90 pop r15 + 741 0426 EF90 pop r14 + 742 0428 DF90 pop r13 + 743 042a CF90 pop r12 + 744 .LVL67: + 745 042c BF90 pop r11 + 746 .LVL68: + 747 042e AF90 pop r10 + 748 .LVL69: + 749 0430 9F90 pop r9 + 750 0432 8F90 pop r8 + 751 0434 7F90 pop r7 + 752 0436 6F90 pop r6 + 753 0438 5F90 pop r5 + 754 043a 4F90 pop r4 + 755 043c 3F90 pop r3 + 756 043e 2F90 pop r2 + 757 0440 0895 ret + 758 .LFE31: + 760 .global effect_pathspiral + 762 effect_pathspiral: + 763 .LFB30: + 764 .LM74: + 765 .LVL70: + 766 0442 9F92 push r9 + 767 0444 AF92 push r10 + 768 0446 BF92 push r11 + 769 0448 CF92 push r12 + 770 044a DF92 push r13 + 771 044c EF92 push r14 + 772 044e FF92 push r15 + 773 0450 0F93 push r16 + 774 0452 1F93 push r17 + 775 0454 DF93 push r29 + 776 0456 CF93 push r28 + 777 0458 CDB7 in r28,__SP_L__ + 778 045a DEB7 in r29,__SP_H__ + 779 045c 6097 sbiw r28,16 + 780 045e 0FB6 in __tmp_reg__,__SREG__ + 781 0460 F894 cli + 782 0462 DEBF out __SP_H__,r29 + 783 0464 0FBE out __SREG__,__tmp_reg__ + 784 0466 CDBF out __SP_L__,r28 + 785 /* prologue: function */ + 786 /* frame size = 16 */ + 787 0468 5C01 movw r10,r24 + 788 046a 6B01 movw r12,r22 + 789 .LM75: + 790 046c 81E0 ldi r24,lo8(1) + 791 .LVL71: + 792 046e 8E01 movw r16,r28 + 793 0470 0F5F subi r16,lo8(-(1)) + 794 0472 1F4F sbci r17,hi8(-(1)) + 795 0474 B801 movw r22,r16 + 796 .LVL72: + 797 0476 40E1 ldi r20,lo8(16) + 798 0478 50E0 ldi r21,hi8(16) + 799 047a 0E94 0000 call font_getpath + 800 047e EE24 clr r14 + 801 0480 FF24 clr r15 + 802 .LVL73: + 803 .LM76: + 804 0482 902E mov r9,r16 + 805 0484 012F mov r16,r17 + 806 0486 00C0 rjmp .L55 + 807 .L56: + 808 .LM77: + 809 0488 A701 movw r20,r14 + 810 048a 4770 andi r20,lo8(7) + 811 048c 5070 andi r21,hi8(7) + 812 048e 84E0 ldi r24,lo8(4) + 813 0490 90E0 ldi r25,hi8(4) + 814 0492 60E0 ldi r22,lo8(0) + 815 0494 70E0 ldi r23,hi8(0) + 816 0496 0E94 0000 call setvoxel + 817 .LM78: + 818 049a C601 movw r24,r12 + 819 049c 0E94 0000 call delay_ms + 820 .LM79: + 821 04a0 892D mov r24,r9 + 822 04a2 902F mov r25,r16 + 823 04a4 6CE1 ldi r22,lo8(28) + 824 04a6 70E0 ldi r23,hi8(28) + 825 04a8 0E94 0000 call effect_pathmove + 826 .LM80: + 827 04ac 0894 sec + 828 04ae E11C adc r14,__zero_reg__ + 829 04b0 F11C adc r15,__zero_reg__ + 830 .L55: + 831 04b2 EA14 cp r14,r10 + 832 04b4 FB04 cpc r15,r11 + 833 04b6 04F0 brlt .L56 + 834 /* epilogue start */ + 835 .LM81: + 836 04b8 6096 adiw r28,16 + 837 04ba 0FB6 in __tmp_reg__,__SREG__ + 838 04bc F894 cli + 839 04be DEBF out __SP_H__,r29 + 840 04c0 0FBE out __SREG__,__tmp_reg__ + 841 04c2 CDBF out __SP_L__,r28 + 842 04c4 CF91 pop r28 + 843 04c6 DF91 pop r29 + 844 04c8 1F91 pop r17 + 845 04ca 0F91 pop r16 + 846 04cc FF90 pop r15 + 847 04ce EF90 pop r14 + 848 .LVL74: + 849 04d0 DF90 pop r13 + 850 04d2 CF90 pop r12 + 851 .LVL75: + 852 04d4 BF90 pop r11 + 853 04d6 AF90 pop r10 + 854 .LVL76: + 855 04d8 9F90 pop r9 + 856 04da 0895 ret + 857 .LFE30: + 859 .global effect_rand_patharound + 861 effect_rand_patharound: + 862 .LFB29: + 863 .LM82: + 864 .LVL77: + 865 04dc 7F92 push r7 + 866 04de 8F92 push r8 + 867 04e0 9F92 push r9 + 868 04e2 AF92 push r10 + 869 04e4 BF92 push r11 + 870 04e6 CF92 push r12 + 871 04e8 DF92 push r13 + 872 04ea EF92 push r14 + 873 04ec FF92 push r15 + 874 04ee 0F93 push r16 + 875 04f0 1F93 push r17 + 876 04f2 DF93 push r29 + 877 04f4 CF93 push r28 + 878 04f6 CDB7 in r28,__SP_L__ + 879 04f8 DEB7 in r29,__SP_H__ + 880 04fa 6C97 sbiw r28,28 + 881 04fc 0FB6 in __tmp_reg__,__SREG__ + 882 04fe F894 cli + 883 0500 DEBF out __SP_H__,r29 + 884 0502 0FBE out __SREG__,__tmp_reg__ + 885 0504 CDBF out __SP_L__,r28 + 886 /* prologue: function */ + 887 /* frame size = 28 */ + 888 0506 4C01 movw r8,r24 + 889 0508 5B01 movw r10,r22 + 890 .LM83: + 891 050a 80E0 ldi r24,lo8(0) + 892 .LVL78: + 893 050c 8E01 movw r16,r28 + 894 050e 0F5F subi r16,lo8(-(1)) + 895 0510 1F4F sbci r17,hi8(-(1)) + 896 0512 B801 movw r22,r16 + 897 .LVL79: + 898 0514 4CE1 ldi r20,lo8(28) + 899 0516 50E0 ldi r21,hi8(28) + 900 0518 0E94 0000 call font_getpath + 901 051c 74E0 ldi r23,lo8(4) + 902 051e E72E mov r14,r23 + 903 0520 F12C mov r15,__zero_reg__ + 904 .LVL80: + 905 0522 CC24 clr r12 + 906 0524 DD24 clr r13 + 907 .LVL81: + 908 .LM84: + 909 0526 702E mov r7,r16 + 910 0528 012F mov r16,r17 + 911 052a 00C0 rjmp .L59 + 912 .L62: + 913 .LM85: + 914 052c 0E94 0000 call rand + 915 0530 0894 sec + 916 0532 E108 sbc r14,__zero_reg__ + 917 0534 F108 sbc r15,__zero_reg__ + 918 .LM86: + 919 0536 63E0 ldi r22,lo8(3) + 920 0538 70E0 ldi r23,hi8(3) + 921 053a 0E94 0000 call __divmodhi4 + 922 053e E80E add r14,r24 + 923 0540 F91E adc r15,r25 + 924 .LM87: + 925 0542 88E0 ldi r24,lo8(8) + 926 0544 E816 cp r14,r24 + 927 0546 F104 cpc r15,__zero_reg__ + 928 0548 04F0 brlt .L60 + 929 054a 67E0 ldi r22,lo8(7) + 930 054c E62E mov r14,r22 + 931 054e F12C mov r15,__zero_reg__ + 932 0550 00C0 rjmp .L61 + 933 .L60: + 934 .LM88: + 935 0552 F7FE sbrs r15,7 + 936 0554 00C0 rjmp .L61 + 937 0556 EE24 clr r14 + 938 0558 FF24 clr r15 + 939 .L61: + 940 .LM89: + 941 055a 872D mov r24,r7 + 942 055c 902F mov r25,r16 + 943 055e 6CE1 ldi r22,lo8(28) + 944 0560 70E0 ldi r23,hi8(28) + 945 0562 0E94 0000 call effect_pathmove + 946 .LM90: + 947 0566 80E0 ldi r24,lo8(0) + 948 0568 90E0 ldi r25,hi8(0) + 949 056a 67E0 ldi r22,lo8(7) + 950 056c 70E0 ldi r23,hi8(7) + 951 056e A701 movw r20,r14 + 952 0570 0E94 0000 call setvoxel + 953 .LM91: + 954 0574 C501 movw r24,r10 + 955 0576 0E94 0000 call delay_ms + 956 .LM92: + 957 057a 0894 sec + 958 057c C11C adc r12,__zero_reg__ + 959 057e D11C adc r13,__zero_reg__ + 960 .L59: + 961 0580 C814 cp r12,r8 + 962 0582 D904 cpc r13,r9 + 963 0584 04F0 brlt .L62 + 964 /* epilogue start */ + 965 .LM93: + 966 0586 6C96 adiw r28,28 + 967 0588 0FB6 in __tmp_reg__,__SREG__ + 968 058a F894 cli + 969 058c DEBF out __SP_H__,r29 + 970 058e 0FBE out __SREG__,__tmp_reg__ + 971 0590 CDBF out __SP_L__,r28 + 972 0592 CF91 pop r28 + 973 0594 DF91 pop r29 + 974 0596 1F91 pop r17 + 975 0598 0F91 pop r16 + 976 059a FF90 pop r15 + 977 059c EF90 pop r14 + 978 .LVL82: + 979 059e DF90 pop r13 + 980 05a0 CF90 pop r12 + 981 .LVL83: + 982 05a2 BF90 pop r11 + 983 05a4 AF90 pop r10 + 984 .LVL84: + 985 05a6 9F90 pop r9 + 986 05a8 8F90 pop r8 + 987 .LVL85: + 988 05aa 7F90 pop r7 + 989 05ac 0895 ret + 990 .LFE29: + 992 .global effect_stringfly2 + 994 effect_stringfly2: + 995 .LFB5: + 996 .LM94: + 997 .LVL86: + 998 05ae 2F92 push r2 + 999 05b0 3F92 push r3 + 1000 05b2 4F92 push r4 + 1001 05b4 5F92 push r5 + 1002 05b6 6F92 push r6 + 1003 05b8 7F92 push r7 + 1004 05ba 8F92 push r8 + 1005 05bc 9F92 push r9 + 1006 05be AF92 push r10 + 1007 05c0 BF92 push r11 + 1008 05c2 CF92 push r12 + 1009 05c4 DF92 push r13 + 1010 05c6 EF92 push r14 + 1011 05c8 FF92 push r15 + 1012 05ca 0F93 push r16 + 1013 05cc 1F93 push r17 + 1014 05ce DF93 push r29 + 1015 05d0 CF93 push r28 + 1016 05d2 00D0 rcall . + 1017 05d4 00D0 rcall . + 1018 05d6 0F92 push __tmp_reg__ + 1019 05d8 CDB7 in r28,__SP_L__ + 1020 05da DEB7 in r29,__SP_H__ + 1021 /* prologue: function */ + 1022 /* frame size = 5 */ + 1023 05dc 3C01 movw r6,r24 + 1024 .LM95: + 1025 05de 2E01 movw r4,r28 + 1026 05e0 0894 sec + 1027 05e2 411C adc r4,__zero_reg__ + 1028 05e4 511C adc r5,__zero_reg__ + 1029 .LM96: + 1030 05e6 F0E8 ldi r31,lo8(128) + 1031 05e8 2F2E mov r2,r31 + 1032 05ea 312C mov r3,__zero_reg__ + 1033 05ec 00C0 rjmp .L65 + 1034 .LVL87: + 1035 .L78: + 1036 .LM97: + 1037 05ee B201 movw r22,r4 + 1038 05f0 0E94 0000 call font_getchar + 1039 05f4 EE24 clr r14 + 1040 05f6 FF24 clr r15 + 1041 .LVL88: + 1042 05f8 00C0 rjmp .L66 + 1043 .LVL89: + 1044 .L68: + 1045 .LM98: + 1046 05fa 9101 movw r18,r2 + 1047 05fc 002E mov r0,r16 + 1048 05fe 00C0 rjmp 2f + 1049 0600 3595 1: asr r19 + 1050 0602 2795 ror r18 + 1051 0604 0A94 2: dec r0 + 1052 0606 02F4 brpl 1b + 1053 0608 F501 movw r30,r10 + 1054 060a 8081 ld r24,Z + 1055 060c 90E0 ldi r25,lo8(0) + 1056 060e 2823 and r18,r24 + 1057 0610 3923 and r19,r25 + 1058 0612 232B or r18,r19 + 1059 0614 01F0 breq .L67 + 1060 .LM99: + 1061 0616 87E0 ldi r24,lo8(7) + 1062 0618 90E0 ldi r25,hi8(7) + 1063 061a B601 movw r22,r12 + 1064 061c A801 movw r20,r16 + 1065 061e 0E94 0000 call setvoxel + 1066 .L67: + 1067 .LM100: + 1068 0622 0F5F subi r16,lo8(-(1)) + 1069 0624 1F4F sbci r17,hi8(-(1)) + 1070 0626 0830 cpi r16,8 + 1071 0628 1105 cpc r17,__zero_reg__ + 1072 062a 01F4 brne .L68 + 1073 .LM101: + 1074 062c 0894 sec + 1075 062e E11C adc r14,__zero_reg__ + 1076 0630 F11C adc r15,__zero_reg__ + 1077 0632 F5E0 ldi r31,lo8(5) + 1078 0634 EF16 cp r14,r31 + 1079 0636 F104 cpc r15,__zero_reg__ + 1080 0638 01F0 breq .L69 + 1081 .LVL90: + 1082 .L66: + 1083 063a 00E0 ldi r16,lo8(0) + 1084 063c 10E0 ldi r17,hi8(0) + 1085 .LM102: + 1086 063e 5201 movw r10,r4 + 1087 .LVL91: + 1088 0640 AE0C add r10,r14 + 1089 0642 BF1C adc r11,r15 + 1090 .LM103: + 1091 0644 E2E0 ldi r30,lo8(2) + 1092 0646 CE2E mov r12,r30 + 1093 0648 D12C mov r13,__zero_reg__ + 1094 064a CE0C add r12,r14 + 1095 064c DF1C adc r13,r15 + 1096 064e 00C0 rjmp .L68 + 1097 .L69: + 1098 .LM104: + 1099 0650 AA24 clr r10 + 1100 0652 BB24 clr r11 + 1101 .LVL92: + 1102 .L77: + 1103 .LM105: + 1104 0654 88EE ldi r24,lo8(1000) + 1105 0656 93E0 ldi r25,hi8(1000) + 1106 0658 0E94 0000 call delay_ms + 1107 065c CC24 clr r12 + 1108 065e DD24 clr r13 + 1109 .LVL93: + 1110 0660 00C0 rjmp .L70 + 1111 .L71: + 1112 .LM106: + 1113 0662 C401 movw r24,r8 + 1114 0664 B701 movw r22,r14 + 1115 0666 A801 movw r20,r16 + 1116 0668 0E94 0000 call getvoxel + 1117 066c 282F mov r18,r24 + 1118 .LM107: + 1119 066e C601 movw r24,r12 + 1120 0670 B701 movw r22,r14 + 1121 0672 A801 movw r20,r16 + 1122 0674 30E0 ldi r19,lo8(0) + 1123 0676 0E94 0000 call altervoxel + 1124 .LM108: + 1125 067a 0F5F subi r16,lo8(-(1)) + 1126 067c 1F4F sbci r17,hi8(-(1)) + 1127 067e 0830 cpi r16,8 + 1128 0680 1105 cpc r17,__zero_reg__ + 1129 0682 01F4 brne .L71 + 1130 .LM109: + 1131 0684 0894 sec + 1132 0686 E11C adc r14,__zero_reg__ + 1133 0688 F11C adc r15,__zero_reg__ + 1134 068a 88E0 ldi r24,lo8(8) + 1135 068c E816 cp r14,r24 + 1136 068e F104 cpc r15,__zero_reg__ + 1137 0690 01F0 breq .L72 + 1138 .L74: + 1139 0692 00E0 ldi r16,lo8(0) + 1140 0694 10E0 ldi r17,hi8(0) + 1141 0696 00C0 rjmp .L71 + 1142 .L72: + 1143 0698 6401 movw r12,r8 + 1144 .LM110: + 1145 069a E7E0 ldi r30,lo8(7) + 1146 069c 8E16 cp r8,r30 + 1147 069e 9104 cpc r9,__zero_reg__ + 1148 06a0 01F4 brne .L70 + 1149 .LVL94: + 1150 06a2 EE24 clr r14 + 1151 06a4 FF24 clr r15 + 1152 .LVL95: + 1153 06a6 00C0 rjmp .L73 + 1154 .LVL96: + 1155 .L70: + 1156 06a8 EE24 clr r14 + 1157 06aa FF24 clr r15 + 1158 .LM111: + 1159 06ac 4601 movw r8,r12 + 1160 06ae 0894 sec + 1161 06b0 811C adc r8,__zero_reg__ + 1162 06b2 911C adc r9,__zero_reg__ + 1163 06b4 00C0 rjmp .L74 + 1164 .LVL97: + 1165 .L75: + 1166 .LM112: + 1167 06b6 87E0 ldi r24,lo8(7) + 1168 06b8 90E0 ldi r25,hi8(7) + 1169 06ba B701 movw r22,r14 + 1170 06bc A801 movw r20,r16 + 1171 06be 0E94 0000 call clrvoxel + 1172 .LM113: + 1173 06c2 0F5F subi r16,lo8(-(1)) + 1174 06c4 1F4F sbci r17,hi8(-(1)) + 1175 06c6 0830 cpi r16,8 + 1176 06c8 1105 cpc r17,__zero_reg__ + 1177 06ca 01F4 brne .L75 + 1178 .LM114: + 1179 06cc 0894 sec + 1180 06ce E11C adc r14,__zero_reg__ + 1181 06d0 F11C adc r15,__zero_reg__ + 1182 06d2 F8E0 ldi r31,lo8(8) + 1183 06d4 EF16 cp r14,r31 + 1184 06d6 F104 cpc r15,__zero_reg__ + 1185 06d8 01F0 breq .L76 + 1186 .L73: + 1187 06da 00E0 ldi r16,lo8(0) + 1188 06dc 10E0 ldi r17,hi8(0) + 1189 06de 00C0 rjmp .L75 + 1190 .L76: + 1191 .LM115: + 1192 06e0 0894 sec + 1193 06e2 A11C adc r10,__zero_reg__ + 1194 06e4 B11C adc r11,__zero_reg__ + 1195 06e6 86E0 ldi r24,lo8(6) + 1196 06e8 A816 cp r10,r24 + 1197 06ea B104 cpc r11,__zero_reg__ + 1198 06ec 01F0 breq .+2 + 1199 06ee 00C0 rjmp .L77 + 1200 .LM116: + 1201 06f0 0894 sec + 1202 06f2 611C adc r6,__zero_reg__ + 1203 06f4 711C adc r7,__zero_reg__ + 1204 .LVL98: + 1205 .L65: + 1206 .LM117: + 1207 06f6 F301 movw r30,r6 + 1208 06f8 8081 ld r24,Z + 1209 06fa 8823 tst r24 + 1210 06fc 01F0 breq .+2 + 1211 06fe 00C0 rjmp .L78 + 1212 0700 AA24 clr r10 + 1213 0702 BB24 clr r11 + 1214 .LVL99: + 1215 .L86: + 1216 .LM118: + 1217 0704 88EE ldi r24,lo8(1000) + 1218 0706 93E0 ldi r25,hi8(1000) + 1219 0708 0E94 0000 call delay_ms + 1220 070c CC24 clr r12 + 1221 070e DD24 clr r13 + 1222 .LVL100: + 1223 0710 00C0 rjmp .L79 + 1224 .L80: + 1225 .LM119: + 1226 0712 C401 movw r24,r8 + 1227 0714 B701 movw r22,r14 + 1228 0716 A801 movw r20,r16 + 1229 0718 0E94 0000 call getvoxel + 1230 071c 282F mov r18,r24 + 1231 .LM120: + 1232 071e C601 movw r24,r12 + 1233 0720 B701 movw r22,r14 + 1234 0722 A801 movw r20,r16 + 1235 0724 30E0 ldi r19,lo8(0) + 1236 0726 0E94 0000 call altervoxel + 1237 .LM121: + 1238 072a 0F5F subi r16,lo8(-(1)) + 1239 072c 1F4F sbci r17,hi8(-(1)) + 1240 072e 0830 cpi r16,8 + 1241 0730 1105 cpc r17,__zero_reg__ + 1242 0732 01F4 brne .L80 + 1243 .LM122: + 1244 0734 0894 sec + 1245 0736 E11C adc r14,__zero_reg__ + 1246 0738 F11C adc r15,__zero_reg__ + 1247 073a F8E0 ldi r31,lo8(8) + 1248 073c EF16 cp r14,r31 + 1249 073e F104 cpc r15,__zero_reg__ + 1250 0740 01F0 breq .L81 + 1251 .L83: + 1252 0742 00E0 ldi r16,lo8(0) + 1253 0744 10E0 ldi r17,hi8(0) + 1254 0746 00C0 rjmp .L80 + 1255 .L81: + 1256 0748 6401 movw r12,r8 + 1257 .LM123: + 1258 074a 87E0 ldi r24,lo8(7) + 1259 074c 8816 cp r8,r24 + 1260 074e 9104 cpc r9,__zero_reg__ + 1261 0750 01F4 brne .L79 + 1262 .LVL101: + 1263 0752 EE24 clr r14 + 1264 0754 FF24 clr r15 + 1265 .LVL102: + 1266 0756 00C0 rjmp .L82 + 1267 .LVL103: + 1268 .L79: + 1269 0758 EE24 clr r14 + 1270 075a FF24 clr r15 + 1271 .LM124: + 1272 075c 4601 movw r8,r12 + 1273 075e 0894 sec + 1274 0760 811C adc r8,__zero_reg__ + 1275 0762 911C adc r9,__zero_reg__ + 1276 0764 00C0 rjmp .L83 + 1277 .LVL104: + 1278 .L84: + 1279 .LM125: + 1280 0766 87E0 ldi r24,lo8(7) + 1281 0768 90E0 ldi r25,hi8(7) + 1282 076a B701 movw r22,r14 + 1283 076c A801 movw r20,r16 + 1284 076e 0E94 0000 call clrvoxel + 1285 .LM126: + 1286 0772 0F5F subi r16,lo8(-(1)) + 1287 0774 1F4F sbci r17,hi8(-(1)) + 1288 0776 0830 cpi r16,8 + 1289 0778 1105 cpc r17,__zero_reg__ + 1290 077a 01F4 brne .L84 + 1291 .LM127: + 1292 077c 0894 sec + 1293 077e E11C adc r14,__zero_reg__ + 1294 0780 F11C adc r15,__zero_reg__ + 1295 0782 E8E0 ldi r30,lo8(8) + 1296 0784 EE16 cp r14,r30 + 1297 0786 F104 cpc r15,__zero_reg__ + 1298 0788 01F0 breq .L85 + 1299 .L82: + 1300 078a 00E0 ldi r16,lo8(0) + 1301 078c 10E0 ldi r17,hi8(0) + 1302 078e 00C0 rjmp .L84 + 1303 .L85: + 1304 .LM128: + 1305 0790 0894 sec + 1306 0792 A11C adc r10,__zero_reg__ + 1307 0794 B11C adc r11,__zero_reg__ + 1308 0796 F8E0 ldi r31,lo8(8) + 1309 0798 AF16 cp r10,r31 + 1310 079a B104 cpc r11,__zero_reg__ + 1311 079c 01F0 breq .+2 + 1312 079e 00C0 rjmp .L86 + 1313 /* epilogue start */ + 1314 .LM129: + 1315 07a0 0F90 pop __tmp_reg__ + 1316 07a2 0F90 pop __tmp_reg__ + 1317 07a4 0F90 pop __tmp_reg__ + 1318 07a6 0F90 pop __tmp_reg__ + 1319 07a8 0F90 pop __tmp_reg__ + 1320 07aa CF91 pop r28 + 1321 07ac DF91 pop r29 + 1322 07ae 1F91 pop r17 + 1323 07b0 0F91 pop r16 + 1324 .LVL105: + 1325 07b2 FF90 pop r15 + 1326 07b4 EF90 pop r14 + 1327 .LVL106: + 1328 07b6 DF90 pop r13 + 1329 07b8 CF90 pop r12 + 1330 07ba BF90 pop r11 + 1331 07bc AF90 pop r10 + 1332 .LVL107: + 1333 07be 9F90 pop r9 + 1334 07c0 8F90 pop r8 + 1335 .LVL108: + 1336 07c2 7F90 pop r7 + 1337 07c4 6F90 pop r6 + 1338 .LVL109: + 1339 07c6 5F90 pop r5 + 1340 07c8 4F90 pop r4 + 1341 07ca 3F90 pop r3 + 1342 07cc 2F90 pop r2 + 1343 07ce 0895 ret + 1344 .LFE5: + 1346 .global effect_smileyspin + 1348 effect_smileyspin: + 1349 .LFB27: + 1350 .LM130: + 1351 .LVL110: + 1352 07d0 2F92 push r2 + 1353 07d2 3F92 push r3 + 1354 07d4 4F92 push r4 + 1355 07d6 5F92 push r5 + 1356 07d8 6F92 push r6 + 1357 07da 7F92 push r7 + 1358 07dc 8F92 push r8 + 1359 07de 9F92 push r9 + 1360 07e0 AF92 push r10 + 1361 07e2 BF92 push r11 + 1362 07e4 CF92 push r12 + 1363 07e6 DF92 push r13 + 1364 07e8 EF92 push r14 + 1365 07ea FF92 push r15 + 1366 07ec 0F93 push r16 + 1367 07ee 1F93 push r17 + 1368 07f0 DF93 push r29 + 1369 07f2 CF93 push r28 + 1370 07f4 CDB7 in r28,__SP_L__ + 1371 07f6 DEB7 in r29,__SP_H__ + 1372 07f8 EC97 sbiw r28,60 + 1373 07fa 0FB6 in __tmp_reg__,__SREG__ + 1374 07fc F894 cli + 1375 07fe DEBF out __SP_H__,r29 + 1376 0800 0FBE out __SREG__,__tmp_reg__ + 1377 0802 CDBF out __SP_L__,r28 + 1378 /* prologue: function */ + 1379 /* frame size = 60 */ + 1380 0804 9FA7 std Y+47,r25 + 1381 0806 8EA7 std Y+46,r24 + 1382 0808 69AB std Y+49,r22 + 1383 080a 7AAB std Y+50,r23 + 1384 .LVL111: + 1385 080c 48AB std Y+48,r20 + 1386 .LM131: + 1387 080e DE01 movw r26,r28 + 1388 0810 1196 adiw r26,1 + 1389 0812 E0E0 ldi r30,lo8(C.30.2453) + 1390 0814 F0E0 ldi r31,hi8(C.30.2453) + 1391 0816 80E2 ldi r24,lo8(32) + 1392 .LVL112: + 1393 .L98: + 1394 0818 0190 ld r0,Z+ + 1395 081a 0D92 st X+,r0 + 1396 081c 8150 subi r24,lo8(-(-1)) + 1397 081e 01F4 brne .L98 + 1398 0820 1DA6 std Y+45,__zero_reg__ + 1399 0822 1CA6 std Y+44,__zero_reg__ + 1400 .LVL113: + 1401 .LBB2: + 1402 .LBB3: + 1403 .LM132: + 1404 0824 9E01 movw r18,r28 + 1405 0826 2F5F subi r18,lo8(-(1)) + 1406 0828 3F4F sbci r19,hi8(-(1)) + 1407 082a 3CAF std Y+60,r19 + 1408 082c 2BAF std Y+59,r18 + 1409 082e 00C0 rjmp .L99 + 1410 .LVL114: + 1411 .L132: + 1412 .LBE3: + 1413 .LBE2: + 1414 .LM133: + 1415 0830 2224 clr r2 + 1416 0832 3324 clr r3 + 1417 .LVL115: + 1418 0834 8824 clr r8 + 1419 0836 9924 clr r9 + 1420 .LVL116: + 1421 0838 4424 clr r4 + 1422 083a 5524 clr r5 + 1423 .LVL117: + 1424 .L107: + 1425 083c C401 movw r24,r8 + 1426 083e 0196 adiw r24,1 + 1427 .LVL118: + 1428 .LBB8: + 1429 .LBB4: + 1430 .LM134: + 1431 0840 2114 cp r2,__zero_reg__ + 1432 0842 3104 cpc r3,__zero_reg__ + 1433 0844 01F4 brne .L100 + 1434 .LM135: + 1435 0846 4C01 movw r8,r24 + 1436 .LM136: + 1437 0848 8430 cpi r24,4 + 1438 084a 9105 cpc r25,__zero_reg__ + 1439 084c 01F4 brne .L101 + 1440 084e 71E0 ldi r23,lo8(1) + 1441 0850 272E mov r2,r23 + 1442 0852 312C mov r3,__zero_reg__ + 1443 .LVL119: + 1444 0854 8824 clr r8 + 1445 0856 9924 clr r9 + 1446 .LVL120: + 1447 0858 00C0 rjmp .L101 + 1448 .LVL121: + 1449 .L100: + 1450 .LM137: + 1451 085a 4C01 movw r8,r24 + 1452 .LVL122: + 1453 .L101: + 1454 .LM138: + 1455 085c C401 movw r24,r8 + 1456 085e 63E0 ldi r22,3 + 1457 0860 880F 1: lsl r24 + 1458 0862 991F rol r25 + 1459 0864 6A95 dec r22 + 1460 0866 01F4 brne 1b + 1461 .LVL123: + 1462 .LM139: + 1463 0868 6BAC ldd r6,Y+59 + 1464 086a 7CAC ldd r7,Y+60 + 1465 086c 681A sub r6,r24 + 1466 086e 790A sbc r7,r25 + 1467 0870 AA24 clr r10 + 1468 0872 BB24 clr r11 + 1469 0874 E7E0 ldi r30,lo8(7) + 1470 0876 EFA3 std Y+39,r30 + 1471 .LM140: + 1472 0878 2FE1 ldi r18,lo8(31) + 1473 087a 30E0 ldi r19,hi8(31) + 1474 087c 620E add r6,r18 + 1475 087e 731E adc r7,r19 + 1476 0880 E1E0 ldi r30,lo8(1) + 1477 0882 F0E0 ldi r31,hi8(1) + 1478 0884 EC0F add r30,r28 + 1479 0886 FD1F adc r31,r29 + 1480 0888 E80F add r30,r24 + 1481 088a F91F adc r31,r25 + 1482 088c FAAF std Y+58,r31 + 1483 088e E9AF std Y+57,r30 + 1484 0890 00C0 rjmp .L102 + 1485 .L105: + 1486 .LM141: + 1487 0892 88A9 ldd r24,Y+48 + 1488 0894 6FA1 ldd r22,Y+39 + 1489 0896 402F mov r20,r16 + 1490 0898 0E94 0000 call font_getbitmappixel + 1491 .LVL124: + 1492 089c 8823 tst r24 + 1493 089e 01F0 breq .L103 + 1494 .LM142: + 1495 08a0 2114 cp r2,__zero_reg__ + 1496 08a2 3104 cpc r3,__zero_reg__ + 1497 08a4 01F4 brne .L104 + 1498 .LM143: + 1499 08a6 F701 movw r30,r14 + 1500 08a8 00C0 rjmp .L143 + 1501 .L104: + 1502 .LM144: + 1503 08aa F601 movw r30,r12 + 1504 .L143: + 1505 08ac 6081 ld r22,Z + 1506 08ae C801 movw r24,r16 + 1507 08b0 70E0 ldi r23,lo8(0) + 1508 08b2 A501 movw r20,r10 + 1509 08b4 0E94 0000 call setvoxel + 1510 .L103: + 1511 .LM145: + 1512 08b8 0F5F subi r16,lo8(-(1)) + 1513 08ba 1F4F sbci r17,hi8(-(1)) + 1514 08bc 0894 sec + 1515 08be C108 sbc r12,__zero_reg__ + 1516 08c0 D108 sbc r13,__zero_reg__ + 1517 08c2 0894 sec + 1518 08c4 E11C adc r14,__zero_reg__ + 1519 08c6 F11C adc r15,__zero_reg__ + 1520 08c8 0830 cpi r16,8 + 1521 08ca 1105 cpc r17,__zero_reg__ + 1522 08cc 01F4 brne .L105 + 1523 .LM146: + 1524 08ce 0894 sec + 1525 08d0 A11C adc r10,__zero_reg__ + 1526 08d2 B11C adc r11,__zero_reg__ + 1527 08d4 FFA1 ldd r31,Y+39 + 1528 08d6 F150 subi r31,lo8(-(-1)) + 1529 08d8 FFA3 std Y+39,r31 + 1530 08da FF3F cpi r31,lo8(-1) + 1531 08dc 01F0 breq .L106 + 1532 .LVL125: + 1533 .L102: + 1534 08de 6301 movw r12,r6 + 1535 08e0 E9AC ldd r14,Y+57 + 1536 08e2 FAAC ldd r15,Y+58 + 1537 08e4 00E0 ldi r16,lo8(0) + 1538 08e6 10E0 ldi r17,hi8(0) + 1539 08e8 00C0 rjmp .L105 + 1540 .LVL126: + 1541 .L106: + 1542 .LM147: + 1543 08ea 89A9 ldd r24,Y+49 + 1544 08ec 9AA9 ldd r25,Y+50 + 1545 08ee 0E94 0000 call delay_ms + 1546 .LM148: + 1547 08f2 80E0 ldi r24,lo8(0) + 1548 08f4 0E94 0000 call fill + 1549 .LM149: + 1550 08f8 0894 sec + 1551 08fa 411C adc r4,__zero_reg__ + 1552 08fc 511C adc r5,__zero_reg__ + 1553 08fe 27E0 ldi r18,lo8(7) + 1554 0900 4216 cp r4,r18 + 1555 0902 5104 cpc r5,__zero_reg__ + 1556 0904 01F0 breq .+2 + 1557 0906 00C0 rjmp .L107 + 1558 0908 1EA2 std Y+38,__zero_reg__ + 1559 090a 1DA2 std Y+37,__zero_reg__ + 1560 .LVL127: + 1561 090c 6624 clr r6 + 1562 090e 7724 clr r7 + 1563 .LVL128: + 1564 0910 2224 clr r2 + 1565 0912 3324 clr r3 + 1566 .LVL129: + 1567 .L115: + 1568 0914 C301 movw r24,r6 + 1569 0916 0196 adiw r24,1 + 1570 .LVL130: + 1571 .LBE4: + 1572 .LBB5: + 1573 .LM150: + 1574 0918 EDA1 ldd r30,Y+37 + 1575 091a FEA1 ldd r31,Y+38 + 1576 091c EF2B or r30,r31 + 1577 091e 01F4 brne .L108 + 1578 .LM151: + 1579 0920 3C01 movw r6,r24 + 1580 .LM152: + 1581 0922 8430 cpi r24,4 + 1582 0924 9105 cpc r25,__zero_reg__ + 1583 0926 01F4 brne .L109 + 1584 0928 21E0 ldi r18,lo8(1) + 1585 092a 30E0 ldi r19,hi8(1) + 1586 092c 3EA3 std Y+38,r19 + 1587 092e 2DA3 std Y+37,r18 + 1588 .LVL131: + 1589 0930 6624 clr r6 + 1590 0932 7724 clr r7 + 1591 .LVL132: + 1592 0934 00C0 rjmp .L109 + 1593 .LVL133: + 1594 .L108: + 1595 .LM153: + 1596 0936 3C01 movw r6,r24 + 1597 .LVL134: + 1598 .L109: + 1599 .LM154: + 1600 0938 C301 movw r24,r6 + 1601 093a 53E0 ldi r21,3 + 1602 093c 880F 1: lsl r24 + 1603 093e 991F rol r25 + 1604 0940 5A95 dec r21 + 1605 0942 01F4 brne 1b + 1606 .LM155: + 1607 0944 4BAC ldd r4,Y+59 + 1608 0946 5CAC ldd r5,Y+60 + 1609 .LVL135: + 1610 0948 481A sub r4,r24 + 1611 094a 590A sbc r5,r25 + 1612 094c 8824 clr r8 + 1613 094e 9924 clr r9 + 1614 0950 37E0 ldi r19,lo8(7) + 1615 0952 38A7 std Y+40,r19 + 1616 .LM156: + 1617 0954 EFE1 ldi r30,lo8(31) + 1618 0956 F0E0 ldi r31,hi8(31) + 1619 0958 4E0E add r4,r30 + 1620 095a 5F1E adc r5,r31 + 1621 095c 21E0 ldi r18,lo8(1) + 1622 095e 30E0 ldi r19,hi8(1) + 1623 0960 2C0F add r18,r28 + 1624 0962 3D1F adc r19,r29 + 1625 0964 280F add r18,r24 + 1626 0966 391F adc r19,r25 + 1627 0968 38AF std Y+56,r19 + 1628 096a 2FAB std Y+55,r18 + 1629 096c 00C0 rjmp .L110 + 1630 .LVL136: + 1631 .L113: + 1632 .LM157: + 1633 096e 4E2D mov r20,r14 + 1634 0970 4150 subi r20,lo8(-(-1)) + 1635 0972 88A9 ldd r24,Y+48 + 1636 0974 68A5 ldd r22,Y+40 + 1637 0976 0E94 0000 call font_getbitmappixel + 1638 097a 8823 tst r24 + 1639 097c 01F0 breq .L111 + 1640 .LM158: + 1641 097e 8DA1 ldd r24,Y+37 + 1642 0980 9EA1 ldd r25,Y+38 + 1643 0982 892B or r24,r25 + 1644 0984 01F4 brne .L112 + 1645 .LM159: + 1646 0986 F601 movw r30,r12 + 1647 0988 00C0 rjmp .L144 + 1648 .L112: + 1649 .LM160: + 1650 098a F501 movw r30,r10 + 1651 .L144: + 1652 098c 8081 ld r24,Z + 1653 098e 90E0 ldi r25,lo8(0) + 1654 0990 B801 movw r22,r16 + 1655 0992 A401 movw r20,r8 + 1656 0994 0E94 0000 call setvoxel + 1657 .L111: + 1658 0998 0894 sec + 1659 099a E11C adc r14,__zero_reg__ + 1660 099c F11C adc r15,__zero_reg__ + 1661 099e 0150 subi r16,lo8(-(-1)) + 1662 09a0 1040 sbci r17,hi8(-(-1)) + 1663 09a2 0894 sec + 1664 09a4 A108 sbc r10,__zero_reg__ + 1665 09a6 B108 sbc r11,__zero_reg__ + 1666 09a8 0894 sec + 1667 09aa C11C adc r12,__zero_reg__ + 1668 09ac D11C adc r13,__zero_reg__ + 1669 .LM161: + 1670 09ae F9E0 ldi r31,lo8(9) + 1671 09b0 EF16 cp r14,r31 + 1672 09b2 F104 cpc r15,__zero_reg__ + 1673 09b4 01F4 brne .L113 + 1674 .LM162: + 1675 09b6 0894 sec + 1676 09b8 811C adc r8,__zero_reg__ + 1677 09ba 911C adc r9,__zero_reg__ + 1678 09bc 28A5 ldd r18,Y+40 + 1679 09be 2150 subi r18,lo8(-(-1)) + 1680 09c0 28A7 std Y+40,r18 + 1681 09c2 2F3F cpi r18,lo8(-1) + 1682 09c4 01F0 breq .L114 + 1683 .LVL137: + 1684 .L110: + 1685 09c6 5201 movw r10,r4 + 1686 09c8 CFA8 ldd r12,Y+55 + 1687 09ca D8AC ldd r13,Y+56 + 1688 09cc 41E0 ldi r20,lo8(1) + 1689 09ce E42E mov r14,r20 + 1690 09d0 F12C mov r15,__zero_reg__ + 1691 09d2 07E0 ldi r16,lo8(7) + 1692 09d4 10E0 ldi r17,hi8(7) + 1693 .LVL138: + 1694 09d6 00C0 rjmp .L113 + 1695 .L114: + 1696 .LM163: + 1697 09d8 89A9 ldd r24,Y+49 + 1698 09da 9AA9 ldd r25,Y+50 + 1699 09dc 0E94 0000 call delay_ms + 1700 .LM164: + 1701 09e0 80E0 ldi r24,lo8(0) + 1702 09e2 0E94 0000 call fill + 1703 .LM165: + 1704 09e6 0894 sec + 1705 09e8 211C adc r2,__zero_reg__ + 1706 09ea 311C adc r3,__zero_reg__ + 1707 09ec 37E0 ldi r19,lo8(7) + 1708 09ee 2316 cp r2,r19 + 1709 09f0 3104 cpc r3,__zero_reg__ + 1710 09f2 01F0 breq .+2 + 1711 09f4 00C0 rjmp .L115 + 1712 09f6 1CA2 std Y+36,__zero_reg__ + 1713 09f8 1BA2 std Y+35,__zero_reg__ + 1714 .LVL139: + 1715 09fa 6624 clr r6 + 1716 09fc 7724 clr r7 + 1717 .LVL140: + 1718 09fe 1BA6 std Y+43,__zero_reg__ + 1719 0a00 1AA6 std Y+42,__zero_reg__ + 1720 .LVL141: + 1721 .L123: + 1722 0a02 C301 movw r24,r6 + 1723 0a04 0196 adiw r24,1 + 1724 .LVL142: + 1725 .LBE5: + 1726 .LBB6: + 1727 .LM166: + 1728 0a06 EBA1 ldd r30,Y+35 + 1729 0a08 FCA1 ldd r31,Y+36 + 1730 0a0a EF2B or r30,r31 + 1731 0a0c 01F4 brne .L116 + 1732 .LM167: + 1733 0a0e 3C01 movw r6,r24 + 1734 .LM168: + 1735 0a10 8430 cpi r24,4 + 1736 0a12 9105 cpc r25,__zero_reg__ + 1737 0a14 01F4 brne .L117 + 1738 0a16 21E0 ldi r18,lo8(1) + 1739 0a18 30E0 ldi r19,hi8(1) + 1740 0a1a 3CA3 std Y+36,r19 + 1741 0a1c 2BA3 std Y+35,r18 + 1742 .LVL143: + 1743 0a1e 6624 clr r6 + 1744 0a20 7724 clr r7 + 1745 .LVL144: + 1746 0a22 00C0 rjmp .L117 + 1747 .LVL145: + 1748 .L116: + 1749 .LM169: + 1750 0a24 3C01 movw r6,r24 + 1751 .LVL146: + 1752 .L117: + 1753 .LM170: + 1754 0a26 C301 movw r24,r6 + 1755 0a28 33E0 ldi r19,3 + 1756 0a2a 880F 1: lsl r24 + 1757 0a2c 991F rol r25 + 1758 0a2e 3A95 dec r19 + 1759 0a30 01F4 brne 1b + 1760 .LM171: + 1761 0a32 4BAC ldd r4,Y+59 + 1762 0a34 5CAC ldd r5,Y+60 + 1763 0a36 481A sub r4,r24 + 1764 0a38 590A sbc r5,r25 + 1765 0a3a AA24 clr r10 + 1766 0a3c BB24 clr r11 + 1767 .LVL147: + 1768 0a3e 27E0 ldi r18,lo8(7) + 1769 0a40 222E mov r2,r18 + 1770 .LVL148: + 1771 .LM172: + 1772 0a42 EFE1 ldi r30,lo8(31) + 1773 0a44 F0E0 ldi r31,hi8(31) + 1774 0a46 4E0E add r4,r30 + 1775 0a48 5F1E adc r5,r31 + 1776 0a4a 21E0 ldi r18,lo8(1) + 1777 0a4c 30E0 ldi r19,hi8(1) + 1778 0a4e 2C0F add r18,r28 + 1779 0a50 3D1F adc r19,r29 + 1780 0a52 280F add r18,r24 + 1781 0a54 391F adc r19,r25 + 1782 0a56 3EAB std Y+54,r19 + 1783 0a58 2DAB std Y+53,r18 + 1784 0a5a 00C0 rjmp .L118 + 1785 .L121: + 1786 .LM173: + 1787 0a5c 4801 movw r8,r16 + 1788 0a5e 0894 sec + 1789 0a60 8108 sbc r8,__zero_reg__ + 1790 0a62 9108 sbc r9,__zero_reg__ + 1791 .LM174: + 1792 0a64 88A9 ldd r24,Y+48 + 1793 0a66 622D mov r22,r2 + 1794 0a68 432D mov r20,r3 + 1795 0a6a 0E94 0000 call font_getbitmappixel + 1796 0a6e 8823 tst r24 + 1797 0a70 01F0 breq .L119 + 1798 .LM175: + 1799 0a72 8BA1 ldd r24,Y+35 + 1800 0a74 9CA1 ldd r25,Y+36 + 1801 0a76 892B or r24,r25 + 1802 0a78 01F4 brne .L120 + 1803 .LM176: + 1804 0a7a F701 movw r30,r14 + 1805 0a7c 00C0 rjmp .L145 + 1806 .L120: + 1807 .LM177: + 1808 0a7e F601 movw r30,r12 + 1809 .L145: + 1810 0a80 6081 ld r22,Z + 1811 0a82 C401 movw r24,r8 + 1812 0a84 70E0 ldi r23,lo8(0) + 1813 0a86 A501 movw r20,r10 + 1814 0a88 0E94 0000 call setvoxel + 1815 .L119: + 1816 0a8c 0F5F subi r16,lo8(-(1)) + 1817 0a8e 1F4F sbci r17,hi8(-(1)) + 1818 0a90 3A94 dec r3 + 1819 0a92 0894 sec + 1820 0a94 C108 sbc r12,__zero_reg__ + 1821 0a96 D108 sbc r13,__zero_reg__ + 1822 0a98 0894 sec + 1823 0a9a E11C adc r14,__zero_reg__ + 1824 0a9c F11C adc r15,__zero_reg__ + 1825 .LM178: + 1826 0a9e FFEF ldi r31,lo8(-1) + 1827 0aa0 3F16 cp r3,r31 + 1828 0aa2 01F4 brne .L121 + 1829 .LM179: + 1830 0aa4 0894 sec + 1831 0aa6 A11C adc r10,__zero_reg__ + 1832 0aa8 B11C adc r11,__zero_reg__ + 1833 0aaa 2A94 dec r2 + 1834 0aac 2F16 cp r2,r31 + 1835 0aae 01F0 breq .L122 + 1836 .L118: + 1837 0ab0 6201 movw r12,r4 + 1838 0ab2 EDA8 ldd r14,Y+53 + 1839 0ab4 FEA8 ldd r15,Y+54 + 1840 0ab6 01E0 ldi r16,lo8(1) + 1841 0ab8 10E0 ldi r17,hi8(1) + 1842 0aba 87E0 ldi r24,lo8(7) + 1843 0abc 382E mov r3,r24 + 1844 0abe 00C0 rjmp .L121 + 1845 .L122: + 1846 .LM180: + 1847 0ac0 89A9 ldd r24,Y+49 + 1848 0ac2 9AA9 ldd r25,Y+50 + 1849 0ac4 0E94 0000 call delay_ms + 1850 .LM181: + 1851 0ac8 80E0 ldi r24,lo8(0) + 1852 0aca 0E94 0000 call fill + 1853 .LM182: + 1854 0ace 2AA5 ldd r18,Y+42 + 1855 0ad0 3BA5 ldd r19,Y+43 + 1856 0ad2 2F5F subi r18,lo8(-(1)) + 1857 0ad4 3F4F sbci r19,hi8(-(1)) + 1858 0ad6 3BA7 std Y+43,r19 + 1859 0ad8 2AA7 std Y+42,r18 + 1860 .LVL149: + 1861 0ada 2730 cpi r18,7 + 1862 0adc 3105 cpc r19,__zero_reg__ + 1863 0ade 01F0 breq .+2 + 1864 0ae0 00C0 rjmp .L123 + 1865 0ae2 1AA2 std Y+34,__zero_reg__ + 1866 0ae4 19A2 std Y+33,__zero_reg__ + 1867 .LVL150: + 1868 0ae6 6624 clr r6 + 1869 0ae8 7724 clr r7 + 1870 .LVL151: + 1871 0aea 2224 clr r2 + 1872 0aec 3324 clr r3 + 1873 .LVL152: + 1874 .L131: + 1875 0aee C301 movw r24,r6 + 1876 0af0 0196 adiw r24,1 + 1877 .LVL153: + 1878 .LBE6: + 1879 .LBB7: + 1880 .LM183: + 1881 0af2 E9A1 ldd r30,Y+33 + 1882 0af4 FAA1 ldd r31,Y+34 + 1883 0af6 EF2B or r30,r31 + 1884 0af8 01F4 brne .L124 + 1885 .LM184: + 1886 0afa 3C01 movw r6,r24 + 1887 .LM185: + 1888 0afc 8430 cpi r24,4 + 1889 0afe 9105 cpc r25,__zero_reg__ + 1890 0b00 01F4 brne .L125 + 1891 0b02 21E0 ldi r18,lo8(1) + 1892 0b04 30E0 ldi r19,hi8(1) + 1893 0b06 3AA3 std Y+34,r19 + 1894 0b08 29A3 std Y+33,r18 + 1895 .LVL154: + 1896 0b0a 6624 clr r6 + 1897 0b0c 7724 clr r7 + 1898 .LVL155: + 1899 0b0e 00C0 rjmp .L125 + 1900 .LVL156: + 1901 .L124: + 1902 .LM186: + 1903 0b10 3C01 movw r6,r24 + 1904 .LVL157: + 1905 .L125: + 1906 .LM187: + 1907 0b12 C301 movw r24,r6 + 1908 0b14 B3E0 ldi r27,3 + 1909 0b16 880F 1: lsl r24 + 1910 0b18 991F rol r25 + 1911 0b1a BA95 dec r27 + 1912 0b1c 01F4 brne 1b + 1913 .LM188: + 1914 0b1e 4BAC ldd r4,Y+59 + 1915 0b20 5CAC ldd r5,Y+60 + 1916 0b22 481A sub r4,r24 + 1917 0b24 590A sbc r5,r25 + 1918 0b26 8824 clr r8 + 1919 0b28 9924 clr r9 + 1920 .LVL158: + 1921 0b2a 37E0 ldi r19,lo8(7) + 1922 0b2c 39A7 std Y+41,r19 + 1923 .LM189: + 1924 0b2e EFE1 ldi r30,lo8(31) + 1925 0b30 F0E0 ldi r31,hi8(31) + 1926 0b32 4E0E add r4,r30 + 1927 0b34 5F1E adc r5,r31 + 1928 0b36 21E0 ldi r18,lo8(1) + 1929 0b38 30E0 ldi r19,hi8(1) + 1930 0b3a 2C0F add r18,r28 + 1931 0b3c 3D1F adc r19,r29 + 1932 0b3e 280F add r18,r24 + 1933 0b40 391F adc r19,r25 + 1934 0b42 3CAB std Y+52,r19 + 1935 0b44 2BAB std Y+51,r18 + 1936 0b46 00C0 rjmp .L126 + 1937 .L129: + 1938 .LM190: + 1939 0b48 88A9 ldd r24,Y+48 + 1940 0b4a 69A5 ldd r22,Y+41 + 1941 0b4c 402F mov r20,r16 + 1942 0b4e 0E94 0000 call font_getbitmappixel + 1943 0b52 8823 tst r24 + 1944 0b54 01F0 breq .L127 + 1945 .LM191: + 1946 0b56 89A1 ldd r24,Y+33 + 1947 0b58 9AA1 ldd r25,Y+34 + 1948 0b5a 892B or r24,r25 + 1949 0b5c 01F4 brne .L128 + 1950 .LM192: + 1951 0b5e F601 movw r30,r12 + 1952 0b60 00C0 rjmp .L146 + 1953 .L128: + 1954 .LM193: + 1955 0b62 F501 movw r30,r10 + 1956 .L146: + 1957 0b64 8081 ld r24,Z + 1958 0b66 90E0 ldi r25,lo8(0) + 1959 0b68 B801 movw r22,r16 + 1960 0b6a A401 movw r20,r8 + 1961 0b6c 0E94 0000 call setvoxel + 1962 .L127: + 1963 0b70 0894 sec + 1964 0b72 E11C adc r14,__zero_reg__ + 1965 0b74 F11C adc r15,__zero_reg__ + 1966 0b76 0150 subi r16,lo8(-(-1)) + 1967 0b78 1040 sbci r17,hi8(-(-1)) + 1968 0b7a 0894 sec + 1969 0b7c A108 sbc r10,__zero_reg__ + 1970 0b7e B108 sbc r11,__zero_reg__ + 1971 0b80 0894 sec + 1972 0b82 C11C adc r12,__zero_reg__ + 1973 0b84 D11C adc r13,__zero_reg__ + 1974 .LM194: + 1975 0b86 F9E0 ldi r31,lo8(9) + 1976 0b88 EF16 cp r14,r31 + 1977 0b8a F104 cpc r15,__zero_reg__ + 1978 0b8c 01F4 brne .L129 + 1979 .LM195: + 1980 0b8e 0894 sec + 1981 0b90 811C adc r8,__zero_reg__ + 1982 0b92 911C adc r9,__zero_reg__ + 1983 0b94 29A5 ldd r18,Y+41 + 1984 0b96 2150 subi r18,lo8(-(-1)) + 1985 0b98 29A7 std Y+41,r18 + 1986 0b9a 2F3F cpi r18,lo8(-1) + 1987 0b9c 01F0 breq .L130 + 1988 .L126: + 1989 0b9e 5201 movw r10,r4 + 1990 0ba0 CBA8 ldd r12,Y+51 + 1991 0ba2 DCA8 ldd r13,Y+52 + 1992 0ba4 A1E0 ldi r26,lo8(1) + 1993 0ba6 EA2E mov r14,r26 + 1994 0ba8 F12C mov r15,__zero_reg__ + 1995 0baa 07E0 ldi r16,lo8(7) + 1996 0bac 10E0 ldi r17,hi8(7) + 1997 0bae 00C0 rjmp .L129 + 1998 .L130: + 1999 .LM196: + 2000 0bb0 89A9 ldd r24,Y+49 + 2001 0bb2 9AA9 ldd r25,Y+50 + 2002 0bb4 0E94 0000 call delay_ms + 2003 .LM197: + 2004 0bb8 80E0 ldi r24,lo8(0) + 2005 0bba 0E94 0000 call fill + 2006 .LM198: + 2007 0bbe 0894 sec + 2008 0bc0 211C adc r2,__zero_reg__ + 2009 0bc2 311C adc r3,__zero_reg__ + 2010 0bc4 37E0 ldi r19,lo8(7) + 2011 0bc6 2316 cp r2,r19 + 2012 0bc8 3104 cpc r3,__zero_reg__ + 2013 0bca 01F0 breq .+2 + 2014 0bcc 00C0 rjmp .L131 + 2015 .LBE7: + 2016 .LM199: + 2017 0bce 8CA5 ldd r24,Y+44 + 2018 0bd0 9DA5 ldd r25,Y+45 + 2019 0bd2 0196 adiw r24,1 + 2020 0bd4 9DA7 std Y+45,r25 + 2021 0bd6 8CA7 std Y+44,r24 + 2022 .LVL159: + 2023 .L99: + 2024 0bd8 ECA5 ldd r30,Y+44 + 2025 0bda FDA5 ldd r31,Y+45 + 2026 0bdc 2EA5 ldd r18,Y+46 + 2027 0bde 3FA5 ldd r19,Y+47 + 2028 0be0 E217 cp r30,r18 + 2029 0be2 F307 cpc r31,r19 + 2030 0be4 04F4 brge .+2 + 2031 0be6 00C0 rjmp .L132 + 2032 /* epilogue start */ + 2033 .LBE8: + 2034 .LM200: + 2035 0be8 EC96 adiw r28,60 + 2036 0bea 0FB6 in __tmp_reg__,__SREG__ + 2037 0bec F894 cli + 2038 0bee DEBF out __SP_H__,r29 + 2039 0bf0 0FBE out __SREG__,__tmp_reg__ + 2040 0bf2 CDBF out __SP_L__,r28 + 2041 0bf4 CF91 pop r28 + 2042 0bf6 DF91 pop r29 + 2043 0bf8 1F91 pop r17 + 2044 0bfa 0F91 pop r16 + 2045 0bfc FF90 pop r15 + 2046 0bfe EF90 pop r14 + 2047 0c00 DF90 pop r13 + 2048 0c02 CF90 pop r12 + 2049 0c04 BF90 pop r11 + 2050 0c06 AF90 pop r10 + 2051 0c08 9F90 pop r9 + 2052 0c0a 8F90 pop r8 + 2053 .LVL160: + 2054 0c0c 7F90 pop r7 + 2055 0c0e 6F90 pop r6 + 2056 .LVL161: + 2057 0c10 5F90 pop r5 + 2058 0c12 4F90 pop r4 + 2059 0c14 3F90 pop r3 + 2060 0c16 2F90 pop r2 + 2061 .LVL162: + 2062 0c18 0895 ret + 2063 .LFE27: + 2065 .global effect_random_sparkle_flash + 2067 effect_random_sparkle_flash: + 2068 .LFB22: + 2069 .LM201: + 2070 .LVL163: + 2071 0c1a 6F92 push r6 + 2072 0c1c 7F92 push r7 + 2073 0c1e 8F92 push r8 + 2074 0c20 9F92 push r9 + 2075 0c22 AF92 push r10 + 2076 0c24 BF92 push r11 + 2077 0c26 CF92 push r12 + 2078 0c28 DF92 push r13 + 2079 0c2a EF92 push r14 + 2080 0c2c FF92 push r15 + 2081 0c2e 0F93 push r16 + 2082 0c30 1F93 push r17 + 2083 0c32 CF93 push r28 + 2084 0c34 DF93 push r29 + 2085 /* prologue: function */ + 2086 /* frame size = 0 */ + 2087 0c36 3C01 movw r6,r24 + 2088 0c38 4B01 movw r8,r22 + 2089 0c3a 5A01 movw r10,r20 + 2090 .LM202: + 2091 0c3c CC24 clr r12 + 2092 0c3e DD24 clr r13 + 2093 .LVL164: + 2094 0c40 00C0 rjmp .L148 + 2095 .LVL165: + 2096 .L149: + 2097 .LM203: + 2098 0c42 0E94 0000 call rand + 2099 0c46 8C01 movw r16,r24 + 2100 0c48 0E94 0000 call rand + 2101 0c4c 7C01 movw r14,r24 + 2102 0c4e 0E94 0000 call rand + 2103 0c52 FC01 movw r30,r24 + 2104 0c54 C801 movw r24,r16 + 2105 0c56 68E0 ldi r22,lo8(8) + 2106 0c58 70E0 ldi r23,hi8(8) + 2107 0c5a 0E94 0000 call __divmodhi4 + 2108 0c5e 8C01 movw r16,r24 + 2109 0c60 C701 movw r24,r14 + 2110 0c62 68E0 ldi r22,lo8(8) + 2111 0c64 70E0 ldi r23,hi8(8) + 2112 0c66 0E94 0000 call __divmodhi4 + 2113 0c6a 9C01 movw r18,r24 + 2114 0c6c CF01 movw r24,r30 + 2115 0c6e 68E0 ldi r22,lo8(8) + 2116 0c70 70E0 ldi r23,hi8(8) + 2117 0c72 0E94 0000 call __divmodhi4 + 2118 0c76 AC01 movw r20,r24 + 2119 0c78 C801 movw r24,r16 + 2120 0c7a B901 movw r22,r18 + 2121 0c7c 0E94 0000 call setvoxel + 2122 .LM204: + 2123 0c80 2196 adiw r28,1 + 2124 .LVL166: + 2125 .L151: + 2126 0c82 8C16 cp r8,r28 + 2127 0c84 9D06 cpc r9,r29 + 2128 0c86 04F4 brge .L149 + 2129 .LM205: + 2130 0c88 C501 movw r24,r10 + 2131 0c8a 0E94 0000 call delay_ms + 2132 .LM206: + 2133 0c8e 80E0 ldi r24,lo8(0) + 2134 0c90 0E94 0000 call fill + 2135 .LM207: + 2136 0c94 0894 sec + 2137 0c96 C11C adc r12,__zero_reg__ + 2138 0c98 D11C adc r13,__zero_reg__ + 2139 .LVL167: + 2140 .L148: + 2141 0c9a C614 cp r12,r6 + 2142 0c9c D704 cpc r13,r7 + 2143 0c9e 04F4 brge .L152 + 2144 0ca0 C0E0 ldi r28,lo8(0) + 2145 0ca2 D0E0 ldi r29,hi8(0) + 2146 0ca4 00C0 rjmp .L151 + 2147 .L152: + 2148 /* epilogue start */ + 2149 .LM208: + 2150 0ca6 DF91 pop r29 + 2151 0ca8 CF91 pop r28 + 2152 .LVL168: + 2153 0caa 1F91 pop r17 + 2154 0cac 0F91 pop r16 + 2155 0cae FF90 pop r15 + 2156 0cb0 EF90 pop r14 + 2157 0cb2 DF90 pop r13 + 2158 0cb4 CF90 pop r12 + 2159 .LVL169: + 2160 0cb6 BF90 pop r11 + 2161 0cb8 AF90 pop r10 + 2162 .LVL170: + 2163 0cba 9F90 pop r9 + 2164 0cbc 8F90 pop r8 + 2165 .LVL171: + 2166 0cbe 7F90 pop r7 + 2167 0cc0 6F90 pop r6 + 2168 .LVL172: + 2169 0cc2 0895 ret + 2170 .LFE22: + 2172 .global effect_random_sparkle + 2174 effect_random_sparkle: + 2175 .LFB23: + 2176 .LM209: + 2177 0cc4 CF93 push r28 + 2178 0cc6 DF93 push r29 + 2179 /* prologue: function */ + 2180 /* frame size = 0 */ + 2181 .LM210: + 2182 0cc8 C1E0 ldi r28,lo8(1) + 2183 0cca D0E0 ldi r29,hi8(1) + 2184 .LVL173: + 2185 .L154: + 2186 .LM211: + 2187 0ccc 85E0 ldi r24,lo8(5) + 2188 0cce 90E0 ldi r25,hi8(5) + 2189 0cd0 BE01 movw r22,r28 + 2190 0cd2 48EC ldi r20,lo8(200) + 2191 0cd4 50E0 ldi r21,hi8(200) + 2192 0cd6 0E94 0000 call effect_random_sparkle_flash + 2193 .LM212: + 2194 0cda 2196 adiw r28,1 + 2195 0cdc C431 cpi r28,20 + 2196 0cde D105 cpc r29,__zero_reg__ + 2197 0ce0 01F4 brne .L154 + 2198 .L157: + 2199 .LM213: + 2200 0ce2 85E0 ldi r24,lo8(5) + 2201 0ce4 90E0 ldi r25,hi8(5) + 2202 0ce6 BE01 movw r22,r28 + 2203 0ce8 48EC ldi r20,lo8(200) + 2204 0cea 50E0 ldi r21,hi8(200) + 2205 0cec 0E94 0000 call effect_random_sparkle_flash + 2206 .LM214: + 2207 0cf0 2197 sbiw r28,1 + 2208 0cf2 01F4 brne .L157 + 2209 /* epilogue start */ + 2210 .LM215: + 2211 0cf4 DF91 pop r29 + 2212 0cf6 CF91 pop r28 + 2213 .LVL174: + 2214 0cf8 0895 ret + 2215 .LFE23: + 2217 .global effect_loadbar + 2219 effect_loadbar: + 2220 .LFB21: + 2221 .LM216: + 2222 .LVL175: + 2223 0cfa DF92 push r13 + 2224 0cfc EF92 push r14 + 2225 0cfe FF92 push r15 + 2226 0d00 0F93 push r16 + 2227 0d02 1F93 push r17 + 2228 0d04 CF93 push r28 + 2229 0d06 DF93 push r29 + 2230 /* prologue: function */ + 2231 /* frame size = 0 */ + 2232 0d08 8C01 movw r16,r24 + 2233 .LM217: + 2234 0d0a 80E0 ldi r24,lo8(0) + 2235 .LVL176: + 2236 0d0c 0E94 0000 call fill + 2237 0d10 C0E0 ldi r28,lo8(0) + 2238 0d12 D0E0 ldi r29,hi8(0) + 2239 .LVL177: + 2240 .LM218: + 2241 0d14 DD24 clr r13 + 2242 0d16 DA94 dec r13 + 2243 .LM219: + 2244 0d18 7801 movw r14,r16 + 2245 .LVL178: + 2246 0d1a 00C0 rjmp .L161 + 2247 .LVL179: + 2248 .L162: + 2249 .LM220: + 2250 0d1c F901 movw r30,r18 + 2251 0d1e E80F add r30,r24 + 2252 0d20 F91F adc r31,r25 + 2253 0d22 E050 subi r30,lo8(-(cube)) + 2254 0d24 F040 sbci r31,hi8(-(cube)) + 2255 0d26 D082 st Z,r13 + 2256 .LM221: + 2257 0d28 0196 adiw r24,1 + 2258 0d2a 8830 cpi r24,8 + 2259 0d2c 9105 cpc r25,__zero_reg__ + 2260 0d2e 01F4 brne .L162 + 2261 .LM222: + 2262 0d30 C701 movw r24,r14 + 2263 .LVL180: + 2264 0d32 0E94 0000 call delay_ms + 2265 .LM223: + 2266 0d36 2196 adiw r28,1 + 2267 0d38 C830 cpi r28,8 + 2268 0d3a D105 cpc r29,__zero_reg__ + 2269 0d3c 01F0 breq .L163 + 2270 .L161: + 2271 0d3e 80E0 ldi r24,lo8(0) + 2272 0d40 90E0 ldi r25,hi8(0) + 2273 .LVL181: + 2274 .LM224: + 2275 0d42 9E01 movw r18,r28 + 2276 0d44 A3E0 ldi r26,3 + 2277 0d46 220F 1: lsl r18 + 2278 0d48 331F rol r19 + 2279 0d4a AA95 dec r26 + 2280 0d4c 01F4 brne 1b + 2281 0d4e 00C0 rjmp .L162 + 2282 .LVL182: + 2283 .L163: + 2284 .LM225: + 2285 0d50 C801 movw r24,r16 + 2286 .LVL183: + 2287 0d52 880F lsl r24 + 2288 0d54 991F rol r25 + 2289 0d56 800F add r24,r16 + 2290 0d58 911F adc r25,r17 + 2291 0d5a 0E94 0000 call delay_ms + 2292 0d5e C0E0 ldi r28,lo8(0) + 2293 0d60 D0E0 ldi r29,hi8(0) + 2294 .LVL184: + 2295 0d62 00C0 rjmp .L164 + 2296 .LVL185: + 2297 .L165: + 2298 .LM226: + 2299 0d64 F901 movw r30,r18 + 2300 0d66 E80F add r30,r24 + 2301 0d68 F91F adc r31,r25 + 2302 0d6a E050 subi r30,lo8(-(cube)) + 2303 0d6c F040 sbci r31,hi8(-(cube)) + 2304 0d6e 1082 st Z,__zero_reg__ + 2305 .LM227: + 2306 0d70 0196 adiw r24,1 + 2307 0d72 8830 cpi r24,8 + 2308 0d74 9105 cpc r25,__zero_reg__ + 2309 0d76 01F4 brne .L165 + 2310 .LM228: + 2311 0d78 C701 movw r24,r14 + 2312 .LVL186: + 2313 0d7a 0E94 0000 call delay_ms + 2314 .LM229: + 2315 0d7e 2196 adiw r28,1 + 2316 0d80 C830 cpi r28,8 + 2317 0d82 D105 cpc r29,__zero_reg__ + 2318 0d84 01F0 breq .L167 + 2319 .L164: + 2320 0d86 80E0 ldi r24,lo8(0) + 2321 0d88 90E0 ldi r25,hi8(0) + 2322 .LVL187: + 2323 .LM230: + 2324 0d8a 9E01 movw r18,r28 + 2325 0d8c E3E0 ldi r30,3 + 2326 0d8e 220F 1: lsl r18 + 2327 0d90 331F rol r19 + 2328 0d92 EA95 dec r30 + 2329 0d94 01F4 brne 1b + 2330 0d96 00C0 rjmp .L165 + 2331 .LVL188: + 2332 .L167: + 2333 /* epilogue start */ + 2334 .LM231: + 2335 0d98 DF91 pop r29 + 2336 0d9a CF91 pop r28 + 2337 .LVL189: + 2338 0d9c 1F91 pop r17 + 2339 0d9e 0F91 pop r16 + 2340 .LVL190: + 2341 0da0 FF90 pop r15 + 2342 0da2 EF90 pop r14 + 2343 0da4 DF90 pop r13 + 2344 0da6 0895 ret + 2345 .LFE21: + 2347 .global draw_positions_axis + 2349 draw_positions_axis: + 2350 .LFB19: + 2351 .LM232: + 2352 .LVL191: + 2353 0da8 4F92 push r4 + 2354 0daa 5F92 push r5 + 2355 0dac 6F92 push r6 + 2356 0dae 7F92 push r7 + 2357 0db0 9F92 push r9 + 2358 0db2 AF92 push r10 + 2359 0db4 BF92 push r11 + 2360 0db6 CF92 push r12 + 2361 0db8 DF92 push r13 + 2362 0dba EF92 push r14 + 2363 0dbc FF92 push r15 + 2364 0dbe 0F93 push r16 + 2365 0dc0 1F93 push r17 + 2366 0dc2 CF93 push r28 + 2367 0dc4 DF93 push r29 + 2368 /* prologue: function */ + 2369 /* frame size = 0 */ + 2370 0dc6 982E mov r9,r24 + 2371 0dc8 162F mov r17,r22 + 2372 0dca 072F mov r16,r23 + 2373 .LVL192: + 2374 0dcc 3A01 movw r6,r20 + 2375 .LM233: + 2376 0dce 80E0 ldi r24,lo8(0) + 2377 .LVL193: + 2378 0dd0 0E94 0000 call fill + 2379 .LVL194: + 2380 0dd4 212F mov r18,r17 + 2381 0dd6 302F mov r19,r16 + 2382 0dd8 C901 movw r24,r18 + 2383 0dda 6C01 movw r12,r24 + 2384 0ddc C0E0 ldi r28,lo8(0) + 2385 0dde D0E0 ldi r29,hi8(0) + 2386 .LVL195: + 2387 .LM234: + 2388 0de0 B7E0 ldi r27,lo8(7) + 2389 0de2 4B2E mov r4,r27 + 2390 0de4 512C mov r5,__zero_reg__ + 2391 0de6 00C0 rjmp .L171 + 2392 .LVL196: + 2393 .L177: + 2394 .LM235: + 2395 0de8 6114 cp r6,__zero_reg__ + 2396 0dea 7104 cpc r7,__zero_reg__ + 2397 0dec 01F0 breq .L172 + 2398 .LM236: + 2399 0dee F501 movw r30,r10 + 2400 0df0 8081 ld r24,Z + 2401 0df2 A201 movw r20,r4 + 2402 .LVL197: + 2403 0df4 481B sub r20,r24 + 2404 0df6 5109 sbc r21,__zero_reg__ + 2405 0df8 00C0 rjmp .L173 + 2406 .L172: + 2407 .LM237: + 2408 0dfa F701 movw r30,r14 + 2409 0dfc 8081 ld r24,Z + 2410 0dfe 482F mov r20,r24 + 2411 0e00 50E0 ldi r21,lo8(0) + 2412 .L173: + 2413 .LM238: + 2414 0e02 FAE7 ldi r31,lo8(122) + 2415 0e04 9F16 cp r9,r31 + 2416 0e06 01F4 brne .L174 + 2417 .LM239: + 2418 0e08 CE01 movw r24,r28 + 2419 0e0a B801 movw r22,r16 + 2420 0e0c 00C0 rjmp .L181 + 2421 .L174: + 2422 .LM240: + 2423 0e0e 89E7 ldi r24,lo8(121) + 2424 0e10 9816 cp r9,r24 + 2425 0e12 01F4 brne .L176 + 2426 .LM241: + 2427 0e14 CE01 movw r24,r28 + 2428 0e16 BA01 movw r22,r20 + 2429 0e18 A801 movw r20,r16 + 2430 .LVL198: + 2431 0e1a 00C0 rjmp .L181 + 2432 .LVL199: + 2433 .L176: + 2434 .LM242: + 2435 0e1c 98E7 ldi r25,lo8(120) + 2436 0e1e 9916 cp r9,r25 + 2437 0e20 01F4 brne .L175 + 2438 .LM243: + 2439 0e22 CA01 movw r24,r20 + 2440 0e24 B801 movw r22,r16 + 2441 0e26 AE01 movw r20,r28 + 2442 .LVL200: + 2443 .L181: + 2444 0e28 0E94 0000 call setvoxel + 2445 .LVL201: + 2446 .L175: + 2447 .LM244: + 2448 0e2c 0F5F subi r16,lo8(-(1)) + 2449 0e2e 1F4F sbci r17,hi8(-(1)) + 2450 0e30 0894 sec + 2451 0e32 A11C adc r10,__zero_reg__ + 2452 0e34 B11C adc r11,__zero_reg__ + 2453 0e36 0894 sec + 2454 0e38 E11C adc r14,__zero_reg__ + 2455 0e3a F11C adc r15,__zero_reg__ + 2456 0e3c 0830 cpi r16,8 + 2457 0e3e 1105 cpc r17,__zero_reg__ + 2458 0e40 01F4 brne .L177 + 2459 .LM245: + 2460 0e42 2196 adiw r28,1 + 2461 0e44 E8E0 ldi r30,lo8(8) + 2462 0e46 F0E0 ldi r31,hi8(8) + 2463 0e48 CE0E add r12,r30 + 2464 0e4a DF1E adc r13,r31 + 2465 0e4c C830 cpi r28,8 + 2466 0e4e D105 cpc r29,__zero_reg__ + 2467 0e50 01F0 breq .L179 + 2468 .LVL202: + 2469 .L171: + 2470 0e52 5601 movw r10,r12 + 2471 0e54 7601 movw r14,r12 + 2472 0e56 00E0 ldi r16,lo8(0) + 2473 0e58 10E0 ldi r17,hi8(0) + 2474 .LVL203: + 2475 0e5a 00C0 rjmp .L177 + 2476 .L179: + 2477 /* epilogue start */ + 2478 .LM246: + 2479 0e5c DF91 pop r29 + 2480 0e5e CF91 pop r28 + 2481 .LVL204: + 2482 0e60 1F91 pop r17 + 2483 .LVL205: + 2484 0e62 0F91 pop r16 + 2485 .LVL206: + 2486 0e64 FF90 pop r15 + 2487 0e66 EF90 pop r14 + 2488 0e68 DF90 pop r13 + 2489 0e6a CF90 pop r12 + 2490 0e6c BF90 pop r11 + 2491 0e6e AF90 pop r10 + 2492 0e70 9F90 pop r9 + 2493 .LVL207: + 2494 0e72 7F90 pop r7 + 2495 0e74 6F90 pop r6 + 2496 .LVL208: + 2497 0e76 5F90 pop r5 + 2498 0e78 4F90 pop r4 + 2499 0e7a 0895 ret + 2500 .LFE19: + 2502 .global effect_boxside_randsend_parallel + 2504 effect_boxside_randsend_parallel: + 2505 .LFB20: + 2506 .LM247: + 2507 .LVL209: + 2508 0e7c 2F92 push r2 + 2509 0e7e 3F92 push r3 + 2510 0e80 4F92 push r4 + 2511 0e82 5F92 push r5 + 2512 0e84 6F92 push r6 + 2513 0e86 7F92 push r7 + 2514 0e88 8F92 push r8 + 2515 0e8a 9F92 push r9 + 2516 0e8c AF92 push r10 + 2517 0e8e BF92 push r11 + 2518 0e90 CF92 push r12 + 2519 0e92 DF92 push r13 + 2520 0e94 EF92 push r14 + 2521 0e96 FF92 push r15 + 2522 0e98 0F93 push r16 + 2523 0e9a 1F93 push r17 + 2524 0e9c DF93 push r29 + 2525 0e9e CF93 push r28 + 2526 0ea0 CDB7 in r28,__SP_L__ + 2527 0ea2 DEB7 in r29,__SP_H__ + 2528 0ea4 C158 subi r28,lo8(-(-129)) + 2529 0ea6 D040 sbci r29,hi8(-(-129)) + 2530 0ea8 0FB6 in __tmp_reg__,__SREG__ + 2531 0eaa F894 cli + 2532 0eac DEBF out __SP_H__,r29 + 2533 0eae 0FBE out __SREG__,__tmp_reg__ + 2534 0eb0 CDBF out __SP_L__,r28 + 2535 /* prologue: function */ + 2536 /* frame size = 129 */ + 2537 0eb2 CF57 subi r28,lo8(-129) + 2538 0eb4 DF4F sbci r29,hi8(-129) + 2539 0eb6 8883 st Y,r24 + 2540 0eb8 C158 subi r28,lo8(129) + 2541 0eba D040 sbci r29,hi8(129) + 2542 0ebc 2B01 movw r4,r22 + 2543 0ebe 3A01 movw r6,r20 + 2544 0ec0 4901 movw r8,r18 + 2545 .LM248: + 2546 0ec2 01E4 ldi r16,lo8(65) + 2547 0ec4 A02E mov r10,r16 + 2548 0ec6 B12C mov r11,__zero_reg__ + 2549 0ec8 AC0E add r10,r28 + 2550 0eca BD1E adc r11,r29 + 2551 0ecc F501 movw r30,r10 + 2552 0ece 11E8 ldi r17,lo8(129) + 2553 0ed0 C12E mov r12,r17 + 2554 0ed2 D12C mov r13,__zero_reg__ + 2555 0ed4 CC0E add r12,r28 + 2556 0ed6 DD1E adc r13,r29 + 2557 .LVL210: + 2558 .L183: + 2559 .LM249: + 2560 0ed8 1192 st Z+,__zero_reg__ + 2561 .LM250: + 2562 0eda EC15 cp r30,r12 + 2563 0edc FD05 cpc r31,r13 + 2564 0ede 01F4 brne .L183 + 2565 0ee0 00E0 ldi r16,lo8(0) + 2566 0ee2 10E0 ldi r17,hi8(0) + 2567 .LVL211: + 2568 .LM251: + 2569 0ee4 1E01 movw r2,r28 + 2570 0ee6 0894 sec + 2571 0ee8 211C adc r2,__zero_reg__ + 2572 0eea 311C adc r3,__zero_reg__ + 2573 .LVL212: + 2574 .L194: + 2575 .LM252: + 2576 0eec 81E0 ldi r24,lo8(1) + 2577 0eee 8816 cp r8,r24 + 2578 0ef0 9104 cpc r9,__zero_reg__ + 2579 0ef2 01F4 brne .L202 + 2580 0ef4 00C0 rjmp .L204 + 2581 .L196: + 2582 .LM253: + 2583 0ef6 0E94 0000 call rand + 2584 0efa 60E4 ldi r22,lo8(64) + 2585 0efc 70E0 ldi r23,hi8(64) + 2586 0efe 0E94 0000 call __divmodhi4 + 2587 .LM254: + 2588 0f02 E1E4 ldi r30,lo8(65) + 2589 0f04 F0E0 ldi r31,hi8(65) + 2590 0f06 EC0F add r30,r28 + 2591 0f08 FD1F adc r31,r29 + 2592 0f0a E80F add r30,r24 + 2593 0f0c F91F adc r31,r25 + 2594 .LVL213: + 2595 0f0e 8081 ld r24,Z + 2596 .LVL214: + 2597 0f10 8823 tst r24 + 2598 0f12 01F4 brne .L196 + 2599 .LM255: + 2600 0f14 0F5F subi r16,lo8(-(1)) + 2601 0f16 1F4F sbci r17,hi8(-(1)) + 2602 .LM256: + 2603 0f18 91E0 ldi r25,lo8(1) + 2604 0f1a 9083 st Z,r25 + 2605 0f1c 00C0 rjmp .L187 + 2606 .LVL215: + 2607 .L204: + 2608 .LM257: + 2609 0f1e 0034 cpi r16,64 + 2610 0f20 1105 cpc r17,__zero_reg__ + 2611 0f22 04F0 brlt .L196 + 2612 0f24 00C0 rjmp .L187 + 2613 .L202: + 2614 .LM258: + 2615 0f26 82E0 ldi r24,lo8(2) + 2616 0f28 8816 cp r8,r24 + 2617 0f2a 9104 cpc r9,__zero_reg__ + 2618 0f2c 01F4 brne .L187 + 2619 .LM259: + 2620 0f2e 0034 cpi r16,64 + 2621 0f30 1105 cpc r17,__zero_reg__ + 2622 0f32 04F4 brge .L187 + 2623 .LM260: + 2624 0f34 E1E4 ldi r30,lo8(65) + 2625 0f36 F0E0 ldi r31,hi8(65) + 2626 0f38 EC0F add r30,r28 + 2627 0f3a FD1F adc r31,r29 + 2628 0f3c E00F add r30,r16 + 2629 0f3e F11F adc r31,r17 + 2630 0f40 8081 ld r24,Z + 2631 0f42 8F5F subi r24,lo8(-(1)) + 2632 0f44 8083 st Z,r24 + 2633 .LM261: + 2634 0f46 0F5F subi r16,lo8(-(1)) + 2635 0f48 1F4F sbci r17,hi8(-(1)) + 2636 .L187: + 2637 0f4a F501 movw r30,r10 + 2638 0f4c EE24 clr r14 + 2639 0f4e FF24 clr r15 + 2640 .L190: + 2641 .LM262: + 2642 0f50 9081 ld r25,Z + 2643 0f52 892F mov r24,r25 + 2644 0f54 8150 subi r24,lo8(-(-1)) + 2645 0f56 8630 cpi r24,lo8(6) + 2646 0f58 00F4 brsh .L188 + 2647 .LM263: + 2648 0f5a 9F5F subi r25,lo8(-(1)) + 2649 0f5c 9083 st Z,r25 + 2650 .L188: + 2651 .LM264: + 2652 0f5e 8081 ld r24,Z + 2653 0f60 8730 cpi r24,lo8(7) + 2654 0f62 01F4 brne .L189 + 2655 .LM265: + 2656 0f64 0894 sec + 2657 0f66 E11C adc r14,__zero_reg__ + 2658 0f68 F11C adc r15,__zero_reg__ + 2659 .L189: + 2660 0f6a 3196 adiw r30,1 + 2661 .LM266: + 2662 0f6c EC15 cp r30,r12 + 2663 0f6e FD05 cpc r31,r13 + 2664 0f70 01F4 brne .L190 + 2665 0f72 D101 movw r26,r2 + 2666 0f74 F501 movw r30,r10 + 2667 .L193: + 2668 0f76 8081 ld r24,Z + 2669 .LM267: + 2670 0f78 4114 cp r4,__zero_reg__ + 2671 0f7a 5104 cpc r5,__zero_reg__ + 2672 0f7c 01F0 breq .L203 + 2673 .L191: + 2674 .LM268: + 2675 0f7e 97E0 ldi r25,lo8(7) + 2676 0f80 981B sub r25,r24 + 2677 0f82 892F mov r24,r25 + 2678 .L203: + 2679 0f84 8C93 st X,r24 + 2680 0f86 3196 adiw r30,1 + 2681 0f88 1196 adiw r26,1 + 2682 .LM269: + 2683 0f8a EC15 cp r30,r12 + 2684 0f8c FD05 cpc r31,r13 + 2685 0f8e 01F4 brne .L193 + 2686 .LM270: + 2687 0f90 C301 movw r24,r6 + 2688 0f92 0E94 0000 call delay_ms + 2689 .LM271: + 2690 0f96 CF57 subi r28,lo8(-129) + 2691 0f98 DF4F sbci r29,hi8(-129) + 2692 0f9a 8881 ld r24,Y + 2693 0f9c C158 subi r28,lo8(129) + 2694 0f9e D040 sbci r29,hi8(129) + 2695 0fa0 B101 movw r22,r2 + 2696 0fa2 40E0 ldi r20,lo8(0) + 2697 0fa4 50E0 ldi r21,hi8(0) + 2698 0fa6 0E94 0000 call draw_positions_axis + 2699 .LM272: + 2700 0faa 82B3 in r24,50-32 + 2701 0fac 94E0 ldi r25,lo8(4) + 2702 0fae 8927 eor r24,r25 + 2703 0fb0 82BB out 50-32,r24 + 2704 .LM273: + 2705 0fb2 80E4 ldi r24,lo8(64) + 2706 0fb4 E816 cp r14,r24 + 2707 0fb6 F104 cpc r15,__zero_reg__ + 2708 0fb8 01F0 breq .+2 + 2709 0fba 00C0 rjmp .L194 + 2710 /* epilogue start */ + 2711 .LM274: + 2712 0fbc CF57 subi r28,lo8(-(129)) + 2713 0fbe DF4F sbci r29,hi8(-(129)) + 2714 0fc0 0FB6 in __tmp_reg__,__SREG__ + 2715 0fc2 F894 cli + 2716 0fc4 DEBF out __SP_H__,r29 + 2717 0fc6 0FBE out __SREG__,__tmp_reg__ + 2718 0fc8 CDBF out __SP_L__,r28 + 2719 0fca CF91 pop r28 + 2720 0fcc DF91 pop r29 + 2721 0fce 1F91 pop r17 + 2722 0fd0 0F91 pop r16 + 2723 .LVL216: + 2724 0fd2 FF90 pop r15 + 2725 0fd4 EF90 pop r14 + 2726 .LVL217: + 2727 0fd6 DF90 pop r13 + 2728 0fd8 CF90 pop r12 + 2729 0fda BF90 pop r11 + 2730 0fdc AF90 pop r10 + 2731 0fde 9F90 pop r9 + 2732 0fe0 8F90 pop r8 + 2733 .LVL218: + 2734 0fe2 7F90 pop r7 + 2735 0fe4 6F90 pop r6 + 2736 .LVL219: + 2737 0fe6 5F90 pop r5 + 2738 0fe8 4F90 pop r4 + 2739 .LVL220: + 2740 0fea 3F90 pop r3 + 2741 0fec 2F90 pop r2 + 2742 0fee 0895 ret + 2743 .LFE20: + 2745 .global effect_axis_updown_randsuspend + 2747 effect_axis_updown_randsuspend: + 2748 .LFB18: + 2749 .LM275: + 2750 .LVL221: + 2751 0ff0 3F92 push r3 + 2752 0ff2 4F92 push r4 + 2753 0ff4 5F92 push r5 + 2754 0ff6 6F92 push r6 + 2755 0ff8 7F92 push r7 + 2756 0ffa 8F92 push r8 + 2757 0ffc 9F92 push r9 + 2758 0ffe AF92 push r10 + 2759 1000 BF92 push r11 + 2760 1002 CF92 push r12 + 2761 1004 DF92 push r13 + 2762 1006 EF92 push r14 + 2763 1008 FF92 push r15 + 2764 100a 0F93 push r16 + 2765 100c 1F93 push r17 + 2766 100e DF93 push r29 + 2767 1010 CF93 push r28 + 2768 1012 CDB7 in r28,__SP_L__ + 2769 1014 DEB7 in r29,__SP_H__ + 2770 1016 C058 subi r28,lo8(-(-128)) + 2771 1018 D040 sbci r29,hi8(-(-128)) + 2772 101a 0FB6 in __tmp_reg__,__SREG__ + 2773 101c F894 cli + 2774 101e DEBF out __SP_H__,r29 + 2775 1020 0FBE out __SREG__,__tmp_reg__ + 2776 1022 CDBF out __SP_L__,r28 + 2777 /* prologue: function */ + 2778 /* frame size = 128 */ + 2779 1024 382E mov r3,r24 + 2780 1026 2B01 movw r4,r22 + 2781 .LVL222: + 2782 1028 4A01 movw r8,r20 + 2783 102a 3901 movw r6,r18 + 2784 .LM276: + 2785 102c 00E0 ldi r16,lo8(0) + 2786 102e 10E0 ldi r17,hi8(0) + 2787 .LVL223: + 2788 .LM277: + 2789 1030 6E01 movw r12,r28 + 2790 1032 0894 sec + 2791 1034 C11C adc r12,__zero_reg__ + 2792 1036 D11C adc r13,__zero_reg__ + 2793 .LM278: + 2794 1038 91E4 ldi r25,lo8(65) + 2795 103a E92E mov r14,r25 + 2796 103c F12C mov r15,__zero_reg__ + 2797 103e EC0E add r14,r28 + 2798 1040 FD1E adc r15,r29 + 2799 .LVL224: + 2800 .L206: + 2801 .LM279: + 2802 1042 F601 movw r30,r12 + 2803 1044 E00F add r30,r16 + 2804 1046 F11F adc r31,r17 + 2805 1048 1082 st Z,__zero_reg__ + 2806 .LM280: + 2807 104a 0E94 0000 call rand + 2808 104e F701 movw r30,r14 + 2809 1050 E00F add r30,r16 + 2810 1052 F11F adc r31,r17 + 2811 1054 68E0 ldi r22,lo8(8) + 2812 1056 70E0 ldi r23,hi8(8) + 2813 1058 0E94 0000 call __divmodhi4 + 2814 105c 8083 st Z,r24 + 2815 .LM281: + 2816 105e 0F5F subi r16,lo8(-(1)) + 2817 1060 1F4F sbci r17,hi8(-(1)) + 2818 1062 0034 cpi r16,64 + 2819 1064 1105 cpc r17,__zero_reg__ + 2820 1066 01F4 brne .L206 + 2821 1068 EE24 clr r14 + 2822 106a FF24 clr r15 + 2823 .LVL225: + 2824 .LM282: + 2825 106c 5E01 movw r10,r28 + 2826 106e 0894 sec + 2827 1070 A11C adc r10,__zero_reg__ + 2828 1072 B11C adc r11,__zero_reg__ + 2829 1074 81E4 ldi r24,lo8(65) + 2830 1076 C82E mov r12,r24 + 2831 1078 D12C mov r13,__zero_reg__ + 2832 107a CC0E add r12,r28 + 2833 107c DD1E adc r13,r29 + 2834 107e 00C0 rjmp .L207 + 2835 .L210: + 2836 .LM283: + 2837 1080 D801 movw r26,r16 + 2838 1082 8C91 ld r24,X + 2839 1084 9081 ld r25,Z + 2840 1086 8917 cp r24,r25 + 2841 1088 00F4 brsh .L208 + 2842 .LM284: + 2843 108a 8F5F subi r24,lo8(-(1)) + 2844 108c 8C93 st X,r24 + 2845 .L208: + 2846 .LM285: + 2847 108e D801 movw r26,r16 + 2848 1090 8C91 ld r24,X + 2849 1092 9817 cp r25,r24 + 2850 1094 00F4 brsh .L209 + 2851 .LM286: + 2852 1096 8150 subi r24,lo8(-(-1)) + 2853 1098 8C93 st X,r24 + 2854 .L209: + 2855 109a 0F5F subi r16,lo8(-(1)) + 2856 109c 1F4F sbci r17,hi8(-(1)) + 2857 109e 3196 adiw r30,1 + 2858 .LM287: + 2859 10a0 0C15 cp r16,r12 + 2860 10a2 1D05 cpc r17,r13 + 2861 10a4 01F4 brne .L210 + 2862 .LM288: + 2863 10a6 832D mov r24,r3 + 2864 10a8 B501 movw r22,r10 + 2865 10aa A301 movw r20,r6 + 2866 10ac 0E94 0000 call draw_positions_axis + 2867 .LM289: + 2868 10b0 C201 movw r24,r4 + 2869 10b2 0E94 0000 call delay_ms + 2870 .LM290: + 2871 10b6 0894 sec + 2872 10b8 E11C adc r14,__zero_reg__ + 2873 10ba F11C adc r15,__zero_reg__ + 2874 10bc B8E0 ldi r27,lo8(8) + 2875 10be EB16 cp r14,r27 + 2876 10c0 F104 cpc r15,__zero_reg__ + 2877 10c2 01F0 breq .L211 + 2878 .L207: + 2879 10c4 8501 movw r16,r10 + 2880 10c6 F601 movw r30,r12 + 2881 10c8 00C0 rjmp .L210 + 2882 .L211: + 2883 10ca F801 movw r30,r16 + 2884 .LM291: + 2885 10cc 27E0 ldi r18,lo8(7) + 2886 .LM292: + 2887 10ce CE01 movw r24,r28 + 2888 10d0 8F57 subi r24,lo8(-(129)) + 2889 10d2 9F4F sbci r25,hi8(-(129)) + 2890 .L212: + 2891 .LM293: + 2892 10d4 2193 st Z+,r18 + 2893 .LM294: + 2894 10d6 E817 cp r30,r24 + 2895 10d8 F907 cpc r31,r25 + 2896 10da 01F4 brne .L212 + 2897 .LM295: + 2898 10dc C401 movw r24,r8 + 2899 10de 0E94 0000 call delay_ms + 2900 10e2 EE24 clr r14 + 2901 10e4 FF24 clr r15 + 2902 .LVL226: + 2903 .LM296: + 2904 10e6 4E01 movw r8,r28 + 2905 .LVL227: + 2906 10e8 0894 sec + 2907 10ea 811C adc r8,__zero_reg__ + 2908 10ec 911C adc r9,__zero_reg__ + 2909 10ee 00C0 rjmp .L213 + 2910 .L216: + 2911 .LM297: + 2912 10f0 8081 ld r24,Z + 2913 10f2 9C91 ld r25,X + 2914 10f4 8917 cp r24,r25 + 2915 10f6 00F4 brsh .L214 + 2916 .LM298: + 2917 10f8 8F5F subi r24,lo8(-(1)) + 2918 10fa 8083 st Z,r24 + 2919 .L214: + 2920 .LM299: + 2921 10fc 8081 ld r24,Z + 2922 10fe 9817 cp r25,r24 + 2923 1100 00F4 brsh .L215 + 2924 .LM300: + 2925 1102 8150 subi r24,lo8(-(-1)) + 2926 1104 8083 st Z,r24 + 2927 .L215: + 2928 1106 3196 adiw r30,1 + 2929 1108 1196 adiw r26,1 + 2930 .LM301: + 2931 110a E017 cp r30,r16 + 2932 110c F107 cpc r31,r17 + 2933 110e 01F4 brne .L216 + 2934 .LM302: + 2935 1110 832D mov r24,r3 + 2936 1112 B401 movw r22,r8 + 2937 1114 A301 movw r20,r6 + 2938 1116 0E94 0000 call draw_positions_axis + 2939 .LM303: + 2940 111a C201 movw r24,r4 + 2941 111c 0E94 0000 call delay_ms + 2942 .LM304: + 2943 1120 0894 sec + 2944 1122 E11C adc r14,__zero_reg__ + 2945 1124 F11C adc r15,__zero_reg__ + 2946 1126 88E0 ldi r24,lo8(8) + 2947 1128 E816 cp r14,r24 + 2948 112a F104 cpc r15,__zero_reg__ + 2949 112c 01F0 breq .L218 + 2950 .L213: + 2951 112e F501 movw r30,r10 + 2952 1130 D601 movw r26,r12 + 2953 1132 00C0 rjmp .L216 + 2954 .L218: + 2955 /* epilogue start */ + 2956 .LM305: + 2957 1134 C058 subi r28,lo8(-(128)) + 2958 1136 DF4F sbci r29,hi8(-(128)) + 2959 1138 0FB6 in __tmp_reg__,__SREG__ + 2960 113a F894 cli + 2961 113c DEBF out __SP_H__,r29 + 2962 113e 0FBE out __SREG__,__tmp_reg__ + 2963 1140 CDBF out __SP_L__,r28 + 2964 1142 CF91 pop r28 + 2965 1144 DF91 pop r29 + 2966 1146 1F91 pop r17 + 2967 1148 0F91 pop r16 + 2968 114a FF90 pop r15 + 2969 114c EF90 pop r14 + 2970 .LVL228: + 2971 114e DF90 pop r13 + 2972 1150 CF90 pop r12 + 2973 1152 BF90 pop r11 + 2974 1154 AF90 pop r10 + 2975 1156 9F90 pop r9 + 2976 1158 8F90 pop r8 + 2977 115a 7F90 pop r7 + 2978 115c 6F90 pop r6 + 2979 .LVL229: + 2980 115e 5F90 pop r5 + 2981 1160 4F90 pop r4 + 2982 1162 3F90 pop r3 + 2983 .LVL230: + 2984 1164 0895 ret + 2985 .LFE18: + 2987 .global effect_z_updown_move + 2989 effect_z_updown_move: + 2990 .LFB17: + 2991 .LM306: + 2992 .LVL231: + 2993 /* prologue: function */ + 2994 /* frame size = 0 */ + 2995 1166 AC01 movw r20,r24 + 2996 .LVL232: + 2997 .LM307: + 2998 1168 DC01 movw r26,r24 + 2999 116a FB01 movw r30,r22 + 3000 .LVL233: + 3001 116c 20E0 ldi r18,lo8(0) + 3002 116e 30E0 ldi r19,hi8(0) + 3003 .LVL234: + 3004 .L226: + 3005 .LM308: + 3006 1170 9C91 ld r25,X + 3007 1172 8081 ld r24,Z + 3008 1174 9817 cp r25,r24 + 3009 1176 00F4 brsh .L224 + 3010 .LM309: + 3011 1178 9F5F subi r25,lo8(-(1)) + 3012 117a 9C93 st X,r25 + 3013 .L224: + 3014 .LM310: + 3015 117c 9C91 ld r25,X + 3016 117e 8081 ld r24,Z + 3017 1180 8917 cp r24,r25 + 3018 1182 00F4 brsh .L225 + 3019 .LM311: + 3020 1184 9150 subi r25,lo8(-(-1)) + 3021 1186 9C93 st X,r25 + 3022 .L225: + 3023 .LM312: + 3024 1188 2F5F subi r18,lo8(-(1)) + 3025 118a 3F4F sbci r19,hi8(-(1)) + 3026 118c 1196 adiw r26,1 + 3027 118e 3196 adiw r30,1 + 3028 1190 2034 cpi r18,64 + 3029 1192 3105 cpc r19,__zero_reg__ + 3030 1194 01F4 brne .L226 + 3031 .LM313: + 3032 1196 8AE7 ldi r24,lo8(122) + 3033 1198 BA01 movw r22,r20 + 3034 119a 40E0 ldi r20,lo8(0) + 3035 119c 50E0 ldi r21,hi8(0) + 3036 119e 0E94 0000 call draw_positions_axis + 3037 .LVL235: + 3038 /* epilogue start */ + 3039 .LM314: + 3040 11a2 0895 ret + 3041 .LFE17: + 3043 .global effect_z_updown + 3045 effect_z_updown: + 3046 .LFB16: + 3047 .LM315: + 3048 .LVL236: + 3049 11a4 2F92 push r2 + 3050 11a6 3F92 push r3 + 3051 11a8 4F92 push r4 + 3052 11aa 5F92 push r5 + 3053 11ac 6F92 push r6 + 3054 11ae 7F92 push r7 + 3055 11b0 8F92 push r8 + 3056 11b2 9F92 push r9 + 3057 11b4 AF92 push r10 + 3058 11b6 BF92 push r11 + 3059 11b8 CF92 push r12 + 3060 11ba DF92 push r13 + 3061 11bc EF92 push r14 + 3062 11be FF92 push r15 + 3063 11c0 0F93 push r16 + 3064 11c2 1F93 push r17 + 3065 11c4 DF93 push r29 + 3066 11c6 CF93 push r28 + 3067 11c8 CDB7 in r28,__SP_L__ + 3068 11ca DEB7 in r29,__SP_H__ + 3069 11cc C058 subi r28,lo8(-(-128)) + 3070 11ce D040 sbci r29,hi8(-(-128)) + 3071 11d0 0FB6 in __tmp_reg__,__SREG__ + 3072 11d2 F894 cli + 3073 11d4 DEBF out __SP_H__,r29 + 3074 11d6 0FBE out __SREG__,__tmp_reg__ + 3075 11d8 CDBF out __SP_L__,r28 + 3076 /* prologue: function */ + 3077 /* frame size = 128 */ + 3078 11da 2C01 movw r4,r24 + 3079 11dc 7B01 movw r14,r22 + 3080 .LM316: + 3081 11de 00E0 ldi r16,lo8(0) + 3082 11e0 10E0 ldi r17,hi8(0) + 3083 .LVL237: + 3084 .LM317: + 3085 11e2 5E01 movw r10,r28 + 3086 11e4 0894 sec + 3087 11e6 A11C adc r10,__zero_reg__ + 3088 11e8 B11C adc r11,__zero_reg__ + 3089 11ea 64E0 ldi r22,lo8(4) + 3090 11ec 962E mov r9,r22 + 3091 .LVL238: + 3092 .LM318: + 3093 11ee 51E4 ldi r21,lo8(65) + 3094 11f0 C52E mov r12,r21 + 3095 11f2 D12C mov r13,__zero_reg__ + 3096 11f4 CC0E add r12,r28 + 3097 11f6 DD1E adc r13,r29 + 3098 .LVL239: + 3099 .L230: + 3100 .LM319: + 3101 11f8 F501 movw r30,r10 + 3102 11fa E00F add r30,r16 + 3103 11fc F11F adc r31,r17 + 3104 11fe 9082 st Z,r9 + 3105 .LM320: + 3106 1200 0E94 0000 call rand + 3107 1204 F601 movw r30,r12 + 3108 1206 E00F add r30,r16 + 3109 1208 F11F adc r31,r17 + 3110 120a 68E0 ldi r22,lo8(8) + 3111 120c 70E0 ldi r23,hi8(8) + 3112 120e 0E94 0000 call __divmodhi4 + 3113 1212 8083 st Z,r24 + 3114 .LM321: + 3115 1214 0F5F subi r16,lo8(-(1)) + 3116 1216 1F4F sbci r17,hi8(-(1)) + 3117 1218 0034 cpi r16,64 + 3118 121a 1105 cpc r17,__zero_reg__ + 3119 121c 01F4 brne .L230 + 3120 121e 00E0 ldi r16,lo8(0) + 3121 1220 10E0 ldi r17,hi8(0) + 3122 .LVL240: + 3123 .LM322: + 3124 1222 41E4 ldi r20,lo8(65) + 3125 1224 A42E mov r10,r20 + 3126 1226 B12C mov r11,__zero_reg__ + 3127 1228 AC0E add r10,r28 + 3128 122a BD1E adc r11,r29 + 3129 122c 6E01 movw r12,r28 + 3130 122e 0894 sec + 3131 1230 C11C adc r12,__zero_reg__ + 3132 1232 D11C adc r13,__zero_reg__ + 3133 .LM323: + 3134 1234 3701 movw r6,r14 + 3135 .LVL241: + 3136 .L231: + 3137 .LM324: + 3138 1236 C601 movw r24,r12 + 3139 1238 B501 movw r22,r10 + 3140 123a 4AE7 ldi r20,lo8(122) + 3141 123c 0E94 0000 call effect_z_updown_move + 3142 .LM325: + 3143 1240 C301 movw r24,r6 + 3144 1242 0E94 0000 call delay_ms + 3145 .LM326: + 3146 1246 0F5F subi r16,lo8(-(1)) + 3147 1248 1F4F sbci r17,hi8(-(1)) + 3148 124a 0830 cpi r16,8 + 3149 124c 1105 cpc r17,__zero_reg__ + 3150 124e 01F4 brne .L231 + 3151 .LM327: + 3152 1250 5701 movw r10,r14 + 3153 .LVL242: + 3154 1252 AA0C lsl r10 + 3155 1254 BB1C rol r11 + 3156 1256 AA0C lsl r10 + 3157 1258 BB1C rol r11 + 3158 125a CC24 clr r12 + 3159 125c DD24 clr r13 + 3160 .LVL243: + 3161 .LM328: + 3162 125e 21E4 ldi r18,lo8(65) + 3163 1260 822E mov r8,r18 + 3164 1262 912C mov r9,__zero_reg__ + 3165 1264 8C0E add r8,r28 + 3166 1266 9D1E adc r9,r29 + 3167 1268 1E01 movw r2,r28 + 3168 126a 0894 sec + 3169 126c 211C adc r2,__zero_reg__ + 3170 126e 311C adc r3,__zero_reg__ + 3171 1270 00C0 rjmp .L232 + 3172 .LVL244: + 3173 .L235: + 3174 .LM329: + 3175 1272 00E0 ldi r16,lo8(0) + 3176 1274 10E0 ldi r17,hi8(0) + 3177 .LVL245: + 3178 .L233: + 3179 .LM330: + 3180 1276 C101 movw r24,r2 + 3181 1278 B401 movw r22,r8 + 3182 127a 4AE7 ldi r20,lo8(122) + 3183 127c 0E94 0000 call effect_z_updown_move + 3184 .LM331: + 3185 1280 C301 movw r24,r6 + 3186 1282 0E94 0000 call delay_ms + 3187 .LM332: + 3188 1286 0F5F subi r16,lo8(-(1)) + 3189 1288 1F4F sbci r17,hi8(-(1)) + 3190 128a 0830 cpi r16,8 + 3191 128c 1105 cpc r17,__zero_reg__ + 3192 128e 01F4 brne .L233 + 3193 .LM333: + 3194 1290 C501 movw r24,r10 + 3195 1292 0E94 0000 call delay_ms + 3196 1296 EE24 clr r14 + 3197 1298 FF24 clr r15 + 3198 .LVL246: + 3199 .L234: + 3200 .LM334: + 3201 129a 0E94 0000 call rand + 3202 129e 8C01 movw r16,r24 + 3203 .LVL247: + 3204 12a0 0E94 0000 call rand + 3205 12a4 9C01 movw r18,r24 + 3206 12a6 C801 movw r24,r16 + 3207 12a8 60E4 ldi r22,lo8(64) + 3208 12aa 70E0 ldi r23,hi8(64) + 3209 12ac 0E94 0000 call __divmodhi4 + 3210 12b0 F401 movw r30,r8 + 3211 12b2 E80F add r30,r24 + 3212 12b4 F91F adc r31,r25 + 3213 12b6 C901 movw r24,r18 + 3214 12b8 68E0 ldi r22,lo8(8) + 3215 12ba 70E0 ldi r23,hi8(8) + 3216 12bc 0E94 0000 call __divmodhi4 + 3217 12c0 8083 st Z,r24 + 3218 .LM335: + 3219 12c2 0894 sec + 3220 12c4 E11C adc r14,__zero_reg__ + 3221 12c6 F11C adc r15,__zero_reg__ + 3222 12c8 8AE0 ldi r24,lo8(10) + 3223 12ca E816 cp r14,r24 + 3224 12cc F104 cpc r15,__zero_reg__ + 3225 12ce 01F4 brne .L234 + 3226 .LM336: + 3227 12d0 0894 sec + 3228 12d2 C11C adc r12,__zero_reg__ + 3229 12d4 D11C adc r13,__zero_reg__ + 3230 .LVL248: + 3231 .L232: + 3232 12d6 C414 cp r12,r4 + 3233 12d8 D504 cpc r13,r5 + 3234 12da 04F0 brlt .L235 + 3235 /* epilogue start */ + 3236 .LM337: + 3237 12dc C058 subi r28,lo8(-(128)) + 3238 12de DF4F sbci r29,hi8(-(128)) + 3239 12e0 0FB6 in __tmp_reg__,__SREG__ + 3240 12e2 F894 cli + 3241 12e4 DEBF out __SP_H__,r29 + 3242 12e6 0FBE out __SREG__,__tmp_reg__ + 3243 12e8 CDBF out __SP_L__,r28 + 3244 12ea CF91 pop r28 + 3245 12ec DF91 pop r29 + 3246 12ee 1F91 pop r17 + 3247 12f0 0F91 pop r16 + 3248 12f2 FF90 pop r15 + 3249 12f4 EF90 pop r14 + 3250 .LVL249: + 3251 12f6 DF90 pop r13 + 3252 12f8 CF90 pop r12 + 3253 .LVL250: + 3254 12fa BF90 pop r11 + 3255 12fc AF90 pop r10 + 3256 12fe 9F90 pop r9 + 3257 1300 8F90 pop r8 + 3258 1302 7F90 pop r7 + 3259 1304 6F90 pop r6 + 3260 1306 5F90 pop r5 + 3261 1308 4F90 pop r4 + 3262 .LVL251: + 3263 130a 3F90 pop r3 + 3264 130c 2F90 pop r2 + 3265 130e 0895 ret + 3266 .LFE16: + 3268 .global effect_random_filler + 3270 effect_random_filler: + 3271 .LFB14: + 3272 .LM338: + 3273 .LVL252: + 3274 1310 8F92 push r8 + 3275 1312 9F92 push r9 + 3276 1314 AF92 push r10 + 3277 1316 BF92 push r11 + 3278 1318 CF92 push r12 + 3279 131a DF92 push r13 + 3280 131c EF92 push r14 + 3281 131e FF92 push r15 + 3282 1320 0F93 push r16 + 3283 1322 1F93 push r17 + 3284 1324 CF93 push r28 + 3285 1326 DF93 push r29 + 3286 /* prologue: function */ + 3287 /* frame size = 0 */ + 3288 1328 4C01 movw r8,r24 + 3289 132a 8B01 movw r16,r22 + 3290 .LM339: + 3291 132c 6130 cpi r22,1 + 3292 132e 7105 cpc r23,__zero_reg__ + 3293 1330 01F4 brne .L242 + 3294 .LVL253: + 3295 .LM340: + 3296 1332 80E0 ldi r24,lo8(0) + 3297 1334 00C0 rjmp .L250 + 3298 .LVL254: + 3299 .L242: + 3300 .LM341: + 3301 1336 8FEF ldi r24,lo8(-1) + 3302 .L250: + 3303 1338 0E94 0000 call fill + 3304 .LVL255: + 3305 133c C0E0 ldi r28,lo8(0) + 3306 133e D0E0 ldi r29,hi8(0) + 3307 .LVL256: + 3308 .L248: + 3309 .LM342: + 3310 1340 0E94 0000 call rand + 3311 1344 68E0 ldi r22,lo8(8) + 3312 1346 70E0 ldi r23,hi8(8) + 3313 1348 0E94 0000 call __divmodhi4 + 3314 134c B82E mov r11,r24 + 3315 134e A92E mov r10,r25 + 3316 .LM343: + 3317 1350 0E94 0000 call rand + 3318 1354 68E0 ldi r22,lo8(8) + 3319 1356 70E0 ldi r23,hi8(8) + 3320 1358 0E94 0000 call __divmodhi4 + 3321 135c D82E mov r13,r24 + 3322 135e C92E mov r12,r25 + 3323 .LM344: + 3324 1360 0E94 0000 call rand + 3325 1364 68E0 ldi r22,lo8(8) + 3326 1366 70E0 ldi r23,hi8(8) + 3327 1368 0E94 0000 call __divmodhi4 + 3328 136c F82E mov r15,r24 + 3329 136e E92E mov r14,r25 + 3330 .LM345: + 3331 1370 0115 cp r16,__zero_reg__ + 3332 1372 1105 cpc r17,__zero_reg__ + 3333 1374 01F4 brne .L244 + 3334 1376 8B2D mov r24,r11 + 3335 1378 9A2D mov r25,r10 + 3336 137a 6D2D mov r22,r13 + 3337 137c 7C2D mov r23,r12 + 3338 137e 4F2D mov r20,r15 + 3339 1380 5E2D mov r21,r14 + 3340 1382 0E94 0000 call getvoxel + 3341 1386 8130 cpi r24,lo8(1) + 3342 1388 01F4 brne .L246 + 3343 138a 00C0 rjmp .L245 + 3344 .L244: + 3345 138c 0130 cpi r16,1 + 3346 138e 1105 cpc r17,__zero_reg__ + 3347 1390 01F4 brne .L246 + 3348 1392 8B2D mov r24,r11 + 3349 1394 9A2D mov r25,r10 + 3350 1396 6D2D mov r22,r13 + 3351 1398 7C2D mov r23,r12 + 3352 139a 4F2D mov r20,r15 + 3353 139c 5E2D mov r21,r14 + 3354 139e 0E94 0000 call getvoxel + 3355 13a2 8823 tst r24 + 3356 13a4 01F4 brne .L246 + 3357 .L245: + 3358 .LM346: + 3359 13a6 8B2D mov r24,r11 + 3360 13a8 9A2D mov r25,r10 + 3361 13aa 6D2D mov r22,r13 + 3362 13ac 7C2D mov r23,r12 + 3363 13ae 4F2D mov r20,r15 + 3364 13b0 5E2D mov r21,r14 + 3365 13b2 9801 movw r18,r16 + 3366 13b4 0E94 0000 call altervoxel + 3367 .LM347: + 3368 13b8 C401 movw r24,r8 + 3369 13ba 0E94 0000 call delay_ms + 3370 .LM348: + 3371 13be 2196 adiw r28,1 + 3372 .L246: + 3373 .LM349: + 3374 13c0 81E0 ldi r24,hi8(511) + 3375 13c2 CF3F cpi r28,lo8(511) + 3376 13c4 D807 cpc r29,r24 + 3377 13c6 04F4 brge .+2 + 3378 13c8 00C0 rjmp .L248 + 3379 /* epilogue start */ + 3380 .LM350: + 3381 13ca DF91 pop r29 + 3382 13cc CF91 pop r28 + 3383 .LVL257: + 3384 13ce 1F91 pop r17 + 3385 13d0 0F91 pop r16 + 3386 .LVL258: + 3387 13d2 FF90 pop r15 + 3388 13d4 EF90 pop r14 + 3389 13d6 DF90 pop r13 + 3390 13d8 CF90 pop r12 + 3391 13da BF90 pop r11 + 3392 13dc AF90 pop r10 + 3393 13de 9F90 pop r9 + 3394 13e0 8F90 pop r8 + 3395 .LVL259: + 3396 13e2 0895 ret + 3397 .LFE14: + 3399 .global sendvoxels_rand_z + 3401 sendvoxels_rand_z: + 3402 .LFB12: + 3403 .LM351: + 3404 .LVL260: + 3405 13e4 6F92 push r6 + 3406 13e6 7F92 push r7 + 3407 13e8 8F92 push r8 + 3408 13ea 9F92 push r9 + 3409 13ec AF92 push r10 + 3410 13ee BF92 push r11 + 3411 13f0 DF92 push r13 + 3412 13f2 EF92 push r14 + 3413 13f4 FF92 push r15 + 3414 13f6 0F93 push r16 + 3415 13f8 1F93 push r17 + 3416 13fa CF93 push r28 + 3417 13fc DF93 push r29 + 3418 /* prologue: function */ + 3419 /* frame size = 0 */ + 3420 13fe 3C01 movw r6,r24 + 3421 1400 5B01 movw r10,r22 + 3422 1402 4A01 movw r8,r20 + 3423 .LM352: + 3424 1404 80E0 ldi r24,lo8(0) + 3425 .LVL261: + 3426 1406 0E94 0000 call fill + 3427 .LVL262: + 3428 140a 00E0 ldi r16,lo8(0) + 3429 140c 10E0 ldi r17,hi8(0) + 3430 140e 00C0 rjmp .L252 + 3431 .L255: + 3432 .LM353: + 3433 1410 0E94 0000 call rand + 3434 1414 80FD sbrc r24,0 + 3435 1416 00C0 rjmp .L253 + 3436 .LM354: + 3437 1418 C801 movw r24,r16 + 3438 141a BE01 movw r22,r28 + 3439 141c 40E0 ldi r20,lo8(0) + 3440 141e 50E0 ldi r21,hi8(0) + 3441 1420 00C0 rjmp .L264 + 3442 .L253: + 3443 .LM355: + 3444 1422 C801 movw r24,r16 + 3445 1424 BE01 movw r22,r28 + 3446 1426 47E0 ldi r20,lo8(7) + 3447 1428 50E0 ldi r21,hi8(7) + 3448 .L264: + 3449 142a 0E94 0000 call setvoxel + 3450 142e 2196 adiw r28,1 + 3451 .LM356: + 3452 1430 C830 cpi r28,8 + 3453 1432 D105 cpc r29,__zero_reg__ + 3454 1434 01F4 brne .L255 + 3455 1436 0F5F subi r16,lo8(-(1)) + 3456 1438 1F4F sbci r17,hi8(-(1)) + 3457 .LM357: + 3458 143a 0830 cpi r16,8 + 3459 143c 1105 cpc r17,__zero_reg__ + 3460 143e 01F4 brne .L252 + 3461 1440 DD24 clr r13 + 3462 .LVL263: + 3463 1442 EE24 clr r14 + 3464 .LVL264: + 3465 1444 FF24 clr r15 + 3466 .LVL265: + 3467 1446 00C0 rjmp .L256 + 3468 .LVL266: + 3469 .L252: + 3470 1448 C0E0 ldi r28,lo8(0) + 3471 144a D0E0 ldi r29,hi8(0) + 3472 144c 00C0 rjmp .L255 + 3473 .LVL267: + 3474 .L260: + 3475 .LM358: + 3476 144e 0E94 0000 call rand + 3477 .LVL268: + 3478 1452 EC01 movw r28,r24 + 3479 .LM359: + 3480 1454 0E94 0000 call rand + 3481 1458 68E0 ldi r22,lo8(8) + 3482 145a 70E0 ldi r23,hi8(8) + 3483 145c 0E94 0000 call __divmodhi4 + 3484 1460 082F mov r16,r24 + 3485 .LM360: + 3486 1462 8E15 cp r24,r14 + 3487 1464 01F0 breq .L257 + 3488 .LVL269: + 3489 .LM361: + 3490 1466 CE01 movw r24,r28 + 3491 .LVL270: + 3492 1468 68E0 ldi r22,lo8(8) + 3493 146a 70E0 ldi r23,hi8(8) + 3494 146c 0E94 0000 call __divmodhi4 + 3495 1470 182F mov r17,r24 + 3496 .LM362: + 3497 1472 8D15 cp r24,r13 + 3498 1474 01F0 breq .L257 + 3499 .LVL271: + 3500 .LM363: + 3501 1476 90E0 ldi r25,lo8(0) + 3502 1478 602F mov r22,r16 + 3503 147a 70E0 ldi r23,lo8(0) + 3504 147c 40E0 ldi r20,lo8(0) + 3505 147e 50E0 ldi r21,hi8(0) + 3506 1480 0E94 0000 call getvoxel + 3507 .LVL272: + 3508 1484 8823 tst r24 + 3509 1486 01F0 breq .L258 + 3510 .LM364: + 3511 1488 812F mov r24,r17 + 3512 148a 602F mov r22,r16 + 3513 148c 40E0 ldi r20,lo8(0) + 3514 148e 00C0 rjmp .L265 + 3515 .L258: + 3516 .LM365: + 3517 1490 812F mov r24,r17 + 3518 1492 602F mov r22,r16 + 3519 1494 47E0 ldi r20,lo8(7) + 3520 .L265: + 3521 1496 9501 movw r18,r10 + 3522 1498 0E94 0000 call sendvoxel_z + 3523 .LM366: + 3524 149c C401 movw r24,r8 + 3525 149e 0E94 0000 call delay_ms + 3526 14a2 D12E mov r13,r17 + 3527 14a4 E02E mov r14,r16 + 3528 .LVL273: + 3529 .L257: + 3530 .LM367: + 3531 14a6 F394 inc r15 + 3532 .L256: + 3533 14a8 8F2D mov r24,r15 + 3534 14aa 90E0 ldi r25,lo8(0) + 3535 .LVL274: + 3536 14ac 8615 cp r24,r6 + 3537 14ae 9705 cpc r25,r7 + 3538 14b0 04F0 brlt .L260 + 3539 .LVL275: + 3540 /* epilogue start */ + 3541 .LM368: + 3542 14b2 DF91 pop r29 + 3543 14b4 CF91 pop r28 + 3544 14b6 1F91 pop r17 + 3545 .LVL276: + 3546 14b8 0F91 pop r16 + 3547 .LVL277: + 3548 14ba FF90 pop r15 + 3549 14bc EF90 pop r14 + 3550 .LVL278: + 3551 14be DF90 pop r13 + 3552 .LVL279: + 3553 14c0 BF90 pop r11 + 3554 14c2 AF90 pop r10 + 3555 .LVL280: + 3556 14c4 9F90 pop r9 + 3557 14c6 8F90 pop r8 + 3558 .LVL281: + 3559 14c8 7F90 pop r7 + 3560 14ca 6F90 pop r6 + 3561 .LVL282: + 3562 14cc 0895 ret + 3563 .LFE12: + 3565 .global effect_blinky2 + 3567 effect_blinky2: + 3568 .LFB7: + 3569 .LM369: + 3570 14ce EF92 push r14 + 3571 14d0 FF92 push r15 + 3572 14d2 0F93 push r16 + 3573 14d4 1F93 push r17 + 3574 14d6 CF93 push r28 + 3575 14d8 DF93 push r29 + 3576 /* prologue: function */ + 3577 /* frame size = 0 */ + 3578 .LM370: + 3579 14da 80E0 ldi r24,lo8(0) + 3580 14dc 0E94 0000 call fill + 3581 14e0 00E0 ldi r16,lo8(0) + 3582 14e2 10E0 ldi r17,hi8(0) + 3583 .LVL283: + 3584 .LM371: + 3585 14e4 7FEE ldi r23,lo8(751) + 3586 14e6 E72E mov r14,r23 + 3587 14e8 72E0 ldi r23,hi8(751) + 3588 14ea F72E mov r15,r23 + 3589 14ec 00C0 rjmp .L267 + 3590 .LVL284: + 3591 .L268: + 3592 .LM372: + 3593 14ee 80E0 ldi r24,lo8(0) + 3594 14f0 0E94 0000 call fill + 3595 .LM373: + 3596 14f4 CE01 movw r24,r28 + 3597 14f6 0E94 0000 call delay_ms + 3598 .LM374: + 3599 14fa 8FEF ldi r24,lo8(-1) + 3600 14fc 0E94 0000 call fill + 3601 .LM375: + 3602 1500 84E6 ldi r24,lo8(100) + 3603 1502 90E0 ldi r25,hi8(100) + 3604 1504 0E94 0000 call delay_ms + 3605 .LM376: + 3606 1508 CE01 movw r24,r28 + 3607 150a 66EF ldi r22,lo8(-10) + 3608 150c 7FEF ldi r23,hi8(-10) + 3609 150e 0E94 0000 call __divmodhi4 + 3610 1512 88EE ldi r24,lo8(1000) + 3611 1514 93E0 ldi r25,hi8(1000) + 3612 1516 0E94 0000 call __divmodhi4 + 3613 151a 6F50 subi r22,lo8(-(-15)) + 3614 151c 7040 sbci r23,hi8(-(-15)) + 3615 151e C60F add r28,r22 + 3616 1520 D71F adc r29,r23 + 3617 .LM377: + 3618 1522 1C16 cp __zero_reg__,r28 + 3619 1524 1D06 cpc __zero_reg__,r29 + 3620 1526 04F0 brlt .L268 + 3621 .LM378: + 3622 1528 88EE ldi r24,lo8(1000) + 3623 152a 93E0 ldi r25,hi8(1000) + 3624 152c 0E94 0000 call delay_ms + 3625 1530 CEEE ldi r28,lo8(750) + 3626 1532 D2E0 ldi r29,hi8(750) + 3627 .LVL285: + 3628 .L269: + 3629 .LM379: + 3630 1534 80E0 ldi r24,lo8(0) + 3631 1536 0E94 0000 call fill + 3632 .LM380: + 3633 153a C701 movw r24,r14 + 3634 153c 8C1B sub r24,r28 + 3635 153e 9D0B sbc r25,r29 + 3636 1540 0E94 0000 call delay_ms + 3637 .LM381: + 3638 1544 8FEF ldi r24,lo8(-1) + 3639 1546 0E94 0000 call fill + 3640 .LM382: + 3641 154a 84E6 ldi r24,lo8(100) + 3642 154c 90E0 ldi r25,hi8(100) + 3643 154e 0E94 0000 call delay_ms + 3644 .LM383: + 3645 1552 CE01 movw r24,r28 + 3646 1554 66EF ldi r22,lo8(-10) + 3647 1556 7FEF ldi r23,hi8(-10) + 3648 1558 0E94 0000 call __divmodhi4 + 3649 155c 88EE ldi r24,lo8(1000) + 3650 155e 93E0 ldi r25,hi8(1000) + 3651 1560 0E94 0000 call __divmodhi4 + 3652 1564 6F50 subi r22,lo8(-(-15)) + 3653 1566 7040 sbci r23,hi8(-(-15)) + 3654 1568 C60F add r28,r22 + 3655 156a D71F adc r29,r23 + 3656 .LM384: + 3657 156c 1C16 cp __zero_reg__,r28 + 3658 156e 1D06 cpc __zero_reg__,r29 + 3659 1570 04F0 brlt .L269 + 3660 .LM385: + 3661 1572 0F5F subi r16,lo8(-(1)) + 3662 1574 1F4F sbci r17,hi8(-(1)) + 3663 1576 0230 cpi r16,2 + 3664 1578 1105 cpc r17,__zero_reg__ + 3665 157a 01F0 breq .L271 + 3666 .L267: + 3667 157c CEEE ldi r28,lo8(750) + 3668 157e D2E0 ldi r29,hi8(750) + 3669 .LVL286: + 3670 1580 00C0 rjmp .L268 + 3671 .L271: + 3672 /* epilogue start */ + 3673 .LM386: + 3674 1582 DF91 pop r29 + 3675 1584 CF91 pop r28 + 3676 .LVL287: + 3677 1586 1F91 pop r17 + 3678 1588 0F91 pop r16 + 3679 .LVL288: + 3680 158a FF90 pop r15 + 3681 158c EF90 pop r14 + 3682 158e 0895 ret + 3683 .LFE7: + 3685 .global effect_wormsqueeze + 3687 effect_wormsqueeze: + 3688 .LFB26: + 3689 .LM387: + 3690 .LVL289: + 3691 1590 2F92 push r2 + 3692 1592 3F92 push r3 + 3693 1594 4F92 push r4 + 3694 1596 5F92 push r5 + 3695 1598 6F92 push r6 + 3696 159a 7F92 push r7 + 3697 159c 8F92 push r8 + 3698 159e 9F92 push r9 + 3699 15a0 AF92 push r10 + 3700 15a2 BF92 push r11 + 3701 15a4 CF92 push r12 + 3702 15a6 DF92 push r13 + 3703 15a8 EF92 push r14 + 3704 15aa FF92 push r15 + 3705 15ac 0F93 push r16 + 3706 .LVL290: + 3707 15ae 1F93 push r17 + 3708 15b0 DF93 push r29 + 3709 15b2 CF93 push r28 + 3710 15b4 CDB7 in r28,__SP_L__ + 3711 15b6 DEB7 in r29,__SP_H__ + 3712 15b8 2E97 sbiw r28,14 + 3713 15ba 0FB6 in __tmp_reg__,__SREG__ + 3714 15bc F894 cli + 3715 15be DEBF out __SP_H__,r29 + 3716 15c0 0FBE out __SREG__,__tmp_reg__ + 3717 15c2 CDBF out __SP_L__,r28 + 3718 /* prologue: function */ + 3719 /* frame size = 14 */ + 3720 15c4 9A83 std Y+2,r25 + 3721 15c6 8983 std Y+1,r24 + 3722 15c8 7C83 std Y+4,r23 + 3723 15ca 6B83 std Y+3,r22 + 3724 15cc 5E83 std Y+6,r21 + 3725 15ce 4D83 std Y+5,r20 + 3726 15d0 3887 std Y+8,r19 + 3727 15d2 2F83 std Y+7,r18 + 3728 15d4 1A87 std Y+10,r17 + 3729 15d6 0987 std Y+9,r16 + 3730 .LVL291: + 3731 .LM388: + 3732 15d8 4F5F subi r20,lo8(-1) + 3733 15da 5F4F sbci r21,hi8(-1) + 3734 .LVL292: + 3735 15dc 01F4 brne .L275 + 3736 .LVL293: + 3737 15de F7E0 ldi r31,lo8(7) + 3738 15e0 2F2E mov r2,r31 + 3739 15e2 312C mov r3,__zero_reg__ + 3740 .LVL294: + 3741 15e4 00C0 rjmp .L276 + 3742 .LVL295: + 3743 .L275: + 3744 15e6 2224 clr r2 + 3745 15e8 3324 clr r3 + 3746 .LVL296: + 3747 .L276: + 3748 .LM389: + 3749 15ea E9E0 ldi r30,lo8(9) + 3750 15ec 6E2E mov r6,r30 + 3751 15ee 712C mov r7,__zero_reg__ + 3752 .LVL297: + 3753 15f0 8981 ldd r24,Y+1 + 3754 15f2 9A81 ldd r25,Y+2 + 3755 15f4 681A sub r6,r24 + 3756 15f6 790A sbc r7,r25 + 3757 .LM390: + 3758 15f8 0E94 0000 call rand + 3759 .LVL298: + 3760 15fc B301 movw r22,r6 + 3761 15fe 0E94 0000 call __divmodhi4 + 3762 1602 6C01 movw r12,r24 + 3763 .LVL299: + 3764 .LM391: + 3765 1604 0E94 0000 call rand + 3766 .LVL300: + 3767 1608 B301 movw r22,r6 + 3768 160a 0E94 0000 call __divmodhi4 + 3769 160e 7C01 movw r14,r24 + 3770 .LVL301: + 3771 1610 4424 clr r4 + 3772 1612 5524 clr r5 + 3773 .LVL302: + 3774 1614 00C0 rjmp .L277 + 3775 .LVL303: + 3776 .L289: + 3777 .LM392: + 3778 1616 0E94 0000 call rand + 3779 161a 8C01 movw r16,r24 + 3780 .LM393: + 3781 161c 0E94 0000 call rand + 3782 1620 9C01 movw r18,r24 + 3783 .LM394: + 3784 1622 C801 movw r24,r16 + 3785 1624 63E0 ldi r22,lo8(3) + 3786 1626 70E0 ldi r23,hi8(3) + 3787 1628 0E94 0000 call __divmodhi4 + 3788 162c 0197 sbiw r24,1 + 3789 162e 8C0D add r24,r12 + 3790 1630 9D1D adc r25,r13 + 3791 1632 9E87 std Y+14,r25 + 3792 1634 8D87 std Y+13,r24 + 3793 .LVL304: + 3794 1636 1816 cp __zero_reg__,r24 + 3795 1638 1906 cpc __zero_reg__,r25 + 3796 163a 04F4 brge .L278 + 3797 163c 8615 cp r24,r6 + 3798 163e 9705 cpc r25,r7 + 3799 1640 04F0 brlt .L279 + 3800 .L278: + 3801 1642 DE86 std Y+14,r13 + 3802 1644 CD86 std Y+13,r12 + 3803 .L279: + 3804 .LM395: + 3805 1646 C901 movw r24,r18 + 3806 1648 63E0 ldi r22,lo8(3) + 3807 164a 70E0 ldi r23,hi8(3) + 3808 164c 0E94 0000 call __divmodhi4 + 3809 1650 8C01 movw r16,r24 + 3810 .LVL305: + 3811 1652 0150 subi r16,lo8(-(-1)) + 3812 1654 1040 sbci r17,hi8(-(-1)) + 3813 1656 0E0D add r16,r14 + 3814 1658 1F1D adc r17,r15 + 3815 165a 1016 cp __zero_reg__,r16 + 3816 165c 1106 cpc __zero_reg__,r17 + 3817 165e 04F4 brge .L280 + 3818 1660 0615 cp r16,r6 + 3819 1662 1705 cpc r17,r7 + 3820 1664 04F0 brlt .L281 + 3821 .L280: + 3822 1666 8701 movw r16,r14 + 3823 .L281: + 3824 .LM396: + 3825 1668 8B81 ldd r24,Y+3 + 3826 166a 6D81 ldd r22,Y+5 + 3827 166c 7E81 ldd r23,Y+6 + 3828 166e 0E94 0000 call shift + 3829 1672 8D84 ldd r8,Y+13 + 3830 1674 9E84 ldd r9,Y+14 + 3831 1676 AA24 clr r10 + 3832 1678 BB24 clr r11 + 3833 167a 00C0 rjmp .L282 + 3834 .LVL306: + 3835 .L286: + 3836 .LM397: + 3837 167c EB81 ldd r30,Y+3 + 3838 167e FC81 ldd r31,Y+4 + 3839 1680 EA37 cpi r30,122 + 3840 1682 F105 cpc r31,__zero_reg__ + 3841 1684 01F4 brne .L283 + 3842 .LVL307: + 3843 .LM398: + 3844 1686 C401 movw r24,r8 + 3845 1688 B601 movw r22,r12 + 3846 168a A101 movw r20,r2 + 3847 168c 00C0 rjmp .L291 + 3848 .L283: + 3849 .LM399: + 3850 168e 8B81 ldd r24,Y+3 + 3851 1690 9C81 ldd r25,Y+4 + 3852 1692 8937 cpi r24,121 + 3853 1694 9105 cpc r25,__zero_reg__ + 3854 1696 01F4 brne .L285 + 3855 .LM400: + 3856 1698 C401 movw r24,r8 + 3857 169a B101 movw r22,r2 + 3858 169c A601 movw r20,r12 + 3859 169e 00C0 rjmp .L291 + 3860 .L285: + 3861 .LM401: + 3862 16a0 EB81 ldd r30,Y+3 + 3863 16a2 FC81 ldd r31,Y+4 + 3864 16a4 E837 cpi r30,120 + 3865 16a6 F105 cpc r31,__zero_reg__ + 3866 16a8 01F4 brne .L284 + 3867 .LM402: + 3868 16aa 4D85 ldd r20,Y+13 + 3869 16ac 5E85 ldd r21,Y+14 + 3870 16ae 4E0D add r20,r14 + 3871 16b0 5F1D adc r21,r15 + 3872 16b2 C101 movw r24,r2 + 3873 16b4 6B85 ldd r22,Y+11 + 3874 16b6 7C85 ldd r23,Y+12 + 3875 .L291: + 3876 16b8 0E94 0000 call setvoxel + 3877 .L284: + 3878 .LM403: + 3879 16bc 0894 sec + 3880 16be E11C adc r14,__zero_reg__ + 3881 16c0 F11C adc r15,__zero_reg__ + 3882 16c2 0894 sec + 3883 16c4 C11C adc r12,__zero_reg__ + 3884 16c6 D11C adc r13,__zero_reg__ + 3885 .L288: + 3886 16c8 8981 ldd r24,Y+1 + 3887 16ca 9A81 ldd r25,Y+2 + 3888 16cc E816 cp r14,r24 + 3889 16ce F906 cpc r15,r25 + 3890 16d0 04F0 brlt .L286 + 3891 .LVL308: + 3892 .LM404: + 3893 16d2 0894 sec + 3894 16d4 A11C adc r10,__zero_reg__ + 3895 16d6 B11C adc r11,__zero_reg__ + 3896 16d8 0894 sec + 3897 16da 811C adc r8,__zero_reg__ + 3898 16dc 911C adc r9,__zero_reg__ + 3899 .LVL309: + 3900 .L282: + 3901 16de E981 ldd r30,Y+1 + 3902 16e0 FA81 ldd r31,Y+2 + 3903 16e2 AE16 cp r10,r30 + 3904 16e4 BF06 cpc r11,r31 + 3905 16e6 04F4 brge .L287 + 3906 16e8 6801 movw r12,r16 + 3907 16ea EE24 clr r14 + 3908 16ec FF24 clr r15 + 3909 .LM405: + 3910 16ee C501 movw r24,r10 + 3911 16f0 800F add r24,r16 + 3912 16f2 911F adc r25,r17 + 3913 16f4 9C87 std Y+12,r25 + 3914 16f6 8B87 std Y+11,r24 + 3915 16f8 00C0 rjmp .L288 + 3916 .LVL310: + 3917 .L287: + 3918 .LM406: + 3919 16fa 8985 ldd r24,Y+9 + 3920 16fc 9A85 ldd r25,Y+10 + 3921 16fe 0E94 0000 call delay_ms + 3922 .LM407: + 3923 1702 0894 sec + 3924 1704 411C adc r4,__zero_reg__ + 3925 1706 511C adc r5,__zero_reg__ + 3926 1708 CD84 ldd r12,Y+13 + 3927 170a DE84 ldd r13,Y+14 + 3928 170c 7801 movw r14,r16 + 3929 .LVL311: + 3930 .L277: + 3931 170e EF81 ldd r30,Y+7 + 3932 1710 F885 ldd r31,Y+8 + 3933 1712 4E16 cp r4,r30 + 3934 1714 5F06 cpc r5,r31 + 3935 1716 04F4 brge .+2 + 3936 1718 00C0 rjmp .L289 + 3937 /* epilogue start */ + 3938 .LM408: + 3939 171a 2E96 adiw r28,14 + 3940 171c 0FB6 in __tmp_reg__,__SREG__ + 3941 171e F894 cli + 3942 1720 DEBF out __SP_H__,r29 + 3943 1722 0FBE out __SREG__,__tmp_reg__ + 3944 1724 CDBF out __SP_L__,r28 + 3945 1726 CF91 pop r28 + 3946 1728 DF91 pop r29 + 3947 172a 1F91 pop r17 + 3948 172c 0F91 pop r16 + 3949 172e FF90 pop r15 + 3950 1730 EF90 pop r14 + 3951 .LVL312: + 3952 1732 DF90 pop r13 + 3953 1734 CF90 pop r12 + 3954 .LVL313: + 3955 1736 BF90 pop r11 + 3956 1738 AF90 pop r10 + 3957 .LVL314: + 3958 173a 9F90 pop r9 + 3959 173c 8F90 pop r8 + 3960 173e 7F90 pop r7 + 3961 1740 6F90 pop r6 + 3962 .LVL315: + 3963 1742 5F90 pop r5 + 3964 1744 4F90 pop r4 + 3965 .LVL316: + 3966 1746 3F90 pop r3 + 3967 1748 2F90 pop r2 + 3968 .LVL317: + 3969 174a 0895 ret + 3970 .LFE26: + 3972 .global effect_rain + 3974 effect_rain: + 3975 .LFB15: + 3976 .LM409: + 3977 .LVL318: + 3978 174c AF92 push r10 + 3979 174e BF92 push r11 + 3980 1750 CF92 push r12 + 3981 1752 DF92 push r13 + 3982 1754 EF92 push r14 + 3983 1756 FF92 push r15 + 3984 1758 0F93 push r16 + 3985 175a 1F93 push r17 + 3986 175c CF93 push r28 + 3987 175e DF93 push r29 + 3988 /* prologue: function */ + 3989 /* frame size = 0 */ + 3990 1760 5C01 movw r10,r24 + 3991 .LM410: + 3992 1762 CC24 clr r12 + 3993 1764 DD24 clr r13 + 3994 .LVL319: + 3995 1766 00C0 rjmp .L293 + 3996 .LVL320: + 3997 .L296: + 3998 .LM411: + 3999 1768 0E94 0000 call rand + 4000 176c 64E0 ldi r22,lo8(4) + 4001 176e 70E0 ldi r23,hi8(4) + 4002 1770 0E94 0000 call __divmodhi4 + 4003 1774 EC01 movw r28,r24 + 4004 .LVL321: + 4005 1776 EE24 clr r14 + 4006 1778 FF24 clr r15 + 4007 177a 00C0 rjmp .L294 + 4008 .LVL322: + 4009 .L295: + 4010 .LM412: + 4011 177c 0E94 0000 call rand + 4012 1780 8C01 movw r16,r24 + 4013 .LM413: + 4014 1782 0E94 0000 call rand + 4015 1786 9C01 movw r18,r24 + 4016 .LM414: + 4017 1788 C801 movw r24,r16 + 4018 178a 68E0 ldi r22,lo8(8) + 4019 178c 70E0 ldi r23,hi8(8) + 4020 178e 0E94 0000 call __divmodhi4 + 4021 1792 FC01 movw r30,r24 + 4022 1794 C901 movw r24,r18 + 4023 1796 68E0 ldi r22,lo8(8) + 4024 1798 70E0 ldi r23,hi8(8) + 4025 179a 0E94 0000 call __divmodhi4 + 4026 179e BC01 movw r22,r24 + 4027 17a0 CF01 movw r24,r30 + 4028 17a2 47E0 ldi r20,lo8(7) + 4029 17a4 50E0 ldi r21,hi8(7) + 4030 17a6 0E94 0000 call setvoxel + 4031 .LM415: + 4032 17aa 0894 sec + 4033 17ac E11C adc r14,__zero_reg__ + 4034 17ae F11C adc r15,__zero_reg__ + 4035 .L294: + 4036 17b0 EC16 cp r14,r28 + 4037 17b2 FD06 cpc r15,r29 + 4038 17b4 04F0 brlt .L295 + 4039 .LM416: + 4040 17b6 88EE ldi r24,lo8(1000) + 4041 17b8 93E0 ldi r25,hi8(1000) + 4042 17ba 0E94 0000 call delay_ms + 4043 .LM417: + 4044 17be 8AE7 ldi r24,lo8(122) + 4045 17c0 6FEF ldi r22,lo8(-1) + 4046 17c2 7FEF ldi r23,hi8(-1) + 4047 17c4 0E94 0000 call shift + 4048 .LM418: + 4049 17c8 0894 sec + 4050 17ca C11C adc r12,__zero_reg__ + 4051 17cc D11C adc r13,__zero_reg__ + 4052 .LVL323: + 4053 .L293: + 4054 17ce CA14 cp r12,r10 + 4055 17d0 DB04 cpc r13,r11 + 4056 17d2 04F0 brlt .L296 + 4057 /* epilogue start */ + 4058 .LM419: + 4059 17d4 DF91 pop r29 + 4060 17d6 CF91 pop r28 + 4061 .LVL324: + 4062 17d8 1F91 pop r17 + 4063 17da 0F91 pop r16 + 4064 17dc FF90 pop r15 + 4065 17de EF90 pop r14 + 4066 .LVL325: + 4067 17e0 DF90 pop r13 + 4068 17e2 CF90 pop r12 + 4069 .LVL326: + 4070 17e4 BF90 pop r11 + 4071 17e6 AF90 pop r10 + 4072 .LVL327: + 4073 17e8 0895 ret + 4074 .LFE15: + 4076 .global boingboing + 4078 boingboing: + 4079 .LFB13: + 4080 .LM420: + 4081 .LVL328: + 4082 17ea 2F92 push r2 + 4083 17ec 3F92 push r3 + 4084 17ee 4F92 push r4 + 4085 17f0 5F92 push r5 + 4086 17f2 6F92 push r6 + 4087 17f4 7F92 push r7 + 4088 17f6 8F92 push r8 + 4089 17f8 9F92 push r9 + 4090 17fa AF92 push r10 + 4091 17fc BF92 push r11 + 4092 17fe CF92 push r12 + 4093 1800 DF92 push r13 + 4094 1802 EF92 push r14 + 4095 1804 FF92 push r15 + 4096 1806 0F93 push r16 + 4097 1808 1F93 push r17 + 4098 180a DF93 push r29 + 4099 180c CF93 push r28 + 4100 180e CDB7 in r28,__SP_L__ + 4101 1810 DEB7 in r29,__SP_H__ + 4102 1812 E897 sbiw r28,56 + 4103 1814 0FB6 in __tmp_reg__,__SREG__ + 4104 1816 F894 cli + 4105 1818 DEBF out __SP_H__,r29 + 4106 181a 0FBE out __SREG__,__tmp_reg__ + 4107 181c CDBF out __SP_L__,r28 + 4108 /* prologue: function */ + 4109 /* frame size = 56 */ + 4110 181e 9AAB std Y+50,r25 + 4111 1820 89AB std Y+49,r24 + 4112 1822 7CAB std Y+52,r23 + 4113 1824 6BAB std Y+51,r22 + 4114 1826 222E mov r2,r18 + 4115 .LM421: + 4116 1828 80E0 ldi r24,lo8(0) + 4117 .LVL329: + 4118 182a 0E94 0000 call fill + 4119 .LVL330: + 4120 182e FE01 movw r30,r28 + 4121 1830 3196 adiw r30,1 + 4122 .LM422: + 4123 1832 84E0 ldi r24,lo8(4) + 4124 1834 90E0 ldi r25,hi8(4) + 4125 .LM423: + 4126 1836 9E01 movw r18,r28 + 4127 1838 2F5C subi r18,lo8(-(49)) + 4128 183a 3F4F sbci r19,hi8(-(49)) + 4129 183c 3EAB std Y+54,r19 + 4130 183e 2DAB std Y+53,r18 + 4131 .L299: + 4132 .LM424: + 4133 1840 9183 std Z+1,r25 + 4134 1842 8083 st Z,r24 + 4135 .LM425: + 4136 1844 9383 std Z+3,r25 + 4137 1846 8283 std Z+2,r24 + 4138 .LM426: + 4139 1848 9583 std Z+5,r25 + 4140 184a 8483 std Z+4,r24 + 4141 184c 3696 adiw r30,6 + 4142 .LM427: + 4143 184e 2DA9 ldd r18,Y+53 + 4144 1850 3EA9 ldd r19,Y+54 + 4145 1852 E217 cp r30,r18 + 4146 1854 F307 cpc r31,r19 + 4147 1856 01F4 brne .L299 + 4148 .LM428: + 4149 1858 0E94 0000 call rand + 4150 185c 68E0 ldi r22,lo8(8) + 4151 185e 70E0 ldi r23,hi8(8) + 4152 1860 0E94 0000 call __divmodhi4 + 4153 1864 3C01 movw r6,r24 + 4154 .LVL331: + 4155 .LM429: + 4156 1866 0E94 0000 call rand + 4157 .LVL332: + 4158 186a 68E0 ldi r22,lo8(8) + 4159 186c 70E0 ldi r23,hi8(8) + 4160 186e 0E94 0000 call __divmodhi4 + 4161 1872 2C01 movw r4,r24 + 4162 .LVL333: + 4163 .LM430: + 4164 1874 0E94 0000 call rand + 4165 .LVL334: + 4166 1878 68E0 ldi r22,lo8(8) + 4167 187a 70E0 ldi r23,hi8(8) + 4168 187c 0E94 0000 call __divmodhi4 + 4169 1880 7C01 movw r14,r24 + 4170 .LVL335: + 4171 1882 E1E0 ldi r30,lo8(1) + 4172 1884 CE2E mov r12,r30 + 4173 1886 D12C mov r13,__zero_reg__ + 4174 .LVL336: + 4175 1888 71E0 ldi r23,lo8(1) + 4176 188a 872E mov r8,r23 + 4177 188c 912C mov r9,__zero_reg__ + 4178 .LVL337: + 4179 188e 61E0 ldi r22,lo8(1) + 4180 1890 A62E mov r10,r22 + 4181 1892 B12C mov r11,__zero_reg__ + 4182 .LVL338: + 4183 .LM431: + 4184 1894 CE01 movw r24,r28 + 4185 .LVL339: + 4186 1896 0B97 sbiw r24,11 + 4187 1898 98AF std Y+56,r25 + 4188 189a 8FAB std Y+55,r24 + 4189 189c 00C0 rjmp .L300 + 4190 .LVL340: + 4191 .L353: + 4192 .LM432: + 4193 189e 0E94 0000 call rand + 4194 18a2 63E0 ldi r22,lo8(3) + 4195 18a4 70E0 ldi r23,hi8(3) + 4196 18a6 0E94 0000 call __divmodhi4 + 4197 18aa 892B or r24,r25 + 4198 18ac 01F4 brne .L301 + 4199 .LM433: + 4200 18ae 0E94 0000 call rand + 4201 18b2 63E0 ldi r22,lo8(3) + 4202 18b4 70E0 ldi r23,hi8(3) + 4203 18b6 0E94 0000 call __divmodhi4 + 4204 .LM434: + 4205 18ba 0097 sbiw r24,0 + 4206 .LVL341: + 4207 18bc 01F4 brne .L302 + 4208 .LM435: + 4209 18be 0E94 0000 call rand + 4210 .LVL342: + 4211 18c2 63E0 ldi r22,lo8(3) + 4212 18c4 70E0 ldi r23,hi8(3) + 4213 18c6 0E94 0000 call __divmodhi4 + 4214 18ca 6C01 movw r12,r24 + 4215 18cc 0894 sec + 4216 18ce C108 sbc r12,__zero_reg__ + 4217 18d0 D108 sbc r13,__zero_reg__ + 4218 18d2 00C0 rjmp .L301 + 4219 .LVL343: + 4220 .L302: + 4221 .LM436: + 4222 18d4 8130 cpi r24,1 + 4223 18d6 9105 cpc r25,__zero_reg__ + 4224 18d8 01F4 brne .L303 + 4225 .LM437: + 4226 18da 0E94 0000 call rand + 4227 .LVL344: + 4228 18de 63E0 ldi r22,lo8(3) + 4229 18e0 70E0 ldi r23,hi8(3) + 4230 18e2 0E94 0000 call __divmodhi4 + 4231 18e6 4C01 movw r8,r24 + 4232 18e8 0894 sec + 4233 18ea 8108 sbc r8,__zero_reg__ + 4234 18ec 9108 sbc r9,__zero_reg__ + 4235 18ee 00C0 rjmp .L301 + 4236 .LVL345: + 4237 .L303: + 4238 .LM438: + 4239 18f0 8230 cpi r24,2 + 4240 18f2 9105 cpc r25,__zero_reg__ + 4241 18f4 01F4 brne .L301 + 4242 .LM439: + 4243 18f6 0E94 0000 call rand + 4244 .LVL346: + 4245 18fa 63E0 ldi r22,lo8(3) + 4246 18fc 70E0 ldi r23,hi8(3) + 4247 18fe 0E94 0000 call __divmodhi4 + 4248 1902 5C01 movw r10,r24 + 4249 1904 0894 sec + 4250 1906 A108 sbc r10,__zero_reg__ + 4251 1908 B108 sbc r11,__zero_reg__ + 4252 .LVL347: + 4253 .L301: + 4254 .LM440: + 4255 190a 9FEF ldi r25,lo8(-1) + 4256 190c C916 cp r12,r25 + 4257 190e 9FEF ldi r25,hi8(-1) + 4258 1910 D906 cpc r13,r25 + 4259 1912 01F4 brne .L304 + 4260 1914 4114 cp r4,__zero_reg__ + 4261 1916 5104 cpc r5,__zero_reg__ + 4262 1918 01F4 brne .L304 + 4263 .LM441: + 4264 191a 0E94 0000 call rand + 4265 .LVL348: + 4266 191e 63E0 ldi r22,lo8(3) + 4267 1920 70E0 ldi r23,hi8(3) + 4268 1922 0E94 0000 call __divmodhi4 + 4269 1926 0197 sbiw r24,1 + 4270 1928 01F0 breq .L305 + 4271 192a CC24 clr r12 + 4272 192c DD24 clr r13 + 4273 192e 00C0 rjmp .L360 + 4274 .L305: + 4275 1930 51E0 ldi r21,lo8(1) + 4276 1932 C52E mov r12,r21 + 4277 1934 D12C mov r13,__zero_reg__ + 4278 .L360: + 4279 1936 11E0 ldi r17,lo8(1) + 4280 1938 00C0 rjmp .L306 + 4281 .LVL349: + 4282 .L304: + 4283 193a 10E0 ldi r17,lo8(0) + 4284 .L306: + 4285 .LM442: + 4286 193c EFEF ldi r30,lo8(-1) + 4287 193e 8E16 cp r8,r30 + 4288 1940 EFEF ldi r30,hi8(-1) + 4289 1942 9E06 cpc r9,r30 + 4290 1944 01F4 brne .L307 + 4291 1946 6114 cp r6,__zero_reg__ + 4292 1948 7104 cpc r7,__zero_reg__ + 4293 194a 01F4 brne .L307 + 4294 .LM443: + 4295 194c 0E94 0000 call rand + 4296 .LVL350: + 4297 1950 63E0 ldi r22,lo8(3) + 4298 1952 70E0 ldi r23,hi8(3) + 4299 1954 0E94 0000 call __divmodhi4 + 4300 1958 0197 sbiw r24,1 + 4301 195a 01F0 breq .L308 + 4302 195c 8824 clr r8 + 4303 195e 9924 clr r9 + 4304 1960 00C0 rjmp .L361 + 4305 .L308: + 4306 1962 41E0 ldi r20,lo8(1) + 4307 1964 842E mov r8,r20 + 4308 1966 912C mov r9,__zero_reg__ + 4309 .L361: + 4310 1968 01E0 ldi r16,lo8(1) + 4311 196a 00C0 rjmp .L309 + 4312 .LVL351: + 4313 .L307: + 4314 196c 00E0 ldi r16,lo8(0) + 4315 .L309: + 4316 .LM444: + 4317 196e FFEF ldi r31,lo8(-1) + 4318 1970 AF16 cp r10,r31 + 4319 1972 FFEF ldi r31,hi8(-1) + 4320 1974 BF06 cpc r11,r31 + 4321 1976 01F4 brne .L310 + 4322 1978 E114 cp r14,__zero_reg__ + 4323 197a F104 cpc r15,__zero_reg__ + 4324 197c 01F4 brne .L310 + 4325 .LM445: + 4326 197e 0E94 0000 call rand + 4327 .LVL352: + 4328 1982 63E0 ldi r22,lo8(3) + 4329 1984 70E0 ldi r23,hi8(3) + 4330 1986 0E94 0000 call __divmodhi4 + 4331 198a 0197 sbiw r24,1 + 4332 198c 01F0 breq .L311 + 4333 198e AA24 clr r10 + 4334 1990 BB24 clr r11 + 4335 1992 00C0 rjmp .L362 + 4336 .L311: + 4337 1994 31E0 ldi r19,lo8(1) + 4338 1996 A32E mov r10,r19 + 4339 1998 B12C mov r11,__zero_reg__ + 4340 .L362: + 4341 199a 3324 clr r3 + 4342 199c 3394 inc r3 + 4343 199e 00C0 rjmp .L312 + 4344 .LVL353: + 4345 .L310: + 4346 19a0 3324 clr r3 + 4347 .L312: + 4348 .LM446: + 4349 19a2 21E0 ldi r18,lo8(1) + 4350 19a4 C216 cp r12,r18 + 4351 19a6 D104 cpc r13,__zero_reg__ + 4352 19a8 01F4 brne .L313 + 4353 19aa 37E0 ldi r19,lo8(7) + 4354 19ac 4316 cp r4,r19 + 4355 19ae 5104 cpc r5,__zero_reg__ + 4356 19b0 01F4 brne .L313 + 4357 .LM447: + 4358 19b2 0E94 0000 call rand + 4359 .LVL354: + 4360 19b6 63E0 ldi r22,lo8(3) + 4361 19b8 70E0 ldi r23,hi8(3) + 4362 19ba 0E94 0000 call __divmodhi4 + 4363 19be 0197 sbiw r24,1 + 4364 19c0 01F0 breq .L314 + 4365 19c2 CC24 clr r12 + 4366 19c4 DD24 clr r13 + 4367 19c6 00C0 rjmp .L363 + 4368 .L314: + 4369 19c8 CC24 clr r12 + 4370 19ca CA94 dec r12 + 4371 19cc DC2C mov r13,r12 + 4372 .L363: + 4373 19ce 11E0 ldi r17,lo8(1) + 4374 .LVL355: + 4375 .L313: + 4376 .LM448: + 4377 19d0 81E0 ldi r24,lo8(1) + 4378 19d2 8816 cp r8,r24 + 4379 19d4 9104 cpc r9,__zero_reg__ + 4380 .LVL356: + 4381 19d6 01F4 brne .L315 + 4382 19d8 97E0 ldi r25,lo8(7) + 4383 19da 6916 cp r6,r25 + 4384 19dc 7104 cpc r7,__zero_reg__ + 4385 19de 01F4 brne .L315 + 4386 .LM449: + 4387 19e0 0E94 0000 call rand + 4388 19e4 63E0 ldi r22,lo8(3) + 4389 19e6 70E0 ldi r23,hi8(3) + 4390 19e8 0E94 0000 call __divmodhi4 + 4391 19ec 0197 sbiw r24,1 + 4392 19ee 01F0 breq .L316 + 4393 19f0 8824 clr r8 + 4394 19f2 9924 clr r9 + 4395 19f4 00C0 rjmp .L364 + 4396 .L316: + 4397 19f6 8824 clr r8 + 4398 19f8 8A94 dec r8 + 4399 19fa 982C mov r9,r8 + 4400 .L364: + 4401 19fc 01E0 ldi r16,lo8(1) + 4402 .L315: + 4403 .LM450: + 4404 19fe E1E0 ldi r30,lo8(1) + 4405 1a00 AE16 cp r10,r30 + 4406 1a02 B104 cpc r11,__zero_reg__ + 4407 1a04 01F4 brne .L317 + 4408 1a06 F7E0 ldi r31,lo8(7) + 4409 1a08 EF16 cp r14,r31 + 4410 1a0a F104 cpc r15,__zero_reg__ + 4411 1a0c 01F4 brne .L317 + 4412 .LM451: + 4413 1a0e 0E94 0000 call rand + 4414 1a12 63E0 ldi r22,lo8(3) + 4415 1a14 70E0 ldi r23,hi8(3) + 4416 1a16 0E94 0000 call __divmodhi4 + 4417 1a1a 0197 sbiw r24,1 + 4418 1a1c 01F0 breq .L318 + 4419 1a1e AA24 clr r10 + 4420 1a20 BB24 clr r11 + 4421 1a22 00C0 rjmp .L365 + 4422 .L318: + 4423 1a24 AA24 clr r10 + 4424 1a26 AA94 dec r10 + 4425 1a28 BA2C mov r11,r10 + 4426 .L365: + 4427 1a2a 3324 clr r3 + 4428 1a2c 3394 inc r3 + 4429 .L317: + 4430 .LM452: + 4431 1a2e 1123 tst r17 + 4432 1a30 01F0 breq .L319 + 4433 .LM453: + 4434 1a32 8114 cp r8,__zero_reg__ + 4435 1a34 9104 cpc r9,__zero_reg__ + 4436 1a36 01F4 brne .L320 + 4437 .LM454: + 4438 1a38 27E0 ldi r18,lo8(7) + 4439 1a3a 6216 cp r6,r18 + 4440 1a3c 7104 cpc r7,__zero_reg__ + 4441 1a3e 01F0 breq .L321 + 4442 .LM455: + 4443 1a40 6114 cp r6,__zero_reg__ + 4444 1a42 7104 cpc r7,__zero_reg__ + 4445 1a44 01F0 breq .L322 + 4446 .LM456: + 4447 1a46 0E94 0000 call rand + 4448 1a4a 80FD sbrc r24,0 + 4449 1a4c 00C0 rjmp .L322 + 4450 .L321: + 4451 1a4e 8824 clr r8 + 4452 1a50 8A94 dec r8 + 4453 1a52 982C mov r9,r8 + 4454 1a54 00C0 rjmp .L320 + 4455 .L322: + 4456 1a56 21E0 ldi r18,lo8(1) + 4457 1a58 822E mov r8,r18 + 4458 1a5a 912C mov r9,__zero_reg__ + 4459 .L320: + 4460 .LM457: + 4461 1a5c A114 cp r10,__zero_reg__ + 4462 1a5e B104 cpc r11,__zero_reg__ + 4463 1a60 01F4 brne .L319 + 4464 .LM458: + 4465 1a62 37E0 ldi r19,lo8(7) + 4466 1a64 E316 cp r14,r19 + 4467 1a66 F104 cpc r15,__zero_reg__ + 4468 1a68 01F0 breq .L323 + 4469 .LM459: + 4470 1a6a E114 cp r14,__zero_reg__ + 4471 1a6c F104 cpc r15,__zero_reg__ + 4472 1a6e 01F0 breq .L324 + 4473 .LM460: + 4474 1a70 0E94 0000 call rand + 4475 1a74 80FD sbrc r24,0 + 4476 1a76 00C0 rjmp .L324 + 4477 .L323: + 4478 1a78 AA24 clr r10 + 4479 1a7a AA94 dec r10 + 4480 1a7c BA2C mov r11,r10 + 4481 1a7e 00C0 rjmp .L319 + 4482 .L324: + 4483 1a80 91E0 ldi r25,lo8(1) + 4484 1a82 A92E mov r10,r25 + 4485 1a84 B12C mov r11,__zero_reg__ + 4486 .L319: + 4487 .LM461: + 4488 1a86 0023 tst r16 + 4489 1a88 01F0 breq .L325 + 4490 .LM462: + 4491 1a8a C114 cp r12,__zero_reg__ + 4492 1a8c D104 cpc r13,__zero_reg__ + 4493 1a8e 01F4 brne .L326 + 4494 .LM463: + 4495 1a90 87E0 ldi r24,lo8(7) + 4496 1a92 4816 cp r4,r24 + 4497 1a94 5104 cpc r5,__zero_reg__ + 4498 1a96 01F0 breq .L327 + 4499 .LM464: + 4500 1a98 4114 cp r4,__zero_reg__ + 4501 1a9a 5104 cpc r5,__zero_reg__ + 4502 1a9c 01F0 breq .L328 + 4503 .LM465: + 4504 1a9e 0E94 0000 call rand + 4505 1aa2 80FD sbrc r24,0 + 4506 1aa4 00C0 rjmp .L328 + 4507 .L327: + 4508 1aa6 CC24 clr r12 + 4509 1aa8 CA94 dec r12 + 4510 1aaa DC2C mov r13,r12 + 4511 1aac 00C0 rjmp .L326 + 4512 .L328: + 4513 1aae 81E0 ldi r24,lo8(1) + 4514 1ab0 C82E mov r12,r24 + 4515 1ab2 D12C mov r13,__zero_reg__ + 4516 .L326: + 4517 .LM466: + 4518 1ab4 A114 cp r10,__zero_reg__ + 4519 1ab6 B104 cpc r11,__zero_reg__ + 4520 1ab8 01F4 brne .L325 + 4521 .LM467: + 4522 1aba 93E0 ldi r25,lo8(3) + 4523 1abc E916 cp r14,r25 + 4524 1abe F104 cpc r15,__zero_reg__ + 4525 1ac0 01F0 breq .L329 + 4526 .LM468: + 4527 1ac2 E114 cp r14,__zero_reg__ + 4528 1ac4 F104 cpc r15,__zero_reg__ + 4529 1ac6 01F0 breq .L330 + 4530 .LM469: + 4531 1ac8 0E94 0000 call rand + 4532 1acc 80FD sbrc r24,0 + 4533 1ace 00C0 rjmp .L330 + 4534 .L329: + 4535 1ad0 AA24 clr r10 + 4536 1ad2 AA94 dec r10 + 4537 1ad4 BA2C mov r11,r10 + 4538 1ad6 00C0 rjmp .L325 + 4539 .L330: + 4540 1ad8 01E0 ldi r16,lo8(1) + 4541 1ada A02E mov r10,r16 + 4542 1adc B12C mov r11,__zero_reg__ + 4543 .LVL357: + 4544 .L325: + 4545 .LM470: + 4546 1ade 3320 tst r3 + 4547 1ae0 01F0 breq .L331 + 4548 .LM471: + 4549 1ae2 8114 cp r8,__zero_reg__ + 4550 1ae4 9104 cpc r9,__zero_reg__ + 4551 1ae6 01F4 brne .L332 + 4552 .LM472: + 4553 1ae8 E7E0 ldi r30,lo8(7) + 4554 1aea 6E16 cp r6,r30 + 4555 1aec 7104 cpc r7,__zero_reg__ + 4556 1aee 01F0 breq .L333 + 4557 .LM473: + 4558 1af0 6114 cp r6,__zero_reg__ + 4559 1af2 7104 cpc r7,__zero_reg__ + 4560 1af4 01F0 breq .L334 + 4561 .LM474: + 4562 1af6 0E94 0000 call rand + 4563 1afa 80FD sbrc r24,0 + 4564 1afc 00C0 rjmp .L334 + 4565 .L333: + 4566 1afe 8824 clr r8 + 4567 1b00 8A94 dec r8 + 4568 1b02 982C mov r9,r8 + 4569 1b04 00C0 rjmp .L332 + 4570 .L334: + 4571 1b06 11E0 ldi r17,lo8(1) + 4572 1b08 812E mov r8,r17 + 4573 1b0a 912C mov r9,__zero_reg__ + 4574 .LVL358: + 4575 .L332: + 4576 .LM475: + 4577 1b0c C114 cp r12,__zero_reg__ + 4578 1b0e D104 cpc r13,__zero_reg__ + 4579 1b10 01F4 brne .L331 + 4580 .LM476: + 4581 1b12 F7E0 ldi r31,lo8(7) + 4582 1b14 4F16 cp r4,r31 + 4583 1b16 5104 cpc r5,__zero_reg__ + 4584 1b18 01F4 brne .L335 + 4585 1b1a CC24 clr r12 + 4586 1b1c CA94 dec r12 + 4587 1b1e DC2C mov r13,r12 + 4588 1b20 00C0 rjmp .L336 + 4589 .L335: + 4590 .LM477: + 4591 1b22 4114 cp r4,__zero_reg__ + 4592 1b24 5104 cpc r5,__zero_reg__ + 4593 1b26 01F4 brne .L337 + 4594 1b28 B1E0 ldi r27,lo8(1) + 4595 1b2a CB2E mov r12,r27 + 4596 1b2c D12C mov r13,__zero_reg__ + 4597 1b2e 00C0 rjmp .L338 + 4598 .L337: + 4599 .LM478: + 4600 1b30 0E94 0000 call rand + 4601 1b34 80FF sbrs r24,0 + 4602 1b36 00C0 rjmp .L339 + 4603 1b38 A1E0 ldi r26,lo8(1) + 4604 1b3a CA2E mov r12,r26 + 4605 1b3c D12C mov r13,__zero_reg__ + 4606 1b3e 00C0 rjmp .L340 + 4607 .L331: + 4608 .LM479: + 4609 1b40 4114 cp r4,__zero_reg__ + 4610 1b42 5104 cpc r5,__zero_reg__ + 4611 1b44 01F4 brne .L341 + 4612 .L338: + 4613 1b46 6114 cp r6,__zero_reg__ + 4614 1b48 7104 cpc r7,__zero_reg__ + 4615 1b4a 01F4 brne .L342 + 4616 1b4c E114 cp r14,__zero_reg__ + 4617 1b4e F104 cpc r15,__zero_reg__ + 4618 1b50 01F0 breq .L343 + 4619 1b52 27E0 ldi r18,lo8(7) + 4620 1b54 E216 cp r14,r18 + 4621 1b56 F104 cpc r15,__zero_reg__ + 4622 1b58 01F4 brne .L341 + 4623 1b5a 00C0 rjmp .L343 + 4624 .L342: + 4625 1b5c 37E0 ldi r19,lo8(7) + 4626 1b5e 6316 cp r6,r19 + 4627 1b60 7104 cpc r7,__zero_reg__ + 4628 1b62 01F4 brne .L341 + 4629 1b64 E114 cp r14,__zero_reg__ + 4630 1b66 F104 cpc r15,__zero_reg__ + 4631 1b68 01F0 breq .L343 + 4632 1b6a 87E0 ldi r24,lo8(7) + 4633 1b6c E816 cp r14,r24 + 4634 1b6e F104 cpc r15,__zero_reg__ + 4635 1b70 01F0 breq .L343 + 4636 .L341: + 4637 1b72 97E0 ldi r25,lo8(7) + 4638 1b74 4916 cp r4,r25 + 4639 1b76 5104 cpc r5,__zero_reg__ + 4640 1b78 01F4 brne .L340 + 4641 .L336: + 4642 1b7a 6114 cp r6,__zero_reg__ + 4643 1b7c 7104 cpc r7,__zero_reg__ + 4644 1b7e 01F4 brne .L344 + 4645 1b80 E114 cp r14,__zero_reg__ + 4646 1b82 F104 cpc r15,__zero_reg__ + 4647 1b84 01F0 breq .L343 + 4648 1b86 E7E0 ldi r30,lo8(7) + 4649 1b88 EE16 cp r14,r30 + 4650 1b8a F104 cpc r15,__zero_reg__ + 4651 1b8c 01F4 brne .L340 + 4652 1b8e 00C0 rjmp .L343 + 4653 .L344: + 4654 1b90 F7E0 ldi r31,lo8(7) + 4655 1b92 6F16 cp r6,r31 + 4656 1b94 7104 cpc r7,__zero_reg__ + 4657 1b96 01F4 brne .L340 + 4658 1b98 E114 cp r14,__zero_reg__ + 4659 1b9a F104 cpc r15,__zero_reg__ + 4660 1b9c 01F0 breq .L343 + 4661 1b9e 27E0 ldi r18,lo8(7) + 4662 1ba0 E216 cp r14,r18 + 4663 1ba2 F104 cpc r15,__zero_reg__ + 4664 1ba4 01F4 brne .L340 + 4665 .L343: + 4666 .LM480: + 4667 1ba6 0E94 0000 call rand + 4668 1baa 63E0 ldi r22,lo8(3) + 4669 1bac 70E0 ldi r23,hi8(3) + 4670 1bae 0E94 0000 call __divmodhi4 + 4671 .LM481: + 4672 1bb2 0097 sbiw r24,0 + 4673 .LVL359: + 4674 1bb4 01F4 brne .L345 + 4675 1bb6 CC24 clr r12 + 4676 1bb8 DD24 clr r13 + 4677 1bba 00C0 rjmp .L340 + 4678 .L345: + 4679 .LM482: + 4680 1bbc 8130 cpi r24,1 + 4681 1bbe 9105 cpc r25,__zero_reg__ + 4682 1bc0 01F4 brne .L346 + 4683 1bc2 8824 clr r8 + 4684 1bc4 9924 clr r9 + 4685 1bc6 00C0 rjmp .L340 + 4686 .L346: + 4687 .LM483: + 4688 1bc8 8230 cpi r24,2 + 4689 1bca 9105 cpc r25,__zero_reg__ + 4690 1bcc 01F4 brne .L340 + 4691 1bce AA24 clr r10 + 4692 1bd0 BB24 clr r11 + 4693 .L340: + 4694 .LM484: + 4695 1bd2 4C0C add r4,r12 + 4696 1bd4 5D1C adc r5,r13 + 4697 .LM485: + 4698 1bd6 680C add r6,r8 + 4699 1bd8 791C adc r7,r9 + 4700 .LM486: + 4701 1bda EA0C add r14,r10 + 4702 1bdc FB1C adc r15,r11 + 4703 .LM487: + 4704 1bde 31E0 ldi r19,lo8(1) + 4705 1be0 2316 cp r2,r19 + 4706 1be2 01F4 brne .L347 + 4707 .LM488: + 4708 1be4 C201 movw r24,r4 + 4709 .LVL360: + 4710 1be6 B301 movw r22,r6 + 4711 1be8 A701 movw r20,r14 + 4712 1bea 0E94 0000 call setvoxel + 4713 .LM489: + 4714 1bee 8BA9 ldd r24,Y+51 + 4715 1bf0 9CA9 ldd r25,Y+52 + 4716 1bf2 0E94 0000 call delay_ms + 4717 .LM490: + 4718 1bf6 C201 movw r24,r4 + 4719 1bf8 B301 movw r22,r6 + 4720 1bfa A701 movw r20,r14 + 4721 1bfc 0E94 0000 call clrvoxel + 4722 1c00 00C0 rjmp .L348 + 4723 .LVL361: + 4724 .L347: + 4725 .LM491: + 4726 1c02 82E0 ldi r24,lo8(2) + 4727 .LVL362: + 4728 1c04 2816 cp r2,r24 + 4729 1c06 01F4 brne .L349 + 4730 .LM492: + 4731 1c08 C201 movw r24,r4 + 4732 1c0a B301 movw r22,r6 + 4733 1c0c A701 movw r20,r14 + 4734 1c0e 0E94 0000 call flpvoxel + 4735 .LM493: + 4736 1c12 8BA9 ldd r24,Y+51 + 4737 1c14 9CA9 ldd r25,Y+52 + 4738 1c16 0E94 0000 call delay_ms + 4739 1c1a 00C0 rjmp .L348 + 4740 .L349: + 4741 .LM494: + 4742 1c1c 93E0 ldi r25,lo8(3) + 4743 1c1e 2916 cp r2,r25 + 4744 1c20 01F0 breq .+2 + 4745 1c22 00C0 rjmp .L348 + 4746 1c24 FE01 movw r30,r28 + 4747 1c26 B596 adiw r30,37 + 4748 .L350: + 4749 .LM495: + 4750 1c28 8081 ld r24,Z + 4751 1c2a 9181 ldd r25,Z+1 + 4752 1c2c 9783 std Z+7,r25 + 4753 1c2e 8683 std Z+6,r24 + 4754 .LM496: + 4755 1c30 8281 ldd r24,Z+2 + 4756 1c32 9381 ldd r25,Z+3 + 4757 1c34 9187 std Z+9,r25 + 4758 1c36 8087 std Z+8,r24 + 4759 .LM497: + 4760 1c38 8481 ldd r24,Z+4 + 4761 1c3a 9581 ldd r25,Z+5 + 4762 1c3c 9387 std Z+11,r25 + 4763 1c3e 8287 std Z+10,r24 + 4764 1c40 3697 sbiw r30,6 + 4765 .LM498: + 4766 1c42 2FA9 ldd r18,Y+55 + 4767 1c44 38AD ldd r19,Y+56 + 4768 1c46 E217 cp r30,r18 + 4769 1c48 F307 cpc r31,r19 + 4770 1c4a 01F4 brne .L350 + 4771 .LM499: + 4772 1c4c 5A82 std Y+2,r5 + 4773 1c4e 4982 std Y+1,r4 + 4774 .LM500: + 4775 1c50 7C82 std Y+4,r7 + 4776 1c52 6B82 std Y+3,r6 + 4777 .LM501: + 4778 1c54 FE82 std Y+6,r15 + 4779 1c56 ED82 std Y+5,r14 + 4780 1c58 8E01 movw r16,r28 + 4781 .LVL363: + 4782 1c5a 0F5F subi r16,lo8(-(1)) + 4783 1c5c 1F4F sbci r17,hi8(-(1)) + 4784 .L351: + 4785 .LM502: + 4786 1c5e F801 movw r30,r16 + 4787 1c60 6281 ldd r22,Z+2 + 4788 1c62 7381 ldd r23,Z+3 + 4789 1c64 4481 ldd r20,Z+4 + 4790 1c66 5581 ldd r21,Z+5 + 4791 1c68 8081 ld r24,Z + 4792 1c6a 9181 ldd r25,Z+1 + 4793 1c6c 0E94 0000 call setvoxel + 4794 1c70 0A5F subi r16,lo8(-(6)) + 4795 1c72 1F4F sbci r17,hi8(-(6)) + 4796 .LM503: + 4797 1c74 2DA9 ldd r18,Y+53 + 4798 1c76 3EA9 ldd r19,Y+54 + 4799 1c78 0217 cp r16,r18 + 4800 1c7a 1307 cpc r17,r19 + 4801 1c7c 01F4 brne .L351 + 4802 .LM504: + 4803 1c7e 8BA9 ldd r24,Y+51 + 4804 1c80 9CA9 ldd r25,Y+52 + 4805 1c82 0E94 0000 call delay_ms + 4806 1c86 8E01 movw r16,r28 + 4807 1c88 0F5F subi r16,lo8(-(1)) + 4808 1c8a 1F4F sbci r17,hi8(-(1)) + 4809 .L352: + 4810 .LM505: + 4811 1c8c F801 movw r30,r16 + 4812 1c8e 6281 ldd r22,Z+2 + 4813 1c90 7381 ldd r23,Z+3 + 4814 1c92 4481 ldd r20,Z+4 + 4815 1c94 5581 ldd r21,Z+5 + 4816 1c96 8081 ld r24,Z + 4817 1c98 9181 ldd r25,Z+1 + 4818 1c9a 0E94 0000 call clrvoxel + 4819 1c9e 0A5F subi r16,lo8(-(6)) + 4820 1ca0 1F4F sbci r17,hi8(-(6)) + 4821 .LM506: + 4822 1ca2 2DA9 ldd r18,Y+53 + 4823 1ca4 3EA9 ldd r19,Y+54 + 4824 1ca6 0217 cp r16,r18 + 4825 1ca8 1307 cpc r17,r19 + 4826 1caa 01F4 brne .L352 + 4827 .LVL364: + 4828 .L348: + 4829 .LM507: + 4830 1cac 89A9 ldd r24,Y+49 + 4831 1cae 9AA9 ldd r25,Y+50 + 4832 1cb0 0197 sbiw r24,1 + 4833 1cb2 9AAB std Y+50,r25 + 4834 1cb4 89AB std Y+49,r24 + 4835 .LVL365: + 4836 .L300: + 4837 .LM508: + 4838 1cb6 E9A9 ldd r30,Y+49 + 4839 1cb8 FAA9 ldd r31,Y+50 + 4840 1cba EF2B or r30,r31 + 4841 1cbc 01F0 breq .+2 + 4842 1cbe 00C0 rjmp .L353 + 4843 1cc0 00C0 rjmp .L366 + 4844 .L339: + 4845 .LM509: + 4846 1cc2 CC24 clr r12 + 4847 1cc4 CA94 dec r12 + 4848 1cc6 DC2C mov r13,r12 + 4849 1cc8 00C0 rjmp .L340 + 4850 .L366: + 4851 /* epilogue start */ + 4852 1cca E896 adiw r28,56 + 4853 1ccc 0FB6 in __tmp_reg__,__SREG__ + 4854 1cce F894 cli + 4855 1cd0 DEBF out __SP_H__,r29 + 4856 1cd2 0FBE out __SREG__,__tmp_reg__ + 4857 1cd4 CDBF out __SP_L__,r28 + 4858 1cd6 CF91 pop r28 + 4859 1cd8 DF91 pop r29 + 4860 1cda 1F91 pop r17 + 4861 .LVL366: + 4862 1cdc 0F91 pop r16 + 4863 .LVL367: + 4864 1cde FF90 pop r15 + 4865 1ce0 EF90 pop r14 + 4866 .LVL368: + 4867 1ce2 DF90 pop r13 + 4868 1ce4 CF90 pop r12 + 4869 .LVL369: + 4870 1ce6 BF90 pop r11 + 4871 1ce8 AF90 pop r10 + 4872 .LVL370: + 4873 1cea 9F90 pop r9 + 4874 1cec 8F90 pop r8 + 4875 .LVL371: + 4876 1cee 7F90 pop r7 + 4877 1cf0 6F90 pop r6 + 4878 .LVL372: + 4879 1cf2 5F90 pop r5 + 4880 1cf4 4F90 pop r4 + 4881 .LVL373: + 4882 1cf6 3F90 pop r3 + 4883 .LVL374: + 4884 1cf8 2F90 pop r2 + 4885 .LVL375: + 4886 1cfa 0895 ret + 4887 .LFE13: + 4889 .global sendplane_rand_z + 4891 sendplane_rand_z: + 4892 .LFB11: + 4893 .LM510: + 4894 .LVL376: + 4895 1cfc CF92 push r12 + 4896 1cfe DF92 push r13 + 4897 1d00 EF92 push r14 + 4898 1d02 FF92 push r15 + 4899 1d04 0F93 push r16 + 4900 1d06 1F93 push r17 + 4901 1d08 CF93 push r28 + 4902 1d0a DF93 push r29 + 4903 /* prologue: function */ + 4904 /* frame size = 0 */ + 4905 1d0c F82E mov r15,r24 + 4906 1d0e 6B01 movw r12,r22 + 4907 1d10 EA01 movw r28,r20 + 4908 .LM511: + 4909 1d12 80E0 ldi r24,lo8(0) + 4910 .LVL377: + 4911 1d14 0E94 0000 call fill + 4912 .LVL378: + 4913 .LM512: + 4914 1d18 8F2D mov r24,r15 + 4915 1d1a 90E0 ldi r25,lo8(0) + 4916 1d1c 0E94 0000 call setplane_z + 4917 1d20 10E1 ldi r17,lo8(16) + 4918 .LVL379: + 4919 .L372: + 4920 .LM513: + 4921 1d22 0E94 0000 call rand + 4922 1d26 64E0 ldi r22,lo8(4) + 4923 1d28 70E0 ldi r23,hi8(4) + 4924 1d2a 0E94 0000 call __divmodhi4 + 4925 1d2e E82E mov r14,r24 + 4926 .LM514: + 4927 1d30 0E94 0000 call rand + 4928 1d34 64E0 ldi r22,lo8(4) + 4929 1d36 70E0 ldi r23,hi8(4) + 4930 1d38 0E94 0000 call __divmodhi4 + 4931 1d3c 082F mov r16,r24 + 4932 .LM515: + 4933 1d3e 8E2D mov r24,r14 + 4934 1d40 90E0 ldi r25,lo8(0) + 4935 1d42 602F mov r22,r16 + 4936 1d44 70E0 ldi r23,lo8(0) + 4937 1d46 4F2D mov r20,r15 + 4938 1d48 50E0 ldi r21,lo8(0) + 4939 1d4a 0E94 0000 call getvoxel + 4940 1d4e 8823 tst r24 + 4941 1d50 01F0 breq .L372 + 4942 .LM516: + 4943 1d52 8E2D mov r24,r14 + 4944 1d54 602F mov r22,r16 + 4945 1d56 4F2D mov r20,r15 + 4946 1d58 9601 movw r18,r12 + 4947 1d5a 0E94 0000 call sendvoxel_z + 4948 .LM517: + 4949 1d5e CE01 movw r24,r28 + 4950 1d60 0E94 0000 call delay_ms + 4951 .LM518: + 4952 1d64 1150 subi r17,lo8(-(-1)) + 4953 .LM519: + 4954 1d66 01F4 brne .L372 + 4955 /* epilogue start */ + 4956 .LM520: + 4957 1d68 DF91 pop r29 + 4958 1d6a CF91 pop r28 + 4959 .LVL380: + 4960 1d6c 1F91 pop r17 + 4961 .LVL381: + 4962 1d6e 0F91 pop r16 + 4963 1d70 FF90 pop r15 + 4964 .LVL382: + 4965 1d72 EF90 pop r14 + 4966 1d74 DF90 pop r13 + 4967 1d76 CF90 pop r12 + 4968 .LVL383: + 4969 1d78 0895 ret + 4970 .LFE11: + 4972 .global effect_box_woopwoop + 4974 effect_box_woopwoop: + 4975 .LFB9: + 4976 .LM521: + 4977 .LVL384: + 4978 1d7a AF92 push r10 + 4979 1d7c BF92 push r11 + 4980 1d7e CF92 push r12 + 4981 1d80 DF92 push r13 + 4982 1d82 EF92 push r14 + 4983 1d84 FF92 push r15 + 4984 1d86 0F93 push r16 + 4985 1d88 1F93 push r17 + 4986 1d8a CF93 push r28 + 4987 1d8c DF93 push r29 + 4988 /* prologue: function */ + 4989 /* frame size = 0 */ + 4990 1d8e 6C01 movw r12,r24 + 4991 1d90 8B01 movw r16,r22 + 4992 .LM522: + 4993 1d92 80E0 ldi r24,lo8(0) + 4994 .LVL385: + 4995 1d94 0E94 0000 call fill + 4996 .LVL386: + 4997 .LM523: + 4998 1d98 0130 cpi r16,1 + 4999 1d9a 1105 cpc r17,__zero_reg__ + 5000 1d9c 01F4 brne .L374 + 5001 1d9e C3E0 ldi r28,lo8(3) + 5002 1da0 D0E0 ldi r29,hi8(3) + 5003 1da2 A7E0 ldi r26,lo8(7) + 5004 1da4 AA2E mov r10,r26 + 5005 1da6 B12C mov r11,__zero_reg__ + 5006 .L375: + 5007 1da8 A501 movw r20,r10 + 5008 1daa 4C1B sub r20,r28 + 5009 1dac 5D0B sbc r21,r29 + 5010 .LM524: + 5011 1dae CA01 movw r24,r20 + 5012 1db0 BA01 movw r22,r20 + 5013 1db2 9E01 movw r18,r28 + 5014 1db4 8E01 movw r16,r28 + 5015 .LVL387: + 5016 1db6 7E01 movw r14,r28 + 5017 1db8 0E94 0000 call box_wireframe + 5018 .LM525: + 5019 1dbc C601 movw r24,r12 + 5020 1dbe 0E94 0000 call delay_ms + 5021 .LM526: + 5022 1dc2 80E0 ldi r24,lo8(0) + 5023 1dc4 0E94 0000 call fill + 5024 1dc8 2197 sbiw r28,1 + 5025 .LM527: + 5026 1dca 8FEF ldi r24,hi8(-1) + 5027 1dcc CF3F cpi r28,lo8(-1) + 5028 1dce D807 cpc r29,r24 + 5029 1dd0 01F4 brne .L375 + 5030 1dd2 00C0 rjmp .L378 + 5031 .LVL388: + 5032 .L374: + 5033 1dd4 C0E0 ldi r28,lo8(0) + 5034 1dd6 D0E0 ldi r29,hi8(0) + 5035 1dd8 F7E0 ldi r31,lo8(7) + 5036 1dda AF2E mov r10,r31 + 5037 1ddc B12C mov r11,__zero_reg__ + 5038 .L377: + 5039 1dde A501 movw r20,r10 + 5040 1de0 4C1B sub r20,r28 + 5041 1de2 5D0B sbc r21,r29 + 5042 .LM528: + 5043 1de4 CA01 movw r24,r20 + 5044 1de6 BA01 movw r22,r20 + 5045 1de8 9E01 movw r18,r28 + 5046 1dea 8E01 movw r16,r28 + 5047 .LVL389: + 5048 1dec 7E01 movw r14,r28 + 5049 1dee 0E94 0000 call box_wireframe + 5050 .LM529: + 5051 1df2 C601 movw r24,r12 + 5052 1df4 0E94 0000 call delay_ms + 5053 .LM530: + 5054 1df8 80E0 ldi r24,lo8(0) + 5055 1dfa 0E94 0000 call fill + 5056 1dfe 2196 adiw r28,1 + 5057 .LM531: + 5058 1e00 C430 cpi r28,4 + 5059 1e02 D105 cpc r29,__zero_reg__ + 5060 1e04 01F4 brne .L377 + 5061 .L378: + 5062 /* epilogue start */ + 5063 .LM532: + 5064 1e06 DF91 pop r29 + 5065 1e08 CF91 pop r28 + 5066 1e0a 1F91 pop r17 + 5067 1e0c 0F91 pop r16 + 5068 1e0e FF90 pop r15 + 5069 1e10 EF90 pop r14 + 5070 1e12 DF90 pop r13 + 5071 1e14 CF90 pop r12 + 5072 .LVL390: + 5073 1e16 BF90 pop r11 + 5074 1e18 AF90 pop r10 + 5075 1e1a 0895 ret + 5076 .LFE9: + 5078 .global effect_box_shrink_grow + 5080 effect_box_shrink_grow: + 5081 .LFB8: + 5082 .LM533: + 5083 .LVL391: + 5084 1e1c 2F92 push r2 + 5085 1e1e 3F92 push r3 + 5086 1e20 4F92 push r4 + 5087 1e22 5F92 push r5 + 5088 1e24 6F92 push r6 + 5089 1e26 7F92 push r7 + 5090 1e28 8F92 push r8 + 5091 1e2a 9F92 push r9 + 5092 1e2c AF92 push r10 + 5093 1e2e BF92 push r11 + 5094 1e30 CF92 push r12 + 5095 1e32 DF92 push r13 + 5096 1e34 EF92 push r14 + 5097 1e36 FF92 push r15 + 5098 1e38 0F93 push r16 + 5099 1e3a 1F93 push r17 + 5100 1e3c DF93 push r29 + 5101 1e3e CF93 push r28 + 5102 1e40 CDB7 in r28,__SP_L__ + 5103 1e42 DEB7 in r29,__SP_H__ + 5104 1e44 2C97 sbiw r28,12 + 5105 1e46 0FB6 in __tmp_reg__,__SREG__ + 5106 1e48 F894 cli + 5107 1e4a DEBF out __SP_H__,r29 + 5108 1e4c 0FBE out __SREG__,__tmp_reg__ + 5109 1e4e CDBF out __SP_L__,r28 + 5110 /* prologue: function */ + 5111 /* frame size = 12 */ + 5112 1e50 9C83 std Y+4,r25 + 5113 1e52 8B83 std Y+3,r24 + 5114 1e54 7E83 std Y+6,r23 + 5115 1e56 6D83 std Y+5,r22 + 5116 1e58 5887 std Y+8,r21 + 5117 1e5a 4F83 std Y+7,r20 + 5118 1e5c 3A87 std Y+10,r19 + 5119 1e5e 2987 std Y+9,r18 + 5120 .LM534: + 5121 1e60 1A82 std Y+2,__zero_reg__ + 5122 1e62 1982 std Y+1,__zero_reg__ + 5123 .LVL392: + 5124 1e64 8824 clr r8 + 5125 1e66 9924 clr r9 + 5126 .LVL393: + 5127 1e68 AA24 clr r10 + 5128 1e6a BB24 clr r11 + 5129 .LVL394: + 5130 1e6c CC24 clr r12 + 5131 1e6e DD24 clr r13 + 5132 .LVL395: + 5133 1e70 2224 clr r2 + 5134 1e72 3324 clr r3 + 5135 .LVL396: + 5136 1e74 4424 clr r4 + 5137 1e76 5524 clr r5 + 5138 .LVL397: + 5139 1e78 6624 clr r6 + 5140 1e7a 7724 clr r7 + 5141 .LVL398: + 5142 1e7c 00C0 rjmp .L382 + 5143 .LVL399: + 5144 .L409: + 5145 .LM535: + 5146 1e7e 1C86 std Y+12,__zero_reg__ + 5147 1e80 1B86 std Y+11,__zero_reg__ + 5148 .L395: + 5149 1e82 87E0 ldi r24,lo8(7) + 5150 1e84 90E0 ldi r25,hi8(7) + 5151 .LVL400: + 5152 1e86 2B85 ldd r18,Y+11 + 5153 1e88 3C85 ldd r19,Y+12 + 5154 1e8a 821B sub r24,r18 + 5155 1e8c 930B sbc r25,r19 + 5156 .LM536: + 5157 1e8e EF81 ldd r30,Y+7 + 5158 1e90 F885 ldd r31,Y+8 + 5159 1e92 3097 sbiw r30,0 + 5160 1e94 01F4 brne .+2 + 5161 1e96 00C0 rjmp .L383 + 5162 .LM537: + 5163 1e98 3197 sbiw r30,1 + 5164 1e9a 01F4 brne .L384 + 5165 1e9c 6901 movw r12,r18 + 5166 1e9e 47E0 ldi r20,lo8(7) + 5167 1ea0 642E mov r6,r20 + 5168 1ea2 712C mov r7,__zero_reg__ + 5169 1ea4 00C0 rjmp .L385 + 5170 .LVL401: + 5171 .L384: + 5172 .LM538: + 5173 1ea6 2F81 ldd r18,Y+7 + 5174 1ea8 3885 ldd r19,Y+8 + 5175 1eaa 2230 cpi r18,2 + 5176 1eac 3105 cpc r19,__zero_reg__ + 5177 1eae 01F4 brne .L386 + 5178 1eb0 4B84 ldd r4,Y+11 + 5179 1eb2 5C84 ldd r5,Y+12 + 5180 1eb4 1C01 movw r2,r24 + 5181 1eb6 3C01 movw r6,r24 + 5182 1eb8 8824 clr r8 + 5183 1eba 9924 clr r9 + 5184 1ebc 37E0 ldi r19,lo8(7) + 5185 1ebe A32E mov r10,r19 + 5186 1ec0 B12C mov r11,__zero_reg__ + 5187 1ec2 CC24 clr r12 + 5188 1ec4 DD24 clr r13 + 5189 1ec6 00C0 rjmp .L387 + 5190 .LVL402: + 5191 .L386: + 5192 .LM539: + 5193 1ec8 EF81 ldd r30,Y+7 + 5194 1eca F885 ldd r31,Y+8 + 5195 1ecc 3397 sbiw r30,3 + 5196 1ece 01F4 brne .L388 + 5197 1ed0 4B84 ldd r4,Y+11 + 5198 1ed2 5C84 ldd r5,Y+12 + 5199 1ed4 1C01 movw r2,r24 + 5200 1ed6 3201 movw r6,r4 + 5201 1ed8 8824 clr r8 + 5202 1eda 9924 clr r9 + 5203 1edc 27E0 ldi r18,lo8(7) + 5204 1ede A22E mov r10,r18 + 5205 1ee0 B12C mov r11,__zero_reg__ + 5206 1ee2 97E0 ldi r25,lo8(7) + 5207 1ee4 C92E mov r12,r25 + 5208 1ee6 D12C mov r13,__zero_reg__ + 5209 1ee8 00C0 rjmp .L389 + 5210 .LVL403: + 5211 .L388: + 5212 .LM540: + 5213 1eea 2F81 ldd r18,Y+7 + 5214 1eec 3885 ldd r19,Y+8 + 5215 1eee 2430 cpi r18,4 + 5216 1ef0 3105 cpc r19,__zero_reg__ + 5217 1ef2 01F4 brne .L390 + 5218 1ef4 2B84 ldd r2,Y+11 + 5219 1ef6 3C84 ldd r3,Y+12 + 5220 1ef8 2C01 movw r4,r24 + 5221 1efa 3C01 movw r6,r24 + 5222 1efc 87E0 ldi r24,lo8(7) + 5223 1efe 882E mov r8,r24 + 5224 1f00 912C mov r9,__zero_reg__ + 5225 .LVL404: + 5226 1f02 AA24 clr r10 + 5227 1f04 BB24 clr r11 + 5228 1f06 00C0 rjmp .L415 + 5229 .LVL405: + 5230 .L390: + 5231 .LM541: + 5232 1f08 EF81 ldd r30,Y+7 + 5233 1f0a F885 ldd r31,Y+8 + 5234 1f0c 3597 sbiw r30,5 + 5235 1f0e 01F4 brne .L387 + 5236 1f10 2B84 ldd r2,Y+11 + 5237 1f12 3C84 ldd r3,Y+12 + 5238 1f14 2C01 movw r4,r24 + 5239 1f16 3101 movw r6,r2 + 5240 1f18 07E0 ldi r16,lo8(7) + 5241 1f1a 802E mov r8,r16 + 5242 1f1c 912C mov r9,__zero_reg__ + 5243 1f1e AA24 clr r10 + 5244 1f20 BB24 clr r11 + 5245 1f22 00C0 rjmp .L414 + 5246 .LVL406: + 5247 .L387: + 5248 .LM542: + 5249 1f24 2F81 ldd r18,Y+7 + 5250 1f26 3885 ldd r19,Y+8 + 5251 1f28 2630 cpi r18,6 + 5252 1f2a 3105 cpc r19,__zero_reg__ + 5253 1f2c 01F4 brne .L389 + 5254 1f2e 2B84 ldd r2,Y+11 + 5255 1f30 3C84 ldd r3,Y+12 + 5256 1f32 2101 movw r4,r2 + 5257 1f34 3C01 movw r6,r24 + 5258 1f36 17E0 ldi r17,lo8(7) + 5259 1f38 812E mov r8,r17 + 5260 1f3a 912C mov r9,__zero_reg__ + 5261 1f3c B7E0 ldi r27,lo8(7) + 5262 1f3e AB2E mov r10,r27 + 5263 1f40 B12C mov r11,__zero_reg__ + 5264 .L415: + 5265 1f42 CC24 clr r12 + 5266 1f44 DD24 clr r13 + 5267 1f46 00C0 rjmp .L391 + 5268 .LVL407: + 5269 .L389: + 5270 .LM543: + 5271 1f48 8F81 ldd r24,Y+7 + 5272 1f4a 9885 ldd r25,Y+8 + 5273 .LVL408: + 5274 1f4c 0797 sbiw r24,7 + 5275 1f4e 01F4 brne .L391 + 5276 1f50 2B84 ldd r2,Y+11 + 5277 1f52 3C84 ldd r3,Y+12 + 5278 1f54 2101 movw r4,r2 + 5279 1f56 3101 movw r6,r2 + 5280 1f58 A7E0 ldi r26,lo8(7) + 5281 1f5a 8A2E mov r8,r26 + 5282 1f5c 912C mov r9,__zero_reg__ + 5283 1f5e F7E0 ldi r31,lo8(7) + 5284 1f60 AF2E mov r10,r31 + 5285 1f62 B12C mov r11,__zero_reg__ + 5286 .LVL409: + 5287 .L414: + 5288 1f64 E7E0 ldi r30,lo8(7) + 5289 1f66 CE2E mov r12,r30 + 5290 1f68 D12C mov r13,__zero_reg__ + 5291 .L391: + 5292 .LM544: + 5293 1f6a ED81 ldd r30,Y+5 + 5294 1f6c FE81 ldd r31,Y+6 + 5295 1f6e 3397 sbiw r30,3 + 5296 1f70 01F4 brne .L392 + 5297 .LM545: + 5298 1f72 C401 movw r24,r8 + 5299 .LVL410: + 5300 1f74 B501 movw r22,r10 + 5301 1f76 A601 movw r20,r12 + 5302 1f78 9101 movw r18,r2 + 5303 1f7a 8201 movw r16,r4 + 5304 1f7c 7301 movw r14,r6 + 5305 1f7e 0E94 0000 call box_filled + 5306 1f82 00C0 rjmp .L393 + 5307 .LVL411: + 5308 .L392: + 5309 .LM546: + 5310 1f84 2D81 ldd r18,Y+5 + 5311 1f86 3E81 ldd r19,Y+6 + 5312 1f88 2230 cpi r18,2 + 5313 1f8a 3105 cpc r19,__zero_reg__ + 5314 1f8c 01F4 brne .L394 + 5315 .LM547: + 5316 1f8e C401 movw r24,r8 + 5317 .LVL412: + 5318 1f90 B501 movw r22,r10 + 5319 1f92 A601 movw r20,r12 + 5320 1f94 9101 movw r18,r2 + 5321 1f96 8201 movw r16,r4 + 5322 1f98 7301 movw r14,r6 + 5323 1f9a 0E94 0000 call box_walls + 5324 1f9e 00C0 rjmp .L393 + 5325 .LVL413: + 5326 .L394: + 5327 .LM548: + 5328 1fa0 C401 movw r24,r8 + 5329 .LVL414: + 5330 1fa2 B501 movw r22,r10 + 5331 1fa4 A601 movw r20,r12 + 5332 1fa6 9101 movw r18,r2 + 5333 1fa8 8201 movw r16,r4 + 5334 1faa 7301 movw r14,r6 + 5335 1fac 0E94 0000 call box_wireframe + 5336 .L393: + 5337 .LM549: + 5338 1fb0 8985 ldd r24,Y+9 + 5339 1fb2 9A85 ldd r25,Y+10 + 5340 1fb4 0E94 0000 call delay_ms + 5341 .LM550: + 5342 1fb8 80E0 ldi r24,lo8(0) + 5343 1fba 0E94 0000 call fill + 5344 1fbe 8B85 ldd r24,Y+11 + 5345 1fc0 9C85 ldd r25,Y+12 + 5346 1fc2 0196 adiw r24,1 + 5347 1fc4 9C87 std Y+12,r25 + 5348 1fc6 8B87 std Y+11,r24 + 5349 .LM551: + 5350 1fc8 0897 sbiw r24,8 + 5351 1fca 01F0 breq .+2 + 5352 1fcc 00C0 rjmp .L395 + 5353 1fce E7E0 ldi r30,lo8(7) + 5354 1fd0 F0E0 ldi r31,hi8(7) + 5355 1fd2 FC87 std Y+12,r31 + 5356 1fd4 EB87 std Y+11,r30 + 5357 .L408: + 5358 1fd6 87E0 ldi r24,lo8(7) + 5359 1fd8 90E0 ldi r25,hi8(7) + 5360 .LVL415: + 5361 1fda 2B85 ldd r18,Y+11 + 5362 1fdc 3C85 ldd r19,Y+12 + 5363 1fde 821B sub r24,r18 + 5364 1fe0 930B sbc r25,r19 + 5365 .LM552: + 5366 1fe2 EF81 ldd r30,Y+7 + 5367 1fe4 F885 ldd r31,Y+8 + 5368 1fe6 3097 sbiw r30,0 + 5369 1fe8 01F4 brne .+2 + 5370 1fea 00C0 rjmp .L396 + 5371 .LM553: + 5372 1fec 3197 sbiw r30,1 + 5373 1fee 01F4 brne .L397 + 5374 1ff0 6901 movw r12,r18 + 5375 1ff2 77E0 ldi r23,lo8(7) + 5376 1ff4 672E mov r6,r23 + 5377 1ff6 712C mov r7,__zero_reg__ + 5378 1ff8 00C0 rjmp .L398 + 5379 .L397: + 5380 .LM554: + 5381 1ffa 2F81 ldd r18,Y+7 + 5382 1ffc 3885 ldd r19,Y+8 + 5383 1ffe 2230 cpi r18,2 + 5384 2000 3105 cpc r19,__zero_reg__ + 5385 2002 01F4 brne .L399 + 5386 2004 4B84 ldd r4,Y+11 + 5387 2006 5C84 ldd r5,Y+12 + 5388 2008 1C01 movw r2,r24 + 5389 200a 3C01 movw r6,r24 + 5390 200c 8824 clr r8 + 5391 200e 9924 clr r9 + 5392 2010 67E0 ldi r22,lo8(7) + 5393 2012 A62E mov r10,r22 + 5394 2014 B12C mov r11,__zero_reg__ + 5395 2016 CC24 clr r12 + 5396 2018 DD24 clr r13 + 5397 201a 00C0 rjmp .L400 + 5398 .LVL416: + 5399 .L399: + 5400 .LM555: + 5401 201c EF81 ldd r30,Y+7 + 5402 201e F885 ldd r31,Y+8 + 5403 2020 3397 sbiw r30,3 + 5404 2022 01F4 brne .L401 + 5405 2024 4B84 ldd r4,Y+11 + 5406 2026 5C84 ldd r5,Y+12 + 5407 2028 1C01 movw r2,r24 + 5408 202a 3201 movw r6,r4 + 5409 202c 8824 clr r8 + 5410 202e 9924 clr r9 + 5411 2030 57E0 ldi r21,lo8(7) + 5412 2032 A52E mov r10,r21 + 5413 2034 B12C mov r11,__zero_reg__ + 5414 2036 47E0 ldi r20,lo8(7) + 5415 2038 C42E mov r12,r20 + 5416 203a D12C mov r13,__zero_reg__ + 5417 203c 00C0 rjmp .L402 + 5418 .LVL417: + 5419 .L401: + 5420 .LM556: + 5421 203e 2F81 ldd r18,Y+7 + 5422 2040 3885 ldd r19,Y+8 + 5423 2042 2430 cpi r18,4 + 5424 2044 3105 cpc r19,__zero_reg__ + 5425 2046 01F4 brne .L403 + 5426 2048 2B84 ldd r2,Y+11 + 5427 204a 3C84 ldd r3,Y+12 + 5428 204c 2C01 movw r4,r24 + 5429 204e 3C01 movw r6,r24 + 5430 2050 37E0 ldi r19,lo8(7) + 5431 2052 832E mov r8,r19 + 5432 2054 912C mov r9,__zero_reg__ + 5433 2056 AA24 clr r10 + 5434 2058 BB24 clr r11 + 5435 205a 00C0 rjmp .L417 + 5436 .LVL418: + 5437 .L403: + 5438 .LM557: + 5439 205c EF81 ldd r30,Y+7 + 5440 205e F885 ldd r31,Y+8 + 5441 2060 3597 sbiw r30,5 + 5442 2062 01F4 brne .L400 + 5443 2064 2B84 ldd r2,Y+11 + 5444 2066 3C84 ldd r3,Y+12 + 5445 2068 2C01 movw r4,r24 + 5446 206a 3101 movw r6,r2 + 5447 206c 27E0 ldi r18,lo8(7) + 5448 206e 822E mov r8,r18 + 5449 2070 912C mov r9,__zero_reg__ + 5450 2072 AA24 clr r10 + 5451 2074 BB24 clr r11 + 5452 2076 00C0 rjmp .L416 + 5453 .LVL419: + 5454 .L400: + 5455 .LM558: + 5456 2078 2F81 ldd r18,Y+7 + 5457 207a 3885 ldd r19,Y+8 + 5458 207c 2630 cpi r18,6 + 5459 207e 3105 cpc r19,__zero_reg__ + 5460 2080 01F4 brne .L402 + 5461 2082 2B84 ldd r2,Y+11 + 5462 2084 3C84 ldd r3,Y+12 + 5463 2086 2101 movw r4,r2 + 5464 2088 3C01 movw r6,r24 + 5465 208a 97E0 ldi r25,lo8(7) + 5466 208c 892E mov r8,r25 + 5467 208e 912C mov r9,__zero_reg__ + 5468 2090 87E0 ldi r24,lo8(7) + 5469 2092 A82E mov r10,r24 + 5470 2094 B12C mov r11,__zero_reg__ + 5471 .LVL420: + 5472 .L417: + 5473 2096 CC24 clr r12 + 5474 2098 DD24 clr r13 + 5475 209a 00C0 rjmp .L404 + 5476 .LVL421: + 5477 .L402: + 5478 .LM559: + 5479 209c 8F81 ldd r24,Y+7 + 5480 209e 9885 ldd r25,Y+8 + 5481 .LVL422: + 5482 20a0 0797 sbiw r24,7 + 5483 20a2 01F4 brne .L404 + 5484 20a4 2B84 ldd r2,Y+11 + 5485 20a6 3C84 ldd r3,Y+12 + 5486 20a8 2101 movw r4,r2 + 5487 20aa 3101 movw r6,r2 + 5488 20ac 07E0 ldi r16,lo8(7) + 5489 20ae 802E mov r8,r16 + 5490 20b0 912C mov r9,__zero_reg__ + 5491 20b2 17E0 ldi r17,lo8(7) + 5492 20b4 A12E mov r10,r17 + 5493 20b6 B12C mov r11,__zero_reg__ + 5494 .LVL423: + 5495 .L416: + 5496 20b8 B7E0 ldi r27,lo8(7) + 5497 20ba CB2E mov r12,r27 + 5498 20bc D12C mov r13,__zero_reg__ + 5499 .LVL424: + 5500 .L404: + 5501 .LM560: + 5502 20be ED81 ldd r30,Y+5 + 5503 20c0 FE81 ldd r31,Y+6 + 5504 20c2 3397 sbiw r30,3 + 5505 20c4 01F4 brne .L405 + 5506 .LM561: + 5507 20c6 C401 movw r24,r8 + 5508 .LVL425: + 5509 20c8 B501 movw r22,r10 + 5510 20ca A601 movw r20,r12 + 5511 20cc 9101 movw r18,r2 + 5512 20ce 8201 movw r16,r4 + 5513 20d0 7301 movw r14,r6 + 5514 20d2 0E94 0000 call box_filled + 5515 20d6 00C0 rjmp .L406 + 5516 .LVL426: + 5517 .L405: + 5518 .LM562: + 5519 20d8 2D81 ldd r18,Y+5 + 5520 20da 3E81 ldd r19,Y+6 + 5521 20dc 2230 cpi r18,2 + 5522 20de 3105 cpc r19,__zero_reg__ + 5523 20e0 01F4 brne .L407 + 5524 .LM563: + 5525 20e2 C401 movw r24,r8 + 5526 .LVL427: + 5527 20e4 B501 movw r22,r10 + 5528 20e6 A601 movw r20,r12 + 5529 20e8 9101 movw r18,r2 + 5530 20ea 8201 movw r16,r4 + 5531 20ec 7301 movw r14,r6 + 5532 20ee 0E94 0000 call box_walls + 5533 20f2 00C0 rjmp .L406 + 5534 .LVL428: + 5535 .L407: + 5536 .LM564: + 5537 20f4 C401 movw r24,r8 + 5538 .LVL429: + 5539 20f6 B501 movw r22,r10 + 5540 20f8 A601 movw r20,r12 + 5541 20fa 9101 movw r18,r2 + 5542 20fc 8201 movw r16,r4 + 5543 20fe 7301 movw r14,r6 + 5544 2100 0E94 0000 call box_wireframe + 5545 .L406: + 5546 .LM565: + 5547 2104 8985 ldd r24,Y+9 + 5548 2106 9A85 ldd r25,Y+10 + 5549 2108 0E94 0000 call delay_ms + 5550 .LM566: + 5551 210c 80E0 ldi r24,lo8(0) + 5552 210e 0E94 0000 call fill + 5553 2112 8B85 ldd r24,Y+11 + 5554 2114 9C85 ldd r25,Y+12 + 5555 2116 0197 sbiw r24,1 + 5556 2118 9C87 std Y+12,r25 + 5557 211a 8B87 std Y+11,r24 + 5558 .LM567: + 5559 211c 8F5F subi r24,lo8(-1) + 5560 211e 9F4F sbci r25,hi8(-1) + 5561 2120 01F0 breq .+2 + 5562 2122 00C0 rjmp .L408 + 5563 .LM568: + 5564 2124 2981 ldd r18,Y+1 + 5565 2126 3A81 ldd r19,Y+2 + 5566 2128 2F5F subi r18,lo8(-(1)) + 5567 212a 3F4F sbci r19,hi8(-(1)) + 5568 212c 3A83 std Y+2,r19 + 5569 212e 2983 std Y+1,r18 + 5570 .LVL430: + 5571 .L382: + 5572 2130 8981 ldd r24,Y+1 + 5573 2132 9A81 ldd r25,Y+2 + 5574 2134 EB81 ldd r30,Y+3 + 5575 2136 FC81 ldd r31,Y+4 + 5576 2138 8E17 cp r24,r30 + 5577 213a 9F07 cpc r25,r31 + 5578 213c 04F4 brge .+2 + 5579 213e 00C0 rjmp .L409 + 5580 2140 00C0 rjmp .L418 + 5581 .LVL431: + 5582 .L383: + 5583 .LM569: + 5584 2142 3C01 movw r6,r24 + 5585 2144 CC24 clr r12 + 5586 2146 DD24 clr r13 + 5587 .L385: + 5588 2148 1C01 movw r2,r24 + 5589 214a 2C01 movw r4,r24 + 5590 214c 8824 clr r8 + 5591 214e 9924 clr r9 + 5592 2150 AA24 clr r10 + 5593 2152 BB24 clr r11 + 5594 2154 00C0 rjmp .L390 + 5595 .LVL432: + 5596 .L396: + 5597 2156 3C01 movw r6,r24 + 5598 2158 CC24 clr r12 + 5599 215a DD24 clr r13 + 5600 .L398: + 5601 215c 1C01 movw r2,r24 + 5602 215e 2C01 movw r4,r24 + 5603 2160 8824 clr r8 + 5604 2162 9924 clr r9 + 5605 2164 AA24 clr r10 + 5606 2166 BB24 clr r11 + 5607 2168 00C0 rjmp .L403 + 5608 .LVL433: + 5609 .L418: + 5610 /* epilogue start */ + 5611 216a 2C96 adiw r28,12 + 5612 216c 0FB6 in __tmp_reg__,__SREG__ + 5613 216e F894 cli + 5614 2170 DEBF out __SP_H__,r29 + 5615 2172 0FBE out __SREG__,__tmp_reg__ + 5616 2174 CDBF out __SP_L__,r28 + 5617 2176 CF91 pop r28 + 5618 2178 DF91 pop r29 + 5619 217a 1F91 pop r17 + 5620 217c 0F91 pop r16 + 5621 217e FF90 pop r15 + 5622 2180 EF90 pop r14 + 5623 2182 DF90 pop r13 + 5624 2184 CF90 pop r12 + 5625 .LVL434: + 5626 2186 BF90 pop r11 + 5627 2188 AF90 pop r10 + 5628 .LVL435: + 5629 218a 9F90 pop r9 + 5630 218c 8F90 pop r8 + 5631 .LVL436: + 5632 218e 7F90 pop r7 + 5633 2190 6F90 pop r6 + 5634 .LVL437: + 5635 2192 5F90 pop r5 + 5636 2194 4F90 pop r4 + 5637 .LVL438: + 5638 2196 3F90 pop r3 + 5639 2198 2F90 pop r2 + 5640 .LVL439: + 5641 219a 0895 ret + 5642 .LFE8: + 5644 .global effect_planboing + 5646 effect_planboing: + 5647 .LFB6: + 5648 .LM570: + 5649 .LVL440: + 5650 219c EF92 push r14 + 5651 219e FF92 push r15 + 5652 21a0 0F93 push r16 + 5653 21a2 1F93 push r17 + 5654 21a4 CF93 push r28 + 5655 21a6 DF93 push r29 + 5656 /* prologue: function */ + 5657 /* frame size = 0 */ + 5658 21a8 8C01 movw r16,r24 + 5659 21aa 7B01 movw r14,r22 + 5660 .LVL441: + 5661 .LM571: + 5662 21ac C0E0 ldi r28,lo8(0) + 5663 21ae D0E0 ldi r29,hi8(0) + 5664 .LVL442: + 5665 .L423: + 5666 .LM572: + 5667 21b0 80E0 ldi r24,lo8(0) + 5668 21b2 0E94 0000 call fill + 5669 .LM573: + 5670 21b6 0A37 cpi r16,122 + 5671 21b8 1105 cpc r17,__zero_reg__ + 5672 21ba 01F4 brne .L420 + 5673 .LM574: + 5674 21bc CE01 movw r24,r28 + 5675 21be 0E94 0000 call setplane_z + 5676 21c2 00C0 rjmp .L421 + 5677 .L420: + 5678 .LM575: + 5679 21c4 0837 cpi r16,120 + 5680 21c6 1105 cpc r17,__zero_reg__ + 5681 21c8 01F4 brne .L422 + 5682 .LM576: + 5683 21ca CE01 movw r24,r28 + 5684 21cc 0E94 0000 call setplane_x + 5685 21d0 00C0 rjmp .L421 + 5686 .L422: + 5687 .LM577: + 5688 21d2 0937 cpi r16,121 + 5689 21d4 1105 cpc r17,__zero_reg__ + 5690 21d6 01F4 brne .L421 + 5691 .LM578: + 5692 21d8 CE01 movw r24,r28 + 5693 21da 0E94 0000 call setplane_y + 5694 .L421: + 5695 .LM579: + 5696 21de C701 movw r24,r14 + 5697 21e0 0E94 0000 call delay_ms + 5698 .LM580: + 5699 21e4 2196 adiw r28,1 + 5700 21e6 C830 cpi r28,8 + 5701 21e8 D105 cpc r29,__zero_reg__ + 5702 21ea 01F4 brne .L423 + 5703 21ec C7E0 ldi r28,lo8(7) + 5704 21ee D0E0 ldi r29,hi8(7) + 5705 .LVL443: + 5706 .L427: + 5707 .LM581: + 5708 21f0 80E0 ldi r24,lo8(0) + 5709 21f2 0E94 0000 call fill + 5710 .LM582: + 5711 21f6 0A37 cpi r16,122 + 5712 21f8 1105 cpc r17,__zero_reg__ + 5713 21fa 01F4 brne .L424 + 5714 .LM583: + 5715 21fc CE01 movw r24,r28 + 5716 21fe 0E94 0000 call setplane_z + 5717 2202 00C0 rjmp .L425 + 5718 .L424: + 5719 .LM584: + 5720 2204 0837 cpi r16,120 + 5721 2206 1105 cpc r17,__zero_reg__ + 5722 2208 01F4 brne .L426 + 5723 .LM585: + 5724 220a CE01 movw r24,r28 + 5725 220c 0E94 0000 call setplane_x + 5726 2210 00C0 rjmp .L425 + 5727 .L426: + 5728 .LM586: + 5729 2212 0937 cpi r16,121 + 5730 2214 1105 cpc r17,__zero_reg__ + 5731 2216 01F4 brne .L425 + 5732 .LM587: + 5733 2218 CE01 movw r24,r28 + 5734 221a 0E94 0000 call setplane_y + 5735 .L425: + 5736 .LM588: + 5737 221e C701 movw r24,r14 + 5738 2220 0E94 0000 call delay_ms + 5739 .LM589: + 5740 2224 2197 sbiw r28,1 + 5741 2226 8FEF ldi r24,hi8(-1) + 5742 2228 CF3F cpi r28,lo8(-1) + 5743 222a D807 cpc r29,r24 + 5744 222c 01F4 brne .L427 + 5745 /* epilogue start */ + 5746 .LM590: + 5747 222e DF91 pop r29 + 5748 2230 CF91 pop r28 + 5749 .LVL444: + 5750 2232 1F91 pop r17 + 5751 2234 0F91 pop r16 + 5752 .LVL445: + 5753 2236 FF90 pop r15 + 5754 2238 EF90 pop r14 + 5755 223a 0895 ret + 5756 .LFE6: + 5758 .global effect_test + 5760 effect_test: + 5761 .LFB4: + 5762 .LM591: + 5763 223c AF92 push r10 + 5764 223e BF92 push r11 + 5765 2240 CF92 push r12 + 5766 2242 DF92 push r13 + 5767 2244 EF92 push r14 + 5768 2246 FF92 push r15 + 5769 2248 0F93 push r16 + 5770 224a 1F93 push r17 + 5771 224c CF93 push r28 + 5772 224e DF93 push r29 + 5773 /* prologue: function */ + 5774 /* frame size = 0 */ + 5775 .LM592: + 5776 2250 C0E0 ldi r28,lo8(0) + 5777 2252 D0E0 ldi r29,hi8(0) + 5778 .LVL446: + 5779 .L432: + 5780 .LM593: + 5781 2254 BE01 movw r22,r28 + 5782 2256 53E0 ldi r21,3 + 5783 2258 7595 1: asr r23 + 5784 225a 6795 ror r22 + 5785 225c 5A95 dec r21 + 5786 225e 01F4 brne 1b + 5787 2260 8827 clr r24 + 5788 2262 77FD sbrc r23,7 + 5789 2264 8095 com r24 + 5790 2266 982F mov r25,r24 + 5791 2268 0E94 0000 call __floatsisf + 5792 226c 7B01 movw r14,r22 + 5793 226e 8C01 movw r16,r24 + 5794 2270 0E94 0000 call sin + 5795 2274 9B01 movw r18,r22 + 5796 2276 AC01 movw r20,r24 + 5797 2278 0E94 0000 call __addsf3 + 5798 227c 20E0 ldi r18,lo8(0x40600000) + 5799 227e 30E0 ldi r19,hi8(0x40600000) + 5800 2280 40E6 ldi r20,hlo8(0x40600000) + 5801 2282 50E4 ldi r21,hhi8(0x40600000) + 5802 2284 0E94 0000 call __addsf3 + 5803 2288 0E94 0000 call __fixsfsi + 5804 228c 5B01 movw r10,r22 + 5805 228e 6C01 movw r12,r24 + 5806 .LM594: + 5807 2290 C801 movw r24,r16 + 5808 2292 B701 movw r22,r14 + 5809 2294 0E94 0000 call cos + 5810 2298 9B01 movw r18,r22 + 5811 229a AC01 movw r20,r24 + 5812 229c 0E94 0000 call __addsf3 + 5813 22a0 20E0 ldi r18,lo8(0x40600000) + 5814 22a2 30E0 ldi r19,hi8(0x40600000) + 5815 22a4 40E6 ldi r20,hlo8(0x40600000) + 5816 22a6 50E4 ldi r21,hhi8(0x40600000) + 5817 22a8 0E94 0000 call __addsf3 + 5818 22ac 0E94 0000 call __fixsfsi + 5819 22b0 7B01 movw r14,r22 + 5820 22b2 8C01 movw r16,r24 + 5821 .LM595: + 5822 22b4 C501 movw r24,r10 + 5823 22b6 B701 movw r22,r14 + 5824 22b8 41E0 ldi r20,lo8(1) + 5825 22ba 50E0 ldi r21,hi8(1) + 5826 22bc 0E94 0000 call setvoxel + 5827 .LM596: + 5828 22c0 C501 movw r24,r10 + 5829 22c2 B701 movw r22,r14 + 5830 22c4 41E0 ldi r20,lo8(1) + 5831 22c6 50E0 ldi r21,hi8(1) + 5832 22c8 0E94 0000 call setvoxel + 5833 .LM597: + 5834 22cc 88EE ldi r24,lo8(1000) + 5835 22ce 93E0 ldi r25,hi8(1000) + 5836 22d0 0E94 0000 call delay_ms + 5837 .LM598: + 5838 22d4 80E0 ldi r24,lo8(0) + 5839 22d6 0E94 0000 call fill + 5840 .LM599: + 5841 22da 2196 adiw r28,1 + 5842 22dc 83E0 ldi r24,hi8(1000) + 5843 22de C83E cpi r28,lo8(1000) + 5844 22e0 D807 cpc r29,r24 + 5845 22e2 01F0 breq .+2 + 5846 22e4 00C0 rjmp .L432 + 5847 /* epilogue start */ + 5848 .LM600: + 5849 22e6 DF91 pop r29 + 5850 22e8 CF91 pop r28 + 5851 .LVL447: + 5852 22ea 1F91 pop r17 + 5853 22ec 0F91 pop r16 + 5854 22ee FF90 pop r15 + 5855 22f0 EF90 pop r14 + 5856 22f2 DF90 pop r13 + 5857 22f4 CF90 pop r12 + 5858 22f6 BF90 pop r11 + 5859 22f8 AF90 pop r10 + 5860 22fa 0895 ret + 5861 .LFE4: + 5863 .data + 5866 C.30.2453: + 5867 0000 00 .byte 0 + 5868 0001 01 .byte 1 + 5869 0002 02 .byte 2 + 5870 0003 03 .byte 3 + 5871 0004 04 .byte 4 + 5872 0005 05 .byte 5 + 5873 0006 06 .byte 6 + 5874 0007 07 .byte 7 + 5875 0008 01 .byte 1 + 5876 0009 01 .byte 1 + 5877 000a 02 .byte 2 + 5878 000b 03 .byte 3 + 5879 000c 04 .byte 4 + 5880 000d 05 .byte 5 + 5881 000e 06 .byte 6 + 5882 000f 06 .byte 6 + 5883 0010 02 .byte 2 + 5884 0011 02 .byte 2 + 5885 0012 03 .byte 3 + 5886 0013 03 .byte 3 + 5887 0014 04 .byte 4 + 5888 0015 04 .byte 4 + 5889 0016 05 .byte 5 + 5890 0017 05 .byte 5 + 5891 0018 03 .byte 3 + 5892 0019 03 .byte 3 + 5893 001a 03 .byte 3 + 5894 001b 03 .byte 3 + 5895 001c 04 .byte 4 + 5896 001d 04 .byte 4 + 5897 001e 04 .byte 4 + 5898 001f 04 .byte 4 + 5899 .comm cube,64,1 + 5900 .comm fb,64,1 + 6149 .Letext0: +DEFINED SYMBOLS + *ABS*:0000000000000000 effect.c + /tmp/ccaJZNIL.s:2 *ABS*:000000000000003f __SREG__ + /tmp/ccaJZNIL.s:3 *ABS*:000000000000003e __SP_H__ + /tmp/ccaJZNIL.s:4 *ABS*:000000000000003d __SP_L__ + /tmp/ccaJZNIL.s:5 *ABS*:0000000000000034 __CCP__ + /tmp/ccaJZNIL.s:6 *ABS*:0000000000000000 __tmp_reg__ + /tmp/ccaJZNIL.s:7 *ABS*:0000000000000001 __zero_reg__ + /tmp/ccaJZNIL.s:20 .text:0000000000000000 effect_telcstairs_do + *COM*:0000000000000040 cube + /tmp/ccaJZNIL.s:84 .text:000000000000004a effect_telcstairs + /tmp/ccaJZNIL.s:146 .text:000000000000008c sendvoxel_z + /tmp/ccaJZNIL.s:255 .text:000000000000012a effect_pathmove + /tmp/ccaJZNIL.s:374 .text:00000000000001d6 effect_path_bitmap + /tmp/ccaJZNIL.s:562 .text:00000000000002fe effect_path_text + /tmp/ccaJZNIL.s:762 .text:0000000000000442 effect_pathspiral + /tmp/ccaJZNIL.s:861 .text:00000000000004dc effect_rand_patharound + /tmp/ccaJZNIL.s:994 .text:00000000000005ae effect_stringfly2 + /tmp/ccaJZNIL.s:1348 .text:00000000000007d0 effect_smileyspin + /tmp/ccaJZNIL.s:5866 .data:0000000000000000 C.30.2453 + /tmp/ccaJZNIL.s:2067 .text:0000000000000c1a effect_random_sparkle_flash + /tmp/ccaJZNIL.s:2174 .text:0000000000000cc4 effect_random_sparkle + /tmp/ccaJZNIL.s:2219 .text:0000000000000cfa effect_loadbar + /tmp/ccaJZNIL.s:2349 .text:0000000000000da8 draw_positions_axis + /tmp/ccaJZNIL.s:2504 .text:0000000000000e7c effect_boxside_randsend_parallel + /tmp/ccaJZNIL.s:2747 .text:0000000000000ff0 effect_axis_updown_randsuspend + /tmp/ccaJZNIL.s:2989 .text:0000000000001166 effect_z_updown_move + /tmp/ccaJZNIL.s:3045 .text:00000000000011a4 effect_z_updown + /tmp/ccaJZNIL.s:3270 .text:0000000000001310 effect_random_filler + /tmp/ccaJZNIL.s:3401 .text:00000000000013e4 sendvoxels_rand_z + /tmp/ccaJZNIL.s:3567 .text:00000000000014ce effect_blinky2 + /tmp/ccaJZNIL.s:3687 .text:0000000000001590 effect_wormsqueeze + /tmp/ccaJZNIL.s:3974 .text:000000000000174c effect_rain + /tmp/ccaJZNIL.s:4078 .text:00000000000017ea boingboing + /tmp/ccaJZNIL.s:4891 .text:0000000000001cfc sendplane_rand_z + /tmp/ccaJZNIL.s:4974 .text:0000000000001d7a effect_box_woopwoop + /tmp/ccaJZNIL.s:5080 .text:0000000000001e1c effect_box_shrink_grow + /tmp/ccaJZNIL.s:5646 .text:000000000000219c effect_planboing + /tmp/ccaJZNIL.s:5760 .text:000000000000223c effect_test + *COM*:0000000000000040 fb + +UNDEFINED SYMBOLS +__do_copy_data +__do_clear_bss +delay_ms +clrvoxel +setvoxel +getvoxel +altervoxel +font_getpath +font_getbitmappixel +font_getchar +rand +__divmodhi4 +fill +shift +flpvoxel +setplane_z +box_wireframe +box_filled +box_walls +setplane_x +setplane_y +__floatsisf +sin +__addsf3 +__fixsfsi +cos diff --git a/instructables/cube_pc/font.c b/instructables/cube_pc/font.c new file mode 100644 index 0000000..9868e9a --- /dev/null +++ b/instructables/cube_pc/font.c @@ -0,0 +1,158 @@ +#include "font.h" +//#include + +#define EEMEM +#define PROGMEM + +volatile const unsigned char font[455] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] EEMEM = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] PROGMEM = {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + //for (i = 0; i < length; i++) + // destination[i] = pgm_read_byte(&paths[i+offset]); +} + +void font_getchar (char chr, unsigned char dst[5]) +{ + int i; + chr -= 32; + + unsigned char font[455] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x5f,0x5f,0x00,0x00, // ! + 0x00,0x03,0x00,0x03,0x00,0x14,0x7f,0x14,0x7f,0x14, // "# + 0x24,0x2a,0x7f,0x2a,0x12,0x23,0x13,0x08,0x64,0x62, // $% + 0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00, // &' + 0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00, // () + 0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08, // *+ + 0x00,0x50,0x30,0x00,0x00,0x08,0x08,0x08,0x08,0x08, // ,- + 0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, // ./ + 0x3e,0x51,0x49,0x45,0x3e,0x00,0x42,0x7f,0x40,0x00, // 01 + 0x42,0x61,0x51,0x49,0x46,0x21,0x41,0x45,0x4b,0x31, // 23 + 0x18,0x14,0x12,0x7f,0x10,0x27,0x45,0x45,0x45,0x39, // 45 + 0x3c,0x4a,0x49,0x49,0x30,0x01,0x71,0x09,0x05,0x03, // 67 + 0x36,0x49,0x49,0x49,0x36,0x06,0x49,0x49,0x29,0x1e, // 89 + 0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00, // :; + 0x08,0x14,0x22,0x41,0x00,0x14,0x14,0x14,0x14,0x14, // <= + 0x00,0x41,0x22,0x14,0x08,0x02,0x01,0x51,0x09,0x06, // >? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z + }; + for (i = 0; i < 5; i++) + { + dst[i] = font[(chr*5)+i]; + } + +} + +void font_getbitmap (char bitmap, unsigned char dst[8]) +{ + int i; + + //for (i = 0; i < 8; i++) + // dst[i] = eeprom_read_byte(&bitmaps[bitmap][i]); + +} + +unsigned char font_getbitmappixel ( char bitmap, char x, char y) +{ + //unsigned char tmp = eeprom_read_byte(&bitmaps[bitmap][x]); + //return (tmp >> y) & 0x01; +} + + + + diff --git a/instructables/cube_pc/font.h b/instructables/cube_pc/font.h new file mode 100644 index 0000000..1558204 --- /dev/null +++ b/instructables/cube_pc/font.h @@ -0,0 +1,13 @@ +#ifndef FONT_H +#define FONT_H + +//#include + +void font_getchar (char chr, unsigned char dst[5]); +void font_getpath (unsigned char path, unsigned char *destination, int length); +void font_getbitmap (char bitmap, unsigned char dst[8]); +unsigned char font_getbitmappixel ( char bitmap, char x, char y); + + + +#endif diff --git a/instructables/cube_pc/gameoflife.c b/instructables/cube_pc/gameoflife.c new file mode 100644 index 0000000..52d630b --- /dev/null +++ b/instructables/cube_pc/gameoflife.c @@ -0,0 +1,148 @@ +#include "gameoflife.h" +#include "cube.h" +#include "draw.h" + +// Game of Life for the 4x4x4 and 8x8x8 led cube + +// Original rules: +// live cells: +// fewer than two neighbour: die +// two or three neighbours: live +// more than three neighbours: die +// dead cells: +// exactly three live neighbours becomes alive + +// This is 3d space, so the cell can have life on two more sides. +// We have to tweak the rules a bit to make it work: + +// Create life in a dead cell if neighbours == 4 +#define GOL_CREATE_MIN 4 +#define GOL_CREATE_MAX 4 + +// Underpopulation +#define GOL_TERMINATE_LONELY 3 +// Overpopulation +#define GOL_TERMINATE_CROWDED 5 + +#define GOL_X 8 +#define GOL_Y 8 +#define GOL_Z 8 + +#define GOL_WRAP 0 + + + +void gol_play (int iterations, int delay) +{ + int i; + + for (i = 0; i < iterations; i++) + { + LED_PORT ^= LED_GREEN; + + gol_nextgen(); + + if (gol_count_changes() == 0) + return; + + tmp2cube(); + + delay_ms(delay); + + //led_red(1); + } +} + +void gol_nextgen (void) +{ + int x,y,z; + unsigned char neigh; + + tmpfill(0x00); + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + for (z = 0; z < GOL_Z; z++) + { + neigh = gol_count_neighbors(x, y, z); + + // Current voxel is alive. + if (getvoxel(x,y,z) == 0x01) + { + if (neigh <= GOL_TERMINATE_LONELY) + { + tmpclrvoxel(x,y,z); + } else if(neigh >= GOL_TERMINATE_CROWDED) + { + tmpclrvoxel(x,y,z); + } else + { + tmpsetvoxel(x,y,z); + } + // Current voxel is dead. + } else + { + if (neigh >= GOL_CREATE_MIN && neigh <= GOL_CREATE_MAX) + tmpsetvoxel(x,y,z); + } + } + } + } +} + +unsigned char gol_count_neighbors (int x, int y, int z) +{ + int ix, iy, iz; // offset 1 in each direction in each dimension + int nx, ny, nz; // neighbours address. + + unsigned char neigh = 0; // number of alive neighbours. + + for (ix = -1; ix < 2; ix++) + { + for (iy = -1; iy < 2; iy++) + { + for (iz = -1; iz < 2; iz++) + { + // Your not your own neighbour, exclude 0,0,0, offset. + if ( !(ix == 0 && iy == 0 && iz == 0) ) + { + if (GOL_WRAP == 0x01) + { + nx = (x+ix)%GOL_X; + ny = (y+iy)%GOL_Y; + nz = (z+iz)%GOL_Z; + } else + { + nx = x+ix; + ny = y+iy; + nz = z+iz; + } + + if ( getvoxel(nx, ny, nz) ) + neigh++; + } + } + } + } + return neigh; +} + +int gol_count_changes (void) +{ + int x,y; + int i = 0; + + for (x = 0; x < GOL_X; x++) + { + for (y = 0; y < GOL_Y; y++) + { + if (fb[x][y] != cube[x][y]) + i++; + } + } + + return i; +} + diff --git a/instructables/cube_pc/gameoflife.h b/instructables/cube_pc/gameoflife.h new file mode 100644 index 0000000..8e88be6 --- /dev/null +++ b/instructables/cube_pc/gameoflife.h @@ -0,0 +1,9 @@ +#ifndef GOL_H +#define GOL_H + +void gol_play (int iterations, int delay); +unsigned char gol_count_neighbors (int x, int y, int z); +void gol_nextgen (void); +int gol_count_changes (void); + +#endif diff --git a/instructables/cube_pc/launch_effect.c b/instructables/cube_pc/launch_effect.c new file mode 100644 index 0000000..b49b4af --- /dev/null +++ b/instructables/cube_pc/launch_effect.c @@ -0,0 +1,182 @@ +#include "launch_effect.h" +#include "effect.h" +#include "draw.h" +#include "gameoflife.h" + +void launch_effect (int effect) +{ + int i; + unsigned char ii; + + fill(0x00); + + switch (effect) + { + case 0x00: + effect_rain(100); + break; + + + case 1: + sendvoxels_rand_z(20,220,2000); + break; + + case 2: + effect_random_filler(5,1); + effect_random_filler(5,0); + effect_random_filler(5,1); + effect_random_filler(5,0); + break; + + case 3: + effect_z_updown(20,1000); + break; + + case 4: + effect_wormsqueeze (2, AXIS_Z, -1, 100, 1000); + break; + + case 5: + effect_blinky2(); + break; + + case 6: + for (ii=0;ii<8;ii++) + { + effect_box_shrink_grow (1, ii%4, ii & 0x04, 450); + } + + effect_box_woopwoop(800,0); + effect_box_woopwoop(800,1); + effect_box_woopwoop(800,0); + effect_box_woopwoop(800,1); + break; + + case 7: + effect_planboing (AXIS_Z, 400); + effect_planboing (AXIS_X, 400); + effect_planboing (AXIS_Y, 400); + effect_planboing (AXIS_Z, 400); + effect_planboing (AXIS_X, 400); + effect_planboing (AXIS_Y, 400); + fill(0x00); + break; + + case 8: + fill(0x00); + effect_telcstairs(0,800,0xff); + effect_telcstairs(0,800,0x00); + effect_telcstairs(1,800,0xff); + effect_telcstairs(1,800,0xff); + break; + + case 9: + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,1); + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_Z, 550,5000,1); + effect_axis_updown_randsuspend(AXIS_X, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_X, 550,5000,1); + effect_axis_updown_randsuspend(AXIS_Y, 550,5000,0); + effect_axis_updown_randsuspend(AXIS_Y, 550,5000,1); + break; + + case 10: + effect_loadbar(700); + break; + + case 11: + effect_wormsqueeze (1, AXIS_Z, 1, 100, 1000); + break; + + + case 12: + effect_stringfly2("Boo !!!!"); + break; + + case 13: + fill(0x00); + // Create a random starting point for the Game of Life effect. + for (i = 0; i < 20;i++) + { + setvoxel(rand()%4,rand()%4,rand()%4); + } + + gol_play(20, 400); + break; + + case 14: + effect_boxside_randsend_parallel (AXIS_Z, 0 , 200,1); + delay_ms(1500); + effect_boxside_randsend_parallel (AXIS_Z, 1 , 200,1); + delay_ms(1500); + + effect_boxside_randsend_parallel (AXIS_Z, 0 , 200,2); + delay_ms(1500); + effect_boxside_randsend_parallel (AXIS_Z, 1 , 200,2); + delay_ms(1500); + + effect_boxside_randsend_parallel (AXIS_Y, 0 , 200,1); + delay_ms(1500); + effect_boxside_randsend_parallel (AXIS_Y, 1 , 200,1); + delay_ms(1500); + break; + + case 15: + boingboing(250, 600, 0x01, 0x02); + break; + + case 16: + effect_smileyspin(2,1000,0); + break; + + case 17: + effect_pathspiral(100,500); + break; + + case 18: + effect_path_bitmap(700,2,3); + break; + + case 19: + effect_smileyspin(2,1000,1); + break; + + case 20: + effect_path_text(1000,"TG"); + break; + + case 21: + effect_rand_patharound(200,500); + break; + + case 22: + effect_wormsqueeze (1, AXIS_Z, -1, 100, 1000); + break; + + case 23: + effect_smileyspin(2,1000,2); + break; + + case 24: + effect_random_sparkle(); + break; + + case 25: + effect_wormsqueeze (1, AXIS_Z, -1, 100, 1000); + break; + + case 26: + boingboing(250, 600, 0x01, 0x03); + break; + + // In case the effect number is out of range: + default: + effect_stringfly2("FAIL"); + break; + + + + } +} + diff --git a/instructables/cube_pc/launch_effect.h b/instructables/cube_pc/launch_effect.h new file mode 100644 index 0000000..072822a --- /dev/null +++ b/instructables/cube_pc/launch_effect.h @@ -0,0 +1,15 @@ +#ifndef LAUNCH_H +#define LAUNCH_H + +#include "cube.h" + +// Total number of effects +// Used in the main loop to loop through all the effects one by bone. +// Set this number one higher than the highest number inside switch() +// in launch_effect() in launch_effect.c +#define EFFECTS_TOTAL 27 + +void launch_effect (int effect); + +#endif + diff --git a/instructables/cube_pc/lisence.txt b/instructables/cube_pc/lisence.txt new file mode 100644 index 0000000..812dab5 --- /dev/null +++ b/instructables/cube_pc/lisence.txt @@ -0,0 +1,5 @@ +Created by Christian Moen (christian@lynet.no) and StÃ¥le Kristoffersen (staalekb@ifi.uio.no) 2011. + +Lisence: http://creativecommons.org/licenses/by-nc-sa/3.0/ + +Happy hacking!! :D diff --git a/instructables/cube_pc/main.c b/instructables/cube_pc/main.c new file mode 100644 index 0000000..61e4f9a --- /dev/null +++ b/instructables/cube_pc/main.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include "cube.h" +#include "draw.h" +#include "draw_3d.h" +#include "effect.h" +#include "gameoflife.h" +#include "launch_effect.h" + +void *cube_updater (unsigned char rs232_cube[8][8]); + +int main (int argc, char **argv) +{ + + if (argc < 2) { + fprintf(stderr, "Please indicate device to use.\n"); + return 1; + } + + cube_init(argv[1]); + + pthread_t cube_thread; + int iret, i, x; + + iret = pthread_create (&cube_thread, NULL, cube_updater, rs232_cube); + + + while (1) + { + for (i = 0; i < 0; i++) { + effect_blinky2(); + } + for (i=0; i applet/$(TARGET).cpp + cat $(TARGET).$(EXT) >> applet/$(TARGET).cpp + cat $(ARDUINO)/main.cxx >> applet/$(TARGET).cpp + +elf: applet/$(TARGET).elf +hex: applet/$(TARGET).hex +eep: applet/$(TARGET).eep +lss: applet/$(TARGET).lss +sym: applet/$(TARGET).sym + +upload: applet/$(TARGET).hex + stty -F $(AVRDUDE_PORT) hupcl ; sleep 0.1 ; stty -F $(AVRDUDE_PORT) -hupcl + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) + + +HEXSIZE = $(SIZE) --target=$(FORMAT) applet/$(TARGET).hex +ELFSIZE = $(SIZE) applet/$(TARGET).elf +sizebefore: + @if [ -f applet/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi + +sizeafter: + @if [ -f applet/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi + + +COFFCONVERT=$(OBJCOPY) --debugging \ +--change-section-address .data-0x800000 \ +--change-section-address .bss-0x800000 \ +--change-section-address .noinit-0x800000 \ +--change-section-address .eeprom-0x810000 + + +coff: applet/$(TARGET).elf + $(COFFCONVERT) -O coff-avr applet/$(TARGET).elf $(TARGET).cof + + +extcoff: $(TARGET).elf + $(COFFCONVERT) -O coff-ext-avr applet/$(TARGET).elf $(TARGET).cof + + +.SUFFIXES: .elf .hex .eep .lss .sym + +.elf.hex: + $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ + +.elf.eep: + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ + +.elf.lss: + $(OBJDUMP) -h -S $< > $@ + +.elf.sym: + $(NM) -n $< > $@ + + $(CXX) $(ALL_CXXFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS) + +applet/core.a: $(OBJ) + @for i in $(OBJ); do echo $(AR) rcs applet/core.a $$i; $(AR) rcs applet/core.a $$i; done + + + +build/%.o: %.cpp + mkdir -p $(dir $@) + $(CXX) -c $(ALL_CXXFLAGS) $< -o $@ + +build/%.o: %.c + mkdir -p $(dir $@) + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +build/%.s: %.c + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +.S.o: + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + + +build/%.d: %.c + $(CC) -M $(ALL_CFLAGS) $< | sed "s;$(notdir $*).o:;$*.o $*.d:;" > $@ + +build/%.d: %.cpp + $(CXX) -M $(ALL_CXXFLAGS) $< | sed "s;$(notdir $*).o:;$*.o $*.d:;" > $@ + + +clean: + $(REMOVE) applet/$(TARGET).hex applet/$(TARGET).eep applet/$(TARGET).cof applet/$(TARGET).elf \ + applet/$(TARGET).map applet/$(TARGET).sym applet/$(TARGET).lss applet/core.a \ + $(OBJ) $(LST) $(SRC:%.c=build/%.s) $(SRC:%.c=build/%.d) $(CXXSRC:%.cpp=build/%.s) $(CXXSRC:%.cpp=build/%.d) + +.PHONY: all build elf hex eep lss sym program coff extcoff clean applet_files sizebefore sizeafter + +-include $(SRC:%.c=build/%.d) +-include $(CXXSRC:%.cpp=build/%.d) +-e do_compile: do_build show_size +do_build: applet/$(TARGET).hex +applet/$(TARGET).hex: applet/$(TARGET).elf + +ARDMAKE_BOARD=applet/board + +applet/$(TARGET).elf: applet/$(TARGET).cpp applet/core.a + $(CXX) $(ALL_CXXFLAGS) -Wl,--gc-sections $(LDFLAGS) -L. -Lapplet/ -o $@ $< applet/core.a + @chmod a-x $@ >/dev/null 2>&1 || true + +applet/$(TARGET).cpp: $(TARGET).$(EXT) $(ARDUINO)/main.cxx $(ARDUINO)/WProgram.h $(ARDMAKE_BOARD) + echo '#include "WProgram.h"' >$@ + @echo '#line 1 "$<"' >>$@ + cat $(TARGET).$(EXT) >>$@ + @echo '#line 1 "$(ARDUINO)/main.cxx"' >>$@ + cat $(ARDUINO)/main.cxx >>$@ + +show_size: + @echo + @echo Program size: + @$(HEXSIZE) | awk -v m="$(MAX_SIZE)" '{print;if(NR^1){s=$$4}} \ + END {printf("\n%d/%d bytes (%.1f%% of capacity, %d bytes left)\n\n",\ + s,m,s*100.0/m,m-s);}' + +upload_autoreset: do_autoreset upload unreset + +do_autoreset: + @echo Sending reset to prepare for upload... + ( stty hupcl; sleep 0.1; true ) <$(PORT) 2>/dev/null + @echo + +unreset: + @stty -hupcl <$(PORT) 2>/dev/null || true + +$(OBJ): $(ARDMAKE_BOARD) +$(DEPS): $(ARDMAKE_BOARD) + +$(APPC): applet/%.o: %.c + $(CC) -c $(ALL_CFLAGS) -o $@ $< + +$(APPCXX): applet/%.o: %.cpp + $(CXX) -c $(ALL_CXXFLAGS) -o $@ $< + +$(APPA): applet/%.o: %.S + $(CC) -c $(ALL_ASFLAGS) -o $@ $< + +$(APPC:.o=.d): applet/%.d: %.c + $(CC) -M $(ALL_CFLAGS) $< | sed 's;^[^:]*:;applet/$*.o applet/$*.d:;' >$@ + +$(APPCXX:.o=.d): applet/%.d: %.cpp + $(CXX) -M $(ALL_CXXFLAGS) $< | sed 's;^[^:]*:;applet/$*.o applet/$*.d:;' >$@ + +$(APPA:.o=.d): applet/%.d: %.S + $(CC) -M $(ALL_ASFLAGS) $< | sed 's;^[^:]*:;applet/$*.o applet/$*.d:;' >$@ + +applet/$(TARGET).d: applet/$(TARGET).cpp + +vpath %.c applet/ $(sort $(dir $(OBJC))) +vpath %.cpp applet/ $(sort $(dir $(OBJCXX))) +vpath %.S applet/ $(sort $(dir $(OBJA))) + +include $(DEPS) diff --git a/test/applet/Print.d b/test/applet/Print.d new file mode 100644 index 0000000..2e8b58c --- /dev/null +++ b/test/applet/Print.d @@ -0,0 +1,22 @@ +applet/Print.o applet/Print.d: ardmake/hardware/cores/arduino/Print.cpp \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/string.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/math.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/Print.h \ + ardmake/hardware/cores/arduino/WString.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/ctype.h diff --git a/test/applet/WInterrupts.d b/test/applet/WInterrupts.d new file mode 100644 index 0000000..77437b7 --- /dev/null +++ b/test/applet/WInterrupts.d @@ -0,0 +1,24 @@ +applet/WInterrupts.o applet/WInterrupts.d: ardmake/hardware/cores/arduino/WInterrupts.c \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + ardmake/hardware/cores/arduino/WConstants.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h diff --git a/test/applet/WMath.d b/test/applet/WMath.d new file mode 100644 index 0000000..6d1c210 --- /dev/null +++ b/test/applet/WMath.d @@ -0,0 +1,3 @@ +applet/WMath.o applet/WMath.d: ardmake/hardware/cores/arduino/WMath.cpp \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h diff --git a/test/applet/board b/test/applet/board new file mode 100644 index 0000000..e438487 --- /dev/null +++ b/test/applet/board @@ -0,0 +1 @@ +uno diff --git a/test/applet/core.a b/test/applet/core.a new file mode 100644 index 0000000..1416012 Binary files /dev/null and b/test/applet/core.a differ diff --git a/test/applet/pins_arduino.d b/test/applet/pins_arduino.d new file mode 100644 index 0000000..9b2299c --- /dev/null +++ b/test/applet/pins_arduino.d @@ -0,0 +1,24 @@ +applet/pins_arduino.o applet/pins_arduino.d: ardmake/hardware/cores/arduino/pins_arduino.c \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/applet/test.cpp b/test/applet/test.cpp new file mode 100644 index 0000000..1400654 --- /dev/null +++ b/test/applet/test.cpp @@ -0,0 +1,827 @@ +#include "WProgram.h" +#line 1 "test.pde" +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA8 & 168 / ARDUINO +// +// +-\/-+ +// PC6 1| |28 PC5 (AI 5) +// (D 0) PD0 2| |27 PC4 (AI 4) +// (D 1) PD1 3| |26 PC3 (AI 3) +// (D 2) PD2 4| |25 PC2 (AI 2) +// PWM+ (D 3) PD3 5| |24 PC1 (AI 1) +// (D 4) PD4 6| |23 PC0 (AI 0) +// VCC 7| |22 GND +// GND 8| |21 AREF +// PB6 9| |20 AVCC +// PB7 10| |19 PB5 (D 13) +// PWM+ (D 5) PD5 11| |18 PB4 (D 12) +// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM +// (D 7) PD7 13| |16 PB2 (D 10) PWM +// (D 8) PB0 14| |15 PB1 (D 9) PWM +// +----+ +// +// (PWM+ indicates the additional PWM pins on the ATmega168.) + +#define CUBE_SIZE 8 + +#define AXIS_X 1 +#define AXIS_Y 2 +#define AXIS_Z 3 + +void setup() +{ + Serial.begin(9600); + delay(1000); + Serial.println("begin"); + + DDRB = 0xFF; + DDRD = 0xFC; + + PORTB = 0; + PORTD &= 0x03; + + + // Reset any PWM configuration that the arduino may have set up automagically! + TCCR2A = 0x00; + TCCR2B = 0x00; + + TCCR2A |= (0x01 << WGM21); // CTC mode. clear counter on TCNT2 == OCR2A + OCR2A = 50; // Interrupt every 25600th cpu cycle (256*100) + TCNT2 = 0x00; // start counting at 0 + TCCR2B |= (0x01 << CS22) | (0x01 << CS21); // Start the clock with a 256 prescaler + + TIMSK2 |= (0x01 << OCIE2A); + +} + +volatile unsigned char cube[8][8]; +volatile unsigned char current_layer = 0; + +ISR (TIMER2_COMPA_vect) +{ + PORTB &= ~0x21; // layer and latch low + char current_layer_ = current_layer; + + //for (char j = 0; j < 8; ++j) { + for (char j = 0; j < 4; ++j) { + unsigned char val = cube[7-j][current_layer_]; + unsigned char val2 = cube[3-j][current_layer_]; + for (char i = 0; i < 8; ++i/*, val >>= 1*/) { + PORTB &= ~0x02; + PORTD = (PORTD & ~0x80) | ((val2 << (7-i)) & 0x80); + //PORTD |= 0x80; + PORTD = (PORTD & ~0x40) | (((val << (7-i)) & 0x80) >> 1); + PORTB |= 0x02; + } + } + + PORTB = (PORTB & ~0x1C) | (current_layer_ << 2); + ++current_layer_; + current_layer = current_layer_ & 0x07; + + PORTB |= 0x21; // layer and latch high +} + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +bool get_led(unsigned char x, unsigned char y, unsigned char z) +{ + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (inrange(x, y, z)) { + return cube[y][z] & (1 << x); + } + + return false; +} + +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +{ + + if (!inrange(x, y, z)) { + return; + } + + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + cube[y][z] |= ((unsigned char)1) << x; + } + else { + cube[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() +{ + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + cube[y][z] = 0; + } + } +} +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] |= (1 << x); +} + +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[y][z] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + + +// Set a single voxel to ON +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] &= ~(1 << x); +} +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;ii? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] /*EEMEM*/ = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] /*PROGMEM */= {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +/* +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + for (i = 0; i < length; i++) + destination[i] = pgm_read_byte(&paths[i+offset]); +} +*/ +// Fill a value into all 64 byts of the cube buffer +// Mostly used for clearing. fill(0x00) +// or setting all on. fill(0xff) +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] = pattern; + } + } +} + + + +void font_getchar (char chr, unsigned char dst[5]) +{ + //uint8_t i; + unsigned char i; + chr -= 32; // our bitmap font starts at ascii char 32. + + for (i = 0; i < 5; i++) + //dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&font[(chr*5)+i]); + dst[i] = font[(chr*5)+i]; +} +void effect_stringfly2(const char* str) +{ + //int x,y,i; + unsigned char x,y,i; + unsigned char chr[5]; + const int DELAY = 80; + + clear_led(); + + while (*str) + { + font_getchar(*str++, chr); + + // Put a character on the back of the cube + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + //setvoxel(7,x+2,y); + //set_led(7,x+2,y); + set_led(x+2, 0, y, true); + } + } + } + + //led_change = true; + //SDL_Delay(1000); + //clear_led(); + //continue; + + // Shift the entire contents of the cube forward by 6 steps + // before placing the next character + for (i = 0; i<6; i++) + { + //delay_ms(1000); + //SDL_Delay(1000); + delay(DELAY); + shift(AXIS_Y,1); + //shift(1,-1); + //set_plane(1, 7, false); + } + } + + //return; + // Shift the last character out of the cube. + for (i = 0; i<8; i++) + { + delay(DELAY); + //delay_ms(1000); + shift(AXIS_Y,1); + //shift(1,-1); + } +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0xff; + } +} + +// Clears voxels in the same manner as above +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0x00; + } +} + + +void setplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + setplane_x(i); + break; + + case AXIS_Y: + setplane_y(i); + break; + + case AXIS_Z: + setplane_z(i); + break; + } +} + + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay(i/5); + + fill(0xff); + delay(20); + + i = i - (15+(1000/(i/10))); + } + + delay(500); + + i = 750; + while (i>0) + { + fill(0x00); + delay((751-i)/5); + + fill(0xff); + delay(20); + + i = i - (15+(1000/(i/10))); + } + } + +} +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + + } + +} + + + + +/***************************************************************************** + * LOOP TEST + *****************************************************************************/ + +void loop() +{ + //for (char i = 0; i < 8; ++i) { + //PORTB = (PORTB & ~0x1C) | ((i & 0x07) << 2); + //display(i); + //delay(2); + + //Serial.println(layer, DEC); + //delay(1000); + //} + clear_led(); + //delay_ms(1000); + delay(1000); + //return; + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + for (char x = 0; x < 8; ++x) { + set_led(x, y, z, true); + delay(5); + delay(100); + //delay(500); + //delay(1000); + //delay_ms(1000); + } + } + } + delay(1000); + //delay_ms(1000); + clear_led(); + /* effect_stringfly2("test de texte - c'est trop super genial et tout " + "yeahhh!!!!!"); + */ + effect_planboing(AXIS_Z, 700); + effect_planboing(AXIS_Y, 700); + effect_planboing(AXIS_X, 700); + + effect_blinky2(); + + effect_random_filler(75,1); + effect_random_filler(75,0); + + for (char i = 0; i < 10; ++i) { + effect_boxside_randsend_parallel (AXIS_X, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_X, 1, 950, 2); + effect_boxside_randsend_parallel (AXIS_Y, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_Y, 1, 950, 2); + effect_boxside_randsend_parallel (AXIS_Z, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_Z, 1, 950, 2); + } + + + //effect_rain(1000) +} +#line 1 "ardmake/hardware/cores/arduino/main.cxx" +int main(void) +{ + init(); + + setup(); + + for (;;) + loop(); + + return 0; +} + diff --git a/test/applet/test.d b/test/applet/test.d new file mode 100644 index 0000000..e69de29 diff --git a/test/applet/test.elf b/test/applet/test.elf new file mode 100644 index 0000000..0af1415 Binary files /dev/null and b/test/applet/test.elf differ diff --git a/test/applet/test.hex b/test/applet/test.hex new file mode 100644 index 0000000..d67c46b --- /dev/null +++ b/test/applet/test.hex @@ -0,0 +1,315 @@ +:100000000C9435000C945D000C945D000C945D0024 +:100010000C945D000C945D000C945D000C945F00EA +:100020000C945D000C945D000C945D000C945D00DC +:100030000C945D000C945D000C945D000C945D00CC +:100040000C9463050C945D000C9432060C945D00D6 +:100050000C945D000C945D000C945D000C945D00AC +:100060000C945D000C945D002E0711241FBECFEF91 +:10007000D8E0DEBFCDBF11E0A0E0B1E0E8E7F3E1FA +:1000800002C005900D92AC31B107D9F711E0ACE197 +:10009000B1E001C01D92AD3FB107E1F710E0CAE643 +:1000A000D0E004C02297FE010E943609C836D1076D +:1000B000C9F70E945C050C94BA090C9400001F92C9 +:1000C0000F920FB60F921124EF92FF920F931F938E +:1000D0002F933F934F935F936F937F938F939F9350 +:1000E000AF93BF93CF93DF93EF93FF9385B18E7D53 +:1000F00085B950915C01A7E0B0E0C52FDD27C7FDB1 +:10010000D095FD0173E0EE0FFF1F7A95E1F7EC0F3C +:10011000FD1FE45EFE4F9081FD01349763E0EE0F1A +:10012000FF1F6A95E1F7EC0FFD1FE45EFE4F808133 +:1001300067E070E0082F10E0E92FF0E029984BB15C +:10014000C801062E02C0880F991F0A94E2F7807832 +:100150004F77842B8BB98BB17F01062E02C0EE0C3A +:10016000FF1C0A94E2F797012078307035952795A7 +:100170008F7B822B8BB9299A615070408FEF6F3F34 +:100180007807E1F61197A330B10509F0BACF85B130 +:10019000CC0FDD1FCC0FDD1F837E8C2B85B95F5FFD +:1001A000577050935C0185B1816285B9FF91EF91E1 +:1001B000DF91CF91BF91AF919F918F917F916F917F +:1001C0005F914F913F912F911F910F91FF90EF9071 +:1001D0000F900FBE0F901F901895089778F477FD39 +:1001E0000DC06830710554F457FD08C090E04830E8 +:1001F00051050CF091E081E0982701C090E0892F33 +:100200000895EF92FF920F931F93CF93DF93F82EF1 +:10021000E22E062F10E0C42FD0E090E0B801AE012E +:100220000E94ED00882339F1B801F3E0660F771FD3 +:10023000FA95E1F7EE2079F0FB01EC0FFD1FE45E8B +:10024000FE4F208181E090E002C0880F991FFA9450 +:10025000E2F7282B0FC0FB01EC0FFD1FE45EFE4F01 +:10026000208181E090E002C0880F991FFA94E2F7A4 +:10027000809528232083DF91CF911F910F91FF90CC +:10028000EF90089520E030E014C0FC01A3E0EE0FF1 +:10029000FF1FAA95E1F7E20FF31FE45EFE4F108205 +:1002A00001968830910589F72F5F3F4F283031053F +:1002B00019F080E090E0E9CF0895FF920F931F932B +:1002C000CF93DF93F82EEB018A010E94ED00882383 +:1002D000A1F0FE01B3E0EE0FFF1FBA95E1F7E00FCA +:1002E000F11FE45EFE4F208181E090E002C0880FA4 +:1002F000991FFA94E2F7282B2083DF91CF911F9169 +:100300000F91FF900895FF920F931F93CF93DF9368 +:10031000F82EEB018A010E94ED00882389F083E02A +:10032000CC0FDD1F8A95E1F7C00FD11FC45EDE4FF1 +:10033000888190E002C095958795FA94E2F78170E4 +:10034000DF91CF911F910F91FF900895FF920F932E +:100350001F93CF93DF93F82EEB018A010E94ED00EB +:100360008823A9F0FE0193E0EE0FFF1F9A95E1F7B5 +:10037000E00FF11FE45EFE4F208181E090E002C0BB +:10038000880F991FFA94E2F7809528232083DF9144 +:10039000CF911F910F91FF9008952130310519F4ED +:1003A0000E945D0108950E94A60108950BC020E0FF +:1003B0000000000000000000000000002F5F2A3550 +:1003C000B9F70197009799F7089540E050E010C001 +:1003D000FB01E20FF31FE45EFE4F80832F5F3F4F70 +:1003E00028303105A9F74F5F5F4F4830510549F07C +:1003F00020E030E0BA01E3E0660F771FEA95E1F70D +:10040000E7CF08959C018830910530F581E090E0B8 +:1004100002C0880F991F2A95E2F7982F40E050E01C +:1004200012C0FB01E20FF31FE45EFE4F8081892BB7 +:1004300080832F5F3F4F2830310599F74F5F5F4F23 +:100440004830510549F020E030E0BA01B3E0660FD2 +:10045000771FBA95E1F7E5CF0895823049F08330F0 +:10046000F9F08130A1F5862F90E00E9402020895F4 +:1004700070E06830710558F520E030E08FEFF90149 +:10048000A3E0EE0FFF1FAA95E1F7E60FF71FE45E6A +:10049000FE4F80832F5F3F4F2830310581F708954D +:1004A00070E06830710598F420E030E0E3E0660F1A +:1004B000771FEA95E1F78FEFFB01E20FF31FE45E90 +:1004C000FE4F80832F5F3F4F28303105A9F70895F5 +:1004D000EF92FF920F931F93E82EF62E072F10E056 +:1004E00080E00E94E5018E2D612F0E942D028F2D4C +:1004F000902F0E94D6011F5F183091F717E080E01F +:100500000E94E5018E2D612F0E942D028F2D902FCC +:100510000E94D601115098F71F910F91FF90EF9014 +:1005200008954F925F926F927F929F92AF92BF9287 +:10053000CF92DF92EF92FF920F931F93CF93DF93AF +:10054000982E162F072F3A0180E00E94E501212FF7 +:10055000302FC9016C01C0E0D0E0B7E04B2E512C28 +:1005600035C06114710431F0F5018081A201481B8E +:10057000510904C0F7018081482F50E0F3E09F1635 +:1005800019F4CE01B8010DC082E0981621F4CE0115 +:10059000BA01A80106C091E0991629F4CA01B80170 +:1005A000AE010E945D010F5F1F4F0894A11CB11C9A +:1005B0000894E11CF11C0830110599F62196E8E039 +:1005C000F0E0CE0EDF1EC830D10529F056017601CD +:1005D00000E010E0C6CFDF91CF911F910F91FF9007 +:1005E000EF90DF90CF90BF90AF909F907F906F90F3 +:1005F0005F904F900895EF92FF920F931F93CF93C8 +:10060000DF9380E00E94E50100E010E08FEEE82E2D +:1006100082E0F82E5DC080E00E94E501CE0165E039 +:1006200070E00E949908882777FD8095982F0E9496 +:10063000D1058FEF0E94E50164E170E080E090E079 +:100640000E94D105CE0166EF7FEF0E94990888EEE7 +:1006500093E00E9499086F507040C60FD71F1C1678 +:100660001D06CCF264EF71E080E090E00E94D105BD +:10067000CEEED2E080E00E94E501C7018C1B9D0B0D +:1006800065E070E00E949908882777FD8095982F93 +:100690000E94D1058FEF0E94E50164E170E080E0E7 +:1006A00090E00E94D105CE0166EF7FEF0E9499088D +:1006B00088EE93E00E9499086F507040C60FD71FD4 +:1006C0001C161D06BCF20F5F1F4F0230110519F0FA +:1006D000CEEED2E0A0CFDF91CF911F910F91FF908E +:1006E000EF9008952F923F924F925F926F927F9278 +:1006F0008F929F92AF92BF92CF92DF92EF92FF9232 +:100700000F931F93DF93CF93CDB7DEB7C158D0407F +:100710000FB6F894DEBF0FBECDBFCF57DF4F888333 +:10072000C158D0402B013A01490141E4A42EB12C1B +:10073000AC0EBD1EF50131E8C32ED12CCC0EDD1E52 +:100740001192EC15FD05E1F700E010E01E010894A0 +:10075000211C311C81E088169104C9F414C00E9448 +:100760008B0960E470E00E949908E1E4F0E0EC0F8E +:10077000FD1FE80FF91F8081882389F70F5F1F4F46 +:1007800091E0908316C0003411054CF312C082E052 +:100790008816910471F4003411055CF4E1E4F0E092 +:1007A000EC0FFD1FE00FF11F80818F5F80830F5FD3 +:1007B0001F4FF501EE24FF249081892F8150863050 +:1007C00010F49F5F90838081873019F40894E11CB6 +:1007D000F11C3196EC15FD0579F7D101F501808109 +:1007E0004114510419F097E0981B892F8C9331968E +:1007F0001196EC15FD0599F7C3010E94D601CF575C +:10080000DF4F8881C158D040B10140E050E00E94E4 +:10081000910280E4E816F10409F09CCFCF57DF4F36 +:100820000FB6F894DEBF0FBECDBFCF91DF911F9101 +:100830000F91FF90EF90DF90CF90BF90AF909F907F +:100840008F907F906F905F904F903F902F90089582 +:100850008F929F92AF92BF92CF92DF92EF92FF92D0 +:100860000F931F93CF93DF934C018B016130710580 +:1008700011F480E001C08FEF0E94E501C0E0D0E0FC +:100880000E948B0968E070E00E949908B82EA92E9A +:100890000E948B0968E070E00E949908D82EC92E4A +:1008A0000E948B0968E070E00E949908F82EE92EFA +:1008B0000115110559F48B2D9A2D6D2D7C2D4F2D81 +:1008C0005E2D0E9483018130D9F60DC001301105E3 +:1008D000B9F68B2D9A2D6D2D7C2D4F2D5E2D0E94FE +:1008E0008301882369F68B2D9A2D6D2D7C2D4F2D3C +:1008F0005E2D98010E94CD01C4010E94D60121966F +:1009000081E0CF3FD80709F0BBCFDF91CF911F9196 +:100910000F91FF90EF90DF90CF90BF90AF909F909E +:100920008F900895FF920F931F930E94420168EEEB +:1009300073E080E090E00E94D105FF241EC0812F6B +:10094000602F4F2D21E00E94010165E070E080E002 +:1009500090E00E94D10564E670E080E090E00E94A3 +:10096000D1051F5F183059F70F5F083011F010E004 +:10097000E6CFF39488E0F81611F000E0F8CF68EEC7 +:1009800073E080E090E00E94D1050E94420183E084 +:1009900090E06CEB72E00E94680282E090E06CEB09 +:1009A00072E00E94680281E090E06CEB72E00E94CD +:1009B00068020E94FB028BE490E061E070E00E941C +:1009C00028048BE490E060E070E00E94280410E0CE +:1009D00081E060E070E046EB53E022E030E00E940E +:1009E000720381E061E070E046EB53E022E030E02A +:1009F0000E94720382E060E070E046EB53E022E088 +:100A000030E00E94720382E061E070E046EB53E068 +:100A100022E030E00E94720383E060E070E046EB89 +:100A200053E022E030E00E94720383E061E070E076 +:100A300046EB53E022E030E00E9472031F5F1A3061 +:100A400039F61F910F91FF9008950F931F930AEEAF +:100A500011E0C80140E855E260E070E00E946306E2 +:100A600068EE73E080E090E00E94D105C80160E08C +:100A700071E00E948E088FEF84B98CEF8AB915B8A7 +:100A80008BB183708BB9E0EBF0E01082A1EBB0E0AA +:100A90001C9280818260808382E38093B3001092F5 +:100AA000B2008C9186608C93E0E7F0E080818260F8 +:100AB00080831F910F9108950E94F7050E942505DC +:100AC0000E949204FDCF1F920F920FB60F92112435 +:100AD0002F933F938F939F93AF93BF938091610127 +:100AE00090916201A0916301B09164013091650120 +:100AF0000196A11DB11D232F2D5F2D3720F02D57FD +:100B00000196A11DB11D2093650180936101909311 +:100B10006201A0936301B093640180915D019091A3 +:100B20005E01A0915F01B09160010196A11DB11D10 +:100B300080935D0190935E01A0935F01B09360018B +:100B4000BF91AF919F918F913F912F910F900FBEC9 +:100B50000F901F9018959FB7F89420915D013091E8 +:100B60005E0140915F015091600186B5A89B06C06F +:100B70008F3F21F02F5F3F4F4F4F5F4F9FBF542F4D +:100B8000432F322F2227280F311D411D511D82E096 +:100B9000220F331F441F551F8A95D1F7B901CA018F +:100BA0000895EF92FF920F931F93CF93DF937B01F2 +:100BB0008C010E94AB05EB010EC00E94AB056C1BC3 +:100BC0007D0B685E7340C8F30894E108F1080109E1 +:100BD0001109C851DC4FE114F1040105110569F751 +:100BE000DF91CF911F910F91FF90EF90089578942E +:100BF00084B5826084BD84B5816084BD85B5826022 +:100C000085BD85B5816085BDEEE6F0E080818160BF +:100C10008083E1E8F0E010828081826080838081BF +:100C200081608083E0E8F0E0808181608083E1EB97 +:100C3000F0E0808184608083E0EBF0E0808181607F +:100C40008083EAE7F0E08081846080838081826035 +:100C5000808380818160808380818068808310921E +:100C6000C10008951F920F920FB60F9211242F9377 +:100C70003F934F938F939F93EF93FF934091C600C1 +:100C8000E091E601F091E70131969F012F773070F6 +:100C900031978091E8019091E9012817390739F0DF +:100CA000EA59FE4F40833093E7012093E601FF911C +:100CB000EF919F918F914F913F912F910F900FBE88 +:100CC0000F901F901895CF93DF93EC019A01AB0121 +:100CD000E885F985203081EE380780E0480780E01C +:100CE000580709F449C081E090E00A8802C0880FE3 +:100CF000991F0A94E2F7808360E079E08DE390E049 +:100D00000E94CE082150304040405040CA01B901F5 +:100D100022E030E040E050E00E94CE08EC81FD810E +:100D20003083EE81FF812083EA85FB85208141E0CD +:100D300050E0CA010E8402C0880F991F0A94E2F79E +:100D4000282B2083EA85FB852081CA010F8402C0FD +:100D5000880F991F0A94E2F7282B2083EA85FB85E8 +:100D60008081088802C0440F551F0A94E2F7842B43 +:100D70008083DF91CF910895108220E130E0CECFC3 +:100D8000DC011296ED91FC911397E058FF4F2191F1 +:100D9000319180819181281B390B2F773070C901E7 +:100DA0000895DC011296ED91FC911397EE57FF4FD9 +:100DB0002081318192918291E058F040821793070F +:100DC00019F42FEF3FEF05C0E20FF31F8081282FAA +:100DD00030E0C9010895DC011296ED91FC91139762 +:100DE000DF01AE57BF4F2D913C911197E058FF4F57 +:100DF00080819181E058F0408217930719F42FEF1A +:100E00003FEF0BC0E20FF31F80812F5F3F4F2F7723 +:100E100030702D933C93282F30E0C9010895DC01F8 +:100E20001296ED91FC911397EE57FF4F80819181BF +:100E3000929382930895FC01A085B18521898C91BC +:100E400090E0022E02C0959587950A94E2F780FF04 +:100E5000F6CF0484F585E02D608308958EE091E05F +:100E60009093EB018093EA0186E691E09093ED0187 +:100E70008093EC0185EC90E09093EF018093EE017C +:100E800084EC90E09093F1018093F00180EC90E08D +:100E90009093F3018093F20181EC90E09093F5013F +:100EA0008093F40186EC90E09093F7018093F60133 +:100EB00084E08093F80183E08093F90187E08093D8 +:100EC000FA0185E08093FB0181E08093FC010895A5 +:100ED0000F931F93CF93DF938C01EB0109C02196F1 +:100EE000D801ED91FC910190F081E02DC8010995A8 +:100EF00068816623A1F7DF91CF911F910F9108952B +:100F0000EF92FF920F931F93CF93DF938C017B019E +:100F1000EA010CC0D7016D917D01D801ED91FC91E2 +:100F20000190F081E02DC80109952197209791F754 +:100F3000DF91CF911F910F91FF90EF900895DC0109 +:100F4000ED91FC910280F381E02D099508952F9297 +:100F50003F924F925F926F927F928F929F92AF9249 +:100F6000BF92CF92DF92EF92FF920F931F93DF9386 +:100F7000CF93CDB7DEB7A0970FB6F894DEBF0FBE04 +:100F8000CDBF1C016A017B01411551056105710549 +:100F900049F440E350E060E070E020E030E00E947F +:100FA000410856C0882499245401422E55246624B1 +:100FB000772401E010E00C0F1D1F080D191DC7015B +:100FC000B601A30192010E94AC08F8016083089465 +:100FD000811C911CA11CB11CC701B601A301920187 +:100FE0000E94AC08C901DA016C017D01C114D10471 +:100FF000E104F104F1F681E0E82EF12CEC0EFD1E87 +:10100000E80CF91C3E010894611C711CD501C40157 +:101010000197A109B1096C01C818D90816C0F601D9 +:10102000EE0DFF1D40814A3010F4405D01C0495C67 +:10103000552747FD5095652F752FC10120E030E001 +:101040000E9441080894E108F1086E147F0439F702 +:10105000A0960FB6F894DEBF0FBECDBFCF91DF9143 +:101060001F910F91FF90EF90DF90CF90BF90AF90C6 +:101070009F908F907F906F905F904F903F902F90B8 +:101080000895EF92FF920F931F93CF93DF93EC019C +:101090007A018B012115310541F4E881F981019034 +:1010A000F081E02D642F09951BC02A303105B1F481 +:1010B00077FF10C04DE250E060E070E020E030E0EB +:1010C0000E94410810950095F094E094E11CF11CF9 +:1010D000011D111DCE01B801A7012AE00E94A7073A +:1010E000DF91CF911F910F91FF90EF9008950F9393 +:1010F0001F938C014DE050E060E070E020E030E0B4 +:101100000E944108C8014AE050E060E070E020E041 +:1011100030E00E9441081F910F9108950F931F9393 +:101120008C010E949F07C8010E9477081F910F91B0 +:10113000089597FB092E07260AD077FD04D049D0E1 +:1011400006D000201AF4709561957F4F0895F6F748 +:10115000909581959F4F0895A1E21A2EAA1BBB1B63 +:10116000FD010DC0AA1FBB1FEE1FFF1FA217B30773 +:10117000E407F50720F0A21BB30BE40BF50B661F89 +:10118000771F881F991F1A9469F76095709580954D +:1011900090959B01AC01BD01CF01089597FB092EED +:1011A00005260ED057FD04D0D7DF0AD0001C38F436 +:1011B00050954095309521953F4F4F4F5F4F089583 +:1011C000F6F790958095709561957F4F8F4F9F4F63 +:1011D0000895AA1BBB1B51E107C0AA1FBB1FA6177E +:1011E000B70710F0A61BB70B881F991F5A95A9F7D0 +:1011F00080959095BC01CD0108952F923F924F921A +:101200005F926F927F928F929F92AF92BF92CF9296 +:10121000DF92EF92FF920F931F93CF93DF93CDB79F +:10122000DEB7CA1BDB0B0FB6F894DEBF0FBECDBF17 +:1012300009942A88398848885F846E847D848C84E8 +:101240009B84AA84B984C884DF80EE80FD800C81F1 +:101250001B81AA81B981CE0FD11D0FB6F894DEBFD4 +:101260000FBECDBFED010895EE0FFF1F0590F49165 +:10127000E02D0994A0E0B0E0E0E4F9E00C94050969 +:10128000EC01A880B980CA80DB80A114B104C1043C +:10129000D10441F484E2A82E89EDB82E8BE5C82E46 +:1012A00087E0D82EC601B5012DE133EF41E050E0D3 +:1012B0000E94CE0827EA31E440E050E00E949B09FA +:1012C0007B018C01C601B5012DE133EF41E050E017 +:1012D0000E94CE08CA01B9012CEE34EF4FEF5FEF48 +:1012E0000E949B096E0D7F1D801F911F97FF04C0F8 +:1012F0006150704080409048688379838A839B83E3 +:101300009B013F77C901CDB7DEB7EAE00C94210914 +:101310000E943A09089586E091E00E943A090895F2 +:10132000A0E0B0E08093060190930701A09308012C +:10133000B09309010895629FD001739FF001829FCD +:10134000E00DF11D649FE00DF11D929FF00D839F54 +:10135000F00D749FF00D659FF00D9927729FB00DF1 +:10136000E11DF91F639FB00DE11DF91FBD01CF0104 +:0813700011240895F894FFCF49 +:10137800626567696E0001000000000000001B073D +:0C13880068078007C006EB06D1060F07BF +:00000001FF diff --git a/test/applet/wiring.d b/test/applet/wiring.d new file mode 100644 index 0000000..8983a5e --- /dev/null +++ b/test/applet/wiring.d @@ -0,0 +1,22 @@ +applet/wiring.o applet/wiring.d: ardmake/hardware/cores/arduino/wiring.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h diff --git a/test/applet/wiring_analog.d b/test/applet/wiring_analog.d new file mode 100644 index 0000000..098a29c --- /dev/null +++ b/test/applet/wiring_analog.d @@ -0,0 +1,24 @@ +applet/wiring_analog.o applet/wiring_analog.d: ardmake/hardware/cores/arduino/wiring_analog.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/applet/wiring_digital.d b/test/applet/wiring_digital.d new file mode 100644 index 0000000..a29fcb4 --- /dev/null +++ b/test/applet/wiring_digital.d @@ -0,0 +1,24 @@ +applet/wiring_digital.o applet/wiring_digital.d: ardmake/hardware/cores/arduino/wiring_digital.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/applet/wiring_pulse.d b/test/applet/wiring_pulse.d new file mode 100644 index 0000000..e52f4a7 --- /dev/null +++ b/test/applet/wiring_pulse.d @@ -0,0 +1,24 @@ +applet/wiring_pulse.o applet/wiring_pulse.d: ardmake/hardware/cores/arduino/wiring_pulse.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/applet/wiring_shift.d b/test/applet/wiring_shift.d new file mode 100644 index 0000000..aefc3d3 --- /dev/null +++ b/test/applet/wiring_shift.d @@ -0,0 +1,22 @@ +applet/wiring_shift.o applet/wiring_shift.d: ardmake/hardware/cores/arduino/wiring_shift.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h diff --git a/test/ardmake.conf b/test/ardmake.conf new file mode 100644 index 0000000..36a2d31 --- /dev/null +++ b/test/ardmake.conf @@ -0,0 +1,3 @@ +ARDUINO_DIR=ardmake +ARDUINO_BOARD=uno +ARDUINO_PORT=/dev/ttyACM0 diff --git a/test/ardmake/hardware/boards.txt b/test/ardmake/hardware/boards.txt new file mode 100644 index 0000000..259c570 --- /dev/null +++ b/test/ardmake/hardware/boards.txt @@ -0,0 +1,338 @@ +############################################################## + +uno.name=Arduino Uno +uno.upload.protocol=arduino +uno.upload.maximum_size=32256 +uno.upload.speed=115200 +uno.bootloader.low_fuses=0xff +uno.bootloader.high_fuses=0xde +uno.bootloader.extended_fuses=0x05 +uno.bootloader.path=optiboot +uno.bootloader.file=optiboot_atmega328.hex +uno.bootloader.unlock_bits=0x3F +uno.bootloader.lock_bits=0x0F +uno.build.mcu=atmega328p +uno.build.f_cpu=16000000L +uno.build.core=arduino + +############################################################## + +atmega328.name=Arduino Duemilanove or Nano w/ ATmega328 + +atmega328.upload.protocol=arduino +atmega328.upload.maximum_size=30720 +atmega328.upload.speed=57600 + +atmega328.bootloader.low_fuses=0xFF +atmega328.bootloader.high_fuses=0xDA +atmega328.bootloader.extended_fuses=0x05 +atmega328.bootloader.path=atmega +atmega328.bootloader.file=ATmegaBOOT_168_atmega328.hex +atmega328.bootloader.unlock_bits=0x3F +atmega328.bootloader.lock_bits=0x0F + +atmega328.build.mcu=atmega328p +atmega328.build.f_cpu=16000000L +atmega328.build.core=arduino + +############################################################## + +diecimila.name=Arduino Diecimila, Duemilanove, or Nano w/ ATmega168 + +diecimila.upload.protocol=arduino +diecimila.upload.maximum_size=14336 +diecimila.upload.speed=19200 + +diecimila.bootloader.low_fuses=0xff +diecimila.bootloader.high_fuses=0xdd +diecimila.bootloader.extended_fuses=0x00 +diecimila.bootloader.path=atmega +diecimila.bootloader.file=ATmegaBOOT_168_diecimila.hex +diecimila.bootloader.unlock_bits=0x3F +diecimila.bootloader.lock_bits=0x0F + +diecimila.build.mcu=atmega168 +diecimila.build.f_cpu=16000000L +diecimila.build.core=arduino + +############################################################## + +mega2560.name=Arduino Mega 2560 + +mega2560.upload.protocol=stk500v2 +mega2560.upload.maximum_size=258048 +mega2560.upload.speed=115200 + +mega2560.bootloader.low_fuses=0xFF +mega2560.bootloader.high_fuses=0xD8 +mega2560.bootloader.extended_fuses=0xFD +mega2560.bootloader.path=stk500v2 +mega2560.bootloader.file=stk500boot_v2_mega2560.hex +mega2560.bootloader.unlock_bits=0x3F +mega2560.bootloader.lock_bits=0x0F + +mega2560.build.mcu=atmega2560 +mega2560.build.f_cpu=16000000L +mega2560.build.core=arduino + +############################################################## + +mega.name=Arduino Mega (ATmega1280) + +mega.upload.protocol=arduino +mega.upload.maximum_size=126976 +mega.upload.speed=57600 + +mega.bootloader.low_fuses=0xFF +mega.bootloader.high_fuses=0xDA +mega.bootloader.extended_fuses=0xF5 +mega.bootloader.path=atmega +mega.bootloader.file=ATmegaBOOT_168_atmega1280.hex +mega.bootloader.unlock_bits=0x3F +mega.bootloader.lock_bits=0x0F + +mega.build.mcu=atmega1280 +mega.build.f_cpu=16000000L +mega.build.core=arduino + +############################################################## + +mini.name=Arduino Mini + +mini.upload.protocol=arduino +mini.upload.maximum_size=14336 +mini.upload.speed=19200 + +mini.bootloader.low_fuses=0xff +mini.bootloader.high_fuses=0xdd +mini.bootloader.extended_fuses=0x00 +mini.bootloader.path=atmega +mini.bootloader.file=ATmegaBOOT_168_ng.hex +mini.bootloader.unlock_bits=0x3F +mini.bootloader.lock_bits=0x0F + +mini.build.mcu=atmega168 +mini.build.f_cpu=16000000L +mini.build.core=arduino + +############################################################## + +fio.name=Arduino Fio + +fio.upload.protocol=arduino +fio.upload.maximum_size=30720 +fio.upload.speed=57600 + +fio.bootloader.low_fuses=0xFF +fio.bootloader.high_fuses=0xDA +fio.bootloader.extended_fuses=0x05 +fio.bootloader.path=arduino:atmega +fio.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex +fio.bootloader.unlock_bits=0x3F +fio.bootloader.lock_bits=0x0F + +fio.build.mcu=atmega328p +fio.build.f_cpu=8000000L +fio.build.core=arduino:arduino + +############################################################## + +bt328.name=Arduino BT w/ ATmega328 + +bt328.upload.protocol=arduino +bt328.upload.maximum_size=28672 +bt328.upload.speed=19200 +bt328.upload.disable_flushing=true + +bt328.bootloader.low_fuses=0xff +bt328.bootloader.high_fuses=0xd8 +bt328.bootloader.extended_fuses=0x05 +bt328.bootloader.path=bt +bt328.bootloader.file=ATmegaBOOT_168_atmega328_bt.hex +bt328.bootloader.unlock_bits=0x3F +bt328.bootloader.lock_bits=0x0F + +bt328.build.mcu=atmega328p +bt328.build.f_cpu=16000000L +bt328.build.core=arduino + +############################################################## + +bt.name=Arduino BT w/ ATmega168 + +bt.upload.protocol=arduino +bt.upload.maximum_size=14336 +bt.upload.speed=19200 +bt.upload.disable_flushing=true + +bt.bootloader.low_fuses=0xff +bt.bootloader.high_fuses=0xdd +bt.bootloader.extended_fuses=0x00 +bt.bootloader.path=bt +bt.bootloader.file=ATmegaBOOT_168.hex +bt.bootloader.unlock_bits=0x3F +bt.bootloader.lock_bits=0x0F + +bt.build.mcu=atmega168 +bt.build.f_cpu=16000000L +bt.build.core=arduino + +############################################################## + +lilypad328.name=LilyPad Arduino w/ ATmega328 + +lilypad328.upload.protocol=arduino +lilypad328.upload.maximum_size=30720 +lilypad328.upload.speed=57600 + +lilypad328.bootloader.low_fuses=0xFF +lilypad328.bootloader.high_fuses=0xDA +lilypad328.bootloader.extended_fuses=0x05 +lilypad328.bootloader.path=atmega +lilypad328.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex +lilypad328.bootloader.unlock_bits=0x3F +lilypad328.bootloader.lock_bits=0x0F + +lilypad328.build.mcu=atmega328p +lilypad328.build.f_cpu=8000000L +lilypad328.build.core=arduino + +############################################################## + +lilypad.name=LilyPad Arduino w/ ATmega168 + +lilypad.upload.protocol=arduino +lilypad.upload.maximum_size=14336 +lilypad.upload.speed=19200 + +lilypad.bootloader.low_fuses=0xe2 +lilypad.bootloader.high_fuses=0xdd +lilypad.bootloader.extended_fuses=0x00 +lilypad.bootloader.path=lilypad +lilypad.bootloader.file=LilyPadBOOT_168.hex +lilypad.bootloader.unlock_bits=0x3F +lilypad.bootloader.lock_bits=0x0F + +lilypad.build.mcu=atmega168 +lilypad.build.f_cpu=8000000L +lilypad.build.core=arduino + +############################################################## + +pro5v328.name=Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328 + +pro5v328.upload.protocol=arduino +pro5v328.upload.maximum_size=30720 +pro5v328.upload.speed=57600 + +pro5v328.bootloader.low_fuses=0xFF +pro5v328.bootloader.high_fuses=0xDA +pro5v328.bootloader.extended_fuses=0x05 +pro5v328.bootloader.path=atmega +pro5v328.bootloader.file=ATmegaBOOT_168_atmega328.hex +pro5v328.bootloader.unlock_bits=0x3F +pro5v328.bootloader.lock_bits=0x0F + +pro5v328.build.mcu=atmega328p +pro5v328.build.f_cpu=16000000L +pro5v328.build.core=arduino + +############################################################## + +pro5v.name=Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168 + +pro5v.upload.protocol=arduino +pro5v.upload.maximum_size=14336 +pro5v.upload.speed=19200 + +pro5v.bootloader.low_fuses=0xff +pro5v.bootloader.high_fuses=0xdd +pro5v.bootloader.extended_fuses=0x00 +pro5v.bootloader.path=atmega +pro5v.bootloader.file=ATmegaBOOT_168_diecimila.hex +pro5v.bootloader.unlock_bits=0x3F +pro5v.bootloader.lock_bits=0x0F + +pro5v.build.mcu=atmega168 +pro5v.build.f_cpu=16000000L +pro5v.build.core=arduino + +############################################################## + +pro328.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328 + +pro328.upload.protocol=arduino +pro328.upload.maximum_size=30720 +pro328.upload.speed=57600 + +pro328.bootloader.low_fuses=0xFF +pro328.bootloader.high_fuses=0xDA +pro328.bootloader.extended_fuses=0x05 +pro328.bootloader.path=atmega +pro328.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex +pro328.bootloader.unlock_bits=0x3F +pro328.bootloader.lock_bits=0x0F + +pro328.build.mcu=atmega328p +pro328.build.f_cpu=8000000L +pro328.build.core=arduino + +############################################################## + +pro.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168 + +pro.upload.protocol=arduino +pro.upload.maximum_size=14336 +pro.upload.speed=19200 + +pro.bootloader.low_fuses=0xc6 +pro.bootloader.high_fuses=0xdd +pro.bootloader.extended_fuses=0x00 +pro.bootloader.path=atmega +pro.bootloader.file=ATmegaBOOT_168_pro_8MHz.hex +pro.bootloader.unlock_bits=0x3F +pro.bootloader.lock_bits=0x0F + +pro.build.mcu=atmega168 +pro.build.f_cpu=8000000L +pro.build.core=arduino + +############################################################## + +atmega168.name=Arduino NG or older w/ ATmega168 + +atmega168.upload.protocol=arduino +atmega168.upload.maximum_size=14336 +atmega168.upload.speed=19200 + +atmega168.bootloader.low_fuses=0xff +atmega168.bootloader.high_fuses=0xdd +atmega168.bootloader.extended_fuses=0x00 +atmega168.bootloader.path=atmega +atmega168.bootloader.file=ATmegaBOOT_168_ng.hex +atmega168.bootloader.unlock_bits=0x3F +atmega168.bootloader.lock_bits=0x0F + +atmega168.build.mcu=atmega168 +atmega168.build.f_cpu=16000000L +atmega168.build.core=arduino + +############################################################## + +atmega8.name=Arduino NG or older w/ ATmega8 + +atmega8.upload.protocol=arduino +atmega8.upload.maximum_size=7168 +atmega8.upload.speed=19200 + +atmega8.bootloader.low_fuses=0xdf +atmega8.bootloader.high_fuses=0xca +atmega8.bootloader.path=atmega8 +atmega8.bootloader.file=ATmegaBOOT.hex +atmega8.bootloader.unlock_bits=0x3F +atmega8.bootloader.lock_bits=0x0F + +atmega8.build.mcu=atmega8 +atmega8.build.f_cpu=16000000L +atmega8.build.core=arduino + diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168.c b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168.c new file mode 100644 index 0000000..2b9fefa --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168.c @@ -0,0 +1,1054 @@ +/**********************************************************/ +/* Serial Bootloader for Atmel megaAVR Controllers */ +/* */ +/* tested with ATmega8, ATmega128 and ATmega168 */ +/* should work with other mega's, see code for details */ +/* */ +/* ATmegaBOOT.c */ +/* */ +/* */ +/* 20090308: integrated Mega changes into main bootloader */ +/* source by D. Mellis */ +/* 20080930: hacked for Arduino Mega (with the 1280 */ +/* processor, backwards compatible) */ +/* by D. Cuartielles */ +/* 20070626: hacked for Arduino Diecimila (which auto- */ +/* resets when a USB connection is made to it) */ +/* by D. Mellis */ +/* 20060802: hacked for Arduino by D. Cuartielles */ +/* based on a previous hack by D. Mellis */ +/* and D. Cuartielles */ +/* */ +/* Monitor and debug functions were added to the original */ +/* code by Dr. Erik Lins, chip45.com. (See below) */ +/* */ +/* Thanks to Karl Pitrich for fixing a bootloader pin */ +/* problem and more informative LED blinking! */ +/* */ +/* For the latest version see: */ +/* http://www.chip45.com/ */ +/* */ +/* ------------------------------------------------------ */ +/* */ +/* based on stk500boot.c */ +/* Copyright (c) 2003, Jason P. Kyle */ +/* All rights reserved. */ +/* see avr1.org for original file and information */ +/* */ +/* This program is free software; you can redistribute it */ +/* and/or modify it under the terms of the GNU General */ +/* Public License as published by the Free Software */ +/* Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will */ +/* be useful, but WITHOUT ANY WARRANTY; without even the */ +/* implied warranty of MERCHANTABILITY or FITNESS FOR A */ +/* PARTICULAR PURPOSE. See the GNU General Public */ +/* License for more details. */ +/* */ +/* You should have received a copy of the GNU General */ +/* Public License along with this program; if not, write */ +/* to the Free Software Foundation, Inc., */ +/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* Licence can be viewed at */ +/* http://www.fsf.org/licenses/gpl.txt */ +/* */ +/* Target = Atmel AVR m128,m64,m32,m16,m8,m162,m163,m169, */ +/* m8515,m8535. ATmega161 has a very small boot block so */ +/* isn't supported. */ +/* */ +/* Tested with m168 */ +/**********************************************************/ + +/* $Id$ */ + + +/* some includes */ +#include +#include +#include +#include +#include +#include + +/* the current avr-libc eeprom functions do not support the ATmega168 */ +/* own eeprom write/read functions are used instead */ +#if !defined(__AVR_ATmega168__) || !defined(__AVR_ATmega328P__) +#include +#endif + +/* Use the F_CPU defined in Makefile */ + +/* 20060803: hacked by DojoCorp */ +/* 20070626: hacked by David A. Mellis to decrease waiting time for auto-reset */ +/* set the waiting time for the bootloader */ +/* get this from the Makefile instead */ +/* #define MAX_TIME_COUNT (F_CPU>>4) */ + +/* 20070707: hacked by David A. Mellis - after this many errors give up and launch application */ +#define MAX_ERROR_COUNT 5 + +/* set the UART baud rate */ +/* 20060803: hacked by DojoCorp */ +//#define BAUD_RATE 115200 +#ifndef BAUD_RATE +#define BAUD_RATE 19200 +#endif + + +/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */ +/* never allow AVR Studio to do an update !!!! */ +#define HW_VER 0x02 +#define SW_MAJOR 0x01 +#define SW_MINOR 0x10 + + +/* Adjust to suit whatever pin your hardware uses to enter the bootloader */ +/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */ +/* ATmega1280 has four UARTS, but for Arduino Mega, we will only use RXD0 to get code */ +/* BL0... means UART0, BL1... means UART1 */ +#ifdef __AVR_ATmega128__ +#define BL_DDR DDRF +#define BL_PORT PORTF +#define BL_PIN PINF +#define BL0 PINF7 +#define BL1 PINF6 +#elif defined __AVR_ATmega1280__ +/* we just don't do anything for the MEGA and enter bootloader on reset anyway*/ +#else +/* other ATmegas have only one UART, so only one pin is defined to enter bootloader */ +#define BL_DDR DDRD +#define BL_PORT PORTD +#define BL_PIN PIND +#define BL PIND6 +#endif + + +/* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */ +/* if monitor functions are included, LED goes on after monitor was entered */ +#if defined __AVR_ATmega128__ || defined __AVR_ATmega1280__ +/* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128, Arduino Mega) */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB7 +#else +/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duomilanuove */ +/* other boards like e.g. Crumb8, Crumb168 are using PB2 */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB5 +#endif + + +/* monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */ +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) +#define MONITOR 1 +#endif + + +/* define various device id's */ +/* manufacturer byte is always the same */ +#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :( + +#if defined __AVR_ATmega1280__ +#define SIG2 0x97 +#define SIG3 0x03 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega1281__ +#define SIG2 0x97 +#define SIG3 0x04 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega128__ +#define SIG2 0x97 +#define SIG3 0x02 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega64__ +#define SIG2 0x96 +#define SIG3 0x02 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega32__ +#define SIG2 0x95 +#define SIG3 0x02 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega16__ +#define SIG2 0x94 +#define SIG3 0x03 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega8__ +#define SIG2 0x93 +#define SIG3 0x07 +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega88__ +#define SIG2 0x93 +#define SIG3 0x0a +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega168__ +#define SIG2 0x94 +#define SIG3 0x06 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega328P__ +#define SIG2 0x95 +#define SIG3 0x0F +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega162__ +#define SIG2 0x94 +#define SIG3 0x04 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega163__ +#define SIG2 0x94 +#define SIG3 0x02 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega169__ +#define SIG2 0x94 +#define SIG3 0x05 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega8515__ +#define SIG2 0x93 +#define SIG3 0x06 +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega8535__ +#define SIG2 0x93 +#define SIG3 0x08 +#define PAGE_SIZE 0x20U //32 words +#endif + + +/* function prototypes */ +void putch(char); +char getch(void); +void getNch(uint8_t); +void byte_response(uint8_t); +void nothing_response(void); +char gethex(void); +void puthex(char); +void flash_led(uint8_t); + +/* some variables */ +union address_union { + uint16_t word; + uint8_t byte[2]; +} address; + +union length_union { + uint16_t word; + uint8_t byte[2]; +} length; + +struct flags_struct { + unsigned eeprom : 1; + unsigned rampz : 1; +} flags; + +uint8_t buff[256]; +uint8_t address_high; + +uint8_t pagesz=0x80; + +uint8_t i; +uint8_t bootuart = 0; + +uint8_t error_count = 0; + +void (*app_start)(void) = 0x0000; + + +/* main program starts here */ +int main(void) +{ + uint8_t ch,ch2; + uint16_t w; + +#ifdef WATCHDOG_MODS + ch = MCUSR; + MCUSR = 0; + + WDTCSR |= _BV(WDCE) | _BV(WDE); + WDTCSR = 0; + + // Check if the WDT was used to reset, in which case we dont bootload and skip straight to the code. woot. + if (! (ch & _BV(EXTRF))) // if its a not an external reset... + app_start(); // skip bootloader +#else + asm volatile("nop\n\t"); +#endif + + /* set pin direction for bootloader pin and enable pullup */ + /* for ATmega128, two pins need to be initialized */ +#ifdef __AVR_ATmega128__ + BL_DDR &= ~_BV(BL0); + BL_DDR &= ~_BV(BL1); + BL_PORT |= _BV(BL0); + BL_PORT |= _BV(BL1); +#else + /* We run the bootloader regardless of the state of this pin. Thus, don't + put it in a different state than the other pins. --DAM, 070709 + This also applies to Arduino Mega -- DC, 080930 + BL_DDR &= ~_BV(BL); + BL_PORT |= _BV(BL); + */ +#endif + + +#ifdef __AVR_ATmega128__ + /* check which UART should be used for booting */ + if(bit_is_clear(BL_PIN, BL0)) { + bootuart = 1; + } + else if(bit_is_clear(BL_PIN, BL1)) { + bootuart = 2; + } +#endif + +#if defined __AVR_ATmega1280__ + /* the mega1280 chip has four serial ports ... we could eventually use any of them, or not? */ + /* however, we don't wanna confuse people, to avoid making a mess, we will stick to RXD0, TXD0 */ + bootuart = 1; +#endif + + /* check if flash is programmed already, if not start bootloader anyway */ + if(pgm_read_byte_near(0x0000) != 0xFF) { + +#ifdef __AVR_ATmega128__ + /* no UART was selected, start application */ + if(!bootuart) { + app_start(); + } +#else + /* check if bootloader pin is set low */ + /* we don't start this part neither for the m8, nor m168 */ + //if(bit_is_set(BL_PIN, BL)) { + // app_start(); + // } +#endif + } + +#ifdef __AVR_ATmega128__ + /* no bootuart was selected, default to uart 0 */ + if(!bootuart) { + bootuart = 1; + } +#endif + + + /* initialize UART(s) depending on CPU defined */ +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) + if(bootuart == 1) { + UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR0A = 0x00; + UCSR0C = 0x06; + UCSR0B = _BV(TXEN0)|_BV(RXEN0); + } + if(bootuart == 2) { + UBRR1L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR1H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR1A = 0x00; + UCSR1C = 0x06; + UCSR1B = _BV(TXEN1)|_BV(RXEN1); + } +#elif defined __AVR_ATmega163__ + UBRR = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRRHI = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSRA = 0x00; + UCSRB = _BV(TXEN)|_BV(RXEN); +#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + +#ifdef DOUBLE_SPEED + UCSR0A = (1<> 8; +#else + UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; +#endif + + UCSR0B = (1<>8; // set baud rate + UBRRL = (((F_CPU/BAUD_RATE)/16)-1); + UCSRB = (1<> 8; + UCSRA = 0x00; + UCSRC = 0x06; + UCSRB = _BV(TXEN)|_BV(RXEN); +#endif + +#if defined __AVR_ATmega1280__ + /* Enable internal pull-up resistor on pin D0 (RX), in order + to supress line noise that prevents the bootloader from + timing out (DAM: 20070509) */ + /* feature added to the Arduino Mega --DC: 080930 */ + DDRE &= ~_BV(PINE0); + PORTE |= _BV(PINE0); +#endif + + + /* set LED pin as output */ + LED_DDR |= _BV(LED); + + + /* flash onboard LED to signal entering of bootloader */ +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) + // 4x for UART0, 5x for UART1 + flash_led(NUM_LED_FLASHES + bootuart); +#else + flash_led(NUM_LED_FLASHES); +#endif + + /* 20050803: by DojoCorp, this is one of the parts provoking the + system to stop listening, cancelled from the original */ + //putch('\0'); + + /* forever loop */ + for (;;) { + + /* get character from UART */ + ch = getch(); + + /* A bunch of if...else if... gives smaller code than switch...case ! */ + + /* Hello is anyone home ? */ + if(ch=='0') { + nothing_response(); + } + + + /* Request programmer ID */ + /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */ + /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */ + else if(ch=='1') { + if (getch() == ' ') { + putch(0x14); + putch('A'); + putch('V'); + putch('R'); + putch(' '); + putch('I'); + putch('S'); + putch('P'); + putch(0x10); + } else { + if (++error_count == MAX_ERROR_COUNT) + app_start(); + } + } + + + /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */ + else if(ch=='@') { + ch2 = getch(); + if (ch2>0x85) getch(); + nothing_response(); + } + + + /* AVR ISP/STK500 board requests */ + else if(ch=='A') { + ch2 = getch(); + if(ch2==0x80) byte_response(HW_VER); // Hardware version + else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version + else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version + else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56 + else byte_response(0x00); // Covers various unnecessary responses we don't care about + } + + + /* Device Parameters DON'T CARE, DEVICE IS FIXED */ + else if(ch=='B') { + getNch(20); + nothing_response(); + } + + + /* Parallel programming stuff DON'T CARE */ + else if(ch=='E') { + getNch(5); + nothing_response(); + } + + + /* P: Enter programming mode */ + /* R: Erase device, don't care as we will erase one page at a time anyway. */ + else if(ch=='P' || ch=='R') { + nothing_response(); + } + + + /* Leave programming mode */ + else if(ch=='Q') { + nothing_response(); +#ifdef WATCHDOG_MODS + // autoreset via watchdog (sneaky!) + WDTCSR = _BV(WDE); + while (1); // 16 ms +#endif + } + + + /* Set address, little endian. EEPROM in bytes, FLASH in words */ + /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */ + /* This might explain why little endian was used here, big endian used everywhere else. */ + else if(ch=='U') { + address.byte[0] = getch(); + address.byte[1] = getch(); + nothing_response(); + } + + + /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */ + else if(ch=='V') { + if (getch() == 0x30) { + getch(); + ch = getch(); + getch(); + if (ch == 0) { + byte_response(SIG1); + } else if (ch == 1) { + byte_response(SIG2); + } else { + byte_response(SIG3); + } + } else { + getNch(3); + byte_response(0x00); + } + } + + + /* Write memory, length is big endian and is in bytes */ + else if(ch=='d') { + length.byte[1] = getch(); + length.byte[0] = getch(); + flags.eeprom = 0; + if (getch() == 'E') flags.eeprom = 1; + for (w=0;w127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME + else address_high = 0x00; +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) + RAMPZ = address_high; +#endif + address.word = address.word << 1; //address * 2 -> byte location + /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */ + if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes + cli(); //Disable interrupts, just to be sure +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) + while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete +#else + while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete +#endif + asm volatile( + "clr r17 \n\t" //page_word_count + "lds r30,address \n\t" //Address of FLASH location (in bytes) + "lds r31,address+1 \n\t" + "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM + "ldi r29,hi8(buff) \n\t" + "lds r24,length \n\t" //Length of data to be written (in bytes) + "lds r25,length+1 \n\t" + "length_loop: \n\t" //Main loop, repeat for number of words in block + "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page + "brne no_page_erase \n\t" + "wait_spm1: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm1 \n\t" + "ldi r16,0x03 \n\t" //Erase page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "wait_spm2: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm2 \n\t" + + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "no_page_erase: \n\t" + "ld r0,Y+ \n\t" //Write 2 bytes into page buffer + "ld r1,Y+ \n\t" + + "wait_spm3: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm3 \n\t" + "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer + "sts %0,r16 \n\t" + "spm \n\t" + + "inc r17 \n\t" //page_word_count++ + "cpi r17,%1 \n\t" + "brlo same_page \n\t" //Still same page in FLASH + "write_page: \n\t" + "clr r17 \n\t" //New page, write current one first + "wait_spm4: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm4 \n\t" +#ifdef __AVR_ATmega163__ + "andi r30,0x80 \n\t" // m163 requires Z6:Z1 to be zero during page write +#endif + "ldi r16,0x05 \n\t" //Write page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" + "ori r30,0x7E \n\t" // recover Z6:Z1 state after page write (had to be zero during write) +#endif + "wait_spm5: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm5 \n\t" + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "same_page: \n\t" + "adiw r30,2 \n\t" //Next word in FLASH + "sbiw r24,2 \n\t" //length-2 + "breq final_write \n\t" //Finished + "rjmp length_loop \n\t" + "final_write: \n\t" + "cpi r17,0 \n\t" + "breq block_done \n\t" + "adiw r24,2 \n\t" //length+2, fool above check on length after short page write + "rjmp write_page \n\t" + "block_done: \n\t" + "clr __zero_reg__ \n\t" //restore zero register +#if defined __AVR_ATmega168__ || __AVR_ATmega328P__ || __AVR_ATmega128__ || __AVR_ATmega1280__ || __AVR_ATmega1281__ + : "=m" (SPMCSR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31" +#else + : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31" +#endif + ); + /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */ + /* exit the bootloader without a power cycle anyhow */ + } + putch(0x14); + putch(0x10); + } else { + if (++error_count == MAX_ERROR_COUNT) + app_start(); + } + } + + + /* Read memory block mode, length is big endian. */ + else if(ch=='t') { + length.byte[1] = getch(); + length.byte[0] = getch(); +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) + if (address.word>0x7FFF) flags.rampz = 1; // No go with m256, FIXME + else flags.rampz = 0; +#endif + address.word = address.word << 1; // address * 2 -> byte location + if (getch() == 'E') flags.eeprom = 1; + else flags.eeprom = 0; + if (getch() == ' ') { // Command terminator + putch(0x14); + for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay + if (flags.eeprom) { // Byte access EEPROM read +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + while(EECR & (1<= 'a') { + return (a - 'a' + 0x0a); + } else if(a >= '0') { + return(a - '0'); + } + return a; +} + + +char gethex(void) { + return (gethexnib() << 4) + gethexnib(); +} + + +void puthex(char ch) { + char ah; + + ah = ch >> 4; + if(ah >= 0x0a) { + ah = ah - 0x0a + 'a'; + } else { + ah += '0'; + } + + ch &= 0x0f; + if(ch >= 0x0a) { + ch = ch - 0x0a + 'a'; + } else { + ch += '0'; + } + + putch(ah); + putch(ch); +} + + +void putch(char ch) +{ +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) + if(bootuart == 1) { + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; + } + else if (bootuart == 2) { + while (!(UCSR1A & _BV(UDRE1))); + UDR1 = ch; + } +#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + /* m8,16,32,169,8515,8535,163 */ + while (!(UCSRA & _BV(UDRE))); + UDR = ch; +#endif +} + + +char getch(void) +{ +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) + uint32_t count = 0; + if(bootuart == 1) { + while(!(UCSR0A & _BV(RXC0))) { + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + + return UDR0; + } + else if(bootuart == 2) { + while(!(UCSR1A & _BV(RXC1))) { + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + + return UDR1; + } + return 0; +#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + uint32_t count = 0; + while(!(UCSR0A & _BV(RXC0))){ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return UDR0; +#else + /* m8,16,32,169,8515,8535,163 */ + uint32_t count = 0; + while(!(UCSRA & _BV(RXC))){ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return UDR; +#endif +} + + +void getNch(uint8_t count) +{ + while(count--) { +#if defined(__AVR_ATmega128__) || defined(__AVR_ATmega1280__) + if(bootuart == 1) { + while(!(UCSR0A & _BV(RXC0))); + UDR0; + } + else if(bootuart == 2) { + while(!(UCSR1A & _BV(RXC1))); + UDR1; + } +#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + getch(); +#else + /* m8,16,32,169,8515,8535,163 */ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + //while(!(UCSRA & _BV(RXC))); + //UDR; + getch(); // need to handle time out +#endif + } +} + + +void byte_response(uint8_t val) +{ + if (getch() == ' ') { + putch(0x14); + putch(val); + putch(0x10); + } else { + if (++error_count == MAX_ERROR_COUNT) + app_start(); + } +} + + +void nothing_response(void) +{ + if (getch() == ' ') { + putch(0x14); + putch(0x10); + } else { + if (++error_count == MAX_ERROR_COUNT) + app_start(); + } +} + +void flash_led(uint8_t count) +{ + while (count--) { + LED_PORT |= _BV(LED); + _delay_ms(100); + LED_PORT &= ~_BV(LED); + _delay_ms(100); + } +} + + +/* end of file ATmegaBOOT.c */ diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex new file mode 100644 index 0000000..f16e877 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex @@ -0,0 +1,245 @@ +:020000021000EC +:10F000000C9472F80C9492F80C9492F80C9492F878 +:10F010000C9492F80C9492F80C9492F80C9492F848 +:10F020000C9492F80C9492F80C9492F80C9492F838 +:10F030000C9492F80C9492F80C9492F80C9492F828 +:10F040000C9492F80C9492F80C9492F80C9492F818 +:10F050000C9492F80C9492F80C9492F80C9492F808 +:10F060000C9492F80C9492F80C9492F80C9492F8F8 +:10F070000C9492F80C9492F80C9492F80C9492F8E8 +:10F080000C9492F80C9492F80C9492F80C9492F8D8 +:10F090000C9492F80C9492F80C9492F80C9492F8C8 +:10F0A0000C9492F80C9492F80C9492F80C9492F8B8 +:10F0B0000C9492F80C9492F80C9492F80C9492F8A8 +:10F0C0000C9492F80C9492F80C9492F80C9492F898 +:10F0D0000C9492F80C9492F80C9492F80C9492F888 +:10F0E0000C9492F811241FBECFEFD1E2DEBFCDBF4A +:10F0F00012E0A0E0B2E0EEEDFEEF01E00BBF02C0D7 +:10F1000007900D92A833B107D9F71BBE13E0A8E30F +:10F11000B2E001C01D92A334B107E1F70E9412FAD8 +:10F120000C946DFF0C9400F8982F959595959595F6 +:10F130009595905D8F708A301CF1282F295A809107 +:10F140003802813019F0823071F008958091C0004A +:10F1500085FFFCCF9093C6008091C00085FFFCCF57 +:10F160002093C60008958091C80085FFFCCF90933E +:10F17000CE008091C80085FFFCCF2093CE0008957B +:10F18000282F205DDCCF982F80913802813019F034 +:10F19000823041F008958091C00085FFFCCF9093AC +:10F1A000C60008958091C80085FFFCCF9093CE00E3 +:10F1B0000895EF92FF920F931F9380913802813050 +:10F1C00069F1823031F080E01F910F91FF90EF9054 +:10F1D0000895EE24FF2487018091C80087FD17C0A1 +:10F1E0000894E11CF11C011D111D81E4E81682E464 +:10F1F000F8068FE0080780E0180770F3E0913A0204 +:10F20000F0913B0209958091C80087FFE9CF80917A +:10F21000CE001F910F91FF90EF900895EE24FF24F0 +:10F2200087018091C00087FD17C00894E11CF11C84 +:10F23000011D111D81E4E81682E4F8068FE008073D +:10F2400080E0180770F3E0913A02F0913B020995D3 +:10F250008091C00087FFE9CF8091C6001F910F9178 +:10F26000FF90EF9008950E94D9F8982F809138026E +:10F27000813049F0823091F091366CF490330CF08B +:10F280009053892F08958091C00085FFFCCF909303 +:10F29000C60091369CF39755892F08958091C80038 +:10F2A00085FFFCCF9093CE00E7CF1F930E9433F9E8 +:10F2B000182F0E9433F91295107F810F1F91089526 +:10F2C000982F20913802992339F0213031F02230E3 +:10F2D00061F091509923C9F708958091C00087FF8C +:10F2E000FCCF8091C6009150F5CF8091C80087FF78 +:10F2F000FCCF8091CE009150EDCF1F93182F0E942C +:10F30000D9F8803249F0809139028F5F80933902B9 +:10F31000853091F11F910895809138028130B9F0C4 +:10F320008230C1F78091C80085FFFCCF84E18093D3 +:10F33000CE008091C80085FFFCCF1093CE00809155 +:10F34000C80085FFFCCF80E18093CE00E3CF8091A1 +:10F35000C00085FFFCCF84E18093C6008091C0008F +:10F3600085FFFCCF1093C6008091C00085FFFCCFC5 +:10F3700080E18093C600CECFE0913A02F0913B024B +:10F3800009951F9108950E94D9F8803241F080912B +:10F3900039028F5F80933902853029F10895809179 +:10F3A0003802813089F08230C9F78091C80085FF2A +:10F3B000FCCF84E18093CE008091C80085FFFCCF14 +:10F3C00080E18093CE0008958091C00085FFFCCF3E +:10F3D00084E18093C6008091C00085FFFCCF80E16E +:10F3E0008093C6000895E0913A02F0913B0209959E +:10F3F000089540E951E08823A1F02F9A28EE33E0E8 +:10F40000FA013197F1F721503040D1F72F9828EECB +:10F4100033E0FA013197F1F721503040D1F78150B4 +:10F4200061F708952F923F924F925F926F927F9271 +:10F430008F929F92AF92BF92CF92DF92EF92FF9204 +:10F440000F931F93CF93DF93000081E080933802E6 +:10F4500080E18093C4001092C5001092C00086E045 +:10F460008093C20088E18093C1006898709A279ABF +:10F4700081E00E94F9F9E4E1EE2E7EE1D72E67E902 +:10F48000C62E53E0B52E40E1A42E9924939431E486 +:10F49000832E26E5722E92E5692E80E2582E09E42D +:10F4A000402E13E5312EB0E52B2E0E94D9F8803383 +:10F4B000C9F1813309F452C0803409F4C8C08134E1 +:10F4C00009F4EAC0823489F1853409F4CAC0803570 +:10F4D00049F1823539F1813529F1853509F4ECC0DE +:10F4E000863509F409C1843609F428C1843709F442 +:10F4F000ABC1853709F473C2863709F4D9C08132AC +:10F5000009F4B7C2809139028F5F80933902853048 +:10F5100061F6E0913A02F0913B0209950E94D9F818 +:10F52000803339F60E94C3F9C0CF2091380293E1AD +:10F5300005C0223061F09923A9F391502130C9F719 +:10F540008091C00087FFFCCF8091C600F4CF8091EE +:10F55000C80087FFFCCF8091CE00EDCF0E94D9F884 +:10F56000803281F6809138028130D1F1823009F009 +:10F570009CCF8091C80085FFFCCFE092CE008091A7 +:10F58000C80085FFFCCF8092CE008091C80085FF27 +:10F59000FCCF7092CE008091C80085FFFCCF6092B6 +:10F5A000CE008091C80085FFFCCF5092CE008091A4 +:10F5B000C80085FFFCCF4092CE008091C80085FF37 +:10F5C000FCCF3092CE008091C80085FFFCCF209206 +:10F5D000CE008091C80085FFFCCFA092CE0065CF01 +:10F5E0008091C00085FFFCCFE092C6008091C000F2 +:10F5F00085FFFCCF8092C6008091C00085FFFCCFC4 +:10F600007092C6008091C00085FFFCCF6092C6005A +:10F610008091C00085FFFCCF5092C6008091C00051 +:10F6200085FFFCCF4092C6008091C00085FFFCCFD3 +:10F630003092C6008091C00085FFFCCF2092C600AA +:10F640008091C00085FFFCCFA092C6002ECF0E9403 +:10F65000D9F8863808F466CF0E94D9F80E94C3F919 +:10F6600024CF2091380294E0213041F0223069F01B +:10F67000992309F457CF91502130C1F78091C000F0 +:10F6800087FFFCCF8091C600F3CF8091C80087FF31 +:10F69000FCCF8091CE00ECCF0E94D9F8803841F1A8 +:10F6A000813809F447C0823809F4CAC08839E1F0CA +:10F6B00080E00E947DF9F9CE0E94D9F880933C0247 +:10F6C0000E94D9F880933D020E94C3F9EECE0E94B9 +:10F6D000D9F80E94D9F8182F0E94D9F8112309F4FB +:10F6E0007EC2113009F40AC283E00E947DF9DDCEAA +:10F6F00082E00E947DF9D9CE0E94D9F8803339F397 +:10F700002091380292E0213039F0223061F09923C3 +:10F7100079F291502130C9F78091C00087FFFCCF6A +:10F720008091C600F4CF8091C80087FFFCCF809104 +:10F73000CE00EDCF81E00E947DF9B7CE0E94D9F8CE +:10F7400080933F030E94D9F880933E038091420347 +:10F750008E7F809342030E94D9F8853409F4B3C1A7 +:10F7600080913E0390913F03892B89F000E010E0E7 +:10F770000E94D9F8F801E25CFD4F80830F5F1F4FB4 +:10F7800080913E0390913F030817190788F30E9468 +:10F79000D9F8803209F0B6CE8091420380FFB2C121 +:10F7A00040913C0250913D02440F551F50933D0241 +:10F7B00040933C0260913E0370913F0361157105D7 +:10F7C000F1F080E090E09A01280F391FFC01E25C23 +:10F7D000FD4FE081F999FECF1FBA32BD21BDE0BDDA +:10F7E0000FB6F894FA9AF99A0FBE01968617970702 +:10F7F00050F3460F571F50933D0240933C028091B7 +:10F800003802813081F0823009F04FCE8091C800FB +:10F8100085FFFCCFE092CE008091C80085FFFCCF31 +:10F82000A092CE0042CE8091C00085FFFCCFE09236 +:10F83000C6008091C00085FFFCCFA092C60035CEE7 +:10F8400080E10E947DF931CE0E94D9F880933F0378 +:10F850000E94D9F880933E0320913C0230913D02F2 +:10F8600037FD46C1809142038D7F80934203220F72 +:10F87000331F30933D0220933C020E94D9F8853417 +:10F8800009F430C1809142038E7F809342030E942D +:10F89000D9F8803209F009CE60913802613009F45C +:10F8A0006FC0623009F473C000913E0310913F03B2 +:10F8B0000115110509F440C080914203782F717041 +:10F8C000F82EF69481E0F82240913C0250913D02DE +:10F8D00020E030E013C0FF2009F060C0FA019491ED +:10F8E000613009F43BC0623009F441C0CA0101969D +:10F8F0002F5F3F4FAC0120173107D0F4772359F326 +:10F90000F999FECF52BD41BDF89A90B56130F9F03A +:10F91000623061F78091C80085FFFCCF9093CE00E4 +:10F92000CA0101962F5F3F4FAC012017310730F31A +:10F9300090933D0280933C02613009F4CAC062306A +:10F9400009F0B3CD8091C80085FFFCCF46CE8091F1 +:10F95000C00085FFFCCF9093C600C8CF8091C00047 +:10F9600085FDF9CF8091C00085FFF8CFF4CF80915D +:10F97000C80085FDD3CF8091C80085FFF8CFCECFDA +:10F980008091C00085FFFCCFE092C6008DCF8091B2 +:10F99000C80085FFFCCFE092CE0086CFCA01A0E070 +:10F9A000B0E080509040AF4FBF4FABBFFC0197918C +:10F9B000613061F0623009F099CF8091C80085FD17 +:10F9C000ADCF8091C80085FFF8CFA8CF8091C0004F +:10F9D00085FDC1CF8091C00085FFF8CFBCCF0E94CC +:10F9E000D9F8803209F08ECD80913802813011F142 +:10F9F000823009F05ACD8091C80085FFFCCFE0929B +:10FA0000CE008091C80085FFFCCFD092CE008091BF +:10FA1000C80085FFFCCFC092CE008091C80085FF52 +:10FA2000FCCFB092CE008091C80085FFFCCFA092A1 +:10FA3000CE003BCD8091C00085FFFCCFE092C60098 +:10FA40008091C00085FFFCCFD092C6008091C0009D +:10FA500085FFFCCFC092C6008091C00085FFFCCF1F +:10FA6000B092C6008091C00085FFFCCFA092C60076 +:10FA70001CCD0E94D9F8813209F017CD0E94D9F827 +:10FA8000813209F012CD279A2F98109240032091CD +:10FA90003802E1E491E00EC0223009F4A4C0909352 +:10FAA0004003E92FF0E0E050FE4FE0819F5FEE233E +:10FAB00009F4A0C0213081F78091C00085FFFCCF00 +:10FAC000E093C600ECCF80914203816080934203B3 +:10FAD00047CE8091C00085FDB7CD8091C00085FFE5 +:10FAE000F8CFB2CD80914203816080934203CFCEA4 +:10FAF00080914203826080934203B9CE87E90E94DD +:10FB00007DF9D3CC80913D028823880F880B892111 +:10FB1000809341038BBF80913C0290913D02880FFE +:10FB2000991F90933D0280933C0280913E0380FF99 +:10FB300009C080913E0390913F03019690933F034B +:10FB400080933E03F894F999FECF1127E0913C028F +:10FB5000F0913D02CEE3D2E080913E0390913F03CD +:10FB6000103091F40091570001700130D9F303E097 +:10FB700000935700E8950091570001700130D9F3C8 +:10FB800001E100935700E895099019900091570002 +:10FB900001700130D9F301E000935700E895139507 +:10FBA000103898F011270091570001700130D9F3F7 +:10FBB00005E000935700E89500915700017001306F +:10FBC000D9F301E100935700E8953296029709F0C6 +:10FBD000C7CF103011F00296E5CF112410CE8EE180 +:10FBE0000E947DF962CC8091C80085FFFCCFE09334 +:10FBF000CE0055CF7AE0B72E6DE0A62E5AE3952EB3 +:10FC000040E2842E3DE3732E90E3692E81E3582E6B +:10FC1000213009F442C0223009F45FC00E94D9F8B3 +:10FC2000982F20913802213089F1223009F44EC0FA +:10FC3000943709F46BC0923709F405C1973709F47A +:10FC40007BC0953799F0923609F4BDC09A3601F71A +:10FC5000E0913A02F0913B02099520913802D8CF09 +:10FC60008091C00085FFFCCF9093C6000E94D9F818 +:10FC7000982F80913802813099F38230B9F78091C2 +:10FC8000C80085FFFCCF9093CE00F0CF8091C000DC +:10FC900085FFFCCF9093C600CBCF8091C00085FF3D +:10FCA000FCCFB092C6008091C00085FFFCCFA0922F +:10FCB000C6008091C00085FFFCCF9092C600809165 +:10FCC000C00085FFFCCF8092C600A8CF8091C800FD +:10FCD00085FFFCCF9093CE00ABCF8091C80085FF0D +:10FCE000FCCFB092CE008091C80085FFFCCFA092DF +:10FCF000CE008091C80085FFFCCF9092CE0080910D +:10FD0000C80085FFFCCF8092CE0088CF1F9947C0E6 +:10FD10002F9A213051F0223009F07ACF8091C8001B +:10FD200085FFFCCF6092CE0073CF8091C00085FF2D +:10FD3000FCCF6092C6006CCF0E94D9F8982F8091BA +:10FD400038028130F1F0823009F4ABC00E9455F9DD +:10FD5000082F0E9455F9182F0E94D9F8982F8091EA +:10FD600038028130A9F0823009F4A2C00E9455F90E +:10FD7000D02ECC24F601E10FF11D808320913802B2 +:10FD800047CF8091C00085FFFCCF9093C600DECFA7 +:10FD90008091C00085FFFCCF9093C600E7CF2F98DD +:10FDA000213051F0223009F033CF8091C80085FF17 +:10FDB000FCCF5092CE002CCF8091C00085FFFCCFAD +:10FDC0005092C60025CF213041F1223081F080E8E9 +:10FDD00085BF109274001092750080E091E1FC01E3 +:10FDE000819180E091E13097D1F3CF01F8CF8091FC +:10FDF000C80085FFFCCF82E68093CE008091C800CA +:10FE000085FFFCCF85E78093CE008091C80085FFF9 +:10FE1000FCCF83E78093CE00DACF8091C00085FFCE +:10FE2000FCCF82E68093C6008091C00085FFFCCFA6 +:10FE300085E78093C6008091C00085FFFCCF83E7F3 +:10FE40008093C600C4CF0E94D9F8982F80913802C1 +:10FE50008130C9F08230D1F10E9455F9182F0E94EB +:10FE600055F9982F809138028130A1F0823039F114 +:10FE7000F12EEE24F701E90FF11D80810E9494F824 +:10FE800020913802C5CE8091C00085FFFCCF9093B1 +:10FE9000C600E2CF8091C00085FFFCCF7092C60003 +:10FEA000E7CF8091C80085FFFCCF9093CE004ECF66 +:10FEB0008091C80085FFFCCF9093CE0057CF8091F2 +:10FEC000C80085FFFCCF7092CE00D2CF8091C800D1 +:0EFED00085FFFCCF9093CE00BFCFF894FFCFFC +:10FEDE0041546D656761424F4F54202F204172642B +:10FEEE0075696E6F204D656761202D20284329208E +:10FEFE0041726475696E6F204C4C43202D20303951 +:08FF0E00303933300A0D008088 +:040000031000F000F9 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex new file mode 100644 index 0000000..43a8b30 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex @@ -0,0 +1,125 @@ +:107800000C94343C0C94513C0C94513C0C94513CE1 +:107810000C94513C0C94513C0C94513C0C94513CB4 +:107820000C94513C0C94513C0C94513C0C94513CA4 +:107830000C94513C0C94513C0C94513C0C94513C94 +:107840000C94513C0C94513C0C94513C0C94513C84 +:107850000C94513C0C94513C0C94513C0C94513C74 +:107860000C94513C0C94513C11241FBECFEFD8E036 +:10787000DEBFCDBF11E0A0E0B1E0ECE9FFE702C060 +:1078800005900D92A230B107D9F712E0A2E0B1E065 +:1078900001C01D92AD30B107E1F70E942D3D0C945F +:1078A000CC3F0C94003C982F959595959595959582 +:1078B000905D8F708A307CF0282F295A8091C0000B +:1078C00085FFFCCF9093C6008091C00085FFFCCF60 +:1078D0002093C6000895282F205DF0CF982F809127 +:1078E000C00085FFFCCF9093C6000895EF92FF92F1 +:1078F0000F931F93EE24FF2487018091C00087FD22 +:1079000017C00894E11CF11C011D111D81E4E8164B +:1079100082E4F8068FE0080780E0180770F3E09132 +:107920000401F091050109958091C00087FFE9CF1E +:107930008091C6001F910F91FF90EF9008950E94D3 +:10794000763C982F8091C00085FFFCCF9093C600B5 +:1079500091362CF490330CF09053892F089597555D +:10796000892F08951F930E949F3C182F0E949F3CCF +:107970001295107F810F1F9108951F93182F882350 +:1079800021F00E94763C1150E1F71F9108951F935A +:10799000182F0E94763C803249F0809103018F5F5E +:1079A000809303018530C1F01F9108958091C0003C +:1079B00085FFFCCF84E18093C6008091C00085FFE5 +:1079C000FCCF1093C6008091C00085FFFCCF80E102 +:1079D0008093C6001F910895E0910401F091050184 +:1079E00009951F9108950E94763C803241F0809164 +:1079F00003018F5F80930301853081F008958091AA +:107A0000C00085FFFCCF84E18093C6008091C00058 +:107A100085FFFCCF80E18093C6000895E0910401CA +:107A2000F09105010995089540E951E08823A1F0FE +:107A30002D9A28EE33E0FA013197F1F721503040CA +:107A4000D1F72D9828EE33E0FA013197F1F7215064 +:107A50003040D1F7815061F708953F924F925F9285 +:107A60006F927F928F929F92AF92BF92CF92DF924E +:107A7000EF92FF920F931F93CF93DF93000080E16B +:107A80008093C4001092C50088E18093C10086E015 +:107A90008093C2005098589A259A81E00E94143D24 +:107AA00024E1F22E9EE1E92E85E9D82E0FE0C02ECA +:107AB00010E1B12EAA24A394B1E49B2EA6E58A2E50 +:107AC000F2E57F2EE0E26E2E79E4572E63E5462E36 +:107AD00050E5352E0E94763C8033B1F18133B9F107 +:107AE000803409F46FC0813409F476C0823409F41B +:107AF00085C0853409F488C0803531F1823521F1A3 +:107B0000813511F1853509F485C0863509F48DC0BC +:107B1000843609F496C0843709F403C1853709F423 +:107B200072C1863709F466C0809103018F5F80932C +:107B30000301853079F6E0910401F0910501099582 +:107B40000E94763C803351F60E94F33CC3CF0E94E2 +:107B5000763C803249F78091C00085FFFCCFF092DF +:107B6000C6008091C00085FFFCCF9092C600809136 +:107B7000C00085FFFCCF8092C6008091C00085FFC9 +:107B8000FCCF7092C6008091C00085FFFCCF609250 +:107B9000C6008091C00085FFFCCF5092C600809146 +:107BA000C00085FFFCCF4092C6008091C00085FFD9 +:107BB000FCCF3092C6008091C00085FFFCCFB09210 +:107BC000C60088CF0E94763C863808F4BDCF0E945C +:107BD000763C0E94F33C7ECF0E94763C803809F4CC +:107BE0009CC0813809F40BC1823809F43CC1883942 +:107BF00009F48FC080E00E94C73C6CCF84E10E94F2 +:107C0000BD3C0E94F33C66CF85E00E94BD3C0E94D3 +:107C1000F33C60CF0E94763C809306010E94763C44 +:107C2000809307010E94F33C55CF0E94763C80333D +:107C300009F41DC183E00E94BD3C80E00E94C73C66 +:107C400049CF0E94763C809309020E94763C809343 +:107C5000080280910C028E7F80930C020E94763C79 +:107C6000853409F415C18091080290910902892B8D +:107C700089F000E010E00E94763CF801E85FFE4FDA +:107C800080830F5F1F4F80910802909109020817AF +:107C9000190788F30E94763C803209F045CF809125 +:107CA0000C0280FF01C16091060170910701660F0F +:107CB000771F7093070160930601A0910802B091AD +:107CC00009021097C9F0E8E0F1E09B01AD014E0F09 +:107CD0005F1FF999FECF32BD21BD819180BDFA9A17 +:107CE000F99A2F5F3F4FE417F50799F76A0F7B1F4B +:107CF00070930701609306018091C00085FFFCCF5F +:107D0000F092C6008091C00085FFFCCFB092C60003 +:107D1000E1CE83E00E94C73CDDCE82E00E94C73CFA +:107D2000D9CE0E94763C809309020E94763C8093D3 +:107D300008028091060190910701880F991F909386 +:107D40000701809306010E94763C853409F4A6C0A1 +:107D500080910C028E7F80930C020E94763C8032D0 +:107D600009F0B8CE8091C00085FFFCCFF092C6002C +:107D7000609108027091090261157105B9F140E046 +:107D800050E080910C02A82FA170B82FB27011C0E2 +:107D9000BB2309F45CC0E0910601F0910701319624 +:107DA000F0930701E09306014F5F5F4F46175707B7 +:107DB000E8F4AA2369F3F999FECF209106013091E6 +:107DC000070132BD21BDF89A90B58091C00085FFB2 +:107DD000FCCF9093C6002F5F3F4F30930701209355 +:107DE00006014F5F5F4F4617570718F38091C00099 +:107DF00085FDE5CE8091C00085FFF8CFE0CE81E023 +:107E00000E94C73C67CE0E94763C803209F08CCE3F +:107E10008091C00085FFFCCFF092C6008091C00029 +:107E200085FFFCCFE092C6008091C00085FFFCCFAB +:107E3000D092C6008091C00085FFFCCFC092C600E2 +:107E40008091C00085FFFCCFB092C60043CEE09188 +:107E50000601F091070194918091C00085FFFCCF4D +:107E60009093C6009CCF80E10E94C73C33CE0E9415 +:107E7000763C0E94763C182F0E94763C112309F430 +:107E800083C0113009F484C08FE00E94C73C22CE29 +:107E900080910C02816080930C02E5CE80910C02EF +:107EA000816080930C0259CF809107018823880F4D +:107EB000880B8A2180930B02809106019091070123 +:107EC000880F991F90930701809306018091080203 +:107ED00080FF09C080910802909109020196909359 +:107EE000090280930802F894F999FECF1127E091D6 +:107EF0000601F0910701C8E0D1E08091080290915D +:107F00000902103091F40091570001700130D9F34B +:107F100003E000935700E89500915700017001308D +:107F2000D9F301E100935700E89509901990009169 +:107F3000570001700130D9F301E000935700E89534 +:107F40001395103498F011270091570001700130FB +:107F5000D9F305E000935700E895009157000170B0 +:107F60000130D9F301E100935700E895329602976A +:107F700009F0C7CF103011F00296E5CF112480919F +:107F8000C00085FFB9CEBCCE8EE10E94C73CA2CD19 +:0C7F900085E90E94C73C9ECDF894FFCF0D +:027F9C00800063 +:040000030000780081 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex new file mode 100644 index 0000000..9753e2e --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex @@ -0,0 +1,124 @@ +:107800000C94343C0C94513C0C94513C0C94513CE1 +:107810000C94513C0C94513C0C94513C0C94513CB4 +:107820000C94513C0C94513C0C94513C0C94513CA4 +:107830000C94513C0C94513C0C94513C0C94513C94 +:107840000C94513C0C94513C0C94513C0C94513C84 +:107850000C94513C0C94513C0C94513C0C94513C74 +:107860000C94513C0C94513C11241FBECFEFD8E036 +:10787000DEBFCDBF11E0A0E0B1E0EAE8FFE702C063 +:1078800005900D92A230B107D9F712E0A2E0B1E065 +:1078900001C01D92AD30B107E1F70E942D3D0C945F +:1078A000C33F0C94003C982F95959595959595958B +:1078B000905D8F708A307CF0282F295A8091C0000B +:1078C00085FFFCCF9093C6008091C00085FFFCCF60 +:1078D0002093C6000895282F205DF0CF982F809127 +:1078E000C00085FFFCCF9093C6000895EF92FF92F1 +:1078F0000F931F93EE24FF2487018091C00087FD22 +:1079000017C00894E11CF11C011D111D81E2E8164D +:1079100081EAF80687E0080780E0180770F3E09135 +:107920000401F091050109958091C00087FFE9CF1E +:107930008091C6001F910F91FF90EF9008950E94D3 +:10794000763C982F8091C00085FFFCCF9093C600B5 +:1079500091362CF490330CF09053892F089597555D +:10796000892F08951F930E949F3C182F0E949F3CCF +:107970001295107F810F1F9108951F93182F882350 +:1079800021F00E94763C1150E1F71F9108951F935A +:10799000182F0E94763C803249F0809103018F5F5E +:1079A000809303018530C1F01F9108958091C0003C +:1079B00085FFFCCF84E18093C6008091C00085FFE5 +:1079C000FCCF1093C6008091C00085FFFCCF80E102 +:1079D0008093C6001F910895E0910401F091050184 +:1079E00009951F9108950E94763C803241F0809164 +:1079F00003018F5F80930301853081F008958091AA +:107A0000C00085FFFCCF84E18093C6008091C00058 +:107A100085FFFCCF80E18093C6000895E0910401CA +:107A2000F09105010995089548EC50E08823A1F0F4 +:107A30002D9A28EE33E0FA013197F1F721503040CA +:107A4000D1F72D9828EE33E0FA013197F1F7215064 +:107A50003040D1F7815061F708953F924F925F9285 +:107A60006F927F928F929F92AF92BF92CF92DF924E +:107A7000EF92FF920F931F93CF93DF93000082E06A +:107A80008093C00080E18093C4001092C50088E11B +:107A90008093C10086E08093C2005098589A259A3E +:107AA00081E00E94143D24E1F22E9EE1E92E85E959 +:107AB000D82E0FE0C02E10E1B12EAA24A394B1E479 +:107AC0009B2EA6E58A2EF2E57F2EE0E26E2E79E46B +:107AD000572E63E5462E50E5352E0E94763C8033C6 +:107AE000B1F18133B9F1803409F46FC0813409F404 +:107AF00076C0823409F485C0853409F488C08035A5 +:107B000031F1823521F1813511F1853509F485C0D6 +:107B1000863509F48DC0843609F496C0843709F49B +:107B200003C1853709F472C1863709F466C08091B4 +:107B300003018F5F80930301853079F6E0910401A2 +:107B4000F091050109950E94763C803351F60E9420 +:107B5000F33CC3CF0E94763C803249F78091C0004D +:107B600085FFFCCFF092C6008091C00085FFFCCF5E +:107B70009092C6008091C00085FFFCCF8092C60025 +:107B80008091C00085FFFCCF7092C6008091C0003C +:107B900085FFFCCF6092C6008091C00085FFFCCFBE +:107BA0005092C6008091C00085FFFCCF4092C60075 +:107BB0008091C00085FFFCCF3092C6008091C0004C +:107BC00085FFFCCFB092C60088CF0E94763C8638F5 +:107BD00008F4BDCF0E94763C0E94F33C7ECF0E9409 +:107BE000763C803809F49CC0813809F40BC1823896 +:107BF00009F430C1883909F48FC080E00E94C73C85 +:107C00006CCF84E10E94BD3C0E94F33C66CF85E0CE +:107C10000E94BD3C0E94F33C60CF0E94763C809362 +:107C200006010E94763C809307010E94F33C55CFE9 +:107C30000E94763C803309F411C183E00E94BD3C70 +:107C400080E00E94C73C49CF0E94763C80930902A5 +:107C50000E94763C8093080280910C028E7F809374 +:107C60000C020E94763C853409F409C18091080217 +:107C700090910902892B89F000E010E00E94763C87 +:107C8000F801E85FFE4F80830F5F1F4F809108026D +:107C9000909109020817190788F30E94763C8032F8 +:107CA00009F045CF80910C0280FFF5C0609106017C +:107CB00070910701660F771F7093070160930601AB +:107CC000A0910802B09109021097C9F0E8E0F1E034 +:107CD0009B01AD014E0F5F1FF999FECF32BD21BD53 +:107CE000819180BDFA9AF99A2F5F3F4FE417F5070B +:107CF00099F76A0F7B1F70930701609306018091CB +:107D0000C00085FFFCCFF092C6008091C00085FFC7 +:107D1000FCCFB092C600E1CE83E00E94C73CDDCE2E +:107D200082E00E94C73CD9CE0E94763C8093090233 +:107D30000E94763C80930802809106019091070191 +:107D4000880F991F90930701809306010E94763C4B +:107D5000853409F49AC080910C028E7F80930C02C6 +:107D60000E94763C803209F0B8CE8091C00085FF39 +:107D7000FCCFF092C600A0910802B09109021097C2 +:107D8000C1F180910C02082F0170182F1695117007 +:107D9000E0910601F0910701AF014F5F5F4FBA011B +:107DA00020E030E00023B1F4112339F49491809164 +:107DB000C00085FFFCCF9093C6002F5F3F4FCB01E3 +:107DC0000196FA012A173B0780F4BC014F5F5F4F11 +:107DD000002351F3F999FECFF2BDE1BDF89A90B5B9 +:107DE0008091C00085FFFCCFE6CF709307016093C0 +:107DF00006018091C00085FDE5CE8091C00085FF21 +:107E0000F8CFE0CE81E00E94C73C67CE0E94763C6E +:107E1000803209F08CCE8091C00085FFFCCFF092BB +:107E2000C6008091C00085FFFCCFE092C600809123 +:107E3000C00085FFFCCFD092C6008091C00085FFB6 +:107E4000FCCFC092C6008091C00085FFFCCFB092ED +:107E5000C60043CE80E10E94C73C3FCE0E94763CE4 +:107E60000E94763C182F0E94763C112309F483C0AF +:107E7000113009F484C08FE00E94C73C2ECE80915F +:107E80000C02816080930C02F1CE80910C02816023 +:107E900080930C0265CF809107018823880F880B9F +:107EA0008A2180930B028091060190910701880F2F +:107EB000991F90930701809306018091080280FF2B +:107EC00009C08091080290910902019690930902DD +:107ED00080930802F894F999FECF1127E0910601EA +:107EE000F0910701C8E0D1E0809108029091090269 +:107EF000103091F40091570001700130D9F303E084 +:107F000000935700E8950091570001700130D9F3B4 +:107F100001E100935700E8950990199000915700EE +:107F200001700130D9F301E000935700E8951395F3 +:107F3000103498F011270091570001700130D9F3E7 +:107F400005E000935700E89500915700017001305B +:107F5000D9F301E100935700E8953296029709F0B2 +:107F6000C7CF103011F00296E5CF11248091C000E8 +:107F700085FFC5CEC8CE8EE10E94C73CAECD85E957 +:0A7F80000E94C73CAACDF894FFCF81 +:027F8A00800075 +:040000030000780081 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex new file mode 100644 index 0000000..feac9d2 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex @@ -0,0 +1,126 @@ +:103800000C94341C0C94511C0C94511C0C94511CA1 +:103810000C94511C0C94511C0C94511C0C94511C74 +:103820000C94511C0C94511C0C94511C0C94511C64 +:103830000C94511C0C94511C0C94511C0C94511C54 +:103840000C94511C0C94511C0C94511C0C94511C44 +:103850000C94511C0C94511C0C94511C0C94511C34 +:103860000C94511C0C94511C11241FBECFEFD4E0BA +:10387000DEBFCDBF11E0A0E0B1E0E4EAFFE302C0AB +:1038800005900D92A230B107D9F712E0A2E0B1E0A5 +:1038900001C01D92AD30B107E1F70E94361D0C94B6 +:1038A000D01F0C94001C982F9595959595959595FE +:1038B000905D8F708A307CF0282F295A8091C0004B +:1038C00085FFFCCF9093C6008091C00085FFFCCFA0 +:1038D0002093C6000895282F205DF0CF982F809167 +:1038E000C00085FFFCCF9093C6000895EF92FF9231 +:1038F0000F931F93EE24FF2487018091C00087FD62 +:1039000017C00894E11CF11C011D111D81E4E8168B +:1039100082E4F8068FE0080780E0180770F3E09172 +:103920000401F091050109958091C00087FFE9CF5E +:103930008091C6001F910F91FF90EF9008950E9413 +:10394000761C982F8091C00085FFFCCF9093C60015 +:1039500091362CF490330CF09053892F089597559D +:10396000892F08951F930E949F1C182F0E949F1C4F +:103970001295107F810F1F910895882351F0982F81 +:1039800091508091C00087FFFCCF8091C6009923A1 +:10399000B9F708951F93182F0E94761C803249F0C2 +:1039A000809103018F5F809303018530C1F01F91E7 +:1039B00008958091C00085FFFCCF84E18093C6000C +:1039C0008091C00085FFFCCF1093C6008091C0009D +:1039D00085FFFCCF80E18093C6001F910895E091A0 +:1039E0000401F091050109951F9108950E94761C2C +:1039F000803241F0809103018F5F80930301853015 +:103A000081F008958091C00085FFFCCF84E1809310 +:103A1000C6008091C00085FFFCCF80E18093C60086 +:103A20000895E0910401F09105010995089510921F +:103A30000A028823D1F090E040E951E02D9A28EE67 +:103A400033E0FA013197F1F721503040D1F72D984A +:103A500028EE33E0FA013197F1F721503040D1F7E9 +:103A60009F5F981758F380930A0208953F924F92F0 +:103A70005F926F927F928F929F92AF92BF92CF92FE +:103A8000DF92EF92FF920F931F93CF93DF9300008B +:103A900083E38093C4001092C50088E18093C10045 +:103AA00086E08093C2005098589A259A81E00E943F +:103AB000171D44E1F42E3EE1E32E24E9D22E96E0D8 +:103AC000C92E80E1B82EAA24A39401E4902E16E515 +:103AD000812EB2E57B2EA0E26A2EF9E45F2EE3E5AB +:103AE0004E2E70E5372E0E94761C8033B1F1813363 +:103AF00009F441C0803409F479C0813409F48CC0E0 +:103B0000823471F1853409F47BC0803531F182351E +:103B100021F1813511F1853509F48DC0863509F41F +:103B20009DC0843609F4AEC0843709F41BC18537C3 +:103B300009F485C1863709F47AC0809103018F5F4B +:103B400080930301853079F6E0910401F09105013D +:103B500009950E94761C803351F60E94F61CC3CF53 +:103B600093E18091C00087FFFCCF8091C60099232C +:103B7000A1F39150F6CF0E94761C8032F1F680912D +:103B8000C00085FFFCCFF092C6008091C00085FF89 +:103B9000FCCF9092C6008091C00085FFFCCF809240 +:103BA000C6008091C00085FFFCCF7092C600809156 +:103BB000C00085FFFCCF6092C6008091C00085FFE9 +:103BC000FCCF5092C6008091C00085FFFCCF409290 +:103BD000C6008091C00085FFFCCF3092C600809166 +:103BE000C00085FFFCCFB092C6007DCF0E94761C3E +:103BF000863808F4B2CF0E94761C0E94F61C73CF60 +:103C000094E08091C00087FFFCCF8091C60099238B +:103C100009F4A3CF9150F5CF0E94761C8038D1F0E3 +:103C2000813861F1823809F499C0883979F080E0EF +:103C30000E94CA1C58CF0E94761C809306010E94E5 +:103C4000761C809307010E94F61C4DCF83E00E94F2 +:103C5000CA1C49CF82E00E94CA1C45CF0E94761C34 +:103C6000803309F486C192E08091C00087FFFCCFC9 +:103C70008091C6009923D9F29150F6CF81E00E943D +:103C8000CA1C31CF0E94761C809309020E94761CC8 +:103C90008093080280910C028E7F80930C020E9418 +:103CA000761C853429F480910C02816080930C028B +:103CB0008091080290910902892B89F000E010E0C0 +:103CC0000E94761CF801E85FFE4F80830F5F1F4F54 +:103CD00080910802909109020817190788F30E9441 +:103CE000761C803209F029CF80910C0280FFD1C070 +:103CF0004091060150910701440F551F5093070151 +:103D000040930601A0910802B09109021097C9F0F2 +:103D1000E8E0F1E09A01BD016E0F7F1FF999FECF37 +:103D200032BD21BD819180BDFA9AF99A2F5F3F4F34 +:103D3000E617F70799F74A0F5B1F50930701409367 +:103D400006018091C00085FFFCCFF092C6008091F3 +:103D5000C00085FFFCCFB092C600C5CE80E10E94B6 +:103D6000CA1CC1CE0E94761C809309020E94761C58 +:103D7000809308028091060190910701880F991F96 +:103D800090930701809306010E94761C853409F404 +:103D90007AC080910C028E7F80930C020E94761C68 +:103DA000803209F0A0CE8091C00085FFFCCFF09258 +:103DB000C600A0910802B09109021097B9F1809154 +:103DC0000C02182F1170082F0270E0910601F0917B +:103DD00007019F012F5F3F4FB90140E050E01123E1 +:103DE000B1F4002339F494918091C00085FFFCCF99 +:103DF0009093C6004F5F5F4FCB010196F9014A17C0 +:103E00005B0780F4BC012F5F3F4F112351F3F999F9 +:103E1000FECFF2BDE1BDF89A90B58091C00085FF5C +:103E2000FCCFE6CF70930701609306018091C0003C +:103E300085FDD9CE8091C00085FFF8CFD4CE0E94F9 +:103E4000761C803209F079CE8091C00085FFFCCFCE +:103E5000F092C6008091C00085FFFCCFE092C600C2 +:103E60008091C00085FFFCCFD092C6008091C00039 +:103E700085FFFCCFC092C6008091C00085FFFCCFBB +:103E8000B092C60030CE80910C02816080930C020B +:103E900085CF809107018823880F880B8A21809322 +:103EA0000B028091060190910701880F991F909352 +:103EB0000701809306018091080280FF09C080916C +:103EC00008029091090201969093090280930802DA +:103ED000F894F999FECF1127E0910601F0910701BE +:103EE000C8E0D1E08091080290910902103091F46D +:103EF0000091570001700130D9F303E0009357009F +:103F0000E8950091570001700130D9F301E1009369 +:103F10005700E89509901990009157000170013001 +:103F2000D9F301E000935700E8951395103498F009 +:103F300011270091570001700130D9F305E000937B +:103F40005700E8950091570001700130D9F301E165 +:103F500000935700E8953296029709F0C7CF1030CA +:103F600011F00296E5CF11248091C00085FFE9CEC3 +:103F7000ECCE0E94761C0E94761C182F0E94761CA4 +:103F8000112351F0113021F086E00E94CA1CABCD04 +:103F900084E90E94CA1CA7CD8EE10E94CA1CA3CD51 +:043FA000F894FFCFC3 +:023FA40080009B +:0400000300003800C1 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_ng.hex b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_ng.hex new file mode 100644 index 0000000..387091e --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_ng.hex @@ -0,0 +1,110 @@ +:103800000C94341C0C94511C0C94511C0C94511CA1 +:103810000C94511C0C94511C0C94511C0C94511C74 +:103820000C94511C0C94511C0C94511C0C94511C64 +:103830000C94511C0C94511C0C94511C0C94511C54 +:103840000C94511C0C94511C0C94511C0C94511C44 +:103850000C94511C0C94511C0C94511C0C94511C34 +:103860000C94511C0C94511C11241FBECFEFD4E0BA +:10387000DEBFCDBF11E0A0E0B1E0E4EAFEE302C0AC +:1038800005900D92A230B107D9F712E0A2E0B1E0A5 +:1038900001C01D92AD30B107E1F70E94ED1C0C9400 +:1038A000511F0C94001C482F10920A0280E08417CC +:1038B000E0F4582F2D9A28EE33E080E991E001974B +:1038C000F1F721503040C9F72D9828EE33E080E918 +:1038D00091E00197F1F721503040C9F7852F8F5FB4 +:1038E000582F841738F380930A020895EF92FF92BD +:1038F0000F931F93EE24FF2487018091C00087FD62 +:1039000017C00894E11CF11C011D111D81E0E8168F +:1039100082E1F8068AE7080780E0180770F3E09173 +:103920000201F091030109958091C00087FFE9CF62 +:103930008091C600992787FD90951F910F91FF9068 +:10394000EF900895982F8091C00085FFFCCF909351 +:10395000C60008950E94761C803271F080910401A7 +:103960008F5F80930401853009F00895E091020192 +:10397000F09103010995089584E10E94A21C80E161 +:103980000E94A21C0895CF93C82F0E94761C8032FB +:1039900041F0809104018F5F80930401853081F4B0 +:1039A0000AC084E10E94A21C8C2F0E94A21C80E10C +:1039B0000E94A21C05C0E0910201F091030109954B +:1039C000CF910895CF93C82FC150CF3F21F00E94CF +:1039D000761CC150E0F7CF910895CFEFD4E0DEBF61 +:1039E000CDBF000083E38093C4001092C50088E13E +:1039F0008093C10086E08093C2005098589A259A1F +:103A000083E00E94531C0E94761C8033B1F1813305 +:103A1000B9F1803409F455C0813409F45BC08234B3 +:103A200009F46DC0853409F470C0803531F18235F8 +:103A300021F1813511F1853509F46BC0863509F422 +:103A400073C0843609F47AC0843709F4CEC0853750 +:103A500009F429C1863709F44AC0809104018F5FB7 +:103A600080930401853079F6E0910201F091030121 +:103A700009950E94761C803351F60E94AA1CC3CF80 +:103A80000E94761CC82F803241F784E10E94A21C5C +:103A900081E40E94A21C86E50E94A21C82E50E948D +:103AA000A21C8C2F0E94A21C89E40E94A21C83E508 +:103AB0000E94A21C80E50E94A21C80E10E94A21C20 +:103AC000A2CF0E94761C8638C0F20E94761C0E940B +:103AD000AA1C99CF0E94761C803809F486C18138CF +:103AE00009F487C1823809F488C1883921F080E05F +:103AF0000E94C31C88CF83E00E94C31C84CF84E152 +:103B00000E94E21C0E94AA1C7ECF85E00E94E21C5B +:103B1000F9CF0E94761C809306010E94761C809348 +:103B200007010E94AA1C6FCF0E94761C803309F403 +:103B3000CAC083E00E94E21C80E0DACF0E94761CBB +:103B4000809309020E94761C8093080280910C02E7 +:103B50008E7F80930C020E94761C853409F4C4C0C9 +:103B600000E010E0809108029091090218161906F1 +:103B700070F4C8E0D1E00E94761C89930F5F1F4F5C +:103B8000809108029091090208171907A0F30E947A +:103B9000761C803209F061CF80910C0280FFAEC0AC +:103BA000E0910601F0910701EE0FFF1F00E010E029 +:103BB00020910802309109021216130680F4A8E041 +:103BC000B1E0F999FECFF2BDE1BD8D9180BDFA9AC9 +:103BD000F99A31960F5F1F4F0217130790F3F09376 +:103BE0000701E093060184E166CF0E94761C809372 +:103BF00009020E94761C8093080280910601909130 +:103C00000701880F991F90930701809306010E9476 +:103C1000761C853409F46EC080910C028E7F8093EF +:103C20000C020E94761C803209F0EDCE84E10E94E5 +:103C3000A21C00E010E02091080230910902121647 +:103C4000130608F03ACFE0910601F0910701809148 +:103C50000C0280FF1FC0F999FECFF2BDE1BDF89ABA +:103C600080B50E94A21CE0910601F09107013196F7 +:103C7000F0930701E09306012091080230910902B8 +:103C80000F5F1F4F0217130708F017CF80910C0228 +:103C900080FDE1CF869580FFB4C03196F093070197 +:103CA000E0930601EDCF0E94761C803209F0D5CE5C +:103CB00084E10E94A21C8EE10E94A21C84E90E9461 +:103CC000A21C86E0F8CE0E94761C0E94761CC82FAB +:103CD0000E94761CCC2309F47CC0C13009F47DC05D +:103CE00086E00E94C31C8FCE80910C02816080937D +:103CF0000C0236CF80910C02816091CF8091070138 +:103D000087FD6FC010920B02809106019091070110 +:103D1000880F991F909307018093060180910802F4 +:103D200080FF09C08091080290910902019690934A +:103D3000090280930802F894F999FECF1127E091C7 +:103D40000601F0910701C8E0D1E08091080290914E +:103D50000902103091F40091570001700130D9F33D +:103D600003E000935700E89500915700017001307F +:103D7000D9F301E100935700E8950990199000915B +:103D8000570001700130D9F301E000935700E89526 +:103D90001395103498F011270091570001700130ED +:103DA000D9F305E000935700E895009157000170A2 +:103DB0000130D9F301E100935700E895329602975C +:103DC00009F0C7CF103011F00296E5CF112484E13D +:103DD00072CE8EE10E94C31C16CE84E90E94C31CE1 +:103DE00012CE81E080930B028FCF82E00E94C31C31 +:103DF0000ACE81E00E94C31C06CE80E10E94C31C53 +:103E000002CE84910E94A21C2091080230910902E6 +:103E1000E0910601F091070140CFCF930E94761CFC +:103E2000C82F0E94A21CC13614F0C75503C0C0336E +:103E30000CF0C0538C2F992787FD9095CF91089552 +:103E40000F931F930E940D1F082F112707FD109538 +:103E500002951295107F1027007F10270E940D1FDA +:103E6000800F992787FD90951F910F910895CF930B +:103E7000C82F85958595859585958A3034F0895A22 +:103E8000CF70CA3034F0C95A05C0805DCF70CA30D7 +:103E9000D4F7C05D0E94A21C8C2F0E94A21CCF915F +:043EA0000895FFCFB3 +:023EA40080009C +:0400000300003800C1 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex new file mode 100644 index 0000000..994e478 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex @@ -0,0 +1,126 @@ +:103800000C94341C0C94511C0C94511C0C94511CA1 +:103810000C94511C0C94511C0C94511C0C94511C74 +:103820000C94511C0C94511C0C94511C0C94511C64 +:103830000C94511C0C94511C0C94511C0C94511C54 +:103840000C94511C0C94511C0C94511C0C94511C44 +:103850000C94511C0C94511C0C94511C0C94511C34 +:103860000C94511C0C94511C11241FBECFEFD4E0BA +:10387000DEBFCDBF11E0A0E0B1E0EEEAFFE302C0A1 +:1038800005900D92A230B107D9F712E0A2E0B1E0A5 +:1038900001C01D92AD30B107E1F70E94331D0C94B9 +:1038A000D51F0C94001C982F9595959595959595F9 +:1038B000905D8F708A307CF0282F295A8091C0004B +:1038C00085FFFCCF9093C6008091C00085FFFCCFA0 +:1038D0002093C6000895282F205DF0CF982F809167 +:1038E000C00085FFFCCF9093C6000895EF92FF9231 +:1038F0000F931F93EE24FF2487018091C00087FD62 +:1039000017C00894E11CF11C011D111D81E2E8168D +:1039100081EAF80687E0080780E0180770F3E09175 +:103920000401F091050109958091C00087FFE9CF5E +:103930008091C6001F910F91FF90EF9008950E9413 +:10394000761C982F8091C00085FFFCCF9093C60015 +:1039500091362CF490330CF09053892F089597559D +:10396000892F08951F930E949F1C182F0E949F1C4F +:103970001295107F810F1F9108951F93182F882390 +:1039800021F00E94761C1150E1F71F9108951F93BA +:10399000182F0E94761C803249F0809103018F5FBE +:1039A000809303018530C1F01F9108958091C0007C +:1039B00085FFFCCF84E18093C6008091C00085FF25 +:1039C000FCCF1093C6008091C00085FFFCCF80E142 +:1039D0008093C6001F910895E0910401F0910501C4 +:1039E00009951F9108950E94761C803241F08091C4 +:1039F00003018F5F80930301853081F008958091EA +:103A0000C00085FFFCCF84E18093C6008091C00098 +:103A100085FFFCCF80E18093C6000895E09104010A +:103A2000F09105010995089510920A028823D1F0BA +:103A300090E048EC50E02D9A28EE33E0FA013197FF +:103A4000F1F721503040D1F72D9828EE33E0FA01FC +:103A50003197F1F721503040D1F79F5F981758F315 +:103A600080930A0208953F924F925F926F927F92E5 +:103A70008F929F92AF92BF92CF92DF92EF92FF927E +:103A80000F931F93CF93DF9394B714BE8091600080 +:103A90008861809360001092600091FF0CC289E100 +:103AA0008093C4001092C50088E18093C10086E035 +:103AB0008093C2005098589A259A81E00E94141D64 +:103AC00044E1F42E3EE1E32E24E9D22E96E0C92E05 +:103AD00080E1B82EAA24A39401E4902E16E5812E4D +:103AE000B2E57B2EA0E26A2EF9E45F2EE3E54E2ECE +:103AF00070E5372E0E94761C8033B9F18133C1F115 +:103B0000803409F470C0813409F477C0823409F438 +:103B100086C0853409F489C0803539F1823529F1B0 +:103B2000813509F4AFC1853509F485C0863509F4BE +:103B30008DC0843609F435C1843709F4C1C0853796 +:103B400009F490C0863709F466C0809103018F5F45 +:103B500080930301853071F6E0910401F091050135 +:103B600009950E94761C803349F60E94F31CC2CF4F +:103B70000E94761C803249F78091C00085FFFCCFFF +:103B8000F092C6008091C00085FFFCCF9092C600E5 +:103B90008091C00085FFFCCF8092C6008091C0005C +:103BA00085FFFCCF7092C6008091C00085FFFCCFDE +:103BB0006092C6008091C00085FFFCCF5092C60085 +:103BC0008091C00085FFFCCF4092C6008091C0006C +:103BD00085FFFCCF3092C6008091C00085FFFCCFEE +:103BE000B092C60087CF0E94761C863808F4BDCFFD +:103BF0000E94761C0E94F31C7DCF0E94761C8038A8 +:103C000009F45AC0813809F453C0823809F440C11C +:103C1000883909F449C080E00E94C71C6BCF84E159 +:103C20000E94BD1C0E94F31C65CF85E00E94BD1C54 +:103C30000E94F31C5FCF0E94761C809306010E94B5 +:103C4000761C809307010E94F31C54CF0E94761CBF +:103C5000803309F421C183E00E94BD1C80E00E94F2 +:103C6000C71C48CF0E94761C803209F06ECF80912D +:103C7000C00085FFFCCFF092C6008091C00085FF98 +:103C8000FCCFE092C6008091C00085FFFCCFD092AF +:103C9000C6008091C00085FFFCCFC092C600809115 +:103CA000C00085FFFCCF9CCF83E00E94C71C22CFC1 +:103CB00081E00E94C71C1ECF82E00E94C71C1ACF61 +:103CC0000E94761C809309020E94761C8093080251 +:103CD0008091060190910701880F991F9093070129 +:103CE000809306010E94761C853409F4C5C080913A +:103CF0000C028E7F80930C020E94761C803209F0A9 +:103D0000F9CE8091C00085FFFCCFF092C600609193 +:103D10000802709109026115710591F140E050E0CF +:103D200080910C02A82FA170B82FB27010C0BB23D5 +:103D300061F1E0910601F09107013196F0930701DE +:103D4000E09306014F5F5F4F46175707C8F4AA2359 +:103D500071F3F999FECF209106013091070132BD30 +:103D600021BDF89A90B58091C00085FFFCCF90935B +:103D7000C6002F5F3F4F3093070120930601E2CF2B +:103D80008091C00085FFFCCF2BCFE0910601F09120 +:103D9000070194918091C00085FFFCCF9093C600ED +:103DA000CCCF0E94761C809309020E94761C8093DF +:103DB000080280910C028E7F80930C020E94761C78 +:103DC000853429F480910C02816080930C028091EB +:103DD000080290910902892B89F000E010E00E940E +:103DE000761CF801E85FFE4F80830F5F1F4F8091C4 +:103DF0000802909109020817190788F30E94761C9F +:103E0000803209F0A2CE80910C0280FF62C0409106 +:103E1000060150910701440F551F5093070140932D +:103E20000601609108027091090261157105C9F0DF +:103E3000E8E0F1E09A01DB01AE0FBF1FF999FECF78 +:103E400032BD21BD819180BDFA9AF99A2F5F3F4F13 +:103E5000EA17FB0799F7460F571F50930701409346 +:103E600006018091C00085FFFCCFF092C6008091D2 +:103E7000C00085FFFCCFB4CE80910C02816080939E +:103E80000C023ACF0E94F31C88E080936000FFCFC1 +:103E900080E10E94C71C2ECE0E94761C0E94761CD8 +:103EA000182F0E94761C112381F0113051F086E00A +:103EB0000E94C71C1FCEE0910401F09105010995F5 +:103EC000EECD84E90E94C71C15CE8EE10E94C71C6E +:103ED00011CE809107018823880F880B8A21809357 +:103EE0000B028091060190910701880F991F909312 +:103EF0000701809306018091080280FF09C080912C +:103F00000802909109020196909309028093080299 +:103F1000F894F999FECF1127E0910601F09107017D +:103F2000C8E0D1E08091080290910902103091F42C +:103F30000091570001700130D9F303E0009357005E +:103F4000E8950091570001700130D9F301E1009329 +:103F50005700E895099019900091570001700130C1 +:103F6000D9F301E000935700E8951395103498F0C9 +:103F700011270091570001700130D9F305E000933B +:103F80005700E8950091570001700130D9F301E125 +:103F900000935700E8953296029709F0C7CF10308A +:0E3FA00011F00296E5CF11245CCFF894FFCF0C +:023FAE00800091 +:0400000300003800C1 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/atmega/Makefile b/test/ardmake/hardware/bootloaders/atmega/Makefile new file mode 100644 index 0000000..0fd54db --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega/Makefile @@ -0,0 +1,224 @@ +# Makefile for ATmegaBOOT +# E.Lins, 18.7.2005 +# $Id$ +# +# Instructions +# +# To make bootloader .hex file: +# make diecimila +# make lilypad +# make ng +# etc... +# +# To burn bootloader .hex file: +# make diecimila_isp +# make lilypad_isp +# make ng_isp +# etc... + +# program name should not be changed... +PROGRAM = ATmegaBOOT_168 + +# enter the parameters for the avrdude isp tool +ISPTOOL = stk500v2 +ISPPORT = usb +ISPSPEED = -b 115200 + +MCU_TARGET = atmega168 +LDSECTION = --section-start=.text=0x3800 + +# the efuse should really be 0xf8; since, however, only the lower +# three bits of that byte are used on the atmega168, avrdude gets +# confused if you specify 1's for the higher bits, see: +# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/ +# +# similarly, the lock bits should be 0xff instead of 0x3f (to +# unlock the bootloader section) and 0xcf instead of 0x0f (to +# lock it), but since the high two bits of the lock byte are +# unused, avrdude would get confused. + +ISPFUSES = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \ +-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m +ISPFLASH = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \ +-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m + +STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe" +STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \ +-lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt +STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt + + +OBJ = $(PROGRAM).o +OPTIMIZE = -O2 + +DEFS = +LIBS = + +CC = avr-gcc + +# Override is only needed by avr-lib build system. + +override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) +override LDFLAGS = -Wl,$(LDSECTION) +#override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION) + +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump + +all: + +lilypad: TARGET = lilypad +lilypad: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3' +lilypad: AVR_FREQ = 8000000L +lilypad: $(PROGRAM)_lilypad.hex + +lilypad_isp: lilypad +lilypad_isp: TARGET = lilypad +lilypad_isp: HFUSE = DD +lilypad_isp: LFUSE = E2 +lilypad_isp: EFUSE = 00 +lilypad_isp: isp + +lilypad_resonator: TARGET = lilypad_resonator +lilypad_resonator: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=3' +lilypad_resonator: AVR_FREQ = 8000000L +lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex + +lilypad_resonator_isp: lilypad_resonator +lilypad_resonator_isp: TARGET = lilypad_resonator +lilypad_resonator_isp: HFUSE = DD +lilypad_resonator_isp: LFUSE = C6 +lilypad_resonator_isp: EFUSE = 00 +lilypad_resonator_isp: isp + +pro8: TARGET = pro_8MHz +pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS' +pro8: AVR_FREQ = 8000000L +pro8: $(PROGRAM)_pro_8MHz.hex + +pro8_isp: pro8 +pro8_isp: TARGET = pro_8MHz +pro8_isp: HFUSE = DD +pro8_isp: LFUSE = C6 +pro8_isp: EFUSE = 00 +pro8_isp: isp + +pro16: TARGET = pro_16MHz +pro16: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS' +pro16: AVR_FREQ = 16000000L +pro16: $(PROGRAM)_pro_16MHz.hex + +pro16_isp: pro16 +pro16_isp: TARGET = pro_16MHz +pro16_isp: HFUSE = DD +pro16_isp: LFUSE = C6 +pro16_isp: EFUSE = 00 +pro16_isp: isp + +pro20: TARGET = pro_20mhz +pro20: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS' +pro20: AVR_FREQ = 20000000L +pro20: $(PROGRAM)_pro_20mhz.hex + +pro20_isp: pro20 +pro20_isp: TARGET = pro_20mhz +pro20_isp: HFUSE = DD +pro20_isp: LFUSE = C6 +pro20_isp: EFUSE = 00 +pro20_isp: isp + +diecimila: TARGET = diecimila +diecimila: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' +diecimila: AVR_FREQ = 16000000L +diecimila: $(PROGRAM)_diecimila.hex + +diecimila_isp: diecimila +diecimila_isp: TARGET = diecimila +diecimila_isp: HFUSE = DD +diecimila_isp: LFUSE = FF +diecimila_isp: EFUSE = 00 +diecimila_isp: isp + +ng: TARGET = ng +ng: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>1' '-DNUM_LED_FLASHES=3' +ng: AVR_FREQ = 16000000L +ng: $(PROGRAM)_ng.hex + +ng_isp: ng +ng_isp: TARGET = ng +ng_isp: HFUSE = DD +ng_isp: LFUSE = FF +ng_isp: EFUSE = 00 +ng_isp: isp + +atmega328: TARGET = atmega328 +atmega328: MCU_TARGET = atmega328p +atmega328: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 +atmega328: AVR_FREQ = 16000000L +atmega328: LDSECTION = --section-start=.text=0x7800 +atmega328: $(PROGRAM)_atmega328.hex + +atmega328_isp: atmega328 +atmega328_isp: TARGET = atmega328 +atmega328_isp: MCU_TARGET = atmega328p +atmega328_isp: HFUSE = DA +atmega328_isp: LFUSE = FF +atmega328_isp: EFUSE = 05 +atmega328_isp: isp + +atmega328_pro8: TARGET = atmega328_pro_8MHz +atmega328_pro8: MCU_TARGET = atmega328p +atmega328_pro8: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -DDOUBLE_SPEED +atmega328_pro8: AVR_FREQ = 8000000L +atmega328_pro8: LDSECTION = --section-start=.text=0x7800 +atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex + +atmega328_pro8_isp: atmega328_pro8 +atmega328_pro8_isp: TARGET = atmega328_pro_8MHz +atmega328_pro8_isp: MCU_TARGET = atmega328p +atmega328_pro8_isp: HFUSE = DA +atmega328_pro8_isp: LFUSE = FF +atmega328_pro8_isp: EFUSE = 05 +atmega328_pro8_isp: isp + +mega: TARGET = atmega1280 +mega: MCU_TARGET = atmega1280 +mega: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=0' -DBAUD_RATE=57600 +mega: AVR_FREQ = 16000000L +mega: LDSECTION = --section-start=.text=0x1F000 +mega: $(PROGRAM)_atmega1280.hex + +mega_isp: mega +mega_isp: TARGET = atmega1280 +mega_isp: MCU_TARGET = atmega1280 +mega_isp: HFUSE = DA +mega_isp: LFUSE = FF +mega_isp: EFUSE = F5 +mega_isp: isp + +isp: $(TARGET) + $(ISPFUSES) + $(ISPFLASH) + +isp-stk500: $(PROGRAM)_$(TARGET).hex + $(STK500-1) + $(STK500-2) + +%.elf: $(OBJ) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +clean: + rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex + +%.lst: %.elf + $(OBJDUMP) -h -S $< > $@ + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ + diff --git a/test/ardmake/hardware/bootloaders/atmega8/ATmegaBOOT.c b/test/ardmake/hardware/bootloaders/atmega8/ATmegaBOOT.c new file mode 100644 index 0000000..17977e6 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/atmega8/ATmegaBOOT.c @@ -0,0 +1,507 @@ +/**********************************************************/ +/* Serial Bootloader for Atmel mega8 AVR Controller */ +/* */ +/* ATmegaBOOT.c */ +/* */ +/* Copyright (c) 2003, Jason P. Kyle */ +/* */ +/* Hacked by DojoCorp - ZGZ - MMX - IVR */ +/* Hacked by David A. Mellis */ +/* */ +/* This program is free software; you can redistribute it */ +/* and/or modify it under the terms of the GNU General */ +/* Public License as published by the Free Software */ +/* Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will */ +/* be useful, but WITHOUT ANY WARRANTY; without even the */ +/* implied warranty of MERCHANTABILITY or FITNESS FOR A */ +/* PARTICULAR PURPOSE. See the GNU General Public */ +/* License for more details. */ +/* */ +/* You should have received a copy of the GNU General */ +/* Public License along with this program; if not, write */ +/* to the Free Software Foundation, Inc., */ +/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* Licence can be viewed at */ +/* http://www.fsf.org/licenses/gpl.txt */ +/* */ +/* Target = Atmel AVR m8 */ +/**********************************************************/ + +#include +#include +#include +#include +#include +#include + +//#define F_CPU 16000000 + +/* We, Malmoitians, like slow interaction + * therefore the slow baud rate ;-) + */ +//#define BAUD_RATE 9600 + +/* 6.000.000 is more or less 8 seconds at the + * speed configured here + */ +//#define MAX_TIME_COUNT 6000000 +#define MAX_TIME_COUNT (F_CPU>>1) +///#define MAX_TIME_COUNT_MORATORY 1600000 + +/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */ +#define HW_VER 0x02 +#define SW_MAJOR 0x01 +#define SW_MINOR 0x12 + +// AVR-GCC compiler compatibility +// avr-gcc compiler v3.1.x and older doesn't support outb() and inb() +// if necessary, convert outb and inb to outp and inp +#ifndef outb + #define outb(sfr,val) (_SFR_BYTE(sfr) = (val)) +#endif +#ifndef inb + #define inb(sfr) _SFR_BYTE(sfr) +#endif + +/* defines for future compatibility */ +#ifndef cbi + #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) +#endif +#ifndef sbi + #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) +#endif + +/* Adjust to suit whatever pin your hardware uses to enter the bootloader */ +#define eeprom_rb(addr) eeprom_read_byte ((uint8_t *)(addr)) +#define eeprom_rw(addr) eeprom_read_word ((uint16_t *)(addr)) +#define eeprom_wb(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val)) + +/* Onboard LED is connected to pin PB5 */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB5 + + +#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :( +#define SIG2 0x93 +#define SIG3 0x07 +#define PAGE_SIZE 0x20U //32 words + + +void putch(char); +char getch(void); +void getNch(uint8_t); +void byte_response(uint8_t); +void nothing_response(void); + +union address_union { + uint16_t word; + uint8_t byte[2]; +} address; + +union length_union { + uint16_t word; + uint8_t byte[2]; +} length; + +struct flags_struct { + unsigned eeprom : 1; + unsigned rampz : 1; +} flags; + +uint8_t buff[256]; +//uint8_t address_high; + +uint8_t pagesz=0x80; + +uint8_t i; +//uint8_t bootuart0=0,bootuart1=0; + + +void (*app_start)(void) = 0x0000; + +int main(void) +{ + uint8_t ch,ch2; + uint16_t w; + + //cbi(BL_DDR,BL); + //sbi(BL_PORT,BL); + + asm volatile("nop\n\t"); + + /* check if flash is programmed already, if not start bootloader anyway */ + //if(pgm_read_byte_near(0x0000) != 0xFF) { + + /* check if bootloader pin is set low */ + //if(bit_is_set(BL_PIN,BL)) app_start(); + //} + + /* initialize UART(s) depending on CPU defined */ + /* m8 */ + UBRRH = (((F_CPU/BAUD_RATE)/16)-1)>>8; // set baud rate + UBRRL = (((F_CPU/BAUD_RATE)/16)-1); + UCSRB = (1<> 8; + //UCSRA = 0x00; + //UCSRC = 0x86; + //UCSRB = _BV(TXEN)|_BV(RXEN); + + + /* this was giving uisp problems, so I removed it; without it, the boot + works on with uisp and avrdude on the mac (at least). */ + //putch('\0'); + + //uint32_t l; + //uint32_t time_count; + //time_count=0; + + /* set LED pin as output */ + sbi(LED_DDR,LED); + for (i = 0; i < 16; i++) { + outb(LED_PORT, inb(LED_PORT) ^ _BV(LED)); + _delay_loop_2(0); + } + + //for (l=0; l<40000000; l++) + //outb(LED_PORT, inb(LED_PORT) ^= _BV(LED)); + + /* flash onboard LED three times to signal entering of bootloader */ + //for(i=0; i<3; ++i) { + //for(l=0; l<40000000; ++l); + //sbi(LED_PORT,LED); + //for(l=0; l<40000000; ++l); + //cbi(LED_PORT,LED); + //} + + /* see comment at previous call to putch() */ + //putch('\0'); // this line is needed for the synchronization of the programmer + + /* forever */ + for (;;) { + //if((inb(UCSRA) & _BV(RXC))){ + /* get character from UART */ + ch = getch(); + + /* A bunch of if...else if... gives smaller code than switch...case ! */ + + /* Hello is anyone home ? */ + if(ch=='0') { + nothing_response(); + } + + /* Request programmer ID */ + /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */ + /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */ + else if(ch=='1') { + if (getch() == ' ') { + putch(0x14); + putch('A'); + putch('V'); + putch('R'); + putch(' '); + putch('I'); + putch('S'); + putch('P'); + putch(0x10); + } + } + + /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */ + else if(ch=='@') { + ch2 = getch(); + if (ch2>0x85) getch(); + nothing_response(); + } + + /* AVR ISP/STK500 board requests */ + else if(ch=='A') { + ch2 = getch(); + if(ch2==0x80) byte_response(HW_VER); // Hardware version + else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version + else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version + //else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56 + else byte_response(0x00); // Covers various unnecessary responses we don't care about + } + + /* Device Parameters DON'T CARE, DEVICE IS FIXED */ + else if(ch=='B') { + getNch(20); + nothing_response(); + } + + /* Parallel programming stuff DON'T CARE */ + else if(ch=='E') { + getNch(5); + nothing_response(); + } + + /* Enter programming mode */ + else if(ch=='P') { + nothing_response(); + // FIXME: modified only here by DojoCorp, Mumbai, India, 20050626 + //time_count=0; // exted the delay once entered prog.mode + } + + /* Leave programming mode */ + else if(ch=='Q') { + nothing_response(); + //time_count=MAX_TIME_COUNT_MORATORY; // once the programming is done, + // we should start the application + // but uisp has problems with this, + // therefore we just change the times + // and give the programmer 1 sec to react + } + + /* Erase device, don't care as we will erase one page at a time anyway. */ + else if(ch=='R') { + nothing_response(); + } + + /* Set address, little endian. EEPROM in bytes, FLASH in words */ + /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */ + /* This might explain why little endian was used here, big endian used everywhere else. */ + else if(ch=='U') { + address.byte[0] = getch(); + address.byte[1] = getch(); + nothing_response(); + } + + /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */ + else if(ch=='V') { + getNch(4); + byte_response(0x00); + } + + /* Write memory, length is big endian and is in bytes */ + else if(ch=='d') { + length.byte[1] = getch(); + length.byte[0] = getch(); + flags.eeprom = 0; + if (getch() == 'E') flags.eeprom = 1; + for (w=0;w127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME + //else address_high = 0x00; + + //address.word = address.word << 1; //address * 2 -> byte location + //if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes + cli(); //Disable interrupts, just to be sure + while(bit_is_set(EECR,EEWE)); //Wait for previous EEPROM writes to complete + asm volatile( + "clr r17 \n\t" //page_word_count + "lds r30,address \n\t" //Address of FLASH location (in words) + "lds r31,address+1 \n\t" + "lsl r30 \n\t" //address * 2 -> byte location + "rol r31 \n\t" + "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM + "ldi r29,hi8(buff) \n\t" + "lds r24,length \n\t" //Length of data to be written (in bytes) + "lds r25,length+1 \n\t" + "sbrs r24,0 \n\t" //Even up an odd number of bytes + "rjmp length_loop \n\t" + "adiw r24,1 \n\t" + "length_loop: \n\t" //Main loop, repeat for number of words in block + "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page + "brne no_page_erase \n\t" + "rcall wait_spm \n\t" +// "wait_spm1: \n\t" +// "lds r16,%0 \n\t" //Wait for previous spm to complete +// "andi r16,1 \n\t" +// "cpi r16,1 \n\t" +// "breq wait_spm1 \n\t" + "ldi r16,0x03 \n\t" //Erase page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" + "rcall wait_spm \n\t" +// "wait_spm2: \n\t" +// "lds r16,%0 \n\t" //Wait for previous spm to complete +// "andi r16,1 \n\t" +// "cpi r16,1 \n\t" +// "breq wait_spm2 \n\t" + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" + "no_page_erase: \n\t" + "ld r0,Y+ \n\t" //Write 2 bytes into page buffer + "ld r1,Y+ \n\t" + + "rcall wait_spm \n\t" +// "wait_spm3: \n\t" +// "lds r16,%0 \n\t" //Wait for previous spm to complete +// "andi r16,1 \n\t" +// "cpi r16,1 \n\t" +// "breq wait_spm3 \n\t" + "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer + "sts %0,r16 \n\t" + "spm \n\t" + + "inc r17 \n\t" //page_word_count++ + "cpi r17,%1 \n\t" + "brlo same_page \n\t" //Still same page in FLASH + "write_page: \n\t" + "clr r17 \n\t" //New page, write current one first + "rcall wait_spm \n\t" +// "wait_spm4: \n\t" +// "lds r16,%0 \n\t" //Wait for previous spm to complete +// "andi r16,1 \n\t" +// "cpi r16,1 \n\t" +// "breq wait_spm4 \n\t" + "ldi r16,0x05 \n\t" //Write page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" + "rcall wait_spm \n\t" +// "wait_spm5: \n\t" +// "lds r16,%0 \n\t" //Wait for previous spm to complete +// "andi r16,1 \n\t" +// "cpi r16,1 \n\t" +// "breq wait_spm5 \n\t" + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" + "same_page: \n\t" + "adiw r30,2 \n\t" //Next word in FLASH + "sbiw r24,2 \n\t" //length-2 + "breq final_write \n\t" //Finished + "rjmp length_loop \n\t" + + "wait_spm: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm \n\t" + "ret \n\t" + + "final_write: \n\t" + "cpi r17,0 \n\t" + "breq block_done \n\t" + "adiw r24,2 \n\t" //length+2, fool above check on length after short page write + "rjmp write_page \n\t" + "block_done: \n\t" + "clr __zero_reg__ \n\t" //restore zero register + : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31"); + + /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */ + /* exit the bootloader without a power cycle anyhow */ + } + putch(0x14); + putch(0x10); + } + } + + /* Read memory block mode, length is big endian. */ + else if(ch=='t') { + length.byte[1] = getch(); + length.byte[0] = getch(); + if (getch() == 'E') flags.eeprom = 1; + else { + flags.eeprom = 0; + address.word = address.word << 1; // address * 2 -> byte location + } + if (getch() == ' ') { // Command terminator + putch(0x14); + for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay + if (flags.eeprom) { // Byte access EEPROM read + putch(eeprom_rb(address.word)); + address.word++; + } else { + if (!flags.rampz) putch(pgm_read_byte_near(address.word)); + address.word++; + } + } + putch(0x10); + } + } + + /* Get device signature bytes */ + else if(ch=='u') { + if (getch() == ' ') { + putch(0x14); + putch(SIG1); + putch(SIG2); + putch(SIG3); + putch(0x10); + } + } + + /* Read oscillator calibration byte */ + else if(ch=='v') { + byte_response(0x00); + } +// } else { +// time_count++; +// if (time_count>=MAX_TIME_COUNT) { +// app_start(); +// } +// } + } /* end of forever loop */ +} + +void putch(char ch) +{ + /* m8 */ + while (!(inb(UCSRA) & _BV(UDRE))); + outb(UDR,ch); +} + +char getch(void) +{ + /* m8 */ + uint32_t count = 0; + while(!(inb(UCSRA) & _BV(RXC))) { + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return (inb(UDR)); +} + +void getNch(uint8_t count) +{ + uint8_t i; + for(i=0;i $@ + +size: $(PROGRAM).hex + $(SIZE) $^ + +# Rules for building the .text rom images + +text: hex bin srec + +hex: $(PROGRAM).hex +bin: $(PROGRAM).bin +srec: $(PROGRAM).srec + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ diff --git a/test/ardmake/hardware/bootloaders/bt/ATmegaBOOT_168.c b/test/ardmake/hardware/bootloaders/bt/ATmegaBOOT_168.c new file mode 100644 index 0000000..c73eefa --- /dev/null +++ b/test/ardmake/hardware/bootloaders/bt/ATmegaBOOT_168.c @@ -0,0 +1,1038 @@ +/**********************************************************/ +/* Serial Bootloader for Atmel megaAVR Controllers */ +/* */ +/* tested with ATmega8, ATmega128 and ATmega168 */ +/* should work with other mega's, see code for details */ +/* */ +/* ATmegaBOOT.c */ +/* */ +/* build: 050815 */ +/* date : 15.08.2005 */ +/* */ +/* 20060802: hacked for Arduino by D. Cuartielles */ +/* based on a previous hack by D. Mellis */ +/* and D. Cuartielles */ +/* */ +/* Monitor and debug functions were added to the original */ +/* code by Dr. Erik Lins, chip45.com. (See below) */ +/* */ +/* Thanks to Karl Pitrich for fixing a bootloader pin */ +/* problem and more informative LED blinking! */ +/* */ +/* For the latest version see: */ +/* http://www.chip45.com/ */ +/* */ +/* ------------------------------------------------------ */ +/* */ +/* based on stk500boot.c */ +/* Copyright (c) 2003, Jason P. Kyle */ +/* All rights reserved. */ +/* see avr1.org for original file and information */ +/* */ +/* This program is free software; you can redistribute it */ +/* and/or modify it under the terms of the GNU General */ +/* Public License as published by the Free Software */ +/* Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will */ +/* be useful, but WITHOUT ANY WARRANTY; without even the */ +/* implied warranty of MERCHANTABILITY or FITNESS FOR A */ +/* PARTICULAR PURPOSE. See the GNU General Public */ +/* License for more details. */ +/* */ +/* You should have received a copy of the GNU General */ +/* Public License along with this program; if not, write */ +/* to the Free Software Foundation, Inc., */ +/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* Licence can be viewed at */ +/* http://www.fsf.org/licenses/gpl.txt */ +/* */ +/* Target = Atmel AVR m128,m64,m32,m16,m8,m162,m163,m169, */ +/* m8515,m8535. ATmega161 has a very small boot block so */ +/* isn't supported. */ +/* */ +/* Tested with m128,m8,m163 - feel free to let me know */ +/* how/if it works for you. */ +/* */ +/**********************************************************/ + + +/* some includes */ +#include +#include +#include +#include +#include + + +#define set_output(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) +#define set_input(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) + + +#define high(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) +#define low(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) + + + + +/* the current avr-libc eeprom functions do not support the ATmega168 */ +/* own eeprom write/read functions are used instead */ +#if !defined(__AVR_ATmega168__) || !defined(__AVR_ATmega328P__) +#include +#endif + +/* define F_CPU according to AVR_FREQ set in Makefile */ +/* Is there a better way to pass such a parameter from Makefile to source code ? */ + +#define F_CPU 16000000L + +#include + + +/* 20060803: hacked by DojoCorp */ +/* set the waiting time for the bootloader */ +#define MAX_TIME_COUNT (F_CPU>>1) + +/* set the UART baud rate */ +/* 20060803: hacked by DojoCorp */ +#define BAUD_RATE 115200 + + +/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */ +/* never allow AVR Studio to do an update !!!! */ +#define HW_VER 0x02 +#define SW_MAJOR 0x01 +#define SW_MINOR 0x0f + + +/* Adjust to suit whatever pin your hardware uses to enter the bootloader */ +/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */ +/* BL0... means UART0, BL1... means UART1 */ +#ifdef __AVR_ATmega128__ +#define BL_DDR DDRF +#define BL_PORT PORTF +#define BL_PIN PINF +#define BL0 PINF7 +#define BL1 PINF6 +#else +/* other ATmegas have only one UART, so only one pin is defined to enter bootloader */ +#define BL_DDR DDRD +#define BL_PORT PORTD +#define BL_PIN PIND +#define BL PIND6 +#endif + + +/* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */ +/* if monitor functions are included, LED goes on after monitor was entered */ +#ifdef __AVR_ATmega128__ +/* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128) */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB7 +#else +/* Onboard LED is connected to pin PB2 (e.g. Crumb8, Crumb168) */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +/* 20060803: hacked by DojoCorp, LED pin is B5 in Arduino */ +/* #define LED PINB2 */ +#define LED PINB5 +#endif + + +/* monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */ +#ifdef __AVR_ATmega128__ +#define MONITOR +#endif + + +/* define various device id's */ +/* manufacturer byte is always the same */ +#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :( + +#if defined __AVR_ATmega128__ +#define SIG2 0x97 +#define SIG3 0x02 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega64__ +#define SIG2 0x96 +#define SIG3 0x02 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega32__ +#define SIG2 0x95 +#define SIG3 0x02 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega16__ +#define SIG2 0x94 +#define SIG3 0x03 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega8__ +#define SIG2 0x93 +#define SIG3 0x07 +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega88__ +#define SIG2 0x93 +#define SIG3 0x0a +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega168__ +#define SIG2 0x94 +#define SIG3 0x06 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega328P__ +#define SIG2 0x95 +#define SIG3 0x0F +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega162__ +#define SIG2 0x94 +#define SIG3 0x04 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega163__ +#define SIG2 0x94 +#define SIG3 0x02 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega169__ +#define SIG2 0x94 +#define SIG3 0x05 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega8515__ +#define SIG2 0x93 +#define SIG3 0x06 +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega8535__ +#define SIG2 0x93 +#define SIG3 0x08 +#define PAGE_SIZE 0x20U //32 words +#endif + + +/* function prototypes */ +void putch(char); +char getch(void); +void getNch(uint8_t); +void byte_response(uint8_t); +void nothing_response(void); +char gethex(void); +void puthex(char); +void flash_led(uint8_t); + +/* some variables */ +union address_union { + uint16_t word; + uint8_t byte[2]; +} address; + +union length_union { + uint16_t word; + uint8_t byte[2]; +} length; + +struct flags_struct { + unsigned eeprom : 1; + unsigned rampz : 1; +} flags; + +uint8_t buff[256]; +uint8_t address_high; + +uint8_t pagesz=0x80; + +uint8_t i; +uint8_t bootuart = 0; + +void (*app_start)(void) = 0x0000; + + +/* main program starts here */ +int main(void) +{ + uint8_t ch,ch2; + uint16_t w; + + asm volatile("nop\n\t"); + + /* set pin direction for bootloader pin and enable pullup */ + /* for ATmega128, two pins need to be initialized */ +#ifdef __AVR_ATmega128__ + BL_DDR &= ~_BV(BL0); + BL_DDR &= ~_BV(BL1); + BL_PORT |= _BV(BL0); + BL_PORT |= _BV(BL1); +#else + BL_DDR &= ~_BV(BL); + BL_PORT |= _BV(BL); +#endif + + +#ifdef __AVR_ATmega128__ + /* check which UART should be used for booting */ + if(bit_is_clear(BL_PIN, BL0)) { + bootuart = 1; + } + else if(bit_is_clear(BL_PIN, BL1)) { + bootuart = 2; + } +#endif + + /* check if flash is programmed already, if not start bootloader anyway */ + if(pgm_read_byte_near(0x0000) != 0xFF) { + +#ifdef __AVR_ATmega128__ + /* no UART was selected, start application */ + if(!bootuart) { + app_start(); + } +#else + /* check if bootloader pin is set low */ + /* we don't start this part neither for the m8, nor m168 */ + //if(bit_is_set(BL_PIN, BL)) { + // app_start(); + // } +#endif + } + +#ifdef __AVR_ATmega128__ + /* no bootuart was selected, default to uart 0 */ + if(!bootuart) { + bootuart = 1; + } +#endif + + + /* initialize UART(s) depending on CPU defined */ +#ifdef __AVR_ATmega128__ + if(bootuart == 1) { + UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR0A = 0x00; + UCSR0C = 0x06; + UCSR0B = _BV(TXEN0)|_BV(RXEN0); + } + if(bootuart == 2) { + UBRR1L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR1H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR1A = 0x00; + UCSR1C = 0x06; + UCSR1B = _BV(TXEN1)|_BV(RXEN1); + } +#elif defined __AVR_ATmega163__ + UBRR = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRRHI = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSRA = 0x00; + UCSRB = _BV(TXEN)|_BV(RXEN); +#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + + UBRR0H = ((F_CPU / 16 + BAUD_RATE / 2) / BAUD_RATE - 1) >> 8; + UBRR0L = ((F_CPU / 16 + BAUD_RATE / 2) / BAUD_RATE - 1); + + + //UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + //UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR0B = (1<>8; // set baud rate + UBRRL = (((F_CPU/BAUD_RATE)/16)-1); + UCSRB = (1<> 8; + UCSRA = 0x00; + UCSRC = 0x06; + UCSRB = _BV(TXEN)|_BV(RXEN); +#endif + + /* set LED pin as output */ + LED_DDR |= _BV(LED); + + + + set_output(DDRD,PIND7); + high(PORTD,PD7); + for (i = 0; i < 16; i++) { + + _delay_loop_2(0); + } + + + low(PORTD,PD7); + + + /* flash onboard LED to signal entering of bootloader */ +#ifdef __AVR_ATmega128__ + // 4x for UART0, 5x for UART1 + flash_led(3 + bootuart); +#else + flash_led(3); +#endif + + /* 20050803: by DojoCorp, this is one of the parts provoking the + system to stop listening, cancelled from the original */ + //putch('\0'); + + + //message("SET BT PAGEMODE 3 2000 1"); +putch('S'); +putch('E'); +putch('T'); +putch(' '); +putch('B'); +putch('T'); +putch(' '); +putch('P'); +putch('A'); +putch('G'); +putch('E'); +putch('M'); +putch('O'); +putch('D'); +putch('E'); +putch(' '); +putch('3'); +putch(' '); +putch('2'); +putch('0'); +putch('0'); +putch('0'); +putch(' '); +putch('1'); +putch(0x0D); + + + //put_s("SET BT ROLE 0 f 7d00"); + putch('S'); + putch('E'); + putch('T'); + putch(' '); + putch('B'); + putch('T'); + putch(' '); + putch('R'); + putch('O'); + putch('L'); + putch('E'); + putch(' '); + putch('0'); + putch(' '); + putch('f'); + putch(' '); + putch('7'); + putch('d'); + putch('0'); + putch('0'); + putch(0x0D); + + + + + + + /* forever loop */ + for (;;) { + + /* get character from UART */ + ch = getch(); + + /* A bunch of if...else if... gives smaller code than switch...case ! */ + + /* Hello is anyone home ? */ + if(ch=='0') { + nothing_response(); + } + + + /* Request programmer ID */ + /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */ + /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */ + else if(ch=='1') { + if (getch() == ' ') { + putch(0x14); + putch('A'); + putch('V'); + putch('R'); + putch(' '); + putch('I'); + putch('S'); + putch('P'); + putch(0x10); + } + } + + + /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */ + else if(ch=='@') { + ch2 = getch(); + if (ch2>0x85) getch(); + nothing_response(); + } + + + /* AVR ISP/STK500 board requests */ + else if(ch=='A') { + ch2 = getch(); + if(ch2==0x80) byte_response(HW_VER); // Hardware version + else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version + else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version + else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56 + else byte_response(0x00); // Covers various unnecessary responses we don't care about + } + + + /* Device Parameters DON'T CARE, DEVICE IS FIXED */ + else if(ch=='B') { + getNch(20); + nothing_response(); + } + + + /* Parallel programming stuff DON'T CARE */ + else if(ch=='E') { + getNch(5); + nothing_response(); + } + + + /* Enter programming mode */ + else if(ch=='P') { + nothing_response(); + } + + + /* Leave programming mode */ + else if(ch=='Q') { + nothing_response(); + } + + + /* Erase device, don't care as we will erase one page at a time anyway. */ + else if(ch=='R') { + nothing_response(); + } + + + /* Set address, little endian. EEPROM in bytes, FLASH in words */ + /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */ + /* This might explain why little endian was used here, big endian used everywhere else. */ + else if(ch=='U') { + address.byte[0] = getch(); + address.byte[1] = getch(); + nothing_response(); + } + + + /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */ + else if(ch=='V') { + getNch(4); + byte_response(0x00); + } + + + /* Write memory, length is big endian and is in bytes */ + else if(ch=='d') { + length.byte[1] = getch(); + length.byte[0] = getch(); + flags.eeprom = 0; + if (getch() == 'E') flags.eeprom = 1; + for (w=0;w127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME + else address_high = 0x00; +#ifdef __AVR_ATmega128__ + RAMPZ = address_high; +#endif + address.word = address.word << 1; //address * 2 -> byte location + /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */ + if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes + cli(); //Disable interrupts, just to be sure + // HACKME: EEPE used to be EEWE + while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete + asm volatile( + "clr r17 \n\t" //page_word_count + "lds r30,address \n\t" //Address of FLASH location (in bytes) + "lds r31,address+1 \n\t" + "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM + "ldi r29,hi8(buff) \n\t" + "lds r24,length \n\t" //Length of data to be written (in bytes) + "lds r25,length+1 \n\t" + "length_loop: \n\t" //Main loop, repeat for number of words in block + "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page + "brne no_page_erase \n\t" + "wait_spm1: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm1 \n\t" + "ldi r16,0x03 \n\t" //Erase page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "wait_spm2: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm2 \n\t" + + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "no_page_erase: \n\t" + "ld r0,Y+ \n\t" //Write 2 bytes into page buffer + "ld r1,Y+ \n\t" + + "wait_spm3: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm3 \n\t" + "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer + "sts %0,r16 \n\t" + "spm \n\t" + + "inc r17 \n\t" //page_word_count++ + "cpi r17,%1 \n\t" + "brlo same_page \n\t" //Still same page in FLASH + "write_page: \n\t" + "clr r17 \n\t" //New page, write current one first + "wait_spm4: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm4 \n\t" +#ifdef __AVR_ATmega163__ + "andi r30,0x80 \n\t" // m163 requires Z6:Z1 to be zero during page write +#endif + "ldi r16,0x05 \n\t" //Write page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" + "ori r30,0x7E \n\t" // recover Z6:Z1 state after page write (had to be zero during write) +#endif + "wait_spm5: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm5 \n\t" + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "same_page: \n\t" + "adiw r30,2 \n\t" //Next word in FLASH + "sbiw r24,2 \n\t" //length-2 + "breq final_write \n\t" //Finished + "rjmp length_loop \n\t" + "final_write: \n\t" + "cpi r17,0 \n\t" + "breq block_done \n\t" + "adiw r24,2 \n\t" //length+2, fool above check on length after short page write + "rjmp write_page \n\t" + "block_done: \n\t" + "clr __zero_reg__ \n\t" //restore zero register +#if defined __AVR_ATmega168__ || __AVR_ATmega328P__ + : "=m" (SPMCSR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31" +#else + : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31" +#endif + ); + /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */ + /* exit the bootloader without a power cycle anyhow */ + } + putch(0x14); + putch(0x10); + } + } + + + /* Read memory block mode, length is big endian. */ + else if(ch=='t') { + length.byte[1] = getch(); + length.byte[0] = getch(); +#if defined __AVR_ATmega128__ + if (address.word>0x7FFF) flags.rampz = 1; // No go with m256, FIXME + else flags.rampz = 0; +#endif + if (getch() == 'E') flags.eeprom = 1; + else { + flags.eeprom = 0; + address.word = address.word << 1; // address * 2 -> byte location + } + if (getch() == ' ') { // Command terminator + putch(0x14); + for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay + if (flags.eeprom) { // Byte access EEPROM read +#if defined __AVR_ATmega168__ || __AVR_ATmega328P__ + while(EECR & (1<= 'a') { + ah = ah - 'a' + 0x0a; + } else if(ah >= '0') { + ah -= '0'; + } + if(al >= 'a') { + al = al - 'a' + 0x0a; + } else if(al >= '0') { + al -= '0'; + } + return (ah << 4) + al; +} + + +void puthex(char ch) { + char ah,al; + + ah = (ch & 0xf0) >> 4; + if(ah >= 0x0a) { + ah = ah - 0x0a + 'a'; + } else { + ah += '0'; + } + al = (ch & 0x0f); + if(al >= 0x0a) { + al = al - 0x0a + 'a'; + } else { + al += '0'; + } + putch(ah); + putch(al); +} + + +void putch(char ch) +{ +#ifdef __AVR_ATmega128__ + if(bootuart == 1) { + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; + } + else if (bootuart == 2) { + while (!(UCSR1A & _BV(UDRE1))); + UDR1 = ch; + } +#elif defined (__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + /* m8,16,32,169,8515,8535,163 */ + while (!(UCSRA & _BV(UDRE))); + UDR = ch; +#endif +} + + +char getch(void) +{ +#ifdef __AVR_ATmega128__ + if(bootuart == 1) { + while(!(UCSR0A & _BV(RXC0))); + return UDR0; + } + else if(bootuart == 2) { + while(!(UCSR1A & _BV(RXC1))); + return UDR1; + } + return 0; +#elif defined (__AVR_ATmega168__) || defined(__AVR_ATmega328P__) + uint32_t count = 0; + while(!(UCSR0A & _BV(RXC0))){ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return UDR0; +#else + /* m8,16,32,169,8515,8535,163 */ + uint32_t count = 0; + while(!(UCSRA & _BV(RXC))){ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return UDR; +#endif +} + + +void getNch(uint8_t count) +{ + uint8_t i; + for(i=0;i $@ + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ + diff --git a/test/ardmake/hardware/bootloaders/lilypad/LilyPadBOOT_168.hex b/test/ardmake/hardware/bootloaders/lilypad/LilyPadBOOT_168.hex new file mode 100644 index 0000000..aea378e --- /dev/null +++ b/test/ardmake/hardware/bootloaders/lilypad/LilyPadBOOT_168.hex @@ -0,0 +1,117 @@ +:103800000C94341C0C944F1C0C944F1C0C944F1CA7 +:103810000C944F1C0C944F1C0C944F1C0C944F1C7C +:103820000C944F1C0C944F1C0C944F1C0C944F1C6C +:103830000C944F1C0C944F1C0C944F1C0C944F1C5C +:103840000C944F1C0C944F1C0C944F1C0C944F1C4C +:103850000C944F1C0C944F1C0C944F1C0C944F1C3C +:103860000C944F1C0C944F1C11241FBECFEFD4E0BE +:10387000DEBFCDBF11E0A0E0B1E0E8E1FFE302C0B0 +:1038800005900D92A230B107D9F712E0A2E0B1E0A5 +:1038900001C01D92AD30B107E1F70C94311D0C94BD +:1038A000001CCF93DF93CDB7DEB724970FB6F89403 +:1038B000DEBF0FBECDBF382F882309F433E010924E +:1038C0000A02332309F44BC020E02D9A19821A8290 +:1038D0001B821C8289819A81AB81BC8180549F416B +:1038E000A040B040A0F489819A81AB81BC8101964F +:1038F000A11DB11D89839A83AB83BC8389819A8181 +:10390000AB81BC8180549F41A040B04060F32D98B2 +:1039100019821A821B821C8289819A81AB81BC81A7 +:1039200080549F41A040B040A0F489819A81AB812E +:10393000BC810196A11DB11D89839A83AB83BC8391 +:1039400089819A81AB81BC8180549F41A040B04065 +:1039500060F32F5F231708F4B8CF20930A02249650 +:103960000FB6F894DEBF0FBECDBFDF91CF910895A3 +:10397000EF92FF920F931F93EE24FF248701809113 +:10398000C00087FD17C00894E11CF11C011D111D2A +:1039900081E0E81689E0F8068DE3080780E0180763 +:1039A00070F3E0910201F091030109958091C0004C +:1039B00087FFE9CF8091C600992787FD90951F91D9 +:1039C0000F91FF90EF900895982F8091C00085FF90 +:1039D000FCCF9093C60008950E94B81C803271F00D +:1039E000809104018F5F80930401853009F0089570 +:1039F000E0910201F09103010995089584E10E948C +:103A0000E41C80E10E94E41C08951F93182F0E947B +:103A1000B81C803269F0809104018F5F80930401AB +:103A2000853079F4E0910201F0910301099509C014 +:103A300084E10E94E41C812F0E94E41C80E10E942A +:103A4000E41C1F910895282F882351F090E0809165 +:103A5000C00087FFFCCF8091C6009F5F2917B9F790 +:103A60000895CFEFD4E0DEBFCDBF000089E18093A1 +:103A7000C4001092C50088E18093C10086E0809365 +:103A8000C2005098589A259A83E00E94511C0E94C7 +:103A9000B81C8033B1F18133B9F1803409F454C0DA +:103AA000813409F45AC0823409F469C0853409F4B8 +:103AB0006CC0803531F1813521F1823511F18535C8 +:103AC00009F4B2C0863509F4BAC0843609F463C07B +:103AD000843709F4BBC0853709F40EC1863709F471 +:103AE0004AC0809104018F5F80930401853079F68C +:103AF000E0910201F091030109950E94B81C803306 +:103B000051F60E94EC1CC3CF0E94B81C803249F7CA +:103B100084E10E94E41C81E40E94E41C86E50E948A +:103B2000E41C82E50E94E41C80E20E94E41C89E41B +:103B30000E94E41C83E50E94E41C80E50E94E41CD2 +:103B400080E10E94E41CA3CF0E94B81C8638C8F212 +:103B50000E94B81C0E94EC1C9ACF0E94B81C8038AE +:103B600009F4F7C0813809F4F8C0823809F4F9C0C3 +:103B7000883909F4BDC080E00E94051D88CF84E12A +:103B80000E94231D0E94EC1C82CF85E00E94231D11 +:103B90000E94EC1C7CCF0E94B81C809309020E94FA +:103BA000B81C8093080280910C028E7F80930C02D7 +:103BB0000E94B81C853409F4C6C080910802909117 +:103BC0000902892B09F0ADC00E94B81C803209F0AF +:103BD00088CF80910C0280FFC8C08091080290912C +:103BE00009020097D1F02091060130910701E8E029 +:103BF000F1E0AC014E0F5F1FF999FECF32BD21BD40 +:103C0000819180BDFA9AF99A2F5F3F4F4E175F0757 +:103C100099F7309307012093060184E10E94E41C88 +:103C200080E10E94E41C33CF0E94B81C80930601FF +:103C30000E94B81C809307010E94EC1C28CF84E0EE +:103C40000E94231D80E00E94051D21CF0E94B81C08 +:103C5000809309020E94B81C809308020E94B81C3D +:103C6000853409F4F4C080910C028E7F80930C029D +:103C70008091060190910701880F991F9093070189 +:103C8000809306010E94B81C803209F000CF84E1C5 +:103C90000E94E41C2091080230910902211531058F +:103CA00019F1C0E0D0E0E0910601F09107018091A8 +:103CB0000C0280FFC4C0F999FECFF2BDE1BDF89AB5 +:103CC00080B50E94E41CE0910601F0910701319655 +:103CD000F0930701E0930601209108023091090258 +:103CE0002196C217D30718F380E10E94E41CCFCEBF +:103CF00083E00E94051DCBCE0E94B81C803209F0E3 +:103D0000F0CE84E10E94E41C8EE10E94E41C84E970 +:103D10000E94E41C86E00E94E41C80E10E94E41CF6 +:103D2000B6CEC0E0D0E008E011E00E94B81CF80177 +:103D300081938F0121968091080290910902C81702 +:103D4000D90798F341CF80910C02816080930C02D7 +:103D500034CF82E00E94051D9ACE81E00E94051DAD +:103D600096CE80E10E94051D92CE8091070187FDCD +:103D700080C010920B028091060190910701880F7C +:103D8000991F90930701809306018091080280FF9C +:103D900009C080910802909109020196909309024E +:103DA00080930802F894F999FECF1127E09106015B +:103DB000F0910701C8E0D1E08091080290910902DA +:103DC000103091F40091570001700130D9F303E0F5 +:103DD00000935700E8950091570001700130D9F326 +:103DE00001E100935700E895099019900091570060 +:103DF00001700130D9F301E000935700E895139565 +:103E0000103498F011270091570001700130D9F358 +:103E100005E000935700E8950091570001700130CC +:103E2000D9F301E100935700E8953296029709F023 +:103E3000C7CF103011F00296E5CF1124EECE81FFEE +:103E40000CC03196F0930701E093060149CF8091B1 +:103E50000C02816080930C0215CF84910E94E41CB7 +:103E60002091080230910902E0910601F0910701CA +:103E7000E8CF81E080930B027ECF0F931F930E94C7 +:103E8000B81C182F0E94E41C0E94B81C082F0E9426 +:103E9000E41C11362CF0175501363CF0075508C0CC +:103EA0001033D4F310530136CCF700330CF0005329 +:103EB0001295107F100F812F992787FD90951F91E4 +:103EC0000F9108951F93282F992787FD9095807F44 +:103ED00090709595879595958795959587959595E6 +:103EE00087958A304CF0982F995A822F8F708A309C +:103EF0004CF0182F195A08C0982F905D822F8F70A0 +:103F00008A30BCF7182F105D892F0E94E41C812F86 +:083F10000E94E41C1F910895BA +:023F1800800027 +:0400000300003800C1 +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/lilypad/src/ATmegaBOOT.c b/test/ardmake/hardware/bootloaders/lilypad/src/ATmegaBOOT.c new file mode 100644 index 0000000..915bc57 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/lilypad/src/ATmegaBOOT.c @@ -0,0 +1,979 @@ +/**********************************************************/ +/* Serial Bootloader for Atmel megaAVR Controllers */ +/* */ +/* tested with ATmega8, ATmega128 and ATmega168 */ +/* should work with other mega's, see code for details */ +/* */ +/* ATmegaBOOT.c */ +/* */ +/* 20070626: hacked for Arduino Diecimila (which auto- */ +/* resets when a USB connection is made to it) */ +/* by D. Mellis */ +/* 20060802: hacked for Arduino by D. Cuartielles */ +/* based on a previous hack by D. Mellis */ +/* and D. Cuartielles */ +/* */ +/* Monitor and debug functions were added to the original */ +/* code by Dr. Erik Lins, chip45.com. (See below) */ +/* */ +/* Thanks to Karl Pitrich for fixing a bootloader pin */ +/* problem and more informative LED blinking! */ +/* */ +/* For the latest version see: */ +/* http://www.chip45.com/ */ +/* */ +/* ------------------------------------------------------ */ +/* */ +/* based on stk500boot.c */ +/* Copyright (c) 2003, Jason P. Kyle */ +/* All rights reserved. */ +/* see avr1.org for original file and information */ +/* */ +/* This program is free software; you can redistribute it */ +/* and/or modify it under the terms of the GNU General */ +/* Public License as published by the Free Software */ +/* Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will */ +/* be useful, but WITHOUT ANY WARRANTY; without even the */ +/* implied warranty of MERCHANTABILITY or FITNESS FOR A */ +/* PARTICULAR PURPOSE. See the GNU General Public */ +/* License for more details. */ +/* */ +/* You should have received a copy of the GNU General */ +/* Public License along with this program; if not, write */ +/* to the Free Software Foundation, Inc., */ +/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* Licence can be viewed at */ +/* http://www.fsf.org/licenses/gpl.txt */ +/* */ +/* Target = Atmel AVR m128,m64,m32,m16,m8,m162,m163,m169, */ +/* m8515,m8535. ATmega161 has a very small boot block so */ +/* isn't supported. */ +/* */ +/* Tested with m168 */ +/**********************************************************/ + +/* $Id$ */ + + +/* some includes */ +#include +#include +#include +#include +#include + + +/* the current avr-libc eeprom functions do not support the ATmega168 */ +/* own eeprom write/read functions are used instead */ +#ifndef __AVR_ATmega168__ +#include +#endif + +/* Use the F_CPU defined in Makefile */ + +/* 20060803: hacked by DojoCorp */ +/* 20070626: hacked by David A. Mellis to decrease waiting time for auto-reset */ +/* set the waiting time for the bootloader */ +/* get this from the Makefile instead */ +/* #define MAX_TIME_COUNT (F_CPU>>4) */ + +/* 20070707: hacked by David A. Mellis - after this many errors give up and launch application */ +#define MAX_ERROR_COUNT 5 + +/* set the UART baud rate */ +/* 20060803: hacked by DojoCorp */ +//#define BAUD_RATE 115200 +#define BAUD_RATE 19200 + + +/* SW_MAJOR and MINOR needs to be updated from time to time to avoid warning message from AVR Studio */ +/* never allow AVR Studio to do an update !!!! */ +#define HW_VER 0x02 +#define SW_MAJOR 0x01 +#define SW_MINOR 0x10 + + +/* Adjust to suit whatever pin your hardware uses to enter the bootloader */ +/* ATmega128 has two UARTS so two pins are used to enter bootloader and select UART */ +/* BL0... means UART0, BL1... means UART1 */ +#ifdef __AVR_ATmega128__ +#define BL_DDR DDRF +#define BL_PORT PORTF +#define BL_PIN PINF +#define BL0 PINF7 +#define BL1 PINF6 +#else +/* other ATmegas have only one UART, so only one pin is defined to enter bootloader */ +#define BL_DDR DDRD +#define BL_PORT PORTD +#define BL_PIN PIND +#define BL PIND6 +#endif + + +/* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */ +/* if monitor functions are included, LED goes on after monitor was entered */ +#ifdef __AVR_ATmega128__ +/* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128) */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB7 +#else +/* Onboard LED is connected to pin PB2 (e.g. Crumb8, Crumb168) */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +/* 20060803: hacked by DojoCorp, LED pin is B5 in Arduino */ +/* #define LED PINB2 */ +#define LED PINB5 +#endif + + +/* monitor functions will only be compiled when using ATmega128, due to bootblock size constraints */ +#ifdef __AVR_ATmega128__ +#define MONITOR +#endif + + +/* define various device id's */ +/* manufacturer byte is always the same */ +#define SIG1 0x1E // Yep, Atmel is the only manufacturer of AVR micros. Single source :( + +#if defined __AVR_ATmega128__ +#define SIG2 0x97 +#define SIG3 0x02 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega64__ +#define SIG2 0x96 +#define SIG3 0x02 +#define PAGE_SIZE 0x80U //128 words + +#elif defined __AVR_ATmega32__ +#define SIG2 0x95 +#define SIG3 0x02 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega16__ +#define SIG2 0x94 +#define SIG3 0x03 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega8__ +#define SIG2 0x93 +#define SIG3 0x07 +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega88__ +#define SIG2 0x93 +#define SIG3 0x0a +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega168__ +#define SIG2 0x94 +#define SIG3 0x06 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega162__ +#define SIG2 0x94 +#define SIG3 0x04 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega163__ +#define SIG2 0x94 +#define SIG3 0x02 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega169__ +#define SIG2 0x94 +#define SIG3 0x05 +#define PAGE_SIZE 0x40U //64 words + +#elif defined __AVR_ATmega8515__ +#define SIG2 0x93 +#define SIG3 0x06 +#define PAGE_SIZE 0x20U //32 words + +#elif defined __AVR_ATmega8535__ +#define SIG2 0x93 +#define SIG3 0x08 +#define PAGE_SIZE 0x20U //32 words +#endif + + +/* function prototypes */ +void putch(char); +char getch(void); +void getNch(uint8_t); +void byte_response(uint8_t); +void nothing_response(void); +char gethex(void); +void puthex(char); +void flash_led(uint8_t); + +/* some variables */ +union address_union { + uint16_t word; + uint8_t byte[2]; +} address; + +union length_union { + uint16_t word; + uint8_t byte[2]; +} length; + +struct flags_struct { + unsigned eeprom : 1; + unsigned rampz : 1; +} flags; + +uint8_t buff[256]; +uint8_t address_high; + +uint8_t pagesz=0x80; + +uint8_t i; +uint8_t bootuart = 0; + +uint8_t error_count = 0; + +void (*app_start)(void) = 0x0000; + + +/* main program starts here */ +int main(void) +{ + uint8_t ch,ch2; + uint16_t w; + + asm volatile("nop\n\t"); + + /* set pin direction for bootloader pin and enable pullup */ + /* for ATmega128, two pins need to be initialized */ +#ifdef __AVR_ATmega128__ + BL_DDR &= ~_BV(BL0); + BL_DDR &= ~_BV(BL1); + BL_PORT |= _BV(BL0); + BL_PORT |= _BV(BL1); +#else + /* We run the bootloader regardless of the state of this pin. Thus, don't + put it in a different state than the other pins. --DAM, 070709 + BL_DDR &= ~_BV(BL); + BL_PORT |= _BV(BL); + */ +#endif + + +#ifdef __AVR_ATmega128__ + /* check which UART should be used for booting */ + if(bit_is_clear(BL_PIN, BL0)) { + bootuart = 1; + } + else if(bit_is_clear(BL_PIN, BL1)) { + bootuart = 2; + } +#endif + + /* check if flash is programmed already, if not start bootloader anyway */ + if(pgm_read_byte_near(0x0000) != 0xFF) { + +#ifdef __AVR_ATmega128__ + /* no UART was selected, start application */ + if(!bootuart) { + app_start(); + } +#else + /* check if bootloader pin is set low */ + /* we don't start this part neither for the m8, nor m168 */ + //if(bit_is_set(BL_PIN, BL)) { + // app_start(); + // } +#endif + } + +#ifdef __AVR_ATmega128__ + /* no bootuart was selected, default to uart 0 */ + if(!bootuart) { + bootuart = 1; + } +#endif + + + /* initialize UART(s) depending on CPU defined */ +#ifdef __AVR_ATmega128__ + if(bootuart == 1) { + UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR0A = 0x00; + UCSR0C = 0x06; + UCSR0B = _BV(TXEN0)|_BV(RXEN0); + } + if(bootuart == 2) { + UBRR1L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR1H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR1A = 0x00; + UCSR1C = 0x06; + UCSR1B = _BV(TXEN1)|_BV(RXEN1); + } +#elif defined __AVR_ATmega163__ + UBRR = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRRHI = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSRA = 0x00; + UCSRB = _BV(TXEN)|_BV(RXEN); +#elif defined __AVR_ATmega168__ + UBRR0L = (uint8_t)(F_CPU/(BAUD_RATE*16L)-1); + UBRR0H = (F_CPU/(BAUD_RATE*16L)-1) >> 8; + UCSR0B = (1<>8; // set baud rate + UBRRL = (((F_CPU/BAUD_RATE)/16)-1); + UCSRB = (1<> 8; + UCSRA = 0x00; + UCSRC = 0x06; + UCSRB = _BV(TXEN)|_BV(RXEN); +#endif + + /* set LED pin as output */ + LED_DDR |= _BV(LED); + + + /* flash onboard LED to signal entering of bootloader */ +#ifdef __AVR_ATmega128__ + // 4x for UART0, 5x for UART1 + flash_led(NUM_LED_FLASHES + bootuart); +#else + flash_led(NUM_LED_FLASHES); +#endif + + /* 20050803: by DojoCorp, this is one of the parts provoking the + system to stop listening, cancelled from the original */ + //putch('\0'); + + + /* forever loop */ + for (;;) { + + /* get character from UART */ + ch = getch(); + + /* A bunch of if...else if... gives smaller code than switch...case ! */ + + /* Hello is anyone home ? */ + if(ch=='0') { + nothing_response(); + } + + + /* Request programmer ID */ + /* Not using PROGMEM string due to boot block in m128 being beyond 64kB boundry */ + /* Would need to selectively manipulate RAMPZ, and it's only 9 characters anyway so who cares. */ + else if(ch=='1') { + if (getch() == ' ') { + putch(0x14); + putch('A'); + putch('V'); + putch('R'); + putch(' '); + putch('I'); + putch('S'); + putch('P'); + putch(0x10); + } else { + if (++error_count == MAX_ERROR_COUNT) + app_start(); + } + } + + + /* AVR ISP/STK500 board commands DON'T CARE so default nothing_response */ + else if(ch=='@') { + ch2 = getch(); + if (ch2>0x85) getch(); + nothing_response(); + } + + + /* AVR ISP/STK500 board requests */ + else if(ch=='A') { + ch2 = getch(); + if(ch2==0x80) byte_response(HW_VER); // Hardware version + else if(ch2==0x81) byte_response(SW_MAJOR); // Software major version + else if(ch2==0x82) byte_response(SW_MINOR); // Software minor version + else if(ch2==0x98) byte_response(0x03); // Unknown but seems to be required by avr studio 3.56 + else byte_response(0x00); // Covers various unnecessary responses we don't care about + } + + + /* Device Parameters DON'T CARE, DEVICE IS FIXED */ + else if(ch=='B') { + getNch(20); + nothing_response(); + } + + + /* Parallel programming stuff DON'T CARE */ + else if(ch=='E') { + getNch(5); + nothing_response(); + } + + + /* Enter programming mode */ + else if(ch=='P') { + nothing_response(); + } + + + /* Leave programming mode */ + else if(ch=='Q') { + nothing_response(); + } + + + /* Erase device, don't care as we will erase one page at a time anyway. */ + else if(ch=='R') { + nothing_response(); + } + + + /* Set address, little endian. EEPROM in bytes, FLASH in words */ + /* Perhaps extra address bytes may be added in future to support > 128kB FLASH. */ + /* This might explain why little endian was used here, big endian used everywhere else. */ + else if(ch=='U') { + address.byte[0] = getch(); + address.byte[1] = getch(); + nothing_response(); + } + + + /* Universal SPI programming command, disabled. Would be used for fuses and lock bits. */ + else if(ch=='V') { + getNch(4); + byte_response(0x00); + } + + + /* Write memory, length is big endian and is in bytes */ + else if(ch=='d') { + length.byte[1] = getch(); + length.byte[0] = getch(); + flags.eeprom = 0; + if (getch() == 'E') flags.eeprom = 1; + for (w=0;w127) address_high = 0x01; //Only possible with m128, m256 will need 3rd address byte. FIXME + else address_high = 0x00; +#ifdef __AVR_ATmega128__ + RAMPZ = address_high; +#endif + address.word = address.word << 1; //address * 2 -> byte location + /* if ((length.byte[0] & 0x01) == 0x01) length.word++; //Even up an odd number of bytes */ + if ((length.byte[0] & 0x01)) length.word++; //Even up an odd number of bytes + cli(); //Disable interrupts, just to be sure + // HACKME: EEPE used to be EEWE + while(bit_is_set(EECR,EEPE)); //Wait for previous EEPROM writes to complete + asm volatile( + "clr r17 \n\t" //page_word_count + "lds r30,address \n\t" //Address of FLASH location (in bytes) + "lds r31,address+1 \n\t" + "ldi r28,lo8(buff) \n\t" //Start of buffer array in RAM + "ldi r29,hi8(buff) \n\t" + "lds r24,length \n\t" //Length of data to be written (in bytes) + "lds r25,length+1 \n\t" + "length_loop: \n\t" //Main loop, repeat for number of words in block + "cpi r17,0x00 \n\t" //If page_word_count=0 then erase page + "brne no_page_erase \n\t" + "wait_spm1: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm1 \n\t" + "ldi r16,0x03 \n\t" //Erase page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "wait_spm2: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm2 \n\t" + + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "no_page_erase: \n\t" + "ld r0,Y+ \n\t" //Write 2 bytes into page buffer + "ld r1,Y+ \n\t" + + "wait_spm3: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm3 \n\t" + "ldi r16,0x01 \n\t" //Load r0,r1 into FLASH page buffer + "sts %0,r16 \n\t" + "spm \n\t" + + "inc r17 \n\t" //page_word_count++ + "cpi r17,%1 \n\t" + "brlo same_page \n\t" //Still same page in FLASH + "write_page: \n\t" + "clr r17 \n\t" //New page, write current one first + "wait_spm4: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm4 \n\t" +#ifdef __AVR_ATmega163__ + "andi r30,0x80 \n\t" // m163 requires Z6:Z1 to be zero during page write +#endif + "ldi r16,0x05 \n\t" //Write page pointed to by Z + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" + "ori r30,0x7E \n\t" // recover Z6:Z1 state after page write (had to be zero during write) +#endif + "wait_spm5: \n\t" + "lds r16,%0 \n\t" //Wait for previous spm to complete + "andi r16,1 \n\t" + "cpi r16,1 \n\t" + "breq wait_spm5 \n\t" + "ldi r16,0x11 \n\t" //Re-enable RWW section + "sts %0,r16 \n\t" + "spm \n\t" +#ifdef __AVR_ATmega163__ + ".word 0xFFFF \n\t" + "nop \n\t" +#endif + "same_page: \n\t" + "adiw r30,2 \n\t" //Next word in FLASH + "sbiw r24,2 \n\t" //length-2 + "breq final_write \n\t" //Finished + "rjmp length_loop \n\t" + "final_write: \n\t" + "cpi r17,0 \n\t" + "breq block_done \n\t" + "adiw r24,2 \n\t" //length+2, fool above check on length after short page write + "rjmp write_page \n\t" + "block_done: \n\t" + "clr __zero_reg__ \n\t" //restore zero register +#if defined __AVR_ATmega168__ + : "=m" (SPMCSR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31" +#else + : "=m" (SPMCR) : "M" (PAGE_SIZE) : "r0","r16","r17","r24","r25","r28","r29","r30","r31" +#endif + ); + /* Should really add a wait for RWW section to be enabled, don't actually need it since we never */ + /* exit the bootloader without a power cycle anyhow */ + } + putch(0x14); + putch(0x10); + } else { + if (++error_count == MAX_ERROR_COUNT) + app_start(); + } + } + + + /* Read memory block mode, length is big endian. */ + else if(ch=='t') { + length.byte[1] = getch(); + length.byte[0] = getch(); +#if defined __AVR_ATmega128__ + if (address.word>0x7FFF) flags.rampz = 1; // No go with m256, FIXME + else flags.rampz = 0; +#endif + if (getch() == 'E') flags.eeprom = 1; + else { + flags.eeprom = 0; + address.word = address.word << 1; // address * 2 -> byte location + } + if (getch() == ' ') { // Command terminator + putch(0x14); + for (w=0;w < length.word;w++) { // Can handle odd and even lengths okay + if (flags.eeprom) { // Byte access EEPROM read +#ifdef __AVR_ATmega168__ + while(EECR & (1<= 'a') { + ah = ah - 'a' + 0x0a; + } else if(ah >= '0') { + ah -= '0'; + } + if(al >= 'a') { + al = al - 'a' + 0x0a; + } else if(al >= '0') { + al -= '0'; + } + return (ah << 4) + al; +} + + +void puthex(char ch) { + char ah,al; + + ah = (ch & 0xf0) >> 4; + if(ah >= 0x0a) { + ah = ah - 0x0a + 'a'; + } else { + ah += '0'; + } + al = (ch & 0x0f); + if(al >= 0x0a) { + al = al - 0x0a + 'a'; + } else { + al += '0'; + } + putch(ah); + putch(al); +} + + +void putch(char ch) +{ +#ifdef __AVR_ATmega128__ + if(bootuart == 1) { + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; + } + else if (bootuart == 2) { + while (!(UCSR1A & _BV(UDRE1))); + UDR1 = ch; + } +#elif defined __AVR_ATmega168__ + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + /* m8,16,32,169,8515,8535,163 */ + while (!(UCSRA & _BV(UDRE))); + UDR = ch; +#endif +} + + +char getch(void) +{ +#ifdef __AVR_ATmega128__ + if(bootuart == 1) { + while(!(UCSR0A & _BV(RXC0))); + return UDR0; + } + else if(bootuart == 2) { + while(!(UCSR1A & _BV(RXC1))); + return UDR1; + } + return 0; +#elif defined __AVR_ATmega168__ + uint32_t count = 0; + while(!(UCSR0A & _BV(RXC0))){ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return UDR0; +#else + /* m8,16,32,169,8515,8535,163 */ + uint32_t count = 0; + while(!(UCSRA & _BV(RXC))){ + /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ + /* HACKME:: here is a good place to count times*/ + count++; + if (count > MAX_TIME_COUNT) + app_start(); + } + return UDR; +#endif +} + + +void getNch(uint8_t count) +{ + uint8_t i; + for(i=0;i $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ + +clean: + rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex + +install: + avrdude -p m168 -c stk500v2 -P /dev/cu.USA19H1b1P1.1 -e -u -U lock:w:0x3f:m -U efuse:w:0x00:m -U hfuse:w:0xdd:m -U lfuse:w:0xe2:m + avrdude -p m168 -c stk500v2 -P /dev/cu.USA19H1b1P1.1 -e -u -U flash:w:ATmegaBOOT_168.hex -U lock:w:0x0f:m diff --git a/test/ardmake/hardware/bootloaders/optiboot/Makefile b/test/ardmake/hardware/bootloaders/optiboot/Makefile new file mode 100644 index 0000000..0fd6005 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/Makefile @@ -0,0 +1,239 @@ +# Makefile for ATmegaBOOT +# E.Lins, 18.7.2005 +# $Id$ +# +# Instructions +# +# To make bootloader .hex file: +# make diecimila +# make lilypad +# make ng +# etc... +# +# To burn bootloader .hex file: +# make diecimila_isp +# make lilypad_isp +# make ng_isp +# etc... + +# program name should not be changed... +PROGRAM = optiboot + +# enter the parameters for the avrdude isp tool +ISPTOOL = stk500v2 +ISPPORT = usb +ISPSPEED = -b 115200 + +MCU_TARGET = atmega168 +LDSECTION = --section-start=.text=0x3e00 + +# the efuse should really be 0xf8; since, however, only the lower +# three bits of that byte are used on the atmega168, avrdude gets +# confused if you specify 1's for the higher bits, see: +# http://tinker.it/now/2007/02/24/the-tale-of-avrdude-atmega168-and-extended-bits-fuses/ +# +# similarly, the lock bits should be 0xff instead of 0x3f (to +# unlock the bootloader section) and 0xcf instead of 0x0f (to +# lock it), but since the high two bits of the lock byte are +# unused, avrdude would get confused. + +ISPFUSES = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \ +-e -u -U lock:w:0x3f:m -U efuse:w:0x$(EFUSE):m -U hfuse:w:0x$(HFUSE):m -U lfuse:w:0x$(LFUSE):m +ISPFLASH = avrdude -c $(ISPTOOL) -p $(MCU_TARGET) -P $(ISPPORT) $(ISPSPEED) \ +-U flash:w:$(PROGRAM)_$(TARGET).hex -U lock:w:0x0f:m + +STK500 = "C:\Program Files\Atmel\AVR Tools\STK500\Stk500.exe" +STK500-1 = $(STK500) -e -d$(MCU_TARGET) -pf -vf -if$(PROGRAM)_$(TARGET).hex \ +-lFF -LFF -f$(HFUSE)$(LFUSE) -EF8 -ms -q -cUSB -I200kHz -s -wt +STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt + +OBJ = $(PROGRAM).o +OPTIMIZE = -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls + +DEFS = +LIBS = + +CC = avr-gcc + +# Override is only needed by avr-lib build system. + +override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) +override LDFLAGS = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles + +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump + +# 20MHz clocked platforms +# +# These are capable of 230400 baud, or 115200 baud on PC (Arduino Avrdude issue) +# + +pro20: TARGET = pro_20mhz +pro20: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' +pro20: AVR_FREQ = 20000000L +pro20: $(PROGRAM)_pro_20mhz.hex +pro20: $(PROGRAM)_pro_20mhz.lst + +pro20_isp: pro20 +pro20_isp: TARGET = pro_20mhz +pro20_isp: HFUSE = DD # 2.7V brownout +pro20_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms +pro20_isp: EFUSE = 02 # 512 byte boot +pro20_isp: isp + +# 16MHz clocked platforms +# +# These are capable of 230400 baud, or 115200 baud on PC (Arduino Avrdude issue) +# + +pro16: TARGET = pro_16MHz +pro16: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' +pro16: AVR_FREQ = 16000000L +pro16: $(PROGRAM)_pro_16MHz.hex +pro16: $(PROGRAM)_pro_16MHz.lst + +pro16_isp: pro16 +pro16_isp: TARGET = pro_16MHz +pro16_isp: HFUSE = DD # 2.7V brownout +pro16_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms +pro16_isp: EFUSE = 02 # 512 byte boot +pro16_isp: isp + +# Diecimila and NG use identical bootloaders +# +diecimila: TARGET = diecimila +diecimila: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' +diecimila: AVR_FREQ = 16000000L +diecimila: $(PROGRAM)_diecimila.hex +diecimila: $(PROGRAM)_diecimila.lst + +diecimila_isp: diecimila +diecimila_isp: TARGET = diecimila +diecimila_isp: HFUSE = DD # 2.7V brownout +diecimila_isp: LFUSE = FF # Low power xtal (16MHz) 16KCK/14CK+65ms +diecimila_isp: EFUSE = 02 # 512 byte boot +diecimila_isp: isp + +atmega328: TARGET = atmega328 +atmega328: MCU_TARGET = atmega328p +atmega328: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' +atmega328: AVR_FREQ = 16000000L +atmega328: LDSECTION = --section-start=.text=0x7e00 +atmega328: $(PROGRAM)_atmega328.hex +atmega328: $(PROGRAM)_atmega328.lst + +atmega328_isp: atmega328 +atmega328_isp: TARGET = atmega328 +atmega328_isp: MCU_TARGET = atmega328p +atmega328_isp: HFUSE = DE # 512 byte boot +atmega328_isp: LFUSE = FF # Low power xtal (16MHz) 16KCK/14CK+65ms +atmega328_isp: EFUSE = 05 # 2.7V brownout +atmega328_isp: isp + +# 8MHz clocked platforms +# +# These are capable of 115200 baud +# + +lilypad: TARGET = lilypad +lilypad: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=115200' +lilypad: AVR_FREQ = 8000000L +lilypad: $(PROGRAM)_lilypad.hex +lilypad: $(PROGRAM)_lilypad.lst + +lilypad_isp: lilypad +lilypad_isp: TARGET = lilypad +lilypad_isp: HFUSE = DD # 2.7V brownout +lilypad_isp: LFUSE = E2 # Internal 8MHz osc (8MHz) Slow rising power +lilypad_isp: EFUSE = 02 # 512 byte boot +lilypad_isp: isp + +lilypad_resonator: TARGET = lilypad_resonator +lilypad_resonator: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=115200' +lilypad_resonator: AVR_FREQ = 8000000L +lilypad_resonator: $(PROGRAM)_lilypad_resonator.hex +lilypad_resonator: $(PROGRAM)_lilypad_resonator.lst + +lilypad_resonator_isp: lilypad_resonator +lilypad_resonator_isp: TARGET = lilypad_resonator +lilypad_resonator_isp: HFUSE = DD # 2.7V brownout +lilypad_resonator_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms +lilypad_resonator_isp: EFUSE = 02 # 512 byte boot +lilypad_resonator_isp: isp + +pro8: TARGET = pro_8MHz +pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=115200' +pro8: AVR_FREQ = 8000000L +pro8: $(PROGRAM)_pro_8MHz.hex +pro8: $(PROGRAM)_pro_8MHz.lst + +pro8_isp: pro8 +pro8_isp: TARGET = pro_8MHz +pro8_isp: HFUSE = DD # 2.7V brownout +pro8_isp: LFUSE = C6 # Full swing xtal (20MHz) 258CK/14CK+4.1ms +pro8_isp: EFUSE = 02 # 512 byte boot +pro8_isp: isp + +atmega328_pro8: TARGET = atmega328_pro_8MHz +atmega328_pro8: MCU_TARGET = atmega328p +atmega328_pro8: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' +atmega328_pro8: AVR_FREQ = 8000000L +atmega328_pro8: LDSECTION = --section-start=.text=0x7e00 +atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.hex +atmega328_pro8: $(PROGRAM)_atmega328_pro_8MHz.lst + +atmega328_pro8_isp: atmega328_pro8 +atmega328_pro8_isp: TARGET = atmega328_pro_8MHz +atmega328_pro8_isp: MCU_TARGET = atmega328p +atmega328_pro8_isp: HFUSE = DE # 512 byte boot +atmega328_pro8_isp: LFUSE = FF # Low power xtal (16MHz) 16KCK/14CK+65ms +atmega328_pro8_isp: EFUSE = 05 # 2.7V brownout +atmega328_pro8_isp: isp + +# 1MHz clocked platforms +# +# These are capable of 9600 baud +# + +luminet: TARGET = luminet +luminet: MCU_TARGET = attiny84 +luminet: CFLAGS += '-DLED_START_FLASHES=3' '-DSOFT_UART' '-DBAUD_RATE=9600' +luminet: CFLAGS += '-DVIRTUAL_BOOT_PARTITION' +luminet: AVR_FREQ = 1000000L +luminet: LDSECTION = --section-start=.text=0x1d00 +luminet: $(PROGRAM)_luminet.hex +luminet: $(PROGRAM)_luminet.lst + +luminet_isp: luminet +luminet_isp: TARGET = luminet +luminet_isp: MCU_TARGET = attiny84 +luminet_isp: HFUSE = DF # Brownout disabled +luminet_isp: LFUSE = 62 # 1MHz internal oscillator, slowly rising power +luminet_isp: EFUSE = FE # Self-programming enable +luminet_isp: isp + +isp: $(TARGET) + $(ISPFUSES) + $(ISPFLASH) + +isp-stk500: $(PROGRAM)_$(TARGET).hex + $(STK500-1) + $(STK500-2) + +%.elf: $(OBJ) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +clean: + rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex + +%.lst: %.elf + $(OBJDUMP) -h -S $< > $@ + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +%.srec: %.elf + $(OBJCOPY) -j .text -j .data -O srec $< $@ + +%.bin: %.elf + $(OBJCOPY) -j .text -j .data -O binary $< $@ diff --git a/test/ardmake/hardware/bootloaders/optiboot/makeall b/test/ardmake/hardware/bootloaders/optiboot/makeall new file mode 100644 index 0000000..7a0b82d --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/makeall @@ -0,0 +1,13 @@ +#!/bin/bash +make clean +make lilypad +make lilypad_resonator +make pro8 +make pro16 +make pro20 +make diecimila +make ng +make atmega328 +make atmega328_pro8 +make luminet + diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot.c b/test/ardmake/hardware/bootloaders/optiboot/optiboot.c new file mode 100644 index 0000000..af92995 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot.c @@ -0,0 +1,536 @@ +/**********************************************************/ +/* Optiboot bootloader for Arduino */ +/* */ +/* Heavily optimised bootloader that is faster and */ +/* smaller than the Arduino standard bootloader */ +/* */ +/* Enhancements: */ +/* Fits in 512 bytes, saving 1.5K of code space */ +/* Background page erasing speeds up programming */ +/* Higher baud rate speeds up programming */ +/* Written almost entirely in C */ +/* Customisable timeout with accurate timeconstant */ +/* */ +/* What you lose: */ +/* Implements a skeleton STK500 protocol which is */ +/* missing several features including EEPROM */ +/* programming and non-page-aligned writes */ +/* High baud rate breaks compatibility with standard */ +/* Arduino flash settings */ +/* */ +/* Currently supports: */ +/* ATmega168 based devices (Diecimila etc) */ +/* ATmega328P based devices (Duemilanove etc) */ +/* */ +/* Does not support: */ +/* ATmega1280 based devices (eg. Mega) */ +/* */ +/* Assumptions: */ +/* The code makes several assumptions that reduce the */ +/* code size. They are all true after a hardware reset, */ +/* but may not be true if the bootloader is called by */ +/* other means or on other hardware. */ +/* No interrupts can occur */ +/* UART and Timer 1 are set to their reset state */ +/* SP points to RAMEND */ +/* */ +/* Code builds on code, libraries and optimisations from: */ +/* stk500boot.c by Jason P. Kyle */ +/* Arduino bootloader http://arduino.cc */ +/* Spiff's 1K bootloader http://spiffie.org/know/arduino_1k_bootloader/bootloader.shtml */ +/* avr-libc project http://nongnu.org/avr-libc */ +/* Adaboot http://www.ladyada.net/library/arduino/bootloader.html */ +/* AVR305 Atmel Application Note */ +/* */ +/* This program is free software; you can redistribute it */ +/* and/or modify it under the terms of the GNU General */ +/* Public License as published by the Free Software */ +/* Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will */ +/* be useful, but WITHOUT ANY WARRANTY; without even the */ +/* implied warranty of MERCHANTABILITY or FITNESS FOR A */ +/* PARTICULAR PURPOSE. See the GNU General Public */ +/* License for more details. */ +/* */ +/* You should have received a copy of the GNU General */ +/* Public License along with this program; if not, write */ +/* to the Free Software Foundation, Inc., */ +/* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* Licence can be viewed at */ +/* http://www.fsf.org/licenses/gpl.txt */ +/* */ +/**********************************************************/ + +#include +#include +#include +#include + +//#define LED_DATA_FLASH + +#ifndef LED_START_FLASHES +#define LED_START_FLASHES 0 +#endif + +/* Build-time variables */ +/* BAUD_RATE Programming baud rate */ +/* LED_NO_FLASHES Number of LED flashes on boot */ +/* FLASH_TIME_MS Duration of each LED flash */ +/* BOOT_TIMEOUT_MS Serial port wait time before exiting bootloader */ + +/* set the UART baud rate */ +#ifndef BAUD_RATE +#define BAUD_RATE 19200 +#endif + +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) +/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */ +#define LED_DDR DDRB +#define LED_PORT PORTB +#define LED_PIN PINB +#define LED PINB5 + +/* Ports for soft UART */ +#ifdef SOFT_UART +#define UART_PORT PORTD +#define UART_PIN PIND +#define UART_DDR DDRD +#define UART_TX_BIT 1 +#define UART_RX_BIT 0 +#endif +#endif + +#if defined(__AVR_ATtiny84__) +/* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */ +#define LED_DDR DDRA +#define LED_PORT PORTA +#define LED_PIN PINA +#define LED PINA4 + +/* Ports for soft UART - left port only for now*/ +#ifdef SOFT_UART +#define UART_PORT PORTA +#define UART_PIN PINA +#define UART_DDR DDRA +#define UART_TX_BIT 2 +#define UART_RX_BIT 3 +#endif +#endif + +/* STK500 constants list, from AVRDUDE */ +#define STK_OK 0x10 +#define STK_FAILED 0x11 // Not used +#define STK_UNKNOWN 0x12 // Not used +#define STK_NODEVICE 0x13 // Not used +#define STK_INSYNC 0x14 // ' ' +#define STK_NOSYNC 0x15 // Not used +#define ADC_CHANNEL_ERROR 0x16 // Not used +#define ADC_MEASURE_OK 0x17 // Not used +#define PWM_CHANNEL_ERROR 0x18 // Not used +#define PWM_ADJUST_OK 0x19 // Not used +#define CRC_EOP 0x20 // 'SPACE' +#define STK_GET_SYNC 0x30 // '0' +#define STK_GET_SIGN_ON 0x31 // '1' +#define STK_SET_PARAMETER 0x40 // '@' +#define STK_GET_PARAMETER 0x41 // 'A' +#define STK_SET_DEVICE 0x42 // 'B' +#define STK_SET_DEVICE_EXT 0x45 // 'E' +#define STK_ENTER_PROGMODE 0x50 // 'P' +#define STK_LEAVE_PROGMODE 0x51 // 'Q' +#define STK_CHIP_ERASE 0x52 // 'R' +#define STK_CHECK_AUTOINC 0x53 // 'S' +#define STK_LOAD_ADDRESS 0x55 // 'U' +#define STK_UNIVERSAL 0x56 // 'V' +#define STK_PROG_FLASH 0x60 // '`' +#define STK_PROG_DATA 0x61 // 'a' +#define STK_PROG_FUSE 0x62 // 'b' +#define STK_PROG_LOCK 0x63 // 'c' +#define STK_PROG_PAGE 0x64 // 'd' +#define STK_PROG_FUSE_EXT 0x65 // 'e' +#define STK_READ_FLASH 0x70 // 'p' +#define STK_READ_DATA 0x71 // 'q' +#define STK_READ_FUSE 0x72 // 'r' +#define STK_READ_LOCK 0x73 // 's' +#define STK_READ_PAGE 0x74 // 't' +#define STK_READ_SIGN 0x75 // 'u' +#define STK_READ_OSCCAL 0x76 // 'v' +#define STK_READ_FUSE_EXT 0x77 // 'w' +#define STK_READ_OSCCAL_EXT 0x78 // 'x' + +/* Watchdog settings */ +#define WATCHDOG_OFF (0) +#define WATCHDOG_16MS (_BV(WDE)) +#define WATCHDOG_32MS (_BV(WDP0) | _BV(WDE)) +#define WATCHDOG_64MS (_BV(WDP1) | _BV(WDE)) +#define WATCHDOG_125MS (_BV(WDP1) | _BV(WDP0) | _BV(WDE)) +#define WATCHDOG_250MS (_BV(WDP2) | _BV(WDE)) +#define WATCHDOG_500MS (_BV(WDP2) | _BV(WDP0) | _BV(WDE)) +#define WATCHDOG_1S (_BV(WDP2) | _BV(WDP1) | _BV(WDE)) +#define WATCHDOG_2S (_BV(WDP2) | _BV(WDP1) | _BV(WDP0) | _BV(WDE)) +#define WATCHDOG_4S (_BV(WDE3) | _BV(WDE)) +#define WATCHDOG_8S (_BV(WDE3) | _BV(WDE0) | _BV(WDE)) + +/* Function Prototypes */ +/* The main function is in init9, which removes the interrupt vector table */ +/* we don't need. It is also 'naked', which means the compiler does not */ +/* generate any entry or exit code itself. */ +int main(void) __attribute__ ((naked)) __attribute__ ((section (".init9"))); +void putch(char); +uint8_t getch(void); +static inline void getNch(uint8_t); /* "static inline" is a compiler hint to reduce code size */ +void verifySpace(); +static inline void flash_led(uint8_t); +uint8_t getLen(); +static inline void watchdogReset(); +void watchdogConfig(uint8_t x); +#ifdef SOFT_UART +void uartDelay() __attribute__ ((naked)); +#endif +void appStart() __attribute__ ((naked)); + +/* C zero initialises all global variables. However, that requires */ +/* These definitions are NOT zero initialised, but that doesn't matter */ +/* This allows us to drop the zero init code, saving us memory */ +#define buff ((uint8_t*)(0x100)) +#define address (*(uint16_t*)(0x200)) +#define length (*(uint8_t*)(0x202)) +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + // After the zero init loop, this is the first code to run. + // + // This code makes the following assumptions: + // No interrupts will execute + // SP points to RAMEND + // r1 contains zero + // + // If not, uncomment the following instructions: + // cli(); + // SP=RAMEND; // This is done by hardware reset + // asm volatile ("clr __zero_reg__"); + + uint8_t ch; + +#if LED_START_FLASHES > 0 + // Set up Timer 1 for timeout counter + TCCR1B = _BV(CS12) | _BV(CS10); // div 1024 +#endif +#ifndef SOFT_UART + UCSR0A = _BV(U2X0); //Double speed mode USART0 + UCSR0B = _BV(RXEN0) | _BV(TXEN0); + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); +#endif + + // Adaboot no-wait mod + ch = MCUSR; + MCUSR = 0; + if (!(ch & _BV(EXTRF))) appStart(); + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + +#ifdef SOFT_UART + /* Set TX pin as output */ + UART_DDR |= _BV(UART_TX_BIT); +#endif + +#if LED_START_FLASHES > 0 + /* Flash onboard LED to signal entering of bootloader */ + flash_led(LED_START_FLASHES * 2); +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + putch(0x03); + } + else if(ch == STK_SET_DEVICE) { + // SET DEVICE is ignored + getNch(20); + } + else if(ch == STK_SET_DEVICE_EXT) { + // SET DEVICE EXT is ignored + getNch(5); + } + else if(ch == STK_LOAD_ADDRESS) { + // LOAD ADDRESS + address = getch(); + address = (address & 0xff) | (getch() << 8); + address += address; // Convert from word address to byte address + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + // UNIVERSAL command is ignored + getNch(4); + putch(0x00); + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + while (--length); + + // Read command terminator, start reply + verifySpace(); + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + +#ifdef VIRTUAL_BOOT_PARTITION + if ((uint16_t)(void*)address == 0) { + // This is the reset vector page. We need to live-patch the code so the + // bootloader runs. + // + // Move RESET vector to WDT vector + uint16_t vect = buff[0] | (buff[1]<<8); + rstVect = vect; + wdtVect = buff[10] | (buff[11]<<8); + vect -= 4; // Instruction is a relative jump (rjmp), so recalculate. + buff[10] = vect & 0xff; + buff[11] = vect >> 8; + + // Add jump to bootloader at RESET vector + buff[0] = 0x7f; + buff[1] = 0xce; // rjmp 0x1d00 instruction + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + // READ PAGE - we only read flash + getLen(); + verifySpace(); +#ifdef VIRTUAL_BOOT_PARTITION + do { + // Undo vector patch in bottom page so verify passes + if (address == 0) ch=rstVect & 0xff; + else if (address == 1) ch=rstVect >> 8; + else if (address == 10) ch=wdtVect & 0xff; + else if (address == 11) ch=wdtVect >> 8; + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + while (--length); +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + putch(SIGNATURE_0); + putch(SIGNATURE_1); + putch(SIGNATURE_2); + } + else if (ch == 'Q') { + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + } + putch(STK_OK); + } +} + +void putch(char ch) { +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + __asm__ __volatile__ ( + " com %[ch]\n" // ones complement, carry set + " sec\n" + "1: brcc 2f\n" + " cbi %[uartPort],%[uartBit]\n" + " rjmp 3f\n" + "2: sbi %[uartPort],%[uartBit]\n" + " nop\n" + "3: rcall uartDelay\n" + " rcall uartDelay\n" + " lsr %[ch]\n" + " dec %[bitcnt]\n" + " brne 1b\n" + : + : + [bitcnt] "d" (10), + [ch] "r" (ch), + [uartPort] "I" (_SFR_IO_ADDR(UART_PORT)), + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + +uint8_t getch(void) { + uint8_t ch; + + watchdogReset(); + +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + +#ifdef SOFT_UART + __asm__ __volatile__ ( + "1: sbic %[uartPin],%[uartBit]\n" // Wait for start edge + " rjmp 1b\n" + " rcall uartDelay\n" // Get to middle of start bit + "2: rcall uartDelay\n" // Wait 1 bit period + " rcall uartDelay\n" // Wait 1 bit period + " clc\n" + " sbic %[uartPin],%[uartBit]\n" + " sec\n" + " dec %[bitCnt]\n" + " breq 3f\n" + " ror %[ch]\n" + " rjmp 2b\n" + "3:\n" + : + [ch] "=r" (ch) + : + [bitCnt] "d" (9), + [uartPin] "I" (_SFR_IO_ADDR(UART_PIN)), + [uartBit] "I" (UART_RX_BIT) + : + "r25" +); +#else + while(!(UCSR0A & _BV(RXC0))); + ch = UDR0; +#endif + +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + +#ifdef SOFT_UART +//#define UART_B_VALUE (((F_CPU/BAUD_RATE)-23)/6) +#define UART_B_VALUE (((F_CPU/BAUD_RATE)-20)/6) +#if UART_B_VALUE > 255 +#error Baud rate too slow for soft UART +#endif + +void uartDelay() { + __asm__ __volatile__ ( + "ldi r25,%[count]\n" + "1:dec r25\n" + "brne 1b\n" + "ret\n" + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + putch(STK_INSYNC); +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + length = getch(); + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + WDTCSR = x; +} + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + __asm__ __volatile__ ( +#ifdef VIRTUAL_BOOT_PARTITION + // Jump to WDT vector + "ldi r30,5\n" + "clr r31\n" +#else + // Jump to RST vector + "clr r30\n" + "clr r31\n" +#endif + "ijmp\n" + ); +} diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.hex new file mode 100644 index 0000000..b1c8567 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.hex @@ -0,0 +1,33 @@ +:107E000085E08093810082E08093C00088E18093C8 +:107E1000C10086E08093C20080E18093C40084B7F3 +:107E200014BE81FFD0D08DE0C8D0259A86E020E333 +:107E30003CEF91E0309385002093840096BBB09B8B +:107E4000FECF1D9AA8958150A9F7DD24D394A5E013 +:107E5000EA2EF1E1FF2EA4D0813421F481E0BED0DE +:107E600083E024C0823411F484E103C0853419F422 +:107E700085E0B4D08AC08535A1F492D0082F10E0F7 +:107E800010930102009300028BD090E0982F882776 +:107E9000802B912B880F991F9093010280930002F1 +:107EA00073C0863529F484E099D080E071D06DC02C +:107EB000843609F043C07CD0E0910002F0910102C9 +:107EC00083E080935700E895C0E0D1E069D08993C2 +:107ED000809102028150809302028823B9F778D002 +:107EE00007B600FCFDCF4091000250910102A0E0D6 +:107EF000B1E02C9130E011968C91119790E0982F81 +:107F00008827822B932B1296FA010C01D0925700EE +:107F1000E89511244E5F5F4FF1E0A038BF0749F7A5 +:107F2000E0910002F0910102E0925700E89507B657 +:107F300000FCFDCFF0925700E89527C08437B9F4D4 +:107F400037D046D0E0910002F09101023196F093D3 +:107F50000102E09300023197E4918E2F19D08091B5 +:107F60000202815080930202882361F70EC0853798 +:107F700039F42ED08EE10CD085E90AD08FE096CF6F +:107F8000813511F488E019D023D080E101D063CF8E +:107F9000982F8091C00085FFFCCF9093C600089574 +:107FA000A8958091C00087FFFCCF8091C6000895FE +:107FB000F7DFF6DF80930202F3CFE0E6F0E098E12E +:107FC00090838083089580E0F8DFEE27FF270994EF +:107FD000E7DF803209F0F7DF84E1DACF1F93182F53 +:0C7FE000DFDF1150E9F7F4DF1F91089576 +:0400000300007E007B +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.lst new file mode 100644 index 0000000..888871d --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328.lst @@ -0,0 +1,520 @@ + +optiboot_atmega328.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001ec 00007e00 00007e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000240 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 0000006a 00000000 00000000 00000268 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000269 00000000 00000000 000002d2 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000196 00000000 00000000 0000053b 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003d3 00000000 00000000 000006d1 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 00000090 00000000 00000000 00000aa4 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 00000135 00000000 00000000 00000b34 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001d1 00000000 00000000 00000c69 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000068 00000000 00000000 00000e3a 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00007e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 7e00: 85 e0 ldi r24, 0x05 ; 5 + 7e02: 80 93 81 00 sts 0x0081, r24 +#if LED_START_FLASHES > 0 + // Set up Timer 1 for timeout counter + TCCR1B = _BV(CS12) | _BV(CS10); // div 1024 +#endif +#ifndef SOFT_UART + UCSR0A = _BV(U2X0); //Double speed mode USART0 + 7e06: 82 e0 ldi r24, 0x02 ; 2 + 7e08: 80 93 c0 00 sts 0x00C0, r24 + UCSR0B = _BV(RXEN0) | _BV(TXEN0); + 7e0c: 88 e1 ldi r24, 0x18 ; 24 + 7e0e: 80 93 c1 00 sts 0x00C1, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + 7e12: 86 e0 ldi r24, 0x06 ; 6 + 7e14: 80 93 c2 00 sts 0x00C2, r24 + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); + 7e18: 80 e1 ldi r24, 0x10 ; 16 + 7e1a: 80 93 c4 00 sts 0x00C4, r24 +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 7e1e: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 7e20: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 7e22: 81 ff sbrs r24, 1 + 7e24: d0 d0 rcall .+416 ; 0x7fc6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 7e26: 8d e0 ldi r24, 0x0D ; 13 + 7e28: c8 d0 rcall .+400 ; 0x7fba + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 7e2a: 25 9a sbi 0x04, 5 ; 4 + 7e2c: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 7e2e: 20 e3 ldi r18, 0x30 ; 48 + 7e30: 3c ef ldi r19, 0xFC ; 252 + TIFR1 = _BV(TOV1); + 7e32: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 7e34: 30 93 85 00 sts 0x0085, r19 + 7e38: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 7e3c: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 7e3e: b0 9b sbis 0x16, 0 ; 22 + 7e40: fe cf rjmp .-4 ; 0x7e3e + LED_PIN |= _BV(LED); + 7e42: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 7e44: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 7e46: 81 50 subi r24, 0x01 ; 1 + 7e48: a9 f7 brne .-22 ; 0x7e34 + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 7e4a: dd 24 eor r13, r13 + 7e4c: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 7e4e: a5 e0 ldi r26, 0x05 ; 5 + 7e50: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 7e52: f1 e1 ldi r31, 0x11 ; 17 + 7e54: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 7e56: a4 d0 rcall .+328 ; 0x7fa0 + + if(ch == STK_GET_PARAMETER) { + 7e58: 81 34 cpi r24, 0x41 ; 65 + 7e5a: 21 f4 brne .+8 ; 0x7e64 + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 7e5c: 81 e0 ldi r24, 0x01 ; 1 + 7e5e: be d0 rcall .+380 ; 0x7fdc + putch(0x03); + 7e60: 83 e0 ldi r24, 0x03 ; 3 + 7e62: 24 c0 rjmp .+72 ; 0x7eac + } + else if(ch == STK_SET_DEVICE) { + 7e64: 82 34 cpi r24, 0x42 ; 66 + 7e66: 11 f4 brne .+4 ; 0x7e6c + // SET DEVICE is ignored + getNch(20); + 7e68: 84 e1 ldi r24, 0x14 ; 20 + 7e6a: 03 c0 rjmp .+6 ; 0x7e72 + } + else if(ch == STK_SET_DEVICE_EXT) { + 7e6c: 85 34 cpi r24, 0x45 ; 69 + 7e6e: 19 f4 brne .+6 ; 0x7e76 + // SET DEVICE EXT is ignored + getNch(5); + 7e70: 85 e0 ldi r24, 0x05 ; 5 + 7e72: b4 d0 rcall .+360 ; 0x7fdc + 7e74: 8a c0 rjmp .+276 ; 0x7f8a + } + else if(ch == STK_LOAD_ADDRESS) { + 7e76: 85 35 cpi r24, 0x55 ; 85 + 7e78: a1 f4 brne .+40 ; 0x7ea2 + // LOAD ADDRESS + address = getch(); + 7e7a: 92 d0 rcall .+292 ; 0x7fa0 + 7e7c: 08 2f mov r16, r24 + 7e7e: 10 e0 ldi r17, 0x00 ; 0 + 7e80: 10 93 01 02 sts 0x0201, r17 + 7e84: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 7e88: 8b d0 rcall .+278 ; 0x7fa0 + 7e8a: 90 e0 ldi r25, 0x00 ; 0 + 7e8c: 98 2f mov r25, r24 + 7e8e: 88 27 eor r24, r24 + 7e90: 80 2b or r24, r16 + 7e92: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 7e94: 88 0f add r24, r24 + 7e96: 99 1f adc r25, r25 + 7e98: 90 93 01 02 sts 0x0201, r25 + 7e9c: 80 93 00 02 sts 0x0200, r24 + 7ea0: 73 c0 rjmp .+230 ; 0x7f88 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 7ea2: 86 35 cpi r24, 0x56 ; 86 + 7ea4: 29 f4 brne .+10 ; 0x7eb0 + // UNIVERSAL command is ignored + getNch(4); + 7ea6: 84 e0 ldi r24, 0x04 ; 4 + 7ea8: 99 d0 rcall .+306 ; 0x7fdc + putch(0x00); + 7eaa: 80 e0 ldi r24, 0x00 ; 0 + 7eac: 71 d0 rcall .+226 ; 0x7f90 + 7eae: 6d c0 rjmp .+218 ; 0x7f8a + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 7eb0: 84 36 cpi r24, 0x64 ; 100 + 7eb2: 09 f0 breq .+2 ; 0x7eb6 + 7eb4: 43 c0 rjmp .+134 ; 0x7f3c + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 7eb6: 7c d0 rcall .+248 ; 0x7fb0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 7eb8: e0 91 00 02 lds r30, 0x0200 + 7ebc: f0 91 01 02 lds r31, 0x0201 + 7ec0: 83 e0 ldi r24, 0x03 ; 3 + 7ec2: 80 93 57 00 sts 0x0057, r24 + 7ec6: e8 95 spm + 7ec8: c0 e0 ldi r28, 0x00 ; 0 + 7eca: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 7ecc: 69 d0 rcall .+210 ; 0x7fa0 + 7ece: 89 93 st Y+, r24 + while (--length); + 7ed0: 80 91 02 02 lds r24, 0x0202 + 7ed4: 81 50 subi r24, 0x01 ; 1 + 7ed6: 80 93 02 02 sts 0x0202, r24 + 7eda: 88 23 and r24, r24 + 7edc: b9 f7 brne .-18 ; 0x7ecc + + // Read command terminator, start reply + verifySpace(); + 7ede: 78 d0 rcall .+240 ; 0x7fd0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 7ee0: 07 b6 in r0, 0x37 ; 55 + 7ee2: 00 fc sbrc r0, 0 + 7ee4: fd cf rjmp .-6 ; 0x7ee0 + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 7ee6: 40 91 00 02 lds r20, 0x0200 + 7eea: 50 91 01 02 lds r21, 0x0201 + 7eee: a0 e0 ldi r26, 0x00 ; 0 + 7ef0: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 7ef2: 2c 91 ld r18, X + 7ef4: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 7ef6: 11 96 adiw r26, 0x01 ; 1 + 7ef8: 8c 91 ld r24, X + 7efa: 11 97 sbiw r26, 0x01 ; 1 + 7efc: 90 e0 ldi r25, 0x00 ; 0 + 7efe: 98 2f mov r25, r24 + 7f00: 88 27 eor r24, r24 + 7f02: 82 2b or r24, r18 + 7f04: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 7f06: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 7f08: fa 01 movw r30, r20 + 7f0a: 0c 01 movw r0, r24 + 7f0c: d0 92 57 00 sts 0x0057, r13 + 7f10: e8 95 spm + 7f12: 11 24 eor r1, r1 + addrPtr += 2; + 7f14: 4e 5f subi r20, 0xFE ; 254 + 7f16: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 7f18: f1 e0 ldi r31, 0x01 ; 1 + 7f1a: a0 38 cpi r26, 0x80 ; 128 + 7f1c: bf 07 cpc r27, r31 + 7f1e: 49 f7 brne .-46 ; 0x7ef2 + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 7f20: e0 91 00 02 lds r30, 0x0200 + 7f24: f0 91 01 02 lds r31, 0x0201 + 7f28: e0 92 57 00 sts 0x0057, r14 + 7f2c: e8 95 spm + boot_spm_busy_wait(); + 7f2e: 07 b6 in r0, 0x37 ; 55 + 7f30: 00 fc sbrc r0, 0 + 7f32: fd cf rjmp .-6 ; 0x7f2e + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 7f34: f0 92 57 00 sts 0x0057, r15 + 7f38: e8 95 spm + 7f3a: 27 c0 rjmp .+78 ; 0x7f8a +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 7f3c: 84 37 cpi r24, 0x74 ; 116 + 7f3e: b9 f4 brne .+46 ; 0x7f6e + // READ PAGE - we only read flash + getLen(); + 7f40: 37 d0 rcall .+110 ; 0x7fb0 + verifySpace(); + 7f42: 46 d0 rcall .+140 ; 0x7fd0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 7f44: e0 91 00 02 lds r30, 0x0200 + 7f48: f0 91 01 02 lds r31, 0x0201 + 7f4c: 31 96 adiw r30, 0x01 ; 1 + 7f4e: f0 93 01 02 sts 0x0201, r31 + 7f52: e0 93 00 02 sts 0x0200, r30 + 7f56: 31 97 sbiw r30, 0x01 ; 1 + 7f58: e4 91 lpm r30, Z+ + 7f5a: 8e 2f mov r24, r30 + 7f5c: 19 d0 rcall .+50 ; 0x7f90 + while (--length); + 7f5e: 80 91 02 02 lds r24, 0x0202 + 7f62: 81 50 subi r24, 0x01 ; 1 + 7f64: 80 93 02 02 sts 0x0202, r24 + 7f68: 88 23 and r24, r24 + 7f6a: 61 f7 brne .-40 ; 0x7f44 + 7f6c: 0e c0 rjmp .+28 ; 0x7f8a +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 7f6e: 85 37 cpi r24, 0x75 ; 117 + 7f70: 39 f4 brne .+14 ; 0x7f80 + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 7f72: 2e d0 rcall .+92 ; 0x7fd0 + putch(SIGNATURE_0); + 7f74: 8e e1 ldi r24, 0x1E ; 30 + 7f76: 0c d0 rcall .+24 ; 0x7f90 + putch(SIGNATURE_1); + 7f78: 85 e9 ldi r24, 0x95 ; 149 + 7f7a: 0a d0 rcall .+20 ; 0x7f90 + putch(SIGNATURE_2); + 7f7c: 8f e0 ldi r24, 0x0F ; 15 + 7f7e: 96 cf rjmp .-212 ; 0x7eac + } + else if (ch == 'Q') { + 7f80: 81 35 cpi r24, 0x51 ; 81 + 7f82: 11 f4 brne .+4 ; 0x7f88 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 7f84: 88 e0 ldi r24, 0x08 ; 8 + 7f86: 19 d0 rcall .+50 ; 0x7fba + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 7f88: 23 d0 rcall .+70 ; 0x7fd0 + } + putch(STK_OK); + 7f8a: 80 e1 ldi r24, 0x10 ; 16 + 7f8c: 01 d0 rcall .+2 ; 0x7f90 + 7f8e: 63 cf rjmp .-314 ; 0x7e56 + +00007f90 : + } +} + +void putch(char ch) { + 7f90: 98 2f mov r25, r24 +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + 7f92: 80 91 c0 00 lds r24, 0x00C0 + 7f96: 85 ff sbrs r24, 5 + 7f98: fc cf rjmp .-8 ; 0x7f92 + UDR0 = ch; + 7f9a: 90 93 c6 00 sts 0x00C6, r25 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 7f9e: 08 95 ret + +00007fa0 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 7fa0: a8 95 wdr + [uartBit] "I" (UART_RX_BIT) + : + "r25" +); +#else + while(!(UCSR0A & _BV(RXC0))); + 7fa2: 80 91 c0 00 lds r24, 0x00C0 + 7fa6: 87 ff sbrs r24, 7 + 7fa8: fc cf rjmp .-8 ; 0x7fa2 + ch = UDR0; + 7faa: 80 91 c6 00 lds r24, 0x00C6 +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 7fae: 08 95 ret + +00007fb0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 7fb0: f7 df rcall .-18 ; 0x7fa0 + length = getch(); + 7fb2: f6 df rcall .-20 ; 0x7fa0 + 7fb4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 7fb8: f3 cf rjmp .-26 ; 0x7fa0 + +00007fba : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 7fba: e0 e6 ldi r30, 0x60 ; 96 + 7fbc: f0 e0 ldi r31, 0x00 ; 0 + 7fbe: 98 e1 ldi r25, 0x18 ; 24 + 7fc0: 90 83 st Z, r25 + WDTCSR = x; + 7fc2: 80 83 st Z, r24 +} + 7fc4: 08 95 ret + +00007fc6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 7fc6: 80 e0 ldi r24, 0x00 ; 0 + 7fc8: f8 df rcall .-16 ; 0x7fba + __asm__ __volatile__ ( + 7fca: ee 27 eor r30, r30 + 7fcc: ff 27 eor r31, r31 + 7fce: 09 94 ijmp + +00007fd0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 7fd0: e7 df rcall .-50 ; 0x7fa0 + 7fd2: 80 32 cpi r24, 0x20 ; 32 + 7fd4: 09 f0 breq .+2 ; 0x7fd8 + 7fd6: f7 df rcall .-18 ; 0x7fc6 + putch(STK_INSYNC); + 7fd8: 84 e1 ldi r24, 0x14 ; 20 +} + 7fda: da cf rjmp .-76 ; 0x7f90 + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 7fdc: 1f 93 push r17 + 7fde: 18 2f mov r17, r24 + +00007fe0 : + do getch(); while (--count); + 7fe0: df df rcall .-66 ; 0x7fa0 + 7fe2: 11 50 subi r17, 0x01 ; 1 + 7fe4: e9 f7 brne .-6 ; 0x7fe0 + verifySpace(); + 7fe6: f4 df rcall .-24 ; 0x7fd0 +} + 7fe8: 1f 91 pop r17 + 7fea: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.hex new file mode 100644 index 0000000..d6ac145 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.hex @@ -0,0 +1,33 @@ +:107E000085E08093810082E08093C00088E18093C8 +:107E1000C10086E08093C20088E08093C40084B7EC +:107E200014BE81FFD0D08DE0C8D0259A86E028E12D +:107E30003EEF91E0309385002093840096BBB09B89 +:107E4000FECF1D9AA8958150A9F7DD24D394A5E013 +:107E5000EA2EF1E1FF2EA4D0813421F481E0BED0DE +:107E600083E024C0823411F484E103C0853419F422 +:107E700085E0B4D08AC08535A1F492D0082F10E0F7 +:107E800010930102009300028BD090E0982F882776 +:107E9000802B912B880F991F9093010280930002F1 +:107EA00073C0863529F484E099D080E071D06DC02C +:107EB000843609F043C07CD0E0910002F0910102C9 +:107EC00083E080935700E895C0E0D1E069D08993C2 +:107ED000809102028150809302028823B9F778D002 +:107EE00007B600FCFDCF4091000250910102A0E0D6 +:107EF000B1E02C9130E011968C91119790E0982F81 +:107F00008827822B932B1296FA010C01D0925700EE +:107F1000E89511244E5F5F4FF1E0A038BF0749F7A5 +:107F2000E0910002F0910102E0925700E89507B657 +:107F300000FCFDCFF0925700E89527C08437B9F4D4 +:107F400037D046D0E0910002F09101023196F093D3 +:107F50000102E09300023197E4918E2F19D08091B5 +:107F60000202815080930202882361F70EC0853798 +:107F700039F42ED08EE10CD085E90AD08FE096CF6F +:107F8000813511F488E019D023D080E101D063CF8E +:107F9000982F8091C00085FFFCCF9093C600089574 +:107FA000A8958091C00087FFFCCF8091C6000895FE +:107FB000F7DFF6DF80930202F3CFE0E6F0E098E12E +:107FC00090838083089580E0F8DFEE27FF270994EF +:107FD000E7DF803209F0F7DF84E1DACF1F93182F53 +:0C7FE000DFDF1150E9F7F4DF1F91089576 +:0400000300007E007B +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.lst new file mode 100644 index 0000000..46eda68 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.lst @@ -0,0 +1,520 @@ + +optiboot_atmega328_pro_8MHz.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001ec 00007e00 00007e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000240 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 0000006a 00000000 00000000 00000268 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000269 00000000 00000000 000002d2 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000196 00000000 00000000 0000053b 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003d3 00000000 00000000 000006d1 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 00000090 00000000 00000000 00000aa4 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 00000135 00000000 00000000 00000b34 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001d1 00000000 00000000 00000c69 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000068 00000000 00000000 00000e3a 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00007e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 7e00: 85 e0 ldi r24, 0x05 ; 5 + 7e02: 80 93 81 00 sts 0x0081, r24 +#if LED_START_FLASHES > 0 + // Set up Timer 1 for timeout counter + TCCR1B = _BV(CS12) | _BV(CS10); // div 1024 +#endif +#ifndef SOFT_UART + UCSR0A = _BV(U2X0); //Double speed mode USART0 + 7e06: 82 e0 ldi r24, 0x02 ; 2 + 7e08: 80 93 c0 00 sts 0x00C0, r24 + UCSR0B = _BV(RXEN0) | _BV(TXEN0); + 7e0c: 88 e1 ldi r24, 0x18 ; 24 + 7e0e: 80 93 c1 00 sts 0x00C1, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + 7e12: 86 e0 ldi r24, 0x06 ; 6 + 7e14: 80 93 c2 00 sts 0x00C2, r24 + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); + 7e18: 88 e0 ldi r24, 0x08 ; 8 + 7e1a: 80 93 c4 00 sts 0x00C4, r24 +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 7e1e: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 7e20: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 7e22: 81 ff sbrs r24, 1 + 7e24: d0 d0 rcall .+416 ; 0x7fc6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 7e26: 8d e0 ldi r24, 0x0D ; 13 + 7e28: c8 d0 rcall .+400 ; 0x7fba + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 7e2a: 25 9a sbi 0x04, 5 ; 4 + 7e2c: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 7e2e: 28 e1 ldi r18, 0x18 ; 24 + 7e30: 3e ef ldi r19, 0xFE ; 254 + TIFR1 = _BV(TOV1); + 7e32: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 7e34: 30 93 85 00 sts 0x0085, r19 + 7e38: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 7e3c: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 7e3e: b0 9b sbis 0x16, 0 ; 22 + 7e40: fe cf rjmp .-4 ; 0x7e3e + LED_PIN |= _BV(LED); + 7e42: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 7e44: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 7e46: 81 50 subi r24, 0x01 ; 1 + 7e48: a9 f7 brne .-22 ; 0x7e34 + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 7e4a: dd 24 eor r13, r13 + 7e4c: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 7e4e: a5 e0 ldi r26, 0x05 ; 5 + 7e50: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 7e52: f1 e1 ldi r31, 0x11 ; 17 + 7e54: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 7e56: a4 d0 rcall .+328 ; 0x7fa0 + + if(ch == STK_GET_PARAMETER) { + 7e58: 81 34 cpi r24, 0x41 ; 65 + 7e5a: 21 f4 brne .+8 ; 0x7e64 + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 7e5c: 81 e0 ldi r24, 0x01 ; 1 + 7e5e: be d0 rcall .+380 ; 0x7fdc + putch(0x03); + 7e60: 83 e0 ldi r24, 0x03 ; 3 + 7e62: 24 c0 rjmp .+72 ; 0x7eac + } + else if(ch == STK_SET_DEVICE) { + 7e64: 82 34 cpi r24, 0x42 ; 66 + 7e66: 11 f4 brne .+4 ; 0x7e6c + // SET DEVICE is ignored + getNch(20); + 7e68: 84 e1 ldi r24, 0x14 ; 20 + 7e6a: 03 c0 rjmp .+6 ; 0x7e72 + } + else if(ch == STK_SET_DEVICE_EXT) { + 7e6c: 85 34 cpi r24, 0x45 ; 69 + 7e6e: 19 f4 brne .+6 ; 0x7e76 + // SET DEVICE EXT is ignored + getNch(5); + 7e70: 85 e0 ldi r24, 0x05 ; 5 + 7e72: b4 d0 rcall .+360 ; 0x7fdc + 7e74: 8a c0 rjmp .+276 ; 0x7f8a + } + else if(ch == STK_LOAD_ADDRESS) { + 7e76: 85 35 cpi r24, 0x55 ; 85 + 7e78: a1 f4 brne .+40 ; 0x7ea2 + // LOAD ADDRESS + address = getch(); + 7e7a: 92 d0 rcall .+292 ; 0x7fa0 + 7e7c: 08 2f mov r16, r24 + 7e7e: 10 e0 ldi r17, 0x00 ; 0 + 7e80: 10 93 01 02 sts 0x0201, r17 + 7e84: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 7e88: 8b d0 rcall .+278 ; 0x7fa0 + 7e8a: 90 e0 ldi r25, 0x00 ; 0 + 7e8c: 98 2f mov r25, r24 + 7e8e: 88 27 eor r24, r24 + 7e90: 80 2b or r24, r16 + 7e92: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 7e94: 88 0f add r24, r24 + 7e96: 99 1f adc r25, r25 + 7e98: 90 93 01 02 sts 0x0201, r25 + 7e9c: 80 93 00 02 sts 0x0200, r24 + 7ea0: 73 c0 rjmp .+230 ; 0x7f88 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 7ea2: 86 35 cpi r24, 0x56 ; 86 + 7ea4: 29 f4 brne .+10 ; 0x7eb0 + // UNIVERSAL command is ignored + getNch(4); + 7ea6: 84 e0 ldi r24, 0x04 ; 4 + 7ea8: 99 d0 rcall .+306 ; 0x7fdc + putch(0x00); + 7eaa: 80 e0 ldi r24, 0x00 ; 0 + 7eac: 71 d0 rcall .+226 ; 0x7f90 + 7eae: 6d c0 rjmp .+218 ; 0x7f8a + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 7eb0: 84 36 cpi r24, 0x64 ; 100 + 7eb2: 09 f0 breq .+2 ; 0x7eb6 + 7eb4: 43 c0 rjmp .+134 ; 0x7f3c + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 7eb6: 7c d0 rcall .+248 ; 0x7fb0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 7eb8: e0 91 00 02 lds r30, 0x0200 + 7ebc: f0 91 01 02 lds r31, 0x0201 + 7ec0: 83 e0 ldi r24, 0x03 ; 3 + 7ec2: 80 93 57 00 sts 0x0057, r24 + 7ec6: e8 95 spm + 7ec8: c0 e0 ldi r28, 0x00 ; 0 + 7eca: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 7ecc: 69 d0 rcall .+210 ; 0x7fa0 + 7ece: 89 93 st Y+, r24 + while (--length); + 7ed0: 80 91 02 02 lds r24, 0x0202 + 7ed4: 81 50 subi r24, 0x01 ; 1 + 7ed6: 80 93 02 02 sts 0x0202, r24 + 7eda: 88 23 and r24, r24 + 7edc: b9 f7 brne .-18 ; 0x7ecc + + // Read command terminator, start reply + verifySpace(); + 7ede: 78 d0 rcall .+240 ; 0x7fd0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 7ee0: 07 b6 in r0, 0x37 ; 55 + 7ee2: 00 fc sbrc r0, 0 + 7ee4: fd cf rjmp .-6 ; 0x7ee0 + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 7ee6: 40 91 00 02 lds r20, 0x0200 + 7eea: 50 91 01 02 lds r21, 0x0201 + 7eee: a0 e0 ldi r26, 0x00 ; 0 + 7ef0: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 7ef2: 2c 91 ld r18, X + 7ef4: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 7ef6: 11 96 adiw r26, 0x01 ; 1 + 7ef8: 8c 91 ld r24, X + 7efa: 11 97 sbiw r26, 0x01 ; 1 + 7efc: 90 e0 ldi r25, 0x00 ; 0 + 7efe: 98 2f mov r25, r24 + 7f00: 88 27 eor r24, r24 + 7f02: 82 2b or r24, r18 + 7f04: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 7f06: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 7f08: fa 01 movw r30, r20 + 7f0a: 0c 01 movw r0, r24 + 7f0c: d0 92 57 00 sts 0x0057, r13 + 7f10: e8 95 spm + 7f12: 11 24 eor r1, r1 + addrPtr += 2; + 7f14: 4e 5f subi r20, 0xFE ; 254 + 7f16: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 7f18: f1 e0 ldi r31, 0x01 ; 1 + 7f1a: a0 38 cpi r26, 0x80 ; 128 + 7f1c: bf 07 cpc r27, r31 + 7f1e: 49 f7 brne .-46 ; 0x7ef2 + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 7f20: e0 91 00 02 lds r30, 0x0200 + 7f24: f0 91 01 02 lds r31, 0x0201 + 7f28: e0 92 57 00 sts 0x0057, r14 + 7f2c: e8 95 spm + boot_spm_busy_wait(); + 7f2e: 07 b6 in r0, 0x37 ; 55 + 7f30: 00 fc sbrc r0, 0 + 7f32: fd cf rjmp .-6 ; 0x7f2e + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 7f34: f0 92 57 00 sts 0x0057, r15 + 7f38: e8 95 spm + 7f3a: 27 c0 rjmp .+78 ; 0x7f8a +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 7f3c: 84 37 cpi r24, 0x74 ; 116 + 7f3e: b9 f4 brne .+46 ; 0x7f6e + // READ PAGE - we only read flash + getLen(); + 7f40: 37 d0 rcall .+110 ; 0x7fb0 + verifySpace(); + 7f42: 46 d0 rcall .+140 ; 0x7fd0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 7f44: e0 91 00 02 lds r30, 0x0200 + 7f48: f0 91 01 02 lds r31, 0x0201 + 7f4c: 31 96 adiw r30, 0x01 ; 1 + 7f4e: f0 93 01 02 sts 0x0201, r31 + 7f52: e0 93 00 02 sts 0x0200, r30 + 7f56: 31 97 sbiw r30, 0x01 ; 1 + 7f58: e4 91 lpm r30, Z+ + 7f5a: 8e 2f mov r24, r30 + 7f5c: 19 d0 rcall .+50 ; 0x7f90 + while (--length); + 7f5e: 80 91 02 02 lds r24, 0x0202 + 7f62: 81 50 subi r24, 0x01 ; 1 + 7f64: 80 93 02 02 sts 0x0202, r24 + 7f68: 88 23 and r24, r24 + 7f6a: 61 f7 brne .-40 ; 0x7f44 + 7f6c: 0e c0 rjmp .+28 ; 0x7f8a +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 7f6e: 85 37 cpi r24, 0x75 ; 117 + 7f70: 39 f4 brne .+14 ; 0x7f80 + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 7f72: 2e d0 rcall .+92 ; 0x7fd0 + putch(SIGNATURE_0); + 7f74: 8e e1 ldi r24, 0x1E ; 30 + 7f76: 0c d0 rcall .+24 ; 0x7f90 + putch(SIGNATURE_1); + 7f78: 85 e9 ldi r24, 0x95 ; 149 + 7f7a: 0a d0 rcall .+20 ; 0x7f90 + putch(SIGNATURE_2); + 7f7c: 8f e0 ldi r24, 0x0F ; 15 + 7f7e: 96 cf rjmp .-212 ; 0x7eac + } + else if (ch == 'Q') { + 7f80: 81 35 cpi r24, 0x51 ; 81 + 7f82: 11 f4 brne .+4 ; 0x7f88 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 7f84: 88 e0 ldi r24, 0x08 ; 8 + 7f86: 19 d0 rcall .+50 ; 0x7fba + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 7f88: 23 d0 rcall .+70 ; 0x7fd0 + } + putch(STK_OK); + 7f8a: 80 e1 ldi r24, 0x10 ; 16 + 7f8c: 01 d0 rcall .+2 ; 0x7f90 + 7f8e: 63 cf rjmp .-314 ; 0x7e56 + +00007f90 : + } +} + +void putch(char ch) { + 7f90: 98 2f mov r25, r24 +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + 7f92: 80 91 c0 00 lds r24, 0x00C0 + 7f96: 85 ff sbrs r24, 5 + 7f98: fc cf rjmp .-8 ; 0x7f92 + UDR0 = ch; + 7f9a: 90 93 c6 00 sts 0x00C6, r25 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 7f9e: 08 95 ret + +00007fa0 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 7fa0: a8 95 wdr + [uartBit] "I" (UART_RX_BIT) + : + "r25" +); +#else + while(!(UCSR0A & _BV(RXC0))); + 7fa2: 80 91 c0 00 lds r24, 0x00C0 + 7fa6: 87 ff sbrs r24, 7 + 7fa8: fc cf rjmp .-8 ; 0x7fa2 + ch = UDR0; + 7faa: 80 91 c6 00 lds r24, 0x00C6 +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 7fae: 08 95 ret + +00007fb0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 7fb0: f7 df rcall .-18 ; 0x7fa0 + length = getch(); + 7fb2: f6 df rcall .-20 ; 0x7fa0 + 7fb4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 7fb8: f3 cf rjmp .-26 ; 0x7fa0 + +00007fba : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 7fba: e0 e6 ldi r30, 0x60 ; 96 + 7fbc: f0 e0 ldi r31, 0x00 ; 0 + 7fbe: 98 e1 ldi r25, 0x18 ; 24 + 7fc0: 90 83 st Z, r25 + WDTCSR = x; + 7fc2: 80 83 st Z, r24 +} + 7fc4: 08 95 ret + +00007fc6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 7fc6: 80 e0 ldi r24, 0x00 ; 0 + 7fc8: f8 df rcall .-16 ; 0x7fba + __asm__ __volatile__ ( + 7fca: ee 27 eor r30, r30 + 7fcc: ff 27 eor r31, r31 + 7fce: 09 94 ijmp + +00007fd0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 7fd0: e7 df rcall .-50 ; 0x7fa0 + 7fd2: 80 32 cpi r24, 0x20 ; 32 + 7fd4: 09 f0 breq .+2 ; 0x7fd8 + 7fd6: f7 df rcall .-18 ; 0x7fc6 + putch(STK_INSYNC); + 7fd8: 84 e1 ldi r24, 0x14 ; 20 +} + 7fda: da cf rjmp .-76 ; 0x7f90 + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 7fdc: 1f 93 push r17 + 7fde: 18 2f mov r17, r24 + +00007fe0 : + do getch(); while (--count); + 7fe0: df df rcall .-66 ; 0x7fa0 + 7fe2: 11 50 subi r17, 0x01 ; 1 + 7fe4: e9 f7 brne .-6 ; 0x7fe0 + verifySpace(); + 7fe6: f4 df rcall .-24 ; 0x7fd0 +} + 7fe8: 1f 91 pop r17 + 7fea: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.hex new file mode 100644 index 0000000..1e93414 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.hex @@ -0,0 +1,33 @@ +:103E000085E08093810082E08093C00088E1809308 +:103E1000C10086E08093C20080E18093C40084B733 +:103E200014BE81FFD0D08DE0C8D0259A86E020E373 +:103E30003CEF91E0309385002093840096BBB09BCB +:103E4000FECF1D9AA8958150A9F7DD24D394A5E053 +:103E5000EA2EF1E1FF2EA4D0813421F481E0BED01E +:103E600083E024C0823411F484E103C0853419F462 +:103E700085E0B4D08AC08535A1F492D0082F10E037 +:103E800010930102009300028BD090E0982F8827B6 +:103E9000802B912B880F991F909301028093000231 +:103EA00073C0863529F484E099D080E071D06DC06C +:103EB000843609F043C07CD0E0910002F091010209 +:103EC00083E080935700E895C0E0D1E069D0899302 +:103ED000809102028150809302028823B9F778D042 +:103EE00007B600FCFDCF4091000250910102A0E016 +:103EF000B1E02C9130E011968C91119790E0982FC1 +:103F00008827822B932B1296FA010C01D09257002E +:103F1000E89511244E5F5F4FF1E0A038BF0749F7E5 +:103F2000E0910002F0910102E0925700E89507B697 +:103F300000FCFDCFF0925700E89527C08437B9F414 +:103F400037D046D0E0910002F09101023196F09313 +:103F50000102E09300023197E4918E2F19D08091F5 +:103F60000202815080930202882361F70EC08537D8 +:103F700039F42ED08EE10CD084E90AD086E096CFB9 +:103F8000813511F488E019D023D080E101D063CFCE +:103F9000982F8091C00085FFFCCF9093C6000895B4 +:103FA000A8958091C00087FFFCCF8091C60008953E +:103FB000F7DFF6DF80930202F3CFE0E6F0E098E16E +:103FC00090838083089580E0F8DFEE27FF2709942F +:103FD000E7DF803209F0F7DF84E1DACF1F93182F93 +:0C3FE000DFDF1150E9F7F4DF1F910895B6 +:0400000300003E00BB +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.lst new file mode 100644 index 0000000..1121893 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_diecimila.lst @@ -0,0 +1,520 @@ + +optiboot_diecimila.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001ec 00003e00 00003e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000240 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 0000006a 00000000 00000000 00000268 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000269 00000000 00000000 000002d2 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000196 00000000 00000000 0000053b 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003d3 00000000 00000000 000006d1 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 00000090 00000000 00000000 00000aa4 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 00000135 00000000 00000000 00000b34 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001d1 00000000 00000000 00000c69 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000068 00000000 00000000 00000e3a 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00003e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3e00: 85 e0 ldi r24, 0x05 ; 5 + 3e02: 80 93 81 00 sts 0x0081, r24 +#if LED_START_FLASHES > 0 + // Set up Timer 1 for timeout counter + TCCR1B = _BV(CS12) | _BV(CS10); // div 1024 +#endif +#ifndef SOFT_UART + UCSR0A = _BV(U2X0); //Double speed mode USART0 + 3e06: 82 e0 ldi r24, 0x02 ; 2 + 3e08: 80 93 c0 00 sts 0x00C0, r24 + UCSR0B = _BV(RXEN0) | _BV(TXEN0); + 3e0c: 88 e1 ldi r24, 0x18 ; 24 + 3e0e: 80 93 c1 00 sts 0x00C1, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + 3e12: 86 e0 ldi r24, 0x06 ; 6 + 3e14: 80 93 c2 00 sts 0x00C2, r24 + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); + 3e18: 80 e1 ldi r24, 0x10 ; 16 + 3e1a: 80 93 c4 00 sts 0x00C4, r24 +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 3e1e: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 3e20: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 3e22: 81 ff sbrs r24, 1 + 3e24: d0 d0 rcall .+416 ; 0x3fc6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 3e26: 8d e0 ldi r24, 0x0D ; 13 + 3e28: c8 d0 rcall .+400 ; 0x3fba + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 3e2a: 25 9a sbi 0x04, 5 ; 4 + 3e2c: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e2e: 20 e3 ldi r18, 0x30 ; 48 + 3e30: 3c ef ldi r19, 0xFC ; 252 + TIFR1 = _BV(TOV1); + 3e32: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e34: 30 93 85 00 sts 0x0085, r19 + 3e38: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 3e3c: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 3e3e: b0 9b sbis 0x16, 0 ; 22 + 3e40: fe cf rjmp .-4 ; 0x3e3e + LED_PIN |= _BV(LED); + 3e42: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3e44: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 3e46: 81 50 subi r24, 0x01 ; 1 + 3e48: a9 f7 brne .-22 ; 0x3e34 + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e4a: dd 24 eor r13, r13 + 3e4c: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3e4e: a5 e0 ldi r26, 0x05 ; 5 + 3e50: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3e52: f1 e1 ldi r31, 0x11 ; 17 + 3e54: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 3e56: a4 d0 rcall .+328 ; 0x3fa0 + + if(ch == STK_GET_PARAMETER) { + 3e58: 81 34 cpi r24, 0x41 ; 65 + 3e5a: 21 f4 brne .+8 ; 0x3e64 + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e5c: 81 e0 ldi r24, 0x01 ; 1 + 3e5e: be d0 rcall .+380 ; 0x3fdc + putch(0x03); + 3e60: 83 e0 ldi r24, 0x03 ; 3 + 3e62: 24 c0 rjmp .+72 ; 0x3eac + } + else if(ch == STK_SET_DEVICE) { + 3e64: 82 34 cpi r24, 0x42 ; 66 + 3e66: 11 f4 brne .+4 ; 0x3e6c + // SET DEVICE is ignored + getNch(20); + 3e68: 84 e1 ldi r24, 0x14 ; 20 + 3e6a: 03 c0 rjmp .+6 ; 0x3e72 + } + else if(ch == STK_SET_DEVICE_EXT) { + 3e6c: 85 34 cpi r24, 0x45 ; 69 + 3e6e: 19 f4 brne .+6 ; 0x3e76 + // SET DEVICE EXT is ignored + getNch(5); + 3e70: 85 e0 ldi r24, 0x05 ; 5 + 3e72: b4 d0 rcall .+360 ; 0x3fdc + 3e74: 8a c0 rjmp .+276 ; 0x3f8a + } + else if(ch == STK_LOAD_ADDRESS) { + 3e76: 85 35 cpi r24, 0x55 ; 85 + 3e78: a1 f4 brne .+40 ; 0x3ea2 + // LOAD ADDRESS + address = getch(); + 3e7a: 92 d0 rcall .+292 ; 0x3fa0 + 3e7c: 08 2f mov r16, r24 + 3e7e: 10 e0 ldi r17, 0x00 ; 0 + 3e80: 10 93 01 02 sts 0x0201, r17 + 3e84: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 3e88: 8b d0 rcall .+278 ; 0x3fa0 + 3e8a: 90 e0 ldi r25, 0x00 ; 0 + 3e8c: 98 2f mov r25, r24 + 3e8e: 88 27 eor r24, r24 + 3e90: 80 2b or r24, r16 + 3e92: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 3e94: 88 0f add r24, r24 + 3e96: 99 1f adc r25, r25 + 3e98: 90 93 01 02 sts 0x0201, r25 + 3e9c: 80 93 00 02 sts 0x0200, r24 + 3ea0: 73 c0 rjmp .+230 ; 0x3f88 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 3ea2: 86 35 cpi r24, 0x56 ; 86 + 3ea4: 29 f4 brne .+10 ; 0x3eb0 + // UNIVERSAL command is ignored + getNch(4); + 3ea6: 84 e0 ldi r24, 0x04 ; 4 + 3ea8: 99 d0 rcall .+306 ; 0x3fdc + putch(0x00); + 3eaa: 80 e0 ldi r24, 0x00 ; 0 + 3eac: 71 d0 rcall .+226 ; 0x3f90 + 3eae: 6d c0 rjmp .+218 ; 0x3f8a + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 3eb0: 84 36 cpi r24, 0x64 ; 100 + 3eb2: 09 f0 breq .+2 ; 0x3eb6 + 3eb4: 43 c0 rjmp .+134 ; 0x3f3c + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 3eb6: 7c d0 rcall .+248 ; 0x3fb0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 3eb8: e0 91 00 02 lds r30, 0x0200 + 3ebc: f0 91 01 02 lds r31, 0x0201 + 3ec0: 83 e0 ldi r24, 0x03 ; 3 + 3ec2: 80 93 57 00 sts 0x0057, r24 + 3ec6: e8 95 spm + 3ec8: c0 e0 ldi r28, 0x00 ; 0 + 3eca: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 3ecc: 69 d0 rcall .+210 ; 0x3fa0 + 3ece: 89 93 st Y+, r24 + while (--length); + 3ed0: 80 91 02 02 lds r24, 0x0202 + 3ed4: 81 50 subi r24, 0x01 ; 1 + 3ed6: 80 93 02 02 sts 0x0202, r24 + 3eda: 88 23 and r24, r24 + 3edc: b9 f7 brne .-18 ; 0x3ecc + + // Read command terminator, start reply + verifySpace(); + 3ede: 78 d0 rcall .+240 ; 0x3fd0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 3ee0: 07 b6 in r0, 0x37 ; 55 + 3ee2: 00 fc sbrc r0, 0 + 3ee4: fd cf rjmp .-6 ; 0x3ee0 + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 3ee6: 40 91 00 02 lds r20, 0x0200 + 3eea: 50 91 01 02 lds r21, 0x0201 + 3eee: a0 e0 ldi r26, 0x00 ; 0 + 3ef0: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 3ef2: 2c 91 ld r18, X + 3ef4: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 3ef6: 11 96 adiw r26, 0x01 ; 1 + 3ef8: 8c 91 ld r24, X + 3efa: 11 97 sbiw r26, 0x01 ; 1 + 3efc: 90 e0 ldi r25, 0x00 ; 0 + 3efe: 98 2f mov r25, r24 + 3f00: 88 27 eor r24, r24 + 3f02: 82 2b or r24, r18 + 3f04: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3f06: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 3f08: fa 01 movw r30, r20 + 3f0a: 0c 01 movw r0, r24 + 3f0c: d0 92 57 00 sts 0x0057, r13 + 3f10: e8 95 spm + 3f12: 11 24 eor r1, r1 + addrPtr += 2; + 3f14: 4e 5f subi r20, 0xFE ; 254 + 3f16: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 3f18: f1 e0 ldi r31, 0x01 ; 1 + 3f1a: a0 38 cpi r26, 0x80 ; 128 + 3f1c: bf 07 cpc r27, r31 + 3f1e: 49 f7 brne .-46 ; 0x3ef2 + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3f20: e0 91 00 02 lds r30, 0x0200 + 3f24: f0 91 01 02 lds r31, 0x0201 + 3f28: e0 92 57 00 sts 0x0057, r14 + 3f2c: e8 95 spm + boot_spm_busy_wait(); + 3f2e: 07 b6 in r0, 0x37 ; 55 + 3f30: 00 fc sbrc r0, 0 + 3f32: fd cf rjmp .-6 ; 0x3f2e + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3f34: f0 92 57 00 sts 0x0057, r15 + 3f38: e8 95 spm + 3f3a: 27 c0 rjmp .+78 ; 0x3f8a +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 3f3c: 84 37 cpi r24, 0x74 ; 116 + 3f3e: b9 f4 brne .+46 ; 0x3f6e + // READ PAGE - we only read flash + getLen(); + 3f40: 37 d0 rcall .+110 ; 0x3fb0 + verifySpace(); + 3f42: 46 d0 rcall .+140 ; 0x3fd0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 3f44: e0 91 00 02 lds r30, 0x0200 + 3f48: f0 91 01 02 lds r31, 0x0201 + 3f4c: 31 96 adiw r30, 0x01 ; 1 + 3f4e: f0 93 01 02 sts 0x0201, r31 + 3f52: e0 93 00 02 sts 0x0200, r30 + 3f56: 31 97 sbiw r30, 0x01 ; 1 + 3f58: e4 91 lpm r30, Z+ + 3f5a: 8e 2f mov r24, r30 + 3f5c: 19 d0 rcall .+50 ; 0x3f90 + while (--length); + 3f5e: 80 91 02 02 lds r24, 0x0202 + 3f62: 81 50 subi r24, 0x01 ; 1 + 3f64: 80 93 02 02 sts 0x0202, r24 + 3f68: 88 23 and r24, r24 + 3f6a: 61 f7 brne .-40 ; 0x3f44 + 3f6c: 0e c0 rjmp .+28 ; 0x3f8a +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 3f6e: 85 37 cpi r24, 0x75 ; 117 + 3f70: 39 f4 brne .+14 ; 0x3f80 + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 3f72: 2e d0 rcall .+92 ; 0x3fd0 + putch(SIGNATURE_0); + 3f74: 8e e1 ldi r24, 0x1E ; 30 + 3f76: 0c d0 rcall .+24 ; 0x3f90 + putch(SIGNATURE_1); + 3f78: 84 e9 ldi r24, 0x94 ; 148 + 3f7a: 0a d0 rcall .+20 ; 0x3f90 + putch(SIGNATURE_2); + 3f7c: 86 e0 ldi r24, 0x06 ; 6 + 3f7e: 96 cf rjmp .-212 ; 0x3eac + } + else if (ch == 'Q') { + 3f80: 81 35 cpi r24, 0x51 ; 81 + 3f82: 11 f4 brne .+4 ; 0x3f88 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 3f84: 88 e0 ldi r24, 0x08 ; 8 + 3f86: 19 d0 rcall .+50 ; 0x3fba + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 3f88: 23 d0 rcall .+70 ; 0x3fd0 + } + putch(STK_OK); + 3f8a: 80 e1 ldi r24, 0x10 ; 16 + 3f8c: 01 d0 rcall .+2 ; 0x3f90 + 3f8e: 63 cf rjmp .-314 ; 0x3e56 + +00003f90 : + } +} + +void putch(char ch) { + 3f90: 98 2f mov r25, r24 +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + 3f92: 80 91 c0 00 lds r24, 0x00C0 + 3f96: 85 ff sbrs r24, 5 + 3f98: fc cf rjmp .-8 ; 0x3f92 + UDR0 = ch; + 3f9a: 90 93 c6 00 sts 0x00C6, r25 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 3f9e: 08 95 ret + +00003fa0 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3fa0: a8 95 wdr + [uartBit] "I" (UART_RX_BIT) + : + "r25" +); +#else + while(!(UCSR0A & _BV(RXC0))); + 3fa2: 80 91 c0 00 lds r24, 0x00C0 + 3fa6: 87 ff sbrs r24, 7 + 3fa8: fc cf rjmp .-8 ; 0x3fa2 + ch = UDR0; + 3faa: 80 91 c6 00 lds r24, 0x00C6 +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 3fae: 08 95 ret + +00003fb0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 3fb0: f7 df rcall .-18 ; 0x3fa0 + length = getch(); + 3fb2: f6 df rcall .-20 ; 0x3fa0 + 3fb4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 3fb8: f3 cf rjmp .-26 ; 0x3fa0 + +00003fba : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 3fba: e0 e6 ldi r30, 0x60 ; 96 + 3fbc: f0 e0 ldi r31, 0x00 ; 0 + 3fbe: 98 e1 ldi r25, 0x18 ; 24 + 3fc0: 90 83 st Z, r25 + WDTCSR = x; + 3fc2: 80 83 st Z, r24 +} + 3fc4: 08 95 ret + +00003fc6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 3fc6: 80 e0 ldi r24, 0x00 ; 0 + 3fc8: f8 df rcall .-16 ; 0x3fba + __asm__ __volatile__ ( + 3fca: ee 27 eor r30, r30 + 3fcc: ff 27 eor r31, r31 + 3fce: 09 94 ijmp + +00003fd0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 3fd0: e7 df rcall .-50 ; 0x3fa0 + 3fd2: 80 32 cpi r24, 0x20 ; 32 + 3fd4: 09 f0 breq .+2 ; 0x3fd8 + 3fd6: f7 df rcall .-18 ; 0x3fc6 + putch(STK_INSYNC); + 3fd8: 84 e1 ldi r24, 0x14 ; 20 +} + 3fda: da cf rjmp .-76 ; 0x3f90 + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 3fdc: 1f 93 push r17 + 3fde: 18 2f mov r17, r24 + +00003fe0 : + do getch(); while (--count); + 3fe0: df df rcall .-66 ; 0x3fa0 + 3fe2: 11 50 subi r17, 0x01 ; 1 + 3fe4: e9 f7 brne .-6 ; 0x3fe0 + verifySpace(); + 3fe6: f4 df rcall .-24 ; 0x3fd0 +} + 3fe8: 1f 91 pop r17 + 3fea: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.hex new file mode 100644 index 0000000..9d31a7a --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.hex @@ -0,0 +1,34 @@ +:103E000085E08093810084B714BE81FFE4D08DE00B +:103E1000DCD0259A519A86E028E13EEF91E030937C +:103E200085002093840096BBB09BFECF1D9AA89579 +:103E30008150A9F7DD24D394A5E0EA2EF1E1FF2E0D +:103E4000ABD0813421F481E0D1D083E024C082342E +:103E500011F484E103C0853419F485E0C7D08AC029 +:103E60008535A1F499D0082F10E01093010200933A +:103E7000000292D090E0982F8827802B912B880FFA +:103E8000991F909301028093000273C0863529F434 +:103E900084E0ACD080E071D06DC0843609F043C0BE +:103EA0008FD0E0910002F091010283E080935700EF +:103EB000E895C0E0D1E070D08993809102028150F2 +:103EC000809302028823B9F78BD007B600FCFDCFA0 +:103ED0004091000250910102A0E0B1E02C9130E04D +:103EE00011968C91119790E0982F8827822B932B15 +:103EF0001296FA010C01D0925700E89511244E5FFA +:103F00005F4FF1E0A038BF0749F7E0910002F09160 +:103F10000102E0925700E89507B600FCFDCFF09251 +:103F20005700E89527C08437B9F44AD059D0E091BA +:103F30000002F09101023196F0930102E093000239 +:103F40003197E4918E2F19D0809102028150809395 +:103F50000202882361F70EC0853739F441D08EE123 +:103F60000CD084E90AD086E096CF813511F488E040 +:103F70002CD036D080E101D063CF2AE030E08095AC +:103F8000089410F4599802C0599A000015D014D022 +:103F900086952A95B1F70895A89529E030E04899CB +:103FA000FECF0AD009D008D08894489908942A9561 +:103FB00011F08795F7CF089598E09A95F1F7089555 +:103FC000EBDFEADF80930202E7CFE0E6F0E098E182 +:103FD00090838083089580E0F8DFEE27FF2709941F +:103FE000DBDF803209F0F7DF84E1C7CF1F93182FA2 +:0C3FF000D3DF1150E9F7F4DF1F910895B2 +:0400000300003E00BB +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.lst new file mode 100644 index 0000000..0e46bd1 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad.lst @@ -0,0 +1,533 @@ + +optiboot_lilypad.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001fc 00003e00 00003e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000250 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 00000078 00000000 00000000 00000278 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000277 00000000 00000000 000002f0 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000194 00000000 00000000 00000567 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003bb 00000000 00000000 000006fb 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 000000a0 00000000 00000000 00000ab8 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 0000013f 00000000 00000000 00000b58 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001a0 00000000 00000000 00000c97 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000070 00000000 00000000 00000e37 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00003e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3e00: 85 e0 ldi r24, 0x05 ; 5 + 3e02: 80 93 81 00 sts 0x0081, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 3e06: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 3e08: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 3e0a: 81 ff sbrs r24, 1 + 3e0c: e4 d0 rcall .+456 ; 0x3fd6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 3e0e: 8d e0 ldi r24, 0x0D ; 13 + 3e10: dc d0 rcall .+440 ; 0x3fca + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 3e12: 25 9a sbi 0x04, 5 ; 4 + +#ifdef SOFT_UART + /* Set TX pin as output */ + UART_DDR |= _BV(UART_TX_BIT); + 3e14: 51 9a sbi 0x0a, 1 ; 10 + 3e16: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e18: 28 e1 ldi r18, 0x18 ; 24 + 3e1a: 3e ef ldi r19, 0xFE ; 254 + TIFR1 = _BV(TOV1); + 3e1c: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e1e: 30 93 85 00 sts 0x0085, r19 + 3e22: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 3e26: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 3e28: b0 9b sbis 0x16, 0 ; 22 + 3e2a: fe cf rjmp .-4 ; 0x3e28 + LED_PIN |= _BV(LED); + 3e2c: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3e2e: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 3e30: 81 50 subi r24, 0x01 ; 1 + 3e32: a9 f7 brne .-22 ; 0x3e1e + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e34: dd 24 eor r13, r13 + 3e36: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3e38: a5 e0 ldi r26, 0x05 ; 5 + 3e3a: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3e3c: f1 e1 ldi r31, 0x11 ; 17 + 3e3e: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 3e40: ab d0 rcall .+342 ; 0x3f98 + + if(ch == STK_GET_PARAMETER) { + 3e42: 81 34 cpi r24, 0x41 ; 65 + 3e44: 21 f4 brne .+8 ; 0x3e4e + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e46: 81 e0 ldi r24, 0x01 ; 1 + 3e48: d1 d0 rcall .+418 ; 0x3fec + putch(0x03); + 3e4a: 83 e0 ldi r24, 0x03 ; 3 + 3e4c: 24 c0 rjmp .+72 ; 0x3e96 + } + else if(ch == STK_SET_DEVICE) { + 3e4e: 82 34 cpi r24, 0x42 ; 66 + 3e50: 11 f4 brne .+4 ; 0x3e56 + // SET DEVICE is ignored + getNch(20); + 3e52: 84 e1 ldi r24, 0x14 ; 20 + 3e54: 03 c0 rjmp .+6 ; 0x3e5c + } + else if(ch == STK_SET_DEVICE_EXT) { + 3e56: 85 34 cpi r24, 0x45 ; 69 + 3e58: 19 f4 brne .+6 ; 0x3e60 + // SET DEVICE EXT is ignored + getNch(5); + 3e5a: 85 e0 ldi r24, 0x05 ; 5 + 3e5c: c7 d0 rcall .+398 ; 0x3fec + 3e5e: 8a c0 rjmp .+276 ; 0x3f74 + } + else if(ch == STK_LOAD_ADDRESS) { + 3e60: 85 35 cpi r24, 0x55 ; 85 + 3e62: a1 f4 brne .+40 ; 0x3e8c + // LOAD ADDRESS + address = getch(); + 3e64: 99 d0 rcall .+306 ; 0x3f98 + 3e66: 08 2f mov r16, r24 + 3e68: 10 e0 ldi r17, 0x00 ; 0 + 3e6a: 10 93 01 02 sts 0x0201, r17 + 3e6e: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 3e72: 92 d0 rcall .+292 ; 0x3f98 + 3e74: 90 e0 ldi r25, 0x00 ; 0 + 3e76: 98 2f mov r25, r24 + 3e78: 88 27 eor r24, r24 + 3e7a: 80 2b or r24, r16 + 3e7c: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 3e7e: 88 0f add r24, r24 + 3e80: 99 1f adc r25, r25 + 3e82: 90 93 01 02 sts 0x0201, r25 + 3e86: 80 93 00 02 sts 0x0200, r24 + 3e8a: 73 c0 rjmp .+230 ; 0x3f72 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 3e8c: 86 35 cpi r24, 0x56 ; 86 + 3e8e: 29 f4 brne .+10 ; 0x3e9a + // UNIVERSAL command is ignored + getNch(4); + 3e90: 84 e0 ldi r24, 0x04 ; 4 + 3e92: ac d0 rcall .+344 ; 0x3fec + putch(0x00); + 3e94: 80 e0 ldi r24, 0x00 ; 0 + 3e96: 71 d0 rcall .+226 ; 0x3f7a + 3e98: 6d c0 rjmp .+218 ; 0x3f74 + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 3e9a: 84 36 cpi r24, 0x64 ; 100 + 3e9c: 09 f0 breq .+2 ; 0x3ea0 + 3e9e: 43 c0 rjmp .+134 ; 0x3f26 + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 3ea0: 8f d0 rcall .+286 ; 0x3fc0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 3ea2: e0 91 00 02 lds r30, 0x0200 + 3ea6: f0 91 01 02 lds r31, 0x0201 + 3eaa: 83 e0 ldi r24, 0x03 ; 3 + 3eac: 80 93 57 00 sts 0x0057, r24 + 3eb0: e8 95 spm + 3eb2: c0 e0 ldi r28, 0x00 ; 0 + 3eb4: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 3eb6: 70 d0 rcall .+224 ; 0x3f98 + 3eb8: 89 93 st Y+, r24 + while (--length); + 3eba: 80 91 02 02 lds r24, 0x0202 + 3ebe: 81 50 subi r24, 0x01 ; 1 + 3ec0: 80 93 02 02 sts 0x0202, r24 + 3ec4: 88 23 and r24, r24 + 3ec6: b9 f7 brne .-18 ; 0x3eb6 + + // Read command terminator, start reply + verifySpace(); + 3ec8: 8b d0 rcall .+278 ; 0x3fe0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 3eca: 07 b6 in r0, 0x37 ; 55 + 3ecc: 00 fc sbrc r0, 0 + 3ece: fd cf rjmp .-6 ; 0x3eca + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 3ed0: 40 91 00 02 lds r20, 0x0200 + 3ed4: 50 91 01 02 lds r21, 0x0201 + 3ed8: a0 e0 ldi r26, 0x00 ; 0 + 3eda: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 3edc: 2c 91 ld r18, X + 3ede: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 3ee0: 11 96 adiw r26, 0x01 ; 1 + 3ee2: 8c 91 ld r24, X + 3ee4: 11 97 sbiw r26, 0x01 ; 1 + 3ee6: 90 e0 ldi r25, 0x00 ; 0 + 3ee8: 98 2f mov r25, r24 + 3eea: 88 27 eor r24, r24 + 3eec: 82 2b or r24, r18 + 3eee: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3ef0: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 3ef2: fa 01 movw r30, r20 + 3ef4: 0c 01 movw r0, r24 + 3ef6: d0 92 57 00 sts 0x0057, r13 + 3efa: e8 95 spm + 3efc: 11 24 eor r1, r1 + addrPtr += 2; + 3efe: 4e 5f subi r20, 0xFE ; 254 + 3f00: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 3f02: f1 e0 ldi r31, 0x01 ; 1 + 3f04: a0 38 cpi r26, 0x80 ; 128 + 3f06: bf 07 cpc r27, r31 + 3f08: 49 f7 brne .-46 ; 0x3edc + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3f0a: e0 91 00 02 lds r30, 0x0200 + 3f0e: f0 91 01 02 lds r31, 0x0201 + 3f12: e0 92 57 00 sts 0x0057, r14 + 3f16: e8 95 spm + boot_spm_busy_wait(); + 3f18: 07 b6 in r0, 0x37 ; 55 + 3f1a: 00 fc sbrc r0, 0 + 3f1c: fd cf rjmp .-6 ; 0x3f18 + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3f1e: f0 92 57 00 sts 0x0057, r15 + 3f22: e8 95 spm + 3f24: 27 c0 rjmp .+78 ; 0x3f74 +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 3f26: 84 37 cpi r24, 0x74 ; 116 + 3f28: b9 f4 brne .+46 ; 0x3f58 + // READ PAGE - we only read flash + getLen(); + 3f2a: 4a d0 rcall .+148 ; 0x3fc0 + verifySpace(); + 3f2c: 59 d0 rcall .+178 ; 0x3fe0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 3f2e: e0 91 00 02 lds r30, 0x0200 + 3f32: f0 91 01 02 lds r31, 0x0201 + 3f36: 31 96 adiw r30, 0x01 ; 1 + 3f38: f0 93 01 02 sts 0x0201, r31 + 3f3c: e0 93 00 02 sts 0x0200, r30 + 3f40: 31 97 sbiw r30, 0x01 ; 1 + 3f42: e4 91 lpm r30, Z+ + 3f44: 8e 2f mov r24, r30 + 3f46: 19 d0 rcall .+50 ; 0x3f7a + while (--length); + 3f48: 80 91 02 02 lds r24, 0x0202 + 3f4c: 81 50 subi r24, 0x01 ; 1 + 3f4e: 80 93 02 02 sts 0x0202, r24 + 3f52: 88 23 and r24, r24 + 3f54: 61 f7 brne .-40 ; 0x3f2e + 3f56: 0e c0 rjmp .+28 ; 0x3f74 +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 3f58: 85 37 cpi r24, 0x75 ; 117 + 3f5a: 39 f4 brne .+14 ; 0x3f6a + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 3f5c: 41 d0 rcall .+130 ; 0x3fe0 + putch(SIGNATURE_0); + 3f5e: 8e e1 ldi r24, 0x1E ; 30 + 3f60: 0c d0 rcall .+24 ; 0x3f7a + putch(SIGNATURE_1); + 3f62: 84 e9 ldi r24, 0x94 ; 148 + 3f64: 0a d0 rcall .+20 ; 0x3f7a + putch(SIGNATURE_2); + 3f66: 86 e0 ldi r24, 0x06 ; 6 + 3f68: 96 cf rjmp .-212 ; 0x3e96 + } + else if (ch == 'Q') { + 3f6a: 81 35 cpi r24, 0x51 ; 81 + 3f6c: 11 f4 brne .+4 ; 0x3f72 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 3f6e: 88 e0 ldi r24, 0x08 ; 8 + 3f70: 2c d0 rcall .+88 ; 0x3fca + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 3f72: 36 d0 rcall .+108 ; 0x3fe0 + } + putch(STK_OK); + 3f74: 80 e1 ldi r24, 0x10 ; 16 + 3f76: 01 d0 rcall .+2 ; 0x3f7a + 3f78: 63 cf rjmp .-314 ; 0x3e40 + +00003f7a : +void putch(char ch) { +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + __asm__ __volatile__ ( + 3f7a: 2a e0 ldi r18, 0x0A ; 10 + 3f7c: 30 e0 ldi r19, 0x00 ; 0 + 3f7e: 80 95 com r24 + 3f80: 08 94 sec + 3f82: 10 f4 brcc .+4 ; 0x3f88 + 3f84: 59 98 cbi 0x0b, 1 ; 11 + 3f86: 02 c0 rjmp .+4 ; 0x3f8c + 3f88: 59 9a sbi 0x0b, 1 ; 11 + 3f8a: 00 00 nop + 3f8c: 15 d0 rcall .+42 ; 0x3fb8 + 3f8e: 14 d0 rcall .+40 ; 0x3fb8 + 3f90: 86 95 lsr r24 + 3f92: 2a 95 dec r18 + 3f94: b1 f7 brne .-20 ; 0x3f82 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 3f96: 08 95 ret + +00003f98 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3f98: a8 95 wdr +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 3f9a: 29 e0 ldi r18, 0x09 ; 9 + 3f9c: 30 e0 ldi r19, 0x00 ; 0 + 3f9e: 48 99 sbic 0x09, 0 ; 9 + 3fa0: fe cf rjmp .-4 ; 0x3f9e + 3fa2: 0a d0 rcall .+20 ; 0x3fb8 + 3fa4: 09 d0 rcall .+18 ; 0x3fb8 + 3fa6: 08 d0 rcall .+16 ; 0x3fb8 + 3fa8: 88 94 clc + 3faa: 48 99 sbic 0x09, 0 ; 9 + 3fac: 08 94 sec + 3fae: 2a 95 dec r18 + 3fb0: 11 f0 breq .+4 ; 0x3fb6 + 3fb2: 87 95 ror r24 + 3fb4: f7 cf rjmp .-18 ; 0x3fa4 + 3fb6: 08 95 ret + +00003fb8 : +#if UART_B_VALUE > 255 +#error Baud rate too slow for soft UART +#endif + +void uartDelay() { + __asm__ __volatile__ ( + 3fb8: 98 e0 ldi r25, 0x08 ; 8 + 3fba: 9a 95 dec r25 + 3fbc: f1 f7 brne .-4 ; 0x3fba + 3fbe: 08 95 ret + +00003fc0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 3fc0: eb df rcall .-42 ; 0x3f98 + length = getch(); + 3fc2: ea df rcall .-44 ; 0x3f98 + 3fc4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 3fc8: e7 cf rjmp .-50 ; 0x3f98 + +00003fca : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 3fca: e0 e6 ldi r30, 0x60 ; 96 + 3fcc: f0 e0 ldi r31, 0x00 ; 0 + 3fce: 98 e1 ldi r25, 0x18 ; 24 + 3fd0: 90 83 st Z, r25 + WDTCSR = x; + 3fd2: 80 83 st Z, r24 +} + 3fd4: 08 95 ret + +00003fd6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 3fd6: 80 e0 ldi r24, 0x00 ; 0 + 3fd8: f8 df rcall .-16 ; 0x3fca + __asm__ __volatile__ ( + 3fda: ee 27 eor r30, r30 + 3fdc: ff 27 eor r31, r31 + 3fde: 09 94 ijmp + +00003fe0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 3fe0: db df rcall .-74 ; 0x3f98 + 3fe2: 80 32 cpi r24, 0x20 ; 32 + 3fe4: 09 f0 breq .+2 ; 0x3fe8 + 3fe6: f7 df rcall .-18 ; 0x3fd6 + putch(STK_INSYNC); + 3fe8: 84 e1 ldi r24, 0x14 ; 20 +} + 3fea: c7 cf rjmp .-114 ; 0x3f7a + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 3fec: 1f 93 push r17 + 3fee: 18 2f mov r17, r24 + +00003ff0 : + do getch(); while (--count); + 3ff0: d3 df rcall .-90 ; 0x3f98 + 3ff2: 11 50 subi r17, 0x01 ; 1 + 3ff4: e9 f7 brne .-6 ; 0x3ff0 + verifySpace(); + 3ff6: f4 df rcall .-24 ; 0x3fe0 +} + 3ff8: 1f 91 pop r17 + 3ffa: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.hex new file mode 100644 index 0000000..9d31a7a --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.hex @@ -0,0 +1,34 @@ +:103E000085E08093810084B714BE81FFE4D08DE00B +:103E1000DCD0259A519A86E028E13EEF91E030937C +:103E200085002093840096BBB09BFECF1D9AA89579 +:103E30008150A9F7DD24D394A5E0EA2EF1E1FF2E0D +:103E4000ABD0813421F481E0D1D083E024C082342E +:103E500011F484E103C0853419F485E0C7D08AC029 +:103E60008535A1F499D0082F10E01093010200933A +:103E7000000292D090E0982F8827802B912B880FFA +:103E8000991F909301028093000273C0863529F434 +:103E900084E0ACD080E071D06DC0843609F043C0BE +:103EA0008FD0E0910002F091010283E080935700EF +:103EB000E895C0E0D1E070D08993809102028150F2 +:103EC000809302028823B9F78BD007B600FCFDCFA0 +:103ED0004091000250910102A0E0B1E02C9130E04D +:103EE00011968C91119790E0982F8827822B932B15 +:103EF0001296FA010C01D0925700E89511244E5FFA +:103F00005F4FF1E0A038BF0749F7E0910002F09160 +:103F10000102E0925700E89507B600FCFDCFF09251 +:103F20005700E89527C08437B9F44AD059D0E091BA +:103F30000002F09101023196F0930102E093000239 +:103F40003197E4918E2F19D0809102028150809395 +:103F50000202882361F70EC0853739F441D08EE123 +:103F60000CD084E90AD086E096CF813511F488E040 +:103F70002CD036D080E101D063CF2AE030E08095AC +:103F8000089410F4599802C0599A000015D014D022 +:103F900086952A95B1F70895A89529E030E04899CB +:103FA000FECF0AD009D008D08894489908942A9561 +:103FB00011F08795F7CF089598E09A95F1F7089555 +:103FC000EBDFEADF80930202E7CFE0E6F0E098E182 +:103FD00090838083089580E0F8DFEE27FF2709941F +:103FE000DBDF803209F0F7DF84E1C7CF1F93182FA2 +:0C3FF000D3DF1150E9F7F4DF1F910895B2 +:0400000300003E00BB +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.lst new file mode 100644 index 0000000..80ecb83 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_lilypad_resonator.lst @@ -0,0 +1,533 @@ + +optiboot_lilypad_resonator.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001fc 00003e00 00003e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000250 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 00000078 00000000 00000000 00000278 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000277 00000000 00000000 000002f0 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000194 00000000 00000000 00000567 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003bb 00000000 00000000 000006fb 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 000000a0 00000000 00000000 00000ab8 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 0000013f 00000000 00000000 00000b58 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001a0 00000000 00000000 00000c97 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000070 00000000 00000000 00000e37 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00003e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3e00: 85 e0 ldi r24, 0x05 ; 5 + 3e02: 80 93 81 00 sts 0x0081, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 3e06: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 3e08: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 3e0a: 81 ff sbrs r24, 1 + 3e0c: e4 d0 rcall .+456 ; 0x3fd6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 3e0e: 8d e0 ldi r24, 0x0D ; 13 + 3e10: dc d0 rcall .+440 ; 0x3fca + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 3e12: 25 9a sbi 0x04, 5 ; 4 + +#ifdef SOFT_UART + /* Set TX pin as output */ + UART_DDR |= _BV(UART_TX_BIT); + 3e14: 51 9a sbi 0x0a, 1 ; 10 + 3e16: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e18: 28 e1 ldi r18, 0x18 ; 24 + 3e1a: 3e ef ldi r19, 0xFE ; 254 + TIFR1 = _BV(TOV1); + 3e1c: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e1e: 30 93 85 00 sts 0x0085, r19 + 3e22: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 3e26: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 3e28: b0 9b sbis 0x16, 0 ; 22 + 3e2a: fe cf rjmp .-4 ; 0x3e28 + LED_PIN |= _BV(LED); + 3e2c: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3e2e: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 3e30: 81 50 subi r24, 0x01 ; 1 + 3e32: a9 f7 brne .-22 ; 0x3e1e + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e34: dd 24 eor r13, r13 + 3e36: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3e38: a5 e0 ldi r26, 0x05 ; 5 + 3e3a: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3e3c: f1 e1 ldi r31, 0x11 ; 17 + 3e3e: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 3e40: ab d0 rcall .+342 ; 0x3f98 + + if(ch == STK_GET_PARAMETER) { + 3e42: 81 34 cpi r24, 0x41 ; 65 + 3e44: 21 f4 brne .+8 ; 0x3e4e + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e46: 81 e0 ldi r24, 0x01 ; 1 + 3e48: d1 d0 rcall .+418 ; 0x3fec + putch(0x03); + 3e4a: 83 e0 ldi r24, 0x03 ; 3 + 3e4c: 24 c0 rjmp .+72 ; 0x3e96 + } + else if(ch == STK_SET_DEVICE) { + 3e4e: 82 34 cpi r24, 0x42 ; 66 + 3e50: 11 f4 brne .+4 ; 0x3e56 + // SET DEVICE is ignored + getNch(20); + 3e52: 84 e1 ldi r24, 0x14 ; 20 + 3e54: 03 c0 rjmp .+6 ; 0x3e5c + } + else if(ch == STK_SET_DEVICE_EXT) { + 3e56: 85 34 cpi r24, 0x45 ; 69 + 3e58: 19 f4 brne .+6 ; 0x3e60 + // SET DEVICE EXT is ignored + getNch(5); + 3e5a: 85 e0 ldi r24, 0x05 ; 5 + 3e5c: c7 d0 rcall .+398 ; 0x3fec + 3e5e: 8a c0 rjmp .+276 ; 0x3f74 + } + else if(ch == STK_LOAD_ADDRESS) { + 3e60: 85 35 cpi r24, 0x55 ; 85 + 3e62: a1 f4 brne .+40 ; 0x3e8c + // LOAD ADDRESS + address = getch(); + 3e64: 99 d0 rcall .+306 ; 0x3f98 + 3e66: 08 2f mov r16, r24 + 3e68: 10 e0 ldi r17, 0x00 ; 0 + 3e6a: 10 93 01 02 sts 0x0201, r17 + 3e6e: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 3e72: 92 d0 rcall .+292 ; 0x3f98 + 3e74: 90 e0 ldi r25, 0x00 ; 0 + 3e76: 98 2f mov r25, r24 + 3e78: 88 27 eor r24, r24 + 3e7a: 80 2b or r24, r16 + 3e7c: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 3e7e: 88 0f add r24, r24 + 3e80: 99 1f adc r25, r25 + 3e82: 90 93 01 02 sts 0x0201, r25 + 3e86: 80 93 00 02 sts 0x0200, r24 + 3e8a: 73 c0 rjmp .+230 ; 0x3f72 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 3e8c: 86 35 cpi r24, 0x56 ; 86 + 3e8e: 29 f4 brne .+10 ; 0x3e9a + // UNIVERSAL command is ignored + getNch(4); + 3e90: 84 e0 ldi r24, 0x04 ; 4 + 3e92: ac d0 rcall .+344 ; 0x3fec + putch(0x00); + 3e94: 80 e0 ldi r24, 0x00 ; 0 + 3e96: 71 d0 rcall .+226 ; 0x3f7a + 3e98: 6d c0 rjmp .+218 ; 0x3f74 + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 3e9a: 84 36 cpi r24, 0x64 ; 100 + 3e9c: 09 f0 breq .+2 ; 0x3ea0 + 3e9e: 43 c0 rjmp .+134 ; 0x3f26 + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 3ea0: 8f d0 rcall .+286 ; 0x3fc0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 3ea2: e0 91 00 02 lds r30, 0x0200 + 3ea6: f0 91 01 02 lds r31, 0x0201 + 3eaa: 83 e0 ldi r24, 0x03 ; 3 + 3eac: 80 93 57 00 sts 0x0057, r24 + 3eb0: e8 95 spm + 3eb2: c0 e0 ldi r28, 0x00 ; 0 + 3eb4: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 3eb6: 70 d0 rcall .+224 ; 0x3f98 + 3eb8: 89 93 st Y+, r24 + while (--length); + 3eba: 80 91 02 02 lds r24, 0x0202 + 3ebe: 81 50 subi r24, 0x01 ; 1 + 3ec0: 80 93 02 02 sts 0x0202, r24 + 3ec4: 88 23 and r24, r24 + 3ec6: b9 f7 brne .-18 ; 0x3eb6 + + // Read command terminator, start reply + verifySpace(); + 3ec8: 8b d0 rcall .+278 ; 0x3fe0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 3eca: 07 b6 in r0, 0x37 ; 55 + 3ecc: 00 fc sbrc r0, 0 + 3ece: fd cf rjmp .-6 ; 0x3eca + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 3ed0: 40 91 00 02 lds r20, 0x0200 + 3ed4: 50 91 01 02 lds r21, 0x0201 + 3ed8: a0 e0 ldi r26, 0x00 ; 0 + 3eda: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 3edc: 2c 91 ld r18, X + 3ede: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 3ee0: 11 96 adiw r26, 0x01 ; 1 + 3ee2: 8c 91 ld r24, X + 3ee4: 11 97 sbiw r26, 0x01 ; 1 + 3ee6: 90 e0 ldi r25, 0x00 ; 0 + 3ee8: 98 2f mov r25, r24 + 3eea: 88 27 eor r24, r24 + 3eec: 82 2b or r24, r18 + 3eee: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3ef0: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 3ef2: fa 01 movw r30, r20 + 3ef4: 0c 01 movw r0, r24 + 3ef6: d0 92 57 00 sts 0x0057, r13 + 3efa: e8 95 spm + 3efc: 11 24 eor r1, r1 + addrPtr += 2; + 3efe: 4e 5f subi r20, 0xFE ; 254 + 3f00: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 3f02: f1 e0 ldi r31, 0x01 ; 1 + 3f04: a0 38 cpi r26, 0x80 ; 128 + 3f06: bf 07 cpc r27, r31 + 3f08: 49 f7 brne .-46 ; 0x3edc + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3f0a: e0 91 00 02 lds r30, 0x0200 + 3f0e: f0 91 01 02 lds r31, 0x0201 + 3f12: e0 92 57 00 sts 0x0057, r14 + 3f16: e8 95 spm + boot_spm_busy_wait(); + 3f18: 07 b6 in r0, 0x37 ; 55 + 3f1a: 00 fc sbrc r0, 0 + 3f1c: fd cf rjmp .-6 ; 0x3f18 + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3f1e: f0 92 57 00 sts 0x0057, r15 + 3f22: e8 95 spm + 3f24: 27 c0 rjmp .+78 ; 0x3f74 +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 3f26: 84 37 cpi r24, 0x74 ; 116 + 3f28: b9 f4 brne .+46 ; 0x3f58 + // READ PAGE - we only read flash + getLen(); + 3f2a: 4a d0 rcall .+148 ; 0x3fc0 + verifySpace(); + 3f2c: 59 d0 rcall .+178 ; 0x3fe0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 3f2e: e0 91 00 02 lds r30, 0x0200 + 3f32: f0 91 01 02 lds r31, 0x0201 + 3f36: 31 96 adiw r30, 0x01 ; 1 + 3f38: f0 93 01 02 sts 0x0201, r31 + 3f3c: e0 93 00 02 sts 0x0200, r30 + 3f40: 31 97 sbiw r30, 0x01 ; 1 + 3f42: e4 91 lpm r30, Z+ + 3f44: 8e 2f mov r24, r30 + 3f46: 19 d0 rcall .+50 ; 0x3f7a + while (--length); + 3f48: 80 91 02 02 lds r24, 0x0202 + 3f4c: 81 50 subi r24, 0x01 ; 1 + 3f4e: 80 93 02 02 sts 0x0202, r24 + 3f52: 88 23 and r24, r24 + 3f54: 61 f7 brne .-40 ; 0x3f2e + 3f56: 0e c0 rjmp .+28 ; 0x3f74 +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 3f58: 85 37 cpi r24, 0x75 ; 117 + 3f5a: 39 f4 brne .+14 ; 0x3f6a + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 3f5c: 41 d0 rcall .+130 ; 0x3fe0 + putch(SIGNATURE_0); + 3f5e: 8e e1 ldi r24, 0x1E ; 30 + 3f60: 0c d0 rcall .+24 ; 0x3f7a + putch(SIGNATURE_1); + 3f62: 84 e9 ldi r24, 0x94 ; 148 + 3f64: 0a d0 rcall .+20 ; 0x3f7a + putch(SIGNATURE_2); + 3f66: 86 e0 ldi r24, 0x06 ; 6 + 3f68: 96 cf rjmp .-212 ; 0x3e96 + } + else if (ch == 'Q') { + 3f6a: 81 35 cpi r24, 0x51 ; 81 + 3f6c: 11 f4 brne .+4 ; 0x3f72 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 3f6e: 88 e0 ldi r24, 0x08 ; 8 + 3f70: 2c d0 rcall .+88 ; 0x3fca + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 3f72: 36 d0 rcall .+108 ; 0x3fe0 + } + putch(STK_OK); + 3f74: 80 e1 ldi r24, 0x10 ; 16 + 3f76: 01 d0 rcall .+2 ; 0x3f7a + 3f78: 63 cf rjmp .-314 ; 0x3e40 + +00003f7a : +void putch(char ch) { +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + __asm__ __volatile__ ( + 3f7a: 2a e0 ldi r18, 0x0A ; 10 + 3f7c: 30 e0 ldi r19, 0x00 ; 0 + 3f7e: 80 95 com r24 + 3f80: 08 94 sec + 3f82: 10 f4 brcc .+4 ; 0x3f88 + 3f84: 59 98 cbi 0x0b, 1 ; 11 + 3f86: 02 c0 rjmp .+4 ; 0x3f8c + 3f88: 59 9a sbi 0x0b, 1 ; 11 + 3f8a: 00 00 nop + 3f8c: 15 d0 rcall .+42 ; 0x3fb8 + 3f8e: 14 d0 rcall .+40 ; 0x3fb8 + 3f90: 86 95 lsr r24 + 3f92: 2a 95 dec r18 + 3f94: b1 f7 brne .-20 ; 0x3f82 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 3f96: 08 95 ret + +00003f98 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3f98: a8 95 wdr +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 3f9a: 29 e0 ldi r18, 0x09 ; 9 + 3f9c: 30 e0 ldi r19, 0x00 ; 0 + 3f9e: 48 99 sbic 0x09, 0 ; 9 + 3fa0: fe cf rjmp .-4 ; 0x3f9e + 3fa2: 0a d0 rcall .+20 ; 0x3fb8 + 3fa4: 09 d0 rcall .+18 ; 0x3fb8 + 3fa6: 08 d0 rcall .+16 ; 0x3fb8 + 3fa8: 88 94 clc + 3faa: 48 99 sbic 0x09, 0 ; 9 + 3fac: 08 94 sec + 3fae: 2a 95 dec r18 + 3fb0: 11 f0 breq .+4 ; 0x3fb6 + 3fb2: 87 95 ror r24 + 3fb4: f7 cf rjmp .-18 ; 0x3fa4 + 3fb6: 08 95 ret + +00003fb8 : +#if UART_B_VALUE > 255 +#error Baud rate too slow for soft UART +#endif + +void uartDelay() { + __asm__ __volatile__ ( + 3fb8: 98 e0 ldi r25, 0x08 ; 8 + 3fba: 9a 95 dec r25 + 3fbc: f1 f7 brne .-4 ; 0x3fba + 3fbe: 08 95 ret + +00003fc0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 3fc0: eb df rcall .-42 ; 0x3f98 + length = getch(); + 3fc2: ea df rcall .-44 ; 0x3f98 + 3fc4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 3fc8: e7 cf rjmp .-50 ; 0x3f98 + +00003fca : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 3fca: e0 e6 ldi r30, 0x60 ; 96 + 3fcc: f0 e0 ldi r31, 0x00 ; 0 + 3fce: 98 e1 ldi r25, 0x18 ; 24 + 3fd0: 90 83 st Z, r25 + WDTCSR = x; + 3fd2: 80 83 st Z, r24 +} + 3fd4: 08 95 ret + +00003fd6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 3fd6: 80 e0 ldi r24, 0x00 ; 0 + 3fd8: f8 df rcall .-16 ; 0x3fca + __asm__ __volatile__ ( + 3fda: ee 27 eor r30, r30 + 3fdc: ff 27 eor r31, r31 + 3fde: 09 94 ijmp + +00003fe0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 3fe0: db df rcall .-74 ; 0x3f98 + 3fe2: 80 32 cpi r24, 0x20 ; 32 + 3fe4: 09 f0 breq .+2 ; 0x3fe8 + 3fe6: f7 df rcall .-18 ; 0x3fd6 + putch(STK_INSYNC); + 3fe8: 84 e1 ldi r24, 0x14 ; 20 +} + 3fea: c7 cf rjmp .-114 ; 0x3f7a + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 3fec: 1f 93 push r17 + 3fee: 18 2f mov r17, r24 + +00003ff0 : + do getch(); while (--count); + 3ff0: d3 df rcall .-90 ; 0x3f98 + 3ff2: 11 50 subi r17, 0x01 ; 1 + 3ff4: e9 f7 brne .-6 ; 0x3ff0 + verifySpace(); + 3ff6: f4 df rcall .-24 ; 0x3fe0 +} + 3ff8: 1f 91 pop r17 + 3ffa: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.hex new file mode 100644 index 0000000..0e51124 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.hex @@ -0,0 +1,42 @@ +:101D000085E08EBD84B714BE81FF27D18DE021D13F +:101D1000D49AD29A86E023EC3FEF91E03DBD2CBDF2 +:101D20009BB9589BFECFCC9AA8958150B9F7CC248B +:101D3000C39485E0E82E0FE7D02E1EECF12EF0D0F4 +:101D4000813421F481E014D183E024C0823411F481 +:101D500084E103C0853419F485E00AD1CFC085350C +:101D6000A1F4DED0082F10E01093010200930002CE +:101D7000D7D090E0982F8827802B912B880F991F20 +:101D80009093010280930002B8C0863529F484E064 +:101D9000EFD080E0B6D0B2C0843609F06EC0D4D0A7 +:101DA000E0910002F091010283E080935700E895F2 +:101DB000C0E0D1E0B5D08993809102028150809338 +:101DC00002028823B9F7CED007B600FCFDCF809180 +:101DD000000290910102892B41F580910001209130 +:101DE000010130E0322F222790E0282B392B30934D +:101DF00005022093040240910A0180910B0190E0BA +:101E0000982F882750E0842B952B9093070280937E +:101E100006022450304020930A01232F33272093B9 +:101E20000B01D0920001F09201014091000250910B +:101E30000102A0E0B1E02C9130E011968C91119755 +:101E400090E0982F8827822B932B1296FA010C0191 +:101E5000C0925700E89511244E5F5F4FF1E0A03427 +:101E6000BF0749F7E0910002F0910102E0925700AC +:101E7000E89507B600FCFDCF41C0843789F564D0F2 +:101E800071D0E0910002F0910102309719F4209195 +:101E9000040213C0E130F10519F4209105020DC0D0 +:101EA000EA30F10519F42091060207C0EB30F10584 +:101EB00019F42091070201C02491809100029091B1 +:101EC000010201969093010280930002822F19D0A3 +:101ED00080910202815080930202882391F60EC005 +:101EE000853739F43FD08EE10CD083E90AD08CE0FD +:101EF00051CF813511F488E02CD034D080E101D06D +:101F00001ECF2AE030E08095089410F4DA9802C0E1 +:101F1000DA9A000015D014D086952A95B1F7089565 +:101F2000A89529E030E0CB99FECF0AD009D008D09F +:101F30008894CB9908942A9511F08795F7CF089546 +:101F40009EE09A95F1F70895EBDFEADF80930202B5 +:101F5000E7CF98E191BD81BD089580E0FADFE5E02B +:101F6000FF270994DDDF803209F0F7DF84E1C9CF74 +:101F70001F93182FD5DF1150E9F7F4DF1F91089553 +:0400000300001D00DC +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.lst new file mode 100644 index 0000000..59468cb --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_luminet.lst @@ -0,0 +1,604 @@ + +optiboot_luminet.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 00000280 00001d00 00001d00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 000002d4 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 00000078 00000000 00000000 000002fc 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000289 00000000 00000000 00000374 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 000001a1 00000000 00000000 000005fd 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 00000435 00000000 00000000 0000079e 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 000000a0 00000000 00000000 00000bd4 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 00000144 00000000 00000000 00000c74 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 00000194 00000000 00000000 00000db8 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000088 00000000 00000000 00000f4c 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00001d00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 1d00: 85 e0 ldi r24, 0x05 ; 5 + 1d02: 8e bd out 0x2e, r24 ; 46 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 1d04: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 1d06: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 1d08: 81 ff sbrs r24, 1 + 1d0a: 27 d1 rcall .+590 ; 0x1f5a + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 1d0c: 8d e0 ldi r24, 0x0D ; 13 + 1d0e: 21 d1 rcall .+578 ; 0x1f52 + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 1d10: d4 9a sbi 0x1a, 4 ; 26 + +#ifdef SOFT_UART + /* Set TX pin as output */ + UART_DDR |= _BV(UART_TX_BIT); + 1d12: d2 9a sbi 0x1a, 2 ; 26 + 1d14: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 1d16: 23 ec ldi r18, 0xC3 ; 195 + 1d18: 3f ef ldi r19, 0xFF ; 255 + TIFR1 = _BV(TOV1); + 1d1a: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 1d1c: 3d bd out 0x2d, r19 ; 45 + 1d1e: 2c bd out 0x2c, r18 ; 44 + TIFR1 = _BV(TOV1); + 1d20: 9b b9 out 0x0b, r25 ; 11 + while(!(TIFR1 & _BV(TOV1))); + 1d22: 58 9b sbis 0x0b, 0 ; 11 + 1d24: fe cf rjmp .-4 ; 0x1d22 + LED_PIN |= _BV(LED); + 1d26: cc 9a sbi 0x19, 4 ; 25 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 1d28: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 1d2a: 81 50 subi r24, 0x01 ; 1 + 1d2c: b9 f7 brne .-18 ; 0x1d1c + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 1d2e: cc 24 eor r12, r12 + 1d30: c3 94 inc r12 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 1d32: 85 e0 ldi r24, 0x05 ; 5 + 1d34: e8 2e mov r14, r24 + vect -= 4; // Instruction is a relative jump (rjmp), so recalculate. + buff[10] = vect & 0xff; + buff[11] = vect >> 8; + + // Add jump to bootloader at RESET vector + buff[0] = 0x7f; + 1d36: 0f e7 ldi r16, 0x7F ; 127 + 1d38: d0 2e mov r13, r16 + buff[1] = 0xce; // rjmp 0x1d00 instruction + 1d3a: 1e ec ldi r17, 0xCE ; 206 + 1d3c: f1 2e mov r15, r17 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 1d3e: f0 d0 rcall .+480 ; 0x1f20 + + if(ch == STK_GET_PARAMETER) { + 1d40: 81 34 cpi r24, 0x41 ; 65 + 1d42: 21 f4 brne .+8 ; 0x1d4c + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 1d44: 81 e0 ldi r24, 0x01 ; 1 + 1d46: 14 d1 rcall .+552 ; 0x1f70 + putch(0x03); + 1d48: 83 e0 ldi r24, 0x03 ; 3 + 1d4a: 24 c0 rjmp .+72 ; 0x1d94 + } + else if(ch == STK_SET_DEVICE) { + 1d4c: 82 34 cpi r24, 0x42 ; 66 + 1d4e: 11 f4 brne .+4 ; 0x1d54 + // SET DEVICE is ignored + getNch(20); + 1d50: 84 e1 ldi r24, 0x14 ; 20 + 1d52: 03 c0 rjmp .+6 ; 0x1d5a + } + else if(ch == STK_SET_DEVICE_EXT) { + 1d54: 85 34 cpi r24, 0x45 ; 69 + 1d56: 19 f4 brne .+6 ; 0x1d5e + // SET DEVICE EXT is ignored + getNch(5); + 1d58: 85 e0 ldi r24, 0x05 ; 5 + 1d5a: 0a d1 rcall .+532 ; 0x1f70 + 1d5c: cf c0 rjmp .+414 ; 0x1efc + } + else if(ch == STK_LOAD_ADDRESS) { + 1d5e: 85 35 cpi r24, 0x55 ; 85 + 1d60: a1 f4 brne .+40 ; 0x1d8a + // LOAD ADDRESS + address = getch(); + 1d62: de d0 rcall .+444 ; 0x1f20 + 1d64: 08 2f mov r16, r24 + 1d66: 10 e0 ldi r17, 0x00 ; 0 + 1d68: 10 93 01 02 sts 0x0201, r17 + 1d6c: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 1d70: d7 d0 rcall .+430 ; 0x1f20 + 1d72: 90 e0 ldi r25, 0x00 ; 0 + 1d74: 98 2f mov r25, r24 + 1d76: 88 27 eor r24, r24 + 1d78: 80 2b or r24, r16 + 1d7a: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 1d7c: 88 0f add r24, r24 + 1d7e: 99 1f adc r25, r25 + 1d80: 90 93 01 02 sts 0x0201, r25 + 1d84: 80 93 00 02 sts 0x0200, r24 + 1d88: b8 c0 rjmp .+368 ; 0x1efa + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 1d8a: 86 35 cpi r24, 0x56 ; 86 + 1d8c: 29 f4 brne .+10 ; 0x1d98 + // UNIVERSAL command is ignored + getNch(4); + 1d8e: 84 e0 ldi r24, 0x04 ; 4 + 1d90: ef d0 rcall .+478 ; 0x1f70 + putch(0x00); + 1d92: 80 e0 ldi r24, 0x00 ; 0 + 1d94: b6 d0 rcall .+364 ; 0x1f02 + 1d96: b2 c0 rjmp .+356 ; 0x1efc + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 1d98: 84 36 cpi r24, 0x64 ; 100 + 1d9a: 09 f0 breq .+2 ; 0x1d9e + 1d9c: 6e c0 rjmp .+220 ; 0x1e7a + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 1d9e: d4 d0 rcall .+424 ; 0x1f48 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 1da0: e0 91 00 02 lds r30, 0x0200 + 1da4: f0 91 01 02 lds r31, 0x0201 + 1da8: 83 e0 ldi r24, 0x03 ; 3 + 1daa: 80 93 57 00 sts 0x0057, r24 + 1dae: e8 95 spm + 1db0: c0 e0 ldi r28, 0x00 ; 0 + 1db2: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 1db4: b5 d0 rcall .+362 ; 0x1f20 + 1db6: 89 93 st Y+, r24 + while (--length); + 1db8: 80 91 02 02 lds r24, 0x0202 + 1dbc: 81 50 subi r24, 0x01 ; 1 + 1dbe: 80 93 02 02 sts 0x0202, r24 + 1dc2: 88 23 and r24, r24 + 1dc4: b9 f7 brne .-18 ; 0x1db4 + + // Read command terminator, start reply + verifySpace(); + 1dc6: ce d0 rcall .+412 ; 0x1f64 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 1dc8: 07 b6 in r0, 0x37 ; 55 + 1dca: 00 fc sbrc r0, 0 + 1dcc: fd cf rjmp .-6 ; 0x1dc8 + +#ifdef VIRTUAL_BOOT_PARTITION + if ((uint16_t)(void*)address == 0) { + 1dce: 80 91 00 02 lds r24, 0x0200 + 1dd2: 90 91 01 02 lds r25, 0x0201 + 1dd6: 89 2b or r24, r25 + 1dd8: 41 f5 brne .+80 ; 0x1e2a + // This is the reset vector page. We need to live-patch the code so the + // bootloader runs. + // + // Move RESET vector to WDT vector + uint16_t vect = buff[0] | (buff[1]<<8); + 1dda: 80 91 00 01 lds r24, 0x0100 + 1dde: 20 91 01 01 lds r18, 0x0101 + 1de2: 30 e0 ldi r19, 0x00 ; 0 + 1de4: 32 2f mov r19, r18 + 1de6: 22 27 eor r18, r18 + 1de8: 90 e0 ldi r25, 0x00 ; 0 + 1dea: 28 2b or r18, r24 + 1dec: 39 2b or r19, r25 + rstVect = vect; + 1dee: 30 93 05 02 sts 0x0205, r19 + 1df2: 20 93 04 02 sts 0x0204, r18 + wdtVect = buff[10] | (buff[11]<<8); + 1df6: 40 91 0a 01 lds r20, 0x010A + 1dfa: 80 91 0b 01 lds r24, 0x010B + 1dfe: 90 e0 ldi r25, 0x00 ; 0 + 1e00: 98 2f mov r25, r24 + 1e02: 88 27 eor r24, r24 + 1e04: 50 e0 ldi r21, 0x00 ; 0 + 1e06: 84 2b or r24, r20 + 1e08: 95 2b or r25, r21 + 1e0a: 90 93 07 02 sts 0x0207, r25 + 1e0e: 80 93 06 02 sts 0x0206, r24 + vect -= 4; // Instruction is a relative jump (rjmp), so recalculate. + 1e12: 24 50 subi r18, 0x04 ; 4 + 1e14: 30 40 sbci r19, 0x00 ; 0 + buff[10] = vect & 0xff; + 1e16: 20 93 0a 01 sts 0x010A, r18 + buff[11] = vect >> 8; + 1e1a: 23 2f mov r18, r19 + 1e1c: 33 27 eor r19, r19 + 1e1e: 20 93 0b 01 sts 0x010B, r18 + + // Add jump to bootloader at RESET vector + buff[0] = 0x7f; + 1e22: d0 92 00 01 sts 0x0100, r13 + buff[1] = 0xce; // rjmp 0x1d00 instruction + 1e26: f0 92 01 01 sts 0x0101, r15 + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 1e2a: 40 91 00 02 lds r20, 0x0200 + 1e2e: 50 91 01 02 lds r21, 0x0201 + 1e32: a0 e0 ldi r26, 0x00 ; 0 + 1e34: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 1e36: 2c 91 ld r18, X + 1e38: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 1e3a: 11 96 adiw r26, 0x01 ; 1 + 1e3c: 8c 91 ld r24, X + 1e3e: 11 97 sbiw r26, 0x01 ; 1 + 1e40: 90 e0 ldi r25, 0x00 ; 0 + 1e42: 98 2f mov r25, r24 + 1e44: 88 27 eor r24, r24 + 1e46: 82 2b or r24, r18 + 1e48: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 1e4a: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 1e4c: fa 01 movw r30, r20 + 1e4e: 0c 01 movw r0, r24 + 1e50: c0 92 57 00 sts 0x0057, r12 + 1e54: e8 95 spm + 1e56: 11 24 eor r1, r1 + addrPtr += 2; + 1e58: 4e 5f subi r20, 0xFE ; 254 + 1e5a: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 1e5c: f1 e0 ldi r31, 0x01 ; 1 + 1e5e: a0 34 cpi r26, 0x40 ; 64 + 1e60: bf 07 cpc r27, r31 + 1e62: 49 f7 brne .-46 ; 0x1e36 + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 1e64: e0 91 00 02 lds r30, 0x0200 + 1e68: f0 91 01 02 lds r31, 0x0201 + 1e6c: e0 92 57 00 sts 0x0057, r14 + 1e70: e8 95 spm + boot_spm_busy_wait(); + 1e72: 07 b6 in r0, 0x37 ; 55 + 1e74: 00 fc sbrc r0, 0 + 1e76: fd cf rjmp .-6 ; 0x1e72 + 1e78: 41 c0 rjmp .+130 ; 0x1efc + boot_rww_enable(); +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 1e7a: 84 37 cpi r24, 0x74 ; 116 + 1e7c: 89 f5 brne .+98 ; 0x1ee0 + // READ PAGE - we only read flash + getLen(); + 1e7e: 64 d0 rcall .+200 ; 0x1f48 + verifySpace(); + 1e80: 71 d0 rcall .+226 ; 0x1f64 +#ifdef VIRTUAL_BOOT_PARTITION + do { + // Undo vector patch in bottom page so verify passes + if (address == 0) ch=rstVect & 0xff; + 1e82: e0 91 00 02 lds r30, 0x0200 + 1e86: f0 91 01 02 lds r31, 0x0201 + 1e8a: 30 97 sbiw r30, 0x00 ; 0 + 1e8c: 19 f4 brne .+6 ; 0x1e94 + 1e8e: 20 91 04 02 lds r18, 0x0204 + 1e92: 13 c0 rjmp .+38 ; 0x1eba + else if (address == 1) ch=rstVect >> 8; + 1e94: e1 30 cpi r30, 0x01 ; 1 + 1e96: f1 05 cpc r31, r1 + 1e98: 19 f4 brne .+6 ; 0x1ea0 + 1e9a: 20 91 05 02 lds r18, 0x0205 + 1e9e: 0d c0 rjmp .+26 ; 0x1eba + else if (address == 10) ch=wdtVect & 0xff; + 1ea0: ea 30 cpi r30, 0x0A ; 10 + 1ea2: f1 05 cpc r31, r1 + 1ea4: 19 f4 brne .+6 ; 0x1eac + 1ea6: 20 91 06 02 lds r18, 0x0206 + 1eaa: 07 c0 rjmp .+14 ; 0x1eba + else if (address == 11) ch=wdtVect >> 8; + 1eac: eb 30 cpi r30, 0x0B ; 11 + 1eae: f1 05 cpc r31, r1 + 1eb0: 19 f4 brne .+6 ; 0x1eb8 + 1eb2: 20 91 07 02 lds r18, 0x0207 + 1eb6: 01 c0 rjmp .+2 ; 0x1eba + else ch = pgm_read_byte_near(address); + 1eb8: 24 91 lpm r18, Z+ + address++; + 1eba: 80 91 00 02 lds r24, 0x0200 + 1ebe: 90 91 01 02 lds r25, 0x0201 + 1ec2: 01 96 adiw r24, 0x01 ; 1 + 1ec4: 90 93 01 02 sts 0x0201, r25 + 1ec8: 80 93 00 02 sts 0x0200, r24 + putch(ch); + 1ecc: 82 2f mov r24, r18 + 1ece: 19 d0 rcall .+50 ; 0x1f02 + } while (--length); + 1ed0: 80 91 02 02 lds r24, 0x0202 + 1ed4: 81 50 subi r24, 0x01 ; 1 + 1ed6: 80 93 02 02 sts 0x0202, r24 + 1eda: 88 23 and r24, r24 + 1edc: 91 f6 brne .-92 ; 0x1e82 + 1ede: 0e c0 rjmp .+28 ; 0x1efc + while (--length); +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 1ee0: 85 37 cpi r24, 0x75 ; 117 + 1ee2: 39 f4 brne .+14 ; 0x1ef2 + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 1ee4: 3f d0 rcall .+126 ; 0x1f64 + putch(SIGNATURE_0); + 1ee6: 8e e1 ldi r24, 0x1E ; 30 + 1ee8: 0c d0 rcall .+24 ; 0x1f02 + putch(SIGNATURE_1); + 1eea: 83 e9 ldi r24, 0x93 ; 147 + 1eec: 0a d0 rcall .+20 ; 0x1f02 + putch(SIGNATURE_2); + 1eee: 8c e0 ldi r24, 0x0C ; 12 + 1ef0: 51 cf rjmp .-350 ; 0x1d94 + } + else if (ch == 'Q') { + 1ef2: 81 35 cpi r24, 0x51 ; 81 + 1ef4: 11 f4 brne .+4 ; 0x1efa + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 1ef6: 88 e0 ldi r24, 0x08 ; 8 + 1ef8: 2c d0 rcall .+88 ; 0x1f52 + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 1efa: 34 d0 rcall .+104 ; 0x1f64 + } + putch(STK_OK); + 1efc: 80 e1 ldi r24, 0x10 ; 16 + 1efe: 01 d0 rcall .+2 ; 0x1f02 + 1f00: 1e cf rjmp .-452 ; 0x1d3e + +00001f02 : +void putch(char ch) { +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + __asm__ __volatile__ ( + 1f02: 2a e0 ldi r18, 0x0A ; 10 + 1f04: 30 e0 ldi r19, 0x00 ; 0 + 1f06: 80 95 com r24 + 1f08: 08 94 sec + 1f0a: 10 f4 brcc .+4 ; 0x1f10 + 1f0c: da 98 cbi 0x1b, 2 ; 27 + 1f0e: 02 c0 rjmp .+4 ; 0x1f14 + 1f10: da 9a sbi 0x1b, 2 ; 27 + 1f12: 00 00 nop + 1f14: 15 d0 rcall .+42 ; 0x1f40 + 1f16: 14 d0 rcall .+40 ; 0x1f40 + 1f18: 86 95 lsr r24 + 1f1a: 2a 95 dec r18 + 1f1c: b1 f7 brne .-20 ; 0x1f0a + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 1f1e: 08 95 ret + +00001f20 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 1f20: a8 95 wdr +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 1f22: 29 e0 ldi r18, 0x09 ; 9 + 1f24: 30 e0 ldi r19, 0x00 ; 0 + 1f26: cb 99 sbic 0x19, 3 ; 25 + 1f28: fe cf rjmp .-4 ; 0x1f26 + 1f2a: 0a d0 rcall .+20 ; 0x1f40 + 1f2c: 09 d0 rcall .+18 ; 0x1f40 + 1f2e: 08 d0 rcall .+16 ; 0x1f40 + 1f30: 88 94 clc + 1f32: cb 99 sbic 0x19, 3 ; 25 + 1f34: 08 94 sec + 1f36: 2a 95 dec r18 + 1f38: 11 f0 breq .+4 ; 0x1f3e + 1f3a: 87 95 ror r24 + 1f3c: f7 cf rjmp .-18 ; 0x1f2c + 1f3e: 08 95 ret + +00001f40 : +#if UART_B_VALUE > 255 +#error Baud rate too slow for soft UART +#endif + +void uartDelay() { + __asm__ __volatile__ ( + 1f40: 9e e0 ldi r25, 0x0E ; 14 + 1f42: 9a 95 dec r25 + 1f44: f1 f7 brne .-4 ; 0x1f42 + 1f46: 08 95 ret + +00001f48 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 1f48: eb df rcall .-42 ; 0x1f20 + length = getch(); + 1f4a: ea df rcall .-44 ; 0x1f20 + 1f4c: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 1f50: e7 cf rjmp .-50 ; 0x1f20 + +00001f52 : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 1f52: 98 e1 ldi r25, 0x18 ; 24 + 1f54: 91 bd out 0x21, r25 ; 33 + WDTCSR = x; + 1f56: 81 bd out 0x21, r24 ; 33 +} + 1f58: 08 95 ret + +00001f5a : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 1f5a: 80 e0 ldi r24, 0x00 ; 0 + 1f5c: fa df rcall .-12 ; 0x1f52 + __asm__ __volatile__ ( + 1f5e: e5 e0 ldi r30, 0x05 ; 5 + 1f60: ff 27 eor r31, r31 + 1f62: 09 94 ijmp + +00001f64 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 1f64: dd df rcall .-70 ; 0x1f20 + 1f66: 80 32 cpi r24, 0x20 ; 32 + 1f68: 09 f0 breq .+2 ; 0x1f6c + 1f6a: f7 df rcall .-18 ; 0x1f5a + putch(STK_INSYNC); + 1f6c: 84 e1 ldi r24, 0x14 ; 20 +} + 1f6e: c9 cf rjmp .-110 ; 0x1f02 + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 1f70: 1f 93 push r17 + 1f72: 18 2f mov r17, r24 + +00001f74 : + do getch(); while (--count); + 1f74: d5 df rcall .-86 ; 0x1f20 + 1f76: 11 50 subi r17, 0x01 ; 1 + 1f78: e9 f7 brne .-6 ; 0x1f74 + verifySpace(); + 1f7a: f4 df rcall .-24 ; 0x1f64 +} + 1f7c: 1f 91 pop r17 + 1f7e: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.hex new file mode 100644 index 0000000..1e93414 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.hex @@ -0,0 +1,33 @@ +:103E000085E08093810082E08093C00088E1809308 +:103E1000C10086E08093C20080E18093C40084B733 +:103E200014BE81FFD0D08DE0C8D0259A86E020E373 +:103E30003CEF91E0309385002093840096BBB09BCB +:103E4000FECF1D9AA8958150A9F7DD24D394A5E053 +:103E5000EA2EF1E1FF2EA4D0813421F481E0BED01E +:103E600083E024C0823411F484E103C0853419F462 +:103E700085E0B4D08AC08535A1F492D0082F10E037 +:103E800010930102009300028BD090E0982F8827B6 +:103E9000802B912B880F991F909301028093000231 +:103EA00073C0863529F484E099D080E071D06DC06C +:103EB000843609F043C07CD0E0910002F091010209 +:103EC00083E080935700E895C0E0D1E069D0899302 +:103ED000809102028150809302028823B9F778D042 +:103EE00007B600FCFDCF4091000250910102A0E016 +:103EF000B1E02C9130E011968C91119790E0982FC1 +:103F00008827822B932B1296FA010C01D09257002E +:103F1000E89511244E5F5F4FF1E0A038BF0749F7E5 +:103F2000E0910002F0910102E0925700E89507B697 +:103F300000FCFDCFF0925700E89527C08437B9F414 +:103F400037D046D0E0910002F09101023196F09313 +:103F50000102E09300023197E4918E2F19D08091F5 +:103F60000202815080930202882361F70EC08537D8 +:103F700039F42ED08EE10CD084E90AD086E096CFB9 +:103F8000813511F488E019D023D080E101D063CFCE +:103F9000982F8091C00085FFFCCF9093C6000895B4 +:103FA000A8958091C00087FFFCCF8091C60008953E +:103FB000F7DFF6DF80930202F3CFE0E6F0E098E16E +:103FC00090838083089580E0F8DFEE27FF2709942F +:103FD000E7DF803209F0F7DF84E1DACF1F93182F93 +:0C3FE000DFDF1150E9F7F4DF1F910895B6 +:0400000300003E00BB +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.lst new file mode 100644 index 0000000..9920a76 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_16MHz.lst @@ -0,0 +1,520 @@ + +optiboot_pro_16MHz.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001ec 00003e00 00003e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000240 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 0000006a 00000000 00000000 00000268 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000269 00000000 00000000 000002d2 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000196 00000000 00000000 0000053b 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003d3 00000000 00000000 000006d1 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 00000090 00000000 00000000 00000aa4 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 00000135 00000000 00000000 00000b34 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001d1 00000000 00000000 00000c69 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000068 00000000 00000000 00000e3a 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00003e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3e00: 85 e0 ldi r24, 0x05 ; 5 + 3e02: 80 93 81 00 sts 0x0081, r24 +#if LED_START_FLASHES > 0 + // Set up Timer 1 for timeout counter + TCCR1B = _BV(CS12) | _BV(CS10); // div 1024 +#endif +#ifndef SOFT_UART + UCSR0A = _BV(U2X0); //Double speed mode USART0 + 3e06: 82 e0 ldi r24, 0x02 ; 2 + 3e08: 80 93 c0 00 sts 0x00C0, r24 + UCSR0B = _BV(RXEN0) | _BV(TXEN0); + 3e0c: 88 e1 ldi r24, 0x18 ; 24 + 3e0e: 80 93 c1 00 sts 0x00C1, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + 3e12: 86 e0 ldi r24, 0x06 ; 6 + 3e14: 80 93 c2 00 sts 0x00C2, r24 + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); + 3e18: 80 e1 ldi r24, 0x10 ; 16 + 3e1a: 80 93 c4 00 sts 0x00C4, r24 +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 3e1e: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 3e20: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 3e22: 81 ff sbrs r24, 1 + 3e24: d0 d0 rcall .+416 ; 0x3fc6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 3e26: 8d e0 ldi r24, 0x0D ; 13 + 3e28: c8 d0 rcall .+400 ; 0x3fba + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 3e2a: 25 9a sbi 0x04, 5 ; 4 + 3e2c: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e2e: 20 e3 ldi r18, 0x30 ; 48 + 3e30: 3c ef ldi r19, 0xFC ; 252 + TIFR1 = _BV(TOV1); + 3e32: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e34: 30 93 85 00 sts 0x0085, r19 + 3e38: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 3e3c: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 3e3e: b0 9b sbis 0x16, 0 ; 22 + 3e40: fe cf rjmp .-4 ; 0x3e3e + LED_PIN |= _BV(LED); + 3e42: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3e44: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 3e46: 81 50 subi r24, 0x01 ; 1 + 3e48: a9 f7 brne .-22 ; 0x3e34 + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e4a: dd 24 eor r13, r13 + 3e4c: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3e4e: a5 e0 ldi r26, 0x05 ; 5 + 3e50: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3e52: f1 e1 ldi r31, 0x11 ; 17 + 3e54: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 3e56: a4 d0 rcall .+328 ; 0x3fa0 + + if(ch == STK_GET_PARAMETER) { + 3e58: 81 34 cpi r24, 0x41 ; 65 + 3e5a: 21 f4 brne .+8 ; 0x3e64 + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e5c: 81 e0 ldi r24, 0x01 ; 1 + 3e5e: be d0 rcall .+380 ; 0x3fdc + putch(0x03); + 3e60: 83 e0 ldi r24, 0x03 ; 3 + 3e62: 24 c0 rjmp .+72 ; 0x3eac + } + else if(ch == STK_SET_DEVICE) { + 3e64: 82 34 cpi r24, 0x42 ; 66 + 3e66: 11 f4 brne .+4 ; 0x3e6c + // SET DEVICE is ignored + getNch(20); + 3e68: 84 e1 ldi r24, 0x14 ; 20 + 3e6a: 03 c0 rjmp .+6 ; 0x3e72 + } + else if(ch == STK_SET_DEVICE_EXT) { + 3e6c: 85 34 cpi r24, 0x45 ; 69 + 3e6e: 19 f4 brne .+6 ; 0x3e76 + // SET DEVICE EXT is ignored + getNch(5); + 3e70: 85 e0 ldi r24, 0x05 ; 5 + 3e72: b4 d0 rcall .+360 ; 0x3fdc + 3e74: 8a c0 rjmp .+276 ; 0x3f8a + } + else if(ch == STK_LOAD_ADDRESS) { + 3e76: 85 35 cpi r24, 0x55 ; 85 + 3e78: a1 f4 brne .+40 ; 0x3ea2 + // LOAD ADDRESS + address = getch(); + 3e7a: 92 d0 rcall .+292 ; 0x3fa0 + 3e7c: 08 2f mov r16, r24 + 3e7e: 10 e0 ldi r17, 0x00 ; 0 + 3e80: 10 93 01 02 sts 0x0201, r17 + 3e84: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 3e88: 8b d0 rcall .+278 ; 0x3fa0 + 3e8a: 90 e0 ldi r25, 0x00 ; 0 + 3e8c: 98 2f mov r25, r24 + 3e8e: 88 27 eor r24, r24 + 3e90: 80 2b or r24, r16 + 3e92: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 3e94: 88 0f add r24, r24 + 3e96: 99 1f adc r25, r25 + 3e98: 90 93 01 02 sts 0x0201, r25 + 3e9c: 80 93 00 02 sts 0x0200, r24 + 3ea0: 73 c0 rjmp .+230 ; 0x3f88 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 3ea2: 86 35 cpi r24, 0x56 ; 86 + 3ea4: 29 f4 brne .+10 ; 0x3eb0 + // UNIVERSAL command is ignored + getNch(4); + 3ea6: 84 e0 ldi r24, 0x04 ; 4 + 3ea8: 99 d0 rcall .+306 ; 0x3fdc + putch(0x00); + 3eaa: 80 e0 ldi r24, 0x00 ; 0 + 3eac: 71 d0 rcall .+226 ; 0x3f90 + 3eae: 6d c0 rjmp .+218 ; 0x3f8a + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 3eb0: 84 36 cpi r24, 0x64 ; 100 + 3eb2: 09 f0 breq .+2 ; 0x3eb6 + 3eb4: 43 c0 rjmp .+134 ; 0x3f3c + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 3eb6: 7c d0 rcall .+248 ; 0x3fb0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 3eb8: e0 91 00 02 lds r30, 0x0200 + 3ebc: f0 91 01 02 lds r31, 0x0201 + 3ec0: 83 e0 ldi r24, 0x03 ; 3 + 3ec2: 80 93 57 00 sts 0x0057, r24 + 3ec6: e8 95 spm + 3ec8: c0 e0 ldi r28, 0x00 ; 0 + 3eca: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 3ecc: 69 d0 rcall .+210 ; 0x3fa0 + 3ece: 89 93 st Y+, r24 + while (--length); + 3ed0: 80 91 02 02 lds r24, 0x0202 + 3ed4: 81 50 subi r24, 0x01 ; 1 + 3ed6: 80 93 02 02 sts 0x0202, r24 + 3eda: 88 23 and r24, r24 + 3edc: b9 f7 brne .-18 ; 0x3ecc + + // Read command terminator, start reply + verifySpace(); + 3ede: 78 d0 rcall .+240 ; 0x3fd0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 3ee0: 07 b6 in r0, 0x37 ; 55 + 3ee2: 00 fc sbrc r0, 0 + 3ee4: fd cf rjmp .-6 ; 0x3ee0 + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 3ee6: 40 91 00 02 lds r20, 0x0200 + 3eea: 50 91 01 02 lds r21, 0x0201 + 3eee: a0 e0 ldi r26, 0x00 ; 0 + 3ef0: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 3ef2: 2c 91 ld r18, X + 3ef4: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 3ef6: 11 96 adiw r26, 0x01 ; 1 + 3ef8: 8c 91 ld r24, X + 3efa: 11 97 sbiw r26, 0x01 ; 1 + 3efc: 90 e0 ldi r25, 0x00 ; 0 + 3efe: 98 2f mov r25, r24 + 3f00: 88 27 eor r24, r24 + 3f02: 82 2b or r24, r18 + 3f04: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3f06: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 3f08: fa 01 movw r30, r20 + 3f0a: 0c 01 movw r0, r24 + 3f0c: d0 92 57 00 sts 0x0057, r13 + 3f10: e8 95 spm + 3f12: 11 24 eor r1, r1 + addrPtr += 2; + 3f14: 4e 5f subi r20, 0xFE ; 254 + 3f16: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 3f18: f1 e0 ldi r31, 0x01 ; 1 + 3f1a: a0 38 cpi r26, 0x80 ; 128 + 3f1c: bf 07 cpc r27, r31 + 3f1e: 49 f7 brne .-46 ; 0x3ef2 + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3f20: e0 91 00 02 lds r30, 0x0200 + 3f24: f0 91 01 02 lds r31, 0x0201 + 3f28: e0 92 57 00 sts 0x0057, r14 + 3f2c: e8 95 spm + boot_spm_busy_wait(); + 3f2e: 07 b6 in r0, 0x37 ; 55 + 3f30: 00 fc sbrc r0, 0 + 3f32: fd cf rjmp .-6 ; 0x3f2e + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3f34: f0 92 57 00 sts 0x0057, r15 + 3f38: e8 95 spm + 3f3a: 27 c0 rjmp .+78 ; 0x3f8a +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 3f3c: 84 37 cpi r24, 0x74 ; 116 + 3f3e: b9 f4 brne .+46 ; 0x3f6e + // READ PAGE - we only read flash + getLen(); + 3f40: 37 d0 rcall .+110 ; 0x3fb0 + verifySpace(); + 3f42: 46 d0 rcall .+140 ; 0x3fd0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 3f44: e0 91 00 02 lds r30, 0x0200 + 3f48: f0 91 01 02 lds r31, 0x0201 + 3f4c: 31 96 adiw r30, 0x01 ; 1 + 3f4e: f0 93 01 02 sts 0x0201, r31 + 3f52: e0 93 00 02 sts 0x0200, r30 + 3f56: 31 97 sbiw r30, 0x01 ; 1 + 3f58: e4 91 lpm r30, Z+ + 3f5a: 8e 2f mov r24, r30 + 3f5c: 19 d0 rcall .+50 ; 0x3f90 + while (--length); + 3f5e: 80 91 02 02 lds r24, 0x0202 + 3f62: 81 50 subi r24, 0x01 ; 1 + 3f64: 80 93 02 02 sts 0x0202, r24 + 3f68: 88 23 and r24, r24 + 3f6a: 61 f7 brne .-40 ; 0x3f44 + 3f6c: 0e c0 rjmp .+28 ; 0x3f8a +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 3f6e: 85 37 cpi r24, 0x75 ; 117 + 3f70: 39 f4 brne .+14 ; 0x3f80 + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 3f72: 2e d0 rcall .+92 ; 0x3fd0 + putch(SIGNATURE_0); + 3f74: 8e e1 ldi r24, 0x1E ; 30 + 3f76: 0c d0 rcall .+24 ; 0x3f90 + putch(SIGNATURE_1); + 3f78: 84 e9 ldi r24, 0x94 ; 148 + 3f7a: 0a d0 rcall .+20 ; 0x3f90 + putch(SIGNATURE_2); + 3f7c: 86 e0 ldi r24, 0x06 ; 6 + 3f7e: 96 cf rjmp .-212 ; 0x3eac + } + else if (ch == 'Q') { + 3f80: 81 35 cpi r24, 0x51 ; 81 + 3f82: 11 f4 brne .+4 ; 0x3f88 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 3f84: 88 e0 ldi r24, 0x08 ; 8 + 3f86: 19 d0 rcall .+50 ; 0x3fba + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 3f88: 23 d0 rcall .+70 ; 0x3fd0 + } + putch(STK_OK); + 3f8a: 80 e1 ldi r24, 0x10 ; 16 + 3f8c: 01 d0 rcall .+2 ; 0x3f90 + 3f8e: 63 cf rjmp .-314 ; 0x3e56 + +00003f90 : + } +} + +void putch(char ch) { + 3f90: 98 2f mov r25, r24 +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + 3f92: 80 91 c0 00 lds r24, 0x00C0 + 3f96: 85 ff sbrs r24, 5 + 3f98: fc cf rjmp .-8 ; 0x3f92 + UDR0 = ch; + 3f9a: 90 93 c6 00 sts 0x00C6, r25 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 3f9e: 08 95 ret + +00003fa0 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3fa0: a8 95 wdr + [uartBit] "I" (UART_RX_BIT) + : + "r25" +); +#else + while(!(UCSR0A & _BV(RXC0))); + 3fa2: 80 91 c0 00 lds r24, 0x00C0 + 3fa6: 87 ff sbrs r24, 7 + 3fa8: fc cf rjmp .-8 ; 0x3fa2 + ch = UDR0; + 3faa: 80 91 c6 00 lds r24, 0x00C6 +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 3fae: 08 95 ret + +00003fb0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 3fb0: f7 df rcall .-18 ; 0x3fa0 + length = getch(); + 3fb2: f6 df rcall .-20 ; 0x3fa0 + 3fb4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 3fb8: f3 cf rjmp .-26 ; 0x3fa0 + +00003fba : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 3fba: e0 e6 ldi r30, 0x60 ; 96 + 3fbc: f0 e0 ldi r31, 0x00 ; 0 + 3fbe: 98 e1 ldi r25, 0x18 ; 24 + 3fc0: 90 83 st Z, r25 + WDTCSR = x; + 3fc2: 80 83 st Z, r24 +} + 3fc4: 08 95 ret + +00003fc6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 3fc6: 80 e0 ldi r24, 0x00 ; 0 + 3fc8: f8 df rcall .-16 ; 0x3fba + __asm__ __volatile__ ( + 3fca: ee 27 eor r30, r30 + 3fcc: ff 27 eor r31, r31 + 3fce: 09 94 ijmp + +00003fd0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 3fd0: e7 df rcall .-50 ; 0x3fa0 + 3fd2: 80 32 cpi r24, 0x20 ; 32 + 3fd4: 09 f0 breq .+2 ; 0x3fd8 + 3fd6: f7 df rcall .-18 ; 0x3fc6 + putch(STK_INSYNC); + 3fd8: 84 e1 ldi r24, 0x14 ; 20 +} + 3fda: da cf rjmp .-76 ; 0x3f90 + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 3fdc: 1f 93 push r17 + 3fde: 18 2f mov r17, r24 + +00003fe0 : + do getch(); while (--count); + 3fe0: df df rcall .-66 ; 0x3fa0 + 3fe2: 11 50 subi r17, 0x01 ; 1 + 3fe4: e9 f7 brne .-6 ; 0x3fe0 + verifySpace(); + 3fe6: f4 df rcall .-24 ; 0x3fd0 +} + 3fe8: 1f 91 pop r17 + 3fea: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.hex new file mode 100644 index 0000000..19c9ae4 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.hex @@ -0,0 +1,33 @@ +:103E000085E08093810082E08093C00088E1809308 +:103E1000C10086E08093C20085E18093C40084B72E +:103E200014BE81FFD0D08DE0C8D0259A86E02CE367 +:103E30003BEF91E0309385002093840096BBB09BCC +:103E4000FECF1D9AA8958150A9F7DD24D394A5E053 +:103E5000EA2EF1E1FF2EA4D0813421F481E0BED01E +:103E600083E024C0823411F484E103C0853419F462 +:103E700085E0B4D08AC08535A1F492D0082F10E037 +:103E800010930102009300028BD090E0982F8827B6 +:103E9000802B912B880F991F909301028093000231 +:103EA00073C0863529F484E099D080E071D06DC06C +:103EB000843609F043C07CD0E0910002F091010209 +:103EC00083E080935700E895C0E0D1E069D0899302 +:103ED000809102028150809302028823B9F778D042 +:103EE00007B600FCFDCF4091000250910102A0E016 +:103EF000B1E02C9130E011968C91119790E0982FC1 +:103F00008827822B932B1296FA010C01D09257002E +:103F1000E89511244E5F5F4FF1E0A038BF0749F7E5 +:103F2000E0910002F0910102E0925700E89507B697 +:103F300000FCFDCFF0925700E89527C08437B9F414 +:103F400037D046D0E0910002F09101023196F09313 +:103F50000102E09300023197E4918E2F19D08091F5 +:103F60000202815080930202882361F70EC08537D8 +:103F700039F42ED08EE10CD084E90AD086E096CFB9 +:103F8000813511F488E019D023D080E101D063CFCE +:103F9000982F8091C00085FFFCCF9093C6000895B4 +:103FA000A8958091C00087FFFCCF8091C60008953E +:103FB000F7DFF6DF80930202F3CFE0E6F0E098E16E +:103FC00090838083089580E0F8DFEE27FF2709942F +:103FD000E7DF803209F0F7DF84E1DACF1F93182F93 +:0C3FE000DFDF1150E9F7F4DF1F910895B6 +:0400000300003E00BB +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.lst new file mode 100644 index 0000000..62178d3 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_20mhz.lst @@ -0,0 +1,520 @@ + +optiboot_pro_20mhz.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001ec 00003e00 00003e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000240 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 0000006a 00000000 00000000 00000268 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000269 00000000 00000000 000002d2 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000196 00000000 00000000 0000053b 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003d3 00000000 00000000 000006d1 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 00000090 00000000 00000000 00000aa4 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 00000135 00000000 00000000 00000b34 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001d1 00000000 00000000 00000c69 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000068 00000000 00000000 00000e3a 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00003e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3e00: 85 e0 ldi r24, 0x05 ; 5 + 3e02: 80 93 81 00 sts 0x0081, r24 +#if LED_START_FLASHES > 0 + // Set up Timer 1 for timeout counter + TCCR1B = _BV(CS12) | _BV(CS10); // div 1024 +#endif +#ifndef SOFT_UART + UCSR0A = _BV(U2X0); //Double speed mode USART0 + 3e06: 82 e0 ldi r24, 0x02 ; 2 + 3e08: 80 93 c0 00 sts 0x00C0, r24 + UCSR0B = _BV(RXEN0) | _BV(TXEN0); + 3e0c: 88 e1 ldi r24, 0x18 ; 24 + 3e0e: 80 93 c1 00 sts 0x00C1, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + 3e12: 86 e0 ldi r24, 0x06 ; 6 + 3e14: 80 93 c2 00 sts 0x00C2, r24 + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); + 3e18: 85 e1 ldi r24, 0x15 ; 21 + 3e1a: 80 93 c4 00 sts 0x00C4, r24 +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 3e1e: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 3e20: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 3e22: 81 ff sbrs r24, 1 + 3e24: d0 d0 rcall .+416 ; 0x3fc6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 3e26: 8d e0 ldi r24, 0x0D ; 13 + 3e28: c8 d0 rcall .+400 ; 0x3fba + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 3e2a: 25 9a sbi 0x04, 5 ; 4 + 3e2c: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e2e: 2c e3 ldi r18, 0x3C ; 60 + 3e30: 3b ef ldi r19, 0xFB ; 251 + TIFR1 = _BV(TOV1); + 3e32: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e34: 30 93 85 00 sts 0x0085, r19 + 3e38: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 3e3c: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 3e3e: b0 9b sbis 0x16, 0 ; 22 + 3e40: fe cf rjmp .-4 ; 0x3e3e + LED_PIN |= _BV(LED); + 3e42: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3e44: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 3e46: 81 50 subi r24, 0x01 ; 1 + 3e48: a9 f7 brne .-22 ; 0x3e34 + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e4a: dd 24 eor r13, r13 + 3e4c: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3e4e: a5 e0 ldi r26, 0x05 ; 5 + 3e50: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3e52: f1 e1 ldi r31, 0x11 ; 17 + 3e54: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 3e56: a4 d0 rcall .+328 ; 0x3fa0 + + if(ch == STK_GET_PARAMETER) { + 3e58: 81 34 cpi r24, 0x41 ; 65 + 3e5a: 21 f4 brne .+8 ; 0x3e64 + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e5c: 81 e0 ldi r24, 0x01 ; 1 + 3e5e: be d0 rcall .+380 ; 0x3fdc + putch(0x03); + 3e60: 83 e0 ldi r24, 0x03 ; 3 + 3e62: 24 c0 rjmp .+72 ; 0x3eac + } + else if(ch == STK_SET_DEVICE) { + 3e64: 82 34 cpi r24, 0x42 ; 66 + 3e66: 11 f4 brne .+4 ; 0x3e6c + // SET DEVICE is ignored + getNch(20); + 3e68: 84 e1 ldi r24, 0x14 ; 20 + 3e6a: 03 c0 rjmp .+6 ; 0x3e72 + } + else if(ch == STK_SET_DEVICE_EXT) { + 3e6c: 85 34 cpi r24, 0x45 ; 69 + 3e6e: 19 f4 brne .+6 ; 0x3e76 + // SET DEVICE EXT is ignored + getNch(5); + 3e70: 85 e0 ldi r24, 0x05 ; 5 + 3e72: b4 d0 rcall .+360 ; 0x3fdc + 3e74: 8a c0 rjmp .+276 ; 0x3f8a + } + else if(ch == STK_LOAD_ADDRESS) { + 3e76: 85 35 cpi r24, 0x55 ; 85 + 3e78: a1 f4 brne .+40 ; 0x3ea2 + // LOAD ADDRESS + address = getch(); + 3e7a: 92 d0 rcall .+292 ; 0x3fa0 + 3e7c: 08 2f mov r16, r24 + 3e7e: 10 e0 ldi r17, 0x00 ; 0 + 3e80: 10 93 01 02 sts 0x0201, r17 + 3e84: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 3e88: 8b d0 rcall .+278 ; 0x3fa0 + 3e8a: 90 e0 ldi r25, 0x00 ; 0 + 3e8c: 98 2f mov r25, r24 + 3e8e: 88 27 eor r24, r24 + 3e90: 80 2b or r24, r16 + 3e92: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 3e94: 88 0f add r24, r24 + 3e96: 99 1f adc r25, r25 + 3e98: 90 93 01 02 sts 0x0201, r25 + 3e9c: 80 93 00 02 sts 0x0200, r24 + 3ea0: 73 c0 rjmp .+230 ; 0x3f88 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 3ea2: 86 35 cpi r24, 0x56 ; 86 + 3ea4: 29 f4 brne .+10 ; 0x3eb0 + // UNIVERSAL command is ignored + getNch(4); + 3ea6: 84 e0 ldi r24, 0x04 ; 4 + 3ea8: 99 d0 rcall .+306 ; 0x3fdc + putch(0x00); + 3eaa: 80 e0 ldi r24, 0x00 ; 0 + 3eac: 71 d0 rcall .+226 ; 0x3f90 + 3eae: 6d c0 rjmp .+218 ; 0x3f8a + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 3eb0: 84 36 cpi r24, 0x64 ; 100 + 3eb2: 09 f0 breq .+2 ; 0x3eb6 + 3eb4: 43 c0 rjmp .+134 ; 0x3f3c + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 3eb6: 7c d0 rcall .+248 ; 0x3fb0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 3eb8: e0 91 00 02 lds r30, 0x0200 + 3ebc: f0 91 01 02 lds r31, 0x0201 + 3ec0: 83 e0 ldi r24, 0x03 ; 3 + 3ec2: 80 93 57 00 sts 0x0057, r24 + 3ec6: e8 95 spm + 3ec8: c0 e0 ldi r28, 0x00 ; 0 + 3eca: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 3ecc: 69 d0 rcall .+210 ; 0x3fa0 + 3ece: 89 93 st Y+, r24 + while (--length); + 3ed0: 80 91 02 02 lds r24, 0x0202 + 3ed4: 81 50 subi r24, 0x01 ; 1 + 3ed6: 80 93 02 02 sts 0x0202, r24 + 3eda: 88 23 and r24, r24 + 3edc: b9 f7 brne .-18 ; 0x3ecc + + // Read command terminator, start reply + verifySpace(); + 3ede: 78 d0 rcall .+240 ; 0x3fd0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 3ee0: 07 b6 in r0, 0x37 ; 55 + 3ee2: 00 fc sbrc r0, 0 + 3ee4: fd cf rjmp .-6 ; 0x3ee0 + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 3ee6: 40 91 00 02 lds r20, 0x0200 + 3eea: 50 91 01 02 lds r21, 0x0201 + 3eee: a0 e0 ldi r26, 0x00 ; 0 + 3ef0: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 3ef2: 2c 91 ld r18, X + 3ef4: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 3ef6: 11 96 adiw r26, 0x01 ; 1 + 3ef8: 8c 91 ld r24, X + 3efa: 11 97 sbiw r26, 0x01 ; 1 + 3efc: 90 e0 ldi r25, 0x00 ; 0 + 3efe: 98 2f mov r25, r24 + 3f00: 88 27 eor r24, r24 + 3f02: 82 2b or r24, r18 + 3f04: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3f06: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 3f08: fa 01 movw r30, r20 + 3f0a: 0c 01 movw r0, r24 + 3f0c: d0 92 57 00 sts 0x0057, r13 + 3f10: e8 95 spm + 3f12: 11 24 eor r1, r1 + addrPtr += 2; + 3f14: 4e 5f subi r20, 0xFE ; 254 + 3f16: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 3f18: f1 e0 ldi r31, 0x01 ; 1 + 3f1a: a0 38 cpi r26, 0x80 ; 128 + 3f1c: bf 07 cpc r27, r31 + 3f1e: 49 f7 brne .-46 ; 0x3ef2 + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3f20: e0 91 00 02 lds r30, 0x0200 + 3f24: f0 91 01 02 lds r31, 0x0201 + 3f28: e0 92 57 00 sts 0x0057, r14 + 3f2c: e8 95 spm + boot_spm_busy_wait(); + 3f2e: 07 b6 in r0, 0x37 ; 55 + 3f30: 00 fc sbrc r0, 0 + 3f32: fd cf rjmp .-6 ; 0x3f2e + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3f34: f0 92 57 00 sts 0x0057, r15 + 3f38: e8 95 spm + 3f3a: 27 c0 rjmp .+78 ; 0x3f8a +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 3f3c: 84 37 cpi r24, 0x74 ; 116 + 3f3e: b9 f4 brne .+46 ; 0x3f6e + // READ PAGE - we only read flash + getLen(); + 3f40: 37 d0 rcall .+110 ; 0x3fb0 + verifySpace(); + 3f42: 46 d0 rcall .+140 ; 0x3fd0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 3f44: e0 91 00 02 lds r30, 0x0200 + 3f48: f0 91 01 02 lds r31, 0x0201 + 3f4c: 31 96 adiw r30, 0x01 ; 1 + 3f4e: f0 93 01 02 sts 0x0201, r31 + 3f52: e0 93 00 02 sts 0x0200, r30 + 3f56: 31 97 sbiw r30, 0x01 ; 1 + 3f58: e4 91 lpm r30, Z+ + 3f5a: 8e 2f mov r24, r30 + 3f5c: 19 d0 rcall .+50 ; 0x3f90 + while (--length); + 3f5e: 80 91 02 02 lds r24, 0x0202 + 3f62: 81 50 subi r24, 0x01 ; 1 + 3f64: 80 93 02 02 sts 0x0202, r24 + 3f68: 88 23 and r24, r24 + 3f6a: 61 f7 brne .-40 ; 0x3f44 + 3f6c: 0e c0 rjmp .+28 ; 0x3f8a +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 3f6e: 85 37 cpi r24, 0x75 ; 117 + 3f70: 39 f4 brne .+14 ; 0x3f80 + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 3f72: 2e d0 rcall .+92 ; 0x3fd0 + putch(SIGNATURE_0); + 3f74: 8e e1 ldi r24, 0x1E ; 30 + 3f76: 0c d0 rcall .+24 ; 0x3f90 + putch(SIGNATURE_1); + 3f78: 84 e9 ldi r24, 0x94 ; 148 + 3f7a: 0a d0 rcall .+20 ; 0x3f90 + putch(SIGNATURE_2); + 3f7c: 86 e0 ldi r24, 0x06 ; 6 + 3f7e: 96 cf rjmp .-212 ; 0x3eac + } + else if (ch == 'Q') { + 3f80: 81 35 cpi r24, 0x51 ; 81 + 3f82: 11 f4 brne .+4 ; 0x3f88 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 3f84: 88 e0 ldi r24, 0x08 ; 8 + 3f86: 19 d0 rcall .+50 ; 0x3fba + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 3f88: 23 d0 rcall .+70 ; 0x3fd0 + } + putch(STK_OK); + 3f8a: 80 e1 ldi r24, 0x10 ; 16 + 3f8c: 01 d0 rcall .+2 ; 0x3f90 + 3f8e: 63 cf rjmp .-314 ; 0x3e56 + +00003f90 : + } +} + +void putch(char ch) { + 3f90: 98 2f mov r25, r24 +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + 3f92: 80 91 c0 00 lds r24, 0x00C0 + 3f96: 85 ff sbrs r24, 5 + 3f98: fc cf rjmp .-8 ; 0x3f92 + UDR0 = ch; + 3f9a: 90 93 c6 00 sts 0x00C6, r25 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 3f9e: 08 95 ret + +00003fa0 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3fa0: a8 95 wdr + [uartBit] "I" (UART_RX_BIT) + : + "r25" +); +#else + while(!(UCSR0A & _BV(RXC0))); + 3fa2: 80 91 c0 00 lds r24, 0x00C0 + 3fa6: 87 ff sbrs r24, 7 + 3fa8: fc cf rjmp .-8 ; 0x3fa2 + ch = UDR0; + 3faa: 80 91 c6 00 lds r24, 0x00C6 +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 3fae: 08 95 ret + +00003fb0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 3fb0: f7 df rcall .-18 ; 0x3fa0 + length = getch(); + 3fb2: f6 df rcall .-20 ; 0x3fa0 + 3fb4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 3fb8: f3 cf rjmp .-26 ; 0x3fa0 + +00003fba : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 3fba: e0 e6 ldi r30, 0x60 ; 96 + 3fbc: f0 e0 ldi r31, 0x00 ; 0 + 3fbe: 98 e1 ldi r25, 0x18 ; 24 + 3fc0: 90 83 st Z, r25 + WDTCSR = x; + 3fc2: 80 83 st Z, r24 +} + 3fc4: 08 95 ret + +00003fc6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 3fc6: 80 e0 ldi r24, 0x00 ; 0 + 3fc8: f8 df rcall .-16 ; 0x3fba + __asm__ __volatile__ ( + 3fca: ee 27 eor r30, r30 + 3fcc: ff 27 eor r31, r31 + 3fce: 09 94 ijmp + +00003fd0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 3fd0: e7 df rcall .-50 ; 0x3fa0 + 3fd2: 80 32 cpi r24, 0x20 ; 32 + 3fd4: 09 f0 breq .+2 ; 0x3fd8 + 3fd6: f7 df rcall .-18 ; 0x3fc6 + putch(STK_INSYNC); + 3fd8: 84 e1 ldi r24, 0x14 ; 20 +} + 3fda: da cf rjmp .-76 ; 0x3f90 + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 3fdc: 1f 93 push r17 + 3fde: 18 2f mov r17, r24 + +00003fe0 : + do getch(); while (--count); + 3fe0: df df rcall .-66 ; 0x3fa0 + 3fe2: 11 50 subi r17, 0x01 ; 1 + 3fe4: e9 f7 brne .-6 ; 0x3fe0 + verifySpace(); + 3fe6: f4 df rcall .-24 ; 0x3fd0 +} + 3fe8: 1f 91 pop r17 + 3fea: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.hex b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.hex new file mode 100644 index 0000000..9d31a7a --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.hex @@ -0,0 +1,34 @@ +:103E000085E08093810084B714BE81FFE4D08DE00B +:103E1000DCD0259A519A86E028E13EEF91E030937C +:103E200085002093840096BBB09BFECF1D9AA89579 +:103E30008150A9F7DD24D394A5E0EA2EF1E1FF2E0D +:103E4000ABD0813421F481E0D1D083E024C082342E +:103E500011F484E103C0853419F485E0C7D08AC029 +:103E60008535A1F499D0082F10E01093010200933A +:103E7000000292D090E0982F8827802B912B880FFA +:103E8000991F909301028093000273C0863529F434 +:103E900084E0ACD080E071D06DC0843609F043C0BE +:103EA0008FD0E0910002F091010283E080935700EF +:103EB000E895C0E0D1E070D08993809102028150F2 +:103EC000809302028823B9F78BD007B600FCFDCFA0 +:103ED0004091000250910102A0E0B1E02C9130E04D +:103EE00011968C91119790E0982F8827822B932B15 +:103EF0001296FA010C01D0925700E89511244E5FFA +:103F00005F4FF1E0A038BF0749F7E0910002F09160 +:103F10000102E0925700E89507B600FCFDCFF09251 +:103F20005700E89527C08437B9F44AD059D0E091BA +:103F30000002F09101023196F0930102E093000239 +:103F40003197E4918E2F19D0809102028150809395 +:103F50000202882361F70EC0853739F441D08EE123 +:103F60000CD084E90AD086E096CF813511F488E040 +:103F70002CD036D080E101D063CF2AE030E08095AC +:103F8000089410F4599802C0599A000015D014D022 +:103F900086952A95B1F70895A89529E030E04899CB +:103FA000FECF0AD009D008D08894489908942A9561 +:103FB00011F08795F7CF089598E09A95F1F7089555 +:103FC000EBDFEADF80930202E7CFE0E6F0E098E182 +:103FD00090838083089580E0F8DFEE27FF2709941F +:103FE000DBDF803209F0F7DF84E1C7CF1F93182FA2 +:0C3FF000D3DF1150E9F7F4DF1F910895B2 +:0400000300003E00BB +:00000001FF diff --git a/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.lst b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.lst new file mode 100644 index 0000000..94603e2 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/optiboot/optiboot_pro_8MHz.lst @@ -0,0 +1,533 @@ + +optiboot_pro_8MHz.elf: file format elf32-avr + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .text 000001fc 00003e00 00003e00 00000054 2**1 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 .debug_aranges 00000028 00000000 00000000 00000250 2**0 + CONTENTS, READONLY, DEBUGGING + 2 .debug_pubnames 00000078 00000000 00000000 00000278 2**0 + CONTENTS, READONLY, DEBUGGING + 3 .debug_info 00000277 00000000 00000000 000002f0 2**0 + CONTENTS, READONLY, DEBUGGING + 4 .debug_abbrev 00000194 00000000 00000000 00000567 2**0 + CONTENTS, READONLY, DEBUGGING + 5 .debug_line 000003bb 00000000 00000000 000006fb 2**0 + CONTENTS, READONLY, DEBUGGING + 6 .debug_frame 000000a0 00000000 00000000 00000ab8 2**2 + CONTENTS, READONLY, DEBUGGING + 7 .debug_str 0000013f 00000000 00000000 00000b58 2**0 + CONTENTS, READONLY, DEBUGGING + 8 .debug_loc 000001a0 00000000 00000000 00000c97 2**0 + CONTENTS, READONLY, DEBUGGING + 9 .debug_ranges 00000070 00000000 00000000 00000e37 2**0 + CONTENTS, READONLY, DEBUGGING + +Disassembly of section .text: + +00003e00
: +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3e00: 85 e0 ldi r24, 0x05 ; 5 + 3e02: 80 93 81 00 sts 0x0081, r24 + UCSR0C = _BV(UCSZ00) | _BV(UCSZ01); + UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 ); +#endif + + // Adaboot no-wait mod + ch = MCUSR; + 3e06: 84 b7 in r24, 0x34 ; 52 + MCUSR = 0; + 3e08: 14 be out 0x34, r1 ; 52 + if (!(ch & _BV(EXTRF))) appStart(); + 3e0a: 81 ff sbrs r24, 1 + 3e0c: e4 d0 rcall .+456 ; 0x3fd6 + + // Set up watchdog to trigger after 500ms + watchdogConfig(WATCHDOG_500MS); + 3e0e: 8d e0 ldi r24, 0x0D ; 13 + 3e10: dc d0 rcall .+440 ; 0x3fca + + /* Set LED pin as output */ + LED_DDR |= _BV(LED); + 3e12: 25 9a sbi 0x04, 5 ; 4 + +#ifdef SOFT_UART + /* Set TX pin as output */ + UART_DDR |= _BV(UART_TX_BIT); + 3e14: 51 9a sbi 0x0a, 1 ; 10 + 3e16: 86 e0 ldi r24, 0x06 ; 6 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e18: 28 e1 ldi r18, 0x18 ; 24 + 3e1a: 3e ef ldi r19, 0xFE ; 254 + TIFR1 = _BV(TOV1); + 3e1c: 91 e0 ldi r25, 0x01 ; 1 +} + +#if LED_START_FLASHES > 0 +void flash_led(uint8_t count) { + do { + TCNT1 = -(F_CPU/(1024*16)); + 3e1e: 30 93 85 00 sts 0x0085, r19 + 3e22: 20 93 84 00 sts 0x0084, r18 + TIFR1 = _BV(TOV1); + 3e26: 96 bb out 0x16, r25 ; 22 + while(!(TIFR1 & _BV(TOV1))); + 3e28: b0 9b sbis 0x16, 0 ; 22 + 3e2a: fe cf rjmp .-4 ; 0x3e28 + LED_PIN |= _BV(LED); + 3e2c: 1d 9a sbi 0x03, 5 ; 3 + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3e2e: a8 95 wdr + TCNT1 = -(F_CPU/(1024*16)); + TIFR1 = _BV(TOV1); + while(!(TIFR1 & _BV(TOV1))); + LED_PIN |= _BV(LED); + watchdogReset(); + } while (--count); + 3e30: 81 50 subi r24, 0x01 ; 1 + 3e32: a9 f7 brne .-22 ; 0x3e1e + /* get character from UART */ + ch = getch(); + + if(ch == STK_GET_PARAMETER) { + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e34: dd 24 eor r13, r13 + 3e36: d3 94 inc r13 + boot_page_fill((uint16_t)(void*)addrPtr,a); + addrPtr += 2; + } while (--ch); + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3e38: a5 e0 ldi r26, 0x05 ; 5 + 3e3a: ea 2e mov r14, r26 + boot_spm_busy_wait(); + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3e3c: f1 e1 ldi r31, 0x11 ; 17 + 3e3e: ff 2e mov r15, r31 +#endif + + /* Forever loop */ + for (;;) { + /* get character from UART */ + ch = getch(); + 3e40: ab d0 rcall .+342 ; 0x3f98 + + if(ch == STK_GET_PARAMETER) { + 3e42: 81 34 cpi r24, 0x41 ; 65 + 3e44: 21 f4 brne .+8 ; 0x3e4e + // GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy + getNch(1); + 3e46: 81 e0 ldi r24, 0x01 ; 1 + 3e48: d1 d0 rcall .+418 ; 0x3fec + putch(0x03); + 3e4a: 83 e0 ldi r24, 0x03 ; 3 + 3e4c: 24 c0 rjmp .+72 ; 0x3e96 + } + else if(ch == STK_SET_DEVICE) { + 3e4e: 82 34 cpi r24, 0x42 ; 66 + 3e50: 11 f4 brne .+4 ; 0x3e56 + // SET DEVICE is ignored + getNch(20); + 3e52: 84 e1 ldi r24, 0x14 ; 20 + 3e54: 03 c0 rjmp .+6 ; 0x3e5c + } + else if(ch == STK_SET_DEVICE_EXT) { + 3e56: 85 34 cpi r24, 0x45 ; 69 + 3e58: 19 f4 brne .+6 ; 0x3e60 + // SET DEVICE EXT is ignored + getNch(5); + 3e5a: 85 e0 ldi r24, 0x05 ; 5 + 3e5c: c7 d0 rcall .+398 ; 0x3fec + 3e5e: 8a c0 rjmp .+276 ; 0x3f74 + } + else if(ch == STK_LOAD_ADDRESS) { + 3e60: 85 35 cpi r24, 0x55 ; 85 + 3e62: a1 f4 brne .+40 ; 0x3e8c + // LOAD ADDRESS + address = getch(); + 3e64: 99 d0 rcall .+306 ; 0x3f98 + 3e66: 08 2f mov r16, r24 + 3e68: 10 e0 ldi r17, 0x00 ; 0 + 3e6a: 10 93 01 02 sts 0x0201, r17 + 3e6e: 00 93 00 02 sts 0x0200, r16 + address = (address & 0xff) | (getch() << 8); + 3e72: 92 d0 rcall .+292 ; 0x3f98 + 3e74: 90 e0 ldi r25, 0x00 ; 0 + 3e76: 98 2f mov r25, r24 + 3e78: 88 27 eor r24, r24 + 3e7a: 80 2b or r24, r16 + 3e7c: 91 2b or r25, r17 + address += address; // Convert from word address to byte address + 3e7e: 88 0f add r24, r24 + 3e80: 99 1f adc r25, r25 + 3e82: 90 93 01 02 sts 0x0201, r25 + 3e86: 80 93 00 02 sts 0x0200, r24 + 3e8a: 73 c0 rjmp .+230 ; 0x3f72 + verifySpace(); + } + else if(ch == STK_UNIVERSAL) { + 3e8c: 86 35 cpi r24, 0x56 ; 86 + 3e8e: 29 f4 brne .+10 ; 0x3e9a + // UNIVERSAL command is ignored + getNch(4); + 3e90: 84 e0 ldi r24, 0x04 ; 4 + 3e92: ac d0 rcall .+344 ; 0x3fec + putch(0x00); + 3e94: 80 e0 ldi r24, 0x00 ; 0 + 3e96: 71 d0 rcall .+226 ; 0x3f7a + 3e98: 6d c0 rjmp .+218 ; 0x3f74 + } + /* Write memory, length is big endian and is in bytes */ + else if(ch == STK_PROG_PAGE) { + 3e9a: 84 36 cpi r24, 0x64 ; 100 + 3e9c: 09 f0 breq .+2 ; 0x3ea0 + 3e9e: 43 c0 rjmp .+134 ; 0x3f26 + // PROGRAM PAGE - we support flash programming only, not EEPROM + uint8_t *bufPtr; + uint16_t addrPtr; + + getLen(); + 3ea0: 8f d0 rcall .+286 ; 0x3fc0 + + // Immediately start page erase - this will 4.5ms + boot_page_erase((uint16_t)(void*)address); + 3ea2: e0 91 00 02 lds r30, 0x0200 + 3ea6: f0 91 01 02 lds r31, 0x0201 + 3eaa: 83 e0 ldi r24, 0x03 ; 3 + 3eac: 80 93 57 00 sts 0x0057, r24 + 3eb0: e8 95 spm + 3eb2: c0 e0 ldi r28, 0x00 ; 0 + 3eb4: d1 e0 ldi r29, 0x01 ; 1 + + // While that is going on, read in page contents + bufPtr = buff; + do *bufPtr++ = getch(); + 3eb6: 70 d0 rcall .+224 ; 0x3f98 + 3eb8: 89 93 st Y+, r24 + while (--length); + 3eba: 80 91 02 02 lds r24, 0x0202 + 3ebe: 81 50 subi r24, 0x01 ; 1 + 3ec0: 80 93 02 02 sts 0x0202, r24 + 3ec4: 88 23 and r24, r24 + 3ec6: b9 f7 brne .-18 ; 0x3eb6 + + // Read command terminator, start reply + verifySpace(); + 3ec8: 8b d0 rcall .+278 ; 0x3fe0 + + // If only a partial page is to be programmed, the erase might not be complete. + // So check that here + boot_spm_busy_wait(); + 3eca: 07 b6 in r0, 0x37 ; 55 + 3ecc: 00 fc sbrc r0, 0 + 3ece: fd cf rjmp .-6 ; 0x3eca + } +#endif + + // Copy buffer into programming buffer + bufPtr = buff; + addrPtr = (uint16_t)(void*)address; + 3ed0: 40 91 00 02 lds r20, 0x0200 + 3ed4: 50 91 01 02 lds r21, 0x0201 + 3ed8: a0 e0 ldi r26, 0x00 ; 0 + 3eda: b1 e0 ldi r27, 0x01 ; 1 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + 3edc: 2c 91 ld r18, X + 3ede: 30 e0 ldi r19, 0x00 ; 0 + a |= (*bufPtr++) << 8; + 3ee0: 11 96 adiw r26, 0x01 ; 1 + 3ee2: 8c 91 ld r24, X + 3ee4: 11 97 sbiw r26, 0x01 ; 1 + 3ee6: 90 e0 ldi r25, 0x00 ; 0 + 3ee8: 98 2f mov r25, r24 + 3eea: 88 27 eor r24, r24 + 3eec: 82 2b or r24, r18 + 3eee: 93 2b or r25, r19 +#ifdef VIRTUAL_BOOT_PARTITION +#define rstVect (*(uint16_t*)(0x204)) +#define wdtVect (*(uint16_t*)(0x206)) +#endif +/* main program starts here */ +int main(void) { + 3ef0: 12 96 adiw r26, 0x02 ; 2 + ch = SPM_PAGESIZE / 2; + do { + uint16_t a; + a = *bufPtr++; + a |= (*bufPtr++) << 8; + boot_page_fill((uint16_t)(void*)addrPtr,a); + 3ef2: fa 01 movw r30, r20 + 3ef4: 0c 01 movw r0, r24 + 3ef6: d0 92 57 00 sts 0x0057, r13 + 3efa: e8 95 spm + 3efc: 11 24 eor r1, r1 + addrPtr += 2; + 3efe: 4e 5f subi r20, 0xFE ; 254 + 3f00: 5f 4f sbci r21, 0xFF ; 255 + } while (--ch); + 3f02: f1 e0 ldi r31, 0x01 ; 1 + 3f04: a0 38 cpi r26, 0x80 ; 128 + 3f06: bf 07 cpc r27, r31 + 3f08: 49 f7 brne .-46 ; 0x3edc + + // Write from programming buffer + boot_page_write((uint16_t)(void*)address); + 3f0a: e0 91 00 02 lds r30, 0x0200 + 3f0e: f0 91 01 02 lds r31, 0x0201 + 3f12: e0 92 57 00 sts 0x0057, r14 + 3f16: e8 95 spm + boot_spm_busy_wait(); + 3f18: 07 b6 in r0, 0x37 ; 55 + 3f1a: 00 fc sbrc r0, 0 + 3f1c: fd cf rjmp .-6 ; 0x3f18 + +#if defined(RWWSRE) + // Reenable read access to flash + boot_rww_enable(); + 3f1e: f0 92 57 00 sts 0x0057, r15 + 3f22: e8 95 spm + 3f24: 27 c0 rjmp .+78 ; 0x3f74 +#endif + + } + /* Read memory block mode, length is big endian. */ + else if(ch == STK_READ_PAGE) { + 3f26: 84 37 cpi r24, 0x74 ; 116 + 3f28: b9 f4 brne .+46 ; 0x3f58 + // READ PAGE - we only read flash + getLen(); + 3f2a: 4a d0 rcall .+148 ; 0x3fc0 + verifySpace(); + 3f2c: 59 d0 rcall .+178 ; 0x3fe0 + else ch = pgm_read_byte_near(address); + address++; + putch(ch); + } while (--length); +#else + do putch(pgm_read_byte_near(address++)); + 3f2e: e0 91 00 02 lds r30, 0x0200 + 3f32: f0 91 01 02 lds r31, 0x0201 + 3f36: 31 96 adiw r30, 0x01 ; 1 + 3f38: f0 93 01 02 sts 0x0201, r31 + 3f3c: e0 93 00 02 sts 0x0200, r30 + 3f40: 31 97 sbiw r30, 0x01 ; 1 + 3f42: e4 91 lpm r30, Z+ + 3f44: 8e 2f mov r24, r30 + 3f46: 19 d0 rcall .+50 ; 0x3f7a + while (--length); + 3f48: 80 91 02 02 lds r24, 0x0202 + 3f4c: 81 50 subi r24, 0x01 ; 1 + 3f4e: 80 93 02 02 sts 0x0202, r24 + 3f52: 88 23 and r24, r24 + 3f54: 61 f7 brne .-40 ; 0x3f2e + 3f56: 0e c0 rjmp .+28 ; 0x3f74 +#endif + } + + /* Get device signature bytes */ + else if(ch == STK_READ_SIGN) { + 3f58: 85 37 cpi r24, 0x75 ; 117 + 3f5a: 39 f4 brne .+14 ; 0x3f6a + // READ SIGN - return what Avrdude wants to hear + verifySpace(); + 3f5c: 41 d0 rcall .+130 ; 0x3fe0 + putch(SIGNATURE_0); + 3f5e: 8e e1 ldi r24, 0x1E ; 30 + 3f60: 0c d0 rcall .+24 ; 0x3f7a + putch(SIGNATURE_1); + 3f62: 84 e9 ldi r24, 0x94 ; 148 + 3f64: 0a d0 rcall .+20 ; 0x3f7a + putch(SIGNATURE_2); + 3f66: 86 e0 ldi r24, 0x06 ; 6 + 3f68: 96 cf rjmp .-212 ; 0x3e96 + } + else if (ch == 'Q') { + 3f6a: 81 35 cpi r24, 0x51 ; 81 + 3f6c: 11 f4 brne .+4 ; 0x3f72 + // Adaboot no-wait mod + watchdogConfig(WATCHDOG_16MS); + 3f6e: 88 e0 ldi r24, 0x08 ; 8 + 3f70: 2c d0 rcall .+88 ; 0x3fca + verifySpace(); + } + else { + // This covers the response to commands like STK_ENTER_PROGMODE + verifySpace(); + 3f72: 36 d0 rcall .+108 ; 0x3fe0 + } + putch(STK_OK); + 3f74: 80 e1 ldi r24, 0x10 ; 16 + 3f76: 01 d0 rcall .+2 ; 0x3f7a + 3f78: 63 cf rjmp .-314 ; 0x3e40 + +00003f7a : +void putch(char ch) { +#ifndef SOFT_UART + while (!(UCSR0A & _BV(UDRE0))); + UDR0 = ch; +#else + __asm__ __volatile__ ( + 3f7a: 2a e0 ldi r18, 0x0A ; 10 + 3f7c: 30 e0 ldi r19, 0x00 ; 0 + 3f7e: 80 95 com r24 + 3f80: 08 94 sec + 3f82: 10 f4 brcc .+4 ; 0x3f88 + 3f84: 59 98 cbi 0x0b, 1 ; 11 + 3f86: 02 c0 rjmp .+4 ; 0x3f8c + 3f88: 59 9a sbi 0x0b, 1 ; 11 + 3f8a: 00 00 nop + 3f8c: 15 d0 rcall .+42 ; 0x3fb8 + 3f8e: 14 d0 rcall .+40 ; 0x3fb8 + 3f90: 86 95 lsr r24 + 3f92: 2a 95 dec r18 + 3f94: b1 f7 brne .-20 ; 0x3f82 + [uartBit] "I" (UART_TX_BIT) + : + "r25" + ); +#endif +} + 3f96: 08 95 ret + +00003f98 : + return getch(); +} + +// Watchdog functions. These are only safe with interrupts turned off. +void watchdogReset() { + __asm__ __volatile__ ( + 3f98: a8 95 wdr +#ifdef LED_DATA_FLASH + LED_PIN |= _BV(LED); +#endif + + return ch; +} + 3f9a: 29 e0 ldi r18, 0x09 ; 9 + 3f9c: 30 e0 ldi r19, 0x00 ; 0 + 3f9e: 48 99 sbic 0x09, 0 ; 9 + 3fa0: fe cf rjmp .-4 ; 0x3f9e + 3fa2: 0a d0 rcall .+20 ; 0x3fb8 + 3fa4: 09 d0 rcall .+18 ; 0x3fb8 + 3fa6: 08 d0 rcall .+16 ; 0x3fb8 + 3fa8: 88 94 clc + 3faa: 48 99 sbic 0x09, 0 ; 9 + 3fac: 08 94 sec + 3fae: 2a 95 dec r18 + 3fb0: 11 f0 breq .+4 ; 0x3fb6 + 3fb2: 87 95 ror r24 + 3fb4: f7 cf rjmp .-18 ; 0x3fa4 + 3fb6: 08 95 ret + +00003fb8 : +#if UART_B_VALUE > 255 +#error Baud rate too slow for soft UART +#endif + +void uartDelay() { + __asm__ __volatile__ ( + 3fb8: 98 e0 ldi r25, 0x08 ; 8 + 3fba: 9a 95 dec r25 + 3fbc: f1 f7 brne .-4 ; 0x3fba + 3fbe: 08 95 ret + +00003fc0 : + } while (--count); +} +#endif + +uint8_t getLen() { + getch(); + 3fc0: eb df rcall .-42 ; 0x3f98 + length = getch(); + 3fc2: ea df rcall .-44 ; 0x3f98 + 3fc4: 80 93 02 02 sts 0x0202, r24 + return getch(); +} + 3fc8: e7 cf rjmp .-50 ; 0x3f98 + +00003fca : + "wdr\n" + ); +} + +void watchdogConfig(uint8_t x) { + WDTCSR = _BV(WDCE) | _BV(WDE); + 3fca: e0 e6 ldi r30, 0x60 ; 96 + 3fcc: f0 e0 ldi r31, 0x00 ; 0 + 3fce: 98 e1 ldi r25, 0x18 ; 24 + 3fd0: 90 83 st Z, r25 + WDTCSR = x; + 3fd2: 80 83 st Z, r24 +} + 3fd4: 08 95 ret + +00003fd6 : + +void appStart() { + watchdogConfig(WATCHDOG_OFF); + 3fd6: 80 e0 ldi r24, 0x00 ; 0 + 3fd8: f8 df rcall .-16 ; 0x3fca + __asm__ __volatile__ ( + 3fda: ee 27 eor r30, r30 + 3fdc: ff 27 eor r31, r31 + 3fde: 09 94 ijmp + +00003fe0 : + do getch(); while (--count); + verifySpace(); +} + +void verifySpace() { + if (getch() != CRC_EOP) appStart(); + 3fe0: db df rcall .-74 ; 0x3f98 + 3fe2: 80 32 cpi r24, 0x20 ; 32 + 3fe4: 09 f0 breq .+2 ; 0x3fe8 + 3fe6: f7 df rcall .-18 ; 0x3fd6 + putch(STK_INSYNC); + 3fe8: 84 e1 ldi r24, 0x14 ; 20 +} + 3fea: c7 cf rjmp .-114 ; 0x3f7a + ::[count] "M" (UART_B_VALUE) + ); +} +#endif + +void getNch(uint8_t count) { + 3fec: 1f 93 push r17 + 3fee: 18 2f mov r17, r24 + +00003ff0 : + do getch(); while (--count); + 3ff0: d3 df rcall .-90 ; 0x3f98 + 3ff2: 11 50 subi r17, 0x01 ; 1 + 3ff4: e9 f7 brne .-6 ; 0x3ff0 + verifySpace(); + 3ff6: f4 df rcall .-24 ; 0x3fe0 +} + 3ff8: 1f 91 pop r17 + 3ffa: 08 95 ret diff --git a/test/ardmake/hardware/bootloaders/stk500v2/Makefile b/test/ardmake/hardware/bootloaders/stk500v2/Makefile new file mode 100644 index 0000000..54c5f85 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/Makefile @@ -0,0 +1,588 @@ +# ---------------------------------------------------------------------------- +# Makefile to compile and link stk500boot bootloader +# Author: Peter Fleury +# File: $Id: Makefile,v 1.3 2006/03/04 19:26:17 peter Exp $ +# based on WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al. +# +# Adjust F_CPU below to the clock frequency in Mhz of your AVR target +# Adjust BOOTLOADER_ADDRESS to your AVR target +# +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device, using avrdude. +# Please customize the avrdude settings below first! +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- +# = Mark Sproul msproul-at-skychariot.com + + +# MCU name +#MCU = atmega128 + + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +#F_CPU = 16000000 + + +# Bootloader +# Please adjust if using a different AVR +# 0x0e00*2=0x1C00 for ATmega8 512 words Boot Size +# 0xFC00*2=0x1F800 for ATmega128 1024 words Boot Size +# 0xF800*2=0x1F000 for ATmega1280 +# 0xF000*2=0x1E000 for ATmega1280 +#BOOTLOADER_ADDRESS = 1E000 + + +# Output format. (can be srec, ihex, binary) +FORMAT = ihex + + +# Target file name (without extension). +TARGET = stk500boot + + +# List C source files here. (C dependencies are automatically generated.) +SRC = stk500boot.c + + +# List Assembler source files here. +# Make them always end in a capital .S. Files ending in a lowercase .s +# will not be considered source files but generated files (assembler +# output from the compiler), and will be deleted upon "make clean"! +# Even though the DOS/Win* filesystem matches both .s and .S the same, +# it will preserve the spelling of the filenames, and gcc itself does +# care about how the name is spelled on its command-line. +ASRC = + + +# Optimization level, can be [0, 1, 2, 3, s]. +# 0 = turn off optimization. s = optimize for size. +# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) +OPT = s + + +# Debugging format. +# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. +# AVR Studio 4.10 requires dwarf-2. +# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. +DEBUG = dwarf-2 + + +# List any extra directories to look for include files here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRAINCDIRS = + + +# Compiler flag to set the C Standard level. +# c89 = "ANSI" C +# gnu89 = c89 plus GCC extensions +# c99 = ISO C99 standard (not yet fully implemented) +# gnu99 = c99 plus GCC extensions +CSTANDARD = -std=gnu99 + + +# Place -D or -U options here +CDEFS = -DF_CPU=$(F_CPU)UL + + +# Place -I options here +CINCS = + + + +#---------------- Compiler Options ---------------- +# -g*: generate debugging information +# -O*: optimization level +# -f...: tuning, see GCC manual and avr-libc documentation +# -Wall...: warning level +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns...: create assembler listing +CFLAGS = -g$(DEBUG) +CFLAGS += $(CDEFS) $(CINCS) +CFLAGS += -O$(OPT) +CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -mno-tablejump +CFLAGS += -Wall -Wstrict-prototypes +CFLAGS += -Wa,-adhlns=$(<:.c=.lst) +CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +CFLAGS += $(CSTANDARD) + + +#---------------- Assembler Options ---------------- +# -Wa,...: tell GCC to pass this to the assembler. +# -ahlms: create listing +# -gstabs: have the assembler create line number information; note that +# for use in COFF files, additional information about filenames +# and function names needs to be present in the assembler source +# files -- see avr-libc docs [FIXME: not yet described there] +ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs + + +#---------------- Library Options ---------------- +# Minimalistic printf version +PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min + +# Floating point printf version (requires MATH_LIB = -lm below) +PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt + +# If this is left blank, then it will use the Standard printf version. +PRINTF_LIB = +#PRINTF_LIB = $(PRINTF_LIB_MIN) +#PRINTF_LIB = $(PRINTF_LIB_FLOAT) + + +# Minimalistic scanf version +SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min + +# Floating point + %[ scanf version (requires MATH_LIB = -lm below) +SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt + +# If this is left blank, then it will use the Standard scanf version. +SCANF_LIB = +#SCANF_LIB = $(SCANF_LIB_MIN) +#SCANF_LIB = $(SCANF_LIB_FLOAT) + + +MATH_LIB = -lm + + + +#---------------- External Memory Options ---------------- + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# used for variables (.data/.bss) and heap (malloc()). +#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# only used for heap (malloc()). +#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff + +EXTMEMOPTS = + + + + +#---------------- Linker Options ---------------- +# -Wl,...: tell GCC to pass this to linker. +# -Map: create map file +# --cref: add cross reference to map file +LDFLAGS = -Wl,-Map=$(TARGET).map,--cref +LDFLAGS += $(EXTMEMOPTS) +LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) + + +#--------------- bootloader linker Options ------- +# BOOTLOADER_ADDRESS (=Start of Boot Loader section +# in bytes - not words) is defined above. +#LDFLAGS += -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS) -nostartfiles -nodefaultlibs +#LDFLAGS += -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS) -nostartfiles +LDFLAGS += -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS) + +#---------------- Programming Options (avrdude) ---------------- + +# Programming hardware: alf avr910 avrisp bascom bsd +# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 +# +# Type: avrdude -c ? +# to get a full listing. +# +AVRDUDE_PROGRAMMER = stk500v2 + +# com1 = serial port. Use lpt1 to connect to parallel port. +AVRDUDE_PORT = com1 # programmer connected to serial device + +AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex +#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep + + +# Uncomment the following if you want avrdude's erase cycle counter. +# Note that this counter needs to be initialized first using -Yn, +# see avrdude manual. +#AVRDUDE_ERASE_COUNTER = -y + +# Uncomment the following if you do /not/ wish a verification to be +# performed after programming the device. +#AVRDUDE_NO_VERIFY = -V + +# Increase verbosity level. Please use this when submitting bug +# reports about avrdude. See +# to submit bug reports. +#AVRDUDE_VERBOSE = -v -v + +AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) +AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) +AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) +AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) + + + +#---------------- Debugging Options ---------------- + +# For simulavr only - target MCU frequency. +DEBUG_MFREQ = $(F_CPU) + +# Set the DEBUG_UI to either gdb or insight. +# DEBUG_UI = gdb +DEBUG_UI = insight + +# Set the debugging back-end to either avarice, simulavr. +DEBUG_BACKEND = avarice +#DEBUG_BACKEND = simulavr + +# GDB Init Filename. +GDBINIT_FILE = __avr_gdbinit + +# When using avarice settings for the JTAG +JTAG_DEV = /dev/com1 + +# Debugging port used to communicate between GDB / avarice / simulavr. +DEBUG_PORT = 4242 + +# Debugging host used to communicate between GDB / avarice / simulavr, normally +# just set to localhost unless doing some sort of crazy debugging when +# avarice is running on a different computer. +DEBUG_HOST = localhost + + + +#============================================================================ + + +# Define programs and commands. +SHELL = sh +CC = avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +SIZE = avr-size +NM = avr-nm +AVRDUDE = avrdude +REMOVE = rm -f +COPY = cp +WINSHELL = cmd + + +# Define Messages +# English +MSG_ERRORS_NONE = Errors: none +MSG_BEGIN = -------- begin -------- +MSG_END = -------- end -------- +MSG_SIZE_BEFORE = Size before: +MSG_SIZE_AFTER = Size after: +MSG_COFF = Converting to AVR COFF: +MSG_EXTENDED_COFF = Converting to AVR Extended COFF: +MSG_FLASH = Creating load file for Flash: +MSG_EEPROM = Creating load file for EEPROM: +MSG_EXTENDED_LISTING = Creating Extended Listing: +MSG_SYMBOL_TABLE = Creating Symbol Table: +MSG_LINKING = Linking: +MSG_COMPILING = Compiling: +MSG_ASSEMBLING = Assembling: +MSG_CLEANING = Cleaning project: + + + + +# Define all object files. +OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) + +# Define all listing files. +LST = $(SRC:.c=.lst) $(ASRC:.S=.lst) + + +# Compiler flags to generate dependency files. +GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d + + +# Combine all necessary flags and optional flags. +# Add target processor to flags. +ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) +ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) + + + +############################################################ +# May 25, 2010 Adding 1280 support +mega1280: MCU = atmega1280 +mega1280: F_CPU = 16000000 +mega1280: BOOTLOADER_ADDRESS = 1E000 +mega1280: CFLAGS += -D_MEGA_BOARD_ +mega1280: begin gccversion sizebefore build sizeafter end + mv $(TARGET).hex stk500boot_v2_mega1280.hex + + +############################################################ +# Jul 6, 2010 Adding 2560 support +mega2560: MCU = atmega2560 +mega2560: F_CPU = 16000000 +mega2560: BOOTLOADER_ADDRESS = 3E000 +mega2560: CFLAGS += -D_MEGA_BOARD_ +mega2560: begin gccversion sizebefore build sizeafter end + mv $(TARGET).hex stk500boot_v2_mega2560.hex + + +############################################################ +#Initial config on Amber128 board +# avrdude: Device signature = 0x1e9702 +# avrdude: safemode: lfuse reads as 8F +# avrdude: safemode: hfuse reads as CB +# avrdude: safemode: efuse reads as FF +# Jul 17, 2010 Adding 128 support +############################################################ +amber128: MCU = atmega128 +#amber128: F_CPU = 16000000 +amber128: F_CPU = 14745600 +amber128: BOOTLOADER_ADDRESS = 1E000 +amber128: CFLAGS += -D_BOARD_AMBER128_ +amber128: begin gccversion sizebefore build sizeafter end + mv $(TARGET).hex stk500boot_v2_amber128.hex + +############################################################ +# Aug 23, 2010 Adding atmega2561 support +m2561: MCU = atmega2561 +m2561: F_CPU = 8000000 +m2561: BOOTLOADER_ADDRESS = 3E000 +m2561: CFLAGS += -D_ANDROID_2561_ -DBAUDRATE=57600 +m2561: begin gccversion sizebefore build sizeafter end + mv $(TARGET).hex stk500boot_v2_android2561.hex + + +############################################################ +# avrdude: Device signature = 0x1e9801 +# avrdude: safemode: lfuse reads as EC +# avrdude: safemode: hfuse reads as 18 +# avrdude: safemode: efuse reads as FD +# Aug 23, 2010 Adding cerebot 2560 @ 8mhz +#avrdude -P usb -c usbtiny -p m2560 -v -U flash:w:/Arduino/WiringBootV2_upd1/stk500boot_v2_cerebotplus.hex +############################################################ +cerebot: MCU = atmega2560 +cerebot: F_CPU = 8000000 +cerebot: BOOTLOADER_ADDRESS = 3E000 +cerebot: CFLAGS += -D_CEREBOTPLUS_BOARD_ -DBAUDRATE=38400 -DUART_BAUDRATE_DOUBLE_SPEED=1 +cerebot: begin gccversion sizebefore build sizeafter end + mv $(TARGET).hex stk500boot_v2_cerebotplus.hex + + +############################################################ +# Aug 23, 2010 Adding atmega2561 support +penguino: MCU = atmega32 +penguino: F_CPU = 16000000 +penguino: BOOTLOADER_ADDRESS = 7800 +penguino: CFLAGS += -D_PENGUINO_ -DBAUDRATE=57600 +penguino: begin gccversion sizebefore build sizeafter end + mv $(TARGET).hex stk500boot_v2_penguino.hex + + +# Default target. +all: begin gccversion sizebefore build sizeafter end + +build: elf hex eep lss sym +#build: hex eep lss sym + +elf: $(TARGET).elf +hex: $(TARGET).hex +eep: $(TARGET).eep +lss: $(TARGET).lss +sym: $(TARGET).sym + + + +# Eye candy. +# AVR Studio 3.x does not check make's exit code but relies on +# the following magic strings to be generated by the compile job. +begin: + @echo + @echo $(MSG_BEGIN) + +end: + @echo $(MSG_END) + @echo + + +# Display size of file. +HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex +ELFSIZE = $(SIZE) --format=avr --mcu=$(MCU) $(TARGET).elf + +sizebefore: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ + 2>/dev/null; echo; fi + +sizeafter: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \ + 2>/dev/null; echo; fi + + + +# Display compiler version information. +gccversion : + @$(CC) --version + + + +# Program the device. +program: $(TARGET).hex $(TARGET).eep + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) + + +# Generate avr-gdb config/init file which does the following: +# define the reset signal, load the target file, connect to target, and set +# a breakpoint at main(). +gdb-config: + @$(REMOVE) $(GDBINIT_FILE) + @echo define reset >> $(GDBINIT_FILE) + @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) + @echo end >> $(GDBINIT_FILE) + @echo file $(TARGET).elf >> $(GDBINIT_FILE) + @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) +ifeq ($(DEBUG_BACKEND),simulavr) + @echo load >> $(GDBINIT_FILE) +endif + @echo break main >> $(GDBINIT_FILE) + +debug: gdb-config $(TARGET).elf +ifeq ($(DEBUG_BACKEND), avarice) + @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. + @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ + $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) + @$(WINSHELL) /c pause + +else + @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ + $(DEBUG_MFREQ) --port $(DEBUG_PORT) +endif + @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) + + + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT=$(OBJCOPY) --debugging \ +--change-section-address .data-0x800000 \ +--change-section-address .bss-0x800000 \ +--change-section-address .noinit-0x800000 \ +--change-section-address .eeprom-0x810000 + + + +coff: $(TARGET).elf + @echo + @echo $(MSG_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-avr $< $(TARGET).cof + + +extcoff: $(TARGET).elf + @echo + @echo $(MSG_EXTENDED_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof + + +# Create final output files (.hex, .eep) from ELF output file. +%.hex: %.elf + @echo + @echo $(MSG_FLASH) $@ + $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ + +%.eep: %.elf + @echo + @echo $(MSG_EEPROM) $@ + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ + +# Create extended listing file from ELF output file. +%.lss: %.elf + @echo + @echo $(MSG_EXTENDED_LISTING) $@ + $(OBJDUMP) -h -S $< > $@ + +# Create a symbol table from ELF output file. +%.sym: %.elf + @echo + @echo $(MSG_SYMBOL_TABLE) $@ + $(NM) -n $< > $@ + + + +# Link: create ELF output file from object files. +.SECONDARY : $(TARGET).elf +.PRECIOUS : $(OBJ) +%.elf: $(OBJ) + @echo + @echo $(MSG_LINKING) $@ + $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) + + +# Compile: create object files from C source files. +%.o : %.c + @echo + @echo $(MSG_COMPILING) $< + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +# Compile: create assembler files from C source files. +%.s : %.c + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +# Assemble: create object files from assembler source files. +%.o : %.S + @echo + @echo $(MSG_ASSEMBLING) $< + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + +# Create preprocessed source for use in sending a bug report. +%.i : %.c + $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ + + +# Target: clean project. +clean: begin clean_list end + +clean_list : + @echo + @echo $(MSG_CLEANING) + $(REMOVE) *.hex + $(REMOVE) *.eep + $(REMOVE) *.cof + $(REMOVE) *.elf + $(REMOVE) *.map + $(REMOVE) *.sym + $(REMOVE) *.lss + $(REMOVE) $(OBJ) + $(REMOVE) $(LST) + $(REMOVE) $(SRC:.c=.s) + $(REMOVE) $(SRC:.c=.d) + $(REMOVE) .dep/* + + + +# Include the dependency files. +-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) + + +# Listing of phony targets. +.PHONY : all begin finish end sizebefore sizeafter gccversion \ +build elf hex eep lss sym coff extcoff \ +clean clean_list program debug gdb-config + diff --git a/test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnproj b/test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnproj new file mode 100644 index 0000000..d935019 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnproj @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnps b/test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnps new file mode 100644 index 0000000..f85cde5 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/STK500V2.pnps @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/ardmake/hardware/bootloaders/stk500v2/avrinterruptnames.h b/test/ardmake/hardware/bootloaders/stk500v2/avrinterruptnames.h new file mode 100644 index 0000000..0ae80f9 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/avrinterruptnames.h @@ -0,0 +1,742 @@ +//************************************************************************************************** +//* +//* interrupt vector names +//* +//* It is important to note that the vector numbers listed here +//* are the ATMEL documentation numbers. The Arduino numbers are 1 less +//* This is because the Atmel docs start numbering the interrupts at 1 +//* when it is actually vector #0 in the table. +//************************************************************************************************** +//* Jun 1, 2010 Added support for ATmega1281 +//* Jun 30, 2010 Putting in more ifdefs to conserve space +//* Jul 3, 2010 More #ifdefs to conserve space and testing on most of my boards +//* Jul 4, 2010 Started using vector defs for #ifdefs as defined in +//* Jul 13, 2010 Added support for __AVR_ATmega128__ +//* Aug 26, 2010 Added support for __AVR_ATmega2561__ +//************************************************************************************************** + +//#include "avrinterruptnames.h" + +//************************************************************************************************** +//* this defines the interrupt vectors and allows us to compile ONLY those strings that are actually +//* in the target CPU. This way we do not have to keep making changes based on cpu, it will be +//* automatic even if we add a new CPU +#ifndef _AVR_IO_H_ + #include +#endif +//************************************************************************************************** + +#ifdef __MWERKS__ + #define prog_char char + #define PGM_P char * +#endif + + prog_char gAvrInt_RESET[] PROGMEM = "RESET"; +#ifdef INT0_vect + prog_char gAvrInt_INT0[] PROGMEM = "INT0"; +#endif +#ifdef INT1_vect + prog_char gAvrInt_INT1[] PROGMEM = "INT1"; +#endif +#ifdef INT2_vect + prog_char gAvrInt_INT2[] PROGMEM = "INT2"; +#endif +#ifdef INT3_vect + prog_char gAvrInt_INT3[] PROGMEM = "INT3"; +#endif +#ifdef INT4_vect + prog_char gAvrInt_INT4[] PROGMEM = "INT4"; +#endif +#ifdef INT5_vect + prog_char gAvrInt_INT5[] PROGMEM = "INT5"; +#endif +#ifdef INT6_vect + prog_char gAvrInt_INT6[] PROGMEM = "INT6"; +#endif +#ifdef INT7_vect + prog_char gAvrInt_INT7[] PROGMEM = "INT7"; +#endif +#ifdef PCINT0_vect + prog_char gAvrInt_PCINT0[] PROGMEM = "PCINT0"; +#endif +#ifdef PCINT1_vect + prog_char gAvrInt_PCINT1[] PROGMEM = "PCINT1"; +#endif +#ifdef PCINT2_vect + prog_char gAvrInt_PCINT2[] PROGMEM = "PCINT2"; +#endif +#ifdef PCINT3_vect + prog_char gAvrInt_PCINT3[] PROGMEM = "PCINT3"; +#endif +#ifdef WDT_vect + prog_char gAvrInt_WDT[] PROGMEM = "WDT"; +#endif +#ifdef TIMER0_COMP_vect + prog_char gAvrInt_TIMER0_COMP[] PROGMEM = "TIMER0 COMP"; +#endif +#ifdef TIMER0_COMPA_vect + prog_char gAvrInt_TIMER0_COMPA[] PROGMEM = "TIMER0 COMPA"; +#endif +#ifdef TIMER0_COMPB_vect + prog_char gAvrInt_TIMER0_COMPB[] PROGMEM = "TIMER0 COMPB"; +#endif +#ifdef TIMER0_OVF_vect + prog_char gAvrInt_TIMER0_OVF[] PROGMEM = "TIMER0 OVF"; +#endif +#ifdef TIMER1_CAPT_vect + prog_char gAvrInt_TIMER1_CAPT[] PROGMEM = "TIMER1 CAPT"; +#endif +#ifdef TIMER1_COMPA_vect + prog_char gAvrInt_TIMER1_COMPA[] PROGMEM = "TIMER1 COMPA"; +#endif +#ifdef TIMER1_COMPB_vect + prog_char gAvrInt_TIMER1_COMPB[] PROGMEM = "TIMER1 COMPB"; +#endif +#ifdef TIMER1_COMPC_vect + prog_char gAvrInt_TIMER1_COMPC[] PROGMEM = "TIMER1 COMPC"; +#endif +#ifdef TIMER1_OVF_vect + prog_char gAvrInt_TIMER1_OVF[] PROGMEM = "TIMER1 OVF"; +#endif +#ifdef TIMER2_COMP_vect + prog_char gAvrInt_TIMER2_COMP[] PROGMEM = "TIMER2 COMP"; +#endif +#ifdef TIMER2_COMPA_vect + prog_char gAvrInt_TIMER2_COMPA[] PROGMEM = "TIMER2 COMPA"; +#endif +#ifdef TIMER2_COMPB_vect + prog_char gAvrInt_TIMER2_COMPB[] PROGMEM = "TIMER2 COMPB"; +#endif +#ifdef TIMER2_OVF_vect + prog_char gAvrInt_TIMER2_OVF[] PROGMEM = "TIMER2 OVF"; +#endif +#ifdef TIMER3_CAPT_vect + prog_char gAvrInt_TIMER3_CAPT[] PROGMEM = "TIMER3 CAPT"; +#endif +#ifdef TIMER3_COMPA_vect + prog_char gAvrInt_TIMER3_COMPA[] PROGMEM = "TIMER3 COMPA"; +#endif +#ifdef TIMER3_COMPB_vect + prog_char gAvrInt_TIMER3_COMPB[] PROGMEM = "TIMER3 COMPB"; +#endif +#ifdef TIMER3_COMPC_vect + prog_char gAvrInt_TIMER3_COMPC[] PROGMEM = "TIMER3 COMPC"; +#endif +#ifdef TIMER3_OVF_vect + prog_char gAvrInt_TIMER3_OVF[] PROGMEM = "TIMER3 OVF"; +#endif +#ifdef TIMER4_CAPT_vect + prog_char gAvrInt_TIMER4_CAPT[] PROGMEM = "TIMER4 CAPT"; +#endif +#ifdef TIMER4_COMPA_vect + prog_char gAvrInt_TIMER4_COMPA[] PROGMEM = "TIMER4 COMPA"; +#endif +#ifdef TIMER4_COMPB_vect + prog_char gAvrInt_TIMER4_COMPB[] PROGMEM = "TIMER4 COMPB"; +#endif +#ifdef TIMER4_COMPC_vect + prog_char gAvrInt_TIMER4_COMPC[] PROGMEM = "TIMER4 COMPC"; +#endif +#ifdef TIMER4_COMPD_vect + prog_char gAvrInt_TIMER4_COMPD[] PROGMEM = "TIMER4 COMPD"; +#endif +#ifdef TIMER4_OVF_vect + prog_char gAvrInt_TIMER4_OVF[] PROGMEM = "TIMER4 OVF"; +#endif +#ifdef TIMER4_FPF_vect + prog_char gAvrInt_TIMER4_FPF[] PROGMEM = "TIMER4 Fault Protection"; +#endif +#ifdef TIMER5_CAPT_vect + prog_char gAvrInt_TIMER5_CAPT[] PROGMEM = "TIMER5 CAPT"; +#endif +#ifdef TIMER5_COMPA_vect + prog_char gAvrInt_TIMER5_COMPA[] PROGMEM = "TIMER5 COMPA"; +#endif +#ifdef TIMER5_COMPB_vect + prog_char gAvrInt_TIMER5_COMPB[] PROGMEM = "TIMER5 COMPB"; +#endif +#ifdef TIMER5_COMPC_vect + prog_char gAvrInt_TIMER5_COMPC[] PROGMEM = "TIMER5 COMPC"; +#endif +#ifdef TIMER5_OVF_vect + prog_char gAvrInt_TIMER5_OVF[] PROGMEM = "TIMER5 OVF"; +#endif + +//* when there is only 1 usart +#if defined(USART_RX_vect) || defined(USART_RXC_vect) + prog_char gAvrInt_USART_RX[] PROGMEM = "USART RX"; +#endif +#if defined(USART_UDRE_vect) + prog_char gAvrInt_USART_UDRE[] PROGMEM = "USART UDRE"; +#endif +#if defined(USART_TX_vect) || defined(USART_TXC_vect) + prog_char gAvrInt_USART_TX[] PROGMEM = "USART TX"; +#endif + + +//* usart 0 +#if defined(USART0_RX_vect) + prog_char gAvrInt_USART0_RX[] PROGMEM = "USART0 RX"; +#endif +#if defined(USART0_UDRE_vect) + prog_char gAvrInt_USART0_UDRE[] PROGMEM = "USART0 UDRE"; +#endif +#if defined(USART0_TX_vect) + prog_char gAvrInt_USART0_TX[] PROGMEM = "USART0 TX"; +#endif + + +//* usart 1 +#ifdef USART1_RX_vect + prog_char gAvrInt_USART1_RX[] PROGMEM = "USART1 RX"; +#endif +#ifdef USART1_UDRE_vect + prog_char gAvrInt_USART1_UDRE[] PROGMEM = "USART1 UDRE"; +#endif +#ifdef USART1_TX_vect + prog_char gAvrInt_USART1_TX[] PROGMEM = "USART1 TX"; +#endif + +//* usart 2 +#ifdef USART2_RX_vect + prog_char gAvrInt_USART2_RX[] PROGMEM = "USART2 RX"; +#endif +#ifdef USART2_UDRE_vect + prog_char gAvrInt_USART2_UDRE[] PROGMEM = "USART2 UDRE"; +#endif +#ifdef USART2_TX_vect + prog_char gAvrInt_USART2_TX[] PROGMEM = "USART2 TX"; +#endif + +//* usart 3 +#ifdef USART3_RX_vect + prog_char gAvrInt_USART3_RX[] PROGMEM = "USART3 RX"; +#endif +#ifdef USART3_UDRE_vect + prog_char gAvrInt_USART3_UDRE[] PROGMEM = "USART3 UDRE"; +#endif +#ifdef USART3_TX_vect + prog_char gAvrInt_USART3_TX[] PROGMEM = "USART3 TX"; +#endif +#ifdef SPI_STC_vect + prog_char gAvrInt_SPI_STC[] PROGMEM = "SPI STC"; +#endif +#ifdef ADC_vect + prog_char gAvrInt_ADC[] PROGMEM = "ADC"; +#endif +#if defined(ANALOG_COMP_vect) || defined(ANA_COMP_vect) + prog_char gAvrInt_ANALOG_COMP[] PROGMEM = "ANALOG COMP"; +#endif +#if defined(EE_READY_vect) || defined(EE_RDY_vect) + prog_char gAvrInt_EE_READY[] PROGMEM = "EE READY"; +#endif +#ifdef TWI_vect + prog_char gAvrInt_TWI[] PROGMEM = "TWI"; +#endif +#if defined(SPM_READY_vect) || defined(SPM_RDY_vect) + prog_char gAvrInt_SPM_READY[] PROGMEM = "SPM READY"; +#endif +#ifdef USI_START_vect + prog_char gAvrInt_USI_START[] PROGMEM = "USI START"; +#endif +#ifdef USI_OVERFLOW_vect + prog_char gAvrInt_USI_OVERFLOW[] PROGMEM = "USI OVERFLOW"; +#endif +#ifdef USB_GEN_vect + prog_char gAvrInt_USB_General[] PROGMEM = "USB General"; +#endif +#ifdef USB_COM_vect + prog_char gAvrInt_USB_Endpoint[] PROGMEM = "USB Endpoint"; +#endif + +#ifdef LCD_vect + prog_char gAvrInt_LCD_StartFrame[] PROGMEM = "LCD Start of Frame"; +#endif + + +//************************************************************************************************** +//* these do not have vector defs and have to be done by CPU type +#if defined(__AVR_ATmega645__ ) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) + prog_char gAvrInt_NOT_USED[] PROGMEM = "NOT_USED"; +#endif +#if defined(__AVR_ATmega32U4__) + prog_char gAvrInt_RESERVED[] PROGMEM = "Reserved"; +#endif + + prog_char gAvrInt_END[] PROGMEM = "*"; + + + + + +//************************************************************************************************** +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) +#pragma mark __AVR_ATmega168__ / __AVR_ATmega328P__ + +#define _INTERRUPT_NAMES_DEFINED_ + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_PCINT0, // 4 + gAvrInt_PCINT1, // 5 + gAvrInt_PCINT2, // 6 + gAvrInt_WDT, // 7 + gAvrInt_TIMER2_COMPA, // 8 + gAvrInt_TIMER2_COMPB, // 9 + gAvrInt_TIMER2_OVF, // 10 + gAvrInt_TIMER1_CAPT, // 11 + gAvrInt_TIMER1_COMPA, // 12 + gAvrInt_TIMER1_COMPB, // 13 + gAvrInt_TIMER1_OVF, // 14 + gAvrInt_TIMER0_COMPA, // 15 + gAvrInt_TIMER0_COMPB, // 16 + gAvrInt_TIMER0_OVF, // 17 + gAvrInt_SPI_STC, // 18 + gAvrInt_USART_RX, // 19 + gAvrInt_USART_UDRE, // 20 + gAvrInt_USART_TX, // 21 + gAvrInt_ADC, // 22 + gAvrInt_EE_READY, // 23 + gAvrInt_ANALOG_COMP, // 24 + gAvrInt_TWI, // 25 + gAvrInt_SPM_READY, // 26 +}; + +#endif + +//************************************************************************************************** +#pragma mark __AVR_ATmega169__ +#if defined(__AVR_ATmega169__) + +#define _INTERRUPT_NAMES_DEFINED_ + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_PCINT0, // 3 + gAvrInt_PCINT1, // 4 + gAvrInt_TIMER2_COMP, // 5 + gAvrInt_TIMER2_OVF, // 6 + gAvrInt_TIMER1_CAPT, // 7 + gAvrInt_TIMER1_COMPA, // 8 + gAvrInt_TIMER1_COMPB, // 9 + gAvrInt_TIMER1_OVF, // 10 + gAvrInt_TIMER0_COMP, // 11 + gAvrInt_TIMER0_OVF, // 12 + gAvrInt_SPI_STC, // 13 + gAvrInt_USART0_RX, // 14 + gAvrInt_USART0_UDRE, // 15 + gAvrInt_USART0_TX, // 16 + gAvrInt_USI_START, // 17 + gAvrInt_USI_OVERFLOW, // 18 + gAvrInt_ANALOG_COMP, // 19 + gAvrInt_ADC, // 20 + gAvrInt_EE_READY, // 21 + gAvrInt_SPM_READY, // 22 + gAvrInt_LCD_StartFrame, // 23 + +}; + +#endif + + +//************************************************************************************************** +#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) +#pragma mark __AVR_ATmega640__ __AVR_ATmega1280__ __AVR_ATmega1281__ __AVR_ATmega2560__ __AVR_ATmega2561__ + +#define _INTERRUPT_NAMES_DEFINED_ + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_INT2, // 4 + gAvrInt_INT3, // 5 + gAvrInt_INT4, // 6 + gAvrInt_INT5, // 7 + gAvrInt_INT6, // 8 + gAvrInt_INT7, // 9 + gAvrInt_PCINT0, // 10 + gAvrInt_PCINT1, // 11 +#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + gAvrInt_PCINT2, // 12 +#else + gAvrInt_NOT_USED, // 12 +#endif + gAvrInt_WDT, // 13 + gAvrInt_TIMER2_COMPA, // 14 + gAvrInt_TIMER2_COMPB, // 15 + gAvrInt_TIMER2_OVF, // 16 + gAvrInt_TIMER1_CAPT, // 17 + gAvrInt_TIMER1_COMPA, // 18 + gAvrInt_TIMER1_COMPB, // 19 + gAvrInt_TIMER1_COMPC, // 20 + gAvrInt_TIMER1_OVF, // 21 + gAvrInt_TIMER0_COMPA, // 22 + gAvrInt_TIMER0_COMPB, // 23 + gAvrInt_TIMER0_OVF, // 24 + gAvrInt_SPI_STC, // 25 + + gAvrInt_USART0_RX, // 26 + gAvrInt_USART0_UDRE, // 27 + gAvrInt_USART0_TX, // 28 + gAvrInt_ANALOG_COMP, // 29 + gAvrInt_ADC, // 30 + gAvrInt_EE_READY, // 31 + + gAvrInt_TIMER3_CAPT, // 32 + gAvrInt_TIMER3_COMPA, // 33 + gAvrInt_TIMER3_COMPB, // 34 + gAvrInt_TIMER3_COMPC, // 35 + gAvrInt_TIMER3_OVF, // 36 + + gAvrInt_USART1_RX, // 37 + gAvrInt_USART1_UDRE, // 38 + gAvrInt_USART1_TX, // 39 + gAvrInt_TWI, // 40 + gAvrInt_SPM_READY, // 41 +#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + gAvrInt_TIMER4_CAPT, // 42 +#else + gAvrInt_NOT_USED, // 42 +#endif + gAvrInt_TIMER4_COMPA, // 43 + gAvrInt_TIMER4_COMPB, // 44 + gAvrInt_TIMER4_COMPC, // 45 + gAvrInt_TIMER4_OVF, // 46 +#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + gAvrInt_TIMER5_CAPT, // 47 +#else + gAvrInt_NOT_USED, // 47 +#endif + gAvrInt_TIMER5_COMPA, // 48 + gAvrInt_TIMER5_COMPB, // 49 + gAvrInt_TIMER5_COMPC, // 50 + gAvrInt_TIMER5_OVF, // 51 + +#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + gAvrInt_USART2_RX, // 52 + gAvrInt_USART2_UDRE, // 53 + gAvrInt_USART2_TX, // 54 + + gAvrInt_USART3_RX, // 55 + gAvrInt_USART3_UDRE, // 56 + gAvrInt_USART3_TX, // 57 +#endif + +}; + +#endif + + + +//************************************************************************************************** +#if defined(__AVR_ATmega324P__ ) || defined(__AVR_ATmega644__ ) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__) +#pragma mark __AVR_ATmega324P__ __AVR_ATmega644__ __AVR_ATmega644P__ __AVR_ATmega1284P__ + +#define _INTERRUPT_NAMES_DEFINED_ + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_INT2, // 4 + gAvrInt_PCINT0, // 5 + gAvrInt_PCINT1, // 6 + gAvrInt_PCINT2, // 7 + gAvrInt_PCINT3, // 8 + gAvrInt_WDT, // 9 + gAvrInt_TIMER2_COMPA, // 10 + gAvrInt_TIMER2_COMPB, // 11 + gAvrInt_TIMER2_OVF, // 12 + gAvrInt_TIMER1_CAPT, // 13 + gAvrInt_TIMER1_COMPA, // 14 + gAvrInt_TIMER1_COMPB, // 15 + gAvrInt_TIMER1_OVF, // 16 + gAvrInt_TIMER0_COMPA, // 17 + gAvrInt_TIMER0_COMPB, // 18 + gAvrInt_TIMER0_OVF, // 19 + gAvrInt_SPI_STC, // 20 + gAvrInt_USART0_RX, // 21 + gAvrInt_USART0_UDRE, // 22 + gAvrInt_USART0_TX, // 23 + gAvrInt_ANALOG_COMP, // 24 + gAvrInt_ADC, // 25 + gAvrInt_EE_READY, // 26 + gAvrInt_TWI, // 27 + gAvrInt_SPM_READY, // 28 + +#if defined(__AVR_ATmega324P__ ) || defined(__AVR_ATmega644P__) + gAvrInt_USART1_RX, // 29 + gAvrInt_USART1_UDRE, // 30 + gAvrInt_USART1_TX, // 31 +#endif + +}; + + +#endif + +//************************************************************************************************** +#if defined(__AVR_ATmega645__ ) +#pragma mark __AVR_ATmega645__ + +#define _INTERRUPT_NAMES_DEFINED_ + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_PCINT0, // 3 + gAvrInt_PCINT1, // 4 + gAvrInt_TIMER2_COMP, // 5 + gAvrInt_TIMER2_OVF, // 6 + gAvrInt_TIMER1_CAPT, // 7 + gAvrInt_TIMER1_COMPA, // 8 + gAvrInt_TIMER1_COMPB, // 9 + gAvrInt_TIMER1_OVF, // 10 + gAvrInt_TIMER0_COMP, // 11 + gAvrInt_TIMER0_OVF, // 12 + gAvrInt_SPI_STC, // 13 + gAvrInt_USART0_RX, // 14 + gAvrInt_USART0_UDRE, // 15 + gAvrInt_USART0_TX, // 16 + gAvrInt_USI_START, // 17 + gAvrInt_USI_OVERFLOW, // 18 + gAvrInt_ANALOG_COMP, // 19 + gAvrInt_ADC, // 20 + gAvrInt_EE_READY, // 21 + gAvrInt_SPM_READY, // 22 + gAvrInt_NOT_USED, // 23 + +#if defined(__AVR_ATmega3250__) || defined(__AVR_ATmega6450__) + gAvrInt_PCINT2, // 24 + gAvrInt_PCINT3, // 25 +#endif +}; + + +#endif + + +//************************************************************************************************** +#if defined(__AVR_ATmega32__ ) +#pragma mark __AVR_ATmega32__ + +#define _INTERRUPT_NAMES_DEFINED_ + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_INT2, // 4 + gAvrInt_TIMER2_COMP, // 5 + gAvrInt_TIMER2_OVF, // 6 + gAvrInt_TIMER1_CAPT, // 7 + gAvrInt_TIMER1_COMPA, // 8 + gAvrInt_TIMER1_COMPB, // 9 + gAvrInt_TIMER1_OVF, // 10 + gAvrInt_TIMER0_COMP, // 11 + gAvrInt_TIMER0_OVF, // 12 + gAvrInt_SPI_STC, // 13 + gAvrInt_USART_RX, // 14 + gAvrInt_USART_UDRE, // 15 + gAvrInt_USART_TX, // 16 + gAvrInt_ADC, // 17 + gAvrInt_EE_READY, // 18 + gAvrInt_ANALOG_COMP, // 19 + gAvrInt_TWI, // 20 + gAvrInt_SPM_READY, // 21 + +}; + + +#endif + +//************************************************************************************************** +#if defined(__AVR_ATmega32U4__) +#pragma mark __AVR_ATmega32U4__ +//* teensy 2.0 +//* http://www.pjrc.com/teensy/pinout.html +#define _INTERRUPT_NAMES_DEFINED_ + + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_INT2, // 4 + gAvrInt_INT3, // 5 + gAvrInt_RESERVED, // 6 + gAvrInt_RESERVED, // 7 + gAvrInt_INT6, // 8 + gAvrInt_RESERVED, // 9 + gAvrInt_PCINT0, // 10 + gAvrInt_USB_General, // 11 + gAvrInt_USB_Endpoint, // 12 + gAvrInt_WDT, // 13 + gAvrInt_RESERVED, // 14 + gAvrInt_RESERVED, // 15 + gAvrInt_RESERVED, // 16 + gAvrInt_TIMER1_CAPT, // 17 + gAvrInt_TIMER1_COMPA, // 18 + gAvrInt_TIMER1_COMPB, // 19 + gAvrInt_TIMER1_COMPC, // 20 + gAvrInt_TIMER1_OVF, // 21 + gAvrInt_TIMER0_COMPA, // 22 + gAvrInt_TIMER0_COMPB, // 23 + gAvrInt_TIMER0_OVF, // 24 + gAvrInt_SPI_STC, // 25 + + gAvrInt_USART1_RX, // 26 + gAvrInt_USART1_UDRE, // 27 + gAvrInt_USART1_TX, // 28 + gAvrInt_ANALOG_COMP, // 29 + + gAvrInt_ADC, // 30 + gAvrInt_EE_READY, // 31 + + gAvrInt_TIMER3_CAPT, // 32 + gAvrInt_TIMER3_COMPA, // 33 + gAvrInt_TIMER3_COMPB, // 34 + gAvrInt_TIMER3_COMPC, // 35 + gAvrInt_TIMER3_OVF, // 36 + gAvrInt_TWI, // 37 + gAvrInt_SPM_READY, // 38 + + gAvrInt_TIMER4_COMPA, // 39 + gAvrInt_TIMER4_COMPB, // 40 + gAvrInt_TIMER4_COMPD, // 41 + gAvrInt_TIMER4_OVF, // 42 + gAvrInt_TIMER4_FPF, // 43 +}; + +#endif + +//************************************************************************************************** +#if defined(__AVR_AT90USB1286__) +#pragma mark __AVR_AT90USB1286__ +//* teensy++ 2.0 +//* http://www.pjrc.com/teensy/pinout.html +#define _INTERRUPT_NAMES_DEFINED_ + + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_INT2, // 4 + gAvrInt_INT3, // 5 + gAvrInt_INT4, // 6 + gAvrInt_INT5, // 7 + gAvrInt_INT6, // 8 + gAvrInt_INT7, // 9 + gAvrInt_PCINT0, // 10 + gAvrInt_USB_General, // 11 + gAvrInt_USB_Endpoint, // 12 + gAvrInt_WDT, // 13 + gAvrInt_TIMER2_COMPA, // 14 + gAvrInt_TIMER2_COMPB, // 15 + gAvrInt_TIMER2_OVF, // 16 + gAvrInt_TIMER1_CAPT, // 17 + gAvrInt_TIMER1_COMPA, // 18 + gAvrInt_TIMER1_COMPB, // 19 + gAvrInt_TIMER1_COMPC, // 20 + gAvrInt_TIMER1_OVF, // 21 + gAvrInt_TIMER0_COMPA, // 22 + gAvrInt_TIMER0_COMPB, // 23 + gAvrInt_TIMER0_OVF, // 24 + gAvrInt_SPI_STC, // 25 + + gAvrInt_USART1_RX, // 26 + gAvrInt_USART1_UDRE, // 27 + gAvrInt_USART1_TX, // 28 + gAvrInt_ANALOG_COMP, // 29 + + gAvrInt_ADC, // 30 + gAvrInt_EE_READY, // 31 + + gAvrInt_TIMER3_CAPT, // 32 + gAvrInt_TIMER3_COMPA, // 33 + gAvrInt_TIMER3_COMPB, // 34 + gAvrInt_TIMER3_COMPC, // 35 + gAvrInt_TIMER3_OVF, // 36 + gAvrInt_TWI, // 37 + gAvrInt_SPM_READY, // 38 + +}; + +#endif + + + + +//************************************************************************************************** +#if defined(__AVR_ATmega128__) +#pragma mark __AVR_ATmega128__ +#define _INTERRUPT_NAMES_DEFINED_ + + +PGM_P gInterruptNameTable[] PROGMEM = +{ + + gAvrInt_RESET, // 1 + gAvrInt_INT0, // 2 + gAvrInt_INT1, // 3 + gAvrInt_INT2, // 4 + gAvrInt_INT3, // 5 + gAvrInt_INT4, // 6 + gAvrInt_INT5, // 7 + gAvrInt_INT6, // 8 + gAvrInt_INT7, // 9 + gAvrInt_TIMER2_COMP, // 10 + gAvrInt_TIMER2_OVF, // 11 + gAvrInt_TIMER1_CAPT, // 12 + gAvrInt_TIMER1_COMPA, // 13 + gAvrInt_TIMER1_COMPB, // 14 + gAvrInt_TIMER1_OVF, // 15 + gAvrInt_TIMER0_COMP, // 16 + gAvrInt_TIMER0_OVF, // 17 + gAvrInt_SPI_STC, // 18 + gAvrInt_USART0_RX, // 19 + gAvrInt_USART0_UDRE, // 20 + gAvrInt_USART0_TX, // 21 + gAvrInt_ADC, // 22 + gAvrInt_EE_READY, // 23 + gAvrInt_ANALOG_COMP, // 24 + gAvrInt_TIMER1_COMPC, // 25 + gAvrInt_TIMER3_CAPT, // 26 + gAvrInt_TIMER3_COMPA, // 27 + gAvrInt_TIMER3_COMPB, // 28 + gAvrInt_TIMER3_COMPC, // 29 + gAvrInt_TIMER3_OVF, // 30 + gAvrInt_USART1_RX, // 31 + gAvrInt_USART1_UDRE, // 32 + gAvrInt_USART1_TX, // 33 + gAvrInt_TWI, // 34 + gAvrInt_SPM_READY, // 35 + +}; + +#endif + +#if !defined(_INTERRUPT_NAMES_DEFINED_) + #warning No interrupt string defs for this cpu +#endif \ No newline at end of file diff --git a/test/ardmake/hardware/bootloaders/stk500v2/command.h b/test/ardmake/hardware/bootloaders/stk500v2/command.h new file mode 100644 index 0000000..03b1b38 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/command.h @@ -0,0 +1,114 @@ +//**** ATMEL AVR - A P P L I C A T I O N N O T E ************************ +//* +//* Title: AVR068 - STK500 Communication Protocol +//* Filename: command.h +//* Version: 1.0 +//* Last updated: 31.01.2005 +//* +//* Support E-mail: avr@atmel.com +//* +//************************************************************************** + +// *****************[ STK message constants ]*************************** + +#define MESSAGE_START 0x1B //= ESC = 27 decimal +#define TOKEN 0x0E + +// *****************[ STK general command constants ]************************** + +#define CMD_SIGN_ON 0x01 +#define CMD_SET_PARAMETER 0x02 +#define CMD_GET_PARAMETER 0x03 +#define CMD_SET_DEVICE_PARAMETERS 0x04 +#define CMD_OSCCAL 0x05 +#define CMD_LOAD_ADDRESS 0x06 +#define CMD_FIRMWARE_UPGRADE 0x07 + + +// *****************[ STK ISP command constants ]****************************** + +#define CMD_ENTER_PROGMODE_ISP 0x10 +#define CMD_LEAVE_PROGMODE_ISP 0x11 +#define CMD_CHIP_ERASE_ISP 0x12 +#define CMD_PROGRAM_FLASH_ISP 0x13 +#define CMD_READ_FLASH_ISP 0x14 +#define CMD_PROGRAM_EEPROM_ISP 0x15 +#define CMD_READ_EEPROM_ISP 0x16 +#define CMD_PROGRAM_FUSE_ISP 0x17 +#define CMD_READ_FUSE_ISP 0x18 +#define CMD_PROGRAM_LOCK_ISP 0x19 +#define CMD_READ_LOCK_ISP 0x1A +#define CMD_READ_SIGNATURE_ISP 0x1B +#define CMD_READ_OSCCAL_ISP 0x1C +#define CMD_SPI_MULTI 0x1D + +// *****************[ STK PP command constants ]******************************* + +#define CMD_ENTER_PROGMODE_PP 0x20 +#define CMD_LEAVE_PROGMODE_PP 0x21 +#define CMD_CHIP_ERASE_PP 0x22 +#define CMD_PROGRAM_FLASH_PP 0x23 +#define CMD_READ_FLASH_PP 0x24 +#define CMD_PROGRAM_EEPROM_PP 0x25 +#define CMD_READ_EEPROM_PP 0x26 +#define CMD_PROGRAM_FUSE_PP 0x27 +#define CMD_READ_FUSE_PP 0x28 +#define CMD_PROGRAM_LOCK_PP 0x29 +#define CMD_READ_LOCK_PP 0x2A +#define CMD_READ_SIGNATURE_PP 0x2B +#define CMD_READ_OSCCAL_PP 0x2C + +#define CMD_SET_CONTROL_STACK 0x2D + +// *****************[ STK HVSP command constants ]***************************** + +#define CMD_ENTER_PROGMODE_HVSP 0x30 +#define CMD_LEAVE_PROGMODE_HVSP 0x31 +#define CMD_CHIP_ERASE_HVSP 0x32 +#define CMD_PROGRAM_FLASH_HVSP ` 0x33 +#define CMD_READ_FLASH_HVSP 0x34 +#define CMD_PROGRAM_EEPROM_HVSP 0x35 +#define CMD_READ_EEPROM_HVSP 0x36 +#define CMD_PROGRAM_FUSE_HVSP 0x37 +#define CMD_READ_FUSE_HVSP 0x38 +#define CMD_PROGRAM_LOCK_HVSP 0x39 +#define CMD_READ_LOCK_HVSP 0x3A +#define CMD_READ_SIGNATURE_HVSP 0x3B +#define CMD_READ_OSCCAL_HVSP 0x3C + +// *****************[ STK status constants ]*************************** + +// Success +#define STATUS_CMD_OK 0x00 + +// Warnings +#define STATUS_CMD_TOUT 0x80 +#define STATUS_RDY_BSY_TOUT 0x81 +#define STATUS_SET_PARAM_MISSING 0x82 + +// Errors +#define STATUS_CMD_FAILED 0xC0 +#define STATUS_CKSUM_ERROR 0xC1 +#define STATUS_CMD_UNKNOWN 0xC9 + +// *****************[ STK parameter constants ]*************************** +#define PARAM_BUILD_NUMBER_LOW 0x80 +#define PARAM_BUILD_NUMBER_HIGH 0x81 +#define PARAM_HW_VER 0x90 +#define PARAM_SW_MAJOR 0x91 +#define PARAM_SW_MINOR 0x92 +#define PARAM_VTARGET 0x94 +#define PARAM_VADJUST 0x95 +#define PARAM_OSC_PSCALE 0x96 +#define PARAM_OSC_CMATCH 0x97 +#define PARAM_SCK_DURATION 0x98 +#define PARAM_TOPCARD_DETECT 0x9A +#define PARAM_STATUS 0x9C +#define PARAM_DATA 0x9D +#define PARAM_RESET_POLARITY 0x9E +#define PARAM_CONTROLLER_INIT 0x9F + +// *****************[ STK answer constants ]*************************** + +#define ANSWER_CKSUM_ERROR 0xB0 + diff --git a/test/ardmake/hardware/bootloaders/stk500v2/stk500boot.c b/test/ardmake/hardware/bootloaders/stk500v2/stk500boot.c new file mode 100644 index 0000000..13dec89 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/stk500boot.c @@ -0,0 +1,1996 @@ +/***************************************************************************** +Title: STK500v2 compatible bootloader + Modified for Wiring board ATMega128-16MHz +Author: Peter Fleury http://jump.to/fleury +File: $Id: stk500boot.c,v 1.11 2006/06/25 12:39:17 peter Exp $ +Compiler: avr-gcc 3.4.5 or 4.1 / avr-libc 1.4.3 +Hardware: All AVRs with bootloader support, tested with ATmega8 +License: GNU General Public License + +Modified: Worapoht Kornkaewwattanakul http://www.avride.com +Date: 17 October 2007 +Update: 1st, 29 Dec 2007 : Enable CMD_SPI_MULTI but ignore unused command by return 0x00 byte response.. +Compiler: WINAVR20060421 +Description: add timeout feature like previous Wiring bootloader + +DESCRIPTION: + This program allows an AVR with bootloader capabilities to + read/write its own Flash/EEprom. To enter Programming mode + an input pin is checked. If this pin is pulled low, programming mode + is entered. If not, normal execution is done from $0000 + "reset" vector in Application area. + Size fits into a 1024 word bootloader section + when compiled with avr-gcc 4.1 + (direct replace on Wiring Board without fuse setting changed) + +USAGE: + - Set AVR MCU type and clock-frequency (F_CPU) in the Makefile. + - Set baud rate below (AVRISP only works with 115200 bps) + - compile/link the bootloader with the supplied Makefile + - program the "Boot Flash section size" (BOOTSZ fuses), + for boot-size 1024 words: program BOOTSZ01 + - enable the BOOT Reset Vector (program BOOTRST) + - Upload the hex file to the AVR using any ISP programmer + - Program Boot Lock Mode 3 (program BootLock 11 and BootLock 12 lock bits) // (leave them) + - Reset your AVR while keeping PROG_PIN pulled low // (for enter bootloader by switch) + - Start AVRISP Programmer (AVRStudio/Tools/Program AVR) + - AVRISP will detect the bootloader + - Program your application FLASH file and optional EEPROM file using AVRISP + +Note: + Erasing the device without flashing, through AVRISP GUI button "Erase Device" + is not implemented, due to AVRStudio limitations. + Flash is always erased before programming. + + AVRdude: + Please uncomment #define REMOVE_CMD_SPI_MULTI when using AVRdude. + Comment #define REMOVE_PROGRAM_LOCK_BIT_SUPPORT to reduce code size + Read Fuse Bits and Read/Write Lock Bits is not supported + +NOTES: + Based on Atmel Application Note AVR109 - Self-programming + Based on Atmel Application Note AVR068 - STK500v2 Protocol + +LICENSE: + Copyright (C) 2006 Peter Fleury + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +*****************************************************************************/ + +//************************************************************************ +//* Edit History +//************************************************************************ +//* Jul 7, 2010 = Mark Sproul msproul@skycharoit.com +//* Jul 7, 2010 Working on mega2560. No Auto-restart +//* Jul 7, 2010 Switched to 8K bytes (4K words) so that we have room for the monitor +//* Jul 8, 2010 Found older version of source that had auto restart, put that code back in +//* Jul 8, 2010 Adding monitor code +//* Jul 11, 2010 Added blinking LED while waiting for download to start +//* Jul 11, 2010 Added EEPROM test +//* Jul 29, 2010 Added recchar_timeout for timing out on bootloading +//* Aug 23, 2010 Added support for atmega2561 +//* Aug 26, 2010 Removed support for BOOT_BY_SWITCH +//************************************************************************ + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "command.h" + + +#if defined(_MEGA_BOARD_) || defined(_BOARD_AMBER128_) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) + #define ENABLE_MONITOR + static void RunMonitor(void); +#endif + +//#define _DEBUG_SERIAL_ +//#define _DEBUG_WITH_LEDS_ + + +/* + * Uncomment the following lines to save code space + */ +//#define REMOVE_PROGRAM_LOCK_BIT_SUPPORT // disable program lock bits +//#define REMOVE_BOOTLOADER_LED // no LED to show active bootloader +//#define REMOVE_CMD_SPI_MULTI // disable processing of SPI_MULTI commands, Remark this line for AVRDUDE +// + + + +//************************************************************************ +//* LED on pin "PROGLED_PIN" on port "PROGLED_PORT" +//* indicates that bootloader is active +//* PG2 -> LED on Wiring board +//************************************************************************ +#define BLINK_LED_WHILE_WAITING + +#ifdef _MEGA_BOARD_ + #define PROGLED_PORT PORTB + #define PROGLED_DDR DDRB + #define PROGLED_PIN PINB7 +#elif defined( _BOARD_AMBER128_ ) + //* this is for the amber 128 http://www.soc-robotics.com/ + //* onbarod led is PORTE4 + #define PROGLED_PORT PORTD + #define PROGLED_DDR DDRD + #define PROGLED_PIN PINE7 +#elif defined( _CEREBOTPLUS_BOARD_ ) + //* this is for the Cerebot 2560 board + //* onbarod leds are on PORTE4-7 + #define PROGLED_PORT PORTE + #define PROGLED_DDR DDRE + #define PROGLED_PIN PINE7 +#elif defined( _PENGUINO_ ) + //* this is for the Penguino + //* onbarod led is PORTE4 + #define PROGLED_PORT PORTC + #define PROGLED_DDR DDRC + #define PROGLED_PIN PINC6 +#elif defined( _ANDROID_2561_ ) || defined( __AVR_ATmega2561__ ) + //* this is for the Boston Android 2561 + //* onbarod led is PORTE4 + #define PROGLED_PORT PORTA + #define PROGLED_DDR DDRA + #define PROGLED_PIN PINA3 +#else + #define PROGLED_PORT PORTG + #define PROGLED_DDR DDRG + #define PROGLED_PIN PING2 +#endif + + + +/* + * define CPU frequency in Mhz here if not defined in Makefile + */ +#ifndef F_CPU + #define F_CPU 16000000UL +#endif + +/* + * UART Baudrate, AVRStudio AVRISP only accepts 115200 bps + */ + +#ifndef BAUDRATE + #define BAUDRATE 115200 +#endif + +/* + * Enable (1) or disable (0) USART double speed operation + */ +#ifndef UART_BAUDRATE_DOUBLE_SPEED + #if defined (__AVR_ATmega32__) + #define UART_BAUDRATE_DOUBLE_SPEED 0 + #else + #define UART_BAUDRATE_DOUBLE_SPEED 1 + #endif +#endif + +/* + * HW and SW version, reported to AVRISP, must match version of AVRStudio + */ +#define CONFIG_PARAM_BUILD_NUMBER_LOW 0 +#define CONFIG_PARAM_BUILD_NUMBER_HIGH 0 +#define CONFIG_PARAM_HW_VER 0x0F +#define CONFIG_PARAM_SW_MAJOR 2 +#define CONFIG_PARAM_SW_MINOR 0x0A + +/* + * Calculate the address where the bootloader starts from FLASHEND and BOOTSIZE + * (adjust BOOTSIZE below and BOOTLOADER_ADDRESS in Makefile if you want to change the size of the bootloader) + */ +//#define BOOTSIZE 1024 +#if FLASHEND > 0x0F000 + #define BOOTSIZE 8192 +#else + #define BOOTSIZE 2048 +#endif + +#define APP_END (FLASHEND -(2*BOOTSIZE) + 1) + +/* + * Signature bytes are not available in avr-gcc io_xxx.h + */ +#if defined (__AVR_ATmega8__) + #define SIGNATURE_BYTES 0x1E9307 +#elif defined (__AVR_ATmega16__) + #define SIGNATURE_BYTES 0x1E9403 +#elif defined (__AVR_ATmega32__) + #define SIGNATURE_BYTES 0x1E9502 +#elif defined (__AVR_ATmega8515__) + #define SIGNATURE_BYTES 0x1E9306 +#elif defined (__AVR_ATmega8535__) + #define SIGNATURE_BYTES 0x1E9308 +#elif defined (__AVR_ATmega162__) + #define SIGNATURE_BYTES 0x1E9404 +#elif defined (__AVR_ATmega128__) + #define SIGNATURE_BYTES 0x1E9702 +#elif defined (__AVR_ATmega1280__) + #define SIGNATURE_BYTES 0x1E9703 +#elif defined (__AVR_ATmega2560__) + #define SIGNATURE_BYTES 0x1E9801 +#elif defined (__AVR_ATmega2561__) + #define SIGNATURE_BYTES 0x1e9802 +#else + #error "no signature definition for MCU available" +#endif + + +#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__) \ + || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega8535__) + /* ATMega8 with one USART */ + #define UART_BAUD_RATE_LOW UBRRL + #define UART_STATUS_REG UCSRA + #define UART_CONTROL_REG UCSRB + #define UART_ENABLE_TRANSMITTER TXEN + #define UART_ENABLE_RECEIVER RXEN + #define UART_TRANSMIT_COMPLETE TXC + #define UART_RECEIVE_COMPLETE RXC + #define UART_DATA_REG UDR + #define UART_DOUBLE_SPEED U2X + +#elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega162__) \ + || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) + /* ATMega with two USART, use UART0 */ + #define UART_BAUD_RATE_LOW UBRR0L + #define UART_STATUS_REG UCSR0A + #define UART_CONTROL_REG UCSR0B + #define UART_ENABLE_TRANSMITTER TXEN0 + #define UART_ENABLE_RECEIVER RXEN0 + #define UART_TRANSMIT_COMPLETE TXC0 + #define UART_RECEIVE_COMPLETE RXC0 + #define UART_DATA_REG UDR0 + #define UART_DOUBLE_SPEED U2X0 +#else + #error "no UART definition for MCU available" +#endif + + + +/* + * Macro to calculate UBBR from XTAL and baudrate + */ +#if defined(__AVR_ATmega32__) && UART_BAUDRATE_DOUBLE_SPEED + #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu / 4 / baudRate - 1) / 2) +#elif defined(__AVR_ATmega32__) + #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu / 8 / baudRate - 1) / 2) +#elif UART_BAUDRATE_DOUBLE_SPEED + #define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*8.0)-1.0+0.5) +#else + #define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*16.0)-1.0+0.5) +#endif + + +/* + * States used in the receive state machine + */ +#define ST_START 0 +#define ST_GET_SEQ_NUM 1 +#define ST_MSG_SIZE_1 2 +#define ST_MSG_SIZE_2 3 +#define ST_GET_TOKEN 4 +#define ST_GET_DATA 5 +#define ST_GET_CHECK 6 +#define ST_PROCESS 7 + +/* + * use 16bit address variable for ATmegas with <= 64K flash + */ +#if defined(RAMPZ) + typedef uint32_t address_t; +#else + typedef uint16_t address_t; +#endif + +/* + * function prototypes + */ +static void sendchar(char c); +static unsigned char recchar(void); + +/* + * since this bootloader is not linked against the avr-gcc crt1 functions, + * to reduce the code size, we need to provide our own initialization + */ +void __jumpMain (void) __attribute__ ((naked)) __attribute__ ((section (".init9"))); +#include + +//#define SPH_REG 0x3E +//#define SPL_REG 0x3D + +//***************************************************************************** +void __jumpMain(void) +{ +//* July 17, 2010 Added stack pointer initialzation +//* the first line did not do the job on the ATmega128 + + asm volatile ( ".set __stack, %0" :: "i" (RAMEND) ); + +// ldi r16,high(RAMEND) +// out SPH,r16 ; Set stack pointer to top of RAM + +// asm volatile ( "ldi 16, 0x10"); + asm volatile ( "ldi 16, %0" :: "i" (RAMEND >> 8) ); +// asm volatile ( "out 0x3E,16"); +// asm volatile ( "out %0,16" :: "i" (SPH_REG) ); + asm volatile ( "out %0,16" :: "i" (AVR_STACK_POINTER_HI_ADDR) ); + +// asm volatile ( "ldi 16, 0x00"); + asm volatile ( "ldi 16, %0" :: "i" (RAMEND & 0x0ff) ); +// asm volatile ( "out 0x3d,16"); +// asm volatile ( "out %0,16" :: "i" (SPL_REG) ); + asm volatile ( "out %0,16" :: "i" (AVR_STACK_POINTER_LO_ADDR) ); + + + + asm volatile ( "clr __zero_reg__" ); // GCC depends on register r1 set to 0 + asm volatile ( "out %0, __zero_reg__" :: "I" (_SFR_IO_ADDR(SREG)) ); // set SREG to 0 +// asm volatile ( "rjmp main"); // jump to main() + asm volatile ( "jmp main"); // jump to main() +} + + +//***************************************************************************** +void delay_ms(unsigned int timedelay) +{ + unsigned int i; + for (i=0;i> 1) +//***************************************************************************** +static unsigned char recchar_timeout(void) +{ +uint32_t count = 0; + + while (!(UART_STATUS_REG & (1 << UART_RECEIVE_COMPLETE))) + { + // wait for data + count++; + if (count > MAX_TIME_COUNT) + { + unsigned int data; + #if (FLASHEND > 0x0FFFF) + data = pgm_read_word_far(0); //* get the first word of the user program + #else + data = pgm_read_word_near(0); //* get the first word of the user program + #endif + if (data != 0xffff) //* make sure its valid before jumping to it. + { + asm volatile( + "clr r30 \n\t" + "clr r31 \n\t" + "ijmp \n\t" + ); + } + count = 0; + } + } + return UART_DATA_REG; +} + + + +//***************************************************************************** +int main(void) +{ + address_t address = 0; + address_t eraseAddress = 0; + unsigned char msgParseState; + unsigned int ii = 0; + unsigned char checksum = 0; + unsigned char seqNum = 0; + unsigned int msgLength = 0; + unsigned char msgBuffer[285]; + unsigned char c, *p; + unsigned char isLeave = 0; + + unsigned long boot_timeout; + unsigned long boot_timer; + unsigned int boot_state; +#ifdef ENABLE_MONITOR + unsigned int exPointCntr = 0; +#endif + + + boot_timer = 0; + boot_state = 0; + +#ifdef BLINK_LED_WHILE_WAITING + boot_timeout = 20000; //* should be about 1 second +// boot_timeout = 170000; +#else + boot_timeout = 3500000; // 7 seconds , approx 2us per step when optimize "s" +#endif + /* + * Branch to bootloader or application code ? + */ + +#ifndef REMOVE_BOOTLOADER_LED + /* PROG_PIN pulled low, indicate with LED that bootloader is active */ + PROGLED_DDR |= (1< boot_timeout) + { + boot_state = 1; // (after ++ -> boot_state=2 bootloader timeout, jump to main 0x00000 ) + } + #ifdef BLINK_LED_WHILE_WAITING + if ((boot_timer % 7000) == 0) + { + //* toggle the LED + PROGLED_PORT ^= (1<>16) & 0x000000FF; + else if ( signatureIndex == 1 ) + answerByte = (SIGNATURE_BYTES >> 8) & 0x000000FF; + else + answerByte = SIGNATURE_BYTES & 0x000000FF; + } + else if ( msgBuffer[4] & 0x50 ) + { + answerByte = 0; //read fuse/lock bits not implemented, return dummy value + } + else + { + answerByte = 0; // for all others command are not implemented, return dummy value for AVRDUDE happy + // flag = 1; // Remark this line for AVRDUDE + } + if ( !flag ) + { + msgLength = 7; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = 0; + msgBuffer[3] = msgBuffer[4]; + msgBuffer[4] = 0; + msgBuffer[5] = answerByte; + msgBuffer[6] = STATUS_CMD_OK; + } + } + break; + #endif + case CMD_SIGN_ON: + msgLength = 11; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = 8; + msgBuffer[3] = 'A'; + msgBuffer[4] = 'V'; + msgBuffer[5] = 'R'; + msgBuffer[6] = 'I'; + msgBuffer[7] = 'S'; + msgBuffer[8] = 'P'; + msgBuffer[9] = '_'; + msgBuffer[10] = '2'; + break; + + case CMD_GET_PARAMETER: + { + unsigned char value; + + switch(msgBuffer[1]) + { + case PARAM_BUILD_NUMBER_LOW: + value = CONFIG_PARAM_BUILD_NUMBER_LOW; + break; + case PARAM_BUILD_NUMBER_HIGH: + value = CONFIG_PARAM_BUILD_NUMBER_HIGH; + break; + case PARAM_HW_VER: + value = CONFIG_PARAM_HW_VER; + break; + case PARAM_SW_MAJOR: + value = CONFIG_PARAM_SW_MAJOR; + break; + case PARAM_SW_MINOR: + value = CONFIG_PARAM_SW_MINOR; + break; + default: + value = 0; + break; + } + msgLength = 3; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = value; + } + break; + + case CMD_LEAVE_PROGMODE_ISP: + isLeave = 1; + //* fall thru + + case CMD_SET_PARAMETER: + case CMD_ENTER_PROGMODE_ISP: + msgLength = 2; + msgBuffer[1] = STATUS_CMD_OK; + break; + + case CMD_READ_SIGNATURE_ISP: + { + unsigned char signatureIndex = msgBuffer[4]; + unsigned char signature; + + if ( signatureIndex == 0 ) + signature = (SIGNATURE_BYTES >>16) & 0x000000FF; + else if ( signatureIndex == 1 ) + signature = (SIGNATURE_BYTES >> 8) & 0x000000FF; + else + signature = SIGNATURE_BYTES & 0x000000FF; + + msgLength = 4; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = signature; + msgBuffer[3] = STATUS_CMD_OK; + } + break; + + case CMD_READ_LOCK_ISP: + msgLength = 4; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = boot_lock_fuse_bits_get( GET_LOCK_BITS ); + msgBuffer[3] = STATUS_CMD_OK; + break; + + case CMD_READ_FUSE_ISP: + { + unsigned char fuseBits; + + if ( msgBuffer[2] == 0x50 ) + { + if ( msgBuffer[3] == 0x08 ) + fuseBits = boot_lock_fuse_bits_get( GET_EXTENDED_FUSE_BITS ); + else + fuseBits = boot_lock_fuse_bits_get( GET_LOW_FUSE_BITS ); + } + else + { + fuseBits = boot_lock_fuse_bits_get( GET_HIGH_FUSE_BITS ); + } + msgLength = 4; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = fuseBits; + msgBuffer[3] = STATUS_CMD_OK; + } + break; + + #ifndef REMOVE_PROGRAM_LOCK_BIT_SUPPORT + case CMD_PROGRAM_LOCK_ISP: + { + unsigned char lockBits = msgBuffer[4]; + + lockBits = (~lockBits) & 0x3C; // mask BLBxx bits + boot_lock_bits_set(lockBits); // and program it + boot_spm_busy_wait(); + + msgLength = 3; + msgBuffer[1] = STATUS_CMD_OK; + msgBuffer[2] = STATUS_CMD_OK; + } + break; + #endif + case CMD_CHIP_ERASE_ISP: + eraseAddress = 0; + msgLength = 2; + msgBuffer[1] = STATUS_CMD_OK; + break; + + case CMD_LOAD_ADDRESS: + #if defined(RAMPZ) + address = ( ((address_t)(msgBuffer[1])<<24)|((address_t)(msgBuffer[2])<<16)|((address_t)(msgBuffer[3])<<8)|(msgBuffer[4]) )<<1; + #else + address = ( ((msgBuffer[3])<<8)|(msgBuffer[4]) )<<1; //convert word to byte address + #endif + msgLength = 2; + msgBuffer[1] = STATUS_CMD_OK; + break; + + case CMD_PROGRAM_FLASH_ISP: + case CMD_PROGRAM_EEPROM_ISP: + { + unsigned int size = ((msgBuffer[1])<<8) | msgBuffer[2]; + unsigned char *p = msgBuffer+10; + unsigned int data; + unsigned char highByte, lowByte; + address_t tempaddress = address; + + + if ( msgBuffer[0] == CMD_PROGRAM_FLASH_ISP ) + { + // erase only main section (bootloader protection) + if (eraseAddress < APP_END ) + { + boot_page_erase(eraseAddress); // Perform page erase + boot_spm_busy_wait(); // Wait until the memory is erased. + eraseAddress += SPM_PAGESIZE; // point to next page to be erase + } + + /* Write FLASH */ + do { + lowByte = *p++; + highByte = *p++; + + data = (highByte << 8) | lowByte; + boot_page_fill(address,data); + + address = address + 2; // Select next word in memory + size -= 2; // Reduce number of bytes to write by two + } while (size); // Loop until all bytes written + + boot_page_write(tempaddress); + boot_spm_busy_wait(); + boot_rww_enable(); // Re-enable the RWW section + } + else + { + #if (!defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) && !defined(__AVR_ATmega2561__)) + /* write EEPROM */ + do { + EEARL = address; // Setup EEPROM address + EEARH = (address >> 8); + address++; // Select next EEPROM byte + + EEDR = *p++; // get byte from buffer + EECR |= (1<> 8); //MSB + address += 2; // Select next word in memory + size -= 2; + }while (size); + } + else + { + /* Read EEPROM */ + do { + EEARL = address; // Setup EEPROM address + EEARH = ((address >> 8)); + address++; // Select next EEPROM byte + EECR |= (1<>8)&0xFF); + sendchar(c); + checksum ^= c; + + c = msgLength&0x00FF; + sendchar(c); + checksum ^= c; + + sendchar(TOKEN); + checksum ^= TOKEN; + + p = msgBuffer; + while ( msgLength ) + { + c = *p++; + sendchar(c); + checksum ^=c; + msgLength--; + } + sendchar(checksum); + seqNum++; + + #ifndef REMOVE_BOOTLOADER_LED + //* toggle the LED + PROGLED_PORT ^= (1< + + +base address = f000 +avrdude: Device signature = 0x1e9703 +avrdude: safemode: lfuse reads as FF +avrdude: safemode: hfuse reads as D8 +avrdude: safemode: efuse reads as F5 +avrdude> +*/ + +//************************************************************************ +#ifdef ENABLE_MONITOR +#include + +unsigned long gRamIndex; +unsigned long gFlashIndex; +unsigned long gEepromIndex; + + +#define true 1 +#define false 0 + +#if defined(__AVR_ATmega128__) + #define kCPU_NAME "ATmega128" +#elif defined(__AVR_ATmega1280__) + #define kCPU_NAME "ATmega1280" +#elif defined(__AVR_ATmega1281__) + #define kCPU_NAME "ATmega1281" +#elif defined(__AVR_ATmega2560__) + #define kCPU_NAME "ATmega2560" +#elif defined(__AVR_ATmega2561__) + #define kCPU_NAME "ATmega2561" +#endif + +#ifdef _VECTORS_SIZE + #define kInterruptVectorCount (_VECTORS_SIZE / 4) +#else + #define kInterruptVectorCount 23 +#endif + + +void PrintDecInt(int theNumber, int digitCnt); + +#ifdef kCPU_NAME + prog_char gTextMsg_CPU_Name[] PROGMEM = kCPU_NAME; +#else + prog_char gTextMsg_CPU_Name[] PROGMEM = "UNKNOWN"; +#endif + + prog_char gTextMsg_Explorer[] PROGMEM = "Arduino explorer stk500V2 by MLS"; + prog_char gTextMsg_Prompt[] PROGMEM = "Bootloader>"; + prog_char gTextMsg_HUH[] PROGMEM = "Huh?"; + prog_char gTextMsg_COMPILED_ON[] PROGMEM = "Compiled on = "; + prog_char gTextMsg_CPU_Type[] PROGMEM = "CPU Type = "; + prog_char gTextMsg_AVR_ARCH[] PROGMEM = "__AVR_ARCH__ = "; + prog_char gTextMsg_AVR_LIBC[] PROGMEM = "AVR LibC Ver = "; + prog_char gTextMsg_GCC_VERSION[] PROGMEM = "GCC Version = "; + prog_char gTextMsg_CPU_SIGNATURE[] PROGMEM = "CPU signature= "; + prog_char gTextMsg_FUSE_BYTE_LOW[] PROGMEM = "Low fuse = "; + prog_char gTextMsg_FUSE_BYTE_HIGH[] PROGMEM = "High fuse = "; + prog_char gTextMsg_FUSE_BYTE_EXT[] PROGMEM = "Ext fuse = "; + prog_char gTextMsg_FUSE_BYTE_LOCK[] PROGMEM = "Lock fuse = "; + prog_char gTextMsg_GCC_DATE_STR[] PROGMEM = __DATE__; + prog_char gTextMsg_AVR_LIBC_VER_STR[] PROGMEM = __AVR_LIBC_VERSION_STRING__; + prog_char gTextMsg_GCC_VERSION_STR[] PROGMEM = __VERSION__; + prog_char gTextMsg_VECTOR_HEADER[] PROGMEM = "V# ADDR op code instruction addr Interrupt"; + prog_char gTextMsg_noVector[] PROGMEM = "no vector"; + prog_char gTextMsg_rjmp[] PROGMEM = "rjmp "; + prog_char gTextMsg_jmp[] PROGMEM = "jmp "; + prog_char gTextMsg_WHAT_PORT[] PROGMEM = "What port:"; + prog_char gTextMsg_PortNotSupported[] PROGMEM = "Port not supported"; + prog_char gTextMsg_MustBeLetter[] PROGMEM = "Must be a letter"; + prog_char gTextMsg_SPACE[] PROGMEM = " "; + prog_char gTextMsg_WriteToEEprom[] PROGMEM = "Writting EE"; + prog_char gTextMsg_ReadingEEprom[] PROGMEM = "Reading EE"; + prog_char gTextMsg_EEPROMerrorCnt[] PROGMEM = "eeprom error count="; + prog_char gTextMsg_PORT[] PROGMEM = "PORT"; + + +//************************************************************************ +//* Help messages + prog_char gTextMsg_HELP_MSG_0[] PROGMEM = "0=Zero address ctrs"; + prog_char gTextMsg_HELP_MSG_QM[] PROGMEM = "?=CPU stats"; + prog_char gTextMsg_HELP_MSG_AT[] PROGMEM = "@=EEPROM test"; + prog_char gTextMsg_HELP_MSG_B[] PROGMEM = "B=Blink LED"; + prog_char gTextMsg_HELP_MSG_E[] PROGMEM = "E=Dump EEPROM"; + prog_char gTextMsg_HELP_MSG_F[] PROGMEM = "F=Dump FLASH"; + prog_char gTextMsg_HELP_MSG_H[] PROGMEM = "H=Help"; + prog_char gTextMsg_HELP_MSG_L[] PROGMEM = "L=List I/O Ports"; + prog_char gTextMsg_HELP_MSG_Q[] PROGMEM = "Q=Quit & jump to user pgm"; + prog_char gTextMsg_HELP_MSG_R[] PROGMEM = "R=Dump RAM"; + prog_char gTextMsg_HELP_MSG_V[] PROGMEM = "V=show interrupt Vectors"; + prog_char gTextMsg_HELP_MSG_Y[] PROGMEM = "Y=Port blink"; + + prog_char gTextMsg_END[] PROGMEM = "*"; + + +//************************************************************************ +void PrintFromPROGMEM(void *dataPtr, unsigned char offset) +{ +uint8_t ii; +char theChar; + + ii = offset; + theChar = 1; + + while (theChar != 0) + { + theChar = pgm_read_byte_far((uint32_t)dataPtr + ii); + if (theChar != 0) + { + sendchar(theChar); + } + ii++; + } +} + +//************************************************************************ +void PrintNewLine(void) +{ + sendchar(0x0d); + sendchar(0x0a); +} + + +//************************************************************************ +void PrintFromPROGMEMln(void *dataPtr, unsigned char offset) +{ + PrintFromPROGMEM(dataPtr, offset); + + PrintNewLine(); +} + + +//************************************************************************ +void PrintString(char *textString) +{ +char theChar; +int ii; + + theChar = 1; + ii = 0; + while (theChar != 0) + { + theChar = textString[ii]; + if (theChar != 0) + { + sendchar(theChar); + } + ii++; + } +} + +//************************************************************************ +void PrintHexByte(unsigned char theByte) +{ +char theChar; + + theChar = 0x30 + ((theByte >> 4) & 0x0f); + if (theChar > 0x39) + { + theChar += 7; + } + sendchar(theChar ); + + theChar = 0x30 + (theByte & 0x0f); + if (theChar > 0x39) + { + theChar += 7; + } + sendchar(theChar ); +} + +//************************************************************************ +void PrintDecInt(int theNumber, int digitCnt) +{ +int theChar; +int myNumber; + + myNumber = theNumber; + + if ((myNumber > 100) || (digitCnt >= 3)) + { + theChar = 0x30 + myNumber / 100; + sendchar(theChar ); + } + + if ((myNumber > 10) || (digitCnt >= 2)) + { + theChar = 0x30 + ((myNumber % 100) / 10 ); + sendchar(theChar ); + } + theChar = 0x30 + (myNumber % 10); + sendchar(theChar ); +} + + + + +//************************************************************************ +static void PrintCPUstats(void) +{ +unsigned char fuseByte; + + PrintFromPROGMEMln(gTextMsg_Explorer, 0); + + PrintFromPROGMEM(gTextMsg_COMPILED_ON, 0); + PrintFromPROGMEMln(gTextMsg_GCC_DATE_STR, 0); + + PrintFromPROGMEM(gTextMsg_CPU_Type, 0); + PrintFromPROGMEMln(gTextMsg_CPU_Name, 0); + + PrintFromPROGMEM(gTextMsg_AVR_ARCH, 0); + PrintDecInt(__AVR_ARCH__, 1); + PrintNewLine(); + + PrintFromPROGMEM(gTextMsg_GCC_VERSION, 0); + PrintFromPROGMEMln(gTextMsg_GCC_VERSION_STR, 0); + + //* these can be found in avr/version.h + PrintFromPROGMEM(gTextMsg_AVR_LIBC, 0); + PrintFromPROGMEMln(gTextMsg_AVR_LIBC_VER_STR, 0); + +#if defined(SIGNATURE_0) + PrintFromPROGMEM(gTextMsg_CPU_SIGNATURE, 0); + //* these can be found in avr/iomxxx.h + PrintHexByte(SIGNATURE_0); + PrintHexByte(SIGNATURE_1); + PrintHexByte(SIGNATURE_2); + PrintNewLine(); +#endif + + +#if defined(GET_LOW_FUSE_BITS) + //* fuse settings + PrintFromPROGMEM(gTextMsg_FUSE_BYTE_LOW, 0); + fuseByte = boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS); + PrintHexByte(fuseByte); + PrintNewLine(); + + PrintFromPROGMEM(gTextMsg_FUSE_BYTE_HIGH, 0); + fuseByte = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS); + PrintHexByte(fuseByte); + PrintNewLine(); + + PrintFromPROGMEM(gTextMsg_FUSE_BYTE_EXT, 0); + fuseByte = boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS); + PrintHexByte(fuseByte); + PrintNewLine(); + + PrintFromPROGMEM(gTextMsg_FUSE_BYTE_LOCK, 0); + fuseByte = boot_lock_fuse_bits_get(GET_LOCK_BITS); + PrintHexByte(fuseByte); + PrintNewLine(); + +#endif + +} + +#ifndef sbi + #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) +#endif + +//************************************************************************ +int analogRead(uint8_t pin) +{ +uint8_t low, high; + + // set the analog reference (high two bits of ADMUX) and select the + // channel (low 4 bits). this also sets ADLAR (left-adjust result) + // to 0 (the default). +// ADMUX = (analog_reference << 6) | (pin & 0x07); + ADMUX = (1 << 6) | (pin & 0x07); + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + // the MUX5 bit of ADCSRB selects whether we're reading from channels + // 0 to 7 (MUX5 low) or 8 to 15 (MUX5 high). + ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5); +#endif + + // without a delay, we seem to read from the wrong channel + //delay(1); + + // start the conversion + sbi(ADCSRA, ADSC); + + // ADSC is cleared when the conversion finishes + while (bit_is_set(ADCSRA, ADSC)); + + // we have to read ADCL first; doing so locks both ADCL + // and ADCH until ADCH is read. reading ADCL second would + // cause the results of each conversion to be discarded, + // as ADCL and ADCH would be locked when it completed. + low = ADCL; + high = ADCH; + + // combine the two bytes + return (high << 8) | low; +} + +//************************************************************************ +static void BlinkLED(void) +{ + PROGLED_DDR |= (1< 0) + { + if (myAddressPointer > 0x10000) + { + PrintHexByte((myAddressPointer >> 16) & 0x00ff); + } + PrintHexByte((myAddressPointer >> 8) & 0x00ff); + PrintHexByte(myAddressPointer & 0x00ff); + sendchar(0x20); + sendchar('-'); + sendchar(0x20); + + asciiDump[0] = 0; + for (ii=0; ii<16; ii++) + { + switch(dumpWhat) + { + case kDUMP_FLASH: + theValue = pgm_read_byte_far(myAddressPointer); + break; + + case kDUMP_EEPROM: + theValue = eeprom_read_byte((void *)myAddressPointer); + break; + + case kDUMP_RAM: + theValue = ramPtr[myAddressPointer]; + break; + + } + PrintHexByte(theValue); + sendchar(0x20); + if ((theValue >= 0x20) && (theValue < 0x7f)) + { + asciiDump[ii % 16] = theValue; + } + else + { + asciiDump[ii % 16] = '.'; + } + + myAddressPointer++; + } + asciiDump[16] = 0; + PrintString(asciiDump); + PrintNewLine(); + + numRows--; + } +} + + + +//************************************************************************ +//* returns amount of extended memory +static void EEPROMtest(void) +{ +int ii; +char theChar; +char theEEPROMchar; +int errorCount; + + PrintFromPROGMEMln(gTextMsg_WriteToEEprom, 0); + PrintNewLine(); + ii = 0; + while (((theChar = pgm_read_byte_far(gTextMsg_Explorer + ii)) != '*') && (ii < 512)) + { + eeprom_write_byte((uint8_t *)ii, theChar); + if (theChar == 0) + { + PrintFromPROGMEM(gTextMsg_SPACE, 0); + } + else + { + sendchar(theChar); + } + ii++; + } + + //* no go back through and test + PrintNewLine(); + PrintNewLine(); + PrintFromPROGMEMln(gTextMsg_ReadingEEprom, 0); + PrintNewLine(); + errorCount = 0; + ii = 0; + while (((theChar = pgm_read_byte_far(gTextMsg_Explorer + ii)) != '*') && (ii < 512)) + { + theEEPROMchar = eeprom_read_byte((uint8_t *)ii); + if (theEEPROMchar == 0) + { + PrintFromPROGMEM(gTextMsg_SPACE, 0); + } + else + { + sendchar(theEEPROMchar); + } + if (theEEPROMchar != theChar) + { + errorCount++; + } + ii++; + } + PrintNewLine(); + PrintNewLine(); + PrintFromPROGMEM(gTextMsg_EEPROMerrorCnt, 0); + PrintDecInt(errorCount, 1); + PrintNewLine(); + PrintNewLine(); + + gEepromIndex = 0; //* set index back to zero for next eeprom dump + +} + + + +#if (FLASHEND > 0x08000) + #include "avrinterruptnames.h" + #ifndef _INTERRUPT_NAMES_DEFINED_ + #warning Interrupt vectors not defined + #endif +#endif + +//************************************************************************ +static void VectorDisplay(void) +{ +unsigned long byte1; +unsigned long byte2; +unsigned long byte3; +unsigned long byte4; +unsigned long word1; +unsigned long word2; +int vectorIndex; +unsigned long myMemoryPtr; +unsigned long wordMemoryAddress; +unsigned long realitiveAddr; +unsigned long myFullAddress; +unsigned long absoluteAddr; +#if defined(_INTERRUPT_NAMES_DEFINED_) + long stringPointer; +#endif + + myMemoryPtr = 0; + vectorIndex = 0; + PrintFromPROGMEMln(gTextMsg_CPU_Name, 0); + PrintFromPROGMEMln(gTextMsg_VECTOR_HEADER, 0); + // V# ADDR op code + // 1 - 0000 = C3 BB 00 00 rjmp 03BB >000776 RESET + while (vectorIndex < kInterruptVectorCount) + { + wordMemoryAddress = myMemoryPtr / 2; + // 01 - 0000 = 12 34 + PrintDecInt(vectorIndex + 1, 2); + sendchar(0x20); + sendchar('-'); + sendchar(0x20); + PrintHexByte((wordMemoryAddress >> 8) & 0x00ff); + PrintHexByte((wordMemoryAddress) & 0x00ff); + sendchar(0x20); + sendchar('='); + sendchar(0x20); + + + //* the AVR is LITTLE ENDIAN, swap the byte order + byte1 = pgm_read_byte_far(myMemoryPtr++); + byte2 = pgm_read_byte_far(myMemoryPtr++); + word1 = (byte2 << 8) + byte1; + + byte3 = pgm_read_byte_far(myMemoryPtr++); + byte4 = pgm_read_byte_far(myMemoryPtr++); + word2 = (byte4 << 8) + byte3; + + + PrintHexByte(byte2); + sendchar(0x20); + PrintHexByte(byte1); + sendchar(0x20); + PrintHexByte(byte4); + sendchar(0x20); + PrintHexByte(byte3); + sendchar(0x20); + + if (word1 == 0xffff) + { + PrintFromPROGMEM(gTextMsg_noVector, 0); + } + else if ((word1 & 0xc000) == 0xc000) + { + //* rjmp instruction + realitiveAddr = word1 & 0x3FFF; + absoluteAddr = wordMemoryAddress + realitiveAddr; //* add the offset to the current address + absoluteAddr = absoluteAddr << 1; //* multiply by 2 for byte address + + PrintFromPROGMEM(gTextMsg_rjmp, 0); + PrintHexByte((realitiveAddr >> 8) & 0x00ff); + PrintHexByte((realitiveAddr) & 0x00ff); + sendchar(0x20); + sendchar('>'); + PrintHexByte((absoluteAddr >> 16) & 0x00ff); + PrintHexByte((absoluteAddr >> 8) & 0x00ff); + PrintHexByte((absoluteAddr) & 0x00ff); + + } + else if ((word1 & 0xfE0E) == 0x940c) + { + //* jmp instruction, this is REALLY complicated, refer to the instruction manual (JMP) + myFullAddress = ((byte1 & 0x01) << 16) + + ((byte1 & 0xf0) << 17) + + ((byte2 & 0x01) << 21) + + word2; + + absoluteAddr = myFullAddress << 1; + + PrintFromPROGMEM(gTextMsg_jmp, 0); + PrintHexByte((myFullAddress >> 16) & 0x00ff); + PrintHexByte((myFullAddress >> 8) & 0x00ff); + PrintHexByte((myFullAddress) & 0x00ff); + sendchar(0x20); + sendchar('>'); + PrintHexByte((absoluteAddr >> 16) & 0x00ff); + PrintHexByte((absoluteAddr >> 8) & 0x00ff); + PrintHexByte((absoluteAddr) & 0x00ff); + } + + #if defined(_INTERRUPT_NAMES_DEFINED_) + sendchar(0x20); + stringPointer = pgm_read_word_far(&(gInterruptNameTable[vectorIndex])); + PrintFromPROGMEM((char *)stringPointer, 0); + #endif + PrintNewLine(); + + vectorIndex++; + } +} + +//************************************************************************ +static void PrintAvailablePort(char thePortLetter) +{ + PrintFromPROGMEM(gTextMsg_PORT, 0); + sendchar(thePortLetter); + PrintNewLine(); +} + +//************************************************************************ +static void ListAvailablePorts(void) +{ + +#ifdef DDRA + PrintAvailablePort('A'); +#endif + +#ifdef DDRB + PrintAvailablePort('B'); +#endif + +#ifdef DDRC + PrintAvailablePort('C'); +#endif + +#ifdef DDRD + PrintAvailablePort('D'); +#endif + +#ifdef DDRE + PrintAvailablePort('E'); +#endif + +#ifdef DDRF + PrintAvailablePort('F'); +#endif + +#ifdef DDRG + PrintAvailablePort('G'); +#endif + +#ifdef DDRH + PrintAvailablePort('H'); +#endif + +#ifdef DDRI + PrintAvailablePort('I'); +#endif + +#ifdef DDRJ + PrintAvailablePort('J'); +#endif + +#ifdef DDRK + PrintAvailablePort('K'); +#endif + +#ifdef DDRL + PrintAvailablePort('L'); +#endif + +} + +//************************************************************************ +static void AVR_PortOutput(void) +{ +char portLetter; +char getCharFlag; + + PrintFromPROGMEM(gTextMsg_WHAT_PORT, 0); + + portLetter = recchar(); + portLetter = portLetter & 0x5f; + sendchar(portLetter); + PrintNewLine(); + + if ((portLetter >= 'A') && (portLetter <= 'Z')) + { + getCharFlag = true; + switch(portLetter) + { + #ifdef DDRA + case 'A': + DDRA = 0xff; + while (!Serial_Available()) + { + PORTA ^= 0xff; + delay_ms(200); + } + PORTA = 0; + break; + #endif + + #ifdef DDRB + case 'B': + DDRB = 0xff; + while (!Serial_Available()) + { + PORTB ^= 0xff; + delay_ms(200); + } + PORTB = 0; + break; + #endif + + #ifdef DDRC + case 'C': + DDRC = 0xff; + while (!Serial_Available()) + { + PORTC ^= 0xff; + delay_ms(200); + } + PORTC = 0; + break; + #endif + + #ifdef DDRD + case 'D': + DDRD = 0xff; + while (!Serial_Available()) + { + PORTD ^= 0xff; + delay_ms(200); + } + PORTD = 0; + break; + #endif + + #ifdef DDRE + case 'E': + DDRE = 0xff; + while (!Serial_Available()) + { + PORTE ^= 0xff; + delay_ms(200); + } + PORTE = 0; + break; + #endif + + #ifdef DDRF + case 'F': + DDRF = 0xff; + while (!Serial_Available()) + { + PORTF ^= 0xff; + delay_ms(200); + } + PORTF = 0; + break; + #endif + + #ifdef DDRG + case 'G': + DDRG = 0xff; + while (!Serial_Available()) + { + PORTG ^= 0xff; + delay_ms(200); + } + PORTG = 0; + break; + #endif + + #ifdef DDRH + case 'H': + DDRH = 0xff; + while (!Serial_Available()) + { + PORTH ^= 0xff; + delay_ms(200); + } + PORTH = 0; + break; + #endif + + #ifdef DDRI + case 'I': + DDRI = 0xff; + while (!Serial_Available()) + { + PORTI ^= 0xff; + delay_ms(200); + } + PORTI = 0; + break; + #endif + + #ifdef DDRJ + case 'J': + DDRJ = 0xff; + while (!Serial_Available()) + { + PORTJ ^= 0xff; + delay_ms(200); + } + PORTJ = 0; + break; + #endif + + #ifdef DDRK + case 'K': + DDRK = 0xff; + while (!Serial_Available()) + { + PORTK ^= 0xff; + delay_ms(200); + } + PORTK = 0; + break; + #endif + + #ifdef DDRL + case 'L': + DDRL = 0xff; + while (!Serial_Available()) + { + PORTL ^= 0xff; + delay_ms(200); + } + PORTL = 0; + break; + #endif + + default: + PrintFromPROGMEMln(gTextMsg_PortNotSupported, 0); + getCharFlag = false; + break; + } + if (getCharFlag) + { + recchar(); + } + } + else + { + PrintFromPROGMEMln(gTextMsg_MustBeLetter, 0); + } +} + + +//******************************************************************* +static void PrintHelp(void) +{ + PrintFromPROGMEMln(gTextMsg_HELP_MSG_0, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_QM, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_AT, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_B, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_E, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_F, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_H, 0); + + PrintFromPROGMEMln(gTextMsg_HELP_MSG_L, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_Q, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_R, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_V, 0); + PrintFromPROGMEMln(gTextMsg_HELP_MSG_Y, 0); +} + +//************************************************************************ +static void RunMonitor(void) +{ +char keepGoing; +unsigned char theChar; +int ii, jj; + + for (ii=0; ii<5; ii++) + { + for (jj=0; jj<25; jj++) + { + sendchar('!'); + } + PrintNewLine(); + } + + gRamIndex = 0; + gFlashIndex = 0; + gEepromIndex = 0; + + PrintFromPROGMEMln(gTextMsg_Explorer, 0); + + keepGoing = 1; + while (keepGoing) + { + PrintFromPROGMEM(gTextMsg_Prompt, 0); + theChar = recchar(); + if (theChar >= 0x60) + { + theChar = theChar & 0x5F; + } + #if defined( _CEREBOTPLUS_BOARD_ ) + if (theChar == 0x5F) + { + + } + else + #endif + if (theChar >= 0x20) + { + sendchar(theChar); + sendchar(0x20); + } + + switch(theChar) + { + case '0': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_0, 2); + gFlashIndex = 0; + gRamIndex = 0; + gEepromIndex = 0; + break; + + case '?': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_QM, 2); + PrintCPUstats(); + break; + + case '@': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_AT, 2); + EEPROMtest(); + break; + + case 'B': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_B, 2); + BlinkLED(); + break; + + case 'E': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_E, 2); + DumpHex(kDUMP_EEPROM, gEepromIndex, 16); + gEepromIndex += 256; + if (gEepromIndex > E2END) + { + gEepromIndex = 0; + } + break; + + case 'F': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_F, 2); + DumpHex(kDUMP_FLASH, gFlashIndex, 16); + gFlashIndex += 256; + break; + + case 'H': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_H, 2); + PrintHelp(); + break; + + case 'L': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_L, 2); + ListAvailablePorts(); + break; + + case 'Q': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_Q, 2); + keepGoing = false; + break; + + case 'R': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_R, 2); + DumpHex(kDUMP_RAM, gRamIndex, 16); + gRamIndex += 256; + break; + + case 'V': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_V, 2); + VectorDisplay(); + break; + + case 'Y': + PrintFromPROGMEMln(gTextMsg_HELP_MSG_Y, 2); + AVR_PortOutput(); + break; + + #if defined( _CEREBOTPLUS_BOARD_ ) + case 0x5F: + //* do nothing + break; + #endif + + default: + PrintFromPROGMEMln(gTextMsg_HUH, 0); + break; + } + } +} + +#endif + diff --git a/test/ardmake/hardware/bootloaders/stk500v2/stk500boot.ppg b/test/ardmake/hardware/bootloaders/stk500v2/stk500boot.ppg new file mode 100644 index 0000000..a8929d7 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/stk500boot.ppg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/ardmake/hardware/bootloaders/stk500v2/stk500boot_v2_mega2560.hex b/test/ardmake/hardware/bootloaders/stk500v2/stk500boot_v2_mega2560.hex new file mode 100644 index 0000000..4f36699 --- /dev/null +++ b/test/ardmake/hardware/bootloaders/stk500v2/stk500boot_v2_mega2560.hex @@ -0,0 +1,513 @@ +:020000023000CC +:10E000000D94F6F20D941FF30D941FF30D941FF36E +:10E010000D941FF30D941FF30D941FF30D941FF334 +:10E020000D941FF30D941FF30D941FF30D941FF324 +:10E030000D941FF30D941FF30D941FF30D941FF314 +:10E040000D941FF30D941FF30D941FF30D941FF304 +:10E050000D941FF30D941FF30D941FF30D941FF3F4 +:10E060000D941FF30D941FF30D941FF30D941FF3E4 +:10E070000D941FF30D941FF30D941FF30D941FF3D4 +:10E080000D941FF30D941FF30D941FF30D941FF3C4 +:10E090000D941FF30D941FF30D941FF30D941FF3B4 +:10E0A0000D941FF30D941FF30D941FF30D941FF3A4 +:10E0B0000D941FF30D941FF30D941FF30D941FF394 +:10E0C0000D941FF30D941FF30D941FF30D941FF384 +:10E0D0000D941FF30D941FF30D941FF30D941FF374 +:10E0E0000D941FF341546D65676132353630004140 +:10E0F000726475696E6F206578706C6F72657220DE +:10E1000073746B3530305632206279204D4C530099 +:10E11000426F6F746C6F616465723E004875683F52 +:10E1200000436F6D70696C6564206F6E20203D2028 +:10E1300000435055205479706520202020203D2038 +:10E14000005F5F4156525F415243485F5F203D2070 +:10E1500000415652204C69624320566572203D2092 +:10E16000004743432056657273696F6E20203D203F +:10E1700000435055207369676E61747572653D2068 +:10E18000004C6F77206675736520202020203D208D +:10E1900000486967682066757365202020203D204F +:10E1A00000457874206675736520202020203D206E +:10E1B000004C6F636B2066757365202020203D2026 +:10E1C00000536570202039203230313000312E3636 +:10E1D0002E3700342E332E33005623202020414486 +:10E1E00044522020206F7020636F6465202020201F +:10E1F00020696E737472756374696F6E20616464F4 +:10E2000072202020496E74657272757074006E6F92 +:10E2100020766563746F7200726A6D702020006AE8 +:10E220006D7020005768617420706F72743A0050EE +:10E230006F7274206E6F7420737570706F72746576 +:10E2400064004D7573742062652061206C65747480 +:10E2500065720020005772697474696E67204545C5 +:10E260000052656164696E6720454500656570729E +:10E270006F6D206572726F7220636F756E743D00F2 +:10E28000504F525400303D5A65726F206164647281 +:10E290006573732063747273003F3D435055207360 +:10E2A0007461747300403D454550524F4D20746574 +:10E2B000737400423D426C696E6B204C45440045CE +:10E2C0003D44756D7020454550524F4D00463D44CC +:10E2D000756D7020464C41534800483D48656C7050 +:10E2E000004C3D4C69737420492F4F20506F72745D +:10E2F0007300513D517569742026206A756D702038 +:10E30000746F20757365722070676D00523D44759F +:10E310006D702052414D00563D73686F7720696ED5 +:10E320007465727275707420566563746F727300D1 +:10E33000593D506F727420626C696E6B002A0052F6 +:10E340004553455400494E543000494E543100491C +:10E350004E543200494E543300494E543400494E15 +:10E36000543500494E543600494E54370050434905 +:10E370004E5430005043494E5431005043494E549E +:10E3800032005744540054494D45523020434F4DBC +:10E3900050410054494D45523020434F4D504200AA +:10E3A00054494D455230204F56460054494D455230 +:10E3B0003120434150540054494D45523120434F80 +:10E3C0004D50410054494D45523120434F4D50422C +:10E3D0000054494D45523120434F4D50430054495C +:10E3E0004D455231204F56460054494D455232203A +:10E3F000434F4D50410054494D45523220434F4DFB +:10E4000050420054494D455232204F56460054491F +:10E410004D45523320434150540054494D455233E9 +:10E4200020434F4D50410054494D45523320434FF6 +:10E430004D50420054494D45523320434F4D5043B7 +:10E440000054494D455233204F56460054494D45DE +:10E45000523420434150540054494D4552342043D6 +:10E460004F4D50410054494D45523420434F4D507B +:10E47000420054494D45523420434F4D50430054BF +:10E48000494D455234204F56460054494D4552356A +:10E4900020434150540054494D45523520434F4D7F +:10E4A00050410054494D45523520434F4D50420094 +:10E4B00054494D45523520434F4D50430054494D2A +:10E4C000455235204F564600555341525430205244 +:10E4D000580055534152543020554452450055532D +:10E4E0004152543020545800555341525431205217 +:10E4F000580055534152543120554452450055530C +:10E5000041525431205458005553415254322052F4 +:10E5100058005553415254322055445245005553EA +:10E5200041525432205458005553415254332052D2 +:10E5300058005553415254332055445245005553C9 +:10E5400041525433205458005350492053544300EF +:10E5500041444300414E414C4F4720434F4D5000F2 +:10E560004545205245414459005457490053504DA8 +:10E57000205245414459002A003FE345E34AE34F16 +:10E58000E354E359E35EE363E368E36DE374E37B41 +:10E59000E382E3E9E3F6E303E4ABE3B7E3C4E3D107 +:10E5A000E3DEE386E393E3A0E348E5C8E4D2E4DEF8 +:10E5B000E454E550E560E50EE41AE427E434E44170 +:10E5C000E4E8E4F2E4FEE469E56DE54CE458E46572 +:10E5D000E472E47FE48AE496E4A3E4B0E4BDE408F2 +:10E5E000E512E51EE528E532E53EE50011241FBEF3 +:10E5F000CFEFD1E2DEBFCDBF01E00CBF12E0A0E063 +:10E60000B2E0EAEDFFEF03E00BBF02C007900D920E +:10E61000A030B107D9F712E0A0E0B2E001C01D922E +:10E62000AC30B107E1F70F94FBF40D94EBFF01E27E +:10E630000EBF0FEF0DBF11241FBE0D94FBF40D9400 +:10E6400000F020E030E040ED57E005C0FA013197DE +:10E65000F1F72F5F3F4F28173907C0F308959C014A +:10E66000442737FD4095542FDA01C901860F911DCB +:10E67000A11DB11DABBFFC018791882369F0809378 +:10E68000C6008091C00086FFFCCF8091C0008064EE +:10E690008093C0006F5FE8CF08958DE08093C6003F +:10E6A0008091C00086FFFCCF8091C0008064809381 +:10E6B000C0008AE08093C6008091C00086FFFCCF36 +:10E6C0008091C00080648093C00008950F942FF360 +:10E6D0000F944DF30895FC019081992359F0909384 +:10E6E000C6008091C00086FFFCCF8091C00080648E +:10E6F0008093C0003196992379F70895282F982F99 +:10E7000092959F70892F805D8A3308F0895F80938E +:10E71000C6008091C00086FFFCCF8091C00080645D +:10E720008093C000822F8F70982F905D9A3308F0ED +:10E73000995F9093C6008091C00086FFFCCF8091C6 +:10E74000C00080648093C00008959C01FB01853661 +:10E7500091051CF46330710594F0C90164E670E022 +:10E760000F948CFF605D7F4F6093C6008091C00066 +:10E7700086FFFCCF8091C00080648093C0002B3066 +:10E78000310514F43297B4F0C90164E670E00F94D7 +:10E790008CFF6AE070E00F948CFF605D7F4F6093A8 +:10E7A000C6008091C00086FFFCCF8091C0008064CD +:10E7B0008093C000C9016AE070E00F948CFFC0969E +:10E7C0008093C6008091C00086FFFCCF8091C0007E +:10E7D00080648093C0000895282F277020642093C0 +:10E7E0007C0020917B0086958695869590E08170CF +:10E7F000907033E0880F991F3A95E1F7277F282B17 +:10E8000020937B0080917A00806480937A008091CD +:10E810007A0086FDFCCF2091780040917900942FFA +:10E8200080E030E0282B392BC90108951F93182F61 +:10E8300080E892EE60E00F942FF31093C600809171 +:10E84000C00086FFFCCF8091C00080648093C00030 +:10E850000F944DF31F9108952F923F924F925F9224 +:10E860006F927F928F929F92AF92BF92CF92DF92E0 +:10E87000EF92FF920F931F93DF93CF93CDB7DEB745 +:10E8800062970FB6F894DEBF0FBECDBF382E622E52 +:10E89000CA01DB015C016D01772460E2262E2E01A6 +:10E8A0000894411C511C8BC081E0A81680E0B8067A +:10E8B00081E0C80680E0D80628F0C601AA27BB2759 +:10E8C0000F947EF3BB27AD2D9C2D8B2D0F947EF3E3 +:10E8D0008A2D0F947EF32092C6008091C00086FF9F +:10E8E000FCCF8091C00080648093C0009DE2909333 +:10E8F000C6008091C00086FFFCCF8091C00080647C +:10E900008093C0002092C6008091C00086FFFCCF9B +:10E910008091C00080648093C000198286017501D7 +:10E9200088249924A1E03A1651F03A1620F0B2E07A +:10E930003B1661F409C00BBFF701779007C0C70110 +:10E940000F94D5FF782E02C0F7017080872D0F94A9 +:10E950007EF32092C6008091C00086FFFCCF80919C +:10E96000C00080648093C000872D8052F401EF7056 +:10E97000F0708F3520F4E40DF51D708204C0E40DB5 +:10E98000F51D8EE280830894E11CF11C011D111D10 +:10E990000894811C911C90E18916910409F0C2CF62 +:10E9A00080E190E0A0E0B0E0A80EB91ECA1EDB1E18 +:10E9B000198AC2010F946BF30F944DF36A94662089 +:10E9C00009F072CF62960FB6F894DEBF0FBECDBFCE +:10E9D000CF91DF911F910F91FF90EF90DF90CF903B +:10E9E000BF90AF909F908F907F906F905F904F906F +:10E9F0003F902F9008952F923F924F925F926F9287 +:10EA00007F928F929F92AF92BF92CF92DF92EF92BE +:10EA1000FF920F931F93DF93CF93CDB7DEB7CD5304 +:10EA2000D1400FB6F894DEBF0FBECDBF279A2F9A04 +:10EA30008091C00082608093C00080E18093C40018 +:10EA400088E18093C1000000EE24FF248701B4E038 +:10EA5000AB2EB12CCC24DD2424C0C5010197F1F7E5 +:10EA60000894E11CF11C011D111D21E2E2162EE4A7 +:10EA7000F20620E0020720E0120718F0A1E0CA2EFB +:10EA8000D12CC801B70128E53BE140E050E00F94EC +:10EA90009FFF611571058105910519F485B18058B5 +:10EAA00085B98091C00087FD03C0C114D104A9F2CB +:10EAB000A6014F5F5F4FC25EDE4F59834883CE5140 +:10EAC000D140C25EDE4F68817981CE51D140613044 +:10EAD000710511F00D946EFFC05DDE4F1982188232 +:10EAE000C053D14060E0C15DDE4F1882CF52D140AB +:10EAF000AA24BB24C05EDE4F188219821A821B82B0 +:10EB0000C052D140CE5CDE4F188219821A821B821D +:10EB1000C253D14080E090E0A0E0B0E0ABBFFC0188 +:10EB2000A791B691C45CDE4FB983A883CC53D14082 +:10EB30000D9469FFC25EDE4FE881F981CE51D1406C +:10EB4000319709F52091C600C25EDE4F1982188206 +:10EB5000CE51D14022C02F5F3F4F4F4F5F4F2130EA +:10EB6000F2E13F07FAE74F07F0E05F0780F0C45C8F +:10EB7000DE4F08811981CC53D1400F5F1F4F19F030 +:10EB8000EE27FF27099420E030E040E050E080913C +:10EB9000C00087FFE0CF2091C600213209F094C663 +:10EBA0000894A11CB11C33E0A316B10409F08EC671 +:10EBB00000E010E018C041E24093C6008091C00020 +:10EBC00086FFFCCF8091C00080648093C0002F5FDF +:10EBD0003F4F2931310579F70F944DF30F5F1F4FE8 +:10EBE0000530110519F020E030E0E5CF1092080261 +:10EBF0001092090210920A0210920B021092040263 +:10EC00001092050210920602109207021092000262 +:10EC10001092010210920202109203028FEE90EE07 +:10EC200060E00F9466F380E191EE60E00F942FF3C3 +:10EC30008091C00087FFFCCF9091C600903608F00D +:10EC40009F759032B8F09093C6008091C00086FF07 +:10EC5000FCCF8091C00080648093C00080E28093EC +:10EC6000C6008091C00086FFFCCF8091C000806408 +:10EC70008093C000983409F4DBC19934B8F492341D +:10EC800009F45DC1933458F4903319F1903308F4CA +:10EC900018C69F33A1F1903409F013C6BDC0953456 +:10ECA00009F474C1963409F00CC69CC1923509F47C +:10ECB0002FC2933538F49C3409F4F9C1913509F029 +:10ECC00000C61CC2963509F449C2993509F0F9C548 +:10ECD0009CC485E892EE62E00F9466F31092040201 +:10ECE000109205021092060210920702109208027A +:10ECF0001092090210920A0210920B0217C189E9C0 +:10ED000092EE62E00F9466F38FEE90EE60E00F9467 +:10ED100066F381E291EE60E00F942FF381EC91EEC7 +:10ED200060E00F9466F381E391EE60E00F942FF3BF +:10ED300084EE90EE60E00F9466F381E491EE60E083 +:10ED40000F942FF386E090E061E070E00F94A5F35C +:10ED50000F944DF381E691EE60E00F942FF383ED75 +:10ED600091EE60E00F9466F381E591EE60E00F9420 +:10ED70002FF38DEC91EE60E00F9466F381E791EE56 +:10ED800060E00F942FF38EE10F947EF388E90F94E7 +:10ED90007EF381E00F947EF30F944DF381E891EEC2 +:10EDA00060E00F942FF319E0E0E0F0E010935700DB +:10EDB000E4918E2F0F947EF30F944DF381E991EE41 +:10EDC00060E00F942FF3E3E0F0E010935700E4913C +:10EDD0008E2F0F947EF30F944DF381EA91EE60E055 +:10EDE0000F942FF3E2E0F0E010935700E4918E2FA0 +:10EDF0000F947EF30F944DF381EB91EE60E00F944E +:10EE00002FF3E1E0F0E0109357001491812F0F945D +:10EE10007EF30F944DF307CF85EA92EE62E00F94F4 +:10EE200066F385E592EE60E00F9466F30F944DF380 +:10EE300000E010E019C0C8016F2D0F94DDFFFF2026 +:10EE400031F483E592EE60E00F942FF30BC0F09263 +:10EE5000C6008091C00086FFFCCF8091C000806416 +:10EE60008093C0000F5F1F4FC80181519F41AA27A7 +:10EE700097FDA095BA2FABBFFC01F7905AE2F516AB +:10EE800021F062E000301607B1F60F944DF30F94B5 +:10EE90004DF381E692EE60E00F9466F30F944DF32C +:10EEA000CC24DD2400E010E01EC0C8010F94D5FF83 +:10EEB000F82E882331F483E592EE60E00F942FF36F +:10EEC0000BC08093C6008091C00086FFFCCF80916C +:10EED000C00080648093C000FE1419F00894C11C27 +:10EEE000D11C0F5F1F4FC80181519F41AA2797FD79 +:10EEF000A095BA2FABBFFC01E7907AE2E71621F0AC +:10EF000082E00030180789F60F944DF30F944DF30B +:10EF10008CE692EE60E00F942FF3C60161E070E0A2 +:10EF20000F94A5F30F944DF30F944DF3109200023C +:10EF300010920102109202021092030274CE83EB2F +:10EF400092EE62E00F9466F3279A2F9A16C02F98DC +:10EF500080E090E0E0EDF7E03197F1F7019684363C +:10EF60009105C1F72F9A80E090E0E0EDF7E031974E +:10EF7000F1F7019684369105C1F78091C00087FFB3 +:10EF8000E6CF8091C00087FFFCCF95C48FEB92EE57 +:10EF900062E00F9466F3409100025091010260918B +:10EFA00002027091030281E020E10F942CF4809121 +:10EFB000000290910102A0910202B09103028050E0 +:10EFC0009F4FAF4FBF4F8093000290930102A093D9 +:10EFD0000202B093030280509041A040B04008F478 +:10EFE00022CEA4CF8DEC92EE62E00F9466F34091B6 +:10EFF000040250910502609106027091070280E0C0 +:10F0000020E10F942CF48091040290910502A091CC +:10F010000602B091070280509F4FAF4FBF4F8093C1 +:10F02000040290930502A0930602B0930702FBCD61 +:10F030008AED92EE62E00F9466F385E892EE60E06E +:10F040000F9466F389E992EE60E00F9466F385EA27 +:10F0500092EE60E00F9466F383EB92EE60E00F9423 +:10F0600066F38FEB92EE60E00F9466F38DEC92EE18 +:10F0700060E00F9466F38AED92EE60E00F9466F321 +:10F0800081EE92EE60E00F9466F382EF92EE60E024 +:10F090000F9466F38CE093EE60E00F9466F387E1E3 +:10F0A00093EE60E00F9466F380E393EEB9CD81EECA +:10F0B00092EE62E00F9466F381E40F9416F482E41A +:10F0C0000F9416F483E40F9416F484E40F9416F46A +:10F0D00085E40F9416F486E40F9416F487E40F94F5 +:10F0E00016F488E40F9416F48AE40F9416F48BE473 +:10F0F0000F9416F48CE40F9416F495CD82EF92EEF3 +:10F1000062E00F9466F399249394AA24BB2445C427 +:10F110008CE093EE62E00F9466F340910802509108 +:10F12000090260910A0270910B0282E020E10F94C3 +:10F130002CF48091080290910902A0910A02B091EA +:10F140000B0280509F4FAF4FBF4F809308029093A8 +:10F150000902A0930A02B0930B0265CD87E193EEFA +:10F1600062E00F9466F384EE90EE60E00F9466F335 +:10F1700089ED91EE60E00F9466F309E715EECC5D42 +:10F18000DE4F19830883C452D1406624772443019B +:10F19000CA5DDE4F19821882C652D140A401930184 +:10F1A0005695479537952795C85DDE4F2883398357 +:10F1B0004A835B83C852D140CA5DDE4F4881598182 +:10F1C000C652D1404F5F5F4FCA5DDE4F59834883BF +:10F1D000C652D140CA0162E070E00F94A5F350E23C +:10F1E0005093C6008091C00086FFFCCF8091C00084 +:10F1F00080648093C0006DE26093C6008091C0007F +:10F2000086FFFCCF8091C00080648093C00070E2D4 +:10F210007093C6008091C00086FFFCCF8091C00033 +:10F2200080648093C000C85DDE4FE880F9800A8169 +:10F230001B81C852D140BB27A12F902F8F2D0F9437 +:10F240007EF3C85DDE4F8881C852D1400F947EF3B3 +:10F2500070E2F72EF092C6008091C00086FFFCCFCE +:10F260008091C00080648093C0000DE30093C600CD +:10F270008091C00086FFFCCF8091C00080648093A5 +:10F28000C00010E21093C6008091C00086FFFCCF42 +:10F290008091C00080648093C0008BBEF3012791F1 +:10F2A000C45DDE4F2883CC52D140A22EBB24CC2497 +:10F2B000DD240894611C711C811C911C8BBEF30120 +:10F2C0008791282E332444245524142D032DF22C09 +:10F2D000EE24EA0CFB1C0C1D1D1D0894611C711C06 +:10F2E000811C911C8BBEF3013791C35DDE4F3883C7 +:10F2F000CD52D1400894611C711C811C911C8BBEA5 +:10F30000F3014791C25DDE4F4883CE52D1402DEFCD +:10F310003FEF4FEF5FEF620E731E841E951E0F943A +:10F320007EF330E23093C6008091C00086FFFCCFB0 +:10F330008091C00080648093C000C45DDE4F8881EE +:10F34000CC52D1400F947EF340E24093C6008091AE +:10F35000C00086FFFCCF8091C00080648093C00015 +:10F36000C25DDE4F8881CE52D1400F947EF350E2D1 +:10F370005093C6008091C00086FFFCCF8091C000F2 +:10F3800080648093C000C35DDE4F8881CD52D14040 +:10F390000F947EF360E26093C6008091C00086FF08 +:10F3A000FCCF8091C00080648093C0007FEFE7169F +:10F3B0007FEFF70670E0070770E0170731F48EE083 +:10F3C00092EE60E00F942FF3DFC0D801C701807088 +:10F3D000907CA070B0708050904CA040B040D1F5AF +:10F3E0002FEF3FE340E050E0E222F3220423152315 +:10F3F000C85DDE4FA880B980CA80DB80C852D1408A +:10F40000AE0CBF1CC01ED11EAA0CBB1CCC1CDD1C2C +:10F4100088E192EE60E00F942FF3BB27A12F902F8D +:10F420008F2D0F947EF38E2D0F947EF330E2309368 +:10F43000C6008091C00086FFFCCF8091C000806430 +:10F440008093C0004EE34093C6008091C00086FFC9 +:10F45000FCCF87C06EE07EEF80E090E0E622F722EE +:10F46000082319237CE0E71674E9F70670E0070724 +:10F4700070E0170709F088C0C25DDE4F8881CE5268 +:10F48000D140E82EFF2400E010E0102F0F2DFE2CBD +:10F49000EE24C35DDE4F9881CD52D140E90EF11CC0 +:10F4A000011D111DD601C50181709070A070B07052 +:10F4B000DC0199278827E80EF91E0A1F1B1F20EF81 +:10F4C00030E040E050E0A222B322C422D522F1E194 +:10F4D000AA0CBB1CCC1CDD1CFA95D1F7EA0CFB1C5A +:10F4E0000C1D1D1D41E050E060E070E0242235223B +:10F4F00046225722E5E1220C331C441C551CEA9598 +:10F50000D1F7E20CF31C041D151D57016801AA0C6C +:10F51000BB1CCC1CDD1C8FE192EE60E00F942FF33E +:10F52000C801AA27BB270F947EF3BB27A12F902FDA +:10F530008F2D0F947EF38E2D0F947EF350E2509317 +:10F54000C6008091C00086FFFCCF8091C00080641F +:10F550008093C0006EE36093C6008091C00086FF78 +:10F56000FCCF8091C00080648093C000C601AA27B0 +:10F57000BB270F947EF3BB27AD2D9C2D8B2D0F94B5 +:10F580007EF38A2D0F947EF370E27093C600809113 +:10F59000C00086FFFCCF8091C00080648093C000D3 +:10F5A000CC5DDE4FE881F981C452D140CF01AA275A +:10F5B00097FDA095BA2FABBFFC018791969160E0B3 +:10F5C0000F942FF30F944DF3CC5DDE4F088119811A +:10F5D000C452D1400E5F1F4FCC5DDE4F19830883AC +:10F5E000C452D140CA5DDE4F28813981C652D14014 +:10F5F0002933310509F417CB44E050E060E070E0B6 +:10F60000640E751E861E971EC9CD80E393EE62E0E0 +:10F610000F9466F384E292EE60E00F942FF38091F2 +:10F62000C00087FFFCCF1091C6001F751093C60065 +:10F630008091C00086FFFCCF8091C00080648093E1 +:10F64000C0000F944DF3812F81548A3108F036C1E8 +:10F65000163409F495C0173490F4133409F44EC0ED +:10F66000143430F41134F1F0123409F01DC130C0FB +:10F67000143409F459C0153409F016C16BC01A349A +:10F6800009F4C4C01B3438F4173409F48FC018349B +:10F6900009F00AC1A1C01B3409F4D2C01C3409F01E +:10F6A00003C1E8C08FEF81B90DC082B1809582B9E6 +:10F6B00080E090E0E0EDF7E03197F1F70196883CCB +:10F6C0009105C1F78091C00087FFEFCF12B8EFC05E +:10F6D0008FEF84B90DC085B1809585B980E090E049 +:10F6E000E0EDF7E03197F1F70196883C9105C1F71D +:10F6F0008091C00087FFEFCF15B8D9C08FEF87B9D1 +:10F700000DC088B1809588B980E090E0E0EDF7E029 +:10F710003197F1F70196883C9105C1F78091C000BF +:10F7200087FFEFCF18B8C3C08FEF8AB90DC08BB178 +:10F7300080958BB980E090E0E0EDF7E03197F1F74C +:10F740000196883C9105C1F78091C00087FFEFCFFB +:10F750001BB8ADC08FEF8DB90DC08EB180958EB93D +:10F7600080E090E0E0EDF7E03197F1F70196883C1A +:10F770009105C1F78091C00087FFEFCF1EB897C0F9 +:10F780008FEF80BB0DC081B3809581BB80E090E09E +:10F79000E0EDF7E03197F1F70196883C9105C1F76C +:10F7A0008091C00087FFEFCF11BA81C08FEF83BB7C +:10F7B0000DC084B3809584BB80E090E0E0EDF7E07D +:10F7C0003197F1F70196883C9105C1F78091C0000F +:10F7D00087FFEFCF14BA6BC08FEF809301010FC08A +:10F7E0008091020180958093020180E090E0E0ED3D +:10F7F000F7E03197F1F70196883C9105C1F78091C8 +:10F80000C00087FFEDCF1092020151C08FEF8093AF +:10F8100004010FC08091050180958093050180E06F +:10F8200090E0E0EDF7E03197F1F70196883C910523 +:10F83000C1F78091C00087FFEDCF1092050137C05E +:10F840008FEF809307010FC080910801809580930E +:10F85000080180E090E0E0EDF7E03197F1F70196E4 +:10F86000883C9105C1F78091C00087FFEDCF1092D1 +:10F8700008011DC08FEF80930A010FC080910B011A +:10F88000809580930B0180E090E0E0EDF7E0319708 +:10F89000F1F70196883C9105C1F78091C00087FF80 +:10F8A000EDCF10920B0103C08FE292EEB9C98091A7 +:10F8B000C00087FFFCCF8091C600B5C982E492EEFC +:10F8C000AFC98CE191EEACC9AA24BB24933061F19D +:10F8D000943028F4913089F0923008F508C09530C2 +:10F8E000B1F1953040F1963009F053C04EC02B3144 +:10F8F00009F020C991E06BE11DC9213041F0C15DE3 +:10F90000DE4F5881CF52D140251709F002C362273C +:10F91000C15DDE4F2883CF52D14092E00BC9B22F98 +:10F92000A0E0622793E006C9822F90E0A82BB92BB4 +:10F93000622794E0FFC82E3009F0EBC2622795E001 +:10F94000C05DDE4F19821882C053D140F3C8E1E098 +:10F95000F0E0EC0FFD1FC05DDE4FE880F980C05382 +:10F96000D140EE0DFF1D208387010F5F1F4FC05D4B +:10F97000DE4F19830883C053D14062270A171B0743 +:10F9800009F0D8C8D80196E0D5C8261709F0C1C239 +:10F9900003C0973009F0CEC899248981833109F4D6 +:10F9A000FCC08431C8F4863009F4C2C0873050F4FA +:10F9B000823009F4F0C0833009F458C0813009F076 +:10F9C0000AC23EC0813109F462C0823108F0A6C08B +:10F9D000803109F000C2DFC0883109F472C089317A +:10F9E00050F4853109F4D9C0853108F477C18631E6 +:10F9F00009F0F1C173C18A3109F457C08A3108F4A2 +:10FA00007CC08B3109F446C08D3109F0E4C18D8191 +:10FA1000803311F090E00AC08F81882311F49EE1B9 +:10FA200005C0813011F091E001C098E91A821B8273 +:10FA30008D818C831D829E831F8227E030E0CFC1A1 +:10FA40001A8288E08B8381E48C8386E58D8382E54E +:10FA50008E8389E48F8383E5888780E589878FE5B6 +:10FA60008A8782E38B872BE030E0B9C18A818139B4 +:10FA700041F0823941F0803911F48FE005C080E017 +:10FA800003C082E001C08AE01A828B8344C09924BB +:10FA9000939481C08D81882311F48EE12CC0813034 +:10FAA00011F081E028C088E926C01A82E1E0F0E088 +:10FAB00089E08093570084918B831C8224E030E09E +:10FAC0008EC18B81803589F48C81883039F4E2E0F5 +:10FAD000F0E089E08093570084910DC0E0E0F0E011 +:10FAE00089E080935700849106C0E3E0F0E089E06C +:10FAF0008093570084911A82DFCF8D81836C99E0C7 +:10FB0000E1E0F0E0082E90935700E89507B600FC7E +:10FB1000FDCF1A821B8223E030E061C11A82CE5CE5 +:10FB2000DE4F188219821A821B82C253D14055C1FE +:10FB30008A8190E0A0E0B0E0582F442733272227A5 +:10FB40008B8190E0A0E0B0E0DC0199278827282B8A +:10FB5000392B4A2B5B2B8D8190E0A0E0B0E0282B65 +:10FB6000392B4A2B5B2B8C8190E0A0E0B0E0BA2FC0 +:10FB7000A92F982F8827282B392B4A2B5B2B220F54 +:10FB8000331F441F551FC05EDE4F288339834A83CD +:10FB90005B83C052D1401A8220C19A812B8183316C +:10FBA00049F0C05EDE4F488159816A817B81C05235 +:10FBB000D1408AC0CE5CDE4F488159816A817B8109 +:10FBC000C253D140403080EC580783E0680780E0A2 +:10FBD0007807F0F483E0FA0160935B0080935700AC +:10FBE000E89507B600FCFDCFCE5CDE4F4881598119 +:10FBF0006A817B81C253D14040505F4F6F4F7F4F2E +:10FC0000CE5CDE4F488359836A837B83C253D140E5 +:10FC1000C95CDE4F9883C753D140CA5CDE4F18825F +:10FC2000C653D140022F10E0CA5CDE4F6881798153 +:10FC3000C653D140062B172BC05EDE4F4881598139 +:10FC40006A817B81C052D140DE011B9631E08C91EC +:10FC500011962C9111971296C75CDE4F2883C953D9 +:10FC6000D140C85CDE4F1882C853D14090E0C85CD8 +:10FC7000DE4FE881F981C853D1408E2B9F2B0C01B8 +:10FC8000FA0160935B0030935700E89511244E5FB2 +:10FC90005F4F6F4F7F4F02501040C9F685E0C05E46 +:10FCA000DE4FE880F9800A811B81C052D140F70104 +:10FCB00000935B0080935700E89507B600FCFDCFEA +:10FCC00081E180935700E8951A82C05EDE4F488339 +:10FCD00059836A837B83C052D1407FC0FA80C55C60 +:10FCE000DE4FF882CB53D140C65CDE4F1882CA5338 +:10FCF000D1408B81C82EDD24C65CDE4F088119817E +:10FD0000CA53D140C02AD12A1A828981BE016D5FAF +:10FD10007F4F843121F59601C05EDE4FE880F98087 +:10FD20000A811B81C052D1400BBFF7018791969188 +:10FD3000DB018C9311969C936E5F7F4FD801C701B6 +:10FD40000296A11DB11DC05EDE4F88839983AA83F0 +:10FD5000BB83C052D14022503040F1F636C0C05E65 +:10FD6000DE4F288139814A815B81C052D14008949D +:10FD7000C108D108760100E010E00894C11CD11C34 +:10FD80000894E11CF11C011D111DE20EF31E041F5D +:10FD9000151F21BDBB27A52F942F832F82BD2F5F59 +:10FDA0003F4F4F4F5F4FF89A80B5DB018D93BD01F8 +:10FDB0002E153F054007510761F7C05EDE4F2883CF +:10FDC00039834A835B83C052D14096012D5F3F4FF8 +:10FDD000FB01108204C080EC8A8322E030E08BE1DA +:10FDE0008093C6008091C00086FFFCCF8091C00048 +:10FDF00080648093C000C15DDE4FF881CF52D14056 +:10FE0000F093C6008091C00086FFFCCF8091C000B7 +:10FE100080648093C000432F3093C6008091C0005F +:10FE200086FFFCCF8091C00080648093C000922F39 +:10FE30002093C6008091C00086FFFCCF8091C00057 +:10FE400080648093C0008EE08093C6008091C000E3 +:10FE500086FFFCCF8091C00080648093C00065E184 +:10FE6000C15DDE4FE880CF52D1406E2569276427FF +:10FE7000FE01319610C090819093C6008091C00021 +:10FE800086FFFCCF31968091C00080648093C000D3 +:10FE90006927215030402115310569F76093C6006C +:10FEA0008091C00086FFFCCF8091C0008064809369 +:10FEB000C00085B1805885B9992081F4C15DDE4FBD +:10FEC0000881CF52D1400F5FC15DDE4F0883CF5212 +:10FED000D14090E0A0E0B0E00D949AF527982F98DB +:10FEE00080E090E020ED37E0F9013197F1F70196DD +:10FEF00084369105C9F700008091C0008D7F809302 +:10FF0000C00081E180935700E895EE27FF27099410 +:10FF1000FFCF90E00D949AF597FB092E07260AD0A3 +:10FF200077FD04D02ED006D000201AF4709561958C +:10FF30007F4F0895F6F7909581959F4F0895A1E220 +:10FF40001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F53 +:10FF5000FF1FA217B307E407F50720F0A21BB30B9E +:10FF6000E40BF50B661F771F881F991F1A9469F71A +:10FF700060957095809590959B01AC01BD01CF0176 +:10FF80000895AA1BBB1B51E107C0AA1FBB1FA617E0 +:10FF9000B70710F0A61BB70B881F991F5A95A9F732 +:10FFA00080959095BC01CD010895F999FECF92BD41 +:10FFB00081BDF89A992780B50895262FF999FECF2B +:10FFC0001FBA92BD81BD20BD0FB6F894FA9AF99A76 +:0AFFD0000FBE01960895F894FFCFCC +:040000033000E000E9 +:00000001FF diff --git a/test/ardmake/hardware/cores/arduino/HardwareSerial.cpp b/test/ardmake/hardware/cores/arduino/HardwareSerial.cpp new file mode 100644 index 0000000..4397efb --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/HardwareSerial.cpp @@ -0,0 +1,303 @@ +/* + HardwareSerial.cpp - Hardware serial library for Wiring + Copyright (c) 2006 Nicholas Zambetti. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Modified 23 November 2006 by David A. Mellis + Modified 28 September 2010 by Mark Sproul +*/ + +#include +#include +#include +#include +#include "wiring.h" +#include "wiring_private.h" + +// this next line disables the entire HardwareSerial.cpp, +// this is so I can support Attiny series and any other chip without a uart +#if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H) + +#include "HardwareSerial.h" + +// Define constants and variables for buffering incoming serial data. We're +// using a ring buffer (I think), in which rx_buffer_head is the index of the +// location to which to write the next incoming character and rx_buffer_tail +// is the index of the location from which to read. +#if (RAMEND < 1000) + #define RX_BUFFER_SIZE 32 +#else + #define RX_BUFFER_SIZE 128 +#endif + +struct ring_buffer +{ + unsigned char buffer[RX_BUFFER_SIZE]; + int head; + int tail; +}; + +#if defined(UBRRH) || defined(UBRR0H) + ring_buffer rx_buffer = { { 0 }, 0, 0 }; +#endif +#if defined(UBRR1H) + ring_buffer rx_buffer1 = { { 0 }, 0, 0 }; +#endif +#if defined(UBRR2H) + ring_buffer rx_buffer2 = { { 0 }, 0, 0 }; +#endif +#if defined(UBRR3H) + ring_buffer rx_buffer3 = { { 0 }, 0, 0 }; +#endif + +inline void store_char(unsigned char c, ring_buffer *rx_buffer) +{ + int i = (unsigned int)(rx_buffer->head + 1) % RX_BUFFER_SIZE; + + // if we should be storing the received character into the location + // just before the tail (meaning that the head would advance to the + // current location of the tail), we're about to overflow the buffer + // and so we don't write the character or advance the head. + if (i != rx_buffer->tail) { + rx_buffer->buffer[rx_buffer->head] = c; + rx_buffer->head = i; + } +} + +#if defined(USART_RX_vect) + SIGNAL(USART_RX_vect) + { + #if defined(UDR0) + unsigned char c = UDR0; + #elif defined(UDR) + unsigned char c = UDR; // atmega8535 + #else + #error UDR not defined + #endif + store_char(c, &rx_buffer); + } +#elif defined(SIG_USART0_RECV) && defined(UDR0) + SIGNAL(SIG_USART0_RECV) + { + unsigned char c = UDR0; + store_char(c, &rx_buffer); + } +#elif defined(SIG_UART0_RECV) && defined(UDR0) + SIGNAL(SIG_UART0_RECV) + { + unsigned char c = UDR0; + store_char(c, &rx_buffer); + } +//#elif defined(SIG_USART_RECV) +#elif defined(USART0_RX_vect) + // fixed by Mark Sproul this is on the 644/644p + //SIGNAL(SIG_USART_RECV) + SIGNAL(USART0_RX_vect) + { + #if defined(UDR0) + unsigned char c = UDR0; + #elif defined(UDR) + unsigned char c = UDR; // atmega8, atmega32 + #else + #error UDR not defined + #endif + store_char(c, &rx_buffer); + } +#elif defined(SIG_UART_RECV) + // this is for atmega8 + SIGNAL(SIG_UART_RECV) + { + #if defined(UDR0) + unsigned char c = UDR0; // atmega645 + #elif defined(UDR) + unsigned char c = UDR; // atmega8 + #endif + store_char(c, &rx_buffer); + } +#elif defined(USBCON) + #warning No interrupt handler for usart 0 + #warning Serial(0) is on USB interface +#else + #error No interrupt handler for usart 0 +#endif + +//#if defined(SIG_USART1_RECV) +#if defined(USART1_RX_vect) + //SIGNAL(SIG_USART1_RECV) + SIGNAL(USART1_RX_vect) + { + unsigned char c = UDR1; + store_char(c, &rx_buffer1); + } +#elif defined(SIG_USART1_RECV) + #error SIG_USART1_RECV +#endif + +#if defined(USART2_RX_vect) && defined(UDR2) + SIGNAL(USART2_RX_vect) + { + unsigned char c = UDR2; + store_char(c, &rx_buffer2); + } +#elif defined(SIG_USART2_RECV) + #error SIG_USART2_RECV +#endif + +#if defined(USART3_RX_vect) && defined(UDR3) + SIGNAL(USART3_RX_vect) + { + unsigned char c = UDR3; + store_char(c, &rx_buffer3); + } +#elif defined(SIG_USART3_RECV) + #error SIG_USART3_RECV +#endif + + + +// Constructors //////////////////////////////////////////////////////////////// + +HardwareSerial::HardwareSerial(ring_buffer *rx_buffer, + volatile uint8_t *ubrrh, volatile uint8_t *ubrrl, + volatile uint8_t *ucsra, volatile uint8_t *ucsrb, + volatile uint8_t *udr, + uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x) +{ + _rx_buffer = rx_buffer; + _ubrrh = ubrrh; + _ubrrl = ubrrl; + _ucsra = ucsra; + _ucsrb = ucsrb; + _udr = udr; + _rxen = rxen; + _txen = txen; + _rxcie = rxcie; + _udre = udre; + _u2x = u2x; +} + +// Public Methods ////////////////////////////////////////////////////////////// + +void HardwareSerial::begin(long baud) +{ + uint16_t baud_setting; + bool use_u2x = true; + +#if F_CPU == 16000000UL + // hardcoded exception for compatibility with the bootloader shipped + // with the Duemilanove and previous boards and the firmware on the 8U2 + // on the Uno and Mega 2560. + if (baud == 57600) { + use_u2x = false; + } +#endif + + if (use_u2x) { + *_ucsra = 1 << _u2x; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + *_ucsra = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } + + // assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register) + *_ubrrh = baud_setting >> 8; + *_ubrrl = baud_setting; + + sbi(*_ucsrb, _rxen); + sbi(*_ucsrb, _txen); + sbi(*_ucsrb, _rxcie); +} + +void HardwareSerial::end() +{ + cbi(*_ucsrb, _rxen); + cbi(*_ucsrb, _txen); + cbi(*_ucsrb, _rxcie); +} + +int HardwareSerial::available(void) +{ + return (unsigned int)(RX_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % RX_BUFFER_SIZE; +} + +int HardwareSerial::peek(void) +{ + if (_rx_buffer->head == _rx_buffer->tail) { + return -1; + } else { + return _rx_buffer->buffer[_rx_buffer->tail]; + } +} + +int HardwareSerial::read(void) +{ + // if the head isn't ahead of the tail, we don't have any characters + if (_rx_buffer->head == _rx_buffer->tail) { + return -1; + } else { + unsigned char c = _rx_buffer->buffer[_rx_buffer->tail]; + _rx_buffer->tail = (unsigned int)(_rx_buffer->tail + 1) % RX_BUFFER_SIZE; + return c; + } +} + +void HardwareSerial::flush() +{ + // don't reverse this or there may be problems if the RX interrupt + // occurs after reading the value of rx_buffer_head but before writing + // the value to rx_buffer_tail; the previous value of rx_buffer_head + // may be written to rx_buffer_tail, making it appear as if the buffer + // don't reverse this or there may be problems if the RX interrupt + // occurs after reading the value of rx_buffer_head but before writing + // the value to rx_buffer_tail; the previous value of rx_buffer_head + // may be written to rx_buffer_tail, making it appear as if the buffer + // were full, not empty. + _rx_buffer->head = _rx_buffer->tail; +} + +void HardwareSerial::write(uint8_t c) +{ + while (!((*_ucsra) & (1 << _udre))) + ; + + *_udr = c; +} + +// Preinstantiate Objects ////////////////////////////////////////////////////// + +#if defined(UBRRH) && defined(UBRRL) + HardwareSerial Serial(&rx_buffer, &UBRRH, &UBRRL, &UCSRA, &UCSRB, &UDR, RXEN, TXEN, RXCIE, UDRE, U2X); +#elif defined(UBRR0H) && defined(UBRR0L) + HardwareSerial Serial(&rx_buffer, &UBRR0H, &UBRR0L, &UCSR0A, &UCSR0B, &UDR0, RXEN0, TXEN0, RXCIE0, UDRE0, U2X0); +#elif defined(USBCON) + #warning no serial port defined (port 0) +#else + #error no serial port defined (port 0) +#endif + +#if defined(UBRR1H) + HardwareSerial Serial1(&rx_buffer1, &UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UDR1, RXEN1, TXEN1, RXCIE1, UDRE1, U2X1); +#endif +#if defined(UBRR2H) + HardwareSerial Serial2(&rx_buffer2, &UBRR2H, &UBRR2L, &UCSR2A, &UCSR2B, &UDR2, RXEN2, TXEN2, RXCIE2, UDRE2, U2X2); +#endif +#if defined(UBRR3H) + HardwareSerial Serial3(&rx_buffer3, &UBRR3H, &UBRR3L, &UCSR3A, &UCSR3B, &UDR3, RXEN3, TXEN3, RXCIE3, UDRE3, U2X3); +#endif + +#endif // whole file + diff --git a/test/ardmake/hardware/cores/arduino/HardwareSerial.d b/test/ardmake/hardware/cores/arduino/HardwareSerial.d new file mode 100644 index 0000000..92f1cc9 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/HardwareSerial.d @@ -0,0 +1,28 @@ +ardmake/hardware/cores/arduino/HardwareSerial.o ardmake/hardware/cores/arduino/HardwareSerial.d: ardmake/hardware/cores/arduino/HardwareSerial.cpp \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/string.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + ardmake/hardware/cores/arduino/HardwareSerial.h \ + ardmake/hardware/cores/arduino/Stream.h \ + ardmake/hardware/cores/arduino/Print.h \ + ardmake/hardware/cores/arduino/WString.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/ctype.h diff --git a/test/ardmake/hardware/cores/arduino/HardwareSerial.h b/test/ardmake/hardware/cores/arduino/HardwareSerial.h new file mode 100644 index 0000000..3efa775 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/HardwareSerial.h @@ -0,0 +1,76 @@ +/* + HardwareSerial.h - Hardware serial library for Wiring + Copyright (c) 2006 Nicholas Zambetti. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Modified 28 September 2010 by Mark Sproul +*/ + +#ifndef HardwareSerial_h +#define HardwareSerial_h + +#include + +#include "Stream.h" + +struct ring_buffer; + +class HardwareSerial : public Stream +{ + private: + ring_buffer *_rx_buffer; + volatile uint8_t *_ubrrh; + volatile uint8_t *_ubrrl; + volatile uint8_t *_ucsra; + volatile uint8_t *_ucsrb; + volatile uint8_t *_udr; + uint8_t _rxen; + uint8_t _txen; + uint8_t _rxcie; + uint8_t _udre; + uint8_t _u2x; + public: + HardwareSerial(ring_buffer *rx_buffer, + volatile uint8_t *ubrrh, volatile uint8_t *ubrrl, + volatile uint8_t *ucsra, volatile uint8_t *ucsrb, + volatile uint8_t *udr, + uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x); + void begin(long); + void end(); + virtual int available(void); + virtual int peek(void); + virtual int read(void); + virtual void flush(void); + virtual void write(uint8_t); + using Print::write; // pull in write(str) and write(buf, size) from Print +}; + +#if defined(UBRRH) || defined(UBRR0H) + extern HardwareSerial Serial; +#elif defined(USBCON) + #include "usb_api.h" +#endif +#if defined(UBRR1H) + extern HardwareSerial Serial1; +#endif +#if defined(UBRR2H) + extern HardwareSerial Serial2; +#endif +#if defined(UBRR3H) + extern HardwareSerial Serial3; +#endif + +#endif diff --git a/test/ardmake/hardware/cores/arduino/Makefile b/test/ardmake/hardware/cores/arduino/Makefile new file mode 100644 index 0000000..b606b39 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/Makefile @@ -0,0 +1,250 @@ +# Arduino Makefile +# Arduino adaptation by mellis, eighthave, oli.keller +# +# This makefile allows you to build sketches from the command line +# without the Arduino environment (or Java). +# +# Note, this Makefile has been edited by the Debian package maintainer, so +# there's a reasonable chance it'll simply work without the need to edit it +# but just in case, here are the instructions: +# +# Detailed instructions for using the makefile: +# +# 1. Copy this file into the folder with your sketch. There should be a +# file with the same name as the folder and with the extension .pde +# (e.g. foo.pde in the foo/ folder). +# +# 2. Modify the line containg "INSTALL_DIR" to point to the directory that +# contains the Arduino installation (for example, under Mac OS X, this +# might be /Applications/arduino-0012). +# +# 3. Modify the line containing "PORT" to refer to the filename +# representing the USB or serial connection to your Arduino board +# (e.g. PORT = /dev/tty.USB0). If the exact name of this file +# changes, you can use * as a wildcard (e.g. PORT = /dev/tty.usb*). +# +# 4. Set the line containing "MCU" to match your board's processor. +# Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth +# or Diecimila have the atmega168. If you're using a LilyPad Arduino, +# change F_CPU to 8000000. +# +# 5. At the command line, change to the directory containing your +# program's file and the makefile. +# +# 6. Type "make" and press enter to compile/verify your program. +# +# 7. Type "make upload", reset your Arduino board, and press enter to +# upload your program to the Arduino board. +# +# $Id$ + +TARGET = $(notdir $(CURDIR)) +#INSTALL_DIR = ../../.. +PORT = /dev/ttyUSB* +UPLOAD_RATE = 57600 +AVRDUDE_PROGRAMMER = stk500v1 +MCU = atmega168 +F_CPU = 16000000 + +############################################################################ +# Below here nothing should be changed... + +ARDUINO = /usr/share/arduino/hardware/arduino/cores/arduino +AVR_TOOLS_PATH = /usr/bin +SRC = $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \ +$(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \ +$(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_shift.c \ +$(ARDUINO)/WInterrupts.c +CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WMath.cpp \ +$(ARDUINO)/Print.cpp +FORMAT = ihex + + +# Name of this Makefile (used for "make depend"). +MAKEFILE = Makefile + +# Debugging format. +# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2. +# AVR (extended) COFF requires stabs, plus an avr-objcopy run. +DEBUG = stabs + +OPT = s + +# Place -D or -U options here +CDEFS = -DF_CPU=$(F_CPU) +CXXDEFS = -DF_CPU=$(F_CPU) + +# Place -I options here +CINCS = -I$(ARDUINO) +CXXINCS = -I$(ARDUINO) + +# Compiler flag to set the C Standard level. +# c89 - "ANSI" C +# gnu89 - c89 plus GCC extensions +# c99 - ISO C99 standard (not yet fully implemented) +# gnu99 - c99 plus GCC extensions +CSTANDARD = -std=gnu99 +CDEBUG = -g$(DEBUG) +CWARN = -Wall -Wstrict-prototypes +CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums +#CEXTRA = -Wa,-adhlns=$(<:.c=.lst) + +CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA) +CXXFLAGS = $(CDEFS) $(CINCS) -O$(OPT) +#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs +LDFLAGS = -lm + + +# Programming support using avrdude. Settings and variables. +AVRDUDE_PORT = $(PORT) +AVRDUDE_WRITE_FLASH = -U flash:w:applet/$(TARGET).hex +AVRDUDE_FLAGS = -V -F \ +-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \ +-b $(UPLOAD_RATE) + +# Program settings +CC = $(AVR_TOOLS_PATH)/avr-gcc +CXX = $(AVR_TOOLS_PATH)/avr-g++ +OBJCOPY = $(AVR_TOOLS_PATH)/avr-objcopy +OBJDUMP = $(AVR_TOOLS_PATH)/avr-objdump +AR = $(AVR_TOOLS_PATH)/avr-ar +SIZE = $(AVR_TOOLS_PATH)/avr-size +NM = $(AVR_TOOLS_PATH)/avr-nm +AVRDUDE = $(AVR_TOOLS_PATH)/avrdude +REMOVE = rm -f +MV = mv -f + +# Define all object files. +OBJ = $(SRC:%.c=build/%.o) $(CXXSRC:%.cpp=build/%.o) $(ASRC:%.S=build/%.o) + +# Define all listing files. +LST = $(ASRC:%.S=build/%.lst) $(CXXSRC:%.cpp=build/%.lst) $(SRC:%.c=build/%.lst) + +# Combine all necessary flags and optional flags. +# Add target processor to flags. +ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) +ALL_CXXFLAGS = -mmcu=$(MCU) -I. $(CXXFLAGS) +ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) + + +# Default target. +all: applet_files build sizeafter + +build: elf hex + +applet_files: $(TARGET).pde + # Here is the "preprocessing". + # It creates a .cpp file based with the same name as the .pde file. + # On top of the new .cpp file comes the WProgram.h header. + # At the end there is a generic main() function attached. + # Then the .cpp file will be compiled. Errors during compile will + # refer to this new, automatically generated, file. + # Not the original .pde file you actually edit... + test -d applet || mkdir applet + echo '#include "WProgram.h"' > applet/$(TARGET).cpp + cat $(TARGET).pde >> applet/$(TARGET).cpp + cat $(ARDUINO)/main.cxx >> applet/$(TARGET).cpp + +elf: applet/$(TARGET).elf +hex: applet/$(TARGET).hex +eep: applet/$(TARGET).eep +lss: applet/$(TARGET).lss +sym: applet/$(TARGET).sym + +# Program the device. +upload: applet/$(TARGET).hex + stty -F $(AVRDUDE_PORT) hupcl ; sleep 0.1 ; stty -F $(AVRDUDE_PORT) -hupcl + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) + + + # Display size of file. +HEXSIZE = $(SIZE) --target=$(FORMAT) applet/$(TARGET).hex +ELFSIZE = $(SIZE) applet/$(TARGET).elf +sizebefore: + @if [ -f applet/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi + +sizeafter: + @if [ -f applet/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(HEXSIZE); echo; fi + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT=$(OBJCOPY) --debugging \ +--change-section-address .data-0x800000 \ +--change-section-address .bss-0x800000 \ +--change-section-address .noinit-0x800000 \ +--change-section-address .eeprom-0x810000 + + +coff: applet/$(TARGET).elf + $(COFFCONVERT) -O coff-avr applet/$(TARGET).elf $(TARGET).cof + + +extcoff: $(TARGET).elf + $(COFFCONVERT) -O coff-ext-avr applet/$(TARGET).elf $(TARGET).cof + + +.SUFFIXES: .elf .hex .eep .lss .sym + +.elf.hex: + $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ + +.elf.eep: + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ + +# Create extended listing file from ELF output file. +.elf.lss: + $(OBJDUMP) -h -S $< > $@ + +# Create a symbol table from ELF output file. +.elf.sym: + $(NM) -n $< > $@ + + # Link: create ELF output file from library. +applet/$(TARGET).elf: $(TARGET).pde applet/core.a + $(CXX) $(ALL_CXXFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS) + +applet/core.a: $(OBJ) + @for i in $(OBJ); do echo $(AR) rcs applet/core.a $$i; $(AR) rcs applet/core.a $$i; done + + + +# Compile: create object files from C++ source files. +build/%.o: %.cpp + mkdir -p $(dir $@) + $(CXX) -c $(ALL_CXXFLAGS) $< -o $@ + +# Compile: create object files from C source files. +build/%.o: %.c + mkdir -p $(dir $@) + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +# Compile: create assembler files from C source files. +build/%.s: %.c + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +# Assemble: create object files from assembler source files. +.S.o: + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + + +# Automatic dependencies +build/%.d: %.c + $(CC) -M $(ALL_CFLAGS) $< | sed "s;$(notdir $*).o:;$*.o $*.d:;" > $@ + +build/%.d: %.cpp + $(CXX) -M $(ALL_CXXFLAGS) $< | sed "s;$(notdir $*).o:;$*.o $*.d:;" > $@ + + +# Target: clean project. +clean: + $(REMOVE) applet/$(TARGET).hex applet/$(TARGET).eep applet/$(TARGET).cof applet/$(TARGET).elf \ + applet/$(TARGET).map applet/$(TARGET).sym applet/$(TARGET).lss applet/core.a \ + $(OBJ) $(LST) $(SRC:%.c=build/%.s) $(SRC:%.c=build/%.d) $(CXXSRC:%.cpp=build/%.s) $(CXXSRC:%.cpp=build/%.d) + +.PHONY: all build elf hex eep lss sym program coff extcoff clean applet_files sizebefore sizeafter + +-include $(SRC:%.c=build/%.d) +-include $(CXXSRC:%.cpp=build/%.d) diff --git a/test/ardmake/hardware/cores/arduino/Print.cpp b/test/ardmake/hardware/cores/arduino/Print.cpp new file mode 100644 index 0000000..4ee556d --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/Print.cpp @@ -0,0 +1,220 @@ +/* + Print.cpp - Base class that provides print() and println() + Copyright (c) 2008 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Modified 23 November 2006 by David A. Mellis + */ + +#include +#include +#include +#include +#include "wiring.h" + +#include "Print.h" + +// Public Methods ////////////////////////////////////////////////////////////// + +/* default implementation: may be overridden */ +void Print::write(const char *str) +{ + while (*str) + write(*str++); +} + +/* default implementation: may be overridden */ +void Print::write(const uint8_t *buffer, size_t size) +{ + while (size--) + write(*buffer++); +} + +void Print::print(const String &s) +{ + for (int i = 0; i < s.length(); i++) { + write(s[i]); + } +} + +void Print::print(const char str[]) +{ + write(str); +} + +void Print::print(char c, int base) +{ + print((long) c, base); +} + +void Print::print(unsigned char b, int base) +{ + print((unsigned long) b, base); +} + +void Print::print(int n, int base) +{ + print((long) n, base); +} + +void Print::print(unsigned int n, int base) +{ + print((unsigned long) n, base); +} + +void Print::print(long n, int base) +{ + if (base == 0) { + write(n); + } else if (base == 10) { + if (n < 0) { + print('-'); + n = -n; + } + printNumber(n, 10); + } else { + printNumber(n, base); + } +} + +void Print::print(unsigned long n, int base) +{ + if (base == 0) write(n); + else printNumber(n, base); +} + +void Print::print(double n, int digits) +{ + printFloat(n, digits); +} + +void Print::println(void) +{ + print('\r'); + print('\n'); +} + +void Print::println(const String &s) +{ + print(s); + println(); +} + +void Print::println(const char c[]) +{ + print(c); + println(); +} + +void Print::println(char c, int base) +{ + print(c, base); + println(); +} + +void Print::println(unsigned char b, int base) +{ + print(b, base); + println(); +} + +void Print::println(int n, int base) +{ + print(n, base); + println(); +} + +void Print::println(unsigned int n, int base) +{ + print(n, base); + println(); +} + +void Print::println(long n, int base) +{ + print(n, base); + println(); +} + +void Print::println(unsigned long n, int base) +{ + print(n, base); + println(); +} + +void Print::println(double n, int digits) +{ + print(n, digits); + println(); +} + +// Private Methods ///////////////////////////////////////////////////////////// + +void Print::printNumber(unsigned long n, uint8_t base) +{ + unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars. + unsigned long i = 0; + + if (n == 0) { + print('0'); + return; + } + + while (n > 0) { + buf[i++] = n % base; + n /= base; + } + + for (; i > 0; i--) + print((char) (buf[i - 1] < 10 ? + '0' + buf[i - 1] : + 'A' + buf[i - 1] - 10)); +} + +void Print::printFloat(double number, uint8_t digits) +{ + // Handle negative numbers + if (number < 0.0) + { + print('-'); + number = -number; + } + + // Round correctly so that print(1.999, 2) prints as "2.00" + double rounding = 0.5; + for (uint8_t i=0; i 0) + print("."); + + // Extract digits from the remainder one at a time + while (digits-- > 0) + { + remainder *= 10.0; + int toPrint = int(remainder); + print(toPrint); + remainder -= toPrint; + } +} diff --git a/test/ardmake/hardware/cores/arduino/Print.d b/test/ardmake/hardware/cores/arduino/Print.d new file mode 100644 index 0000000..bf5b85f --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/Print.d @@ -0,0 +1,22 @@ +ardmake/hardware/cores/arduino/Print.o ardmake/hardware/cores/arduino/Print.d: ardmake/hardware/cores/arduino/Print.cpp \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/string.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/math.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/Print.h \ + ardmake/hardware/cores/arduino/WString.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/ctype.h diff --git a/test/ardmake/hardware/cores/arduino/Print.h b/test/ardmake/hardware/cores/arduino/Print.h new file mode 100644 index 0000000..b092ae5 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/Print.h @@ -0,0 +1,66 @@ +/* + Print.h - Base class that provides print() and println() + Copyright (c) 2008 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Print_h +#define Print_h + +#include +#include // for size_t + +#include "WString.h" + +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 +#define BYTE 0 + +class Print +{ + private: + void printNumber(unsigned long, uint8_t); + void printFloat(double, uint8_t); + public: + virtual void write(uint8_t) = 0; + virtual void write(const char *str); + virtual void write(const uint8_t *buffer, size_t size); + + void print(const String &); + void print(const char[]); + void print(char, int = BYTE); + void print(unsigned char, int = BYTE); + void print(int, int = DEC); + void print(unsigned int, int = DEC); + void print(long, int = DEC); + void print(unsigned long, int = DEC); + void print(double, int = 2); + + void println(const String &s); + void println(const char[]); + void println(char, int = BYTE); + void println(unsigned char, int = BYTE); + void println(int, int = DEC); + void println(unsigned int, int = DEC); + void println(long, int = DEC); + void println(unsigned long, int = DEC); + void println(double, int = 2); + void println(void); +}; + +#endif diff --git a/test/ardmake/hardware/cores/arduino/README.Makefile b/test/ardmake/hardware/cores/arduino/README.Makefile new file mode 100644 index 0000000..01f3c4a --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/README.Makefile @@ -0,0 +1,11 @@ +The Makefile here is based on the one that was in Arduino 0017 +but has since been dropped by the upstream developers. + +It is preserved in the Debian package to allow command-line usage without +introducing java dependancies, so if you want to report bugs against +it, please report them against whichever distribution you are using, +and NOT against the upstream source, as that would be pointless, and +will irritate the developers who dropped the file in order to eliminate +bug reports against the Makefile. + +The same goes for the main.cxx file. diff --git a/test/ardmake/hardware/cores/arduino/Stream.h b/test/ardmake/hardware/cores/arduino/Stream.h new file mode 100644 index 0000000..93d8275 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/Stream.h @@ -0,0 +1,35 @@ +/* + Stream.h - base class for character-based streams. + Copyright (c) 2010 David A. Mellis. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef Stream_h +#define Stream_h + +#include +#include "Print.h" + +class Stream : public Print +{ + public: + virtual int available() = 0; + virtual int read() = 0; + virtual int peek() = 0; + virtual void flush() = 0; +}; + +#endif diff --git a/test/ardmake/hardware/cores/arduino/Tone.cpp b/test/ardmake/hardware/cores/arduino/Tone.cpp new file mode 100644 index 0000000..c3910e7 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/Tone.cpp @@ -0,0 +1,601 @@ +/* Tone.cpp + + A Tone Generator Library + + Written by Brett Hagman + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Version Modified By Date Comments +------- ----------- -------- -------- +0001 B Hagman 09/08/02 Initial coding +0002 B Hagman 09/08/18 Multiple pins +0003 B Hagman 09/08/18 Moved initialization from constructor to begin() +0004 B Hagman 09/09/26 Fixed problems with ATmega8 +0005 B Hagman 09/11/23 Scanned prescalars for best fit on 8 bit timers + 09/11/25 Changed pin toggle method to XOR + 09/11/25 Fixed timer0 from being excluded +0006 D Mellis 09/12/29 Replaced objects with functions +0007 M Sproul 10/08/29 Changed #ifdefs from cpu to register +*************************************************/ + +#include +#include +#include "wiring.h" +#include "pins_arduino.h" + +#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega128__) +#define TCCR2A TCCR2 +#define TCCR2B TCCR2 +#define COM2A1 COM21 +#define COM2A0 COM20 +#define OCR2A OCR2 +#define TIMSK2 TIMSK +#define OCIE2A OCIE2 +#define TIMER2_COMPA_vect TIMER2_COMP_vect +#define TIMSK1 TIMSK +#endif + +// timerx_toggle_count: +// > 0 - duration specified +// = 0 - stopped +// < 0 - infinitely (until stop() method called, or new play() called) + +#if !defined(__AVR_ATmega8__) +volatile long timer0_toggle_count; +volatile uint8_t *timer0_pin_port; +volatile uint8_t timer0_pin_mask; +#endif + +volatile long timer1_toggle_count; +volatile uint8_t *timer1_pin_port; +volatile uint8_t timer1_pin_mask; +volatile long timer2_toggle_count; +volatile uint8_t *timer2_pin_port; +volatile uint8_t timer2_pin_mask; + +#if defined(TIMSK3) +volatile long timer3_toggle_count; +volatile uint8_t *timer3_pin_port; +volatile uint8_t timer3_pin_mask; +#endif + +#if defined(TIMSK4) +volatile long timer4_toggle_count; +volatile uint8_t *timer4_pin_port; +volatile uint8_t timer4_pin_mask; +#endif + +#if defined(TIMSK5) +volatile long timer5_toggle_count; +volatile uint8_t *timer5_pin_port; +volatile uint8_t timer5_pin_mask; +#endif + + +// MLS: This does not make sense, the 3 options are the same +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + +#define AVAILABLE_TONE_PINS 1 + +const uint8_t PROGMEM tone_pin_to_timer_PGM[] = { 2 /*, 3, 4, 5, 1, 0 */ }; +static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255, 255, 255, 255, 255 */ }; + +#elif defined(__AVR_ATmega8__) + +#define AVAILABLE_TONE_PINS 1 + +const uint8_t PROGMEM tone_pin_to_timer_PGM[] = { 2 /*, 1 */ }; +static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255 */ }; + +#else + +#define AVAILABLE_TONE_PINS 1 + +// Leave timer 0 to last. +const uint8_t PROGMEM tone_pin_to_timer_PGM[] = { 2 /*, 1, 0 */ }; +static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255, 255 */ }; + +#endif + + + +static int8_t toneBegin(uint8_t _pin) +{ + int8_t _timer = -1; + + // if we're already using the pin, the timer should be configured. + for (int i = 0; i < AVAILABLE_TONE_PINS; i++) { + if (tone_pins[i] == _pin) { + return pgm_read_byte(tone_pin_to_timer_PGM + i); + } + } + + // search for an unused timer. + for (int i = 0; i < AVAILABLE_TONE_PINS; i++) { + if (tone_pins[i] == 255) { + tone_pins[i] = _pin; + _timer = pgm_read_byte(tone_pin_to_timer_PGM + i); + break; + } + } + + if (_timer != -1) + { + // Set timer specific stuff + // All timers in CTC mode + // 8 bit timers will require changing prescalar values, + // whereas 16 bit timers are set to either ck/1 or ck/64 prescalar + switch (_timer) + { + #if defined(TCCR0A) && defined(TCCR0B) + case 0: + // 8 bit timer + TCCR0A = 0; + TCCR0B = 0; + bitWrite(TCCR0A, WGM01, 1); + bitWrite(TCCR0B, CS00, 1); + timer0_pin_port = portOutputRegister(digitalPinToPort(_pin)); + timer0_pin_mask = digitalPinToBitMask(_pin); + break; + #endif + + #if defined(TCCR1A) && defined(TCCR1B) && defined(WGM12) + case 1: + // 16 bit timer + TCCR1A = 0; + TCCR1B = 0; + bitWrite(TCCR1B, WGM12, 1); + bitWrite(TCCR1B, CS10, 1); + timer1_pin_port = portOutputRegister(digitalPinToPort(_pin)); + timer1_pin_mask = digitalPinToBitMask(_pin); + break; + #endif + + #if defined(TCCR2A) && defined(TCCR2B) + case 2: + // 8 bit timer + TCCR2A = 0; + TCCR2B = 0; + bitWrite(TCCR2A, WGM21, 1); + bitWrite(TCCR2B, CS20, 1); + timer2_pin_port = portOutputRegister(digitalPinToPort(_pin)); + timer2_pin_mask = digitalPinToBitMask(_pin); + break; + #endif + + #if defined(TCCR3A) && defined(TCCR3B) && defined(TIMSK3) + case 3: + // 16 bit timer + TCCR3A = 0; + TCCR3B = 0; + bitWrite(TCCR3B, WGM32, 1); + bitWrite(TCCR3B, CS30, 1); + timer3_pin_port = portOutputRegister(digitalPinToPort(_pin)); + timer3_pin_mask = digitalPinToBitMask(_pin); + break; + #endif + + #if defined(TCCR4A) && defined(TCCR4B) && defined(TIMSK4) + case 4: + // 16 bit timer + TCCR4A = 0; + TCCR4B = 0; + #if defined(WGM42) + bitWrite(TCCR4B, WGM42, 1); + #elif defined(CS43) + #warning this may not be correct + // atmega32u4 + bitWrite(TCCR4B, CS43, 1); + #endif + bitWrite(TCCR4B, CS40, 1); + timer4_pin_port = portOutputRegister(digitalPinToPort(_pin)); + timer4_pin_mask = digitalPinToBitMask(_pin); + break; + #endif + + #if defined(TCCR5A) && defined(TCCR5B) && defined(TIMSK5) + case 5: + // 16 bit timer + TCCR5A = 0; + TCCR5B = 0; + bitWrite(TCCR5B, WGM52, 1); + bitWrite(TCCR5B, CS50, 1); + timer5_pin_port = portOutputRegister(digitalPinToPort(_pin)); + timer5_pin_mask = digitalPinToBitMask(_pin); + break; + #endif + } + } + + return _timer; +} + + + +// frequency (in hertz) and duration (in milliseconds). + +void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) +{ + uint8_t prescalarbits = 0b001; + long toggle_count = 0; + uint32_t ocr = 0; + int8_t _timer; + + _timer = toneBegin(_pin); + + if (_timer >= 0) + { + // Set the pinMode as OUTPUT + pinMode(_pin, OUTPUT); + + // if we are using an 8 bit timer, scan through prescalars to find the best fit + if (_timer == 0 || _timer == 2) + { + ocr = F_CPU / frequency / 2 - 1; + prescalarbits = 0b001; // ck/1: same for both timers + if (ocr > 255) + { + ocr = F_CPU / frequency / 2 / 8 - 1; + prescalarbits = 0b010; // ck/8: same for both timers + + if (_timer == 2 && ocr > 255) + { + ocr = F_CPU / frequency / 2 / 32 - 1; + prescalarbits = 0b011; + } + + if (ocr > 255) + { + ocr = F_CPU / frequency / 2 / 64 - 1; + prescalarbits = _timer == 0 ? 0b011 : 0b100; + + if (_timer == 2 && ocr > 255) + { + ocr = F_CPU / frequency / 2 / 128 - 1; + prescalarbits = 0b101; + } + + if (ocr > 255) + { + ocr = F_CPU / frequency / 2 / 256 - 1; + prescalarbits = _timer == 0 ? 0b100 : 0b110; + if (ocr > 255) + { + // can't do any better than /1024 + ocr = F_CPU / frequency / 2 / 1024 - 1; + prescalarbits = _timer == 0 ? 0b101 : 0b111; + } + } + } + } + +#if defined(TCCR0B) + if (_timer == 0) + { + TCCR0B = prescalarbits; + } + else +#endif +#if defined(TCCR2B) + { + TCCR2B = prescalarbits; + } +#else + { + // dummy place holder to make the above ifdefs work + } +#endif + } + else + { + // two choices for the 16 bit timers: ck/1 or ck/64 + ocr = F_CPU / frequency / 2 - 1; + + prescalarbits = 0b001; + if (ocr > 0xffff) + { + ocr = F_CPU / frequency / 2 / 64 - 1; + prescalarbits = 0b011; + } + + if (_timer == 1) + { +#if defined(TCCR1B) + TCCR1B = (TCCR1B & 0b11111000) | prescalarbits; +#endif + } +#if defined(TCCR3B) + else if (_timer == 3) + TCCR3B = (TCCR3B & 0b11111000) | prescalarbits; +#endif +#if defined(TCCR4B) + else if (_timer == 4) + TCCR4B = (TCCR4B & 0b11111000) | prescalarbits; +#endif +#if defined(TCCR5B) + else if (_timer == 5) + TCCR5B = (TCCR5B & 0b11111000) | prescalarbits; +#endif + + } + + + // Calculate the toggle count + if (duration > 0) + { + toggle_count = 2 * frequency * duration / 1000; + } + else + { + toggle_count = -1; + } + + // Set the OCR for the given timer, + // set the toggle count, + // then turn on the interrupts + switch (_timer) + { + +#if defined(OCR0A) && defined(TIMSK0) && defined(OCIE0A) + case 0: + OCR0A = ocr; + timer0_toggle_count = toggle_count; + bitWrite(TIMSK0, OCIE0A, 1); + break; +#endif + + case 1: +#if defined(OCR1A) && defined(TIMSK1) && defined(OCIE1A) + OCR1A = ocr; + timer1_toggle_count = toggle_count; + bitWrite(TIMSK1, OCIE1A, 1); +#elif defined(OCR1A) && defined(TIMSK) && defined(OCIE1A) + // this combination is for at least the ATmega32 + OCR1A = ocr; + timer1_toggle_count = toggle_count; + bitWrite(TIMSK, OCIE1A, 1); +#endif + break; + +#if defined(OCR2A) && defined(TIMSK2) && defined(OCIE2A) + case 2: + OCR2A = ocr; + timer2_toggle_count = toggle_count; + bitWrite(TIMSK2, OCIE2A, 1); + break; +#endif + +#if defined(TIMSK3) + case 3: + OCR3A = ocr; + timer3_toggle_count = toggle_count; + bitWrite(TIMSK3, OCIE3A, 1); + break; +#endif + +#if defined(TIMSK4) + case 4: + OCR4A = ocr; + timer4_toggle_count = toggle_count; + bitWrite(TIMSK4, OCIE4A, 1); + break; +#endif + +#if defined(OCR5A) && defined(TIMSK5) && defined(OCIE5A) + case 5: + OCR5A = ocr; + timer5_toggle_count = toggle_count; + bitWrite(TIMSK5, OCIE5A, 1); + break; +#endif + + } + } +} + + +// XXX: this function only works properly for timer 2 (the only one we use +// currently). for the others, it should end the tone, but won't restore +// proper PWM functionality for the timer. +void disableTimer(uint8_t _timer) +{ + switch (_timer) + { + case 0: + #if defined(TIMSK0) + TIMSK0 = 0; + #elif defined(TIMSK) + TIMSK = 0; // atmega32 + #endif + break; + +#if defined(TIMSK1) && defined(OCIE1A) + case 1: + bitWrite(TIMSK1, OCIE1A, 0); + break; +#endif + + case 2: + #if defined(TIMSK2) && defined(OCIE2A) + bitWrite(TIMSK2, OCIE2A, 0); // disable interrupt + #endif + #if defined(TCCR2A) && defined(WGM20) + TCCR2A = (1 << WGM20); + #endif + #if defined(TCCR2B) && defined(CS22) + TCCR2B = (TCCR2B & 0b11111000) | (1 << CS22); + #endif + #if defined(OCR2A) + OCR2A = 0; + #endif + break; + +#if defined(TIMSK3) + case 3: + TIMSK3 = 0; + break; +#endif + +#if defined(TIMSK4) + case 4: + TIMSK4 = 0; + break; +#endif + +#if defined(TIMSK5) + case 5: + TIMSK5 = 0; + break; +#endif + } +} + + +void noTone(uint8_t _pin) +{ + int8_t _timer = -1; + + for (int i = 0; i < AVAILABLE_TONE_PINS; i++) { + if (tone_pins[i] == _pin) { + _timer = pgm_read_byte(tone_pin_to_timer_PGM + i); + tone_pins[i] = 255; + } + } + + disableTimer(_timer); + + digitalWrite(_pin, 0); +} + +#if 0 +#if !defined(__AVR_ATmega8__) +ISR(TIMER0_COMPA_vect) +{ + if (timer0_toggle_count != 0) + { + // toggle the pin + *timer0_pin_port ^= timer0_pin_mask; + + if (timer0_toggle_count > 0) + timer0_toggle_count--; + } + else + { + disableTimer(0); + *timer0_pin_port &= ~(timer0_pin_mask); // keep pin low after stop + } +} +#endif + + +ISR(TIMER1_COMPA_vect) +{ + if (timer1_toggle_count != 0) + { + // toggle the pin + *timer1_pin_port ^= timer1_pin_mask; + + if (timer1_toggle_count > 0) + timer1_toggle_count--; + } + else + { + disableTimer(1); + *timer1_pin_port &= ~(timer1_pin_mask); // keep pin low after stop + } +} +#endif + + +ISR(TIMER2_COMPA_vect) +{ + + if (timer2_toggle_count != 0) + { + // toggle the pin + *timer2_pin_port ^= timer2_pin_mask; + + if (timer2_toggle_count > 0) + timer2_toggle_count--; + } + else + { + // need to call noTone() so that the tone_pins[] entry is reset, so the + // timer gets initialized next time we call tone(). + // XXX: this assumes timer 2 is always the first one used. + noTone(tone_pins[0]); +// disableTimer(2); +// *timer2_pin_port &= ~(timer2_pin_mask); // keep pin low after stop + } +} + + + +//#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +#if 0 + +ISR(TIMER3_COMPA_vect) +{ + if (timer3_toggle_count != 0) + { + // toggle the pin + *timer3_pin_port ^= timer3_pin_mask; + + if (timer3_toggle_count > 0) + timer3_toggle_count--; + } + else + { + disableTimer(3); + *timer3_pin_port &= ~(timer3_pin_mask); // keep pin low after stop + } +} + +ISR(TIMER4_COMPA_vect) +{ + if (timer4_toggle_count != 0) + { + // toggle the pin + *timer4_pin_port ^= timer4_pin_mask; + + if (timer4_toggle_count > 0) + timer4_toggle_count--; + } + else + { + disableTimer(4); + *timer4_pin_port &= ~(timer4_pin_mask); // keep pin low after stop + } +} + +ISR(TIMER5_COMPA_vect) +{ + if (timer5_toggle_count != 0) + { + // toggle the pin + *timer5_pin_port ^= timer5_pin_mask; + + if (timer5_toggle_count > 0) + timer5_toggle_count--; + } + else + { + disableTimer(5); + *timer5_pin_port &= ~(timer5_pin_mask); // keep pin low after stop + } +} + +#endif diff --git a/test/ardmake/hardware/cores/arduino/WCharacter.h b/test/ardmake/hardware/cores/arduino/WCharacter.h new file mode 100644 index 0000000..79733b5 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WCharacter.h @@ -0,0 +1,168 @@ +/* + WCharacter.h - Character utility functions for Wiring & Arduino + Copyright (c) 2010 Hernando Barragan. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef Character_h +#define Character_h + +#include + +// WCharacter.h prototypes +inline boolean isAlphaNumeric(int c) __attribute__((always_inline)); +inline boolean isAlpha(int c) __attribute__((always_inline)); +inline boolean isAscii(int c) __attribute__((always_inline)); +inline boolean isWhitespace(int c) __attribute__((always_inline)); +inline boolean isControl(int c) __attribute__((always_inline)); +inline boolean isDigit(int c) __attribute__((always_inline)); +inline boolean isGraph(int c) __attribute__((always_inline)); +inline boolean isLowerCase(int c) __attribute__((always_inline)); +inline boolean isPrintable(int c) __attribute__((always_inline)); +inline boolean isPunct(int c) __attribute__((always_inline)); +inline boolean isSpace(int c) __attribute__((always_inline)); +inline boolean isUpperCase(int c) __attribute__((always_inline)); +inline boolean isHexadecimalDigit(int c) __attribute__((always_inline)); +inline int toAscii(int c) __attribute__((always_inline)); +inline int toLowerCase(int c) __attribute__((always_inline)); +inline int toUpperCase(int c)__attribute__((always_inline)); + + +// Checks for an alphanumeric character. +// It is equivalent to (isalpha(c) || isdigit(c)). +inline boolean isAlphaNumeric(int c) +{ + return ( isalnum(c) == 0 ? false : true); +} + + +// Checks for an alphabetic character. +// It is equivalent to (isupper(c) || islower(c)). +inline boolean isAlpha(int c) +{ + return ( isalpha(c) == 0 ? false : true); +} + + +// Checks whether c is a 7-bit unsigned char value +// that fits into the ASCII character set. +inline boolean isAscii(int c) +{ + return ( isascii (c) == 0 ? false : true); +} + + +// Checks for a blank character, that is, a space or a tab. +inline boolean isWhitespace(int c) +{ + return ( isblank (c) == 0 ? false : true); +} + + +// Checks for a control character. +inline boolean isControl(int c) +{ + return ( iscntrl (c) == 0 ? false : true); +} + + +// Checks for a digit (0 through 9). +inline boolean isDigit(int c) +{ + return ( isdigit (c) == 0 ? false : true); +} + + +// Checks for any printable character except space. +inline boolean isGraph(int c) +{ + return ( isgraph (c) == 0 ? false : true); +} + + +// Checks for a lower-case character. +inline boolean isLowerCase(int c) +{ + return (islower (c) == 0 ? false : true); +} + + +// Checks for any printable character including space. +inline boolean isPrintable(int c) +{ + return ( isprint (c) == 0 ? false : true); +} + + +// Checks for any printable character which is not a space +// or an alphanumeric character. +inline boolean isPunct(int c) +{ + return ( ispunct (c) == 0 ? false : true); +} + + +// Checks for white-space characters. For the avr-libc library, +// these are: space, formfeed ('\f'), newline ('\n'), carriage +// return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). +inline boolean isSpace(int c) +{ + return ( isspace (c) == 0 ? false : true); +} + + +// Checks for an uppercase letter. +inline boolean isUpperCase(int c) +{ + return ( isupper (c) == 0 ? false : true); +} + + +// Checks for a hexadecimal digits, i.e. one of 0 1 2 3 4 5 6 7 +// 8 9 a b c d e f A B C D E F. +inline boolean isHexadecimalDigit(int c) +{ + return ( isxdigit (c) == 0 ? false : true); +} + + +// Converts c to a 7-bit unsigned char value that fits into the +// ASCII character set, by clearing the high-order bits. +inline int toAscii(int c) +{ + return toascii (c); +} + + +// Warning: +// Many people will be unhappy if you use this function. +// This function will convert accented letters into random +// characters. + +// Converts the letter c to lower case, if possible. +inline int toLowerCase(int c) +{ + return tolower (c); +} + + +// Converts the letter c to upper case, if possible. +inline int toUpperCase(int c) +{ + return toupper (c); +} + +#endif \ No newline at end of file diff --git a/test/ardmake/hardware/cores/arduino/WConstants.h b/test/ardmake/hardware/cores/arduino/WConstants.h new file mode 100644 index 0000000..3e19ac4 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WConstants.h @@ -0,0 +1 @@ +#include "wiring.h" diff --git a/test/ardmake/hardware/cores/arduino/WInterrupts.c b/test/ardmake/hardware/cores/arduino/WInterrupts.c new file mode 100644 index 0000000..3b3e0c9 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WInterrupts.c @@ -0,0 +1,249 @@ +/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ + +/* + Part of the Wiring project - http://wiring.uniandes.edu.co + + Copyright (c) 2004-05 Hernando Barragan + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + Modified 24 November 2006 by David A. Mellis + Modified 1 August 2010 by Mark Sproul +*/ + +#include +#include +#include +#include +#include + +#include "WConstants.h" +#include "wiring_private.h" + +volatile static voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS]; +// volatile static voidFuncPtr twiIntFunc; + +void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) { + if(interruptNum < EXTERNAL_NUM_INTERRUPTS) { + intFunc[interruptNum] = userFunc; + + // Configure the interrupt mode (trigger on low input, any change, rising + // edge, or falling edge). The mode constants were chosen to correspond + // to the configuration bits in the hardware register, so we simply shift + // the mode into place. + + // Enable the interrupt. + + switch (interruptNum) { +#if defined(EICRA) && defined(EICRB) && defined(EIMSK) + case 2: + EICRA = (EICRA & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00); + EIMSK |= (1 << INT0); + break; + case 3: + EICRA = (EICRA & ~((1 << ISC10) | (1 << ISC11))) | (mode << ISC10); + EIMSK |= (1 << INT1); + break; + case 4: + EICRA = (EICRA & ~((1 << ISC20) | (1 << ISC21))) | (mode << ISC20); + EIMSK |= (1 << INT2); + break; + case 5: + EICRA = (EICRA & ~((1 << ISC30) | (1 << ISC31))) | (mode << ISC30); + EIMSK |= (1 << INT3); + break; + case 0: + EICRB = (EICRB & ~((1 << ISC40) | (1 << ISC41))) | (mode << ISC40); + EIMSK |= (1 << INT4); + break; + case 1: + EICRB = (EICRB & ~((1 << ISC50) | (1 << ISC51))) | (mode << ISC50); + EIMSK |= (1 << INT5); + break; + case 6: + EICRB = (EICRB & ~((1 << ISC60) | (1 << ISC61))) | (mode << ISC60); + EIMSK |= (1 << INT6); + break; + case 7: + EICRB = (EICRB & ~((1 << ISC70) | (1 << ISC71))) | (mode << ISC70); + EIMSK |= (1 << INT7); + break; +#else + case 0: + #if defined(EICRA) && defined(ISC00) && defined(EIMSK) + EICRA = (EICRA & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00); + EIMSK |= (1 << INT0); + #elif defined(MCUCR) && defined(ISC00) && defined(GICR) + MCUCR = (MCUCR & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00); + GICR |= (1 << INT0); + #elif defined(MCUCR) && defined(ISC00) && defined(GIMSK) + MCUCR = (MCUCR & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00); + GIMSK |= (1 << INT0); + #else + #error attachInterrupt not finished for this CPU (case 0) + #endif + break; + + case 1: + #if defined(EICRA) && defined(ISC10) && defined(ISC11) && defined(EIMSK) + EICRA = (EICRA & ~((1 << ISC10) | (1 << ISC11))) | (mode << ISC10); + EIMSK |= (1 << INT1); + #elif defined(MCUCR) && defined(ISC10) && defined(ISC11) && defined(GICR) + MCUCR = (MCUCR & ~((1 << ISC10) | (1 << ISC11))) | (mode << ISC10); + GICR |= (1 << INT1); + #elif defined(MCUCR) && defined(ISC10) && defined(GIMSK) && defined(GIMSK) + MCUCR = (MCUCR & ~((1 << ISC10) | (1 << ISC11))) | (mode << ISC10); + GIMSK |= (1 << INT1); + #else + #warning attachInterrupt may need some more work for this cpu (case 1) + #endif + break; +#endif + } + } +} + +void detachInterrupt(uint8_t interruptNum) { + if(interruptNum < EXTERNAL_NUM_INTERRUPTS) { + // Disable the interrupt. (We can't assume that interruptNum is equal + // to the number of the EIMSK bit to clear, as this isn't true on the + // ATmega8. There, INT0 is 6 and INT1 is 7.) + switch (interruptNum) { +#if defined(EICRA) && defined(EICRB) && defined(EIMSK) + case 2: + EIMSK &= ~(1 << INT0); + break; + case 3: + EIMSK &= ~(1 << INT1); + break; + case 4: + EIMSK &= ~(1 << INT2); + break; + case 5: + EIMSK &= ~(1 << INT3); + break; + case 0: + EIMSK &= ~(1 << INT4); + break; + case 1: + EIMSK &= ~(1 << INT5); + break; + case 6: + EIMSK &= ~(1 << INT6); + break; + case 7: + EIMSK &= ~(1 << INT7); + break; +#else + case 0: + #if defined(EIMSK) && defined(INT0) + EIMSK &= ~(1 << INT0); + #elif defined(GICR) && defined(ISC00) + GICR &= ~(1 << INT0); // atmega32 + #elif defined(GIMSK) && defined(INT0) + GIMSK &= ~(1 << INT0); + #else + #error detachInterrupt not finished for this cpu + #endif + break; + + case 1: + #if defined(EIMSK) && defined(INT1) + EIMSK &= ~(1 << INT1); + #elif defined(GICR) && defined(INT1) + GICR &= ~(1 << INT1); // atmega32 + #elif defined(GIMSK) && defined(INT1) + GIMSK &= ~(1 << INT1); + #else + #warning detachInterrupt may need some more work for this cpu (case 1) + #endif + break; +#endif + } + + intFunc[interruptNum] = 0; + } +} + +/* +void attachInterruptTwi(void (*userFunc)(void) ) { + twiIntFunc = userFunc; +} +*/ + +#if defined(EICRA) && defined(EICRB) + +SIGNAL(INT0_vect) { + if(intFunc[EXTERNAL_INT_2]) + intFunc[EXTERNAL_INT_2](); +} + +SIGNAL(INT1_vect) { + if(intFunc[EXTERNAL_INT_3]) + intFunc[EXTERNAL_INT_3](); +} + +SIGNAL(INT2_vect) { + if(intFunc[EXTERNAL_INT_4]) + intFunc[EXTERNAL_INT_4](); +} + +SIGNAL(INT3_vect) { + if(intFunc[EXTERNAL_INT_5]) + intFunc[EXTERNAL_INT_5](); +} + +SIGNAL(INT4_vect) { + if(intFunc[EXTERNAL_INT_0]) + intFunc[EXTERNAL_INT_0](); +} + +SIGNAL(INT5_vect) { + if(intFunc[EXTERNAL_INT_1]) + intFunc[EXTERNAL_INT_1](); +} + +SIGNAL(INT6_vect) { + if(intFunc[EXTERNAL_INT_6]) + intFunc[EXTERNAL_INT_6](); +} + +SIGNAL(INT7_vect) { + if(intFunc[EXTERNAL_INT_7]) + intFunc[EXTERNAL_INT_7](); +} + +#else + +SIGNAL(INT0_vect) { + if(intFunc[EXTERNAL_INT_0]) + intFunc[EXTERNAL_INT_0](); +} + +SIGNAL(INT1_vect) { + if(intFunc[EXTERNAL_INT_1]) + intFunc[EXTERNAL_INT_1](); +} + +#endif + +/* +SIGNAL(SIG_2WIRE_SERIAL) { + if(twiIntFunc) + twiIntFunc(); +} +*/ + diff --git a/test/ardmake/hardware/cores/arduino/WInterrupts.d b/test/ardmake/hardware/cores/arduino/WInterrupts.d new file mode 100644 index 0000000..73a0256 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WInterrupts.d @@ -0,0 +1,24 @@ +ardmake/hardware/cores/arduino/WInterrupts.o ardmake/hardware/cores/arduino/WInterrupts.d: ardmake/hardware/cores/arduino/WInterrupts.c \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + ardmake/hardware/cores/arduino/WConstants.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h diff --git a/test/ardmake/hardware/cores/arduino/WMath.cpp b/test/ardmake/hardware/cores/arduino/WMath.cpp new file mode 100644 index 0000000..2120c4c --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WMath.cpp @@ -0,0 +1,60 @@ +/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ + +/* + Part of the Wiring project - http://wiring.org.co + Copyright (c) 2004-06 Hernando Barragan + Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id$ +*/ + +extern "C" { + #include "stdlib.h" +} + +void randomSeed(unsigned int seed) +{ + if (seed != 0) { + srandom(seed); + } +} + +long random(long howbig) +{ + if (howbig == 0) { + return 0; + } + return random() % howbig; +} + +long random(long howsmall, long howbig) +{ + if (howsmall >= howbig) { + return howsmall; + } + long diff = howbig - howsmall; + return random(diff) + howsmall; +} + +long map(long x, long in_min, long in_max, long out_min, long out_max) +{ + return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; +} + +unsigned int makeWord(unsigned int w) { return w; } +unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } \ No newline at end of file diff --git a/test/ardmake/hardware/cores/arduino/WMath.d b/test/ardmake/hardware/cores/arduino/WMath.d new file mode 100644 index 0000000..dd4d873 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WMath.d @@ -0,0 +1,3 @@ +ardmake/hardware/cores/arduino/WMath.o ardmake/hardware/cores/arduino/WMath.d: ardmake/hardware/cores/arduino/WMath.cpp \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h diff --git a/test/ardmake/hardware/cores/arduino/WProgram.h b/test/ardmake/hardware/cores/arduino/WProgram.h new file mode 100644 index 0000000..f73e760 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WProgram.h @@ -0,0 +1,63 @@ +#ifndef WProgram_h +#define WProgram_h + +#include +#include +#include + +#include + +#include "wiring.h" + +#ifdef __cplusplus +#include "WCharacter.h" +#include "WString.h" +#include "HardwareSerial.h" + +uint16_t makeWord(uint16_t w); +uint16_t makeWord(byte h, byte l); + +#define word(...) makeWord(__VA_ARGS__) + +unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); + +void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0); +void noTone(uint8_t _pin); + +// WMath prototypes +long random(long); +long random(long, long); +void randomSeed(unsigned int); +long map(long, long, long, long, long); + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +const static uint8_t A0 = 54; +const static uint8_t A1 = 55; +const static uint8_t A2 = 56; +const static uint8_t A3 = 57; +const static uint8_t A4 = 58; +const static uint8_t A5 = 59; +const static uint8_t A6 = 60; +const static uint8_t A7 = 61; +const static uint8_t A8 = 62; +const static uint8_t A9 = 63; +const static uint8_t A10 = 64; +const static uint8_t A11 = 65; +const static uint8_t A12 = 66; +const static uint8_t A13 = 67; +const static uint8_t A14 = 68; +const static uint8_t A15 = 69; +#else +const static uint8_t A0 = 14; +const static uint8_t A1 = 15; +const static uint8_t A2 = 16; +const static uint8_t A3 = 17; +const static uint8_t A4 = 18; +const static uint8_t A5 = 19; +const static uint8_t A6 = 20; +const static uint8_t A7 = 21; +#endif + +#endif + +#endif \ No newline at end of file diff --git a/test/ardmake/hardware/cores/arduino/WString.cpp b/test/ardmake/hardware/cores/arduino/WString.cpp new file mode 100644 index 0000000..db5a441 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WString.cpp @@ -0,0 +1,443 @@ +/* + WString.cpp - String library for Wiring & Arduino + Copyright (c) 2009-10 Hernando Barragan. All rights reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include "WProgram.h" +#include "WString.h" + + +String::String( const char *value ) +{ + if ( value == NULL ) + value = ""; + getBuffer( _length = strlen( value ) ); + if ( _buffer != NULL ) + strcpy( _buffer, value ); +} + +String::String( const String &value ) +{ + getBuffer( _length = value._length ); + if ( _buffer != NULL ) + strcpy( _buffer, value._buffer ); +} + +String::String( const char value ) +{ + _length = 1; + getBuffer(1); + if ( _buffer != NULL ) { + _buffer[0] = value; + _buffer[1] = 0; + } +} + +String::String( const unsigned char value ) +{ + _length = 1; + getBuffer(1); + if ( _buffer != NULL) { + _buffer[0] = value; + _buffer[1] = 0; + } +} + +String::String( const int value, const int base ) +{ + char buf[33]; + itoa((signed long)value, buf, base); + getBuffer( _length = strlen(buf) ); + if ( _buffer != NULL ) + strcpy( _buffer, buf ); +} + +String::String( const unsigned int value, const int base ) +{ + char buf[33]; + ultoa((unsigned long)value, buf, base); + getBuffer( _length = strlen(buf) ); + if ( _buffer != NULL ) + strcpy( _buffer, buf ); +} + +String::String( const long value, const int base ) +{ + char buf[33]; + ltoa(value, buf, base); + getBuffer( _length = strlen(buf) ); + if ( _buffer != NULL ) + strcpy( _buffer, buf ); +} + +String::String( const unsigned long value, const int base ) +{ + char buf[33]; + ultoa(value, buf, 10); + getBuffer( _length = strlen(buf) ); + if ( _buffer != NULL ) + strcpy( _buffer, buf ); +} + +char String::charAt( unsigned int loc ) const +{ + return operator[]( loc ); +} + +void String::setCharAt( unsigned int loc, const char aChar ) +{ + if(_buffer == NULL) return; + if(_length > loc) { + _buffer[loc] = aChar; + } +} + +int String::compareTo( const String &s2 ) const +{ + return strcmp( _buffer, s2._buffer ); +} + +const String & String::concat( const String &s2 ) +{ + return (*this) += s2; +} + +const String & String::operator=( const String &rhs ) +{ + if ( this == &rhs ) + return *this; + + if ( rhs._length > _length ) + { + free(_buffer); + getBuffer( rhs._length ); + } + + if ( _buffer != NULL ) { + _length = rhs._length; + strcpy( _buffer, rhs._buffer ); + } + return *this; +} + +//const String & String::operator+=( const char aChar ) +//{ +// if ( _length == _capacity ) +// doubleBuffer(); +// +// _buffer[ _length++ ] = aChar; +// _buffer[ _length ] = '\0'; +// return *this; +//} + +const String & String::operator+=( const String &other ) +{ + _length += other._length; + if ( _length > _capacity ) + { + char *temp = (char *)realloc(_buffer, _length + 1); + if ( temp != NULL ) { + _buffer = temp; + _capacity = _length; + } else { + _length -= other._length; + return *this; + } + } + strcat( _buffer, other._buffer ); + return *this; +} + + +int String::operator==( const String &rhs ) const +{ + return ( _length == rhs._length && strcmp( _buffer, rhs._buffer ) == 0 ); +} + +int String::operator!=( const String &rhs ) const +{ + return ( _length != rhs.length() || strcmp( _buffer, rhs._buffer ) != 0 ); +} + +int String::operator<( const String &rhs ) const +{ + return strcmp( _buffer, rhs._buffer ) < 0; +} + +int String::operator>( const String &rhs ) const +{ + return strcmp( _buffer, rhs._buffer ) > 0; +} + +int String::operator<=( const String &rhs ) const +{ + return strcmp( _buffer, rhs._buffer ) <= 0; +} + +int String::operator>=( const String & rhs ) const +{ + return strcmp( _buffer, rhs._buffer ) >= 0; +} + +char & String::operator[]( unsigned int index ) +{ + static char dummy_writable_char; + if (index >= _length || !_buffer) { + dummy_writable_char = 0; + return dummy_writable_char; + } + return _buffer[ index ]; +} + +char String::operator[]( unsigned int index ) const +{ + // need to check for valid index, to do later + return _buffer[ index ]; +} + +boolean String::endsWith( const String &s2 ) const +{ + if ( _length < s2._length ) + return 0; + + return strcmp( &_buffer[ _length - s2._length], s2._buffer ) == 0; +} + +boolean String::equals( const String &s2 ) const +{ + return ( _length == s2._length && strcmp( _buffer,s2._buffer ) == 0 ); +} + +boolean String::equalsIgnoreCase( const String &s2 ) const +{ + if ( this == &s2 ) + return true; //1; + else if ( _length != s2._length ) + return false; //0; + + return strcmp(toLowerCase()._buffer, s2.toLowerCase()._buffer) == 0; +} + +String String::replace( char findChar, char replaceChar ) +{ + if ( _buffer == NULL ) return *this; + String theReturn = _buffer; + char* temp = theReturn._buffer; + while( (temp = strchr( temp, findChar )) != 0 ) + *temp = replaceChar; + + return theReturn; +} + +String String::replace( const String& match, const String& replace ) +{ + if ( _buffer == NULL ) return *this; + String temp = _buffer, newString; + + int loc; + while ( (loc = temp.indexOf( match )) != -1 ) + { + newString += temp.substring( 0, loc ); + newString += replace; + temp = temp.substring( loc + match._length ); + } + newString += temp; + return newString; +} + +int String::indexOf( char temp ) const +{ + return indexOf( temp, 0 ); +} + +int String::indexOf( char ch, unsigned int fromIndex ) const +{ + if ( fromIndex >= _length ) + return -1; + + const char* temp = strchr( &_buffer[fromIndex], ch ); + if ( temp == NULL ) + return -1; + + return temp - _buffer; +} + +int String::indexOf( const String &s2 ) const +{ + return indexOf( s2, 0 ); +} + +int String::indexOf( const String &s2, unsigned int fromIndex ) const +{ + if ( fromIndex >= _length ) + return -1; + + const char *theFind = strstr( &_buffer[ fromIndex ], s2._buffer ); + + if ( theFind == NULL ) + return -1; + + return theFind - _buffer; // pointer subtraction +} + +int String::lastIndexOf( char theChar ) const +{ + return lastIndexOf( theChar, _length - 1 ); +} + +int String::lastIndexOf( char ch, unsigned int fromIndex ) const +{ + if ( fromIndex >= _length ) + return -1; + + char tempchar = _buffer[fromIndex + 1]; + _buffer[fromIndex + 1] = '\0'; + char* temp = strrchr( _buffer, ch ); + _buffer[fromIndex + 1] = tempchar; + + if ( temp == NULL ) + return -1; + + return temp - _buffer; +} + +int String::lastIndexOf( const String &s2 ) const +{ + return lastIndexOf( s2, _length - s2._length ); +} + +int String::lastIndexOf( const String &s2, unsigned int fromIndex ) const +{ + // check for empty strings + if ( s2._length == 0 || s2._length - 1 > fromIndex || fromIndex >= _length ) + return -1; + + // matching first character + char temp = s2[ 0 ]; + + for ( int i = fromIndex; i >= 0; i-- ) + { + if ( _buffer[ i ] == temp && (*this).substring( i, i + s2._length ).equals( s2 ) ) + return i; + } + return -1; +} + +boolean String::startsWith( const String &s2 ) const +{ + if ( _length < s2._length ) + return 0; + + return startsWith( s2, 0 ); +} + +boolean String::startsWith( const String &s2, unsigned int offset ) const +{ + if ( offset > _length - s2._length ) + return 0; + + return strncmp( &_buffer[offset], s2._buffer, s2._length ) == 0; +} + +String String::substring( unsigned int left ) const +{ + return substring( left, _length ); +} + +String String::substring( unsigned int left, unsigned int right ) const +{ + if ( left > right ) + { + int temp = right; + right = left; + left = temp; + } + + if ( right > _length ) + { + right = _length; + } + + char temp = _buffer[ right ]; // save the replaced character + _buffer[ right ] = '\0'; + String outPut = ( _buffer + left ); // pointer arithmetic + _buffer[ right ] = temp; //restore character + return outPut; +} + +String String::toLowerCase() const +{ + String temp = _buffer; + + for ( unsigned int i = 0; i < _length; i++ ) + temp._buffer[ i ] = (char)tolower( temp._buffer[ i ] ); + return temp; +} + +String String::toUpperCase() const +{ + String temp = _buffer; + + for ( unsigned int i = 0; i < _length; i++ ) + temp._buffer[ i ] = (char)toupper( temp._buffer[ i ] ); + return temp; +} + +String String::trim() const +{ + if ( _buffer == NULL ) return *this; + String temp = _buffer; + unsigned int i,j; + + for ( i = 0; i < _length; i++ ) + { + if ( !isspace(_buffer[i]) ) + break; + } + + for ( j = temp._length - 1; j > i; j-- ) + { + if ( !isspace(_buffer[j]) ) + break; + } + + return temp.substring( i, j + 1); +} + +void String::getBytes(unsigned char *buf, unsigned int bufsize) +{ + if (!bufsize || !buf) return; + unsigned int len = bufsize - 1; + if (len > _length) len = _length; + strncpy((char *)buf, _buffer, len); + buf[len] = 0; +} + +void String::toCharArray(char *buf, unsigned int bufsize) +{ + if (!bufsize || !buf) return; + unsigned int len = bufsize - 1; + if (len > _length) len = _length; + strncpy(buf, _buffer, len); + buf[len] = 0; +} + + +long String::toInt() { + return atol(_buffer); +} diff --git a/test/ardmake/hardware/cores/arduino/WString.h b/test/ardmake/hardware/cores/arduino/WString.h new file mode 100644 index 0000000..cadddb9 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/WString.h @@ -0,0 +1,112 @@ +/* + WString.h - String library for Wiring & Arduino + Copyright (c) 2009-10 Hernando Barragan. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef String_h +#define String_h + +//#include "WProgram.h" +#include +#include +#include + +class String +{ + public: + // constructors + String( const char *value = "" ); + String( const String &value ); + String( const char ); + String( const unsigned char ); + String( const int, const int base=10); + String( const unsigned int, const int base=10 ); + String( const long, const int base=10 ); + String( const unsigned long, const int base=10 ); + ~String() { free(_buffer); _length = _capacity = 0;} //added _length = _capacity = 0; + + // operators + const String & operator = ( const String &rhs ); + const String & operator +=( const String &rhs ); + //const String & operator +=( const char ); + int operator ==( const String &rhs ) const; + int operator !=( const String &rhs ) const; + int operator < ( const String &rhs ) const; + int operator > ( const String &rhs ) const; + int operator <=( const String &rhs ) const; + int operator >=( const String &rhs ) const; + char operator []( unsigned int index ) const; + char& operator []( unsigned int index ); + //operator const char *() const { return _buffer; } + + // general methods + char charAt( unsigned int index ) const; + int compareTo( const String &anotherString ) const; + unsigned char endsWith( const String &suffix ) const; + unsigned char equals( const String &anObject ) const; + unsigned char equalsIgnoreCase( const String &anotherString ) const; + int indexOf( char ch ) const; + int indexOf( char ch, unsigned int fromIndex ) const; + int indexOf( const String &str ) const; + int indexOf( const String &str, unsigned int fromIndex ) const; + int lastIndexOf( char ch ) const; + int lastIndexOf( char ch, unsigned int fromIndex ) const; + int lastIndexOf( const String &str ) const; + int lastIndexOf( const String &str, unsigned int fromIndex ) const; + const unsigned int length( ) const { return _length; } + void setCharAt(unsigned int index, const char ch); + unsigned char startsWith( const String &prefix ) const; + unsigned char startsWith( const String &prefix, unsigned int toffset ) const; + String substring( unsigned int beginIndex ) const; + String substring( unsigned int beginIndex, unsigned int endIndex ) const; + String toLowerCase( ) const; + String toUpperCase( ) const; + String trim( ) const; + void getBytes(unsigned char *buf, unsigned int bufsize); + void toCharArray(char *buf, unsigned int bufsize); + long toInt( ); + const String& concat( const String &str ); + String replace( char oldChar, char newChar ); + String replace( const String& match, const String& replace ); + friend String operator + ( String lhs, const String &rhs ); + + protected: + char *_buffer; // the actual char array + unsigned int _capacity; // the array length minus one (for the '\0') + unsigned int _length; // the String length (not counting the '\0') + + void getBuffer(unsigned int maxStrLen); + + private: + +}; + +// allocate buffer space +inline void String::getBuffer(unsigned int maxStrLen) +{ + _capacity = maxStrLen; + _buffer = (char *) malloc(_capacity + 1); + if (_buffer == NULL) _length = _capacity = 0; +} + +inline String operator+( String lhs, const String &rhs ) +{ + return lhs += rhs; +} + + +#endif diff --git a/test/ardmake/hardware/cores/arduino/binary.h b/test/ardmake/hardware/cores/arduino/binary.h new file mode 100644 index 0000000..af14980 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/binary.h @@ -0,0 +1,515 @@ +#ifndef Binary_h +#define Binary_h + +#define B0 0 +#define B00 0 +#define B000 0 +#define B0000 0 +#define B00000 0 +#define B000000 0 +#define B0000000 0 +#define B00000000 0 +#define B1 1 +#define B01 1 +#define B001 1 +#define B0001 1 +#define B00001 1 +#define B000001 1 +#define B0000001 1 +#define B00000001 1 +#define B10 2 +#define B010 2 +#define B0010 2 +#define B00010 2 +#define B000010 2 +#define B0000010 2 +#define B00000010 2 +#define B11 3 +#define B011 3 +#define B0011 3 +#define B00011 3 +#define B000011 3 +#define B0000011 3 +#define B00000011 3 +#define B100 4 +#define B0100 4 +#define B00100 4 +#define B000100 4 +#define B0000100 4 +#define B00000100 4 +#define B101 5 +#define B0101 5 +#define B00101 5 +#define B000101 5 +#define B0000101 5 +#define B00000101 5 +#define B110 6 +#define B0110 6 +#define B00110 6 +#define B000110 6 +#define B0000110 6 +#define B00000110 6 +#define B111 7 +#define B0111 7 +#define B00111 7 +#define B000111 7 +#define B0000111 7 +#define B00000111 7 +#define B1000 8 +#define B01000 8 +#define B001000 8 +#define B0001000 8 +#define B00001000 8 +#define B1001 9 +#define B01001 9 +#define B001001 9 +#define B0001001 9 +#define B00001001 9 +#define B1010 10 +#define B01010 10 +#define B001010 10 +#define B0001010 10 +#define B00001010 10 +#define B1011 11 +#define B01011 11 +#define B001011 11 +#define B0001011 11 +#define B00001011 11 +#define B1100 12 +#define B01100 12 +#define B001100 12 +#define B0001100 12 +#define B00001100 12 +#define B1101 13 +#define B01101 13 +#define B001101 13 +#define B0001101 13 +#define B00001101 13 +#define B1110 14 +#define B01110 14 +#define B001110 14 +#define B0001110 14 +#define B00001110 14 +#define B1111 15 +#define B01111 15 +#define B001111 15 +#define B0001111 15 +#define B00001111 15 +#define B10000 16 +#define B010000 16 +#define B0010000 16 +#define B00010000 16 +#define B10001 17 +#define B010001 17 +#define B0010001 17 +#define B00010001 17 +#define B10010 18 +#define B010010 18 +#define B0010010 18 +#define B00010010 18 +#define B10011 19 +#define B010011 19 +#define B0010011 19 +#define B00010011 19 +#define B10100 20 +#define B010100 20 +#define B0010100 20 +#define B00010100 20 +#define B10101 21 +#define B010101 21 +#define B0010101 21 +#define B00010101 21 +#define B10110 22 +#define B010110 22 +#define B0010110 22 +#define B00010110 22 +#define B10111 23 +#define B010111 23 +#define B0010111 23 +#define B00010111 23 +#define B11000 24 +#define B011000 24 +#define B0011000 24 +#define B00011000 24 +#define B11001 25 +#define B011001 25 +#define B0011001 25 +#define B00011001 25 +#define B11010 26 +#define B011010 26 +#define B0011010 26 +#define B00011010 26 +#define B11011 27 +#define B011011 27 +#define B0011011 27 +#define B00011011 27 +#define B11100 28 +#define B011100 28 +#define B0011100 28 +#define B00011100 28 +#define B11101 29 +#define B011101 29 +#define B0011101 29 +#define B00011101 29 +#define B11110 30 +#define B011110 30 +#define B0011110 30 +#define B00011110 30 +#define B11111 31 +#define B011111 31 +#define B0011111 31 +#define B00011111 31 +#define B100000 32 +#define B0100000 32 +#define B00100000 32 +#define B100001 33 +#define B0100001 33 +#define B00100001 33 +#define B100010 34 +#define B0100010 34 +#define B00100010 34 +#define B100011 35 +#define B0100011 35 +#define B00100011 35 +#define B100100 36 +#define B0100100 36 +#define B00100100 36 +#define B100101 37 +#define B0100101 37 +#define B00100101 37 +#define B100110 38 +#define B0100110 38 +#define B00100110 38 +#define B100111 39 +#define B0100111 39 +#define B00100111 39 +#define B101000 40 +#define B0101000 40 +#define B00101000 40 +#define B101001 41 +#define B0101001 41 +#define B00101001 41 +#define B101010 42 +#define B0101010 42 +#define B00101010 42 +#define B101011 43 +#define B0101011 43 +#define B00101011 43 +#define B101100 44 +#define B0101100 44 +#define B00101100 44 +#define B101101 45 +#define B0101101 45 +#define B00101101 45 +#define B101110 46 +#define B0101110 46 +#define B00101110 46 +#define B101111 47 +#define B0101111 47 +#define B00101111 47 +#define B110000 48 +#define B0110000 48 +#define B00110000 48 +#define B110001 49 +#define B0110001 49 +#define B00110001 49 +#define B110010 50 +#define B0110010 50 +#define B00110010 50 +#define B110011 51 +#define B0110011 51 +#define B00110011 51 +#define B110100 52 +#define B0110100 52 +#define B00110100 52 +#define B110101 53 +#define B0110101 53 +#define B00110101 53 +#define B110110 54 +#define B0110110 54 +#define B00110110 54 +#define B110111 55 +#define B0110111 55 +#define B00110111 55 +#define B111000 56 +#define B0111000 56 +#define B00111000 56 +#define B111001 57 +#define B0111001 57 +#define B00111001 57 +#define B111010 58 +#define B0111010 58 +#define B00111010 58 +#define B111011 59 +#define B0111011 59 +#define B00111011 59 +#define B111100 60 +#define B0111100 60 +#define B00111100 60 +#define B111101 61 +#define B0111101 61 +#define B00111101 61 +#define B111110 62 +#define B0111110 62 +#define B00111110 62 +#define B111111 63 +#define B0111111 63 +#define B00111111 63 +#define B1000000 64 +#define B01000000 64 +#define B1000001 65 +#define B01000001 65 +#define B1000010 66 +#define B01000010 66 +#define B1000011 67 +#define B01000011 67 +#define B1000100 68 +#define B01000100 68 +#define B1000101 69 +#define B01000101 69 +#define B1000110 70 +#define B01000110 70 +#define B1000111 71 +#define B01000111 71 +#define B1001000 72 +#define B01001000 72 +#define B1001001 73 +#define B01001001 73 +#define B1001010 74 +#define B01001010 74 +#define B1001011 75 +#define B01001011 75 +#define B1001100 76 +#define B01001100 76 +#define B1001101 77 +#define B01001101 77 +#define B1001110 78 +#define B01001110 78 +#define B1001111 79 +#define B01001111 79 +#define B1010000 80 +#define B01010000 80 +#define B1010001 81 +#define B01010001 81 +#define B1010010 82 +#define B01010010 82 +#define B1010011 83 +#define B01010011 83 +#define B1010100 84 +#define B01010100 84 +#define B1010101 85 +#define B01010101 85 +#define B1010110 86 +#define B01010110 86 +#define B1010111 87 +#define B01010111 87 +#define B1011000 88 +#define B01011000 88 +#define B1011001 89 +#define B01011001 89 +#define B1011010 90 +#define B01011010 90 +#define B1011011 91 +#define B01011011 91 +#define B1011100 92 +#define B01011100 92 +#define B1011101 93 +#define B01011101 93 +#define B1011110 94 +#define B01011110 94 +#define B1011111 95 +#define B01011111 95 +#define B1100000 96 +#define B01100000 96 +#define B1100001 97 +#define B01100001 97 +#define B1100010 98 +#define B01100010 98 +#define B1100011 99 +#define B01100011 99 +#define B1100100 100 +#define B01100100 100 +#define B1100101 101 +#define B01100101 101 +#define B1100110 102 +#define B01100110 102 +#define B1100111 103 +#define B01100111 103 +#define B1101000 104 +#define B01101000 104 +#define B1101001 105 +#define B01101001 105 +#define B1101010 106 +#define B01101010 106 +#define B1101011 107 +#define B01101011 107 +#define B1101100 108 +#define B01101100 108 +#define B1101101 109 +#define B01101101 109 +#define B1101110 110 +#define B01101110 110 +#define B1101111 111 +#define B01101111 111 +#define B1110000 112 +#define B01110000 112 +#define B1110001 113 +#define B01110001 113 +#define B1110010 114 +#define B01110010 114 +#define B1110011 115 +#define B01110011 115 +#define B1110100 116 +#define B01110100 116 +#define B1110101 117 +#define B01110101 117 +#define B1110110 118 +#define B01110110 118 +#define B1110111 119 +#define B01110111 119 +#define B1111000 120 +#define B01111000 120 +#define B1111001 121 +#define B01111001 121 +#define B1111010 122 +#define B01111010 122 +#define B1111011 123 +#define B01111011 123 +#define B1111100 124 +#define B01111100 124 +#define B1111101 125 +#define B01111101 125 +#define B1111110 126 +#define B01111110 126 +#define B1111111 127 +#define B01111111 127 +#define B10000000 128 +#define B10000001 129 +#define B10000010 130 +#define B10000011 131 +#define B10000100 132 +#define B10000101 133 +#define B10000110 134 +#define B10000111 135 +#define B10001000 136 +#define B10001001 137 +#define B10001010 138 +#define B10001011 139 +#define B10001100 140 +#define B10001101 141 +#define B10001110 142 +#define B10001111 143 +#define B10010000 144 +#define B10010001 145 +#define B10010010 146 +#define B10010011 147 +#define B10010100 148 +#define B10010101 149 +#define B10010110 150 +#define B10010111 151 +#define B10011000 152 +#define B10011001 153 +#define B10011010 154 +#define B10011011 155 +#define B10011100 156 +#define B10011101 157 +#define B10011110 158 +#define B10011111 159 +#define B10100000 160 +#define B10100001 161 +#define B10100010 162 +#define B10100011 163 +#define B10100100 164 +#define B10100101 165 +#define B10100110 166 +#define B10100111 167 +#define B10101000 168 +#define B10101001 169 +#define B10101010 170 +#define B10101011 171 +#define B10101100 172 +#define B10101101 173 +#define B10101110 174 +#define B10101111 175 +#define B10110000 176 +#define B10110001 177 +#define B10110010 178 +#define B10110011 179 +#define B10110100 180 +#define B10110101 181 +#define B10110110 182 +#define B10110111 183 +#define B10111000 184 +#define B10111001 185 +#define B10111010 186 +#define B10111011 187 +#define B10111100 188 +#define B10111101 189 +#define B10111110 190 +#define B10111111 191 +#define B11000000 192 +#define B11000001 193 +#define B11000010 194 +#define B11000011 195 +#define B11000100 196 +#define B11000101 197 +#define B11000110 198 +#define B11000111 199 +#define B11001000 200 +#define B11001001 201 +#define B11001010 202 +#define B11001011 203 +#define B11001100 204 +#define B11001101 205 +#define B11001110 206 +#define B11001111 207 +#define B11010000 208 +#define B11010001 209 +#define B11010010 210 +#define B11010011 211 +#define B11010100 212 +#define B11010101 213 +#define B11010110 214 +#define B11010111 215 +#define B11011000 216 +#define B11011001 217 +#define B11011010 218 +#define B11011011 219 +#define B11011100 220 +#define B11011101 221 +#define B11011110 222 +#define B11011111 223 +#define B11100000 224 +#define B11100001 225 +#define B11100010 226 +#define B11100011 227 +#define B11100100 228 +#define B11100101 229 +#define B11100110 230 +#define B11100111 231 +#define B11101000 232 +#define B11101001 233 +#define B11101010 234 +#define B11101011 235 +#define B11101100 236 +#define B11101101 237 +#define B11101110 238 +#define B11101111 239 +#define B11110000 240 +#define B11110001 241 +#define B11110010 242 +#define B11110011 243 +#define B11110100 244 +#define B11110101 245 +#define B11110110 246 +#define B11110111 247 +#define B11111000 248 +#define B11111001 249 +#define B11111010 250 +#define B11111011 251 +#define B11111100 252 +#define B11111101 253 +#define B11111110 254 +#define B11111111 255 + +#endif diff --git a/test/ardmake/hardware/cores/arduino/main.cpp b/test/ardmake/hardware/cores/arduino/main.cpp new file mode 100644 index 0000000..cc6e81d --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/main.cpp @@ -0,0 +1,14 @@ +#include + +int main(void) +{ + init(); + + setup(); + + for (;;) + loop(); + + return 0; +} + diff --git a/test/ardmake/hardware/cores/arduino/main.cxx b/test/ardmake/hardware/cores/arduino/main.cxx new file mode 100644 index 0000000..52351e4 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/main.cxx @@ -0,0 +1,12 @@ +int main(void) +{ + init(); + + setup(); + + for (;;) + loop(); + + return 0; +} + diff --git a/test/ardmake/hardware/cores/arduino/pins_arduino.c b/test/ardmake/hardware/cores/arduino/pins_arduino.c new file mode 100644 index 0000000..0c816e9 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/pins_arduino.c @@ -0,0 +1,465 @@ +/* + pins_arduino.c - pin definitions for the Arduino board + Part of Arduino / Wiring Lite + + Copyright (c) 2005 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id$ +*/ + +#include +#include "wiring_private.h" +#include "pins_arduino.h" + +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA8 & 168 / ARDUINO +// +// +-\/-+ +// PC6 1| |28 PC5 (AI 5) +// (D 0) PD0 2| |27 PC4 (AI 4) +// (D 1) PD1 3| |26 PC3 (AI 3) +// (D 2) PD2 4| |25 PC2 (AI 2) +// PWM+ (D 3) PD3 5| |24 PC1 (AI 1) +// (D 4) PD4 6| |23 PC0 (AI 0) +// VCC 7| |22 GND +// GND 8| |21 AREF +// PB6 9| |20 AVCC +// PB7 10| |19 PB5 (D 13) +// PWM+ (D 5) PD5 11| |18 PB4 (D 12) +// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM +// (D 7) PD7 13| |16 PB2 (D 10) PWM +// (D 8) PB0 14| |15 PB1 (D 9) PWM +// +----+ +// +// (PWM+ indicates the additional PWM pins on the ATmega168.) + +// ATMEL ATMEGA1280 / ARDUINO +// +// 0-7 PE0-PE7 works +// 8-13 PB0-PB5 works +// 14-21 PA0-PA7 works +// 22-29 PH0-PH7 works +// 30-35 PG5-PG0 works +// 36-43 PC7-PC0 works +// 44-51 PJ7-PJ0 works +// 52-59 PL7-PL0 works +// 60-67 PD7-PD0 works +// A0-A7 PF0-PF7 +// A8-A15 PK0-PK7 + +#define PA 1 +#define PB 2 +#define PC 3 +#define PD 4 +#define PE 5 +#define PF 6 +#define PG 7 +#define PH 8 +#define PJ 10 +#define PK 11 +#define PL 12 + + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + &DDRA, + &DDRB, + &DDRC, + &DDRD, + &DDRE, + &DDRF, + &DDRG, + &DDRH, + NOT_A_PORT, + &DDRJ, + &DDRK, + &DDRL, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + &PORTA, + &PORTB, + &PORTC, + &PORTD, + &PORTE, + &PORTF, + &PORTG, + &PORTH, + NOT_A_PORT, + &PORTJ, + &PORTK, + &PORTL, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PIN, + &PINA, + &PINB, + &PINC, + &PIND, + &PINE, + &PINF, + &PING, + &PINH, + NOT_A_PIN, + &PINJ, + &PINK, + &PINL, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + // PORTLIST + // ------------------------------------------- + PE , // PE 0 ** 0 ** USART0_RX + PE , // PE 1 ** 1 ** USART0_TX + PE , // PE 4 ** 2 ** PWM2 + PE , // PE 5 ** 3 ** PWM3 + PG , // PG 5 ** 4 ** PWM4 + PE , // PE 3 ** 5 ** PWM5 + PH , // PH 3 ** 6 ** PWM6 + PH , // PH 4 ** 7 ** PWM7 + PH , // PH 5 ** 8 ** PWM8 + PH , // PH 6 ** 9 ** PWM9 + PB , // PB 4 ** 10 ** PWM10 + PB , // PB 5 ** 11 ** PWM11 + PB , // PB 6 ** 12 ** PWM12 + PB , // PB 7 ** 13 ** PWM13 + PJ , // PJ 1 ** 14 ** USART3_TX + PJ , // PJ 0 ** 15 ** USART3_RX + PH , // PH 1 ** 16 ** USART2_TX + PH , // PH 0 ** 17 ** USART2_RX + PD , // PD 3 ** 18 ** USART1_TX + PD , // PD 2 ** 19 ** USART1_RX + PD , // PD 1 ** 20 ** I2C_SDA + PD , // PD 0 ** 21 ** I2C_SCL + PA , // PA 0 ** 22 ** D22 + PA , // PA 1 ** 23 ** D23 + PA , // PA 2 ** 24 ** D24 + PA , // PA 3 ** 25 ** D25 + PA , // PA 4 ** 26 ** D26 + PA , // PA 5 ** 27 ** D27 + PA , // PA 6 ** 28 ** D28 + PA , // PA 7 ** 29 ** D29 + PC , // PC 7 ** 30 ** D30 + PC , // PC 6 ** 31 ** D31 + PC , // PC 5 ** 32 ** D32 + PC , // PC 4 ** 33 ** D33 + PC , // PC 3 ** 34 ** D34 + PC , // PC 2 ** 35 ** D35 + PC , // PC 1 ** 36 ** D36 + PC , // PC 0 ** 37 ** D37 + PD , // PD 7 ** 38 ** D38 + PG , // PG 2 ** 39 ** D39 + PG , // PG 1 ** 40 ** D40 + PG , // PG 0 ** 41 ** D41 + PL , // PL 7 ** 42 ** D42 + PL , // PL 6 ** 43 ** D43 + PL , // PL 5 ** 44 ** D44 + PL , // PL 4 ** 45 ** D45 + PL , // PL 3 ** 46 ** D46 + PL , // PL 2 ** 47 ** D47 + PL , // PL 1 ** 48 ** D48 + PL , // PL 0 ** 49 ** D49 + PB , // PB 3 ** 50 ** SPI_MISO + PB , // PB 2 ** 51 ** SPI_MOSI + PB , // PB 1 ** 52 ** SPI_SCK + PB , // PB 0 ** 53 ** SPI_SS + PF , // PF 0 ** 54 ** A0 + PF , // PF 1 ** 55 ** A1 + PF , // PF 2 ** 56 ** A2 + PF , // PF 3 ** 57 ** A3 + PF , // PF 4 ** 58 ** A4 + PF , // PF 5 ** 59 ** A5 + PF , // PF 6 ** 60 ** A6 + PF , // PF 7 ** 61 ** A7 + PK , // PK 0 ** 62 ** A8 + PK , // PK 1 ** 63 ** A9 + PK , // PK 2 ** 64 ** A10 + PK , // PK 3 ** 65 ** A11 + PK , // PK 4 ** 66 ** A12 + PK , // PK 5 ** 67 ** A13 + PK , // PK 6 ** 68 ** A14 + PK , // PK 7 ** 69 ** A15 +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + // PIN IN PORT + // ------------------------------------------- + _BV( 0 ) , // PE 0 ** 0 ** USART0_RX + _BV( 1 ) , // PE 1 ** 1 ** USART0_TX + _BV( 4 ) , // PE 4 ** 2 ** PWM2 + _BV( 5 ) , // PE 5 ** 3 ** PWM3 + _BV( 5 ) , // PG 5 ** 4 ** PWM4 + _BV( 3 ) , // PE 3 ** 5 ** PWM5 + _BV( 3 ) , // PH 3 ** 6 ** PWM6 + _BV( 4 ) , // PH 4 ** 7 ** PWM7 + _BV( 5 ) , // PH 5 ** 8 ** PWM8 + _BV( 6 ) , // PH 6 ** 9 ** PWM9 + _BV( 4 ) , // PB 4 ** 10 ** PWM10 + _BV( 5 ) , // PB 5 ** 11 ** PWM11 + _BV( 6 ) , // PB 6 ** 12 ** PWM12 + _BV( 7 ) , // PB 7 ** 13 ** PWM13 + _BV( 1 ) , // PJ 1 ** 14 ** USART3_TX + _BV( 0 ) , // PJ 0 ** 15 ** USART3_RX + _BV( 1 ) , // PH 1 ** 16 ** USART2_TX + _BV( 0 ) , // PH 0 ** 17 ** USART2_RX + _BV( 3 ) , // PD 3 ** 18 ** USART1_TX + _BV( 2 ) , // PD 2 ** 19 ** USART1_RX + _BV( 1 ) , // PD 1 ** 20 ** I2C_SDA + _BV( 0 ) , // PD 0 ** 21 ** I2C_SCL + _BV( 0 ) , // PA 0 ** 22 ** D22 + _BV( 1 ) , // PA 1 ** 23 ** D23 + _BV( 2 ) , // PA 2 ** 24 ** D24 + _BV( 3 ) , // PA 3 ** 25 ** D25 + _BV( 4 ) , // PA 4 ** 26 ** D26 + _BV( 5 ) , // PA 5 ** 27 ** D27 + _BV( 6 ) , // PA 6 ** 28 ** D28 + _BV( 7 ) , // PA 7 ** 29 ** D29 + _BV( 7 ) , // PC 7 ** 30 ** D30 + _BV( 6 ) , // PC 6 ** 31 ** D31 + _BV( 5 ) , // PC 5 ** 32 ** D32 + _BV( 4 ) , // PC 4 ** 33 ** D33 + _BV( 3 ) , // PC 3 ** 34 ** D34 + _BV( 2 ) , // PC 2 ** 35 ** D35 + _BV( 1 ) , // PC 1 ** 36 ** D36 + _BV( 0 ) , // PC 0 ** 37 ** D37 + _BV( 7 ) , // PD 7 ** 38 ** D38 + _BV( 2 ) , // PG 2 ** 39 ** D39 + _BV( 1 ) , // PG 1 ** 40 ** D40 + _BV( 0 ) , // PG 0 ** 41 ** D41 + _BV( 7 ) , // PL 7 ** 42 ** D42 + _BV( 6 ) , // PL 6 ** 43 ** D43 + _BV( 5 ) , // PL 5 ** 44 ** D44 + _BV( 4 ) , // PL 4 ** 45 ** D45 + _BV( 3 ) , // PL 3 ** 46 ** D46 + _BV( 2 ) , // PL 2 ** 47 ** D47 + _BV( 1 ) , // PL 1 ** 48 ** D48 + _BV( 0 ) , // PL 0 ** 49 ** D49 + _BV( 3 ) , // PB 3 ** 50 ** SPI_MISO + _BV( 2 ) , // PB 2 ** 51 ** SPI_MOSI + _BV( 1 ) , // PB 1 ** 52 ** SPI_SCK + _BV( 0 ) , // PB 0 ** 53 ** SPI_SS + _BV( 0 ) , // PF 0 ** 54 ** A0 + _BV( 1 ) , // PF 1 ** 55 ** A1 + _BV( 2 ) , // PF 2 ** 56 ** A2 + _BV( 3 ) , // PF 3 ** 57 ** A3 + _BV( 4 ) , // PF 4 ** 58 ** A4 + _BV( 5 ) , // PF 5 ** 59 ** A5 + _BV( 6 ) , // PF 6 ** 60 ** A6 + _BV( 7 ) , // PF 7 ** 61 ** A7 + _BV( 0 ) , // PK 0 ** 62 ** A8 + _BV( 1 ) , // PK 1 ** 63 ** A9 + _BV( 2 ) , // PK 2 ** 64 ** A10 + _BV( 3 ) , // PK 3 ** 65 ** A11 + _BV( 4 ) , // PK 4 ** 66 ** A12 + _BV( 5 ) , // PK 5 ** 67 ** A13 + _BV( 6 ) , // PK 6 ** 68 ** A14 + _BV( 7 ) , // PK 7 ** 69 ** A15 +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + // TIMERS + // ------------------------------------------- + NOT_ON_TIMER , // PE 0 ** 0 ** USART0_RX + NOT_ON_TIMER , // PE 1 ** 1 ** USART0_TX + TIMER3B , // PE 4 ** 2 ** PWM2 + TIMER3C , // PE 5 ** 3 ** PWM3 + TIMER0B , // PG 5 ** 4 ** PWM4 + TIMER3A , // PE 3 ** 5 ** PWM5 + TIMER4A , // PH 3 ** 6 ** PWM6 + TIMER4B , // PH 4 ** 7 ** PWM7 + TIMER4C , // PH 5 ** 8 ** PWM8 + TIMER2B , // PH 6 ** 9 ** PWM9 + TIMER2A , // PB 4 ** 10 ** PWM10 + TIMER1A , // PB 5 ** 11 ** PWM11 + TIMER1B , // PB 6 ** 12 ** PWM12 + TIMER0A , // PB 7 ** 13 ** PWM13 + NOT_ON_TIMER , // PJ 1 ** 14 ** USART3_TX + NOT_ON_TIMER , // PJ 0 ** 15 ** USART3_RX + NOT_ON_TIMER , // PH 1 ** 16 ** USART2_TX + NOT_ON_TIMER , // PH 0 ** 17 ** USART2_RX + NOT_ON_TIMER , // PD 3 ** 18 ** USART1_TX + NOT_ON_TIMER , // PD 2 ** 19 ** USART1_RX + NOT_ON_TIMER , // PD 1 ** 20 ** I2C_SDA + NOT_ON_TIMER , // PD 0 ** 21 ** I2C_SCL + NOT_ON_TIMER , // PA 0 ** 22 ** D22 + NOT_ON_TIMER , // PA 1 ** 23 ** D23 + NOT_ON_TIMER , // PA 2 ** 24 ** D24 + NOT_ON_TIMER , // PA 3 ** 25 ** D25 + NOT_ON_TIMER , // PA 4 ** 26 ** D26 + NOT_ON_TIMER , // PA 5 ** 27 ** D27 + NOT_ON_TIMER , // PA 6 ** 28 ** D28 + NOT_ON_TIMER , // PA 7 ** 29 ** D29 + NOT_ON_TIMER , // PC 7 ** 30 ** D30 + NOT_ON_TIMER , // PC 6 ** 31 ** D31 + NOT_ON_TIMER , // PC 5 ** 32 ** D32 + NOT_ON_TIMER , // PC 4 ** 33 ** D33 + NOT_ON_TIMER , // PC 3 ** 34 ** D34 + NOT_ON_TIMER , // PC 2 ** 35 ** D35 + NOT_ON_TIMER , // PC 1 ** 36 ** D36 + NOT_ON_TIMER , // PC 0 ** 37 ** D37 + NOT_ON_TIMER , // PD 7 ** 38 ** D38 + NOT_ON_TIMER , // PG 2 ** 39 ** D39 + NOT_ON_TIMER , // PG 1 ** 40 ** D40 + NOT_ON_TIMER , // PG 0 ** 41 ** D41 + NOT_ON_TIMER , // PL 7 ** 42 ** D42 + NOT_ON_TIMER , // PL 6 ** 43 ** D43 + TIMER5C , // PL 5 ** 44 ** D44 + TIMER5B , // PL 4 ** 45 ** D45 + TIMER5A , // PL 3 ** 46 ** D46 + NOT_ON_TIMER , // PL 2 ** 47 ** D47 + NOT_ON_TIMER , // PL 1 ** 48 ** D48 + NOT_ON_TIMER , // PL 0 ** 49 ** D49 + NOT_ON_TIMER , // PB 3 ** 50 ** SPI_MISO + NOT_ON_TIMER , // PB 2 ** 51 ** SPI_MOSI + NOT_ON_TIMER , // PB 1 ** 52 ** SPI_SCK + NOT_ON_TIMER , // PB 0 ** 53 ** SPI_SS + NOT_ON_TIMER , // PF 0 ** 54 ** A0 + NOT_ON_TIMER , // PF 1 ** 55 ** A1 + NOT_ON_TIMER , // PF 2 ** 56 ** A2 + NOT_ON_TIMER , // PF 3 ** 57 ** A3 + NOT_ON_TIMER , // PF 4 ** 58 ** A4 + NOT_ON_TIMER , // PF 5 ** 59 ** A5 + NOT_ON_TIMER , // PF 6 ** 60 ** A6 + NOT_ON_TIMER , // PF 7 ** 61 ** A7 + NOT_ON_TIMER , // PK 0 ** 62 ** A8 + NOT_ON_TIMER , // PK 1 ** 63 ** A9 + NOT_ON_TIMER , // PK 2 ** 64 ** A10 + NOT_ON_TIMER , // PK 3 ** 65 ** A11 + NOT_ON_TIMER , // PK 4 ** 66 ** A12 + NOT_ON_TIMER , // PK 5 ** 67 ** A13 + NOT_ON_TIMER , // PK 6 ** 68 ** A14 + NOT_ON_TIMER , // PK 7 ** 69 ** A15 +}; +#else +// these arrays map port names (e.g. port B) to the +// appropriate addresses for various functions (e.g. reading +// and writing) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + &DDRB, + &DDRC, + &DDRD, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + &PORTB, + &PORTC, + &PORTD, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + &PINB, + &PINC, + &PIND, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + PD, /* 0 */ + PD, + PD, + PD, + PD, + PD, + PD, + PD, + PB, /* 8 */ + PB, + PB, + PB, + PB, + PB, + PC, /* 14 */ + PC, + PC, + PC, + PC, + PC, +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + _BV(0), /* 0, port D */ + _BV(1), + _BV(2), + _BV(3), + _BV(4), + _BV(5), + _BV(6), + _BV(7), + _BV(0), /* 8, port B */ + _BV(1), + _BV(2), + _BV(3), + _BV(4), + _BV(5), + _BV(0), /* 14, port C */ + _BV(1), + _BV(2), + _BV(3), + _BV(4), + _BV(5), +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, /* 0 - port D */ + NOT_ON_TIMER, + NOT_ON_TIMER, + // on the ATmega168, digital pin 3 has hardware pwm +#if defined(__AVR_ATmega8__) + NOT_ON_TIMER, +#else + TIMER2B, +#endif + NOT_ON_TIMER, + // on the ATmega168, digital pins 5 and 6 have hardware pwm +#if defined(__AVR_ATmega8__) + NOT_ON_TIMER, + NOT_ON_TIMER, +#else + TIMER0B, + TIMER0A, +#endif + NOT_ON_TIMER, + NOT_ON_TIMER, /* 8 - port B */ + TIMER1A, + TIMER1B, +#if defined(__AVR_ATmega8__) + TIMER2, +#else + TIMER2A, +#endif + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, /* 14 - port C */ + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, +}; +#endif diff --git a/test/ardmake/hardware/cores/arduino/pins_arduino.d b/test/ardmake/hardware/cores/arduino/pins_arduino.d new file mode 100644 index 0000000..aef7639 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/pins_arduino.d @@ -0,0 +1,24 @@ +ardmake/hardware/cores/arduino/pins_arduino.o ardmake/hardware/cores/arduino/pins_arduino.d: ardmake/hardware/cores/arduino/pins_arduino.c \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/ardmake/hardware/cores/arduino/pins_arduino.h b/test/ardmake/hardware/cores/arduino/pins_arduino.h new file mode 100644 index 0000000..bc931c5 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/pins_arduino.h @@ -0,0 +1,88 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define NOT_A_PIN 0 +#define NOT_A_PORT 0 + +#define NOT_ON_TIMER 0 +#define TIMER0A 1 +#define TIMER0B 2 +#define TIMER1A 3 +#define TIMER1B 4 +#define TIMER2 5 +#define TIMER2A 6 +#define TIMER2B 7 + +#define TIMER3A 8 +#define TIMER3B 9 +#define TIMER3C 10 +#define TIMER4A 11 +#define TIMER4B 12 +#define TIMER4C 13 +#define TIMER5A 14 +#define TIMER5B 15 +#define TIMER5C 16 + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +const static uint8_t SS = 53; +const static uint8_t MOSI = 51; +const static uint8_t MISO = 50; +const static uint8_t SCK = 52; +#else +const static uint8_t SS = 10; +const static uint8_t MOSI = 11; +const static uint8_t MISO = 12; +const static uint8_t SCK = 13; +#endif + +// On the ATmega1280, the addresses of some of the port registers are +// greater than 255, so we can't store them in uint8_t's. +extern const uint16_t PROGMEM port_to_mode_PGM[]; +extern const uint16_t PROGMEM port_to_input_PGM[]; +extern const uint16_t PROGMEM port_to_output_PGM[]; + +extern const uint8_t PROGMEM digital_pin_to_port_PGM[]; +// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[]; +extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[]; +extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; + +// Get the bit location within the hardware port of the given virtual pin. +// This comes from the pins_*.c file for the active board configuration. +// +// These perform slightly better as macros compared to inline functions +// +#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) ) +#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) ) +#define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) ) +#define analogInPinToBit(P) (P) +#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) ) +#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) ) +#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) ) + +#endif diff --git a/test/ardmake/hardware/cores/arduino/wiring.c b/test/ardmake/hardware/cores/arduino/wiring.c new file mode 100644 index 0000000..b90d07e --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring.c @@ -0,0 +1,289 @@ +/* + wiring.c - Partial implementation of the Wiring API for the ATmega8. + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id$ +*/ + +#include "wiring_private.h" + +// the prescaler is set so that timer0 ticks every 64 clock cycles, and the +// the overflow handler is called every 256 ticks. +#define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(64 * 256)) + +// the whole number of milliseconds per timer0 overflow +#define MILLIS_INC (MICROSECONDS_PER_TIMER0_OVERFLOW / 1000) + +// the fractional number of milliseconds per timer0 overflow. we shift right +// by three to fit these numbers into a byte. (for the clock speeds we care +// about - 8 and 16 MHz - this doesn't lose precision.) +#define FRACT_INC ((MICROSECONDS_PER_TIMER0_OVERFLOW % 1000) >> 3) +#define FRACT_MAX (1000 >> 3) + +volatile unsigned long timer0_overflow_count = 0; +volatile unsigned long timer0_millis = 0; +static unsigned char timer0_fract = 0; + +SIGNAL(TIMER0_OVF_vect) +{ + // copy these to local variables so they can be stored in registers + // (volatile variables must be read from memory on every access) + unsigned long m = timer0_millis; + unsigned char f = timer0_fract; + + m += MILLIS_INC; + f += FRACT_INC; + if (f >= FRACT_MAX) { + f -= FRACT_MAX; + m += 1; + } + + timer0_fract = f; + timer0_millis = m; + timer0_overflow_count++; +} + +unsigned long millis() +{ + unsigned long m; + uint8_t oldSREG = SREG; + + // disable interrupts while we read timer0_millis or we might get an + // inconsistent value (e.g. in the middle of a write to timer0_millis) + cli(); + m = timer0_millis; + SREG = oldSREG; + + return m; +} + +unsigned long micros() { + unsigned long m; + uint8_t oldSREG = SREG, t; + + cli(); + m = timer0_overflow_count; +#if defined(TCNT0) + t = TCNT0; +#elif defined(TCNT0L) + t = TCNT0L; +#else + #error TIMER 0 not defined +#endif + + +#ifdef TIFR0 + if ((TIFR0 & _BV(TOV0)) && (t < 255)) + m++; +#else + if ((TIFR & _BV(TOV0)) && (t < 255)) + m++; +#endif + + SREG = oldSREG; + + return ((m << 8) + t) * (64 / clockCyclesPerMicrosecond()); +} + +void delay(unsigned long ms) +{ + uint16_t start = (uint16_t)micros(); + + while (ms > 0) { + if (((uint16_t)micros() - start) >= 1000) { + ms--; + start += 1000; + } + } +} + +/* Delay for the given number of microseconds. Assumes a 8 or 16 MHz clock. */ +void delayMicroseconds(unsigned int us) +{ + // calling avrlib's delay_us() function with low values (e.g. 1 or + // 2 microseconds) gives delays longer than desired. + //delay_us(us); + +#if F_CPU >= 16000000L + // for the 16 MHz clock on most Arduino boards + + // for a one-microsecond delay, simply return. the overhead + // of the function call yields a delay of approximately 1 1/8 us. + if (--us == 0) + return; + + // the following loop takes a quarter of a microsecond (4 cycles) + // per iteration, so execute it four times for each microsecond of + // delay requested. + us <<= 2; + + // account for the time taken in the preceeding commands. + us -= 2; +#else + // for the 8 MHz internal clock on the ATmega168 + + // for a one- or two-microsecond delay, simply return. the overhead of + // the function calls takes more than two microseconds. can't just + // subtract two, since us is unsigned; we'd overflow. + if (--us == 0) + return; + if (--us == 0) + return; + + // the following loop takes half of a microsecond (4 cycles) + // per iteration, so execute it twice for each microsecond of + // delay requested. + us <<= 1; + + // partially compensate for the time taken by the preceeding commands. + // we can't subtract any more than this or we'd overflow w/ small delays. + us--; +#endif + + // busy wait + __asm__ __volatile__ ( + "1: sbiw %0,1" "\n\t" // 2 cycles + "brne 1b" : "=w" (us) : "0" (us) // 2 cycles + ); +} + +void init() +{ + // this needs to be called before setup() or some functions won't + // work there + sei(); + + // on the ATmega168, timer 0 is also used for fast hardware pwm + // (using phase-correct PWM would mean that timer 0 overflowed half as often + // resulting in different millis() behavior on the ATmega8 and ATmega168) +#if defined(TCCR0A) && defined(WGM01) + sbi(TCCR0A, WGM01); + sbi(TCCR0A, WGM00); +#endif + + // set timer 0 prescale factor to 64 +#if defined(__AVR_ATmega128__) + // CPU specific: different values for the ATmega128 + sbi(TCCR0, CS02); +#elif defined(TCCR0) && defined(CS01) && defined(CS00) + // this combination is for the standard atmega8 + sbi(TCCR0, CS01); + sbi(TCCR0, CS00); +#elif defined(TCCR0B) && defined(CS01) && defined(CS00) + // this combination is for the standard 168/328/1280/2560 + sbi(TCCR0B, CS01); + sbi(TCCR0B, CS00); +#elif defined(TCCR0A) && defined(CS01) && defined(CS00) + // this combination is for the __AVR_ATmega645__ series + sbi(TCCR0A, CS01); + sbi(TCCR0A, CS00); +#else + #error Timer 0 prescale factor 64 not set correctly +#endif + + // enable timer 0 overflow interrupt +#if defined(TIMSK) && defined(TOIE0) + sbi(TIMSK, TOIE0); +#elif defined(TIMSK0) && defined(TOIE0) + sbi(TIMSK0, TOIE0); +#else + #error Timer 0 overflow interrupt not set correctly +#endif + + // timers 1 and 2 are used for phase-correct hardware pwm + // this is better for motors as it ensures an even waveform + // note, however, that fast pwm mode can achieve a frequency of up + // 8 MHz (with a 16 MHz clock) at 50% duty cycle + + TCCR1B = 0; + + // set timer 1 prescale factor to 64 +#if defined(TCCR1B) && defined(CS11) && defined(CS10) + sbi(TCCR1B, CS11); + sbi(TCCR1B, CS10); +#elif defined(TCCR1) && defined(CS11) && defined(CS10) + sbi(TCCR1, CS11); + sbi(TCCR1, CS10); +#endif + // put timer 1 in 8-bit phase correct pwm mode +#if defined(TCCR1A) && defined(WGM10) + sbi(TCCR1A, WGM10); +#elif defined(TCCR1) + #warning this needs to be finished +#endif + + // set timer 2 prescale factor to 64 +#if defined(TCCR2) && defined(CS22) + sbi(TCCR2, CS22); +#elif defined(TCCR2B) && defined(CS22) + sbi(TCCR2B, CS22); +#else + #warning Timer 2 not finished (may not be present on this CPU) +#endif + + // configure timer 2 for phase correct pwm (8-bit) +#if defined(TCCR2) && defined(WGM20) + sbi(TCCR2, WGM20); +#elif defined(TCCR2A) && defined(WGM20) + sbi(TCCR2A, WGM20); +#else + #warning Timer 2 not finished (may not be present on this CPU) +#endif + +#if defined(TCCR3B) && defined(CS31) && defined(WGM30) + sbi(TCCR3B, CS31); // set timer 3 prescale factor to 64 + sbi(TCCR3B, CS30); + sbi(TCCR3A, WGM30); // put timer 3 in 8-bit phase correct pwm mode +#endif + +#if defined(TCCR4B) && defined(CS41) && defined(WGM40) + sbi(TCCR4B, CS41); // set timer 4 prescale factor to 64 + sbi(TCCR4B, CS40); + sbi(TCCR4A, WGM40); // put timer 4 in 8-bit phase correct pwm mode +#endif + +#if defined(TCCR5B) && defined(CS51) && defined(WGM50) + sbi(TCCR5B, CS51); // set timer 5 prescale factor to 64 + sbi(TCCR5B, CS50); + sbi(TCCR5A, WGM50); // put timer 5 in 8-bit phase correct pwm mode +#endif + +#if defined(ADCSRA) + // set a2d prescale factor to 128 + // 16 MHz / 128 = 125 KHz, inside the desired 50-200 KHz range. + // XXX: this will not work properly for other clock speeds, and + // this code should use F_CPU to determine the prescale factor. + sbi(ADCSRA, ADPS2); + sbi(ADCSRA, ADPS1); + sbi(ADCSRA, ADPS0); + + // enable a2d conversions + sbi(ADCSRA, ADEN); +#endif + + // the bootloader connects pins 0 and 1 to the USART; disconnect them + // here so they can be used as normal digital i/o; they will be + // reconnected in Serial.begin() +#if defined(UCSRB) + UCSRB = 0; +#elif defined(UCSR0B) + UCSR0B = 0; +#endif +} diff --git a/test/ardmake/hardware/cores/arduino/wiring.d b/test/ardmake/hardware/cores/arduino/wiring.d new file mode 100644 index 0000000..ea1b80f --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring.d @@ -0,0 +1,22 @@ +ardmake/hardware/cores/arduino/wiring.o ardmake/hardware/cores/arduino/wiring.d: ardmake/hardware/cores/arduino/wiring.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h diff --git a/test/ardmake/hardware/cores/arduino/wiring.h b/test/ardmake/hardware/cores/arduino/wiring.h new file mode 100644 index 0000000..e29959b --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring.h @@ -0,0 +1,135 @@ +/* + wiring.h - Partial implementation of the Wiring API for the ATmega8. + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id$ +*/ + +#ifndef Wiring_h +#define Wiring_h + +#include +#include +#include "binary.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +#define HIGH 0x1 +#define LOW 0x0 + +#define INPUT 0x0 +#define OUTPUT 0x1 + +#define true 0x1 +#define false 0x0 + +#define PI 3.1415926535897932384626433832795 +#define HALF_PI 1.5707963267948966192313216916398 +#define TWO_PI 6.283185307179586476925286766559 +#define DEG_TO_RAD 0.017453292519943295769236907684886 +#define RAD_TO_DEG 57.295779513082320876798154814105 + +#define SERIAL 0x0 +#define DISPLAY 0x1 + +#define LSBFIRST 0 +#define MSBFIRST 1 + +#define CHANGE 1 +#define FALLING 2 +#define RISING 3 + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +#define INTERNAL1V1 2 +#define INTERNAL2V56 3 +#else +#define INTERNAL 3 +#endif +#define DEFAULT 1 +#define EXTERNAL 0 + +// undefine stdlib's abs if encountered +#ifdef abs +#undef abs +#endif + +#define min(a,b) ((a)<(b)?(a):(b)) +#define max(a,b) ((a)>(b)?(a):(b)) +#define abs(x) ((x)>0?(x):-(x)) +#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) +#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) +#define radians(deg) ((deg)*DEG_TO_RAD) +#define degrees(rad) ((rad)*RAD_TO_DEG) +#define sq(x) ((x)*(x)) + +#define interrupts() sei() +#define noInterrupts() cli() + +#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) +#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) ) +#define microsecondsToClockCycles(a) ( ((a) * (F_CPU / 1000L)) / 1000L ) + +#define lowByte(w) ((uint8_t) ((w) & 0xff)) +#define highByte(w) ((uint8_t) ((w) >> 8)) + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + + +typedef unsigned int word; + +#define bit(b) (1UL << (b)) + +typedef uint8_t boolean; +typedef uint8_t byte; + +void init(void); + +void pinMode(uint8_t, uint8_t); +void digitalWrite(uint8_t, uint8_t); +int digitalRead(uint8_t); +int analogRead(uint8_t); +void analogReference(uint8_t mode); +void analogWrite(uint8_t, int); + +unsigned long millis(void); +unsigned long micros(void); +void delay(unsigned long); +void delayMicroseconds(unsigned int us); +unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout); + +void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val); +uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); + +void attachInterrupt(uint8_t, void (*)(void), int mode); +void detachInterrupt(uint8_t); + +void setup(void); +void loop(void); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif diff --git a/test/ardmake/hardware/cores/arduino/wiring_analog.c b/test/ardmake/hardware/cores/arduino/wiring_analog.c new file mode 100644 index 0000000..d248f4c --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_analog.c @@ -0,0 +1,259 @@ +/* + wiring_analog.c - analog input and output + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + Modified 28 September 2010 by Mark Sproul + + $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ +*/ + +#include "wiring_private.h" +#include "pins_arduino.h" + +uint8_t analog_reference = DEFAULT; + +void analogReference(uint8_t mode) +{ + // can't actually set the register here because the default setting + // will connect AVCC and the AREF pin, which would cause a short if + // there's something connected to AREF. + analog_reference = mode; +} + +int analogRead(uint8_t pin) +{ + uint8_t low, high; + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) + if (pin >= 54) pin -= 54; // allow for channel or pin numbers +#else + if (pin >= 14) pin -= 14; // allow for channel or pin numbers +#endif + +#if defined(ADCSRB) && defined(MUX5) + // the MUX5 bit of ADCSRB selects whether we're reading from channels + // 0 to 7 (MUX5 low) or 8 to 15 (MUX5 high). + ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5); +#endif + + // set the analog reference (high two bits of ADMUX) and select the + // channel (low 4 bits). this also sets ADLAR (left-adjust result) + // to 0 (the default). +#if defined(ADMUX) + ADMUX = (analog_reference << 6) | (pin & 0x07); +#endif + + // without a delay, we seem to read from the wrong channel + //delay(1); + +#if defined(ADCSRA) && defined(ADCL) + // start the conversion + sbi(ADCSRA, ADSC); + + // ADSC is cleared when the conversion finishes + while (bit_is_set(ADCSRA, ADSC)); + + // we have to read ADCL first; doing so locks both ADCL + // and ADCH until ADCH is read. reading ADCL second would + // cause the results of each conversion to be discarded, + // as ADCL and ADCH would be locked when it completed. + low = ADCL; + high = ADCH; +#else + // we dont have an ADC, return 0 + low = 0; + high = 0; +#endif + + // combine the two bytes + return (high << 8) | low; +} + +// Right now, PWM output only works on the pins with +// hardware support. These are defined in the appropriate +// pins_*.c file. For the rest of the pins, we default +// to digital output. +void analogWrite(uint8_t pin, int val) +{ + // We need to make sure the PWM output is enabled for those pins + // that support it, as we turn it off when digitally reading or + // writing with them. Also, make sure the pin is in output mode + // for consistenty with Wiring, which doesn't require a pinMode + // call for the analog output pins. + pinMode(pin, OUTPUT); + if (val == 0) + { + digitalWrite(pin, LOW); + } + else if (val == 255) + { + digitalWrite(pin, HIGH); + } + else + { + switch(digitalPinToTimer(pin)) + { + // XXX fix needed for atmega8 + #if defined(TCCR0) && defined(COM00) && !defined(__AVR_ATmega8__) + case TIMER0A: + // connect pwm to pin on timer 0 + sbi(TCCR0, COM00); + OCR0 = val; // set pwm duty + break; + #endif + + #if defined(TCCR0A) && defined(COM0A1) + case TIMER0A: + // connect pwm to pin on timer 0, channel A + sbi(TCCR0A, COM0A1); + OCR0A = val; // set pwm duty + break; + #endif + + #if defined(TCCR0A) && defined(COM0B1) + case TIMER0B: + // connect pwm to pin on timer 0, channel B + sbi(TCCR0A, COM0B1); + OCR0B = val; // set pwm duty + break; + #endif + + #if defined(TCCR1A) && defined(COM1A1) + case TIMER1A: + // connect pwm to pin on timer 1, channel A + sbi(TCCR1A, COM1A1); + OCR1A = val; // set pwm duty + break; + #endif + + #if defined(TCCR1A) && defined(COM1B1) + case TIMER1B: + // connect pwm to pin on timer 1, channel B + sbi(TCCR1A, COM1B1); + OCR1B = val; // set pwm duty + break; + #endif + + #if defined(TCCR2) && defined(COM21) + case TIMER2: + // connect pwm to pin on timer 2 + sbi(TCCR2, COM21); + OCR2 = val; // set pwm duty + break; + #endif + + #if defined(TCCR2A) && defined(COM2A1) + case TIMER2A: + // connect pwm to pin on timer 2, channel A + sbi(TCCR2A, COM2A1); + OCR2A = val; // set pwm duty + break; + #endif + + #if defined(TCCR2A) && defined(COM2B1) + case TIMER2B: + // connect pwm to pin on timer 2, channel B + sbi(TCCR2A, COM2B1); + OCR2B = val; // set pwm duty + break; + #endif + + #if defined(TCCR3A) && defined(COM3A1) + case TIMER3A: + // connect pwm to pin on timer 3, channel A + sbi(TCCR3A, COM3A1); + OCR3A = val; // set pwm duty + break; + #endif + + #if defined(TCCR3A) && defined(COM3B1) + case TIMER3B: + // connect pwm to pin on timer 3, channel B + sbi(TCCR3A, COM3B1); + OCR3B = val; // set pwm duty + break; + #endif + + #if defined(TCCR3A) && defined(COM3C1) + case TIMER3C: + // connect pwm to pin on timer 3, channel C + sbi(TCCR3A, COM3C1); + OCR3C = val; // set pwm duty + break; + #endif + + #if defined(TCCR4A) && defined(COM4A1) + case TIMER4A: + // connect pwm to pin on timer 4, channel A + sbi(TCCR4A, COM4A1); + OCR4A = val; // set pwm duty + break; + #endif + + #if defined(TCCR4A) && defined(COM4B1) + case TIMER4B: + // connect pwm to pin on timer 4, channel B + sbi(TCCR4A, COM4B1); + OCR4B = val; // set pwm duty + break; + #endif + + #if defined(TCCR4A) && defined(COM4C1) + case TIMER4C: + // connect pwm to pin on timer 4, channel C + sbi(TCCR4A, COM4C1); + OCR4C = val; // set pwm duty + break; + #endif + + #if defined(TCCR5A) && defined(COM5A1) + case TIMER5A: + // connect pwm to pin on timer 5, channel A + sbi(TCCR5A, COM5A1); + OCR5A = val; // set pwm duty + break; + #endif + + #if defined(TCCR5A) && defined(COM5B1) + case TIMER5B: + // connect pwm to pin on timer 5, channel B + sbi(TCCR5A, COM5B1); + OCR5B = val; // set pwm duty + break; + #endif + + #if defined(TCCR5A) && defined(COM5C1) + case TIMER5C: + // connect pwm to pin on timer 5, channel C + sbi(TCCR5A, COM5C1); + OCR5C = val; // set pwm duty + break; + #endif + + case NOT_ON_TIMER: + default: + if (val < 128) { + digitalWrite(pin, LOW); + } else { + digitalWrite(pin, HIGH); + } + } + } +} diff --git a/test/ardmake/hardware/cores/arduino/wiring_analog.d b/test/ardmake/hardware/cores/arduino/wiring_analog.d new file mode 100644 index 0000000..43e0c9c --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_analog.d @@ -0,0 +1,24 @@ +ardmake/hardware/cores/arduino/wiring_analog.o ardmake/hardware/cores/arduino/wiring_analog.d: ardmake/hardware/cores/arduino/wiring_analog.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/ardmake/hardware/cores/arduino/wiring_digital.c b/test/ardmake/hardware/cores/arduino/wiring_digital.c new file mode 100644 index 0000000..0949da4 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_digital.c @@ -0,0 +1,166 @@ +/* + wiring_digital.c - digital input and output functions + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + Modified 28 September 2010 by Mark Sproul + + $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ +*/ + +#include "wiring_private.h" +#include "pins_arduino.h" + +void pinMode(uint8_t pin, uint8_t mode) +{ + uint8_t bit = digitalPinToBitMask(pin); + uint8_t port = digitalPinToPort(pin); + volatile uint8_t *reg; + + if (port == NOT_A_PIN) return; + + // JWS: can I let the optimizer do this? + reg = portModeRegister(port); + + if (mode == INPUT) { + uint8_t oldSREG = SREG; + cli(); + *reg &= ~bit; + SREG = oldSREG; + } else { + uint8_t oldSREG = SREG; + cli(); + *reg |= bit; + SREG = oldSREG; + } +} + +// Forcing this inline keeps the callers from having to push their own stuff +// on the stack. It is a good performance win and only takes 1 more byte per +// user than calling. (It will take more bytes on the 168.) +// +// But shouldn't this be moved into pinMode? Seems silly to check and do on +// each digitalread or write. +// +// Mark Sproul: +// - Removed inline. Save 170 bytes on atmega1280 +// - changed to a switch statment; added 32 bytes but much easier to read and maintain. +// - Added more #ifdefs, now compiles for atmega645 +// +//static inline void turnOffPWM(uint8_t timer) __attribute__ ((always_inline)); +//static inline void turnOffPWM(uint8_t timer) +static void turnOffPWM(uint8_t timer) +{ + switch (timer) + { + #if defined(TCCR1A) && defined(COM1A1) + case TIMER1A: cbi(TCCR1A, COM1A1); break; + #endif + #if defined(TCCR1A) && defined(COM1B1) + case TIMER1B: cbi(TCCR1A, COM1B1); break; + #endif + + #if defined(TCCR2) && defined(COM21) + case TIMER2: cbi(TCCR2, COM21); break; + #endif + + #if defined(TCCR0A) && defined(COM0A1) + case TIMER0A: cbi(TCCR0A, COM0A1); break; + #endif + + #if defined(TIMER0B) && defined(COM0B1) + case TIMER0B: cbi(TCCR0A, COM0B1); break; + #endif + #if defined(TCCR2A) && defined(COM2A1) + case TIMER2A: cbi(TCCR2A, COM2A1); break; + #endif + #if defined(TCCR2A) && defined(COM2B1) + case TIMER2B: cbi(TCCR2A, COM2B1); break; + #endif + + #if defined(TCCR3A) && defined(COM3A1) + case TIMER3A: cbi(TCCR3A, COM3A1); break; + #endif + #if defined(TCCR3A) && defined(COM3B1) + case TIMER3B: cbi(TCCR3A, COM3B1); break; + #endif + #if defined(TCCR3A) && defined(COM3C1) + case TIMER3C: cbi(TCCR3A, COM3C1); break; + #endif + + #if defined(TCCR4A) && defined(COM4A1) + case TIMER4A: cbi(TCCR4A, COM4A1); break; + #endif + #if defined(TCCR4A) && defined(COM4B1) + case TIMER4B: cbi(TCCR4A, COM4B1); break; + #endif + #if defined(TCCR4A) && defined(COM4C1) + case TIMER4C: cbi(TCCR4A, COM4C1); break; + #endif + #if defined(TCCR5A) + case TIMER5A: cbi(TCCR5A, COM5A1); break; + case TIMER5B: cbi(TCCR5A, COM5B1); break; + case TIMER5C: cbi(TCCR5A, COM5C1); break; + #endif + } +} + +void digitalWrite(uint8_t pin, uint8_t val) +{ + uint8_t timer = digitalPinToTimer(pin); + uint8_t bit = digitalPinToBitMask(pin); + uint8_t port = digitalPinToPort(pin); + volatile uint8_t *out; + + if (port == NOT_A_PIN) return; + + // If the pin that support PWM output, we need to turn it off + // before doing a digital write. + if (timer != NOT_ON_TIMER) turnOffPWM(timer); + + out = portOutputRegister(port); + + if (val == LOW) { + uint8_t oldSREG = SREG; + cli(); + *out &= ~bit; + SREG = oldSREG; + } else { + uint8_t oldSREG = SREG; + cli(); + *out |= bit; + SREG = oldSREG; + } +} + +int digitalRead(uint8_t pin) +{ + uint8_t timer = digitalPinToTimer(pin); + uint8_t bit = digitalPinToBitMask(pin); + uint8_t port = digitalPinToPort(pin); + + if (port == NOT_A_PIN) return LOW; + + // If the pin that support PWM output, we need to turn it off + // before getting a digital reading. + if (timer != NOT_ON_TIMER) turnOffPWM(timer); + + if (*portInputRegister(port) & bit) return HIGH; + return LOW; +} diff --git a/test/ardmake/hardware/cores/arduino/wiring_digital.d b/test/ardmake/hardware/cores/arduino/wiring_digital.d new file mode 100644 index 0000000..269f2ff --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_digital.d @@ -0,0 +1,24 @@ +ardmake/hardware/cores/arduino/wiring_digital.o ardmake/hardware/cores/arduino/wiring_digital.d: ardmake/hardware/cores/arduino/wiring_digital.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/ardmake/hardware/cores/arduino/wiring_private.h b/test/ardmake/hardware/cores/arduino/wiring_private.h new file mode 100644 index 0000000..11f6f00 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_private.h @@ -0,0 +1,68 @@ +/* + wiring_private.h - Internal header file. + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ +*/ + +#ifndef WiringPrivate_h +#define WiringPrivate_h + +#include +#include +#include +#include +#include + +#include "wiring.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +#ifndef cbi +#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) +#endif +#ifndef sbi +#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) +#endif + +#define EXTERNAL_INT_0 0 +#define EXTERNAL_INT_1 1 +#define EXTERNAL_INT_2 2 +#define EXTERNAL_INT_3 3 +#define EXTERNAL_INT_4 4 +#define EXTERNAL_INT_5 5 +#define EXTERNAL_INT_6 6 +#define EXTERNAL_INT_7 7 + +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +#define EXTERNAL_NUM_INTERRUPTS 8 +#else +#define EXTERNAL_NUM_INTERRUPTS 2 +#endif + +typedef void (*voidFuncPtr)(void); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif diff --git a/test/ardmake/hardware/cores/arduino/wiring_pulse.c b/test/ardmake/hardware/cores/arduino/wiring_pulse.c new file mode 100644 index 0000000..0d96886 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_pulse.c @@ -0,0 +1,69 @@ +/* + wiring_pulse.c - pulseIn() function + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ +*/ + +#include "wiring_private.h" +#include "pins_arduino.h" + +/* Measures the length (in microseconds) of a pulse on the pin; state is HIGH + * or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds + * to 3 minutes in length, but must be called at least a few dozen microseconds + * before the start of the pulse. */ +unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout) +{ + // cache the port and bit of the pin in order to speed up the + // pulse width measuring loop and achieve finer resolution. calling + // digitalRead() instead yields much coarser resolution. + uint8_t bit = digitalPinToBitMask(pin); + uint8_t port = digitalPinToPort(pin); + uint8_t stateMask = (state ? bit : 0); + unsigned long width = 0; // keep initialization out of time critical area + + // convert the timeout from microseconds to a number of times through + // the initial loop; it takes 16 clock cycles per iteration. + unsigned long numloops = 0; + unsigned long maxloops = microsecondsToClockCycles(timeout) / 16; + + // wait for any previous pulse to end + while ((*portInputRegister(port) & bit) == stateMask) + if (numloops++ == maxloops) + return 0; + + // wait for the pulse to start + while ((*portInputRegister(port) & bit) != stateMask) + if (numloops++ == maxloops) + return 0; + + // wait for the pulse to stop + while ((*portInputRegister(port) & bit) == stateMask) { + if (numloops++ == maxloops) + return 0; + width++; + } + + // convert the reading to microseconds. The loop has been determined + // to be 20 clock cycles long and have about 16 clocks between the edge + // and the start of the loop. There will be some error introduced by + // the interrupt handlers. + return clockCyclesToMicroseconds(width * 21 + 16); +} diff --git a/test/ardmake/hardware/cores/arduino/wiring_pulse.d b/test/ardmake/hardware/cores/arduino/wiring_pulse.d new file mode 100644 index 0000000..da7dd53 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_pulse.d @@ -0,0 +1,24 @@ +ardmake/hardware/cores/arduino/wiring_pulse.o ardmake/hardware/cores/arduino/wiring_pulse.d: ardmake/hardware/cores/arduino/wiring_pulse.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h \ + ardmake/hardware/cores/arduino/pins_arduino.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/pgmspace.h diff --git a/test/ardmake/hardware/cores/arduino/wiring_shift.c b/test/ardmake/hardware/cores/arduino/wiring_shift.c new file mode 100644 index 0000000..cfe7867 --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_shift.c @@ -0,0 +1,55 @@ +/* + wiring_shift.c - shiftOut() function + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2005-2006 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ +*/ + +#include "wiring_private.h" + +uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { + uint8_t value = 0; + uint8_t i; + + for (i = 0; i < 8; ++i) { + digitalWrite(clockPin, HIGH); + if (bitOrder == LSBFIRST) + value |= digitalRead(dataPin) << i; + else + value |= digitalRead(dataPin) << (7 - i); + digitalWrite(clockPin, LOW); + } + return value; +} + +void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) +{ + uint8_t i; + + for (i = 0; i < 8; i++) { + if (bitOrder == LSBFIRST) + digitalWrite(dataPin, !!(val & (1 << i))); + else + digitalWrite(dataPin, !!(val & (1 << (7 - i)))); + + digitalWrite(clockPin, HIGH); + digitalWrite(clockPin, LOW); + } +} diff --git a/test/ardmake/hardware/cores/arduino/wiring_shift.d b/test/ardmake/hardware/cores/arduino/wiring_shift.d new file mode 100644 index 0000000..1186d5b --- /dev/null +++ b/test/ardmake/hardware/cores/arduino/wiring_shift.d @@ -0,0 +1,22 @@ +ardmake/hardware/cores/arduino/wiring_shift.o ardmake/hardware/cores/arduino/wiring_shift.d: ardmake/hardware/cores/arduino/wiring_shift.c \ + ardmake/hardware/cores/arduino/wiring_private.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/io.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/sfr_defs.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/inttypes.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdint.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/iom328p.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/portpins.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/common.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/version.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/fuse.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/lock.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/interrupt.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/util/delay_basic.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdio.h \ + /usr/lib/gcc/avr/4.3.5/include/stdarg.h \ + /usr/lib/gcc/avr/4.3.5/include/stddef.h \ + ardmake/hardware/cores/arduino/wiring.h \ + /usr/lib/gcc/avr/4.3.5/../../../avr/include/stdlib.h \ + ardmake/hardware/cores/arduino/binary.h diff --git a/test/ardmake/hardware/firmwares/MEGA-dfu_and_usbserial_combined.hex b/test/ardmake/hardware/firmwares/MEGA-dfu_and_usbserial_combined.hex new file mode 100644 index 0000000..e22196c --- /dev/null +++ b/test/ardmake/hardware/firmwares/MEGA-dfu_and_usbserial_combined.hex @@ -0,0 +1,234 @@ +:20000000A2C00000BBC00000B9C00000B7C00000B5C00000B3C00000B1C00000AFC000004B +:20002000ADC00000ABC00000A9C000005AC400001EC40000A3C00000A1C000009FC000005C +:200040009DC000009BC0000099C0000097C0000095C0000093C0000091C0000014C100006A +:200060008DC000008BC0000089C0000087C0000085C0000083C0000081C000007FC0000050 +:200080007DC000007BC0000079C0000077C0000075C0000073C000001201100102000008E2 +:2000A0004123100001000102DC0109023E00020100C0320904000001020201000524000170 +:2000C00010042402060524060001070582030800FF09040100020A000000070504024000AC +:2000E0000107058302400001040309043203410072006400750069006E006F0020002800CA +:200100007700770077002E00610072006400750069006E006F002E0063006300290000003D +:200120002403410072006400750069006E006F0020004D00650067006100200032003500A5 +:2001400036003000000011241FBECFEFD2E0DEBFCDBF11E0A0E0B1E0E0EDFFE002C0059089 +:200160000D92A631B107D9F712E0A6E1B1E001C01D92AF32B107E1F7F1D028C741CF9C0139 +:20018000DC01AE57BF4FED91FC91119741911196FC93EE9380589F4FE817F90711F42D93A9 +:2001A0003C939FB7F894F901EC57FF4F8081815080839FBF842F0895DF92EF92FF920F935B +:2001C0001F93FC018489813019F0823021F405C040E3D42E04C0DD2402C030E2D32E838952 +:2001E000823011F488E0D82A8589873031F0883031F0863031F482E003C084E001C086E094 +:20020000D82A1092C9001092C8001092CA00E784F0880189128980E0E81681EEF80680E068 +:20022000080780E0180719F420E130E00FC0C801B701969587957795679560587B47814E2A +:200240009F4FA8019701A0D6215030403093CD002093CC00D092CA0080E0E81681EEF80612 +:2002600080E0080780E0180711F082E001C080E08093C80088E98093C9001F910F91FF9005 +:20028000EF90DF9008951F920F920FB60F9211242F938F939F93EF93FF939091CE008EB38C +:2002A0008430F1F4E0919901F0919A019083E0919901F0919A01CF01019690939A0180930C +:2002C00099018959914021F489E191E0928381839FB7F89480919D018F5F80939D019FBF3A +:2002E000FF91EF919F918F912F910F900FBE0F901F901895FC01858580FF02C05F9808959B +:200300005F9A089580E091E0D5C580E091E088C584B7877F84BF28E10FB6F89420936000CD +:20032000109260000FBE87E690E09093CD008093CC0086E08093CA001092C8002093C90019 +:20034000539A5A9A8AB180638AB98BB180638BB983D284E085BD5F9A579A08950F931F9322 +:20036000CF93DF93D5DF2FB7F8948EE991E090931F0280931E0290932102809320022FBFBB +:200380002FB7F89489E191E090939A018093990190939C0180939B012FBF7894CEE9D1E0D4 +:2003A00003E08FB7F894909122028FBF903809F180E091E0ABD497FD1CC0E0911E02F09161 +:2003C0001F028083E0911E02F0911F02CF01019690931F0280931E028E51924011F4D283DD +:2003E000C1839FB7F894809122028F5F809322029FBF8FB7F89410919D018FBFA89902C0BD +:20040000113678F1A89A80919D01882361F05D980093160108C089E191E0B1DE682F80E077 +:2004200091E0DAD411501123B1F780911601882351F0809116018150809316018091160101 +:20044000882309F45D9A80911701882351F08091170181508093170180911701882309F4F2 +:200460005C9A8FB7F894909122028FBF992369F08EE991E084DE982F8091C80085FFFCCFD3 +:200480009093CE005C980093170180E091E095D42AD487CFDA01923049F0933061F0913093 +:2004A000F9F4E8E9F0E022E130E01EC0EAEAF0E02EE330E019C0813049F0813018F08230CA +:2004C00079F408C0E8EEF0E0849107C0ECEEF0E0849103C0E0E2F1E08491282F30E004C010 +:2004E000E0E0F0E020E030E0ED93FC93C901089528E030E040E003C04F5F220F331F28177B +:200500003907D0F3842F8295807F08958093E9008091EB0081608093EB001092ED00609319 +:20052000EC004093ED008091EE00881F8827881F08951092F40090E09093E9001092F000D2 +:200540001092E8001092ED008091EB008E7F8093EB009F5F953081F70895809127028823BE +:200560008CF403C08EB38823B1F08091E80082FFF9CF8091E8008B778093E80008958EB395 +:20058000882349F08091E80080FFF9CF8091E8008E778093E800089594E68091EC0080FFAB +:2005A00005C08091E80080FF05C023C08091E80082FD1FC08EB3882311F482E008958EB3CE +:2005C000853011F483E008958091EB0085FF02C081E008958091E10082FFDFCF8091E1000E +:2005E0008B7F8093E100992311F484E008959150D4CF80E008959C0140912D0250912E020C +:200600004617570718F4F90120E038C06115710511F0AB01F8CF8091E8008E778093E800C8 +:2006200040E050E0F0CF8091E80083FF02C081E008958091E80082FD2DC08EB3882381F1AD +:200640008EB3853079F18091E80080FF17C09091F20006C081918093F100415050409F5FDD +:200660004115510511F09830A8F320E0983009F421E08091E8008E778093E80041155105FF +:2006800091F6222381F606C08EB3882349F08EB3853041F08091E80082FFF6CF80E00895C9 +:2006A00082E0089583E008959C0140912D0250912E024617570710F490E03BC06115710577 +:2006C00011F0AB01F9CF8091E8008E778093E80040E050E0F1CF8091E80083FF02C081E0FE +:2006E00008958091E80082FD30C08EB3882399F18EB3853091F18091E80080FF1AC08091A4 +:20070000F20009C0F9012F5F3F4FE491E093F100415050408F5F4115510511F0883090F338 +:2007200090E0883009F491E08091E8008E778093E8004115510579F6992369F606C08EB3ED +:20074000882349F08EB3853041F08091E80082FFF6CF80E0089582E0089583E008959C01B6 +:200760006115710529F48091E8008B778093E800F90120C08091E80083FF02C081E0089565 +:200780008EB3882339F18EB3853031F18091E80082FFF0CF06C08091F100819361507040B5 +:2007A00021F08091F2008823B1F78091E8008B778093E80061157105E9F606C08EB388235F +:2007C00049F08EB3853041F08091E80080FFF6CF80E0089582E0089583E0089542D044D05A +:2007E0001EBA10922502109224021092230284E089BD89B5826089BD09B400FEFDCF809121 +:20080000D800982F9F779093D80080688093D800809163008E7F809363008091D8008F7D69 +:200820008093D8008091E0008E7F8093E0008091E1008E7F8093E1008091E2008160809302 +:20084000E2008091E100877F8093E1008091E20088608093E2000895C1DF81E08093260221 +:2008600008951092E20008951092E10008951F920F920FB60F9211241F932F933F934F9385 +:200880005F936F937F938F939F93AF93BF93EF93FF93E9EEF0E0108117701082E0EFF0E066 +:2008A0008081877F80837894C3D0F894A9EEB0E01C92E0EFF0E08081886080831C93FF9164 +:2008C000EF91BF91AF919F918F917F916F915F914F913F912F911F910F900FBE0F901F90DE +:2008E00018951F920F920FB60F9211242F933F934F935F936F937F938F939F93AF93BF93FA +:20090000EF93FF938091E10080FF1BC08091E20080FF17C08091E1008E7F8093E10080912A +:20092000E2008E7F8093E2008091E20080618093E2008091D80080628093D80019BC1EBAA7 +:20094000D1D18091E10084FF29C08091E20084FF25C084E089BD89B5826089BD09B400FE71 +:20096000FDCF8091D8008F7D8093D8008091E1008F7E8093E1008091E2008F7E8093E200E3 +:200980008091E20081608093E20080912502882311F481E001C084E08EBBA4D18091E10070 +:2009A00083FF27C08091E20083FF23C08091E100877F8093E10082E08EBB10922502809105 +:2009C000E1008E7F8093E1008091E2008E7F8093E2008091E20080618093E200AADD80E090 +:2009E00060E042E093DD8091F00088608093F00079D18091E10082FF0AC08091E20082FF3E +:200A000006C08091E1008B7F8093E1006BD1FF91EF91BF91AF919F918F917F916F915F91F4 +:200A20004F913F912F910F900FBE0F901F9018951F93DF93CF93CDB7DEB7AC970FB6F894AC +:200A4000DEBF0FBECDBFE7E2F2E08091F100819322E0EF32F207C9F78091270230912802EE +:200A6000353009F487C0363040F43130C9F1313070F0333009F01DC133C0383009F4EFC016 +:200A8000393009F4FEC0363009F013C192C0803821F0823809F00DC108C090912302809144 +:200AA0002402882399F0926011C080912B0287708093E9008091EB0090E025E09695879530 +:200AC0002A95E1F7982F91701092E9008091E800877F8093E8009093F1001092F100CAC001 +:200AE000882319F0823009F0E4C090E08F719070009721F0029709F0DDC00CC080912902A4 +:200B0000813009F0D7C010922402333069F5809324022AC080912902882331F520912B02FD +:200B2000277009F4C7C02093E9008091EB0080FFC1C0333021F48091EB00806213C08091C8 +:200B4000EB0080618093EB0081E090E002C0880F991F2A95E2F78093EA001092EA008091B7 +:200B6000EB0088608093EB001092E9008091E800877F83C0882309F09CC0109129028091FA +:200B8000E800877F8093E800E8DC04C08EB3882309F490C08091E80080FFF8CF812F8F77B6 +:200BA00011F492E001C093E09EBB80688093E30081C08058823008F07CC0809129029091F7 +:200BC0002A0223E08C3D920799F55FB7F894DE0115964EE020E030E061E2E42FF0E0609373 +:200BE0005700849120FF03C082958F704F5F982F9F70892F805D8A3308F0895F8C93119615 +:200C00001C9211972F5F3F4F12962431310529F75FBF8AE28B8383E08C838091E800877F06 +:200C20008093E800CE0103966AE270E0E4DC11C060912B02AE014F5F5F4F2CDCBC0100979F +:200C4000C9F18091E800877F8093E80089819A812BDD8091E8008B778093E8002BC080381A +:200C600041F58091E800877F8093E800809125028093F1008091E8008E778093E8006DDCC6 +:200C800019C08823B1F490912902923098F48091E800877F8093E800909325025EDC809102 +:200CA0002502882311F483E001C084E08EBB2DDB01C028DB8091E80083FF0AC08091EB007F +:200CC00080628093EB008091E800877F8093E800AC960FB6F894DEBF0FBECDBFCF91DF91E1 +:200CE0001F91089508951F938EB3882361F01091E9001092E9008091E80083FF01C098DE54 +:200D000017701093E9001F9108950895FC018EB3843021F587859089A189B2890097A10507 +:200D2000B105E1F085818093E9008091E80082FF15C08091F200882319F42FEF3FEF04C010 +:200D40008091F100282F30E08091F200882341F48091E8008B778093E80002C02FEF3FEF43 +:200D6000C9010895FC018EB3843011F587859089A189B2890097A105B105D1F081818093C1 +:200D8000E9008091F2008823A9F09091E8008091E8008E778093E80095FD0CC0FDDB982F24 +:200DA000882349F48091E8008E778093E80003C092E001C090E0892F0895FC018EB38430A5 +:200DC00051F487859089A189B2890097A105B10511F0CF01C7CF08951F93FC01162F8EB318 +:200DE0008430D9F487859089A189B2890097A105B10599F081818093E9008091E80085FDF3 +:200E000008C08091E8008E778093E800C5DB882329F41093F10080E001C082E01F91089545 +:200E20000F931F93CF93DF93EC010D96FC0189E0DF011D928A95E9F72A813B8109818C8108 +:200E4000882311F410E001C014E0C90151DB182B1260802F61E8412F59DB882329F12E8182 +:200E60003F810D818885882311F410E001C014E0C9013EDB182B1260802F60E8412F46DBA2 +:200E8000882391F02A853B8509858C85882311F410E001C014E0C9012BDB182B1260802F8F +:200EA00061EC412F33DB01C080E0DF91CF911F910F910895CF93DF93EC018091E80083FF4D +:200EC00060C0888190E020912B0230912C022817390709F056C080912802813261F082322B +:200EE00020F4803209F04DC019C0823269F1833209F047C038C080912702813A09F041C0A3 +:200F00008091E800877F8093E800CE010F9667E070E071DB8091E8008B7713C08091270278 +:200F2000813279F58091E800877F8093E800CE010F9667E070E013DCCE013ED98091E800BD +:200F40008E778093E8001DC0809127028132C9F48091E800877F8093E800809129028D87C0 +:200F6000CE01C8D90DC080912702813251F48091E800877F8093E800CE0160912902C5DE7A +:200F8000ECDADF91CF910895A1E21A2EAA1BBB1BFD010DC0AA1FBB1FEE1FFF1FA217B307AC +:200FA000E407F50720F0A21BB30BE40BF50B661F771F881F991F1A9469F760957095809539 +:200FC00090959B01AC01BD01CF010895F894FFCF000340000004400000020800000000008D +:200FE000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0B +:201000004BC0000064C0000062C0000060C000005EC000005CC000005AC0000058C00000F3 +:2010200056C0000054C0000052C00000CBC400004EC000004CC000004AC0000048C00000B9 +:2010400046C0000044C0000042C0000040C000003EC000003CC000003AC0000038C0000098 +:2010600036C0000034C0000032C0000030C000002EC000002CC000002AC0000028C00000F8 +:2010800026C0000024C0000022C0000020C000001EC000001CC0000011241FBECFEFD2E088 +:2010A000DEBFCDBF11E0A0E0B1E0E4EBFCE102C005900D92A836B107D9F711E0A8E6B1E0ED +:2010C00001C01D92A738B107E1F74FD3F1C598CF982F15C08091F200882371F48091E8004A +:2010E0008B7F8093E80003C08EB3882351F08091E80082FFF9CF02C08091F1009150992358 +:2011000049F708952091760130917501809174019091730180936D0190936E01C901809388 +:201120006F0190937001089580917101843009F45AC0853030F4813059F0833009F0C3C0BE +:201140001FC0853009F4A0C0863009F0BCC0AFC080917201823008F0B6C0D4DF8091720129 +:20116000882361F480916D0190916E0123E0FC0120935700E89507B600FCFDCF85E008C027 +:2011800080917201882311F0823029F4BBDF89E0809301010895813009F095C020E030E08C +:2011A00040E050E0F90184918F3F81F0CA01AA27BB2780936C0130936E0120936D018AE0D6 +:2011C0008093010185E08093690108952F5F3F4F4F4F5F4F2030F0E13F07F0E04F07F0E0B6 +:2011E0005F0701F7089580917201833051F581E0809368018091770190917801892B71F062 +:2012000080917301813009F05EC0809176019091750190936B0180936A0108958091730133 +:20122000882361F42CE088E190E00FB6F894A895809360000FBE20936000089510920001A8 +:201240000895882309F03FC0809173018F3F09F03AC0E0E0F0E093E085E090935700E895A9 +:2012600007B600FCFDCF80935700E89507B600FCFDCFE058FF4F20E1E030F20771F781E123 +:2012800080935700E8950895E091730180917201882321F4F0E0EB5FFE4F05C0813099F437 +:2012A000F0E0EE52FF4F808180937C01089580917201833041F480917301882321F48091E0 +:2012C000740180936C0108952F923F924F925F926F927F929F92AF92BF92CF92DF92EF92F0 +:2012E000FF920F931F93CF93DF938091850190918601909378018093770180917901882399 +:2013000051F08091790181508093790180917901882309F45D9A80917A01882351F08091F0 +:201320007A01815080937A0180917A01882309F45C9A80918001833009F4B2C1843030F41C +:20134000813071F0823009F0E3C111C1853009F4C5C1853008F4BAC1863009F0D9C1CDC11F +:201360005C9883E080937A018091E800877F8093E80080916801882329F0D6DE5D9A5C9AAF +:201380001092680120917701309178012115310529F42AC08EB3882309F4BAC18091E8000F +:2013A00082FFF8CF8091F10080937101215030403093780120937701E2E7F1E00CC080919F +:2013C000F10081932150304081E0E737F80719F43183208308C08091F200882381F7309394 +:2013E000780120937701A0DE80910101853009F0BAC08091770190917801892B21F482E042 +:2014000080930101B0C08AE163DE80916D018F715FDEC0916F01D091700120916D0130916C +:201420006E0121968E01021B130B219780917201882309F093C0180136942794C901A091F0 +:201440006C01B0E09C01AD0162E0E62EF12C012D112DE20EF31E041F151F59016A0190E0D8 +:2014600099249394B5E0A3E048C08091F200882371F48091E8008B7F8093E80004C08EB352 +:20148000882309F445C18091E80082FFF8CF0894210831088091F100682F8091F100782F1D +:2014A000F5010B0190925700E89511249F5F903419F021143104A1F4F901B0935700E89524 +:2014C00007B600FCFDCF2114310451F0F701A0935700E89507B600FCFDCFA801970190E0A7 +:2014E00042E0442E512C612C712CE40CF51C061D171DA40CB51CC61CD71C2114310409F0A0 +:20150000B4CFD0936E01C0936D0181E180935700E89527C08091F200882371F48091E80079 +:201520008B7F8093E80004C08EB3882309F4F0C08091E80082FFF8CF6091F10080916D01A7 +:2015400090916E01A7D380916D0190916E01019690936E0180936D010150104001151105FB +:20156000C9F680E1B5DD8091E8008B7FC3C08091E800877F8093E8005D9883E08093790154 +:2015800004C08EB3882309F4C3C08091E80080FFF8CF80910101893091F08A3069F4809167 +:2015A0007201813049F480916D0190916E018093F1009093F1009BC080917C0196C0609173 +:2015C0006F017091700120916D0130916E016F5F7F4F7B01E21AF30A6150704080917201E4 +:2015E000882389F5870116950795C901A0916C01B0E09C01AD011FC08091F200803271F4B7 +:201600008091E8008E7F8093E80004C08EB3882309F47EC08091E80080FFF8CFF90185918F +:2016200094918093F1009093F100015010402E5F3F4F4F4F5F4F01151105F1F670936E01E0 +:2016400060936D0129C0823039F523C08091F200803271F48091E8008E7F8093E80004C09E +:201660008EB3882309F454C08091E80080FFF8CF00916D0110916E01C80104D38093F1007B +:201680000F5F1F4F10936E0100936D010894E108F108E114F104D1F682E08093010127C0CE +:2016A0008091E800877F8093E800809169018093F1001092F1001092F1001092F1008091E7 +:2016C00001018093F1001092F10011C08091E800877F8093E8001092690119C08091E800C8 +:2016E000877F8093E800809101018093F1008091E8008E7F8093E8000AC08091E800877F08 +:201700008093E8005D9A5C9A82E08093010187D0DF91CF911F910F91FF90EF90DF90CF9017 +:20172000BF90AF909F907F906F905F904F903F902F9008952BD181E085BF15BE089584B799 +:20174000877F84BF88E10FB6F89480936000109260000FBE81E085BF82E085BF8AB18063DB +:201760008AB98BB180638BB90CC1E9DF789401C080D2809100018823D9F78091680188235D +:20178000B9F7D8DFE0916A01F0916B010995FA01923071F0933089F0913029F488E091E06A +:2017A00022E130E019C080E090E020E030E014C08AE191E02BE130E00FC0882339F48091D9 +:2017C0003501282F30E085E391E006C080913901282F30E089E391E091838083C9010895C0 +:2017E0008091EB0081608093EB001092ED006093EC004093ED008091EE00881F8827881FE4 +:2018000008951092F4001092F0001092E8001092ED00EBEEF0E080818E7F80830895809182 +:201820007F0188238CF403C08EB38823B1F08091E80082FFF9CF8091E8008B7F8093E8006D +:2018400008958EB3882349F08091E80080FFF9CF8091E8008E7F8093E80008959C0140917A +:201860008501509186014617570718F4F90120E038C06115710511F0AB01F8CF8091E80068 +:201880008E7F8093E80040E050E0F0CF8091E80083FF02C081E008958091E80082FD2DC091 +:2018A0008EB3882381F18EB3853079F18091E80080FF17C09091F20006C081918093F1002C +:2018C000415050409F5F4115510511F09032A8F320E0903209F421E08091E8008E7F809306 +:2018E000E8004115510591F6222381F606C08EB3882349F08EB3853041F08091E80082FF85 +:20190000F6CF80E0089582E0089583E0089554D056D01EBA10927D0184E089BD89B58260FA +:2019200089BD09B400FEFDCF8091D800982F9F779093D80080688093D800809163008E7FC5 +:20194000809363008091D8008F7D8093D8008091E0008E7F8093E0008091E1008E7F80932E +:20196000E1008091E20081608093E2008091E100877F8093E1008091E20088608093E20001 +:201980000895C5DF81E080937E010895C0DFE0EEF0E0808181608083E8EDF0E080818F77A8 +:2019A00080830AD00CD019BCE3E6F0E080818160808310927E0108951092E200089510929A +:2019C000E10008951F920F920FB60F9211242F933F934F935F936F937F938F939F93AF938A +:2019E000BF93EF93FF938091E10080FF1BC08091E20080FF17C08091E1008E7F8093E100F9 +:201A00008091E2008E7F8093E2008091E20080618093E2008091D80080628093D80019BC7D +:201A20001EBA26D18091E10084FF29C08091E20084FF25C084E089BD89B5826089BD09B451 +:201A400000FEFDCF8091D8008F7D8093D8008091E1008F7E8093E1008091E2008F7E8093D6 +:201A6000E2008091E20081608093E20080917D01882311F481E001C084E08EBBF9D08091D3 +:201A8000E10083FF22C08091E20083FF1EC08091E100877F8093E10082E08EBB10927D01F7 +:201AA0008091E1008E7F8093E1008091E2008E7F8093E2008091E20080618093E200A1DEF6 +:201AC00080E060E042E28CDED3D08091E10082FF0AC08091E20082FF06C08091E1008B7FC2 +:201AE0008093E100C5D0FF91EF91BF91AF919F918F917F916F915F914F913F912F910F905E +:201B00000FBE0F901F9018951F93DF93CF9300D0CDB7DEB7EFE7F1E08091F100819381E070 +:201B2000E738F807C9F790917F0180918001853011F1863040F48130B9F0813070F08330D5 +:201B400009F081C011C0883009F453C0893009F462C0863009F077C02DC0903809F474C00E +:201B6000923809F070C070C0992309F46DC0923009F069C069C0992309F065C01091810152 +:201B80008091E800877F8093E80049DE04C08EB3882309F459C08091E80080FFF8CF812F6F +:201BA0008F7711F492E001C093E09EBB80688093E3004AC09058923008F045C080918101F9 +:201BC0009091820160918301AE014F5F5F4FDFDDBC010097C9F18091E800877F8093E8001D +:201BE00089819A813BDE8091E8008B7F8093E8002BC0903841F58091E800877F8093E800C6 +:201C000080917D018093F1008091E8008E7F8093E80005DE19C09923B1F4909181019230AE +:201C200098F48091E800877F8093E80090937D01F6DD80917D01882311F483E001C084E0E3 +:201C40008EBB16D001C040DB8091E80083FF0AC08091EB0080628093EB008091E800877F59 +:201C60008093E8000F900F90CF91DF911F91089508958EB3882329F08091E80083FF01C030 +:201C800043CF0895F999FECF92BD81BDF89A992780B50895262FF999FECF1FBA92BD81BD6B +:201CA00020BD0FB6F894FA9AF99A0FBE01960895F894FFCF01021E938220DCFB1201100123 +:201CC00000000020EB03F72F00000001000109021B0001010080320904000000FE010200E6 +:201CE0000921030000000C0001040309042C03410072006400750069006E006F0020004D28 +:1C1D000000650067006100200032003500360030002000440046005500000000AE +:00000001FF diff --git a/test/ardmake/hardware/firmwares/README.txt b/test/ardmake/hardware/firmwares/README.txt new file mode 100644 index 0000000..386dcf0 --- /dev/null +++ b/test/ardmake/hardware/firmwares/README.txt @@ -0,0 +1,33 @@ +Arduino Uno and Mega 2560 Firmwares for the ATmega8U2 + +This directory contains the firmwares used on the ATmega8U2 on the Arduino +Uno and Arduino Mega 2560. The arduino-usbdfu directory contains the DFU +bootloader on the 8U2; the arduino-usbserial directory contains the actual +usb to serial firmware. Both should be compiled against LUFA 100807. The +two .hex files in this directory combine the dfu and serial firmwares into +a single file to burn onto the 8U2. + +To burn (Uno): +avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m + +To burn (Mega 2560): +avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:MEGA-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m + + +Note on USB Vendor IDs (VID) and Product IDs (PID): The arduino-usbdfu +project uses Atmel's VID and MCU-specific PIDs to maintain compatibility +with their FLIP software. The source code to the arduino-usbserial +project includes Atmel's VID and a PID donated by them to LUFA. This +PID is used in LUFA's USBtoSerial project, which forms the basis for +arduino-usbserial. According to the LUFA documentation, this VID/PID +combination is: + + "For use in testing of LUFA powered devices during development only, + by non-commercial entities. All devices must accept collisions on this + VID/PID range (from other in-development LUFA devices) to be resolved + by using a unique release number in the Device Descriptor. No devices + using this VID/PID combination may be released to the general public." + +The production version of the arduino-usbserial firmware uses the +Arduino VID. This is only for use with official Arduino hardware and +should not be used on other products. \ No newline at end of file diff --git a/test/ardmake/hardware/firmwares/UNO-dfu_and_usbserial_combined.hex b/test/ardmake/hardware/firmwares/UNO-dfu_and_usbserial_combined.hex new file mode 100644 index 0000000..60acf44 --- /dev/null +++ b/test/ardmake/hardware/firmwares/UNO-dfu_and_usbserial_combined.hex @@ -0,0 +1,234 @@ +:200000009CC00000B5C00000B3C00000B1C00000AFC00000ADC00000ABC00000A9C000007B +:20002000A7C00000A5C00000A3C0000054C4000018C400009DC000009BC0000099C000008C +:2000400097C0000095C0000093C0000091C000008FC000008DC000008BC000000EC100009A +:2000600087C0000085C0000083C0000081C000007FC000007DC000007BC0000079C0000080 +:2000800077C0000075C0000073C0000071C000006FC000006DC00000120110010200000806 +:2000A0004123010001000102DC0109023E00020100C032090400000102020100052400017F +:2000C00010042402060524060001070582030800FF09040100020A000000070504024000AC +:2000E0000107058302400001040309043203410072006400750069006E006F0020002800CA +:200100007700770077002E00610072006400750069006E006F002E0063006300290000003D +:200120001803410072006400750069006E006F00200055006E006F00000011241FBECFEFB0 +:20014000D2E0DEBFCDBF11E0A0E0B1E0E4ECFFE002C005900D92A631B107D9F712E0A6E145 +:20016000B1E001C01D92AF32B107E1F7F1D028C747CF9C01DC01AE57BF4FED91FC91119707 +:2001800041911196FC93EE9380589F4FE817F90711F42D933C939FB7F894F901EC57FF4F10 +:2001A0008081815080839FBF842F0895DF92EF92FF920F931F93FC018489813019F082306F +:2001C00021F405C040E3D42E04C0DD2402C030E2D32E8389823011F488E0D82A8589873094 +:2001E00031F0883031F0863031F482E003C084E001C086E0D82A1092C9001092C800109201 +:20020000CA00E784F0880189128980E0E81681EEF80680E0080780E0180719F420E130E035 +:200220000FC0C801B701969587957795679560587B47814E9F4FA8019701A0D62150304050 +:200240003093CD002093CC00D092CA0080E0E81681EEF80680E0080780E0180711F082E047 +:2002600001C080E08093C80088E98093C9001F910F91FF90EF90DF9008951F920F920FB6B4 +:200280000F9211242F938F939F93EF93FF939091CE008EB38430F1F4E0919901F0919A016E +:2002A0009083E0919901F0919A01CF01019690939A01809399018959914021F489E191E08F +:2002C000928381839FB7F89480919D018F5F80939D019FBFFF91EF919F918F912F910F90B8 +:2002E0000FBE0F901F901895FC01858580FF02C05F9808955F9A089580E091E0D5C580E0F9 +:2003000091E088C584B7877F84BF28E10FB6F89420936000109260000FBE87E690E090935F +:20032000CD008093CC0086E08093CA001092C8002093C900539A5A9A8AB180638AB98BB16A +:2003400080638BB983D284E085BD5F9A579A08950F931F93CF93DF93D5DF2FB7F8948EE92F +:2003600091E090931F0280931E0290932102809320022FBF2FB7F89489E191E090939A0121 +:200380008093990190939C0180939B012FBF7894CEE9D1E003E08FB7F894909122028FBF97 +:2003A000903809F180E091E0ABD497FD1CC0E0911E02F0911F028083E0911E02F0911F0252 +:2003C000CF01019690931F0280931E028E51924011F4D283C1839FB7F894809122028F5FEB +:2003E000809322029FBF8FB7F89410919D018FBFA89902C0113678F1A89A80919D018823BA +:2004000061F05D980093160108C089E191E0B1DE682F80E091E0DAD411501123B1F7809156 +:200420001601882351F08091160181508093160180911601882309F45D9A809117018823FB +:2004400051F08091170181508093170180911701882309F45C9A8FB7F894909122028FBF0A +:20046000992369F08EE991E084DE982F8091C80085FFFCCF9093CE005C980093170180E03E +:2004800091E095D42AD487CFDA01923049F0933061F09130F9F4E8E9F0E022E130E01EC004 +:2004A000EAEAF0E02EE330E019C0813049F0813018F0823079F408C0E8EEF0E0849107C092 +:2004C000ECEEF0E0849103C0E0E2F1E08491282F30E004C0E0E0F0E020E030E0ED93FC9318 +:2004E000C901089528E030E040E003C04F5F220F331F28173907D0F3842F8295807F0895C1 +:200500008093E9008091EB0081608093EB001092ED006093EC004093ED008091EE00881F30 +:200520008827881F08951092F40090E09093E9001092F0001092E8001092ED008091EB000F +:200540008E7F8093EB009F5F953081F708958091270288238CF403C08EB38823B1F08091F2 +:20056000E80082FFF9CF8091E8008B778093E80008958EB3882349F08091E80080FFF9CF52 +:200580008091E8008E778093E800089594E68091EC0080FF05C08091E80080FF05C023C0EA +:2005A0008091E80082FD1FC08EB3882311F482E008958EB3853011F483E008958091EB00FD +:2005C00085FF02C081E008958091E10082FFDFCF8091E1008B7F8093E100992311F484E0A1 +:2005E00008959150D4CF80E008959C0140912D0250912E024617570718F4F90120E038C076 +:200600006115710511F0AB01F8CF8091E8008E778093E80040E050E0F0CF8091E80083FFF7 +:2006200002C081E008958091E80082FD2DC08EB3882381F18EB3853079F18091E80080FF5F +:2006400017C09091F20006C081918093F100415050409F5F4115510511F09830A8F320E0A5 +:20066000983009F421E08091E8008E778093E8004115510591F6222381F606C08EB388231A +:2006800049F08EB3853041F08091E80082FFF6CF80E0089582E0089583E008959C01409151 +:2006A0002D0250912E024617570710F490E03BC06115710511F0AB01F9CF8091E8008E7771 +:2006C0008093E80040E050E0F1CF8091E80083FF02C081E008958091E80082FD30C08EB32B +:2006E000882399F18EB3853091F18091E80080FF1AC08091F20009C0F9012F5F3F4FE491A4 +:20070000E093F100415050408F5F4115510511F0883090F390E0883009F491E08091E800EF +:200720008E778093E8004115510579F6992369F606C08EB3882349F08EB3853041F0809160 +:20074000E80082FFF6CF80E0089582E0089583E008959C016115710529F48091E8008B77CE +:200760008093E800F90120C08091E80083FF02C081E008958EB3882339F18EB3853031F13B +:200780008091E80082FFF0CF06C08091F10081936150704021F08091F2008823B1F780916B +:2007A000E8008B778093E80061157105E9F606C08EB3882349F08EB3853041F08091E8007E +:2007C00080FFF6CF80E0089582E0089583E0089542D044D01EBA10922502109224021092A8 +:2007E000230284E089BD89B5826089BD09B400FEFDCF8091D800982F9F779093D800806894 +:200800008093D800809163008E7F809363008091D8008F7D8093D8008091E0008E7F809305 +:20082000E0008091E1008E7F8093E1008091E20081608093E2008091E100877F8093E10030 +:200840008091E20088608093E2000895C1DF81E08093260208951092E20008951092E100AE +:2008600008951F920F920FB60F9211241F932F933F934F935F936F937F938F939F93AF932A +:20088000BF93EF93FF93E9EEF0E0108117701082E0EFF0E08081877F80837894C3D0F894CD +:2008A000A9EEB0E01C92E0EFF0E08081886080831C93FF91EF91BF91AF919F918F917F9129 +:2008C0006F915F914F913F912F911F910F900FBE0F901F9018951F920F920FB60F921124B4 +:2008E0002F933F934F935F936F937F938F939F93AF93BF93EF93FF938091E10080FF1BC034 +:200900008091E20080FF17C08091E1008E7F8093E1008091E2008E7F8093E2008091E200B3 +:2009200080618093E2008091D80080628093D80019BC1EBAD1D18091E10084FF29C080916D +:20094000E20084FF25C084E089BD89B5826089BD09B400FEFDCF8091D8008F7D8093D800D6 +:200960008091E1008F7E8093E1008091E2008F7E8093E2008091E20081608093E2008091B5 +:200980002502882311F481E001C084E08EBBA4D18091E10083FF27C08091E20083FF23C089 +:2009A0008091E100877F8093E10082E08EBB109225028091E1008E7F8093E1008091E200F1 +:2009C0008E7F8093E2008091E20080618093E200AADD80E060E042E093DD8091F0008860AA +:2009E0008093F00079D18091E10082FF0AC08091E20082FF06C08091E1008B7F8093E10043 +:200A00006BD1FF91EF91BF91AF919F918F917F916F915F914F913F912F910F900FBE0F902F +:200A20001F9018951F93DF93CF93CDB7DEB7AC970FB6F894DEBF0FBECDBFE7E2F2E0809185 +:200A4000F100819322E0EF32F207C9F78091270230912802353009F487C0363040F43130EC +:200A6000C9F1313070F0333009F01DC133C0383009F4EFC0393009F4FEC0363009F013C163 +:200A800092C0803821F0823809F00DC108C09091230280912402882399F0926011C080916D +:200AA0002B0287708093E9008091EB0090E025E0969587952A95E1F7982F91701092E90074 +:200AC0008091E800877F8093E8009093F1001092F100CAC0882319F0823009F0E4C090E078 +:200AE0008F719070009721F0029709F0DDC00CC080912902813009F0D7C0109224023330AB +:200B000069F5809324022AC080912902882331F520912B02277009F4C7C02093E9008091A1 +:200B2000EB0080FFC1C0333021F48091EB00806213C08091EB0080618093EB0081E090E0F5 +:200B400002C0880F991F2A95E2F78093EA001092EA008091EB0088608093EB001092E900F6 +:200B60008091E800877F83C0882309F09CC0109129028091E800877F8093E800E8DC04C0E5 +:200B80008EB3882309F490C08091E80080FFF8CF812F8F7711F492E001C093E09EBB80683B +:200BA0008093E30081C08058823008F07CC08091290290912A0223E08C3D920799F55FB7AE +:200BC000F894DE0115964EE020E030E061E2E42FF0E060935700849120FF03C082958F7044 +:200BE0004F5F982F9F70892F805D8A3308F0895F8C9311961C9211972F5F3F4F129624310A +:200C0000310529F75FBF8AE28B8383E08C838091E800877F8093E800CE0103966AE270E076 +:200C2000E4DC11C060912B02AE014F5F5F4F2CDCBC010097C9F18091E800877F8093E800EA +:200C400089819A812BDD8091E8008B778093E8002BC0803841F58091E800877F8093E8009E +:200C6000809125028093F1008091E8008E778093E8006DDC19C08823B1F4909129029230BF +:200C800098F48091E800877F8093E800909325025EDC80912502882311F483E001C084E0DA +:200CA0008EBB2DDB01C028DB8091E80083FF0AC08091EB0080628093EB008091E800877FFF +:200CC0008093E800AC960FB6F894DEBF0FBECDBFCF91DF911F91089508951F938EB3882338 +:200CE00061F01091E9001092E9008091E80083FF01C098DE17701093E9001F9108950895DF +:200D0000FC018EB3843021F587859089A189B2890097A105B105E1F085818093E90080916A +:200D2000E80082FF15C08091F200882319F42FEF3FEF04C08091F100282F30E08091F2003E +:200D4000882341F48091E8008B778093E80002C02FEF3FEFC9010895FC018EB3843011F550 +:200D600087859089A189B2890097A105B105D1F081818093E9008091F2008823A9F09091CF +:200D8000E8008091E8008E778093E80095FD0CC0FDDB982F882349F48091E8008E7780937C +:200DA000E80003C092E001C090E0892F0895FC018EB3843051F487859089A189B289009738 +:200DC000A105B10511F0CF01C7CF08951F93FC01162F8EB38430D9F487859089A189B28973 +:200DE0000097A105B10599F081818093E9008091E80085FD08C08091E8008E778093E8003D +:200E0000C5DB882329F41093F10080E001C082E01F9108950F931F93CF93DF93EC010D964E +:200E2000FC0189E0DF011D928A95E9F72A813B8109818C81882311F410E001C014E0C901A1 +:200E400051DB182B1260802F61E8412F59DB882329F12E813F810D818885882311F410E0A6 +:200E600001C014E0C9013EDB182B1260802F60E8412F46DB882391F02A853B8509858C8563 +:200E8000882311F410E001C014E0C9012BDB182B1260802F61EC412F33DB01C080E0DF916D +:200EA000CF911F910F910895CF93DF93EC018091E80083FF60C0888190E020912B02309171 +:200EC0002C022817390709F056C080912802813261F0823220F4803209F04DC019C082320A +:200EE00069F1833209F047C038C080912702813A09F041C08091E800877F8093E800CE0133 +:200F00000F9667E070E071DB8091E8008B7713C080912702813279F58091E800877F80930E +:200F2000E800CE010F9667E070E013DCCE013ED98091E8008E778093E8001DC080912702D9 +:200F40008132C9F48091E800877F8093E800809129028D87CE01C8D90DC0809127028132AD +:200F600051F48091E800877F8093E800CE0160912902C5DEECDADF91CF910895A1E21A2EA6 +:200F8000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1FA217B307E407F50720F0A21BB30BE40B49 +:200FA000F50B661F771F881F991F1A9469F760957095809590959B01AC01BD01CF01089501 +:200FC000F894FFCF00034000000440000002080000000000000000000000FFFFFFFFFFFF2C +:200FE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11 +:201000004BC0000064C0000062C0000060C000005EC000005CC000005AC0000058C00000F3 +:2010200056C0000054C0000052C00000CBC400004EC000004CC000004AC0000048C00000B9 +:2010400046C0000044C0000042C0000040C000003EC000003CC000003AC0000038C0000098 +:2010600036C0000034C0000032C0000030C000002EC000002CC000002AC0000028C00000F8 +:2010800026C0000024C0000022C0000020C000001EC000001CC0000011241FBECFEFD2E088 +:2010A000DEBFCDBF11E0A0E0B1E0E4EBFCE102C005900D92AC35B107D9F711E0ACE5B1E0E7 +:2010C00001C01D92AB37B107E1F74FD3F1C598CF982F15C08091F200882371F48091E80047 +:2010E0008B7F8093E80003C08EB3882351F08091E80082FFF9CF02C08091F1009150992358 +:2011000049F7089520916A013091690180916801909167018093610190936201C9018093D0 +:20112000630190936401089580916501843009F45AC0853030F4813059F0833009F0C3C0E2 +:201140001FC0853009F4A0C0863009F0BCC0AFC080916601823008F0B6C0D4DF8091660141 +:20116000882361F4809161019091620123E0FC0120935700E89507B600FCFDCF85E008C03F +:2011800080916601882311F0823029F4BBDF89E0809301010895813009F095C020E030E098 +:2011A00040E050E0F90184918F3F81F0CA01AA27BB278093600130936201209361018AE0FA +:2011C0008093010185E080935D0108952F5F3F4F4F4F5F4F2030F0E13F07F0E04F07F0E0C2 +:2011E0005F0701F7089580916601833051F581E080935C0180916B0190916C01892B71F092 +:2012000080916701813009F05EC080916A019091690190935F0180935E010895809167017B +:20122000882361F42CE088E190E00FB6F894A895809360000FBE20936000089510920001A8 +:201240000895882309F03FC0809167018F3F09F03AC0E0E0F0E093E085E090935700E895B5 +:2012600007B600FCFDCF80935700E89507B600FCFDCFE058FF4F20E1E030F20771F781E123 +:2012800080935700E8950895E091670180916601882321F4F0E0EB5FFE4F05C0813099F44F +:2012A000F0E0EE52FF4F808180937001089580916601833041F480916701882321F4809104 +:2012C00068018093600108952F923F924F925F926F927F929F92AF92BF92CF92DF92EF9208 +:2012E000FF920F931F93CF93DF938091790190917A0190936C0180936B0180916D018823D5 +:2013000051F080916D01815080936D0180916D01882309F45D9A80916E01882351F0809120 +:201320006E01815080936E0180916E01882309F45C9A80917401833009F4B2C1843030F44C +:20134000813071F0823009F0E3C111C1853009F4C5C1853008F4BAC1863009F0D9C1CDC11F +:201360005C9883E080936E018091E800877F8093E80080915C01882329F0D6DE5D9A5C9AC7 +:2013800010925C0120916B0130916C012115310529F42AC08EB3882309F4BAC18091E80033 +:2013A00082FFF8CF8091F100809365012150304030936C0120936B01E6E6F1E00CC08091C0 +:2013C000F10081932150304081E0EB36F80719F43183208308C08091F200882381F7309391 +:2013E0006C0120936B01A0DE80910101853009F0BAC080916B0190916C01892B21F482E072 +:2014000080930101B0C08AE163DE809161018F715FDEC0916301D09164012091610130919C +:20142000620121968E01021B130B219780916601882309F093C0180136942794C901A09108 +:201440006001B0E09C01AD0162E0E62EF12C012D112DE20EF31E041F151F59016A0190E0E4 +:2014600099249394B5E0A3E048C08091F200882371F48091E8008B7F8093E80004C08EB352 +:20148000882309F445C18091E80082FFF8CF0894210831088091F100682F8091F100782F1D +:2014A000F5010B0190925700E89511249F5F903419F021143104A1F4F901B0935700E89524 +:2014C00007B600FCFDCF2114310451F0F701A0935700E89507B600FCFDCFA801970190E0A7 +:2014E00042E0442E512C612C712CE40CF51C061D171DA40CB51CC61CD71C2114310409F0A0 +:20150000B4CFD0936201C093610181E180935700E89527C08091F200882371F48091E80091 +:201520008B7F8093E80004C08EB3882309F4F0C08091E80082FFF8CF6091F10080916101B3 +:2015400090916201A7D3809161019091620101969093620180936101015010400115110537 +:20156000C9F680E1B5DD8091E8008B7FC3C08091E800877F8093E8005D9883E080936D0160 +:2015800004C08EB3882309F4C3C08091E80080FFF8CF80910101893091F08A3069F4809167 +:2015A0006601813049F480916101909162018093F1009093F1009BC08091700196C06091A3 +:2015C00063017091640120916101309162016F5F7F4F7B01E21AF30A615070408091660120 +:2015E000882389F5870116950795C901A0916001B0E09C01AD011FC08091F200803271F4C3 +:201600008091E8008E7F8093E80004C08EB3882309F47EC08091E80080FFF8CFF90185918F +:2016200094918093F1009093F100015010402E5F3F4F4F4F5F4F01151105F1F670936201EC +:201640006093610129C0823039F523C08091F200803271F48091E8008E7F8093E80004C0AA +:201660008EB3882309F454C08091E80080FFF8CF0091610110916201C80104D38093F10093 +:201680000F5F1F4F10936201009361010894E108F108E114F104D1F682E08093010127C0E6 +:2016A0008091E800877F8093E80080915D018093F1001092F1001092F1001092F1008091F3 +:2016C00001018093F1001092F10011C08091E800877F8093E80010925D0119C08091E800D4 +:2016E000877F8093E800809101018093F1008091E8008E7F8093E8000AC08091E800877F08 +:201700008093E8005D9A5C9A82E08093010187D0DF91CF911F910F91FF90EF90DF90CF9017 +:20172000BF90AF909F907F906F905F904F903F902F9008952BD181E085BF15BE089584B799 +:20174000877F84BF88E10FB6F89480936000109260000FBE81E085BF82E085BF8AB18063DB +:201760008AB98BB180638BB90CC1E9DF789401C080D2809100018823D9F780915C01882369 +:20178000B9F7D8DFE0915E01F0915F010995FA01923071F0933089F0913029F488E091E082 +:2017A00022E130E019C080E090E020E030E014C08AE191E02BE130E00FC0882339F48091D9 +:2017C0003501282F30E085E391E006C080913901282F30E089E391E091838083C9010895C0 +:2017E0008091EB0081608093EB001092ED006093EC004093ED008091EE00881F8827881FE4 +:2018000008951092F4001092F0001092E8001092ED00EBEEF0E080818E7F80830895809182 +:20182000730188238CF403C08EB38823B1F08091E80082FFF9CF8091E8008B7F8093E80079 +:2018400008958EB3882349F08091E80080FFF9CF8091E8008E7F8093E80008959C0140917A +:20186000790150917A014617570718F4F90120E038C06115710511F0AB01F8CF8091E80080 +:201880008E7F8093E80040E050E0F0CF8091E80083FF02C081E008958091E80082FD2DC091 +:2018A0008EB3882381F18EB3853079F18091E80080FF17C09091F20006C081918093F1002C +:2018C000415050409F5F4115510511F09032A8F320E0903209F421E08091E8008E7F809306 +:2018E000E8004115510591F6222381F606C08EB3882349F08EB3853041F08091E80082FF85 +:20190000F6CF80E0089582E0089583E0089554D056D01EBA1092710184E089BD89B5826006 +:2019200089BD09B400FEFDCF8091D800982F9F779093D80080688093D800809163008E7FC5 +:20194000809363008091D8008F7D8093D8008091E0008E7F8093E0008091E1008E7F80932E +:20196000E1008091E20081608093E2008091E100877F8093E1008091E20088608093E20001 +:201980000895C5DF81E0809372010895C0DFE0EEF0E0808181608083E8EDF0E080818F77B4 +:2019A00080830AD00CD019BCE3E6F0E08081816080831092720108951092E20008951092A6 +:2019C000E10008951F920F920FB60F9211242F933F934F935F936F937F938F939F93AF938A +:2019E000BF93EF93FF938091E10080FF1BC08091E20080FF17C08091E1008E7F8093E100F9 +:201A00008091E2008E7F8093E2008091E20080618093E2008091D80080628093D80019BC7D +:201A20001EBA26D18091E10084FF29C08091E20084FF25C084E089BD89B5826089BD09B451 +:201A400000FEFDCF8091D8008F7D8093D8008091E1008F7E8093E1008091E2008F7E8093D6 +:201A6000E2008091E20081608093E20080917101882311F481E001C084E08EBBF9D08091DF +:201A8000E10083FF22C08091E20083FF1EC08091E100877F8093E10082E08EBB1092710103 +:201AA0008091E1008E7F8093E1008091E2008E7F8093E2008091E20080618093E200A1DEF6 +:201AC00080E060E042E28CDED3D08091E10082FF0AC08091E20082FF06C08091E1008B7FC2 +:201AE0008093E100C5D0FF91EF91BF91AF919F918F917F916F915F914F913F912F910F905E +:201B00000FBE0F901F9018951F93DF93CF9300D0CDB7DEB7E3E7F1E08091F100819381E07C +:201B2000EB37F807C9F79091730180917401853011F1863040F48130B9F0813070F08330EA +:201B400009F081C011C0883009F453C0893009F462C0863009F077C02DC0903809F474C00E +:201B6000923809F070C070C0992309F46DC0923009F069C069C0992309F065C0109175015E +:201B80008091E800877F8093E80049DE04C08EB3882309F459C08091E80080FFF8CF812F6F +:201BA0008F7711F492E001C093E09EBB80688093E3004AC09058923008F045C08091750105 +:201BC0009091760160917701AE014F5F5F4FDFDDBC010097C9F18091E800877F8093E80035 +:201BE00089819A813BDE8091E8008B7F8093E8002BC0903841F58091E800877F8093E800C6 +:201C0000809171018093F1008091E8008E7F8093E80005DE19C09923B1F4909175019230C6 +:201C200098F48091E800877F8093E80090937101F6DD80917101882311F483E001C084E0FB +:201C40008EBB16D001C040DB8091E80083FF0AC08091EB0080628093EB008091E800877F59 +:201C60008093E8000F900F90CF91DF911F91089508958EB3882329F08091E80083FF01C030 +:201C800043CF0895F999FECF92BD81BDF89A992780B50895262FF999FECF1FBA92BD81BD6B +:201CA00020BD0FB6F894FA9AF99A0FBE01960895F894FFCF01021E938220DCFB1201100123 +:201CC00000000020EB03F72F00000001000109021B0001010080320904000000FE010200E6 +:201CE0000921030000000C0001040309042003410072006400750069006E006F002000552C +:101D0000006E006F002000440046005500000000F7 +:00000001FF diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.c b/test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.c new file mode 100644 index 0000000..7bed831 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.c @@ -0,0 +1,728 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Main source file for the DFU class bootloader. This file contains the complete bootloader logic. + */ + +#define INCLUDE_FROM_BOOTLOADER_C +#include "Arduino-usbdfu.h" + +/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run + * via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application + * jumped to via an indirect jump to location 0x0000 (or other location specified by the host). + */ +bool RunBootloader = true; + +/** Flag to indicate if the bootloader is waiting to exit. When the host requests the bootloader to exit and + * jump to the application address it specifies, it sends two sequential commands which must be properly + * acknowledged. Upon reception of the first the RunBootloader flag is cleared and the WaitForExit flag is set, + * causing the bootloader to wait for the final exit command before shutting down. + */ +bool WaitForExit = false; + +/** Current DFU state machine state, one of the values in the DFU_State_t enum. */ +uint8_t DFU_State = dfuIDLE; + +/** Status code of the last executed DFU command. This is set to one of the values in the DFU_Status_t enum after + * each operation, and returned to the host when a Get Status DFU request is issued. + */ +uint8_t DFU_Status = OK; + +/** Data containing the DFU command sent from the host. */ +DFU_Command_t SentCommand; + +/** Response to the last issued Read Data DFU command. Unlike other DFU commands, the read command + * requires a single byte response from the bootloader containing the read data when the next DFU_UPLOAD command + * is issued by the host. + */ +uint8_t ResponseByte; + +/** Pointer to the start of the user application. By default this is 0x0000 (the reset vector), however the host + * may specify an alternate address when issuing the application soft-start command. + */ +AppPtr_t AppStartPtr = (AppPtr_t)0x0000; + +/** 64-bit flash page number. This is concatenated with the current 16-bit address on USB AVRs containing more than + * 64KB of flash memory. + */ +uint8_t Flash64KBPage = 0; + +/** Memory start address, indicating the current address in the memory being addressed (either FLASH or EEPROM + * depending on the issued command from the host). + */ +uint16_t StartAddr = 0x0000; + +/** Memory end address, indicating the end address to read to/write from in the memory being addressed (either FLASH + * of EEPROM depending on the issued command from the host). + */ +uint16_t EndAddr = 0x0000; + + +/** Pulse generation counters to keep track of the number of milliseconds remaining for each pulse type */ +volatile struct +{ + uint8_t TxLEDPulse; /**< Milliseconds remaining for data Tx LED pulse */ + uint8_t RxLEDPulse; /**< Milliseconds remaining for data Rx LED pulse */ + uint8_t PingPongLEDPulse; /**< Milliseconds remaining for enumeration Tx/Rx ping-pong LED pulse */ +} PulseMSRemaining; + +/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously + * runs the bootloader processing routine until instructed to soft-exit, or hard-reset via the watchdog to start + * the loaded application code. + */ +int main(void) +{ + /* Configure hardware required by the bootloader */ + SetupHardware(); + + /* Enable global interrupts so that the USB stack can function */ + sei(); + + /* Run the USB management task while the bootloader is supposed to be running */ + while (RunBootloader || WaitForExit) + USB_USBTask(); + + /* Reset configured hardware back to their original states for the user application */ + ResetHardware(); + + /* Start the user application */ + AppStartPtr(); +} + +/** Configures all hardware required for the bootloader. */ +void SetupHardware(void) +{ + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Disable clock division */ +// clock_prescale_set(clock_div_1); + + /* Relocate the interrupt vector table to the bootloader section */ + MCUCR = (1 << IVCE); + MCUCR = (1 << IVSEL); + + LEDs_Init(); + + /* Initialize the USB subsystem */ + USB_Init(); +} + +/** Resets all configured hardware required for the bootloader back to their original states. */ +void ResetHardware(void) +{ + /* Shut down the USB subsystem */ + USB_ShutDown(); + + /* Relocate the interrupt vector table back to the application section */ + MCUCR = (1 << IVCE); + MCUCR = 0; +} + +/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific + * control requests that are not handled internally by the USB library (including the DFU commands, which are + * all issued via the control endpoint), so that they can be handled appropriately for the application. + */ +void EVENT_USB_Device_UnhandledControlRequest(void) +{ + /* Get the size of the command and data from the wLength value */ + SentCommand.DataSize = USB_ControlRequest.wLength; + + /* Turn off TX LED(s) once the TX pulse period has elapsed */ + if (PulseMSRemaining.TxLEDPulse && !(--PulseMSRemaining.TxLEDPulse)) + LEDs_TurnOffLEDs(LEDMASK_TX); + + /* Turn off RX LED(s) once the RX pulse period has elapsed */ + if (PulseMSRemaining.RxLEDPulse && !(--PulseMSRemaining.RxLEDPulse)) + LEDs_TurnOffLEDs(LEDMASK_RX); + + switch (USB_ControlRequest.bRequest) + { + case DFU_DNLOAD: + LEDs_TurnOnLEDs(LEDMASK_RX); + PulseMSRemaining.RxLEDPulse = TX_RX_LED_PULSE_MS; + + Endpoint_ClearSETUP(); + + /* Check if bootloader is waiting to terminate */ + if (WaitForExit) + { + /* Bootloader is terminating - process last received command */ + ProcessBootloaderCommand(); + + /* Turn off TX/RX status LEDs so that they're not left on when application starts */ + LEDs_TurnOffLEDs(LEDMASK_TX); + LEDs_TurnOffLEDs(LEDMASK_RX); + + /* Indicate that the last command has now been processed - free to exit bootloader */ + WaitForExit = false; + } + + /* If the request has a data stage, load it into the command struct */ + if (SentCommand.DataSize) + { + while (!(Endpoint_IsOUTReceived())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + + /* First byte of the data stage is the DNLOAD request's command */ + SentCommand.Command = Endpoint_Read_Byte(); + + /* One byte of the data stage is the command, so subtract it from the total data bytes */ + SentCommand.DataSize--; + + /* Load in the rest of the data stage as command parameters */ + for (uint8_t DataByte = 0; (DataByte < sizeof(SentCommand.Data)) && + Endpoint_BytesInEndpoint(); DataByte++) + { + SentCommand.Data[DataByte] = Endpoint_Read_Byte(); + SentCommand.DataSize--; + } + + /* Process the command */ + ProcessBootloaderCommand(); + } + + /* Check if currently downloading firmware */ + if (DFU_State == dfuDNLOAD_IDLE) + { + if (!(SentCommand.DataSize)) + { + DFU_State = dfuIDLE; + } + else + { + /* Throw away the filler bytes before the start of the firmware */ + DiscardFillerBytes(DFU_FILLER_BYTES_SIZE); + + /* Throw away the packet alignment filler bytes before the start of the firmware */ + DiscardFillerBytes(StartAddr % FIXED_CONTROL_ENDPOINT_SIZE); + + /* Calculate the number of bytes remaining to be written */ + uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1); + + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Write flash + { + /* Calculate the number of words to be written from the number of bytes to be written */ + uint16_t WordsRemaining = (BytesRemaining >> 1); + + union + { + uint16_t Words[2]; + uint32_t Long; + } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}}; + + uint32_t CurrFlashPageStartAddress = CurrFlashAddress.Long; + uint8_t WordsInFlashPage = 0; + + while (WordsRemaining--) + { + /* Check if endpoint is empty - if so clear it and wait until ready for next packet */ + if (!(Endpoint_BytesInEndpoint())) + { + Endpoint_ClearOUT(); + + while (!(Endpoint_IsOUTReceived())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + } + + /* Write the next word into the current flash page */ + boot_page_fill(CurrFlashAddress.Long, Endpoint_Read_Word_LE()); + + /* Adjust counters */ + WordsInFlashPage += 1; + CurrFlashAddress.Long += 2; + + /* See if an entire page has been written to the flash page buffer */ + if ((WordsInFlashPage == (SPM_PAGESIZE >> 1)) || !(WordsRemaining)) + { + /* Commit the flash page to memory */ + boot_page_write(CurrFlashPageStartAddress); + boot_spm_busy_wait(); + + /* Check if programming incomplete */ + if (WordsRemaining) + { + CurrFlashPageStartAddress = CurrFlashAddress.Long; + WordsInFlashPage = 0; + + /* Erase next page's temp buffer */ + boot_page_erase(CurrFlashAddress.Long); + boot_spm_busy_wait(); + } + } + } + + /* Once programming complete, start address equals the end address */ + StartAddr = EndAddr; + + /* Re-enable the RWW section of flash */ + boot_rww_enable(); + } + else // Write EEPROM + { + while (BytesRemaining--) + { + /* Check if endpoint is empty - if so clear it and wait until ready for next packet */ + if (!(Endpoint_BytesInEndpoint())) + { + Endpoint_ClearOUT(); + + while (!(Endpoint_IsOUTReceived())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + } + + /* Read the byte from the USB interface and write to to the EEPROM */ + eeprom_write_byte((uint8_t*)StartAddr, Endpoint_Read_Byte()); + + /* Adjust counters */ + StartAddr++; + } + } + + /* Throw away the currently unused DFU file suffix */ + DiscardFillerBytes(DFU_FILE_SUFFIX_SIZE); + } + } + + Endpoint_ClearOUT(); + + Endpoint_ClearStatusStage(); + + break; + case DFU_UPLOAD: + Endpoint_ClearSETUP(); + + LEDs_TurnOnLEDs(LEDMASK_TX); + PulseMSRemaining.TxLEDPulse = TX_RX_LED_PULSE_MS; + + while (!(Endpoint_IsINReady())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + + if (DFU_State != dfuUPLOAD_IDLE) + { + if ((DFU_State == dfuERROR) && IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Blank Check + { + /* Blank checking is performed in the DFU_DNLOAD request - if we get here we've told the host + that the memory isn't blank, and the host is requesting the first non-blank address */ + Endpoint_Write_Word_LE(StartAddr); + } + else + { + /* Idle state upload - send response to last issued command */ + Endpoint_Write_Byte(ResponseByte); + } + } + else + { + /* Determine the number of bytes remaining in the current block */ + uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1); + + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Read FLASH + { + /* Calculate the number of words to be written from the number of bytes to be written */ + uint16_t WordsRemaining = (BytesRemaining >> 1); + + union + { + uint16_t Words[2]; + uint32_t Long; + } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}}; + + while (WordsRemaining--) + { + /* Check if endpoint is full - if so clear it and wait until ready for next packet */ + if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE) + { + Endpoint_ClearIN(); + + while (!(Endpoint_IsINReady())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + } + + /* Read the flash word and send it via USB to the host */ + #if (FLASHEND > 0xFFFF) + Endpoint_Write_Word_LE(pgm_read_word_far(CurrFlashAddress.Long)); + #else + Endpoint_Write_Word_LE(pgm_read_word(CurrFlashAddress.Long)); + #endif + + /* Adjust counters */ + CurrFlashAddress.Long += 2; + } + + /* Once reading is complete, start address equals the end address */ + StartAddr = EndAddr; + } + else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x02)) // Read EEPROM + { + while (BytesRemaining--) + { + /* Check if endpoint is full - if so clear it and wait until ready for next packet */ + if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE) + { + Endpoint_ClearIN(); + + while (!(Endpoint_IsINReady())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + } + + /* Read the EEPROM byte and send it via USB to the host */ + Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)StartAddr)); + + /* Adjust counters */ + StartAddr++; + } + } + + /* Return to idle state */ + DFU_State = dfuIDLE; + } + + Endpoint_ClearIN(); + + Endpoint_ClearStatusStage(); + break; + case DFU_GETSTATUS: + Endpoint_ClearSETUP(); + + /* Write 8-bit status value */ + Endpoint_Write_Byte(DFU_Status); + + /* Write 24-bit poll timeout value */ + Endpoint_Write_Byte(0); + Endpoint_Write_Word_LE(0); + + /* Write 8-bit state value */ + Endpoint_Write_Byte(DFU_State); + + /* Write 8-bit state string ID number */ + Endpoint_Write_Byte(0); + + Endpoint_ClearIN(); + + Endpoint_ClearStatusStage(); + break; + case DFU_CLRSTATUS: + Endpoint_ClearSETUP(); + + /* Reset the status value variable to the default OK status */ + DFU_Status = OK; + + Endpoint_ClearStatusStage(); + break; + case DFU_GETSTATE: + Endpoint_ClearSETUP(); + + /* Write the current device state to the endpoint */ + Endpoint_Write_Byte(DFU_State); + + Endpoint_ClearIN(); + + Endpoint_ClearStatusStage(); + break; + case DFU_ABORT: + Endpoint_ClearSETUP(); + + /* Turn off TX/RX status LEDs so that they're not left on when application starts */ + LEDs_TurnOffLEDs(LEDMASK_TX); + LEDs_TurnOffLEDs(LEDMASK_RX); + + /* Reset the current state variable to the default idle state */ + DFU_State = dfuIDLE; + + Endpoint_ClearStatusStage(); + break; + } +} + +/** Routine to discard the specified number of bytes from the control endpoint stream. This is used to + * discard unused bytes in the stream from the host, including the memory program block suffix. + * + * \param[in] NumberOfBytes Number of bytes to discard from the host from the control endpoint + */ +static void DiscardFillerBytes(uint8_t NumberOfBytes) +{ + while (NumberOfBytes--) + { + if (!(Endpoint_BytesInEndpoint())) + { + Endpoint_ClearOUT(); + + /* Wait until next data packet received */ + while (!(Endpoint_IsOUTReceived())) + { + if (USB_DeviceState == DEVICE_STATE_Unattached) + return; + } + } + else + { + Endpoint_Discard_Byte(); + } + } +} + +/** Routine to process an issued command from the host, via a DFU_DNLOAD request wrapper. This routine ensures + * that the command is allowed based on the current secure mode flag value, and passes the command off to the + * appropriate handler function. + */ +static void ProcessBootloaderCommand(void) +{ + /* Check if device is in secure mode */ +// if (IsSecure) +// { +// /* Don't process command unless it is a READ or chip erase command */ +// if (!(((SentCommand.Command == COMMAND_WRITE) && +// IS_TWOBYTE_COMMAND(SentCommand.Data, 0x00, 0xFF)) || +// (SentCommand.Command == COMMAND_READ))) +// { +// /* Set the state and status variables to indicate the error */ +// DFU_State = dfuERROR; +// DFU_Status = errWRITE; +// +// /* Stall command */ +// Endpoint_StallTransaction(); +// +// /* Don't process the command */ +// return; +// } +// } + + /* Dispatch the required command processing routine based on the command type */ + switch (SentCommand.Command) + { + case COMMAND_PROG_START: + ProcessMemProgCommand(); + break; + case COMMAND_DISP_DATA: + ProcessMemReadCommand(); + break; + case COMMAND_WRITE: + ProcessWriteCommand(); + break; + case COMMAND_READ: + ProcessReadCommand(); + break; + case COMMAND_CHANGE_BASE_ADDR: + if (IS_TWOBYTE_COMMAND(SentCommand.Data, 0x03, 0x00)) // Set 64KB flash page command + Flash64KBPage = SentCommand.Data[2]; + break; + } +} + +/** Routine to concatenate the given pair of 16-bit memory start and end addresses from the host, and store them + * in the StartAddr and EndAddr global variables. + */ +static void LoadStartEndAddresses(void) +{ + union + { + uint8_t Bytes[2]; + uint16_t Word; + } Address[2] = {{.Bytes = {SentCommand.Data[2], SentCommand.Data[1]}}, + {.Bytes = {SentCommand.Data[4], SentCommand.Data[3]}}}; + + /* Load in the start and ending read addresses from the sent data packet */ + StartAddr = Address[0].Word; + EndAddr = Address[1].Word; +} + +/** Handler for a Memory Program command issued by the host. This routine handles the preparations needed + * to write subsequent data from the host into the specified memory. + */ +static void ProcessMemProgCommand(void) +{ + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00) || // Write FLASH command + IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Write EEPROM command + { + /* Load in the start and ending read addresses */ + LoadStartEndAddresses(); + + /* If FLASH is being written to, we need to pre-erase the first page to write to */ + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) + { + union + { + uint16_t Words[2]; + uint32_t Long; + } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}}; + + /* Erase the current page's temp buffer */ + boot_page_erase(CurrFlashAddress.Long); + boot_spm_busy_wait(); + } + + /* Set the state so that the next DNLOAD requests reads in the firmware */ + DFU_State = dfuDNLOAD_IDLE; + } +} + +/** Handler for a Memory Read command issued by the host. This routine handles the preparations needed + * to read subsequent data from the specified memory out to the host, as well as implementing the memory + * blank check command. + */ +static void ProcessMemReadCommand(void) +{ + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00) || // Read FLASH command + IS_ONEBYTE_COMMAND(SentCommand.Data, 0x02)) // Read EEPROM command + { + /* Load in the start and ending read addresses */ + LoadStartEndAddresses(); + + /* Set the state so that the next UPLOAD requests read out the firmware */ + DFU_State = dfuUPLOAD_IDLE; + } + else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Blank check FLASH command + { + uint32_t CurrFlashAddress = 0; + + while (CurrFlashAddress < BOOT_START_ADDR) + { + /* Check if the current byte is not blank */ + #if (FLASHEND > 0xFFFF) + if (pgm_read_byte_far(CurrFlashAddress) != 0xFF) + #else + if (pgm_read_byte(CurrFlashAddress) != 0xFF) + #endif + { + /* Save the location of the first non-blank byte for response back to the host */ + Flash64KBPage = (CurrFlashAddress >> 16); + StartAddr = CurrFlashAddress; + + /* Set state and status variables to the appropriate error values */ + DFU_State = dfuERROR; + DFU_Status = errCHECK_ERASED; + + break; + } + + CurrFlashAddress++; + } + } +} + +/** Handler for a Data Write command issued by the host. This routine handles non-programming commands such as + * bootloader exit (both via software jumps and hardware watchdog resets) and flash memory erasure. + */ +static void ProcessWriteCommand(void) +{ + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x03)) // Start application + { + /* Indicate that the bootloader is terminating */ + WaitForExit = true; + + /* Check if data supplied for the Start Program command - no data executes the program */ + if (SentCommand.DataSize) + { + if (SentCommand.Data[1] == 0x01) // Start via jump + { + union + { + uint8_t Bytes[2]; + AppPtr_t FuncPtr; + } Address = {.Bytes = {SentCommand.Data[4], SentCommand.Data[3]}}; + + /* Load in the jump address into the application start address pointer */ + AppStartPtr = Address.FuncPtr; + } + } + else + { + if (SentCommand.Data[1] == 0x00) // Start via watchdog + { + /* Start the watchdog to reset the AVR once the communications are finalized */ + wdt_enable(WDTO_250MS); + } + else // Start via jump + { + /* Set the flag to terminate the bootloader at next opportunity */ + RunBootloader = false; + } + } + } + else if (IS_TWOBYTE_COMMAND(SentCommand.Data, 0x00, 0xFF)) // Erase flash + { + uint32_t CurrFlashAddress = 0; + + /* Clear the application section of flash */ + while (CurrFlashAddress < BOOT_START_ADDR) + { + boot_page_erase(CurrFlashAddress); + boot_spm_busy_wait(); + boot_page_write(CurrFlashAddress); + boot_spm_busy_wait(); + + CurrFlashAddress += SPM_PAGESIZE; + } + + /* Re-enable the RWW section of flash as writing to the flash locks it out */ + boot_rww_enable(); + + /* Memory has been erased, reset the security bit so that programming/reading is allowed */ +// IsSecure = false; + } +} + +/** Handler for a Data Read command issued by the host. This routine handles bootloader information retrieval + * commands such as device signature and bootloader version retrieval. + */ +static void ProcessReadCommand(void) +{ + const uint8_t BootloaderInfo[3] = {BOOTLOADER_VERSION, BOOTLOADER_ID_BYTE1, BOOTLOADER_ID_BYTE2}; + const uint8_t SignatureInfo[3] = {AVR_SIGNATURE_1, AVR_SIGNATURE_2, AVR_SIGNATURE_3}; + + uint8_t DataIndexToRead = SentCommand.Data[1]; + + if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Read bootloader info + ResponseByte = BootloaderInfo[DataIndexToRead]; + else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Read signature byte + ResponseByte = SignatureInfo[DataIndexToRead - 0x30]; +} diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.h b/test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.h new file mode 100644 index 0000000..4fb236e --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/Arduino-usbdfu.h @@ -0,0 +1,220 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Arduino-usbdfu.c. + */ + +#ifndef _ARDUINO_USB_DFU_BOOTLOADER_H_ +#define _ARDUINO_USB_DFU_BOOTLOADER_H_ + + /* Includes: */ + #include + #include + #include + #include + #include + #include + #include + #include + + #include "Descriptors.h" + + #include + #include + + /* Macros: */ + /** LED mask for the library LED driver, to indicate TX activity. */ + #define LEDMASK_TX LEDS_LED1 + + /** LED mask for the library LED driver, to indicate RX activity. */ + #define LEDMASK_RX LEDS_LED2 + + /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ + #define LEDMASK_ERROR (LEDS_LED1 | LEDS_LED2) + + /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ + #define LEDMASK_BUSY (LEDS_LED1 | LEDS_LED2) + + /** Configuration define. Define this token to true to case the bootloader to reject all memory commands + * until a memory erase has been performed. When used in conjunction with the lockbits of the AVR, this + * can protect the AVR's firmware from being dumped from a secured AVR. When false, memory operations are + * allowed at any time. + */ +// #define SECURE_MODE false + + /** Major bootloader version number. */ + #define BOOTLOADER_VERSION_MINOR 2 + + /** Minor bootloader version number. */ + #define BOOTLOADER_VERSION_REV 0 + + /** Complete bootloader version number expressed as a packed byte, constructed from the + * two individual bootloader version macros. + */ + #define BOOTLOADER_VERSION ((BOOTLOADER_VERSION_MINOR << 4) | BOOTLOADER_VERSION_REV) + + /** First byte of the bootloader identification bytes, used to identify a device's bootloader. */ + #define BOOTLOADER_ID_BYTE1 0xDC + + /** Second byte of the bootloader identification bytes, used to identify a device's bootloader. */ + #define BOOTLOADER_ID_BYTE2 0xFB + + /** Convenience macro, used to determine if the issued command is the given one-byte long command. + * + * \param[in] dataarr Command byte array to check against + * \param[in] cb1 First command byte to check + */ + #define IS_ONEBYTE_COMMAND(dataarr, cb1) (dataarr[0] == (cb1)) + + /** Convenience macro, used to determine if the issued command is the given two-byte long command. + * + * \param[in] dataarr Command byte array to check against + * \param[in] cb1 First command byte to check + * \param[in] cb2 Second command byte to check + */ + #define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == (cb1)) && (dataarr[1] == (cb2))) + + /** Length of the DFU file suffix block, appended to the end of each complete memory write command. + * The DFU file suffix is currently unused (but is designed to give extra file information, such as + * a CRC of the complete firmware for error checking) and so is discarded. + */ + #define DFU_FILE_SUFFIX_SIZE 16 + + /** Length of the DFU file filler block, appended to the start of each complete memory write command. + * Filler bytes are added to the start of each complete memory write command, and must be discarded. + */ + #define DFU_FILLER_BYTES_SIZE 26 + + /** DFU class command request to detach from the host. */ + #define DFU_DETATCH 0x00 + + /** DFU class command request to send data from the host to the bootloader. */ + #define DFU_DNLOAD 0x01 + + /** DFU class command request to send data from the bootloader to the host. */ + #define DFU_UPLOAD 0x02 + + /** DFU class command request to get the current DFU status and state from the bootloader. */ + #define DFU_GETSTATUS 0x03 + + /** DFU class command request to reset the current DFU status and state variables to their defaults. */ + #define DFU_CLRSTATUS 0x04 + + /** DFU class command request to get the current DFU state of the bootloader. */ + #define DFU_GETSTATE 0x05 + + /** DFU class command request to abort the current multi-request transfer and return to the dfuIDLE state. */ + #define DFU_ABORT 0x06 + + /** DFU command to begin programming the device's memory. */ + #define COMMAND_PROG_START 0x01 + + /** DFU command to begin reading the device's memory. */ + #define COMMAND_DISP_DATA 0x03 + + /** DFU command to issue a write command. */ + #define COMMAND_WRITE 0x04 + + /** DFU command to issue a read command. */ + #define COMMAND_READ 0x05 + + /** DFU command to issue a memory base address change command, to set the current 64KB flash page + * that subsequent flash operations should use. */ + #define COMMAND_CHANGE_BASE_ADDR 0x06 + + /* Type Defines: */ + /** Type define for a non-returning function pointer to the loaded application. */ + typedef void (*AppPtr_t)(void) ATTR_NO_RETURN; + + /** Type define for a structure containing a complete DFU command issued by the host. */ + typedef struct + { + uint8_t Command; /**< Single byte command to perform, one of the COMMAND_* macro values */ + uint8_t Data[5]; /**< Command parameters */ + uint16_t DataSize; /**< Size of the command parameters */ + } DFU_Command_t; + + /* Enums: */ + /** DFU bootloader states. Refer to the DFU class specification for information on each state. */ + enum DFU_State_t + { + appIDLE = 0, + appDETACH = 1, + dfuIDLE = 2, + dfuDNLOAD_SYNC = 3, + dfuDNBUSY = 4, + dfuDNLOAD_IDLE = 5, + dfuMANIFEST_SYNC = 6, + dfuMANIFEST = 7, + dfuMANIFEST_WAIT_RESET = 8, + dfuUPLOAD_IDLE = 9, + dfuERROR = 10 + }; + + /** DFU command status error codes. Refer to the DFU class specification for information on each error code. */ + enum DFU_Status_t + { + OK = 0, + errTARGET = 1, + errFILE = 2, + errWRITE = 3, + errERASE = 4, + errCHECK_ERASED = 5, + errPROG = 6, + errVERIFY = 7, + errADDRESS = 8, + errNOTDONE = 9, + errFIRMWARE = 10, + errVENDOR = 11, + errUSBR = 12, + errPOR = 13, + errUNKNOWN = 14, + errSTALLEDPKT = 15 + }; + + /* Function Prototypes: */ + void SetupHardware(void); + void ResetHardware(void); + + void EVENT_USB_Device_UnhandledControlRequest(void); + + #if defined(INCLUDE_FROM_BOOTLOADER_C) + static void DiscardFillerBytes(uint8_t NumberOfBytes); + static void ProcessBootloaderCommand(void); + static void LoadStartEndAddresses(void); + static void ProcessMemProgCommand(void); + static void ProcessMemReadCommand(void); + static void ProcessWriteCommand(void); + static void ProcessReadCommand(void); + #endif + +#endif /* _ARDUINO_USB_DFU_BOOTLOADER_H_ */ diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/Board/LEDs.h b/test/ardmake/hardware/firmwares/arduino-usbdfu/Board/LEDs.h new file mode 100644 index 0000000..152e8f5 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/Board/LEDs.h @@ -0,0 +1,110 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/* + Board LEDs driver for the Benito board, from www.dorkbotpdx.org. +*/ + +#ifndef __LEDS_ARDUINOUNO_H__ +#define __LEDS_ARDUINOUNO_H__ + + /* Includes: */ + #include + +/* Enable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + extern "C" { + #endif + + /* Preprocessor Checks: */ + #if !defined(INCLUDE_FROM_LEDS_H) + #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. + #endif + + /* Public Interface - May be used in end-application: */ + /* Macros: */ + /** LED mask for the first LED on the board. */ + #define LEDS_LED1 (1 << 5) + + /** LED mask for the second LED on the board. */ + #define LEDS_LED2 (1 << 4) + + /** LED mask for all the LEDs on the board. */ + #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2) + + /** LED mask for the none of the board LEDs */ + #define LEDS_NO_LEDS 0 + + /* Inline Functions: */ + #if !defined(__DOXYGEN__) + static inline void LEDs_Init(void) + { + DDRD |= LEDS_ALL_LEDS; + PORTD |= LEDS_ALL_LEDS; + } + + static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + { + PORTD &= ~LEDMask; + } + + static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + { + PORTD |= LEDMask; + } + + static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + { + PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask); + } + + static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + { + PORTD = ((PORTD | ActiveMask) & ~LEDMask); + } + + static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + { + PORTD ^= LEDMask; + } + + static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; + static inline uint8_t LEDs_GetLEDs(void) + { + return (PORTD & LEDS_ALL_LEDS); + } + #endif + + /* Disable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + } + #endif + +#endif diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.c b/test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.c new file mode 100644 index 0000000..4deaa06 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.c @@ -0,0 +1,189 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * USB Device Descriptors, for library use when in USB device mode. Descriptors are special + * computer-readable structures which the host requests upon device enumeration, to determine + * the device's capabilities and functions. + */ + +#include "Descriptors.h" + +/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall + * device characteristics, including the supported USB version, control endpoint size and the + * number of device configurations. The descriptor is read out by the USB host when the enumeration + * process begins. + */ +USB_Descriptor_Device_t DeviceDescriptor = +{ + .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, + + .USBSpecification = VERSION_BCD(01.10), + .Class = 0x00, + .SubClass = 0x00, + .Protocol = 0x00, + + .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, + + .VendorID = 0x03EB, // Atmel + .ProductID = PRODUCT_ID_CODE, // MCU-dependent + .ReleaseNumber = 0x0000, + + .ManufacturerStrIndex = NO_DESCRIPTOR, + .ProductStrIndex = 0x01, + .SerialNumStrIndex = NO_DESCRIPTOR, + + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS +}; + +/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage + * of the device in one of its supported configurations, including information about any device interfaces + * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting + * a configuration so that the host may correctly communicate with the USB device. + */ +USB_Descriptor_Configuration_t ConfigurationDescriptor = +{ + .Config = + { + .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, + + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), + .TotalInterfaces = 1, + + .ConfigurationNumber = 1, + .ConfigurationStrIndex = NO_DESCRIPTOR, + + .ConfigAttributes = USB_CONFIG_ATTR_BUSPOWERED, + + .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) + }, + + .DFU_Interface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = 0, + .AlternateSetting = 0, + + .TotalEndpoints = 0, + + .Class = 0xFE, + .SubClass = 0x01, + .Protocol = 0x02, + + .InterfaceStrIndex = NO_DESCRIPTOR + }, + + .DFU_Functional = + { + .Header = {.Size = sizeof(USB_DFU_Functional_Descriptor_t), .Type = DTYPE_DFUFunctional}, + + .Attributes = (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD), + + .DetachTimeout = 0x0000, + .TransferSize = 0x0c00, + + .DFUSpecification = VERSION_BCD(01.01) + } +}; + +/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests + * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate + * via the language ID table available at USB.org what languages the device supports for its string descriptors. + */ +USB_Descriptor_String_t LanguageString = +{ + .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, + + .UnicodeString = {LANGUAGE_ID_ENG} +}; + +/** Product descriptor string. This is a Unicode string containing the product's details in human readable form, + * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +USB_Descriptor_String_t ProductString = +{ + #if (ARDUINO_MODEL_PID == ARDUINO_UNO_PID) + .Header = {.Size = USB_STRING_LEN(15), .Type = DTYPE_String}, + + .UnicodeString = L"Arduino Uno DFU" + #elif (ARDUINO_MODEL_PID == ARDUINO_MEGA2560_PID) + .Header = {.Size = USB_STRING_LEN(21), .Type = DTYPE_String}, + + .UnicodeString = L"Arduino Mega 2560 DFU" + #endif +}; + +/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" + * documentation) by the application code so that the address and size of a requested descriptor can be given + * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function + * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the + * USB host. + */ +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) +{ + const uint8_t DescriptorType = (wValue >> 8); + const uint8_t DescriptorNumber = (wValue & 0xFF); + + void* Address = NULL; + uint16_t Size = NO_DESCRIPTOR; + + switch (DescriptorType) + { + case DTYPE_Device: + Address = &DeviceDescriptor; + Size = sizeof(USB_Descriptor_Device_t); + break; + case DTYPE_Configuration: + Address = &ConfigurationDescriptor; + Size = sizeof(USB_Descriptor_Configuration_t); + break; + case DTYPE_String: + if (!(DescriptorNumber)) + { + Address = &LanguageString; + Size = LanguageString.Header.Size; + } + else + { + Address = &ProductString; + Size = ProductString.Header.Size; + } + + break; + } + + *DescriptorAddress = Address; + return Size; +} diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.h b/test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.h new file mode 100644 index 0000000..6c93f20 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/Descriptors.h @@ -0,0 +1,177 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Descriptors.c. + */ + +#ifndef _DESCRIPTORS_H_ +#define _DESCRIPTORS_H_ + + /* Includes: */ + #include + + /* Product-specific definitions: */ + #define ARDUINO_UNO_PID 0x0001 + #define ARDUINO_MEGA2560_PID 0x0010 + + /* Macros: */ + /** Descriptor type value for a DFU class functional descriptor. */ + #define DTYPE_DFUFunctional 0x21 + + /** DFU attribute mask, indicating that the DFU device will detach and re-attach when a DFU_DETACH + * command is issued, rather than the host issuing a USB Reset. + */ + #define ATTR_WILL_DETATCH (1 << 3) + + /** DFU attribute mask, indicating that the DFU device can communicate during the manifestation phase + * (memory programming phase). + */ + #define ATTR_MANEFESTATION_TOLLERANT (1 << 2) + + /** DFU attribute mask, indicating that the DFU device can accept DFU_UPLOAD requests to send data from + * the device to the host. + */ + #define ATTR_CAN_UPLOAD (1 << 1) + + /** DFU attribute mask, indicating that the DFU device can accept DFU_DNLOAD requests to send data from + * the host to the device. + */ + #define ATTR_CAN_DOWNLOAD (1 << 0) + + #if defined(__AVR_AT90USB1287__) + #define PRODUCT_ID_CODE 0x2FFB + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x97 + #define AVR_SIGNATURE_3 0x82 + #elif defined(__AVR_AT90USB1286__) + #define PRODUCT_ID_CODE 0x2FFB + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x97 + #define AVR_SIGNATURE_3 0x82 + #elif defined(__AVR_AT90USB647__) + #define PRODUCT_ID_CODE 0x2FF9 + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x96 + #define AVR_SIGNATURE_3 0x82 + #elif defined(__AVR_AT90USB646__) + #define PRODUCT_ID_CODE 0x2FF9 + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x96 + #define AVR_SIGNATURE_3 0x82 + #elif defined(__AVR_ATmega32U6__) + #define PRODUCT_ID_CODE 0x2FFB + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x95 + #define AVR_SIGNATURE_3 0x88 + #elif defined(__AVR_ATmega32U4__) + #define PRODUCT_ID_CODE 0x2FF4 + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x95 + #define AVR_SIGNATURE_3 0x87 + #elif defined(__AVR_ATmega32U2__) + #define PRODUCT_ID_CODE 0x2FF0 + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x95 + #define AVR_SIGNATURE_3 0x8A + #elif defined(__AVR_ATmega16U4__) + #define PRODUCT_ID_CODE 0x2FF3 + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x94 + #define AVR_SIGNATURE_3 0x88 + #elif defined(__AVR_ATmega16U2__) + #define PRODUCT_ID_CODE 0x2FEF + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x94 + #define AVR_SIGNATURE_3 0x89 + #elif defined(__AVR_AT90USB162__) + #define PRODUCT_ID_CODE 0x2FFA + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x94 + #define AVR_SIGNATURE_3 0x82 + #elif defined(__AVR_AT90USB82__) + #define PRODUCT_ID_CODE 0x2FEE + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x93 + #define AVR_SIGNATURE_3 0x89 + #elif defined(__AVR_ATmega8U2__) + #define PRODUCT_ID_CODE 0x2FF7 + #define AVR_SIGNATURE_1 0x1E + #define AVR_SIGNATURE_2 0x93 + #define AVR_SIGNATURE_3 0x82 + #else + #error The selected AVR part is not currently supported by this bootloader. + #endif + + #if !defined(PRODUCT_ID_CODE) + #error Current AVR model is not supported by this bootloader. + #endif + + /* Type Defines: */ + /** Type define for a DFU class function descriptor. This descriptor gives DFU class information + * to the host when read, indicating the DFU device's capabilities. + */ + typedef struct + { + USB_Descriptor_Header_t Header; /**< Standard descriptor header structure */ + + uint8_t Attributes; /**< DFU device attributes, a mask comprising of the + * ATTR_* macros listed in this source file + */ + uint16_t DetachTimeout; /**< Timeout in milliseconds between a USB_DETACH + * command being issued and the device detaching + * from the USB bus + */ + uint16_t TransferSize; /**< Maximum number of bytes the DFU device can accept + * from the host in a transaction + */ + uint16_t DFUSpecification; /**< BCD packed DFU specification number this DFU + * device complies with + */ + } USB_DFU_Functional_Descriptor_t; + + /** Type define for the device configuration descriptor structure. This must be defined in the + * application code, as the configuration descriptor contains several sub-descriptors which + * vary between devices, and which describe the device's usage to the host. + */ + typedef struct + { + USB_Descriptor_Configuration_Header_t Config; + USB_Descriptor_Interface_t DFU_Interface; + USB_DFU_Functional_Descriptor_t DFU_Functional; + } USB_Descriptor_Configuration_t; + + /* Function Prototypes: */ + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + +#endif diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/makefile b/test/ardmake/hardware/firmwares/arduino-usbdfu/makefile new file mode 100644 index 0000000..1fb4ed3 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/makefile @@ -0,0 +1,710 @@ +# Hey Emacs, this is a -*- makefile -*- +#---------------------------------------------------------------------------- +# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al. +# >> Modified for use with the LUFA project. << +# +# Released to the Public Domain +# +# Additional material for this makefile was written by: +# Peter Fleury +# Tim Henigan +# Colin O'Flynn +# Reiner Patommel +# Markus Pfaff +# Sander Pool +# Frederik Rouleau +# Carlos Lamas +# Dean Camera +# Opendous Inc. +# Denver Gingerich +# +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device, using avrdude. +# Please customize the avrdude settings below first! +# +# make doxygen = Generate DoxyGen documentation for the project (must have +# DoxyGen installed) +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + + +# MCU name +MCU = atmega8u2 +MCU_AVRDUDE = at90usb82 + +# Specify the Arduino model using the assigned PID. This is used by Descriptors.c +# to set the product descriptor string (for DFU we must use the PID for each +# chip that dfu-bootloader or Flip expect) +# Uno PID: +ARDUINO_MODEL_PID = 0x0001 +# Mega 2560 PID: +#ARDUINO_MODEL_PID = 0x0010 + +# Target board (see library "Board Types" documentation, NONE for projects not requiring +# LUFA board drivers). If USER is selected, put custom board drivers in a directory called +# "Board" inside the application directory. +BOARD = USER + + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_CLOCK below, as it is sourced by +# F_CLOCK after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# Input clock frequency. +# This will define a symbol, F_CLOCK, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_CLOCK = $(F_CPU) + + +# Starting byte address of the bootloader, as a byte address - computed via the formula +# BOOT_START = ((TOTAL_FLASH_BYTES - BOOTLOADER_SECTION_SIZE_BYTES) * 1024) +# +# Note that the bootloader size and start address given in AVRStudio is in words and not +# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC. +BOOT_START = 0x1000 + + +# Output format. (can be srec, ihex, binary) +FORMAT = ihex + + +# Target file name (without extension). +TARGET = Arduino-usbdfu + + +# Object files directory +# To put object files in current directory, use a dot (.), do NOT make +# this an empty or blank macro! +OBJDIR = . + + +# Path to the LUFA library +LUFA_PATH = ../.. + + +# LUFA library compile-time options and predefined tokens +LUFA_OPTS = -D USB_DEVICE_ONLY +LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0 +LUFA_OPTS += -D CONTROL_ONLY_DEVICE +LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=32 +LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 +LUFA_OPTS += -D USE_RAM_DESCRIPTORS +LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS += -D NO_INTERNAL_SERIAL +LUFA_OPTS += -D NO_DEVICE_SELF_POWER +LUFA_OPTS += -D NO_DEVICE_REMOTE_WAKEUP +LUFA_OPTS += -D NO_STREAM_CALLBACKS + + +# Create the LUFA source path variables by including the LUFA root makefile +include $(LUFA_PATH)/LUFA/makefile + + +# List C source files here. (C dependencies are automatically generated.) +SRC = $(TARGET).c \ + Descriptors.c \ + $(LUFA_SRC_USB) \ + + +# List C++ source files here. (C dependencies are automatically generated.) +CPPSRC = + + +# List Assembler source files here. +# Make them always end in a capital .S. Files ending in a lowercase .s +# will not be considered source files but generated files (assembler +# output from the compiler), and will be deleted upon "make clean"! +# Even though the DOS/Win* filesystem matches both .s and .S the same, +# it will preserve the spelling of the filenames, and gcc itself does +# care about how the name is spelled on its command-line. +ASRC = + + +# Optimization level, can be [0, 1, 2, 3, s]. +# 0 = turn off optimization. s = optimize for size. +# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) +OPT = s + + +# Debugging format. +# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. +# AVR Studio 4.10 requires dwarf-2. +# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. +DEBUG = dwarf-2 + + +# List any extra directories to look for include files here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRAINCDIRS = $(LUFA_PATH)/ + + +# Compiler flag to set the C Standard level. +# c89 = "ANSI" C +# gnu89 = c89 plus GCC extensions +# c99 = ISO C99 standard (not yet fully implemented) +# gnu99 = c99 plus GCC extensions +CSTANDARD = -std=c99 + + +# Place -D or -U options here for C sources +CDEFS = -DF_CPU=$(F_CPU)UL +CDEFS += -DARDUINO_MODEL_PID=$(ARDUINO_MODEL_PID) +CDEFS += -DF_CLOCK=$(F_CLOCK)UL +CDEFS += -DBOARD=BOARD_$(BOARD) +CDEFS += -DBOOT_START_ADDR=$(BOOT_START)UL +CDEFS += -DTX_RX_LED_PULSE_MS=3 +CDEFS += $(LUFA_OPTS) + + +# Place -D or -U options here for ASM sources +ADEFS = -DF_CPU=$(F_CPU) +ADEFS += -DF_CLOCK=$(F_CLOCK)UL +ADEFS += -DBOARD=BOARD_$(BOARD) +CDEFS += -DBOOT_START_ADDR=$(BOOT_START)UL +ADEFS += $(LUFA_OPTS) + +# Place -D or -U options here for C++ sources +CPPDEFS = -DF_CPU=$(F_CPU)UL +CPPDEFS += -DF_CLOCK=$(F_CLOCK)UL +CPPDEFS += -DBOARD=BOARD_$(BOARD) +CDEFS += -DBOOT_START_ADDR=$(BOOT_START)UL +CPPDEFS += $(LUFA_OPTS) +#CPPDEFS += -D__STDC_LIMIT_MACROS +#CPPDEFS += -D__STDC_CONSTANT_MACROS + + + +#---------------- Compiler Options C ---------------- +# -g*: generate debugging information +# -O*: optimization level +# -f...: tuning, see GCC manual and avr-libc documentation +# -Wall...: warning level +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns...: create assembler listing +CFLAGS = -g$(DEBUG) +CFLAGS += $(CDEFS) +CFLAGS += -O$(OPT) +CFLAGS += -funsigned-char +CFLAGS += -funsigned-bitfields +CFLAGS += -ffunction-sections +CFLAGS += -fno-inline-small-functions +CFLAGS += -fpack-struct +CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing +CFLAGS += -Wall +CFLAGS += -Wstrict-prototypes +#CFLAGS += -mshort-calls +#CFLAGS += -fno-unit-at-a-time +#CFLAGS += -Wundef +#CFLAGS += -Wunreachable-code +#CFLAGS += -Wsign-compare +CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) +CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +CFLAGS += $(CSTANDARD) + + +#---------------- Compiler Options C++ ---------------- +# -g*: generate debugging information +# -O*: optimization level +# -f...: tuning, see GCC manual and avr-libc documentation +# -Wall...: warning level +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns...: create assembler listing +CPPFLAGS = -g$(DEBUG) +CPPFLAGS += $(CPPDEFS) +CPPFLAGS += -O$(OPT) +CPPFLAGS += -funsigned-char +CPPFLAGS += -funsigned-bitfields +CPPFLAGS += -fpack-struct +CPPFLAGS += -fshort-enums +CPPFLAGS += -fno-exceptions +CPPFLAGS += -Wall +CPPFLAGS += -Wundef +#CPPFLAGS += -mshort-calls +#CPPFLAGS += -fno-unit-at-a-time +#CPPFLAGS += -Wstrict-prototypes +#CPPFLAGS += -Wunreachable-code +#CPPFLAGS += -Wsign-compare +CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) +CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +#CPPFLAGS += $(CSTANDARD) + + +#---------------- Assembler Options ---------------- +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns: create listing +# -gstabs: have the assembler create line number information; note that +# for use in COFF files, additional information about filenames +# and function names needs to be present in the assembler source +# files -- see avr-libc docs [FIXME: not yet described there] +# -listing-cont-lines: Sets the maximum number of continuation lines of hex +# dump that will be displayed for a given single line of source input. +ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 + + +#---------------- Library Options ---------------- +# Minimalistic printf version +PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min + +# Floating point printf version (requires MATH_LIB = -lm below) +PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt + +# If this is left blank, then it will use the Standard printf version. +PRINTF_LIB = +#PRINTF_LIB = $(PRINTF_LIB_MIN) +#PRINTF_LIB = $(PRINTF_LIB_FLOAT) + + +# Minimalistic scanf version +SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min + +# Floating point + %[ scanf version (requires MATH_LIB = -lm below) +SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt + +# If this is left blank, then it will use the Standard scanf version. +SCANF_LIB = +#SCANF_LIB = $(SCANF_LIB_MIN) +#SCANF_LIB = $(SCANF_LIB_FLOAT) + + +MATH_LIB = -lm + + +# List any extra directories to look for libraries here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRALIBDIRS = + + + +#---------------- External Memory Options ---------------- + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# used for variables (.data/.bss) and heap (malloc()). +#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# only used for heap (malloc()). +#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff + +EXTMEMOPTS = + + + +#---------------- Linker Options ---------------- +# -Wl,...: tell GCC to pass this to linker. +# -Map: create map file +# --cref: add cross reference to map file +LDFLAGS = -Wl,-Map=$(TARGET).map,--cref +LDFLAGS += -Wl,--section-start=.text=$(BOOT_START) +LDFLAGS += -Wl,--relax +LDFLAGS += -Wl,--gc-sections +LDFLAGS += $(EXTMEMOPTS) +LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) +LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) +#LDFLAGS += -T linker_script.x + + + +#---------------- Programming Options (avrdude) ---------------- + +# Fuse settings for Arduino Uno DFU bootloader project +AVRDUDE_FUSES = -U efuse:w:0xF4:m -U hfuse:w:0xD9:m -U lfuse:w:0xFF:m + +# Lock settings for Arduino Uno DFU bootloader project +AVRDUDE_LOCK = -U lock:w:0x0F:m + +# Programming hardware +# Type: avrdude -c ? +# to get a full listing. +# +AVRDUDE_PROGRAMMER = avrispmkii + +# com1 = serial port. Use lpt1 to connect to parallel port. +AVRDUDE_PORT = usb + +AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex +#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep + +# Uncomment the following if you want avrdude's erase cycle counter. +# Note that this counter needs to be initialized first using -Yn, +# see avrdude manual. +#AVRDUDE_ERASE_COUNTER = -y + +# Uncomment the following if you do /not/ wish a verification to be +# performed after programming the device. +#AVRDUDE_NO_VERIFY = -V + +# Increase verbosity level. Please use this when submitting bug +# reports about avrdude. See +# to submit bug reports. +#AVRDUDE_VERBOSE = -v -v + +AVRDUDE_FLAGS = -p $(MCU_AVRDUDE) -F -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) +AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) +AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) +AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) + + + +#---------------- Debugging Options ---------------- + +# For simulavr only - target MCU frequency. +DEBUG_MFREQ = $(F_CPU) + +# Set the DEBUG_UI to either gdb or insight. +# DEBUG_UI = gdb +DEBUG_UI = insight + +# Set the debugging back-end to either avarice, simulavr. +DEBUG_BACKEND = avarice +#DEBUG_BACKEND = simulavr + +# GDB Init Filename. +GDBINIT_FILE = __avr_gdbinit + +# When using avarice settings for the JTAG +JTAG_DEV = /dev/com1 + +# Debugging port used to communicate between GDB / avarice / simulavr. +DEBUG_PORT = 4242 + +# Debugging host used to communicate between GDB / avarice / simulavr, normally +# just set to localhost unless doing some sort of crazy debugging when +# avarice is running on a different computer. +DEBUG_HOST = localhost + + + +#============================================================================ + + +# Define programs and commands. +SHELL = sh +CC = avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +SIZE = avr-size +AR = avr-ar rcs +NM = avr-nm +AVRDUDE = avrdude +REMOVE = rm -f +REMOVEDIR = rm -rf +COPY = cp +WINSHELL = cmd + + +# Define Messages +# English +MSG_ERRORS_NONE = Errors: none +MSG_BEGIN = -------- begin -------- +MSG_END = -------- end -------- +MSG_SIZE_BEFORE = Size before: +MSG_SIZE_AFTER = Size after: +MSG_COFF = Converting to AVR COFF: +MSG_EXTENDED_COFF = Converting to AVR Extended COFF: +MSG_FLASH = Creating load file for Flash: +MSG_EEPROM = Creating load file for EEPROM: +MSG_EXTENDED_LISTING = Creating Extended Listing: +MSG_SYMBOL_TABLE = Creating Symbol Table: +MSG_LINKING = Linking: +MSG_COMPILING = Compiling C: +MSG_COMPILING_CPP = Compiling C++: +MSG_ASSEMBLING = Assembling: +MSG_CLEANING = Cleaning project: +MSG_CREATING_LIBRARY = Creating library: + + + + +# Define all object files. +OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) + +# Define all listing files. +LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) + + +# Compiler flags to generate dependency files. +GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d + + +# Combine all necessary flags and optional flags. +# Add target processor to flags. +ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) +ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) +ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) + + + + + +# Default target. +all: begin gccversion sizebefore build sizeafter end + +# Change the build target to build a HEX file or a library. +build: elf hex eep lss sym +#build: lib + + +elf: $(TARGET).elf +hex: $(TARGET).hex +eep: $(TARGET).eep +lss: $(TARGET).lss +sym: $(TARGET).sym +LIBNAME=lib$(TARGET).a +lib: $(LIBNAME) + + + +# Eye candy. +# AVR Studio 3.x does not check make's exit code but relies on +# the following magic strings to be generated by the compile job. +begin: + @echo + @echo $(MSG_BEGIN) + +end: + @echo $(MSG_END) + @echo + + +# Display size of file. +HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex +ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf +MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) ) +FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr ) + + +sizebefore: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ + 2>/dev/null; echo; fi + +sizeafter: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \ + 2>/dev/null; echo; fi + + + +# Display compiler version information. +gccversion : + @$(CC) --version + + +# Program the device. +program: $(TARGET).hex $(TARGET).eep + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) $(AVRDUDE_FUSES) $(AVRDUDE_LOCK) + + +# Generate avr-gdb config/init file which does the following: +# define the reset signal, load the target file, connect to target, and set +# a breakpoint at main(). +gdb-config: + @$(REMOVE) $(GDBINIT_FILE) + @echo define reset >> $(GDBINIT_FILE) + @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) + @echo end >> $(GDBINIT_FILE) + @echo file $(TARGET).elf >> $(GDBINIT_FILE) + @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) +ifeq ($(DEBUG_BACKEND),simulavr) + @echo load >> $(GDBINIT_FILE) +endif + @echo break main >> $(GDBINIT_FILE) + +debug: gdb-config $(TARGET).elf +ifeq ($(DEBUG_BACKEND), avarice) + @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. + @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ + $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) + @$(WINSHELL) /c pause + +else + @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ + $(DEBUG_MFREQ) --port $(DEBUG_PORT) +endif + @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) + + + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT = $(OBJCOPY) --debugging +COFFCONVERT += --change-section-address .data-0x800000 +COFFCONVERT += --change-section-address .bss-0x800000 +COFFCONVERT += --change-section-address .noinit-0x800000 +COFFCONVERT += --change-section-address .eeprom-0x810000 + + + +coff: $(TARGET).elf + @echo + @echo $(MSG_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-avr $< $(TARGET).cof + + +extcoff: $(TARGET).elf + @echo + @echo $(MSG_EXTENDED_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof + + + +# Create final output files (.hex, .eep) from ELF output file. +%.hex: %.elf + @echo + @echo $(MSG_FLASH) $@ + $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@ + +%.eep: %.elf + @echo + @echo $(MSG_EEPROM) $@ + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0 + +# Create extended listing file from ELF output file. +%.lss: %.elf + @echo + @echo $(MSG_EXTENDED_LISTING) $@ + $(OBJDUMP) -h -S -z $< > $@ + +# Create a symbol table from ELF output file. +%.sym: %.elf + @echo + @echo $(MSG_SYMBOL_TABLE) $@ + $(NM) -n $< > $@ + + + +# Create library from object files. +.SECONDARY : $(TARGET).a +.PRECIOUS : $(OBJ) +%.a: $(OBJ) + @echo + @echo $(MSG_CREATING_LIBRARY) $@ + $(AR) $@ $(OBJ) + + +# Link: create ELF output file from object files. +.SECONDARY : $(TARGET).elf +.PRECIOUS : $(OBJ) +%.elf: $(OBJ) + @echo + @echo $(MSG_LINKING) $@ + $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) + + +# Compile: create object files from C source files. +$(OBJDIR)/%.o : %.c + @echo + @echo $(MSG_COMPILING) $< + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +# Compile: create object files from C++ source files. +$(OBJDIR)/%.o : %.cpp + @echo + @echo $(MSG_COMPILING_CPP) $< + $(CC) -c $(ALL_CPPFLAGS) $< -o $@ + + +# Compile: create assembler files from C source files. +%.s : %.c + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +# Compile: create assembler files from C++ source files. +%.s : %.cpp + $(CC) -S $(ALL_CPPFLAGS) $< -o $@ + + +# Assemble: create object files from assembler source files. +$(OBJDIR)/%.o : %.S + @echo + @echo $(MSG_ASSEMBLING) $< + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + + +# Create preprocessed source for use in sending a bug report. +%.i : %.c + $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ + + +# Target: clean project. +clean: begin clean_list end + +clean_list : + @echo + @echo $(MSG_CLEANING) + $(REMOVE) $(TARGET).hex + $(REMOVE) $(TARGET).eep + $(REMOVE) $(TARGET).cof + $(REMOVE) $(TARGET).elf + $(REMOVE) $(TARGET).map + $(REMOVE) $(TARGET).sym + $(REMOVE) $(TARGET).lss + $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) + $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) + $(REMOVE) $(SRC:.c=.s) + $(REMOVE) $(SRC:.c=.d) + $(REMOVE) $(SRC:.c=.i) + $(REMOVEDIR) .dep + +doxygen: + @echo Generating Project Documentation... + @doxygen Doxygen.conf + @echo Documentation Generation Complete. + +clean_doxygen: + rm -rf Documentation + +# Create object files directory +$(shell mkdir $(OBJDIR) 2>/dev/null) + + +# Include the dependency files. +-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) + + +# Listing of phony targets. +.PHONY : all begin finish end sizebefore sizeafter gccversion \ +build elf hex eep lss sym coff extcoff doxygen clean \ +clean_list clean_doxygen program debug gdb-config diff --git a/test/ardmake/hardware/firmwares/arduino-usbdfu/readme.txt b/test/ardmake/hardware/firmwares/arduino-usbdfu/readme.txt new file mode 100644 index 0000000..e376679 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbdfu/readme.txt @@ -0,0 +1,7 @@ +To setup the project and program an ATMEG8U2 with the Arduino USB DFU bootloader: +1. unpack the source into LUFA's Bootloader directory +2. set ARDUINO_MODEL_PID in the makefile as appropriate +3. do "make clean; make; make program" + +Check that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU". Test by uploading the Arduino-usbserial application firmware (see instructions in Arduino-usbserial directory) + diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-mega.hex b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-mega.hex new file mode 100644 index 0000000..fbbeb07 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-mega.hex @@ -0,0 +1,256 @@ +:10000000A2C00000BBC00000B9C00000B7C0000023 +:10001000B5C00000B3C00000B1C00000AFC0000018 +:10002000ADC00000ABC00000A9C000005AC4000071 +:100030001EC40000A3C00000A1C000009FC00000BB +:100040009DC000009BC0000099C0000097C0000048 +:1000500095C0000093C0000091C0000014C10000D2 +:100060008DC000008BC0000089C0000087C0000068 +:1000700085C0000083C0000081C000007FC0000078 +:100080007DC000007BC0000079C0000077C0000088 +:1000900075C0000073C000001201100102000008CA +:1000A0004123100001000102DC0109023E000201AF +:1000B00000C0320904000001020201000524000111 +:1000C0001004240206052406000107058203080027 +:1000D000FF09040100020A000000070504024000B5 +:1000E00001070583024000010403090432034100B3 +:1000F00072006400750069006E006F002000280027 +:100100007700770077002E006100720064007500B0 +:1001100069006E006F002E0063006300290000007C +:100120002403410072006400750069006E006F00D6 +:1001300020004D006500670061002000320035009E +:1001400036003000000011241FBECFEFD2E0DEBF2A +:10015000CDBF11E0A0E0B1E0E0EDFFE002C005900E +:100160000D92A631B107D9F712E0A6E1B1E001C0C6 +:100170001D92AF32B107E1F7F1D028C741CF9C0102 +:10018000DC01AE57BF4FED91FC9111974191119653 +:10019000FC93EE9380589F4FE817F90711F42D93C5 +:1001A0003C939FB7F894F901EC57FF4F8081815041 +:1001B00080839FBF842F0895DF92EF92FF920F9369 +:1001C0001F93FC018489813019F0823021F405C02D +:1001D00040E3D42E04C0DD2402C030E2D32E838954 +:1001E000823011F488E0D82A8589873031F0883050 +:1001F00031F0863031F482E003C084E001C086E053 +:10020000D82A1092C9001092C8001092CA00E78440 +:10021000F0880189128980E0E81681EEF80680E016 +:10022000080780E0180719F420E130E00FC0C8018A +:10023000B701969587957795679560587B47814E6E +:100240009F4FA8019701A0D6215030403093CD0098 +:100250002093CC00D092CA0080E0E81681EEF80628 +:1002600080E0080780E0180711F082E001C080E01C +:100270008093C80088E98093C9001F910F91FF9077 +:10028000EF90DF9008951F920F920FB60F921124F6 +:100290002F938F939F93EF93FF939091CE008EB304 +:1002A0008430F1F4E0919901F0919A019083E0910A +:1002B0009901F0919A01CF01019690939A01809350 +:1002C00099018959914021F489E191E092838183D8 +:1002D0009FB7F89480919D018F5F80939D019FBF90 +:1002E000FF91EF919F918F912F910F900FBE0F90E3 +:1002F0001F901895FC01858580FF02C05F980895C6 +:100300005F9A089580E091E0D5C580E091E088C5CE +:1003100084B7877F84BF28E10FB6F89420936000EC +:10032000109260000FBE87E690E09093CD0080931E +:10033000CC0086E08093CA001092C8002093C900C8 +:10034000539A5A9A8AB180638AB98BB180638BB908 +:1003500083D284E085BD5F9A579A08950F931F93C7 +:10036000CF93DF93D5DF2FB7F8948EE991E0909388 +:100370001F0280931E0290932102809320022FBFC0 +:100380002FB7F89489E191E090939A0180939901B5 +:1003900090939C0180939B012FBF7894CEE9D1E08C +:1003A00003E08FB7F894909122028FBF903809F143 +:1003B00080E091E0ABD497FD1CC0E0911E02F0916B +:1003C0001F028083E0911E02F0911F02CF0101966F +:1003D00090931F0280931E028E51924011F4D2839B +:1003E000C1839FB7F894809122028F5F809322028D +:1003F0009FBF8FB7F89410919D018FBFA89902C03D +:10040000113678F1A89A80919D01882361F05D985A +:100410000093160108C089E191E0B1DE682F80E009 +:1004200091E0DAD411501123B1F78091160188239D +:1004300051F0809116018150809316018091160130 +:10044000882309F45D9A80911701882351F08091E7 +:10045000170181508093170180911701882309F4B7 +:100460005C9A8FB7F894909122028FBF992369F01C +:100470008EE991E084DE982F8091C80085FFFCCF43 +:100480009093CE005C980093170180E091E095D4A2 +:100490002AD487CFDA01923049F0933061F091305D +:1004A000F9F4E8E9F0E022E130E01EC0EAEAF0E029 +:1004B0002EE330E019C0813049F0813018F08230ED +:1004C00079F408C0E8EEF0E0849107C0ECEEF0E0CB +:1004D000849103C0E0E2F1E08491282F30E004C071 +:1004E000E0E0F0E020E030E0ED93FC93C9010895F6 +:1004F00028E030E040E003C04F5F220F331F281791 +:100500003907D0F3842F8295807F08958093E90086 +:100510008091EB0081608093EB001092ED0060937E +:10052000EC004093ED008091EE00881F8827881F23 +:1005300008951092F40090E09093E9001092F0007A +:100540001092E8001092ED008091EB008E7F809376 +:10055000EB009F5F953081F70895809127028823F3 +:100560008CF403C08EB38823B1F08091E80082FF41 +:10057000F9CF8091E8008B778093E80008958EB3DF +:10058000882349F08091E80080FFF9CF8091E8004E +:100590008E778093E800089594E68091EC0080FFC8 +:1005A00005C08091E80080FF05C023C08091E8006D +:1005B00082FD1FC08EB3882311F482E008958EB3AC +:1005C000853011F483E008958091EB0085FF02C02F +:1005D00081E008958091E10082FFDFCF8091E1000A +:1005E0008B7F8093E100992311F484E0089591506A +:1005F000D4CF80E008959C0140912D0250912E02AD +:100600004617570718F4F90120E038C06115710545 +:1006100011F0AB01F8CF8091E8008E778093E8006D +:1006200040E050E0F0CF8091E80083FF02C081E01D +:1006300008958091E80082FD2DC08EB3882381F15A +:100640008EB3853079F18091E80080FF17C09091DA +:10065000F20006C081918093F100415050409F5FAD +:100660004115510511F09830A8F320E0983009F4B5 +:1006700021E08091E8008E778093E80041155105D4 +:1006800091F6222381F606C08EB3882349F08EB3FB +:10069000853041F08091E80082FFF6CF80E0089538 +:1006A00082E0089583E008959C0140912D025091CD +:1006B0002E024617570710F490E03BC061157105F4 +:1006C00011F0AB01F9CF8091E8008E778093E800BC +:1006D00040E050E0F1CF8091E80083FF02C081E06C +:1006E00008958091E80082FD30C08EB3882399F18F +:1006F0008EB3853091F18091E80080FF1AC080911F +:10070000F20009C0F9012F5F3F4FE491E093F1003F +:10071000415050408F5F4115510511F0883090F3E2 +:1007200090E0883009F491E08091E8008E77809322 +:10073000E8004115510579F6992369F606C08EB394 +:10074000882349F08EB3853041F08091E80082FF24 +:10075000F6CF80E0089582E0089583E008959C013B +:100760006115710529F48091E8008B778093E8008A +:10077000F90120C08091E80083FF02C081E0089564 +:100780008EB3882339F18EB3853031F18091E80042 +:1007900082FFF0CF06C08091F100819361507040DC +:1007A00021F08091F2008823B1F78091E8008B77E7 +:1007B0008093E80061157105E9F606C08EB38823C1 +:1007C00049F08EB3853041F08091E80080FFF6CF8C +:1007D00080E0089582E0089583E0089542D044D0F7 +:1007E0001EBA10922502109224021092230284E075 +:1007F00089BD89B5826089BD09B400FEFDCF8091B5 +:10080000D800982F9F779093D80080688093D80065 +:10081000809163008E7F809363008091D8008F7DEC +:100820008093D8008091E0008E7F8093E0008091DB +:10083000E1008E7F8093E1008091E20081608093EF +:10084000E2008091E100877F8093E1008091E200E7 +:1008500088608093E2000895C1DF81E080932602E2 +:1008600008951092E20008951092E10008951F92F9 +:100870000F920FB60F9211241F932F933F934F9314 +:100880005F936F937F938F939F93AF93BF93EF93F8 +:10089000FF93E9EEF0E0108117701082E0EFF0E0D6 +:1008A0008081877F80837894C3D0F894A9EEB0E0EC +:1008B0001C92E0EFF0E08081886080831C93FF91C0 +:1008C000EF91BF91AF919F918F917F916F915F91C8 +:1008D0004F913F912F911F910F900FBE0F901F903E +:1008E00018951F920F920FB60F9211242F933F93DA +:1008F0004F935F936F937F938F939F93AF93BF9328 +:10090000EF93FF938091E10080FF1BC08091E20094 +:1009100080FF17C08091E1008E7F8093E10080917D +:10092000E2008E7F8093E2008091E20080618093FC +:10093000E2008091D80080628093D80019BC1EBA72 +:10094000D1D18091E10084FF29C08091E20084FF31 +:1009500025C084E089BD89B5826089BD09B400FEE7 +:10096000FDCF8091D8008F7D8093D8008091E100E9 +:100970008F7E8093E1008091E2008F7E8093E20081 +:100980008091E20081608093E200809125028823BB +:1009900011F481E001C084E08EBBA4D18091E1001C +:1009A00083FF27C08091E20083FF23C08091E10094 +:1009B000877F8093E10082E08EBB109225028091B8 +:1009C000E1008E7F8093E1008091E2008E7F809332 +:1009D000E2008091E20080618093E200AADD80E085 +:1009E00060E042E093DD8091F00088608093F00049 +:1009F00079D18091E10082FF0AC08091E20082FFFC +:100A000006C08091E1008B7F8093E1006BD1FF9164 +:100A1000EF91BF91AF919F918F917F916F915F9176 +:100A20004F913F912F910F900FBE0F901F901895EF +:100A30001F93DF93CF93CDB7DEB7AC970FB6F89483 +:100A4000DEBF0FBECDBFE7E2F2E08091F1008193FF +:100A500022E0EF32F207C9F7809127023091280295 +:100A6000353009F487C0363040F43130C9F13130C7 +:100A700070F0333009F01DC133C0383009F4EFC0D5 +:100A8000393009F4FEC0363009F013C192C0803805 +:100A900021F0823809F00DC108C0909123028091A5 +:100AA0002402882399F0926011C080912B028770F4 +:100AB0008093E9008091EB0090E025E09695879582 +:100AC0002A95E1F7982F91701092E9008091E80043 +:100AD000877F8093E8009093F1001092F100CAC0E4 +:100AE000882319F0823009F0E4C090E08F71907093 +:100AF000009721F0029709F0DDC00CC08091290217 +:100B0000813009F0D7C010922402333069F5809308 +:100B100024022AC080912902882331F520912B02DA +:100B2000277009F4C7C02093E9008091EB0080FF93 +:100B3000C1C0333021F48091EB00806213C08091FA +:100B4000EB0080618093EB0081E090E002C0880FB1 +:100B5000991F2A95E2F78093EA001092EA008091AB +:100B6000EB0088608093EB001092E9008091E80030 +:100B7000877F83C0882309F09CC01091290280914F +:100B8000E800877F8093E800E8DC04C08EB3882308 +:100B900009F490C08091E80080FFF8CF812F8F7713 +:100BA00011F492E001C093E09EBB80688093E30063 +:100BB00081C08058823008F07CC0809129029091D9 +:100BC0002A0223E08C3D920799F55FB7F894DE0185 +:100BD00015964EE020E030E061E2E42FF0E0609313 +:100BE0005700849120FF03C082958F704F5F982F2C +:100BF0009F70892F805D8A3308F0895F8C931196EE +:100C00001C9211972F5F3F4F12962431310529F71F +:100C10005FBF8AE28B8383E08C838091E800877FCB +:100C20008093E800CE0103966AE270E0E4DC11C034 +:100C300060912B02AE014F5F5F4F2CDCBC0100972F +:100C4000C9F18091E800877F8093E80089819A81CB +:100C50002BDD8091E8008B778093E8002BC08038F3 +:100C600041F58091E800877F8093E800809125021C +:100C70008093F1008091E8008E778093E8006DDC2E +:100C800019C08823B1F490912902923098F4809190 +:100C9000E800877F8093E800909325025EDC8091D6 +:100CA0002502882311F483E001C084E08EBB2DDB94 +:100CB00001C028DB8091E80083FF0AC08091EB002F +:100CC00080628093EB008091E800877F8093E8004A +:100CD000AC960FB6F894DEBF0FBECDBFCF91DF91BB +:100CE0001F91089508951F938EB3882361F010918A +:100CF000E9001092E9008091E80083FF01C098DECE +:100D000017701093E9001F9108950895FC018EB3A8 +:100D1000843021F587859089A189B2890097A10542 +:100D2000B105E1F085818093E9008091E80082FFC0 +:100D300015C08091F200882319F42FEF3FEF04C013 +:100D40008091F100282F30E08091F200882341F457 +:100D50008091E8008B778093E80002C02FEF3FEF8F +:100D6000C9010895FC018EB3843011F587859089FF +:100D7000A189B2890097A105B105D1F08181809345 +:100D8000E9008091F2008823A9F09091E800809119 +:100D9000E8008E778093E80095FD0CC0FDDB982F6E +:100DA000882349F48091E8008E778093E80003C09F +:100DB00092E001C090E0892F0895FC018EB3843049 +:100DC00051F487859089A189B2890097A105B10561 +:100DD00011F0CF01C7CF08951F93FC01162F8EB3DA +:100DE0008430D9F487859089A189B2890097A105BB +:100DF000B10599F081818093E9008091E80085FD3B +:100E000008C08091E8008E778093E800C5DB8823D6 +:100E100029F41093F10080E001C082E01F91089551 +:100E20000F931F93CF93DF93EC010D96FC0189E0A4 +:100E3000DF011D928A95E9F72A813B8109818C8126 +:100E4000882311F410E001C014E0C90151DB182B14 +:100E50001260802F61E8412F59DB882329F12E8110 +:100E60003F810D818885882311F410E001C014E0D2 +:100E7000C9013EDB182B1260802F60E8412F46DB52 +:100E8000882391F02A853B8509858C85882311F478 +:100E900010E001C014E0C9012BDB182B1260802F79 +:100EA00061EC412F33DB01C080E0DF91CF911F91D6 +:100EB0000F910895CF93DF93EC018091E80083FFB9 +:100EC00060C0888190E020912B0230912C0228177D +:100ED000390709F056C080912802813261F08232D0 +:100EE00020F4803209F04DC019C0823269F183329A +:100EF00009F047C038C080912702813A09F041C00B +:100F00008091E800877F8093E800CE010F9667E02C +:100F100070E071DB8091E8008B7713C0809127022D +:100F2000813279F58091E800877F8093E800CE01D7 +:100F30000F9667E070E013DCCE013ED98091E800A7 +:100F40008E778093E8001DC0809127028132C9F41A +:100F50008091E800877F8093E800809129028D8747 +:100F6000CE01C8D90DC080912702813251F4809101 +:100F7000E800877F8093E800CE0160912902C5DEFA +:100F8000ECDADF91CF910895A1E21A2EAA1BBB1BC8 +:100F9000FD010DC0AA1FBB1FEE1FFF1FA217B30745 +:100FA000E407F50720F0A21BB30BE40BF50B661F5B +:100FB000771F881F991F1A9469F76095709580951F +:100FC00090959B01AC01BD01CF010895F894FFCF2E +:100FD0000003400000044000000208000000000080 +:060FE0000000000000000B +:00000001FF diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-uno.hex b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-uno.hex new file mode 100644 index 0000000..ca51dfa --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial-uno.hex @@ -0,0 +1,256 @@ +:100000009CC00000B5C00000B3C00000B1C000003B +:10001000AFC00000ADC00000ABC00000A9C0000030 +:10002000A7C00000A5C00000A3C0000054C4000089 +:1000300018C400009DC000009BC0000099C00000D3 +:1000400097C0000095C0000093C0000091C0000060 +:100050008FC000008DC000008BC000000EC10000EA +:1000600087C0000085C0000083C0000081C0000080 +:100070007FC000007DC000007BC0000079C0000090 +:1000800077C0000075C0000073C0000071C00000A0 +:100090006FC000006DC000001201100102000008D6 +:1000A0004123010001000102DC0109023E000201BE +:1000B00000C0320904000001020201000524000111 +:1000C0001004240206052406000107058203080027 +:1000D000FF09040100020A000000070504024000B5 +:1000E00001070583024000010403090432034100B3 +:1000F00072006400750069006E006F002000280027 +:100100007700770077002E006100720064007500B0 +:1001100069006E006F002E0063006300290000007C +:100120001803410072006400750069006E006F00E2 +:10013000200055006E006F00000011241FBECFEF9D +:10014000D2E0DEBFCDBF11E0A0E0B1E0E4ECFFE023 +:1001500002C005900D92A631B107D9F712E0A6E1D1 +:10016000B1E001C01D92AF32B107E1F7F1D028C76D +:1001700047CF9C01DC01AE57BF4FED91FC91119729 +:1001800041911196FC93EE9380589F4FE817F90721 +:1001900011F42D933C939FB7F894F901EC57FF4F5E +:1001A0008081815080839FBF842F0895DF92EF92DA +:1001B000FF920F931F93FC018489813019F08230E4 +:1001C00021F405C040E3D42E04C0DD2402C030E297 +:1001D000D32E8389823011F488E0D82A858987302C +:1001E00031F0883031F0863031F482E003C084E0B1 +:1001F00001C086E0D82A1092C9001092C80010925F +:10020000CA00E784F0880189128980E0E81681EE4F +:10021000F80680E0080780E0180719F420E130E0D4 +:100220000FC0C801B7019695879577956795605877 +:100230007B47814E9F4FA8019701A0D621503040A7 +:100240003093CD002093CC00D092CA0080E0E81615 +:1002500081EEF80680E0080780E0180711F082E0E0 +:1002600001C080E08093C80088E98093C9001F9195 +:100270000F91FF90EF90DF9008951F920F920FB6AD +:100280000F9211242F938F939F93EF93FF9390914D +:10029000CE008EB38430F1F4E0919901F0919A018F +:1002A0009083E0919901F0919A01CF01019690938A +:1002B0009A01809399018959914021F489E191E053 +:1002C000928381839FB7F89480919D018F5F809383 +:1002D0009D019FBFFF91EF919F918F912F910F9063 +:1002E0000FBE0F901F901895FC01858580FF02C0FE +:1002F0005F9808955F9A089580E091E0D5C580E009 +:1003000091E088C584B7877F84BF28E10FB6F89451 +:1003100020936000109260000FBE87E690E09093FB +:10032000CD008093CC0086E08093CA001092C80074 +:100330002093C900539A5A9A8AB180638AB98BB1C3 +:1003400080638BB983D284E085BD5F9A579A089504 +:100350000F931F93CF93DF93D5DF2FB7F8948EE9D8 +:1003600091E090931F0280931E029093210280934C +:1003700020022FBF2FB7F89489E191E090939A0162 +:100380008093990190939C0180939B012FBF789457 +:10039000CEE9D1E003E08FB7F894909122028FBFAD +:1003A000903809F180E091E0ABD497FD1CC0E0915A +:1003B0001E02F0911F028083E0911E02F0911F0245 +:1003C000CF01019690931F0280931E028E5192409E +:1003D00011F4D283C1839FB7F894809122028F5F7A +:1003E000809322029FBF8FB7F89410919D018FBF19 +:1003F000A89902C0113678F1A89A80919D018823AE +:1004000061F05D980093160108C089E191E0B1DECA +:10041000682F80E091E0DAD411501123B1F7809178 +:100420001601882351F080911601815080931601A6 +:1004300080911601882309F45D9A80911701882321 +:1004400051F080911701815080931701809117011D +:10045000882309F45C9A8FB7F894909122028FBF99 +:10046000992369F08EE991E084DE982F8091C8008D +:1004700085FFFCCF9093CE005C980093170180E03D +:1004800091E095D42AD487CFDA01923049F09330A5 +:1004900061F09130F9F4E8E9F0E022E130E01EC0CB +:1004A000EAEAF0E02EE330E019C0813049F0813013 +:1004B00018F0823079F408C0E8EEF0E0849107C0CB +:1004C000ECEEF0E0849103C0E0E2F1E08491282FAB +:1004D00030E004C0E0E0F0E020E030E0ED93FC9399 +:1004E000C901089528E030E040E003C04F5F220FCB +:1004F000331F28173907D0F3842F8295807F089502 +:100500008093E9008091EB0081608093EB00109272 +:10051000ED006093EC004093ED008091EE00881FA9 +:100520008827881F08951092F40090E09093E900C6 +:100530001092F0001092E8001092ED008091EB0014 +:100540008E7F8093EB009F5F953081F708958091B7 +:10055000270288238CF403C08EB38823B1F08091E6 +:10056000E80082FFF9CF8091E8008B778093E80064 +:1005700008958EB3882349F08091E80080FFF9CF79 +:100580008091E8008E778093E800089594E680914A +:10059000EC0080FF05C08091E80080FF05C023C00B +:1005A0008091E80082FD1FC08EB3882311F482E0A1 +:1005B00008958EB3853011F483E008958091EB00A7 +:1005C00085FF02C081E008958091E10082FFDFCFC6 +:1005D0008091E1008B7F8093E100992311F484E006 +:1005E00008959150D4CF80E008959C0140912D0250 +:1005F00050912E024617570718F4F90120E038C031 +:100600006115710511F0AB01F8CF8091E8008E778C +:100610008093E80040E050E0F0CF8091E80083FF55 +:1006200002C081E008958091E80082FD2DC08EB364 +:10063000882381F18EB3853079F18091E80080FFC5 +:1006400017C09091F20006C081918093F100415053 +:1006500050409F5F4115510511F09830A8F320E0FC +:10066000983009F421E08091E8008E778093E800CB +:100670004115510591F6222381F606C08EB38823D9 +:1006800049F08EB3853041F08091E80082FFF6CFCB +:1006900080E0089582E0089583E008959C014091F0 +:1006A0002D0250912E024617570710F490E03BC0E0 +:1006B0006115710511F0AB01F9CF8091E8008E77DB +:1006C0008093E80040E050E0F1CF8091E80083FFA4 +:1006D00002C081E008958091E80082FD30C08EB3B1 +:1006E000882399F18EB3853091F18091E80080FFE5 +:1006F0001AC08091F20009C0F9012F5F3F4FE491C9 +:10070000E093F100415050408F5F4115510511F0C9 +:10071000883090F390E0883009F491E08091E8000F +:100720008E778093E8004115510579F6992369F693 +:1007300006C08EB3882349F08EB3853041F0809196 +:10074000E80082FFF6CF80E0089582E0089583E01C +:1007500008959C016115710529F48091E8008B775B +:100760008093E800F90120C08091E80083FF02C077 +:1007700081E008958EB3882339F18EB3853031F14D +:100780008091E80082FFF0CF06C08091F100819354 +:100790006150704021F08091F2008823B1F7809180 +:1007A000E8008B778093E80061157105E9F606C0D3 +:1007B0008EB3882349F08EB3853041F08091E800F4 +:1007C00080FFF6CF80E0089582E0089583E00895E9 +:1007D00042D044D01EBA10922502109224021092E8 +:1007E000230284E089BD89B5826089BD09B400FE19 +:1007F000FDCF8091D800982F9F779093D800806884 +:100800008093D800809163008E7F809363008091F5 +:10081000D8008F7D8093D8008091E0008E7F8093F8 +:10082000E0008091E1008E7F8093E1008091E20002 +:1008300081608093E2008091E100877F8093E100F6 +:100840008091E20088608093E2000895C1DF81E03A +:100850008093260208951092E20008951092E1001C +:1008600008951F920F920FB60F9211241F932F938A +:100870003F934F935F936F937F938F939F93AF9328 +:10088000BF93EF93FF93E9EEF0E0108117701082B1 +:10089000E0EFF0E08081877F80837894C3D0F89484 +:1008A000A9EEB0E01C92E0EFF0E0808188608083E8 +:1008B0001C93FF91EF91BF91AF919F918F917F9189 +:1008C0006F915F914F913F912F911F910F900FBEAC +:1008D0000F901F9018951F920F920FB60F92112430 +:1008E0002F933F934F935F936F937F938F939F9338 +:1008F000AF93BF93EF93FF938091E10080FF1BC004 +:100900008091E20080FF17C08091E1008E7F80938C +:10091000E1008091E2008E7F8093E2008091E2000E +:1009200080618093E2008091D80080628093D8003B +:1009300019BC1EBAD1D18091E10084FF29C08091F9 +:10094000E20084FF25C084E089BD89B5826089BD4D +:1009500009B400FEFDCF8091D8008F7D8093D80030 +:100960008091E1008F7E8093E1008091E2008F7E94 +:100970008093E2008091E20081608093E2008091A8 +:100980002502882311F481E001C084E08EBBA4D14C +:100990008091E10083FF27C08091E20083FF23C0A4 +:1009A0008091E100877F8093E10082E08EBB10920E +:1009B00025028091E1008E7F8093E1008091E2002A +:1009C0008E7F8093E2008091E20080618093E2005C +:1009D000AADD80E060E042E093DD8091F000886075 +:1009E0008093F00079D18091E10082FF0AC080916C +:1009F000E20082FF06C08091E1008B7F8093E100DE +:100A00006BD1FF91EF91BF91AF919F918F917F91AA +:100A10006F915F914F913F912F910F900FBE0F906B +:100A20001F9018951F93DF93CF93CDB7DEB7AC9788 +:100A30000FB6F894DEBF0FBECDBFE7E2F2E08091C3 +:100A4000F100819322E0EF32F207C9F7809127028B +:100A500030912802353009F487C0363040F4313007 +:100A6000C9F1313070F0333009F01DC133C0383076 +:100A700009F4EFC0393009F4FEC0363009F013C173 +:100A800092C0803821F0823809F00DC108C09091E1 +:100A9000230280912402882399F0926011C08091F2 +:100AA0002B0287708093E9008091EB0090E025E0B5 +:100AB000969587952A95E1F7982F91701092E90005 +:100AC0008091E800877F8093E8009093F100109276 +:100AD000F100CAC0882319F0823009F0E4C090E028 +:100AE0008F719070009721F0029709F0DDC00CC063 +:100AF00080912902813009F0D7C01092240233304E +:100B000069F5809324022AC080912902882331F557 +:100B100020912B02277009F4C7C02093E90080912F +:100B2000EB0080FFC1C0333021F48091EB00806284 +:100B300013C08091EB0080618093EB0081E090E036 +:100B400002C0880F991F2A95E2F78093EA0010925D +:100B5000EA008091EB0088608093EB001092E9003E +:100B60008091E800877F83C0882309F09CC01091A2 +:100B700029028091E800877F8093E800E8DC04C0C8 +:100B80008EB3882309F490C08091E80080FFF8CFED +:100B9000812F8F7711F492E001C093E09EBB8068B3 +:100BA0008093E30081C08058823008F07CC080913F +:100BB000290290912A0223E08C3D920799F55FB7B4 +:100BC000F894DE0115964EE020E030E061E2E42F7B +:100BD000F0E060935700849120FF03C082958F70EE +:100BE0004F5F982F9F70892F805D8A3308F0895F4F +:100BF0008C9311961C9211972F5F3F4F12962431C0 +:100C0000310529F75FBF8AE28B8383E08C83809173 +:100C1000E800877F8093E800CE0103966AE270E0E7 +:100C2000E4DC11C060912B02AE014F5F5F4F2CDC02 +:100C3000BC010097C9F18091E800877F8093E800AC +:100C400089819A812BDD8091E8008B778093E80081 +:100C50002BC0803841F58091E800877F8093E800C1 +:100C6000809125028093F1008091E8008E77809337 +:100C7000E8006DDC19C08823B1F49091290292300C +:100C800098F48091E800877F8093E8009093250294 +:100C90005EDC80912502882311F483E001C084E0AA +:100CA0008EBB2DDB01C028DB8091E80083FF0AC0EA +:100CB0008091EB0080628093EB008091E800877F59 +:100CC0008093E800AC960FB6F894DEBF0FBECDBFA0 +:100CD000CF91DF911F91089508951F938EB38823BC +:100CE00061F01091E9001092E9008091E80083FF23 +:100CF00001C098DE17701093E9001F9108950895C0 +:100D0000FC018EB3843021F587859089A189B28951 +:100D10000097A105B105E1F085818093E9008091FC +:100D2000E80082FF15C08091F200882319F42FEFAC +:100D30003FEF04C08091F100282F30E08091F20055 +:100D4000882341F48091E8008B778093E80002C00B +:100D50002FEF3FEFC9010895FC018EB3843011F5E8 +:100D600087859089A189B2890097A105B105D1F045 +:100D700081818093E9008091F2008823A9F090910D +:100D8000E8008091E8008E778093E80095FD0CC024 +:100D9000FDDB982F882349F48091E8008E778093BB +:100DA000E80003C092E001C090E0892F0895FC01A3 +:100DB0008EB3843051F487859089A189B2890097D8 +:100DC000A105B10511F0CF01C7CF08951F93FC0114 +:100DD000162F8EB38430D9F487859089A189B28982 +:100DE0000097A105B10599F081818093E900809178 +:100DF000E80085FD08C08091E8008E778093E800C8 +:100E0000C5DB882329F41093F10080E001C082E063 +:100E10001F9108950F931F93CF93DF93EC010D96CD +:100E2000FC0189E0DF011D928A95E9F72A813B8167 +:100E300009818C81882311F410E001C014E0C901FC +:100E400051DB182B1260802F61E8412F59DB88237A +:100E500029F12E813F810D818885882311F410E0CE +:100E600001C014E0C9013EDB182B1260802F60E83E +:100E7000412F46DB882391F02A853B8509858C85A7 +:100E8000882311F410E001C014E0C9012BDB182BFA +:100E90001260802F61EC412F33DB01C080E0DF91D5 +:100EA000CF911F910F910895CF93DF93EC01809123 +:100EB000E80083FF60C0888190E020912B02309190 +:100EC0002C022817390709F056C080912802813278 +:100ED00061F0823220F4803209F04DC019C08232B4 +:100EE00069F1833209F047C038C080912702813A06 +:100EF00009F041C08091E800877F8093E800CE012F +:100F00000F9667E070E071DB8091E8008B7713C08B +:100F100080912702813279F58091E800877F809364 +:100F2000E800CE010F9667E070E013DCCE013ED9F9 +:100F30008091E8008E778093E8001DC080912702A1 +:100F40008132C9F48091E800877F8093E800809126 +:100F500029028D87CE01C8D90DC080912702813228 +:100F600051F48091E800877F8093E800CE01609182 +:100F70002902C5DEECDADF91CF910895A1E21A2EA5 +:100F8000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1F2D +:100F9000A217B307E407F50720F0A21BB30BE40B7D +:100FA000F50B661F771F881F991F1A9469F76095C4 +:100FB0007095809590959B01AC01BD01CF0108957E +:040FC000F894FFCFD3 +:100FC400000340000004400000020800000000008C +:060FD40000000000000017 +:00000001FF diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.c b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.c new file mode 100644 index 0000000..4de73c8 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.c @@ -0,0 +1,242 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Main source file for the Arduino-usbserial project. This file contains the main tasks of + * the project and is responsible for the initial application hardware configuration. + */ + +#include "Arduino-usbserial.h" + +/** Circular buffer to hold data from the host before it is sent to the device via the serial port. */ +RingBuff_t USBtoUSART_Buffer; + +/** Circular buffer to hold data from the serial port before it is sent to the host. */ +RingBuff_t USARTtoUSB_Buffer; + +/** Pulse generation counters to keep track of the number of milliseconds remaining for each pulse type */ +volatile struct +{ + uint8_t TxLEDPulse; /**< Milliseconds remaining for data Tx LED pulse */ + uint8_t RxLEDPulse; /**< Milliseconds remaining for data Rx LED pulse */ + uint8_t PingPongLEDPulse; /**< Milliseconds remaining for enumeration Tx/Rx ping-pong LED pulse */ +} PulseMSRemaining; + +/** LUFA CDC Class driver interface configuration and state information. This structure is + * passed to all CDC Class driver functions, so that multiple instances of the same class + * within a device can be differentiated from one another. + */ +USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface = + { + .Config = + { + .ControlInterfaceNumber = 0, + + .DataINEndpointNumber = CDC_TX_EPNUM, + .DataINEndpointSize = CDC_TXRX_EPSIZE, + .DataINEndpointDoubleBank = false, + + .DataOUTEndpointNumber = CDC_RX_EPNUM, + .DataOUTEndpointSize = CDC_TXRX_EPSIZE, + .DataOUTEndpointDoubleBank = false, + + .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, + .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, + .NotificationEndpointDoubleBank = false, + }, + }; + +/** Main program entry point. This routine contains the overall program flow, including initial + * setup of all components and the main program loop. + */ +int main(void) +{ + SetupHardware(); + + RingBuffer_InitBuffer(&USBtoUSART_Buffer); + RingBuffer_InitBuffer(&USARTtoUSB_Buffer); + + sei(); + + for (;;) + { + /* Only try to read in bytes from the CDC interface if the transmit buffer is not full */ + if (!(RingBuffer_IsFull(&USBtoUSART_Buffer))) + { + int16_t ReceivedByte = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface); + + /* Read bytes from the USB OUT endpoint into the USART transmit buffer */ + if (!(ReceivedByte < 0)) + RingBuffer_Insert(&USBtoUSART_Buffer, ReceivedByte); + } + + /* Check if the UART receive buffer flush timer has expired or the buffer is nearly full */ + RingBuff_Count_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer); + if ((TIFR0 & (1 << TOV0)) || (BufferCount > BUFFER_NEARLY_FULL)) + { + TIFR0 |= (1 << TOV0); + + if (USARTtoUSB_Buffer.Count) { + LEDs_TurnOnLEDs(LEDMASK_TX); + PulseMSRemaining.TxLEDPulse = TX_RX_LED_PULSE_MS; + } + + /* Read bytes from the USART receive buffer into the USB IN endpoint */ + while (BufferCount--) + CDC_Device_SendByte(&VirtualSerial_CDC_Interface, RingBuffer_Remove(&USARTtoUSB_Buffer)); + + /* Turn off TX LED(s) once the TX pulse period has elapsed */ + if (PulseMSRemaining.TxLEDPulse && !(--PulseMSRemaining.TxLEDPulse)) + LEDs_TurnOffLEDs(LEDMASK_TX); + + /* Turn off RX LED(s) once the RX pulse period has elapsed */ + if (PulseMSRemaining.RxLEDPulse && !(--PulseMSRemaining.RxLEDPulse)) + LEDs_TurnOffLEDs(LEDMASK_RX); + } + + /* Load the next byte from the USART transmit buffer into the USART */ + if (!(RingBuffer_IsEmpty(&USBtoUSART_Buffer))) { + Serial_TxByte(RingBuffer_Remove(&USBtoUSART_Buffer)); + + LEDs_TurnOnLEDs(LEDMASK_RX); + PulseMSRemaining.RxLEDPulse = TX_RX_LED_PULSE_MS; + } + + CDC_Device_USBTask(&VirtualSerial_CDC_Interface); + USB_USBTask(); + } +} + +/** Configures the board hardware and chip peripherals for the demo's functionality. */ +void SetupHardware(void) +{ + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Hardware Initialization */ + Serial_Init(9600, false); + LEDs_Init(); + USB_Init(); + + /* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */ + TCCR0B = (1 << CS02); + + /* Pull target /RESET line high */ + AVR_RESET_LINE_PORT |= AVR_RESET_LINE_MASK; + AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK; +} + +/** Event handler for the library USB Configuration Changed event. */ +void EVENT_USB_Device_ConfigurationChanged(void) +{ + CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface); +} + +/** Event handler for the library USB Unhandled Control Request event. */ +void EVENT_USB_Device_UnhandledControlRequest(void) +{ + CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface); +} + +/** Event handler for the CDC Class driver Line Encoding Changed event. + * + * \param[in] CDCInterfaceInfo Pointer to the CDC class interface configuration structure being referenced + */ +void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) +{ + uint8_t ConfigMask = 0; + + switch (CDCInterfaceInfo->State.LineEncoding.ParityType) + { + case CDC_PARITY_Odd: + ConfigMask = ((1 << UPM11) | (1 << UPM10)); + break; + case CDC_PARITY_Even: + ConfigMask = (1 << UPM11); + break; + } + + if (CDCInterfaceInfo->State.LineEncoding.CharFormat == CDC_LINEENCODING_TwoStopBits) + ConfigMask |= (1 << USBS1); + + switch (CDCInterfaceInfo->State.LineEncoding.DataBits) + { + case 6: + ConfigMask |= (1 << UCSZ10); + break; + case 7: + ConfigMask |= (1 << UCSZ11); + break; + case 8: + ConfigMask |= ((1 << UCSZ11) | (1 << UCSZ10)); + break; + } + + /* Must turn off USART before reconfiguring it, otherwise incorrect operation may occur */ + UCSR1B = 0; + UCSR1A = 0; + UCSR1C = 0; + + /* Special case 57600 baud for compatibility with the ATmega328 bootloader. */ + UBRR1 = (CDCInterfaceInfo->State.LineEncoding.BaudRateBPS == 57600) + ? SERIAL_UBBRVAL(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS) + : SERIAL_2X_UBBRVAL(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS); + + UCSR1C = ConfigMask; + UCSR1A = (CDCInterfaceInfo->State.LineEncoding.BaudRateBPS == 57600) ? 0 : (1 << U2X1); + UCSR1B = ((1 << RXCIE1) | (1 << TXEN1) | (1 << RXEN1)); +} + +/** ISR to manage the reception of data from the serial port, placing received bytes into a circular buffer + * for later transmission to the host. + */ +ISR(USART1_RX_vect, ISR_BLOCK) +{ + uint8_t ReceivedByte = UDR1; + + if (USB_DeviceState == DEVICE_STATE_Configured) + RingBuffer_Insert(&USARTtoUSB_Buffer, ReceivedByte); +} + +/** Event handler for the CDC Class driver Host-to-Device Line Encoding Changed event. + * + * \param[in] CDCInterfaceInfo Pointer to the CDC class interface configuration structure being referenced + */ +void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) +{ + bool CurrentDTRState = (CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR); + + if (CurrentDTRState) + AVR_RESET_LINE_PORT &= ~AVR_RESET_LINE_MASK; + else + AVR_RESET_LINE_PORT |= AVR_RESET_LINE_MASK; +} diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.h b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.h new file mode 100644 index 0000000..99fde39 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Arduino-usbserial.h @@ -0,0 +1,79 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Arduino-usbserial.c. + */ + +#ifndef _ARDUINO_USBSERIAL_H_ +#define _ARDUINO_USBSERIAL_H_ + + /* Includes: */ + #include + #include + #include + #include + + #include "Descriptors.h" + + #include "Lib/LightweightRingBuff.h" + + #include + #include + #include + #include + #include + + /* Macros: */ + /** LED mask for the library LED driver, to indicate TX activity. */ + #define LEDMASK_TX LEDS_LED1 + + /** LED mask for the library LED driver, to indicate RX activity. */ + #define LEDMASK_RX LEDS_LED2 + + /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ + #define LEDMASK_ERROR (LEDS_LED1 | LEDS_LED2) + + /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ + #define LEDMASK_BUSY (LEDS_LED1 | LEDS_LED2) + + /* Function Prototypes: */ + void SetupHardware(void); + + void EVENT_USB_Device_Connect(void); + void EVENT_USB_Device_Disconnect(void); + void EVENT_USB_Device_ConfigurationChanged(void); + void EVENT_USB_Device_UnhandledControlRequest(void); + + void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); + void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); + +#endif /* _ARDUINO_USBSERIAL_H_ */ diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Board/LEDs.h b/test/ardmake/hardware/firmwares/arduino-usbserial/Board/LEDs.h new file mode 100644 index 0000000..152e8f5 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Board/LEDs.h @@ -0,0 +1,110 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/* + Board LEDs driver for the Benito board, from www.dorkbotpdx.org. +*/ + +#ifndef __LEDS_ARDUINOUNO_H__ +#define __LEDS_ARDUINOUNO_H__ + + /* Includes: */ + #include + +/* Enable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + extern "C" { + #endif + + /* Preprocessor Checks: */ + #if !defined(INCLUDE_FROM_LEDS_H) + #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. + #endif + + /* Public Interface - May be used in end-application: */ + /* Macros: */ + /** LED mask for the first LED on the board. */ + #define LEDS_LED1 (1 << 5) + + /** LED mask for the second LED on the board. */ + #define LEDS_LED2 (1 << 4) + + /** LED mask for all the LEDs on the board. */ + #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2) + + /** LED mask for the none of the board LEDs */ + #define LEDS_NO_LEDS 0 + + /* Inline Functions: */ + #if !defined(__DOXYGEN__) + static inline void LEDs_Init(void) + { + DDRD |= LEDS_ALL_LEDS; + PORTD |= LEDS_ALL_LEDS; + } + + static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) + { + PORTD &= ~LEDMask; + } + + static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) + { + PORTD |= LEDMask; + } + + static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) + { + PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask); + } + + static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) + { + PORTD = ((PORTD | ActiveMask) & ~LEDMask); + } + + static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + { + PORTD ^= LEDMask; + } + + static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; + static inline uint8_t LEDs_GetLEDs(void) + { + return (PORTD & LEDS_ALL_LEDS); + } + #endif + + /* Disable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + } + #endif + +#endif diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.c b/test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.c new file mode 100644 index 0000000..705dddf --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.c @@ -0,0 +1,277 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * USB Device Descriptors, for library use when in USB device mode. Descriptors are special + * computer-readable structures which the host requests upon device enumeration, to determine + * the device's capabilities and functions. + */ + +#include "Descriptors.h" + +/* On some devices, there is a factory set internal serial number which can be automatically sent to the host as + * the device's serial number when the Device Descriptor's .SerialNumStrIndex entry is set to USE_INTERNAL_SERIAL. + * This allows the host to track a device across insertions on different ports, allowing them to retain allocated + * resources like COM port numbers and drivers. On demos using this feature, give a warning on unsupported devices + * so that the user can supply their own serial number descriptor instead or remove the USE_INTERNAL_SERIAL value + * from the Device Descriptor (forcing the host to generate a serial number for each device from the VID, PID and + * port location). + */ +#if (USE_INTERNAL_SERIAL == NO_DESCRIPTOR) + #warning USE_INTERNAL_SERIAL is not available on this AVR - please manually construct a device serial descriptor. +#endif + +/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall + * device characteristics, including the supported USB version, control endpoint size and the + * number of device configurations. The descriptor is read out by the USB host when the enumeration + * process begins. + */ +USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +{ + .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, + + .USBSpecification = VERSION_BCD(01.10), + .Class = 0x02, + .SubClass = 0x00, + .Protocol = 0x00, + + .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, + + .VendorID = 0x03EB, // Atmel + + .ProductID = 0x204B, // LUFA USB to Serial Demo Application + .ReleaseNumber = 0x0001, + + .ManufacturerStrIndex = 0x01, + .ProductStrIndex = 0x02, + .SerialNumStrIndex = USE_INTERNAL_SERIAL, + + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS +}; + +/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage + * of the device in one of its supported configurations, including information about any device interfaces + * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting + * a configuration so that the host may correctly communicate with the USB device. + */ +USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +{ + .Config = + { + .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, + + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), + .TotalInterfaces = 2, + + .ConfigurationNumber = 1, + .ConfigurationStrIndex = NO_DESCRIPTOR, + + .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED), + + .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) + }, + + .CDC_CCI_Interface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = 0, + .AlternateSetting = 0, + + .TotalEndpoints = 1, + + .Class = 0x02, + .SubClass = 0x02, + .Protocol = 0x01, + + .InterfaceStrIndex = NO_DESCRIPTOR + }, + + .CDC_Functional_IntHeader = + { + .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, + .SubType = 0x00, + + .Data = {0x01, 0x10} + }, + + .CDC_Functional_AbstractControlManagement = + { + .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24}, + .SubType = 0x02, + + .Data = {0x06} + }, + + .CDC_Functional_Union = + { + .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24}, + .SubType = 0x06, + + .Data = {0x00, 0x01} + }, + + .CDC_NotificationEndpoint = + { + .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CDC_NOTIFICATION_EPSIZE, + .PollingIntervalMS = 0xFF + }, + + .CDC_DCI_Interface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = 1, + .AlternateSetting = 0, + + .TotalEndpoints = 2, + + .Class = 0x0A, + .SubClass = 0x00, + .Protocol = 0x00, + + .InterfaceStrIndex = NO_DESCRIPTOR + }, + + .CDC_DataOutEndpoint = + { + .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM), + .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CDC_TXRX_EPSIZE, + .PollingIntervalMS = 0x01 + }, + + .CDC_DataInEndpoint = + { + .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM), + .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = CDC_TXRX_EPSIZE, + .PollingIntervalMS = 0x01 + } +}; + +/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests + * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate + * via the language ID table available at USB.org what languages the device supports for its string descriptors. + */ +USB_Descriptor_String_t PROGMEM LanguageString = +{ + .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String}, + + .UnicodeString = {LANGUAGE_ID_ENG} +}; + +/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable + * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +USB_Descriptor_String_t PROGMEM ManufacturerString = +{ + .Header = {.Size = USB_STRING_LEN(24), .Type = DTYPE_String}, + + .UnicodeString = L"Arduino (www.arduino.cc)" +}; + +/** Product descriptor string. This is a Unicode string containing the product's details in human readable form, + * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +USB_Descriptor_String_t PROGMEM ProductString = +{ + #if (ARDUINO_MODEL_PID == ARDUINO_UNO_PID) + .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String}, + + .UnicodeString = L"Arduino Uno" + #elif (ARDUINO_MODEL_PID == ARDUINO_MEGA2560_PID) + .Header = {.Size = USB_STRING_LEN(17), .Type = DTYPE_String}, + + .UnicodeString = L"Arduino Mega 2560" + #endif + +}; + +/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" + * documentation) by the application code so that the address and size of a requested descriptor can be given + * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function + * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the + * USB host. + */ +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) +{ + const uint8_t DescriptorType = (wValue >> 8); + const uint8_t DescriptorNumber = (wValue & 0xFF); + + void* Address = NULL; + uint16_t Size = NO_DESCRIPTOR; + + switch (DescriptorType) + { + case DTYPE_Device: + Address = (void*)&DeviceDescriptor; + Size = sizeof(USB_Descriptor_Device_t); + break; + case DTYPE_Configuration: + Address = (void*)&ConfigurationDescriptor; + Size = sizeof(USB_Descriptor_Configuration_t); + break; + case DTYPE_String: + switch (DescriptorNumber) + { + case 0x00: + Address = (void*)&LanguageString; + Size = pgm_read_byte(&LanguageString.Header.Size); + break; + case 0x01: + Address = (void*)&ManufacturerString; + Size = pgm_read_byte(&ManufacturerString.Header.Size); + break; + case 0x02: + Address = (void*)&ProductString; + Size = pgm_read_byte(&ProductString.Header.Size); + break; + } + + break; + } + + *DescriptorAddress = Address; + return Size; +} diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.h b/test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.h new file mode 100644 index 0000000..3ac4e52 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Descriptors.h @@ -0,0 +1,88 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Descriptors.c. + */ + +#ifndef _DESCRIPTORS_H_ +#define _DESCRIPTORS_H_ + + /* Includes: */ + #include + + #include + #include + + /* Product-specific definitions: */ + #define ARDUINO_UNO_PID 0x0001 + #define ARDUINO_MEGA2560_PID 0x0010 + + /* Macros: */ + /** Endpoint number of the CDC device-to-host notification IN endpoint. */ + #define CDC_NOTIFICATION_EPNUM 2 + + /** Endpoint number of the CDC device-to-host data IN endpoint. */ + #define CDC_TX_EPNUM 3 + + /** Endpoint number of the CDC host-to-device data OUT endpoint. */ + #define CDC_RX_EPNUM 4 + + /** Size in bytes of the CDC device-to-host notification IN endpoint. */ + #define CDC_NOTIFICATION_EPSIZE 8 + + /** Size in bytes of the CDC data IN and OUT endpoints. */ + #define CDC_TXRX_EPSIZE 64 + + /* Type Defines: */ + /** Type define for the device configuration descriptor structure. This must be defined in the + * application code, as the configuration descriptor contains several sub-descriptors which + * vary between devices, and which describe the device's usage to the host. + */ + typedef struct + { + USB_Descriptor_Configuration_Header_t Config; + USB_Descriptor_Interface_t CDC_CCI_Interface; + CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader; + CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_AbstractControlManagement; + CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; + USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; + USB_Descriptor_Interface_t CDC_DCI_Interface; + USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; + USB_Descriptor_Endpoint_t CDC_DataInEndpoint; + } USB_Descriptor_Configuration_t; + + /* Function Prototypes: */ + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + +#endif diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/Lib/LightweightRingBuff.h b/test/ardmake/hardware/firmwares/arduino-usbserial/Lib/LightweightRingBuff.h new file mode 100644 index 0000000..fb48c1f --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/Lib/LightweightRingBuff.h @@ -0,0 +1,197 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2010. + + dean [at] fourwalledcubicle [dot] com + www.fourwalledcubicle.com +*/ + +/* + Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaim all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Ultra lightweight ring buffer, for fast insertion/deletion. + */ + +#ifndef _ULW_RING_BUFF_H_ +#define _ULW_RING_BUFF_H_ + + /* Includes: */ + #include + + #include + #include + + /* Defines: */ + /** Size of each ring buffer, in data elements - must be between 1 and 255. */ + #define BUFFER_SIZE 128 + + /** Maximum number of data elements to buffer before forcing a flush. + * Must be less than BUFFER_SIZE + */ + #define BUFFER_NEARLY_FULL 96 + + /** Type of data to store into the buffer. */ + #define RingBuff_Data_t uint8_t + + /** Datatype which may be used to store the count of data stored in a buffer, retrieved + * via a call to \ref RingBuffer_GetCount(). + */ + #if (BUFFER_SIZE <= 0xFF) + #define RingBuff_Count_t uint8_t + #else + #define RingBuff_Count_t uint16_t + #endif + + /* Type Defines: */ + /** Type define for a new ring buffer object. Buffers should be initialized via a call to + * \ref RingBuffer_InitBuffer() before use. + */ + typedef struct + { + RingBuff_Data_t Buffer[BUFFER_SIZE]; /**< Internal ring buffer data, referenced by the buffer pointers. */ + RingBuff_Data_t* In; /**< Current storage location in the circular buffer */ + RingBuff_Data_t* Out; /**< Current retrieval location in the circular buffer */ + RingBuff_Count_t Count; + } RingBuff_t; + + /* Inline Functions: */ + /** Initializes a ring buffer ready for use. Buffers must be initialized via this function + * before any operations are called upon them. Already initialized buffers may be reset + * by re-initializing them using this function. + * + * \param[out] Buffer Pointer to a ring buffer structure to initialize + */ + static inline void RingBuffer_InitBuffer(RingBuff_t* const Buffer) + { + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) + { + Buffer->In = Buffer->Buffer; + Buffer->Out = Buffer->Buffer; + } + } + + /** Retrieves the minimum number of bytes stored in a particular buffer. This value is computed + * by entering an atomic lock on the buffer while the IN and OUT locations are fetched, so that + * the buffer cannot be modified while the computation takes place. This value should be cached + * when reading out the contents of the buffer, so that as small a time as possible is spent + * in an atomic lock. + * + * \note The value returned by this function is guaranteed to only be the minimum number of bytes + * stored in the given buffer; this value may change as other threads write new data and so + * the returned number should be used only to determine how many successive reads may safely + * be performed on the buffer. + * + * \param[in] Buffer Pointer to a ring buffer structure whose count is to be computed + */ + static inline RingBuff_Count_t RingBuffer_GetCount(RingBuff_t* const Buffer) + { + RingBuff_Count_t Count; + + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) + { + Count = Buffer->Count; + } + + return Count; + } + + /** Atomically determines if the specified ring buffer contains any free space. This should + * be tested before storing data to the buffer, to ensure that no data is lost due to a + * buffer overrun. + * + * \param[in,out] Buffer Pointer to a ring buffer structure to insert into + * + * \return Boolean true if the buffer contains no free space, false otherwise + */ + static inline bool RingBuffer_IsFull(RingBuff_t* const Buffer) + { + return (RingBuffer_GetCount(Buffer) == BUFFER_SIZE); + } + + /** Atomically determines if the specified ring buffer contains any data. This should + * be tested before removing data from the buffer, to ensure that the buffer does not + * underflow. + * + * If the data is to be removed in a loop, store the total number of bytes stored in the + * buffer (via a call to the \ref RingBuffer_GetCount() function) in a temporary variable + * to reduce the time spent in atomicity locks. + * + * \param[in,out] Buffer Pointer to a ring buffer structure to insert into + * + * \return Boolean true if the buffer contains no free space, false otherwise + */ + static inline bool RingBuffer_IsEmpty(RingBuff_t* const Buffer) + { + return (RingBuffer_GetCount(Buffer) == 0); + } + + /** Inserts an element into the ring buffer. + * + * \note Only one execution thread (main program thread or an ISR) may insert into a single buffer + * otherwise data corruption may occur. Insertion and removal may occur from different execution + * threads. + * + * \param[in,out] Buffer Pointer to a ring buffer structure to insert into + * \param[in] Data Data element to insert into the buffer + */ + static inline void RingBuffer_Insert(RingBuff_t* const Buffer, + const RingBuff_Data_t Data) + { + *Buffer->In = Data; + + if (++Buffer->In == &Buffer->Buffer[BUFFER_SIZE]) + Buffer->In = Buffer->Buffer; + + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) + { + Buffer->Count++; + } + } + + /** Removes an element from the ring buffer. + * + * \note Only one execution thread (main program thread or an ISR) may remove from a single buffer + * otherwise data corruption may occur. Insertion and removal may occur from different execution + * threads. + * + * \param[in,out] Buffer Pointer to a ring buffer structure to retrieve from + * + * \return Next data element stored in the buffer + */ + static inline RingBuff_Data_t RingBuffer_Remove(RingBuff_t* const Buffer) + { + RingBuff_Data_t Data = *Buffer->Out; + + if (++Buffer->Out == &Buffer->Buffer[BUFFER_SIZE]) + Buffer->Out = Buffer->Buffer; + + ATOMIC_BLOCK(ATOMIC_RESTORESTATE) + { + Buffer->Count--; + } + + return Data; + } + +#endif diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/makefile b/test/ardmake/hardware/firmwares/arduino-usbserial/makefile new file mode 100644 index 0000000..79d6be2 --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/makefile @@ -0,0 +1,776 @@ +# Hey Emacs, this is a -*- makefile -*- +#---------------------------------------------------------------------------- +# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al. +# >> Modified for use with the LUFA project. << +# +# Released to the Public Domain +# +# Additional material for this makefile was written by: +# Peter Fleury +# Tim Henigan +# Colin O'Flynn +# Reiner Patommel +# Markus Pfaff +# Sander Pool +# Frederik Rouleau +# Carlos Lamas +# Dean Camera +# Opendous Inc. +# Denver Gingerich +# +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device, using avrdude. +# Please customize the avrdude settings below first! +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make doxygen = Generate DoxyGen documentation for the project (must have +# DoxyGen installed) +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# MCU name(s) +# Since the ATMEGA8U2 part is not directly supported by the current +# versions of either avrdude or dfu-programmer, we specify a dummy +# part; AT90USB82 which is close enough in memory size and organization +MCU = atmega8u2 +MCU_AVRDUDE = at90usb82 +MCU_DFU = at90usb82 + +# Specify the Arduino model using the assigned PID. This is used by Descriptors.c +# to set PID and product descriptor string +# Uno PID: +ARDUINO_MODEL_PID = 0x0001 +# Mega 2560 PID: +#ARDUINO_MODEL_PID = 0x0010 + + +# Target board (see library "Board Types" documentation, NONE for projects not requiring +# LUFA board drivers). If USER is selected, put custom board drivers in a directory called +# "Board" inside the application directory. +BOARD = USER + + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_CLOCK below, as it is sourced by +# F_CLOCK after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# Input clock frequency. +# This will define a symbol, F_CLOCK, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_CLOCK = $(F_CPU) + + +# Output format. (can be srec, ihex, binary) +FORMAT = ihex + + +# Target file name (without extension). +TARGET = Arduino-usbserial + + +# Object files directory +# To put object files in current directory, use a dot (.), do NOT make +# this an empty or blank macro! +OBJDIR = . + + +# Path to the LUFA library +LUFA_PATH = ../.. + + +# LUFA library compile-time options +LUFA_OPTS = -D USB_DEVICE_ONLY +LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8 +LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1 +LUFA_OPTS += -D USE_FLASH_DESCRIPTORS +LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT +LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0 +LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" + + +# Create the LUFA source path variables by including the LUFA root makefile +include $(LUFA_PATH)/LUFA/makefile + + +# List C source files here. (C dependencies are automatically generated.) +SRC = $(TARGET).c \ + Descriptors.c \ + $(LUFA_SRC_USB) \ + $(LUFA_SRC_USBCLASS) \ + $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Device.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Endpoint.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/HostStandardReq.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Host.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/Pipe.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/USBController.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/Events.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/LowLevel/USBInterrupt.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/USBTask.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/Class/Device/CDC.c \ + $(LUFA_PATH)/LUFA/Drivers/USB/Class/Host/CDC.c + + +# List C++ source files here. (C dependencies are automatically generated.) +CPPSRC = + + +# List Assembler source files here. +# Make them always end in a capital .S. Files ending in a lowercase .s +# will not be considered source files but generated files (assembler +# output from the compiler), and will be deleted upon "make clean"! +# Even though the DOS/Win* filesystem matches both .s and .S the same, +# it will preserve the spelling of the filenames, and gcc itself does +# care about how the name is spelled on its command-line. +ASRC = + + +# Optimization level, can be [0, 1, 2, 3, s]. +# 0 = turn off optimization. s = optimize for size. +# (Note: 3 is not always the best optimization level. See avr-libc FAQ.) +OPT = s + + +# Debugging format. +# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. +# AVR Studio 4.10 requires dwarf-2. +# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. +DEBUG = dwarf-2 + + +# List any extra directories to look for include files here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRAINCDIRS = $(LUFA_PATH)/ + + +# Compiler flag to set the C Standard level. +# c89 = "ANSI" C +# gnu89 = c89 plus GCC extensions +# c99 = ISO C99 standard (not yet fully implemented) +# gnu99 = c99 plus GCC extensions +CSTANDARD = -std=gnu99 + + +# Place -D or -U options here for C sources +CDEFS = -DF_CPU=$(F_CPU)UL +CDEFS += -DF_CLOCK=$(F_CLOCK)UL +CDEFS += -DARDUINO_MODEL_PID=$(ARDUINO_MODEL_PID) +CDEFS += -DBOARD=BOARD_$(BOARD) +CDEFS += $(LUFA_OPTS) +CDEFS += -DAVR_RESET_LINE_PORT="PORTD" +CDEFS += -DAVR_RESET_LINE_DDR="DDRD" +CDEFS += -DAVR_RESET_LINE_MASK="(1 << 7)" +CDEFS += -DTX_RX_LED_PULSE_MS=3 +CDEFS += -DPING_PONG_LED_PULSE_MS=100 + +# Place -D or -U options here for ASM sources +ADEFS = -DF_CPU=$(F_CPU) +ADEFS += -DF_CLOCK=$(F_CLOCK)UL +ADEFS += -DBOARD=BOARD_$(BOARD) +ADEFS += $(LUFA_OPTS) + +# Place -D or -U options here for C++ sources +CPPDEFS = -DF_CPU=$(F_CPU)UL +CPPDEFS += -DF_CLOCK=$(F_CLOCK)UL +CPPDEFS += -DBOARD=BOARD_$(BOARD) +CPPDEFS += $(LUFA_OPTS) +#CPPDEFS += -D__STDC_LIMIT_MACROS +#CPPDEFS += -D__STDC_CONSTANT_MACROS + + + +#---------------- Compiler Options C ---------------- +# -g*: generate debugging information +# -O*: optimization level +# -f...: tuning, see GCC manual and avr-libc documentation +# -Wall...: warning level +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns...: create assembler listing +CFLAGS = -g$(DEBUG) +CFLAGS += $(CDEFS) +CFLAGS += -O$(OPT) +CFLAGS += -funsigned-char +CFLAGS += -funsigned-bitfields +CFLAGS += -ffunction-sections +CFLAGS += -fno-inline-small-functions +CFLAGS += -fpack-struct +CFLAGS += -fshort-enums +CFLAGS += -fno-strict-aliasing +CFLAGS += -Wall +CFLAGS += -Wstrict-prototypes +#CFLAGS += -mshort-calls +#CFLAGS += -fno-unit-at-a-time +#CFLAGS += -Wundef +#CFLAGS += -Wunreachable-code +#CFLAGS += -Wsign-compare +CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) +CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +CFLAGS += $(CSTANDARD) + + +#---------------- Compiler Options C++ ---------------- +# -g*: generate debugging information +# -O*: optimization level +# -f...: tuning, see GCC manual and avr-libc documentation +# -Wall...: warning level +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns...: create assembler listing +CPPFLAGS = -g$(DEBUG) +CPPFLAGS += $(CPPDEFS) +CPPFLAGS += -O$(OPT) +CPPFLAGS += -funsigned-char +CPPFLAGS += -funsigned-bitfields +CPPFLAGS += -fpack-struct +CPPFLAGS += -fshort-enums +CPPFLAGS += -fno-exceptions +CPPFLAGS += -Wall +CPPFLAGS += -Wundef +CFLAGS += -Wundef +#CPPFLAGS += -mshort-calls +#CPPFLAGS += -fno-unit-at-a-time +#CPPFLAGS += -Wstrict-prototypes +#CPPFLAGS += -Wunreachable-code +#CPPFLAGS += -Wsign-compare +CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) +CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +#CPPFLAGS += $(CSTANDARD) + + +#---------------- Assembler Options ---------------- +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns: create listing +# -gstabs: have the assembler create line number information; note that +# for use in COFF files, additional information about filenames +# and function names needs to be present in the assembler source +# files -- see avr-libc docs [FIXME: not yet described there] +# -listing-cont-lines: Sets the maximum number of continuation lines of hex +# dump that will be displayed for a given single line of source input. +ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100 + + +#---------------- Library Options ---------------- +# Minimalistic printf version +PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min + +# Floating point printf version (requires MATH_LIB = -lm below) +PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt + +# If this is left blank, then it will use the Standard printf version. +PRINTF_LIB = +#PRINTF_LIB = $(PRINTF_LIB_MIN) +#PRINTF_LIB = $(PRINTF_LIB_FLOAT) + + +# Minimalistic scanf version +SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min + +# Floating point + %[ scanf version (requires MATH_LIB = -lm below) +SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt + +# If this is left blank, then it will use the Standard scanf version. +SCANF_LIB = +#SCANF_LIB = $(SCANF_LIB_MIN) +#SCANF_LIB = $(SCANF_LIB_FLOAT) + + +MATH_LIB = -lm + + +# List any extra directories to look for libraries here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRALIBDIRS = + + + +#---------------- External Memory Options ---------------- + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# used for variables (.data/.bss) and heap (malloc()). +#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# only used for heap (malloc()). +#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff + +EXTMEMOPTS = + + + +#---------------- Linker Options ---------------- +# -Wl,...: tell GCC to pass this to linker. +# -Map: create map file +# --cref: add cross reference to map file +LDFLAGS = -Wl,-Map=$(TARGET).map,--cref +LDFLAGS += -Wl,--relax +LDFLAGS += -Wl,--gc-sections +LDFLAGS += $(EXTMEMOPTS) +LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS)) +LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) +#LDFLAGS += -T linker_script.x + + + +#---------------- Programming Options (avrdude) ---------------- + +# Programming hardware +# Type: avrdude -c ? +# to get a full listing. +# +AVRDUDE_PROGRAMMER = avrispmkii + +# com1 = serial port. Use lpt1 to connect to parallel port. +AVRDUDE_PORT = usb + +AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex +#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep + + +# Uncomment the following if you want avrdude's erase cycle counter. +# Note that this counter needs to be initialized first using -Yn, +# see avrdude manual. +#AVRDUDE_ERASE_COUNTER = -y + +# Uncomment the following if you do /not/ wish a verification to be +# performed after programming the device. +#AVRDUDE_NO_VERIFY = -V + +# Increase verbosity level. Please use this when submitting bug +# reports about avrdude. See +# to submit bug reports. +#AVRDUDE_VERBOSE = -v -v + +AVRDUDE_FORCE = -F + +AVRDUDE_FLAGS = -p $(MCU_AVRDUDE) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) +AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) +AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) +AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) +AVRDUDE_FLAGS += $(AVRDUDE_FORCE) + + + +#---------------- Debugging Options ---------------- + +# For simulavr only - target MCU frequency. +DEBUG_MFREQ = $(F_CPU) + +# Set the DEBUG_UI to either gdb or insight. +# DEBUG_UI = gdb +DEBUG_UI = insight + +# Set the debugging back-end to either avarice, simulavr. +DEBUG_BACKEND = avarice +#DEBUG_BACKEND = simulavr + +# GDB Init Filename. +GDBINIT_FILE = __avr_gdbinit + +# When using avarice settings for the JTAG +JTAG_DEV = /dev/com1 + +# Debugging port used to communicate between GDB / avarice / simulavr. +DEBUG_PORT = 4242 + +# Debugging host used to communicate between GDB / avarice / simulavr, normally +# just set to localhost unless doing some sort of crazy debugging when +# avarice is running on a different computer. +DEBUG_HOST = localhost + + + +#============================================================================ + + +# Define programs and commands. +SHELL = sh +CC = avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +SIZE = avr-size +AR = avr-ar rcs +NM = avr-nm +AVRDUDE = avrdude +REMOVE = rm -f +REMOVEDIR = rm -rf +COPY = cp +WINSHELL = cmd + +# Define Messages +# English +MSG_ERRORS_NONE = Errors: none +MSG_BEGIN = -------- begin -------- +MSG_END = -------- end -------- +MSG_SIZE_BEFORE = Size before: +MSG_SIZE_AFTER = Size after: +MSG_COFF = Converting to AVR COFF: +MSG_EXTENDED_COFF = Converting to AVR Extended COFF: +MSG_FLASH = Creating load file for Flash: +MSG_EEPROM = Creating load file for EEPROM: +MSG_EXTENDED_LISTING = Creating Extended Listing: +MSG_SYMBOL_TABLE = Creating Symbol Table: +MSG_LINKING = Linking: +MSG_COMPILING = Compiling C: +MSG_COMPILING_CPP = Compiling C++: +MSG_ASSEMBLING = Assembling: +MSG_CLEANING = Cleaning project: +MSG_CREATING_LIBRARY = Creating library: + + + + +# Define all object files. +OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) + +# Define all listing files. +LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) + + +# Compiler flags to generate dependency files. +GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d + + +# Combine all necessary flags and optional flags. +# Add target processor to flags. +ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS) +ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS) +ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) + + + + + +# Default target. +#all: begin gccversion sizebefore build checkinvalidevents showliboptions showtarget sizeafter end +all: begin gccversion sizebefore build showliboptions showtarget sizeafter end + +# Change the build target to build a HEX file or a library. +build: elf hex eep lss sym asm +#build: lib + + +elf: $(TARGET).elf +hex: $(TARGET).hex +eep: $(TARGET).eep +lss: $(TARGET).lss +sym: $(TARGET).sym +asm: $(TARGET).s +LIBNAME=lib$(TARGET).a +lib: $(LIBNAME) + + + +# Eye candy. +# AVR Studio 3.x does not check make's exit code but relies on +# the following magic strings to be generated by the compile job. +begin: + @echo + @echo $(MSG_BEGIN) + +end: + @echo $(MSG_END) + @echo + + +# Display size of file. +HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex +ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf +MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) ) +FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr ) + +sizebefore: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \ + 2>/dev/null; echo; fi + +sizeafter: + @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \ + 2>/dev/null; echo; fi + +#$(LUFA_PATH)/LUFA/LUFA_Events.lst: +# @make -C $(LUFA_PATH)/LUFA/ LUFA_Events.lst + +#checkinvalidevents: $(LUFA_PATH)/LUFA/LUFA_Events.lst +# @echo +# @echo Checking for invalid events... +# @$(shell) avr-nm $(OBJ) | sed -n -e 's/^.*EVENT_/EVENT_/p' | \ +# grep -F -v --file=$(LUFA_PATH)/LUFA/LUFA_Events.lst > InvalidEvents.tmp || true +# @sed -n -e 's/^/ WARNING - INVALID EVENT NAME: /p' InvalidEvents.tmp +# @if test -s InvalidEvents.tmp; then exit 1; fi + +showliboptions: + @echo + @echo ---- Compile Time Library Options ---- + @for i in $(LUFA_OPTS:-D%=%); do \ + echo $$i; \ + done + @echo -------------------------------------- + +showtarget: + @echo + @echo --------- Target Information --------- + @echo AVR Model: $(MCU) + @echo Board: $(BOARD) + @echo Clock: $(F_CPU)Hz CPU, $(F_CLOCK)Hz Master + @echo -------------------------------------- + + +# Display compiler version information. +gccversion : + @$(CC) --version + + +# Program the device. +program: $(TARGET).hex $(TARGET).eep + $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) + +flip: $(TARGET).hex + batchisp -hardware usb -device $(MCU_DFU) -operation erase f + batchisp -hardware usb -device $(MCU_DFU) -operation loadbuffer $(TARGET).hex program + batchisp -hardware usb -device $(MCU_DFU) -operation start reset 0 + +dfu: $(TARGET).hex + dfu-programmer $(MCU_DFU) erase + dfu-programmer $(MCU_DFU) flash --debug 1 $(TARGET).hex + dfu-programmer $(MCU_DFU) reset + + +flip-ee: $(TARGET).hex $(TARGET).eep + $(COPY) $(TARGET).eep $(TARGET)eep.hex + batchisp -hardware usb -device $(MCU_DFU) -operation memory EEPROM erase + batchisp -hardware usb -device $(MCU_DFU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program + batchisp -hardware usb -device $(MCU_DFU) -operation start reset 0 + $(REMOVE) $(TARGET)eep.hex + +dfu-ee: $(TARGET).hex $(TARGET).eep + dfu-programmer $(MCU_DFU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep + dfu-programmer $(MCU_DFU) reset + + +# Generate avr-gdb config/init file which does the following: +# define the reset signal, load the target file, connect to target, and set +# a breakpoint at main(). +gdb-config: + @$(REMOVE) $(GDBINIT_FILE) + @echo define reset >> $(GDBINIT_FILE) + @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) + @echo end >> $(GDBINIT_FILE) + @echo file $(TARGET).elf >> $(GDBINIT_FILE) + @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) +ifeq ($(DEBUG_BACKEND),simulavr) + @echo load >> $(GDBINIT_FILE) +endif + @echo break main >> $(GDBINIT_FILE) + +debug: gdb-config $(TARGET).elf +ifeq ($(DEBUG_BACKEND), avarice) + @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. + @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ + $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) + @$(WINSHELL) /c pause + +else + @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ + $(DEBUG_MFREQ) --port $(DEBUG_PORT) +endif + @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) + + + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT = $(OBJCOPY) --debugging +COFFCONVERT += --change-section-address .data-0x800000 +COFFCONVERT += --change-section-address .bss-0x800000 +COFFCONVERT += --change-section-address .noinit-0x800000 +COFFCONVERT += --change-section-address .eeprom-0x810000 + + + +coff: $(TARGET).elf + @echo + @echo $(MSG_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-avr $< $(TARGET).cof + + +extcoff: $(TARGET).elf + @echo + @echo $(MSG_EXTENDED_COFF) $(TARGET).cof + $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof + + + +# Create final output files (.hex, .eep) from ELF output file. +%.hex: %.elf + @echo + @echo $(MSG_FLASH) $@ + $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@ + +%.eep: %.elf + @echo + @echo $(MSG_EEPROM) $@ + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0 + +# Create extended listing file from ELF output file. +%.lss: %.elf + @echo + @echo $(MSG_EXTENDED_LISTING) $@ + $(OBJDUMP) -h -S -z $< > $@ + +# Create a symbol table from ELF output file. +%.sym: %.elf + @echo + @echo $(MSG_SYMBOL_TABLE) $@ + $(NM) -n $< > $@ + + + +# Create library from object files. +.SECONDARY : $(TARGET).a +.PRECIOUS : $(OBJ) +%.a: $(OBJ) + @echo + @echo $(MSG_CREATING_LIBRARY) $@ + $(AR) $@ $(OBJ) + + +# Link: create ELF output file from object files. +.SECONDARY : $(TARGET).elf +.PRECIOUS : $(OBJ) +%.elf: $(OBJ) + @echo + @echo $(MSG_LINKING) $@ + $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) + + +# Compile: create object files from C source files. +$(OBJDIR)/%.o : %.c + @echo + @echo $(MSG_COMPILING) $< + $(CC) -c $(ALL_CFLAGS) $< -o $@ + + +# Compile: create object files from C++ source files. +$(OBJDIR)/%.o : %.cpp + @echo + @echo $(MSG_COMPILING_CPP) $< + $(CC) -c $(ALL_CPPFLAGS) $< -o $@ + + +# Compile: create assembler files from C source files. +%.s : %.c + $(CC) -S $(ALL_CFLAGS) $< -o $@ + + +# Compile: create assembler files from C++ source files. +%.s : %.cpp + $(CC) -S $(ALL_CPPFLAGS) $< -o $@ + + +# Assemble: create object files from assembler source files. +$(OBJDIR)/%.o : %.S + @echo + @echo $(MSG_ASSEMBLING) $< + $(CC) -c $(ALL_ASFLAGS) $< -o $@ + + +# Create preprocessed source for use in sending a bug report. +%.i : %.c + $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@ + + +# Target: clean project. +clean: begin clean_list clean_binary end + +clean_binary: + $(REMOVE) $(TARGET).hex + +clean_list: + @echo $(MSG_CLEANING) + $(REMOVE) $(TARGET).hex + $(REMOVE) $(TARGET).eep + $(REMOVE) $(TARGET).cof + $(REMOVE) $(TARGET).elf + $(REMOVE) $(TARGET).map + $(REMOVE) $(TARGET).sym + $(REMOVE) $(TARGET).lss + $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) + $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) + $(REMOVE) $(SRC:.c=.s) + $(REMOVE) $(SRC:.c=.d) + $(REMOVE) $(SRC:.c=.i) + $(REMOVEDIR) .dep + +doxygen: + @echo Generating Project Documentation... + @doxygen Doxygen.conf + @echo Documentation Generation Complete. + +clean_doxygen: + rm -rf Documentation + +# Create object files directory +$(shell mkdir $(OBJDIR) 2>/dev/null) + + +# Include the dependency files. +-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) + + +# Listing of phony targets. +.PHONY : all begin finish end sizebefore sizeafter gccversion \ +build elf hex eep lss sym coff extcoff doxygen clean \ +clean_list clean_doxygen program dfu flip flip-ee dfu-ee \ +debug gdb-config diff --git a/test/ardmake/hardware/firmwares/arduino-usbserial/readme.txt b/test/ardmake/hardware/firmwares/arduino-usbserial/readme.txt new file mode 100644 index 0000000..289326b --- /dev/null +++ b/test/ardmake/hardware/firmwares/arduino-usbserial/readme.txt @@ -0,0 +1,13 @@ +To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: +1. unpack the source into LUFA's Projects directory +2. set ARDUINO_MODEL_PID in the makefile as appropriate +3. do "make clean; make" +4. put the 8U2 into USB DFU mode: +4.a. assert and hold the 8U2's RESET line +4.b. assert and hold the 8U2's HWB line +4.c. release the 8U2's RESET line +4.d. release the 8U2's HWB line +5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" +6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) + +Check that the board enumerates as either "Arduino Uno" or "Arduino Mega 2560". Test by uploading a new Arduino sketch from the Arduino IDE. diff --git a/test/ardmake/hardware/programmers.txt b/test/ardmake/hardware/programmers.txt new file mode 100644 index 0000000..466f602 --- /dev/null +++ b/test/ardmake/hardware/programmers.txt @@ -0,0 +1,20 @@ +avrisp.name=AVR ISP +avrisp.communication=serial +avrisp.protocol=stk500v1 + +avrispmkii.name=AVRISP mkII +avrispmkii.communication=usb +avrispmkii.protocol=stk500v2 + +usbtinyisp.name=USBtinyISP +usbtinyisp.protocol=usbtiny + +parallel.name=Parallel Programmer +parallel.protocol=dapa +parallel.force=true +# parallel.delay=200 + +arduinoisp.name=Arduino as ISP +arduinoisp.communication=serial +arduinoisp.protocol=stk500v1 +arduinoisp.speed=19200 diff --git a/test/arduino_make.sh b/test/arduino_make.sh new file mode 100755 index 0000000..a4aaee9 --- /dev/null +++ b/test/arduino_make.sh @@ -0,0 +1,1359 @@ +#!/bin/sh +# ardmake: A command-line Arduino make/build environment. 2009-12-08 +# For instructions, run with the argument "help"! +# +# This script is Copyright (c) 2009 Kimmo Kulovesi . +# Use at your own risk only. Released under GPL, see below for details. +# Please mark any modified copies as such, and retain the original +# copyright notice in all relevant files, usage, and documentation. +# +# +# INTRODUCTION +# +# This script runs the Makefile included with Arduino to compile and +# upload projects on the command-line. This script sets all +# board-specific variables automatically according to the board type, +# as well as detects and adds libraries automatically based on the +# #include-directives in the program (i.e. with the same convenience +# as the graphical Arduino environment). This script also supports +# burning bootloaders, setting fuses, uploading pre-compiled binaries, +# and using certain external programming devices (e.g. for stand-alone +# microcontrollers). +# +# In short, this script can completely replace the Arduino IDE for +# typical Arduino/ATMega development, and in some cases it can even +# do more than the IDE. The intended user is a relatively experienced +# command-line user, who wants to combine the power of their chosen +# editor and tools with the development speed and convenience of +# the Arduino platform. Beginners will probably be more comfortable +# starting with the simple graphical Arduino IDE. +# +# This script is not an official part of Arduino, but since it is +# in active use by its author, it will probably be rapidly updated +# to support any new Arduino releases (and some care has been +# taken to minimise the changes necessary to support each release). +# +# +# INSTALLATION +# +# Install Arduino somewhere, e.g. /opt/arduino or ~/arduino. If you +# are using additional core types (e.g. Sanguino) or custom board +# types (e.g. ADABoot), also install them. Custom libraries can be +# installed in e.g. ~/sketchbook/libraries, or anywhere you like. +# +# Install the AVR version of GCC (e.g. package name avr-gcc) and +# AVRDUDE (you can probably use the one bundled with Arduino if you +# prefer). Preferably install versions packaged for your specific +# Linux distribution (e.g. with apt-get install avr-gcc avrdude). +# +# Put this script somewhere along your PATH (e.g. /usr/local/bin, +# ~/bin, or wherever you like to install programs). This script is +# distributed by the author as "arduino_make.sh" due to historical +# reasons, but "ardmake" is the suggested name (shorter to type and +# all). Run this script with the parameter "help" and read about +# configuring and usage (usually only the board type needs to be set +# and you are good to go). +# +# +# SYSTEM REQUIREMENTS +# +# Last been tested with Arduino version 0017 on Ubuntu 9.04, with +# avr-gcc and avrdude installed from Ubuntu packages. While this script +# should run in non-Linux environments, there are some dependencies to +# GNU tools (e.g. GNU Make), so GNU/Linux should be considered the +# preferred/intended environment for running this. +# +# +# CHANGES +# +# December 2009 - Added a "serial monitor" (target "serial") with +# limited support for serial speed autodetection +# from the Arduino program. +# - Added support for using the "arduino" protocol +# in avrdude when available; this eliminates the +# need to reset the device with "stty". The old +# behaviour can be restored by using the target +# "upload_autoreset" instead of "upload". +# - Added support for downloading with external +# programmers. +# - Added basic support for reading configurations +# for external programming devices from the +# file hardware/programmers.txt, in addition to +# the built-in isp and dragon targets. This should +# enable the use of parallel programmers. +# - Added target "programmers" for listing supported +# external programming devices. +# - Don't do autoreset when uploading with external +# programmers. +# - Removed unnecessary debug outputs. +# - Additional documentation in the script file. +# November 2009 - Major bugfix for boards with CPU frequency other +# than 16MHz. +# - Possibly fixed the __cxa_pure_virtual issue. +# - Forcing user to define ARDUINO_BOARD explicitly +# since using an incorrect board type can cause +# nasty hidden errors. +# - Added reset commands to upload and download +# when not using the Makefile. +# - Added dependency on the board type, i.e. if the +# board type is changed, everything gets rebuilt. +# - Added target "boards" to list available boards. +# - Changed default library path to include the +# "~/sketchbook/libraries" directory, similarly to +# the current Arduino IDE. +# - Made building locally the default and fixed +# the problem of dependency files being built in +# the core directory. +# - Implemented reading configuration from +# ~/.ardmake.conf and ardmake.conf in the +# sketch directory. +# - Fixed build dependencies with Sanguino. +# - Rewrote most of the help texts. +# - Fixed compatibility with mawk. Thanks to Tom +# Parkin for reporting this! +# October 2009 - Support AVRISP and burning bootloaders. +# - Support building object files into the +# applet directory instead of the core and +# library directories. +# - Generate automatic dependecies for libraries +# - Support uploading specified .hex or .bin +# directly without compiling anything +# - Support downloading flash memory from +# microcontroller to .hex or .bin file +# - Replace the slightly broken build target: +# - Proper dependencies +# - Show correct file name and line numbers for errors +# - Display program size compared to controller capacity +# September 2009 - Support Arduino 017 +# March 2009 - Support Arduino 014 +# February 2009 - Initial version +# +# +# FANCY ARDUINO DEVICE NODES ON LINUX +# +# The default port for the Arduino is set to "/dev/arduino", which +# requires udev rules (but avoids the problem of changing ttyUSB names). +# Alternatively, it can be changed in this file. The udev rule that +# works for the Arduino clone that I have is this: +# +# KERNEL=="ttyUSB*", ATTRS{product}=="FT232R USB UART", \ +# ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", \ +# SYMLINK+="arduino arduino_$attr{serial}", GROUP="avrprog", MODE="0660" +# +# You will probably want to change the group to "dialout", or create +# the "avrprog" group on your system (like I did). On Ubuntu Linux, place +# the rule in a file inside "/etc/udev/rules.d", e.g. "80-arduino.rules". +# +# If you have many devices with the same product and vendor ids, +# as may be the case with a popular chip like FT232R, you can +# add the condition "ATTRS{serial}" to your udev rules. You can +# see the serial if you first use the above rules and then look at +# the symlink "arduino_SERIAL" where SERIAL is the serial number +# of that particular device. Then create one rule for each of your +# devices' serial numbers (add ATTRS{serial}=="MySerial", right +# before SYMLINK in the above rules). +# +# +# COMPILER ERROR ABOUT __cxa_pure_virtual +# +# Some versions of Arduino and avr-gcc cause an error about a missing +# function "__cxa_pure_virtual" in programs where C++ classes are used. +# To fix this problem, add the following line anywhere in your program: +# +# extern "C" void __cxa_pure_virtual() {} +# +################################################################################### +# This script is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, +# or (at your option) any later version. +# +# This script is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this script. If not, see . +################################################################################### +# Read the configuration file (if any): + +CONFNAME="ardmake.conf" +for conf in "./$CONFNAME" "$HOME/.$CONFNAME"; do + if [ -r "$conf" ]; then + eval "$(awk -v FS== '{ sub(/^[ \t]*/, ""); sub(/^(set|export)[ ]*/, ""); + if (/^A(RDUINO_|AVR)[A-Za-z0-9_]*=[^;<>`]*$/) { + print "[ -z \"$" $1 "\" ] && " $0 + } + next }' "$conf")" + #echo "Loaded configuration file \"$conf\"." + fi +done + +################################################################################### +# Defaults configuration: + +# Path to avr tools (/usr/bin if installed from Linux distribution packages) +[ -z "$AVR_TOOLS_PATH" ] && AVR_TOOLS_PATH=/usr/bin + +# Path to avrdude (/usr/bin if installed from Linux distribution packages) +[ -z "$AVRDUDE_PATH" ] && AVRDUDE_PATH=/usr/bin + +# Path to search for additional Arduino libraries (separated by : colons). +# The "official" script directory at hardware/libraries is always searched! + +if [ -z "$ARDUINO_LIBRARY_PATH" ]; then + ARDUINO_LIBRARY_PATH="../libraries:$HOME/sketchbook/libraries" +fi + +# Try to figure out Arduino install directory (first from environment +# variable ARDUINO_DIR, then ~/arduino, then opt/arduino) +if [ -n "$ARDUINO_DIR" ]; then + INSTALL_DIR="$ARDUINO_DIR" +else + INSTALL_DIR="$HOME/arduino" + if [ ! -x "$INSTALL_DIR/arduino" -a -x '/opt/arduino/arduino' ]; then + INSTALL_DIR='/opt/arduino' + fi +fi + +# Build locally unless a shared build is specifically requested: +if [ ! "$ARDUINO_BUILD" = "shared" ]; then + BUILD_LOCALLY=1 +else + BUILD_LOCALLY='' +fi + +# The extension for Arduino program files (.pde at the time of writing, but +# this is the same as for Processing - .ade would be more fitting) +EXT='pde' + +# Command to reset serial port: +RESET_COMMAND="stty hupcl; sleep 0.1; true" + +################################################################################### + +basename="$(basename "$0")" + +# Check the configuration: + +PROGRAMMERFILE="$INSTALL_DIR/hardware/programmers.txt" +BOARDFILE="$INSTALL_DIR/hardware/boards.txt" +if [ ! -r "$BOARDFILE" ]; then + cat >&2 <>~/.$CONFNAME + +Run "$basename help" for instructions. +EOF + exit 1 +fi + +[ ! -x "$AVRDUDE_PATH/avrdude" ] && AVRDUDE_PATH="$INSTALL_DIR/hardware/tools" +[ ! -x "$AVRDUDE_PATH/avrdude" ] && AVRDUDE_PATH="$(dirname $(which avrdude))" +if [ ! -x "$AVRDUDE_PATH/avrdude" ]; then + cat >&2 <&2 <. This script +is provided as free software under GPL with ABSOLUTELY NO WARRANTY. + +Usage: $basename [target] [options for Make] + +This script provides a command-line build environment for Arduino, +by wrapping the call to Make and setting parameters for it over those +defined in the Arduino Makefile. Supported features include library +autodetection from #include-directives (just like the graphical IDE), +custom library paths, all board types (including custom ones), external +programming devices, downloading programs from the microcontroller, etc. + + +Setup and installation: + 1) Install Arduino, e.g.: + wget http://arduino.googlecode.com/files/arduino-0017.tgz + tar xvzf arduino-0017.tgz; ln -s arduino-0017 arduino + 2) Install avrdude and GCC for AVR, e.g. on Ubuntu & Debian: + apt-get install avrdude gcc-avr + 3) Configure your Arduino installation directory, e.g. + export ARDUINO_DIR=/path/to/arduino + 3) Configure your Arduino board, e.g.: + export ARDUINO_BOARD=diecimila + 4) Configure your Arduino serial port device, e.g.: + export ARDUINO_PORT=/dev/ttyUSB0 + + The variable ARDUINO_BOARD must be set to the short name of the + board you are using. To list available board types, use the + command "$basename boards". + + By default, this script attempts to find an Arduino installation + in ~/arduino and /opt/arduino. If it's neither of these, specify + the variable ARDUINO_DIR accordingly. + + The serial device defaults to /dev/ (e.g. /dev/arduino), + and to /dev/ttyUSB0 if that is not available. A specific port may + be configured by setting the variable ARDUINO_PORT. Linux admins + may wish to specify udev rules so that the port device is constant + (e.g. /dev/arduino); for details on that, see the comments at the top + of this script file, i.e. "$0". + +Configuring variables: + The configuration variables for this script (as detailed above) + can be set in the file ~/.$CONFNAME, e.g.: + echo ARDUINO_BOARD=atmega328 >~/.$CONFNAME + + To override all or part of this global configuration, a + program-specific configuration file called $CONFNAME can be + created inside each sketch directory, if desired. Any settings + found in the sketch directory $CONFNAME take precedence over + the settings in the user's ~/.$CONFNAME. + + You may also configure any or all of these variables in the + environment. Variables configured in the environment take + precedence over those in any configuration file! This allows + you to specify variables directly on the command-line, e.g.: + ARDUINO_DIR=~/arduino-0014 $basename + +To create and upload an Arduino sketch: + 1) Create a directory for your program ("sketch"), e.g. + mkdir -p ~/sketchbook/Blink + 2) Create your program .$EXT inside the directory, e.g.: + cd ~/sketchbook/Blink; vim Blink.$EXT + 3) Compile your program by running this script: + $basename + 4) After a succesful compilation, upload to your board: + $basename upload + + Libraries are automatically detected from the #include-directives + used. The libraries installed together with your Arduino are + always available. Custom libraries are searched for in the + directory ~/sketchbook/libraries and in ../libraries (i.e. in + the directory libraries in the same directory as your sketch + directory is in). + + The custom library locations can be overridden by specifying + the variable ARDUINO_LIBRARY_PATH as a colon-separated list of + directories, e.g.: + ARDUINO_LIBRARY_PATH=$HOME/arduino_libs:/opt/arduino_libs + + +There are also other make targets that you may use instead of +compile (the default) and upload. The target is specified as the first +command-line argument, and it can be any target in the Makefile. Special +targets handled by $basename are: + +compile (default): Compile the applet (.hex file) ready for uploading. + Do this first after making changes to your program! + +upload: Upload the applet to the microcontroller. See above + about the configuration variable ARDUINO_PORT. Usage: + $basename upload + + To upload a pre-compiled file to the microcontroller, + you can specify a filename after upload on the + command line. The file must have the extension + .hex for Intel hex format, or the extension .bin + for raw binary format. For example: + $basename upload myprog.hex + +isp: +dragon: Just like "upload", but an AVRISP (or clone) or + an AVRDragon device is used to upload instead. These + can be used to upload to a stand-alone microcontroller + in ISP mode. + + The AVRDragon is an USB device and the port is + autodetected. For AVRISP and clones, the default + ports are /dev/avrisp and /dev/ttyUSB0, but the + port can be overridden by setting AVRISP_PORT. + +programmer: Like "isp" and "dragon", except the target must + be followed by the short name of a programmer + defined in hardware/programmers.txt. This allows + you to use any external programmer define there, e.g.: + $basename programmer parallel + +download: Download the microcontroller's flash memory to + the file specified as the next command line + parameter. The file name MUST have either the + extension .hex for Intel hex format, or the + extension .bin for raw binary format. For example: + $basename download backup.bin + + External programmers can be used by specifying + "download" after the programmer, e.g.: + $basename isp download backup.hex + +serial: Start a serial monitor on the serial port. The port + device defaults to the programming port (ARDUINO_PORT), + but it can be specified on the command line. The + speed can often be autodetected from the program in + the current directory if it uses Serial.begin(speed), + but the speed defaults to 9600 and can be specified + on the command line. Examples: + $basename serial + $basename serial 19200 + $basename serial /dev/ttyS0 + $basename serial /dev/ttyUSB1 2400 + +boards: List available board types. +programmers: List available external programmer types. +coff: Build an applet .cof file for debugging/etc. +lss: Build an applet .lss file to show annotated assembler. + + + Targets for burning a bootloader (requires a programming device!): + +bootloader: Program the fuses and burn a bootloader. The + filenames and settings are obtained from the + file ARDUINO_DIR/harware/boards.txt according + to the board type (ARDUINO_BOARD). + + The bootloader can only be burned with an external + programmer. If the settings in boards.txt are not + applicable to your programmer device (as is + probably the case), you can specify the external + programmer at the end of the command line. + + For example, to burn the ADABoot bootloader for + ATMega168 using an AVRISP device, you would set + ARDUINO_BOARD="ADABoot168" and then run: + $basename bootloader isp + + You can also follow the bootloader target with + a .bin or .hex filename to burn a custom + bootloader without entering it into boards.txt, e.g.: + $basename bootloader boot.hex programmer parallel + +fuses: Just program the fuses and set the lock bits + to unlock. For example: + $basename fuses isp + +EOF + exit 0 +fi + +# Display list of available board types if requested: + +if [ "$1" = "boards" -o "$1" = "programmers" ]; then + if [ "$1" = "boards" ]; then + file="$BOARDFILE" + else + file="$PROGRAMMERFILE" + fi + echo "Available $1 in $file:" + awk -v FS== '$1 ~ /\.name/ { + sub(/\.name$/, "", $1) + printf("\t%-15s\t\"%s\"\n", $1, $2); + }' "$file" + if [ "$1" = "boards" ]; then + cat < +or /dev/ttyUSB0 if that is not available). +EOF + fi + exit 0 +fi + +# Die if no board type is set: + +if [ -z "$ARDUINO_BOARD" ]; then + cat <&2 +ERROR: The variable ARDUINO_BOARD must be set to the type of Arduino +board you are using. Accepted values are those appearing in Arduino's +hardware/boards.txt, e.g. "diecimila", "mega", "lilypad", etc. +The names are case-sensitive. + +To save a certain board type as your default, put the setting +in ~/.$CONFNAME, e.g.: + echo ARDUINO_BOARD=diecimila >>~/.$CONFNAME + +To configure a project-specific board type, put the setting +in the file $CONFNAME in the sketch directory, e.g.: + cd ~/sketchbook/MyProg + echo ARDUINO_BOARD=mega >>$CONFNAME + +Run "$basename help" for instructions. +EOF + exit 1 +fi + +# Try to read the hardware configuration for this board: + +eval $(awk -v FS== -v board="$ARDUINO_BOARD" '$1 ~ /\.name$/ { + if (boardname) { exit 0 } + sub(/\.name$/, "", $1) + if (board == $1 || board == $2) { + boardname = $2 + speed=0; core=""; mcu=""; protocol=""; + f_cpu=0; lfuse=""; hfuse=""; efuse=""; + unlock_bits=""; lock_bits=""; + bootloader_dir=""; bootlader_file=""; + } + next + } + !boardname { next } + $1 ~ /\.upload\.protocol$/ { protocol = $2; next } + $1 ~ /\.upload\.speed$/ { speed = $2; next } + $1 ~ /\.upload\.maximum_size$/ { + max_size = $2; next + } + $1 ~ /\.build\.core$/ { core = $2; next } + $1 ~ /\.build\.f_cpu$/ { f_cpu = $2; next } + $1 ~ /\.build\.mcu$/ { mcu = $2; next } + $1 ~ /\.bootloader\.low_fuses$/ { + lfuse = $2; next + } + $1 ~ /\.bootloader\.high_fuses$/ { + hfuse = $2; next + } + $1 ~ /\.bootloader\.extended_fuses$/ { + efuse = $2; next + } + $1 ~ /\.bootloader\.unlock_bits$/ { + unlock_bits = $2; next + } + $1 ~ /\.bootloader\.lock_bits$/ { + lock_bits = $2; next + } + $1 ~ /\.bootloader\.path$/ { + bootloader_dir = $2; next + } + $1 ~ /\.bootloader\.file$/ { + bootloader_file = $2; next + } + END { + if (boardname) { + print "BOARDNAME=\"" boardname "\"" + if (speed) { + gsub(/[^0-9]/, "", speed) + print "UPLOAD_RATE=\"" speed "\"" + } + if (f_cpu) { + gsub(/[^0-9]/, "", f_cpu) + print "F_CPU=\"" f_cpu "\"" + } + if (core) { + gsub(/[^a-zA-Z0-9_.:-]/, "", core) + print "CORE=\"" core "\"" + } + if (mcu) { + gsub(/[^a-zA-Z0-9_.:-]/, "", mcu) + print "MCU=\"" mcu "\"" + } + if (protocol) { + gsub(/[^a-zA-Z0-9_.:-]/, "", protocol) + print "AVRDUDE_PROGRAMMER=\"" \ + protocol "\"" + } + if (max_size) { + gsub(/[^0-9]/, "", max_size) + print "MAX_SIZE=\"" max_size "\"" + } + if (hfuse != "") { + gsub(/[^0-9xA-Fa-f]/, "", hfuse) + print "BL_HFUSE=\"" hfuse "\"" + } + if (lfuse != "") { + gsub(/[^0-9xA-Fa-f]/, "", lfuse) + print "BL_LFUSE=\"" lfuse "\"" + } + if (efuse != "") { + gsub(/[^0-9xA-Fa-f]/, "", efuse) + print "BL_EFUSE=\"" efuse "\"" + } + if (lock_bits != "") { + gsub(/[^0-9xA-Fa-f]/, "", lock_bits) + print "BL_LOCK=\"" lock_bits "\"" + } + if (unlock_bits != "") { + gsub(/[^0-9xA-Fa-f]/, "", unlock_bits) + print "BL_UNLOCK=\"" unlock_bits "\"" + } + if (bootloader_dir && bootloader_file) { + gsub(/["]/, "\\\"", bootloader_dir) + gsub(/["]/, "\\\"", bootloader_file) + print "BL_PATH=\"" bootloader_dir "/" \ + bootloader_file "\"" + } + } + }' "$BOARDFILE") + +# Die if the board configuration was not found: + +if [ -z "$F_CPU" ]; then + cat <&2 +ERROR: The board "$ARDUINO_BOARD" was not found in the configuration +file "$BOARDFILE". The variable ARDUINO_BOARD +must be set to the (case-sensitive) short name of the board, +e.g. "diecimila" or "atmega328". + +Run "$basename boards" to list known board types, or +"$basename help" for general instructions. +EOF + exit 1 +fi + +# Some defaults for board types, e.g. if the user has placed a custom +# board in boards.txt and didn't define everything: + +[ -z "$CORE" ] && CORE=arduino +[ -z "$MAX_SIZE" ] && MAX_SIZE=14336 +[ -z "$MCU" ] && MCU="$ARDUINO_BOARD" +[ -z "$AVRDUDE_PROGRAMMER" ] && AVRDUDE_PROGRAMMER=stk500v1 +[ -z "$UPLOAD_RATE" ] && UPLOAD_RATE=19200 +UPLOAD_DELAY="" + +# Set some helper variables based on the Arduino location: + +MAKEFILE="$INSTALL_DIR/hardware/cores/$CORE/Makefile" +[ ! -e "$MAKEFILE" ] && MAKEFILE="$INSTALL_DIR/hardware/cores/arduino/Makefile" +ARDUINO="$INSTALL_DIR/hardware/cores/$CORE" +LIBRARY_DIR="$INSTALL_DIR/hardware/libraries" + +# Check for the wiring_serial.c bug in some versions of Arduino: + +if grep -q -s -F 'wiring_serial.c' "$MAKEFILE"; then + if [ ! -e "$ARDUINO/wiring_serial.c" ]; then + echo '/* Empty file created due to bug in Arduino Makefile */' \ + >"$ARDUINO/wiring_serial.c" + if [ ! -e "$ARDUINO/wiring_serial.c" ]; then + cat <&2 + +WARNING: The file "$ARDUINO/wiring_serial.c" is referred to in +the Makefile, but it does not exist. This is a bug in some Arduino +versions, and will probably lead to failed builds. To remedy, please +create the file (it can be empty) or remove the reference from the +Makefile ("$MAKEFILE"). + +EOF + fi + fi +fi + +# Correct the programmer "stk500" specified for pretty much every +# Arduino board to "stk500v1" (which is the correct, more specific +# option for avrdude): +[ "$AVRDUDE_PROGRAMMER" = "stk500" ] && AVRDUDE_PROGRAMMER='stk500v1' + +# Configure the programmer port location: + +if [ -n "$ARDUINO_PORT" ]; then + PORT="$ARDUINO_PORT" +else + PORT="/dev/$CORE" + if [ ! -e "$PORT" ]; then + PORT="/dev/$ARDUINO_BOARD" + if [ ! -e "$PORT" ]; then + PORT='/dev/avr' + [ ! -e "$PORT" ] && PORT='/dev/ttyUSB0' + fi + fi +fi + +# Serial monitor: + +if [ "$1" = "serial" ]; then + shift + if [ -c "$1" ]; then + PORT="$1" + shift + fi + if [ ! -e "$PORT" ]; then + cat >&2 < 0) { baud = $0; exit } + } + END { print baud }' "$TARGET") + else + SPEED="${ARDUINO_BAUD:-9600}" + fi + if tty >/dev/null 2>&1; then + cat >&2 <"$PORT" + exit $? + else + echo "Error: Serial device \"$PORT\" does not exist!" >&2 + exit 1 + fi +fi + +# Display verification that the correct board was selected: + +cat <&2 <&2 + exit 1 + fi + cat </dev/null 2>&1 +fi + +# Change the target "dragon" to "upload", but perform the upload using +# the AVRDragon in ISP mode instead of the instead of the typical Arduino +# programming method (e.g. for DIY projects using the same microprocessor +# as an Arduino but not having the programming capability themselves). +# +# Similarly change the target "isp" to "upload", but perform the upload +# using an AVRISP (or clone thereof). + +if [ -n "$1" ]; then + if [ "$1" = "dragon" ]; then + # Uploading with the AVR Dragon: + + AVRDUDE_PROGRAMMER='dragon_isp' + PORT='usb' + UPLOAD_RATE='' + target='upload' + if [ "$2" = "download" ]; then target="$2"; shift; fi + elif [ "$1" = "isp" ]; then + # Uploading via AVRISP with the stk500v2 protocol: + if [ -n "$AVRISP_PORT" ]; then + PORT="$AVRISP_PORT" + elif [ -e '/dev/avrisp' ]; then + PORT='/dev/avrisp' + else + PORT='/dev/ttyUSB0' + fi + AVRDUDE_PROGRAMMER='stk500v2' + UPLOAD_RATE="$AVRISP_BAUD" + target='upload' + if [ "$2" = "download" ]; then target="$2"; shift; fi + elif [ "$1" = "programmer" ]; then + shift + AVRDUDE_PROGRAMMER="$1" + + if [ -z "$AVRDUDE_PROGRAMMER" ]; then + echo "ERROR: No programming device specified on the command-line!" >&2 + exit 1 + fi + if [ ! -r "$PROGRAMMERFILE" ]; then + echo "ERROR: Could not read \"$PROGRAMMERFILE\"!" >&2 + exit 1 + fi + + # Read custom configuration for an external programming device: + + eval $(awk -v FS== -v prog="$AVRDUDE_PROGRAMMER" '$1 ~ /\.name$/ { + if (progname) { exit 0 } + sub(/\.name$/, "", $1) + if (prog == $1 || prog == $2) { + progname = $2; communication=""; + protocol=""; delay=""; port=""; + } + next + } + !progname { next } + $1 ~ /\.communication$/ { communication = $2; next } + $1 ~ /\.protocol$/ { protocol = $2; next } + $1 ~ /\.delay$/ { delay = $2; next } + END { + if (progname) { + print "AVRDUDE_PROGRAMMER_NAME=\"" progname "\"" + gsub(/[^a-zA-Z0-9_.:-]/, "", communication) + print "AVR_COMMUNICATION=\"" communication "\"" + gsub(/[^0-9]/, "", delay) + print "UPLOAD_DELAY=\"" delay "\"" + if (protocol) { + gsub(/[^a-zA-Z0-9_.:-]/, "", protocol) + print "AVRDUDE_PROGRAMMER=\"" protocol "\"" + } + } + }' "$PROGRAMMERFILE") + + # Die if the specified programmer was not found in programmers.txt: + if [ -z "$AVRDUDE_PROGRAMMER_NAME" ]; then + cat >&2 <&1 | grep -q -s '^ *arduino *= .*conf'; then + # Use the "arduino" programmer with autoreset built in, + # if it's available in the avrdude version we are using. + AVRDUDE_PROGRAMMER='arduino' + target="$1" + else + target="$1_autoreset" + fi + else + target="$1" + fi + shift +else + target='compile' +fi +AVRDUDE_FLAGS="$AVRDUDE_FLAGS${PORT:+ -P $PORT} -c $AVRDUDE_PROGRAMMER${UPLOAD_RATE:+ -b $UPLOAD_RATE}${UPLOAD_DELAY:+ -i $UPLOAD_DELAY}" + +# Show the configuration: + +cat </dev/null + fi + exec "$AVRDUDE_PATH/avrdude" ${AVRDUDE_CONFIG:+-C "$AVRDUDE_CONFIG"} \ + $AVRDUDE_FLAGS -U "flash:w:$1:a" +fi + +# Download flash to file (.hex or .bin, Intel Hex or raw binary format): + +if [ '(' "$target" = "download" -o "$target" = "download_autoreset" ')' \ + -a -n "$1" ] && \ + echo "$1" | grep -E -q -s '\.(hex|bin)$' ; then + echo "Downloading flash memory to file '$1'..." + if [ "$target" = "download_autoreset" ]; then + ( eval "$RESET_COMMAND" ) <"$PORT" 2>/dev/null + fi + exec "$AVRDUDE_PATH/avrdude" ${AVRDUDE_CONFIG:+-C "$AVRDUDE_CONFIG"} \ + $AVRDUDE_FLAGS \ + -U "flash:r:$1:$(echo "$1" | sed 's/^.*hex$/i/; s/^.*bin$/r/')" +fi + +# Escape AVRDUDE_CONFIG path for the Makefile: + +[ -n "$AVRDUDE_CONFIG" ] && AVRDUDE_FLAGS="-C \"$AVRDUDE_CONFIG\" $AVRDUDE_FLAGS" + +# Try to discover the program name: + +TARGET=$(basename "$(pwd)") +for f in *.$EXT; do + TARGET=$(echo "$f" | sed "s/\.$EXT$//") + break +done +if [ ! -e "./$TARGET.$EXT" ]; then + cat >&2 <"]' '/^[ ]*#include [<"]/ { sub(/\.h[p]*$/, "", $2); + gsub(/[^a-zA-Z0-9_.:/-]/, "", $2); + print $2; next }' "$1" 2>/dev/null) + do + local found='' + local libpath='' + local libname="$lib" + local header="$ARDUINO/$libname.h" + local base='' + + for libpath in $ARDUINO_LIBRARY_PATH "$LIBRARY_DIR"; do + local libdir="$libpath/$libname" + + if [ -e "$libdir" ]; then + if check_for_libraries "$libdir/$libname.h" "$libname"; then + if [ "$libpath" = "$LIBRARY_DIR" ]; then + echo "Including Arduino library: $libname" + CINCS="$CINCS -I\$(LIBRARIES_DIR)/$libname" + [ -e "$libdir/utility" ] && \ + CINCS="$CINCS -I\$(LIBRARIES_DIR)/$libname/utility" + else + echo "Including local library: $libname" + CINCS="$CINCS -I$libdir" + [ -e "$libdir/utility" ] && \ + CINCS="$CINCS -I$libdir/utility" + fi + fi + check_header "$libname" "$libdir" "$libname" + found=1 + break + fi + done + + if [ -z "$found" ]; then + for base in "$ARDUINO" "$basedir" "$basedir/utility"; do + check_header "$libname" "$base" "$inlib" && break + done + fi + done + return 0 +} + +check_for_libraries "$TARGET.$EXT" + +# Ensure the applet directory exists: + + [ ! -d applet ] && mkdir applet + +if [ -e 'applet/board' -a ! "$BOARDFILE" -nt "applet/board" ]; then + configured_board="$(head -n 1 'applet/board')" +else + configured_board='' +fi +[ ! "$configured_board" = "$ARDUINO_BOARD" ] && echo "$ARDUINO_BOARD" >'applet/board' + +# Display library settings to the user: + +old_CINCS="$CINCS" +CINCS="-I. -I./utility -I\$(ARDUINO)$CINCS" +if [ -n "$old_CINCS" ]; then + echo + echo "Includes = $CINCS" + #[ -n "$LIBSRC" ] && echo "LIBSRC =$LIBSRC" + #[ -n "$LIBASRC" ] && echo "LIBASRC =$LIBASRC" + #[ -n "$LIBCXXSRC" ] && echo "LIBCXXSRC =$LIBCXXSRC" + echo +fi +unset old_CINCS + +# Set the compiler options to better match the IDE: + +CTUNING='-ffunction-sections -fdata-sections -fshort-enums' +CFLAGS='$(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CTUNING) $(CEXTRA) $(CDEBUG)' +CXXFLAGS='$(CDEFS) $(CINCS) -O$(OPT) -fno-exceptions $(CTUNING)' + +# Create the Makefile: + +if [ ! -e 'applet/Makefile' -o 'applet/board' -nt 'applet/Makefile' \ + -o "$0" -nt 'applet/Makefile' ]; then + # Change the Make default target to our own: + echo 'compile: do_compile' >applet/Makefile + + # Take the original Makefile, but remove the built-in dependency + # includes (so we can override them) and the original .elf target + # which we are replacing below: + sed '/^include $[(][^)]*\.d[)]/ d; + /^applet\/$[(]TARGET[)]\.elf: / d; + /^[ \t]*#/ d; + s/\.pde/\.$(EXT)/g' "$MAKEFILE" >>applet/Makefile + + # Now the dirty parts, featuring some rather explicit Make: + echo -e 'do_compile: do_build show_size +do_build: applet/$(TARGET).hex +applet/$(TARGET).hex: applet/$(TARGET).elf + +ARDMAKE_BOARD=applet/board + +applet/$(TARGET).elf: applet/$(TARGET).cpp applet/core.a +\t$(CXX) $(ALL_CXXFLAGS) -Wl,--gc-sections $(LDFLAGS) -L. -Lapplet/ -o $@ $< applet/core.a +\t@chmod a-x $@ >/dev/null 2>&1 || true + +applet/$(TARGET).cpp: $(TARGET).$(EXT) $(ARDUINO)/main.cxx $(ARDUINO)/WProgram.h $(ARDMAKE_BOARD) +\techo '\''#include "WProgram.h"'\'' >$@ +\t@echo '\''#line 1 "$<"'\'' >>$@ +\tcat $(TARGET).$(EXT) >>$@ +\t@echo '\''#line 1 "$(ARDUINO)/main.cxx"'\'' >>$@ +\tcat $(ARDUINO)/main.cxx >>$@ + +show_size: +\t@echo +\t@echo Program size: +\t@$(HEXSIZE) | awk -v m="$(MAX_SIZE)" '\''{print;if(NR^1){s=$$4}} \\ + END {printf("\\n%d/%d bytes (%.1f%% of capacity, %d bytes left)\\n\\n",\\ + s,m,s*100.0/m,m-s);}'\'' + +upload_autoreset: do_autoreset upload unreset + +do_autoreset: +\t@echo Sending reset to prepare for upload... +\t( '"$RESET_COMMAND"' ) <$(PORT) 2>/dev/null +\t@echo + +unreset: +\t@stty -hupcl <$(PORT) 2>/dev/null || true + +$(OBJ): $(ARDMAKE_BOARD) +$(DEPS): $(ARDMAKE_BOARD) + +$(APPC): applet/%.o: %.c +\t$(CC) -c $(ALL_CFLAGS) -o $@ $< + +$(APPCXX): applet/%.o: %.cpp +\t$(CXX) -c $(ALL_CXXFLAGS) -o $@ $< + +$(APPA): applet/%.o: %.S +\t$(CC) -c $(ALL_ASFLAGS) -o $@ $< + +$(APPC:.o=.d): applet/%.d: %.c +\t$(CC) -M $(ALL_CFLAGS) $< | sed '\''s;^[^:]*:;applet/$*.o applet/$*.d:;'\'' >$@ + +$(APPCXX:.o=.d): applet/%.d: %.cpp +\t$(CXX) -M $(ALL_CXXFLAGS) $< | sed '\''s;^[^:]*:;applet/$*.o applet/$*.d:;'\'' >$@ + +$(APPA:.o=.d): applet/%.d: %.S +\t$(CC) -M $(ALL_ASFLAGS) $< | sed '\''s;^[^:]*:;applet/$*.o applet/$*.d:;'\'' >$@ + +applet/$(TARGET).d: applet/$(TARGET).cpp + +vpath %.c applet/ $(sort $(dir $(OBJC))) +vpath %.cpp applet/ $(sort $(dir $(OBJCXX))) +vpath %.S applet/ $(sort $(dir $(OBJA))) + +include $(DEPS)' >>applet/Makefile + + # Ensure applet/core.a gets re-built every time, because otherwise + # we won't get the correct dependencies: + if [ -z "$target" -o "$target" = "compile" -o "$target" = "all" ]; then + if [ -w "applet/core.a" ]; then + echo "rm -f applet/core.a" + rm -f "applet/core.a" + fi + fi +fi + +# Don't do autoreset if we don't have a serial port: + +[ "$target" = "upload_autoreset" -a ! -c "$PORT" ] && target=upload + +# Substitute the Makefile "clean" target: + +if [ "$target" = "clean" ]; then + echo "Cleaning up..." + for ext in d o cpp h elf hex a s S lss cof; do + rm -f applet/*.$ext 2>/dev/null + done + rm -f applet/Makefile applet/board 2>/dev/null + # If we are building locally, do not try to clean inside Arduino dir: + [ -n "$BUILD_LOCALLY" ] && exit 0 +fi + +# Finally, execute Make: + +exec make -f applet/Makefile \ + MAKEFILE='applet/Makefile' LIBRARIES_DIR="$LIBRARIES_DIR" \ + AVRDUDE_FLAGS="$AVRDUDE_FLAGS" AVRDUDE_PROGRAMMER="$AVRDUDE_PROGRAMMER" \ + TARGET="$TARGET" PORT="$PORT" MCU="$MCU" F_CPU="$F_CPU" MAX_SIZE="$MAX_SIZE" \ + AVR_TOOLS_PATH="$AVR_TOOLS_PATH" INSTALL_DIR="$INSTALL_DIR" EXT="$EXT" \ + AVRDUDE_PATH="$AVRDUDE_PATH" UPLOAD_RATE="$UPLOAD_RATE" ARDUINO="$ARDUINO" \ + LIBSRC="$LIBSRC" LIBASRC="$LIBASRC" LIBCXXSRC="$LIBCXXSRC" \ + CINCS="$CINCS" CXXINCS="$CXXINCS" AVRDUDE='$(AVRDUDE_PATH)/avrdude' \ + CTUNING="$CTUNING" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \ + OBJC='$(sort $(SRC:.c=.o) $(abspath $(LIBSRC:.c=.o)))' \ + OBJCXX='$(sort $(CXXSRC:.cpp=.o) $(abspath $(LIBCXXSRC:.cpp=.o)))' \ + OBJA='$(sort $(ASRC:.S=.o) $(abspath $(LIBASRC:.S=.o)))' \ + OBJARDUINODIR='$(OBJC) $(OBJCXX) $(OBJA)' \ + APPC='$(addprefix applet/,$(notdir $(OBJC)))' \ + APPCXX='$(addprefix applet/,$(notdir $(OBJCXX)))' \ + APPA='$(addprefix applet/,$(notdir $(OBJA)))' \ + OBJAPPDIR='$(APPC) $(APPCXX) $(APPA)' \ + OBJ='$(if $(BUILD_LOCALLY),$(OBJAPPDIR),$(OBJARDUINODIR))' \ + DEPS='$(OBJ:.o=.d) applet/$(TARGET).d' LST='$(OBJ:.o=.lst)' \ + $target ${BUILD_LOCALLY:+BUILD_LOCALLY=1} "$@" diff --git a/test/arduinocube/arduinocube.pde b/test/arduinocube/arduinocube.pde new file mode 100644 index 0000000..40e926f --- /dev/null +++ b/test/arduinocube/arduinocube.pde @@ -0,0 +1,812 @@ +#include +#include +#define AXIS_X 1 +#define AXIS_Y 2 +#define AXIS_Z 3 + +#define delay_ms(x) delayMicroseconds((x)/1000) + +volatile unsigned char cube[8][8]; +volatile int current_layer = 0; + +void setup() +{ + int i; + + for(i=0; i<14; i++) + pinMode(i, OUTPUT); + + // Reset any PWM configuration that the arduino may have set up automagically! + TCCR2A = 0x00; + TCCR2B = 0x00; + + TCCR2A |= (0x01 << WGM21); // CTC mode. clear counter on TCNT2 == OCR2A + OCR2A = 10; // Interrupt every 25600th cpu cycle (256*100) + TCNT2 = 0x00; // start counting at 0 + TCCR2B |= (0x01 << CS22) | (0x01 << CS21); // Start the clock with a 256 prescaler + + TIMSK2 |= (0x01 << OCIE2A); + + + digitalWrite(13, HIGH); +} + +ISR (TIMER2_COMPA_vect) +{ + char i; + + // all layer selects off + //PORTC = 0x00; + //PORTB &= 0x0f; + + //PORTB |= 0x08; // output enable off. + + //digitalWrite(13, LOW); + digitalWrite(8, LOW); + + for (i=0; i<8; i++) + { + char line = cube[current_layer][i]; + //PORTD = cube[current_layer][i]; + //PORTB = (PORTB & 0xF8) | (0x07 & (i+1)); + for (char j = 0; j < 8; ++j, line >>= 1) { + digitalWrite(9, LOW); + digitalWrite(7, line & 1); + //digitalWrite(7, HIGH); + digitalWrite(9, HIGH); + } + } + + //PORTB &= 0b00110111; // Output enable on. + digitalWrite(8, HIGH); + //digitalWrite(13, HIGH); + + /* + if (current_layer < 6) + { + PORTC = (0x01 << current_layer); + } else if (current_layer == 6) + { + digitalWrite(12, HIGH); + } else + { + digitalWrite(13, HIGH); + } + */ + digitalWrite(12, current_layer & 0x1 ? HIGH : LOW); + digitalWrite(11, current_layer & 0x2 ? HIGH : LOW); + digitalWrite(10, current_layer & 0x4 ? HIGH : LOW); + + + current_layer++; + + if (current_layer == 8) + current_layer = 0; +} + +void loop() +{ + int i,x,y,z; + + while (true) + { + + effect_planboing(AXIS_Z, 400); + effect_planboing(AXIS_Y, 400); + effect_planboing(AXIS_X, 400); + + effect_blinky2(); + + effect_random_filler(75,1); + effect_random_filler(75,0); + + effect_rain(100); + + effect_boxside_randsend_parallel (AXIS_X, 0, 150, 1); + effect_boxside_randsend_parallel (AXIS_X, 1, 150, 1); + effect_boxside_randsend_parallel (AXIS_Y, 0, 150, 1); + effect_boxside_randsend_parallel (AXIS_Y, 1, 150, 1); + effect_boxside_randsend_parallel (AXIS_Z, 0, 150, 1); + effect_boxside_randsend_parallel (AXIS_Z, 1, 150, 1); + + } +} + + +// ========================================================================================== +// Effect functions +// ========================================================================================== + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + + } + +} + + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;ii0) + { + fill(0x00); + delay_ms(i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + + delay_ms(1000); + + i = 750; + while (i>0) + { + fill(0x00); + delay_ms(751-i); + + fill(0xff); + delay_ms(100); + + i = i - (15+(1000/(i/10))); + } + } + +} + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +// ========================================================================================== +// Draw functions +// ========================================================================================== + + +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] |= (1 << x); +} + + +// Set a single voxel to ON +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[z][y] &= ~(1 << x); +} + + + +// This function validates that we are drawing inside the cube. +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < 8 && y >= 0 && y < 8 && z >= 0 && z < 8) + { + return 0x01; + } else + { + // One of the coordinates was outside the cube. + return 0x00; + } +} + +// Get the current status of a voxel +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[z][y] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Flip the state of a voxel. +// If the voxel is 1, its turned into a 0, and vice versa. +void flpvoxel(int x, int y, int z) +{ + if (inrange(x, y, z)) + cube[z][y] ^= (1 << x); +} + +// Makes sure x1 is alwas smaller than x2 +// This is usefull for functions that uses for loops, +// to avoid infinite loops +void argorder(int ix1, int ix2, int *ox1, int *ox2) +{ + if (ix1>ix2) + { + int tmp; + tmp = ix1; + ix1= ix2; + ix2 = tmp; + } + *ox1 = ix1; + *ox2 = ix2; +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0xff; + } +} + +// Clears voxels in the same manner as above +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0x00; + } +} + +void setplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + setplane_x(i); + break; + + case AXIS_Y: + setplane_y(i); + break; + + case AXIS_Z: + setplane_z(i); + break; + } +} + +void clrplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + clrplane_x(i); + break; + + case AXIS_Y: + clrplane_y(i); + break; + + case AXIS_Z: + clrplane_z(i); + break; + } +} + +// Fill a value into all 64 byts of the cube buffer +// Mostly used for clearing. fill(0x00) +// or setting all on. fill(0xff) +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] = pattern; + } + } +} + + + +// Draw a box with all walls drawn and all voxels inside set +void box_filled(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + cube[iz][iy] |= byteline(x1,x2); + } + } + +} + +// Darw a hollow box with side walls. +void box_walls(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + for (iz=z1;iz<=z2;iz++) + { + for (iy=y1;iy<=y2;iy++) + { + if (iy == y1 || iy == y2 || iz == z1 || iz == z2) + { + cube[iz][iy] = byteline(x1,x2); + } else + { + cube[iz][iy] |= ((0x01 << x1) | (0x01 << x2)); + } + } + } + +} + +// Draw a wireframe box. This only draws the corners and edges, +// no walls. +void box_wireframe(int x1, int y1, int z1, int x2, int y2, int z2) +{ + int iy; + int iz; + + argorder(x1, x2, &x1, &x2); + argorder(y1, y2, &y1, &y2); + argorder(z1, z2, &z1, &z2); + + // Lines along X axis + cube[z1][y1] = byteline(x1,x2); + cube[z1][y2] = byteline(x1,x2); + cube[z2][y1] = byteline(x1,x2); + cube[z2][y2] = byteline(x1,x2); + + // Lines along Y axis + for (iy=y1;iy<=y2;iy++) + { + setvoxel(x1,iy,z1); + setvoxel(x1,iy,z2); + setvoxel(x2,iy,z1); + setvoxel(x2,iy,z2); + } + + // Lines along Z axis + for (iz=z1;iz<=z2;iz++) + { + setvoxel(x1,y1,iz); + setvoxel(x1,y2,iz); + setvoxel(x2,y1,iz); + setvoxel(x2,y2,iz); + } + +} + +// Returns a byte with a row of 1's drawn in it. +// byteline(2,5) gives 0b00111100 +char byteline (int start, int end) +{ + return ((0xff<> 7)); + flop = (flop & 0b11111101) | (0b00000010 & (byte >> 5)); + flop = (flop & 0b11111011) | (0b00000100 & (byte >> 3)); + flop = (flop & 0b11110111) | (0b00001000 & (byte >> 1)); + flop = (flop & 0b11101111) | (0b00010000 & (byte << 1)); + flop = (flop & 0b11011111) | (0b00100000 & (byte << 3)); + flop = (flop & 0b10111111) | (0b01000000 & (byte << 5)); + flop = (flop & 0b01111111) | (0b10000000 & (byte << 7)); + return flop; +} + +// Draw a line between any coordinates in 3d space. +// Uses integer values for input, so dont expect smooth animations. +void line(int x1, int y1, int z1, int x2, int y2, int z2) +{ + float xy; // how many voxels do we move on the y axis for each step on the x axis + float xz; // how many voxels do we move on the y axis for each step on the x axis + unsigned char x,y,z; + unsigned char lasty,lastz; + + // We always want to draw the line from x=0 to x=7. + // If x1 is bigget than x2, we need to flip all the values. + if (x1>x2) + { + int tmp; + tmp = x2; x2 = x1; x1 = tmp; + tmp = y2; y2 = y1; y1 = tmp; + tmp = z2; z2 = z1; z1 = tmp; + } + + + if (y1>y2) + { + xy = (float)(y1-y2)/(float)(x2-x1); + lasty = y2; + } else + { + xy = (float)(y2-y1)/(float)(x2-x1); + lasty = y1; + } + + if (z1>z2) + { + xz = (float)(z1-z2)/(float)(x2-x1); + lastz = z2; + } else + { + xz = (float)(z2-z1)/(float)(x2-x1); + lastz = z1; + } + + + + // For each step of x, y increments by: + for (x = x1; x<=x2;x++) + { + y = (xy*(x-x1))+y1; + z = (xz*(x-x1))+z1; + setvoxel(x,y,z); + } + +} + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. + +/* +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} +*/ + + + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + diff --git a/test/build b/test/build new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/test/build @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/test/test.pde b/test/test.pde new file mode 100644 index 0000000..231e163 --- /dev/null +++ b/test/test.pde @@ -0,0 +1,812 @@ +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA8 & 168 / ARDUINO +// +// +-\/-+ +// PC6 1| |28 PC5 (AI 5) +// (D 0) PD0 2| |27 PC4 (AI 4) +// (D 1) PD1 3| |26 PC3 (AI 3) +// (D 2) PD2 4| |25 PC2 (AI 2) +// PWM+ (D 3) PD3 5| |24 PC1 (AI 1) +// (D 4) PD4 6| |23 PC0 (AI 0) +// VCC 7| |22 GND +// GND 8| |21 AREF +// PB6 9| |20 AVCC +// PB7 10| |19 PB5 (D 13) +// PWM+ (D 5) PD5 11| |18 PB4 (D 12) +// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM +// (D 7) PD7 13| |16 PB2 (D 10) PWM +// (D 8) PB0 14| |15 PB1 (D 9) PWM +// +----+ +// +// (PWM+ indicates the additional PWM pins on the ATmega168.) + +#define CUBE_SIZE 8 + +#define AXIS_X 1 +#define AXIS_Y 2 +#define AXIS_Z 3 + +void setup() +{ + Serial.begin(9600); + delay(1000); + Serial.println("begin"); + + DDRB = 0xFF; + DDRD = 0xFC; + + PORTB = 0; + PORTD &= 0x03; + + + // Reset any PWM configuration that the arduino may have set up automagically! + TCCR2A = 0x00; + TCCR2B = 0x00; + + TCCR2A |= (0x01 << WGM21); // CTC mode. clear counter on TCNT2 == OCR2A + OCR2A = 50; // Interrupt every 25600th cpu cycle (256*100) + TCNT2 = 0x00; // start counting at 0 + TCCR2B |= (0x01 << CS22) | (0x01 << CS21); // Start the clock with a 256 prescaler + + TIMSK2 |= (0x01 << OCIE2A); + +} + +volatile unsigned char cube[8][8]; +volatile unsigned char current_layer = 0; + +ISR (TIMER2_COMPA_vect) +{ + PORTB &= ~0x21; // layer and latch low + char current_layer_ = current_layer; + + //for (char j = 0; j < 8; ++j) { + for (char j = 0; j < 4; ++j) { + unsigned char val = cube[7-j][current_layer_]; + unsigned char val2 = cube[3-j][current_layer_]; + for (char i = 0; i < 8; ++i/*, val >>= 1*/) { + PORTB &= ~0x02; + PORTD = (PORTD & ~0x80) | ((val2 << (7-i)) & 0x80); + //PORTD |= 0x80; + PORTD = (PORTD & ~0x40) | (((val << (7-i)) & 0x80) >> 1); + PORTB |= 0x02; + } + } + + PORTB = (PORTB & ~0x1C) | (current_layer_ << 2); + ++current_layer_; + current_layer = current_layer_ & 0x07; + + PORTB |= 0x21; // layer and latch high +} + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +bool get_led(unsigned char x, unsigned char y, unsigned char z) +{ + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (inrange(x, y, z)) { + return cube[y][z] & (1 << x); + } + + return false; +} + +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +{ + + if (!inrange(x, y, z)) { + return; + } + + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + cube[y][z] |= ((unsigned char)1) << x; + } + else { + cube[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() +{ + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + cube[y][z] = 0; + } + } +} +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] |= (1 << x); +} + +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[y][z] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + + +// Set a single voxel to ON +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] &= ~(1 << x); +} +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;ii? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] /*EEMEM*/ = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] /*PROGMEM */= {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +/* +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + for (i = 0; i < length; i++) + destination[i] = pgm_read_byte(&paths[i+offset]); +} +*/ +// Fill a value into all 64 byts of the cube buffer +// Mostly used for clearing. fill(0x00) +// or setting all on. fill(0xff) +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] = pattern; + } + } +} + + + +void font_getchar (char chr, unsigned char dst[5]) +{ + //uint8_t i; + unsigned char i; + chr -= 32; // our bitmap font starts at ascii char 32. + + for (i = 0; i < 5; i++) + //dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&font[(chr*5)+i]); + dst[i] = font[(chr*5)+i]; +} +void effect_stringfly2(const char* str) +{ + //int x,y,i; + unsigned char x,y,i; + unsigned char chr[5]; + const int DELAY = 80; + + clear_led(); + + while (*str) + { + font_getchar(*str++, chr); + + // Put a character on the back of the cube + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + //setvoxel(7,x+2,y); + //set_led(7,x+2,y); + set_led(x+2, 0, y, true); + } + } + } + + //led_change = true; + //SDL_Delay(1000); + //clear_led(); + //continue; + + // Shift the entire contents of the cube forward by 6 steps + // before placing the next character + for (i = 0; i<6; i++) + { + //delay_ms(1000); + //SDL_Delay(1000); + delay(DELAY); + shift(AXIS_Y,1); + //shift(1,-1); + //set_plane(1, 7, false); + } + } + + //return; + // Shift the last character out of the cube. + for (i = 0; i<8; i++) + { + delay(DELAY); + //delay_ms(1000); + shift(AXIS_Y,1); + //shift(1,-1); + } +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0xff; + } +} + +// Clears voxels in the same manner as above +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0x00; + } +} + + +void setplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + setplane_x(i); + break; + + case AXIS_Y: + setplane_y(i); + break; + + case AXIS_Z: + setplane_z(i); + break; + } +} + + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay(i/5); + + fill(0xff); + delay(20); + + i = i - (15+(1000/(i/10))); + } + + delay(500); + + i = 750; + while (i>0) + { + fill(0x00); + delay((751-i)/5); + + fill(0xff); + delay(20); + + i = i - (15+(1000/(i/10))); + } + } + +} +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + + } + +} + + + + +/***************************************************************************** + * LOOP TEST + *****************************************************************************/ + +void loop() +{ + //for (char i = 0; i < 8; ++i) { + //PORTB = (PORTB & ~0x1C) | ((i & 0x07) << 2); + //display(i); + //delay(2); + + //Serial.println(layer, DEC); + //delay(1000); + //} + clear_led(); + //delay_ms(1000); + delay(1000); + //return; + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + for (char x = 0; x < 8; ++x) { + set_led(x, y, z, true); + delay(5); + delay(100); + //delay(500); + //delay(1000); + //delay_ms(1000); + } + } + } + delay(1000); + //delay_ms(1000); + clear_led(); + /* effect_stringfly2("test de texte - c'est trop super genial et tout " + "yeahhh!!!!!"); + */ + effect_planboing(AXIS_Z, 700); + effect_planboing(AXIS_Y, 700); + effect_planboing(AXIS_X, 700); + + effect_blinky2(); + + effect_random_filler(75,1); + effect_random_filler(75,0); + + for (char i = 0; i < 10; ++i) { + effect_boxside_randsend_parallel (AXIS_X, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_X, 1, 950, 2); + effect_boxside_randsend_parallel (AXIS_Y, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_Y, 1, 950, 2); + effect_boxside_randsend_parallel (AXIS_Z, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_Z, 1, 950, 2); + } + + + //effect_rain(1000) +} diff --git a/test/test.pde.backup b/test/test.pde.backup new file mode 100644 index 0000000..2ebec6d --- /dev/null +++ b/test/test.pde.backup @@ -0,0 +1,843 @@ +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA8 & 168 / ARDUINO +// +// +-\/-+ +// PC6 1| |28 PC5 (AI 5) +// (D 0) PD0 2| |27 PC4 (AI 4) +// (D 1) PD1 3| |26 PC3 (AI 3) +// (D 2) PD2 4| |25 PC2 (AI 2) +// PWM+ (D 3) PD3 5| |24 PC1 (AI 1) +// (D 4) PD4 6| |23 PC0 (AI 0) +// VCC 7| |22 GND +// GND 8| |21 AREF +// PB6 9| |20 AVCC +// PB7 10| |19 PB5 (D 13) +// PWM+ (D 5) PD5 11| |18 PB4 (D 12) +// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM +// (D 7) PD7 13| |16 PB2 (D 10) PWM +// (D 8) PB0 14| |15 PB1 (D 9) PWM +// +----+ +// +// (PWM+ indicates the additional PWM pins on the ATmega168.) + +#define CUBE_SIZE 8 + +#define AXIS_X 1 +#define AXIS_Y 2 +#define AXIS_Z 3 + +void setup() +{ + Serial.begin(9600); + delay(1000); + Serial.println("begin"); + + pinMode(13, OUTPUT); + pinMode(12, OUTPUT); + pinMode(11, OUTPUT); + pinMode(10, OUTPUT); + pinMode(9, OUTPUT); + pinMode(8, OUTPUT); + pinMode(7, OUTPUT); + + digitalWrite(10, LOW); + digitalWrite(11, LOW); + digitalWrite(12, LOW); + + digitalWrite(13, HIGH); + + + + // Reset any PWM configuration that the arduino may have set up automagically! + TCCR2A = 0x00; + TCCR2B = 0x00; + + TCCR2A |= (0x01 << WGM21); // CTC mode. clear counter on TCNT2 == OCR2A + OCR2A = 50; // Interrupt every 25600th cpu cycle (256*100) + TCNT2 = 0x00; // start counting at 0 + TCCR2B |= (0x01 << CS22) | (0x01 << CS21); // Start the clock with a 256 prescaler + + TIMSK2 |= (0x01 << OCIE2A); + +} + +volatile unsigned char cube[8][8]; +volatile unsigned char current_layer = 0; + +void display(char current_layer) +{ + //digitalWrite(8, LOW); + PORTB &= ~0x21; + for (char j = 0; j < 8; ++j) { + unsigned char val = cube[j][current_layer]; + for (char i = 0; i < 8; ++i, val >>= 1) { + //digitalWrite(9, LOW); + PORTB &= ~0x02; + //digitalWrite(7, ! (i & 1) ? HIGH : LOW); + //digitalWrite(7, HIGH); + //PORTD |= 0x80; + PORTD = (PORTD & ~0x80) | ((val & 1) << 7); + //digitalWrite(9, HIGH); + PORTB |= 0x02; + //delay(500); + } + } + PORTB |= 0x21; + //digitalWrite(8, HIGH); +} + +ISR (TIMER2_COMPA_vect) +{ + PORTB &= ~0x21; // layer and latch low + char current_layer_ = current_layer; + + //for (char j = 0; j < 8; ++j) { + for (char j = 0; j < 4; ++j) { + unsigned char val = cube[7-j][current_layer_]; + unsigned char val2 = cube[3-j][current_layer_]; + for (char i = 0; i < 8; ++i/*, val >>= 1*/) { + PORTB &= ~0x02; + PORTD = (PORTD & ~0x80) | ((val << (7-i)) & 0x80); + //PORTD |= 0x80; + PORTD = (PORTD & ~0x40) | (((val << (7-i)) & 0x80) >> 1); + PORTB |= 0x02; + } + } + + PORTB = (PORTB & ~0x1C) | (current_layer_ << 2); + ++current_layer_; + current_layer = current_layer_ & 0x07; + + PORTB |= 0x21; // layer and latch high +} + +/***************************************************************************** + * ACCESSORS + *****************************************************************************/ + +unsigned char inrange(int x, int y, int z) +{ + if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) + { + return 1; + } else + { + // One of the coordinates was outside the cube. + return 0; + } +} + +bool get_led(unsigned char x, unsigned char y, unsigned char z) +{ + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (inrange(x, y, z)) { + return cube[y][z] & (1 << x); + } + + return false; +} + +void set_led(unsigned char x, unsigned char y, unsigned char z, bool on) +{ + + if (!inrange(x, y, z)) { + return; + } + + /* + assert(x >= 0 && x <= 7); + assert(y >= 0 && y <= 7); + assert(z >= 0 && z <= 7); + */ + + if (on) { + cube[y][z] |= ((unsigned char)1) << x; + } + else { + cube[y][z] &= ~(((unsigned char)1) << x); + } +} + +void clear_led() +{ + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + cube[y][z] = 0; + } + } +} +// Set a single voxel to ON +void setvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] |= (1 << x); +} + +unsigned char getvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + { + if (cube[y][z] & (1 << x)) + { + return 0x01; + } else + { + return 0x00; + } + } else + { + return 0x00; + } +} + + +// Set a single voxel to ON +void clrvoxel(int x, int y, int z) +{ + if (inrange(x,y,z)) + cube[y][z] &= ~(1 << x); +} +// In some effect we want to just take bool and write it to a voxel +// this function calls the apropriate voxel manipulation function. +void altervoxel(int x, int y, int z, int state) +{ + if (state == 1) + { + setvoxel(x,y,z); + } else + { + clrvoxel(x,y,z); + } +} + +// Shift the entire contents of the cube along an axis +// This is great for effects where you want to draw something +// on one side of the cube and have it flow towards the other +// side. Like rain flowing down the Z axiz. +void shift (char axis, int direction) +{ + int i, x ,y; + int ii, iii; + int state; + + for (i = 0; i < 8; i++) + { + if (direction == -1) + { + ii = i; + } else + { + ii = (7-i); + } + + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (direction == -1) + { + iii = ii+1; + } else + { + iii = ii-1; + } + + if (axis == AXIS_Z) + { + state = getvoxel(x,y,iii); + altervoxel(x,y,ii,state); + } + + if (axis == AXIS_Y) + { + state = getvoxel(x,iii,y); + altervoxel(x,ii,y,state); + } + + if (axis == AXIS_X) + { + state = getvoxel(iii,y,x); + altervoxel(ii,y,x,state); + } + } + } + } + + if (direction == -1) + { + i = 7; + } else + { + i = 0; + } + + for (x = 0; x < 8; x++) + { + for (y = 0; y < 8; y++) + { + if (axis == AXIS_Z) + clrvoxel(x,y,i); + + if (axis == AXIS_Y) + clrvoxel(x,i,y); + + if (axis == AXIS_X) + clrvoxel(i,y,x); + } + } +} + + +// Delay loop. +// This is not calibrated to milliseconds, +// but we had allready made to many effects using this +// calibration when we figured it might be a good idea +// to calibrate it. +void delay_ms(uint16_t x) +{ + uint8_t y, z; + for ( ; x > 0 ; x--){ + for ( y = 0 ; y < 90 ; y++){ + for ( z = 0 ; z < 6 ; z++){ + asm volatile ("nop"); + } + } + } +} + +void effect_rain (int iterations) +{ + int i, ii; + int rnd_x; + int rnd_y; + int rnd_num; + + for (ii=0;ii? + 0x32,0x49,0x79,0x41,0x3e,0x7e,0x11,0x11,0x11,0x7e, // @A + 0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22, // BC + 0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41, // DE + 0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a, // FG + 0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00, // HI + 0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41, // JK + 0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f, // LM + 0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, // NO + 0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e, // PQ + 0x7f,0x09,0x19,0x29,0x46,0x46,0x49,0x49,0x49,0x31, // RS + 0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f, // TU + 0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x38,0x40,0x3f, // VW + 0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07, // XY + 0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00, // Z[ + 0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00, // \] + 0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, // ^_ + 0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78, // `a + 0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20, // bc + 0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18, // de + 0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e, // fg + 0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00, // hi + 0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00, // jk + 0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78, // lm + 0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, // no + 0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c, // pq + 0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20, // rs + 0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c, // tu + 0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x30,0x40,0x3c, // vw + 0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c, // xy + 0x44,0x64,0x54,0x4c,0x44 // z +}; + + +volatile const unsigned char bitmaps[6][8] /*EEMEM*/ = { + {0xc3,0xc3,0x00,0x18,0x18,0x81,0xff,0x7e}, // smiley 3 small + {0x3c,0x42,0x81,0x81,0xc3,0x24,0xa5,0xe7}, // Omega + {0x00,0x04,0x06,0xff,0xff,0x06,0x04,0x00}, // Arrow + {0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81}, // X + {0xBD,0xA1,0xA1,0xB9,0xA1,0xA1,0xA1,0x00}, // ifi + {0xEF,0x48,0x4B,0x49,0x4F,0x00,0x00,0x00} // TG +}; + +const unsigned char paths[44] /*PROGMEM */= {0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x67,0x57,0x47,0x37,0x27,0x17, +0x04,0x03,0x12,0x21,0x30,0x40,0x51,0x62,0x73,0x74,0x65,0x56,0x47,0x37,0x26,0x15}; // circle, len 16, offset 28 + +/* +void font_getpath (unsigned char path, unsigned char *destination, int length) +{ + int i; + int offset = 0; + + if (path == 1) + offset=28; + + for (i = 0; i < length; i++) + destination[i] = pgm_read_byte(&paths[i+offset]); +} +*/ +// Fill a value into all 64 byts of the cube buffer +// Mostly used for clearing. fill(0x00) +// or setting all on. fill(0xff) +void fill (unsigned char pattern) +{ + int z; + int y; + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] = pattern; + } + } +} + + + +void font_getchar (char chr, unsigned char dst[5]) +{ + //uint8_t i; + unsigned char i; + chr -= 32; // our bitmap font starts at ascii char 32. + + for (i = 0; i < 5; i++) + //dst[i] = (unsigned char)eeprom_read_byte((uint8_t*)&font[(chr*5)+i]); + dst[i] = font[(chr*5)+i]; +} +void effect_stringfly2(const char* str) +{ + //int x,y,i; + unsigned char x,y,i; + unsigned char chr[5]; + const int DELAY = 80; + + clear_led(); + + while (*str) + { + font_getchar(*str++, chr); + + // Put a character on the back of the cube + for (x = 0; x < 5; x++) + { + for (y = 0; y < 8; y++) + { + if ((chr[x] & (0x80>>y))) + { + //setvoxel(7,x+2,y); + //set_led(7,x+2,y); + set_led(x+2, 0, y, true); + } + } + } + + //led_change = true; + //SDL_Delay(1000); + //clear_led(); + //continue; + + // Shift the entire contents of the cube forward by 6 steps + // before placing the next character + for (i = 0; i<6; i++) + { + //delay_ms(1000); + //SDL_Delay(1000); + delay(DELAY); + shift(AXIS_Y,1); + //shift(1,-1); + //set_plane(1, 7, false); + } + } + + //return; + // Shift the last character out of the cube. + for (i = 0; i<8; i++) + { + delay(DELAY); + //delay_ms(1000); + shift(AXIS_Y,1); + //shift(1,-1); + } +} + +// Sets all voxels along a X/Y plane at a given point +// on axis Z +void setplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0xff; + } +} + +// Clears voxels in the same manner as above +void clrplane_z (int z) +{ + int i; + if (z>=0 && z<8) + { + for (i=0;i<8;i++) + cube[z][i] = 0x00; + } +} + +void setplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] |= (1 << x); + } + } + } +} + +void clrplane_x (int x) +{ + int z; + int y; + if (x>=0 && x<8) + { + for (z=0;z<8;z++) + { + for (y=0;y<8;y++) + { + cube[z][y] &= ~(1 << x); + } + } + } +} + +void setplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0xff; + } +} + +void clrplane_y (int y) +{ + int z; + if (y>=0 && y<8) + { + for (z=0;z<8;z++) + cube[z][y] = 0x00; + } +} + + +void setplane (char axis, unsigned char i) +{ + switch (axis) + { + case AXIS_X: + setplane_x(i); + break; + + case AXIS_Y: + setplane_y(i); + break; + + case AXIS_Z: + setplane_z(i); + break; + } +} + + +// Draw a plane on one axis and send it back and forth once. +void effect_planboing (int plane, int speed) +{ + int i; + for (i=0;i<8;i++) + { + fill(0x00); + setplane(plane, i); + delay_ms(speed); + } + + for (i=7;i>=0;i--) + { + fill(0x00); + setplane(plane,i); + delay_ms(speed); + } +} + +void effect_blinky2() +{ + int i,r; + fill(0x00); + + for (r=0;r<2;r++) + { + i = 750; + while (i>0) + { + fill(0x00); + delay(i/5); + + fill(0xff); + delay(20); + + i = i - (15+(1000/(i/10))); + } + + delay(500); + + i = 750; + while (i>0) + { + fill(0x00); + delay((751-i)/5); + + fill(0xff); + delay(20); + + i = i - (15+(1000/(i/10))); + } + } + +} +// Set or clear exactly 512 voxels in a random order. +void effect_random_filler (int delay, int state) +{ + int x,y,z; + int loop = 0; + + + if (state == 1) + { + fill(0x00); + } else + { + fill(0xff); + } + + while (loop<511) + { + x = rand()%8; + y = rand()%8; + z = rand()%8; + + if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) + { + altervoxel(x,y,z,state); + delay_ms(delay); + loop++; + } + } +} + +void draw_positions_axis (char axis, unsigned char positions[64], int invert) +{ + int x, y, p; + + fill(0x00); + + for (x=0; x<8; x++) + { + for (y=0; y<8; y++) + { + if (invert) + { + p = (7-positions[(x*8)+y]); + } else + { + p = positions[(x*8)+y]; + } + + if (axis == AXIS_Z) + setvoxel(x,y,p); + + if (axis == AXIS_Y) + setvoxel(x,p,y); + + if (axis == AXIS_X) + setvoxel(p,y,x); + } + } + +} + + + +void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) +{ + int i; + int done; + unsigned char cubepos[64]; + unsigned char pos[64]; + int notdone = 1; + int notdone2 = 1; + int sent = 0; + + for (i=0;i<64;i++) + { + pos[i] = 0; + } + + while (notdone) + { + if (mode == 1) + { + notdone2 = 1; + while (notdone2 && sent<64) + { + i = rand()%64; + if (pos[i] == 0) + { + sent++; + pos[i] += 1; + notdone2 = 0; + } + } + } else if (mode == 2) + { + if (sent<64) + { + pos[sent] += 1; + sent++; + } + } + + done = 0; + for (i=0;i<64;i++) + { + if (pos[i] > 0 && pos[i] <7) + { + pos[i] += 1; + } + + if (pos[i] == 7) + done++; + } + + if (done == 64) + notdone = 0; + + for (i=0;i<64;i++) + { + if (origin == 0) + { + cubepos[i] = pos[i]; + } else + { + cubepos[i] = (7-pos[i]); + } + } + + + delay_ms(delay); + draw_positions_axis(axis,cubepos,0); + + } + +} + + + + +/***************************************************************************** + * LOOP TEST + *****************************************************************************/ + +void loop() +{ + //for (char i = 0; i < 8; ++i) { + //PORTB = (PORTB & ~0x1C) | ((i & 0x07) << 2); + //display(i); + //delay(2); + + //Serial.println(layer, DEC); + //delay(1000); + //} + clear_led(); + //delay_ms(1000); + delay(1000); + //return; + for (char z = 0; z < 8; ++z) { + for (char y = 0; y < 8; ++y) { + for (char x = 0; x < 8; ++x) { + set_led(x, y, z, true); + delay(5); + //delay(100); + //delay(500); + //delay(1000); + //delay_ms(1000); + } + } + } + delay(1000); + //delay_ms(1000); + clear_led(); + /* effect_stringfly2("test de texte - c'est trop super genial et tout " + "yeahhh!!!!!"); + */ + effect_planboing(AXIS_Z, 700); + effect_planboing(AXIS_Y, 700); + effect_planboing(AXIS_X, 700); + + effect_blinky2(); + + effect_random_filler(75,1); + effect_random_filler(75,0); + + for (char i = 0; i < 10; ++i) { + effect_boxside_randsend_parallel (AXIS_X, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_X, 1, 950, 2); + effect_boxside_randsend_parallel (AXIS_Y, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_Y, 1, 950, 2); + effect_boxside_randsend_parallel (AXIS_Z, 0, 950, 2); + effect_boxside_randsend_parallel (AXIS_Z, 1, 950, 2); + } + + + //effect_rain(1000) +} diff --git a/test_serial.py b/test_serial.py new file mode 100755 index 0000000..cee3f0c --- /dev/null +++ b/test_serial.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +import os +import sys +import serial +import base64 +from time import sleep + +ser = serial.Serial('/dev/ttyUSB1', 38400, timeout=0.5, rtscts=0) + +count = 10000 +i = 0 +error_count = 0 +error_size = 0 +size = 0 +while i < 10000 : + i += 1 + #sleep( 5 ) + string = base64.urlsafe_b64encode(os.urandom(10)) + #string = 'abcdefgh' + ser.write(string) + length = len(string) + size += length + print i, "[ ", length, " B ]: ", string + #if ser.read(8) != 'abcdefgh': + if ser.read(length) != string: + error_count += 1 + error_size += length + +print 'error count: %i/%i, error size: %i/%i' % (error_count, count, + error_size, size) + + +sys.exit(0) diff --git a/todo b/todo new file mode 100644 index 0000000..0242856 --- /dev/null +++ b/todo @@ -0,0 +1,4 @@ +problème de clignotement pc du à la charge. +idem sur certains effet directement sur les leds. +tester effets compliqués pour voir si méthode shifting possible, pas trop +lourds (notamment pour permettre effet par pc). -- cgit v1.2.3