summaryrefslogtreecommitdiff
path: root/ae-protocol.md
blob: 91bd860d72824ec042d390ff282b8ca148649288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
Message types
==============

     Msg ID | Sending side | Description
    --------|--------------|----------------------------------
         00 | Ami/PC       | Ask for next block
         01 | Ami/PC       | Transfer cancelled
         02 | Ami/PC       | Initialisation / Init response
         03 | Ami/?        | Multipart header
         04 | Amiga        | EOF (no payload)
         05 | Amiga        | Next data block

         08 | Amiga        | File already exists (when trying to write with 0x66)
	 09 | Amiga        | Size ? (response to 0x6c)
         0a | Amiga        | Close response
         0b | Amiga        | Format response?

         64 | PC           | List directory
         65 | PC           | File read
         66 | PC           | File/folder write
         67 | PC           | File/folder delete (recursively)
         68 | PC           | File rename (name changes) (works on drives, too?)
         69 | PC           | File move (path changes)
         6a | PC           | File copy
         6b | PC           | Set attributes and comment
         6c | PC           | Request size on disk (?)
         6d | PC           | Close file
         6e | PC           | Format disk (needs Kickstart 2.0 or newer)
         6f | PC           | New folder




Request details
================

64 - List a directory
----------------------

### TODO ###


65 - Read a file
-----------------

### TODO ###


66 - Write a file
------------------

### TODO ###


67 - Delete file/folder
------------------------

Payload:

     Bytes | Content
    -------|--------------------
         n | Path
         1 | 0x00

Then, read type 0 for confirmation.
Then, sendClose() (0xa response: 5x 00).

If Path is a folder, it will be deleted together with its contents.


68 - Rename file/folder
------------------------

Payload:

     Bytes | Content
    -------|--------------------
         n | Path (including old file name)
         1 | 0x00
         n | New file name (without path)
         1 | 0x00

Then, read type 0 for confirmation.
Then, sendClose() (0xa response: 5x 00).


69 - Move file/folder
----------------------

Payload:

     Bytes | Content
    -------|--------------------
         n | Path (including old file name)
         1 | 0x00
         n | New path to contain file (folder without trailing slash or file name)
         1 | 0x00
	 1 | 0xc9 (?)

Then, read type 0 for confirmation.
Then, sendClose() (0xa response: 5x 00).

If Path is a folder, it will be moved together with its contents.
This command appears to work across devices.


6a - Copy file/folder
----------------------

Payload:

     Bytes | Content
    -------|--------------------
         n | Path (including old file name)
         1 | 0x00
         n | New path to contain file (folder without trailing slash or file name)
         1 | 0x00
	 1 | 0xc9 (?)

Then, read type 0 for confirmation.
Then, sendClose() (0xa response: 5x 00).

If Path is a folder, it will be moved together with its contents.
This command appears to work across devices.


6b - Set attributes and comment
--------------------------------

Payload:

     Bytes | Content
    -------|--------------------
         4 | Attributes
         n | Path
         1 | 0x00
         n | Comment
         1 | 0x00
         4 | Checksum? (seems to be 0x00000000 if comment empty)

Then, read type 0 for confirmation.
Then, sendClose() (0xa response: 5x 00).


6c - Request size on disk (?)
------------------------------------

Payload:

     Bytes | Content
    -------|--------------------
         n | Path
         1 | 0x00

Then, read type 0 for confirmation.
Then, read type 9 for 12 bytes of payload (### TODO ###).
Then, send type 0 to request more data (no payload).
Then, read type 9 for 12 bytes of payload (### TODO ###).
Then, send type 0 to request more data (no payload).
Then, read type 0 signaling end of attributes (no payload).
Then, sendClose() (0xa response: 5x 00).

OR

Then, read type 0 for confirmation.
Then, read type 0 signaling end of attributes (no payload).
Then, sendClose() (0xa response: 5x 00).



6d - Close file
----------------

No payload.

Then, read type 0x0a for confirmation (typical payload: 5 bytes of 0x00).

This is used to finish an operation, such as a directory listing
or renaming a file.


6e - Format disk
-----------------

### TODO ###


6f - New folder
----------------

Payload:

     Bytes |  Content
    -------|--------------------
         n | Parent path
         1 | 0x00

Then, read type 0 for confirmation.
Then, sendClose() (0xa response: 5x 00).

The host will create a new folder in the given path, together with a
matching .info file.
The folder name cannot be chosen, and will be something like "Unnamed1".

To create a folder with a specific name, use 0x66.
Note that 0x66'ing a folder does not seem to set its time.