address decoder pin change & last command bug fix
This commit is contained in:
parent
f05389366d
commit
45c345aa8e
|
@ -2,24 +2,24 @@
|
|||
GAL20V8
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
Assembled from "c:/APPLE1~1/ADDRES~1.EQN". Date: 6-7-120
|
||||
Assembled from "d:/APPLE1~1/ADDRES~1.EQN". Date: 6-22-120
|
||||
*
|
||||
NOTE PINS RW:2 A0:3 A1:4 A2:5 A3:6 A4:7 A5:8 A6:9 A7:10 A8:11*
|
||||
NOTE PINS RW:2 A8:3 A7:4 A6:5 A5:6 A4:7 A3:8 A2:9 A1:10 A0:11*
|
||||
NOTE PINS GND:12 A9:14 A10:15 A11:16 SR:17 RD:18 WD:19 ROM:20*
|
||||
NOTE PINS RES:21 PHI:22 R:23 VCC:24*
|
||||
NOTE GALMODE SMALL*
|
||||
QF2706*QP24*F0*
|
||||
L0320
|
||||
0111011010111011101110111010101010101011*
|
||||
0111101010111011101110111010101010100111*
|
||||
L0640
|
||||
0111111011111111111111111111111111110111
|
||||
0111011011111111111111111111111111111111
|
||||
0111111011111111111111111111111111011111
|
||||
0111111011111111111111111111110111111111
|
||||
0111111011111111111111111101111111111111*
|
||||
L0960
|
||||
1011011010011011101110111010101001101011*
|
||||
1011101001011011101110111010101010100111*
|
||||
L1280
|
||||
0111101010111011101110111010101001101011*
|
||||
0111101001111011101110111010101010101011*
|
||||
L1600
|
||||
0111101010111011101110111010101010101011*
|
||||
L2560
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Log file for e:/APPLE1~1/ADDRES~1.EQN
|
||||
Log file for d:/APPLE1~1/ADDRES~1.EQN
|
||||
Device: 20V8
|
||||
|
||||
Pin Label Type
|
||||
--- ----- ----
|
||||
2 RW pos,com input
|
||||
3 A0 pos,com input
|
||||
4 A1 pos,com input
|
||||
5 A2 pos,com input
|
||||
6 A3 pos,com input
|
||||
3 A8 pos,com input
|
||||
4 A7 pos,com input
|
||||
5 A6 pos,com input
|
||||
6 A5 pos,com input
|
||||
7 A4 pos,com input
|
||||
8 A5 pos,com input
|
||||
9 A6 pos,com input
|
||||
10 A7 pos,com input
|
||||
11 A8 pos,com input
|
||||
8 A3 pos,com input
|
||||
9 A2 pos,com input
|
||||
10 A1 pos,com input
|
||||
11 A0 pos,com input
|
||||
12 GND ground pin
|
||||
14 A9 pos,com input
|
||||
15 A10 pos,com input
|
||||
|
@ -60,160 +60,14 @@ Copyright (c) National Semiconductor Corporation 1990-1993
|
|||
| \__/ |
|
||||
| 1 24 | VCC
|
||||
RW | 2 23 | R
|
||||
A0 | 3 22 | PHI
|
||||
A1 | 4 21 | RES
|
||||
A2 | 5 20 | ROM
|
||||
A3 | 6 19 | WD
|
||||
A8 | 3 22 | PHI
|
||||
A7 | 4 21 | RES
|
||||
A6 | 5 20 | ROM
|
||||
A5 | 6 19 | WD
|
||||
A4 | 7 18 | RD
|
||||
A5 | 8 17 | SR
|
||||
A6 | 9 16 | A11
|
||||
A7 | 10 15 | A10
|
||||
A8 | 11 14 | A9
|
||||
GND | 12 13 |
|
||||
|______________|
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Log file for e:/APPLE1~1/ADDRES~1.EQN
|
||||
Device: 20V8
|
||||
|
||||
Pin Label Type
|
||||
--- ----- ----
|
||||
2 RW pos,com input
|
||||
3 A0 pos,com input
|
||||
4 A1 pos,com input
|
||||
5 A2 pos,com input
|
||||
6 A3 pos,com input
|
||||
7 A4 pos,com input
|
||||
8 A5 pos,com input
|
||||
9 A6 pos,com input
|
||||
10 A7 pos,com input
|
||||
11 A8 pos,com input
|
||||
12 GND ground pin
|
||||
14 A9 pos,com input
|
||||
15 A10 pos,com input
|
||||
16 A11 pos,com input
|
||||
17 SR pos,com output
|
||||
18 RD pos,com output
|
||||
19 WD pos,com output
|
||||
20 ROM neg,com output
|
||||
21 RES pos,com output
|
||||
22 PHI pos,com input
|
||||
23 R pos,com input
|
||||
24 VCC power pin
|
||||
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Device Utilization:
|
||||
|
||||
No of dedicated inputs used : 14/14 (100.0%)
|
||||
No of feedbacks used as dedicated inputs : 1/6 (16.7%)
|
||||
No of dedicated outputs used : 2/2 (100.0%)
|
||||
No of feedbacks used as dedicated outputs : 3/6 (50.0%)
|
||||
|
||||
------------------------------------------
|
||||
Pin Label Terms Usage
|
||||
------------------------------------------
|
||||
21 RES 1/8 (12.5%)
|
||||
20 ROM 4/8 (50.0%)
|
||||
19 WD 1/8 (12.5%)
|
||||
18 RD 1/8 (12.5%)
|
||||
17 SR 1/8 (12.5%)
|
||||
------------------------------------------
|
||||
Total Terms 8/64 (12.5%)
|
||||
------------------------------------------
|
||||
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Chip diagram (DIP)
|
||||
|
||||
._____ _____.
|
||||
| \__/ |
|
||||
| 1 24 | VCC
|
||||
RW | 2 23 | R
|
||||
A0 | 3 22 | PHI
|
||||
A1 | 4 21 | RES
|
||||
A2 | 5 20 | ROM
|
||||
A3 | 6 19 | WD
|
||||
A4 | 7 18 | RD
|
||||
A5 | 8 17 | SR
|
||||
A6 | 9 16 | A11
|
||||
A7 | 10 15 | A10
|
||||
A8 | 11 14 | A9
|
||||
GND | 12 13 |
|
||||
|______________|
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Log file for e:/APPLE1~1/ADDRES~1.EQN
|
||||
Device: 20V8
|
||||
|
||||
Pin Label Type
|
||||
--- ----- ----
|
||||
2 RW pos,com input
|
||||
3 A0 pos,com input
|
||||
4 A1 pos,com input
|
||||
5 A2 pos,com input
|
||||
6 A3 pos,com input
|
||||
7 A4 pos,com input
|
||||
8 A5 pos,com input
|
||||
9 A6 pos,com input
|
||||
10 A7 pos,com input
|
||||
11 A8 pos,com input
|
||||
12 GND ground pin
|
||||
14 A9 pos,com input
|
||||
15 A10 pos,com input
|
||||
16 A11 pos,com input
|
||||
17 SR pos,com output
|
||||
18 RD pos,com output
|
||||
19 WD pos,com output
|
||||
20 ROM neg,com output
|
||||
21 RES pos,com output
|
||||
22 PHI pos,com input
|
||||
23 R pos,com input
|
||||
24 VCC power pin
|
||||
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Device Utilization:
|
||||
|
||||
No of dedicated inputs used : 14/14 (100.0%)
|
||||
No of feedbacks used as dedicated inputs : 1/6 (16.7%)
|
||||
No of dedicated outputs used : 2/2 (100.0%)
|
||||
No of feedbacks used as dedicated outputs : 3/6 (50.0%)
|
||||
|
||||
------------------------------------------
|
||||
Pin Label Terms Usage
|
||||
------------------------------------------
|
||||
21 RES 1/8 (12.5%)
|
||||
20 ROM 4/8 (50.0%)
|
||||
19 WD 1/8 (12.5%)
|
||||
18 RD 1/8 (12.5%)
|
||||
17 SR 1/8 (12.5%)
|
||||
------------------------------------------
|
||||
Total Terms 8/64 (12.5%)
|
||||
------------------------------------------
|
||||
|
||||
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
|
||||
Copyright (c) National Semiconductor Corporation 1990-1993
|
||||
|
||||
Chip diagram (DIP)
|
||||
|
||||
._____ _____.
|
||||
| \__/ |
|
||||
| 1 24 | VCC
|
||||
RW | 2 23 | R
|
||||
A0 | 3 22 | PHI
|
||||
A1 | 4 21 | RES
|
||||
A2 | 5 20 | ROM
|
||||
A3 | 6 19 | WD
|
||||
A4 | 7 18 | RD
|
||||
A5 | 8 17 | SR
|
||||
A6 | 9 16 | A11
|
||||
A7 | 10 15 | A10
|
||||
A8 | 11 14 | A9
|
||||
GND | 12 13 |
|
||||
A3 | 8 17 | SR
|
||||
A2 | 9 16 | A11
|
||||
A1 | 10 15 | A10
|
||||
A0 | 11 14 | A9
|
||||
GND | 12 13 |
|
||||
|______________|
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
chip GAL20V8
|
||||
|
||||
NC3=1 RW=2 A0=3 A1=4 A2=5 A3=6 A4=7 A5=8 A6=9 A7=10 A8=11 GND=12
|
||||
NC3=1 RW=2 A0=11 A1=10 A2=9 A3=8 A4=7 A5=6 A6=5 A7=4 A8=3 GND=12
|
||||
A9=14 A10=15 A11=16 SR=17 RD=18 WD=19 ROM=20 RES=21 PHI=22
|
||||
R=23 VCC=24
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ inline void not_ready() {
|
|||
inline void put_data() {
|
||||
upper_part = (PORTD & 0xe3) | ((0xe0 & receive_buffer[0])>>3);
|
||||
lower_part = (PORTB & 0xc1) | ((0x1f & receive_buffer[0])<<1);
|
||||
|
||||
|
||||
PORTD = upper_part;
|
||||
PORTB = lower_part;
|
||||
}
|
||||
|
@ -108,20 +108,20 @@ ISR(PCINT0_vect) {
|
|||
// set output on data pins
|
||||
DDRD |= _BV(DATA5) | _BV(DATA6) | _BV(DATA7);
|
||||
DDRB |= _BV(DATA0) | _BV(DATA1) | _BV(DATA2) | _BV(DATA3) | _BV(DATA4);
|
||||
|
||||
|
||||
receive_index = -1;
|
||||
not_ready();
|
||||
data_read_interrupt_count = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (receive_index > -1) {
|
||||
uint8_t i;
|
||||
for (i = 1; i <= receive_index; i++) {
|
||||
receive_buffer[i - 1] = receive_buffer[i];
|
||||
}
|
||||
receive_index--;
|
||||
|
||||
|
||||
if (receive_index == -1) {
|
||||
not_ready();
|
||||
} else {
|
||||
|
@ -181,16 +181,16 @@ ISR(USART_RX_vect)
|
|||
{
|
||||
if (mode == READ) {
|
||||
data = UDR0;
|
||||
|
||||
|
||||
if (receive_index >= BUFFER_SIZE - 1) {
|
||||
receive_index = -1;
|
||||
}
|
||||
|
||||
|
||||
receive_buffer[++receive_index] = data;
|
||||
|
||||
|
||||
// always put first byte from receive buffer
|
||||
put_data();
|
||||
|
||||
|
||||
ready();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
#define serial_read $C080
|
||||
#define serial_write $C081
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Constants
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
#define R_LETTER $D2
|
||||
#define W_LETTER $D7
|
||||
|
@ -71,7 +68,7 @@ kbd_wait
|
|||
ldx #$FF ;Initialize parse buffer pointer
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Start parsing first or a new tape command
|
||||
; Start parsing command
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
next_cmd
|
||||
|
@ -166,7 +163,7 @@ read_byte
|
|||
cmp hex1_h ;Compare upper destination address half with upper end address half
|
||||
bne read_next ;If not equal then proceed to read next byte
|
||||
|
||||
lda last_command_read ;Set last command to READ
|
||||
lda #last_command_read ;Set last command to READ
|
||||
sta last_command
|
||||
jmp next_cmd ;Read is completed, proceed to next command
|
||||
|
||||
|
@ -208,7 +205,7 @@ write_byte
|
|||
cmp hex1_h ;Compare upper source address half with upper end address half
|
||||
bne write_next ;If not equal then proceed to write next byte
|
||||
|
||||
lda last_command_write ;Set last command to WRITE
|
||||
lda #last_command_write ;Set last command to WRITE
|
||||
sta last_command
|
||||
jmp next_cmd ;Write is completed, proceed to next command
|
||||
|
||||
|
|
11
src/tests.xa
11
src/tests.xa
|
@ -9,8 +9,10 @@
|
|||
.dsb (*-end_of_apple1serial), 0
|
||||
|
||||
; teletype on apple-1
|
||||
; the data from remote appears on apple-1 screen
|
||||
* = $C300
|
||||
teletype_apple1 = $C300
|
||||
jsr reset
|
||||
lda serial_read
|
||||
wait
|
||||
lda serial_ready
|
||||
|
@ -21,11 +23,13 @@ wait
|
|||
end_of_teletype_apple1
|
||||
|
||||
; teletype on remote
|
||||
; the data from apple-1 appears on remote
|
||||
* = $C400
|
||||
.dsb (*-end_of_teletype_apple1), 0
|
||||
|
||||
* = $C400
|
||||
teletype_remote = $C400
|
||||
jsr reset
|
||||
lda #$FF
|
||||
sta serial_write
|
||||
get_key
|
||||
|
@ -44,6 +48,7 @@ end_of_teletype_remote
|
|||
|
||||
* = $C500
|
||||
counter_remote = $C500
|
||||
jsr reset
|
||||
ldy #$00
|
||||
sta serial_write
|
||||
check_ready
|
||||
|
@ -53,4 +58,8 @@ check_ready
|
|||
sta serial_write
|
||||
iny
|
||||
jmp check_ready
|
||||
|
||||
|
||||
; How to store INTEGER BASIC progams?
|
||||
; C100R
|
||||
; 004A.00FFW 0800.0FFFW
|
||||
; E2B3R - warm entry point
|
||||
|
|
Loading…
Reference in New Issue