Previous 15994 Revisions Next

r905 Saturday 1st September, 2007 at 13:11:58 UTC by Wilbert Pol
[PCE] Made some things from vdc.h internal in vdc.c. Cleaned up vdc.h header file.
[src/mess/video]vdc.c vdc.h

src/mess/video/vdc.c
r904r905
11#include "driver.h"
22#include "video/vdc.h"
33
4/* Our VDP context */
4/* todo: replace this with the PAIR structure from 'osd_cpu.h' */
5typedef union
6{
7#ifdef LSB_FIRST
8   struct { unsigned char l,h; } b;
9#else
10   struct { unsigned char h,l; } b;
11#endif
12   unsigned short int w;
13}pair;
514
6VDC vdc;
15/* the VDC context */
716
17typedef struct
18{
19   int dvssr_write;         /* Set when the DVSSR register has been written to */
20   int physical_width;         /* Width of the display */
21   int physical_height;      /* Height of the display */
22   pair vce_address;         /* Current address in the palette */
23   pair vce_data[512];         /* Palette data */
24   UINT16 sprite_ram[64*4];   /* Sprite RAM */
25   int curline;            /* the current scanline we're on */
26   UINT8 *vram;
27   UINT8   inc;
28   UINT8 vdc_register;
29   UINT8 vdc_latch;
30   pair vdc_data[32];
31   int status;
32   mame_bitmap *bmp;
33   int y_scroll;
34   int top_blanking;
35   int top_overscan;
36   int active_lines;
37   int bottomfill;
38}VDC;
39
40static VDC vdc;
41
842/* Function prototypes */
943
44void draw_black_line(int line);
45void draw_overscan_line(int line);
46void pce_refresh_line(int bitmap_line, int line);
1047void pce_refresh_sprites(int bitmap_line, int line);
1148void vdc_do_dma(void);
1249
src/mess/video/vdc.h
r904r905
22#include "driver.h"
33#include "video/generic.h"
44
5VIDEO_START( pce );
6VIDEO_UPDATE( pce );
57WRITE8_HANDLER ( vdc_w );
68 READ8_HANDLER ( vdc_r );
79 READ8_HANDLER ( vce_r );
r904r905
4345/* just to keep things simple... */
4446enum vdc_regs {MAWR = 0, MARR, VxR, reg3, reg4, CR, RCR, BXR, BYR, MWR, HSR, HDR, VPR, VDW, VCR, DCR, SOUR, DESR, LENR, DVSSR };
4547
46/* todo: replace this with the PAIR structure from 'osd_cpu.h' */
47typedef union
48{
49#ifdef LSB_FIRST
50  struct { unsigned char l,h; } b;
51#else
52  struct { unsigned char h,l; } b;
53#endif
54  unsigned short int w;
55}pair;
56
57void pce_refresh_line(int bitmap_line, int line);
58void vdc_write(int offset, int data);
59int vdc_read(int offset);
60void draw_black_line(int line);
61void draw_overscan_line(int line);
62void vdc_delayed_irq(int unused);
63
64/* the VDC context */
65
66typedef struct
67{
68    int dvssr_write;            /* Set when the DVSSR register has been written to */
69    int physical_width;         /* Width of the display */
70    int physical_height;        /* Height of the display */
71    pair vce_address;           /* Current address in the palette */
72    pair vce_data[512];         /* Palette data */
73    UINT16 sprite_ram[64*4];    /* Sprite RAM */
74    int curline;                /* the current scanline we're on */
75    UINT8 *vram;
76    UINT8   inc;
77    UINT8 vdc_register;
78    UINT8 vdc_latch;
79    pair vdc_data[32];
80    int status;
81    mame_bitmap *bmp;
82    int y_scroll;
83    int top_blanking;
84    int top_overscan;
85    int active_lines;
86    int bottomfill;
87}VDC;
88
89
90/* from video/vdc.c */
91
92extern VDC vdc;
93extern VIDEO_START( pce );
94extern VIDEO_UPDATE( pce );
95extern WRITE8_HANDLER ( vdc_w );
96extern  READ8_HANDLER ( vdc_r );
97extern WRITE8_HANDLER ( vce_w );
98extern  READ8_HANDLER ( vce_r );

Previous 15994 Revisions Next


© 1998-2018 The MESS Team