]> git.sesse.net Git - pistorm/blob - a314/README.md
Add Meson build files.
[pistorm] / a314 / README.md
1 # **A314 emulation support**
2
3 ## **About**
4
5 A314 is a trapdoor expansion board for Amiga 500 created by Niklas Ekström, It also uses a Raspberry Pi connected to bring interesting features to the Amiga. For more information about the board visit the [A314 Github](https://github.com/niklasekstrom/a314).
6
7 PiStorm provides the functionality of the A314 emulating the device on the Pi side.
8
9 ## **Installation**
10
11 Enable the A314 emulation on your cfg file by uncommenting the line, by removing the #:
12
13 ```
14 setvar a314
15 ```
16
17 All A314 features will require that the file [`a314.device`](a314device/software-amiga/a314.device) is copied into DEVS: on the Amiga.
18
19 For your convenience all the Amiga required files are available on the PiStorm disk mounted by default. Make sure you have the following line uncommented on your cfg file:
20
21 ```
22 setvar piscsi6 platforms/amiga/pistorm.hdf
23 ```
24
25 Open the Amiga shell and run:
26
27 ```
28 copy PISTORM:a314/a314.device DEVS:
29 ```
30
31 ***[OPTIONAL]*** If you need to change the location of your [`a314d.conf`](files_pi/a314d.conf) you can do it by uncommenting the line on your cfg file, by removing the #, the path can be relative to the folder the emulator is launched or absolute:
32
33 ```
34 setvar a314_conf /home/pi/amiga-files/a314/files_pi/a314d.conf
35 ```
36
37 ---
38
39 ### **a314fs**
40
41 a34is a file system that is mounted in AmigaDOS as a device, PI0:
42 The volume in PI0: is called PiDisk:, and is mapped to a directory in the RPi.
43
44 The default shared folder in the Pi is at `/home/pi/pistorm/data/a314-shared`
45
46 To enable it, on the Amiga you need to:
47
48 - Copy [`a314fs`](a314device/software-amiga/a314fs) to L:
49 - Append the contents of [`a314fs-mountlist`](a314device/software-amiga/a314fs-mountlist) to DEVS:Mountlist
50
51 This can be achieved by opening the Amiga shell and running the commands:
52
53 ```
54 copy PISTORM:a314/a314fs L:
55 type PISTORM:a314/a314fs-mountlist >> DEVS:Mountlist
56 ```
57
58 Now you can mount your shared folder with
59
60 ```
61 mount PI0:
62 ```
63
64 You can add the mount command into S:Startup-Sequence if you want it mounted automatically on boot.
65
66 **[OPTIONAL]** You can customise the location of your [`a314fs.conf`](files_pi/a314fs.conf) file by adding the parameter `-conf-file <conf-file-location>` to the `a314fs.py` python command line in the a314d.conf file. These paths can be relative to the folder where the emultor is running or absolute. E.g.:
67
68 ```
69 a314fs          python3 /home/pi/pistorm/a314/files_pi/a314fs.py -conf-file /home/pi/amiga-files/config/a314fs.conf
70 ```
71
72 The [`a314fs.conf`](files_pi/a314fs.conf) file allow you to define the location of your shared folder. This path can be relative to the folder where the emultor is running or absolute. It was supposed to allow you to give a different volume name and label on the amiga side, but this is currently not working. E.g.:
73
74 ```
75 {
76   "devices": {
77     "PI0": {
78       "volume": "PiDisk",
79       "path": "/home/pi/amiga-files/shared"
80     }
81   }
82 }
83 ```
84
85 ---
86
87 ### **pi command**
88
89 pi is a command that lets you invoke executables on the RPi from the Amiga side. For example, if your current working directory is on PiDisk: and you run "pi vc hello.c -o hello", then the vc program (the VBCC cross-compiler) is executed on the RPi with the given arguments. It will cross-compile “hello.c” into the Amiga executable file “hello”. The resulting binary is immediately accessible through the a314fs.
90
91 You may also launch Interactive applications using the pi command, such as "pi mc -a" which will run Midnight Commander. Running pi without any arguments is equivalent to "pi bash" and will present you with a bash prompt from the RPi.
92
93 To install the pi command just copy [`pi`](a314device/software-amiga/pi) to C: running the command:
94
95 ```
96 copy PISTORM:a314/pi C:
97 ```
98
99 ---
100
101 ### **ethernet**
102
103 A SANA-II driver that forwards Ethernet packets to the network interface of the RPi. Together with an Amiga TCP/IP stack this provides network access to the Amiga.
104
105 #### **On the Pi**:
106
107 - Install the pip3 command:
108 ```
109 sudo apt install python3-pip
110 ```
111
112 - Install python-pytun
113 ```
114 sudo pip3 install python-pytun
115 ```
116
117 - Copy the [`tap0`](files_pi/eth-config-pi/tap) to `/etc/network/interfaces.d/`:
118 ```
119 sudo cp /home/pi/pistorm/a314/files_pi/eth-config-pi/tap0 /etc/network/interfaces.d/
120 ```
121
122 - Add NAT rulest to forward the requests from the amiga into the wi-fi:
123 ```
124 sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE  
125 sudo iptables -A FORWARD -i wlan0 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT  
126 sudo iptables -A FORWARD -i tap0 -o wlan0 -j ACCEPT
127 ```
128
129 - Make the NAT rules persintent:
130 ```
131 sudo apt install iptables-persistent
132 ```
133 Agree to the IPv4 question, You can pick any answer for IPv6
134
135 - Enable IPv4 forwarding by editing /etc/sysctl.conf with:
136 ```
137 sudo nano /etc/sysctl.conf
138 ```
139 Uncomment the line, by removing the #:
140 ```
141 net.ipv4.ip_forward=1
142 ```
143
144 - Reboot the Pi.
145
146 #### **On the Amiga**:
147
148 - Copy the [`a314eth.device`](a314device/software-amiga/a314eth.device) to DEVS:
149 ```
150 copy PISTORM:a314/a314eth.device DEVS;
151 ```
152
153 - The ethernet emulated interface is installed and configured both on the Pi and the Amiga. You'll need a TCP/IP stack installed and configured on the Amiga to be abe to access the internet.
154
155 - **[Instructions for [Roadshow](http://roadshow.apc-tcp.de/index-en.php)**]
156 Roadshow is a proprietary software that costs €25.00. There's also a demo version that will shutdown after 15 minutes of usage.
157     - Install Roadshow. If you already have Roadshow installed and configured on your HD image manually add the content of the following files instead of copying their contents over, or you will lose your current network setup.
158     - Copy [`A314Eth`](software-amiga/eth-config-amiga/A314Eth) to DEVS:NetInterfaces/
159     ```
160      COPY PISTORM:a314/eth-config-amiga/A314Eth DEVS:NetInterfaces/
161     ```
162     - Copy [`routes`](software-amiga/eth-config-amiga/routes) to DEVS:Internet/
163     ```
164      COPY PISTORM:a314/eth-config-amiga/routes DEVS:Internet/
165     ```
166     - Copy [`name-resolution`](software-amiga/eth-config-amiga/name_resolution) to DEVS:Internet/
167     - Congratulations, you have set the a314 networking on your pistorm. Check if everything worked on your Amiga Shell:
168     ```
169     ping www.google.com
170     ```
171
172
173 - **[Instructions for [AmiTCP](https://aminet.net/package/comm/net/AmiTCP-bin-30b2)**]
174     - Copy devicefiles:
175     ```
176     copy pistorm:a314/a314.device DEVS:
177     copy pistorm:a314/a314eth.device DEVS:
178     ```
179     Start Install AmiTCP-3.0b2:
180     - Intermediate User -> Proceed With Install
181     - Install for Real, Log None -> Proceed
182     - Select directory where to install: Work:AmiTCP-3.0b2 -> Proceed
183     - Confirm the copy -> Skip This Part (do 4 times)
184     - Do you want to install example Sana-II configuration files? -> Yes
185     - Select Sana-II configuration files to be copied: -> Proceed with Copy
186     - Do you want to install Napsaterm fonts -> Yes
187     - Select directory where to install Napsaterm fonts: fonts: -> Proceed
188     - Logging in as 'root'... -> Proceed
189     - Give empty password and close login window
190     - Enter default user name: user -> Proceed
191     - Enter the host name of your computer: amiga -> Proceed
192     - Enter domain part of your host name: local -> Proceed
193     - The host name "amiga.local" will be stored... -> Store to ENV(ARC):
194     - Give aliases... (leave empty) -> Proceed
195     - Select a SANA-II device driver: -> Parent Drawer -> a314eth.device -> Proceed
196     - Select unit number: 0 -> Proceed
197     - IP address: 192.168.2.2 -> Proceed
198     - Give destination address... (leave empty) -> Proceed
199     - Netmask of network on interface: 255.255.255.0 -> Proceed
200     - Is this correct? -> Yes
201     - Select a SANA-II device driver: (leave empty) -> Proceed
202     - Enter the IP address of the default gateway: 192.168.2.1 -> Proceed
203     - Give domain names: (leave default) -> Proceed
204     - Give domain names: (leave empty) -> Proceed
205     - Give the IP addresses of the name servers: 1.1.1.1 -> Proceed
206     - Give the IP addresses of the name servers: 1.0.0.1 -> Proceed
207     - Give the IP addresses of the name servers: (leave empty) -> Proceed
208     - Do you want the AmiTCP/IP to be started at the system startup? -> Yes
209     - Do you want Installer to make the rquired chages to yout s:user-startup script? -> Yes
210     - Do you want the Inetd to be started at the AmiTCP/IP startup -> Yes
211     - Quit readme with q-key.
212     - Installation complete! -> Proceed
213
214     `ed s:user-startup`
215     - Remove login-line (ESC,D,enter)
216     - To suppress CLI-window at startup, modify `run AmiTCP:bin/startnet` line to `run >NIL: AmiTCP:bin/startnet`
217     - Save and exit (ESC,x,enter)
218     
219     `ed Work:AmiTCP-3.0b2/db/interfaces`
220     - Add line: `eth dev=devs:a314eth.device`
221     - Save and exit (ESC,x,enter)
222
223     `ed Work:AmiTCP-3.0b2/bin/startnet`
224     - modify ifconfig-lines:
225     ```
226     AmiTCP:bin/ifconfig lo0 localhost
227     AmiTCP:bin/ifconfig eth0 192.168.2.2 netmask 255.255.255.0
228     ```
229     - Make sure that startnet executable bit is set:
230     ```
231     protect Work:AmiTCP-3.0b2/bin/startnet +s
232     ```
233     - Congratulations, you have set the a314 networking on your pistorm. Check if everything worked on your Amiga Shell:
234     ```
235     ping www.google.com
236     ```    
237     
238 ### PiAudio, RemoteWB, VideoPlayer are **not supported, and it's unlikely it will ever be as the PiStorm doesn't have full access to the Chip RAM bus.**
239
240 ---