src/mess/video/mbee.c
| r9309 | r9310 | |
| 72 | 72 | static UINT8 mbee_0a; |
| 73 | 73 | static UINT8 mbee_0b; |
| 74 | 74 | static UINT8 mbee_1c; |
| 75 | static UINT8 is_premium; |
| 75 | 76 | static UINT8 mc6845_cursor[16]; // cursor shape |
| 76 | 77 | static void mc6845_cursor_configure(void); |
| 77 | 78 | static void mc6845_screen_configure(running_machine *machine); |
| r9309 | r9310 | |
| 224 | 225 | /* The direction keys are used by the pc85 menu. Do not know what uses the "insert" key. */ |
| 225 | 226 | static void keyboard_matrix_r(running_machine *machine, int offs) |
| 226 | 227 | { |
| 227 | | int port = (offs >> 7) & 7; |
| 228 | | int bit = (offs >> 4) & 7; |
| 229 | | int extra = input_port_read(machine, "EXTRA"); |
| 230 | | int data = 0; |
| 228 | UINT8 port = (offs >> 7) & 7; |
| 229 | UINT8 bit = (offs >> 4) & 7; |
| 230 | UINT8 data = (input_port_read(machine, keynames[port]) >> bit) & 1; |
| 231 | 231 | |
| 232 | | data = (input_port_read(machine, keynames[port]) >> bit) & 1; |
| 232 | if ((data | is_premium) == 0) |
| 233 | { |
| 234 | UINT8 extra = input_port_read(machine, "EXTRA"); |
| 233 | 235 | |
| 234 | | if( extra & 0x01 ) /* extra: cursor up */ |
| 235 | | { |
| 236 | | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 237 | | if( port == 0 && bit == 5 ) data = 1; /* E */ |
| 236 | if( extra & 0x01 ) /* extra: cursor up */ |
| 237 | { |
| 238 | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 239 | if( port == 0 && bit == 5 ) data = 1; /* E */ |
| 240 | } |
| 241 | else |
| 242 | if( extra & 0x02 ) /* extra: cursor down */ |
| 243 | { |
| 244 | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 245 | if( port == 3 && bit == 0 ) data = 1; /* X */ |
| 246 | } |
| 247 | else |
| 248 | if( extra & 0x04 ) /* extra: cursor left */ |
| 249 | { |
| 250 | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 251 | if( port == 2 && bit == 3 ) data = 1; /* S */ |
| 252 | } |
| 253 | else |
| 254 | if( extra & 0x08 ) /* extra: cursor right */ |
| 255 | { |
| 256 | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 257 | if( port == 0 && bit == 4 ) data = 1; /* D */ |
| 258 | } |
| 259 | else |
| 260 | if( extra & 0x10 ) /* extra: insert */ |
| 261 | { |
| 262 | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 263 | if( port == 2 && bit == 6 ) data = 1; /* V */ |
| 264 | } |
| 238 | 265 | } |
| 239 | | if( extra & 0x02 ) /* extra: cursor down */ |
| 240 | | { |
| 241 | | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 242 | | if( port == 3 && bit == 0 ) data = 1; /* X */ |
| 243 | | } |
| 244 | | if( extra & 0x04 ) /* extra: cursor left */ |
| 245 | | { |
| 246 | | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 247 | | if( port == 2 && bit == 3 ) data = 1; /* S */ |
| 248 | | } |
| 249 | | if( extra & 0x08 ) /* extra: cursor right */ |
| 250 | | { |
| 251 | | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 252 | | if( port == 0 && bit == 4 ) data = 1; /* D */ |
| 253 | | } |
| 254 | | if( extra & 0x10 ) /* extra: insert */ |
| 255 | | { |
| 256 | | if( port == 7 && bit == 1 ) data = 1; /* Control */ |
| 257 | | if( port == 2 && bit == 6 ) data = 1; /* V */ |
| 258 | | } |
| 259 | 266 | |
| 260 | 267 | if( data ) |
| 261 | 268 | { |
| 262 | | crt.lpen_lo = offs & 0xff; |
| 263 | | crt.lpen_hi = (offs >> 8) & 0x03; |
| 269 | crt.lpen_lo = offs; |
| 270 | crt.lpen_hi = offs >> 8; |
| 264 | 271 | crt.lpen_strobe = 1; |
| 265 | 272 | } |
| 266 | 273 | } |
| r9309 | r9310 | |
| 268 | 275 | |
| 269 | 276 | static void mbee_video_kbd_scan( running_machine *machine, int param ) |
| 270 | 277 | { |
| 271 | | if ((mbee_0b) || (param & 0x8)) |
| 272 | | return; |
| 278 | if (mbee_0b) return; |
| 273 | 279 | |
| 274 | | |
| 275 | 280 | keyboard_matrix_r(machine, param); |
| 276 | 281 | } |
| 277 | 282 | |
| r9309 | r9310 | |
| 545 | 550 | { |
| 546 | 551 | videoram = memory_region(machine, "videoram"); |
| 547 | 552 | gfxram = memory_region(machine, "gfx")+0x1000; |
| 553 | is_premium = 0; |
| 548 | 554 | } |
| 549 | 555 | |
| 550 | 556 | VIDEO_START( mbeeic ) |
| r9309 | r9310 | |
| 552 | 558 | videoram = memory_region(machine, "videoram"); |
| 553 | 559 | colorram = memory_region(machine, "colorram"); |
| 554 | 560 | gfxram = memory_region(machine, "gfx")+0x1000; |
| 561 | is_premium = 0; |
| 555 | 562 | } |
| 556 | 563 | |
| 557 | 564 | VIDEO_START( mbeeppc ) |
| r9309 | r9310 | |
| 560 | 567 | colorram = memory_region(machine, "colorram"); |
| 561 | 568 | gfxram = memory_region(machine, "gfx")+0x1000; |
| 562 | 569 | attribram = memory_region(machine, "attrib"); |
| 570 | is_premium = 1; |
| 563 | 571 | } |
| 564 | 572 | |
| 565 | 573 | VIDEO_UPDATE( mbee ) |
| r9309 | r9310 | |
| 772 | 780 | /* set up 8 low intensity colours */ |
| 773 | 781 | for (i = 0; i < 8; i++) |
| 774 | 782 | { |
| 775 | | r = (i & 1) ? 0x80 : 0; |
| 776 | | g = (i & 2) ? 0x80 : 0; |
| 777 | | b = (i & 4) ? 0x80 : 0; |
| 783 | r = (i & 1) ? 0xc0 : 0; |
| 784 | g = (i & 2) ? 0xc0 : 0; |
| 785 | b = (i & 4) ? 0xc0 : 0; |
| 778 | 786 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); |
| 779 | 787 | } |
| 780 | 788 | |
src/mess/drivers/mbee.c
| r9309 | r9310 | |
| 329 | 329 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 330 | 330 | |
| 331 | 331 | PORT_START("LINE7") /* IN7 KEY ROW 7 [380] */ |
| 332 | | PORT_BIT (0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 332 | PORT_BIT (0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 333 | 333 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) |
| 334 | | PORT_BIT (0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 335 | | PORT_BIT (0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 334 | PORT_BIT (0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 335 | PORT_BIT (0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 336 | 336 | PORT_BIT (0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 337 | 337 | PORT_BIT (0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 338 | | PORT_BIT (0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 338 | PORT_BIT (0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 339 | 339 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 340 | 340 | |
| 341 | | PORT_START("EXTRA") /* IN8 extra keys */ |
| 341 | PORT_START("EXTRA") /* IN8 extra keys (non-premium keyboard only) */ |
| 342 | 342 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 343 | 343 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 344 | 344 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| r9309 | r9310 | |
| 613 | 613 | |
| 614 | 614 | /* PAK option roms */ |
| 615 | 615 | ROM_REGION(0x10000, "pakrom", ROMREGION_ERASEFF) |
| 616 | | ROM_LOAD_OPTIONAL("mwbhelp.rom", 0x0000, 0x2000, CRC(d34fae54) SHA1(5ed30636f48e9d208ce2da367ba4425782a5bce3) ) // 0 |
| 616 | ROM_LOAD_OPTIONAL("edasm.rom", 0x0000, 0x2000, CRC(1af1b3a9) SHA1(d035a997c2dbbb3918b3395a3a5a1076aa203ee5) ) // 0 |
| 617 | 617 | ROM_LOAD_OPTIONAL("wbee12.rom", 0x2000, 0x2000, CRC(0fc21cb5) SHA1(33b3995988fc51ddef1568e160dfe699867adbd5) ) // 1 |
| 618 | | ROM_LOAD_OPTIONAL("edasm.rom", 0x4000, 0x2000, CRC(1af1b3a9) SHA1(d035a997c2dbbb3918b3395a3a5a1076aa203ee5) ) |
| 618 | ROM_LOAD_OPTIONAL("mwbhelp.rom", 0x4000, 0x2000, CRC(d34fae54) SHA1(5ed30636f48e9d208ce2da367ba4425782a5bce3) ) // 2 |
| 619 | 619 | |
| 620 | 620 | ROM_REGION(0x2000, "gfx", 0) |
| 621 | 621 | ROM_LOAD("charrom.bin", 0x1000, 0x1000, CRC(1f9fcee4) SHA1(e57ac94e03638075dde68a0a8c834a4f84ba47b0) ) |