Previous 15994 Revisions Next

r1993 Saturday 15th March, 2008 at 03:09:02 UTC by Robbbert
[MBEE] Improved colours. COLOURM command now works.
[src/mess/drivers]mbee.c
[src/mess/video]mbee.c

src/mess/video/mbee.c
r1992r1993
471471VIDEO_UPDATE( mbeeic )
472472{
473473   int offs, cursor, screen_;
474   UINT16 colourm = (mbee_pcg_color_latch & 0x0e) << 7;
474475
475476   for( offs = 0x000; offs < 0x380; offs += 0x10 )
476477      keyboard_matrix_r(offs);
r1992r1993
486487      int sy = off_y + (offs / crt.horizontal_displayed) * (crt.scan_lines + 1);
487488      int sx = (off_x + (offs % crt.horizontal_displayed)) << 3;
488489      int code = videoram[mem];
489      int color = colorram[mem];
490      int color = colorram[mem] | colourm;
490491      drawgfx( bitmap,machine->gfx[0],code,color,0,0,sx,sy,
491492         &machine->screen[0].visarea,TRANSPARENCY_NONE,0);
492493
r1992r1993
500501               if( y > crt.scan_lines )
501502                  break;
502503               for( x = 0; x < 8; x++ )
503                  *BITMAP_ADDR16(bitmap, sy+y, sx+x) = ((color&7) << 6);
504                  *BITMAP_ADDR16(bitmap, sy+y, sx+x) = ((color<<1)+1); /* convert to palette entry number */
504505            }
505506         }
506507      }
src/mess/drivers/mbee.c
r1992r1993
3939        PC85: features the WordBee wordprocessor - type EDASM to run
4040              (maybe the ROM was patched to use another keyword?)
4141
42
43    These early colour computers have a PROM to create the foreground palette.
44   This PROM (82s123.ic7) is undumped, therefore the colours assigned are
45   an educated guess. Some information was obtained from magazines.
46
4247***************************************************************************/
4348
4449#include "driver.h"
r1992r1993
220225GFXDECODE_END
221226
222227static GFXDECODE_START( mbeeic )
223   GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 256 )
228   GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 4096 )
224229GFXDECODE_END
225230
226static const UINT8 mbee_palette[] =
227{
228    0x00,0x00,0x00, /* black    */
229    0xf0,0x00,0x00, /* red      */
230    0x00,0xf0,0x00, /* green    */
231    0xf0,0xf0,0x00, /* yellow   */
232    0x00,0x00,0xf0, /* blue     */
233    0xf0,0x00,0xf0, /* magenta  */
234    0x00,0xf0,0xf0, /* cyan     */
235    0xf0,0xf0,0xf0, /* white    */
236    0x08,0x08,0x08, /* black    */
237    0xe0,0x08,0x08, /* red      */
238    0x08,0xe0,0x08, /* green    */
239    0xe0,0xe0,0x08, /* yellow   */
240    0x08,0x08,0xe0, /* blue     */
241    0xe0,0x08,0xe0, /* magenta  */
242    0x08,0xe0,0xe0, /* cyan     */
243    0xe0,0xe0,0xe0, /* white    */
244    0x10,0x10,0x10, /* black    */
245    0xd0,0x10,0x10, /* red      */
246    0x10,0xd0,0x10, /* green    */
247    0xd0,0xd0,0x10, /* yellow   */
248    0x10,0x10,0xd0, /* blue     */
249    0xd0,0x10,0xd0, /* magenta  */
250    0x10,0xd0,0xd0, /* cyan     */
251    0xd0,0xd0,0xd0, /* white    */
252    0x18,0x18,0x18, /* black    */
253    0xe0,0x18,0x18, /* red      */
254    0x18,0xe0,0x18, /* green    */
255    0xe0,0xe0,0x18, /* yellow   */
256    0x18,0x18,0xe0, /* blue     */
257    0xe0,0x18,0xe0, /* magenta  */
258    0x18,0xe0,0xe0, /* cyan     */
259    0xe0,0xe0,0xe0  /* white    */
260};
261
262231static PALETTE_INIT( mbee )
263232{
264   int i;
233   UINT16 i;
265234   UINT8 r, b, g;
266   machine->colortable = colortable_alloc(machine, 32);
235   UINT8 level[] = { 0, 0x80, 0xff };   /* off, half, full intensity */
267236
268   for (i = 0; i < 32; i++)
269   {
270      r = mbee_palette[i*3];
271      g = mbee_palette[i*3+1];
272      b = mbee_palette[i*3+2];
273      colortable_palette_set_color(machine->colortable,i,MAKE_RGB(r, g, b));
274   }
237   /* The foreground colours are determined by an undumped PROM, these are a best guess */
238   UINT8 fgt[] = { 0, 18, 6, 24, 2, 20, 8, 26,
239         0, 21, 15, 19, 11, 7, 5, 26,
240         0, 9, 3, 12, 1, 10, 4, 13,
241         0, 25, 23, 22, 17, 16, 14, 26 };
275242
276   for( i = 0; i < 256; i++ )
277   {
278      colortable_entry_set_value(machine->colortable, i*2, i>>5);
279      colortable_entry_set_value(machine->colortable, i*2+1, i&31);
280   }
243   UINT8 bgt[] = { 0, 1, 3, 4, 9, 10, 12, 13,   /* low intensity */
244         0, 2, 3, 5, 9, 11, 12, 14,   /* red at full */
245         0, 1, 6, 7, 9, 10, 15, 16,   /* green at full */
246         0, 2, 6, 8, 9, 11, 15, 17,   /* red and green at full */
247         0, 1, 3, 4, 18, 19, 21, 22,   /* blue at full */
248         0, 2, 3, 5, 18, 20, 21, 23,   /* blue and red at full */
249         0, 1, 6, 7, 18, 19, 24, 25,   /* blue and green at full */
250         0, 2, 6, 8, 18, 20, 24, 26 };   /* full intensity */
251
252   /* space for colortable */
253   machine->colortable = colortable_alloc(machine, 27);
254
255   /* create 27 unique colours */
256   for (b = 0; b < 3; b++)
257      for (g = 0; g < 3; g++)
258         for (r = 0; r < 3; r++)
259            colortable_palette_set_color(machine->colortable, b*9+g*3+r, MAKE_RGB(level[r], level[g], level[b]));
260
261   /* set up foreground palette */
262   for (i = 1; i < 8192; i+=2) colortable_entry_set_value(machine->colortable, i, fgt[(i>>1)&0x1f]);
263
264   /* set up background palette */
265   for (i = 0; i < 64; i++)
266      for (r = 0; r < 32; r++)
267         colortable_entry_set_value(machine->colortable, ((i<<5)|r)<<1, bgt[i]);
281268}
282269
283270static const struct z80_irq_daisy_chain mbee_daisy_chain[] =
r1992r1993
338325   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
339326   MDRV_SCREEN_SIZE(70*8, 310)
340327   MDRV_SCREEN_VISIBLE_AREA(0*8, 70*8-1, 0, 19*16-1)
341   MDRV_PALETTE_LENGTH(256*2)
328   MDRV_PALETTE_LENGTH(4096*2)
342329   MDRV_PALETTE_INIT(mbee)
343330
344331   MDRV_VIDEO_START(mbeeic)
r1992r1993
528515   CONFIG_DEVICE(mbee_quickload_getinfo)
529516SYSTEM_CONFIG_END
530517
518
531519/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT      CONFIG    COMPANY   FULLNAME */
532520COMP( 1982, mbee,     0,   0,   mbee,     mbee,     mbee,     mbee,      "Applied Technology",  "Microbee 16 Standard" , 0)
533521COMP( 1982, mbeeic,   mbee,   0,   mbeeic,   mbee,     mbee,     mbeeic,      "Applied Technology",  "Microbee 32 IC" , 0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team