1 REM 2708 Eprom reader program for PPI ISA card 10 lineSize = 16 20 romSize = 1024 30 baseAddr = &H300: configByte = 144: REM Mode 0, A=input, B+C=output 35 noCS = 128: CS = 0 40 aPort = baseAddr: Bport = baseAddr + 1: Cport = baseAddr + 2: ControlPort = baseAddr + 3 50 OUT ControlPort, configByte 60 chksum = 0 65 LET fileName$ = "e2708_1.hex" 70 OPEN fileName$ FOR OUTPUT AS #1 80 PRINT "Dump to " + fileName$ 100 FOR lineCount = 0 TO (romSize - lineSize) STEP lineSize 105 addrStr$ = "000" + HEX$(lineCount) 106 PRINT #1, ":10" + RIGHT$(addrStr$, 4) + "00"; 107 chksum = chksum - 16: chksum = chksum - lineCount 108 PRINT RIGHT$(addrStr$, 4) 110 FOR addrCount = 0 TO (lineSize - 1) 120 address = lineCount + addrCount 130 hiByte = INT(address / &H100): loByte = address - hiByte * &H100 135 REM PRINT RIGHT$("0" + HEX$(hiByte), 2); RIGHT$("0" + HEX$(loByte), 2); "="; 136 OUT Bport, loByte: OUT Cport, (hiByte + noCS) 137 OUT Cport, (hiByte + CS): dat = INP(aPort): OUT Cport, (hiByte + noCS) 138 PRINT #1, RIGHT$("0" + HEX$(dat), 2); : chksum = chksum - dat 140 NEXT addrCount 150 PRINT #1, RIGHT$("0" + HEX$(chksum), 2) 155 chksum = 0 160 NEXT lineCount 170 PRINT #1, ":00000001FF" 9000 REM base = &h300 = port A 9010 REM base+1 = port B 9020 REM base+2 = port C 9030 REM base+3 = control 9040 REM writing 128 to control puts all port in output mode 9050 REM writing 144 to control puts port A in input mode 9100 REM Port A = data bits 9110 REM Port B = address bits A0-A7 9120 REM Port C low = address bits A8 - 10 9130 REM Port C high, bit 7 = CS* 9140 REM Read cycle: out C:xx000001 9150 REM out B:xxxxxxxx 9160 REM out C:xx000000 9170 REM in A 9180 REM out C:xx000001