Previous 15994 Revisions Next

r9574 Sunday 14th November, 2010 at 00:07:48 UTC by Robbbert
[BEEHIVE] Added rudimentary video driver.
[src/mess/drivers]beehive.c

src/mess/drivers/beehive.c
r9573r9574
66
77    This is a conventional computer terminal using a serial link.
88
9    The character gen rom is not dumped. Using the one from 'c10'
10    for the moment.
11
912****************************************************************************/
1013
1114#include "emu.h"
1215#include "cpu/i8085/i8085.h"
1316
17static const UINT8 *FNT;
18static const UINT8 *videoram;
19
1420static ADDRESS_MAP_START(beehive_mem, ADDRESS_SPACE_PROGRAM, 8)
1521   ADDRESS_MAP_UNMAP_HIGH
1622   AM_RANGE( 0x0000, 0x17ff ) AM_ROM
17   AM_RANGE( 0x1800, 0xffff ) AM_RAM
23   AM_RANGE( 0x1800, 0xffff ) AM_RAM AM_REGION("maincpu", 0x1800)
1824ADDRESS_MAP_END
1925
20static ADDRESS_MAP_START( beehive_io , ADDRESS_SPACE_IO, 8)
26static ADDRESS_MAP_START( beehive_io, ADDRESS_SPACE_IO, 8)
2127   ADDRESS_MAP_UNMAP_HIGH
2228ADDRESS_MAP_END
2329
r9573r9574
3238
3339static VIDEO_START( beehive )
3440{
41   FNT = memory_region(machine, "chargen");
42   videoram = memory_region(machine, "maincpu")+0x81fa;
3543}
3644
45/* This system appears to have inline attribute bytes of unknown meaning.
46    Currently they are ignored. */
3747static VIDEO_UPDATE( beehive )
3848{
39    return 0;
49   //static UINT8 framecnt=0;
50   UINT8 y,ra,chr,gfx;
51   UINT16 sy=0,ma=0,x,xx;
52
53   //framecnt++;
54
55   for (y = 0; y < 25; y++)
56   {
57      for (ra = 0; ra < 10; ra++)
58      {
59         UINT16  *p = BITMAP_ADDR16(bitmap, sy++, 0);
60
61         xx = ma;
62         for (x = ma; x < ma + 80; x++)
63         {
64            gfx = 0;
65            if (ra < 9)
66            {
67               chr = videoram[xx++];
68
69            //   /* Take care of flashing characters */
70            //   if ((chr < 0x80) && (framecnt & 0x08))
71            //      chr |= 0x80;
72
73               if (chr & 0x80)  // ignore attribute bytes
74                  x--;
75               else
76               {
77                  gfx = FNT[(chr<<4) | ra ];
78
79                  /* Display a scanline of a character */
80                  *p = ( gfx & 0x80 ) ? 1 : 0; p++;
81                  *p = ( gfx & 0x40 ) ? 1 : 0; p++;
82                  *p = ( gfx & 0x20 ) ? 1 : 0; p++;
83                  *p = ( gfx & 0x10 ) ? 1 : 0; p++;
84                  *p = ( gfx & 0x08 ) ? 1 : 0; p++;
85                  *p = ( gfx & 0x04 ) ? 1 : 0; p++;
86                  *p = ( gfx & 0x02 ) ? 1 : 0; p++;
87                  *p = ( gfx & 0x01 ) ? 1 : 0; p++;
88               }
89            }
90         }
91      }
92      ma+=106;
93   }
94   return 0;
4095}
4196
4297static MACHINE_CONFIG_START( beehive, driver_device )
r9573r9574
52107    MDRV_SCREEN_REFRESH_RATE(50)
53108    MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
54109    MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
55    MDRV_SCREEN_SIZE(640, 480)
56    MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
110    MDRV_SCREEN_SIZE(640, 250)
111    MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 249)
57112    MDRV_PALETTE_LENGTH(2)
58113    MDRV_PALETTE_INIT(black_and_white)
59114
r9573r9574
68123   ROM_LOAD( "dm3270-2.rom", 0x0800, 0x0800, CRC(4d3476b7) SHA1(627ad42029ca6c8574cda8134d047d20515baf53) )
69124   ROM_LOAD( "dm3270-3.rom", 0x1000, 0x0800, CRC(dbf15833) SHA1(ae93117260a259236c50885c5cecead2aad9b3c4) )
70125
71   /* character generator not dumped */
126   /* character generator not dumped, using the one from 'c10' for now */
127   ROM_REGION( 0x2000, "chargen", 0 )
128   ROM_LOAD( "c10_char.bin", 0x0000, 0x2000, NO_DUMP CRC(cb530b6f) SHA1(95590bbb433db9c4317f535723b29516b9b9fcbf))
72129ROM_END
73130
74131/* Driver */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team