PET REU (RAM AND EXPANSION UNIT)
Suche
Index
FAQ
Kontakt
Zurück
More PET stuff

  • EPET REU 512Kb

  • EPET-SID
  • PET REU (RAM AND EXPANSION UNIT)



    cart You may also call it cartridge slot. All hardware-design, soldering, coding and translation in english ;-) is done by myself. Some credits must go to Jogi (vic20.de) for hints and help with the glue logic.

    The main theory

    In the CBM PET 2001-N/3001 you'll find some unused I/O-space from $8800 up to $8FFF. The main logic decodes out of this range 8 I/O-lines. $8800 is in use for the additional VIA 6522. The two ports and four handshake-lines are connected to the cartridge-port. You may use it for addressing RAMs oder build anything else.
    The second address $8900 is your port for the datalines. For building the adaptor you will only need 2 74138 demuxers, a 74245 bus transceiver and the 6522 VIA.

    The Schematic without cartridge-port : Schematic. JP1 is the CPU connector. You have to get the signals from the CPU. Solder some wires or build an adaptor but don't use wires longer than 20cm. This equals to 7-8 inch. Otherwise the signals will flicker and you'll lose bytes while transfering .






    The Cartridge-Slot (Prototype)

    Cartridge-Port
    (View : solder side)
                      1                   2 
    1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
    
    A B C D E F H J K L M N P R S T U V W X Y Z
    
    
     Pin  Signal                Pin  Signal
    
      1   I/O7 $8E00             A   GND
      2   I/O1 $8800             B   PA0
      3   I/O2 $8900             C   PA1
      4   I/O3 $8A00             D   PA2
      5   I/O4 $8B00             E   PA3
      6   I/O5 $8C00             F   PA4 
      7   I/O6 $8D00             H   PA5  
      8   I/O8 $8F00             J   PA6
      9   NC (A3)                K   PA7
     10   NC (A2)                L   PB0 
     11   NC (A1)                M   PB1  
     12   NC (A0)                N   PB2  
     13   NC (PHI 2)             P   PB3   
     14   R/W                    R   PB4 
     15   D7                     S   PB5 
     16   D6                     T   PB6 
     17   D5                     U   PB7  
     18   D4                     V   CB1
     19   D3                     W   CB2
     20   D2                     X   VCC +5V=
     21   D1                     Y   CA1
     22   D0                     Z   CA2
          
     Datalines are buffered ($8900) and the VIA base is $8800. Some pins
     are not connected this time (pin 9-13). 
     
    


    The first 128KB SRAM-Cartridge

    This uses some old Winbond W24257 RAMs in 4 banks. The banking is switched by a half 74139. Keep in mind : CS must be switched to access the rams. You have only to connect the 2 VIA-ports as addresslines and the dataport to the in line wired SRAMS.
    OE must connected to ground, WE to R/W and the CS-lines will be switched by the 74139 ports. Pin 1 of the 139er demuxer is connected to $8900 (I/O2), Pin 2 to CA2 and Pin 3 to CB2. The four CS-lines are Pin 4-7.

    128KB SRAM Expansion


    icon1 The Banking

     
       CA2 |  CB2  |  Bank  
     -----------------------
        0  |   0   |    0 
        0  |   1   |    1 
        1  |   0   |    2          
        1  |   1   |    3 
    


    The final "Side car" :*)

    The case of an old printer buffer houses now the pcb. There is enough space for future ideas.

    case case open

    Software

    A first test :

    poke 34816+2,255 : poke 34816+3,255
    poke 34816,0 : poke 34816+1,0

    This switches the ports to output and set the latches low (address $0000).

    Now poke a value : poke 34816+256,32

    D=peek(34816+256): ?D will bring (hopeful) the value back. Play around with
    the addresses and banks to check your circuit.



    !to "petreu.prg"
    *=$033c
    ;---------------------------------------------------
    ;
    ; Compiler : ACME
    ;
    ; Poke 877,blocks : Poke 934,blocks to configure mem pumps
    ;
    ; SYS 828 to copy into ram-bank and sys 884 to fetch
    ;
    ; raw copy for whole free basic mem (32K machine) 
    ;
    ;---------------------------------------------------
    ;Base addresses
    
     via       = $8800
     datalatch = $8900
     
    ;---------------------------------------------------
    ; copy into sram
    ;---------------------------------------------------
                     lda #255
                     sta via+2
                     sta via+3           ; ports to output
                     lda #00             ; set addr. $0000 in SRAM
                     sta via             ; register B
                     sta via+1           ; register A
                     lda #04             ; restore value
                     sta pump+2   
    ramcopy          sei
                     ldx #00
            repump   ldy #00             ; low addr. counter
              pump   lda $0400,Y 
                     sta datalatch       ; write byte to port    
                     nop:nop:nop:        ; sta $8000,y : some peep-show for the coder
                     iny
                     sty via+1           ; register A : set low addr.
                     bne pump
                     inc pump+2          ; inc source high byte 
                     inx
                     stx via             ; register B : set high addr.
         pcounter    cpx #124            ; blocks
                     bne repump    
                     cli
                     rts   
                     nop:nop:nop         ; for the coder ;)
    ;--------------------------------------------------
    ; ... and bring it back 
    ;--------------------------------------------------
                     lda #255
                     sta via+2
                     sta via+3
                     lda #00
                     sta via               ; register B
                     sta via+1             ; register A
                     lda #04 
                     sta target+2   
    backcopy         sei
                     ldx #00
             rpump   ldy #00               ; low addr. counter
             pump1   lda datalatch
       target        sta $0400,Y
                     nop:nop:nop:          ; sta $8000,y  : some peep-show for the coder
                     iny
                     sty via+1
                     bne pump1
                     inc target+2          ; inc high byte 
                     inx
                     stx via               ; register B : set high addr.
         pcounter1   cpx #124              ; blocks                  
                     bne rpump    
                     cli
                     rts   
    



    PET REU Soft photo REU Software
    Software for the option rom at $9000. You'll able to copy the whole memory from $0400 -$7FFF in the chosen bank. Sure, you can also bring it back. ;)
    The software will relocate the copy-routine to $033c. So the whole basic mem is free for your tools.
    You can't use basic programs with this beta software ! This lack will be fixed with the next version. You may delete or use the XLOAD in the menu. It is a older project to transfer bins from a DOS PC to the PET. Source is included and under GPL license.


    Downloads

    PET REU 128KB Software for ROM $9000 - public beta 1



     

    Letzte Änderung: 2019-01-04 13:05:21
    Rubriken-Übersicht
     6 Besucher online 

    Valid XHTML 1.0 Transitional Valid CSS!