|
|
1.1 root 1: // TITLE("Glyph Scanline Output")
2: //++
3: //
4: // Copyright (c) 1992 Microsoft Corporation
5: //
6: // Module Name:
7: //
8: // glyphout.s
9: //
10: // Abstract:
11: //
12: // This module implements the code necessary to output a single glyph
13: // either in opaque or transparent mode.
14: //
15: // Environment:
16: //
17: // User mode only.
18: //
19: // Revision History:
20: //
21: //--
22:
23: #include "kxmips.h"
24:
25: //
26: // Define opaque dispatch table.
27: //
28:
29: .rdata
30: .globl DrvpOpaqueTable
31: DrvpOpaqueTable: //
32: .word DrvpOutputOpaque1.2.3.4 // 1, 2, 3, or 4 pixels
33: .word DrvpOutputOpaque5.6.7.8 // 5, 6, 7, or 8 pixels
34: .word DrvpOutputOpaque9.10.11.12 // 9, 10, 11, or 12 pixels
35: .word DrvpOutputOpaque13.14.15.16 // 13, 14, 15, or 16 pixels
36: .word DrvpOutputOpaque17.18.19.20 // 17, 18, 19, or 20 pixels
37: .word DrvpOutputOpaque21.22.23.24 // 21, 22, 23, or 24 pixels
38: .word DrvpOutputOpaque25.26.27.28 // 25. 26, 27, or 28 pixels
39: .word DrvpOutputOpaque29.30.31.32 // 29, 30, 31, or 32 pixels
40:
41: SBTTL("Output Glyph Opaque")
42: //++
43: //
44: // VOID
45: // DrvpOutputGlyphOpaque (
46: // IN PBYTE DrawPoint,
47: // IN PULONG GlyphBits,
48: // IN ULONG GlyphWidth,
49: // IN ULONG GlyphHeight
50: // )
51: //
52: // Routine Description:
53: //
54: // The following routines decode and expand a single scan line of a
55: // glyph. If the draw point is the display surface, then the scan line
56: // is written directly to the display surface. Otherwise, it is buffered
57: // into a complete scan line and written to the display surface all at
58: // by the calling routine.
59: //
60: // N.B. These routines only handles glyphs from 1 to 32 pixels in width.
61: //
62: // Arguments:
63: //
64: // DrawPoint (a0) - Supplies a pointer to the starting pixel of the
65: // glyph scanline.
66: //
67: // GlyphBitmap (a1) - Supplies a pointer to the glyph scanline bitmap.
68: //
69: // GlyphWidth (a2) - Supplies the glyph width in pixels.
70: //
71: // GlyphHeigth (a3) - Supplies the glyph height in pixels.
72: //
73: // Return Value:
74: //
75: // None.
76: //
77: //--
78:
79: LEAF_ENTRY(DrvpOutputGlyphOpaque)
80:
81:
82: //
83: // Glyph output for 1, 2, 3, or 4 pixel wide glyphs.
84: //
85:
86: ALTERNATE_ENTRY(DrvpOutputOpaque1.2.3.4)
87:
88: la t0,DrvpDrawColorTable // set base address of color table
89: lw t3,DrvpScanLineWidth // get scanline stride in bytes
90: and t1,a0,0x3 // isolate draw point alignment bits
91: li t2,4 // compute number of pixels to alignment
92: subu t2,t2,t1 //
93: addu t4,a3,a1 // compute ending address of glyph bits
94: addu a3,a2,a0 // compute trailing alignment address
95: subu a3,a3,1 //
96: nor t1,a3,zero // compute trailing byte left shift
97: and t1,t1,0x3 //
98: sll t1,t1,3 //
99:
100: .set noreorder
101: .set noat
102: sltu v0,t2,a2 // check if two nibbles required
103: bne zero,v0,20f // if ne, two nibbles required
104: sub a3,a3,t3 // offset address by scan line stride
105: .set at
106: .set reorder
107:
108: la t5,10f - (16 * 4) // get base address of code templates
109: sll t6,a2,6 // compute offset index
110: addu t5,t5,t6 // compute code dispatch address
111: j t5 // dispatch to routine
112:
113: //
114: // One pixel is required for 1, 2, 3, or 4 pixel wide glyph.
115: //
116:
117: .set noreorder
118: .set noat
119: 10: lbu v0,0(a1) // get next set of glyph pixels
120: addu a1,a1,1 // advance to next set of glyph pixels
121: srl v1,v0,2 // shift high nibble into position
122: and v1,v1,0xf << 2 // isolate color table index
123: addu v1,v1,t0 // compute color table address
124: lw v1,0(v1) // get color table entry
125: nop // fill
126:
127: //
128: // sb required.
129: //
130:
131: sb v1,0(a0) // store first pixel
132: bne a1,t4,10b // if ne, more scan lines to process
133: add a0,a0,t3 // compute next draw point address
134: j ra // return
135: nop // fill
136: nop //
137: nop //
138: nop //
139: nop //
140: .set at
141: .set reorder
142:
143: //
144: // Two pixels are required for 2, 3, or 4 pixel wide glyph.
145: //
146:
147: .set noreorder
148: .set noat
149: 13: lbu v0,0(a1) // get next set of glyph pixels
150: addu a1,a1,1 // advance to next set of glyph pixels
151: srl v1,v0,2 // shift high nibble into position
152: and v1,v1,0xf << 2 // isolate color table index
153: addu v1,v1,t0 // compute color table address
154: lw v1,0(v1) // get color table entry
155: nop // fill
156: srl t5,v1,8 // shift second pixel into position
157:
158: //
159: // sb, sb required.
160: //
161:
162: sb v1,0(a0) // store first pixel
163: sb t5,1(a0) // store second pixel
164: bne a1,t4,13b // if ne, more scan lines to process
165: add a0,a0,t3 // compute next draw point address
166: j ra // return
167: nop // fill
168: nop //
169: nop //
170: .set at
171: .set reorder
172:
173: //
174: // Three pixels are required for 3 or 4 pixel wide glyph.
175: //
176:
177: .set noreorder
178: .set noat
179: 15: lbu v0,0(a1) // get next set of glyph pixels
180: addu a1,a1,1 // advance to next set of glyph pixels
181: srl v1,v0,2 // shift high nibble into position
182: and v1,v1,0xf << 2 // isolate color table index
183: addu v1,v1,t0 // compute color table address
184: lw v1,0(v1) // get color table entry
185: nop // fill
186: srl t5,v1,8 // shift second pixel into position
187: srl t6,v1,16 // shift third pixel into position
188:
189: //
190: // sb, sb, sb required.
191: //
192:
193: sb v1,0(a0) // store first pixel
194: sb t5,1(a0) // store second pixel
195: sb t6,2(a0) // store third pixel
196: bne a1,t4,15b // if ne, more scan lines to process
197: add a0,a0,t3 // compute next draw point address
198: j ra // return
199: nop // fill
200: .set at
201: .set reorder
202:
203: //
204: // Four pixels are required for 4 pixel wide glyph.
205: //
206:
207: .set noreorder
208: .set noat
209: 17: lbu v0,0(a1) // get next set of glyph pixels
210: addu a1,a1,1 // advance to next set of glyph pixels
211: srl v1,v0,2 // shift high nibble into position
212: and v1,v1,0xf << 2 // isolate color table index
213: addu v1,v1,t0 // compute color table address
214: lw v1,0(v1) // get color table entry
215: nop // fill
216:
217: //
218: // sw required.
219: //
220:
221: sw v1,0(a0) // store first nibble
222: bne a1,t4,17b // if ne, more scan lines to process
223: add a0,a0,t3 // compute next draw point address
224: j ra // return
225: nop // fill
226: .set at
227: .set reorder
228:
229: //
230: // Two nibbles are required for 1, 2, 3, or 4 pixel wide glyph.
231: //
232:
233: .set noreorder
234: .set noat
235: 20: lbu v0,0(a1) // get next set of glyph pixels
236: addu a1,a1,1 // advance to next set of glyph pixels
237: srl v1,v0,2 // shift high nibble into position
238: and v1,v1,0xf << 2 // isolate color table index
239: addu v1,v1,t0 // compute color table address
240: lw t5,0(v1) // get color table entry
241: sll v0,v0,t2 // shift out alignment pixels
242: srl v1,v0,2 // shift next nibble into position
243: and v1,v1,0xf << 2 // isolate color table index
244: addu v1,v1,t0 // compute color table address
245: lw t6,0(v1) // get color table entry
246: add a3,a3,t3 // compute trailing byte address
247: sll t6,t6,t1 // shift high nibble into place
248:
249: //
250: // swr, swl required.
251: //
252:
253: swr t5,0(a0) // store left nibble
254: swl t6,0(a3) // store right nibble
255: bne a1,t4,20b // if ne, more scan lines to process
256: add a0,a0,t3 // compute next draw point address
257: .set at
258: .set reorder
259:
260: j ra // return
261:
262: //
263: // Glyph output for 5, 6, 7, or 8 pixel wide glyphs.
264: //
265:
266: ALTERNATE_ENTRY(DrvpOutputOpaque5.6.7.8)
267:
268: la t0,DrvpDrawColorTable // set base address of color table
269: lw t3,DrvpScanLineWidth // get scanline stride in bytes
270: and t1,a0,0x3 // isolate draw point alignment bits
271: li t2,4 // compute number of pixels to alignment
272: subu t2,t2,t1 //
273: addu t4,a3,a1 // compute ending address of glyph bits
274: addu a3,a2,a0 // compute trailing alignment address
275: subu a3,a3,1 //
276: nor t1,a3,zero // compute trailing byte left shift
277: and t1,t1,0x3 //
278: sll t1,t1,3 //
279:
280: .set noreorder
281: .set noat
282: addu t5,t2,4 // compute two nibble boundary
283: sltu v0,t5,a2 // check if three nibbles required
284: beq zero,v0,20b // if eq, two nibbles required
285: sub a3,a3,t3 // offset address by scan line stride
286: .set at
287: .set reorder
288:
289: //
290: // Three nibbles are required for 5, 6, 7, or 8 pixel wide glyph.
291: //
292:
293: .set noreorder
294: .set noat
295: 10: lbu v0,0(a1) // get next set of glyph pixels
296: addu a1,a1,1 // advance to next set of glyph pixels
297: srl v1,v0,2 // shift high nibble into position
298: and v1,v1,0xf << 2 // isolate color table index
299: addu v1,v1,t0 // compute color table address
300: lw t5,0(v1) // get color table entry
301: sll v0,v0,t2 // shift out alignment pixels
302: srl v1,v0,2 // shift next nibble into position
303: and v1,v1,0xf << 2 // isolate color table index
304: addu v1,v1,t0 // compute color table address
305: lw t6,0(v1) // get color table entry
306: sll v1,v0,2 // shift low nibble into position
307: and v1,v1,0xf << 2 // isolate color table index
308: addu v1,v1,t0 // compute color table address
309: lw t7,0(v1) // get color table entry
310: addu a2,a0,t2 // compute aligned draw point address
311: add a3,a3,t3 // compute trailing byte address
312: sll t7,t7,t1 // shift high nibble into place
313:
314: //
315: // swr, sw, swl required.
316: //
317:
318: swr t5,0(a0) // store left nibble
319: sw t6,0(a2) // store middle nibble
320: swl t7,0(a3) // store right nibble
321: bne a1,t4,10b // if ne, more scan lines to process
322: add a0,a0,t3 // compute next draw point address
323: .set at
324: .set reorder
325:
326: j ra // return
327:
328: //
329: // Glyph output for 9, 10, 11, and 12 pixel wide glyphs.
330: //
331:
332: ALTERNATE_ENTRY(DrvpOutputOpaque9.10.11.12)
333:
334: la t0,DrvpDrawColorTable // set base address of color table
335: lw t3,DrvpScanLineWidth // get scanline stride in bytes
336: and t1,a0,0x3 // isolate draw point alignment bits
337: li t2,4 // compute number of pixels to alignment
338: subu t2,t2,t1 //
339: addu t4,a3,a3 // compute the total size of the glyph
340: addu t4,t4,a1 // compute ending address of glyph bits
341: addu a3,a2,a0 // compute trailing alignment address
342: subu a3,a3,1 //
343: nor t1,a3,zero // compute trailing byte left shift
344: and t1,t1,0x3 //
345: sll t1,t1,3 //
346:
347: .set noreorder
348: .set noat
349: addu t5,t2,8 // compute three nibble boundary
350: sltu v0,t5,a2 // Check if four nibbles required
351:
352: #if defined(R4000)
353:
354: bne zero,v0,20f // if ne, four nibbles required
355:
356: #else
357:
358: bne zero,v0,30f // if ne, four nibbles required
359:
360: #endif
361:
362: sub a3,a3,t3 // offset address by scan line stride
363: .set at
364: .set reorder
365:
366: //
367: // Three nibbles are required for 9, 10, 11, or 12 pixel wide glyph.
368: //
369:
370: .set noreorder
371: .set noat
372: 10: lhu v0,0(a1) // get next set of glyph pixels
373: addu a1,a1,2 // advance to next set of glyph pixels
374: sll v1,v0,8 // shift high pixel bits into position
375: srl v0,v0,8 // shift low pixel bits into position
376: or v0,v0,v1 // merge swap big endian pixel bytes
377: srl v1,v0,12 - 2 // shift high nibble into position
378: and v1,v1,0xf << 2 // isolate color table index
379: addu v1,v1,t0 // compute color table address
380: lw t5,0(v1) // get color table entry
381: sll v0,v0,t2 // shift out alignment pixels
382: srl v1,v0,12 - 2 // shift next nibble into position
383: and v1,v1,0xf << 2 // isolate color table index
384: addu v1,v1,t0 // compute color table address
385: lw t6,0(v1) // get color table entry
386: srl v1,v0,8 - 2 // shift low nibble into position
387: and v1,v1,0xf << 2 // isolate color table index
388: addu v1,v1,t0 // compute color table address
389: lw t7,0(v1) // get color table entry
390: addu a2,a0,t2 // compute aligned draw point address
391: add a3,a3,t3 // compute trailing byte address
392: sll t7,t7,t1 // shift high nibble into place
393:
394: //
395: // swr, sw, swl required.
396: //
397:
398: swr t5,0(a0) // store left nibble
399: sw t6,0(a2) // store middle nibble
400: swl t7,0(a3) // store right nibble
401: bne a1,t4,10b // if ne, more scan lines to process
402: add a0,a0,t3 // compute next draw point address
403: .set at
404: .set reorder
405:
406: j ra // return
407:
408: //
409: // Four nibbles are required for 9, 10, 11, or 12 pixel wide glyph.
410: //
411:
412: #if defined(R4000)
413:
414: 20: and t5,a0,1 << 2 // check if middle quadword aligned
415: bne zero,t5,40f // if ne, middle is quadword aligned
416:
417: #endif
418:
419: .set noreorder
420: .set noat
421: 30: lhu v0,0(a1) // get next set of glyph pixels
422: addu a1,a1,2 // advance to next set of glyph pixels
423: sll v1,v0,8 // shift high pixel bits into position
424: srl v0,v0,8 // shift low pixel bits into position
425: or v0,v0,v1 // merge swap big endian pixel bytes
426: srl v1,v0,12 - 2 // shift high nibble into position
427: and v1,v1,0xf << 2 // isolate color table index
428: addu v1,v1,t0 // compute color table address
429: lw t5,0(v1) // get color table entry
430: sll v0,v0,t2 // shift out alignment pixels
431: srl v1,v0,12 - 2 // shift next nibble into position
432: and v1,v1,0xf << 2 // isolate color table index
433: addu v1,v1,t0 // compute color table address
434: lw t6,0(v1) // get color table entry
435: srl v1,v0,8 - 2 // shift next nibble into position
436: and v1,v1,0xf << 2 // isolate color table index
437: addu v1,v1,t0 // compute color table address
438: lw t7,0(v1) // get color table entry
439: srl v1,v0,4 - 2 // shift low nibble into position
440: and v1,v1,0xf << 2 // isolate color table index
441: addu v1,v1,t0 // compute color table address
442: lw t8,0(v1) // get color table entry
443: addu a2,a0,t2 // compute aligned draw point address
444: add a3,a3,t3 // compute trailing byte address
445: sll t8,t8,t1 // shift high nibble into place
446:
447: //
448: // swr, sw, sw, swl required.
449: //
450:
451: swr t5,0(a0) // store left nibble
452: sw t6,0(a2) // store low middle nibble
453: sw t7,4(a2) // store high middle nibble
454: swl t8,0(a3) // store right nibble
455: bne a1,t4,30b // if ne, more scan lines to process
456: add a0,a0,t3 // compute next draw point address
457: .set at
458: .set reorder
459:
460: j ra // return
461:
462: //
463: // Four nibbles are required for 9, 10, 11, or 12 pixel wide glyph. The
464: // middle pixels are quadword aligned.
465: //
466:
467: #if defined(R4000)
468:
469: .set noreorder
470: .set noat
471: 40: lhu v0,0(a1) // get next set of glyph pixels
472: addu a1,a1,2 // advance to next set of glyph pixels
473: sll v1,v0,8 // shift high pixel bits into position
474: srl v0,v0,8 // shift low pixel bits into position
475: or v0,v0,v1 // merge swap big endian pixel bytes
476: srl v1,v0,12 - 2 // shift high nibble into position
477: and v1,v1,0xf << 2 // isolate color table index
478: addu v1,v1,t0 // compute color table address
479: lw t5,0(v1) // get color table entry
480: sll v0,v0,t2 // shift out alignment pixels
481: srl v1,v0,12 - 2 // shift next nibble into position
482: and v1,v1,0xf << 2 // isolate color table index
483: addu v1,v1,t0 // compute color table address
484: lwc1 f0,0(v1) // get color table entry
485: srl v1,v0,8 - 2 // shift next nibble into position
486: and v1,v1,0xf << 2 // isolate color table index
487: addu v1,v1,t0 // compute color table address
488: lwc1 f1,0(v1) // get color table entry
489: srl v1,v0,4 - 2 // shift low nibble into position
490: and v1,v1,0xf << 2 // isolate color table index
491: addu v1,v1,t0 // compute color table address
492: lw t6,0(v1) // get color table entry
493: addu a2,a0,t2 // compute aligned draw point address
494: add a3,a3,t3 // compute trailing byte address
495: sll t6,t6,t1 // shift high nibble into place
496:
497: //
498: // swr, sw, sw, swl required.
499: //
500:
501: swr t5,0(a0) // store left nibble
502: sdc1 f0,0(a2) // store middle nibbles
503: swl t6,0(a3) // store right nibble
504: bne a1,t4,40b // if ne, more scan lines to process
505: add a0,a0,t3 // compute next draw point address
506: .set at
507: .set reorder
508:
509: j ra // return
510:
511: #endif
512:
513: //
514: // Glyph output for 13, 14, 15, and 16 pixel wide glyphs.
515: //
516:
517: ALTERNATE_ENTRY(DrvpOutputOpaque13.14.15.16)
518:
519: la t0,DrvpDrawColorTable // set base address of color table
520: lw t3,DrvpScanLineWidth // get scanline stride in bytes
521: and t1,a0,0x3 // isolate draw point alignment bits
522: li t2,4 // compute number of pixels to alignment
523: subu t2,t2,t1 //
524: addu t4,a3,a3 // compute the total size of the glyph
525: addu t4,t4,a1 // compute ending address of glyph bits
526: addu a3,a2,a0 // compute trailing alignment address
527: subu a3,a3,1 //
528: nor t1,a3,zero // compute trailing byte left shift
529: and t1,t1,0x3 //
530: sll t1,t1,3 //
531:
532: .set noreorder
533: .set noat
534: addu t5,t2,12 // compute four nibble boundary
535: sltu v0,t5,a2 // check if five nibbles required
536:
537: #if defined(R4000)
538:
539: beq zero,v0,20b // if eq, four nibbles required
540:
541: #else
542:
543: beq zero,v0,30b // if eq, four nibbles required
544:
545: #endif
546:
547: sub a3,a3,t3 // offset address by scan line stride
548: .set at
549: .set reorder
550:
551: //
552: // Five nibbles are required for 13, 14, 15, or 16 pixel wide glyph.
553: //
554:
555: #if defined(R4000)
556:
557: and t5,a0,1 << 2 // check if middle quadword aligned
558: bne zero,t5,20f // if ne, middle is quadword aligned
559:
560: #endif
561:
562: .set noreorder
563: .set noat
564: 10: lhu v0,0(a1) // get next set of glyph pixels
565: addu a1,a1,2 // advance to next set of glyph pixels
566: sll v1,v0,8 // shift high pixel bits into position
567: srl v0,v0,8 // shift low pixel bits into position
568: or v0,v0,v1 // merge swap big endian pixel bytes
569: srl v1,v0,12 - 2 // shift high nibble into position
570: and v1,v1,0xf << 2 // isolate color table index
571: addu v1,v1,t0 // compute color table address
572: lw t5,0(v1) // get color table entry
573: sll v0,v0,t2 // shift out alignment pixels
574: srl v1,v0,12 - 2 // shift next nibble into position
575: and v1,v1,0xf << 2 // isolate color table index
576: addu v1,v1,t0 // compute color table address
577: lw t6,0(v1) // get color table entry
578: srl v1,v0,8 - 2 // shift next nibble into position
579: and v1,v1,0xf << 2 // isolate color table index
580: addu v1,v1,t0 // compute color table address
581: lwc1 f0,0(v1) // get color table entry
582: srl v1,v0,4 - 2 // shift next nibble into position
583: and v1,v1,0xf << 2 // isolate color table index
584: addu v1,v1,t0 // compute color table address
585: lwc1 f1,0(v1) // get color table entry
586: sll v1,v0,2 // shift low nibble into position
587: and v1,v1,0xf << 2 // isolate color table index
588: addu v1,v1,t0 // compute color table address
589: lw t7,0(v1) // get color table entry
590: addu a2,a0,t2 // compute aligned draw point address
591: add a3,a3,t3 // compute trailing byte address
592: sll t7,t7,t1 // shift high nibble into place
593:
594: //
595: // swr, sw, sw, sw, swl required.
596: //
597:
598: swr t5,0(a0) // store left nibble
599: sw t6,0(a2) // store low middle nibble
600:
601: #if defined(R4000)
602:
603: sdc1 f0,4(a2) // store middle nibbles
604:
605: #else
606:
607: swc1 f0,4(a2) // store low middle nibble
608: swc1 f1,8(a2) // store high middle nibble
609:
610: #endif
611:
612: swl t7,0(a3) // store right nibble
613: bne a1,t4,10b // if ne, more scan lines to process
614: add a0,a0,t3 // compute next draw point address
615: .set at
616: .set reorder
617:
618: j ra // return
619:
620: //
621: // Five nibbles are required for 13, 14, 15, or 16 pixel wide glyph. The
622: // middle pixels are quadword aligned.
623: //
624:
625: #if defined(R4000)
626:
627: .set noreorder
628: .set noat
629: 20: lhu v0,0(a1) // get next set of glyph pixels
630: addu a1,a1,2 // advance to next set of glyph pixels
631: sll v1,v0,8 // shift high pixel bits into position
632: srl v0,v0,8 // shift low pixel bits into position
633: or v0,v0,v1 // merge swap big endian pixel bytes
634: srl v1,v0,12 - 2 // shift high nibble into position
635: and v1,v1,0xf << 2 // isolate color table index
636: addu v1,v1,t0 // compute color table address
637: lw t5,0(v1) // get color table entry
638: sll v0,v0,t2 // shift out alignment pixels
639: srl v1,v0,12 - 2 // shift next nibble into position
640: and v1,v1,0xf << 2 // isolate color table index
641: addu v1,v1,t0 // compute color table address
642: lwc1 f0,0(v1) // get color table entry
643: srl v1,v0,8 - 2 // shift next nibble into position
644: and v1,v1,0xf << 2 // isolate color table index
645: addu v1,v1,t0 // compute color table address
646: lwc1 f1,0(v1) // get color table entry
647: srl v1,v0,4 - 2 // shift next nibble into position
648: and v1,v1,0xf << 2 // isolate color table index
649: addu v1,v1,t0 // compute color table address
650: lw t6,0(v1) // get color table entry
651: sll v1,v0,2 // shift low nibble into position
652: and v1,v1,0xf << 2 // isolate color table index
653: addu v1,v1,t0 // compute color table address
654: lw t7,0(v1) // get color table entry
655: addu a2,a0,t2 // compute aligned draw point address
656: add a3,a3,t3 // compute trailing byte address
657: sll t7,t7,t1 // shift high nibble into place
658:
659: //
660: // swr, sw, sw, sw, swl required.
661: //
662:
663: swr t5,0(a0) // store left nibble
664: sdc1 f0,0(a2) // store middle nibbles
665: sw t6,8(a2) // store high middle nibble
666: swl t7,0(a3) // store right nibble
667: bne a1,t4,20b // if ne, more scan lines to process
668: add a0,a0,t3 // compute next draw point address
669: .set at
670: .set reorder
671:
672: j ra // return
673:
674: #endif
675:
676: //
677: // Glyph output for 17, 18, 19, and 20 pixel wide glyphs.
678: //
679:
680: ALTERNATE_ENTRY(DrvpOutputOpaque17.18.19.20)
681:
682: la t0,DrvpDrawColorTable // set base address of color table
683: lw t3,DrvpScanLineWidth // get scanline stride in bytes
684: and t1,a0,0x3 // isolate draw point alignment bits
685: li t2,4 // compute number of pixels to alignment
686: subu t2,t2,t1 //
687: addu t4,a3,a3 // compute the total size of the glyph
688: addu t4,t4,a3 //
689: addu t4,t4,a1 // compute ending address of glyph bits
690: addu a3,a2,a0 // compute trailing alignment address
691: subu a3,a3,1 //
692: nor t1,a3,zero // compute trailing byte left shift
693: and t1,t1,0x3 //
694: sll t1,t1,3 //
695: li t9,0xffffff // set glyph mask value
696:
697: .set noreorder
698: .set noat
699: addu t5,t2,16 // compute five nibble boundary
700: sltu v0,t5,a2 // check if six nibbles required
701:
702: #if defined(R4000)
703:
704: bne zero,v0,30f // if ne, six nibbles required
705:
706: #else
707:
708: bne zero,v0,40f // if ne, six nibbles required
709:
710: #endif
711:
712: sub a3,a3,t3 // offset address by scan line stride
713: .set at
714: .set reorder
715:
716: //
717: // Five nibbles are required for 17, 18, 19, or 20 pixel wide glyph.
718: //
719:
720: #if defined(R4000)
721:
722: and t5,a0,1 << 2 // check if middle quadword aligned
723: bne zero,t5,20f // if ne, middle is quadword aligned
724:
725: #endif
726:
727: .set noreorder
728: .set noat
729: 10: lwr v0,0(a1) // get next set of glyph pixels
730: lwl v0,3(a1) //
731: addu a1,a1,3 // advance to next set of glyph pixels
732: and v0,v0,t9 // isolate glyph bits
733: sll v1,v0,16 // shift high pixel bits into position
734: and t5,v0,0xff << 8 // isolate middle pixel bits
735: srl v0,v0,16 // shift low pixel bits into position
736: or v0,v0,v1 // merge swap big endian pixel bytes
737: or v0,v0,t5 //
738: srl v1,v0,20 - 2 // shift high nibble into position
739: and v1,v1,0xf << 2 // isolate color table index
740: addu v1,v1,t0 // compute color table address
741: lw t5,0(v1) // get color table entry
742: sll v0,v0,t2 // shift out alignment pixels
743: srl v1,v0,20 - 2 // shift next nibble into position
744: and v1,v1,0xf << 2 // isolate color table index
745: addu v1,v1,t0 // compute color table address
746: lw t6,0(v1) // get color table entry
747: srl v1,v0,16 - 2 // shift next nibble into position
748: and v1,v1,0xf << 2 // isolate color table index
749: addu v1,v1,t0 // compute color table address
750: lwc1 f0,0(v1) // get color table entry
751: srl v1,v0,12 - 2 // shift next nibble into position
752: and v1,v1,0xf << 2 // isolate color table index
753: addu v1,v1,t0 // compute color table address
754: lwc1 f1,0(v1) // get color table entry
755: srl v1,v0,8 - 2 // shift low nibble into position
756: and v1,v1,0xf << 2 // isolate color table index
757: addu v1,v1,t0 // compute color table address
758: lw t7,0(v1) // get color table entry
759: addu a2,a0,t2 // compute aligned draw point address
760: add a3,a3,t3 // compute trailing byte address
761: sll t7,t7,t1 // shift high nibble into place
762:
763: //
764: // swr, sw, sw, sw, swl required.
765: //
766:
767: swr t5,0(a0) // store left nibble
768: sw t6,0(a2) // store low middle nibble
769:
770: #if defined(R4000)
771:
772: sdc1 f0,4(a2) // store middle nibbles
773:
774: #else
775:
776: swc1 f0,4(a2) // store low middle nibble
777: swc1 f1,8(a2) // store high middle nibble
778:
779: #endif
780:
781: swl t7,0(a3) // store right nibble
782: bne a1,t4,10b // if ne, more scan lines to process
783: add a0,a0,t3 // compute next draw point address
784: .set at
785: .set reorder
786:
787: j ra // return
788:
789: //
790: // Five nibbles are required for 17, 18, 19, or 20 pixel wide glyph. The
791: // middle pixels are quadword aligned.
792: //
793:
794: #if defined(R4000)
795:
796: .set noreorder
797: .set noat
798: 20: lwr v0,0(a1) // get next set of glyph pixels
799: lwl v0,3(a1) //
800: addu a1,a1,3 // advance to next set of glyph pixels
801: and v0,v0,t9 // isolate glyph bits
802: sll v1,v0,16 // shift high pixel bits into position
803: and t5,v0,0xff << 8 // isolate middle pixel bits
804: srl v0,v0,16 // shift low pixel bits into position
805: or v0,v0,v1 // merge swap big endian pixel bytes
806: or v0,v0,t5 //
807: srl v1,v0,20 - 2 // shift high nibble into position
808: and v1,v1,0xf << 2 // isolate color table index
809: addu v1,v1,t0 // compute color table address
810: lw t5,0(v1) // get color table entry
811: sll v0,v0,t2 // shift out alignment pixels
812: srl v1,v0,20 - 2 // shift next nibble into position
813: and v1,v1,0xf << 2 // isolate color table index
814: addu v1,v1,t0 // compute color table address
815: lwc1 f0,0(v1) // get color table entry
816: srl v1,v0,16 - 2 // shift next nibble into position
817: and v1,v1,0xf << 2 // isolate color table index
818: addu v1,v1,t0 // compute color table address
819: lwc1 f1,0(v1) // get color table entry
820: srl v1,v0,12 - 2 // shift next nibble into position
821: and v1,v1,0xf << 2 // isolate color table index
822: addu v1,v1,t0 // compute color table address
823: lw t6,0(v1) // get color table entry
824: srl v1,v0,8 - 2 // shift low nibble into position
825: and v1,v1,0xf << 2 // isolate color table index
826: addu v1,v1,t0 // compute color table address
827: lw t7,0(v1) // get color table entry
828: addu a2,a0,t2 // compute aligned draw point address
829: add a3,a3,t3 // compute trailing byte address
830: sll t7,t7,t1 // shift high nibble into place
831:
832: //
833: // swr, sw, sw, sw, swl required.
834: //
835:
836: swr t5,0(a0) // store left nibble
837: sdc1 f0,0(a2) // store middle nibbles
838: sw t6,8(a2) // store high middle nibble
839: swl t7,0(a3) // store right nibble
840: bne a1,t4,20b // if ne, more scan lines to process
841: add a0,a0,t3 // compute next draw point address
842: .set at
843: .set reorder
844:
845: j ra // return
846:
847: #endif
848:
849: //
850: // Six nibbles are required for 17, 18, 19, or 20 pixel wide glyph.
851: //
852:
853: #if defined(R4000)
854:
855: 30: and t5,a0,1 << 2 // check if middle quadword aligned
856: bne zero,t5,50f // if ne, middle quadword aligned
857:
858: #endif
859:
860: .set noreorder
861: .set noat
862: 40: lwr v0,0(a1) // get next set of glyph pixels
863: lwl v0,3(a1) //
864: addu a1,a1,3 // advance to next set of glyph pixels
865: and v0,v0,t9 // isolate glyph bits
866: sll v1,v0,16 // shift high pixel bits into position
867: and t5,v0,0xff << 8 // isolate middle pixel bits
868: srl v0,v0,16 // shift low pixel bits into position
869: or v0,v0,v1 // merge swap big endian pixel bytes
870: or v0,v0,t5 //
871: srl v1,v0,20 - 2 // shift high nibble into position
872: and v1,v1,0xf << 2 // isolate color table index
873: addu v1,v1,t0 // compute color table address
874: lw t5,0(v1) // get color table entry
875: sll v0,v0,t2 // shift out alignment pixels
876: srl v1,v0,20 - 2 // shift next nibble into position
877: and v1,v1,0xf << 2 // isolate color table index
878: addu v1,v1,t0 // compute color table address
879: lw t6,0(v1) // get color table entry
880: srl v1,v0,16 - 2 // shift next nibble into position
881: and v1,v1,0xf << 2 // isolate color table index
882: addu v1,v1,t0 // compute color table address
883: lwc1 f0,0(v1) // get color table entry
884: srl v1,v0,12 - 2 // shift next nibble into position
885: and v1,v1,0xf << 2 // isolate color table index
886: addu v1,v1,t0 // compute color table address
887: lwc1 f1,0(v1) // get color table entry
888: srl v1,v0,8 - 2 // shift next nibble into position
889: and v1,v1,0xf << 2 // isolate color table index
890: addu v1,v1,t0 // compute color table address
891: lw t7,0(v1) // get color table entry
892: srl v1,v0,4 - 2 // shift low nibble into position
893: and v1,v1,0xf << 2 // isolate color table index
894: addu v1,v1,t0 // compute color table address
895: lw t8,0(v1) // get color table entry
896: addu a2,a0,t2 // compute aligned draw point address
897: add a3,a3,t3 // compute trailing byte address
898: sll t8,t8,t1 // shift high nibble into place
899:
900: //
901: // swr, sw, sw, sw, sw, swl required.
902: //
903:
904: swr t5,0(a0) // store left nibble
905: sw t6,0(a2) // store low middle nibble
906:
907: #if defined(R4000)
908:
909: sdc1 f0,4(a2) // store low middle nibbles
910:
911: #else
912:
913: swc1 f0,4(a2) // store low middle nibble
914: swc1 f1,8(a2) // store middle middle nibble
915:
916: #endif
917:
918: sw t7,12(a2) // store high middle nibble
919: swl t8,0(a3) // store right nibble
920: bne a1,t4,40b // if ne, more scan lines to process
921: add a0,a0,t3 // compute next draw point address
922: .set at
923: .set reorder
924:
925: j ra // return
926:
927: //
928: // Six nibbles are required for 17, 18, 19, or 20 pixel wide glyph. The
929: // middle pixels are quadword aligned.
930: //
931:
932: #if defined(R4000)
933:
934: .set noreorder
935: .set noat
936: 50: lwr v0,0(a1) // get next set of glyph pixels
937: lwl v0,3(a1) //
938: addu a1,a1,3 // advance to next set of glyph pixels
939: and v0,v0,t9 // isolate glyph bits
940: sll v1,v0,16 // shift high pixel bits into position
941: and t5,v0,0xff << 8 // isolate middle pixel bits
942: srl v0,v0,16 // shift low pixel bits into position
943: or v0,v0,v1 // merge swap big endian pixel bytes
944: or v0,v0,t5 //
945: srl v1,v0,20 - 2 // shift high nibble into position
946: and v1,v1,0xf << 2 // isolate color table index
947: addu v1,v1,t0 // compute color table address
948: lw t5,0(v1) // get color table entry
949: sll v0,v0,t2 // shift out alignment pixels
950: srl v1,v0,20 - 2 // shift next nibble into position
951: and v1,v1,0xf << 2 // isolate color table index
952: addu v1,v1,t0 // compute color table address
953: lwc1 f0,0(v1) // get color table entry
954: srl v1,v0,16 - 2 // shift next nibble into position
955: and v1,v1,0xf << 2 // isolate color table index
956: addu v1,v1,t0 // compute color table address
957: lwc1 f1,0(v1) // get color table entry
958: srl v1,v0,12 - 2 // shift next nibble into position
959: and v1,v1,0xf << 2 // isolate color table index
960: addu v1,v1,t0 // compute color table address
961: lwc1 f2,0(v1) // get color table entry
962: srl v1,v0,8 - 2 // shift next nibble into position
963: and v1,v1,0xf << 2 // isolate color table index
964: addu v1,v1,t0 // compute color table address
965: lwc1 f3,0(v1) // get color table entry
966: srl v1,v0,4 - 2 // shift low nibble into position
967: and v1,v1,0xf << 2 // isolate color table index
968: addu v1,v1,t0 // compute color table address
969: lw t6,0(v1) // get color table entry
970: addu a2,a0,t2 // compute aligned draw point address
971: add a3,a3,t3 // compute trailing byte address
972: sll t6,t6,t1 // shift high nibble into place
973:
974: //
975: // swr, sw, sw, sw, sw, swl required.
976: //
977:
978: swr t5,0(a0) // store left nibble
979: sdc1 f0,0(a2) // store low middle nibbles
980: sdc1 f2,8(a2) // store high middle nibbles
981: swl t6,0(a3) // store right nibble
982: bne a1,t4,50b // if ne, more scan lines to process
983: add a0,a0,t3 // compute next draw point address
984: .set at
985: .set reorder
986:
987: j ra // return
988:
989: #endif
990:
991: //
992: // Glyph output for 21, 22, 23, and 24 pixel wide glyphs.
993: //
994:
995: ALTERNATE_ENTRY(DrvpOutputOpaque21.22.23.24)
996:
997: la t0,DrvpDrawColorTable // set base address of color table
998: lw t3,DrvpScanLineWidth // get scanline stride in bytes
999: and t1,a0,0x3 // isolate draw point alignment bits
1000: li t2,4 // compute number of pixels to alignment
1001: subu t2,t2,t1 //
1002: addu t4,a3,a3 // compute the total size of the glyph
1003: addu t4,t4,a3 //
1004: addu t4,t4,a1 // compute ending address of glyph bits
1005: addu a3,a2,a0 // compute trailing alignment address
1006: subu a3,a3,1 //
1007: nor t1,a3,zero // compute trailing byte left shift
1008: and t1,t1,0x3 //
1009: sll t1,t1,3 //
1010: li t9,0xffffff // set glyph mask value
1011:
1012: .set noreorder
1013: .set noat
1014: addu t5,t2,20 // compute six nibble boundary
1015: sltu v0,t5,a2 // check if seven nibbles required
1016:
1017: #if defined(R4000)
1018:
1019: beq zero,v0,30b // if eq, six nibbles required
1020:
1021: #else
1022:
1023: beq zero,v0,40b // if eq, six nibbles required
1024:
1025: #endif
1026:
1027: sub a3,a3,t3 // offset address by scan line stride
1028: .set at
1029: .set reorder
1030:
1031: //
1032: // Seven nibbles are required for 21, 22, 23, or 24 pixel wide glyphs.
1033: //
1034:
1035: #if defined(R4000)
1036:
1037: and t5,a0,1 << 2 // check if middle quadword aligned
1038: bne zero,t5,20f // if ne, middle quadword aligned
1039:
1040: #endif
1041:
1042: .set noreorder
1043: .set noat
1044: 10: lwr v0,0(a1) // get next set of glyph pixels
1045: lwl v0,3(a1) //
1046: addu a1,a1,3 // advance to next set of glyph pixels
1047: and v0,v0,t9 // isolate glyph bits
1048: sll v1,v0,16 // shift high pixel bits into position
1049: and t5,v0,0xff << 8 // isolate middle pixel bits
1050: srl v0,v0,16 // shift low pixel bits into position
1051: or v0,v0,v1 // merge swap big endian pixel bytes
1052: or v0,v0,t5 //
1053: srl v1,v0,20 - 2 // shift high nibble into position
1054: and v1,v1,0xf << 2 // isolate color table index
1055: addu v1,v1,t0 // compute color table address
1056: lw t5,0(v1) // get color table entry
1057: sll v0,v0,t2 // shift out alignment pixels
1058: srl v1,v0,20 - 2 // shift next nibble into position
1059: and v1,v1,0xf << 2 // isolate color table index
1060: addu v1,v1,t0 // compute color table address
1061: lw t6,0(v1) // get color table entry
1062: srl v1,v0,16 - 2 // shift next nibble into position
1063: and v1,v1,0xf << 2 // isolate color table index
1064: addu v1,v1,t0 // compute color table address
1065: lwc1 f0,0(v1) // get color table entry
1066: srl v1,v0,12 - 2 // shift next nibble into position
1067: and v1,v1,0xf << 2 // isolate color table index
1068: addu v1,v1,t0 // compute color table address
1069: lwc1 f1,0(v1) // get color table entry
1070: srl v1,v0,8 - 2 // shift next nibble into position
1071: and v1,v1,0xf << 2 // isolate color table index
1072: addu v1,v1,t0 // compute color table address
1073: lwc1 f2,0(v1) // get color table entry
1074: srl v1,v0,4 - 2 // shift next nibble into position
1075: and v1,v1,0xf << 2 // isolate color table index
1076: addu v1,v1,t0 // compute color table address
1077: lwc1 f3,0(v1) // get color table entry
1078: sll v1,v0,2 // shift low nibble into position
1079: and v1,v1,0xf << 2 // isolate color table index
1080: addu v1,v1,t0 // compute color table address
1081: lw t7,0(v1) // get color table entry
1082: addu a2,a0,t2 // compute aligned draw point address
1083: add a3,a3,t3 // compute trailing byte address
1084: sll t7,t7,t1 // shift high nibble into place
1085:
1086: //
1087: // swr, sw, sw, sw, sw, sw, swl required.
1088: //
1089:
1090: swr t5,0(a0) // store left nibble
1091: sw t6,0(a2) // store low middle nibble
1092:
1093: #if defined(R4000)
1094:
1095: sdc1 f0,4(a2) // store low middle nibbles
1096: sdc1 f2,12(a2) // store high middle nibbles
1097:
1098: #else
1099:
1100: swc1 f0,4(a2) // store low middle nibble
1101: swc1 f1,8(a2) // store middle middle nibble
1102: swc1 f2,12(a2) // store middle middle nibble
1103: swc1 f3,16(a2) // store high middle nibble
1104:
1105: #endif
1106:
1107: swl t7,0(a3) // store right nibble
1108: bne a1,t4,10b // if ne, more scan lines to process
1109: add a0,a0,t3 // compute next draw point address
1110: .set at
1111: .set reorder
1112:
1113: j ra // return
1114:
1115: //
1116: // Seven nibbles are required for 21, 22, 23, or 24 pixel wide glyph. The
1117: // middle pixels are quadword aligned.
1118: //
1119:
1120: #if defined(R4000)
1121:
1122: .set noreorder
1123: .set noat
1124: 20: lwr v0,0(a1) // get next set of glyph pixels
1125: lwl v0,3(a1) //
1126: addu a1,a1,3 // advance to next set of glyph pixels
1127: and v0,v0,t9 // isolate glyph bits
1128: sll v1,v0,16 // shift high pixel bits into position
1129: and t5,v0,0xff << 8 // isolate middle pixel bits
1130: srl v0,v0,16 // shift low pixel bits into position
1131: or v0,v0,v1 // merge swap big endian pixel bytes
1132: or v0,v0,t5 //
1133: srl v1,v0,20 - 2 // shift high nibble into position
1134: and v1,v1,0xf << 2 // isolate color table index
1135: addu v1,v1,t0 // compute color table address
1136: lw t5,0(v1) // get color table entry
1137: sll v0,v0,t2 // shift out alignment pixels
1138: srl v1,v0,20 - 2 // shift next nibble into position
1139: and v1,v1,0xf << 2 // isolate color table index
1140: addu v1,v1,t0 // compute color table address
1141: lwc1 f0,0(v1) // get color table entry
1142: srl v1,v0,16 - 2 // shift next nibble into position
1143: and v1,v1,0xf << 2 // isolate color table index
1144: addu v1,v1,t0 // compute color table address
1145: lwc1 f1,0(v1) // get color table entry
1146: srl v1,v0,12 - 2 // shift next nibble into position
1147: and v1,v1,0xf << 2 // isolate color table index
1148: addu v1,v1,t0 // compute color table address
1149: lwc1 f2,0(v1) // get color table entry
1150: srl v1,v0,8 - 2 // shift next nibble into position
1151: and v1,v1,0xf << 2 // isolate color table index
1152: addu v1,v1,t0 // compute color table address
1153: lwc1 f3,0(v1) // get color table entry
1154: srl v1,v0,4 - 2 // shift next nibble into position
1155: and v1,v1,0xf << 2 // isolate color table index
1156: addu v1,v1,t0 // compute color table address
1157: lw t6,0(v1) // get color table entry
1158: sll v1,v0,2 // shift low nibble into position
1159: and v1,v1,0xf << 2 // isolate color table index
1160: addu v1,v1,t0 // compute color table address
1161: lw t7,0(v1) // get color table entry
1162: addu a2,a0,t2 // compute aligned draw point address
1163: add a3,a3,t3 // compute trailing byte address
1164: sll t7,t7,t1 // shift high nibble into place
1165:
1166: //
1167: // swr, sw, sw, sw, sw, sw, swl required.
1168: //
1169:
1170: swr t5,0(a0) // store left nibble
1171: sdc1 f0,0(a2) // store low middle nibbles
1172: sdc1 f2,8(a2) // store high middle nibbles
1173: sw t6,16(a2) // store highest middle nibble
1174: swl t7,0(a3) // store right nibble
1175: bne a1,t4,20b // if ne, more scan lines to process
1176: add a0,a0,t3 // compute next draw point address
1177: .set at
1178: .set reorder
1179:
1180: j ra // return
1181:
1182: #endif
1183:
1184: //
1185: // Glyph output for 25, 26, 27, and 28 pixel wide glyphs.
1186: //
1187:
1188: ALTERNATE_ENTRY(DrvpOutputOpaque25.26.27.28)
1189:
1190: la t0,DrvpDrawColorTable // set base address of color table
1191: lw t3,DrvpScanLineWidth // get scanline stride in bytes
1192: and t1,a0,0x3 // isolate draw point alignment bits
1193: li t2,4 // compute number of pixels to alignment
1194: subu t2,t2,t1 //
1195: sll t4,a3,2 // compute the total size of the glyph
1196: addu t4,t4,a1 // compute ending address of glyph bits
1197: addu a3,a2,a0 // compute trailing alignment address
1198: subu a3,a3,1 //
1199: nor t1,a3,zero // compute trailing byte left shift
1200: and t1,t1,0x3 //
1201: sll t1,t1,3 //
1202:
1203: .set noreorder
1204: .set noat
1205: addu t5,t2,24 // compute seven nibble boundary
1206: sltu v0,t5,a2 // check if eight nibbles required
1207:
1208: #if defined(R4000)
1209:
1210: bne zero,v0,30f // if ne, eight nibbles required
1211:
1212: #else
1213:
1214: bne zero,v0,40f // if ne, eight nibbles required
1215:
1216: #endif
1217:
1218: sub a3,a3,t3 // offset address by scan line stride
1219: .set at
1220: .set reorder
1221:
1222: //
1223: // Seven nibbles are required for 25, 26, 27, or 28 pixel wide glyphs.
1224: //
1225:
1226: #if defined(R4000)
1227:
1228: and t5,a0,1 << 2 // check if middle quadword aligned
1229: bne zero,t5,20f // if ne, middle quadword aligned
1230:
1231: #endif
1232:
1233: .set noreorder
1234: .set noat
1235: 10: lw v0,0(a1) // get next set of glyph pixels
1236: addu a1,a1,4 // advance to next set of glyph pixels
1237: sll v1,v0,24 // shift high pixel bits into position
1238: and t5,v0,0xff << 8 // isolate middle high pixels
1239: sll t5,t5,8 // shift middle high pixels into place
1240: srl t6,v0,8 // shift middle low pixels into place
1241: and t6,t6,0xff << 8 // isoalte middle low pixels
1242: srl v0,v0,24 // shift low pixel bits into position
1243: or v0,v0,v1 // merge swap big endian pixel bytes
1244: or t5,t5,t6 //
1245: or v0,v0,t5 //
1246: srl v1,v0,28 - 2 // shift high nibble into position
1247: and v1,v1,0xf << 2 // isolate color table index
1248: addu v1,v1,t0 // compute color table address
1249: lw t5,0(v1) // get color table entry
1250: sll v0,v0,t2 // shift out alignment pixels
1251: srl v1,v0,28 - 2 // shift next nibble into position
1252: and v1,v1,0xf << 2 // isolate color table index
1253: addu v1,v1,t0 // compute color table address
1254: lw t6,0(v1) // get color table entry
1255: srl v1,v0,24 - 2 // shift next nibble into position
1256: and v1,v1,0xf << 2 // isolate color table index
1257: addu v1,v1,t0 // compute color table address
1258: lwc1 f0,0(v1) // get color table entry
1259: srl v1,v0,20 - 2 // shift next nibble into position
1260: and v1,v1,0xf << 2 // isolate color table index
1261: addu v1,v1,t0 // compute color table address
1262: lwc1 f1,0(v1) // get color table entry
1263: srl v1,v0,16 - 2 // shift next nibble into position
1264: and v1,v1,0xf << 2 // isolate color table index
1265: addu v1,v1,t0 // compute color table address
1266: lwc1 f2,0(v1) // get color table entry
1267: srl v1,v0,12 - 2 // shift next nibble into position
1268: and v1,v1,0xf << 2 // isolate color table index
1269: addu v1,v1,t0 // compute color table address
1270: lwc1 f3,0(v1) // get color table entry
1271: srl v1,v0,8 - 2 // shift next nibble into position
1272: and v1,v1,0xf << 2 // isolate color table index
1273: addu v1,v1,t0 // compute color table address
1274: lw t7,0(v1) // get color table entry
1275: addu a2,a0,t2 // compute aligned draw point address
1276: add a3,a3,t3 // compute trailing byte address
1277: sll t7,t7,t1 // shift high nibble into place
1278:
1279: //
1280: // swr, sw, sw, sw, sw, sw, swl required.
1281: //
1282:
1283: swr t5,0(a0) // store left nibble
1284: sw t6,0(a2) // store low middle nibble
1285:
1286: #if defined(R4000)
1287:
1288: sdc1 f0,4(a2) // store low middle nibbles
1289: sdc1 f2,12(a2) // store high middle nibbles
1290:
1291: #else
1292:
1293: swc1 f0,4(a2) // store low middle nibble
1294: swc1 f1,8(a2) // store middle middle nibble
1295: swc1 f2,12(a2) // store middle middle nibble
1296: swc1 f3,16(a2) // store high middle nibble
1297:
1298: #endif
1299:
1300: swl t7,0(a3) // store right nibble
1301: bne a1,t4,10b // if ne, more scan lines to process
1302: add a0,a0,t3 // compute next draw point address
1303: .set at
1304: .set reorder
1305:
1306: j ra // return
1307:
1308: //
1309: // Seven nibbles are required for 25, 26, 27, or 28 pixel wide glyph. The
1310: // middle pixels are quadword aligned.
1311: //
1312:
1313: #if defined(R4000)
1314:
1315: .set noreorder
1316: .set noat
1317: 20: lw v0,0(a1) // get next set of glyph pixels
1318: addu a1,a1,4 // advance to next set of glyph pixels
1319: sll v1,v0,24 // shift high pixel bits into position
1320: and t5,v0,0xff << 8 // isolate middle high pixels
1321: sll t5,t5,8 // shift middle high pixels into place
1322: srl t6,v0,8 // shift middle low pixels into place
1323: and t6,t6,0xff << 8 // isoalte middle low pixels
1324: srl v0,v0,24 // shift low pixel bits into position
1325: or v0,v0,v1 // merge swap big endian pixel bytes
1326: or t5,t5,t6 //
1327: or v0,v0,t5 //
1328: srl v1,v0,28 - 2 // shift high nibble into position
1329: and v1,v1,0xf << 2 // isolate color table index
1330: addu v1,v1,t0 // compute color table address
1331: lw t5,0(v1) // get color table entry
1332: sll v0,v0,t2 // shift out alignment pixels
1333: srl v1,v0,28 - 2 // shift next nibble into position
1334: and v1,v1,0xf << 2 // isolate color table index
1335: addu v1,v1,t0 // compute color table address
1336: lwc1 f0,0(v1) // get color table entry
1337: srl v1,v0,24 - 2 // shift next nibble into position
1338: and v1,v1,0xf << 2 // isolate color table index
1339: addu v1,v1,t0 // compute color table address
1340: lwc1 f1,0(v1) // get color table entry
1341: srl v1,v0,20 - 2 // shift next nibble into position
1342: and v1,v1,0xf << 2 // isolate color table index
1343: addu v1,v1,t0 // compute color table address
1344: lwc1 f2,0(v1) // get color table entry
1345: srl v1,v0,16 - 2 // shift next nibble into position
1346: and v1,v1,0xf << 2 // isolate color table index
1347: addu v1,v1,t0 // compute color table address
1348: lwc1 f3,0(v1) // get color table entry
1349: srl v1,v0,12 - 2 // shift next nibble into position
1350: and v1,v1,0xf << 2 // isolate color table index
1351: addu v1,v1,t0 // compute color table address
1352: lw t6,0(v1) // get color table entry
1353: srl v1,v0,8 - 2 // shift next nibble into position
1354: and v1,v1,0xf << 2 // isolate color table index
1355: addu v1,v1,t0 // compute color table address
1356: lw t7,0(v1) // get color table entry
1357: addu a2,a0,t2 // compute aligned draw point address
1358: add a3,a3,t3 // compute trailing byte address
1359: sll t7,t7,t1 // shift high nibble into place
1360:
1361: //
1362: // swr, sw, sw, sw, sw, sw, swl required.
1363: //
1364:
1365: swr t5,0(a0) // store left nibble
1366: sdc1 f0,0(a2) // store low middle nibbles
1367: sdc1 f2,8(a2) // store high middle nibbles
1368: sw t6,16(a2) // store highest middle nibble
1369: swl t7,0(a3) // store right nibble
1370: bne a1,t4,20b // if ne, more scan lines to process
1371: add a0,a0,t3 // compute next draw point address
1372: .set at
1373: .set reorder
1374:
1375: j ra // return
1376:
1377: #endif
1378:
1379: //
1380: // Eight nibbles are required for 25, 26, 27, or 28 pixel wide glyphs.
1381: //
1382:
1383: #if defined(R4000)
1384:
1385: 30: and t5,a0,1 << 2 // check if middle quadword aligned
1386: bne zero,t5,50f // if ne, middle quadword aligned
1387:
1388: #endif
1389:
1390: .set noreorder
1391: .set noat
1392: 40: lw v0,0(a1) // get next set of glyph pixels
1393: addu a1,a1,4 // advance to next set of glyph pixels
1394: sll v1,v0,24 // shift high pixel bits into position
1395: and t5,v0,0xff << 8 // isolate middle high pixels
1396: sll t5,t5,8 // shift middle high pixels into place
1397: srl t6,v0,8 // shift middle low pixels into place
1398: and t6,t6,0xff << 8 // isoalte middle low pixels
1399: srl v0,v0,24 // shift low pixel bits into position
1400: or v0,v0,v1 // merge swap big endian pixel bytes
1401: or t5,t5,t6 //
1402: or v0,v0,t5 //
1403: srl v1,v0,28 - 2 // shift high nibble into position
1404: and v1,v1,0xf << 2 // isolate color table index
1405: addu v1,v1,t0 // compute color table address
1406: lw t5,0(v1) // get color table entry
1407: sll v0,v0,t2 // shift out alignment pixels
1408: srl v1,v0,28 - 2 // shift next nibble into position
1409: and v1,v1,0xf << 2 // isolate color table index
1410: addu v1,v1,t0 // compute color table address
1411: lw t6,0(v1) // get color table entry
1412: srl v1,v0,24 - 2 // shift next nibble into position
1413: and v1,v1,0xf << 2 // isolate color table index
1414: addu v1,v1,t0 // compute color table address
1415: lwc1 f0,0(v1) // get color table entry
1416: srl v1,v0,20 - 2 // shift next nibble into position
1417: and v1,v1,0xf << 2 // isolate color table index
1418: addu v1,v1,t0 // compute color table address
1419: lwc1 f1,0(v1) // get color table entry
1420: srl v1,v0,16 - 2 // shift next nibble into position
1421: and v1,v1,0xf << 2 // isolate color table index
1422: addu v1,v1,t0 // compute color table address
1423: lwc1 f2,0(v1) // get color table entry
1424: srl v1,v0,12 - 2 // shift next nibble into position
1425: and v1,v1,0xf << 2 // isolate color table index
1426: addu v1,v1,t0 // compute color table address
1427: lwc1 f3,0(v1) // get color table entry
1428: srl v1,v0,8 - 2 // shift next nibble into position
1429: and v1,v1,0xf << 2 // isolate color table index
1430: addu v1,v1,t0 // compute color table address
1431: lw t7,0(v1) // get color table entry
1432: srl v1,v0,4 - 2 // shift next nibble into position
1433: and v1,v1,0xf << 2 // isolate color table index
1434: addu v1,v1,t0 // compute color table address
1435: lw t8,0(v1) // get color table entry
1436: addu a2,a0,t2 // compute aligned draw point address
1437: add a3,a3,t3 // compute trailing byte address
1438: sll t8,t8,t1 // shift high nibble into place
1439:
1440: //
1441: // swr, sw, sw, sw, sw, sw, sw, swl required.
1442: //
1443:
1444: swr t5,0(a0) // store left nibble
1445: sw t6,0(a2) // store low middle nibble
1446:
1447: #if defined(R4000)
1448:
1449: sdc1 f0,4(a2) // store low middle nibbles
1450: sdc1 f2,12(a2) // store high middle nibbles
1451:
1452: #else
1453:
1454: swc1 f0,4(a2) // store low middle nibble
1455: swc1 f1,8(a2) // store middle middle nibble
1456: swc1 f2,12(a2) // store middle middle nibble
1457: swc1 f3,16(a2) // store high middle nibble
1458:
1459: #endif
1460:
1461: sw t7,20(a2) // store high middle nibble
1462: swl t8,0(a3) // store right nibble
1463: bne a1,t4,40b // if ne, more scan lines to process
1464: add a0,a0,t3 // compute next draw point address
1465: .set at
1466: .set reorder
1467:
1468: j ra // return
1469:
1470: //
1471: // Eight nibbles are required for 25, 26, 27, or 28 pixel wide glyph. The
1472: // middle pixels are quadword aligned.
1473: //
1474:
1475: #if defined(R4000)
1476:
1477: .set noreorder
1478: .set noat
1479: 50: lw v0,0(a1) // get next set of glyph pixels
1480: addu a1,a1,4 // advance to next set of glyph pixels
1481: sll v1,v0,24 // shift high pixel bits into position
1482: and t5,v0,0xff << 8 // isolate middle high pixels
1483: sll t5,t5,8 // shift middle high pixels into place
1484: srl t6,v0,8 // shift middle low pixels into place
1485: and t6,t6,0xff << 8 // isoalte middle low pixels
1486: srl v0,v0,24 // shift low pixel bits into position
1487: or v0,v0,v1 // merge swap big endian pixel bytes
1488: or t5,t5,t6 //
1489: or v0,v0,t5 //
1490: srl v1,v0,28 - 2 // shift high nibble into position
1491: and v1,v1,0xf << 2 // isolate color table index
1492: addu v1,v1,t0 // compute color table address
1493: lw t5,0(v1) // get color table entry
1494: sll v0,v0,t2 // shift out alignment pixels
1495: srl v1,v0,28 - 2 // shift next nibble into position
1496: and v1,v1,0xf << 2 // isolate color table index
1497: addu v1,v1,t0 // compute color table address
1498: lwc1 f0,0(v1) // get color table entry
1499: srl v1,v0,24 - 2 // shift next nibble into position
1500: and v1,v1,0xf << 2 // isolate color table index
1501: addu v1,v1,t0 // compute color table address
1502: lwc1 f1,0(v1) // get color table entry
1503: srl v1,v0,20 - 2 // shift next nibble into position
1504: and v1,v1,0xf << 2 // isolate color table index
1505: addu v1,v1,t0 // compute color table address
1506: lwc1 f2,0(v1) // get color table entry
1507: srl v1,v0,16 - 2 // shift next nibble into position
1508: and v1,v1,0xf << 2 // isolate color table index
1509: addu v1,v1,t0 // compute color table address
1510: lwc1 f3,0(v1) // get color table entry
1511: srl v1,v0,12 - 2 // shift next nibble into position
1512: and v1,v1,0xf << 2 // isolate color table index
1513: addu v1,v1,t0 // compute color table address
1514: lwc1 f4,0(v1) // get color table entry
1515: srl v1,v0,8 - 2 // shift next nibble into position
1516: and v1,v1,0xf << 2 // isolate color table index
1517: addu v1,v1,t0 // compute color table address
1518: lwc1 f5,0(v1) // get color table entry
1519: srl v1,v0,4 - 2 // shift next nibble into position
1520: and v1,v1,0xf << 2 // isolate color table index
1521: addu v1,v1,t0 // compute color table address
1522: lw t6,0(v1) // get color table entry
1523: addu a2,a0,t2 // compute aligned draw point address
1524: add a3,a3,t3 // compute trailing byte address
1525: sll t6,t6,t1 // shift high nibble into place
1526:
1527: //
1528: // swr, sw, sw, sw, sw, sw, sw, swl required.
1529: //
1530:
1531: swr t5,0(a0) // store left nibble
1532: sdc1 f0,0(a2) // store low middle nibbles
1533: sdc1 f2,8(a2) // store high middle nibbles
1534: sdc1 f4,16(a2) // store highest middle nibbles
1535: swl t6,0(a3) // store right nibble
1536: bne a1,t4,50b // if ne, more scan lines to process
1537: add a0,a0,t3 // compute next draw point address
1538: .set at
1539: .set reorder
1540:
1541: j ra // return
1542:
1543: #endif
1544:
1545: //
1546: // Glyph output for 29, 30, 31, and 32 pixel wide glyphs.
1547: //
1548:
1549: ALTERNATE_ENTRY(DrvpOutputOpaque29.30.31.32)
1550:
1551: la t0,DrvpDrawColorTable // set base address of color table
1552: lw t3,DrvpScanLineWidth // get scanline stride in bytes
1553: and t1,a0,0x3 // isolate draw point alignment bits
1554: li t2,4 // compute number of pixels to alignment
1555: subu t2,t2,t1 //
1556: sll t4,a3,2 // compute the total size of the glyph
1557: addu t4,t4,a1 // compute ending address of glyph bits
1558: addu a3,a2,a0 // compute trailing alignment address
1559: subu a3,a3,1 //
1560: nor t1,a3,zero // compute trailing byte left shift
1561: and t1,t1,0x3 //
1562: sll t1,t1,3 //
1563:
1564: .set noreorder
1565: .set noat
1566: addu t5,t2,28 // compute eight nibble boundary
1567: sltu v0,t5,a2 // check if nine nibbles required
1568:
1569: #if defined(R4000)
1570:
1571: beq zero,v0,30b // if eq, eight nibbles required
1572:
1573: #else
1574:
1575: beq zero,v0,40b // if eq, eight nibbles required
1576:
1577: #endif
1578:
1579: sub a3,a3,t3 // offset address by scan line stride
1580: .set at
1581: .set reorder
1582:
1583: //
1584: // Nine nibbles are required for 29, 30, 31, or 32 pixel wide glyphs.
1585: //
1586:
1587: #if defined(R4000)
1588:
1589: and t5,a0,1 << 2 // check if middle quadword aligned
1590: bne zero,t5,20f // if ne, middle quadword aligned
1591:
1592: #endif
1593:
1594: .set noreorder
1595: .set noat
1596: 10: lw v0,0(a1) // get next set of glyph pixels
1597: addu a1,a1,4 // advance to next set of glyph pixels
1598: sll v1,v0,24 // shift high pixel bits into position
1599: and t5,v0,0xff << 8 // isolate middle high pixels
1600: sll t5,t5,8 // shift middle high pixels into place
1601: srl t6,v0,8 // shift middle low pixels into place
1602: and t6,t6,0xff << 8 // isoalte middle low pixels
1603: srl v0,v0,24 // shift low pixel bits into position
1604: or v0,v0,v1 // merge swap big endian pixel bytes
1605: or t5,t5,t6 //
1606: or v0,v0,t5 //
1607: srl v1,v0,28 - 2 // shift high nibble into position
1608: and v1,v1,0xf << 2 // isolate color table index
1609: addu v1,v1,t0 // compute color table address
1610: lw t5,0(v1) // get color table entry
1611: sll v0,v0,t2 // shift out alignment pixels
1612: srl v1,v0,28 - 2 // shift next nibble into position
1613: and v1,v1,0xf << 2 // isolate color table index
1614: addu v1,v1,t0 // compute color table address
1615: lw t6,0(v1) // get color table entry
1616: srl v1,v0,24 - 2 // shift next nibble into position
1617: and v1,v1,0xf << 2 // isolate color table index
1618: addu v1,v1,t0 // compute color table address
1619: lwc1 f0,0(v1) // get color table entry
1620: srl v1,v0,20 - 2 // shift next nibble into position
1621: and v1,v1,0xf << 2 // isolate color table index
1622: addu v1,v1,t0 // compute color table address
1623: lwc1 f1,0(v1) // get color table entry
1624: srl v1,v0,16 - 2 // shift next nibble into position
1625: and v1,v1,0xf << 2 // isolate color table index
1626: addu v1,v1,t0 // compute color table address
1627: lwc1 f2,0(v1) // get color table entry
1628: srl v1,v0,12 - 2 // shift next nibble into position
1629: and v1,v1,0xf << 2 // isolate color table index
1630: addu v1,v1,t0 // compute color table address
1631: lwc1 f3,0(v1) // get color table entry
1632: srl v1,v0,8 - 2 // shift next nibble into position
1633: and v1,v1,0xf << 2 // isolate color table index
1634: addu v1,v1,t0 // compute color table address
1635: lwc1 f4,0(v1) // get color table entry
1636: srl v1,v0,4 - 2 // shift next nibble into position
1637: and v1,v1,0xf << 2 // isolate color table index
1638: addu v1,v1,t0 // compute color table address
1639: lwc1 f5,0(v1) // get color table entry
1640: sll v1,v0,2 // shift next nibble into position
1641: and v1,v1,0xf << 2 // isolate color table index
1642: addu v1,v1,t0 // compute color table address
1643: lw t7,0(v1) // get color table entry
1644: addu a2,a0,t2 // compute aligned draw point address
1645: add a3,a3,t3 // compute trailing byte address
1646: sll t7,t7,t1 // shift high nibble into place
1647:
1648: //
1649: // swr, sw, sw, sw, sw, sw, sw, sw, swl required.
1650: //
1651:
1652: swr t5,0(a0) // store left nibble
1653: sw t6,0(a2) // store low middle nibble
1654:
1655: #if defined(R4000)
1656:
1657: sdc1 f0,4(a2) // store low middle nibbles
1658: sdc1 f2,12(a2) // store middle middle nibbles
1659: sdc1 f4,20(a2) // store high middle nibbles
1660:
1661: #else
1662:
1663: swc1 f0,4(a2) // store low middle nibble
1664: swc1 f1,8(a2) // store middle middle nibble
1665: swc1 f2,12(a2) // store middle middle nibble
1666: swc1 f3,16(a2) // store middle middle nibble
1667: swc1 f4,20(a2) // store middle middle nibble
1668: swc1 f5,24(a2) // store high middle nibble
1669:
1670: #endif
1671:
1672: swl t7,0(a3) // store right nibble
1673: bne a1,t4,10b // if ne, more scan lines to process
1674: add a0,a0,t3 // compute next draw point address
1675: .set at
1676: .set reorder
1677:
1678: j ra // return
1679:
1680: //
1681: // Nine nibbles are required for 29, 30, 31, or 32 pixel wide glyph. The
1682: // middle pixels are quadword aligned.
1683: //
1684:
1685: #if defined(R4000)
1686:
1687: .set noreorder
1688: .set noat
1689: 20: lw v0,0(a1) // get next set of glyph pixels
1690: addu a1,a1,4 // advance to next set of glyph pixels
1691: sll v1,v0,24 // shift high pixel bits into position
1692: and t5,v0,0xff << 8 // isolate middle high pixels
1693: sll t5,t5,8 // shift middle high pixels into place
1694: srl t6,v0,8 // shift middle low pixels into place
1695: and t6,t6,0xff << 8 // isoalte middle low pixels
1696: srl v0,v0,24 // shift low pixel bits into position
1697: or v0,v0,v1 // merge swap big endian pixel bytes
1698: or t5,t5,t6 //
1699: or v0,v0,t5 //
1700: srl v1,v0,28 - 2 // shift high nibble into position
1701: and v1,v1,0xf << 2 // isolate color table index
1702: addu v1,v1,t0 // compute color table address
1703: lw t5,0(v1) // get color table entry
1704: sll v0,v0,t2 // shift out alignment pixels
1705: srl v1,v0,28 - 2 // shift next nibble into position
1706: and v1,v1,0xf << 2 // isolate color table index
1707: addu v1,v1,t0 // compute color table address
1708: lwc1 f0,0(v1) // get color table entry
1709: srl v1,v0,24 - 2 // shift next nibble into position
1710: and v1,v1,0xf << 2 // isolate color table index
1711: addu v1,v1,t0 // compute color table address
1712: lwc1 f1,0(v1) // get color table entry
1713: srl v1,v0,20 - 2 // shift next nibble into position
1714: and v1,v1,0xf << 2 // isolate color table index
1715: addu v1,v1,t0 // compute color table address
1716: lwc1 f2,0(v1) // get color table entry
1717: srl v1,v0,16 - 2 // shift next nibble into position
1718: and v1,v1,0xf << 2 // isolate color table index
1719: addu v1,v1,t0 // compute color table address
1720: lwc1 f3,0(v1) // get color table entry
1721: srl v1,v0,12 - 2 // shift next nibble into position
1722: and v1,v1,0xf << 2 // isolate color table index
1723: addu v1,v1,t0 // compute color table address
1724: lwc1 f4,0(v1) // get color table entry
1725: srl v1,v0,8 - 2 // shift next nibble into position
1726: and v1,v1,0xf << 2 // isolate color table index
1727: addu v1,v1,t0 // compute color table address
1728: lwc1 f5,0(v1) // get color table entry
1729: srl v1,v0,4 - 2 // shift next nibble into position
1730: and v1,v1,0xf << 2 // isolate color table index
1731: addu v1,v1,t0 // compute color table address
1732: lw t6,0(v1) // get color table entry
1733: srl v1,v0,2 // shift next nibble into position
1734: and v1,v1,0xf << 2 // isolate color table index
1735: addu v1,v1,t0 // compute color table address
1736: lw t7,0(v1) // get color table entry
1737: addu a2,a0,t2 // compute aligned draw point address
1738: add a3,a3,t3 // compute trailing byte address
1739: sll t7,t7,t1 // shift high nibble into place
1740:
1741: //
1742: // swr, sw, sw, sw, sw. sw, sw, sw, swl required.
1743: //
1744:
1745: swr t5,0(a0) // store left nibble
1746: sdc1 f0,0(a2) // store low middle nibbles
1747: sdc1 f2,8(a2) // store middle middle nibbles
1748: sdc1 f4,16(a2) // store high middle nibbles
1749: sw t6,24(a2) // store highest middle nibble
1750: swl t7,0(a3) // store right nibble
1751: bne a1,t4,20b // if ne, more scan lines to process
1752: add a0,a0,t3 // compute next draw point address
1753: .set at
1754: .set reorder
1755:
1756: j ra // return
1757:
1758: #endif
1759:
1760: .end DrvpOutputGlyphOpaque
1761:
1762: SBTTL("Output Glyph Transparent")
1763: //++
1764: //
1765: // VOID
1766: // DrvpOutputGlyphTransparent (
1767: // IN PUCHAR DrawPoint,
1768: // IN PULONG GlyphBitmap,
1769: // IN ULONG GlyphWidth,
1770: // IN ULONG GlyphHeight
1771: // )
1772: //
1773: // Routine Description:
1774: //
1775: // This routine is called to display a complete glyph. It is assumed
1776: // that the glyph occupies an integral multiple of longwords and that
1777: // the last longword is zero filled. Zeros are treated as transparent
1778: // pixels and ones cause the specified color to be displayed. This
1779: // routine draws only the foreground pixels.
1780: //
1781: // Arguments:
1782: //
1783: // DrawPoint (a0) - Supplies a pointer to the starting pixel of the
1784: // glyph scanline.
1785: //
1786: // GlyphBitmap (a1) - Supplies a pointer to the glyph scanline bitmap.
1787: //
1788: // GlyphWidth (a2) - Supplies the glyph width in pixels.
1789: //
1790: // GlyphHeigth (a3) - Supplies the glyph height in pixels.
1791: //
1792: // Return Value:
1793: //
1794: // None.
1795: //
1796: //--
1797:
1798: LEAF_ENTRY(DrvpOutputGlyphTransparent)
1799:
1800: lw t0,DrvpForeGroundColor // get drawing pixels
1801: lw t3,DrvpScanLineWidth // get the scan line stride in bytes
1802: la t1,60f // get base high dispatch address
1803: and t2,a0,0x3 // isolate low order draw point bits
1804: sll t2,t2,5 // shift bits into position
1805: addu t1,t1,t2 // compute partial dispatch address
1806: la t5,70f // get base low dispatch address
1807: addu t5,t5,t2 // compute partial dispatch address
1808: addu t2,a2,7 // round the bitmap span in bytes
1809: mult a3,t3 // compute offset to end of drawing
1810: srl t2,t2,3 // compute bitmap span in bytes
1811: sll t4,t2,3 // compute draw span in bytes
1812: sub t3,t3,t4 // compute draw stride in bytes
1813: mflo a3 // get offset to end of drawing
1814: addu a3,a3,a0 // compute ending address of drawing
1815:
1816: //
1817: // Set the current draw and bitmap base addresses, and begin drawing the
1818: // next scan line.
1819: //
1820:
1821: .set noreorder
1822: .set noat
1823: 10: addu t4,t2,a1 // compute ending bitmap address
1824:
1825: //
1826: // A glyph scan line is processed four bits at a time and combined with the
1827: // low order two bits of the current draw point. A dispatch is executed into
1828: // an array of code fragments that actually draw the pixels on the display.
1829: //
1830:
1831: 20: lbu v0,0(a1) // get next byte of glyph
1832: addu a1,a1,1 // advance to next glyph byte
1833: beq zero,v0,30f // if eq, no glyph bits to draw
1834: sll v1,v0,7 - 4 // shift high nibble into position
1835: and v1,v1,0xf << 7 // isolate low order nibble
1836: addu v1,v1,t1 // compute dispatch address
1837: j v1 // dispatch to pixel store routine
1838: sll v0,v0,7 // shift next nibble into position
1839:
1840: 30: bne a1,t4,20b // if ne, not end of glyph
1841: addu a0,a0,8 // advance to next draw point
1842: add a0,a0,t3 // compute next scanline address
1843: 40: beq a0,a3,50f // if eq, no more pixels to draw
1844: addu t4,t2,a1 // compute ending bitmap address
1845: lbu v0,0(a1) // get next byte of glyph
1846: addu a1,a1,1 // advance to next glyph byte
1847: beq zero,v0,30b // if eq, no glyph bits to draw
1848: sll v1,v0,7 - 4 // shift high nibble into position
1849: and v1,v1,0xf << 7 // isolate low order nibble
1850: addu v1,v1,t1 // compute dispatch address
1851: j v1 // dispatch to pixel store routine
1852: sll v0,v0,7 // shift next nibble into position
1853: .set reorder
1854: .set at
1855:
1856:
1857: 50: j ra // return
1858:
1859: //
1860: // The following code is arranged as 64, four instruction blocks. The block
1861: // of code that is chosen for execution is determined from the high order
1862: // glyph nibble and the two low its of the draw address.
1863: //
1864: // The glyph nibbles are encoded in big endian order and therefore the pixels
1865: // that are stored are the reverse of the big endian bits within the nibble.
1866: //
1867:
1868: .align 4
1869: .set noreorder
1870: .set noat
1871:
1872: 60: // reference label
1873: //
1874: // Pattern 0000-00
1875: //
1876:
1877: and v1,v0,0xf << 7 // isolate low order nibble
1878: addu v1,v1,t5 // compute dispatch address
1879: j v1 // dispatch to pixel store routine
1880: addu a0,a0,4 // advance to next draw point
1881: nop // fill
1882: nop //
1883: nop //
1884: nop //
1885:
1886: //
1887: // Pattern 0000-01
1888: //
1889:
1890: and v1,v0,0xf << 7 // isolate low order nibble
1891: addu v1,v1,t5 // compute dispatch address
1892: j v1 // dispatch to pixel store routine
1893: addu a0,a0,4 // advance to next draw point
1894: nop // fill
1895: nop //
1896: nop //
1897: nop //
1898:
1899: //
1900: // Pattern 0000-10
1901: //
1902:
1903: and v1,v0,0xf << 7 // isolate low order nibble
1904: addu v1,v1,t5 // compute dispatch address
1905: j v1 // dispatch to pixel store routine
1906: addu a0,a0,4 // advance to next draw point
1907: nop // fill
1908: nop //
1909: nop //
1910: nop //
1911:
1912: //
1913: // Pattern 0000-11
1914: //
1915:
1916: and v1,v0,0xf << 7 // isolate low order nibble
1917: addu v1,v1,t5 // compute dispatch address
1918: j v1 // dispatch to pixel store routine
1919: addu a0,a0,4 // advance to next draw point
1920: nop // fill
1921: nop //
1922: nop //
1923: nop //
1924:
1925: //
1926: // Pattern 0001-00 -> 1000
1927: //
1928:
1929: sb t0,3(a0) // store pixel
1930: and v1,v0,0xf << 7 // isolate low order nibble
1931: addu v1,v1,t5 // compute dispatch address
1932: j v1 // dispatch to pixel store routine
1933: addu a0,a0,4 // advance to next draw point
1934: nop // fill
1935: nop //
1936: nop //
1937:
1938: //
1939: // Pattern 0001-01 -> 1000
1940: //
1941:
1942: sb t0,3(a0) // store pixel
1943: and v1,v0,0xf << 7 // isolate low order nibble
1944: addu v1,v1,t5 // compute dispatch address
1945: j v1 // dispatch to pixel store routine
1946: addu a0,a0,4 // advance to next draw point
1947: nop // fill
1948: nop //
1949: nop //
1950:
1951: //
1952: // Pattern 0001-10 -> 1000
1953: //
1954:
1955: sb t0,3(a0) // store pixel
1956: and v1,v0,0xf << 7 // isolate low order nibble
1957: addu v1,v1,t5 // compute dispatch address
1958: j v1 // dispatch to pixel store routine
1959: addu a0,a0,4 // advance to next draw point
1960: nop // fill
1961: nop //
1962: nop //
1963:
1964: //
1965: // Pattern 0001-11 -> 1000
1966: //
1967:
1968: sb t0,3(a0) // store pixel
1969: and v1,v0,0xf << 7 // isolate low order nibble
1970: addu v1,v1,t5 // compute dispatch address
1971: j v1 // dispatch to pixel store routine
1972: addu a0,a0,4 // advance to next draw point
1973: nop // fill
1974: nop //
1975: nop //
1976:
1977: //
1978: // Pattern 0010-00 -> 0100
1979: //
1980:
1981: sb t0,2(a0) // store pixel
1982: and v1,v0,0xf << 7 // isolate low order nibble
1983: addu v1,v1,t5 // compute dispatch address
1984: j v1 // dispatch to pixel store routine
1985: addu a0,a0,4 // advance to next draw point
1986: nop // fill
1987: nop //
1988: nop //
1989:
1990: //
1991: // Pattern 0010-01 -> 0100
1992: //
1993:
1994: sb t0,2(a0) // store pixel
1995: and v1,v0,0xf << 7 // isolate low order nibble
1996: addu v1,v1,t5 // compute dispatch address
1997: j v1 // dispatch to pixel store routine
1998: addu a0,a0,4 // advance to next draw point
1999: nop // fill
2000: nop //
2001: nop //
2002:
2003: //
2004: // Pattern 0010-10 -> 0100
2005: //
2006:
2007: sb t0,2(a0) // store pixel
2008: and v1,v0,0xf << 7 // isolate low order nibble
2009: addu v1,v1,t5 // compute dispatch address
2010: j v1 // dispatch to pixel store routine
2011: addu a0,a0,4 // advance to next draw point
2012: nop // fill
2013: nop //
2014: nop //
2015:
2016: //
2017: // Pattern 0010-11 -> 0100
2018: //
2019:
2020: sb t0,2(a0) // store pixel
2021: and v1,v0,0xf << 7 // isolate low order nibble
2022: addu v1,v1,t5 // compute dispatch address
2023: j v1 // dispatch to pixel store routine
2024: addu a0,a0,4 // advance to next draw point
2025: nop // fill
2026: nop //
2027: nop //
2028:
2029: //
2030: // Pattern 0011-00 -> 1100
2031: //
2032:
2033: sh t0,2(a0) // store pixels
2034: and v1,v0,0xf << 7 // isolate low order nibble
2035: addu v1,v1,t5 // compute dispatch address
2036: j v1 // dispatch to pixel store routine
2037: addu a0,a0,4 // advance to next draw point
2038: nop // fill
2039: nop //
2040: nop //
2041:
2042: //
2043: // Pattern 0011-01 -> 1100
2044: //
2045:
2046: sb t0,2(a0) // store pixel
2047: sb t0,3(a0) // store pixel
2048: and v1,v0,0xf << 7 // isolate low order nibble
2049: addu v1,v1,t5 // compute dispatch address
2050: j v1 // dispatch to pixel store routine
2051: addu a0,a0,4 // advance to next draw point
2052: nop // fill
2053: nop //
2054:
2055: //
2056: // Pattern 0011-10 -> 1100
2057: //
2058:
2059: sh t0,2(a0) // store pixels
2060: and v1,v0,0xf << 7 // isolate low order nibble
2061: addu v1,v1,t5 // compute dispatch address
2062: j v1 // dispatch to pixel store routine
2063: addu a0,a0,4 // advance to next draw point
2064: nop // fill
2065: nop //
2066: nop //
2067:
2068: //
2069: // Pattern 0011-11 -> 1100
2070: //
2071:
2072: sb t0,2(a0) // store pixel
2073: sb t0,3(a0) // store pixel
2074: and v1,v0,0xf << 7 // isolate low order nibble
2075: addu v1,v1,t5 // compute dispatch address
2076: j v1 // dispatch to pixel store routine
2077: addu a0,a0,4 // advance to next draw point
2078: nop // fill
2079: nop //
2080:
2081: //
2082: // Pattern 0100-00 -> 0010
2083: //
2084:
2085: sb t0,1(a0) // store pixel
2086: and v1,v0,0xf << 7 // isolate low order nibble
2087: addu v1,v1,t5 // compute dispatch address
2088: j v1 // dispatch to pixel store routine
2089: addu a0,a0,4 // advance to next draw point
2090: nop // fill
2091: nop //
2092: nop //
2093:
2094: //
2095: // Pattern 0100-01 -> 0010
2096: //
2097:
2098: sb t0,1(a0) // store pixel
2099: and v1,v0,0xf << 7 // isolate low order nibble
2100: addu v1,v1,t5 // compute dispatch address
2101: j v1 // dispatch to pixel store routine
2102: addu a0,a0,4 // advance to next draw point
2103: nop // fill
2104: nop //
2105: nop //
2106:
2107: //
2108: // Pattern 0100-10 -> 0010
2109: //
2110:
2111: sb t0,1(a0) // store pixel
2112: and v1,v0,0xf << 7 // isolate low order nibble
2113: addu v1,v1,t5 // compute dispatch address
2114: j v1 // dispatch to pixel store routine
2115: addu a0,a0,4 // advance to next draw point
2116: nop // fill
2117: nop //
2118: nop //
2119:
2120: //
2121: // Pattern 0100-11 -> 0010
2122: //
2123:
2124: sb t0,1(a0) // store pixel
2125: and v1,v0,0xf << 7 // isolate low order nibble
2126: addu v1,v1,t5 // compute dispatch address
2127: j v1 // dispatch to pixel store routine
2128: addu a0,a0,4 // advance to next draw point
2129: nop // fill
2130: nop //
2131: nop //
2132:
2133: //
2134: // Pattern 0101-00 -> 1010
2135: //
2136:
2137: sb t0,1(a0) // store pixel
2138: sb t0,3(a0) // store pixel
2139: and v1,v0,0xf << 7 // isolate low order nibble
2140: addu v1,v1,t5 // compute dispatch address
2141: j v1 // dispatch to pixel store routine
2142: addu a0,a0,4 // advance to next draw point
2143: nop // fill
2144: nop //
2145:
2146: //
2147: // Pattern 0101-01 -> 1010
2148: //
2149:
2150: sb t0,1(a0) // store pixel
2151: sb t0,3(a0) // store pixel
2152: and v1,v0,0xf << 7 // isolate low order nibble
2153: addu v1,v1,t5 // compute dispatch address
2154: j v1 // dispatch to pixel store routine
2155: addu a0,a0,4 // advance to next draw point
2156: nop // fill
2157: nop //
2158:
2159: //
2160: // Pattern 0101-10 -> 1010
2161: //
2162:
2163: sb t0,1(a0) // store pixel
2164: sb t0,3(a0) // store pixel
2165: and v1,v0,0xf << 7 // isolate low order nibble
2166: addu v1,v1,t5 // compute dispatch address
2167: j v1 // dispatch to pixel store routine
2168: addu a0,a0,4 // advance to next draw point
2169: nop // fill
2170: nop //
2171:
2172: //
2173: // Pattern 0101-11 -> 1010
2174: //
2175:
2176: sb t0,1(a0) // store pixel
2177: sb t0,3(a0) // store pixel
2178: and v1,v0,0xf << 7 // isolate low order nibble
2179: addu v1,v1,t5 // compute dispatch address
2180: j v1 // dispatch to pixel store routine
2181: addu a0,a0,4 // advance to next draw point
2182: nop // fill
2183: nop //
2184:
2185: //
2186: // Pattern 0110-00 -> 0110
2187: //
2188:
2189: sb t0,1(a0) // store pixel
2190: sb t0,2(a0) // store pixel
2191: and v1,v0,0xf << 7 // isolate low order nibble
2192: addu v1,v1,t5 // compute dispatch address
2193: j v1 // dispatch to pixel store routine
2194: addu a0,a0,4 // advance to next draw point
2195: nop // fill
2196: nop //
2197:
2198: //
2199: // Pattern 0110-01 -> 0110
2200: //
2201:
2202: sh t0,1(a0) // store pixels
2203: and v1,v0,0xf << 7 // isolate low order nibble
2204: addu v1,v1,t5 // compute dispatch address
2205: j v1 // dispatch to pixel store routine
2206: addu a0,a0,4 // advance to next draw point
2207: nop // fill
2208: nop //
2209: nop //
2210:
2211: //
2212: // Pattern 0110-10 -> 0110
2213: //
2214:
2215: sb t0,1(a0) // store pixel
2216: sb t0,2(a0) // store pixel
2217: and v1,v0,0xf << 7 // isolate low order nibble
2218: addu v1,v1,t5 // compute dispatch address
2219: j v1 // dispatch to pixel store routine
2220: addu a0,a0,4 // advance to next draw point
2221: nop // fill
2222: nop //
2223:
2224: //
2225: // Pattern 0110-11 -> 0110
2226: //
2227:
2228: sh t0,1(a0) // store pixels
2229: and v1,v0,0xf << 7 // isolate low order nibble
2230: addu v1,v1,t5 // compute dispatch address
2231: j v1 // dispatch to pixel store routine
2232: addu a0,a0,4 // advance to next draw point
2233: nop // fill
2234: nop //
2235: nop //
2236:
2237: //
2238: // Pattern 0111-00 -> 1110
2239: //
2240:
2241: swr t0,1(a0) // store pixels
2242: and v1,v0,0xf << 7 // isolate low order nibble
2243: addu v1,v1,t5 // compute dispatch address
2244: j v1 // dispatch to pixel store routine
2245: addu a0,a0,4 // advance to next draw point
2246: nop // fill
2247: nop //
2248: nop //
2249:
2250: //
2251: // Pattern 0111-01 -> 1110
2252: //
2253:
2254: sh t0,1(a0) // store pixels
2255: sb t0,3(a0) // store pixel
2256: and v1,v0,0xf << 7 // isolate low order nibble
2257: addu v1,v1,t5 // compute dispatch address
2258: j v1 // dispatch to pixel store routine
2259: addu a0,a0,4 // advance to next draw point
2260: nop // fill
2261: nop //
2262:
2263: //
2264: // Pattern 0111-10 -> 1110
2265: //
2266:
2267: sb t0,1(a0) // store pixel
2268: sh t0,2(a0) // store pixels
2269: and v1,v0,0xf << 7 // isolate low order nibble
2270: addu v1,v1,t5 // compute dispatch address
2271: j v1 // dispatch to pixel store routine
2272: addu a0,a0,4 // advance to next draw point
2273: nop // fill
2274: nop //
2275:
2276: //
2277: // Pattern 0111-11 -> 1110
2278: //
2279:
2280: swl t0,3(a0) // store pixels
2281: and v1,v0,0xf << 7 // isolate low order nibble
2282: addu v1,v1,t5 // compute dispatch address
2283: j v1 // dispatch to pixel store routine
2284: addu a0,a0,4 // advance to next draw point
2285: nop // fill
2286: nop //
2287: nop //
2288:
2289: //
2290: // Pattern 1000-00 -> 0001
2291: //
2292:
2293: sb t0,0(a0) // store pixel
2294: and v1,v0,0xf << 7 // isolate low order nibble
2295: addu v1,v1,t5 // compute dispatch address
2296: j v1 // dispatch to pixel store routine
2297: addu a0,a0,4 // advance to next draw point
2298: nop // fill
2299: nop //
2300: nop //
2301:
2302: //
2303: // Pattern 1000-01 -> 0001
2304: //
2305:
2306: sb t0,0(a0) // store pixel
2307: and v1,v0,0xf << 7 // isolate low order nibble
2308: addu v1,v1,t5 // compute dispatch address
2309: j v1 // dispatch to pixel store routine
2310: addu a0,a0,4 // advance to next draw point
2311: nop // fill
2312: nop //
2313: nop //
2314:
2315: //
2316: // Pattern 1000-10 -> 0001
2317: //
2318:
2319: sb t0,0(a0) // store pixel
2320: and v1,v0,0xf << 7 // isolate low order nibble
2321: addu v1,v1,t5 // compute dispatch address
2322: j v1 // dispatch to pixel store routine
2323: addu a0,a0,4 // advance to next draw point
2324: nop // fill
2325: nop //
2326: nop //
2327:
2328: //
2329: // Pattern 1000-11 -> 0001
2330: //
2331:
2332: sb t0,0(a0) // store pixel
2333: and v1,v0,0xf << 7 // isolate low order nibble
2334: addu v1,v1,t5 // compute dispatch address
2335: j v1 // dispatch to pixel store routine
2336: addu a0,a0,4 // advance to next draw point
2337: nop // fill
2338: nop //
2339: nop //
2340:
2341: //
2342: // Pattern 1001-00 -> 1001
2343: //
2344:
2345: sb t0,0(a0) // store pixel
2346: sb t0,3(a0) // store pixel
2347: and v1,v0,0xf << 7 // isolate low order nibble
2348: addu v1,v1,t5 // compute dispatch address
2349: j v1 // dispatch to pixel store routine
2350: addu a0,a0,4 // advance to next draw point
2351: nop // fill
2352: nop //
2353:
2354: //
2355: // Pattern 1001-01 -> 1001
2356: //
2357:
2358: sb t0,0(a0) // store pixel
2359: sb t0,3(a0) // store pixel
2360: and v1,v0,0xf << 7 // isolate low order nibble
2361: addu v1,v1,t5 // compute dispatch address
2362: j v1 // dispatch to pixel store routine
2363: addu a0,a0,4 // advance to next draw point
2364: nop // fill
2365: nop //
2366:
2367: //
2368: // Pattern 1001-10 -> 1001
2369: //
2370:
2371: sb t0,0(a0) // store pixel
2372: sb t0,3(a0) // store pixel
2373: and v1,v0,0xf << 7 // isolate low order nibble
2374: addu v1,v1,t5 // compute dispatch address
2375: j v1 // dispatch to pixel store routine
2376: addu a0,a0,4 // advance to next draw point
2377: nop // fill
2378: nop //
2379:
2380: //
2381: // Pattern 1001-11 -> 1001
2382: //
2383:
2384: sb t0,0(a0) // store pixel
2385: sb t0,3(a0) // store pixel
2386: and v1,v0,0xf << 7 // isolate low order nibble
2387: addu v1,v1,t5 // compute dispatch address
2388: j v1 // dispatch to pixel store routine
2389: addu a0,a0,4 // advance to next draw point
2390: nop // fill
2391: nop //
2392:
2393: //
2394: // Pattern 1010-00 -> 0101
2395: //
2396:
2397: sb t0,0(a0) // store pixel
2398: sb t0,2(a0) // store pixel
2399: and v1,v0,0xf << 7 // isolate low order nibble
2400: addu v1,v1,t5 // compute dispatch address
2401: j v1 // dispatch to pixel store routine
2402: addu a0,a0,4 // advance to next draw point
2403: nop // fill
2404: nop //
2405:
2406: //
2407: // Pattern 1010-01 -> 0101
2408: //
2409:
2410: sb t0,0(a0) // store pixel
2411: sb t0,2(a0) // store pixel
2412: and v1,v0,0xf << 7 // isolate low order nibble
2413: addu v1,v1,t5 // compute dispatch address
2414: j v1 // dispatch to pixel store routine
2415: addu a0,a0,4 // advance to next draw point
2416: nop // fill
2417: nop //
2418:
2419: //
2420: // Pattern 1010-10 -> 0101
2421: //
2422:
2423: sb t0,0(a0) // store pixel
2424: sb t0,2(a0) // store pixel
2425: and v1,v0,0xf << 7 // isolate low order nibble
2426: addu v1,v1,t5 // compute dispatch address
2427: j v1 // dispatch to pixel store routine
2428: addu a0,a0,4 // advance to next draw point
2429: nop // fill
2430: nop //
2431:
2432: //
2433: // Pattern 1010-11 -> 0101
2434: //
2435:
2436: sb t0,0(a0) // store pixel
2437: sb t0,2(a0) // store pixel
2438: and v1,v0,0xf << 7 // isolate low order nibble
2439: addu v1,v1,t5 // compute dispatch address
2440: j v1 // dispatch to pixel store routine
2441: addu a0,a0,4 // advance to next draw point
2442: nop // fill
2443: nop //
2444:
2445: //
2446: // Pattern 1011-00 -> 1101
2447: //
2448:
2449: sb t0,0(a0) // store pixel
2450: sh t0,2(a0) // store pixels
2451: and v1,v0,0xf << 7 // isolate low order nibble
2452: addu v1,v1,t5 // compute dispatch address
2453: j v1 // dispatch to pixel store routine
2454: addu a0,a0,4 // advance to next draw point
2455: nop // fill
2456: nop //
2457:
2458: //
2459: // Pattern 1011-01 -> 1101
2460: //
2461:
2462: sb t0,0(a0) // store pixel
2463: sb t0,2(a0) // store pixel
2464: sb t0,3(a0) // store pixel
2465: and v1,v0,0xf << 7 // isolate low order nibble
2466: addu v1,v1,t5 // compute dispatch address
2467: j v1 // dispatch to pixel store routine
2468: addu a0,a0,4 // advance to next draw point
2469: nop // fill
2470:
2471: //
2472: // Pattern 1011-10 -> 1101
2473: //
2474:
2475: sb t0,0(a0) // store pixel
2476: sh t0,2(a0) // store pixels
2477: and v1,v0,0xf << 7 // isolate low order nibble
2478: addu v1,v1,t5 // compute dispatch address
2479: j v1 // dispatch to pixel store routine
2480: addu a0,a0,4 // advance to next draw point
2481: nop // fill
2482: nop //
2483:
2484: //
2485: // Pattern 1011-11 -> 1101
2486: //
2487:
2488: sb t0,0(a0) // store pixel
2489: sb t0,2(a0) // store pixel
2490: sb t0,3(a0) // store pixel
2491: and v1,v0,0xf << 7 // isolate low order nibble
2492: addu v1,v1,t5 // compute dispatch address
2493: j v1 // dispatch to pixel store routine
2494: addu a0,a0,4 // advance to next draw point
2495: nop // fill
2496:
2497: //
2498: // Pattern 1100-00 -> 0011
2499: //
2500:
2501: sh t0,0(a0) // store pixels
2502: and v1,v0,0xf << 7 // isolate low order nibble
2503: addu v1,v1,t5 // compute dispatch address
2504: j v1 // dispatch to pixel store routine
2505: addu a0,a0,4 // advance to next draw point
2506: nop // fill
2507: nop //
2508: nop //
2509:
2510: //
2511: // Pattern 1100-01 -> 0011
2512: //
2513:
2514: sb t0,0(a0) // store pixel
2515: sb t0,1(a0) // store pixel
2516: and v1,v0,0xf << 7 // isolate low order nibble
2517: addu v1,v1,t5 // compute dispatch address
2518: j v1 // dispatch to pixel store routine
2519: addu a0,a0,4 // advance to next draw point
2520: nop // fill
2521: nop //
2522:
2523: //
2524: // Pattern 1100-10 -> 0011
2525: //
2526:
2527: sh t0,0(a0) // store pixels
2528: and v1,v0,0xf << 7 // isolate low order nibble
2529: addu v1,v1,t5 // compute dispatch address
2530: j v1 // dispatch to pixel store routine
2531: addu a0,a0,4 // advance to next draw point
2532: nop // fill
2533: nop //
2534: nop //
2535:
2536: //
2537: // Pattern 1100-11 -> 0011
2538: //
2539:
2540: sb t0,0(a0) // store pixel
2541: sb t0,1(a0) // store pixel
2542: and v1,v0,0xf << 7 // isolate low order nibble
2543: addu v1,v1,t5 // compute dispatch address
2544: j v1 // dispatch to pixel store routine
2545: addu a0,a0,4 // advance to next draw point
2546: nop // fill
2547: nop //
2548:
2549: //
2550: // Pattern 1101-00 -> 1011
2551: //
2552:
2553: sh t0,0(a0) // store pixels
2554: sb t0,3(a0) // store pixel
2555: and v1,v0,0xf << 7 // isolate low order nibble
2556: addu v1,v1,t5 // compute dispatch address
2557: j v1 // dispatch to pixel store routine
2558: addu a0,a0,4 // advance to next draw point
2559: nop // fill
2560: nop //
2561:
2562: //
2563: // Pattern 1101-01 -> 1011
2564: //
2565:
2566: sb t0,0(a0) // store pixel
2567: sb t0,1(a0) // store pixel
2568: sb t0,3(a0) // store pixel
2569: and v1,v0,0xf << 7 // isolate low order nibble
2570: addu v1,v1,t5 // compute dispatch address
2571: j v1 // dispatch to pixel store routine
2572: addu a0,a0,4 // advance to next draw point
2573: nop // fill
2574:
2575: //
2576: // Pattern 1101-10 -> 1011
2577: //
2578:
2579: sh t0,0(a0) // store pixels
2580: sb t0,3(a0) // store pixel
2581: and v1,v0,0xf << 7 // isolate low order nibble
2582: addu v1,v1,t5 // compute dispatch address
2583: j v1 // dispatch to pixel store routine
2584: addu a0,a0,4 // advance to next draw point
2585: nop // fill
2586: nop //
2587:
2588: //
2589: // Pattern 1101-11 -> 1011
2590: //
2591:
2592: sb t0,0(a0) // store pixel
2593: sb t0,1(a0) // store pixel
2594: sb t0,3(a0) // store pixel
2595: and v1,v0,0xf << 7 // isolate low order nibble
2596: addu v1,v1,t5 // compute dispatch address
2597: j v1 // dispatch to pixel store routine
2598: addu a0,a0,4 // advance to next draw point
2599: nop // fill
2600:
2601: //
2602: // Pattern 1110-00 -> 0111
2603: //
2604:
2605: swl t0,2(a0) // store pixels
2606: and v1,v0,0xf << 7 // isolate low order nibble
2607: addu v1,v1,t5 // compute dispatch address
2608: j v1 // dispatch to pixel store routine
2609: addu a0,a0,4 // advance to next draw point
2610: nop // fill
2611: nop //
2612: nop //
2613:
2614: //
2615: // Pattern 1110-01 -> 0111
2616: //
2617:
2618: sb t0,0(a0) // store pixel
2619: sh t0,1(a0) // store pixels
2620: and v1,v0,0xf << 7 // isolate low order nibble
2621: addu v1,v1,t5 // compute dispatch address
2622: j v1 // dispatch to pixel store routine
2623: addu a0,a0,4 // advance to next draw point
2624: nop // fill
2625: nop //
2626:
2627: //
2628: // Pattern 1110-10 -> 0111
2629: //
2630:
2631: sh t0,0(a0) // store pixels
2632: sb t0,2(a0) // store pixel
2633: and v1,v0,0xf << 7 // isolate low order nibble
2634: addu v1,v1,t5 // compute dispatch address
2635: j v1 // dispatch to pixel store routine
2636: addu a0,a0,4 // advance to next draw point
2637: nop // fill
2638: nop //
2639:
2640: //
2641: // Pattern 1110-11 -> 0111
2642: //
2643:
2644: sb t0,0(a0) // store pixel
2645: sh t0,1(a0) // store pixels
2646: and v1,v0,0xf << 7 // isolate low order nibble
2647: addu v1,v1,t5 // compute dispatch address
2648: j v1 // dispatch to pixel store routine
2649: addu a0,a0,4 // advance to next draw point
2650: nop // fill
2651: nop //
2652:
2653: //
2654: // Pattern 1111-00 -> 1111
2655: //
2656:
2657: sw t0,0(a0) // store pixels
2658: and v1,v0,0xf << 7 // isolate low order nibble
2659: addu v1,v1,t5 // compute dispatch address
2660: j v1 // dispatch to pixel store routine
2661: addu a0,a0,4 // advance to next draw point
2662: nop // fill
2663: nop //
2664: nop //
2665:
2666: //
2667: // Pattern 1111-01 -> 1111
2668: //
2669:
2670: swr t0,0(a0) // store pixels
2671: sb t0,3(a0) // store pixel
2672: and v1,v0,0xf << 7 // isolate low order nibble
2673: addu v1,v1,t5 // compute dispatch address
2674: j v1 // dispatch to pixel store routine
2675: addu a0,a0,4 // advance to next draw point
2676: nop // fill
2677: nop //
2678:
2679: //
2680: // Pattern 1111-10 -> 1111
2681: //
2682:
2683: sh t0,0(a0) // store pixels
2684: sh t0,2(a0) // store pixels
2685: and v1,v0,0xf << 7 // isolate low order nibble
2686: addu v1,v1,t5 // compute dispatch address
2687: j v1 // dispatch to pixel store routine
2688: addu a0,a0,4 // advance to next draw point
2689: nop // fill
2690: nop //
2691:
2692: //
2693: // Pattern 1111-11 -> 1111
2694: //
2695:
2696: sb t0,0(a0) // store pixel
2697: swl t0,3(a0) // store pixels
2698: and v1,v0,0xf << 7 // isolate low order nibble
2699: addu v1,v1,t5 // compute dispatch address
2700: j v1 // dispatch to pixel store routine
2701: addu a0,a0,4 // advance to next draw point
2702: nop // fill
2703: nop //
2704: .set at
2705: .set reorder
2706:
2707: //
2708: // The following code is arranged as 64, four instruction blocks. The block
2709: // of code that is chosen for execution is determined from the low order
2710: // glyph nibble and the two low its of the draw address.
2711: //
2712: // The glyph nibbles are encoded in big endian order and therefore the pixels
2713: // that are stored are the reverse of the big endian bits within the nibble.
2714: //
2715:
2716: .set noreorder
2717: .set noat
2718:
2719: 70: // reference label
2720: //
2721: // Pattern 0000-00
2722: //
2723:
2724: bne a1,t4,20b // if ne, more bytes in glyph
2725: addu a0,a0,4 // advance to next draw point
2726: b 40b // join common code
2727: add a0,a0,t3 // compute next scanline address
2728: nop // fill
2729: nop //
2730: nop //
2731: nop //
2732:
2733: //
2734: // Pattern 0000-01
2735: //
2736:
2737: bne a1,t4,20b // if ne, more bytes in glyph
2738: addu a0,a0,4 // advance to next draw point
2739: b 40b // join common code
2740: add a0,a0,t3 // compute next scanline address
2741: nop // fill
2742: nop //
2743: nop //
2744: nop //
2745:
2746: //
2747: // Pattern 0000-10
2748: //
2749:
2750: bne a1,t4,20b // if ne, more bytes in glyph
2751: addu a0,a0,4 // advance to next draw point
2752: b 40b // join common code
2753: add a0,a0,t3 // compute next scanline address
2754: nop // fill
2755: nop //
2756: nop //
2757: nop //
2758:
2759: //
2760: // Pattern 0000-11
2761: //
2762:
2763: bne a1,t4,20b // if ne, more bytes in glyph
2764: addu a0,a0,4 // advance to next draw point
2765: b 40b // join common code
2766: add a0,a0,t3 // compute next scanline address
2767: nop // fill
2768: nop //
2769: nop //
2770: nop //
2771:
2772: //
2773: // Pattern 0001-00 -> 1000
2774: //
2775:
2776: sb t0,3(a0) // store pixel
2777: bne a1,t4,20b // if ne, more bytes in glyph
2778: addu a0,a0,4 // advance to next draw point
2779: b 40b // join common code
2780: add a0,a0,t3 // compute next scanline address
2781: nop // fill
2782: nop //
2783: nop //
2784:
2785: //
2786: // Pattern 0001-01 -> 1000
2787: //
2788:
2789: sb t0,3(a0) // store pixel
2790: bne a1,t4,20b // if ne, more bytes in glyph
2791: addu a0,a0,4 // advance to next draw point
2792: b 40b // join common code
2793: add a0,a0,t3 // compute next scanline address
2794: nop // fill
2795: nop //
2796: nop //
2797:
2798: //
2799: // Pattern 0001-10 -> 1000
2800: //
2801:
2802: sb t0,3(a0) // store pixel
2803: bne a1,t4,20b // if ne, more bytes in glyph
2804: addu a0,a0,4 // advance to next draw point
2805: b 40b // join common code
2806: add a0,a0,t3 // compute next scanline address
2807: nop // fill
2808: nop //
2809: nop //
2810:
2811: //
2812: // Pattern 0001-11 -> 1000
2813: //
2814:
2815: sb t0,3(a0) // store pixel
2816: bne a1,t4,20b // if ne, more bytes in glyph
2817: addu a0,a0,4 // advance to next draw point
2818: b 40b // join common code
2819: add a0,a0,t3 // compute next scanline address
2820: nop // fill
2821: nop //
2822: nop //
2823:
2824: //
2825: // Pattern 0010-00 -> 0100
2826: //
2827:
2828: sb t0,2(a0) // store pixel
2829: bne a1,t4,20b // if ne, more bytes in glyph
2830: addu a0,a0,4 // advance to next draw point
2831: b 40b // join common code
2832: add a0,a0,t3 // compute next scanline address
2833: nop // fill
2834: nop //
2835: nop //
2836:
2837: //
2838: // Pattern 0010-01 -> 0100
2839: //
2840:
2841: sb t0,2(a0) // store pixel
2842: bne a1,t4,20b // if ne, more bytes in glyph
2843: addu a0,a0,4 // advance to next draw point
2844: b 40b // join common code
2845: add a0,a0,t3 // compute next scanline address
2846: nop // fill
2847: nop //
2848: nop //
2849:
2850: //
2851: // Pattern 0010-10 -> 0100
2852: //
2853:
2854: sb t0,2(a0) // store pixel
2855: bne a1,t4,20b // if ne, more bytes in glyph
2856: addu a0,a0,4 // advance to next draw point
2857: b 40b // join common code
2858: add a0,a0,t3 // compute next scanline address
2859: nop // fill
2860: nop //
2861: nop //
2862:
2863: //
2864: // Pattern 0010-11 -> 0100
2865: //
2866:
2867: sb t0,2(a0) // store pixel
2868: bne a1,t4,20b // if ne, more bytes in glyph
2869: addu a0,a0,4 // advance to next draw point
2870: b 40b // join common code
2871: add a0,a0,t3 // compute next scanline address
2872: nop // fill
2873: nop //
2874: nop //
2875:
2876: //
2877: // Pattern 0011-00 -> 1100
2878: //
2879:
2880: sh t0,2(a0) // store pixels
2881: bne a1,t4,20b // if ne, more bytes in glyph
2882: addu a0,a0,4 // advance to next draw point
2883: b 40b // join common code
2884: add a0,a0,t3 // compute next scanline address
2885: nop // fill
2886: nop //
2887: nop //
2888:
2889: //
2890: // Pattern 0011-01 -> 1100
2891: //
2892:
2893: sb t0,2(a0) // store pixel
2894: sb t0,3(a0) // store pixel
2895: bne a1,t4,20b // if ne, more bytes in glyph
2896: addu a0,a0,4 // advance to next draw point
2897: b 40b // join common code
2898: add a0,a0,t3 // compute next scanline address
2899: nop // fill
2900: nop //
2901:
2902: //
2903: // Pattern 0011-10 -> 1100
2904: //
2905:
2906: sh t0,2(a0) // store pixels
2907: bne a1,t4,20b // if ne, more bytes in glyph
2908: addu a0,a0,4 // advance to next draw point
2909: b 40b // join common code
2910: add a0,a0,t3 // compute next scanline address
2911: nop // fill
2912: nop //
2913: nop //
2914:
2915: //
2916: // Pattern 0011-11 -> 1100
2917: //
2918:
2919: sb t0,2(a0) // store pixel
2920: sb t0,3(a0) // store pixel
2921: bne a1,t4,20b // if ne, more bytes in glyph
2922: addu a0,a0,4 // advance to next draw point
2923: b 40b // join common code
2924: add a0,a0,t3 // compute next scanline address
2925: nop // fill
2926: nop //
2927:
2928: //
2929: // Pattern 0100-00 -> 0010
2930: //
2931:
2932: sb t0,1(a0) // store pixel
2933: bne a1,t4,20b // if ne, more bytes in glyph
2934: addu a0,a0,4 // advance to next draw point
2935: b 40b // join common code
2936: add a0,a0,t3 // compute next scanline address
2937: nop // fill
2938: nop //
2939: nop //
2940:
2941: //
2942: // Pattern 0100-01 -> 0010
2943: //
2944:
2945: sb t0,1(a0) // store pixel
2946: bne a1,t4,20b // if ne, more bytes in glyph
2947: addu a0,a0,4 // advance to next draw point
2948: b 40b // join common code
2949: add a0,a0,t3 // compute next scanline address
2950: nop // fill
2951: nop //
2952: nop //
2953:
2954: //
2955: // Pattern 0100-10 -> 0010
2956: //
2957:
2958: sb t0,1(a0) // store pixel
2959: bne a1,t4,20b // if ne, more bytes in glyph
2960: addu a0,a0,4 // advance to next draw point
2961: b 40b // join common code
2962: add a0,a0,t3 // compute next scanline address
2963: nop // fill
2964: nop //
2965: nop //
2966:
2967: //
2968: // Pattern 0100-11 -> 0010
2969: //
2970:
2971: sb t0,1(a0) // store pixel
2972: bne a1,t4,20b // if ne, more bytes in glyph
2973: addu a0,a0,4 // advance to next draw point
2974: b 40b // join common code
2975: add a0,a0,t3 // compute next scanline address
2976: nop // fill
2977: nop //
2978: nop //
2979:
2980: //
2981: // Pattern 0101-00 -> 1010
2982: //
2983:
2984: sb t0,1(a0) // store pixel
2985: sb t0,3(a0) // store pixel
2986: bne a1,t4,20b // if ne, more bytes in glyph
2987: addu a0,a0,4 // advance to next draw point
2988: b 40b // join common code
2989: add a0,a0,t3 // compute next scanline address
2990: nop // fill
2991: nop //
2992:
2993: //
2994: // Pattern 0101-01 -> 1010
2995: //
2996:
2997: sb t0,1(a0) // store pixel
2998: sb t0,3(a0) // store pixel
2999: bne a1,t4,20b // if ne, more bytes in glyph
3000: addu a0,a0,4 // advance to next draw point
3001: b 40b // join common code
3002: add a0,a0,t3 // compute next scanline address
3003: nop // fill
3004: nop //
3005:
3006: //
3007: // Pattern 0101-10 -> 1010
3008: //
3009:
3010: sb t0,1(a0) // store pixel
3011: sb t0,3(a0) // store pixel
3012: bne a1,t4,20b // if ne, more bytes in glyph
3013: addu a0,a0,4 // advance to next draw point
3014: b 40b // join common code
3015: add a0,a0,t3 // compute next scanline address
3016: nop // fill
3017: nop //
3018:
3019: //
3020: // Pattern 0101-11 -> 1010
3021: //
3022:
3023: sb t0,1(a0) // store pixel
3024: sb t0,3(a0) // store pixel
3025: bne a1,t4,20b // if ne, more bytes in glyph
3026: addu a0,a0,4 // advance to next draw point
3027: b 40b // join common code
3028: add a0,a0,t3 // compute next scanline address
3029: nop // fill
3030: nop //
3031:
3032: //
3033: // Pattern 0110-00 -> 0110
3034: //
3035:
3036: sb t0,1(a0) // store pixel
3037: sb t0,2(a0) // store pixel
3038: bne a1,t4,20b // if ne, more bytes in glyph
3039: addu a0,a0,4 // advance to next draw point
3040: b 40b // join common code
3041: add a0,a0,t3 // compute next scanline address
3042: nop // fill
3043: nop //
3044:
3045: //
3046: // Pattern 0110-01 -> 0110
3047: //
3048:
3049: sh t0,1(a0) // store pixels
3050: bne a1,t4,20b // if ne, more bytes in glyph
3051: addu a0,a0,4 // advance to next draw point
3052: b 40b // join common code
3053: add a0,a0,t3 // compute next scanline address
3054: nop // fill
3055: nop //
3056: nop //
3057:
3058: //
3059: // Pattern 0110-10 -> 0110
3060: //
3061:
3062: sb t0,1(a0) // store pixel
3063: sb t0,2(a0) // store pixel
3064: bne a1,t4,20b // if ne, more bytes in glyph
3065: addu a0,a0,4 // advance to next draw point
3066: b 40b // join common code
3067: add a0,a0,t3 // compute next scanline address
3068: nop // fill
3069: nop //
3070:
3071: //
3072: // Pattern 0110-11 -> 0110
3073: //
3074:
3075: sh t0,1(a0) // store pixels
3076: bne a1,t4,20b // if ne, more bytes in glyph
3077: addu a0,a0,4 // advance to next draw point
3078: b 40b // join common code
3079: add a0,a0,t3 // compute next scanline address
3080: nop // fill
3081: nop //
3082: nop //
3083:
3084: //
3085: // Pattern 0111-00 -> 1110
3086: //
3087:
3088: swr t0,1(a0) // store pixels
3089: bne a1,t4,20b // if ne, more bytes in glyph
3090: addu a0,a0,4 // advance to next draw point
3091: b 40b // join common code
3092: add a0,a0,t3 // compute next scanline address
3093: nop // fill
3094: nop //
3095: nop //
3096:
3097: //
3098: // Pattern 0111-01 -> 1110
3099: //
3100:
3101: sh t0,1(a0) // store pixels
3102: sb t0,3(a0) // store pixel
3103: bne a1,t4,20b // if ne, more bytes in glyph
3104: addu a0,a0,4 // advance to next draw point
3105: b 40b // join common code
3106: add a0,a0,t3 // compute next scanline address
3107: nop // fill
3108: nop //
3109:
3110: //
3111: // Pattern 0111-10 -> 1110
3112: //
3113:
3114: sb t0,1(a0) // store pixel
3115: sh t0,2(a0) // store pixels
3116: bne a1,t4,20b // if ne, more bytes in glyph
3117: addu a0,a0,4 // advance to next draw point
3118: b 40b // join common code
3119: add a0,a0,t3 // compute next scanline address
3120: nop // fill
3121: nop //
3122:
3123: //
3124: // Pattern 0111-11 -> 1110
3125: //
3126:
3127: swl t0,3(a0) // store pixels
3128: bne a1,t4,20b // if ne, more bytes in glyph
3129: addu a0,a0,4 // advance to next draw point
3130: b 40b // join common code
3131: add a0,a0,t3 // compute next scanline address
3132: nop // fill
3133: nop //
3134: nop //
3135:
3136: //
3137: // Pattern 1000-00 -> 0001
3138: //
3139:
3140: sb t0,0(a0) // store pixel
3141: bne a1,t4,20b // if ne, more bytes in glyph
3142: addu a0,a0,4 // advance to next draw point
3143: b 40b // join common code
3144: add a0,a0,t3 // compute next scanline address
3145: nop // fill
3146: nop //
3147: nop //
3148:
3149: //
3150: // Pattern 1000-01 -> 0001
3151: //
3152:
3153: sb t0,0(a0) // store pixel
3154: bne a1,t4,20b // if ne, more bytes in glyph
3155: addu a0,a0,4 // advance to next draw point
3156: b 40b // join common code
3157: add a0,a0,t3 // compute next scanline address
3158: nop // fill
3159: nop //
3160: nop //
3161:
3162: //
3163: // Pattern 1000-10 -> 0001
3164: //
3165:
3166: sb t0,0(a0) // store pixel
3167: bne a1,t4,20b // if ne, more bytes in glyph
3168: addu a0,a0,4 // advance to next draw point
3169: b 40b // join common code
3170: add a0,a0,t3 // compute next scanline address
3171: nop // fill
3172: nop //
3173: nop //
3174:
3175: //
3176: // Pattern 1000-11 -> 0001
3177: //
3178:
3179: sb t0,0(a0) // store pixel
3180: bne a1,t4,20b // if ne, more bytes in glyph
3181: addu a0,a0,4 // advance to next draw point
3182: b 40b // join common code
3183: add a0,a0,t3 // compute next scanline address
3184: nop // fill
3185: nop //
3186: nop //
3187:
3188: //
3189: // Pattern 1001-00 -> 1001
3190: //
3191:
3192: sb t0,0(a0) // store pixel
3193: sb t0,3(a0) // store pixel
3194: bne a1,t4,20b // if ne, more bytes in glyph
3195: addu a0,a0,4 // advance to next draw point
3196: b 40b // join common code
3197: add a0,a0,t3 // compute next scanline address
3198: nop // fill
3199: nop //
3200:
3201: //
3202: // Pattern 1001-01 -> 1001
3203: //
3204:
3205: sb t0,0(a0) // store pixel
3206: sb t0,3(a0) // store pixel
3207: bne a1,t4,20b // if ne, more bytes in glyph
3208: addu a0,a0,4 // advance to next draw point
3209: b 40b // join common code
3210: add a0,a0,t3 // compute next scanline address
3211: nop // fill
3212: nop //
3213:
3214: //
3215: // Pattern 1001-10 -> 1001
3216: //
3217:
3218: sb t0,0(a0) // store pixel
3219: sb t0,3(a0) // store pixel
3220: bne a1,t4,20b // if ne, more bytes in glyph
3221: addu a0,a0,4 // advance to next draw point
3222: b 40b // join common code
3223: add a0,a0,t3 // compute next scanline address
3224: nop // fill
3225: nop //
3226:
3227: //
3228: // Pattern 1001-11 -> 1001
3229: //
3230:
3231: sb t0,0(a0) // store pixel
3232: sb t0,3(a0) // store pixel
3233: bne a1,t4,20b // if ne, more bytes in glyph
3234: addu a0,a0,4 // advance to next draw point
3235: b 40b // join common code
3236: add a0,a0,t3 // compute next scanline address
3237: nop // fill
3238: nop //
3239:
3240: //
3241: // Pattern 1010-00 -> 0101
3242: //
3243:
3244: sb t0,0(a0) // store pixel
3245: sb t0,2(a0) // store pixel
3246: bne a1,t4,20b // if ne, more bytes in glyph
3247: addu a0,a0,4 // advance to next draw point
3248: b 40b // join common code
3249: add a0,a0,t3 // compute next scanline address
3250: nop // fill
3251: nop //
3252:
3253: //
3254: // Pattern 1010-01 -> 0101
3255: //
3256:
3257: sb t0,0(a0) // store pixel
3258: sb t0,2(a0) // store pixel
3259: bne a1,t4,20b // if ne, more bytes in glyph
3260: addu a0,a0,4 // advance to next draw point
3261: b 40b // join common code
3262: add a0,a0,t3 // compute next scanline address
3263: nop // fill
3264: nop //
3265:
3266: //
3267: // Pattern 1010-10 -> 0101
3268: //
3269:
3270: sb t0,0(a0) // store pixel
3271: sb t0,2(a0) // store pixel
3272: bne a1,t4,20b // if ne, more bytes in glyph
3273: addu a0,a0,4 // advance to next draw point
3274: b 40b // join common code
3275: add a0,a0,t3 // compute next scanline address
3276: nop // fill
3277: nop //
3278:
3279: //
3280: // Pattern 1010-11 -> 0101
3281: //
3282:
3283: sb t0,0(a0) // store pixel
3284: sb t0,2(a0) // store pixel
3285: bne a1,t4,20b // if ne, more bytes in glyph
3286: addu a0,a0,4 // advance to next draw point
3287: b 40b // join common code
3288: add a0,a0,t3 // compute next scanline address
3289: nop // fill
3290: nop //
3291:
3292: //
3293: // Pattern 1011-00 -> 1101
3294: //
3295:
3296: sb t0,0(a0) // store pixel
3297: sh t0,2(a0) // store pixels
3298: bne a1,t4,20b // if ne, more bytes in glyph
3299: addu a0,a0,4 // advance to next draw point
3300: b 40b // join common code
3301: add a0,a0,t3 // compute next scanline address
3302: nop // fill
3303: nop //
3304:
3305: //
3306: // Pattern 1011-01 -> 1101
3307: //
3308:
3309: sb t0,0(a0) // store pixel
3310: sb t0,2(a0) // store pixel
3311: sb t0,3(a0) // store pixel
3312: bne a1,t4,20b // if ne, more bytes in glyph
3313: addu a0,a0,4 // advance to next draw point
3314: b 40b // join common code
3315: add a0,a0,t3 // compute next scanline address
3316: nop // fill
3317:
3318: //
3319: // Pattern 1011-10 -> 1101
3320: //
3321:
3322: sb t0,0(a0) // store pixel
3323: sh t0,2(a0) // store pixels
3324: bne a1,t4,20b // if ne, more bytes in glyph
3325: addu a0,a0,4 // advance to next draw point
3326: b 40b // join common code
3327: add a0,a0,t3 // compute next scanline address
3328: nop // fill
3329: nop //
3330:
3331: //
3332: // Pattern 1011-11 -> 1101
3333: //
3334:
3335: sb t0,0(a0) // store pixel
3336: sb t0,2(a0) // store pixel
3337: sb t0,3(a0) // store pixel
3338: bne a1,t4,20b // if ne, more bytes in glyph
3339: addu a0,a0,4 // advance to next draw point
3340: b 40b // join common code
3341: add a0,a0,t3 // compute next scanline address
3342: nop // fill
3343:
3344: //
3345: // Pattern 1100-00 -> 0011
3346: //
3347:
3348: sh t0,0(a0) // store pixels
3349: bne a1,t4,20b // if ne, more bytes in glyph
3350: addu a0,a0,4 // advance to next draw point
3351: b 40b // join common code
3352: add a0,a0,t3 // compute next scanline address
3353: nop // fill
3354: nop //
3355: nop //
3356:
3357: //
3358: // Pattern 1100-01 -> 0011
3359: //
3360:
3361: sb t0,0(a0) // store pixel
3362: sb t0,1(a0) // store pixel
3363: bne a1,t4,20b // if ne, more bytes in glyph
3364: addu a0,a0,4 // advance to next draw point
3365: b 40b // join common code
3366: add a0,a0,t3 // compute next scanline address
3367: nop // fill
3368: nop //
3369:
3370: //
3371: // Pattern 1100-10 -> 0011
3372: //
3373:
3374: sh t0,0(a0) // store pixels
3375: bne a1,t4,20b // if ne, more bytes in glyph
3376: addu a0,a0,4 // advance to next draw point
3377: b 40b // join common code
3378: add a0,a0,t3 // compute next scanline address
3379: nop // fill
3380: nop //
3381: nop //
3382:
3383: //
3384: // Pattern 1100-11 -> 0011
3385: //
3386:
3387: sb t0,0(a0) // store pixel
3388: sb t0,1(a0) // store pixel
3389: bne a1,t4,20b // if ne, more bytes in glyph
3390: addu a0,a0,4 // advance to next draw point
3391: b 40b // join common code
3392: add a0,a0,t3 // compute next scanline address
3393: nop // fill
3394: nop //
3395:
3396: //
3397: // Pattern 1101-00 -> 1011
3398: //
3399:
3400: sh t0,0(a0) // store pixels
3401: sb t0,3(a0) // store pixel
3402: bne a1,t4,20b // if ne, more bytes in glyph
3403: addu a0,a0,4 // advance to next draw point
3404: b 40b // join common code
3405: add a0,a0,t3 // compute next scanline address
3406: nop // fill
3407: nop //
3408:
3409: //
3410: // Pattern 1101-01 -> 1011
3411: //
3412:
3413: sb t0,0(a0) // store pixel
3414: sb t0,1(a0) // store pixel
3415: sb t0,3(a0) // store pixel
3416: bne a1,t4,20b // if ne, more bytes in glyph
3417: addu a0,a0,4 // advance to next draw point
3418: b 40b // join common code
3419: add a0,a0,t3 // compute next scanline address
3420: nop // fill
3421:
3422: //
3423: // Pattern 1101-10 -> 1011
3424: //
3425:
3426: sh t0,0(a0) // store pixels
3427: sb t0,3(a0) // store pixel
3428: bne a1,t4,20b // if ne, more bytes in glyph
3429: addu a0,a0,4 // advance to next draw point
3430: b 40b // join common code
3431: add a0,a0,t3 // compute next scanline address
3432: nop // fill
3433: nop //
3434:
3435: //
3436: // Pattern 1101-11 -> 1011
3437: //
3438:
3439: sb t0,0(a0) // store pixel
3440: sb t0,1(a0) // store pixel
3441: sb t0,3(a0) // store pixel
3442: bne a1,t4,20b // if ne, more bytes in glyph
3443: addu a0,a0,4 // advance to next draw point
3444: b 40b // join common code
3445: add a0,a0,t3 // compute next scanline address
3446: nop // fill
3447:
3448: //
3449: // Pattern 1110-00 -> 0111
3450: //
3451:
3452: swl t0,2(a0) // store pixels
3453: bne a1,t4,20b // if ne, more bytes in glyph
3454: addu a0,a0,4 // advance to next draw point
3455: b 40b // join common code
3456: add a0,a0,t3 // compute next scanline address
3457: nop // fill
3458: nop //
3459: nop //
3460:
3461: //
3462: // Pattern 1110-01 -> 0111
3463: //
3464:
3465: sb t0,0(a0) // store pixel
3466: sh t0,1(a0) // store pixels
3467: bne a1,t4,20b // if ne, more bytes in glyph
3468: addu a0,a0,4 // advance to next draw point
3469: b 40b // join common code
3470: add a0,a0,t3 // compute next scanline address
3471: nop // fill
3472: nop //
3473:
3474: //
3475: // Pattern 1110-10 -> 0111
3476: //
3477:
3478: sh t0,0(a0) // store pixels
3479: sb t0,2(a0) // store pixel
3480: bne a1,t4,20b // if ne, more bytes in glyph
3481: addu a0,a0,4 // advance to next draw point
3482: b 40b // join common code
3483: add a0,a0,t3 // compute next scanline address
3484: nop // fill
3485: nop //
3486:
3487: //
3488: // Pattern 1110-11 -> 0111
3489: //
3490:
3491: sb t0,0(a0) // store pixel
3492: sh t0,1(a0) // store pixels
3493: bne a1,t4,20b // if ne, more bytes in glyph
3494: addu a0,a0,4 // advance to next draw point
3495: b 40b // join common code
3496: add a0,a0,t3 // compute next scanline address
3497: nop // fill
3498: nop //
3499:
3500: //
3501: // Pattern 1111-00 -> 1111
3502: //
3503:
3504: sw t0,0(a0) // store pixels
3505: bne a1,t4,20b // if ne, more bytes in glyph
3506: addu a0,a0,4 // advance to next draw point
3507: b 40b // join common code
3508: add a0,a0,t3 // compute next scanline address
3509: nop // fill
3510: nop //
3511: nop //
3512:
3513: //
3514: // Pattern 1111-01 -> 1111
3515: //
3516:
3517: swr t0,0(a0) // store pixels
3518: sb t0,3(a0) // store pixel
3519: bne a1,t4,20b // if ne, more bytes in glyph
3520: addu a0,a0,4 // advance to next draw point
3521: b 40b // join common code
3522: add a0,a0,t3 // compute next scanline address
3523: nop // fill
3524: nop //
3525:
3526: //
3527: // Pattern 1111-10 -> 1111
3528: //
3529:
3530: sh t0,0(a0) // store pixels
3531: sh t0,2(a0) // store pixels
3532: bne a1,t4,20b // if ne, more bytes in glyph
3533: addu a0,a0,4 // advance to next draw point
3534: b 40b // join common code
3535: add a0,a0,t3 // compute next scanline address
3536: nop // fill
3537: nop //
3538:
3539: //
3540: // Pattern 1111-11 -> 1111
3541: //
3542:
3543: sb t0,0(a0) // store pixel
3544: swl t0,3(a0) // store pixels
3545: bne a1,t4,20b // if ne, more bytes in glyph
3546: addu a0,a0,4 // advance to next draw point
3547: b 40b // join common code
3548: add a0,a0,t3 // compute next scanline address
3549: nop // fill
3550: nop //
3551: .set at
3552: .set reorder
3553:
3554: .end DrvpOutputGlyphTransparent
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.