Menu

#208 MB-02+ disk interface emulation

open
nobody
None
5
2016-03-16
2009-09-14
No

Feature req: MB-02+ emulation - ID: 2832531

Here is a very first patch. It does nothing but page in the boot ROM (nice animation :)

I think, first i try to implement the emulation without RTC/PIO(LPT interface) and with a very minimal Z80 DMA.

Related

Feature Requests: #60

Discussion

  • Gergely Szasz

    Gergely Szasz - 2009-09-14
     
  • Stuart Brady

    Stuart Brady - 2015-05-05

    Thanks, Gergely. Worth a refresh once we get the WD2797 changes in.

    Is the Z80DMA something that it is sensible to fake, or do we really need to emulate a second Z80 for this to be good?

     
    • Gergely Szasz

      Gergely Szasz - 2015-05-06

      No. Z80DMA is Zilog's Z8410 or Z84C10 DMA controller (http://www.zilog.com/docs/z80/ps0179.pdf). This chip is member of the Z80 family (CPU, DMA, PIO, CTC, SIO). All this circuits designed for easy interfaced each others (and of course with Z80CPU). So, all fit with the Z80 system bus, care about /M1, or Z80's interrupt vectors or even recognise RETI without any additional circuit.

      This is very nice, but in the golden ages a Z80CPU was cheaper than e.g. a Z80PIO (at least in Hungary)...

      So, in MB-02+ the DMA chip does the WD2797 => Memory data transfer. FDC's DATARQ PIN connected to DMA RDY PIN, so every byte assembled by WD2797 transfered in Byte-at-Once mode from FDC to memory (and IMHO RAM=>FDC when write disk;)... The DMA native speed (Continous mode, without any interrupt) is 2MByte/sec at 4MHz. So, with DMA chip, we can do a lot of interesting multi color/border trick, because DMA can do RAM=>RAM transfer too. (see: http://velesoft.speccy.cz/data-gear.htm)

      So, we need to emulate the Z8410 (Z80DMA) chip for MB-02+ ;-)

       
  • Gergely Szasz

    Gergely Szasz - 2015-05-06

    No, not a second Z80 CPU.

    Z80DMA is a DMA controller IC from Zilog's Z80 family (Z80CPU, Z80CTC, Z80DMA, Z80PIO, Z80SIO). All this ICs designed to easily interface with each others, so can be connected to Z80CPU's system bus without any external circuit. Take care about /BUSRQ /BUSACK, /M1, Z80CPU's interrupt vectors and recognise RETI. This controllers can be daisychained, so we can use a lot of PIO or SIO or even a DMA controller for every peripheral...

    This is a nice idea, only one problem was: at the golden ages a Z80PIO cost more than a Z80CPU (at least in Hungary). (oh on ebay we can buy a Zilog Z80 about 3$ and a PIO about 5$ ;-)

    Z80DMA (Z8410 or Z84C10) is a DMA controller, can be transfer data port -> memory, memory -> port, port->port and memory->memory. The ideal transfer rate is 2MByte/sec at 4MHz (continous mode, without any interrupt).

    On MB-02+, DMA chip transfer the data RAM from/to WD2797 (Z80DMA's RDY pin connected to WD2797 DATARQ) in Byte-At-Once mode.

    Because Z80DMA can transfer RAM->RAM, we can use it for do special multicolor or border effects (DMA DEMOs)

    So, we need Z80DMA emulation for MB-02+.

     
  • Gergely Szasz

    Gergely Szasz - 2016-03-16

    Here is an updated patch:

    Now a lot of things work... e.g:
    RTC
    DMA (FDC->MEM; MEM->FDC, MEM->MEM)
    booting
    CAT, LOAD, SAVE, .format, etc...

    But there are some .... hmm..

    I have 3 boot disk two 'old' (boot-8bc.mbd and boot-z00m.mbd) and one fresh one (downloaded from a GoogleDrive link from http://www.oldcomp.cz/viewtopic.php?f=39&t=3239 -> https://drive.google.com/file/d/0B5txu3eKfcfYZ19mQkozb2ttV1U/view?pref=2&pli=1) I have no idea where other two come from...
    The first one and the third is work, but 'z00m' not...
    I test some things from https://drive.google.com/folderview?id=0B5txu3eKfcfYbWQtSHdOTXNUdlk&usp=drive_web&tid=0B5txu3eKfcfYVmNWN2VwMk1CQjg .
    Some software work:
    * 0060-LMN DEMO DISK 10.mbd
    * 0080-LMN GAMES A0.mbd
    * DiskOperationManager_for_Desktop_v1.2_(Gama-128).mbd
    * dma-demo-level_2.tap (DMA mem->mem usage) from http://velesoft.speccy.cz/data-gear/dma-demos/dma-demo-level_2.zip

    But MBCommander starting up and say no disk ind drive...

     

    Last edit: Gergely Szasz 2016-03-20
    • Sergio Baldoví

      Sergio Baldoví - 2016-03-19

      Is this patch empty / 0 bytes in size?

       
      • Gergely Szasz

        Gergely Szasz - 2016-03-20

        i fixed the attachments...

         
        • Sergio Baldoví

          Sergio Baldoví - 2016-03-20

          Thanks. I'm not familiar with MB02+, but I have found some minor bugs...

          1. There is a segmentation fault when mb02-boot.rom is missing.

          2. I get an error when inserting a disk on GTK+ UI. Some definitions in menu_data.c should change from:

          Media/Disk/MB02+/Drive A:/_Save...
          

          to:

          Media/Disk/MB02+/Drive A:/_Save
          

          thereby matching definitions in ui.c.

           

Log in to post a comment.