src/mess/video/spectrum.c
| r1941 | r1942 | |
| 251 | 251 | (synchronised with start of screen data) before the border lines. |
| 252 | 252 | There should be 16 blank lines after an interrupt is called. |
| 253 | 253 | */ |
| 254 | | draw_border(bitmap, full_refresh, |
| 254 | draw_border(machine, bitmap, full_refresh, |
| 255 | 255 | SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, |
| 256 | 256 | SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER, |
| 257 | 257 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
| r1941 | r1942 | |
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | | draw_border(bitmap, full_refresh, |
| 313 | draw_border(machine, bitmap, full_refresh, |
| 314 | 314 | SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, |
| 315 | 315 | SPEC_LEFT_BORDER, SPEC_DISPLAY_XSIZE, SPEC_RIGHT_BORDER, |
| 316 | 316 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
| r1941 | r1942 | |
| 496 | 496 | ts2068_lores_scanline(machine, bitmap, count, TS2068_TOP_BORDER, 0); |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | | draw_border(bitmap, full_refresh, |
| 499 | draw_border(machine, bitmap, full_refresh, |
| 500 | 500 | TS2068_TOP_BORDER, SPEC_DISPLAY_YSIZE, TS2068_BOTTOM_BORDER, |
| 501 | 501 | TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER, |
| 502 | 502 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
| r1941 | r1942 | |
| 536 | 536 | ts2068_lores_scanline(machine, bitmap, count, SPEC_TOP_BORDER, 0); |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | | draw_border(bitmap, full_refresh, |
| 539 | draw_border(machine, bitmap, full_refresh, |
| 540 | 540 | SPEC_TOP_BORDER, SPEC_DISPLAY_YSIZE, SPEC_BOTTOM_BORDER, |
| 541 | 541 | TS2068_LEFT_BORDER, TS2068_DISPLAY_XSIZE, TS2068_RIGHT_BORDER, |
| 542 | 542 | SPEC_LEFT_BORDER_CYCLES, SPEC_DISPLAY_XSIZE_CYCLES, |
src/mess/video/border.c
| r1941 | r1942 | |
| 15 | 15 | #include "driver.h" |
| 16 | 16 | #include "border.h" |
| 17 | 17 | #include "eventlst.h" |
| 18 | | #include "deprecat.h" |
| 19 | 18 | |
| 20 | 19 | /* Last border colour output in the previous frame */ |
| 21 | 20 | static int CurrBorderColor = 0; |
| r1941 | r1942 | |
| 35 | 34 | CurrBorderColor = NewColor; |
| 36 | 35 | } |
| 37 | 36 | |
| 38 | | void draw_border(bitmap_t *bitmap, |
| 37 | void draw_border(running_machine *machine, bitmap_t *bitmap, |
| 39 | 38 | int full_refresh, /* Full refresh flag */ |
| 40 | 39 | int TopBorderLines, /* Border lines before actual screen */ |
| 41 | 40 | int ScreenLines, /* Screen height in pixels */ |
| r1941 | r1942 | |
| 94 | 93 | r.max_x = TotalScreenWidth-1; |
| 95 | 94 | r.min_y = 0; |
| 96 | 95 | r.max_y = TopBorderLines-1; |
| 97 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 96 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 98 | 97 | |
| 99 | 98 | r.min_x = 0; |
| 100 | 99 | r.max_x = LeftBorderPixels-1; |
| 101 | 100 | r.min_y = TopBorderLines; |
| 102 | 101 | r.max_y = TopBorderLines+ScreenLines-1; |
| 103 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 102 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 104 | 103 | |
| 105 | 104 | r.min_x = LeftBorderPixels+ScreenPixels; |
| 106 | 105 | r.max_x = TotalScreenWidth-1; |
| 107 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 106 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 108 | 107 | |
| 109 | 108 | r.min_x = 0; |
| 110 | 109 | r.max_x = TotalScreenWidth-1; |
| 111 | 110 | r.min_y = TopBorderLines+ScreenLines; |
| 112 | 111 | r.max_y = TotalScreenHeight-1; |
| 113 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 112 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 114 | 113 | |
| 115 | 114 | logerror ("Setting border colour to %d (Last = %d, Full Refresh = %d)\n", CurrBorderColor, LastDisplayedBorderColor, full_refresh); |
| 116 | 115 | LastDisplayedBorderColor = CurrBorderColor; |
| r1941 | r1942 | |
| 138 | 137 | { |
| 139 | 138 | /* Single colour on line */ |
| 140 | 139 | r.max_x = TotalScreenWidth-1; |
| 141 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 140 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 142 | 141 | } |
| 143 | 142 | else |
| 144 | 143 | { |
| 145 | 144 | /* Multiple colours on a line */ |
| 146 | 145 | ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine; |
| 147 | 146 | r.max_x = ScrX-1; |
| 148 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 147 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 149 | 148 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 150 | 149 | do { |
| 151 | 150 | CurrItem++; |
| r1941 | r1942 | |
| 156 | 155 | NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine; |
| 157 | 156 | r.min_x = ScrX; |
| 158 | 157 | r.max_x = NextScrX-1; |
| 159 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 158 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 160 | 159 | ScrX = NextScrX; |
| 161 | 160 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 162 | 161 | do { |
| r1941 | r1942 | |
| 165 | 164 | } |
| 166 | 165 | r.min_x = ScrX; |
| 167 | 166 | r.max_x = TotalScreenWidth-1; |
| 168 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 167 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 169 | 168 | } |
| 170 | 169 | |
| 171 | 170 | /* Process colour changes during horizontal retrace */ |
| r1941 | r1942 | |
| 190 | 189 | { |
| 191 | 190 | /* Single colour */ |
| 192 | 191 | r.max_x = LeftBorderPixels-1; |
| 193 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 192 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 194 | 193 | } |
| 195 | 194 | else |
| 196 | 195 | { |
| 197 | 196 | /* Multiple colours */ |
| 198 | 197 | ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)LeftBorderPixels / (float)LeftBorderCycles; |
| 199 | 198 | r.max_x = ScrX-1; |
| 200 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 199 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 201 | 200 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 202 | 201 | do { |
| 203 | 202 | CurrItem++; |
| r1941 | r1942 | |
| 208 | 207 | NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)LeftBorderPixels / (float)LeftBorderCycles; |
| 209 | 208 | r.min_x = ScrX; |
| 210 | 209 | r.max_x = NextScrX-1; |
| 211 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 210 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 212 | 211 | ScrX = NextScrX; |
| 213 | 212 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 214 | 213 | do { |
| r1941 | r1942 | |
| 217 | 216 | } |
| 218 | 217 | r.min_x = ScrX; |
| 219 | 218 | r.max_x = LeftBorderPixels-1; |
| 220 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 219 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 221 | 220 | } |
| 222 | 221 | |
| 223 | 222 | /* Process colour changes during screen draw */ |
| r1941 | r1942 | |
| 235 | 234 | { |
| 236 | 235 | /* Single colour */ |
| 237 | 236 | r.max_x = TotalScreenWidth-1; |
| 238 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 237 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 239 | 238 | } |
| 240 | 239 | else |
| 241 | 240 | { |
| 242 | 241 | /* Multiple colours */ |
| 243 | 242 | ScrX = LeftBorderPixels + ScreenPixels + (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)RightBorderPixels / (float)RightBorderCycles; |
| 244 | 243 | r.max_x = ScrX-1; |
| 245 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 244 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 246 | 245 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 247 | 246 | do { |
| 248 | 247 | CurrItem++; |
| r1941 | r1942 | |
| 253 | 252 | NextScrX = LeftBorderPixels + ScreenPixels + (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)RightBorderPixels / (float)RightBorderCycles; |
| 254 | 253 | r.min_x = ScrX; |
| 255 | 254 | r.max_x = NextScrX-1; |
| 256 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 255 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 257 | 256 | ScrX = NextScrX; |
| 258 | 257 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 259 | 258 | do { |
| r1941 | r1942 | |
| 262 | 261 | } |
| 263 | 262 | r.min_x = ScrX; |
| 264 | 263 | r.max_x = TotalScreenWidth-1; |
| 265 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 264 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 266 | 265 | } |
| 267 | 266 | |
| 268 | 267 | /* Process colour changes during horizontal retrace */ |
| r1941 | r1942 | |
| 285 | 284 | { |
| 286 | 285 | /* Single colour on line */ |
| 287 | 286 | r.max_x = TotalScreenWidth-1; |
| 288 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 287 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 289 | 288 | } |
| 290 | 289 | else |
| 291 | 290 | { |
| 292 | 291 | /* Multiple colours on a line */ |
| 293 | 292 | ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine; |
| 294 | 293 | r.max_x = ScrX-1; |
| 295 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 294 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 296 | 295 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 297 | 296 | do { |
| 298 | 297 | CurrItem++; |
| r1941 | r1942 | |
| 303 | 302 | NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine; |
| 304 | 303 | r.min_x = ScrX; |
| 305 | 304 | r.max_x = NextScrX-1; |
| 306 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 305 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 307 | 306 | ScrX = NextScrX; |
| 308 | 307 | CurrBorderColor = pItem[CurrItem].Event_Data; |
| 309 | 308 | do { |
| r1941 | r1942 | |
| 312 | 311 | } |
| 313 | 312 | r.min_x = ScrX; |
| 314 | 313 | r.max_x = TotalScreenWidth-1; |
| 315 | | fillbitmap(bitmap, Machine->pens[CurrBorderColor], &r); |
| 314 | fillbitmap(bitmap, machine->pens[CurrBorderColor], &r); |
| 316 | 315 | } |
| 317 | 316 | |
| 318 | 317 | /* Process colour changes during horizontal retrace */ |