Previous 15994 Revisions Next

r5513 Friday 28th August, 2009 at 16:10:29 UTC by Angelo Salese
[X1]: Small fixes
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r5512r5513
322322{
323323   UINT8 *ROM = memory_region(space->machine, "maincpu");
324324
325   if(data)
326      memory_set_bankptr(space->machine, 1, &ROM[0x00000]);
325   memory_set_bankptr(space->machine, 1, &ROM[0x00000]);
327326}
328327
329328static WRITE8_HANDLER( rom_data_w )
r5512r5513
493492{
494493   io_bank_mode = 0; //any read disables the extended mode.
495494
496   if     (offset >= 0x0704 && offset <= 0x0707)   { return z80ctc_r(devtag_get_device(space->machine, "ctc"), offset-0x0704); }
495   if(offset >= 0x0704 && offset <= 0x0707)   { return z80ctc_r(devtag_get_device(space->machine, "ctc"), offset-0x0704); }
497496   else if(offset == 0x0e03)                       { return x1_rom_r(space, 0); }
498497   else if(offset >= 0x0ff8 && offset <= 0x0fff)   { return x1_fdc_r(space, offset-0xff8); }
499498   else if(offset >= 0x1900 && offset <= 0x19ff)   { return sub_io_r(space, 0); }
r5512r5513
508507   else if(offset >= 0x4000 && offset <= 0xffff)   { return gfx_bitmap_ram[offset-0x4000]; }
509508   else
510509   {
511      //...
510      logerror("(PC=%06x) Read i/o address %04x\n",cpu_get_pc(space->cpu),offset);
512511   }
513512   return 0xff;
514513}
515514
516515static WRITE8_HANDLER( x1_ex_gfxram_w )
517516{
518   if(data)
519      fatalerror("Extended GFX RAM write %02x %04x",data,offset);
517//   if(data)
518//      fatalerror("Extended GFX RAM write %02x %04x",data,offset);
520519}
521520
522521static WRITE8_HANDLER( x1_io_w )
r5512r5513
550549   else if(offset >= 0x4000 && offset <= 0xffff)   { gfx_bitmap_ram[offset-0x4000] = data; }
551550   else
552551   {
553      //...
552      logerror("(PC=%06x) Write %02x at i/o address %04x\n",cpu_get_pc(space->cpu),data,offset);
554553   }
555554}
556555
r5512r5513
836835   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
837836   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
838837
839   /* TODO: check if the other inputs are actually used (including button 2)... */
840838   PORT_START("P1")
841839   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
842840   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
843841   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
844842   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
845   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
843   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
846844   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
847   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
845   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
848846   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
849847
850848   PORT_START("P2")
r5512r5513
852850   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
853851   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
854852   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
855   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
853   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
856854   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
857   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
855   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
858856   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
859857
860858   PORT_START("key1") //0x00-0x1f

Previous 15994 Revisions Next


© 1998-2018 The MESS Team