Previous 15994 Revisions Next

r5886 Friday 25th September, 2009 at 11:59:51 UTC by Curt Coder
[MIKROMIK] Added keyboard skeleton.
[src/mess/drivers]mikromik.c

src/mess/drivers/mikromik.c
r5885r5886
1717
1818   TODO:
1919
20   - ROM dumps
20   - keyboard
21   - CP/M loading crashes
2122   - ALL RAM CHIPS FAIL shows a screenful of garbage (DMA error?)
22   - pixel display
23   - floppy
24   - keyboard
25   - memory banking
2623   - PCB layout
2724   - NEC µPD7220 (devicify Intel 82720 GDC)
2825   - NEC µPD7201
r5885r5886
9289      break;
9390
9491   case 1: /* RECALL */
95      logerror("RECALL %u\n", d);
92      //logerror("RECALL %u\n", d);
9693      state->recall = d;
9794      break;
9895
r5885r5886
143140/* Input Ports */
144141
145142static INPUT_PORTS_START( mm1 )
143   PORT_START("ROW0")
144   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
145   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
146   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
147   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
148   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
149   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
150   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
151   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
152
153   PORT_START("ROW1")
154   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
155   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
156   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
157   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
158   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
159   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
160   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
161   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
162
163   PORT_START("ROW2")
164   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
165   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
166   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
167   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
168   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
169   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
170   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
171   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
172
173   PORT_START("ROW3")
174   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
175   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
176   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
177   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
178   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
179   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
180   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
181   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
182
183   PORT_START("ROW4")
184   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
185   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
186   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
187   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
188   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
189   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
190   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
191   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
192
193   PORT_START("ROW5")
194   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
195   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
196   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
197   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
198   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
199   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
200   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
201   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
202
203   PORT_START("ROW6")
204   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
205   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
206   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
207   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
208   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
209   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
210   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
211   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
212
213   PORT_START("ROW7")
214   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
215   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
216   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
217   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
218   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
219   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
220   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
221   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
222
223   PORT_START("ROW8")
224   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
225   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
226   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
227   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
228   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
229   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
230   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
231   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
232
233   PORT_START("ROW9")
234   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
235   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
236   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
237   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
238   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
239   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
240   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
241   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
242
243   PORT_START("SPECIAL")
244   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
245   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
246   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Right SHIFT") PORT_CODE(KEYCODE_RSHIFT)
146247INPUT_PORTS_END
147248
148249/* Video */
r5885r5886
265366static DMA8237_MEM_WRITE( memory_dma_w )
266367{
267368   const address_space *program = cputag_get_address_space(device->machine, I8085A_TAG, ADDRESS_SPACE_PROGRAM);
268   logerror("DMA write %04x:%02x\n", offset, data);
369//   logerror("DMA write %04x:%02x\n", offset, data);
269370   memory_write_byte(program, offset, data);
270371}
271372
r5885r5886
294395{
295396   mm1_state *state = device->machine->driver_data;
296397   UINT8 data = nec765_dack_r(state->upd765, 0);
297logerror("FDC DACK read %02x\n", data);
398//logerror("FDC DACK read %02x\n", data);
298399   return data;
299400}
300401
r5885r5886
485586   state_save_register_global(machine, state->rcl);
486587   state_save_register_global(machine, state->recall);
487588}
488#if 0
589
489590static MACHINE_RESET( mm1 )
490591{
491592   const address_space *program = cputag_get_address_space(machine, I8085A_TAG, ADDRESS_SPACE_PROGRAM);
r5885r5886
493594   memory_install_readwrite8_handler(program, 0x0000, 0x0fff, 0, 0, SMH_BANK(1), SMH_UNMAP);
494595   memory_set_bank(machine, 1, 0);
495596}
496#endif
597
497598static FLOPPY_OPTIONS_START( mm1 )
498599   FLOPPY_OPTION( mm1_640kb, "dsk", "Nokia MikroMikko 1 640KB disk image", basicdsk_identify_default, basicdsk_construct_default,
499600      HEADS([2])
r5885r5886
526627   DO_NOT_KEEP_GEOMETRY
527628};
528629
630/* Keyboard */
631
632static TIMER_DEVICE_CALLBACK( kbclk_tick )
633{
634}
635
529636/* Machine Drivers */
637
530638static MACHINE_DRIVER_START( mm1 )
531639   MDRV_DRIVER_DATA(mm1_state)
532640
r5885r5886
536644   MDRV_CPU_CONFIG(mm1_i8085_config)
537645
538646   MDRV_MACHINE_START(mm1)
647   MDRV_MACHINE_RESET(mm1)
539648
649   MDRV_TIMER_ADD_PERIODIC("kbclk", kbclk_tick, HZ(XTAL_6_144MHz/2/8))
650
540651   /* video hardware */
541652   MDRV_SCREEN_ADD( SCREEN_TAG, RASTER )
542653   MDRV_SCREEN_REFRESH_RATE( 50 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team