Skip to content

Commit ce063cb

Browse files
Merge pull request #1 from Ripjetski6502/FujiNet-and-APE
FujiNet, APE Time, and SIO
2 parents 526d126 + 51042cd commit ce063cb

21 files changed

+1352
-68
lines changed
2.87 MB
Binary file not shown.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
# A8 C Window Library
44
Atari 8 Bit Text Mode Windowing Library written in C (CC65).
55

6-
This is a text mode windowing library complete with window controls and modern gadgets (widgets). The gadgets allow you to build input forms that use buttons, radio buttons, input strings (with scrolled lengths and type restrictions), check boxes, progress bars, etc. This allows you to build applications with "modern"-ish interfaces.
6+
This is a text mode windowing library complete with window controls and modern gadgets (widgets). The gadgets allow you to build input forms that use buttons, radio buttons, input strings (with scrolled lengths and type restrictions), check boxes, progress bars, etc. This allows you to build applications with "modern"-ish interfaces. I refer to this as a TUI - Text User Interface.
77

88
The windowing system preserves the contents under a window, but is not z-order based (by design). It is up to you to open and close windows in the correct order. Complete sample programs are included, as well as full API documentation.
99

1010
I originally wrote this in Action! language for the Atari 8 bit starting in 2015. I added to it continually up through this year (2022).
1111

12-
I ran into some limitations with the Action! version in a project regarding memory space and function paramater size when compiled into a standlone executable. This prompted the conversion into C. I considered several C implementations on the Atari 8 bit itself, then settled on CC65 to use modern development tools and target the A8 platform.
12+
I ran into some limitations with the Action! version in a project regarding memory space and function paramater size when compiled into a standlone executable. This prompted the conversion into C. I considered several C implementations on the Atari 8 bit itself, then settled on CC65 to use modern development tools and target the A8 platform. The C version is now the primary version of the library, and has advanced beyond the Action! version.
13+
14+
Version 1.1 brought the addition of APE Time bindings to the library, which allows the retrieval of the date and time from an APE Time compatible device or software. This was unpublished because I was also working on the 1.2 release which I thought would be right on the APE bindings heals.
15+
16+
Version 1.2 brings the addition of FujiNet bindings to the library. This consists of a core set of functions for communicating with the FujiNet (opening connections, reading from, writing to, and closing connections, etc). It also includes Base64 encoding and decoding by means of the FujiNet, as well as hashing using SHA1, SHA256, and SHA512. Offloading these compute intensive operations to the FujiNet, yet enabling the Atari to work with them!
1317

1418
License: GNU General Public License v3.0
1519

bin/apedemo.xex

3.14 KB
Binary file not shown.

bin/appdemo.xex

2.33 KB
Binary file not shown.

bin/fujidemo.xex

21.6 KB
Binary file not shown.

bin/stubapp.xex

2.09 KB
Binary file not shown.

bin/stubwin.xex

-432 Bytes
Binary file not shown.

src/a8defape.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// --------------------------------------------------
2+
// Library: a8defape.h
3+
// Desc...: Atari 8 Bit Library ApeTime definitions
4+
// Author.: Wade Ripkowski
5+
// Date...: 2023.02
6+
// License: GNU General Public License v3.0
7+
// Note...:
8+
// Revised:
9+
// --------------------------------------------------
10+
11+
#ifndef A8DEFAPE_H
12+
#define A8DEFAPE_H
13+
14+
// --------------------------------------------------
15+
// Definitions
16+
// --------------------------------------------------
17+
18+
// APE Time
19+
#define APEDEVID 0x45
20+
#define APEGTIME 0x93
21+
22+
23+
// --------------------------------------------------
24+
// Function Prototypes
25+
// --------------------------------------------------
26+
void ApeTimeG(char *cB);
27+
28+
#endif

src/a8deffuji.h

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// --------------------------------------------------
2+
// Library: a8deffuji.h
3+
// Desc...: Atari 8 Bit Library FujiNet definitions
4+
// Author.: Wade Ripkowski
5+
// Date...: 2023.02
6+
// License: GNU General Public License v3.0
7+
// Note...:
8+
// Revised:
9+
// --------------------------------------------------
10+
11+
#ifndef A8DEFFUJI_H
12+
#define A8DEFFUJI_H
13+
14+
// --------------------------------------------------
15+
// Definitions
16+
// --------------------------------------------------
17+
18+
// FujiNet Devices
19+
#define FNRAWID 0x70
20+
#define FNDEVID 0x71
21+
22+
// FujiNet Commands - Device $70 (raw)
23+
#define FNRWFSTAT 0xFA
24+
#define FNRGCONFIG 0xE8
25+
26+
// FujiNet Commands - Device $71
27+
#define FNCCLOSE 'C'
28+
#define FNCHASH 'H'
29+
#define FNCOPEN 'O'
30+
#define FNCPARSE 'P'
31+
#define FNCQUERY 'Q'
32+
#define FNCREAD 'R'
33+
#define FNCSTAT 'S'
34+
#define FNCTRAN 'T'
35+
#define FNCWRITE 'W'
36+
#define FNCTIMER 'Z'
37+
38+
// FujiNet Commands - TCP
39+
#define FNPACCEPT 'A'
40+
#define FNPCLOSE 'c'
41+
#define FNPUDP 'D'
42+
#define FNPHTTPCH 'M'
43+
44+
// FujiNet Translation Modes
45+
#define FNTRNONE 0
46+
#define FNTRCR 1
47+
#define FNTRLF 2
48+
#define FNTRCRLF 3
49+
50+
// FujiNet Aux Modes
51+
#define FNAXREAD 4
52+
#define FNAXWRITE 8
53+
#define FNAXUPDATE 12
54+
55+
// FujiNet Device WiFi Status
56+
#define FNDSIDLE 0
57+
#define FNDSNOSSID 1
58+
#define FNDSSCANC 2
59+
#define FNDSACTIVE 3
60+
#define FNDSLCFAIL 4
61+
#define FNDSWIFILOST 5
62+
#define FNDSWIFIDISC 6
63+
64+
// FujiNet Function Errors/Status
65+
#define FNSOK 1
66+
#define FNEDISCO -1
67+
68+
// Library Encoding/Decoding parameter support
69+
#define FNLENCODE 'E'
70+
#define FNLDECODE 'D'
71+
72+
// FujiNet Adapter Config structure
73+
#define FNCONFIGSZ 140
74+
typedef struct {
75+
char ssid[33];
76+
char hostname[64];
77+
unsigned char ip[4];
78+
unsigned char gateway[4];
79+
unsigned char netmask[4];
80+
unsigned char dns[4];
81+
unsigned char mac[6];
82+
unsigned char bssid[6];
83+
char version[15];
84+
} td_fncfg;
85+
86+
87+
// --------------------------------------------------
88+
// Function Prototypes
89+
// --------------------------------------------------
90+
unsigned char FNStatus(void);
91+
void FNTrans(unsigned char bM, unsigned char bD);
92+
unsigned char FNOpen(char *cB);
93+
unsigned char FNClose(void);
94+
unsigned short FNCheck(void);
95+
unsigned char FNRead(unsigned short iS, unsigned char *cB);
96+
unsigned char FNWrite(unsigned char *cB);
97+
unsigned char FNGConfig(td_fncfg *sC);
98+
99+
#endif

src/a8deffujib64.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// --------------------------------------------------
2+
// Library: a8deffujib64.h
3+
// Desc...: Atari 8 Bit Library FujiNet Base64 definitions
4+
// Author.: Wade Ripkowski
5+
// Date...: 2023.08
6+
// License: GNU General Public License v3.0
7+
// Note...:
8+
// Revised:
9+
// --------------------------------------------------
10+
11+
#ifndef A8DEFFUJIB64_H
12+
#define A8DEFFUJIB64_H
13+
14+
// --------------------------------------------------
15+
// Definitions
16+
// --------------------------------------------------
17+
18+
// FujiNet Commands - Device $70 (raw)
19+
// Base 64
20+
#define FNRB64ENCINP 0xD0
21+
#define FNRB64ENCCMP 0xCF
22+
#define FNRB64ENCLEN 0xCE
23+
#define FNRB64ENCOUT 0xCD
24+
#define FNRB64DECINP 0xCC
25+
#define FNRB64DECCMP 0xCB
26+
#define FNRB64DECLEN 0xCA
27+
#define FNRB64DECOUT 0xC9
28+
29+
30+
// --------------------------------------------------
31+
// Function Prototypes
32+
// --------------------------------------------------
33+
unsigned char FNB64Inp(char cT, char *cB, unsigned short iS);
34+
unsigned char FNB64Cmp(char cT);
35+
unsigned char FNB64Len(char cT, unsigned long *iS);
36+
unsigned char FNB64Out(char cT, char *cB, unsigned short iS);
37+
38+
#endif

0 commit comments

Comments
 (0)