Previous 15994 Revisions Next

r4939 Thursday 4th June, 2009 at 16:39:22 UTC by Curt Coder
[PROF80] Added centronics bits.
[src/mess/drivers]prof80.c
[src/mess/includes]prof80.h

src/mess/includes/prof80.h
r4938r4939
2323   /* video state */
2424   UINT8 *video_ram;      /* video RAM */
2525   int vsync;            /* vertical sync */
26   int lps;            /* light pen sense */
2627
2728   /* clock state */
2829   int rtc_data;         /* RTC data output */
r4938r4939
3435   const device_config *nec765;
3536   const device_config *upd1990a;
3637   const device_config *mc6845;
38   const device_config *centronics;
3739};
3840
3941#endif
src/mess/drivers/prof80.c
r4938r4939
44   GRIP-1/2/3 (Grafik-Interface-Prozessor)
55
66   http://www.prof80.de/
7   http://oldcomputers.dyndns.org/public/pub/rechner/conitec/info.html
78
89*/
910
r4938r4939
1112
1213   TODO:
1314
15   - Z80 STI
1416   - everything
1517
1618*/
r4938r4939
2527#include "machine/upd1990a.h"
2628#include "machine/ctronics.h"
2729
28/* Read/Write Handlers */
30/* PROF-80 */
2931
3032static void prof80_bankswitch(running_machine *machine)
3133{
r4938r4939
245247   prof80_bankswitch(space->machine);
246248}
247249
250/* GRIP */
251
248252static WRITE8_HANDLER( page_w )
249253{
250254   memory_set_bank(space->machine, 17, BIT(data, 7));
251255}
252256
257static READ8_HANDLER( grip_status_r )
258{
259   /*
260
261      bit      signal      description
262
263      0      LPA0
264      1      LPA1
265      2      LPA2
266      3      SENSE
267      4      JS0
268      5      JS1
269      6      _ERROR
270      7      LPS
271
272   */
273
274   prof80_state *state = space->machine->driver_data;
275
276   return (state->lps << 7) | (centronics_fault_r(state->centronics) << 6);
277}
278
279static READ8_HANDLER( lrs_r )
280{
281   prof80_state *state = space->machine->driver_data;
282
283   state->lps = 0;
284
285   return 0;
286}
287
288static WRITE8_HANDLER( lrs_w )
289{
290   prof80_state *state = space->machine->driver_data;
291
292   state->lps = 0;
293}
294
295static READ8_HANDLER( stb_r )
296{
297   prof80_state *state = space->machine->driver_data;
298
299   centronics_strobe_w(state->centronics, 0);
300   centronics_strobe_w(state->centronics, 1);
301
302   return 0;
303}
304
305static WRITE8_HANDLER( stb_w )
306{
307   prof80_state *state = space->machine->driver_data;
308
309   centronics_strobe_w(state->centronics, 0);
310   centronics_strobe_w(state->centronics, 1);
311}
312
253313/* Memory Maps */
254314
255315static ADDRESS_MAP_START( prof80_mem, ADDRESS_SPACE_PROGRAM, 8 )
r4938r4939
287347ADDRESS_MAP_END
288348
289349static ADDRESS_MAP_START( grip_io, ADDRESS_SPACE_IO, 8 )
290//   AM_RANGE(0x00, 0x00) AM_READWRITE(stb_r, stb_w)
350   AM_RANGE(0x00, 0x00) AM_READWRITE(stb_r, stb_w)
291351//   AM_RANGE(0x10, 0x10) AM_WRITE(cc3_w)
292352//   AM_RANGE(0x11, 0x11) AM_WRITE(vol0_w)
293353//   AM_RANGE(0x12, 0x12) AM_WRITE(rts_w)
r4938r4939
297357//   AM_RANGE(0x16, 0x16) AM_WRITE(flash_w)
298358//   AM_RANGE(0x17, 0x17) AM_WRITE(vol1_w)
299359//   AM_RANGE(0x20, 0x2f) AM_DEVREADWRITE(Z80STI_TAG, z80sti_r, z80sti_w)
300//   AM_RANGE(0x30, 0x30) AM_READWRITE(lrs_r, lrs_w)
301//   AM_RANGE(0x40, 0x40) AM_READ(status_r)
360   AM_RANGE(0x30, 0x30) AM_READWRITE(lrs_r, lrs_w)
361   AM_RANGE(0x40, 0x40) AM_READ(grip_status_r)
302362   AM_RANGE(0x50, 0x50) AM_DEVWRITE(MC6845_TAG, mc6845_address_w)
303363   AM_RANGE(0x52, 0x52) AM_DEVWRITE(MC6845_TAG, mc6845_register_w)
304364   AM_RANGE(0x53, 0x53) AM_DEVREAD(MC6845_TAG, mc6845_register_r)
r4938r4939
404464   state->nec765 = devtag_get_device(machine, NEC765_TAG);
405465   state->upd1990a = devtag_get_device(machine, UPD1990A_TAG);
406466   state->mc6845 = devtag_get_device(machine, MC6845_TAG);
467   state->centronics = devtag_get_device(machine, "centronics");
407468
408469   /* initialize RTC */
409470   upd1990a_cs_w(state->upd1990a, 1);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team