diff --git a/misc/TaskList.ods b/misc/TaskList.ods new file mode 100644 index 0000000..ac8d67f Binary files /dev/null and b/misc/TaskList.ods differ diff --git a/samples/boot/BootIcon.aseprite b/samples/boot/BootIcon.aseprite new file mode 100644 index 0000000..e597f5b Binary files /dev/null and b/samples/boot/BootIcon.aseprite differ diff --git a/samples/boot/BootIcon.txt b/samples/boot/BootIcon.txt new file mode 100644 index 0000000..63e23df --- /dev/null +++ b/samples/boot/BootIcon.txt @@ -0,0 +1,294 @@ +Palette Indexed Picture +begin palette +256 +0 0 0 0 +0 0 65 255 +0 0 66 255 +0 1 66 255 +0 1 67 255 +0 1 68 255 +0 2 68 255 +0 2 69 255 +0 3 70 255 +0 3 72 255 +0 4 72 255 +0 4 73 255 +0 5 74 255 +0 5 75 255 +0 6 75 255 +0 6 77 255 +0 7 77 255 +0 6 78 255 +0 7 78 255 +0 7 80 255 +0 8 80 255 +0 9 81 255 +0 9 82 255 +0 8 83 255 +0 9 83 255 +0 10 83 255 +0 9 86 255 +0 11 87 255 +0 12 86 255 +0 10 91 255 +0 13 88 255 +0 12 90 255 +0 13 91 255 +0 14 90 255 +0 11 92 255 +0 11 95 255 +0 15 92 255 +0 15 93 255 +0 16 94 255 +0 10 96 255 +0 13 96 255 +0 15 96 255 +0 12 98 255 +0 12 99 255 +0 13 99 255 +0 11 103 255 +0 12 103 255 +0 11 105 255 +0 11 106 255 +1 11 111 255 +0 15 111 255 +0 18 99 255 +0 18 100 255 +0 16 102 255 +0 19 103 255 +0 16 105 255 +0 19 104 255 +0 18 106 255 +0 19 107 255 +0 20 107 255 +0 19 108 255 +2 9 112 255 +1 11 115 255 +0 13 113 255 +0 14 114 255 +0 14 115 255 +3 9 116 255 +1 11 117 255 +2 9 118 255 +2 10 119 255 +0 15 122 255 +5 11 124 255 +0 17 113 255 +0 21 112 255 +0 20 113 255 +0 17 119 255 +0 20 117 255 +0 17 123 255 +0 19 122 255 +0 19 123 255 +0 20 120 255 +0 18 124 255 +0 18 127 255 +3 10 128 255 +5 11 128 255 +1 12 128 255 +0 14 129 255 +0 15 130 255 +1 12 132 255 +1 13 132 255 +0 15 134 255 +6 12 133 255 +7 15 135 255 +5 10 138 255 +0 13 136 255 +0 14 137 255 +0 13 139 255 +7 11 140 255 +5 10 143 255 +0 13 140 255 +1 12 141 255 +0 13 141 255 +0 16 132 255 +0 16 133 255 +8 17 138 255 +0 10 146 255 +0 10 147 255 +7 10 144 255 +7 11 144 255 +1 9 149 255 +0 10 148 255 +3 10 148 255 +6 9 151 255 +1 7 156 255 +1 6 157 255 +2 6 157 255 +1 6 159 255 +1 8 153 255 +2 8 155 255 +5 9 152 255 +10 9 159 255 +10 18 145 255 +12 22 156 255 +12 25 153 255 +6 6 162 255 +3 4 164 255 +5 2 170 255 +6 3 171 255 +6 2 172 255 +8 4 170 255 +11 5 171 255 +12 7 171 255 +8 2 174 255 +9 3 175 255 +13 6 174 255 +15 10 172 255 +14 24 169 255 +9 2 176 255 +11 1 181 255 +13 0 186 255 +16 13 180 255 +16 2 185 255 +16 0 190 255 +20 8 189 255 +15 22 177 255 +16 18 181 255 +17 37 171 255 +19 44 175 255 +21 1 194 255 +22 4 194 255 +21 0 196 255 +23 0 198 255 +22 0 199 255 +23 0 199 255 +22 6 196 255 +24 0 202 255 +25 15 204 255 +29 3 209 255 +31 0 211 255 +30 13 215 255 +26 26 213 255 +35 1 218 255 +35 3 218 255 +36 1 218 255 +37 3 222 255 +38 2 222 255 +32 9 216 255 +21 49 192 255 +22 55 206 255 +24 40 216 255 +23 51 213 255 +44 3 230 255 +39 12 230 255 +45 4 233 255 +47 7 238 255 +43 15 238 255 +32 28 229 255 +36 23 233 255 +47 12 241 255 +45 15 241 255 +49 12 244 255 +47 27 251 255 +48 23 249 255 +30 50 237 255 +38 34 243 255 +33 47 243 255 +44 34 251 255 +39 41 249 255 +40 41 251 255 +40 46 253 255 +27 71 202 255 +33 94 222 255 +30 95 239 255 +29 75 240 255 +30 65 251 255 +28 79 249 255 +27 75 253 255 +27 75 254 255 +28 73 254 255 +32 64 254 255 +20 96 255 255 +24 102 253 255 +17 110 255 255 +15 122 255 255 +19 113 254 255 +29 113 251 255 +33 103 234 255 +38 112 226 255 +17 141 255 255 +27 140 254 255 +22 149 255 255 +35 142 251 255 +44 145 241 255 +43 155 248 255 +26 166 255 255 +38 172 254 255 +35 179 255 255 +52 181 250 255 +49 189 253 255 +46 196 254 255 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +0 0 0 0 +end palette +begin indices +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 47 39 39 29 20 220 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 61 61 61 61 61 47 39 39 29 20 19 220 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 70 83 83 93 105 105 93 83 61 47 29 20 9 220 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 83 121 122 136 144 145 140 135 120 93 83 61 39 20 9 9 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 104 123 146 167 168 170 169 160 156 143 131 112 83 61 39 20 9 9 0 0 0 0 0 0 0 +0 0 0 0 0 0 83 123 147 190 191 206 192 193 183 176 159 154 134 119 83 61 39 20 9 9 0 0 0 0 0 0 +0 0 0 0 0 70 121 146 190 207 212 213 211 205 195 185 177 166 149 130 111 83 47 39 20 9 220 0 0 0 0 0 +0 0 0 0 61 83 122 167 191 212 217 218 215 209 201 194 184 172 157 141 124 100 70 55 29 9 1 220 0 0 0 0 +0 0 0 0 61 83 136 168 206 213 218 219 216 210 204 196 187 175 162 148 129 109 87 72 39 20 9 1 0 0 0 0 +0 0 0 0 61 93 144 170 192 211 215 216 214 208 202 197 188 179 164 151 133 118 94 75 51 20 9 1 0 0 0 0 +0 0 0 47 61 105 145 169 193 205 209 210 208 203 200 199 186 178 165 153 137 115 96 77 57 29 9 1 220 0 0 0 +0 0 0 39 61 105 140 160 183 195 201 204 202 200 198 189 182 174 163 150 132 114 99 81 60 29 20 1 1 0 0 0 +0 0 0 39 47 93 135 156 176 185 194 196 197 199 189 181 180 171 158 142 127 117 95 78 58 29 20 1 1 0 0 0 +0 0 0 29 39 83 120 143 159 177 184 187 188 186 182 180 173 161 152 138 125 110 103 76 56 29 9 1 1 0 0 0 +0 0 0 20 39 61 93 131 154 166 172 175 179 178 174 171 161 155 139 126 113 101 82 74 51 20 9 1 1 0 0 0 +0 0 0 220 29 47 83 112 134 149 157 162 164 165 163 158 152 139 128 116 105 102 80 59 38 20 9 1 220 0 0 0 +0 0 0 0 20 29 61 83 119 130 141 148 151 153 150 142 138 126 116 106 90 79 73 52 29 9 1 1 0 0 0 0 +0 0 0 0 19 20 39 61 83 111 124 129 133 137 132 127 125 113 105 90 79 74 54 29 20 9 1 1 0 0 0 0 +0 0 0 0 220 9 20 39 61 83 100 109 118 115 114 117 110 101 102 79 74 54 29 20 9 1 1 220 0 0 0 0 +0 0 0 0 0 220 9 20 39 47 70 87 94 96 99 95 103 82 80 73 54 29 20 9 1 1 220 0 0 0 0 0 +0 0 0 0 0 0 9 9 20 39 55 72 75 77 81 78 76 74 59 52 29 20 9 1 1 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 9 9 20 29 39 51 57 60 58 56 51 38 29 20 9 1 1 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 9 9 9 20 20 29 29 29 29 20 20 9 9 1 1 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 220 1 9 9 9 20 20 9 9 9 1 1 1 220 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 220 1 1 1 1 1 1 1 1 1 1 220 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 220 1 1 1 1 220 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +end indices diff --git a/samples/boot/boot_clut.s b/samples/boot/boot_clut.s new file mode 100644 index 0000000..73d83fd --- /dev/null +++ b/samples/boot/boot_clut.s @@ -0,0 +1,257 @@ +boot_icon_clut: + .byte $00, $00, $00, $ff + .byte $41, $00, $00, $ff + .byte $42, $00, $00, $ff + .byte $42, $01, $00, $ff + .byte $43, $01, $00, $ff + .byte $44, $01, $00, $ff + .byte $44, $02, $00, $ff + .byte $45, $02, $00, $ff + .byte $46, $03, $00, $ff + .byte $48, $03, $00, $ff + .byte $48, $04, $00, $ff + .byte $49, $04, $00, $ff + .byte $4A, $05, $00, $ff + .byte $4B, $05, $00, $ff + .byte $4B, $06, $00, $ff + .byte $4D, $06, $00, $ff + .byte $4D, $07, $00, $ff + .byte $4E, $06, $00, $ff + .byte $4E, $07, $00, $ff + .byte $50, $07, $00, $ff + .byte $50, $08, $00, $ff + .byte $51, $09, $00, $ff + .byte $52, $09, $00, $ff + .byte $53, $08, $00, $ff + .byte $53, $09, $00, $ff + .byte $53, $0A, $00, $ff + .byte $56, $09, $00, $ff + .byte $57, $0B, $00, $ff + .byte $56, $0C, $00, $ff + .byte $5B, $0A, $00, $ff + .byte $58, $0D, $00, $ff + .byte $5A, $0C, $00, $ff + .byte $5B, $0D, $00, $ff + .byte $5A, $0E, $00, $ff + .byte $5C, $0B, $00, $ff + .byte $5F, $0B, $00, $ff + .byte $5C, $0F, $00, $ff + .byte $5D, $0F, $00, $ff + .byte $5E, $10, $00, $ff + .byte $60, $0A, $00, $ff + .byte $60, $0D, $00, $ff + .byte $60, $0F, $00, $ff + .byte $62, $0C, $00, $ff + .byte $63, $0C, $00, $ff + .byte $63, $0D, $00, $ff + .byte $67, $0B, $00, $ff + .byte $67, $0C, $00, $ff + .byte $69, $0B, $00, $ff + .byte $6A, $0B, $00, $ff + .byte $6F, $0B, $01, $ff + .byte $6F, $0F, $00, $ff + .byte $63, $12, $00, $ff + .byte $64, $12, $00, $ff + .byte $66, $10, $00, $ff + .byte $67, $13, $00, $ff + .byte $69, $10, $00, $ff + .byte $68, $13, $00, $ff + .byte $6A, $12, $00, $ff + .byte $6B, $13, $00, $ff + .byte $6B, $14, $00, $ff + .byte $6C, $13, $00, $ff + .byte $70, $09, $02, $ff + .byte $73, $0B, $01, $ff + .byte $71, $0D, $00, $ff + .byte $72, $0E, $00, $ff + .byte $73, $0E, $00, $ff + .byte $74, $09, $03, $ff + .byte $75, $0B, $01, $ff + .byte $76, $09, $02, $ff + .byte $77, $0A, $02, $ff + .byte $7A, $0F, $00, $ff + .byte $7C, $0B, $05, $ff + .byte $71, $11, $00, $ff + .byte $70, $15, $00, $ff + .byte $71, $14, $00, $ff + .byte $77, $11, $00, $ff + .byte $75, $14, $00, $ff + .byte $7B, $11, $00, $ff + .byte $7A, $13, $00, $ff + .byte $7B, $13, $00, $ff + .byte $78, $14, $00, $ff + .byte $7C, $12, $00, $ff + .byte $7F, $12, $00, $ff + .byte $80, $0A, $03, $ff + .byte $80, $0B, $05, $ff + .byte $80, $0C, $01, $ff + .byte $81, $0E, $00, $ff + .byte $82, $0F, $00, $ff + .byte $84, $0C, $01, $ff + .byte $84, $0D, $01, $ff + .byte $86, $0F, $00, $ff + .byte $85, $0C, $06, $ff + .byte $87, $0F, $07, $ff + .byte $8A, $0A, $05, $ff + .byte $88, $0D, $00, $ff + .byte $89, $0E, $00, $ff + .byte $8B, $0D, $00, $ff + .byte $8C, $0B, $07, $ff + .byte $8F, $0A, $05, $ff + .byte $8C, $0D, $00, $ff + .byte $8D, $0C, $01, $ff + .byte $8D, $0D, $00, $ff + .byte $84, $10, $00, $ff + .byte $85, $10, $00, $ff + .byte $8A, $11, $08, $ff + .byte $92, $0A, $00, $ff + .byte $93, $0A, $00, $ff + .byte $90, $0A, $07, $ff + .byte $90, $0B, $07, $ff + .byte $95, $09, $01, $ff + .byte $94, $0A, $00, $ff + .byte $94, $0A, $03, $ff + .byte $97, $09, $06, $ff + .byte $9C, $07, $01, $ff + .byte $9D, $06, $01, $ff + .byte $9D, $06, $02, $ff + .byte $9F, $06, $01, $ff + .byte $99, $08, $01, $ff + .byte $9B, $08, $02, $ff + .byte $98, $09, $05, $ff + .byte $9F, $09, $0A, $ff + .byte $91, $12, $0A, $ff + .byte $9C, $16, $0C, $ff + .byte $99, $19, $0C, $ff + .byte $A2, $06, $06, $ff + .byte $A4, $04, $03, $ff + .byte $AA, $02, $05, $ff + .byte $AB, $03, $06, $ff + .byte $AC, $02, $06, $ff + .byte $AA, $04, $08, $ff + .byte $AB, $05, $0B, $ff + .byte $AB, $07, $0C, $ff + .byte $AE, $02, $08, $ff + .byte $AF, $03, $09, $ff + .byte $AE, $06, $0D, $ff + .byte $AC, $0A, $0F, $ff + .byte $A9, $18, $0E, $ff + .byte $B0, $02, $09, $ff + .byte $B5, $01, $0B, $ff + .byte $BA, $00, $0D, $ff + .byte $B4, $0D, $10, $ff + .byte $B9, $02, $10, $ff + .byte $BE, $00, $10, $ff + .byte $BD, $08, $14, $ff + .byte $B1, $16, $0F, $ff + .byte $B5, $12, $10, $ff + .byte $AB, $25, $11, $ff + .byte $AF, $2C, $13, $ff + .byte $C2, $01, $15, $ff + .byte $C2, $04, $16, $ff + .byte $C4, $00, $15, $ff + .byte $C6, $00, $17, $ff + .byte $C7, $00, $16, $ff + .byte $C7, $00, $17, $ff + .byte $C4, $06, $16, $ff + .byte $CA, $00, $18, $ff + .byte $CC, $0F, $19, $ff + .byte $D1, $03, $1D, $ff + .byte $D3, $00, $1F, $ff + .byte $D7, $0D, $1E, $ff + .byte $D5, $1A, $1A, $ff + .byte $DA, $01, $23, $ff + .byte $DA, $03, $23, $ff + .byte $DA, $01, $24, $ff + .byte $DE, $03, $25, $ff + .byte $DE, $02, $26, $ff + .byte $D8, $09, $20, $ff + .byte $C0, $31, $15, $ff + .byte $CE, $37, $16, $ff + .byte $D8, $28, $18, $ff + .byte $D5, $33, $17, $ff + .byte $E6, $03, $2C, $ff + .byte $E6, $0C, $27, $ff + .byte $E9, $04, $2D, $ff + .byte $EE, $07, $2F, $ff + .byte $EE, $0F, $2B, $ff + .byte $E5, $1C, $20, $ff + .byte $E9, $17, $24, $ff + .byte $F1, $0C, $2F, $ff + .byte $F1, $0F, $2D, $ff + .byte $F4, $0C, $31, $ff + .byte $FB, $1B, $2F, $ff + .byte $F9, $17, $30, $ff + .byte $ED, $32, $1E, $ff + .byte $F3, $22, $26, $ff + .byte $F3, $2F, $21, $ff + .byte $FB, $22, $2C, $ff + .byte $F9, $29, $27, $ff + .byte $FB, $29, $28, $ff + .byte $FD, $2E, $28, $ff + .byte $CA, $47, $1B, $ff + .byte $DE, $5E, $21, $ff + .byte $EF, $5F, $1E, $ff + .byte $F0, $4B, $1D, $ff + .byte $FB, $41, $1E, $ff + .byte $F9, $4F, $1C, $ff + .byte $FD, $4B, $1B, $ff + .byte $FE, $4B, $1B, $ff + .byte $FE, $49, $1C, $ff + .byte $FE, $40, $20, $ff + .byte $FF, $60, $14, $ff + .byte $FD, $66, $18, $ff + .byte $FF, $6E, $11, $ff + .byte $FF, $7A, $0F, $ff + .byte $FE, $71, $13, $ff + .byte $FB, $71, $1D, $ff + .byte $EA, $67, $21, $ff + .byte $E2, $70, $26, $ff + .byte $FF, $8D, $11, $ff + .byte $FE, $8C, $1B, $ff + .byte $FF, $95, $16, $ff + .byte $FB, $8E, $23, $ff + .byte $F1, $91, $2C, $ff + .byte $F8, $9B, $2B, $ff + .byte $FF, $A6, $1A, $ff + .byte $FE, $AC, $26, $ff + .byte $FF, $B3, $23, $ff + .byte $FA, $B5, $34, $ff + .byte $FD, $BD, $31, $ff + .byte $FE, $C4, $2E, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff + .byte $00, $00, $00, $ff diff --git a/samples/boot/boot_icon.s b/samples/boot/boot_icon.s new file mode 100644 index 0000000..343329d --- /dev/null +++ b/samples/boot/boot_icon.s @@ -0,0 +1,33 @@ +boot_icon_pixels: + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $2F, $27, $27, $1D, $14, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $3D, $3D, $3D, $3D, $3D, $2F, $27, $27, $1D, $14, $13, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $46, $53, $53, $5D, $69, $69, $5D, $53, $3D, $2F, $1D, $14, $09, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $53, $79, $7A, $88, $90, $91, $8C, $87, $78, $5D, $53, $3D, $27, $14, $09, $09, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $68, $7B, $92, $A7, $A8, $AA, $A9, $A0, $9C, $8F, $83, $70, $53, $3D, $27, $14, $09, $09, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $53, $7B, $93, $BE, $BF, $CE, $C0, $C1, $B7, $B0, $9F, $9A, $86, $77, $53, $3D, $27, $14, $09, $09, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $46, $79, $92, $BE, $CF, $D4, $D5, $D3, $CD, $C3, $B9, $B1, $A6, $95, $82, $6F, $53, $2F, $27, $14, $09, $DC, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $3D, $53, $7A, $A7, $BF, $D4, $D9, $DA, $D7, $D1, $C9, $C2, $B8, $AC, $9D, $8D, $7C, $64, $46, $37, $1D, $09, $01, $DC, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $3D, $53, $88, $A8, $CE, $D5, $DA, $DB, $D8, $D2, $CC, $C4, $BB, $AF, $A2, $94, $81, $6D, $57, $48, $27, $14, $09, $01, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $3D, $5D, $90, $AA, $C0, $D3, $D7, $D8, $D6, $D0, $CA, $C5, $BC, $B3, $A4, $97, $85, $76, $5E, $4B, $33, $14, $09, $01, $00, $00, $00, $00 + .byte $00, $00, $00, $2F, $3D, $69, $91, $A9, $C1, $CD, $D1, $D2, $D0, $CB, $C8, $C7, $BA, $B2, $A5, $99, $89, $73, $60, $4D, $39, $1D, $09, $01, $DC, $00, $00, $00 + .byte $00, $00, $00, $27, $3D, $69, $8C, $A0, $B7, $C3, $C9, $CC, $CA, $C8, $C6, $BD, $B6, $AE, $A3, $96, $84, $72, $63, $51, $3C, $1D, $14, $01, $01, $00, $00, $00 + .byte $00, $00, $00, $27, $2F, $5D, $87, $9C, $B0, $B9, $C2, $C4, $C5, $C7, $BD, $B5, $B4, $AB, $9E, $8E, $7F, $75, $5F, $4E, $3A, $1D, $14, $01, $01, $00, $00, $00 + .byte $00, $00, $00, $1D, $27, $53, $78, $8F, $9F, $B1, $B8, $BB, $BC, $BA, $B6, $B4, $AD, $A1, $98, $8A, $7D, $6E, $67, $4C, $38, $1D, $09, $01, $01, $00, $00, $00 + .byte $00, $00, $00, $14, $27, $3D, $5D, $83, $9A, $A6, $AC, $AF, $B3, $B2, $AE, $AB, $A1, $9B, $8B, $7E, $71, $65, $52, $4A, $33, $14, $09, $01, $01, $00, $00, $00 + .byte $00, $00, $00, $DC, $1D, $2F, $53, $70, $86, $95, $9D, $A2, $A4, $A5, $A3, $9E, $98, $8B, $80, $74, $69, $66, $50, $3B, $26, $14, $09, $01, $DC, $00, $00, $00 + .byte $00, $00, $00, $00, $14, $1D, $3D, $53, $77, $82, $8D, $94, $97, $99, $96, $8E, $8A, $7E, $74, $6A, $5A, $4F, $49, $34, $1D, $09, $01, $01, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $13, $14, $27, $3D, $53, $6F, $7C, $81, $85, $89, $84, $7F, $7D, $71, $69, $5A, $4F, $4A, $36, $1D, $14, $09, $01, $01, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $DC, $09, $14, $27, $3D, $53, $64, $6D, $76, $73, $72, $75, $6E, $65, $66, $4F, $4A, $36, $1D, $14, $09, $01, $01, $DC, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $DC, $09, $14, $27, $2F, $46, $57, $5E, $60, $63, $5F, $67, $52, $50, $49, $36, $1D, $14, $09, $01, $01, $DC, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $09, $09, $14, $27, $37, $48, $4B, $4D, $51, $4E, $4C, $4A, $3B, $34, $1D, $14, $09, $01, $01, $01, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $09, $09, $14, $1D, $27, $33, $39, $3C, $3A, $38, $33, $26, $1D, $14, $09, $01, $01, $01, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $09, $09, $09, $14, $14, $1D, $1D, $1D, $1D, $14, $14, $09, $09, $01, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $DC, $01, $09, $09, $09, $14, $14, $09, $09, $09, $01, $01, $01, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $DC, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $DC, $01, $01, $01, $01, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 diff --git a/samples/boot/build_boot.bat b/samples/boot/build_boot.bat new file mode 100644 index 0000000..52b6bca --- /dev/null +++ b/samples/boot/build_boot.bat @@ -0,0 +1 @@ +64tass -b --list sample_boot.lst -o sample_boot.bin sample_boot.s diff --git a/samples/boot/extract_clut.py b/samples/boot/extract_clut.py new file mode 100644 index 0000000..7936408 --- /dev/null +++ b/samples/boot/extract_clut.py @@ -0,0 +1,24 @@ +import re +import sys + +mode = 0 + +with open("boot_clut.s", "w") as clut_file: + clut_file.write("boot_icon_clut:\n") + with open("BootIcon.txt", "r") as sprite_data: + for line in sprite_data: + if re.match(r'^begin palette', line): + mode = 1 + + elif re.match(r'end palette', line): + break + + else: + m = re.match(r'^(\d+)\s+(\d+)\s+(\d+)\s+', line) + if m: + red = int(m.group(1)) + green = int(m.group(2)) + blue = int(m.group(3)) + clut_line = "\t.byte ${0:02X}, ${1:02X}, ${2:02X}, $ff\n".format(blue, green, red) + clut_file.write(clut_line) + diff --git a/samples/boot/extract_indicies.py b/samples/boot/extract_indicies.py new file mode 100644 index 0000000..b94b295 --- /dev/null +++ b/samples/boot/extract_indicies.py @@ -0,0 +1,31 @@ +import re +import sys + +mode = 0 + +input_file = "BootIcon.txt" +out_file = "boot_icon.s" + +with open(out_file, "w") as index_file: + index_file.write("boot_icon_pixels:\n") + with open(input_file, "r") as sprite_data: + for line in sprite_data: + if re.match(r'^begin indices', line): + mode = 1 + + elif re.match(r'end indices', line): + break + + elif mode == 1: + indices = re.findall(r'\d+', line) + index_file.write("\t.byte ") + first = True + for index in indices: + value = int(index) + if first: + index_file.write("${0:02X}".format(value)) + first = False + else: + index_file.write(", ${0:02X}".format(value)) + index_file.write("\n") + diff --git a/samples/boot/sample_boot.bin b/samples/boot/sample_boot.bin new file mode 100644 index 0000000..793ab37 Binary files /dev/null and b/samples/boot/sample_boot.bin differ diff --git a/samples/boot/sample_boot.lst b/samples/boot/sample_boot.lst new file mode 100644 index 0000000..492d5d1 --- /dev/null +++ b/samples/boot/sample_boot.lst @@ -0,0 +1,406 @@ + +; 64tass Turbo Assembler Macro V1.58.2974 listing file +; 64tass -b --list sample_boot.lst -o sample_boot.bin sample_boot.s +; Sat Aug 24 16:48:34 2024 + +;Offset ;PC ;Hex ;Monitor ;Source + +;****** Processing input file: sample_boot.s + +=$f04000 vky_text = $f04000 +=$f01000 vky_mst_ctrl_0 = $f01000 +>0000 f40000 f8 16 header: .byte $f8, $16 ; Signature +>0002 f40002 00 .byte 0 ; Version +>0003 f40003 1b 00 f4 00 .dword start ; Starting address +>0007 f40007 55 04 f4 00 .dword boot_icon_pixels ; Boot Icon pixels (0 = none) +>000b f4000b 55 00 f4 00 .dword boot_icon_clut ; CLUT address (0 = none) +>000f f4000f 73 61 6d 70 6c 65 5f 62 .null "sample_boot" +>0017 f40017 6f 6f 74 00 +.001b f4001b e2 20 sep #$20 start: sep #$20 +.001d f4001d c2 10 rep #$10 rep #$10 +.001f f4001f a9 01 lda #$01 lda #$01 +.0021 f40021 8f 00 10 f0 sta $f01000 sta vky_mst_ctrl_0 +.0025 f40025 a9 20 lda #$20 lda #' ' +.0027 f40027 a2 00 00 ldx #$0000 ldx #0 +.002a f4002a 9f 00 40 f0 sta $f04000,x clrloop1: sta @l vky_text,x +.002e f4002e e8 inx inx +.002f f4002f e0 00 20 cpx #$2000 cpx #$2000 +.0032 f40032 d0 f6 bne $f4002a bne clrloop1 +.0034 f40034 a2 00 00 ldx #$0000 ldx #0 +.0037 f40037 bf 47 00 f4 lda $f40047,x putloop: lda @l message,x +.003b f4003b f0 07 beq $f40044 beq done +.003d f4003d 9f 00 40 f0 sta $f04000,x sta @l vky_text,x +.0041 f40041 e8 inx inx +.0042 f40042 80 f3 bra $f40037 bra putloop +.0044 f40044 ea nop done: nop +.0045 f40045 80 fd bra $f40044 bra done +>0047 f40047 48 65 6c 6c 6f 2c 20 77 message: .null 'Hello, world!' +>004f f4004f 6f 72 6c 64 21 00 + +;****** Processing file: boot_clut.s + +.0055 f40055 boot_icon_clut: +>0055 f40055 00 00 00 ff .byte $00, $00, $00, $ff +>0059 f40059 41 00 00 ff .byte $41, $00, $00, $ff +>005d f4005d 42 00 00 ff .byte $42, $00, $00, $ff +>0061 f40061 42 01 00 ff .byte $42, $01, $00, $ff +>0065 f40065 43 01 00 ff .byte $43, $01, $00, $ff +>0069 f40069 44 01 00 ff .byte $44, $01, $00, $ff +>006d f4006d 44 02 00 ff .byte $44, $02, $00, $ff +>0071 f40071 45 02 00 ff .byte $45, $02, $00, $ff +>0075 f40075 46 03 00 ff .byte $46, $03, $00, $ff +>0079 f40079 48 03 00 ff .byte $48, $03, $00, $ff +>007d f4007d 48 04 00 ff .byte $48, $04, $00, $ff +>0081 f40081 49 04 00 ff .byte $49, $04, $00, $ff +>0085 f40085 4a 05 00 ff .byte $4A, $05, $00, $ff +>0089 f40089 4b 05 00 ff .byte $4B, $05, $00, $ff +>008d f4008d 4b 06 00 ff .byte $4B, $06, $00, $ff +>0091 f40091 4d 06 00 ff .byte $4D, $06, $00, $ff +>0095 f40095 4d 07 00 ff .byte $4D, $07, $00, $ff +>0099 f40099 4e 06 00 ff .byte $4E, $06, $00, $ff +>009d f4009d 4e 07 00 ff .byte $4E, $07, $00, $ff +>00a1 f400a1 50 07 00 ff .byte $50, $07, $00, $ff +>00a5 f400a5 50 08 00 ff .byte $50, $08, $00, $ff +>00a9 f400a9 51 09 00 ff .byte $51, $09, $00, $ff +>00ad f400ad 52 09 00 ff .byte $52, $09, $00, $ff +>00b1 f400b1 53 08 00 ff .byte $53, $08, $00, $ff +>00b5 f400b5 53 09 00 ff .byte $53, $09, $00, $ff +>00b9 f400b9 53 0a 00 ff .byte $53, $0A, $00, $ff +>00bd f400bd 56 09 00 ff .byte $56, $09, $00, $ff +>00c1 f400c1 57 0b 00 ff .byte $57, $0B, $00, $ff +>00c5 f400c5 56 0c 00 ff .byte $56, $0C, $00, $ff +>00c9 f400c9 5b 0a 00 ff .byte $5B, $0A, $00, $ff +>00cd f400cd 58 0d 00 ff .byte $58, $0D, $00, $ff +>00d1 f400d1 5a 0c 00 ff .byte $5A, $0C, $00, $ff +>00d5 f400d5 5b 0d 00 ff .byte $5B, $0D, $00, $ff +>00d9 f400d9 5a 0e 00 ff .byte $5A, $0E, $00, $ff +>00dd f400dd 5c 0b 00 ff .byte $5C, $0B, $00, $ff +>00e1 f400e1 5f 0b 00 ff .byte $5F, $0B, $00, $ff +>00e5 f400e5 5c 0f 00 ff .byte $5C, $0F, $00, $ff +>00e9 f400e9 5d 0f 00 ff .byte $5D, $0F, $00, $ff +>00ed f400ed 5e 10 00 ff .byte $5E, $10, $00, $ff +>00f1 f400f1 60 0a 00 ff .byte $60, $0A, $00, $ff +>00f5 f400f5 60 0d 00 ff .byte $60, $0D, $00, $ff +>00f9 f400f9 60 0f 00 ff .byte $60, $0F, $00, $ff +>00fd f400fd 62 0c 00 ff .byte $62, $0C, $00, $ff +>0101 f40101 63 0c 00 ff .byte $63, $0C, $00, $ff +>0105 f40105 63 0d 00 ff .byte $63, $0D, $00, $ff +>0109 f40109 67 0b 00 ff .byte $67, $0B, $00, $ff +>010d f4010d 67 0c 00 ff .byte $67, $0C, $00, $ff +>0111 f40111 69 0b 00 ff .byte $69, $0B, $00, $ff +>0115 f40115 6a 0b 00 ff .byte $6A, $0B, $00, $ff +>0119 f40119 6f 0b 01 ff .byte $6F, $0B, $01, $ff +>011d f4011d 6f 0f 00 ff .byte $6F, $0F, $00, $ff +>0121 f40121 63 12 00 ff .byte $63, $12, $00, $ff +>0125 f40125 64 12 00 ff .byte $64, $12, $00, $ff +>0129 f40129 66 10 00 ff .byte $66, $10, $00, $ff +>012d f4012d 67 13 00 ff .byte $67, $13, $00, $ff +>0131 f40131 69 10 00 ff .byte $69, $10, $00, $ff +>0135 f40135 68 13 00 ff .byte $68, $13, $00, $ff +>0139 f40139 6a 12 00 ff .byte $6A, $12, $00, $ff +>013d f4013d 6b 13 00 ff .byte $6B, $13, $00, $ff +>0141 f40141 6b 14 00 ff .byte $6B, $14, $00, $ff +>0145 f40145 6c 13 00 ff .byte $6C, $13, $00, $ff +>0149 f40149 70 09 02 ff .byte $70, $09, $02, $ff +>014d f4014d 73 0b 01 ff .byte $73, $0B, $01, $ff +>0151 f40151 71 0d 00 ff .byte $71, $0D, $00, $ff +>0155 f40155 72 0e 00 ff .byte $72, $0E, $00, $ff +>0159 f40159 73 0e 00 ff .byte $73, $0E, $00, $ff +>015d f4015d 74 09 03 ff .byte $74, $09, $03, $ff +>0161 f40161 75 0b 01 ff .byte $75, $0B, $01, $ff +>0165 f40165 76 09 02 ff .byte $76, $09, $02, $ff +>0169 f40169 77 0a 02 ff .byte $77, $0A, $02, $ff +>016d f4016d 7a 0f 00 ff .byte $7A, $0F, $00, $ff +>0171 f40171 7c 0b 05 ff .byte $7C, $0B, $05, $ff +>0175 f40175 71 11 00 ff .byte $71, $11, $00, $ff +>0179 f40179 70 15 00 ff .byte $70, $15, $00, $ff +>017d f4017d 71 14 00 ff .byte $71, $14, $00, $ff +>0181 f40181 77 11 00 ff .byte $77, $11, $00, $ff +>0185 f40185 75 14 00 ff .byte $75, $14, $00, $ff +>0189 f40189 7b 11 00 ff .byte $7B, $11, $00, $ff +>018d f4018d 7a 13 00 ff .byte $7A, $13, $00, $ff +>0191 f40191 7b 13 00 ff .byte $7B, $13, $00, $ff +>0195 f40195 78 14 00 ff .byte $78, $14, $00, $ff +>0199 f40199 7c 12 00 ff .byte $7C, $12, $00, $ff +>019d f4019d 7f 12 00 ff .byte $7F, $12, $00, $ff +>01a1 f401a1 80 0a 03 ff .byte $80, $0A, $03, $ff +>01a5 f401a5 80 0b 05 ff .byte $80, $0B, $05, $ff +>01a9 f401a9 80 0c 01 ff .byte $80, $0C, $01, $ff +>01ad f401ad 81 0e 00 ff .byte $81, $0E, $00, $ff +>01b1 f401b1 82 0f 00 ff .byte $82, $0F, $00, $ff +>01b5 f401b5 84 0c 01 ff .byte $84, $0C, $01, $ff +>01b9 f401b9 84 0d 01 ff .byte $84, $0D, $01, $ff +>01bd f401bd 86 0f 00 ff .byte $86, $0F, $00, $ff +>01c1 f401c1 85 0c 06 ff .byte $85, $0C, $06, $ff +>01c5 f401c5 87 0f 07 ff .byte $87, $0F, $07, $ff +>01c9 f401c9 8a 0a 05 ff .byte $8A, $0A, $05, $ff +>01cd f401cd 88 0d 00 ff .byte $88, $0D, $00, $ff +>01d1 f401d1 89 0e 00 ff .byte $89, $0E, $00, $ff +>01d5 f401d5 8b 0d 00 ff .byte $8B, $0D, $00, $ff +>01d9 f401d9 8c 0b 07 ff .byte $8C, $0B, $07, $ff +>01dd f401dd 8f 0a 05 ff .byte $8F, $0A, $05, $ff +>01e1 f401e1 8c 0d 00 ff .byte $8C, $0D, $00, $ff +>01e5 f401e5 8d 0c 01 ff .byte $8D, $0C, $01, $ff +>01e9 f401e9 8d 0d 00 ff .byte $8D, $0D, $00, $ff +>01ed f401ed 84 10 00 ff .byte $84, $10, $00, $ff +>01f1 f401f1 85 10 00 ff .byte $85, $10, $00, $ff +>01f5 f401f5 8a 11 08 ff .byte $8A, $11, $08, $ff +>01f9 f401f9 92 0a 00 ff .byte $92, $0A, $00, $ff +>01fd f401fd 93 0a 00 ff .byte $93, $0A, $00, $ff +>0201 f40201 90 0a 07 ff .byte $90, $0A, $07, $ff +>0205 f40205 90 0b 07 ff .byte $90, $0B, $07, $ff +>0209 f40209 95 09 01 ff .byte $95, $09, $01, $ff +>020d f4020d 94 0a 00 ff .byte $94, $0A, $00, $ff +>0211 f40211 94 0a 03 ff .byte $94, $0A, $03, $ff +>0215 f40215 97 09 06 ff .byte $97, $09, $06, $ff +>0219 f40219 9c 07 01 ff .byte $9C, $07, $01, $ff +>021d f4021d 9d 06 01 ff .byte $9D, $06, $01, $ff +>0221 f40221 9d 06 02 ff .byte $9D, $06, $02, $ff +>0225 f40225 9f 06 01 ff .byte $9F, $06, $01, $ff +>0229 f40229 99 08 01 ff .byte $99, $08, $01, $ff +>022d f4022d 9b 08 02 ff .byte $9B, $08, $02, $ff +>0231 f40231 98 09 05 ff .byte $98, $09, $05, $ff +>0235 f40235 9f 09 0a ff .byte $9F, $09, $0A, $ff +>0239 f40239 91 12 0a ff .byte $91, $12, $0A, $ff +>023d f4023d 9c 16 0c ff .byte $9C, $16, $0C, $ff +>0241 f40241 99 19 0c ff .byte $99, $19, $0C, $ff +>0245 f40245 a2 06 06 ff .byte $A2, $06, $06, $ff +>0249 f40249 a4 04 03 ff .byte $A4, $04, $03, $ff +>024d f4024d aa 02 05 ff .byte $AA, $02, $05, $ff +>0251 f40251 ab 03 06 ff .byte $AB, $03, $06, $ff +>0255 f40255 ac 02 06 ff .byte $AC, $02, $06, $ff +>0259 f40259 aa 04 08 ff .byte $AA, $04, $08, $ff +>025d f4025d ab 05 0b ff .byte $AB, $05, $0B, $ff +>0261 f40261 ab 07 0c ff .byte $AB, $07, $0C, $ff +>0265 f40265 ae 02 08 ff .byte $AE, $02, $08, $ff +>0269 f40269 af 03 09 ff .byte $AF, $03, $09, $ff +>026d f4026d ae 06 0d ff .byte $AE, $06, $0D, $ff +>0271 f40271 ac 0a 0f ff .byte $AC, $0A, $0F, $ff +>0275 f40275 a9 18 0e ff .byte $A9, $18, $0E, $ff +>0279 f40279 b0 02 09 ff .byte $B0, $02, $09, $ff +>027d f4027d b5 01 0b ff .byte $B5, $01, $0B, $ff +>0281 f40281 ba 00 0d ff .byte $BA, $00, $0D, $ff +>0285 f40285 b4 0d 10 ff .byte $B4, $0D, $10, $ff +>0289 f40289 b9 02 10 ff .byte $B9, $02, $10, $ff +>028d f4028d be 00 10 ff .byte $BE, $00, $10, $ff +>0291 f40291 bd 08 14 ff .byte $BD, $08, $14, $ff +>0295 f40295 b1 16 0f ff .byte $B1, $16, $0F, $ff +>0299 f40299 b5 12 10 ff .byte $B5, $12, $10, $ff +>029d f4029d ab 25 11 ff .byte $AB, $25, $11, $ff +>02a1 f402a1 af 2c 13 ff .byte $AF, $2C, $13, $ff +>02a5 f402a5 c2 01 15 ff .byte $C2, $01, $15, $ff +>02a9 f402a9 c2 04 16 ff .byte $C2, $04, $16, $ff +>02ad f402ad c4 00 15 ff .byte $C4, $00, $15, $ff +>02b1 f402b1 c6 00 17 ff .byte $C6, $00, $17, $ff +>02b5 f402b5 c7 00 16 ff .byte $C7, $00, $16, $ff +>02b9 f402b9 c7 00 17 ff .byte $C7, $00, $17, $ff +>02bd f402bd c4 06 16 ff .byte $C4, $06, $16, $ff +>02c1 f402c1 ca 00 18 ff .byte $CA, $00, $18, $ff +>02c5 f402c5 cc 0f 19 ff .byte $CC, $0F, $19, $ff +>02c9 f402c9 d1 03 1d ff .byte $D1, $03, $1D, $ff +>02cd f402cd d3 00 1f ff .byte $D3, $00, $1F, $ff +>02d1 f402d1 d7 0d 1e ff .byte $D7, $0D, $1E, $ff +>02d5 f402d5 d5 1a 1a ff .byte $D5, $1A, $1A, $ff +>02d9 f402d9 da 01 23 ff .byte $DA, $01, $23, $ff +>02dd f402dd da 03 23 ff .byte $DA, $03, $23, $ff +>02e1 f402e1 da 01 24 ff .byte $DA, $01, $24, $ff +>02e5 f402e5 de 03 25 ff .byte $DE, $03, $25, $ff +>02e9 f402e9 de 02 26 ff .byte $DE, $02, $26, $ff +>02ed f402ed d8 09 20 ff .byte $D8, $09, $20, $ff +>02f1 f402f1 c0 31 15 ff .byte $C0, $31, $15, $ff +>02f5 f402f5 ce 37 16 ff .byte $CE, $37, $16, $ff +>02f9 f402f9 d8 28 18 ff .byte $D8, $28, $18, $ff +>02fd f402fd d5 33 17 ff .byte $D5, $33, $17, $ff +>0301 f40301 e6 03 2c ff .byte $E6, $03, $2C, $ff +>0305 f40305 e6 0c 27 ff .byte $E6, $0C, $27, $ff +>0309 f40309 e9 04 2d ff .byte $E9, $04, $2D, $ff +>030d f4030d ee 07 2f ff .byte $EE, $07, $2F, $ff +>0311 f40311 ee 0f 2b ff .byte $EE, $0F, $2B, $ff +>0315 f40315 e5 1c 20 ff .byte $E5, $1C, $20, $ff +>0319 f40319 e9 17 24 ff .byte $E9, $17, $24, $ff +>031d f4031d f1 0c 2f ff .byte $F1, $0C, $2F, $ff +>0321 f40321 f1 0f 2d ff .byte $F1, $0F, $2D, $ff +>0325 f40325 f4 0c 31 ff .byte $F4, $0C, $31, $ff +>0329 f40329 fb 1b 2f ff .byte $FB, $1B, $2F, $ff +>032d f4032d f9 17 30 ff .byte $F9, $17, $30, $ff +>0331 f40331 ed 32 1e ff .byte $ED, $32, $1E, $ff +>0335 f40335 f3 22 26 ff .byte $F3, $22, $26, $ff +>0339 f40339 f3 2f 21 ff .byte $F3, $2F, $21, $ff +>033d f4033d fb 22 2c ff .byte $FB, $22, $2C, $ff +>0341 f40341 f9 29 27 ff .byte $F9, $29, $27, $ff +>0345 f40345 fb 29 28 ff .byte $FB, $29, $28, $ff +>0349 f40349 fd 2e 28 ff .byte $FD, $2E, $28, $ff +>034d f4034d ca 47 1b ff .byte $CA, $47, $1B, $ff +>0351 f40351 de 5e 21 ff .byte $DE, $5E, $21, $ff +>0355 f40355 ef 5f 1e ff .byte $EF, $5F, $1E, $ff +>0359 f40359 f0 4b 1d ff .byte $F0, $4B, $1D, $ff +>035d f4035d fb 41 1e ff .byte $FB, $41, $1E, $ff +>0361 f40361 f9 4f 1c ff .byte $F9, $4F, $1C, $ff +>0365 f40365 fd 4b 1b ff .byte $FD, $4B, $1B, $ff +>0369 f40369 fe 4b 1b ff .byte $FE, $4B, $1B, $ff +>036d f4036d fe 49 1c ff .byte $FE, $49, $1C, $ff +>0371 f40371 fe 40 20 ff .byte $FE, $40, $20, $ff +>0375 f40375 ff 60 14 ff .byte $FF, $60, $14, $ff +>0379 f40379 fd 66 18 ff .byte $FD, $66, $18, $ff +>037d f4037d ff 6e 11 ff .byte $FF, $6E, $11, $ff +>0381 f40381 ff 7a 0f ff .byte $FF, $7A, $0F, $ff +>0385 f40385 fe 71 13 ff .byte $FE, $71, $13, $ff +>0389 f40389 fb 71 1d ff .byte $FB, $71, $1D, $ff +>038d f4038d ea 67 21 ff .byte $EA, $67, $21, $ff +>0391 f40391 e2 70 26 ff .byte $E2, $70, $26, $ff +>0395 f40395 ff 8d 11 ff .byte $FF, $8D, $11, $ff +>0399 f40399 fe 8c 1b ff .byte $FE, $8C, $1B, $ff +>039d f4039d ff 95 16 ff .byte $FF, $95, $16, $ff +>03a1 f403a1 fb 8e 23 ff .byte $FB, $8E, $23, $ff +>03a5 f403a5 f1 91 2c ff .byte $F1, $91, $2C, $ff +>03a9 f403a9 f8 9b 2b ff .byte $F8, $9B, $2B, $ff +>03ad f403ad ff a6 1a ff .byte $FF, $A6, $1A, $ff +>03b1 f403b1 fe ac 26 ff .byte $FE, $AC, $26, $ff +>03b5 f403b5 ff b3 23 ff .byte $FF, $B3, $23, $ff +>03b9 f403b9 fa b5 34 ff .byte $FA, $B5, $34, $ff +>03bd f403bd fd bd 31 ff .byte $FD, $BD, $31, $ff +>03c1 f403c1 fe c4 2e ff .byte $FE, $C4, $2E, $ff +>03c5 f403c5 00 00 00 ff .byte $00, $00, $00, $ff +>03c9 f403c9 00 00 00 ff .byte $00, $00, $00, $ff +>03cd f403cd 00 00 00 ff .byte $00, $00, $00, $ff +>03d1 f403d1 00 00 00 ff .byte $00, $00, $00, $ff +>03d5 f403d5 00 00 00 ff .byte $00, $00, $00, $ff +>03d9 f403d9 00 00 00 ff .byte $00, $00, $00, $ff +>03dd f403dd 00 00 00 ff .byte $00, $00, $00, $ff +>03e1 f403e1 00 00 00 ff .byte $00, $00, $00, $ff +>03e5 f403e5 00 00 00 ff .byte $00, $00, $00, $ff +>03e9 f403e9 00 00 00 ff .byte $00, $00, $00, $ff +>03ed f403ed 00 00 00 ff .byte $00, $00, $00, $ff +>03f1 f403f1 00 00 00 ff .byte $00, $00, $00, $ff +>03f5 f403f5 00 00 00 ff .byte $00, $00, $00, $ff +>03f9 f403f9 00 00 00 ff .byte $00, $00, $00, $ff +>03fd f403fd 00 00 00 ff .byte $00, $00, $00, $ff +>0401 f40401 00 00 00 ff .byte $00, $00, $00, $ff +>0405 f40405 00 00 00 ff .byte $00, $00, $00, $ff +>0409 f40409 00 00 00 ff .byte $00, $00, $00, $ff +>040d f4040d 00 00 00 ff .byte $00, $00, $00, $ff +>0411 f40411 00 00 00 ff .byte $00, $00, $00, $ff +>0415 f40415 00 00 00 ff .byte $00, $00, $00, $ff +>0419 f40419 00 00 00 ff .byte $00, $00, $00, $ff +>041d f4041d 00 00 00 ff .byte $00, $00, $00, $ff +>0421 f40421 00 00 00 ff .byte $00, $00, $00, $ff +>0425 f40425 00 00 00 ff .byte $00, $00, $00, $ff +>0429 f40429 00 00 00 ff .byte $00, $00, $00, $ff +>042d f4042d 00 00 00 ff .byte $00, $00, $00, $ff +>0431 f40431 00 00 00 ff .byte $00, $00, $00, $ff +>0435 f40435 00 00 00 ff .byte $00, $00, $00, $ff +>0439 f40439 00 00 00 ff .byte $00, $00, $00, $ff +>043d f4043d 00 00 00 ff .byte $00, $00, $00, $ff +>0441 f40441 00 00 00 ff .byte $00, $00, $00, $ff +>0445 f40445 00 00 00 ff .byte $00, $00, $00, $ff +>0449 f40449 00 00 00 ff .byte $00, $00, $00, $ff +>044d f4044d 00 00 00 ff .byte $00, $00, $00, $ff +>0451 f40451 00 00 00 ff .byte $00, $00, $00, $ff + +;****** Return to file: sample_boot.s + + +;****** Processing file: boot_icon.s + +.0455 f40455 boot_icon_pixels: +>0455 f40455 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>045d f4045d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>046d f4046d 00 00 00 00 00 00 00 00 +>0475 f40475 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>047d f4047d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>048d f4048d 00 00 00 00 00 00 00 00 +>0495 f40495 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>049d f4049d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>04ad f404ad 00 00 00 00 00 00 00 00 +>04b5 f404b5 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $2F, $27, $27, $1D, $14, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>04bd f404bd 00 00 00 00 00 2f 27 27 1d 14 dc 00 00 00 00 00 +>04cd f404cd 00 00 00 00 00 00 00 00 +>04d5 f404d5 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $3D, $3D, $3D, $3D, $3D, $2F, $27, $27, $1D, $14, $13, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>04dd f404dd 00 00 3d 3d 3d 3d 3d 2f 27 27 1d 14 13 dc 00 00 +>04ed f404ed 00 00 00 00 00 00 00 00 +>04f5 f404f5 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $46, $53, $53, $5D, $69, $69, $5D, $53, $3D, $2F, $1D, $14, $09, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>04fd f404fd 00 46 53 53 5d 69 69 5d 53 3d 2f 1d 14 09 dc 00 +>050d f4050d 00 00 00 00 00 00 00 00 +>0515 f40515 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $53, $79, $7A, $88, $90, $91, $8C, $87, $78, $5D, $53, $3D, $27, $14, $09, $09, $00, $00, $00, $00, $00, $00, $00, $00 +>051d f4051d 53 79 7a 88 90 91 8c 87 78 5d 53 3d 27 14 09 09 +>052d f4052d 00 00 00 00 00 00 00 00 +>0535 f40535 00 00 00 00 00 00 00 68 .byte $00, $00, $00, $00, $00, $00, $00, $68, $7B, $92, $A7, $A8, $AA, $A9, $A0, $9C, $8F, $83, $70, $53, $3D, $27, $14, $09, $09, $00, $00, $00, $00, $00, $00, $00 +>053d f4053d 7b 92 a7 a8 aa a9 a0 9c 8f 83 70 53 3d 27 14 09 +>054d f4054d 09 00 00 00 00 00 00 00 +>0555 f40555 00 00 00 00 00 00 53 7b .byte $00, $00, $00, $00, $00, $00, $53, $7B, $93, $BE, $BF, $CE, $C0, $C1, $B7, $B0, $9F, $9A, $86, $77, $53, $3D, $27, $14, $09, $09, $00, $00, $00, $00, $00, $00 +>055d f4055d 93 be bf ce c0 c1 b7 b0 9f 9a 86 77 53 3d 27 14 +>056d f4056d 09 09 00 00 00 00 00 00 +>0575 f40575 00 00 00 00 00 46 79 92 .byte $00, $00, $00, $00, $00, $46, $79, $92, $BE, $CF, $D4, $D5, $D3, $CD, $C3, $B9, $B1, $A6, $95, $82, $6F, $53, $2F, $27, $14, $09, $DC, $00, $00, $00, $00, $00 +>057d f4057d be cf d4 d5 d3 cd c3 b9 b1 a6 95 82 6f 53 2f 27 +>058d f4058d 14 09 dc 00 00 00 00 00 +>0595 f40595 00 00 00 00 3d 53 7a a7 .byte $00, $00, $00, $00, $3D, $53, $7A, $A7, $BF, $D4, $D9, $DA, $D7, $D1, $C9, $C2, $B8, $AC, $9D, $8D, $7C, $64, $46, $37, $1D, $09, $01, $DC, $00, $00, $00, $00 +>059d f4059d bf d4 d9 da d7 d1 c9 c2 b8 ac 9d 8d 7c 64 46 37 +>05ad f405ad 1d 09 01 dc 00 00 00 00 +>05b5 f405b5 00 00 00 00 3d 53 88 a8 .byte $00, $00, $00, $00, $3D, $53, $88, $A8, $CE, $D5, $DA, $DB, $D8, $D2, $CC, $C4, $BB, $AF, $A2, $94, $81, $6D, $57, $48, $27, $14, $09, $01, $00, $00, $00, $00 +>05bd f405bd ce d5 da db d8 d2 cc c4 bb af a2 94 81 6d 57 48 +>05cd f405cd 27 14 09 01 00 00 00 00 +>05d5 f405d5 00 00 00 00 3d 5d 90 aa .byte $00, $00, $00, $00, $3D, $5D, $90, $AA, $C0, $D3, $D7, $D8, $D6, $D0, $CA, $C5, $BC, $B3, $A4, $97, $85, $76, $5E, $4B, $33, $14, $09, $01, $00, $00, $00, $00 +>05dd f405dd c0 d3 d7 d8 d6 d0 ca c5 bc b3 a4 97 85 76 5e 4b +>05ed f405ed 33 14 09 01 00 00 00 00 +>05f5 f405f5 00 00 00 2f 3d 69 91 a9 .byte $00, $00, $00, $2F, $3D, $69, $91, $A9, $C1, $CD, $D1, $D2, $D0, $CB, $C8, $C7, $BA, $B2, $A5, $99, $89, $73, $60, $4D, $39, $1D, $09, $01, $DC, $00, $00, $00 +>05fd f405fd c1 cd d1 d2 d0 cb c8 c7 ba b2 a5 99 89 73 60 4d +>060d f4060d 39 1d 09 01 dc 00 00 00 +>0615 f40615 00 00 00 27 3d 69 8c a0 .byte $00, $00, $00, $27, $3D, $69, $8C, $A0, $B7, $C3, $C9, $CC, $CA, $C8, $C6, $BD, $B6, $AE, $A3, $96, $84, $72, $63, $51, $3C, $1D, $14, $01, $01, $00, $00, $00 +>061d f4061d b7 c3 c9 cc ca c8 c6 bd b6 ae a3 96 84 72 63 51 +>062d f4062d 3c 1d 14 01 01 00 00 00 +>0635 f40635 00 00 00 27 2f 5d 87 9c .byte $00, $00, $00, $27, $2F, $5D, $87, $9C, $B0, $B9, $C2, $C4, $C5, $C7, $BD, $B5, $B4, $AB, $9E, $8E, $7F, $75, $5F, $4E, $3A, $1D, $14, $01, $01, $00, $00, $00 +>063d f4063d b0 b9 c2 c4 c5 c7 bd b5 b4 ab 9e 8e 7f 75 5f 4e +>064d f4064d 3a 1d 14 01 01 00 00 00 +>0655 f40655 00 00 00 1d 27 53 78 8f .byte $00, $00, $00, $1D, $27, $53, $78, $8F, $9F, $B1, $B8, $BB, $BC, $BA, $B6, $B4, $AD, $A1, $98, $8A, $7D, $6E, $67, $4C, $38, $1D, $09, $01, $01, $00, $00, $00 +>065d f4065d 9f b1 b8 bb bc ba b6 b4 ad a1 98 8a 7d 6e 67 4c +>066d f4066d 38 1d 09 01 01 00 00 00 +>0675 f40675 00 00 00 14 27 3d 5d 83 .byte $00, $00, $00, $14, $27, $3D, $5D, $83, $9A, $A6, $AC, $AF, $B3, $B2, $AE, $AB, $A1, $9B, $8B, $7E, $71, $65, $52, $4A, $33, $14, $09, $01, $01, $00, $00, $00 +>067d f4067d 9a a6 ac af b3 b2 ae ab a1 9b 8b 7e 71 65 52 4a +>068d f4068d 33 14 09 01 01 00 00 00 +>0695 f40695 00 00 00 dc 1d 2f 53 70 .byte $00, $00, $00, $DC, $1D, $2F, $53, $70, $86, $95, $9D, $A2, $A4, $A5, $A3, $9E, $98, $8B, $80, $74, $69, $66, $50, $3B, $26, $14, $09, $01, $DC, $00, $00, $00 +>069d f4069d 86 95 9d a2 a4 a5 a3 9e 98 8b 80 74 69 66 50 3b +>06ad f406ad 26 14 09 01 dc 00 00 00 +>06b5 f406b5 00 00 00 00 14 1d 3d 53 .byte $00, $00, $00, $00, $14, $1D, $3D, $53, $77, $82, $8D, $94, $97, $99, $96, $8E, $8A, $7E, $74, $6A, $5A, $4F, $49, $34, $1D, $09, $01, $01, $00, $00, $00, $00 +>06bd f406bd 77 82 8d 94 97 99 96 8e 8a 7e 74 6a 5a 4f 49 34 +>06cd f406cd 1d 09 01 01 00 00 00 00 +>06d5 f406d5 00 00 00 00 13 14 27 3d .byte $00, $00, $00, $00, $13, $14, $27, $3D, $53, $6F, $7C, $81, $85, $89, $84, $7F, $7D, $71, $69, $5A, $4F, $4A, $36, $1D, $14, $09, $01, $01, $00, $00, $00, $00 +>06dd f406dd 53 6f 7c 81 85 89 84 7f 7d 71 69 5a 4f 4a 36 1d +>06ed f406ed 14 09 01 01 00 00 00 00 +>06f5 f406f5 00 00 00 00 dc 09 14 27 .byte $00, $00, $00, $00, $DC, $09, $14, $27, $3D, $53, $64, $6D, $76, $73, $72, $75, $6E, $65, $66, $4F, $4A, $36, $1D, $14, $09, $01, $01, $DC, $00, $00, $00, $00 +>06fd f406fd 3d 53 64 6d 76 73 72 75 6e 65 66 4f 4a 36 1d 14 +>070d f4070d 09 01 01 dc 00 00 00 00 +>0715 f40715 00 00 00 00 00 dc 09 14 .byte $00, $00, $00, $00, $00, $DC, $09, $14, $27, $2F, $46, $57, $5E, $60, $63, $5F, $67, $52, $50, $49, $36, $1D, $14, $09, $01, $01, $DC, $00, $00, $00, $00, $00 +>071d f4071d 27 2f 46 57 5e 60 63 5f 67 52 50 49 36 1d 14 09 +>072d f4072d 01 01 dc 00 00 00 00 00 +>0735 f40735 00 00 00 00 00 00 09 09 .byte $00, $00, $00, $00, $00, $00, $09, $09, $14, $27, $37, $48, $4B, $4D, $51, $4E, $4C, $4A, $3B, $34, $1D, $14, $09, $01, $01, $01, $00, $00, $00, $00, $00, $00 +>073d f4073d 14 27 37 48 4b 4d 51 4e 4c 4a 3b 34 1d 14 09 01 +>074d f4074d 01 01 00 00 00 00 00 00 +>0755 f40755 00 00 00 00 00 00 00 09 .byte $00, $00, $00, $00, $00, $00, $00, $09, $09, $14, $1D, $27, $33, $39, $3C, $3A, $38, $33, $26, $1D, $14, $09, $01, $01, $01, $00, $00, $00, $00, $00, $00, $00 +>075d f4075d 09 14 1d 27 33 39 3c 3a 38 33 26 1d 14 09 01 01 +>076d f4076d 01 00 00 00 00 00 00 00 +>0775 f40775 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $09, $09, $09, $14, $14, $1D, $1D, $1D, $1D, $14, $14, $09, $09, $01, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00 +>077d f4077d 09 09 09 14 14 1d 1d 1d 1d 14 14 09 09 01 01 01 +>078d f4078d 00 00 00 00 00 00 00 00 +>0795 f40795 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $DC, $01, $09, $09, $09, $14, $14, $09, $09, $09, $01, $01, $01, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>079d f4079d 00 dc 01 09 09 09 14 14 09 09 09 01 01 01 dc 00 +>07ad f407ad 00 00 00 00 00 00 00 00 +>07b5 f407b5 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $DC, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>07bd f407bd 00 00 dc 01 01 01 01 01 01 01 01 01 01 dc 00 00 +>07cd f407cd 00 00 00 00 00 00 00 00 +>07d5 f407d5 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $DC, $01, $01, $01, $01, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>07dd f407dd 00 00 00 00 00 dc 01 01 01 01 dc 00 00 00 00 00 +>07ed f407ed 00 00 00 00 00 00 00 00 +>07f5 f407f5 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>07fd f407fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>080d f4080d 00 00 00 00 00 00 00 00 +>0815 f40815 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>081d f4081d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>082d f4082d 00 00 00 00 00 00 00 00 +>0835 f40835 00 00 00 00 00 00 00 00 .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +>083d f4083d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +>084d f4084d 00 00 00 00 00 00 00 00 + +;****** Return to file: sample_boot.s + + +;****** End of listing diff --git a/samples/boot/sample_boot.s b/samples/boot/sample_boot.s new file mode 100644 index 0000000..efedf69 --- /dev/null +++ b/samples/boot/sample_boot.s @@ -0,0 +1,56 @@ + .cpu "65816" + +vky_text = $f04000 +vky_mst_ctrl_0 = $f01000 + +* = $f40000 + +header: .byte $f8, $16 ; Signature + .byte 0 ; Version + .dword start ; Starting address + .dword boot_icon_pixels ; Boot Icon pixels (0 = none) + .dword boot_icon_clut ; CLUT address (0 = none) + + .null "sample_boot" + +; +; The code for the sample +; + +start: sep #$20 + .as + rep #$10 + .xl + + ; Switch to text only mode + + lda #$01 + sta vky_mst_ctrl_0 + + ; Fill the text screen with blanks + + lda #' ' + ldx #0 +clrloop1: sta @l vky_text,x + inx + cpx #$2000 + bne clrloop1 + + ; Write the message to the screen + + ldx #0 +putloop: lda @l message,x + beq done + sta @l vky_text,x + inx + bra putloop + +done: nop + bra done + +message: .null 'Hello, world!' + +; Include the boot icon and boot icon's CLUT to use on the boot screen + +.include "boot_clut.s" +.include "boot_icon.s" \ No newline at end of file diff --git a/src/boot.c b/src/boot.c index 9e5d9b7..7907ea4 100644 --- a/src/boot.c +++ b/src/boot.c @@ -12,11 +12,14 @@ #include "boot.h" #include "memory.h" #include "proc.h" +#include "cartridge.h" #include "dev/fsys.h" -#include "timers.h" +#include "dev/channel.h" +#include "dev/kbd_f256k.h" #include "dev/txt_screen.h" #include "dev/sprites.h" #include "dev/tiles.h" +#include "timers.h" #include "vicky_general.h" #include "rsrc/sprites/boot_sprites.h" #include "rsrc/tiles/boot_tiles.h" @@ -25,9 +28,15 @@ #include const uint32_t boot_record_alignment = 8192; // Number of bytes for boot record alignement -const uint32_t boot_rom_location = 0xf00000; // Location to check for a boot record in ROM +const uint32_t boot_rom_location = 0xf80000; // Location to check for a boot record in ROM const uint32_t boot_cart_location = 0xf40000; // Location to check for a boot record in ROM +const unsigned short kbd_sc_space = 0x0039; +const unsigned short kbd_sc_f1 = 0x003b; +const unsigned short kbd_sc_f3 = 0x003d; +const unsigned short kbd_sc_f5 = 0x003f; +const unsigned short kbd_sc_f7 = 0x0041; + enum boot_src_e { BOOT_SRC_NONE = 0, // Nothing more to check BOOT_SRC_RAM, // Check RAM for a bootable @@ -42,13 +51,13 @@ enum boot_src_e { * */ typedef struct boot_record_s { - char signature1; - char signature2; - uint32_t start_address; - uint8_t version; - uint32_t icon_address; - uint32_t clut_address; - const char * name; + char signature1; // Needs to be $f8 + char signature2; // Needs to be $16 + uint8_t version; // Currently $00 + uint32_t start_address; // Address to start executing (in little-endian format of the 65816) + uint32_t icon_address; // Address of an icon to show (32x32 sprite data, use 0 for no icon) + uint32_t clut_address; // Address of the palette for the icon in Vicky format (0 to use the default) + const char * name; // A display name/command word for the program (not currently used) } boot_record_t, *boot_record_p; /** @@ -63,6 +72,8 @@ static enum boot_src_e boot_chain[] = { BOOT_SRC_ROM, }; +static bool bootable[10]; + /** * @brief A holder for empty arguments list so we have something to point to when starting a binary file * @@ -222,31 +233,6 @@ void boot_icon_highlight(short position) { sprite_clut(position, 0); } -void boot_from(enum boot_src_e device) { - short result = 0; - t_file_info file_info; - - switch(device) { - case BOOT_SRC_SD0: - if (fsys_stat("/sd0/fnxboot.pgz", &file_info) >= 0) { - txt_print(0, "Booting: /sd0/fnxboot.pgz\n"); - proc_run("/sd0/fnxboot.pgz", 0, boot_args); - - } else if (fsys_stat("/sd0/fnxboot.pgx", &file_info) >= 0) { - txt_print(0, "Booting: /sd0/fnxboot.pgx\n"); - result = proc_run("/sd0/fnxboot.pgx", 0, boot_args); - if (result != 0) { - printf("proc_run error: %d\n", result); - } - } - break; - - default: - txt_print(0, "No bootable device is present.\n"); - break; - } -} - const char * boot_source_name(enum boot_src_e device) { switch(device) { case BOOT_SRC_SD0: @@ -262,13 +248,82 @@ const char * boot_source_name(enum boot_src_e device) { return "ROM"; case BOOT_SRC_CARTRIDGE: - return "CARTRIDGE"; + return "Cartridge"; default: return "None"; } } +static void boot_reset_screen() { + // txt_set_mode(0, TXT_MODE_TEXT | TXT_MODE_SPRITE); + *tvky_mstr_ctrl = (uint16_t)(VKY_MCR_TEXT); + + tile_set_assign(0, 0, false); + tile_set_update(0); + + tile_map_assign(0, 0, 0, 0, 0); + tile_map_position(0, 0, 0); + tile_map_enable(0, false); + tile_map_update(0); + + for (int i = 0; i < 5; i++) { + sprite_assign(i, 0, 0, 0); + sprite_position(i, 0, 0); + sprite_enable(i, 0); + } + + // Clear the text screen + txt_clear(0, 2); +} + +void boot_from(enum boot_src_e device, boot_record_p boot_record) { + short result = 0; + t_file_info file_info; + + switch(device) { + case BOOT_SRC_SD0: + if (fsys_stat("/sd0/fnxboot.pgz", &file_info) >= 0) { + txt_print(0, "Booting: /sd0/fnxboot.pgz\n"); + boot_reset_screen(); + proc_run("/sd0/fnxboot.pgz", 0, boot_args); + + } else if (fsys_stat("/sd0/fnxboot.pgx", &file_info) >= 0) { + txt_print(0, "Booting: /sd0/fnxboot.pgx\n"); + boot_reset_screen(); + result = proc_run("/sd0/fnxboot.pgx", 0, boot_args); + if (result != 0) { + printf("proc_run error: %d\n", result); + } + } + break; + + case BOOT_SRC_CARTRIDGE: + case BOOT_SRC_ROM: + case BOOT_SRC_RAM: + txt_print(0, "Booting from "); + txt_print(0, boot_source_name(device)); + txt_print(0, "\n"); + + // Double-check that the boot record is valid before we attempt to boot + if (boot_record != 0) { + if ((boot_record->signature1 == 0xf8) && (boot_record->signature2 == 0x16) && (boot_record->version == 0)) { + // Memory does indeed hold a boot record + boot_reset_screen(); + proc_exec(boot_record->start_address, 0, 0, boot_args); + } + } else { + txt_print(0, "A valid boot record was not found.\n"); + } + + break; + + default: + txt_print(0, "No bootable device is present.\n"); + break; + } +} + /** * @brief Setup the boot screen * @@ -277,6 +332,8 @@ void boot_screen() { enum boot_src_e boot_source = BOOT_SRC_NONE; short i = 0; long jiffies_target = 0; + boot_record_p boot_record[10]; + short boot_position = 0; // txt_set_mode(0, TXT_MODE_TEXT | TXT_MODE_SPRITE); *tvky_mstr_ctrl = (uint16_t)(VKY_MCR_TILE | VKY_MCR_SPRITE | VKY_MCR_GRAPHICS | VKY_MCR_TEXT_OVERLAY | VKY_MCR_TEXT); @@ -318,29 +375,30 @@ void boot_screen() { txt_print(0, "Scanning for bootable devices...\n"); for (short position = 0; position < sizeof(boot_chain) / sizeof(enum boot_src_e); position++) { - boot_record_p boot_record; - + bootable[position] = false; boot_icon(position, boot_chain[position]); - if (is_bootable(boot_chain[position], &boot_record)) { + if (is_bootable(boot_chain[position], &boot_record[position])) { boot_icon_highlight(position); - + bootable[position] = true; + // Assign the boot source to this, if it hasn't already been bound if (boot_source == BOOT_SRC_NONE) { txt_print(0, "Default boot source: "); txt_print(0, boot_source_name(boot_chain[position])); txt_put(0, '\n'); boot_source = boot_chain[position]; + boot_position = position; } // If there is a boot icon specified in the boot record, change to that icon - if (boot_record != 0) { - if (boot_record->icon_address != 0) { - sprite_assign(position, (uint8_t *)(boot_record->icon_address), 0, 0); + if (boot_record[position] != 0) { + if (boot_record[position]->icon_address != 0) { + sprite_assign(position, (uint8_t *)(boot_record[position]->icon_address), 0, 0); // If there is a CLUT defined for the boot record, switch to use that clut - if (boot_record->clut_address != 0) { + if (boot_record[position]->clut_address != 0) { for (i = 0; i < 4 * 256; i++) { - uint8_t * source_clut = (uint8_t *)boot_record->clut_address; + uint8_t * source_clut = (uint8_t *)boot_record[position]->clut_address; VKY_GR_CLUT_2[i] = source_clut[i]; } sprite_clut(position, 2); @@ -350,12 +408,16 @@ void boot_screen() { } } - // Wait some time for user input + txt_print(0, "\nPress SPACE to use default.\n"); + jiffies_target = timers_jiffies() + 60 * 10; while (jiffies_target > timers_jiffies()) { - ; + unsigned short scancode = kbd_get_scancode(); + if (scancode == kbd_sc_space) { + break; + } } // And launch the system - boot_from(boot_source); -} \ No newline at end of file + boot_from(boot_source, boot_record[boot_position]); +} diff --git a/src/toolbox.c b/src/toolbox.c index bb77e35..e82969a 100644 --- a/src/toolbox.c +++ b/src/toolbox.c @@ -518,11 +518,13 @@ int main(int argc, char * argv[]) { // break; // } + // test_kbd(); + boot_screen(); while (1) ; - // test_kbd(); + // printf("Initializing IEC\n"); // result = iec_init();