Previous 15994 Revisions Next

r2158 Sunday 30th March, 2008 at 12:45:44 UTC by Wilbert Pol
[PC_CGA] Moved some defines to the header file. Added a method to set the character rom base address.
[src/mess/video]pc_cga.c pc_cga.h

src/mess/video/pc_cga.c
r2157r2158
4848***************************************************************************/
4949
5050#include "driver.h"
51#include "pc_cga.h"
51#include "video/pc_cga.h"
5252#include "video/mc6845.h"
5353#include "video/pc_video.h"
5454#include "memconv.h"
r2157r2158
129129
130130***************************************************************************/
131131
132/* CGA dipswitch settings. These have to be kept consistent over all systems
133 * that use CGA. */
134
135#define CGA_FONT_0            0
136#define CGA_FONT_1            1
137#define CGA_FONT_2            2
138#define CGA_FONT_3            3
139
140#define CGA_MONITOR      (readinputport(20)&0x1C)
141#define CGA_MONITOR_RGB         0x00   /* Colour RGB */
142#define CGA_MONITOR_MONO      0x04   /* Greyscale RGB */
143#define CGA_MONITOR_COMPOSITE   0x08   /* Colour composite */
144#define CGA_MONITOR_TELEVISION   0x0C   /* Television */
145#define CGA_MONITOR_LCD         0x10   /* LCD, eg PPC512 */
146
147#define CGA_CHIPSET      (readinputport(20)&0xE0)
148#define CGA_CHIPSET_IBM         0x00   /* Original IBM CGA */
149#define CGA_CHIPSET_PC1512      0x20   /* PC1512 CGA subset */
150#define CGA_CHIPSET_PC200      0x40   /* PC200 in CGA mode */
151#define CGA_CHIPSET_ATI         0x60   /* ATI (supports Plantronics) */
152#define CGA_CHIPSET_PARADISE   0x80   /* Paradise (used in PC1640) */
153
154132static struct
155133{
156134   UINT8 mode_control;   /* wo 0x3d8 */
r2157r2158
348326}
349327
350328
329void pcvideo_cga_set_character_base( UINT8 *character_base ) {
330   cga.chr_gen = character_base;
331}
332
333
351334static int internal_pc_cga_video_start(int personality)
352335{
353336   memset(&cga, 0, sizeof(cga));
src/mess/video/pc_cga.h
r2157r2158
1212
1313MACHINE_DRIVER_EXTERN( pcvideo_cga );
1414
15/* Set the base address for the character generation */
16void pcvideo_cga_set_character_base( UINT8 *character_base );
17
1518/* has a special 640x200 in 16 color mode, 4 banks at 0xb8000 */
1619MACHINE_DRIVER_EXTERN( pcvideo_pc1512 );
1720
r2157r2158
2528/* Dipswitch for font selection */
2629#define CGA_FONT      (readinputport(20)&3)
2730
31/* Dipswitch for monitor selection */
32#define CGA_MONITOR     (readinputport(20)&0x1C)
33#define CGA_MONITOR_RGB         0x00    /* Colour RGB */
34#define CGA_MONITOR_MONO        0x04    /* Greyscale RGB */
35#define CGA_MONITOR_COMPOSITE   0x08    /* Colour composite */
36#define CGA_MONITOR_TELEVISION  0x0C    /* Television */
37#define CGA_MONITOR_LCD         0x10    /* LCD, eg PPC512 */
2838
39/* Dipswitch for chipset selection */
40#define CGA_CHIPSET     (readinputport(20)&0xE0)
41#define CGA_CHIPSET_IBM         0x00    /* Original IBM CGA */
42#define CGA_CHIPSET_PC1512      0x20    /* PC1512 CGA subset */
43#define CGA_CHIPSET_PC200       0x40    /* PC200 in CGA mode */
44#define CGA_CHIPSET_ATI         0x60    /* ATI (supports Plantronics) */
45#define CGA_CHIPSET_PARADISE    0x80    /* Paradise (used in PC1640) */
46

Previous 15994 Revisions Next


© 1998-2018 The MESS Team