Previous 15994 Revisions Next

r1942 Tuesday 11th March, 2008 at 22:01:47 UTC by Wilbert Pol
Removed deprecat.h dependency from video/border.c
[src/mess/video]border.c border.h spectrum.c

src/mess/video/spectrum.c
r1941r1942
251251        (synchronised with start of screen data) before the border lines.
252252        There should be 16 blank lines after an interrupt is called.
253253    */
254    draw_border(bitmap, full_refresh,
254    draw_border(machine, bitmap, full_refresh,
255255            SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER,
256256            SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER,
257257            SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
r1941r1942
310310                }
311311   }
312312
313   draw_border(bitmap, full_refresh,
313   draw_border(machine, bitmap, full_refresh,
314314      SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER,
315315      SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER,
316316      SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
r1941r1942
496496                        ts2068_lores_scanline(machine, bitmap, count, TS2068_TOP_BORDER, 0);
497497        }
498498
499        draw_border(bitmap, full_refresh,
499        draw_border(machine, bitmap, full_refresh,
500500                TS2068_TOP_BORDER, SPEC_DISPLAY_YSIZE, TS2068_BOTTOM_BORDER,
501501                TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER,
502502                SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
r1941r1942
536536         ts2068_lores_scanline(machine, bitmap, count, SPEC_TOP_BORDER, 0);
537537   }
538538
539   draw_border(bitmap, full_refresh,
539   draw_border(machine, bitmap, full_refresh,
540540      SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER,
541541      TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER,
542542      SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES,
src/mess/video/border.c
r1941r1942
1515#include "driver.h"
1616#include "border.h"
1717#include "eventlst.h"
18#include "deprecat.h"
1918
2019/* Last border colour output in the previous frame */
2120static int CurrBorderColor = 0;
r1941r1942
3534        CurrBorderColor = NewColor;
3635}
3736
38void draw_border(bitmap_t *bitmap,
37void draw_border(running_machine *machine, bitmap_t *bitmap,
3938   int full_refresh,               /* Full refresh flag */
4039   int TopBorderLines,             /* Border lines before actual screen */
4140   int ScreenLines,                /* Screen height in pixels */
r1941r1942
9493         r.max_x = TotalScreenWidth-1;
9594         r.min_y = 0;
9695         r.max_y = TopBorderLines-1;
97         fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
96         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
9897
9998         r.min_x = 0;
10099         r.max_x = LeftBorderPixels-1;
101100         r.min_y = TopBorderLines;
102101         r.max_y = TopBorderLines+ScreenLines-1;
103         fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
102         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
104103
105104         r.min_x = LeftBorderPixels+ScreenPixels;
106105         r.max_x = TotalScreenWidth-1;
107         fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
106         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
108107
109108         r.min_x = 0;
110109         r.max_x = TotalScreenWidth-1;
111110         r.min_y = TopBorderLines+ScreenLines;
112111         r.max_y = TotalScreenHeight-1;
113         fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
112         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
114113
115114         logerror ("Setting border colour to %d (Last = %d, Full Refresh = %d)\n", CurrBorderColor, LastDisplayedBorderColor, full_refresh);
116115         LastDisplayedBorderColor = CurrBorderColor;
r1941r1942
138137               {
139138                     /* Single colour on line */
140139                     r.max_x = TotalScreenWidth-1;
141                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
140                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
142141               }
143142               else
144143               {
145144                     /* Multiple colours on a line */
146145                     ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
147146                     r.max_x = ScrX-1;
148                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
147                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
149148                     CurrBorderColor = pItem[CurrItem].Event_Data;
150149                     do {
151150                           CurrItem++;
r1941r1942
156155                           NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
157156                           r.min_x = ScrX;
158157                           r.max_x = NextScrX-1;
159                           fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
158                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
160159                           ScrX = NextScrX;
161160                           CurrBorderColor = pItem[CurrItem].Event_Data;
162161                           do {
r1941r1942
165164                     }
166165                     r.min_x = ScrX;
167166                     r.max_x = TotalScreenWidth-1;
168                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
167                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
169168               }
170169
171170               /* Process colour changes during horizontal retrace */
r1941r1942
190189               {
191190                     /* Single colour */
192191                     r.max_x = LeftBorderPixels-1;
193                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
192                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
194193               }
195194               else
196195               {
197196                     /* Multiple colours */
198197                     ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)LeftBorderPixels / (float)LeftBorderCycles;
199198                     r.max_x = ScrX-1;
200                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
199                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
201200                     CurrBorderColor = pItem[CurrItem].Event_Data;
202201                     do {
203202                           CurrItem++;
r1941r1942
208207                           NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)LeftBorderPixels / (float)LeftBorderCycles;
209208                           r.min_x = ScrX;
210209                           r.max_x = NextScrX-1;
211                           fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
210                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
212211                           ScrX = NextScrX;
213212                           CurrBorderColor = pItem[CurrItem].Event_Data;
214213                           do {
r1941r1942
217216                     }
218217                     r.min_x = ScrX;
219218                     r.max_x = LeftBorderPixels-1;
220                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
219                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
221220               }
222221
223222               /* Process colour changes during screen draw */
r1941r1942
235234               {
236235                     /* Single colour */
237236                     r.max_x = TotalScreenWidth-1;
238                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
237                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
239238               }
240239               else
241240               {
242241                     /* Multiple colours */
243242                     ScrX = LeftBorderPixels + ScreenPixels + (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)RightBorderPixels / (float)RightBorderCycles;
244243                     r.max_x = ScrX-1;
245                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
244                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
246245                     CurrBorderColor = pItem[CurrItem].Event_Data;
247246                     do {
248247                           CurrItem++;
r1941r1942
253252                           NextScrX = LeftBorderPixels + ScreenPixels + (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)RightBorderPixels / (float)RightBorderCycles;
254253                           r.min_x = ScrX;
255254                           r.max_x = NextScrX-1;
256                           fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
255                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
257256                           ScrX = NextScrX;
258257                           CurrBorderColor = pItem[CurrItem].Event_Data;
259258                           do {
r1941r1942
262261                     }
263262                     r.min_x = ScrX;
264263                     r.max_x = TotalScreenWidth-1;
265                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
264                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
266265               }
267266
268267               /* Process colour changes during horizontal retrace */
r1941r1942
285284               {
286285                     /* Single colour on line */
287286                     r.max_x = TotalScreenWidth-1;
288                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
287                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
289288               }
290289               else
291290               {
292291                     /* Multiple colours on a line */
293292                     ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
294293                     r.max_x = ScrX-1;
295                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
294                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
296295                     CurrBorderColor = pItem[CurrItem].Event_Data;
297296                     do {
298297                           CurrItem++;
r1941r1942
303302                           NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
304303                           r.min_x = ScrX;
305304                           r.max_x = NextScrX-1;
306                           fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
305                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
307306                           ScrX = NextScrX;
308307                           CurrBorderColor = pItem[CurrItem].Event_Data;
309308                           do {
r1941r1942
312311                     }
313312                     r.min_x = ScrX;
314313                     r.max_x = TotalScreenWidth-1;
315                     fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r);
314                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
316315               }
317316
318317               /* Process colour changes during horizontal retrace */
src/mess/video/border.h
r1941r1942
11extern void force_border_redraw (void);
22extern void set_last_border_color (int NewColor);
3extern void draw_border(bitmap_t *bitmap, int full_refresh,
3extern void draw_border(running_machine *machine, bitmap_t *bitmap, int full_refresh,
44                int TopBorderLines, int ScreenLines, int BottomBorderLines,
55                int LeftBorderPixels, int ScreenPixels, int RightBorderPixels,
66                int LeftBorderCycles, int ScreenCycles, int RightBorderCycles,

Previous 15994 Revisions Next


© 1998-2018 The MESS Team