[MAME]

7 e Mezzo

Hardware:

CPU
1x R6502P
1x MC6845P
1x oscillator 10.000MHz

ROMs
1x AM27128 (NS3.1)
2x SEEQ DQ2764 (1, 2)
1x SGS M2764 (NS1)
1x PAL16R4A

1x 4 dipswitches
1x 30x2 connector
1x 10 legs connector
1x trimmer (volume)


    PCB Layout:
     _________________________________________________________________
    |                                                                 |
    |                                                                 |
    |                                    _________   _________        |
    |                                   | 74LS08N | | 74LS32  |       |
    |                                   |_________| |_________|       |
    |                                    _________   _________        |
    |                                   | 74LS138 | | 74HC00  |       |
    |                                   |_________| |_________|       |
    |    ______________                     __________________        |
    |   |              |                   |                  |   ____|
    |   | MK48Z02B-20  |                   |     R6502P       |  |
    |   |______________|                   |__________________|  |
    |  ________________   _________         __________________   |
    | |                | | 74LS157 |       |                  |  |____
    | |    AM27128     | |_________|       |     MC6845P      |   ____|
    | |________________|  _________        |__________________|   ____|
    |                    | 74LS157 |      ________   _________    ____|
    |                    |_________|     | 74LS14 | | 74LS374 |   ____|
    |  ____________       _________      |________| |_________|   ____|
    | | 74LS245    |     | 74LS157 |                 _________    ____|
    | |____________|     |_________|                | 74HCZ44 |   ____|
    |  ____________       _________                 |_________|   ____|
    | | 74LS245    |     | 74LS32  |      _______                 ____|  30x2
    | |____________|     |_________|     | | | | |                ____|  connector
    |  ______________                    |4|3|2|1|                ____|
    | | HM6116       |                   |_|_|_|_|                ____|
    | | o MSM2128    |                                            ____|
    | |______________|                   DIP SW x4                ____|
    |  ______________                                             ____|
    | | HM6116       |    ________       _________                ____|
    | | o MSM2128    |   | 74LS08 |     | 74LS174 |               ____|
    | |______________|   |________|     |_________|               ____|
    |  ________________   __________                              ____|
    | |                | | PAL16R4A |                             ____|
    | |     2764       | |__________|                             ____|
    | |________________|  __________                              ____|
    |  ________________  | 74LS166  |                             ____|
    | |                | |__________|                            |
    | |     2764       |  __________                             |
    | |________________| | 74LS166  |                            |____
    |  ________________  |__________|                               __|
    | |                |  __________       _________               |  |
    | |     2764       | | 74LS166  |     | 74LS05  |              |8 |  10
    | |________________| |__________|     |_________|              |8 |  pins
    |  ________  ______   __________       _________               |8 |  male
    | | 74LS04 || osc. | | 74LS193  |     | 74LS86  |              |8 |  connector
    | |________||10 MHz| |__________|     |_________|              |8 |
    |           |______|                                           |__|
    |_________________________________________________________________|



    (The following fuse maps are just for reference and will be deleted soon. These PLDs were converted to the new bin format)

    Magic Fly PAL16R4A Fuse Map
    ---------------------------

    Device    AmPAL16R4A
    *
    QF2048*
    F0*
    L000000 11111111111111111111111111111111*
    L000032 11111111111111111111111111111111*
    L000064 11111111111111111111111111111111*
    L000096 11111111111111111111111111111111*
    L000128 11111111111111111111111111111111*
    L000160 11111111111111111111111111111111*
    L000192 11111111111111111111111111111111*
    L000224 11111111111111111111111111111111*
    L000256 11111111111111111111111111111111*
    L000288 11111111111111111111111111111111*
    L000320 11111111111111111111111111111111*
    L000352 11111111111111111111111111111111*
    L000384 11111111111111111111111111111111*
    L000416 11111111111111111111111111111111*
    L000448 11111111111111111111111111111111*
    L000480 11111111111111111111111111111111*
    L000512 11111111111111111111111111111111*
    L000544 11111111111111111111111111111111*
    L000576 11111111111111111111111111111111*
    L000608 11111111111111111111111111111111*
    L000640 11111111111111111111111111111111*
    L000672 11111111111111111111111111111111*
    L000704 11111111111111111111111111111111*
    L000736 11111111111111111111111111111111*
    L000768 11111111111111111111111111111111*
    L000800 11111111111111111111111111111111*
    L000832 11111111111111111111111111111111*
    L000864 11111111111111111111111111111111*
    L000896 11111111111111111111111111111111*
    L000928 11111111111111111111111111111111*
    L000960 11111111111111111111111111111111*
    L000992 11111111111111111111111111111111*
    L001024 00000000000000000000000000000000*
    L001056 00000000000000000000000000000000*
    L001088 00000000000000000000000000000000*
    L001120 00000000000000000000000000000000*
    L001152 00000000000000000000000000000000*
    L001184 00000000000000000000000000000000*
    L001216 00000000000000000000000000000000*
    L001248 00000000000000000000000000000000*
    L001280 00000000000000000000000000000000*
    L001312 00000000000000000000000000000000*
    L001344 00000000000000000000000000000000*
    L001376 00000000000000000000000000000000*
    L001408 00000000000000000000000000000000*
    L001440 00000000000000000000000000000000*
    L001472 00000000000000000000000000000000*
    L001504 00000000000000000000000000000000*
    L001536 00000000000000000000000000000000*
    L001568 00000000000000000000000000000000*
    L001600 00000000000000000000000000000000*
    L001632 00000000000000000000000000000000*
    L001664 00000000000000000000000000000000*
    L001696 00000000000000000000000000000000*
    L001728 00000000000000000000000000000000*
    L001760 00000000000000000000000000000000*
    L001792 00000000000000000000000000000000*
    L001824 00000000000000000000000000000000*
    L001856 00000000000000000000000000000000*
    L001888 00000000000000000000000000000000*
    L001920 00000000000000000000000000000000*
    L001952 00000000000000000000000000000000*
    L001984 00000000000000000000000000000000*
    L002016 00000000000000000000000000000000*
    C7F80*


    7 e Mezzo PAL16R4A Fuse Map
    ---------------------------

    Device    AmPAL16R4A
    *
    QF2048*
    F0*
    L000000 01010101010101010101010101010101*
    L000032 01010101010101010101010101010101*
    L000064 11111111111111111111111111111111*
    L000096 11111111111111111111111111111111*
    L000128 11111111111111111111111111111111*
    L000160 11111111111111111111111111111111*
    L000192 11111111111111111111111111111111*
    L000224 11111111111111111111111111111111*
    L000256 11101110110011101111111111111111*
    L000288 11101110110011101111111111111111*
    L000320 11001100110011001111111111111111*
    L000352 11001100110011001111111111111111*
    L000384 11001100110011001111111111111111*
    L000416 11001100110011001111111111111111*
    L000448 11001100110011001111111111111111*
    L000480 11001100110011001111111111111111*
    L000512 11111111111111111111111111111111*
    L000544 11111111111111111111111111111111*
    L000576 11111111111111111111111111111111*
    L000608 11111111111111111111111111111111*
    L000640 11111111111111111111111111111111*
    L000672 11111111111111111111111111111111*
    L000704 11111111111111111111111111111111*
    L000736 11111111111111111111111111111111*
    L000768 11111111111111111111111111111111*
    L000800 11111111111111111111111111111111*
    L000832 11111111111111111111111111111111*
    L000864 11111111111111111111111111111111*
    L000896 11111111111111111111111111111111*
    L000928 11111111111111111111111111111111*
    L000960 11111111111111111111111111111111*
    L000992 11111111111111111111111111111111*
    L001024 11111111111111111111111111111111*
    L001056 11111111111111111111111111111111*
    L001088 11111111111111111111111111111111*
    L001120 11111111111111111111111111111111*
    L001152 11111111111111111111111111111111*
    L001184 11111111111111111111111111111111*
    L001216 11111111111111111111111111111111*
    L001248 11111111111111111111111111111111*
    L001280 11111111111111111111111111111111*
    L001312 11111111111111111111111111111111*
    L001344 11111111111111111111111111111111*
    L001376 11111111111111111111111111111111*
    L001408 11111111111111111111111111111111*
    L001440 11111111111111111111111111111111*
    L001472 11111111111111111111111111111111*
    L001504 11111111111111111111111111111111*
    L001536 11111111111111111111111111111111*
    L001568 11111111111111111111111111111111*
    L001600 11111111111111111111111111111111*
    L001632 11111111111111111111111111111111*
    L001664 11111111111111111111111111111111*
    L001696 11111111111111111111111111111111*
    L001728 11111111111111111111111111111111*
    L001760 11111111111111111111111111111111*
    L001792 11111111111111111111111111111111*
    L001824 11111111111111111111111111111111*
    L001856 11111111111111111111111111111111*
    L001888 11111111111111111111111111111111*
    L001920 11111111111111111111111111111111*
    L001952 11111111111111111111111111111111*
    L001984 11111111111111111111111111111111*
    L002016 11111111111111111111111111111111*
    CF0A0*


    Memory Map (preliminary)
    ------------------------

    $0000 - $0fff    RAM

                         ($0011            store the text lenght)
                         ($0015 - $0016    pointer to video ram)
                         ($0017 - $0018    pointer to color ram)
                         ($0091 - $0091    ???)
                         ($00ab - $00ab    ???)
                         ($01fb - $01ff    ???)

    $0800 - $0801    mc6845?    // At begining, write 18 bytes sequentially in $0801, and the increment (x) in $0800.

    $1000 - $13ff    Video RAM    // Initialized in subroutine starting at $cf83, filled with value stored in $5e.
    $1800 - $1bff    Color RAM    // Initialized in subroutine starting at $cf83, filled with value stored in $5f.
                                  // (in 7mezzo is located at $cb13 using $64 and $65 to store video ram and color ram values)

                                     CF83: 48         pha
                                     CF84: 8A         txa
                                     CF85: 48         pha
                                     CF86: 98         tya
                                     CF87: 48         pha
                                     CF88: A0 00      ldy  #$00
                                     CF8A: AD 5E 00   lda  $005E
                                     CF8D: 99 00 10   sta  $1000,y
                                     CF90: 99 00 11   sta  $1100,y
                                     CF93: 99 00 12   sta  $1200,y
                                     CF96: 99 00 13   sta  $1300,y
                                     CF99: AD 5F 00   lda  $005F
                                     CF9C: 99 00 18   sta  $1800,y
                                     CF9F: 99 00 19   sta  $1900,y
                                     CFA2: 99 00 1A   sta  $1A00,y
                                     CFA5: 99 00 1B   sta  $1B00,y
                                     CFA8: 88         dey
                                     CFA9: D0 DF      bne  $CF8A
                                     CFAB: 68         pla
                                     CFAC: A8         tay
                                     CFAD: 68         pla
                                     CFAE: AA         tax
                                     CFAF: 68         pla
                                     CFB0: 60         rts

    $1c00 - $27ff    RAM

    $2800 - $2800    ???    // suspected input port (code at $ce96). No writes, only reads.

                               CE96: AD 00 28   lda  $2800
                               CE99: 29 80      and  #$80
                               CE9B: 8D 96 00   sta  $0096
                               CE9E: AD 00 28   lda  $2800
                               CEA1: 29 40      and  #$40
                               CEA3: 8D 97 00   sta  $0097
                               CEA6: AD 00 28   lda  $2800
                               CEA9: 29 10      and  #$10
                               CEAB: 8D 98 00   sta  $0098

    $2801 - $2fff    RAM

    $3000 - $3000    ???    // Something seems to be mapped here. Only writes, no reads.
                            // Code at $c152 do a complex loop with boolean operations and write #$00/#$80 to $3000.
                            // (actually the program execution stuck here)

                               C152: 8A         txa
                               C153: 48         pha
                               C154: 98         tya
                               C155: 48         pha
                               C156: A9 00      lda  #$00
                               C158: 8D 1D 00   sta  $001D
                               C15B: AD 4D 00   lda  $004D
                               C15E: F0 15      beq  $C175
                               C160: AD 94 00   lda  $0094
                               C163: 49 FF      eor  #$FF
                               C165: 29 80      and  #$80
                               C167: 8D 94 00   sta  $0094
                               C16A: AD 39 00   lda  $0039
                               C16D: 29 70      and  #$70
                               C16F: 0D 94 00   ora  $0094
                               C172: 8D 00 30   sta  $3000
                               C175: 88         dey
                               C176: D0 05      bne  $C17D
                               C178: CE 4E 00   dec  $004E
                               C17B: F0 09      beq  $C186
                               C17D: CA         dex
                               C17E: D0 F5      bne  $C175
                               C180: AE 4D 00   ldx  $004D
                               C183: 4C 5B C1   jmp  $C15B
                               C186: AD 39 00   lda  $0039
                               C189: 29 70      and  #$70
                               C18B: 8D 00 30   sta  $3000
                               C18E: A9 01      lda  #$01
                               C190: 8D 1D 00   sta  $001D
                               C193: 68         pla
                               C194: A8         tay
                               C195: 68         pla
                               C196: AA         tax
                               C197: 60         rts

    $3001 - $bfff    RAM

    $c000 - $ffff    ROM

-
