Date: Sun, 19 Jun 2011 08:19:18 -0700
From: aek at
bitsavers.org
To: cctalk at
classiccmp.org
Subject: PLEASE CHANGE THE SUBJECT LINE (was Re: Useless thread, RE:Religion, Re: Nazi
System 360/370 book...)
If you actually post something someone should read!
On 6/19/11 6:36 AM, dwight elvey wrote:
> I wanted to create a 16R4 for my recreated Apple IIe Swift
> card. I wrote a simple program to enter fuses from a
> hand made map. It also blew unused fuse lines and crossed
> to fuses on those lines to reduce power in the final chip.
> I did it from the map. It wasn't that hard. I don't know
> why it is suppose to be difficult. It is just logic circuits.
> Dwight
Hi
I will have to admit, it took me a few iterations to get it right.
I've no excuse for that. Once I knew what I was doing wrong,
it all made perfect sense.
I paced a copy of the map in front of me and marked dots on
the connections I wanted. I wrote the numbers off the sheet
into my program at the end. It is generally missing comments
but I didn't write it for instructive purposes.
Bob R. has a Pal programmer and blew the PALs for me.
Since the code is relatively short, here it is:
\ Compiles a 16R4 design DKE
\ SWYFT vers 3 PAL hope this one works
decimal
create FuseLines 2048 allot
: Index ( FuseLine Increment - Index )
swap ( 32 * ) FuseLines + +
FuseLines 2047 + min FuseLines max ;
: InitFuse
FuseLines 2048 erase ;
InitFuse
: Connect ( FuseLine Increment - ) \ Used to place fuses to keep
Index -1 swap c! ;
: C Connect ;
create ones 64 allot
ones 64 erase
: one ( row - )
-1 swap 32 / ones + c! ;
: Clean ( - ) \ Unspecified fuse rows must be 0 so cross connect
\ something on each unused row.
64 0 do
i ones + c@ 0=
if
i 32 *
0
32 0 do
over i + FuseLines + c@ +
loop
0= if \ must be unused so need to blow something
dup dup 16 / 31 and 2dup Connect 1+ Connect
then
drop
then
loop ;
handle Swyft.PAL
create Return $0D c, $0A c,
: Transform ( - )
2048 0 do
i FuseLines + dup
c@ if ascii 0 else ascii 1 then
swap c!
loop ;
0 value ChkSum
: CalSum
0 =: ChkSum
256 0 do 0
8 0 do 2/
i j 8 * + FuseLines + c@
ascii 1 = if $80 + then
loop
\ +!> ChkSum
ChkSum + =: ChkSum
loop ;
create STX 2 c,
create ETX 3 c,
create Star ascii * c,
create LetC ascii C c,
0 value AsciiSum
: WR ( A C - )
2dup Swyft.PAL hwrite drop
0 do dup i + c@ +!> AsciiSum loop
drop
;
: WritePal ( - )
0 =: AsciiSum
Clean
Transform
CalSum
Swyft.PAL !HCB
Swyft.PAL hcreate drop
read-write
Swyft.PAL hopen drop
STX 1 WR
" SwyftCard PAL for Apple IIe" WR
Return 2 WR
" recreate by Dwight Elvey " WR
Return 2 WR
" Compile by my Forth program " WR
Star 1 WR
Return 2 WR
" L0000" WR
64 0 do
Return 2 WR
i 32 *
FuseLines + 32 WR
loop
Star 1 WR
Return 2 WR
LetC 1 WR
HEX ChkSum 0 <# # # # # #> WR
Star 1 WR
ETX 1 WR
Return 2 WR
AsciiSum 0 <# # # # # #> WR
Return 2 WR
Swyft.PAL hclose drop ;
\ SwyftCard PAL
0 one
192 11 c 192 25 c
224 24 c 224 29 c
256 one
448 16 c 448 20 c 448 23 c 448 25 c 448 28 c
480 16 c 480 20 c 480 23 c 480 24 c
672 0 c 672 11 c
704 1 c 704 9 c
736 5 c
1440 0 c 1440 23 c
1472 1 c 1472 13 c
1504 5 c
1536 7 c
1568 one
1792 5 c
1824 one
WritePal SWYFT3.PAL