Previous 199869 Revisions Next

r20337 Saturday 19th January, 2013 at 09:59:36 UTC by Robbbert
(MESS) DGOSZ80 renamed to DG680; various improvements (nw)
[src/mess]mess.lst
[src/mess/drivers]binbug.c

trunk/src/mess/mess.lst
r20336r20337
21962196nectk85
21972197nd80z
21982198binbug
2199dgosz80
2199dg680
trunk/src/mess/drivers/binbug.c
r20336r20337
7474   virtual void video_start();
7575   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7676   optional_device<serial_keyboard_device> m_keyboard;
77   optional_device<cassette_image_device> m_cass;
77   required_device<cassette_image_device> m_cass;
7878   required_shared_ptr<const UINT8> m_p_videoram;
7979   required_shared_ptr<const UINT8> m_p_attribram;
8080};
r20336r20337
337337
338338/*
339339
340DGOS-Z80 (ETI-680)
340DG680 (ETI-680), using the DGOS-Z80 operating system.
341341
342342This is a S100 card.
343343
344ROM is a bad dump, scanned from a pdf. It is being worked on.
344In some ways, this system is the ancestor of the original Microbee.
345345
346ROM is typed in from a PDF, therefore marked a bad dump.
347
346348No schematic available, most of this is guesswork.
347349
350Port 0 is the input from an ascii keyboard.
351
352Port 2 is the cassette interface.
353
354Port 8 controls some kind of memory protection scheme.
355The code indicates that B is the page to protect, and
356A is the code (0x08 = inhibit; 0x0B = unprotect;
3570x0C = enable; 0x0E = protect). There are 256 pages so
358each page is 256 bytes.
359
360To turn the clock on (if it was working), put a non-zero
361into D80D.
362
363Monitor Commands:
364C (compare)*
365E (edit)*
366F (fill)*
367G - Go to address
368I - Inhibit CTC
369M (move)*
370P (clear screen)*
371R (read tape)*
372S (search)*
373T hhmm [ss] - Set the time
374W (write tape)*
375X - protection status
376XC - clear ram
377XD - same as X
378XE - enable facilities
379XF - disable facilities
380XP - protect block
381XU - unprotect block
382Z - go to 0000.
383
384* These commands are identical to the Microbee ones.
385
348386ToDo:
349387- dips
350388- leds
351389- need schematic to find out what else is missing
390- cassette
391- ctc / clock
352392
353393*/
354394
r20336r20337
359399#include "cpu/z80/z80daisy.h"
360400
361401
362class dgosz80_state : public binbug_state
402class dg680_state : public binbug_state
363403{
364404public:
365   dgosz80_state(const machine_config &mconfig, device_type type, const char *tag)
405   dg680_state(const machine_config &mconfig, device_type type, const char *tag)
366406      : binbug_state(mconfig, type, tag),
367407   m_maincpu(*this, "maincpu"),
368408   m_ctc(*this, "z80ctc"),
r20336r20337
370410   { }
371411
372412   DECLARE_READ8_MEMBER(porta_r);
413   DECLARE_READ8_MEMBER(portb_r);
414   DECLARE_WRITE8_MEMBER(portb_w);
415   DECLARE_READ8_MEMBER(port08_r);
416   DECLARE_WRITE8_MEMBER(port08_w);
373417   DECLARE_WRITE8_MEMBER(kbd_put);
418   UINT8 m_pio_b;
374419   UINT8 m_term_data;
420   UINT8 m_protection[0x100];
375421   virtual void machine_reset();
376422   required_device<cpu_device> m_maincpu;
377423   required_device<z80ctc_device> m_ctc;
378424   required_device<z80pio_device> m_pio;
379425};
380426
381static ADDRESS_MAP_START(dgosz80_mem, AS_PROGRAM, 8, dgosz80_state)
427static ADDRESS_MAP_START(dg680_mem, AS_PROGRAM, 8, dg680_state)
382428   ADDRESS_MAP_UNMAP_HIGH
383429   AM_RANGE( 0x0000, 0xcfff) AM_RAM
384430   AM_RANGE( 0xd000, 0xd7ff) AM_ROM
r20336r20337
387433   AM_RANGE( 0xf400, 0xf7ff) AM_RAM AM_SHARE("attribram")
388434ADDRESS_MAP_END
389435
390static ADDRESS_MAP_START(dgosz80_io, AS_IO, 8, dgosz80_state)
436static ADDRESS_MAP_START(dg680_io, AS_IO, 8, dg680_state)
391437   ADDRESS_MAP_UNMAP_HIGH
392438   ADDRESS_MAP_GLOBAL_MASK(0xff)
393439   AM_RANGE(0x00,0x03) AM_DEVREADWRITE("z80pio", z80pio_device, read_alt, write_alt)
394440   AM_RANGE(0x04,0x07) AM_DEVREADWRITE("z80ctc", z80ctc_device, read, write)
395   //AM_RANGE(0x08,0x08) SWP Control and Status
441   AM_RANGE(0x08,0x08) AM_READWRITE(port08_r,port08_w) //SWP Control and Status
396442   //AM_RANGE(0x09,0x09) parallel input port
397443   // Optional AM9519 Programmable Interrupt Controller (port c = data, port d = control)
398444   //AM_RANGE(0x0c,0x0d) AM_DEVREADWRITE("am9519", am9519_device, read, write)
399445ADDRESS_MAP_END
400446
401void dgosz80_state::machine_reset()
447void dg680_state::machine_reset()
402448{
403449   m_maincpu->set_pc(0xd000);
404450}
405451
406452// this is a guess there is no information available
407static const z80_daisy_config dgosz80_daisy_chain[] =
453static const z80_daisy_config dg680_daisy_chain[] =
408454{
409455   { "z80ctc" },
410456   { "z80pio" },
r20336r20337
413459
414460
415461/* Input ports */
416static INPUT_PORTS_START( dgosz80 )
462static INPUT_PORTS_START( dg680 )
417463INPUT_PORTS_END
418464
419WRITE8_MEMBER( dgosz80_state::kbd_put )
465WRITE8_MEMBER( dg680_state::kbd_put )
420466{
421467   m_term_data = data;
422468   /* strobe in keyboard data */
r20336r20337
424470   m_pio->strobe_a(1);
425471}
426472
427static ASCII_KEYBOARD_INTERFACE( dgosz80_keyboard_intf )
473static ASCII_KEYBOARD_INTERFACE( dg680_keyboard_intf )
428474{
429   DEVCB_DRIVER_MEMBER(dgosz80_state, kbd_put)
475   DEVCB_DRIVER_MEMBER(dg680_state, kbd_put)
430476};
431477
432READ8_MEMBER( dgosz80_state::porta_r )
478READ8_MEMBER( dg680_state::porta_r )
433479{
434480   UINT8 data = m_term_data;
435481   m_term_data = 0;
436482   return data;
437483}
438484
485READ8_MEMBER( dg680_state::portb_r )
486{
487   return m_pio_b | (m_cass->input() > 0.03);
488}
489
490// bit 1 = cassout; bit 2 = motor on
491WRITE8_MEMBER( dg680_state::portb_w )
492{
493   m_pio_b = data & 0xfe;
494   m_cass->output(BIT(data, 1) ? -1.0 : +1.0);
495}
496
497READ8_MEMBER( dg680_state::port08_r )
498{
499   UINT8 breg = m_maincpu->state_int(Z80_B);
500   return m_protection[breg];
501}
502
503WRITE8_MEMBER( dg680_state::port08_w )
504{
505   UINT8 breg = m_maincpu->state_int(Z80_B);
506   m_protection[breg] = data;
507}
508
439509static Z80PIO_INTERFACE( z80pio_intf )
440510{
441511   DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0), //IRQ
442   DEVCB_DRIVER_MEMBER(dgosz80_state, porta_r),  // in port A
512   DEVCB_DRIVER_MEMBER(dg680_state, porta_r),  // in port A
443513   DEVCB_NULL,  // out port A
444514   DEVCB_NULL, // ready line port A - this activates to ask for kbd data but not known if actually used
445   DEVCB_NULL, // in port B
446   DEVCB_NULL,                 // out port B
515   DEVCB_DRIVER_MEMBER(dg680_state, portb_r), // in port B
516   DEVCB_DRIVER_MEMBER(dg680_state, portb_w),                 // out port B
447517   DEVCB_NULL
448518};
449519
r20336r20337
455525   DEVCB_DEVICE_LINE_MEMBER("z80ctc", z80ctc_device, trg3)     // ZC/TO2 callback
456526};
457527
458static MACHINE_CONFIG_START( dgosz80, dgosz80_state )
528static MACHINE_CONFIG_START( dg680, dg680_state )
459529   /* basic machine hardware */
460530   MCFG_CPU_ADD("maincpu",Z80, XTAL_8MHz / 4)
461   MCFG_CPU_PROGRAM_MAP(dgosz80_mem)
462   MCFG_CPU_IO_MAP(dgosz80_io)
463   MCFG_CPU_CONFIG(dgosz80_daisy_chain)
531   MCFG_CPU_PROGRAM_MAP(dg680_mem)
532   MCFG_CPU_IO_MAP(dg680_io)
533   MCFG_CPU_CONFIG(dg680_daisy_chain)
464534
465535   /* video hardware */
466536   MCFG_SCREEN_ADD("screen", RASTER)
r20336r20337
474544   MCFG_PALETTE_INIT(monochrome_amber)
475545
476546   /* Keyboard */
477   MCFG_ASCII_KEYBOARD_ADD("keyb", dgosz80_keyboard_intf)
547   MCFG_ASCII_KEYBOARD_ADD("keyb", dg680_keyboard_intf)
478548
549   /* Cassette */
550   MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface )
551   MCFG_SPEAKER_STANDARD_MONO("mono")
552   MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG)
553   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
554
479555   /* Devices */
480556   MCFG_Z80CTC_ADD( "z80ctc", XTAL_8MHz / 4, z80ctc_intf )
481557   MCFG_Z80PIO_ADD( "z80pio", XTAL_8MHz / 4, z80pio_intf )
r20336r20337
483559
484560
485561/* ROM definition */
486ROM_START( dgosz80 )
562ROM_START( dg680 )
487563   ROM_REGION( 0x10000, "maincpu", 0 )
488   ROM_LOAD( "dgosz80.rom", 0xd000, 0x0800, NO_DUMP)
564   ROM_LOAD( "dg680.rom", 0xd000, 0x0800, CRC(c1aaef6a) SHA1(1508ca8315452edfb984718e795ccbe79a0c0b58) )
489565
490566   ROM_REGION( 0x0800, "chargen", 0 )
491567   ROM_LOAD( "6574.bin", 0x0000, 0x0800, CRC(fd75df4f) SHA1(4d09aae2f933478532b7d3d1a2dee7123d9828ca) )
r20336r20337
496572
497573/* Driver */
498574
499/*    YEAR  NAME     PARENT  COMPAT   MACHINE    INPUT    CLASS         INIT    COMPANY            FULLNAME       FLAGS */
500COMP( 1980, dgosz80, 0,      0,       dgosz80,   dgosz80, driver_device, 0,  "David Griffiths", "DGOS-Z80 1.4", GAME_NOT_WORKING | GAME_NO_SOUND_HW )
575/*    YEAR  NAME   PARENT  COMPAT   MACHINE  INPUT    CLASS       INIT    COMPANY            FULLNAME       FLAGS */
576COMP( 1980, dg680, 0,      0,       dg680,   dg680, driver_device, 0,  "David Griffiths", "DGOS-Z80 1.4", GAME_NOT_WORKING | GAME_NO_SOUND_HW )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team