src/mess/video/pc_cga.c
| r2157 | r2158 | |
| 48 | 48 | ***************************************************************************/ |
| 49 | 49 | |
| 50 | 50 | #include "driver.h" |
| 51 | | #include "pc_cga.h" |
| 51 | #include "video/pc_cga.h" |
| 52 | 52 | #include "video/mc6845.h" |
| 53 | 53 | #include "video/pc_video.h" |
| 54 | 54 | #include "memconv.h" |
| r2157 | r2158 | |
| 129 | 129 | |
| 130 | 130 | ***************************************************************************/ |
| 131 | 131 | |
| 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 | | |
| 154 | 132 | static struct |
| 155 | 133 | { |
| 156 | 134 | UINT8 mode_control; /* wo 0x3d8 */ |
| r2157 | r2158 | |
| 348 | 326 | } |
| 349 | 327 | |
| 350 | 328 | |
| 329 | void pcvideo_cga_set_character_base( UINT8 *character_base ) { |
| 330 | cga.chr_gen = character_base; |
| 331 | } |
| 332 | |
| 333 | |
| 351 | 334 | static int internal_pc_cga_video_start(int personality) |
| 352 | 335 | { |
| 353 | 336 | memset(&cga, 0, sizeof(cga)); |
src/mess/video/pc_cga.h
| r2157 | r2158 | |
| 12 | 12 | |
| 13 | 13 | MACHINE_DRIVER_EXTERN( pcvideo_cga ); |
| 14 | 14 | |
| 15 | /* Set the base address for the character generation */ |
| 16 | void pcvideo_cga_set_character_base( UINT8 *character_base ); |
| 17 | |
| 15 | 18 | /* has a special 640x200 in 16 color mode, 4 banks at 0xb8000 */ |
| 16 | 19 | MACHINE_DRIVER_EXTERN( pcvideo_pc1512 ); |
| 17 | 20 | |
| r2157 | r2158 | |
| 25 | 28 | /* Dipswitch for font selection */ |
| 26 | 29 | #define CGA_FONT (readinputport(20)&3) |
| 27 | 30 | |
| 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 */ |
| 28 | 38 | |
| 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 | |