src/mess/drivers/beehive.c
| r11298 | r11299 | |
| 5 | 5 | 25/05/2009 Skeleton driver [Robbbert] |
| 6 | 6 | |
| 7 | 7 | This is a conventional computer terminal using a serial link. |
| 8 | Could be a clone of the IBM3276-2. |
| 8 | 9 | |
| 9 | 10 | The character gen rom is not dumped. Using the one from 'c10' |
| 10 | 11 | for the moment. |
| 11 | 12 | |
| 13 | Screen goes crazy during the memory test, just ignore it. |
| 14 | |
| 15 | 25/04/2011 Added partial keyboard. Need to find Shift key etc. |
| 16 | |
| 12 | 17 | ****************************************************************************/ |
| 13 | 18 | #define ADDRESS_MAP_MODERN |
| 14 | 19 | |
| r11298 | r11299 | |
| 28 | 33 | { } |
| 29 | 34 | |
| 30 | 35 | required_device<cpu_device> m_maincpu; |
| 36 | DECLARE_READ8_MEMBER(beehive_60_r); |
| 37 | DECLARE_WRITE8_MEMBER(beehive_62_w); |
| 31 | 38 | const UINT8 *m_p_chargen; |
| 32 | 39 | const UINT8 *m_p_videoram; |
| 40 | UINT8 m_keyline; |
| 33 | 41 | virtual void machine_reset(); |
| 34 | 42 | virtual void video_start(); |
| 35 | 43 | virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect); |
| 36 | 44 | }; |
| 37 | 45 | |
| 46 | READ8_MEMBER(beehive_state::beehive_60_r) |
| 47 | { |
| 48 | if (BIT(m_keyline, 4)) |
| 49 | { |
| 50 | char kbdrow[6]; |
| 51 | sprintf(kbdrow,"X%d", m_keyline&15); |
| 52 | return input_port_read(machine(), kbdrow); |
| 53 | } |
| 54 | else |
| 55 | return 0xff; |
| 56 | } |
| 38 | 57 | |
| 58 | WRITE8_MEMBER(beehive_state::beehive_62_w) |
| 59 | { |
| 60 | m_keyline = data; |
| 61 | } |
| 39 | 62 | |
| 40 | 63 | static ADDRESS_MAP_START(beehive_mem, AS_PROGRAM, 8, beehive_state) |
| 41 | 64 | ADDRESS_MAP_UNMAP_HIGH |
| 42 | 65 | AM_RANGE( 0x0000, 0x17ff ) AM_ROM |
| 43 | | AM_RANGE( 0x1800, 0xffff ) AM_RAM AM_REGION("maincpu", 0x1800) |
| 66 | AM_RANGE( 0x8000, 0x8fff ) AM_RAM AM_BASE(m_p_videoram) |
| 44 | 67 | ADDRESS_MAP_END |
| 45 | 68 | |
| 46 | 69 | static ADDRESS_MAP_START( beehive_io, AS_IO, 8, beehive_state) |
| 47 | 70 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 48 | 71 | ADDRESS_MAP_UNMAP_HIGH |
| 72 | AM_RANGE(0x60, 0x60) AM_READ(beehive_60_r) |
| 73 | AM_RANGE(0x62, 0x62) AM_WRITE(beehive_62_w) |
| 49 | 74 | ADDRESS_MAP_END |
| 50 | 75 | |
| 51 | 76 | /* Input ports */ |
| 52 | 77 | static INPUT_PORTS_START( beehive ) |
| 78 | PORT_START("X0") |
| 79 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 80 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 81 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| 82 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| 83 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| 84 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 85 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') |
| 86 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 87 | |
| 88 | PORT_START("X1") |
| 89 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 90 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 91 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 92 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| 93 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 94 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 95 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 96 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 97 | |
| 98 | PORT_START("X2") |
| 99 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 100 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 101 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 102 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| 103 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 104 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 105 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 106 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 107 | |
| 108 | PORT_START("X3") |
| 109 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 110 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') |
| 111 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') |
| 112 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') |
| 113 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') |
| 114 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') |
| 115 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') |
| 116 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("{") PORT_CODE(KEYCODE_END) PORT_CHAR('{') |
| 117 | |
| 118 | PORT_START("X4") |
| 119 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<") PORT_CODE(KEYCODE_PGDN) PORT_CHAR('<') |
| 120 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') |
| 121 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') |
| 122 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') |
| 123 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 124 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 125 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 126 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 127 | |
| 128 | PORT_START("X5") |
| 129 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 130 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 131 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 132 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 133 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 134 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 135 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') |
| 136 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') |
| 137 | |
| 138 | PORT_START("X6") |
| 139 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 140 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 141 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 142 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 143 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7pad") PORT_CODE(KEYCODE_7_PAD) |
| 144 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8pad") PORT_CODE(KEYCODE_8_PAD) |
| 145 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9pad") PORT_CODE(KEYCODE_9_PAD) |
| 146 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 147 | |
| 148 | PORT_START("X7") |
| 149 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 150 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED // Does a HOME |
| 151 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 152 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4pad") PORT_CODE(KEYCODE_4_PAD) |
| 153 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5pad") PORT_CODE(KEYCODE_5_PAD) |
| 154 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6pad") PORT_CODE(KEYCODE_6_PAD) |
| 155 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 156 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 157 | |
| 158 | PORT_START("X8") |
| 159 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1pad") PORT_CODE(KEYCODE_1_PAD) |
| 160 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2pad") PORT_CODE(KEYCODE_2_PAD) |
| 161 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3pad") PORT_CODE(KEYCODE_3_PAD) |
| 162 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 163 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 164 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 165 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 166 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0pad") PORT_CODE(KEYCODE_0_PAD) |
| 167 | |
| 168 | PORT_START("X9") |
| 169 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".pad") PORT_CODE(KEYCODE_DEL_PAD) |
| 170 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-pad") PORT_CODE(KEYCODE_MINUS_PAD) |
| 171 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 172 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 173 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 174 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 175 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 176 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 177 | |
| 178 | PORT_START("X10") |
| 179 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 180 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 181 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("XMIT") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 182 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 183 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 184 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 185 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 186 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 187 | |
| 188 | // This row is scanned but nothing happens |
| 189 | PORT_START("X11") |
| 190 | PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 191 | |
| 192 | // These probably not exist |
| 193 | PORT_START("X12") |
| 194 | PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 195 | PORT_START("X13") |
| 196 | PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 197 | PORT_START("X14") |
| 198 | PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 199 | PORT_START("X15") |
| 200 | PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED |
| 53 | 201 | INPUT_PORTS_END |
| 54 | 202 | |
| 55 | 203 | |
| r11298 | r11299 | |
| 60 | 208 | VIDEO_START_MEMBER( beehive_state ) |
| 61 | 209 | { |
| 62 | 210 | m_p_chargen = machine().region("chargen")->base(); |
| 63 | | m_p_videoram = machine().region("maincpu")->base()+0x81fa; |
| 64 | 211 | } |
| 65 | 212 | |
| 66 | 213 | /* This system appears to have inline attribute bytes of unknown meaning. |
| 67 | 214 | Currently they are ignored. */ |
| 68 | 215 | SCREEN_UPDATE_MEMBER( beehive_state ) |
| 69 | 216 | { |
| 70 | | //static UINT8 framecnt=0; |
| 71 | | UINT8 y,ra,chr,gfx; |
| 72 | | UINT16 sy=0,ma=0,x,xx; |
| 217 | UINT16 cursor_pos = (m_p_videoram[0xcaf] | (m_p_videoram[0xcb0] << 8)) & 0xfff; |
| 218 | UINT16 p_linelist; |
| 219 | UINT8 line_length; |
| 220 | UINT8 y,ra,chr,gfx,inv; |
| 221 | UINT16 sy=0,ma,x; |
| 73 | 222 | |
| 74 | | //framecnt++; |
| 75 | | |
| 76 | 223 | for (y = 0; y < 25; y++) |
| 77 | 224 | { |
| 225 | p_linelist = 0x1af + y*3; |
| 226 | line_length = m_p_videoram[p_linelist]+1; |
| 227 | ma = (m_p_videoram[p_linelist+1] | (m_p_videoram[p_linelist+2] << 8)) & 0xfff; |
| 228 | |
| 78 | 229 | for (ra = 0; ra < 10; ra++) |
| 79 | 230 | { |
| 80 | 231 | UINT16 *p = BITMAP_ADDR16(&bitmap, sy++, 0); |
| 232 | UINT8 chars = 0; |
| 81 | 233 | |
| 82 | | xx = ma; |
| 83 | | for (x = ma; x < ma + 80; x++) |
| 234 | for (x = ma; x < ma + line_length; x++) |
| 84 | 235 | { |
| 85 | | gfx = 0; |
| 236 | inv = gfx = chr = 0; |
| 237 | if (y == 24) inv=0xff; // status line reverse video |
| 86 | 238 | if (ra < 9) |
| 87 | 239 | { |
| 88 | | chr = m_p_videoram[xx++]; |
| 240 | if (x == cursor_pos) inv=0xff; // show cursor |
| 241 | chr = m_p_videoram[x]; // get char in videoram |
| 242 | gfx = m_p_chargen[(chr<<4) | ra ] ^ inv; // get dot pattern in chargen |
| 243 | } |
| 89 | 244 | |
| 90 | | // /* Take care of flashing characters */ |
| 91 | | // if ((chr < 0x80) && (framecnt & 0x08)) |
| 92 | | // chr |= 0x80; |
| 245 | if ((chars < 80) && (!BIT(chr, 7))) // ignore attribute bytes |
| 246 | { |
| 247 | chars++; |
| 93 | 248 | |
| 94 | | if (chr & 0x80) // ignore attribute bytes |
| 95 | | x--; |
| 96 | | else |
| 97 | | { |
| 98 | | gfx = m_p_chargen[(chr<<4) | ra ]; |
| 99 | | |
| 100 | | /* Display a scanline of a character */ |
| 101 | | *p++ = BIT(gfx, 7); |
| 102 | | *p++ = BIT(gfx, 6); |
| 103 | | *p++ = BIT(gfx, 5); |
| 104 | | *p++ = BIT(gfx, 4); |
| 105 | | *p++ = BIT(gfx, 3); |
| 106 | | *p++ = BIT(gfx, 2); |
| 107 | | *p++ = BIT(gfx, 1); |
| 108 | | *p++ = BIT(gfx, 0); |
| 109 | | } |
| 249 | /* Display a scanline of a character */ |
| 250 | *p++ = BIT(gfx, 7); |
| 251 | *p++ = BIT(gfx, 6); |
| 252 | *p++ = BIT(gfx, 5); |
| 253 | *p++ = BIT(gfx, 4); |
| 254 | *p++ = BIT(gfx, 3); |
| 255 | *p++ = BIT(gfx, 2); |
| 256 | *p++ = BIT(gfx, 1); |
| 257 | *p++ = BIT(gfx, 0); |
| 110 | 258 | } |
| 111 | 259 | } |
| 112 | 260 | } |
| 113 | | ma+=106; |
| 114 | 261 | } |
| 115 | 262 | return 0; |
| 116 | 263 | } |
| 117 | 264 | |
| 118 | 265 | static MACHINE_CONFIG_START( beehive, beehive_state ) |
| 119 | | /* basic machine hardware */ |
| 120 | | MCFG_CPU_ADD("maincpu",I8085A, XTAL_4MHz) |
| 121 | | MCFG_CPU_PROGRAM_MAP(beehive_mem) |
| 122 | | MCFG_CPU_IO_MAP(beehive_io) |
| 266 | /* basic machine hardware */ |
| 267 | MCFG_CPU_ADD("maincpu",I8085A, XTAL_4MHz) |
| 268 | MCFG_CPU_PROGRAM_MAP(beehive_mem) |
| 269 | MCFG_CPU_IO_MAP(beehive_io) |
| 123 | 270 | |
| 124 | | /* video hardware */ |
| 125 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 126 | | MCFG_SCREEN_REFRESH_RATE(50) |
| 127 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 128 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 129 | | MCFG_SCREEN_SIZE(640, 250) |
| 130 | | MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) |
| 131 | | MCFG_PALETTE_LENGTH(2) |
| 132 | | MCFG_PALETTE_INIT(black_and_white) |
| 271 | /* video hardware */ |
| 272 | MCFG_SCREEN_ADD("screen", RASTER) |
| 273 | MCFG_SCREEN_REFRESH_RATE(50) |
| 274 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 275 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 276 | MCFG_SCREEN_SIZE(640, 250) |
| 277 | MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249) |
| 278 | MCFG_PALETTE_LENGTH(2) |
| 279 | MCFG_PALETTE_INIT(monochrome_green) |
| 133 | 280 | MACHINE_CONFIG_END |
| 134 | 281 | |
| 135 | 282 | /* ROM definition */ |