Previous 199869 Revisions Next

r26533 Sunday 8th December, 2013 at 06:49:59 UTC by R. Belmont
(MESS) Checkpoint (nw)
[src/mess/drivers]itt3030.c

trunk/src/mess/drivers/itt3030.c
r26532r26533
208208   itt3030_state(const machine_config &mconfig, device_type type, const char *tag)
209209      : driver_device(mconfig, type, tag)
210210      , m_maincpu(*this, "maincpu")
211      , m_kbdmcu(*this, "kbdmcu")
211212      , m_ram(*this, "mainram")
212213      , m_crtc(*this, "crt5027")
213214      , m_48kbank(*this, "lowerbank")
r26532r26533
220221
221222   // devices
222223   required_device<cpu_device> m_maincpu;
224   required_device<i8041_device> m_kbdmcu;
223225   required_device<ram_device> m_ram;
224226   required_device<crt5027_device> m_crtc;
225227   required_device<address_map_bank_device> m_48kbank;
r26532r26533
250252   DECLARE_WRITE8_MEMBER(bankl_w);
251253   DECLARE_READ8_MEMBER(bankh_r);
252254   DECLARE_WRITE8_MEMBER(bankh_w);
255   DECLARE_READ8_MEMBER(kbd_fifo_r);
256   DECLARE_READ8_MEMBER(kbd_matrix_r);
257   DECLARE_WRITE8_MEMBER(kbd_matrix_w);
253258   DECLARE_FLOPPY_FORMATS(itt3030_floppy_formats);
254259private:
255260   UINT8 m_unk;
256261   UINT8 m_bank;
262   UINT8 m_kbdrow, m_kbdcol, m_kbdclk;
257263   floppy_image_device *m_floppy;
258264};
259265
r26532r26533
357363   AM_RANGE(0x31, 0x31) AM_READ(unk2_r)
358364   AM_RANGE(0x32, 0x32) AM_WRITE(beep_w)
359365   AM_RANGE(0x35, 0x35) AM_READ(vsync_r)
366   AM_RANGE(0x40, 0x40) AM_READ(kbd_fifo_r)
360367   AM_RANGE(0x50, 0x55) AM_DEVREADWRITE("fdc", fd1791_t, read, write)
361368   AM_RANGE(0xf6, 0xf6) AM_WRITE(bank_w)
362369ADDRESS_MAP_END
363370
371READ8_MEMBER(itt3030_state::kbd_fifo_r)
372{
373   return m_kbdmcu->upi41_master_r(space, 0);   // offset 0 is data, 1 is status
374}
375
376READ8_MEMBER(itt3030_state::kbd_matrix_r)
377{
378   return 0;
379}
380
381WRITE8_MEMBER(itt3030_state::kbd_matrix_w)
382{
383   m_kbdrow = data & 0xf;
384   m_kbdcol = (data >> 4) & 0x7;
385   m_kbdclk = (data & 0x80) ? 1 : 0;
386}
387
388// Schematics say:
389// Port 1 goes to the keyboard matrix. 
390// bits 0-3 select matrix rows, bits 4-6 choose column to read, bit 7 clocks the process (rising edge strobes the row, falling edge reads the data)
391// T0 is the key matrix return
392// Port 2 bit 2 is IRQ (in or out?)
393static ADDRESS_MAP_START( kbdmcu_io, AS_IO, 8, itt3030_state )
394   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(kbd_matrix_r)
395   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(kbd_matrix_w)
396ADDRESS_MAP_END
397
364398static INPUT_PORTS_START( itt3030 )
365399INPUT_PORTS_END
366400
r26532r26533
414448   MCFG_CPU_PROGRAM_MAP(itt3030_map)
415449   MCFG_CPU_IO_MAP(itt3030_io)
416450
451   MCFG_CPU_ADD("kbdmcu", I8041, XTAL_6MHz)
452   MCFG_CPU_IO_MAP(kbdmcu_io)
453
417454   /* video hardware */
418455   MCFG_SCREEN_ADD("screen", RASTER)
419456   MCFG_SCREEN_REFRESH_RATE(60)
r26532r26533
463500   ROM_LOAD( "bootv1.2.bin", 0x0000, 0x0800, CRC(90279d45) SHA1(a39a3f31f4f98980b1ef50805870837fbf72261d))
464501   ROM_REGION( 0x0800, "gfx1", ROMREGION_ERASE00 )
465502   ROM_LOAD( "gb136-0.bin", 0x0000, 0x0800, CRC(6a3895a8) SHA1(f3b977ffa2f54c346521c9ef034830de8f404621))
466   ROM_REGION( 0x0400, "gfxcpu", ROMREGION_ERASE00 )
503   ROM_REGION( 0x0400, "kbdmcu", ROMREGION_ERASE00 )
467504   ROM_LOAD( "8741ad.bin", 0x0000, 0x0400, CRC(cabf4394) SHA1(e5d1416b568efa32b578ca295a29b7b5d20c0def))
468505ROM_END
469506
470507GAME( 1982, itt3030,  0,   itt3030,  itt3030,  driver_device, 0,      ROT0, "ITT RFA",      "ITT3030", GAME_NOT_WORKING | GAME_NO_SOUND )
508

Previous 199869 Revisions Next


© 1997-2024 The MAME Team