~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to mess/src/mess/video/pc8401a.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "includes/pc8401a.h"
2
 
#include "pc8500.lh"
3
 
 
4
 
/* PC-8401A */
5
 
 
6
 
static PALETTE_INIT( pc8401a )
7
 
{
8
 
        palette_set_color(machine, 0, MAKE_RGB(39, 108, 51));
9
 
        palette_set_color(machine, 1, MAKE_RGB(16, 37, 84));
10
 
}
11
 
 
12
 
void pc8401a_state::video_start()
13
 
{
14
 
}
15
 
 
16
 
bool pc8401a_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
17
 
{
18
 
        m_lcdc->update_screen(&bitmap, &cliprect);
19
 
 
20
 
        return 0;
21
 
}
22
 
 
23
 
/* PC-8500 */
24
 
 
25
 
void pc8500_state::video_start()
26
 
{
27
 
}
28
 
 
29
 
bool pc8500_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
30
 
{
31
 
        m_lcdc->update_screen(&bitmap, &cliprect);
32
 
 
33
 
        /*
34
 
    if (strcmp(screen.tag(), SCREEN_TAG) == 0)
35
 
    {
36
 
        sed1330_update(m_lcdc, &bitmap, &cliprect);
37
 
    }
38
 
    else
39
 
    {
40
 
        m_crtc->update(&bitmap, &cliprect);
41
 
    }
42
 
    */
43
 
 
44
 
        return 0;
45
 
}
46
 
 
47
 
/* SED1330 Interface */
48
 
 
49
 
static ADDRESS_MAP_START( pc8401a_lcdc, AS_0, 8, pc8401a_state )
50
 
        ADDRESS_MAP_GLOBAL_MASK(0x1fff)
51
 
        AM_RANGE(0x0000, 0x1fff) AM_RAM
52
 
ADDRESS_MAP_END
53
 
 
54
 
static ADDRESS_MAP_START( pc8500_lcdc, AS_0, 8, pc8401a_state )
55
 
        ADDRESS_MAP_GLOBAL_MASK(0x3fff)
56
 
        AM_RANGE(0x0000, 0x3fff) AM_RAM
57
 
ADDRESS_MAP_END
58
 
 
59
 
/* MC6845 Interface */
60
 
 
61
 
static MC6845_UPDATE_ROW( pc8441a_update_row )
62
 
{
63
 
}
64
 
 
65
 
static const mc6845_interface pc8441a_mc6845_interface =
66
 
{
67
 
        CRT_SCREEN_TAG,
68
 
        6,
69
 
        NULL,
70
 
        pc8441a_update_row,
71
 
        NULL,
72
 
        DEVCB_NULL,
73
 
        DEVCB_NULL,
74
 
        DEVCB_NULL,
75
 
        DEVCB_NULL,
76
 
        NULL
77
 
};
78
 
 
79
 
/* Machine Drivers */
80
 
 
81
 
MACHINE_CONFIG_FRAGMENT( pc8401a_video )
82
 
//  MCFG_DEFAULT_LAYOUT(layout_pc8401a)
83
 
 
84
 
        MCFG_PALETTE_LENGTH(2)
85
 
        MCFG_PALETTE_INIT(pc8401a)
86
 
 
87
 
        /* LCD */
88
 
        MCFG_SCREEN_ADD(SCREEN_TAG, LCD)
89
 
        MCFG_SCREEN_REFRESH_RATE(44)
90
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
91
 
        MCFG_SCREEN_SIZE(480, 128)
92
 
        MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 0, 128-1)
93
 
 
94
 
        MCFG_SED1330_ADD(SED1330_TAG, 0, SCREEN_TAG, pc8401a_lcdc)
95
 
MACHINE_CONFIG_END
96
 
 
97
 
MACHINE_CONFIG_FRAGMENT( pc8500_video )
98
 
        MCFG_DEFAULT_LAYOUT(layout_pc8500)
99
 
 
100
 
        MCFG_PALETTE_LENGTH(2+8)
101
 
        MCFG_PALETTE_INIT(pc8401a)
102
 
 
103
 
        /* LCD */
104
 
        MCFG_SCREEN_ADD(SCREEN_TAG, LCD)
105
 
        MCFG_SCREEN_REFRESH_RATE(44)
106
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
107
 
        MCFG_SCREEN_SIZE(480, 208)
108
 
        MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 0, 200-1)
109
 
 
110
 
        MCFG_SED1330_ADD(SED1330_TAG, 0, SCREEN_TAG, pc8500_lcdc)
111
 
 
112
 
        /* PC-8441A CRT */
113
 
        MCFG_SCREEN_ADD(CRT_SCREEN_TAG, RASTER)
114
 
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
115
 
        MCFG_SCREEN_SIZE(80*8, 24*8)
116
 
        MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*8-1)
117
 
        MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
118
 
        MCFG_SCREEN_REFRESH_RATE(50)
119
 
 
120
 
        MCFG_MC6845_ADD(MC6845_TAG, MC6845, 400000, pc8441a_mc6845_interface)
121
 
MACHINE_CONFIG_END