|
|
1.1 root 1: // Screen Conversion, VDI Res to 16Colour
2:
3: void ConvertVDIRes_16Colour_YLoop(void);
4: void Line_ConvertVDIRes_16Colour(void);
5:
6: void ConvertVDIRes_16Colour(void)
7: {
8: fprintf(stderr,"FIXME: Screen Conversion, VDI Res to 16Colour\n");
9: /* FIXME */
10: /*
11: __asm {
12: push ebp
13: push edi
14: push esi
15: push ebx
16:
17: xor edx,edx // Clear index for loop
18:
19: mov eax,0
20: mov [ScrY],eax // Starting line in ST screen
21:
22: // Get screen addresses, 'edi'-ST screen, 'ebp'-Previous ST screen, 'esi'-PC screen
23: mov edi,[pSTScreen] // ST format screen 4-plane 16 colours
24: mov ebp,[pSTScreenCopy] // Previous ST format screen
25: mov esi,[pPCScreenDest] // PC format screen, byte per pixel 256 colours
26:
27: jmp ConvertVDIRes_16Colour_YLoop
28: }
29: */
30: }
31: /*
32: NAKED void ConvertVDIRes_16Colour_YLoop(void)
33: {
34: __asm {
35: // Get screen addresses, 'edi'-ST screen, 'ebp'-Previous ST screen, 'esi'-PC screen
36: mov esi,[pPCScreenDest] // PC format screen, byte per pixel 256 colours
37:
38: jmp Line_ConvertVDIRes_16Colour
39: }
40: }
41: NAKED void Line_ConvertVDIRes_16Colour(void)
42: {
43: __asm {
44: mov eax,[VDIWidth] // Amount to draw across
45: shr eax,4 // in 16-pixels(8 bytes)
46: mov [ScrX],eax
47: x_loop:
48: #ifdef TEST_SCREEN_UPDATE
49: mov WORD PTR [esi+0],0
50: mov WORD PTR [esi+4],0
51: mov WORD PTR [esi+8],0
52: mov WORD PTR [esi+12],0
53: mov WORD PTR [esi+16],0
54: mov WORD PTR [esi+20],0
55: mov WORD PTR [esi+24],0
56: mov WORD PTR [esi+28],0
57: #endif //TEST_SCREEN_UPDATE
58:
59: // Do 16 pixels at one time
60: mov ebx,[edi]
61: mov ecx,4[edi]
62: // Full update? or just test changes?
63: test [ScrUpdateFlag],0xe0000000
64: jne copy_word // Force
65: // Does differ?
66: cmp ebx,[ebp]
67: jne copy_word
68: cmp ecx,4[ebp]
69: je next_word // Pixels are same as last frame, so ignore
70:
71: copy_word:
72: mov [bScreenContentsChanged],TRUE
73:
74: // Plot pixels
75: LOW_BUILD_PIXELS_0 // Generate 'ecx' as pixels [4,5,6,7]
76: PLOT_LOW_320_8BIT(4)
77: LOW_BUILD_PIXELS_1 // Generate 'ecx' as pixels [12,13,14,15]
78: PLOT_LOW_320_8BIT(12)
79: LOW_BUILD_PIXELS_2 // Generate 'ecx' as pixels [0,1,2,3]
80: PLOT_LOW_320_8BIT(0)
81: LOW_BUILD_PIXELS_3 // Generate 'ecx' as pixels [8,9,10,11]
82: PLOT_LOW_320_8BIT(8)
83:
84: next_word:
85: add esi,16 // Next PC pixels
86: add edi,8 // Next ST pixels
87: add ebp,8 // Next ST copy pixels
88:
89: dec [ScrX]
90: jne x_loop // Loop on X
91:
92: mov eax,[pPCScreenDest]
93: add eax,[PCScreenBytesPerLine] // Offset to next line
94: mov [pPCScreenDest],eax
95:
96: inc [ScrY]
97: mov eax,[VDIHeight]
98: cmp [ScrY],eax
99: jne ConvertVDIRes_16Colour_YLoop // And on Y
100:
101: pop ebx
102: pop esi
103: pop edi
104: pop ebp
105:
106: ret
107: }
108: }
109: */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.