5
5
******************************************************************************/
7
8
#include "vidhrdw/generic.h"
8
9
#include "vidhrdw/m6847.h"
9
10
#include "includes/atom.h"
11
static void atom_charproc(UINT8 c)
13
m6847_inv_w(0, (c & 0x80));
14
m6847_as_w(0, (c & 0x40));
15
m6847_intext_w(0, (c & 0x40));
12
static ATTR_CONST UINT8 atom_get_attributes(UINT8 c)
14
extern UINT8 atom_8255_porta;
15
extern UINT8 atom_8255_portc;
17
if (c & 0x40) result |= M6847_AS | M6847_INTEXT;
18
if (c & 0x80) result |= M6847_INV;
19
if (atom_8255_porta & 0x80) result |= M6847_GM2;
20
if (atom_8255_porta & 0x40) result |= M6847_GM1;
21
if (atom_8255_porta & 0x20) result |= M6847_GM0;
22
if (atom_8255_porta & 0x10) result |= M6847_AG;
23
if (atom_8255_portc & 0x08) result |= M6847_CSS;
27
static const UINT8 *atom_get_video_ram(int scanline)
29
return videoram + (scanline / 12) * 0x20;
18
32
VIDEO_START( atom )
20
struct m6847_init_params p;
22
m6847_vh_normalparams(&p);
23
p.version = M6847_VERSION_ORIGINAL_PAL;
24
p.ram = memory_region(REGION_CPU1) + 0x8000;
26
p.charproc = atom_charproc;
28
if (video_start_m6847(&p))
36
memset(&cfg, 0, sizeof(cfg));
37
cfg.type = M6847_VERSION_ORIGINAL_PAL;
38
cfg.get_attributes = atom_get_attributes;
39
cfg.get_video_ram = atom_get_video_ram;