Previous 15994 Revisions Next

r1945 Tuesday 11th March, 2008 at 22:16:19 UTC by Wilbert Pol
Removed deprecat.h dependency from video/bbc.c
[src/mess/video]bbc.c saa505x.c saa505x.h

src/mess/video/saa505x.c
r1944r1945
8383
8484*/
8585
86#include "driver.h"
8687#include "saa505x.h"
8788
8889
r1944r1945
34403441}
34413442
34423443
3443void teletext_F1(void)
3444void teletext_F1(running_machine *machine)
34443445{
34453446   int sc1;
34463447   int code;
r1944r1945
35323533      code=(code-0x20)*60+(6*((tt_linecount+tt_start_line)>>tt_double_height));
35333534      for(sc1=0;sc1<6;sc1++)
35343535      {
3535         (saa505x_calls.out_Pixel_func)(0,tt_lookup[code++]?tt_rcolour:tt_bgcolour);
3536         (saa505x_calls.out_Pixel_func)(machine,0,tt_lookup[code++]?tt_rcolour:tt_bgcolour);
35363537      }
35373538   } else {
35383539
3539      (saa505x_calls.out_Pixel_func)(0,0);
3540      (saa505x_calls.out_Pixel_func)(0,0);
3541      (saa505x_calls.out_Pixel_func)(0,0);
3542      (saa505x_calls.out_Pixel_func)(0,0);
3543      (saa505x_calls.out_Pixel_func)(0,0);
3544      (saa505x_calls.out_Pixel_func)(0,0);
3540      (saa505x_calls.out_Pixel_func)(machine,0,0);
3541      (saa505x_calls.out_Pixel_func)(machine,0,0);
3542      (saa505x_calls.out_Pixel_func)(machine,0,0);
3543      (saa505x_calls.out_Pixel_func)(machine,0,0);
3544      (saa505x_calls.out_Pixel_func)(machine,0,0);
3545      (saa505x_calls.out_Pixel_func)(machine,0,0);
35453546   }
35463547}
src/mess/video/saa505x.h
r1944r1945
1212
1313struct saa505x_interface
1414{
15   void (*out_Pixel_func)(int offset, int data);
15   void (*out_Pixel_func)(running_machine *machine, int offset, int data);
1616};
1717
1818void saa505x_config(const struct saa505x_interface *intf);
r1944r1945
2222void teletext_LOSE_w(int offset, int data);
2323
2424void teletext_data_w(int offset, int data);
25void teletext_F1(void);
25void teletext_F1(running_machine *machine);
2626
src/mess/video/bbc.c
r1944r1945
99******************************************************************************/
1010
1111#include "driver.h"
12#include "deprecat.h"
1312#include "includes/bbc.h"
1413#include "video/m6845.h"
1514#include "saa505x.h"
1615
1716
18static void BBC_draw_hi_res(void);
19static void BBC_draw_teletext(void);
17static void BBC_draw_hi_res(running_machine *machine);
18static void BBC_draw_teletext(running_machine *machine);
2019
21static void (*draw_function)(void);
20static void (*draw_function)(running_machine *machine);
2221
23static void BBC_draw_RGB_in(int offset,int data);
22static void BBC_draw_RGB_in(running_machine *machine, int offset,int data);
2423
2524/************************************************************************
2625 * video_refresh flag is used in optimising the screen redrawing
r1944r1945
205204   BBC_draw_RGB_in,
206205};
207206
208static void BBC_draw_teletext(void)
207static void BBC_draw_teletext(running_machine *machine)
209208{
210209
211210   //Teletext Latch bits 0 to 5 go to bits 0 to 5 on the Teletext chip
r1944r1945
216215
217216   teletext_LOSE_w(0,(Teletext_Latch>>7)&1);
218217
219   teletext_F1();
218   teletext_F1(machine);
220219
221220   teletext_data_w(0,(Teletext_Latch&0x3f)|((Teletext_Latch&0x40)|(BBC_DE?0:0x40)));
222221
r1944r1945
360359
361360// This is the actual output of the Video ULA this fuction does all the output to the screen in the BBC emulator
362361
363static void BBC_ula_drawpixel(int col,int number_of_pixels)
362static void BBC_ula_drawpixel(running_machine *machine, int col,int number_of_pixels)
364363{
365364   int pixel_count;
366365   int pixel_temp;
367366   if ((BBC_display>=BBC_display_left) && ((BBC_display+number_of_pixels)<BBC_display_right))
368367   {
369368
370      pixel_temp=Machine->pens[col^cursor_state];
369      pixel_temp=machine->pens[col^cursor_state];
371370      for(pixel_count=0;pixel_count<number_of_pixels;pixel_count++)
372371      {
373372         *(BBC_display++) = pixel_temp;
r1944r1945
380379
381380// the Video ULA hi-res shift registers, pallette lookup and display enabled circuits
382381
383static void BBC_draw_hi_res(void)
382static void BBC_draw_hi_res(running_machine *machine)
384383{
385384   int meml;
386385   unsigned char i=0;
r1944r1945
402401
403402         for(sc1=0;sc1<pixels_per_byte;sc1++)
404403         {
405            BBC_ula_drawpixel(videoULA_pallet_lookup[pixel_bits[i]],emulation_pixels_per_real_pixel);
404            BBC_ula_drawpixel(machine, videoULA_pallet_lookup[pixel_bits[i]],emulation_pixels_per_real_pixel);
406405            i=(i<<1)|1;
407406         }
408407      } else {
r1944r1945
412411      if (video_refresh)
413412      {
414413         // if the display is not enable, just draw a blank area.
415         BBC_ula_drawpixel(0, emulation_pixels_per_byte);
414         BBC_ula_drawpixel(machine, 0, emulation_pixels_per_byte);
416415      } else {
417416         BBC_display += emulation_pixels_per_byte;
418417      }
r1944r1945
422421
423422// RGB input to the Video ULA from the Teletext IC
424423// Just pass on the output at the correct pixel size.
425static void BBC_draw_RGB_in(int offset,int data)
424static void BBC_draw_RGB_in(running_machine *machine, int offset,int data)
426425{
427   BBC_ula_drawpixel(data,emulation_pixels_per_real_pixel);
426   BBC_ula_drawpixel(machine, data,emulation_pixels_per_real_pixel);
428427}
429428
430429
r1944r1945
625624   // or until a timeout (this catches the 6845 with silly register values that would not give a VSYNC signal)
626625   while((!BBC_VSync)&&(c<60000))
627626   {
628      if ((y_screen_pos>=cliprect->min_y) && (y_screen_pos<=cliprect->max_y)) (draw_function)();
627      if ((y_screen_pos>=cliprect->min_y) && (y_screen_pos<=cliprect->max_y)) (draw_function)(machine);
629628
630629      // and check the cursor
631630      if (VideoULA_CR) BBC_Clock_CR();

Previous 15994 Revisions Next


© 1998-2018 The MESS Team