Previous 15994 Revisions Next

r11273 Friday 22nd April, 2011 at 05:29:44 UTC by Robbbert
[LCMATE2] Added what we assume is the spellcheck library ROM. Reverted keyscan routine back, to handle port 5000 case.
[src/mess/drivers]lcmate2.c

src/mess/drivers/lcmate2.c
r11272r11273
2424        - All RAM needs to be battery-backed up.
2525        - Reset/On button to be added
2626        - The ROM has INT and NMI code; investigate if something uses it.
27        - Possible rom banking
27        - Add rom banking of the spelling-check library.
2828
2929
3030****************************************************************************/
r11272r11273
5656
5757   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
5858
59   DECLARE_READ8_MEMBER( key_r );
5960   DECLARE_WRITE8_MEMBER( speaker_w );
6061};
6162
r11272r11273
6465   speaker_level_w(m_speaker, BIT(data, 6));
6566}
6667
68// offsets are FE,FD,FB,F7,EF,DF,BF,7F to scan a particular row, or 00 to check if any key pressed
69READ8_MEMBER( lcmate2_state::key_r )
70{
71   UINT8 i,data = 0xff;
72   char kbdrow[8];
73
74   for (i=0; i<8; i++)
75   {
76      if (BIT(offset, i)==0)
77      {
78         sprintf(kbdrow,"LINE%d", i);
79         data &= input_port_read(machine(), kbdrow);
80      }
81   }
82
83   return data;
84}
85
86
6787static ADDRESS_MAP_START(lcmate2_mem, AS_PROGRAM, 8, lcmate2_state)
6888   ADDRESS_MAP_UNMAP_HIGH
6989   AM_RANGE( 0x0000, 0x7fff ) AM_ROM
r11272r11273
7999   AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("hd44780", hd44780_device, data_write)
80100   AM_RANGE(0x3002, 0x3002) AM_DEVREAD("hd44780", hd44780_device, control_read)
81101   AM_RANGE(0x3003, 0x3003) AM_DEVREAD("hd44780", hd44780_device, data_read)
82   AM_RANGE(0x50fe, 0x50fe) AM_READ_PORT("LINE0")
83   AM_RANGE(0x50fd, 0x50fd) AM_READ_PORT("LINE1")
84   AM_RANGE(0x50fb, 0x50fb) AM_READ_PORT("LINE2")
85   AM_RANGE(0x50f7, 0x50f7) AM_READ_PORT("LINE3")
86   AM_RANGE(0x50ef, 0x50ef) AM_READ_PORT("LINE4")
87   AM_RANGE(0x50df, 0x50df) AM_READ_PORT("LINE5")
88   AM_RANGE(0x50bf, 0x50bf) AM_READ_PORT("LINE6")
89   AM_RANGE(0x507f, 0x507f) AM_READ_PORT("LINE7")
102
103   AM_RANGE(0x5000, 0x50ff) AM_READ(key_r)
90104ADDRESS_MAP_END
91105
92106/* Input ports */
r11272r11273
242256
243257/* ROM definition */
244258ROM_START( lcmate2 )
245   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
246   ROM_LOAD( "u2.bin",  0x0000, 0x8000, CRC(521931b9) SHA1(743a6e2928c4365fbf5ed9a173e2c1bfe695850f) )
259   ROM_REGION( 0x30000, "maincpu", ROMREGION_ERASEFF )
260   ROM_LOAD( "u2.bin",  0x00000, 0x08000, CRC(521931b9) SHA1(743a6e2928c4365fbf5ed9a173e2c1bfe695850f) )
261   ROM_LOAD( "u3.bin",  0x10000, 0x20000, CRC(84fe767a) SHA1(8dd306f203e1220f0eab1a284be3095e2642c5b6) ) // spell library
247262
248263   ROM_REGION( 0x0860, "hd44780", ROMREGION_ERASE )
249264   ROM_LOAD( "44780a00.bin",    0x0000, 0x0860,  BAD_DUMP CRC(3a89024c) SHA1(5a87b68422a916d1b37b5be1f7ad0b3fb3af5a8d))

Previous 15994 Revisions Next


© 1998-2018 The MESS Team