aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-10-21 17:51:04 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-10-21 17:51:04 -0400
commit146922e21147baef802aba5cd3eb5ae0f75b545e (patch)
treefbce59a2fb56b902266a3626c4d5b029b7a0ebf1
parent629788e47c757432178f8a1b6855d10d665e6550 (diff)
added and modified Program() routine
-rw-r--r--bootloaders/nuevo_diskloader/DiskLoader.elf.hex237
-rw-r--r--bootloaders/nuevo_diskloader/DiskLoader.hex237
-rw-r--r--bootloaders/nuevo_diskloader/src/DiskLoader.cpp26
3 files changed, 262 insertions, 238 deletions
diff --git a/bootloaders/nuevo_diskloader/DiskLoader.elf.hex b/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
index cd2ae00..95b848a 100644
--- a/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
+++ b/bootloaders/nuevo_diskloader/DiskLoader.elf.hex
@@ -1,6 +1,6 @@
:10700000ACC00000CFC00000CDC00000CBC000006D
:10701000C9C00000C7C00000C5C00000C3C0000058
-:10702000C1C00000BFC00000FCC200006FC3000070
+:10702000C1C00000BFC00000F1C2000064C3000086
:10703000B9C00000B7C00000B5C00000B3C0000078
:10704000B1C00000AFC00000ADC00000ABC0000088
:10705000A9C00000A7C00000A5C00000A3C0000098
@@ -8,7 +8,7 @@
:1070700099C0000097C0000095C0000093C00000B8
:1070800091C000008FC000008DC000008BC00000C8
:1070900089C0000087C0000085C0000083C00000D8
-:1070A00081C000007FC000007DC000002DC1080B22
+:1070A00081C000007FC000007DC0000022C1080B2D
:1070B00000020202010009040000010202000005B2
:1070C0002400100105240101010424020605240600
:1070D00000010705810310004009040100020A00B5
@@ -19,137 +19,136 @@
:1071200069006E006F0020004C004C00430012010B
:107130000002000000404123340000010102000170
:10714000120100020200004041233400000101024C
-:10715000000100C18081EC38763B11241FBECFEFC7
-:10716000DAE0DEBFCDBF11E0A0E0B1E0E8E6F9E78C
+:10715000000100C18081EC386B3B11241FBECFEFD2
+:10716000DAE0DEBFCDBF11E0A0E0B1E0E2E5F9E793
:1071700002C005900D92A831B107D9F711E0A8E13E
:10718000B1E001C01D92A332B107E1F711E7CAE5F2
-:10719000D1E703C02297FE01E1D3C635D107D1F76D
-:1071A000B3D0E0C3A6C0DC01809100019091010141
+:10719000D1E703C02297FE01D6D3C635D107D1F778
+:1071A000A8D0D5C32DCFDC018091000190910101C1
:1071B0008F5F9F4F61F4ED91FC9111970480F581F1
:1071C000E02DCD01099590930101809300018091FC
:1071D00000019091010108958EE091E090931901D2
:1071E000809318010895DF93CF930F92CDB7DEB748
:1071F000698380910901882351F083E0BE016F5FAC
-:107200007F4F41E050E023D11816190614F080E0BA
-:1072100090E00F90CF91DF91089583E0F8C1209125
+:107200007F4F41E050E018D11816190614F080E0C5
+:1072100090E00F90CF91DF91089583E0EDC1209130
:107220000001309101018FEF2F3F380739F08FEFC8
-:107230009FEF909301018093000103C082E0DFD0B3
-:107240009C01C901089582E09DD0282F8091000102
+:107230009FEF909301018093000103C082E0D4D0BE
+:107240009C01C901089582E092D0282F809100010D
:10725000909101018F5F9F4F09F02F5F822F90E087
:107260000895FC0180818E5F808380E86EEA70E77C
-:1072700042E450E07EC182E291E037D2F8940C946F
+:1072700042E450E073C182E291E02CD2F8940C9485
:10728000003C0895CF93DF93EC0189819881913A76
:1072900049F4813251F580E062E071E047E050E06E
-:1072A00068D121C0913209F5803231F482E091E059
-:1072B00067E070E09AD117C08232B9F48091090179
+:1072A0005DD121C0913209F5803231F482E091E064
+:1072B00067E070E08FD117C08232B9F48091090184
:1072C000882371F08091020190910301A091040143
:1072D000B0910501805B9440A040B04009F4CBDF41
:1072E0008A818093090181E001C080E0DF91CF9124
-:1072F00008951F920F920FB60F921124479A0F9084
-:107300000FBE0F901F90189588E10FB6F8948093E8
-:107310006000109260000FBE3F9A209A6E9A90E82B
-:10732000909361001092610081E885BF95BF01E0F4
-:1073300005BF02E005BF769A289A479882E291E05D
-:10734000BED1789420E931E0479A84EC99E0F901C4
-:107350003197F1F70197D9F7479884EC99E0F90153
-:107360003197F1F70197D9F7EFCFFC0104C0809175
-:10737000F100819361506623D1F7289884E68093C9
-:107380001B0108959FB7F89487708093E90080915E
-:10739000F2009FBF0895282F80911C018823C1F01F
-:1073A00057FF1AC015C0289890931B018091F100D7
-:1073B0008193E217F307B9F74115510539F0809130
-:1073C000F200882319F48BE68093E800AFBF02C077
-:1073D0004FEF5FEFCA010895AFB7F894277020937D
-:1073E000E9008091F200282F30E0241735070CF4D3
-:1073F000A901FB019B01240F311D94E6DACFDF9335
-:10740000CF930F92CDB7DEB7BE016F5F7F4F41E0E4
-:1074100050E0C1DF019719F08FEF9FEF02C0898123
-:1074200090E00F90CF91DF9108952FB7F894877077
-:107430008093E9008091E80085FD02C090E004C0DF
-:107440008091F20090E4981B2FBF892F08954F92EE
-:107450005F926F927F928F929F92AF92BF92CF92E4
-:10746000DF92EF92FF920F931F93CF93DF93F82E4B
-:107470006A0180911C01882309F18B01EA016AEFFE
-:10748000E62E57E0552E5F208F2D90E040E2842EAF
-:10749000912C882299223AE3432E20E4A22EB12C8B
-:1074A000A822B92280EA682E8FE0782E48C08F2D5E
-:1074B000BCDF282F882349F4EA9419F44FEF5FEFDB
-:1074C00046C0C3010197F1F73AC090E0C817D90749
-:1074D0000CF42C2FC21BD1094FB7F8945092E9003D
-:1074E0008114910421F406C01092F100215022234E
-:1074F000D9F719C0F7FC03C0F801922F10C0C801DA
-:10750000322F06C0FC010196E491E093F100315066
-:107510003323C1F706C081918093F10091509923E4
-:10752000D1F7020F111D8091E80085FF05C020975B
-:1075300029F4A114B10411F04092E8004FBF209744
-:1075400009F0B5CF769884E680931A01A601CA01A6
-:10755000DF91CF911F910F91FF90EF90DF90CF902F
-:10756000BF90AF909F908F907F906F905F904F9063
-:1075700008950F931F93182FFB01A0911F01B09145
-:107580002001BA010EEF2AC017FF02C0949101C07A
-:10759000908120911D0130911E012A173B07ACF408
-:1075A0008091E8008570E1F38091E80082FF03C0DC
-:1075B0004FEF5FEF16C09093F100C90101968F73F2
-:1075C0009070892B11F40093E8002F5F3F4F3093A8
-:1075D0001E0120931D0161507040319661157105A7
-:1075E00099F6CA011F910F910895CF93DF939C01E3
-:1075F000EB018091E80082FFFCCFC9016C2FB5DE62
-:107600008BEF8093E800CE01DF91CF9108958093B6
-:10761000E9008091F200882319F08AE38093E80062
-:1076200008951F920F920FB60F9211242F933F933C
-:107630008F938091E1001092E100282F83FF0FC00B
-:107640001092E90081E08093EB001092EC0082E35D
-:107650008093ED0010921C0188E08093F00022FFDF
-:1076600026C083E08093E9008091F200882319F01E
-:107670008AE38093E80080911A01882351F0809179
-:107680001A01815080931A0180911A01882309F40C
-:10769000769A80911B01882351F080911B018150C3
-:1076A00080931B0180911B01882309F4289A8F91F4
-:1076B0003F912F910F900FBE0F901F901895109231
-:1076C0001C0181E08093D70080EA8093D80082E19A
-:1076D00089BD09B400FEFDCF80E98093D8008CE01D
-:1076E0008093E2001092E000089508950895DF93DA
-:1076F000CF930F92CDB7DEB71982CE010196B1DDDF
-:10770000898190E00F90CF91DF9108951F920F92A1
-:107710000FB60F921124EF92FF921F932F933F9376
-:107720004F935F936F937F938F939F93AF93BF9389
-:10773000EF93FF93DF93CF93CDB7DEB76197DEBFB3
-:10774000CDBF1092E9008091E80083FFECC0CE012C
-:10775000019668E00ADE82EF8093E800998197FF46
-:1077600005C08091E80080FFFCCF03C08EEF8093BE
-:10777000E800292F30E0C90180769070892B09F04C
-:10778000B3C08A81882329F41092F1001092F1008D
-:10779000BFC0813009F4BCC0833009F4B9C0853062
-:1077A00049F48091E80080FFFCCF8B818068809352
-:1077B000E300AEC0863009F06DC01C81EF80F88414
-:1077C0001230A9F51092E90010921E0110921D01CD
-:1077D0001092200110921F018ADF99E0FE01399674
-:1077E000DF01292F1D922A95E9F799871A8791E0E1
-:1077F0009E8790E8988B9AEF998B20911D0130918C
-:107800001E01275F3F4F3C872B878D871092E90031
-:1078100010921E0110921D01F0922001E0921F01B2
-:1078200080E0BF0149E050E0A4DE61DF71C010924A
-:10783000E90010921E0110921D01F0922001E092C9
-:107840001F01113071F488E0E816F10411F410936F
-:10785000210180912101882309F062C0EEE2F1E765
-:1078600013C0133009F058C08B81882319F4E0EF5E
-:10787000F0E70AC0823019F4E4EFF0E705C0813088
-:1078800009F04AC0E6E1F1E7449150E080E8BF0129
-:1078900070DE3EC0873009F43FC0883021F481E0BB
-:1078A0008093F10035C0893099F523703070232B17
-:1078B00099F5E3E5F1E791E031E026E39093E90003
-:1078C0003093EB0084918093EC002093ED009F5F58
-:1078D0003196943099F78EE78093EA001092EA008F
-:1078E0008B8180931C0114C08F8198851092E900D0
-:1078F00010921E0110921D019093200180931F0190
-:107900008D81882349F4CE010196BCDC882321F0C7
-:107910008EEF8093E80007C081E28093EB0003C004
-:10792000E0E4F1E7B1CF6196DEBFCDBFCF91DF914B
-:10793000FF91EF91BF91AF919F918F917F916F9147
-:107940005F914F913F912F911F91FF90EF900F907A
-:107950000FBE0F901F901895EE0FFF1F0590F4912A
-:08796000E02D0994F894FFCF1B
-:10796800FFFF00E1000000000000000000002339D4
-:08797800D3380F390D39F33843
+:1072F000089588E10FB6F8948093600010926000C2
+:107300000FBE3F9A209A6E9A90E890936100109277
+:10731000610081E885BF95BF01E005BF02E005BFC0
+:10732000769A289A479882E291E0BED1789420E933
+:1073300031E0479A84EC99E0F9013197F1F7019730
+:10734000D9F7479884EC99E0F9013197F1F7019763
+:10735000D9F7EFCFFC0104C08091F1008193615017
+:107360006623D1F7289884E680931B0108959FB780
+:10737000F89487708093E9008091F2009FBF089590
+:10738000282F80911C018823C1F057FF1AC015C017
+:10739000289890931B018091F1008193E217F307E5
+:1073A000B9F74115510539F08091F200882319F49D
+:1073B0008BE68093E800AFBF02C04FEF5FEFCA01DA
+:1073C0000895AFB7F89427702093E9008091F200F8
+:1073D000282F30E0241735070CF4A901FB019B018D
+:1073E000240F311D94E6DACFDF93CF930F92CDB700
+:1073F000DEB7BE016F5F7F4F41E050E0C1DF019714
+:1074000019F08FEF9FEF02C0898190E00F90CF912C
+:10741000DF9108952FB7F89487708093E9008091E9
+:10742000E80085FD02C090E004C08091F20090E485
+:10743000981B2FBF892F08954F925F926F927F9272
+:107440008F929F92AF92BF92CF92DF92EF92FF9274
+:107450000F931F93CF93DF93F82E6A0180911C0145
+:10746000882309F18B01EA016AEFE62E57E0552ED9
+:107470005F208F2D90E040E2842E912C882299226B
+:107480003AE3432E20E4A22EB12CA822B92280EAAE
+:10749000682E8FE0782E48C08F2DBCDF282F8823E0
+:1074A00049F4EA9419F44FEF5FEF46C0C301019726
+:1074B000F1F73AC090E0C817D9070CF42C2FC21B83
+:1074C000D1094FB7F8945092E9008114910421F446
+:1074D00006C01092F10021502223D9F719C0F7FC01
+:1074E00003C0F801922F10C0C801322F06C0FC0162
+:1074F0000196E491E093F10031503323C1F706C0C7
+:1075000081918093F10091509923D1F7020F111DC1
+:107510008091E80085FF05C0209729F4A114B104EB
+:1075200011F04092E8004FBF209709F0B5CF769850
+:1075300084E680931A01A601CA01DF91CF911F91C1
+:107540000F91FF90EF90DF90CF90BF90AF909F9002
+:107550008F907F906F905F904F9008950F931F933F
+:10756000182FFB01A0911F01B0912001BA010EEF6D
+:107570002AC017FF02C0949101C0908120911D0183
+:1075800030911E012A173B07ACF48091E80085700A
+:10759000E1F38091E80082FF03C04FEF5FEF16C078
+:1075A0009093F100C90101968F739070892B11F4AB
+:1075B0000093E8002F5F3F4F30931E0120931D0181
+:1075C0006150704031966115710599F6CA011F919D
+:1075D0000F910895CF93DF939C01EB018091E80018
+:1075E00082FFFCCFC9016C2FB5DE8BEF8093E800E2
+:1075F000CE01DF91CF9108958093E9008091F20050
+:10760000882319F08AE38093E80008951F920F926F
+:107610000FB60F9211242F933F938F938091E10027
+:107620001092E100282F83FF0FC01092E90081E043
+:107630008093EB001092EC0082E38093ED001092B7
+:107640001C0188E08093F00022FF26C083E0809335
+:10765000E9008091F200882319F08AE38093E80022
+:1076600080911A01882351F080911A0181508093F2
+:107670001A0180911A01882309F4769A80911B01DE
+:10768000882351F080911B01815080931B018091D0
+:107690001B01882309F4289A8F913F912F910F9015
+:1076A0000FBE0F901F90189510921C0181E08093DF
+:1076B000D70080EA8093D80082E189BD09B400FE3A
+:1076C000FDCF80E98093D8008CE08093E200109297
+:1076D000E000089508950895DF93CF930F92CDB7FA
+:1076E000DEB71982CE010196BCDD898190E00F9052
+:1076F000CF91DF9108951F920F920FB60F92112430
+:10770000EF92FF921F932F933F934F935F936F934B
+:107710007F938F939F93AF93BF93EF93FF93DF93E9
+:10772000CF93CDB7DEB76197DEBFCDBF1092E90032
+:107730008091E80083FFECC0CE01019668E00ADE8C
+:1077400082EF8093E800998197FF05C08091E8005F
+:1077500080FFFCCF03C08EEF8093E800292F30E03C
+:10776000C90180769070892B09F0B3C08A81882383
+:1077700029F41092F1001092F100BFC0813009F499
+:10778000BCC0833009F4B9C0853049F48091E80069
+:1077900080FFFCCF8B8180688093E300AEC0863091
+:1077A00009F06DC01C81EF80F8841230A9F51092A9
+:1077B000E90010921E0110921D01109220011092FA
+:1077C0001F018ADF99E0FE013996DF01292F1D9202
+:1077D0002A95E9F799871A8791E09E8790E8988B18
+:1077E0009AEF998B20911D0130911E01275F3F4F29
+:1077F0003C872B878D871092E90010921E01109212
+:107800001D01F0922001E0921F0180E0BF0149E0DC
+:1078100050E0A4DE61DF71C01092E90010921E01F9
+:1078200010921D01F0922001E0921F01113071F4BD
+:1078300088E0E816F10411F41093210180912101F0
+:10784000882309F062C0EEE2F1E713C0133009F0BB
+:1078500058C08B81882319F4E0EFF0E70AC082302A
+:1078600019F4E4EFF0E705C0813009F04AC0E6E121
+:10787000F1E7449150E080E8BF0170DE3EC0873000
+:1078800009F43FC0883021F481E08093F10035C0D5
+:10789000893099F523703070232B99F5E3E5F1E7F2
+:1078A00091E031E026E39093E9003093EB0084917E
+:1078B0008093EC002093ED009F5F3196943099F710
+:1078C0008EE78093EA001092EA008B8180931C017E
+:1078D00014C08F8198851092E90010921E011092B9
+:1078E0001D019093200180931F018D81882349F40D
+:1078F000CE010196C7DC882321F08EEF8093E8004B
+:1079000007C081E28093EB0003C0E0E4F1E7B1CF70
+:107910006196DEBFCDBFCF91DF91FF91EF91BF9117
+:10792000AF919F918F917F916F915F914F913F9117
+:107930002F911F91FF90EF900F900FBE0F901F900F
+:107940001895EE0FFF1F0590F491E02D0994F8941F
+:02795000FFCF67
+:10795200FFFF00E1000000000000000000002339EA
+:08796200D3380F390D39F33859
:040000030000700089
:00000001FF
diff --git a/bootloaders/nuevo_diskloader/DiskLoader.hex b/bootloaders/nuevo_diskloader/DiskLoader.hex
index cd2ae00..95b848a 100644
--- a/bootloaders/nuevo_diskloader/DiskLoader.hex
+++ b/bootloaders/nuevo_diskloader/DiskLoader.hex
@@ -1,6 +1,6 @@
:10700000ACC00000CFC00000CDC00000CBC000006D
:10701000C9C00000C7C00000C5C00000C3C0000058
-:10702000C1C00000BFC00000FCC200006FC3000070
+:10702000C1C00000BFC00000F1C2000064C3000086
:10703000B9C00000B7C00000B5C00000B3C0000078
:10704000B1C00000AFC00000ADC00000ABC0000088
:10705000A9C00000A7C00000A5C00000A3C0000098
@@ -8,7 +8,7 @@
:1070700099C0000097C0000095C0000093C00000B8
:1070800091C000008FC000008DC000008BC00000C8
:1070900089C0000087C0000085C0000083C00000D8
-:1070A00081C000007FC000007DC000002DC1080B22
+:1070A00081C000007FC000007DC0000022C1080B2D
:1070B00000020202010009040000010202000005B2
:1070C0002400100105240101010424020605240600
:1070D00000010705810310004009040100020A00B5
@@ -19,137 +19,136 @@
:1071200069006E006F0020004C004C00430012010B
:107130000002000000404123340000010102000170
:10714000120100020200004041233400000101024C
-:10715000000100C18081EC38763B11241FBECFEFC7
-:10716000DAE0DEBFCDBF11E0A0E0B1E0E8E6F9E78C
+:10715000000100C18081EC386B3B11241FBECFEFD2
+:10716000DAE0DEBFCDBF11E0A0E0B1E0E2E5F9E793
:1071700002C005900D92A831B107D9F711E0A8E13E
:10718000B1E001C01D92A332B107E1F711E7CAE5F2
-:10719000D1E703C02297FE01E1D3C635D107D1F76D
-:1071A000B3D0E0C3A6C0DC01809100019091010141
+:10719000D1E703C02297FE01D6D3C635D107D1F778
+:1071A000A8D0D5C32DCFDC018091000190910101C1
:1071B0008F5F9F4F61F4ED91FC9111970480F581F1
:1071C000E02DCD01099590930101809300018091FC
:1071D00000019091010108958EE091E090931901D2
:1071E000809318010895DF93CF930F92CDB7DEB748
:1071F000698380910901882351F083E0BE016F5FAC
-:107200007F4F41E050E023D11816190614F080E0BA
-:1072100090E00F90CF91DF91089583E0F8C1209125
+:107200007F4F41E050E018D11816190614F080E0C5
+:1072100090E00F90CF91DF91089583E0EDC1209130
:107220000001309101018FEF2F3F380739F08FEFC8
-:107230009FEF909301018093000103C082E0DFD0B3
-:107240009C01C901089582E09DD0282F8091000102
+:107230009FEF909301018093000103C082E0D4D0BE
+:107240009C01C901089582E092D0282F809100010D
:10725000909101018F5F9F4F09F02F5F822F90E087
:107260000895FC0180818E5F808380E86EEA70E77C
-:1072700042E450E07EC182E291E037D2F8940C946F
+:1072700042E450E073C182E291E02CD2F8940C9485
:10728000003C0895CF93DF93EC0189819881913A76
:1072900049F4813251F580E062E071E047E050E06E
-:1072A00068D121C0913209F5803231F482E091E059
-:1072B00067E070E09AD117C08232B9F48091090179
+:1072A0005DD121C0913209F5803231F482E091E064
+:1072B00067E070E08FD117C08232B9F48091090184
:1072C000882371F08091020190910301A091040143
:1072D000B0910501805B9440A040B04009F4CBDF41
:1072E0008A818093090181E001C080E0DF91CF9124
-:1072F00008951F920F920FB60F921124479A0F9084
-:107300000FBE0F901F90189588E10FB6F8948093E8
-:107310006000109260000FBE3F9A209A6E9A90E82B
-:10732000909361001092610081E885BF95BF01E0F4
-:1073300005BF02E005BF769A289A479882E291E05D
-:10734000BED1789420E931E0479A84EC99E0F901C4
-:107350003197F1F70197D9F7479884EC99E0F90153
-:107360003197F1F70197D9F7EFCFFC0104C0809175
-:10737000F100819361506623D1F7289884E68093C9
-:107380001B0108959FB7F89487708093E90080915E
-:10739000F2009FBF0895282F80911C018823C1F01F
-:1073A00057FF1AC015C0289890931B018091F100D7
-:1073B0008193E217F307B9F74115510539F0809130
-:1073C000F200882319F48BE68093E800AFBF02C077
-:1073D0004FEF5FEFCA010895AFB7F894277020937D
-:1073E000E9008091F200282F30E0241735070CF4D3
-:1073F000A901FB019B01240F311D94E6DACFDF9335
-:10740000CF930F92CDB7DEB7BE016F5F7F4F41E0E4
-:1074100050E0C1DF019719F08FEF9FEF02C0898123
-:1074200090E00F90CF91DF9108952FB7F894877077
-:107430008093E9008091E80085FD02C090E004C0DF
-:107440008091F20090E4981B2FBF892F08954F92EE
-:107450005F926F927F928F929F92AF92BF92CF92E4
-:10746000DF92EF92FF920F931F93CF93DF93F82E4B
-:107470006A0180911C01882309F18B01EA016AEFFE
-:10748000E62E57E0552E5F208F2D90E040E2842EAF
-:10749000912C882299223AE3432E20E4A22EB12C8B
-:1074A000A822B92280EA682E8FE0782E48C08F2D5E
-:1074B000BCDF282F882349F4EA9419F44FEF5FEFDB
-:1074C00046C0C3010197F1F73AC090E0C817D90749
-:1074D0000CF42C2FC21BD1094FB7F8945092E9003D
-:1074E0008114910421F406C01092F100215022234E
-:1074F000D9F719C0F7FC03C0F801922F10C0C801DA
-:10750000322F06C0FC010196E491E093F100315066
-:107510003323C1F706C081918093F10091509923E4
-:10752000D1F7020F111D8091E80085FF05C020975B
-:1075300029F4A114B10411F04092E8004FBF209744
-:1075400009F0B5CF769884E680931A01A601CA01A6
-:10755000DF91CF911F910F91FF90EF90DF90CF902F
-:10756000BF90AF909F908F907F906F905F904F9063
-:1075700008950F931F93182FFB01A0911F01B09145
-:107580002001BA010EEF2AC017FF02C0949101C07A
-:10759000908120911D0130911E012A173B07ACF408
-:1075A0008091E8008570E1F38091E80082FF03C0DC
-:1075B0004FEF5FEF16C09093F100C90101968F73F2
-:1075C0009070892B11F40093E8002F5F3F4F3093A8
-:1075D0001E0120931D0161507040319661157105A7
-:1075E00099F6CA011F910F910895CF93DF939C01E3
-:1075F000EB018091E80082FFFCCFC9016C2FB5DE62
-:107600008BEF8093E800CE01DF91CF9108958093B6
-:10761000E9008091F200882319F08AE38093E80062
-:1076200008951F920F920FB60F9211242F933F933C
-:107630008F938091E1001092E100282F83FF0FC00B
-:107640001092E90081E08093EB001092EC0082E35D
-:107650008093ED0010921C0188E08093F00022FFDF
-:1076600026C083E08093E9008091F200882319F01E
-:107670008AE38093E80080911A01882351F0809179
-:107680001A01815080931A0180911A01882309F40C
-:10769000769A80911B01882351F080911B018150C3
-:1076A00080931B0180911B01882309F4289A8F91F4
-:1076B0003F912F910F900FBE0F901F901895109231
-:1076C0001C0181E08093D70080EA8093D80082E19A
-:1076D00089BD09B400FEFDCF80E98093D8008CE01D
-:1076E0008093E2001092E000089508950895DF93DA
-:1076F000CF930F92CDB7DEB71982CE010196B1DDDF
-:10770000898190E00F90CF91DF9108951F920F92A1
-:107710000FB60F921124EF92FF921F932F933F9376
-:107720004F935F936F937F938F939F93AF93BF9389
-:10773000EF93FF93DF93CF93CDB7DEB76197DEBFB3
-:10774000CDBF1092E9008091E80083FFECC0CE012C
-:10775000019668E00ADE82EF8093E800998197FF46
-:1077600005C08091E80080FFFCCF03C08EEF8093BE
-:10777000E800292F30E0C90180769070892B09F04C
-:10778000B3C08A81882329F41092F1001092F1008D
-:10779000BFC0813009F4BCC0833009F4B9C0853062
-:1077A00049F48091E80080FFFCCF8B818068809352
-:1077B000E300AEC0863009F06DC01C81EF80F88414
-:1077C0001230A9F51092E90010921E0110921D01CD
-:1077D0001092200110921F018ADF99E0FE01399674
-:1077E000DF01292F1D922A95E9F799871A8791E0E1
-:1077F0009E8790E8988B9AEF998B20911D0130918C
-:107800001E01275F3F4F3C872B878D871092E90031
-:1078100010921E0110921D01F0922001E0921F01B2
-:1078200080E0BF0149E050E0A4DE61DF71C010924A
-:10783000E90010921E0110921D01F0922001E092C9
-:107840001F01113071F488E0E816F10411F410936F
-:10785000210180912101882309F062C0EEE2F1E765
-:1078600013C0133009F058C08B81882319F4E0EF5E
-:10787000F0E70AC0823019F4E4EFF0E705C0813088
-:1078800009F04AC0E6E1F1E7449150E080E8BF0129
-:1078900070DE3EC0873009F43FC0883021F481E0BB
-:1078A0008093F10035C0893099F523703070232B17
-:1078B00099F5E3E5F1E791E031E026E39093E90003
-:1078C0003093EB0084918093EC002093ED009F5F58
-:1078D0003196943099F78EE78093EA001092EA008F
-:1078E0008B8180931C0114C08F8198851092E900D0
-:1078F00010921E0110921D019093200180931F0190
-:107900008D81882349F4CE010196BCDC882321F0C7
-:107910008EEF8093E80007C081E28093EB0003C004
-:10792000E0E4F1E7B1CF6196DEBFCDBFCF91DF914B
-:10793000FF91EF91BF91AF919F918F917F916F9147
-:107940005F914F913F912F911F91FF90EF900F907A
-:107950000FBE0F901F901895EE0FFF1F0590F4912A
-:08796000E02D0994F894FFCF1B
-:10796800FFFF00E1000000000000000000002339D4
-:08797800D3380F390D39F33843
+:1072F000089588E10FB6F8948093600010926000C2
+:107300000FBE3F9A209A6E9A90E890936100109277
+:10731000610081E885BF95BF01E005BF02E005BFC0
+:10732000769A289A479882E291E0BED1789420E933
+:1073300031E0479A84EC99E0F9013197F1F7019730
+:10734000D9F7479884EC99E0F9013197F1F7019763
+:10735000D9F7EFCFFC0104C08091F1008193615017
+:107360006623D1F7289884E680931B0108959FB780
+:10737000F89487708093E9008091F2009FBF089590
+:10738000282F80911C018823C1F057FF1AC015C017
+:10739000289890931B018091F1008193E217F307E5
+:1073A000B9F74115510539F08091F200882319F49D
+:1073B0008BE68093E800AFBF02C04FEF5FEFCA01DA
+:1073C0000895AFB7F89427702093E9008091F200F8
+:1073D000282F30E0241735070CF4A901FB019B018D
+:1073E000240F311D94E6DACFDF93CF930F92CDB700
+:1073F000DEB7BE016F5F7F4F41E050E0C1DF019714
+:1074000019F08FEF9FEF02C0898190E00F90CF912C
+:10741000DF9108952FB7F89487708093E9008091E9
+:10742000E80085FD02C090E004C08091F20090E485
+:10743000981B2FBF892F08954F925F926F927F9272
+:107440008F929F92AF92BF92CF92DF92EF92FF9274
+:107450000F931F93CF93DF93F82E6A0180911C0145
+:10746000882309F18B01EA016AEFE62E57E0552ED9
+:107470005F208F2D90E040E2842E912C882299226B
+:107480003AE3432E20E4A22EB12CA822B92280EAAE
+:10749000682E8FE0782E48C08F2DBCDF282F8823E0
+:1074A00049F4EA9419F44FEF5FEF46C0C301019726
+:1074B000F1F73AC090E0C817D9070CF42C2FC21B83
+:1074C000D1094FB7F8945092E9008114910421F446
+:1074D00006C01092F10021502223D9F719C0F7FC01
+:1074E00003C0F801922F10C0C801322F06C0FC0162
+:1074F0000196E491E093F10031503323C1F706C0C7
+:1075000081918093F10091509923D1F7020F111DC1
+:107510008091E80085FF05C0209729F4A114B104EB
+:1075200011F04092E8004FBF209709F0B5CF769850
+:1075300084E680931A01A601CA01DF91CF911F91C1
+:107540000F91FF90EF90DF90CF90BF90AF909F9002
+:107550008F907F906F905F904F9008950F931F933F
+:10756000182FFB01A0911F01B0912001BA010EEF6D
+:107570002AC017FF02C0949101C0908120911D0183
+:1075800030911E012A173B07ACF48091E80085700A
+:10759000E1F38091E80082FF03C04FEF5FEF16C078
+:1075A0009093F100C90101968F739070892B11F4AB
+:1075B0000093E8002F5F3F4F30931E0120931D0181
+:1075C0006150704031966115710599F6CA011F919D
+:1075D0000F910895CF93DF939C01EB018091E80018
+:1075E00082FFFCCFC9016C2FB5DE8BEF8093E800E2
+:1075F000CE01DF91CF9108958093E9008091F20050
+:10760000882319F08AE38093E80008951F920F926F
+:107610000FB60F9211242F933F938F938091E10027
+:107620001092E100282F83FF0FC01092E90081E043
+:107630008093EB001092EC0082E38093ED001092B7
+:107640001C0188E08093F00022FF26C083E0809335
+:10765000E9008091F200882319F08AE38093E80022
+:1076600080911A01882351F080911A0181508093F2
+:107670001A0180911A01882309F4769A80911B01DE
+:10768000882351F080911B01815080931B018091D0
+:107690001B01882309F4289A8F913F912F910F9015
+:1076A0000FBE0F901F90189510921C0181E08093DF
+:1076B000D70080EA8093D80082E189BD09B400FE3A
+:1076C000FDCF80E98093D8008CE08093E200109297
+:1076D000E000089508950895DF93CF930F92CDB7FA
+:1076E000DEB71982CE010196BCDD898190E00F9052
+:1076F000CF91DF9108951F920F920FB60F92112430
+:10770000EF92FF921F932F933F934F935F936F934B
+:107710007F938F939F93AF93BF93EF93FF93DF93E9
+:10772000CF93CDB7DEB76197DEBFCDBF1092E90032
+:107730008091E80083FFECC0CE01019668E00ADE8C
+:1077400082EF8093E800998197FF05C08091E8005F
+:1077500080FFFCCF03C08EEF8093E800292F30E03C
+:10776000C90180769070892B09F0B3C08A81882383
+:1077700029F41092F1001092F100BFC0813009F499
+:10778000BCC0833009F4B9C0853049F48091E80069
+:1077900080FFFCCF8B8180688093E300AEC0863091
+:1077A00009F06DC01C81EF80F8841230A9F51092A9
+:1077B000E90010921E0110921D01109220011092FA
+:1077C0001F018ADF99E0FE013996DF01292F1D9202
+:1077D0002A95E9F799871A8791E09E8790E8988B18
+:1077E0009AEF998B20911D0130911E01275F3F4F29
+:1077F0003C872B878D871092E90010921E01109212
+:107800001D01F0922001E0921F0180E0BF0149E0DC
+:1078100050E0A4DE61DF71C01092E90010921E01F9
+:1078200010921D01F0922001E0921F01113071F4BD
+:1078300088E0E816F10411F41093210180912101F0
+:10784000882309F062C0EEE2F1E713C0133009F0BB
+:1078500058C08B81882319F4E0EFF0E70AC082302A
+:1078600019F4E4EFF0E705C0813009F04AC0E6E121
+:10787000F1E7449150E080E8BF0170DE3EC0873000
+:1078800009F43FC0883021F481E08093F10035C0D5
+:10789000893099F523703070232B99F5E3E5F1E7F2
+:1078A00091E031E026E39093E9003093EB0084917E
+:1078B0008093EC002093ED009F5F3196943099F710
+:1078C0008EE78093EA001092EA008B8180931C017E
+:1078D00014C08F8198851092E90010921E011092B9
+:1078E0001D019093200180931F018D81882349F40D
+:1078F000CE010196C7DC882321F08EEF8093E8004B
+:1079000007C081E28093EB0003C0E0E4F1E7B1CF70
+:107910006196DEBFCDBFCF91DF91FF91EF91BF9117
+:10792000AF919F918F917F916F915F914F913F9117
+:107930002F911F91FF90EF900F900FBE0F901F900F
+:107940001895EE0FFF1F0590F491E02D0994F8941F
+:02795000FFCF67
+:10795200FFFF00E1000000000000000000002339EA
+:08796200D3380F390D39F33859
:040000030000700089
:00000001FF
diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
index 83ffc1b..efd386f 100644
--- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
+++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
@@ -19,6 +19,32 @@ void entrypoint(void)
::);
}
+u8 _flashbuf[128];
+
+void Program(u8 ep, u16 page, u8 count)
+{
+ u8 write = page < 30*1024; // Don't write over firmware please
+ if (write)
+ boot_page_erase(page);
+
+ USB_Recv(ep,_flashbuf,count); // Read while page is erasing
+
+ if (!write)
+ return;
+
+ boot_spm_busy_wait(); // Wait until the memory is erased.
+
+ count >>= 1;
+ u16* p = (u16*)page;
+ u16* b = (u16*)_flashbuf;
+ for (u8 i = 0; i < count; i++)
+ boot_page_fill(p++, b[i]);
+
+ boot_page_write(page);
+ boot_spm_busy_wait();
+ boot_rww_enable ();
+}
+
int main(void) __attribute__ ((naked));
int main()
{