added BASE and OFFSET defs, additional mapping starting at C300

This commit is contained in:
flowenol 2023-01-13 23:21:25 +01:00 committed by Piotr Jaczewski
parent b147de89a5
commit 6b3f439e94
11 changed files with 171 additions and 28 deletions

View File

@ -8,10 +8,14 @@ $(SUBDIRS):
.PHONY: $(TOPTARGETS) $(SUBDIRS) .PHONY: $(TOPTARGETS) $(SUBDIRS)
apple1serial.bin: apple1serial-C000.bin:
xa -W -C -v -O ASCII -c src/apple1serial.a65 -l apple1serial.label -o apple1serial.bin xa -DOFFSET="0" -W -C -v -O ASCII -c src/apple1serial.a65 -l apple1serial-C000.label -o apple1serial-C000.bin
all: apple1serial.bin apple1serial-C300.bin:
xa -DOFFSET="768" -W -C -v -O ASCII -c src/apple1serial.a65 -l apple1serial-C300.label -o apple1serial-C300.bin
all: apple1serial-C000.bin apple1serial-C300.bin
clean: clean:
rm apple1serial.bin apple1serial.label rm -f apple1serial*.bin apple1serial*.label

View File

@ -57,6 +57,16 @@ The contents of this repository are as following:
* src/ - contains the 6502 assembly sources for the A1SI onboard ROM routines * src/ - contains the 6502 assembly sources for the A1SI onboard ROM routines
* scripts/ - contains python based file transfer utility * scripts/ - contains python based file transfer utility
## Mappings
There are two .jed files for the GAL20V8 based address decoder:
1. **address_decoder-C000.jed** - defines the standard mapping where the device mimics the original ACI loader program at `$C100`.
2. **address_decoder-C300.jed** - defines an alternative mapping allowing tu run Apple-1 Serial Interface together with the original ACI within the same system.
All program and hardware entries are shifted by offset `$300`, so the loader program can be accessed at `$C400`.
## Requirements ## Requirements
You need the following to successfully build the firmware: You need the following to successfully build the firmware:

View File

@ -0,0 +1,15 @@
chip GAL20V8
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=16 A10=15 A11=14 SR=17 RD=18 WD=19 ROM=20 RES=21 PHI=22
T=23 VCC=24
equations
SR = /A0 * /A1 * /A2 * /A3 * /A4 * /A5 * /A6 * /A7 * A8 * A9 * /A10 * /A11 * /T * RW
RD = /A0 * /A1 * /A2 * /A3 * /A4 * /A5 * /A6 * A7 * A8 * A9 * /A10 * /A11 * /T * RW
WD = A0 * /A1 * /A2 * /A3 * /A4 * /A5 * /A6 * A7 * A8 * A9 * /A10 * /A11 * /T * /RW * PHI
/ROM = /A11 * A10 * /T * RW
+ A11 * /A10 * /T * RW
+ A2 * A3 * A4 * A5 * A6 * A7 * A8 * A9 * /A10 * /A11 * /T * RW
RES = A0 * /A1 * /A2 * /A3 * /A4 * /A5 * /A6 * /A7 * A8 * A9 * /A10 * /A11 * /T * RW

View File

@ -0,0 +1,33 @@

GAL20V8
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
Copyright (c) National Semiconductor Corporation 1990-1993
Assembled from "ADDRES~1.EQN". Date: 1-13-123
*
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 A11:14 A10:15 A9:16 SR:17 RD:18 WD:19 ROM:20*
NOTE PINS RES:21 PHI:22 T:23 VCC:24*
NOTE GALMODE SMALL*
QF2706*QP24*F0*
L0320
0111011010111011101110111001101010100111*
L0640
0111111011111111111111111111110111101111
0111111011111111111111111111111011011111
0111011001110111011101110101011011101111*
L0960
1011011001011011101110111001101010100111*
L1280
0111011001111011101110111001101010101011*
L1600
0111011010111011101110111001101010101011*
L2560
01011100*
L2632
10000011*
L2640
0000000010000000111000001000000010000000100000000000000000000000*
L2704
10*
C1A4F*
0000

View File

@ -0,0 +1,73 @@
EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
Copyright (c) National Semiconductor Corporation 1990-1993
Log file for ADDRES~1.EQN
Device: 20V8
Pin Label Type
--- ----- ----
2 RW 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 A3 pos,com input
9 A2 pos,com input
10 A1 pos,com input
11 A0 pos,com input
12 GND ground pin
14 A11 pos,com input
15 A10 pos,com input
16 A9 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 T 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 3/8 (37.5%)
19 WD 1/8 (12.5%)
18 RD 1/8 (12.5%)
17 SR 1/8 (12.5%)
------------------------------------------
Total Terms 7/64 (10.9%)
------------------------------------------
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 | T
A8 | 3 22 | PHI
A7 | 4 21 | RES
A6 | 5 20 | ROM
A5 | 6 19 | WD
A4 | 7 18 | RD
A3 | 8 17 | SR
A2 | 9 16 | A9
A1 | 10 15 | A10
A0 | 11 14 | A11
GND | 12 13 |
|______________|

View File

@ -1,3 +1,11 @@
#ifndef BASE
#define BASE $C000
#endif
#ifndef OFFSET
#define OFFSET 0
#endif
;End address of dump block ;End address of dump block
#define hex1_l $34 #define hex1_l $34
#define hex1_h $35 #define hex1_h $35
@ -19,10 +27,10 @@
#define echo $FFEF ;Echo character to terminal #define echo $FFEF ;Echo character to terminal
#define prbyte $FFDC #define prbyte $FFDC
#define serial_ready $C000 #define serial_ready BASE + OFFSET
#define serial_reset $C001 #define serial_reset BASE + $1 + OFFSET
#define serial_read $C080 #define serial_read BASE + $80 + OFFSET
#define serial_write $C081 #define serial_write BASE + $81 + OFFSET
#define R_LETTER $D2 #define R_LETTER $D2
@ -34,14 +42,14 @@
#define SPACE $A0 #define SPACE $A0
; pad first 252 bytes with zeroes ; pad first 252 bytes with zeroes
.dsb 252, 0 .dsb 252 + OFFSET, 0
; include identification bytes ; include identification bytes
.byt "A1SI" .byt "A1SI"
; this section is almost identical to original WOZ ACI ; this section is almost identical to original WOZ ACI
; adapted from https://www.sbprojects.net/projects/apple1/aci.php ; adapted from https://www.sbprojects.net/projects/apple1/aci.php
* = $C100 * = BASE + $100 + OFFSET
apple_serial apple_serial
lda #CR ;Drop the cursor one line lda #CR ;Drop the cursor one line
jsr echo jsr echo

View File

@ -4,9 +4,9 @@
; regarding the IO of the serial interface. ; regarding the IO of the serial interface.
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
#define serial_ready $C000 #define serial_ready BASE + $000 + OFFSET
#define serial_read $C080 #define serial_read BASE + $080 + OFFSET
#define serial_write $C081 #define serial_write BASE + $081 + OFFSET
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
; Memory declaration ; Memory declaration
@ -64,9 +64,9 @@
; Let's get started ; Let's get started
;------------------------------------------------------------------------- ;-------------------------------------------------------------------------
* = $C600 * = BASE + $600 + OFFSET
.dsb (*-end_of_counter_remote), 0 .dsb (*-end_of_counter_remote), 0
* = $C600 * = BASE + $600 + OFFSET
reset reset
jsr reset_serial jsr reset_serial

View File

@ -1,22 +1,22 @@
#define echo $FFEF #define echo $FFEF
#define kbd_data $D010 #define kbd_data $D010
#define kbd_cr $D011 #define kbd_cr $D011
#define serial_ready $C000 #define serial_ready BASE + $000 + OFFSET
#define serial_read $C080 #define serial_read BASE + $080 + OFFSET
#define serial_write $C081 #define serial_write BASE + $081 + OFFSET
; How to store INTEGER BASIC progams? ; How to store INTEGER BASIC progams?
; C100R - run serial monitor ; C100( + OFFSET)R - run serial monitor
; 004A.00FFW 0800.0FFFW - write data for default LOMEM & HIMEM ; 004A.00FFW 0800.0FFFW - write data for default LOMEM & HIMEM
; E2B3R - warm entry point ; E2B3R - warm entry point
* = $C300 * = BASE + $300 + OFFSET
.dsb (*-end_of_apple1serial), 0 .dsb (*-end_of_apple1serial), 0
; teletype on apple-1 ; teletype on apple-1
; the data from remote appears on apple-1 screen ; the data from remote appears on apple-1 screen
* = $C300 * = BASE + $300 + OFFSET
teletype_apple1 = $C300 teletype_apple1 = BASE + $300 + OFFSET
jsr reset_serial jsr reset_serial
lda serial_read lda serial_read
teletype_apple1_wait teletype_apple1_wait
@ -29,11 +29,11 @@ end_of_teletype_apple1
; teletype on remote ; teletype on remote
; the data from apple-1 appears on remote ; the data from apple-1 appears on remote
* = $C400 * = BASE + $400 + OFFSET
.dsb (*-end_of_teletype_apple1), 0 .dsb (*-end_of_teletype_apple1), 0
* = $C400 * = BASE + $400 + OFFSET
teletype_remote = $C400 teletype_remote = BASE + $400 + OFFSET
jsr reset_serial jsr reset_serial
lda #$FF lda #$FF
sta serial_write sta serial_write
@ -52,11 +52,11 @@ teletype_remote_wait
end_of_teletype_remote end_of_teletype_remote
; 0-255 repeating counter over TXD ; 0-255 repeating counter over TXD
* = $C500 * = BASE + $500 + OFFSET
.dsb (*-end_of_teletype_remote), 0 .dsb (*-end_of_teletype_remote), 0
* = $C500 * = BASE + $500 + OFFSET
counter_remote = $C500 counter_remote = BASE + $500 + OFFSET
jsr reset_serial jsr reset_serial
ldy #$00 ldy #$00
sta serial_write sta serial_write