Skip to content

Commit

Permalink
initial checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
daveho committed Oct 2, 2012
0 parents commit 4726704
Show file tree
Hide file tree
Showing 103 changed files with 8,744 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

- 2.1 20030508

- Fixed fuse checksum for GAL22V10 (Hilgart Elmar)
- Now gives the correct "Operation mode" on stdout
- Added Makefile
- Minor code cleanup
95 changes: 95 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@


GALasm 2.1

Portable GAL Assembler
Copyright (c) 1998-2003 Alessandro Zummo
Original sources Copyright (c) 1991-96 Christian Habermann
All Rights Reserved

Commercial use is strictly forbidden


Introduction
------------

GALasm was created simply because there were no other
open source GAL assemblers. The assembler core
is basically the one of GALer, a GAL development
environment for the Amiga platform. I was unable
to get in touch with his author to get the permission to
do the port, so if he complains i'll have to
stop the development.


Copyright
---------

GALasm is Copyright (c) 1998-2003 by Alessandro Zummo
but any bug and any piece of code taken from the original GALer
sources is still Copyright (c) 1991-96 by Christian Habermann.


Disclaimer
----------

The authors can not be made responsible for any damage caused
by a fault of GALasm. In other words: use it at your own risk.
Even if i've ported it, i've not fully understood every
aspect of the assembler core.


Sources
-------

The sources are written in ANSI-C, so it should
be possible to compile them on any platform.
The sources have been successfully compiled
with SAS/C on the Amiga platform and with gcc
on Debian GNU/Linux.


About GALs
----------

Some kind of GALs are not reprogrammable and some others,
especially the one i belong to, are even not programmable at all...
ok, just kidding. The original GALer documentation
is a very well written, so if you want to know
how to write down a GAL equation, run your favorite
browser and load galer/main.html. All the non-Amiga
related sections are still valid for GALasm.


GALasm
------

If you type GALasm -h you should obtain the following text:

GALasm 2.1, Portable GAL Assembler
Copyright (c) 1998-2003 Alessandro Zummo. All Rights Reserved
Original sources Copyright (c) 1991-96 Christian Habermann

Usage:
GALasm [-scfpa] <filename>
-s Enable security fuse
-c Do not create the .chp file
-f Do not create the .fus file
-p Do not create the .pin file
-a Restrict checksum to the fuse array only

I think it's self explanatory, but if you've
any trouble, drop me a note.


Author
------

The author (me) can be contacted at azummo-galasm@towertech.it
while the GALasm support page is located at
http://www.towertech.it/azummo/

If you have a bug report, a comment or anything else,
feel free to write me.
Donations are also welcome 8-) .

25 changes: 25 additions & 0 deletions examples/Counter.chp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


GAL16V8

-------\___/-------
Clock | 1 20 | VCC
| |
D0 | 2 19 | Q0
| |
D1 | 3 18 | Q1
| |
D2 | 4 17 | Q2
| |
D3 | 5 16 | Q3
| |
Set | 6 15 | NC
| |
Clear | 7 14 | NC
| |
NC | 8 13 | NC
| |
NC | 9 12 | NC
| |
GND | 10 11 | /OE
-------------------
82 changes: 82 additions & 0 deletions examples/Counter.fus
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@


Pin 19 = Q0 XOR = 1 AC1 = 0
0 x--- ---- ---- ---- x--- -x-- ---- ---- ---x ---- ----
1 ---- -x-- -x-- ---- ---- xxxx xxxx xxxx xxxx xxxx xxxx
2 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
3 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
4 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
5 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx ---- x---
6 ---- ---- x--- -x-- ---- ---- --x- ---x ---- ---- -x--
7 -x-- ---- ---- ---x --x- ---- ---- -x-- -x-- ---- ----

Pin 18 = Q1 XOR = 1 AC1 = 0
8 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
9 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
10 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
11 xxxx xxxx xxxx xxxx xxxx xxxx xxxx ---- ---- x--- ----
12 x--- -x-- ---- ---- ---- ---x --x- ---- -x-- -x-- ----
13 ---- ---x ---- --x- ---- -x-- -x-- ---- ---- --x- --x-
14 ---x ---- -x-- -x-- ---- ---- xxxx xxxx xxxx xxxx xxxx
15 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

Pin 17 = Q2 XOR = 1 AC1 = 0
16 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
17 xxxx xxxx xxxx xxxx xxxx ---- ---- ---- x--- x--- -x--
18 ---- ---- ---- ---- ---x --x- -x-- -x-- ---- ---- ----
19 ---x ---- --x- -x-- -x-- ---- ---- ---x ---- ---- --x-
20 -x-- -x-- ---- ---- --x- --x- --x- ---x -x-- -x-- ----
21 ---- xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
22 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
23 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

Pin 16 = Q3 XOR = 1 AC1 = 0
24 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
25 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
26 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
27 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
28 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
29 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
30 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
31 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

Pin 15 = NC XOR = 0 AC1 = 0
32 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
33 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
34 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
35 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
36 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
37 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
38 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
39 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

Pin 14 = NC XOR = 0 AC1 = 0
40 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
41 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
42 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
43 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
44 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
45 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
46 xxxx xxxx xxxx xxxx xxxx xxxx ---- ---- ---- ---- ----
47 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Pin 13 = NC XOR = 0 AC1 = 0
48 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
49 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
50 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
51 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
52 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
53 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
54 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
55 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Pin 12 = NC XOR = 0 AC1 = 0
56 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
57 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
58 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
59 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
60 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
61 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
62 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
63 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

31 changes: 31 additions & 0 deletions examples/Counter.jed
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Used Program: GALasm 2.0
GAL-Assembler: GALasm 2.0
Device: GAL16V8

*F0
*G0
*QF2194
*L0000 01111111111111110111101111111111
*L0032 11101111111111111011101111111111
*L0256 11110111111111110111101111111111
*L0288 11011110111111111011101111111111
*L0320 11101101111111111011101111111111
*L0512 11111111011111110111101111111111
*L0544 11111110110111111011101111111111
*L0576 11101111110111111011101111111111
*L0608 11011101111011111011101111111111
*L0768 11111111111101110111101111111111
*L0800 11111111111011011011101111111111
*L0832 11111110111111011011101111111111
*L0864 11101111111111011011101111111111
*L0896 11011101110111101011101111111111
*L2048 11110000
*L2056 0100001101101111011101010110111001110100011001010111001000100000
*L2120 00000000
*L2128 1111111111111111111111111111111111111111111111111111111111111111
*L2192 0
*L2193 1
*C3e11
*
a7cf
25 changes: 25 additions & 0 deletions examples/Counter.pin
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


Pin # | Name | Pin Type
-----------------------------
1 | Clock | Clock
2 | D0 | Input
3 | D1 | Input
4 | D2 | Input
5 | D3 | Input
6 | Set | Input
7 | Clear | Input
8 | NC | Input
9 | NC | Input
10 | GND | GND
11 | /OE | /OE
12 | NC | NC
13 | NC | NC
14 | NC | NC
15 | NC | NC
16 | Q3 | Output
17 | Q2 | Output
18 | Q1 | Output
19 | Q0 | Output
20 | VCC | VCC

52 changes: 52 additions & 0 deletions examples/Counter.pld
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
GAL16V8 ; 4-Bit-Counter first line : used GAL
Counter ; second line: any text (max. 8 char.)


Clock D0 D1 D2 D3 Set Clear NC NC GND
/OE NC NC NC NC Q3 Q2 Q1 Q0 VCC





Q0.R = /Clear * Set * D0
+ /Clear * /Set * /Q0


Q1.R = /Clear * Set * D1
+ /Clear * /Set * /Q1 * Q0
+ /Clear * /Set * Q1 * /Q0


Q2.R = /Clear * Set * D2
+ /Clear * /Set * Q2 * /Q1
+ /Clear * /Set * Q2 * /Q0
+ /Clear * /Set * /Q2 * Q1 * Q0


Q3.R = /Clear * Set * D3
+ /Clear * /Set * Q3 * /Q2
+ /Clear * /Set * Q3 * /Q1
+ /Clear * /Set * Q3 * /Q0
+ /Clear * /Set * /Q3 * Q2 * Q1 * Q0





DESCRIPTION

this is a 4-Bit-Counter

registered outputs are signed with the postfix .R


Pin 'Set' HIGH while clock signal (LOW-HIGH) at pin 'Clock':
load Q0-Q3 with state of D0-D3

Pin 'Clear' HIGH while clock signal:
Q0-Q3 are cleared

Clock signal while pins 'Set' and 'Clear' are LOW:
increment counter

29 changes: 29 additions & 0 deletions examples/GAL20RA10.chp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@


GAL20RA10

-------\___/-------
/PL | 1 24 | VCC
| |
Set | 2 23 | Y1
| |
Enable1 | 3 22 | Y2
| |
Enable2 | 4 21 | Y3
| |
Clock1 | 5 20 | Y4
| |
Clock2 | 6 19 | D1
| |
NC | 7 18 | D2
| |
NC | 8 17 | ResetA1
| |
NC | 9 16 | ResetB1
| |
NC | 10 15 | NC
| |
NC | 11 14 | NC
| |
GND | 12 13 | /OE
-------------------
Loading

0 comments on commit 4726704

Please sign in to comment.