![]() |
Thanks to Julio Marchi for this space in MSX All |
MSX 1 Screen Pattern
Most MSX 1 graphic editors are based on the screen 2. 0 31 ┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ ├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤ └┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┘ 23
+-----------------------------+ | 000 001 002 003 ... 030 031 | | 032 033 034 035 ... 062 063 | | ... | | 736 737 738 739 ... 766 767 | +-----------------------------+
Obs: decimal values. ┌─┬─┬─┬─┬─┬─┬─┬─┐ │ │ │ │ │ │ │ │ │ Line 0 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 1 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 2 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 3 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 4 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 5 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 6 ├─┼─┼─┼─┼─┼─┼─┼─┤ │ │ │ │ │ │ │ │ │ Line 7 └─┴─┴─┴─┴─┴─┴─┴─┘
Screen Blocks numeration 0 5 ┌┬┬┬┬┐ 00 01 02 03 04 ├┼┼┼┼┤ 05 06 07 08 09 ├┼┼┼┼┤ 10 11 12 13 14 ├┼┼┼┼┤ 15 16 17 18 19 └┴┴┴┴┘ 4
variables: p, x, y : integer; heigh, width, D, line : integer; save : boolean; begin p ← 7; save ← false; for y ← 0 to height step 8 do begin for x ← 0 to width step 8 do begin for line ← 0 to 7 do begin if (save = true) then begin D ← val(p); change_line(D); else D ← read_line(); val(p) ← D; end_if p ← p + 1; end_for end_for end_for end_program
Where the variables "width" and "height" must be multiple of 8. Character table: bit 0 = front color bit 1 = background color Color table: 4 MSb = front color 4 LSb = background color
10 EP = 8*BL ' Character table 20 EC = 8192 + 8*BL ' Color table
10 SCREEN 2 20 BL=4 30 EP = 8*BL ' Character table 40 EC = 8192 + 8*BL ' Color table 50 L=2 60 VPOKE EP+L,&B10101010 ' Pattrern: 10101010 70 VPOKE EC+L,&B01111101 ' Front:7, BG:13
|