├── .gitignore
├── README.md
├── TinyAudioBoot
├── EEPROM.h
└── TinyAudioBoot.c
├── bootloaderbuild
├── EEPROM.h
├── Makefile
└── main.cpp
├── build
├── AudioBootAttiny_AudioPB3_PB1.hex
├── Readme.txt
├── old
│ ├── AudioBootAttiny85.jar
│ ├── AudioBootAttiny85_AudioPB3_LEDPB1.hex
│ ├── AudioBootAttiny85_AudioPB4_LedPB0_V3_1.hex
│ ├── AudioBootAttiny85_AudioPB4_LedPB1_V3_1.hex
│ ├── BlinkFast_on_PB1_Attiny85.hex
│ ├── BlinkFlash_on_PB1_Attiny85.hex
│ ├── Led_connected_to_BP1
│ │ ├── BlinkFast_on_PB1_Attiny85.hex
│ │ ├── BlinkFast_on_PB1_Attiny85.wav
│ │ ├── BlinkFlash_on_PB1_Attiny85.hex
│ │ ├── simpleNeoPixel_PB3.wav
│ │ └── test.wav
│ ├── PentatonicMelodyNeoPixel.ino.wav
│ ├── PentatonicMelodyNeoPixelPB1_SpeaderPB0_Attiny85.wav
│ ├── neoPixelSequencer.ino.wav
│ ├── pentatonicMelody_AudioOutPB0_Attiny85.wav
│ ├── simpleNeoPixel.ino.wav
│ ├── simpleNeoPixel_PB1.hex
│ └── simpleNeoPixel_PB1.wav
├── test.hex
└── test.wav
├── core
├── HardwareSerial.cpp.d
├── HardwareSerial.cpp.o
├── Print.cpp.d
├── Print.cpp.o
├── TinySoftwareSPI.cpp.d
├── TinySoftwareSPI.cpp.o
├── TinySoftwareSerial.cpp.d
├── TinySoftwareSerial.cpp.o
├── Tone.cpp.d
├── Tone.cpp.o
├── WInterrupts.c.d
├── WInterrupts.c.o
├── WMath.cpp.d
├── WMath.cpp.o
├── WString.cpp.d
├── WString.cpp.o
├── core.a
├── wiring.c.d
├── wiring.c.o
├── wiring_analog.c.d
├── wiring_analog.c.o
├── wiring_digital.c.d
├── wiring_digital.c.o
├── wiring_pulse.c.d
├── wiring_pulse.c.o
├── wiring_shift.c.d
└── wiring_shift.c.o
├── doc
├── 8BitMixTapeNeolit.jpg
├── 8BitMixedTapeNeoprenEdition.jpg
├── AudioBootLoader.odp
├── AudioBootLoaderFlyer.png
├── AudioBootLoaderMinimumBreadBoard.PNG
├── AudioBootloader.fzz
├── FritzingNeoCycloSynth.PNG
├── NeoCycloSynth.PNG
└── audioInputSchematic.PNG
└── java_source
├── MANIFEST.MF
├── controllPanel
├── Main_WavBootLoader$inputHexFile_ButtonListener$1.class
├── Main_WavBootLoader$inputHexFile_ButtonListener.class
├── Main_WavBootLoader$writeWav_ButtonListener.class
├── Main_WavBootLoader.class
├── Main_WavBootLoader.java
├── Model_ProgrammParameters.class
└── Model_ProgrammParameters.java
├── hexTools
├── IntelHexFormat.class
└── IntelHexFormat.java
├── java_compile.sh
├── wavCreator
├── BootFrame.class
├── BootFrame.java
├── HexToSignal.class
├── HexToSignal.java
├── WavCodeGenerator.class
└── WavCodeGenerator.java
└── waveFile
├── AePlayWave$Position.class
├── AePlayWave.class
├── AePlayWave.java
├── ReadExample.class
├── ReadExample.java
├── WavFile$IOState.class
├── WavFile.class
├── WavFile.java
├── WavFileException.class
├── WavFileException.java
├── WriteExample.class
└── WriteExample.java
/.gitignore:
--------------------------------------------------------------------------------
1 | /TinyAudioBoot/SendOnlySoftwareSerial.d
2 | /TinyAudioBoot/SendOnlySoftwareSerial.o
3 | /TinyAudioBoot/SendOnlySoftwareSerial.cpp.lst
4 | /build/TinyAudioBoot.ino.lst
5 | /build/main.bin
6 | /build/main.map
7 | /build/main.hex
8 | /build/TinyAudioBoot.d
9 | /build/TinyAudioBoot.o
10 | /java_source/test.wav
11 | /build/test.wav
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TinyAudioBoot
2 | Audio Bootloader for Attiny85 Microcontrollers
3 |
4 | ## What?
5 |
6 | You can simply program an Attiny85 via the audio output of a PC, Smartphone or audio-player.
7 |
8 |
9 |
10 |
11 |
12 | Only a low-part count circuit is needed.
13 |
14 | The bootloader presented here has the following features:
15 |
16 | - low memory footprint: ~1KB
17 | - [full Arduino IDE integration] (https://github.com/8BitMixtape/8Bit-Mixtape-NEO/wiki/3_3-IDE-integration)
18 | - automatic Baudrate detection and callibration
19 | - very simple circuit: two 10 k resistors and a 100 nF capacitor are needed to connect the microcontroller to the audio output
20 | of the PC or audio player
21 | - one pin for data transmission is needed
22 | - an optional led indicator, needs an extra pin, for the state of the boot loader
23 | - as hex/binary to wav converter, programmed in java, is also available. It works on win and linux
24 |
25 | ## Why?
26 |
27 | In some cases it is simpler to play an audio file to program a microcontroller than to install an IDE and dig up
28 | a programming dongle !
29 |
30 | A good starting point for using this bootloader can be found here: [8bitmixedtape synthesizer](https://8bitmixtape.github.io/). A collection of ready-to-play files.
31 |
32 | ## How?
33 |
34 | ### installing the bootloader on the Attiny85
35 |
36 | Firtly, the bootloader must be flashed onto the microcontroller with an ISP programmer.
37 | You can use an [Arduino-Uno as ISP-pogrammer] (https://www.frag-duino.de/index.php/maker-faq/37-atmel-attiny-85-mit-arduino-arduinoisp-flashen-und-programmieren)
38 |
39 | There are precompiled HEX files (one file per configuration) e.g.:
40 |
41 | **AudioBootAttiny85_AudioPB4_LedPB1_V3_1.hex**
42 |
43 | AudioPB4 means: PB4 is the audio input pin
44 | LEDPB1 means: The LED signal is on PB1
45 |
46 | Some fuses have to be programmed too (for the ATTiny85):
47 |
48 | Extended: 0xFE
49 | HIGH: 0xDD
50 | LOW: 0xE1
51 |
52 | With these settings the ATTiny will run at 16Mhz
53 |
54 | If you are using avrdude this is the commandl ine to set the fuses (for a serial com called ttyACM0):
55 | > avrdude -P /dev/ttyACM0 -b 19200 -c avrisp -p t85 -U efuse:w:0xfe:m -U
56 | hfuse:w:0xdd:m -U lfuse:w:0xe1:m
57 |
58 | This is the command line to program the bootloader with audio input at PB3 and Led at PB1 (again for ttyACM0):
59 | > avrdude -v -pattiny85 -c avrisp -P/dev/ttyACM0 -b19200
60 | -Uflash:w:/home/dusjagr/Arduino/AttinySound-master/AudioBoot/AudioBootAttiny85_InputPB3_LEDPB1.hex:i
61 |
62 |
63 | ### bootloader operation
64 |
65 | 1. After reset the bootloader waits for about 5 seconds for a signal from the audio input.
66 | During this period the LED blinks at 1/2 Hz
67 |
68 | 2. If there was no signal, the bootloader starts the main program from flash
69 |
70 | 3. If there was a signal, the bootloader starts receiving the new program data an flashes it
71 |
72 | The sound volume has to be adjusted to a suitable value (some trial and error needed here).
73 | On most PCs the AudioBootloader should work with a **volume setting of 70%** .
74 |
75 |
76 | ## creating the WAV file
77 |
78 | ### Arduino IDE integration
79 |
80 | You could directly integrate the wav-file generator into your Arduino IDE to program your sketches:
81 |
82 | [full Arduino IDE integration] (https://github.com/8BitMixtape/8Bit-Mixtape-NEO/wiki/3_3-IDE-integration)
83 |
84 | ### HEX to WAV java Progam
85 |
86 | There is a java program in this repository to convert the hex files to wav files.
87 |
88 | **AudioBootAttiny85.jar**
89 |
90 | You can start by just clicking on it, if supported by your operating system or from the command line (see below).
91 | The wav-file is created and stored in the same directory where you started the java program.
92 |
93 | You can also use AudioBootAttiny85.jar directly from the command line without starting the GUI with the following command:
94 |
95 | > java -jar AudioBootAttiny85.jar someExampleFile.hex
96 |
97 | This might be useful if you want to integrate it in your own applications.
98 |
99 | ## interfacing the Attiny85 with the audio line
100 |
101 | You need two resistors and a capacitor as shown in the schematic below.
102 | You could also add a LED as status indicator for the bootloader. It allows to see if the bootloader has started and to quickly check if programming is underway due to the different blinking pattern.
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/TinyAudioBoot/EEPROM.h:
--------------------------------------------------------------------------------
1 | /*
2 | EEPROM.h - EEPROM library
3 | Original Copyright (c) 2006 David A. Mellis. All right reserved.
4 | New version by Christopher Andrews 2015.
5 |
6 | This library is free software; you can redistribute it and/or
7 | modify it under the terms of the GNU Lesser General Public
8 | License as published by the Free Software Foundation; either
9 | version 2.1 of the License, or (at your option) any later version.
10 |
11 | This library is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | Lesser General Public License for more details.
15 |
16 | You should have received a copy of the GNU Lesser General Public
17 | License along with this library; if not, write to the Free Software
18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef EEPROM_h
22 | #define EEPROM_h
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | /***
29 | EERef class.
30 |
31 | This object references an EEPROM cell.
32 | Its purpose is to mimic a typical byte of RAM, however its storage is the EEPROM.
33 | This class has an overhead of two bytes, similar to storing a pointer to an EEPROM cell.
34 | ***/
35 |
36 | struct EERef{
37 |
38 | EERef( const int index )
39 | : index( index ) {}
40 |
41 | //Access/read members.
42 | uint8_t operator*() const { return eeprom_read_byte( (uint8_t*) index ); }
43 | operator const uint8_t() const { return **this; }
44 |
45 | //Assignment/write members.
46 | EERef &operator=( const EERef &ref ) { return *this = *ref; }
47 | EERef &operator=( uint8_t in ) { return eeprom_write_byte( (uint8_t*) index, in ), *this; }
48 | EERef &operator +=( uint8_t in ) { return *this = **this + in; }
49 | EERef &operator -=( uint8_t in ) { return *this = **this - in; }
50 | EERef &operator *=( uint8_t in ) { return *this = **this * in; }
51 | EERef &operator /=( uint8_t in ) { return *this = **this / in; }
52 | EERef &operator ^=( uint8_t in ) { return *this = **this ^ in; }
53 | EERef &operator %=( uint8_t in ) { return *this = **this % in; }
54 | EERef &operator &=( uint8_t in ) { return *this = **this & in; }
55 | EERef &operator |=( uint8_t in ) { return *this = **this | in; }
56 | EERef &operator <<=( uint8_t in ) { return *this = **this << in; }
57 | EERef &operator >>=( uint8_t in ) { return *this = **this >> in; }
58 |
59 | EERef &update( uint8_t in ) { return in != *this ? *this = in : *this; }
60 |
61 | /** Prefix increment/decrement **/
62 | EERef& operator++() { return *this += 1; }
63 | EERef& operator--() { return *this -= 1; }
64 |
65 | /** Postfix increment/decrement **/
66 | uint8_t operator++ (int){
67 | uint8_t ret = **this;
68 | return ++(*this), ret;
69 | }
70 |
71 | uint8_t operator-- (int){
72 | uint8_t ret = **this;
73 | return --(*this), ret;
74 | }
75 |
76 | int index; //Index of current EEPROM cell.
77 | };
78 |
79 | /***
80 | EEPtr class.
81 |
82 | This object is a bidirectional pointer to EEPROM cells represented by EERef objects.
83 | Just like a normal pointer type, this can be dereferenced and repositioned using
84 | increment/decrement operators.
85 | ***/
86 |
87 | struct EEPtr{
88 |
89 | EEPtr( const int index )
90 | : index( index ) {}
91 |
92 | operator const int() const { return index; }
93 | EEPtr &operator=( int in ) { return index = in, *this; }
94 |
95 | //Iterator functionality.
96 | bool operator!=( const EEPtr &ptr ) { return index != ptr.index; }
97 | EERef operator*() { return index; }
98 |
99 | /** Prefix & Postfix increment/decrement **/
100 | EEPtr& operator++() { return ++index, *this; }
101 | EEPtr& operator--() { return --index, *this; }
102 | EEPtr operator++ (int) { return index++; }
103 | EEPtr operator-- (int) { return index--; }
104 |
105 | int index; //Index of current EEPROM cell.
106 | };
107 |
108 | /***
109 | EEPROMClass class.
110 |
111 | This object represents the entire EEPROM space.
112 | It wraps the functionality of EEPtr and EERef into a basic interface.
113 | This class is also 100% backwards compatible with earlier Arduino core releases.
114 | ***/
115 |
116 | struct EEPROMClass{
117 |
118 | //Basic user access methods.
119 | EERef operator[]( const int idx ) { return idx; }
120 | uint8_t read( int idx ) { return EERef( idx ); }
121 | void write( int idx, uint8_t val ) { (EERef( idx )) = val; }
122 | void update( int idx, uint8_t val ) { EERef( idx ).update( val ); }
123 |
124 | //STL and C++11 iteration capability.
125 | EEPtr begin() { return 0x00; }
126 | EEPtr end() { return length(); } //Standards requires this to be the item after the last valid entry. The returned pointer is invalid.
127 | uint16_t length() { return E2END + 1; }
128 |
129 | //Functionality to 'get' and 'put' objects to and from EEPROM.
130 | template< typename T > T &get( int idx, T &t ){
131 | EEPtr e = idx;
132 | uint8_t *ptr = (uint8_t*) &t;
133 | for( int count = sizeof(T) ; count ; --count, ++e ) *ptr++ = *e;
134 | return t;
135 | }
136 |
137 | template< typename T > const T &put( int idx, const T &t ){
138 | EEPtr e = idx;
139 | const uint8_t *ptr = (const uint8_t*) &t;
140 | for( int count = sizeof(T) ; count ; --count, ++e ) (*e).update( *ptr++ );
141 | return t;
142 | }
143 | };
144 |
145 | static EEPROMClass EEPROM;
146 | #endif
--------------------------------------------------------------------------------
/TinyAudioBoot/TinyAudioBoot.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | AudioBoot - flashing a microcontroller by PC audio line out
4 |
5 | Originally the bootloader was made for Atmega8 and Atmega168 microcontrollers.
6 |
7 | Budi Prakosa a.k.a Iyok reworked the code to get it running on an Attiny85 microcontroller.
8 |
9 | Parts of the * equinox-boot.c - bootloader for equinox
10 | from Frank Meyer and Robert Meyer are used to access the FLASH memory.
11 |
12 | Hardware: Attiny85
13 |
14 | input pin: should be connected to a voltage divider.
15 | output pin: LED for status indication of the bootloader
16 |
17 | The input pin is also connected by a 10nF capacitor to the PC line out
18 |
19 | The Atmega168 seems to have the switching voltage level at 2.2V
20 | The Atmega8 at 1.4V
21 | The switching levels of the input pins may vary a little bit from one
22 | MC to another. If you to be able to adjust the voltages,
23 | use a 10k poti as voltage divider.
24 |
25 |
26 | As development platform an Arduino Diecimilla was used. Therefore you
27 | will find many #ifdefs for the Arduino in this code.
28 | If you want to optimize the bootloader further you may use an Arduino
29 | as development platform.
30 |
31 |
32 | necessary setup
33 |
34 | 1. Project->ConfigurationOptions->Processortype
35 | 2. Project->ConfigurationOptions->Programming Modell 'Os'
36 | 3. Project->ConfigurationOptions->CustomOptions->LinkerOptions->see further down
37 |
38 | There is an article how to make an ATTINY boot loader ( German ):
39 | http://www.mikrocontroller.net/articles/Konzept_f%C3%BCr_einen_ATtiny-Bootloader_in_C
40 | ( thanks to the author of the article, very well written )
41 |
42 |
43 | Creating the bootloader with Atmel Studio 7
44 | ===========================================
45 |
46 | 1. You have to define the bootloader sections and reset vector location
47 |
48 | => Toolchain/AVR_GNU_Linker/Memory Settings
49 | .bootreset=0x00
50 | .text=0xE00 // for 1KB Bootloader
51 | .text=0x0C00 // for 2KB Bootloader
52 |
53 | explanation:
54 | .text=0x0E00 *2 = 0x1C00 ==> this is the start address of the boot loader with 1KB size
55 | .text=0x0C00 *2 = 0x1800 ==> this is the start address of the boot loader with 2KB size
56 |
57 | 2. Disable unused sections optimization in the linker
58 | Be sure that in the linker parameters this is not used: -Wl, --gc-sections
59 | disable the following check box:
60 | ==>Toolchain/AVR_GNU_C Compiler/Optimization/Garbage collect unused sections
61 |
62 |
63 | Fuse settings for the bootloader
64 | ================================
65 |
66 | There fuses have to match certain conditions.
67 | Mainly SELFPROGEN has to be set, Brown-Out-Detection activated and
68 | CKDIV8 disabled to achieve the needed F_CPU of 8MHz
69 |
70 | FUSES Attiny 85 ( F_CPU 16MHz with PLL )
71 | ========================================
72 | Extended: 0xFE
73 | HIGH: 0xDD
74 | LOW: 0xE1
75 |
76 | ************************************************************************************
77 |
78 | v0.1 19.6.2008 C. -H-A-B-E-R-E-R- Bootloader for IR-Interface
79 | v1.0 03.9.2011 C. -H-A-B-E-R-E-R- Bootloader for audio signal
80 | v1.1 05.9.2011 C. -H-A-B-E-R-E-R- changing pin setup, comments, and exitcounter=3
81 | v1.2 12.5.2012 C. -H-A-B-E-R-E-R- Atmega8 Support added, java program has to be adapted too
82 | v1.3 20.5.2012 C. -H-A-B-E-R-E-R- now interrupts of user program are working
83 | v1.4 05.6.2012 C. -H-A-B-E-R-E-R- signal coding changed to differential manchester code
84 | v2.0 13.6.2012 C. -H-A-B-E-R-E-R- setup for various MCs
85 | v3.0 30.1.2017 B. -P-r-a-k-o-s-a- first version of Attiny85 Audio Bootloader
86 | v3.1 04.2.2017 C. -H-A-B-E-R-E-R- clean reset vector added, description added, pins rerouted
87 | v3.2 18.7.2017 C. -P-r-a-k-o-s-a- various refactor, added eeprom write mode, makefile for compiling using arduino ide toolchain
88 |
89 | This program is free software; you can redistribute it and/or modify
90 | it under the terms of the GNU General Public License as published by
91 | the Free Software Foundation; either version 2 of the License, or
92 | (at your option) any later version.
93 |
94 | It is mandatory to keep the list of authors in this code.
95 |
96 | */
97 | /*
98 |
99 |
100 | schematic for audio input
101 | =========================
102 |
103 | VCC
104 | |
105 | | | 10K
106 | | |
107 | |
108 | |
109 | audio in >-----||-----o-------> soundprog ( digital input pin )
110 | 100nF |
111 | |
112 | | | 10K
113 | | |
114 | |
115 | GND
116 |
117 |
118 |
119 | Pinout ATtiny25/45/85
120 | =====================
121 |
122 |
123 | _______
124 | | U |
125 | (PCINT5/RESET/ADC0/dW) PB5-| |- VCC
126 | (PCINT3/XTAL1/CLKI/OC1B/ADC3) PB3-| ATTINY|- PB2 (SCK/USCK/SCL/ADC1/T0/INT0/PCINT2)
127 | (PCINT4/XTAL2/CLKO/OC1B/ADC2) PB4-| 85 |- PB1 (MISO/DO/AIN1/OC0B/OC1A/PCINT1)
128 | GND-| |- PB0 (MOSI/DI/SDA/AIN0/OC0A/OC1A/AREF/PCINT0)
129 | |_______|
130 |
131 |
132 |
133 | Pinout ARDUINO
134 | ==============
135 | _______
136 | | U |
137 | reset/PB5-| |- VCC
138 | D3/A3 PB3-| ATTINY|- PB2 D2/A1
139 | soundprog-> D4/A2 PB4-| 85 |- PB1 D1 -> ARDUINO_LED
140 | GND-| |- PB0 D0
141 | |_______|
142 |
143 |
144 |
145 | */
146 |
147 | #include
148 | #include
149 | #include
150 | #include
151 | #include
152 | #include
153 |
154 | // This value has to be adapted to the bootloader size
155 | // If you change this, please change BOOTLOADER_ADDRESS on Makefile too
156 |
157 | #define BOOTLOADER_ADDRESS 0x1BC0 // bootloader start address, e.g. 0x1C00 = 7168, set .text to 0x0E00
158 |
159 | //#define BOOTLOADER_ADDRESS 0x1800 // bootloader start address, e.g. 0x1800 = 6144, set .text to 0x0c00
160 |
161 | #define RJMP (0xC000U - 1) // opcode of RJMP minus offset 1
162 | #define RESET_SECTION __attribute__((section(".bootreset"))) __attribute__((used))
163 |
164 | // this variable seems to be unused
165 | // but in fact it is written into the flash section
166 | // you could find it in the *.hex file
167 | uint16_t resetVector RESET_SECTION = RJMP + BOOTLOADER_ADDRESS / 2;
168 |
169 | #ifdef DEBUGON
170 |
171 | #define DEBUGPIN ( 1<
260 | #ifndef RWWSRE // bug in AVR libc:
261 | #define RWWSRE CTPB // RWWSRE is not defined on ATTinys, use CTBP instead
262 | #endif
263 |
264 | void (*start_appl_main) (void);
265 |
266 | #define BOOTLOADER_FUNC_ADDRESS (BOOTLOADER_STARTADDRESS - sizeof (start_appl_main))
267 |
268 | #define sei() asm volatile("sei")
269 | #define cli() asm volatile("cli")
270 | #define nop() asm volatile("nop")
271 | #define wdr() asm volatile("wdr")
272 |
273 | //AVR ATtiny85 Programming: EEPROM Reading and Writing - YouTube
274 | //https://www.youtube.com/watch?v=DO-D6YmRpJk
275 |
276 | void eeprom_write(unsigned short address, unsigned char data)
277 | {
278 | while(EECR & (1<= 8)time += t; // time accumulator for mean period calculation only the last 8 times are used
338 | }
339 |
340 | delayTime = time * 3 / 4 / 8;
341 | // delay 3/4 bit
342 | while (TIMER < delayTime);
343 |
344 | //p=1;
345 |
346 | //****************** wait for start bit ***************************
347 | while (p == PINVALUE) // while not startbit ( no change of pinValue means 0 bit )
348 | {
349 | // wait for edge
350 | while (p == PINVALUE);
351 | p = PINVALUE;
352 | TIMER = 0;
353 |
354 | // delay 3/4 bit
355 | while (TIMER < delayTime);
356 | TIMER = 0;
357 |
358 | counter++;
359 | }
360 | p = PINVALUE;
361 |
362 | //****************************************************************
363 | //receive data bits
364 | k = 8;
365 | for (n = 0; n < (FRAMESIZE * 8); n++)
366 | {
367 | // wait for edge
368 | while (p == PINVALUE);
369 | TIMER = 0;
370 | p = PINVALUE;
371 |
372 | // delay 3/4 bit
373 | while (TIMER < delayTime);
374 |
375 | t = PINVALUE;
376 |
377 |
378 | counter++;
379 |
380 | FrameData[dataPointer] = FrameData[dataPointer] << 1;
381 | if (p != t) FrameData[dataPointer] |= 1;
382 | p = t;
383 | k--;
384 | if (k == 0) {
385 | dataPointer++;
386 | k = 8;
387 | };
388 | }
389 | //uint16_t crc = (uint16_t)FrameData[CRCLOW] + FrameData[CRCHIGH] * 256;
390 |
391 |
392 | return true;
393 | }
394 |
395 | /*-----------------------------------------------------------------------------------------------------------------------
396 | Flash: fill page word by word
397 | -----------------------------------------------------------------------------------------------------------------------
398 | */
399 | #define boot_program_page_fill(byteaddr, word) \
400 | { \
401 | uint8_t sreg; \
402 | sreg = SREG; \
403 | cli (); \
404 | boot_page_fill ((uint32_t) (byteaddr), word); \
405 | SREG = sreg; \
406 | }
407 |
408 | /*-----------------------------------------------------------------------------------------------------------------------
409 | Flash: erase and write page
410 | -----------------------------------------------------------------------------------------------------------------------
411 | */
412 | #define boot_program_page_erase_write(pageaddr) \
413 | { \
414 | uint8_t sreg; \
415 | eeprom_busy_wait (); \
416 | sreg = SREG; \
417 | cli (); \
418 | boot_page_erase ((uint32_t) (pageaddr)); \
419 | boot_spm_busy_wait (); \
420 | boot_page_write ((uint32_t) (pageaddr)); \
421 | boot_spm_busy_wait (); \
422 | boot_rww_enable (); \
423 | SREG = sreg; \
424 | }
425 |
426 |
427 | /*-----------------------------------------------------------------------------------------------------------------------
428 | write a block into flash
429 | -----------------------------------------------------------------------------------------------------------------------
430 | */
431 | static void
432 | pgm_write_block (uint16_t flash_addr, uint16_t * block, size_t size)
433 | {
434 | uint16_t start_addr;
435 | uint16_t addr;
436 | uint16_t w;
437 | uint8_t idx = 0;
438 |
439 | start_addr = (flash_addr / SPM_PAGESIZE) * SPM_PAGESIZE; // round down (granularity is SPM_PAGESIZE)
440 |
441 | for (idx = 0; idx < SPM_PAGESIZE / 2; idx++)
442 | {
443 | addr = start_addr + 2 * idx;
444 |
445 | if (addr >= flash_addr && size > 0)
446 | {
447 | w = *block++;
448 | size -= sizeof (uint16_t);
449 | }
450 | else
451 | {
452 | w = pgm_read_word (addr);
453 | }
454 |
455 | boot_program_page_fill (addr, w);
456 | }
457 |
458 | boot_program_page_erase_write(start_addr); // erase and write the page
459 | }
460 |
461 |
462 | //***************************************************************************************
463 | // void boot_program_page (uint32_t page, uint8_t *buf)
464 | //
465 | // Erase and flash one page.
466 | //
467 | // input: page address and data to be programmed
468 | //
469 | //***************************************************************************************
470 | void boot_program_page (uint32_t page, uint8_t *buf)
471 | {
472 | uint16_t i;
473 | cli(); // disable interrupts
474 |
475 | boot_page_erase(page);
476 | boot_spm_busy_wait (); // Wait until the memory is erased.
477 |
478 | for (i = 0; i < SPM_PAGESIZE; i += 2)
479 | {
480 | //read received data
481 | uint16_t w = *buf++; //low section
482 | w += (*buf++) << 8; //high section
483 | //combine low and high to get 16 bit
484 |
485 | //first page and first index is vector table... ( page 0 and index 0 )
486 | if (page == 0 && i == 0)
487 | {
488 |
489 | //1.save jump to application vector for later patching
490 | void* appl = (void *)(w - RJMP);
491 | start_appl_main = ((void (*)(void)) appl);
492 |
493 | //2.replace w with jump vector to bootloader
494 | w = 0xC000 + (BOOTLOADER_ADDRESS / 2) - 1;
495 | }
496 | // else if (page == LAST_PAGE && i == 60)
497 | // {
498 | //3.retrieve saved reset vector
499 | // w = saved_reset_vector;
500 | // }
501 |
502 | boot_page_fill (page + i, w);
503 | boot_spm_busy_wait(); // Wait until the memory is written.
504 | }
505 |
506 | boot_page_write (page); // Store buffer in flash page.
507 | boot_spm_busy_wait(); // Wait until the memory is written.
508 | }
509 |
510 | void resetRegister()
511 | {
512 | DDRB = 0;
513 | cli();
514 | TCCR0B = 0; // turn off timer1
515 | }
516 |
517 | void exitBootloader()
518 | {
519 | memcpy_P (&start_appl_main, (PGM_P) BOOTLOADER_FUNC_ADDRESS, sizeof (start_appl_main));
520 |
521 | if (start_appl_main)
522 | {
523 | resetRegister();
524 | (*start_appl_main) ();
525 | }
526 | }
527 |
528 | void runProgramm(void)
529 | {
530 | // reintialize registers to default
531 | resetRegister();
532 |
533 | pgm_write_block (BOOTLOADER_FUNC_ADDRESS, (uint16_t *) &start_appl_main, sizeof (start_appl_main));
534 |
535 | start_appl_main();
536 | }
537 |
538 | //***************************************************************************************
539 | // main loop
540 | //***************************************************************************************
541 | static inline void a_main()
542 | {
543 | uint8_t p;
544 | uint16_t time = WAITBLINKTIME;
545 | uint8_t timeout = BOOT_TIMEOUT;
546 |
547 | p = PINVALUE;
548 |
549 | //*************** wait for toggling input pin or timeout ******************************
550 | uint8_t exitcounter = 3;
551 | while (1)
552 | {
553 |
554 | if (TIMER > 100) // timedelay ==> frequency @16MHz= 16MHz/8/100=20kHz
555 | {
556 | TIMER = 0;
557 | time--;
558 | if (time == 0)
559 | {
560 | TOGGLELED;
561 |
562 | time = WAITBLINKTIME;
563 | timeout--;
564 | if (timeout == 0)
565 | {
566 | LEDOFF; // timeout,
567 | // leave bootloader and run program
568 | exitBootloader();
569 | }
570 | }
571 | }
572 | if (p != PINVALUE)
573 | {
574 | p = PINVALUE;
575 | exitcounter--;
576 | }
577 | if (exitcounter == 0) break; // signal received, leave this loop and go on
578 | }
579 | //*************** start command interpreter *************************************
580 | LEDON;
581 | while (1)
582 | {
583 | if (!receiveFrame())
584 | {
585 | //***** if data transfer error: blink fast, press reset to restart *******************
586 |
587 | while (1)
588 | {
589 | if (TIMER > 100) // timerstop ==> frequency @16MHz= 16MHz/8/100=20kHz
590 | {
591 | TIMER = 0;
592 | time--;
593 | if (time == 0)
594 | {
595 | TOGGLELED;
596 | time = 1000;
597 | }
598 | }
599 | }
600 | }
601 | else // succeed
602 | {
603 | switch (FrameData[COMMAND])
604 | {
605 |
606 | case PROGCOMMAND:
607 | {
608 | uint16_t pageNumber = (((uint16_t)FrameData[PAGEINDEXHIGH]) << 8) + FrameData[PAGEINDEXLOW];
609 | uint16_t address=SPM_PAGESIZE * pageNumber;
610 |
611 | if( address < BOOTLOADER_ADDRESS) // prevent bootloader form self killing
612 | {
613 | boot_program_page (address, FrameData + DATAPAGESTART); // erase and program page
614 | TOGGLELED;
615 | }
616 | }
617 | break;
618 |
619 | case RUNCOMMAND:
620 | {
621 | // after programming leave bootloader and run program
622 | runProgramm();
623 | }
624 | break;
625 |
626 | // case EXITCOMMAND:
627 | // {
628 | // // after programming leave bootloader and run program
629 | // exitBootloader();
630 | // }
631 | // break;
632 |
633 | case EEPROMCOMMAND:
634 | {
635 | uint8_t pageNumber = FrameData[PAGEINDEXLOW];
636 | uint8_t data_length = FrameData[LENGTHLOW];
637 | uint8_t address = SPM_PAGESIZE * pageNumber;
638 |
639 | uint8_t *buf = FrameData + DATAPAGESTART;
640 |
641 | for (uint8_t i = 0; i < data_length; i++)
642 | {
643 | //write received data to EEPROM
644 | uint8_t w = *buf++;
645 | eeprom_write(address + i, w);
646 | }
647 |
648 | //Leave bootloader after eeprom signal received
649 | //todo: wait until all data sent > spm pagesize (64)
650 | //fix this!!!!
651 | LEDOFF;
652 | exitBootloader();
653 |
654 | }
655 | break;
656 | }
657 | FrameData[COMMAND] = NOCOMMAND; // delete command
658 | }
659 | }
660 | }
661 |
662 | int main()
663 | {
664 | INITDEBUGPIN
665 | INITLED;
666 | INITAUDIOPORT;
667 |
668 | // Timer 2 normal mode, clk/8, count up from 0 to 255
669 | // ==> frequency @16MHz= 16MHz/8/256=7812.5Hz
670 | TCCR0B = _BV(CS01);
671 |
672 | a_main(); // start the main function
673 | }
--------------------------------------------------------------------------------
/bootloaderbuild/EEPROM.h:
--------------------------------------------------------------------------------
1 | ../TinyAudioBoot/EEPROM.h
--------------------------------------------------------------------------------
/bootloaderbuild/Makefile:
--------------------------------------------------------------------------------
1 | # Name: Makefile
2 | # Project: USBaspLoader
3 | # Author: Christian Starkjohann
4 | # Creation Date: 2007-12-10
5 | # Tabsize: 4
6 | # Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
7 | # License: GNU GPL v2 (see License.txt)
8 | # This Revision: $Id: Makefile 798 2010-07-27 17:29:28Z cs $
9 |
10 |
11 | ###############################################################################
12 | # Configure the following variables according to your AVR.
13 | # Program the device with
14 | # make fuse # to set the clock generator, boot section size etc.
15 | # make flash # to load the boot loader into flash
16 | # make lock # to protect the boot loader from overwriting
17 | # make disablereset # for ATtiny85 target - to use external reset line for IO (CAUTION: this is not easy to enable again, see README)
18 |
19 | F_CPU = 16500000
20 |
21 | ARDUINOAPPDIR = /Applications/Arduino.app
22 | AVRDIR = $(ARDUINOAPPDIR)/Contents/Java/hardware/tools/avr
23 | AVRBIN = $(AVRDIR)/bin
24 | AVRINCLUDE = $(ARDUINOAPPDIR)/Contents/Java/hardware/tools/avr/avr/include
25 |
26 | DEVICE = attiny85
27 |
28 | # hexadecimal address for bootloader section to begin. To calculate the best value:
29 | # - make clean; make main.hex; ### output will list data: 2124 (or something like that)
30 | # - for the size of your device (8kb = 1024 * 8 = 8192) subtract above value 2124... = 6068
31 | # - How many pages in is that? 6068 / 64 (tiny85 page size in bytes) = 94.8125
32 | # - round that down to 94 - our new bootloader address is 94 * 64 = 6016, in hex = 1780
33 | BOOTLOADER_ADDRESS = 0x1BC0
34 |
35 | LOCKOPT = -U lock:w:0x2f:m
36 |
37 | #PROGRAMMER contains AVRDUDE options to address your programmer
38 | PROGRAMMER = -c USBasp
39 |
40 | FUSEOPT_t85 = -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m
41 | FUSEOPT_t85_DISABLERESET = -U lfuse:w:0xe1:m -U efuse:w:0xfe:m -U hfuse:w:0x5d:m
42 |
43 | FUSEOPT = $(FUSEOPT_t85)
44 |
45 | ARDUINO_BOARD_CORE = /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny
46 | ARDUINO_BOARD_PINS = /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5
47 | ARDUINO_BOARD_INCLUDES = -I$(ARDUINO_BOARD_CORE) -I$(ARDUINO_BOARD_PINS) -I../TinyAudioBoot
48 |
49 | # Tools:
50 | AVRDUDE = $(AVRBIN)/avrdude $(PROGRAMMER) -p $(DEVICE) -C $(AVRDIR)/etc/avrdude.conf
51 | CC = $(AVRBIN)/avr-gcc
52 | CPP = $(AVRBIN)/avr-g++
53 | AVROBJCOPY= $(AVRBIN)/avr-objcopy
54 | AVROBJDUMP= $(AVRBIN)/avr-objdump
55 | AVRSIZE= $(AVRBIN)/avr-size
56 |
57 | # Options:
58 | DEFINES = -DBOOTLOADER_ADDRESS=0x$(BOOTLOADER_ADDRESS) -DARDUINO=10801 -DARDUINO_AVR_COCOMAKE7 -DARDUINO_ARCH_AVR -DF_CPU=$(F_CPU)
59 | CPPFLAGS = -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -I. -mmcu=$(DEVICE) $(DEFINES) $(ARDUINO_BOARD_INCLUDES)
60 | CFLAGS = -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -I. -mmcu=$(DEVICE) $(DEFINES) $(ARDUINO_BOARD_INCLUDES)
61 | LDFLAGS = -Wl,--relax,--gc-sections -Wl,--section-start=.text=$(BOOTLOADER_ADDRESS),-Map=main.map
62 |
63 | OBJECTS = main.o
64 |
65 |
66 | # symbolic targets:
67 | all: main.hex
68 |
69 | ## Compile c++ files
70 |
71 | %.o : %.ino
72 | $(CPP) $(CPPFLAGS) -x c++ -c $< -o $@ -Wa,-ahls=$<.lst
73 |
74 | .cpp.o:
75 | $(CPP) $(CPPFLAGS) -x c++ -c $< -o $@ -Wa,-ahls=$<.lst
76 |
77 | ## Compile c files
78 | .c.o:
79 | $(CC) $(CFLAGS) -c $< -o $@ -Wa,-ahls=$<.lst
80 |
81 |
82 | ## Compile S files
83 | .S.o:
84 | $(CC) $(CPPFLAGS) -c -g -x assembler-with-cpp $< -o $@
85 |
86 | .c.s:
87 | @$(CC) $(CFLAGS) -S $< -o $@
88 |
89 | .cpp.s:
90 | $(GCC) $(CPPFLAGS) -S $< -o $@
91 |
92 | flash: all
93 | $(AVRDUDE) $(FUSEOPT)
94 | $(AVRDUDE) -Uflash:w:main.hex:i
95 |
96 | readflash:
97 | $(AVRDUDE) -U flash:r:read.hex:i
98 |
99 | fuse:
100 | $(AVRDUDE) $(FUSEOPT)
101 |
102 | disablereset:
103 | $(AVRDUDE) $(FUSEOPT_t85_DISABLERESET)
104 |
105 | lock:
106 | $(AVRDUDE) $(LOCKOPT)
107 |
108 | read_fuses:
109 | $(UISP) --rd_fuses
110 |
111 | clean:
112 | rm -f main.hex main.bin *.o main.s main.cpp.lst TinyAudioBoot.ino.lst main.map main.d TinyAudioBoot.d SendOnlySoftwareSerial.cpp.lst SendOnlySoftwareSerial.d
113 |
114 | # file targets:
115 |
116 | #link files
117 | main.bin: $(OBJECTS)
118 | $(CC) -w -Os -Wl,--gc-sections -mmcu=$(DEVICE) -o main.bin $(OBJECTS) $(LDFLAGS)
119 |
120 | main.hex: main.bin
121 | rm -f main.hex main.eep.hex
122 | $(AVROBJCOPY) -j .text -j .data -O ihex main.bin main.hex
123 | @echo Size of binary hexfile. Use the "data" size to calculate the bootloader address
124 | $(AVRSIZE) main.hex
125 |
126 | disasm: main.bin
127 | $(AVROBJDUMP) -d main.bin
--------------------------------------------------------------------------------
/bootloaderbuild/main.cpp:
--------------------------------------------------------------------------------
1 | ../TinyAudioBoot/TinyAudioBoot.c
--------------------------------------------------------------------------------
/build/AudioBootAttiny_AudioPB3_PB1.hex:
--------------------------------------------------------------------------------
1 | :101BC0000EC01DC01CC01BC01AC019C018C017C051
2 | :101BD00016C015C014C013C012C011C010C011240B
3 | :101BE0001FBECFE5D2E0DEBFCDBF20E0A0E6B0E073
4 | :101BF00001C01D92A93AB207E1F74ED1E5C1E0CF8D
5 | :101C0000E199FECF1CBA811522E0920710F08FEF08
6 | :101C100091E09FBB8EBB6DBBE29AE19A0895CF9392
7 | :101C2000DF9300D000D0CDB7DEB71C821B821C82B0
8 | :101C30001B8226B3287030E086B3887090E02817A6
9 | :101C40003907D1F386B3282F287012BE40E050E048
10 | :101C5000822F90E026B3287030E082179307D1F3EB
11 | :101C600032B712BE86B3282F28704830510530F0A5
12 | :101C70008B819C81830F911D9C838B834F5F5F4F72
13 | :101C80004031510529F78B819C8163E070E082D15E
14 | :101C900035E0969587953A95E1F79A83898382B7DF
15 | :101CA00049815A8190E084179507C8F3822F90E00C
16 | :101CB00026B3287030E08217930799F426B3287072
17 | :101CC00030E082179307D1F386B3282F287012BE15
18 | :101CD00082B749815A8190E084179507C8F312BEF4
19 | :101CE000E5CF86B3887048E352E070E068E090E0AA
20 | :101CF00026B3287030E082179307D1F312BE26B3C3
21 | :101D0000287082B7E981FA8190E08E179F07C8F3A7
22 | :101D100086B38870E72FF0E0EE59FF4F9081990F5E
23 | :101D2000281391609083615011F47F5F68E0415007
24 | :101D30005109E9F681E00F900F900F900F90DF911D
25 | :101D4000CF910895CF92DF92EF92FF926B017C01C9
26 | :101D5000F894DB0183E0F60180935700E89507B61D
27 | :101D600000FCFDCF20E030E061E0FA0170814E5FC1
28 | :101D70005F4F3196808190E0982F8827870F911DC3
29 | :101D8000C114D104E104F10459F42115310541F4E1
30 | :101D90008F5F9F4B90936100809360008FED9DEC6F
31 | :101DA000F901EA0FFB1F0C0160935700E89511241D
32 | :101DB00007B600FCFDCF2E5F3F4F20343105A9F65A
33 | :101DC00085E0F60180935700E89507B600FCFDCF4B
34 | :101DD000FF90EF90DF90CF90089517BAF89413BE5C
35 | :101DE000089542E050E06EEB7BE180E690E0E3D0C6
36 | :101DF0008091600090916100892B31F0EEDFE091DD
37 | :101E00006000F091610009940895E7DF80E89BE1AC
38 | :101E1000A0E6B0E022E030E071E08E3B4BE19407B9
39 | :101E200051F42115310539F04D915C9111972250F3
40 | :101E30003109129603C0FC01459154916FB7F89493
41 | :101E4000FC010A0170935700E89511246FBF0296B8
42 | :101E5000803CFBE19F0709F7E199FECF8FB7F8942B
43 | :101E6000E0E8FBE193E090935700E89507B600FCAB
44 | :101E7000FDCFE0E8FBE195E090935700E89507B6C9
45 | :101E800000FCFDCF91E190935700E8958FBFE09162
46 | :101E90006000F09161000994B99ABB9882E083BF19
47 | :101EA00016B3187003E03AE0F32EC0E1D7E242E047
48 | :101EB000E42E82B7853668F012BE219751F488B3BC
49 | :101EC0008E2588BBFA94F11002C0C1988ADFC0E168
50 | :101ED000D7E286B3212F30E0887090E028173907C9
51 | :101EE00019F016B3187001500111E3CFC19A97DEB3
52 | :101EF00081110DC092E082B78536E8F312BE2197BA
53 | :101F0000D1F788B3892788BBC8EED3E0F4CF10910E
54 | :101F100062001330F9F01430F9F01230C1F560911D
55 | :101F2000640070E0762F662780916300680F711D52
56 | :101F300026E0660F771F2A95E1F7603C8BE1780772
57 | :101F400030F580E090E049E650E0FCDE88B31827E9
58 | :101F500018BB1DC05ADF1BC0D0906500E090630025
59 | :101F6000E294EE0CEE0C80ECE82200E010E0F12CA4
60 | :101F70000D1558F4F801EE59FF4F6781C8018E0D19
61 | :101F80009F1D3EDE0F5F1F4FF3CFC1982ADF1092D7
62 | :101F90006200ADCF0024552704C0080E591F880FDA
63 | :101FA000991F009729F076956795B8F37105B9F7F1
64 | :101FB000802D952F0895FB01DC0102C005900D9244
65 | :0C1FC00041505040D8F70895F894FFCF2E
66 | :0400000300001BC01E
67 | :00000001FF
68 |
--------------------------------------------------------------------------------
/build/Readme.txt:
--------------------------------------------------------------------------------
1 | How to flash example for AVR-Dragon:
2 | Flash the file:
3 | avrdude -v -pt85 -c dragon_isp -Pusb -b115200 -Uflash:w:AudioBootAttiny_AudioPB3_PB1.hex
4 |
5 | set the fuses with reset enabled:
6 | avrdude -v -pt85 -c dragon_isp -Pusb -b115200 -U efuse:w:0xfe:m -U hfuse:w:0xdd:m -U lfuse:w:0xe1:m
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/build/old/AudioBootAttiny85.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/AudioBootAttiny85.jar
--------------------------------------------------------------------------------
/build/old/AudioBootAttiny85_AudioPB3_LEDPB1.hex:
--------------------------------------------------------------------------------
1 | :02000000FFCD32
2 | :101C00000EC01DC01CC01BC01AC019C018C017C010
3 | :101C100016C015C014C013C012C011C010C01124CA
4 | :101C20001FBECFE5D2E0DEBFCDBF20E0A0E6B0E032
5 | :101C300001C01D92AB3AB207E1F7B1D1CFC1E0CFFD
6 | :101C4000CF93DF9300D000D0CDB7DEB71C821B82CC
7 | :101C50001C821B8226B3287030E086B3887090E027
8 | :101C600028173907D1F386B3282F287012BE60E0F9
9 | :101C700070E0822F90E046B3487050E084179507DB
10 | :101C8000D1F332B712BE86B3282F287068307105A1
11 | :101C900030F08B819C81830F911D9C838B836F5FC0
12 | :101CA0007F4F6031710529F78B819C8163E070E083
13 | :101CB0007BD135E0969587953A95E1F79A838983AC
14 | :101CC00082B749815A8190E084179507C8F3822F23
15 | :101CD00090E026B3287030E08217930799F426B37A
16 | :101CE000287030E082179307D1F386B3282F28702D
17 | :101CF00012BE82B749815A8190E084179507C8F3D4
18 | :101D000012BEE5CF86B3887048E352E070E068E029
19 | :101D100090E026B3287030E082179307D1F312BE0B
20 | :101D200026B3287082B7E981FA8190E08E179F0769
21 | :101D3000C8F386B38870E72FF0E0E05AFF4F908138
22 | :101D4000990F281391609083615011F47F5F68E0D0
23 | :101D500041505109E9F681E00F900F900F900F90DC
24 | :101D6000DF91CF910895EF92FF920F931F93CF933E
25 | :101D7000DF938B019C01F894DB0183E0F8018093F1
26 | :101D80005700E89507B600FCFDCFD091A700F09072
27 | :101D9000A80060E070E0C1E0FA01E0804E5F5F4FB4
28 | :101DA000CA010197FC01808190E0982F88278E0D51
29 | :101DB000911D011511052105310561F461157105AC
30 | :101DC00099F48F5F9F4B9093AA008093A9008FEFA7
31 | :101DD0009DEC0AC00F3611052105310529F46C333D
32 | :101DE000710511F48D2F9F2DFB01EA0FFB1F0C01D4
33 | :101DF000C0935700E895112407B600FCFDCFF2E030
34 | :101E00004F0E511C6E5F7F4F6034710509F0C4CFD7
35 | :101E100085E0F80180935700E89507B600FCFDCFF8
36 | :101E2000DF91CF911F910F91FF90EF90089517BA16
37 | :101E3000F89413BE80EC9BE1A9EAB0E022E030E028
38 | :101E400071E08E3F4BE1940751F42115310539F0D3
39 | :101E50004D915C91119722503109129603C0FC01FB
40 | :101E6000459154916FB7F894FC010A0170935700A3
41 | :101E7000E89511246FBF02968115FCE19F0709F7D1
42 | :101E8000E199FECF8FB7F894E0ECFBE193E09093FB
43 | :101E90005700E89507B600FCFDCFE0ECFBE195E0CC
44 | :101EA00090935700E89507B600FCFDCF91E1909321
45 | :101EB0005700E8958FBFE091A900F091AA0009941E
46 | :101EC00016B3187003E02AE0F22EC0E1D7E232E048
47 | :101ED000E32E82B7853600F112BE2197E9F488B36C
48 | :101EE0008E2588BBFA94F11015C0C19842E050E0ED
49 | :101EF0006EEF7BE189EA90E068D08091A900909133
50 | :101F0000AA00892B31F0F894E091A900F091AA0081
51 | :101F100009958DDFC0E1D7E286B3212F30E08870CC
52 | :101F200090E02817390719F016B318700150011105
53 | :101F3000D0CFC19A85DE81110DC092E082B785367F
54 | :101F4000E8F312BE2197D1F788B3892788BBC8EE82
55 | :101F5000D3E0F4CF10916000123021F01330E1F49F
56 | :101F600066DF1AC06091620070E0762F662780916C
57 | :101F70006100680F711D96E0660F771F9A95E1F773
58 | :101F800061158CE1780740F480E090E047E650E08E
59 | :101F9000EADE88B3182718BB10926000CBCFB99A3D
60 | :101FA000BB9882E083BF8CDF0024552704C0080E55
61 | :101FB000591F880F991F009729F076956795B8F3F8
62 | :101FC0007105B9F7802D952F0895FB01DC0102C042
63 | :101FD00005900D9241505040D8F70895F894FFCFE6
64 | :0400000300001C00DD
65 | :00000001FF
66 |
--------------------------------------------------------------------------------
/build/old/AudioBootAttiny85_AudioPB4_LedPB0_V3_1.hex:
--------------------------------------------------------------------------------
1 | :02000000FFCD32
2 | :101C00000EC01DC01CC01BC01AC019C018C017C010
3 | :101C100016C015C014C013C012C011C010C01124CA
4 | :101C20001FBECFE5D2E0DEBFCDBF20E0A0E6B0E032
5 | :101C300001C01D92AB3AB207E1F7B2D1D0C1E0CFFB
6 | :101C4000CF93DF9300D000D0CDB7DEB71C821B82CC
7 | :101C50001C821B8226B3207130E086B3807190E035
8 | :101C600028173907D1F386B3282F207112BE60E000
9 | :101C700070E0822F90E046B3407150E084179507E2
10 | :101C8000D1F332B712BE86B3282F207168307105A8
11 | :101C900030F08B819C81830F911D9C838B836F5FC0
12 | :101CA0007F4F6031710529F78B819C8163E070E083
13 | :101CB0007CD135E0969587953A95E1F79A838983AB
14 | :101CC00082B749815A8190E084179507C8F3822F23
15 | :101CD00090E026B3207130E08217930799F426B381
16 | :101CE000207130E082179307D1F386B3282F20713B
17 | :101CF00012BE82B749815A8190E084179507C8F3D4
18 | :101D000012BEE5CF86B3807148E352E070E068E030
19 | :101D100090E026B3207130E082179307D1F312BE12
20 | :101D200026B3207182B7E981FA8190E08E179F0770
21 | :101D3000C8F386B38071E72FF0E0E05AFF4F90813F
22 | :101D4000990F281391609083615011F47F5F68E0D0
23 | :101D500041505109E9F681E00F900F900F900F90DC
24 | :101D6000DF91CF910895EF92FF920F931F93CF933E
25 | :101D7000DF938B019C01F894DB0183E0F8018093F1
26 | :101D80005700E89507B600FCFDCFD091A700F09072
27 | :101D9000A80060E070E0C1E0FA01E0804E5F5F4FB4
28 | :101DA000CA010197FC01808190E0982F88278E0D51
29 | :101DB000911D011511052105310561F461157105AC
30 | :101DC00099F48F5F9F4B9093AA008093A9008FEFA7
31 | :101DD0009DEC0AC00F3611052105310529F46C333D
32 | :101DE000710511F48D2F9F2DFB01EA0FFB1F0C01D4
33 | :101DF000C0935700E895112407B600FCFDCFF2E030
34 | :101E00004F0E511C6E5F7F4F6034710509F0C4CFD7
35 | :101E100085E0F80180935700E89507B600FCFDCFF8
36 | :101E2000DF91CF911F910F91FF90EF90089517BA16
37 | :101E3000F89413BE80EC9BE1A9EAB0E022E030E028
38 | :101E400071E08E3F4BE1940751F42115310539F0D3
39 | :101E50004D915C91119722503109129603C0FC01FB
40 | :101E6000459154916FB7F894FC010A0170935700A3
41 | :101E7000E89511246FBF02968115FCE19F0709F7D1
42 | :101E8000E199FECF8FB7F894E0ECFBE193E09093FB
43 | :101E90005700E89507B600FCFDCFE0ECFBE195E0CC
44 | :101EA00090935700E89507B600FCFDCF91E1909321
45 | :101EB0005700E8958FBFE091A900F091AA0009941E
46 | :101EC00016B3107103E02AE0F22EC0E1D7E2EE244F
47 | :101ED000E39482B7853600F112BE2197E9F488B306
48 | :101EE0008E2588BBFA94F11015C0C09842E050E0EE
49 | :101EF0006EEF7BE189EA90E069D08091A900909132
50 | :101F0000AA00892B31F0F894E091A900F091AA0081
51 | :101F100009958DDFC0E1D7E286B3212F30E08071D3
52 | :101F200090E02817390719F016B31071015001110C
53 | :101F3000D0CFC09A11E084DE81110DC091E082B74C
54 | :101F40008536E8F312BE2197D1F788B3892788BB7D
55 | :101F5000C8EED3E0F4CF80916000823021F083306E
56 | :101F6000E1F465DF1AC06091620070E0762F6627A9
57 | :101F700080916100680F711D96E0660F771F9A953A
58 | :101F8000E1F761158CE1780740F480E090E047E6E6
59 | :101F900050E0E9DE88B3812788BB10926000CBCF88
60 | :101FA000B89ABC9882E083BF8BDF0024552704C019
61 | :101FB000080E591F880F991F009729F0769567958D
62 | :101FC000B8F37105B9F7802D952F0895FB01DC0159
63 | :101FD00002C005900D9241505040D8F70895F894F2
64 | :021FE000FFCF31
65 | :0400000300001C00DD
66 | :00000001FF
67 |
--------------------------------------------------------------------------------
/build/old/AudioBootAttiny85_AudioPB4_LedPB1_V3_1.hex:
--------------------------------------------------------------------------------
1 | :02000000FFCD32
2 | :101C00000EC01DC01CC01BC01AC019C018C017C010
3 | :101C100016C015C014C013C012C011C010C01124CA
4 | :101C20001FBECFE5D2E0DEBFCDBF20E0A0E6B0E032
5 | :101C300001C01D92AB3AB207E1F7AED1CCC1E0CF03
6 | :101C4000CF93DF9300D000D0CDB7DEB71C821B82CC
7 | :101C50001C821B8226B3207130E086B3807190E035
8 | :101C600028173907D1F386B3282F207112BE60E000
9 | :101C700070E0822F90E046B3407150E084179507E2
10 | :101C8000D1F332B712BE86B3282F207168307105A8
11 | :101C900030F08B819C81830F911D9C838B836F5FC0
12 | :101CA0007F4F6031710529F78B819C8163E070E083
13 | :101CB00078D135E0969587953A95E1F79A838983AF
14 | :101CC00082B749815A8190E084179507C8F3822F23
15 | :101CD00090E026B3207130E08217930799F426B381
16 | :101CE000207130E082179307D1F386B3282F20713B
17 | :101CF00012BE82B749815A8190E084179507C8F3D4
18 | :101D000012BEE5CF86B3807148E352E070E068E030
19 | :101D100090E026B3207130E082179307D1F312BE12
20 | :101D200026B3207182B7E981FA8190E08E179F0770
21 | :101D3000C8F386B38071E72FF0E0E05AFF4F90813F
22 | :101D4000990F281391609083615011F47F5F68E0D0
23 | :101D500041505109E9F681E00F900F900F900F90DC
24 | :101D6000DF91CF910895EF92FF920F931F93CF933E
25 | :101D7000DF938B019C01F894DB0183E0F8018093F1
26 | :101D80005700E89507B600FCFDCFD091A700F09072
27 | :101D9000A80060E070E0C1E0FA01E0804E5F5F4FB4
28 | :101DA000CA010197FC01808190E0982F88278E0D51
29 | :101DB000911D011511052105310561F461157105AC
30 | :101DC00099F48F5F9F4B9093AA008093A9008FEFA7
31 | :101DD0009DEC0AC00F3611052105310529F46C333D
32 | :101DE000710511F48D2F9F2DFB01EA0FFB1F0C01D4
33 | :101DF000C0935700E895112407B600FCFDCFF2E030
34 | :101E00004F0E511C6E5F7F4F6034710509F0C4CFD7
35 | :101E100085E0F80180935700E89507B600FCFDCFF8
36 | :101E2000DF91CF911F910F91FF90EF90089517BA16
37 | :101E3000F89413BE80EC9BE1A9EAB0E022E030E028
38 | :101E400071E08E3F4BE1940751F42115310539F0D3
39 | :101E50004D915C91119722503109129603C0FC01FB
40 | :101E6000459154916FB7F894FC010A0170935700A3
41 | :101E7000E89511246FBF02968115FCE19F0709F7D1
42 | :101E8000E199FECF8FB7F894E0ECFBE193E09093FB
43 | :101E90005700E89507B600FCFDCFE0ECFBE195E0CC
44 | :101EA00090935700E89507B600FCFDCF91E1909321
45 | :101EB0005700E8958FBFE091A900F091AA0009941E
46 | :101EC00016B3107103E02AE0F22EC0E1D7E232E04F
47 | :101ED000E32E82B7853600F112BE2197E9F488B36C
48 | :101EE0008E2588BBFA94F11015C0C19842E050E0ED
49 | :101EF0006EEF7BE189EA90E065D08091A900909136
50 | :101F0000AA00892B31F0F894E091A900F091AA0081
51 | :101F100009958DDFC0E1D7E286B3212F30E08071D3
52 | :101F200090E02817390719F016B31071015001110C
53 | :101F3000D0CFC19A85DE81110DC092E082B785367F
54 | :101F4000E8F312BE2197D1F788B3892788BBC8EE82
55 | :101F5000D3E0F4CF80916000823021F08330C9F467
56 | :101F600066DF17C06091620070E0762F662780916F
57 | :101F70006100680F711D96E0660F771F9A95E1F773
58 | :101F8000603C8BE1780728F480E090E047E650E081
59 | :101F9000EADE10926000CECFB99ABC9882E083BF8F
60 | :101FA0008FDF0024552704C0080E591F880F991F82
61 | :101FB000009729F076956795B8F37105B9F7802DEC
62 | :101FC000952F0895FB01DC0102C005900D92415050
63 | :0A1FD0005040D8F70895F894FFCFB1
64 | :0400000300001C00DD
65 | :00000001FF
66 |
--------------------------------------------------------------------------------
/build/old/BlinkFast_on_PB1_Attiny85.hex:
--------------------------------------------------------------------------------
1 | :1000000023C032C031C030C02FC0BFC02DC02CC0F3
2 | :100010002BC02AC029C028C027C026C025C0000088
3 | :100020000000370000000000380002020202020255
4 | :10003000020202020102040810202004100801023A
5 | :10004000000004000000000011241FBECFE5D2E034
6 | :10005000DEBFCDBF20E0A0E6B0E001C01D92A93612
7 | :10006000B207E1F7DCD01FC1CBCFEFE3F0E0249182
8 | :10007000E5E3F0E09491EBE2F0E0E491EE2349F166
9 | :10008000222399F0223071F028F4213071F42AB53E
10 | :100090002F770AC0233011F0243039F42CB52F7D8E
11 | :1000A0002CBD03C02AB52F7D2ABDF0E0EE0FFF1F47
12 | :1000B000EC5DFF4FA591B4912FB7F894811105C065
13 | :1000C0008C91E92FE095E82302C0EC91E92BEC93A9
14 | :1000D0002FBF08953FB7F894809165009091660016
15 | :1000E000A0916700B091680022B708B601FE05C074
16 | :1000F0002F3F19F00196A11DB11D3FBFBA2FA92FA7
17 | :10010000982F8827820F911DA11DB11DBC01CD0123
18 | :1001100043E0660F771F881F991F4A95D1F708950E
19 | :100120008F929F92AF92BF92CF92DF92EF92FF9207
20 | :10013000D1DF4B015C0184E6C82ED12CE12CF12CDF
21 | :10014000C9DFDC01CB0188199909AA09BB09883EDE
22 | :100150009340A105B10558F021E0C21AD108E10889
23 | :10016000F10888EE880E83E0981EA11CB11CC11412
24 | :10017000D104E104F10421F7FF90EF90DF90CF90DC
25 | :10018000BF90AF909F908F9008951F920F920FB6DF
26 | :100190000F9211242F933F938F939F93AF93BF930D
27 | :1001A0008091610090916200A0916300B091640021
28 | :1001B0003091600026E0230F2D3720F40296A11D18
29 | :1001C000B11D05C029E8230F0396A11DB11D209381
30 | :1001D00060008093610090936200A0936300B093ED
31 | :1001E00064008091650090916600A0916700B091D5
32 | :1001F00068000196A11DB11D809365009093660073
33 | :10020000A0936700B0936800BF91AF919F918F91C9
34 | :100210003F912F910F900FBE0F901F9018957894DB
35 | :100220008AB582608ABD8AB581608ABD83B78260E3
36 | :1002300083BF83B7816083BF89B7826089BF80B77E
37 | :10024000826080BF80B7816080BF329A319A3098D7
38 | :10025000379A8CB580648CBDE5E3F0E02491EBE245
39 | :10026000F0E08491882399F090E0880F991FFC01B9
40 | :10027000E25EFF4FA591B491FC01EC5DFF4F8591CB
41 | :1002800094918FB7F894EC91E22BEC938FBFC0E080
42 | :10029000D0E081E0EADE44DF80E0E7DE41DF209766
43 | :0A02A000C1F3AEDEF6CFF894FFCFF5
44 | :00000001FF
45 |
--------------------------------------------------------------------------------
/build/old/BlinkFlash_on_PB1_Attiny85.hex:
--------------------------------------------------------------------------------
1 | :1000000023C032C031C030C02FC0C2C02DC02CC0F0
2 | :100010002BC02AC029C028C027C026C025C0000088
3 | :100020000000370000000000380002020202020255
4 | :10003000020202020102040810202004100801023A
5 | :10004000000004000000000011241FBECFE5D2E034
6 | :10005000DEBFCDBF20E0A0E6B0E001C01D92A93612
7 | :10006000B207E1F7DFD02AC1CBCFEFE3F0E0249174
8 | :10007000E5E3F0E09491EBE2F0E0E491EE2349F166
9 | :10008000222399F0223071F028F4213071F42AB53E
10 | :100090002F770AC0233011F0243039F42CB52F7D8E
11 | :1000A0002CBD03C02AB52F7D2ABDF0E0EE0FFF1F47
12 | :1000B000EC5DFF4FA591B4912FB7F894811105C065
13 | :1000C0008C91E92FE095E82302C0EC91E92BEC93A9
14 | :1000D0002FBF08953FB7F894809165009091660016
15 | :1000E000A0916700B091680022B708B601FE05C074
16 | :1000F0002F3F19F00196A11DB11D3FBFBA2FA92FA7
17 | :10010000982F8827820F911DA11DB11DBC01CD0123
18 | :1001100043E0660F771F881F991F4A95D1F708950E
19 | :100120008F929F92AF92BF92CF92DF92EF92FF9207
20 | :100130006B017C01CFDF4B015C01C114D104E104F0
21 | :10014000F104E9F0C7DFDC01CB0188199909AA099C
22 | :10015000BB09883E9340A105B10578F321E0C21A9E
23 | :10016000D108E108F10888EE880E83E0981EA11CF2
24 | :10017000B11CC114D104E104F10421F7DECFFF90DA
25 | :10018000EF90DF90CF90BF90AF909F908F900895A9
26 | :100190001F920F920FB60F9211242F933F938F93BC
27 | :1001A0009F93AF93BF938091610090916200A09163
28 | :1001B0006300B09164003091600026E0230F2D377A
29 | :1001C00020F40296A11DB11D05C029E8230F039656
30 | :1001D000A11DB11D20936000809361009093620087
31 | :1001E000A0936300B09364008091650090916600D5
32 | :1001F000A0916700B09168000196A11DB11D809388
33 | :10020000650090936600A0936700B0936800BF916B
34 | :10021000AF919F918F913F912F910F900FBE0F90B3
35 | :100220001F90189578948AB582608ABD8AB58160DE
36 | :100230008ABD83B7826083BF83B7816083BF89B77C
37 | :10024000826089BF80B7826080BF80B7816080BFD5
38 | :10025000329A319A3098379A8CB580648CBDE5E338
39 | :10026000F0E02491EBE2F0E08491882399F090E0B3
40 | :10027000880F991FFC01E25EFF4FA591B491FC012C
41 | :10028000EC5DFF4F859194918FB7F894EC91E22B40
42 | :10029000EC938FBFC0E0D0E081E0E7DE64E670E081
43 | :1002A00080E090E03DDF80E0E0DE68EE73E080E03B
44 | :1002B00090E036DF209781F3A3DEEECFF894FFCFF6
45 | :00000001FF
46 |
--------------------------------------------------------------------------------
/build/old/Led_connected_to_BP1/BlinkFast_on_PB1_Attiny85.hex:
--------------------------------------------------------------------------------
1 | :1000000023C032C031C030C02FC0BFC02DC02CC0F3
2 | :100010002BC02AC029C028C027C026C025C0000088
3 | :100020000000370000000000380002020202020255
4 | :10003000020202020102040810202004100801023A
5 | :10004000000004000000000011241FBECFE5D2E034
6 | :10005000DEBFCDBF20E0A0E6B0E001C01D92A93612
7 | :10006000B207E1F7DCD01FC1CBCFEFE3F0E0249182
8 | :10007000E5E3F0E09491EBE2F0E0E491EE2349F166
9 | :10008000222399F0223071F028F4213071F42AB53E
10 | :100090002F770AC0233011F0243039F42CB52F7D8E
11 | :1000A0002CBD03C02AB52F7D2ABDF0E0EE0FFF1F47
12 | :1000B000EC5DFF4FA591B4912FB7F894811105C065
13 | :1000C0008C91E92FE095E82302C0EC91E92BEC93A9
14 | :1000D0002FBF08953FB7F894809165009091660016
15 | :1000E000A0916700B091680022B708B601FE05C074
16 | :1000F0002F3F19F00196A11DB11D3FBFBA2FA92FA7
17 | :10010000982F8827820F911DA11DB11DBC01CD0123
18 | :1001100043E0660F771F881F991F4A95D1F708950E
19 | :100120008F929F92AF92BF92CF92DF92EF92FF9207
20 | :10013000D1DF4B015C0184E6C82ED12CE12CF12CDF
21 | :10014000C9DFDC01CB0188199909AA09BB09883EDE
22 | :100150009340A105B10558F021E0C21AD108E10889
23 | :10016000F10888EE880E83E0981EA11CB11CC11412
24 | :10017000D104E104F10421F7FF90EF90DF90CF90DC
25 | :10018000BF90AF909F908F9008951F920F920FB6DF
26 | :100190000F9211242F933F938F939F93AF93BF930D
27 | :1001A0008091610090916200A0916300B091640021
28 | :1001B0003091600026E0230F2D3720F40296A11D18
29 | :1001C000B11D05C029E8230F0396A11DB11D209381
30 | :1001D00060008093610090936200A0936300B093ED
31 | :1001E00064008091650090916600A0916700B091D5
32 | :1001F00068000196A11DB11D809365009093660073
33 | :10020000A0936700B0936800BF91AF919F918F91C9
34 | :100210003F912F910F900FBE0F901F9018957894DB
35 | :100220008AB582608ABD8AB581608ABD83B78260E3
36 | :1002300083BF83B7816083BF89B7826089BF80B77E
37 | :10024000826080BF80B7816080BF329A319A3098D7
38 | :10025000379A8CB580648CBDE5E3F0E02491EBE245
39 | :10026000F0E08491882399F090E0880F991FFC01B9
40 | :10027000E25EFF4FA591B491FC01EC5DFF4F8591CB
41 | :1002800094918FB7F894EC91E22BEC938FBFC0E080
42 | :10029000D0E081E0EADE44DF80E0E7DE41DF209766
43 | :0A02A000C1F3AEDEF6CFF894FFCFF5
44 | :00000001FF
45 |
--------------------------------------------------------------------------------
/build/old/Led_connected_to_BP1/BlinkFast_on_PB1_Attiny85.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/Led_connected_to_BP1/BlinkFast_on_PB1_Attiny85.wav
--------------------------------------------------------------------------------
/build/old/Led_connected_to_BP1/BlinkFlash_on_PB1_Attiny85.hex:
--------------------------------------------------------------------------------
1 | :1000000023C032C031C030C02FC0C2C02DC02CC0F0
2 | :100010002BC02AC029C028C027C026C025C0000088
3 | :100020000000370000000000380002020202020255
4 | :10003000020202020102040810202004100801023A
5 | :10004000000004000000000011241FBECFE5D2E034
6 | :10005000DEBFCDBF20E0A0E6B0E001C01D92A93612
7 | :10006000B207E1F7DFD02AC1CBCFEFE3F0E0249174
8 | :10007000E5E3F0E09491EBE2F0E0E491EE2349F166
9 | :10008000222399F0223071F028F4213071F42AB53E
10 | :100090002F770AC0233011F0243039F42CB52F7D8E
11 | :1000A0002CBD03C02AB52F7D2ABDF0E0EE0FFF1F47
12 | :1000B000EC5DFF4FA591B4912FB7F894811105C065
13 | :1000C0008C91E92FE095E82302C0EC91E92BEC93A9
14 | :1000D0002FBF08953FB7F894809165009091660016
15 | :1000E000A0916700B091680022B708B601FE05C074
16 | :1000F0002F3F19F00196A11DB11D3FBFBA2FA92FA7
17 | :10010000982F8827820F911DA11DB11DBC01CD0123
18 | :1001100043E0660F771F881F991F4A95D1F708950E
19 | :100120008F929F92AF92BF92CF92DF92EF92FF9207
20 | :100130006B017C01CFDF4B015C01C114D104E104F0
21 | :10014000F104E9F0C7DFDC01CB0188199909AA099C
22 | :10015000BB09883E9340A105B10578F321E0C21A9E
23 | :10016000D108E108F10888EE880E83E0981EA11CF2
24 | :10017000B11CC114D104E104F10421F7DECFFF90DA
25 | :10018000EF90DF90CF90BF90AF909F908F900895A9
26 | :100190001F920F920FB60F9211242F933F938F93BC
27 | :1001A0009F93AF93BF938091610090916200A09163
28 | :1001B0006300B09164003091600026E0230F2D377A
29 | :1001C00020F40296A11DB11D05C029E8230F039656
30 | :1001D000A11DB11D20936000809361009093620087
31 | :1001E000A0936300B09364008091650090916600D5
32 | :1001F000A0916700B09168000196A11DB11D809388
33 | :10020000650090936600A0936700B0936800BF916B
34 | :10021000AF919F918F913F912F910F900FBE0F90B3
35 | :100220001F90189578948AB582608ABD8AB58160DE
36 | :100230008ABD83B7826083BF83B7816083BF89B77C
37 | :10024000826089BF80B7826080BF80B7816080BFD5
38 | :10025000329A319A3098379A8CB580648CBDE5E338
39 | :10026000F0E02491EBE2F0E08491882399F090E0B3
40 | :10027000880F991FFC01E25EFF4FA591B491FC012C
41 | :10028000EC5DFF4F859194918FB7F894EC91E22B40
42 | :10029000EC938FBFC0E0D0E081E0E7DE64E670E081
43 | :1002A00080E090E03DDF80E0E0DE68EE73E080E03B
44 | :1002B00090E036DF209781F3A3DEEECFF894FFCFF6
45 | :00000001FF
46 |
--------------------------------------------------------------------------------
/build/old/Led_connected_to_BP1/simpleNeoPixel_PB3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/Led_connected_to_BP1/simpleNeoPixel_PB3.wav
--------------------------------------------------------------------------------
/build/old/Led_connected_to_BP1/test.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/Led_connected_to_BP1/test.wav
--------------------------------------------------------------------------------
/build/old/PentatonicMelodyNeoPixel.ino.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/PentatonicMelodyNeoPixel.ino.wav
--------------------------------------------------------------------------------
/build/old/PentatonicMelodyNeoPixelPB1_SpeaderPB0_Attiny85.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/PentatonicMelodyNeoPixelPB1_SpeaderPB0_Attiny85.wav
--------------------------------------------------------------------------------
/build/old/neoPixelSequencer.ino.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/neoPixelSequencer.ino.wav
--------------------------------------------------------------------------------
/build/old/pentatonicMelody_AudioOutPB0_Attiny85.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/pentatonicMelody_AudioOutPB0_Attiny85.wav
--------------------------------------------------------------------------------
/build/old/simpleNeoPixel.ino.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/simpleNeoPixel.ino.wav
--------------------------------------------------------------------------------
/build/old/simpleNeoPixel_PB1.hex:
--------------------------------------------------------------------------------
1 | :1000000025C049C048C047C046C054C144C043C0D1
2 | :1000100042C041C040C03FC03EC03DC03CC00000E7
3 | :100020000000370000000000380002020202020255
4 | :10003000020202020102040810202004100801023A
5 | :1000400000000400000000009E02F50211241FBE03
6 | :10005000CFE5D2E0DEBFCDBF20E0A6E6B0E001C034
7 | :100060001D92A738B207E1F710E0A0E6B0E0E6EA9B
8 | :10007000F8E002C005900D92A636B107D9F710E05E
9 | :10008000C5E2D0E003C02197FE01CED2C432D10731
10 | :10009000D1F75AD1FCC3B4CF90E0FC01E25CFF4F32
11 | :1000A0002491FC01EC5CFF4F3491FC01E65DFF4FB5
12 | :1000B000E491EE2321F1222399F0223071F028F40B
13 | :1000C000213071F48AB58F770AC0233011F02430C3
14 | :1000D00039F48CB58F7D8CBD03C08AB58F7D8ABD08
15 | :1000E000F0E0EE0FFF1FEC5DFF4FA591B4918FB7CD
16 | :1000F000F8949C91E32FE095E923EC938FBF08954A
17 | :100100004F925F926F927F928F929F92AF92BF9227
18 | :10011000EF92FF920F931F93CF93DF93EC018A012D
19 | :100120009B01290166247724E42C812E922EA32E94
20 | :10013000BB24F82CA02F40917500442389F0A42FF4
21 | :10014000B0E0842D90E0BD015ED2E92E882D90E0D4
22 | :10015000BD0159D2F92E802F90E0BD0154D2A92FB4
23 | :1001600080917B0090917800E0917600F09177008B
24 | :10017000891307C0CE0163E070E045D2E80FF91F94
25 | :1001800017C0CC0FDD1FCC0FDD1FEC0FFD1F032FA1
26 | :10019000112722273327EF01C80FD11D442331F047
27 | :1001A000642F70E0802F90E02ED201C0902F9883B2
28 | :1001B00080917800EF01C80FD11DE882809179000D
29 | :1001C000EF01C80FD11DF88280917A00E80FF11D70
30 | :1001D000A083DF91CF911F910F91FF90EF90BF907F
31 | :1001E000AF909F908F907F906F905F904F90089509
32 | :1001F000CF93DF9390E0FC01EC5CFF4F2491FC0176
33 | :10020000E65DFF4F8491882361F190E0880F991F8C
34 | :10021000FC01E25EFF4FC591D491FC01EC5DFF4F04
35 | :10022000A591B491611109C09FB7F8948881209578
36 | :1002300082238883EC912E230BC0623061F49FB738
37 | :10024000F8943881822F809583238883EC912E2B1C
38 | :100250002C939FBF06C08FB7F894E8812E2B28837C
39 | :100260008FBFDF91CF9108953FB7F89480916B00D5
40 | :1002700090916C00A0916D00B0916E0022B708B60D
41 | :1002800001FE05C02F3F19F00196A11DB11D3FBF12
42 | :10029000BA2FA92F982F8827820F911DA11DB11D5C
43 | :1002A000BC01CD0142E0660F771F881F991F4A9558
44 | :1002B000D1F708951F920F920FB60F9211242F932A
45 | :1002C0003F938F939F93AF93BF93809167009091DB
46 | :1002D0006800A0916900B0916A003091660023E047
47 | :1002E000230F2D3720F40196A11DB11D05C026E86E
48 | :1002F000230F0296A11DB11D209366008093670015
49 | :1003000090936800A0936900B0936A0080916B009D
50 | :1003100090916C00A0916D00B0916E000196A11DAE
51 | :10032000B11D80936B0090936C00A0936D00B0930F
52 | :100330006E00BF91AF919F918F913F912F910F9040
53 | :100340000FBE0F901F901895CF93DF93CDB7DEB7F8
54 | :1003500027970FB6F894DEBF0FBECDBF78948AB54D
55 | :1003600082608ABD8AB581608ABD83B7826083BF9F
56 | :1003700083B7816083BF89B7826089BF80B782609D
57 | :1003800080BF80B7816080BF329A319A309A379AA5
58 | :100390008CB580648CBD20E030E080E80FB6F89426
59 | :1003A00086BD26BD0FBE8091740087FD05C061E04B
60 | :1003B0001FDF8091740070DE81E080936F0090E019
61 | :1003C000E92E90E0F92E28E0D22E00E010E0809196
62 | :1003D0007000909171000817190730F440E05FE059
63 | :1003E00060E070E0C8018CDE80917600909177002B
64 | :1003F000892B09F467C038DF80907C0090907D00E5
65 | :10040000A0907E00B0907F00DC01CB018819990993
66 | :10041000AA09BB09C297A105B10568F3F8948091B8
67 | :100420007200909173009A838983E0917600F09135
68 | :1004300077009F012F5F3F4F80818F83E091800085
69 | :10044000F0918100908180918200982B9E83908111
70 | :10045000809589238D838D818C83DB825E816D8184
71 | :100460004F818B819C81A981BA81782F792E4D0192
72 | :10047000DF01C401F9015C9347FD752E7A957C92EA
73 | :10048000762E39F0441F00C000006C93000000C0BD
74 | :10049000F2CF78E041916C930000019761F7B0933F
75 | :1004A0008100A09380004F837B837C829A83898321
76 | :1004B0007894DADE60937C0070937D0080937E00F8
77 | :1004C00090937F00D1DE2B013C0184E6882E912C95
78 | :1004D000A12CB12CC9DEDC01CB0184199509A60938
79 | :1004E000B709883E9340A105B10558F091E0891AFB
80 | :1004F0009108A108B108A8EE4A0EA3E05A1E611C9B
81 | :10050000711C81149104A104B10421F78091700041
82 | :10051000909171000817190728F440E050E0BA01E3
83 | :10052000C801EEDD0F5F1F4F0C30110509F04FCFF2
84 | :10053000E114F10409F449CF63DD47CF10926F0055
85 | :100540001092750010927C0010927D0010927E0037
86 | :1005500010927F0081E080937B008093780010925E
87 | :10056000790082E080937A0084E290E090937300B7
88 | :10057000809372005FD0909377008093760000970D
89 | :1005800061F024E2FC0111922A95E9F78CE090E0F9
90 | :10059000909371008093700008C0109273001092C5
91 | :1005A0007200109271001092700081E080937400CC
92 | :1005B00080916F00882329F061E081E019DE81E0FD
93 | :1005C0006BDDEBE2F0E0E491F0E0EE0FFF1FEC5D9D
94 | :1005D000FF4F859194919093810080938000E5E393
95 | :1005E000F0E0E491E093820008958091760090918C
96 | :1005F0007700009709F0B3D08091740087FD02C0A6
97 | :1006000060E0F6CD08950024552704C0080E591F58
98 | :10061000880F991F009729F076956795B8F37105B3
99 | :10062000B9F7802D952F0895EE0FFF1F0590F491D7
100 | :10063000E02D0994CF93DF938230910510F482E08E
101 | :1006400090E0E0918500F091860020E030E0C0E08D
102 | :10065000D0E0309711F14081518148175907C0F01F
103 | :100660004817590761F482819381209719F09B8381
104 | :100670008A832BC0909386008093850026C0211525
105 | :10068000310519F04217530718F49A01BE01DF0132
106 | :10069000EF010280F381E02DDCCF2115310509F156
107 | :1006A000281B390B2430310590F412968D919C91C2
108 | :1006B00013976115710521F0FB019383828304C0B8
109 | :1006C0009093860080938500FD01329644C0FD0121
110 | :1006D000E20FF31F81939193225031092D933C93A4
111 | :1006E0003AC02091830030918400232B41F4209163
112 | :1006F0006200309163003093840020938300209146
113 | :100700006000309161002115310541F42DB73EB7ED
114 | :100710004091640050916500241B350BE0918300EB
115 | :10072000F0918400E217F307A0F42E1B3F0B28176B
116 | :10073000390778F0AC014E5F5F4F2417350748F05A
117 | :100740004E0F5F1F509384004093830081939193D9
118 | :1007500002C0E0E0F0E0CF01DF91CF9108950F9368
119 | :100760001F93CF93DF93009709F48CC0FC0132975D
120 | :1007700013821282009185001091860001151105E7
121 | :1007800081F420813181820F931F20918300309169
122 | :1007900084002817390779F5F0938400E0938300EB
123 | :1007A00071C0D80140E050E0AE17BF0750F4129678
124 | :1007B0002D913C911397AD012115310509F1D90116
125 | :1007C000F3CF9D01DA013383228360817181860F2B
126 | :1007D000971F8217930769F4EC0128813981260F4E
127 | :1007E000371F2E5F3F4F318320838A819B81938304
128 | :1007F0008283452B29F4F0938600E093850042C064
129 | :100800001396FC93EE931297ED01499159919E0135
130 | :10081000240F351FE217F30771F480819181840F53
131 | :10082000951F029611969C938E93828193811396C5
132 | :100830009C938E931297E0E0F0E0D80112968D9190
133 | :100840009C911397009719F0F8018C01F6CF8D91C8
134 | :100850009C9198012E5F3F4F820F931F2091830040
135 | :10086000309184002817390769F4309729F41092E1
136 | :1008700086001092850002C01382128210938400B9
137 | :1008800000938300DF91CF911F910F91089510E0A5
138 | :10089000C5E2D0E003C0FE01C7DE2196C632D10713
139 | :0608A000D1F7F894FFCF30
140 | :0608A60000008700800045
141 | :00000001FF
142 |
--------------------------------------------------------------------------------
/build/old/simpleNeoPixel_PB1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/old/simpleNeoPixel_PB1.wav
--------------------------------------------------------------------------------
/build/test.hex:
--------------------------------------------------------------------------------
1 | :1000000023C032C031C030C02FC0C2C02DC02CC0F0
2 | :100010002BC02AC029C028C027C026C025C0000088
3 | :100020000000370000000000380002020202020255
4 | :10003000020202020102040810202004100801023A
5 | :10004000000004000000000011241FBECFE5D2E034
6 | :10005000DEBFCDBF20E0A0E6B0E001C01D92A93612
7 | :10006000B207E1F7DFD02AC1CBCFEEE3F0E0249175
8 | :10007000E4E3F0E09491EAE2F0E0E491EE2349F168
9 | :10008000222399F0223071F028F4213071F42AB53E
10 | :100090002F770AC0233011F0243039F42CB52F7D8E
11 | :1000A0002CBD03C02AB52F7D2ABDF0E0EE0FFF1F47
12 | :1000B000EC5DFF4FA591B4912FB7F894811105C065
13 | :1000C0008C91E92FE095E82302C0EC91E92BEC93A9
14 | :1000D0002FBF08953FB7F894809165009091660016
15 | :1000E000A0916700B091680022B708B601FE05C074
16 | :1000F0002F3F19F00196A11DB11D3FBFBA2FA92FA7
17 | :10010000982F8827820F911DA11DB11DBC01CD0123
18 | :1001100042E0660F771F881F991F4A95D1F708950F
19 | :100120008F929F92AF92BF92CF92DF92EF92FF9207
20 | :100130006B017C01CFDF4B015C01C114D104E104F0
21 | :10014000F104E9F0C7DFDC01CB0188199909AA099C
22 | :10015000BB09883E9340A105B10578F321E0C21A9E
23 | :10016000D108E108F10888EE880E83E0981EA11CF2
24 | :10017000B11CC114D104E104F10421F7DECFFF90DA
25 | :10018000EF90DF90CF90BF90AF909F908F900895A9
26 | :100190001F920F920FB60F9211242F933F938F93BC
27 | :1001A0009F93AF93BF938091610090916200A09163
28 | :1001B0006300B09164003091600023E0230F2D377D
29 | :1001C00020F40196A11DB11D05C026E8230F02965B
30 | :1001D000A11DB11D20936000809361009093620087
31 | :1001E000A0936300B09364008091650090916600D5
32 | :1001F000A0916700B09168000196A11DB11D809388
33 | :10020000650090936600A0936700B0936800BF916B
34 | :10021000AF919F918F913F912F910F900FBE0F90B3
35 | :100220001F90189578948AB582608ABD8AB58160DE
36 | :100230008ABD83B7826083BF83B7816083BF89B77C
37 | :10024000826089BF80B7826080BF80B7816080BFD5
38 | :10025000329A319A309A379A8CB580648CBDE4E337
39 | :10026000F0E02491EAE2F0E08491882399F090E0B4
40 | :10027000880F991FFC01E25EFF4FA591B491FC012C
41 | :10028000EC5DFF4F859194918FB7F894EC91E22B40
42 | :10029000EC938FBFC0E0D0E081E0E7DE64E670E081
43 | :1002A00080E090E03DDF80E0E0DE60ED77E080E040
44 | :1002B00090E036DF209781F3A3DEEECFF894FFCFF6
45 | :00000001FF
46 |
--------------------------------------------------------------------------------
/build/test.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/build/test.wav
--------------------------------------------------------------------------------
/core/HardwareSerial.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/HardwareSerial.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/HardwareSerial.cpp \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WCharacter.h \
7 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.h \
8 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/HardwareSerial.h \
9 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSerial.h \
10 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Stream.h \
11 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Print.h \
12 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h
13 |
--------------------------------------------------------------------------------
/core/HardwareSerial.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/HardwareSerial.cpp.o
--------------------------------------------------------------------------------
/core/Print.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/Print.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Print.cpp \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WCharacter.h \
7 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.h \
8 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/HardwareSerial.h \
9 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSerial.h \
10 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Stream.h \
11 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Print.h
12 |
--------------------------------------------------------------------------------
/core/Print.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/Print.cpp.o
--------------------------------------------------------------------------------
/core/TinySoftwareSPI.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/TinySoftwareSPI.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSPI.cpp \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSPI.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h \
7 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WCharacter.h \
8 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.h \
9 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/HardwareSerial.h \
10 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSerial.h \
11 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Stream.h \
12 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Print.h \
13 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h
14 |
--------------------------------------------------------------------------------
/core/TinySoftwareSPI.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/TinySoftwareSPI.cpp.o
--------------------------------------------------------------------------------
/core/TinySoftwareSerial.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/TinySoftwareSerial.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSerial.cpp \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WCharacter.h \
7 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.h \
8 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/HardwareSerial.h \
9 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSerial.h \
10 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Stream.h \
11 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Print.h \
12 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h
13 |
--------------------------------------------------------------------------------
/core/TinySoftwareSerial.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/TinySoftwareSerial.cpp.o
--------------------------------------------------------------------------------
/core/Tone.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/Tone.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Tone.cpp \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WCharacter.h \
7 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.h \
8 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/HardwareSerial.h \
9 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/TinySoftwareSerial.h \
10 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Stream.h \
11 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Print.h \
12 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h
13 |
--------------------------------------------------------------------------------
/core/Tone.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/Tone.cpp.o
--------------------------------------------------------------------------------
/core/WInterrupts.c.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/WInterrupts.c.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WInterrupts.c \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h
7 |
--------------------------------------------------------------------------------
/core/WInterrupts.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/WInterrupts.c.o
--------------------------------------------------------------------------------
/core/WMath.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/WMath.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WMath.cpp
3 |
--------------------------------------------------------------------------------
/core/WMath.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/WMath.cpp.o
--------------------------------------------------------------------------------
/core/WString.cpp.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/WString.cpp.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.cpp \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/WString.h
4 |
--------------------------------------------------------------------------------
/core/WString.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/WString.cpp.o
--------------------------------------------------------------------------------
/core/core.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/core.a
--------------------------------------------------------------------------------
/core/wiring.c.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/wiring.c.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring.c \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h
7 |
--------------------------------------------------------------------------------
/core/wiring.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/wiring.c.o
--------------------------------------------------------------------------------
/core/wiring_analog.c.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/wiring_analog.c.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_analog.c \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h
7 |
--------------------------------------------------------------------------------
/core/wiring_analog.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/wiring_analog.c.o
--------------------------------------------------------------------------------
/core/wiring_digital.c.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/wiring_digital.c.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_digital.c \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h
7 |
--------------------------------------------------------------------------------
/core/wiring_digital.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/wiring_digital.c.o
--------------------------------------------------------------------------------
/core/wiring_pulse.c.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/wiring_pulse.c.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_pulse.c \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h
7 |
--------------------------------------------------------------------------------
/core/wiring_pulse.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/wiring_pulse.c.o
--------------------------------------------------------------------------------
/core/wiring_shift.c.d:
--------------------------------------------------------------------------------
1 | /var/folders/x6/17svhgds0x7889jbwj0rb4y80000gp/T/arduino_build_426281/core/wiring_shift.c.o: \
2 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_shift.c \
3 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/wiring_private.h \
4 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/Arduino.h \
5 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/cores/tiny/binary.h \
6 | /Users/xcorex/Library/Arduino15/packages/ATTinyCore/hardware/avr/1.0.6/variants/tinyX5/pins_arduino.h
7 |
--------------------------------------------------------------------------------
/core/wiring_shift.c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/core/wiring_shift.c.o
--------------------------------------------------------------------------------
/doc/8BitMixTapeNeolit.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/8BitMixTapeNeolit.jpg
--------------------------------------------------------------------------------
/doc/8BitMixedTapeNeoprenEdition.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/8BitMixedTapeNeoprenEdition.jpg
--------------------------------------------------------------------------------
/doc/AudioBootLoader.odp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/AudioBootLoader.odp
--------------------------------------------------------------------------------
/doc/AudioBootLoaderFlyer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/AudioBootLoaderFlyer.png
--------------------------------------------------------------------------------
/doc/AudioBootLoaderMinimumBreadBoard.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/AudioBootLoaderMinimumBreadBoard.PNG
--------------------------------------------------------------------------------
/doc/AudioBootloader.fzz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/AudioBootloader.fzz
--------------------------------------------------------------------------------
/doc/FritzingNeoCycloSynth.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/FritzingNeoCycloSynth.PNG
--------------------------------------------------------------------------------
/doc/NeoCycloSynth.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/NeoCycloSynth.PNG
--------------------------------------------------------------------------------
/doc/audioInputSchematic.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/doc/audioInputSchematic.PNG
--------------------------------------------------------------------------------
/java_source/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Main-Class: controllPanel/Main_WavBootLoader
3 |
--------------------------------------------------------------------------------
/java_source/controllPanel/Main_WavBootLoader$inputHexFile_ButtonListener$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/controllPanel/Main_WavBootLoader$inputHexFile_ButtonListener$1.class
--------------------------------------------------------------------------------
/java_source/controllPanel/Main_WavBootLoader$inputHexFile_ButtonListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/controllPanel/Main_WavBootLoader$inputHexFile_ButtonListener.class
--------------------------------------------------------------------------------
/java_source/controllPanel/Main_WavBootLoader$writeWav_ButtonListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/controllPanel/Main_WavBootLoader$writeWav_ButtonListener.class
--------------------------------------------------------------------------------
/java_source/controllPanel/Main_WavBootLoader.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/controllPanel/Main_WavBootLoader.class
--------------------------------------------------------------------------------
/java_source/controllPanel/Main_WavBootLoader.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/controllPanel/Main_WavBootLoader.java
--------------------------------------------------------------------------------
/java_source/controllPanel/Model_ProgrammParameters.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/controllPanel/Model_ProgrammParameters.class
--------------------------------------------------------------------------------
/java_source/controllPanel/Model_ProgrammParameters.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | wave generator for audio bootloader
4 |
5 | standard setup
6 |
7 | (c) -C-H-R-I-S-T-O-P-H- -H-A-B-E-R-E-R- 2011
8 |
9 | This program is free software; you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation; either version 2 of the License, or
12 | (at your option) any later version.
13 | */
14 | package controllPanel;
15 |
16 | import java.io.File;
17 |
18 | public class Model_ProgrammParameters
19 | {
20 | private File inputHexFile;
21 | private File outputWavFile;
22 | private int data[];
23 |
24 | public Model_ProgrammParameters()
25 | {
26 | inputHexFile=new File("test.hex");
27 | outputWavFile=new File("test.wav");
28 |
29 | data=new int[200];
30 | // test
31 | for(int n=0;n<200;n++)data[n]=n;
32 | }
33 |
34 | public void setOutputWavFile(File outputWavFile) {
35 | this.outputWavFile = outputWavFile;
36 | }
37 |
38 | public File getOutputWavFile() {
39 | return outputWavFile;
40 | }
41 |
42 | public void setInputHexFile(File inputHexFile) {
43 | this.inputHexFile = inputHexFile;
44 | }
45 |
46 | public File getInputHexFile() {
47 | return inputHexFile;
48 | }
49 |
50 | public void setData(int data[]) {
51 | this.data = data;
52 | }
53 |
54 | public int[] getData() {
55 | return data;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/java_source/hexTools/IntelHexFormat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/hexTools/IntelHexFormat.class
--------------------------------------------------------------------------------
/java_source/hexTools/IntelHexFormat.java:
--------------------------------------------------------------------------------
1 | package hexTools;
2 |
3 | /*
4 | * Created on Apr 29, 2005
5 | *
6 | * Copyright (c) 2005 by ETH Zurich
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * 1. Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | * 2. Redistributions in binary form must reproduce the above copyright
15 | * notice, this list of conditions and the following disclaimer in the
16 | * documentation and/or other materials provided with the distribution.
17 | * 3. Neither the name of the copyright holders nor the names of
18 | * contributors may be used to endorse or promote products derived
19 | * from this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY ETH ZURICH AND CONTRIBUTORS
22 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ETH ZURICH
25 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
31 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 | * SUCH DAMAGE.
33 | *
34 | */
35 |
36 | import java.io.BufferedReader;
37 | import java.io.ByteArrayOutputStream;
38 | import java.io.File;
39 | import java.io.FileNotFoundException;
40 | import java.io.FileReader;
41 | import java.io.IOException;
42 | import java.math.BigInteger;
43 |
44 | /**
45 | * Class for handling Intel Hex Format Files.
46 | * Supports building of greater blocks.
47 | *
48 | * @author Mustafa Yuecel
49 | */
50 | public class IntelHexFormat
51 | {
52 | /** enable debugMode */
53 | private final static boolean debugMode = true;
54 |
55 | /** default maximum length of a block */
56 | private final static int maxblocklen = Integer.MAX_VALUE;
57 |
58 | //--- Methods (public)
59 |
60 | /**
61 | * Convert IntelHex file to a formatted byte array
62 | *
63 | * @param fp a File
instance
64 | * @return formatted byte array (ch? 0 length_high length_low 0 startaddress_high startaddress_low )
65 | * @throws Exception
66 | */
67 | public static byte[] IntelHexFormatToByteArray(File fp) throws Exception
68 | {
69 | return IntelHexFormatToByteArray(fp, maxblocklen);
70 | }
71 | public static int toUnsignedInt(byte value)
72 | {
73 | return (value & 0x7F) + (value < 0 ? 128 : 0);
74 | }
75 | public static int[] toUnsignedIntArray(byte value[])
76 | {
77 | int[] erg=new int[value.length];
78 |
79 | for(int n=0;n10000) laenge=10000;
96 | int spalten=16;
97 | int anfang=6;
98 |
99 | String s="";
100 |
101 | z=0;
102 | for(n=0;n< laenge;n++)
103 | {
104 |
105 | if(z==spalten)
106 | {
107 | if(debugMode)System.out.printf(" %s",s);
108 | s="";
109 | if(debugMode)System.out.println();
110 | z=0;
111 | }
112 | if(z==0)
113 | {
114 |
115 | if(debugMode)System.out.printf("%04x: ",n);
116 | }
117 | if(debugMode)System.out.printf("%02x ",daten[anfang+n]);
118 | Character c=(char) daten[anfang+n];
119 |
120 | if((c>32)&&(c<255)) s=s+c;
121 | else s=s+".";
122 | z++;
123 | }
124 |
125 | }
126 | /**
127 | * Convert IntelHex file to a formatted byte array
128 | *
129 | * @param fp a File
instance
130 | * @param maxblocklen maximum length of a block
131 | * @return formatted byte array
132 | * @throws Exception
133 | */
134 | public static byte[] IntelHexFormatToByteArray(File fp, int maxblocklen)
135 | throws Exception
136 | {
137 | if (debugMode)
138 | System.out.println("Parse the Intel Hex File...");
139 |
140 | // reserve enough space
141 | ByteArrayOutputStream baos = new ByteArrayOutputStream();
142 | ByteArrayOutputStream datablock = new ByteArrayOutputStream();
143 |
144 | BufferedReader in = new BufferedReader(new FileReader(fp));
145 |
146 | String stringline = null;
147 | byte[] byteline;
148 | int data_length;
149 | int data_address;
150 | int block_length = 0;
151 | int block_address = -1;
152 | int block_address_offset = 0;
153 |
154 | for (;;)
155 | {
156 | stringline = in.readLine();
157 |
158 | // EOF reached
159 | if ( stringline == null )
160 | throw new Exception("No End Of File record in file");
161 |
162 | // start code exists?
163 | if ( stringline.length() == 0 || stringline.charAt(0) != ':' )
164 | continue;
165 |
166 | // is Data record?
167 | if ( !stringline.substring(7,9).equals("00") )
168 | {
169 | if ( stringline.substring(7,9).equals("01") )
170 | {
171 | // End Of File record
172 |
173 | // write datablock if necessary
174 | if ( block_length > 0)
175 | {
176 | // write header and datablock into baos
177 | writeHeader(baos, block_length, block_address);
178 | // write datablock into baos
179 | datablock.writeTo(baos);
180 | }
181 |
182 | break;
183 | }
184 | else if ( stringline.substring(7,9).equals("02") )
185 | {
186 | // Extended Segment Address Records (HEX86)
187 |
188 | int len = new BigInteger(stringline.substring(1,3),16
189 | ).intValue();
190 | block_address_offset =
191 | new BigInteger(stringline.substring(9,9+2*len),16
192 | ).intValue();
193 | block_address_offset *= 16; // byte_shift
194 | if (debugMode)
195 | System.out.println("Extend address record. Offset: 0x"
196 | + Integer.toHexString(block_address_offset
197 | ).toUpperCase());
198 |
199 | continue;
200 | }
201 | else
202 | // jump to the next line
203 | continue;
204 | }
205 |
206 | // convert hex-string w/o start code to byte array
207 | byteline = new BigInteger(stringline.substring(1),16
208 | ).toByteArray();
209 |
210 | // checksum is correct?
211 | checkSum(byteline);
212 |
213 | data_length = new BigInteger(stringline.substring(1,3),16
214 | ).intValue();
215 | data_address = new BigInteger(stringline.substring(3,7),16
216 | ).intValue();
217 |
218 | if ( ( block_address + block_length != data_address +
219 | block_address_offset )
220 | || ( block_length+data_length > maxblocklen ) )
221 | {
222 | // write last block header?
223 | if (block_address != -1)
224 | {
225 | // write header into baos
226 | writeHeader(baos, block_length, block_address);
227 | // write datablock into baos
228 | datablock.writeTo(baos);
229 | }
230 |
231 | datablock.reset();
232 | block_length = 0;
233 | block_address = data_address + block_address_offset;
234 | }
235 |
236 | // write data
237 | datablock.write(byteline,4,data_length);
238 | // update length
239 | block_length += data_length;
240 | }
241 |
242 | return baos.toByteArray();
243 | }
244 | public static byte[] discardHeaderBytes(byte[] data)
245 | {
246 | int headerOffset=6;
247 | byte[] newData= new byte[data.length-headerOffset];
248 | for(int n=0;n bytelen )
275 | {
276 | // cut array
277 | baos.write(b,b.length-bytelen,bytelen);
278 | }
279 | else
280 | {
281 | // fill up with '\0'
282 | for (int i=0;iFile instance
294 | * @return true, if file is in IntelHex format
295 | */
296 | public static boolean isIntelHexFormat(File fp)
297 | {
298 | BufferedReader in;
299 | String stringline;
300 | byte[] byteline;
301 |
302 | try
303 | {
304 | in = new BufferedReader(new FileReader(fp));
305 | }
306 | catch (FileNotFoundException e)
307 | {
308 | return false;
309 | }
310 |
311 | for (;;)
312 | {
313 | try
314 | {
315 | stringline = in.readLine();
316 | }
317 | catch (IOException e)
318 | {
319 | return false;
320 | }
321 |
322 | // EOF reached
323 | if ( stringline == null )
324 | return false;
325 | // start code exists?
326 | if ( stringline.length() == 0 || stringline.charAt(0) != ':' )
327 | continue;
328 | // convert hex-string w/o start code to byte array
329 | byteline = new BigInteger(stringline.substring(1),16
330 | ).toByteArray();
331 |
332 | try
333 | {
334 | // checksum is correct?
335 | checkSum(byteline);
336 | }
337 | catch (Exception e)
338 | {
339 | return false;
340 | }
341 |
342 | if ( stringline.substring(7,9).equals("01") )
343 | break;
344 |
345 | }
346 |
347 | return true;
348 | }
349 |
350 | //--- Methods (private)
351 |
352 | /**
353 | * Calculate checksum (modulo 256)
354 | *
355 | * @param b byte array
356 | * @throws Exception
357 | */
358 | private static void checkSum(byte[] b) throws Exception
359 | {
360 | int checksum = 0;
361 |
362 | for (int i=0;ibaos
374 | *
375 | * @param baos write header into ByteArrayOutputStream
376 | * @param length length information to write into header
377 | * @param address address information to write into header
378 | * @throws Exception
379 | */
380 | private static void writeHeader(ByteArrayOutputStream baos, int length,
381 | int address) throws Exception
382 | {
383 | // write header and datablock into baos
384 | if (debugMode)
385 | System.out.println("Write Header: Length: " + length +
386 | " (0x" + Integer.toHexString(length).toUpperCase() +
387 | ") Address: 0x" +
388 | Integer.toHexString(address).toUpperCase());
389 |
390 | // write length
391 | baos.write(IntToFixedByteArray(length,3));
392 | // write address
393 | baos.write(IntToFixedByteArray(address,3));
394 | }
395 | public static void main(String[] args) {
396 |
397 | try {
398 |
399 | File f = new File("C:\\Dokumente und Einstellungen\\chris\\Eigene Dateien\\Entwicklung\\java\\EclipseWorkspace2\\wavBootLoader\\test.hex");
400 | //File f = new File("C:\\Dokumente und Einstellungen\\chris\\Desktop\\AnalyserAsuroBoot\\small.hex");
401 |
402 | byte[] erg = IntelHexFormatToByteArray(f);
403 | if(debugMode)System.out.println(erg);
404 | /*
405 | int ende=erg.length;
406 |
407 | for(int n=0;n>8)&0xFF;
67 |
68 | data[3]=totalLength&0xFF;
69 | data[4]=(totalLength>>8)&0xFF;
70 |
71 | data[5]=crc&0xFF;
72 | data[6]=(crc>>8)&0xFF;
73 | return data;
74 | }
75 |
76 | public void setFrameSize(int frameSize) {
77 | this.frameSize = frameSize;
78 | }
79 |
80 | public int getFrameSize() {
81 | return frameSize;
82 | }
83 |
84 | public void setCommand(int command) {
85 | this.command = command;
86 | }
87 |
88 | public int getCommand() {
89 | return command;
90 | }
91 |
92 | public void setPageIndex(int pageIndex) {
93 | this.pageIndex = pageIndex;
94 | }
95 |
96 | public int getPageIndex() {
97 | return pageIndex;
98 | }
99 |
100 | public void setTotalLength(int totalLength) {
101 | this.totalLength = totalLength;
102 | }
103 |
104 | public int getTotalLength() {
105 | return totalLength;
106 | }
107 |
108 | public void setCrc(int crc) {
109 | this.crc = crc;
110 | }
111 |
112 | public int getCrc() {
113 | return crc;
114 | }
115 |
116 | public void setPageStart(int pageStart) {
117 | this.pageStart = pageStart;
118 | }
119 |
120 | public int getPageStart() {
121 | return pageStart;
122 | }
123 |
124 | public void setPageSize(int pageSize) {
125 | this.pageSize = pageSize;
126 | }
127 |
128 | public int getPageSize() {
129 | return pageSize;
130 | }
131 |
132 | public void setSilenceBetweenPages(double silenceBetweenPages) {
133 | this.silenceBetweenPages = silenceBetweenPages;
134 | }
135 |
136 | public double getSilenceBetweenPages() {
137 | return silenceBetweenPages;
138 | }
139 | }
140 |
--------------------------------------------------------------------------------
/java_source/wavCreator/HexToSignal.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/wavCreator/HexToSignal.class
--------------------------------------------------------------------------------
/java_source/wavCreator/HexToSignal.java:
--------------------------------------------------------------------------------
1 |
2 | package wavCreator;
3 |
4 | public class HexToSignal
5 | {
6 | private int startSequencePulses = 40;
7 | private int numStartBits = 1;
8 | private int numStopBits = 1;
9 | private double manchesterPhase = 1; // current phase for differential manchester coding
10 |
11 | private boolean invertSignal = true; // correction of an inverted audio signal line
12 | // only used in non differential code
13 |
14 | private int lowNumberOfPulses = 2; // not for manchester coding, only for flankensignal
15 | private int highNumberOfPulses = 3; // not for manchester coding, only for flankensignal
16 |
17 | private int manchesterNumberOfSamplesPerBit = 4; // this value must be even
18 | private boolean useDifferentialManchsterCode = true;
19 |
20 | public void setSignalSpeed(boolean fullSpeedFlag)
21 | {
22 | if( fullSpeedFlag ) manchesterNumberOfSamplesPerBit = 4; // full speed
23 | else manchesterNumberOfSamplesPerBit = 8; // half speed
24 | }
25 |
26 | public HexToSignal(boolean fullSpeedFlag)
27 | {
28 | setSignalSpeed(fullSpeedFlag);
29 | }
30 | /* flag=true: rising edge
31 | * flag=false: falling edge
32 | */
33 | private double[] manchesterEdge(boolean flag, int pointerIntoSignal, double signal[] )
34 | {
35 | double sigpart[]=new double[manchesterNumberOfSamplesPerBit];
36 | int n;
37 | double value;
38 |
39 | if( !useDifferentialManchsterCode ) // non differential manchester code
40 | {
41 | if(flag) value=1;
42 | else value=-1;
43 | if(invertSignal)value=value*-1; // correction of an inverted audio signal line
44 | for(n=0;n0)
103 | {
104 | frameSetup.setPageIndex(pagePointer++);
105 | frameSetup.setTotalLength(data.length);
106 |
107 | int[] partSig=new int[pl];
108 |
109 | for(int n=0;ndata.length-1) partSig[n]=0xFF;
112 | else partSig[n]=data[n+sigPointer];
113 |
114 | }
115 |
116 | sigPointer+=pl;
117 | double[] sig=generatePageSignal(partSig);
118 | signal=appendSignal(signal,sig);
119 |
120 | signal=appendSignal(signal,silence(frameSetup.getSilenceBetweenPages()));
121 |
122 | total-=pl;
123 | }
124 |
125 | signal=appendSignal(signal,makeRunCommand()); // send mc "start the application"
126 | // added silence at sound end to time out sound fading in some wav players like from Mircosoft
127 | for(int k=0;k<10;k++)
128 | {
129 | signal=appendSignal(signal,silence(frameSetup.getSilenceBetweenPages()));
130 | }
131 | return signal;
132 | }
133 |
134 | public boolean saveWav(double[] signal, File fileName)
135 | {
136 | try
137 | {
138 | // Calculate the number of frames required for specified duration
139 | //long numFrames = (long)(duration * sampleRate);
140 | long numFrames=signal.length;
141 | // Create a wav file with the name specified as the first argument
142 | WavFile wavFile = WavFile.newWavFile(fileName, 2, numFrames, 16, sampleRate);
143 |
144 | // Create a buffer of 100 frames
145 | double[][] buffer = new double[2][100];
146 |
147 | // Initialize a local frame counter
148 | long frameCounter = 0;
149 |
150 | // Loop until all frames written
151 | while (frameCounter < numFrames)
152 | {
153 | // Determine how many frames to write, up to a maximum of the buffer size
154 | long remaining = wavFile.getFramesRemaining();
155 | int toWrite = (remaining > 100) ? 100 : (int) remaining;
156 |
157 | // Fill the buffer, one tone per channel
158 | for (int s=0 ; s= 0)
91 | auline.write(abData, 0, nBytesRead);
92 | }
93 | } catch (IOException e) {
94 | e.printStackTrace();
95 | return;
96 | } finally {
97 | auline.drain();
98 | auline.close();
99 | }
100 |
101 | }
102 | }
103 |
104 |
--------------------------------------------------------------------------------
/java_source/waveFile/ReadExample.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/waveFile/ReadExample.class
--------------------------------------------------------------------------------
/java_source/waveFile/ReadExample.java:
--------------------------------------------------------------------------------
1 | // source from http://www.labbookpages.co.uk/audio/javaWavFiles.html
2 | package waveFile;
3 |
4 | import java.io.*;
5 |
6 | public class ReadExample
7 | {
8 | public static void main(String[] args)
9 | {
10 | try
11 | {
12 | // Open the wav file specified as the first argument
13 | WavFile wavFile = WavFile.openWavFile(new File(args[0]));
14 |
15 | // Display information about the wav file
16 | wavFile.display();
17 |
18 | // Get the number of audio channels in the wav file
19 | int numChannels = wavFile.getNumChannels();
20 |
21 | // Create a buffer of 100 frames
22 | double[] buffer = new double[100 * numChannels];
23 |
24 | int framesRead;
25 | double min = Double.MAX_VALUE;
26 | double max = Double.MIN_VALUE;
27 |
28 | do
29 | {
30 | // Read frames into buffer
31 | framesRead = wavFile.readFrames(buffer, 100);
32 |
33 | // Loop through frames and look for minimum and maximum value
34 | for (int s=0 ; s max) max = buffer[s];
37 | if (buffer[s] < min) min = buffer[s];
38 | }
39 | }
40 | while (framesRead != 0);
41 |
42 | // Close the wavFile
43 | wavFile.close();
44 |
45 | // Output the minimum and maximum value
46 | System.out.printf("Min: %f, Max: %f\n", min, max);
47 | }
48 | catch (Exception e)
49 | {
50 | System.err.println(e);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/java_source/waveFile/WavFile$IOState.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/waveFile/WavFile$IOState.class
--------------------------------------------------------------------------------
/java_source/waveFile/WavFile.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/waveFile/WavFile.class
--------------------------------------------------------------------------------
/java_source/waveFile/WavFile.java:
--------------------------------------------------------------------------------
1 | // source from http://www.labbookpages.co.uk/audio/javaWavFiles.html
2 | package waveFile;
3 |
4 | // Wav file IO class
5 | // A.Greensted
6 | // http://www.labbookpages.co.uk
7 |
8 | // File format is based on the information from
9 | // http://www.sonicspot.com/guide/wavefiles.html
10 | // http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/wave.htm
11 |
12 | // Version 1.0
13 |
14 | import java.io.*;
15 |
16 | public class WavFile
17 | {
18 | private enum IOState {READING, WRITING, CLOSED};
19 | private final static int BUFFER_SIZE = 4096;
20 |
21 | private final static int FMT_CHUNK_ID = 0x20746D66;
22 | private final static int DATA_CHUNK_ID = 0x61746164;
23 | private final static int RIFF_CHUNK_ID = 0x46464952;
24 | private final static int RIFF_TYPE_ID = 0x45564157;
25 |
26 | private File file; // File that will be read from or written to
27 | private IOState ioState; // Specifies the IO State of the Wav File (used for snaity checking)
28 | private int bytesPerSample; // Number of bytes required to store a single sample
29 | private long numFrames; // Number of frames within the data section
30 | private FileOutputStream oStream; // Output stream used for writting data
31 | private FileInputStream iStream; // Input stream used for reading data
32 | private double floatScale; // Scaling factor used for int <-> float conversion
33 | private double floatOffset; // Offset factor used for int <-> float conversion
34 | private boolean wordAlignAdjust; // Specify if an extra byte at the end of the data chunk is required for word alignment
35 |
36 | // Wav Header
37 | private int numChannels; // 2 bytes unsigned, 0x0001 (1) to 0xFFFF (65,535)
38 | private long sampleRate; // 4 bytes unsigned, 0x00000001 (1) to 0xFFFFFFFF (4,294,967,295)
39 | // Although a java int is 4 bytes, it is signed, so need to use a long
40 | private int blockAlign; // 2 bytes unsigned, 0x0001 (1) to 0xFFFF (65,535)
41 | private int validBits; // 2 bytes unsigned, 0x0002 (2) to 0xFFFF (65,535)
42 |
43 | // Buffering
44 | private byte[] buffer; // Local buffer used for IO
45 | private int bufferPointer; // Points to the current position in local buffer
46 | private int bytesRead; // Bytes read after last read into local buffer
47 | private long frameCounter; // Current number of frames read or written
48 |
49 | // Cannot instantiate WavFile directly, must either use newWavFile() or openWavFile()
50 | private WavFile()
51 | {
52 | buffer = new byte[BUFFER_SIZE];
53 | }
54 |
55 | public int getNumChannels()
56 | {
57 | return numChannels;
58 | }
59 |
60 | public long getNumFrames()
61 | {
62 | return numFrames;
63 | }
64 |
65 | public long getFramesRemaining()
66 | {
67 | return numFrames - frameCounter;
68 | }
69 |
70 | public long getSampleRate()
71 | {
72 | return sampleRate;
73 | }
74 |
75 | public int getValidBits()
76 | {
77 | return validBits;
78 | }
79 |
80 | public static WavFile newWavFile(File file, int numChannels, long numFrames, int validBits, long sampleRate) throws IOException, WavFileException
81 | {
82 | // Instantiate new Wavfile and initialise
83 | WavFile wavFile = new WavFile();
84 | wavFile.file = file;
85 | wavFile.numChannels = numChannels;
86 | wavFile.numFrames = numFrames;
87 | wavFile.sampleRate = sampleRate;
88 | wavFile.bytesPerSample = (validBits + 7) / 8;
89 | wavFile.blockAlign = wavFile.bytesPerSample * numChannels;
90 | wavFile.validBits = validBits;
91 |
92 | // Sanity check arguments
93 | if (numChannels < 1 || numChannels > 65535) throw new WavFileException("Illegal number of channels, valid range 1 to 65536");
94 | if (numFrames < 0) throw new WavFileException("Number of frames must be positive");
95 | if (validBits < 2 || validBits > 65535) throw new WavFileException("Illegal number of valid bits, valid range 2 to 65536");
96 | if (sampleRate < 0) throw new WavFileException("Sample rate must be positive");
97 |
98 | // Create output stream for writing data
99 | wavFile.oStream = new FileOutputStream(file);
100 |
101 | // Calculate the chunk sizes
102 | long dataChunkSize = wavFile.blockAlign * numFrames;
103 | long mainChunkSize = 4 + // Riff Type
104 | 8 + // Format ID and size
105 | 16 + // Format data
106 | 8 + // Data ID and size
107 | dataChunkSize;
108 |
109 | // Chunks must be word aligned, so if odd number of audio data bytes
110 | // adjust the main chunk size
111 | if (dataChunkSize % 2 == 1) {
112 | mainChunkSize += 1;
113 | wavFile.wordAlignAdjust = true;
114 | }
115 | else {
116 | wavFile.wordAlignAdjust = false;
117 | }
118 |
119 | // Set the main chunk size
120 | putLE(RIFF_CHUNK_ID, wavFile.buffer, 0, 4);
121 | putLE(mainChunkSize, wavFile.buffer, 4, 4);
122 | putLE(RIFF_TYPE_ID, wavFile.buffer, 8, 4);
123 |
124 | // Write out the header
125 | wavFile.oStream.write(wavFile.buffer, 0, 12);
126 |
127 | // Put format data in buffer
128 | long averageBytesPerSecond = sampleRate * wavFile.blockAlign;
129 |
130 | putLE(FMT_CHUNK_ID, wavFile.buffer, 0, 4); // Chunk ID
131 | putLE(16, wavFile.buffer, 4, 4); // Chunk Data Size
132 | putLE(1, wavFile.buffer, 8, 2); // Compression Code (Uncompressed)
133 | putLE(numChannels, wavFile.buffer, 10, 2); // Number of channels
134 | putLE(sampleRate, wavFile.buffer, 12, 4); // Sample Rate
135 | putLE(averageBytesPerSecond, wavFile.buffer, 16, 4); // Average Bytes Per Second
136 | putLE(wavFile.blockAlign, wavFile.buffer, 20, 2); // Block Align
137 | putLE(validBits, wavFile.buffer, 22, 2); // Valid Bits
138 |
139 | // Write Format Chunk
140 | wavFile.oStream.write(wavFile.buffer, 0, 24);
141 |
142 | // Start Data Chunk
143 | putLE(DATA_CHUNK_ID, wavFile.buffer, 0, 4); // Chunk ID
144 | putLE(dataChunkSize, wavFile.buffer, 4, 4); // Chunk Data Size
145 |
146 | // Write Format Chunk
147 | wavFile.oStream.write(wavFile.buffer, 0, 8);
148 |
149 | // Calculate the scaling factor for converting to a normalised double
150 | if (wavFile.validBits > 8)
151 | {
152 | // If more than 8 validBits, data is signed
153 | // Conversion required multiplying by magnitude of max positive value
154 | wavFile.floatOffset = 0;
155 | wavFile.floatScale = Long.MAX_VALUE >> (64 - wavFile.validBits);
156 | }
157 | else
158 | {
159 | // Else if 8 or less validBits, data is unsigned
160 | // Conversion required dividing by max positive value
161 | wavFile.floatOffset = 1;
162 | wavFile.floatScale = 0.5 * ((1 << wavFile.validBits) - 1);
163 | }
164 |
165 | // Finally, set the IO State
166 | wavFile.bufferPointer = 0;
167 | wavFile.bytesRead = 0;
168 | wavFile.frameCounter = 0;
169 | wavFile.ioState = IOState.WRITING;
170 |
171 | return wavFile;
172 | }
173 |
174 | public static WavFile openWavFile(File file) throws IOException, WavFileException
175 | {
176 | // Instantiate new Wavfile and store the file reference
177 | WavFile wavFile = new WavFile();
178 | wavFile.file = file;
179 |
180 | // Create a new file input stream for reading file data
181 | wavFile.iStream = new FileInputStream(file);
182 |
183 | // Read the first 12 bytes of the file
184 | int bytesRead = wavFile.iStream.read(wavFile.buffer, 0, 12);
185 | if (bytesRead != 12) throw new WavFileException("Not enough wav file bytes for header");
186 |
187 | // Extract parts from the header
188 | long riffChunkID = getLE(wavFile.buffer, 0, 4);
189 | long chunkSize = getLE(wavFile.buffer, 4, 4);
190 | long riffTypeID = getLE(wavFile.buffer, 8, 4);
191 |
192 | // Check the header bytes contains the correct signature
193 | if (riffChunkID != RIFF_CHUNK_ID) throw new WavFileException("Invalid Wav Header data, incorrect riff chunk ID");
194 | if (riffTypeID != RIFF_TYPE_ID) throw new WavFileException("Invalid Wav Header data, incorrect riff type ID");
195 |
196 | // Check that the file size matches the number of bytes listed in header
197 | if (file.length() != chunkSize+8) {
198 | throw new WavFileException("Header chunk size (" + chunkSize + ") does not match file size (" + file.length() + ")");
199 | }
200 |
201 | boolean foundFormat = false;
202 | boolean foundData = false;
203 |
204 | // Search for the Format and Data Chunks
205 | while (true)
206 | {
207 | // Read the first 8 bytes of the chunk (ID and chunk size)
208 | bytesRead = wavFile.iStream.read(wavFile.buffer, 0, 8);
209 | if (bytesRead == -1) throw new WavFileException("Reached end of file without finding format chunk");
210 | if (bytesRead != 8) throw new WavFileException("Could not read chunk header");
211 |
212 | // Extract the chunk ID and Size
213 | long chunkID = getLE(wavFile.buffer, 0, 4);
214 | chunkSize = getLE(wavFile.buffer, 4, 4);
215 |
216 | // Word align the chunk size
217 | // chunkSize specifies the number of bytes holding data. However,
218 | // the data should be word aligned (2 bytes) so we need to calculate
219 | // the actual number of bytes in the chunk
220 | long numChunkBytes = (chunkSize%2 == 1) ? chunkSize+1 : chunkSize;
221 |
222 | if (chunkID == FMT_CHUNK_ID)
223 | {
224 | // Flag that the format chunk has been found
225 | foundFormat = true;
226 |
227 | // Read in the header info
228 | bytesRead = wavFile.iStream.read(wavFile.buffer, 0, 16);
229 |
230 | // Check this is uncompressed data
231 | int compressionCode = (int) getLE(wavFile.buffer, 0, 2);
232 | if (compressionCode != 1) throw new WavFileException("Compression Code " + compressionCode + " not supported");
233 |
234 | // Extract the format information
235 | wavFile.numChannels = (int) getLE(wavFile.buffer, 2, 2);
236 | wavFile.sampleRate = getLE(wavFile.buffer, 4, 4);
237 | wavFile.blockAlign = (int) getLE(wavFile.buffer, 12, 2);
238 | wavFile.validBits = (int) getLE(wavFile.buffer, 14, 2);
239 |
240 | if (wavFile.numChannels == 0) throw new WavFileException("Number of channels specified in header is equal to zero");
241 | if (wavFile.blockAlign == 0) throw new WavFileException("Block Align specified in header is equal to zero");
242 | if (wavFile.validBits < 2) throw new WavFileException("Valid Bits specified in header is less than 2");
243 | if (wavFile.validBits > 64) throw new WavFileException("Valid Bits specified in header is greater than 64, this is greater than a long can hold");
244 |
245 | // Calculate the number of bytes required to hold 1 sample
246 | wavFile.bytesPerSample = (wavFile.validBits + 7) / 8;
247 | if (wavFile.bytesPerSample * wavFile.numChannels != wavFile.blockAlign)
248 | throw new WavFileException("Block Align does not agree with bytes required for validBits and number of channels");
249 |
250 | // Account for number of format bytes and then skip over
251 | // any extra format bytes
252 | numChunkBytes -= 16;
253 | if (numChunkBytes > 0) wavFile.iStream.skip(numChunkBytes);
254 | }
255 | else if (chunkID == DATA_CHUNK_ID)
256 | {
257 | // Check if we've found the format chunk,
258 | // If not, throw an exception as we need the format information
259 | // before we can read the data chunk
260 | if (foundFormat == false) throw new WavFileException("Data chunk found before Format chunk");
261 |
262 | // Check that the chunkSize (wav data length) is a multiple of the
263 | // block align (bytes per frame)
264 | if (chunkSize % wavFile.blockAlign != 0) throw new WavFileException("Data Chunk size is not multiple of Block Align");
265 |
266 | // Calculate the number of frames
267 | wavFile.numFrames = chunkSize / wavFile.blockAlign;
268 |
269 | // Flag that we've found the wave data chunk
270 | foundData = true;
271 |
272 | break;
273 | }
274 | else
275 | {
276 | // If an unknown chunk ID is found, just skip over the chunk data
277 | wavFile.iStream.skip(numChunkBytes);
278 | }
279 | }
280 |
281 | // Throw an exception if no data chunk has been found
282 | if (foundData == false) throw new WavFileException("Did not find a data chunk");
283 |
284 | // Calculate the scaling factor for converting to a normalised double
285 | if (wavFile.validBits > 8)
286 | {
287 | // If more than 8 validBits, data is signed
288 | // Conversion required dividing by magnitude of max negative value
289 | wavFile.floatOffset = 0;
290 | wavFile.floatScale = 1 << (wavFile.validBits - 1);
291 | }
292 | else
293 | {
294 | // Else if 8 or less validBits, data is unsigned
295 | // Conversion required dividing by max positive value
296 | wavFile.floatOffset = -1;
297 | wavFile.floatScale = 0.5 * ((1 << wavFile.validBits) - 1);
298 | }
299 |
300 | wavFile.bufferPointer = 0;
301 | wavFile.bytesRead = 0;
302 | wavFile.frameCounter = 0;
303 | wavFile.ioState = IOState.READING;
304 |
305 | return wavFile;
306 | }
307 |
308 | // Get and Put little endian data from local buffer
309 | // ------------------------------------------------
310 | private static long getLE(byte[] buffer, int pos, int numBytes)
311 | {
312 | numBytes --;
313 | pos += numBytes;
314 |
315 | long val = buffer[pos] & 0xFF;
316 | for (int b=0 ; b>= 8;
327 | pos ++;
328 | }
329 | }
330 |
331 | // Sample Writing and Reading
332 | // --------------------------
333 | private void writeSample(long val) throws IOException
334 | {
335 | for (int b=0 ; b>= 8;
345 | bufferPointer ++;
346 | }
347 | }
348 |
349 | private long readSample() throws IOException, WavFileException
350 | {
351 | long val = 0;
352 |
353 | for (int b=0 ; b 0) oStream.write(buffer, 0, bufferPointer);
675 |
676 | // If an extra byte is required for word alignment, add it to the end
677 | if (wordAlignAdjust) oStream.write(0);
678 |
679 | // Close the stream and set to null
680 | oStream.close();
681 | oStream = null;
682 | }
683 |
684 | // Flag that the stream is closed
685 | ioState = IOState.CLOSED;
686 | }
687 |
688 | public void display()
689 | {
690 | display(System.out);
691 | }
692 |
693 | public void display(PrintStream out)
694 | {
695 | out.printf("File: %s\n", file);
696 | out.printf("Channels: %d, Frames: %d\n", numChannels, numFrames);
697 | out.printf("IO State: %s\n", ioState);
698 | out.printf("Sample Rate: %d, Block Align: %d\n", sampleRate, blockAlign);
699 | out.printf("Valid Bits: %d, Bytes per sample: %d\n", validBits, bytesPerSample);
700 | }
701 |
702 | public static void main(String[] args)
703 | {
704 | if (args.length < 1)
705 | {
706 | System.err.println("Must supply filename");
707 | System.exit(1);
708 | }
709 |
710 | try
711 | {
712 | for (String filename : args)
713 | {
714 | WavFile readWavFile = openWavFile(new File(filename));
715 | readWavFile.display();
716 |
717 | long numFrames = readWavFile.getNumFrames();
718 | int numChannels = readWavFile.getNumChannels();
719 | int validBits = readWavFile.getValidBits();
720 | long sampleRate = readWavFile.getSampleRate();
721 |
722 | WavFile writeWavFile = newWavFile(new File("out.wav"), numChannels, numFrames, validBits, sampleRate);
723 |
724 | final int BUF_SIZE = 5001;
725 |
726 | // int[] buffer = new int[BUF_SIZE * numChannels];
727 | // long[] buffer = new long[BUF_SIZE * numChannels];
728 | double[] buffer = new double[BUF_SIZE * numChannels];
729 |
730 | int framesRead = 0;
731 | int framesWritten = 0;
732 |
733 | do
734 | {
735 | framesRead = readWavFile.readFrames(buffer, BUF_SIZE);
736 | framesWritten = writeWavFile.writeFrames(buffer, BUF_SIZE);
737 | System.out.printf("%d %d\n", framesRead, framesWritten);
738 | }
739 | while (framesRead != 0);
740 |
741 | readWavFile.close();
742 | writeWavFile.close();
743 | }
744 |
745 | WavFile writeWavFile = newWavFile(new File("out2.wav"), 1, 10, 23, 44100);
746 | double[] buffer = new double[10];
747 | writeWavFile.writeFrames(buffer, 10);
748 | writeWavFile.close();
749 | }
750 | catch (Exception e)
751 | {
752 | System.err.println(e);
753 | e.printStackTrace();
754 | }
755 | }
756 | }
757 |
--------------------------------------------------------------------------------
/java_source/waveFile/WavFileException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/waveFile/WavFileException.class
--------------------------------------------------------------------------------
/java_source/waveFile/WavFileException.java:
--------------------------------------------------------------------------------
1 | // source from http://www.labbookpages.co.uk/audio/javaWavFiles.html
2 | package waveFile;
3 |
4 | public class WavFileException extends Exception
5 | {
6 | public WavFileException()
7 | {
8 | super();
9 | }
10 |
11 | public WavFileException(String message)
12 | {
13 | super(message);
14 | }
15 |
16 | public WavFileException(String message, Throwable cause)
17 | {
18 | super(message, cause);
19 | }
20 |
21 | public WavFileException(Throwable cause)
22 | {
23 | super(cause);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/java_source/waveFile/WriteExample.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ChrisMicro/TinyAudioBoot/7ff922ba22b231fc7a0feb0316750850f574f757/java_source/waveFile/WriteExample.class
--------------------------------------------------------------------------------
/java_source/waveFile/WriteExample.java:
--------------------------------------------------------------------------------
1 | package waveFile;
2 |
3 | import java.io.*;
4 |
5 | public class WriteExample
6 | {
7 | public static void main(String[] args)
8 | {
9 | try
10 | {
11 | int sampleRate = 44100; // Samples per second
12 | double duration = 5.0; // Seconds
13 |
14 | // Calculate the number of frames required for specified duration
15 | long numFrames = (long)(duration * sampleRate);
16 |
17 | // Create a wav file with the name specified as the first argument
18 | WavFile wavFile = WavFile.newWavFile(new File("test.wav"), 2, numFrames, 16, sampleRate);
19 |
20 | // Create a buffer of 100 frames
21 | double[][] buffer = new double[2][100];
22 |
23 | // Initialise a local frame counter
24 | long frameCounter = 0;
25 |
26 | // Loop until all frames written
27 | while (frameCounter < numFrames)
28 | {
29 | // Determine how many frames to write, up to a maximum of the buffer size
30 | long remaining = wavFile.getFramesRemaining();
31 | int toWrite = (remaining > 100) ? 100 : (int) remaining;
32 |
33 | // Fill the buffer, one tone per channel
34 | for (int s=0 ; s