Skip to content

Commit de63222

Browse files
committed
1) Added 68020-60 fastcall targets
2) Added vasm compiler file 3) Reset the VT52 console on exit 4) Added 'sane' command 5) Much TOS startup code has been moved from _early_init to init methods. There was no need to do much startup if vim was exec'd with the -h option for example.
1 parent 0120f5f commit de63222

19 files changed

+529
-162
lines changed

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,15 @@ The following [help document](runtime_tos/doc/os_atari.txt) can also be viewed i
2424
*TOS_01* Introduction *atari*
2525

2626
The distribution contains tiny, small and normal feature builds. The
27-
executables are named vimt.ttp, vims.ttp and vim.ttp respectively.
27+
executables are named vimt.ttp, vims.ttp and vim.ttp respectively. There are
28+
also 68020-60 builds of each.
2829

2930
vimt.ttp starts and quits much faster than vim.ttp and is also much smaller
3031
(~450Kb vs. ~1Mb) but has far fewer features (e.g. splits, command windows and
3132
eval are missing).
3233

3334
Use the :version command to check what features a build has.
3435

35-
Advanced features such as tags and syntax highlighting are slow, even on
36-
an accelerated machine. Tags are usable as long as tag files are kept
37-
reasonably small. Syntax highlighting performance can be improved a little by
38-
limiting the number of columns that are parsed (set synmaxcol=n).
39-
Core features perform quite well. You might need to experiment with Vim
40-
options to make things work.
41-
4236
==============================================================================
4337

4438
*TOS_02* Installation
@@ -73,32 +67,31 @@ They could be used to conditionally set options in your vimrc.
7367
You may need to test for the availability of a feature in vimrc. Do this
7468
using has(), e.g.
7569

76-
if has("compiler")
77-
compiler DEVPAC
78-
endif
79-
80-
if has("eval")
81-
color BLUE
82-
endif
70+
if has("eval")
71+
compiler DEVPAC
72+
color BLUE
73+
endif
8374

84-
if has("eval") && v:os=="TOS"
85-
" set options, define functions. Whatever you want
86-
endif
75+
if has("eval") && v:os=="TOS"
76+
" set options, define functions. Whatever you want
77+
endif
8778

8879
ATARI Vim looks for vimrc files in the usual places. Check where these are
8980
using the :version command.
9081

82+
It is recommended to store user files in $HOME\vimfiles.
83+
9184
==============================================================================
9285

9386
*TOS_03* Using a Shell *shell* *gulam*
9487

9588
Any shell that sets the _shell_p vector can be used, e.g. Gulam.
9689

97-
:lmake and :lopen can be used in vim.ttp. By default Vim attempts to execute the
98-
make utility in the current working directory. If make is not installed, the
99-
simplest way to get this to work is to create a shell script called 'make.g'.
90+
:lmake and :lopen can be used in vim.ttp. By default Vim attempts to execute
91+
the make utility in the current working directory. If make is not installed,
92+
the simplest way to get this to work is to create a shell script.
10093

101-
e.g. make.g might contain:
94+
e.g. 'make.g' might contain:
10295

10396
d:\devpac\gen.ttp main.s
10497

@@ -110,17 +103,18 @@ Then to make, use:
110103

111104
:lmake
112105

113-
The cut down runtime includes compiler files for gcc and devpac. These files
114-
will format the error output from these programs for display by :lopen.
106+
The cut down runtime includes compiler files for gcc, devpac and vasm. These
107+
files will format the error output from these programs for display by :lopen.
115108

116109
For devpac you will need to set the default compiler first. Do this with the
117110
command:
118111

119112
:compiler DEVPAC
113+
:compiler<SP><TAB> to enumerate them
120114

121115
==============================================================================
122116

123-
*TOS_04* Setting the Palette *paltos* *palvim* *palmap* *color*
117+
*TOS_04* Setting the Palette *paltos* *palvim* *palmap* *sane*
124118

125119
Vim colours are numbered thus:
126120

@@ -191,13 +185,19 @@ e.g.
191185

192186
will map colour index 10 to Vim colour number 0 etc
193187

188+
:sane
189+
190+
Will restore your palette and resolution to their startup values.
191+
194192
==============================================================================
195193

196194
*TOS_05* Changing Resolution *rez*
197195

198196
:rez will display the current resolution.
199-
:rez name will set the named resolution
197+
:rez name will set the named resolution.
200198
:rez<SP><TAB> will allow you to <TAB> through all valid resolutions.
199+
:sane will restore your palette and resolution to their startup
200+
values.
201201

202202
When Vim is quit, the startup resolution is restored.
203203

@@ -207,7 +207,7 @@ The current resolution is stored in the variable |v:resolution|.
207207

208208
*TOS_06* Changing the Keyboard Repeat Rate *Kbrate*
209209

210-
:Kbrate Display the current setting
210+
:Kbrate Display the current setting.
211211
:Kbrate initial every Set keypresses to repeat after an initial
212212
number of ticks and then every n 50/60Hz ticks.
213213

@@ -227,4 +227,6 @@ Changes to the existing code are wrapped with the 'TOS' macro.
227227
All os_atari_* files and Make_tos.mak are specific to this port.
228228

229229
==============================================================================
230+
231+
vim:tw=78:ts=8:ft=help:norl:noexpandtab:
230232
```

README_tos.txt

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
## Vim 7.4 for ATARI ST/TOS
2+
3+
[View the original README](README.txt)
4+
5+
The following [help document](runtime_tos/doc/os_atari.txt) can also be viewed in Vim using
6+
7+
`:help atari`
8+
9+
```
10+
*os_atari.txt* For Vim version 7.4. Last change: Sep 2024
11+
12+
Notes on the Atari TOS Port
13+
14+
|TOS_01| Introduction
15+
|TOS_02| Installation
16+
|TOS_03| Using a Shell
17+
|TOS_04| Setting the Palette
18+
|TOS_05| Changing Resolution
19+
|TOS_06| Changing the Keyboard Repeat Rate
20+
|TOS_07| Development
21+
22+
==============================================================================
23+
24+
*TOS_01* Introduction *atari*
25+
26+
The distribution contains tiny, small and normal feature builds. The
27+
executables are named vimt.ttp, vims.ttp and vim.ttp respectively. There are
28+
also 68020-60 builds of each.
29+
30+
vimt.ttp starts and quits much faster than vim.ttp and is also much smaller
31+
(~450Kb vs. ~1Mb) but has far fewer features (e.g. splits, command windows and
32+
eval are missing).
33+
34+
Use the :version command to check what features a build has.
35+
36+
==============================================================================
37+
38+
*TOS_02* Installation
39+
40+
The distribution includes a cut down runtime. You may use the full Vim runtime
41+
(or add files to it) if you wish but having fewer files to glob improves
42+
performance.
43+
44+
You should set the following environment variables in your shell:
45+
VIM
46+
VIMRUNTIME
47+
HOME
48+
TMP
49+
50+
However, if not set the following defaults are used:
51+
VIM=C:\VIM
52+
VIMRUNTIME=C:\VIM\RT
53+
54+
The following variables are available in the normal build (which supports the
55+
'eval' feature):
56+
57+
*v:resolution* The current resolution.
58+
Either st-{low,med,hi}, tt-{low,med,hi} or a Falcon mode
59+
such as 320x200, 384x240 etc
60+
*v:machine* The current machine.
61+
Either ST, STe, TT, Falcon or unknown
62+
*v:os* The current OS.
63+
Either TOS, MagiC, MiNT or Geneva
64+
65+
They could be used to conditionally set options in your vimrc.
66+
67+
You may need to test for the availability of a feature in vimrc. Do this
68+
using has(), e.g.
69+
70+
if has("eval")
71+
compiler DEVPAC
72+
color BLUE
73+
endif
74+
75+
if has("eval") && v:os=="TOS"
76+
" set options, define functions. Whatever you want
77+
endif
78+
79+
ATARI Vim looks for vimrc files in the usual places. Check where these are
80+
using the :version command.
81+
82+
It is recommended to store user files in $HOME\vimfiles.
83+
84+
==============================================================================
85+
86+
*TOS_03* Using a Shell *shell* *gulam*
87+
88+
Any shell that sets the _shell_p vector can be used, e.g. Gulam.
89+
90+
:lmake and :lopen can be used in vim.ttp. By default Vim attempts to execute
91+
the make utility in the current working directory. If make is not installed,
92+
the simplest way to get this to work is to create a shell script.
93+
94+
e.g. 'make.g' might contain:
95+
96+
d:\devpac\gen.ttp main.s
97+
98+
You will also need to set the make program like so:
99+
100+
:set makeprg=make.g
101+
102+
Then to make, use:
103+
104+
:lmake
105+
106+
The cut down runtime includes compiler files for gcc, devpac and vasm. These
107+
files will format the error output from these programs for display by :lopen.
108+
109+
For devpac you will need to set the default compiler first. Do this with the
110+
command:
111+
112+
:compiler DEVPAC
113+
:compiler<SP><TAB> to enumerate them
114+
115+
==============================================================================
116+
117+
*TOS_04* Setting the Palette *paltos* *palvim* *palmap* *sane*
118+
119+
Vim colours are numbered thus:
120+
121+
0 Black
122+
1 DarkBlue
123+
2 DarkGreen
124+
3 DarkCyan
125+
4 DarkRed
126+
5 DarkMagenta
127+
6 Brown
128+
7 LightGray
129+
8 DarkGray
130+
9 Blue
131+
10 Green
132+
11 Cyan
133+
12 Red
134+
13 Magenta
135+
14 Yellow
136+
15 White
137+
138+
When ATARI Vim starts it assumes that a default ST palette is set and maps Vim
139+
colours to ST colours as best it can.
140+
141+
The distribution includes many Vim colour schemes. Some target 256 colour
142+
xterm displays so will not display perfectly. Tab through all colour schemes
143+
with:
144+
145+
:color<SP><TAB>
146+
147+
For example, to set the blue scheme use:
148+
149+
:color blue
150+
151+
Remove a colour scheme using:
152+
153+
:color DEFAULT
154+
155+
You can check the current highlighting scheme using the :hi command. You may
156+
wish to override some highlighting options, e.g.
157+
158+
:hi Search ctermbg=0 ctermfg=15
159+
160+
:palvim (single TOS only)
161+
162+
Better colour compatibility is achieved by changing the ST palette to match
163+
Vim. A colour remapping occurs to ensure that the Vim background colour
164+
matches the border colour. When using a resolution with fewer than 16
165+
colours an additional colour remapping takes place. This port supports a
166+
maximum of 16 colours even on the TT and Falcon.
167+
168+
When Vim is quit, the startup palette is restored.
169+
170+
:paltos (single TOS only)
171+
172+
This sets a default ST palette, potentially overriding the palette set when
173+
Vim started.
174+
175+
When Vim is quit, the startup palette is restored.
176+
177+
:palmap {16 hex char string}
178+
179+
You may map your existing palette to the Vim colour numbers by supplying a 16
180+
character hex string; one hex digit per colour indexes 0 through to 15.
181+
182+
e.g.
183+
184+
:palmap abc0123456789def
185+
186+
will map colour index 10 to Vim colour number 0 etc
187+
188+
:sane
189+
190+
Will restore your palette and resolution to their startup values.
191+
192+
==============================================================================
193+
194+
*TOS_05* Changing Resolution *rez*
195+
196+
:rez will display the current resolution.
197+
:rez name will set the named resolution.
198+
:rez<SP><TAB> will allow you to <TAB> through all valid resolutions.
199+
:sane will restore your palette and resolution to their startup
200+
values.
201+
202+
When Vim is quit, the startup resolution is restored.
203+
204+
The current resolution is stored in the variable |v:resolution|.
205+
206+
==============================================================================
207+
208+
*TOS_06* Changing the Keyboard Repeat Rate *Kbrate*
209+
210+
:Kbrate Display the current setting.
211+
:Kbrate initial every Set keypresses to repeat after an initial
212+
number of ticks and then every n 50/60Hz ticks.
213+
214+
Typically, having multiple split windows open will slow down Vim. When Vim is
215+
slow you may find it useful to alter the Kbrate, particularly the 'every'
216+
value. Increasing it prevents the input buffer becoming too full and makes
217+
Vim feel more responsive.
218+
219+
When Vim is quit, the startup keyboard rate is restored.
220+
221+
==============================================================================
222+
223+
*TOS_07* Development *develop*
224+
225+
Changes to the existing code are wrapped with the 'TOS' macro.
226+
227+
All os_atari_* files and Make_tos.mak are specific to this port.
228+
229+
==============================================================================
230+
231+
vim:tw=78:ts=8:ft=help:norl:noexpandtab:
232+
```

runtime_tos/compiler/vasm.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
" Vim compiler file
2+
" Compiler: vasm assembler
3+
" Maintainer: Simon Laszcz
4+
" Latest Revision: 2024-09-27
5+
6+
if exists("current_compiler")
7+
finish
8+
endif
9+
let current_compiler = "vasm"
10+
11+
let s:cpo_save = &cpo
12+
set cpo&vim
13+
14+
CompilerSet errorformat=%E%.%#error\ %n\ in\ line\ %l\ of\ \"%f\":\ %m,%Z\>%m,%-G%.%#
15+
16+
let &cpo = s:cpo_save
17+
unlet s:cpo_save

0 commit comments

Comments
 (0)