src/mess/drivers/beehive.c
| r9573 | r9574 | |
| 6 | 6 | |
| 7 | 7 | This is a conventional computer terminal using a serial link. |
| 8 | 8 | |
| 9 | The character gen rom is not dumped. Using the one from 'c10' |
| 10 | for the moment. |
| 11 | |
| 9 | 12 | ****************************************************************************/ |
| 10 | 13 | |
| 11 | 14 | #include "emu.h" |
| 12 | 15 | #include "cpu/i8085/i8085.h" |
| 13 | 16 | |
| 17 | static const UINT8 *FNT; |
| 18 | static const UINT8 *videoram; |
| 19 | |
| 14 | 20 | static ADDRESS_MAP_START(beehive_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 15 | 21 | ADDRESS_MAP_UNMAP_HIGH |
| 16 | 22 | AM_RANGE( 0x0000, 0x17ff ) AM_ROM |
| 17 | | AM_RANGE( 0x1800, 0xffff ) AM_RAM |
| 23 | AM_RANGE( 0x1800, 0xffff ) AM_RAM AM_REGION("maincpu", 0x1800) |
| 18 | 24 | ADDRESS_MAP_END |
| 19 | 25 | |
| 20 | | static ADDRESS_MAP_START( beehive_io , ADDRESS_SPACE_IO, 8) |
| 26 | static ADDRESS_MAP_START( beehive_io, ADDRESS_SPACE_IO, 8) |
| 21 | 27 | ADDRESS_MAP_UNMAP_HIGH |
| 22 | 28 | ADDRESS_MAP_END |
| 23 | 29 | |
| r9573 | r9574 | |
| 32 | 38 | |
| 33 | 39 | static VIDEO_START( beehive ) |
| 34 | 40 | { |
| 41 | FNT = memory_region(machine, "chargen"); |
| 42 | videoram = memory_region(machine, "maincpu")+0x81fa; |
| 35 | 43 | } |
| 36 | 44 | |
| 45 | /* This system appears to have inline attribute bytes of unknown meaning. |
| 46 | Currently they are ignored. */ |
| 37 | 47 | static VIDEO_UPDATE( beehive ) |
| 38 | 48 | { |
| 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; |
| 40 | 95 | } |
| 41 | 96 | |
| 42 | 97 | static MACHINE_CONFIG_START( beehive, driver_device ) |
| r9573 | r9574 | |
| 52 | 107 | MDRV_SCREEN_REFRESH_RATE(50) |
| 53 | 108 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 54 | 109 | 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) |
| 57 | 112 | MDRV_PALETTE_LENGTH(2) |
| 58 | 113 | MDRV_PALETTE_INIT(black_and_white) |
| 59 | 114 | |
| r9573 | r9574 | |
| 68 | 123 | ROM_LOAD( "dm3270-2.rom", 0x0800, 0x0800, CRC(4d3476b7) SHA1(627ad42029ca6c8574cda8134d047d20515baf53) ) |
| 69 | 124 | ROM_LOAD( "dm3270-3.rom", 0x1000, 0x0800, CRC(dbf15833) SHA1(ae93117260a259236c50885c5cecead2aad9b3c4) ) |
| 70 | 125 | |
| 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)) |
| 72 | 129 | ROM_END |
| 73 | 130 | |
| 74 | 131 | /* Driver */ |