Previous 15994 Revisions Next

r8942 Sunday 29th August, 2010 at 21:19:52 UTC by Angelo Salese
[MZ-2500]: Fixed for good z80pio interface
[src/mess/drivers]mz2500.c

src/mess/drivers/mz2500.c
r8941r8942
88   - floppy device;
99   - graphics are really a bare minimum, this system is very complex;
1010   - keyboard inputs (needs something that actually works);
11   - There's a z80pio bug that reads control word where it should be data
12     word and viceversa, mostly noticeable in wrong setting of x tile graphics
13     in Basic and the Mahjong game.
1411
1512    memory map:
1613    0x00000-0x3ffff Work RAM
r8941r8942
604601      case 0: text_reg_index = data; break;
605602      case 1:
606603         text_reg[text_reg_index] = data;
607         printf("[%02x] %02x\n",text_reg_index,data);
604         //printf("[%02x] %02x\n",text_reg_index,data);
608605
609606         if(text_reg_index == 0x0a) // set 256 color palette
610607         {
r8941r8942
948945   joy_mode = data;
949946}
950947
948
951949static ADDRESS_MAP_START(mz2500_io, ADDRESS_SPACE_IO, 8)
952950   ADDRESS_MAP_GLOBAL_MASK(0xff)
953951//  AM_RANGE(0x60, 0x63) AM_WRITE(w3100a_w)
r8941r8942
977975   AM_RANGE(0xdc, 0xdd) AM_WRITE(mz2500_fdc_w)
978976   AM_RANGE(0xe0, 0xe3) AM_DEVREADWRITE("i8255_0", i8255a_r, i8255a_w)
979977    AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE("pit", pit8253_r, pit8253_w)
980   AM_RANGE(0xe8, 0xe9) AM_DEVREADWRITE("z80pio_1", z80pio_c_r, z80pio_c_w)
981   AM_RANGE(0xea, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_d_r, z80pio_d_w)
978//   AM_RANGE(0xe8, 0xe9) AM_DEVREADWRITE("z80pio_1", z80pio_c_r, z80pio_c_w)
979//   AM_RANGE(0xea, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_d_r, z80pio_d_w)
980   AM_RANGE(0xe8, 0xeb) AM_DEVREADWRITE("z80pio_1", z80pio_ba_cd_r, z80pio_ba_cd_w)
982981   AM_RANGE(0xef, 0xef) AM_READWRITE(mz2500_joystick_r,mz2500_joystick_w)
983982    AM_RANGE(0xf0, 0xf3) AM_WRITE(timer_w)
984983   AM_RANGE(0xf4, 0xf7) AM_READ(mz2500_crtc_hvblank_r) AM_WRITE(mz2500_tv_crtc_w)
r8941r8942
13791378   return input_port_read(device->machine, keynames[key_mux & 0xf]);
13801379}
13811380
1381#if 0
13821382static READ8_DEVICE_HANDLER( mz2500_pio1_portb_r )
13831383{
13841384   return pio_latchb;
13851385}
1386#endif
13861387
13871388static Z80PIO_INTERFACE( mz2500_pio1_intf )
13881389{
r8941r8942
13901391   DEVCB_HANDLER( mz2500_pio1_porta_r ),
13911392   DEVCB_HANDLER( mz2500_pio1_porta_w ),
13921393   DEVCB_NULL,
1393   DEVCB_HANDLER( mz2500_pio1_portb_r ),
1394   DEVCB_HANDLER( mz2500_pio1_porta_r ),
13941395   DEVCB_NULL,
13951396   DEVCB_NULL
13961397};

Previous 15994 Revisions Next


© 1998-2018 The MESS Team