Previous 15994 Revisions Next

r2047 Friday 21st March, 2008 at 22:21:37 UTC by Robbbert
[P2000] Fixed palette of p2000m and p2000t.
[src/mess/drivers]p2000t.c
[src/mess/video]p2000m.c saa5050.c

src/mess/video/p2000m.c
r2046r2047
5050      {
5151         for (loop = 0; loop < 6; loop++)
5252         {
53            *BITMAP_ADDR16(bitmap, sy + 9, sx + loop) = 1;
53            *BITMAP_ADDR16(bitmap, sy + 9, sx + loop) = 0;   /* cursor */
5454         }
5555      }
5656   }
src/mess/video/saa5050.c
r2046r2047
6767};
6868
6969static GFXDECODE_START( saa5050 )
70   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_charlayout, 0, 128 )
71   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_hilayout, 0, 128 )
72   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_lolayout, 0, 128 )
70   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_charlayout, 0, 64 )
71   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_hilayout, 0, 64 )
72   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, saa5050_lolayout, 0, 64 )
7373GFXDECODE_END
7474
75static const UINT8 saa5050_palette[8 * 3] =
75static const UINT8 saa5050_colors[8 * 3] =
7676{
7777   0x00, 0x00, 0x00,   /* black */
7878   0xff, 0x00, 0x00,   /* red */
r2046r2047
8484   0xff, 0xff, 0xff   /* white */
8585};
8686
87static const UINT16 saa5050_colortable[64 * 2] =   /* bgnd, fgnd */
87static const UINT16 saa5050_palette[64 * 2] =   /* bgnd, fgnd */
8888{
8989   0,1, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7,
9090   1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7,
r2046r2047
9898
9999static PALETTE_INIT( saa5050 )
100100{
101   int i;
101   UINT8 i, r, g, b;
102102
103   for ( i = 0; i < sizeof(saa5050_palette) / 3; i++ ) {
104      palette_set_color_rgb(machine, i, saa5050_palette[i*3], saa5050_palette[i*3+1], saa5050_palette[i*3+2]);
103   machine->colortable = colortable_alloc(machine, 8);
104
105   for ( i = 0; i < 8; i++ )
106   {
107      r = saa5050_colors[i*3]; g = saa5050_colors[i*3+1]; b = saa5050_colors[i*3+2];
108      colortable_palette_set_color(machine->colortable, i, MAKE_RGB(r, g, b));
105109   }
110
111   for(i=0; i<128; i++)
112      colortable_entry_set_value(machine->colortable, i, saa5050_palette[i]);
106113}
107114
108115static VIDEO_START( saa5050 )
r2046r2047
248255   MDRV_SCREEN_SIZE(40 * 6, 24 * 10)
249256   MDRV_SCREEN_VISIBLE_AREA(0, 40 * 6 - 1, 0, 24 * 10 - 1)
250257   MDRV_GFXDECODE( saa5050 )
251   MDRV_PALETTE_LENGTH(8)
258   MDRV_PALETTE_LENGTH(128)
252259   MDRV_PALETTE_INIT(saa5050)
253260
254261   MDRV_VIDEO_START(saa5050)
src/mess/drivers/p2000t.c
r2046r2047
7878   8 * 10
7979};
8080
81static GFXDECODE_START( p2000m )
82   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, p2000m_charlayout, 0, 128 )
83GFXDECODE_END
84
85static const unsigned char p2000m_palette[2 * 3] =
81PALETTE_INIT( p2000m )
8682{
87   0x00, 0x00, 0x00,
88   0xff, 0xff, 0xff
89};
90
91static PALETTE_INIT( p2000m )
92{
93   int i;
94
95   for ( i = 0; i < sizeof(p2000m_palette) / 3; i++ ) {
96      palette_set_color_rgb(machine, i, p2000m_palette[i*3], p2000m_palette[i*3+1], p2000m_palette[i*3+2]);
97   }
83   palette_set_color(machine,0,RGB_WHITE); /* white */
84   palette_set_color(machine,1,RGB_BLACK); /* black */
85   palette_set_color(machine,2,RGB_BLACK); /* black */
86   palette_set_color(machine,3,RGB_WHITE); /* white */
9887}
9988
89static GFXDECODE_START( p2000m )
90   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, p2000m_charlayout, 0, 2 )
91GFXDECODE_END
92
10093/* Keyboard input */
10194
10295static INPUT_PORTS_START (p2000t)
r2046r2047
234227   MDRV_SCREEN_SIZE(80 * 6, 24 * 10)
235228   MDRV_SCREEN_VISIBLE_AREA(0, 80 * 6 - 1, 0, 24 * 10 - 1)
236229   MDRV_GFXDECODE( p2000m )
237   MDRV_PALETTE_LENGTH(2)
230   MDRV_PALETTE_LENGTH(4)
238231   MDRV_PALETTE_INIT(p2000m)
239232
240233   MDRV_VIDEO_START(p2000m)
r2046r2047
263256   ROM_LOAD("p2000.chr", 0x0140, 0x08c0, BAD_DUMP CRC(78c17e3e) SHA1(4e1c59dc484505de1dc0b1ba7e5f70a54b0d4ccc))
264257ROM_END
265258
266/*      YEAR    NAME        PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG  COMPANY     FULLNAME */
267COMP (   1980,   p2000t,      0,      0,      p2000t,      p2000t,      0,      NULL,   "Philips",   "Philips P2000T" , 0)
268COMP (   1980,   p2000m,      p2000t,   0,      p2000m,      p2000t,      0,      NULL,   "Philips",   "Philips P2000M" , 0)
259/*      YEAR    NAME    PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG  COMPANY     FULLNAME */
260COMP (   1980,   p2000t,   0,   0,   p2000t,   p2000t,      0,   NULL,   "Philips",   "Philips P2000T" , 0)
261COMP (   1980,   p2000m,   p2000t,   0,   p2000m,   p2000t,      0,   NULL,   "Philips",   "Philips P2000M" , 0)
269262

Previous 15994 Revisions Next


© 1998-2018 The MESS Team