Skip to content

Commit

Permalink
ATARI TOS port
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlaszcz committed May 24, 2024
1 parent ee48253 commit c2e38d4
Show file tree
Hide file tree
Showing 134 changed files with 25,990 additions and 79 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,12 @@ src/testdir/small.vim
src/testdir/tiny.vim
src/testdir/test*.out
src/testdir/test.log

# TOS
tostest/
tmp/
*.ttp
*.tos
log.*
tags
run.sh
2 changes: 2 additions & 0 deletions README_tos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:rez<SPACE><TAB> to change resolution
Current resolution from v:resolution variable
72 changes: 72 additions & 0 deletions runtime_tos/colors/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
README.txt for color scheme files

These files are used for the ":colorscheme" command. They appear in the
Edit/Color Scheme menu in the GUI.


Hints for writing a color scheme file:

There are two basic ways to define a color scheme:

1. Define a new Normal color and set the 'background' option accordingly.
set background={light or dark}
highlight clear
highlight Normal ...
...

2. Use the default Normal color and automatically adjust to the value of
'background'.
highlight clear Normal
set background&
highlight clear
if &background == "light"
highlight Error ...
...
else
highlight Error ...
...
endif

You can use ":highlight clear" to reset everything to the defaults, and then
change the groups that you want differently. This also will work for groups
that are added in later versions of Vim.
Note that ":highlight clear" uses the value of 'background', thus set it
before this command.
Some attributes (e.g., bold) might be set in the defaults that you want
removed in your color scheme. Use something like "gui=NONE" to remove the
attributes.

In case you want to set 'background' depending on the colorscheme selected,
this autocmd might be useful:
autocmd SourcePre */colors/blue_sky.vim set background=dark
Replace "blue_sky" with the name of the colorscheme.

In case you want to tweak a colorscheme after it was loaded, check out that
ColorScheme autocmd event.

To see which highlight group is used where, find the help for
"highlight-groups" and "group-name".

You can use ":highlight" to find out the current colors. Exception: the
ctermfg and ctermbg values are numbers, which are only valid for the current
terminal. Use the color names instead. See ":help cterm-colors".

The default color settings can be found in the source file src/syntax.c.
Search for "highlight_init".

If you think you have a color scheme that is good enough to be used by others,
please check the following items:

- Does it work in a color terminal as well as in the GUI?
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
it this way:
let g:colors_name = expand('<sfile>:t:r')
- Is 'background' either used or appropriately set to "light" or "dark"?
- Try setting 'hlsearch' and searching for a pattern, is the match easy to
spot?
- Split a window with ":split" and ":vsplit". Are the status lines and
vertical separators clearly visible?
- In the GUI, is it easy to find the cursor, also in a file with lots of
syntax highlighting?
- Do not use hard coded escape sequences, these will not work in other
terminals. Always use color names or #RRGGBB for the GUI.
55 changes: 55 additions & 0 deletions runtime_tos/colors/blue.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
" local syntax file - set colors on a per-machine basis:
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Steven Vertigan <[email protected]>
" Last Change: 2006 Sep 23
" Revision #5: Switch main text from white to yellow for easier contrast,
" fixed some problems with terminal backgrounds.

set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "blue"
hi Normal guifg=yellow guibg=darkBlue ctermfg=yellow ctermbg=darkBlue
hi NonText guifg=magenta ctermfg=lightMagenta
hi comment guifg=gray ctermfg=gray ctermbg=darkBlue gui=bold
hi constant guifg=cyan ctermfg=cyan
hi identifier guifg=gray ctermfg=red
hi statement guifg=white ctermfg=white ctermbg=darkBlue gui=none
hi preproc guifg=green ctermfg=green
hi type guifg=orange ctermfg=lightRed ctermbg=darkBlue
hi special guifg=magenta ctermfg=lightMagenta ctermbg=darkBlue
hi Underlined guifg=cyan ctermfg=cyan gui=underline cterm=underline
hi label guifg=yellow ctermfg=yellow
hi operator guifg=orange gui=bold ctermfg=lightRed ctermbg=darkBlue

hi ErrorMsg guifg=orange guibg=darkBlue ctermfg=lightRed
hi WarningMsg guifg=cyan guibg=darkBlue ctermfg=cyan gui=bold
hi ModeMsg guifg=yellow gui=NONE ctermfg=yellow
hi MoreMsg guifg=yellow gui=NONE ctermfg=yellow
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red

hi Todo guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
hi Cursor guifg=black guibg=white ctermfg=black ctermbg=white
hi Search guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
hi IncSearch guifg=black guibg=yellow ctermfg=black ctermbg=darkYellow
hi LineNr guifg=cyan ctermfg=cyan
hi title guifg=white gui=bold cterm=bold

hi StatusLineNC gui=NONE guifg=black guibg=blue ctermfg=black ctermbg=blue
hi StatusLine gui=bold guifg=cyan guibg=blue ctermfg=cyan ctermbg=blue
hi VertSplit gui=none guifg=blue guibg=blue ctermfg=blue ctermbg=blue

hi Visual term=reverse ctermfg=black ctermbg=darkCyan guifg=black guibg=darkCyan

hi DiffChange guibg=darkGreen guifg=black ctermbg=darkGreen ctermfg=black
hi DiffText guibg=olivedrab guifg=black ctermbg=lightGreen ctermfg=black
hi DiffAdd guibg=slateblue guifg=black ctermbg=blue ctermfg=black
hi DiffDelete guibg=coral guifg=black ctermbg=cyan ctermfg=black

hi Folded guibg=orange guifg=black ctermbg=yellow ctermfg=black
hi FoldColumn guibg=gray30 guifg=black ctermbg=gray ctermfg=black
hi cIf0 guifg=gray ctermfg=gray

66 changes: 66 additions & 0 deletions runtime_tos/colors/darkblue.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
" Vim color file
" Maintainer: Bohdan Vlasyuk <[email protected]>
" Last Change: 2008 Jul 18

" darkblue -- for those who prefer dark background
" [note: looks bit uglier with come terminal palettes,
" but is fine on default linux console palette.]

set bg=dark
hi clear
if exists("syntax_on")
syntax reset
endif

let colors_name = "darkblue"

hi Normal guifg=#c0c0c0 guibg=#000040 ctermfg=gray ctermbg=black
hi ErrorMsg guifg=#ffffff guibg=#287eff ctermfg=white ctermbg=lightblue
hi Visual guifg=#8080ff guibg=fg gui=reverse ctermfg=lightblue ctermbg=fg cterm=reverse
hi VisualNOS guifg=#8080ff guibg=fg gui=reverse,underline ctermfg=lightblue ctermbg=fg cterm=reverse,underline
hi Todo guifg=#d14a14 guibg=#1248d1 ctermfg=red ctermbg=darkblue
hi Search guifg=#90fff0 guibg=#2050d0 ctermfg=white ctermbg=darkblue cterm=underline term=underline
hi IncSearch guifg=#b0ffff guibg=#2050d0 ctermfg=darkblue ctermbg=gray

hi SpecialKey guifg=cyan ctermfg=darkcyan
hi Directory guifg=cyan ctermfg=cyan
hi Title guifg=magenta gui=none ctermfg=magenta cterm=bold
hi WarningMsg guifg=red ctermfg=red
hi WildMenu guifg=yellow guibg=black ctermfg=yellow ctermbg=black cterm=none term=none
hi ModeMsg guifg=#22cce2 ctermfg=lightblue
hi MoreMsg ctermfg=darkgreen ctermfg=darkgreen
hi Question guifg=green gui=none ctermfg=green cterm=none
hi NonText guifg=#0030ff ctermfg=darkblue

hi StatusLine guifg=blue guibg=darkgray gui=none ctermfg=blue ctermbg=gray term=none cterm=none
hi StatusLineNC guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=gray term=none cterm=none
hi VertSplit guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=gray term=none cterm=none

hi Folded guifg=#808080 guibg=#000040 ctermfg=darkgrey ctermbg=black cterm=bold term=bold
hi FoldColumn guifg=#808080 guibg=#000040 ctermfg=darkgrey ctermbg=black cterm=bold term=bold
hi LineNr guifg=#90f020 ctermfg=green cterm=none

hi DiffAdd guibg=darkblue ctermbg=darkblue term=none cterm=none
hi DiffChange guibg=darkmagenta ctermbg=magenta cterm=none
hi DiffDelete ctermfg=blue ctermbg=cyan gui=bold guifg=Blue guibg=DarkCyan
hi DiffText cterm=bold ctermbg=red gui=bold guibg=Red

hi Cursor guifg=black guibg=yellow ctermfg=black ctermbg=yellow
hi lCursor guifg=black guibg=white ctermfg=black ctermbg=white


hi Comment guifg=#80a0ff ctermfg=darkred
hi Constant ctermfg=magenta guifg=#ffa0a0 cterm=none
hi Special ctermfg=brown guifg=Orange cterm=none gui=none
hi Identifier ctermfg=cyan guifg=#40ffff cterm=none
hi Statement ctermfg=yellow cterm=none guifg=#ffff60 gui=none
hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none
hi type ctermfg=green guifg=#60ff60 gui=none cterm=none
hi Underlined cterm=underline term=underline
hi Ignore guifg=bg ctermfg=bg

" suggested by tigmoid, 2008 Jul 18
hi Pmenu guifg=#c0c0c0 guibg=#404080
hi PmenuSel guifg=#c0c0c0 guibg=#2050d0
hi PmenuSbar guifg=blue guibg=darkgray
hi PmenuThumb guifg=#c0c0c0
23 changes: 23 additions & 0 deletions runtime_tos/colors/default.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
" Vim color file
" Maintainer: Bram Moolenaar <[email protected]>
" Last Change: 2001 Jul 23

" This is the default color scheme. It doesn't define the Normal
" highlighting, it uses whatever the colors used to be.

" Set 'background' back to the default. The value can't always be estimated
" and is then guessed.
hi clear Normal
set bg&

" Remove all existing highlighting and set the defaults.
hi clear

" Load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif

let colors_name = "default"

" vim: sw=2
55 changes: 55 additions & 0 deletions runtime_tos/colors/delek.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
" Vim color file
" Maintainer: David Schweikert <[email protected]>
" Last Change: 2014 Mar 19

hi clear

let g:colors_name = "delek"

" Normal should come first
hi Normal guifg=Black guibg=White
hi Cursor guifg=bg guibg=fg
hi lCursor guifg=NONE guibg=Cyan

" Note: we never set 'term' because the defaults for B&W terminals are OK
hi DiffAdd ctermbg=LightBlue guibg=LightBlue
hi DiffChange ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi DiffText ctermbg=Red cterm=bold gui=bold guibg=Red
hi Directory ctermfg=DarkBlue guifg=Blue
hi ErrorMsg ctermfg=White ctermbg=DarkRed guibg=Red guifg=White
hi FoldColumn ctermfg=DarkBlue ctermbg=Grey guibg=Grey guifg=DarkBlue
hi Folded ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi IncSearch cterm=reverse gui=reverse
hi LineNr ctermfg=Brown guifg=Brown
hi ModeMsg cterm=bold gui=bold
hi MoreMsg ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi NonText ctermfg=Blue gui=bold guifg=gray guibg=white
hi Pmenu guibg=LightBlue
hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
hi Question ctermfg=DarkGreen gui=bold guifg=SeaGreen
if &background == "light"
hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE
else
hi Search ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
endif
hi SpecialKey ctermfg=DarkBlue guifg=Blue
hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue
hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
hi Title ctermfg=DarkMagenta gui=bold guifg=Magenta
hi VertSplit cterm=reverse gui=reverse
hi Visual ctermbg=NONE cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS cterm=underline,bold gui=underline,bold
hi WarningMsg ctermfg=DarkRed guifg=Red
hi WildMenu ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black

" syntax highlighting
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
hi Constant cterm=NONE ctermfg=DarkGreen gui=NONE guifg=green3
hi Identifier cterm=NONE ctermfg=DarkCyan gui=NONE guifg=cyan4
hi PreProc cterm=NONE ctermfg=DarkMagenta gui=NONE guifg=magenta3
hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=deeppink
hi Statement cterm=bold ctermfg=Blue gui=bold guifg=blue
hi Type cterm=NONE ctermfg=Blue gui=bold guifg=blue

" vim: sw=2
Loading

0 comments on commit c2e38d4

Please sign in to comment.