Previous 15994 Revisions Next

r9310 Sunday 3rd October, 2010 at 12:53:00 UTC by Robbbert
[MBEE] Premium - added cursor keys. mbeepc - arranged pak roms so that when you type edasm that's what you get.
[src/mess/drivers]mbee.c
[src/mess/video]mbee.c

src/mess/video/mbee.c
r9309r9310
7272static UINT8 mbee_0a;
7373static UINT8 mbee_0b;
7474static UINT8 mbee_1c;
75static UINT8 is_premium;
7576static UINT8 mc6845_cursor[16];            // cursor shape
7677static void mc6845_cursor_configure(void);
7778static void mc6845_screen_configure(running_machine *machine);
r9309r9310
224225/* The direction keys are used by the pc85 menu. Do not know what uses the "insert" key. */
225226static void keyboard_matrix_r(running_machine *machine, int offs)
226227{
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;
231231
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");
233235
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      }
238265   }
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   }
259266
260267   if( data )
261268   {
262      crt.lpen_lo = offs & 0xff;
263      crt.lpen_hi = (offs >> 8) & 0x03;
269      crt.lpen_lo = offs;
270      crt.lpen_hi = offs >> 8;
264271      crt.lpen_strobe = 1;
265272   }
266273}
r9309r9310
268275
269276static void mbee_video_kbd_scan( running_machine *machine, int param )
270277{
271   if ((mbee_0b) || (param & 0x8))
272      return;
278   if (mbee_0b) return;
273279
274
275280   keyboard_matrix_r(machine, param);
276281}
277282
r9309r9310
545550{
546551   videoram = memory_region(machine, "videoram");
547552   gfxram = memory_region(machine, "gfx")+0x1000;
553   is_premium = 0;
548554}
549555
550556VIDEO_START( mbeeic )
r9309r9310
552558   videoram = memory_region(machine, "videoram");
553559   colorram = memory_region(machine, "colorram");
554560   gfxram = memory_region(machine, "gfx")+0x1000;
561   is_premium = 0;
555562}
556563
557564VIDEO_START( mbeeppc )
r9309r9310
560567   colorram = memory_region(machine, "colorram");
561568   gfxram = memory_region(machine, "gfx")+0x1000;
562569   attribram = memory_region(machine, "attrib");
570   is_premium = 1;
563571}
564572
565573VIDEO_UPDATE( mbee )
r9309r9310
772780   /* set up 8 low intensity colours */
773781   for (i = 0; i < 8; i++)
774782   {
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;
778786      palette_set_color(machine, i, MAKE_RGB(r, g, b));
779787   }
780788
src/mess/drivers/mbee.c
r9309r9310
329329   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
330330
331331   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))
333333   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))
336336   PORT_BIT (0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
337337   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))
339339   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
340340
341   PORT_START("EXTRA") /* IN8 extra keys */
341   PORT_START("EXTRA") /* IN8 extra keys (non-premium keyboard only) */
342342   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
343343   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
344344   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
r9309r9310
613613
614614   /* PAK option roms */
615615   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
617617   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
619619
620620   ROM_REGION(0x2000, "gfx", 0)
621621   ROM_LOAD("charrom.bin",           0x1000,  0x1000, CRC(1f9fcee4) SHA1(e57ac94e03638075dde68a0a8c834a4f84ba47b0) )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team