├── src
├── symbol_table.cpp
├── testmain.cpp
├── petscii.h
├── chars.h
├── fuzz.cpp
├── keycodes.h
├── test_utils.h
├── 6502.h
├── cart.h
├── script.h
├── sha512.h
├── sectiontest.cpp
└── gtest.cpp
├── external
├── lzsa
│ ├── .gitignore
│ ├── VS2017
│ │ ├── .gitignore
│ │ └── lzsa.sln
│ ├── pareto_graph.png
│ ├── src
│ │ ├── matchfinder.c
│ │ └── libdivsufsort
│ │ │ ├── include
│ │ │ └── divsufsort_config.h
│ │ │ ├── pkgconfig
│ │ │ ├── libdivsufsort.pc.cmake
│ │ │ └── CMakeLists.txt
│ │ │ ├── .gitignore
│ │ │ ├── examples
│ │ │ └── CMakeLists.txt
│ │ │ ├── CMakeModules
│ │ │ ├── CheckFunctionKeywords.cmake
│ │ │ ├── cmake_uninstall.cmake.in
│ │ │ ├── AppendCompilerFlags.cmake
│ │ │ └── ProjectCPack.cmake
│ │ │ ├── CHANGELOG.md
│ │ │ ├── VERSION.cmake
│ │ │ ├── LICENSE
│ │ │ └── lib
│ │ │ └── CMakeLists.txt
│ ├── LICENSE
│ ├── LICENSE.zlib.md
│ ├── Makefile
│ └── StreamFormat.md
├── fmt
│ ├── support
│ │ ├── rtd
│ │ │ ├── theme
│ │ │ │ ├── theme.conf
│ │ │ │ └── layout.html
│ │ │ ├── index.rst
│ │ │ └── conf.py
│ │ ├── AndroidManifest.xml
│ │ ├── cmake
│ │ │ ├── fmt-config.cmake.in
│ │ │ ├── fmt.pc.in
│ │ │ ├── FindSetEnv.cmake
│ │ │ └── JoinPaths.cmake
│ │ ├── README
│ │ ├── Android.mk
│ │ ├── Vagrantfile
│ │ ├── appveyor.yml
│ │ ├── fmt.pro
│ │ ├── update-coverity-branch.py
│ │ ├── appveyor-build.py
│ │ └── compute-powers.py
│ ├── doc
│ │ ├── basic-bootstrap
│ │ │ ├── theme.conf
│ │ │ └── README
│ │ ├── contents.rst
│ │ ├── _static
│ │ │ ├── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ └── glyphicons-halflings-regular.woff
│ │ │ └── breathe.css
│ │ ├── bootstrap
│ │ │ ├── mixins
│ │ │ │ ├── center-block.less
│ │ │ │ ├── text-emphasis.less
│ │ │ │ ├── size.less
│ │ │ │ ├── background-variant.less
│ │ │ │ ├── opacity.less
│ │ │ │ ├── text-overflow.less
│ │ │ │ ├── tab-focus.less
│ │ │ │ ├── labels.less
│ │ │ │ ├── resize.less
│ │ │ │ ├── progress-bar.less
│ │ │ │ ├── nav-divider.less
│ │ │ │ ├── reset-filter.less
│ │ │ │ ├── alerts.less
│ │ │ │ ├── nav-vertical-align.less
│ │ │ │ ├── responsive-visibility.less
│ │ │ │ ├── pagination.less
│ │ │ │ ├── border-radius.less
│ │ │ │ ├── panels.less
│ │ │ │ ├── list-group.less
│ │ │ │ ├── hide-text.less
│ │ │ │ ├── clearfix.less
│ │ │ │ ├── table-row.less
│ │ │ │ ├── image.less
│ │ │ │ └── buttons.less
│ │ │ ├── wells.less
│ │ │ ├── breadcrumbs.less
│ │ │ ├── responsive-embed.less
│ │ │ ├── component-animations.less
│ │ │ ├── close.less
│ │ │ ├── thumbnails.less
│ │ │ ├── utilities.less
│ │ │ ├── media.less
│ │ │ ├── pager.less
│ │ │ ├── jumbotron.less
│ │ │ ├── mixins.less
│ │ │ ├── bootstrap.less
│ │ │ ├── labels.less
│ │ │ ├── badges.less
│ │ │ ├── code.less
│ │ │ ├── grid.less
│ │ │ └── alerts.less
│ │ ├── CMakeLists.txt
│ │ └── fmt.less
│ ├── test
│ │ ├── fuzzing
│ │ │ ├── .gitignore
│ │ │ ├── main.cc
│ │ │ ├── README.md
│ │ │ ├── float.cc
│ │ │ └── CMakeLists.txt
│ │ ├── header-only-test.cc
│ │ ├── header-only-test2.cc
│ │ ├── find-package-test
│ │ │ ├── main.cc
│ │ │ └── CMakeLists.txt
│ │ ├── add-subdirectory-test
│ │ │ ├── main.cc
│ │ │ └── CMakeLists.txt
│ │ ├── cuda-test
│ │ │ ├── cpp14.cc
│ │ │ └── cuda-cpp14.cu
│ │ ├── test-assert.h
│ │ ├── assert-test.cc
│ │ ├── test-main.cc
│ │ ├── util.cc
│ │ └── mock-allocator.h
│ ├── include
│ │ └── fmt
│ │ │ └── posix.h
│ ├── .clang-format
│ ├── pull_request_template.md
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ └── LICENSE.rst
├── CLI11
│ ├── .codecov.yml
│ ├── .gitignore
│ ├── .editorconfig
│ ├── scripts
│ │ ├── check_style.sh
│ │ ├── check_style_docker.sh
│ │ ├── ExtractVersion.py
│ │ ├── UpdateDownloadProj.py
│ │ └── clang-format-pre-commit
│ ├── .ci
│ │ ├── azure-test.yml
│ │ ├── azure-build.yml
│ │ ├── build_lcov.sh
│ │ ├── build_doxygen.sh
│ │ ├── make_and_test.sh
│ │ ├── azure-cmake.yml
│ │ └── run_codecov.sh
│ ├── .gitmodules
│ ├── meson.build
│ ├── include
│ │ └── CLI
│ │ │ ├── Version.hpp
│ │ │ ├── CLI.hpp
│ │ │ └── Macros.hpp
│ ├── cmake
│ │ ├── CLI11ConfigVersion.cmake.in
│ │ └── AddGoogletest.cmake
│ ├── .clang-tidy
│ ├── .appveyor.yml
│ ├── conanfile.py
│ └── LICENSE
├── sol3
│ ├── sol2.pc.in
│ ├── meson_options.txt
│ ├── subprojects
│ │ └── lua.wrap
│ ├── .style.yapf
│ ├── include
│ │ └── sol
│ │ │ ├── compatibility
│ │ │ └── compat-5.4.h
│ │ │ ├── stack_get.hpp
│ │ │ ├── stack_check.hpp
│ │ │ ├── stack_check_get.hpp
│ │ │ ├── stack_get_qualified.hpp
│ │ │ ├── deprecate.hpp
│ │ │ └── function_types_core.hpp
│ ├── .github
│ │ ├── ISSUE_TEMPLATE.md
│ │ └── FUNDING.yml
│ ├── sol2.natvis
│ ├── CONTRIBUTORS.md
│ ├── LICENSE.txt
│ ├── CONTRIBUTING.md
│ ├── .dockerignore
│ ├── scripts
│ │ └── preparation.osx.sh
│ ├── cmake
│ │ ├── Modules
│ │ │ └── Common
│ │ │ │ └── Core.cmake
│ │ └── sol2-config.cmake.in
│ └── meson.build
├── lua
│ ├── lua.hpp
│ ├── lapi.h
│ ├── CMakeLists.txt
│ ├── lundump.h
│ ├── lprefix.h
│ ├── lualib.h
│ ├── ldebug.h
│ ├── lstring.h
│ ├── lzio.c
│ ├── lzio.h
│ └── lfunc.h
├── ansi
│ ├── terminal.cpp
│ ├── CMakeLists.txt
│ ├── localconsole.h
│ └── terminal.h
└── coreutils
│ ├── CMakeLists.txt
│ └── src
│ └── coreutils
│ ├── format.cpp
│ └── format.h
├── asm
├── test_include.i
├── other.i
├── a2600
│ └── dasm
├── nes
│ ├── mario.chr
│ └── helloworld.nes
├── loader.asm
├── jumps.asm
├── cart.asm
├── vic.inc
├── simple_scroller.asm
├── x16.inc
├── sub.asm
├── music2.asm
├── simple_scroller2.asm
├── c64.asm
├── font.asm
├── week.asm
├── bank.asm
├── pet100.inc
└── bubble.asm
├── tests
├── include_err.asm
├── err_fn.asm
├── err_labels.asm
├── err_rept.asm
├── err_align.asm
├── err_undef.asm
├── basic_errors.asm
├── err_enum.asm
├── recursive_labels.asm
├── err_lua.asm
├── err_section.asm
├── err_enum2.asm
├── err_block.asm
├── eot_comment.asm
├── err_macro.asm
├── err_overlap.asm
├── lua.asm
├── err_if.asm
├── include.asm
├── arraymul.asm
├── png.asm
├── lambda.asm
├── macro_symbol.asm
├── eot.asm
├── define.asm
├── section_move.asm
├── flags.asm
├── rept.asm
├── str_concat.asm
├── tern.asm
├── if.asm
├── illegals.asm
├── slice.asm
├── macro.asm
├── operators.asm
├── copy_test.asm
├── sections.asm
├── 65c02.asm
├── special_labels.asm
├── vector.asm
└── index_labels.asm
├── data
├── face.png
├── ff.png
├── oys.koa
├── test.png
├── test.sid
├── test2.png
├── test3.png
├── tiles.png
├── archmage.koa
├── mountain.png
└── petscii
│ ├── bigc.c64
│ ├── floppy.c64
│ ├── gary.c64
│ ├── mantis.c64
│ ├── ninja.c64
│ ├── pilt.c64
│ ├── play.c64
│ ├── robot.c64
│ ├── santa.c64
│ ├── saved.c64
│ ├── victor.c64
│ ├── voodoo.c64
│ ├── white.c64
│ └── evening.c64
├── .gitignore
├── lua
├── test.lua
└── sid.lua
├── docs
├── INDEX.adoc
└── TESTS.adoc
├── .travis.yml
└── Makefile
/src/symbol_table.cpp:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/external/lzsa/.gitignore:
--------------------------------------------------------------------------------
1 | obj
2 | lzsa
3 |
--------------------------------------------------------------------------------
/asm/test_include.i:
--------------------------------------------------------------------------------
1 |
2 | !include "other.i"
3 |
4 | Z = 3
5 |
--------------------------------------------------------------------------------
/external/lzsa/VS2017/.gitignore:
--------------------------------------------------------------------------------
1 | .vs
2 | Debug
3 | Release
4 |
--------------------------------------------------------------------------------
/tests/include_err.asm:
--------------------------------------------------------------------------------
1 |
2 | !include "err_undef.asm"
3 |
--------------------------------------------------------------------------------
/asm/other.i:
--------------------------------------------------------------------------------
1 |
2 |
3 | P = 4
4 |
5 | code:
6 | nop
7 | rts
8 |
--------------------------------------------------------------------------------
/data/face.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/face.png
--------------------------------------------------------------------------------
/data/ff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/ff.png
--------------------------------------------------------------------------------
/data/oys.koa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/oys.koa
--------------------------------------------------------------------------------
/data/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/test.png
--------------------------------------------------------------------------------
/data/test.sid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/test.sid
--------------------------------------------------------------------------------
/external/fmt/support/rtd/theme/theme.conf:
--------------------------------------------------------------------------------
1 | [theme]
2 | inherit = basic
3 |
--------------------------------------------------------------------------------
/asm/a2600/dasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/asm/a2600/dasm
--------------------------------------------------------------------------------
/data/test2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/test2.png
--------------------------------------------------------------------------------
/data/test3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/test3.png
--------------------------------------------------------------------------------
/data/tiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/tiles.png
--------------------------------------------------------------------------------
/external/fmt/doc/basic-bootstrap/theme.conf:
--------------------------------------------------------------------------------
1 | [theme]
2 | inherit = basic
3 |
--------------------------------------------------------------------------------
/external/fmt/support/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/tests/err_fn.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | ;!error Unknown
4 | !fill 10 { notKnown() }
5 |
--------------------------------------------------------------------------------
/tests/err_labels.asm:
--------------------------------------------------------------------------------
1 |
2 | same_label
3 | ;!error already
4 | same_label
5 |
--------------------------------------------------------------------------------
/asm/nes/mario.chr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/asm/nes/mario.chr
--------------------------------------------------------------------------------
/data/archmage.koa:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/archmage.koa
--------------------------------------------------------------------------------
/data/mountain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/mountain.png
--------------------------------------------------------------------------------
/external/CLI11/.codecov.yml:
--------------------------------------------------------------------------------
1 |
2 | ignore:
3 | - "tests"
4 | - "examples"
5 |
--------------------------------------------------------------------------------
/src/testmain.cpp:
--------------------------------------------------------------------------------
1 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
2 | #include "doctest.h"
--------------------------------------------------------------------------------
/tests/err_rept.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | ;!error Undefined
4 | !rept 5 { lda #xx }
5 |
--------------------------------------------------------------------------------
/tests/err_align.asm:
--------------------------------------------------------------------------------
1 |
2 | ;
3 | ;
4 | ; !error syntax
5 | !align :$:
6 | rts
7 |
--------------------------------------------------------------------------------
/asm/nes/helloworld.nes:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/asm/nes/helloworld.nes
--------------------------------------------------------------------------------
/data/petscii/bigc.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/bigc.c64
--------------------------------------------------------------------------------
/data/petscii/floppy.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/floppy.c64
--------------------------------------------------------------------------------
/data/petscii/gary.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/gary.c64
--------------------------------------------------------------------------------
/data/petscii/mantis.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/mantis.c64
--------------------------------------------------------------------------------
/data/petscii/ninja.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/ninja.c64
--------------------------------------------------------------------------------
/data/petscii/pilt.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/pilt.c64
--------------------------------------------------------------------------------
/data/petscii/play.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/play.c64
--------------------------------------------------------------------------------
/data/petscii/robot.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/robot.c64
--------------------------------------------------------------------------------
/data/petscii/santa.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/santa.c64
--------------------------------------------------------------------------------
/data/petscii/saved.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/saved.c64
--------------------------------------------------------------------------------
/data/petscii/victor.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/victor.c64
--------------------------------------------------------------------------------
/data/petscii/voodoo.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/voodoo.c64
--------------------------------------------------------------------------------
/data/petscii/white.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/white.c64
--------------------------------------------------------------------------------
/tests/err_undef.asm:
--------------------------------------------------------------------------------
1 |
2 | ;!error Undefined
3 | lda #something
4 |
5 | rts
6 |
--------------------------------------------------------------------------------
/data/petscii/evening.c64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/data/petscii/evening.c64
--------------------------------------------------------------------------------
/tests/basic_errors.asm:
--------------------------------------------------------------------------------
1 |
2 | start:
3 | ;!error Illegal instruction
4 | xyz #45
5 |
6 |
--------------------------------------------------------------------------------
/external/fmt/test/fuzzing/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore artifacts from the build.sh script
2 | build-*/
3 |
4 |
--------------------------------------------------------------------------------
/tests/err_enum.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | ; !error error
4 | !enum Test {
5 | Poo = 3
6 | !nested
7 | }
8 |
--------------------------------------------------------------------------------
/tests/recursive_labels.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | poop:
4 | !rept 4 {
5 | .hello[i]:
6 | nop
7 | }
8 |
--------------------------------------------------------------------------------
/external/fmt/test/header-only-test.cc:
--------------------------------------------------------------------------------
1 | // Header-only configuration test
2 |
3 | #include "fmt/core.h"
4 |
--------------------------------------------------------------------------------
/external/lzsa/pareto_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/external/lzsa/pareto_graph.png
--------------------------------------------------------------------------------
/tests/err_lua.asm:
--------------------------------------------------------------------------------
1 | ;
2 | ;
3 | ;
4 | %{
5 | a = 3
6 | -- !error lua
7 | lua&error::
8 | }%
9 |
--------------------------------------------------------------------------------
/tests/err_section.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | ;!error Undefined
4 | !section "main", undefined
5 |
6 | rts
7 |
8 |
--------------------------------------------------------------------------------
/external/lzsa/src/matchfinder.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/external/lzsa/src/matchfinder.c
--------------------------------------------------------------------------------
/external/fmt/include/fmt/posix.h:
--------------------------------------------------------------------------------
1 | #include "os.h"
2 | #warning "fmt/posix.h is deprecated; use fmt/os.h instead"
3 |
--------------------------------------------------------------------------------
/tests/err_enum2.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | !enum Hey {
4 | Poo = 3
5 | Acc
6 | ; !error Undefined
7 | Me = undefined
8 | }
9 |
--------------------------------------------------------------------------------
/asm/loader.asm:
--------------------------------------------------------------------------------
1 | unpack_next: ldx #$01
2 | begin_intro: jmp relocate_code
3 |
4 | relocate_code:
5 | nop
6 |
7 |
--------------------------------------------------------------------------------
/external/fmt/test/header-only-test2.cc:
--------------------------------------------------------------------------------
1 | // Additional translation unit for the header-only configuration test
2 |
3 | #include "fmt/core.h"
4 |
--------------------------------------------------------------------------------
/tests/err_block.asm:
--------------------------------------------------------------------------------
1 |
2 | ;
3 | ; test
4 | ;
5 | ;!error syntax
6 | !macro hey(x {
7 | }
8 |
9 | nop
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | fuzz/
3 | *.prg
4 | *.def
5 | .vscode/
6 | cmake-*/
7 | compile_commands.json
8 | .vs/
9 | CMakeSettings.json
10 |
11 |
--------------------------------------------------------------------------------
/asm/jumps.asm:
--------------------------------------------------------------------------------
1 | START
2 | jmp LATER
3 |
4 | Sub: clc
5 | bcs START
6 | rts
7 |
8 | LATER
9 | jsr Sub
10 | lda #8
11 | rts
12 |
13 |
--------------------------------------------------------------------------------
/external/fmt/support/rtd/index.rst:
--------------------------------------------------------------------------------
1 | If you are not redirected automatically, follow the
2 | `link to the fmt documentation `_.
3 |
--------------------------------------------------------------------------------
/external/fmt/doc/contents.rst:
--------------------------------------------------------------------------------
1 | ########
2 | Contents
3 | ########
4 |
5 | .. toctree::
6 | :maxdepth: 2
7 |
8 | usage
9 | api
10 | syntax
11 |
--------------------------------------------------------------------------------
/tests/eot_comment.asm:
--------------------------------------------------------------------------------
1 | included_var = 0x2a ; 42
2 |
3 | ; ACCU can be checked on 42 (file ends without newline)
4 | lda #included_var
5 |
6 | ; comment w/o newline
--------------------------------------------------------------------------------
/external/fmt/doc/_static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/external/fmt/doc/_static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/external/fmt/doc/_static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/external/fmt/doc/_static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/external/fmt/support/cmake/fmt-config.cmake.in:
--------------------------------------------------------------------------------
1 | @PACKAGE_INIT@
2 |
3 | include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake)
4 | check_required_components(fmt)
5 |
--------------------------------------------------------------------------------
/external/fmt/doc/_static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sasq64/bass/HEAD/external/fmt/doc/_static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/tests/err_macro.asm:
--------------------------------------------------------------------------------
1 | ;
2 | ;
3 | ;
4 | !macro apa(x) {
5 | ;!error Data
6 | lda x
7 | }
8 |
9 | start:
10 | nop
11 | apa("hey")
12 | rts
13 |
14 |
--------------------------------------------------------------------------------
/tests/err_overlap.asm:
--------------------------------------------------------------------------------
1 | ;!error overlap
2 |
3 | !section "code", $1000
4 | rts
5 |
6 | !section "main", $800
7 |
8 | !rept 4000 { nop }
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/external/fmt/support/README:
--------------------------------------------------------------------------------
1 | This directory contains build support files such as
2 |
3 | * CMake modules
4 | * Build scripts
5 | * qmake (static build with dynamic libc only)
6 |
7 |
--------------------------------------------------------------------------------
/external/fmt/support/rtd/conf.py:
--------------------------------------------------------------------------------
1 | # Sphinx configuration for readthedocs.
2 |
3 | import os, sys
4 |
5 | master_doc = 'index'
6 | html_theme = 'theme'
7 | html_theme_path = ["."]
8 |
--------------------------------------------------------------------------------
/external/fmt/doc/basic-bootstrap/README:
--------------------------------------------------------------------------------
1 | Sphinx basic theme with Bootstrap support. Modifications are kept to
2 | a minimum to simplify integration in case of changes to Sphinx theming.
3 |
--------------------------------------------------------------------------------
/external/sol3/sol2.pc.in:
--------------------------------------------------------------------------------
1 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
2 |
3 | Name: sol2
4 | Description: C++ <-> Lua Wrapper Library
5 | Version: @sol2_VERSION@
6 | Cflags: -I${includedir}
7 |
--------------------------------------------------------------------------------
/tests/lua.asm:
--------------------------------------------------------------------------------
1 | %{
2 | function lua_test(n)
3 | return n + 3
4 | end
5 | }%
6 |
7 |
8 | !section "data", $1000
9 |
10 | !assert lua_test(1) == 4
11 |
12 |
--------------------------------------------------------------------------------
/external/CLI11/.gitignore:
--------------------------------------------------------------------------------
1 | a.out*
2 | *.swp
3 | /*build*
4 | /test_package/build
5 | /Makefile
6 | /CMakeFiles/*
7 | /cmake_install.cmake
8 | /*.kdev4
9 | /html/*
10 | !/meson.build
11 |
--------------------------------------------------------------------------------
/tests/err_if.asm:
--------------------------------------------------------------------------------
1 |
2 | start:
3 |
4 | X = 3
5 |
6 | !if X == 3 {
7 | nop
8 | ;!error Illegal
9 | broken
10 | } else {
11 | nop
12 | }
13 |
--------------------------------------------------------------------------------
/tests/include.asm:
--------------------------------------------------------------------------------
1 |
2 | W = 2
3 | !include "../asm/test_include.i"
4 |
5 | ;FIXME: workaround -> "code" label guards from reincluding
6 | !ifndef code {
7 | !include "../asm/other.i"
8 | }
9 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/center-block.less:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | .center-block() {
4 | display: block;
5 | margin-left: auto;
6 | margin-right: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/text-emphasis.less:
--------------------------------------------------------------------------------
1 | // Typography
2 |
3 | .text-emphasis-variant(@color) {
4 | color: @color;
5 | a&:hover {
6 | color: darken(@color, 10%);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/external/fmt/test/find-package-test/main.cc:
--------------------------------------------------------------------------------
1 | #include "fmt/format.h"
2 |
3 | int main(int argc, char** argv) {
4 | for(int i = 0; i < argc; ++i)
5 | fmt::print("{}: {}\n", i, argv[i]);
6 | }
7 |
--------------------------------------------------------------------------------
/tests/arraymul.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | lda array+7
4 | !check A == 2
5 | rts
6 |
7 | array:
8 | !fill [1,2,3]*3
9 | array_end:
10 |
11 | !assert array_end - array == 9
12 |
13 |
--------------------------------------------------------------------------------
/tests/png.asm:
--------------------------------------------------------------------------------
1 |
2 | png = load_png("../data/face.png")
3 |
4 | !section "data",$8000
5 |
6 | data:
7 | !fill png.pixels
8 | data_end:
9 |
10 | !assert data_end - data == 320*200
--------------------------------------------------------------------------------
/external/fmt/test/add-subdirectory-test/main.cc:
--------------------------------------------------------------------------------
1 | #include "fmt/format.h"
2 |
3 | int main(int argc, char** argv) {
4 | for(int i = 0; i < argc; ++i)
5 | fmt::print("{}: {}\n", i, argv[i]);
6 | }
7 |
--------------------------------------------------------------------------------
/tests/lambda.asm:
--------------------------------------------------------------------------------
1 |
2 | mysin = [ x, amp, size ->
3 | (sin(x * Math.Pi * 2 / size) * 0.5 + 0.5) * amp ]
4 | sin:
5 | !fill 100 { mysin(i, 255, 100) }
6 |
7 | !assert mysin(0, 100, 100) == 50
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/size.less:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | .size(@width; @height) {
4 | width: @width;
5 | height: @height;
6 | }
7 |
8 | .square(@size) {
9 | .size(@size; @size);
10 | }
11 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/background-variant.less:
--------------------------------------------------------------------------------
1 | // Contextual backgrounds
2 |
3 | .bg-variant(@color) {
4 | background-color: @color;
5 | a&:hover {
6 | background-color: darken(@color, 10%);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/opacity.less:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | .opacity(@opacity) {
4 | opacity: @opacity;
5 | // IE8 filter
6 | @opacity-ie: (@opacity * 100);
7 | filter: ~"alpha(opacity=@{opacity-ie})";
8 | }
9 |
--------------------------------------------------------------------------------
/tests/macro_symbol.asm:
--------------------------------------------------------------------------------
1 |
2 | !macro some_macro(v0) {
3 | .macro_label:
4 | ; some content
5 | lda #v0
6 | nop
7 | }
8 |
9 | main:
10 | some_macro(1)
11 | other:
12 | some_macro(2)
13 |
14 | rts
15 |
--------------------------------------------------------------------------------
/external/CLI11/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 4
6 | insert_final_newline = true
7 | end_of_line = lf
8 | trim_trailing_whitespace = true
9 |
10 | [*.yml]
11 | indent_size = 2
12 |
--------------------------------------------------------------------------------
/external/lzsa/LICENSE:
--------------------------------------------------------------------------------
1 | The LZSA code is available under the Zlib license, except for src/matchfinder.c which is placed under the Creative Commons CC0 license.
2 |
3 | Please consult LICENSE.zlib.md and LICENSE.CC0.md for more information.
4 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/text-overflow.less:
--------------------------------------------------------------------------------
1 | // Text overflow
2 | // Requires inline-block or block for proper styling
3 |
4 | .text-overflow() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/tab-focus.less:
--------------------------------------------------------------------------------
1 | // WebKit-style focus
2 |
3 | .tab-focus() {
4 | // Default
5 | outline: thin dotted;
6 | // WebKit
7 | outline: 5px auto -webkit-focus-ring-color;
8 | outline-offset: -2px;
9 | }
10 |
--------------------------------------------------------------------------------
/external/lua/lua.hpp:
--------------------------------------------------------------------------------
1 | // lua.hpp
2 | // Lua header files for C++
3 | // <> not supplied automatically because Lua also compiles as C++
4 |
5 | extern "C" {
6 | #include "lua.h"
7 | #include "lualib.h"
8 | #include "lauxlib.h"
9 | }
10 |
--------------------------------------------------------------------------------
/lua/test.lua:
--------------------------------------------------------------------------------
1 |
2 |
3 | function test_me(what)
4 | a = read_reg_6502(0)
5 | lo = read_mem_6502(0x9f20)
6 | mid = read_mem_6502(0x9f21)
7 | print("Hey there ", a, lo, mid)
8 | end
9 |
10 | set_break_fn(1, test_me)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/external/CLI11/scripts/check_style.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | set -evx
3 |
4 | clang-format --version
5 |
6 | git ls-files -- '*.cpp' '*.hpp' | xargs clang-format -sort-includes -i -style=file
7 |
8 | git diff --exit-code --color
9 |
10 | set +evx
11 |
--------------------------------------------------------------------------------
/external/sol3/meson_options.txt:
--------------------------------------------------------------------------------
1 | option('single', type: 'boolean', value: false, description: 'Generate the sol3 single header and expose the corresponding build targets')
2 | option('lua_cpp', type: 'boolean', value: false, description: 'Compile lua as C++ code')
--------------------------------------------------------------------------------
/tests/eot.asm:
--------------------------------------------------------------------------------
1 | !org 0x1234
2 | !include "eot_comment.asm"
3 | main_var = included_var+1
4 | start_of_test:
5 | !assert included_var == 42, "test failed: included_var differs"
6 | !assert main_var == 43; "test failed: main_var differs"
7 | sta $c000
8 |
--------------------------------------------------------------------------------
/docs/INDEX.adoc:
--------------------------------------------------------------------------------
1 | :toc: left
2 |
3 | = bass manual
4 |
5 | include::INTRO.adoc[]
6 |
7 | include::FEATURES.adoc[]
8 |
9 | include::FUNCTIONS.adoc[]
10 |
11 | include::META.adoc[]
12 |
13 | include::DETAILS.adoc[]
14 |
15 | include::PET100.adoc[]
16 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/labels.less:
--------------------------------------------------------------------------------
1 | // Labels
2 |
3 | .label-variant(@color) {
4 | background-color: @color;
5 |
6 | &[href] {
7 | &:hover,
8 | &:focus {
9 | background-color: darken(@color, 10%);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/resize.less:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | .resizable(@direction) {
4 | resize: @direction; // Options: horizontal, vertical, both
5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
6 | }
7 |
--------------------------------------------------------------------------------
/tests/define.asm:
--------------------------------------------------------------------------------
1 |
2 | toRadians = [a -> a / 360 * 2 * Math.Pi]
3 |
4 |
5 | !section "main", 0x1234
6 |
7 |
8 | Sin: !rept $100 {
9 | !print 64+64*sin(toRadians((i+0.5)*360.0/128.0))
10 | !byte 64+64*sin(toRadians((i+0.5)*360.0/128.0))
11 | }
12 |
--------------------------------------------------------------------------------
/src/petscii.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | int32_t pet2uni_up(uint8_t p);
5 | int32_t pet2uni_lo(uint8_t p);
6 | uint8_t sc2pet(uint8_t p);
7 | uint8_t pet2sc(uint8_t p);
8 | int32_t sc2uni_up(uint8_t sc);
9 | int32_t sc2uni_lo(uint8_t sc);
10 |
--------------------------------------------------------------------------------
/asm/cart.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | !section "cart", $8000
4 |
5 | !word start,0
6 | !byte $C3, $C2, $CD, $38, $30
7 | start:
8 | sei
9 | $ lda $d012
10 | sta $d020
11 | sta $d021
12 | jmp -
13 |
14 | !section "dummy", $9ffc
15 |
16 | !byte 0,0,0,0,0,0,0,0
--------------------------------------------------------------------------------
/external/fmt/.clang-format:
--------------------------------------------------------------------------------
1 | # Run manually to reformat a file:
2 | # clang-format -i --style=file
3 | Language: Cpp
4 | BasedOnStyle: Google
5 | IndentPPDirectives: AfterHash
6 | IndentCaseLabels: false
7 | AlwaysBreakTemplateDeclarations: false
8 | DerivePointerAlignment: false
9 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/progress-bar.less:
--------------------------------------------------------------------------------
1 | // Progress bars
2 |
3 | .progress-bar-variant(@color) {
4 | background-color: @color;
5 |
6 | // Deprecated parent class requirement as of v3.2.0
7 | .progress-striped & {
8 | #gradient > .striped();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/external/ansi/terminal.cpp:
--------------------------------------------------------------------------------
1 |
2 | #ifdef _WIN32
3 | #include "win_terminal.h"
4 | #else
5 | #include "unix_terminal.h"
6 | #endif
7 | #include
8 | namespace bbs {
9 | std::unique_ptr create_local_terminal() {
10 | return std::make_unique();
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/include/divsufsort_config.h:
--------------------------------------------------------------------------------
1 | #define HAVE_STRING_H 1
2 | #define HAVE_STDLIB_H 1
3 | #define HAVE_MEMORY_H 1
4 | #define HAVE_STDINT_H 1
5 | #define INLINE inline
6 |
7 | #ifdef _MSC_VER
8 | #pragma warning( disable : 4244 )
9 | #endif /* _MSC_VER */
10 |
--------------------------------------------------------------------------------
/tests/section_move.asm:
--------------------------------------------------------------------------------
1 |
2 | !section "utils", section.main.end
3 | print:
4 | bcc .skip
5 | lda #45
6 | jsr $ff00
7 | .skip
8 | rts
9 |
10 | !section "main", 0
11 |
12 | nop
13 | nop
14 | jsr print
15 | rts
16 | after_rts:
17 |
18 | !assert after_rts == print
19 |
--------------------------------------------------------------------------------
/tests/flags.asm:
--------------------------------------------------------------------------------
1 |
2 | !org $c000
3 |
4 | !test
5 | start:
6 | ldx #0
7 | txa
8 | bne .skip
9 | ldx #3
10 | .skip
11 | !check X == 3
12 |
13 | lda #0
14 | php
15 | pla
16 | and #2
17 | beq .skip2
18 | ldx #5
19 | .skip2
20 | !check X == 5
21 | rts
22 |
--------------------------------------------------------------------------------
/tests/rept.asm:
--------------------------------------------------------------------------------
1 |
2 | a:
3 | !rept 4 { nop }
4 | b:
5 | !rept 4 { !rept 4 { nop } }
6 | c:
7 | !section "two", $100
8 | !rept y=4 { !rept x=4 { !byte x+y*10 } }
9 |
10 | !assert b-a == 4
11 | !assert c-b == 16
12 | !assert compare(section.two.data[0:8], bytes(0,1,2,3,10,11,12,13))
13 |
--------------------------------------------------------------------------------
/tests/str_concat.asm:
--------------------------------------------------------------------------------
1 |
2 | !ascii
3 | a = "hey "
4 | b = "you"
5 |
6 | !section "main", $800
7 |
8 | !test "main"
9 | start:
10 | nop
11 | rts
12 |
13 | text:
14 | !fill a + b
15 | end:
16 |
17 | !print a + b
18 |
19 | !assert end - text == 7
20 | !assert tests.main.ram[text+4] == 'y'
21 |
--------------------------------------------------------------------------------
/tests/tern.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | poo = 3
4 |
5 | x = poo == 3 ? 1 : 2
6 |
7 | !assert x == 1
8 |
9 |
10 | data:
11 | !fill 100, [i -> i < 50 ? i : 100-i]
12 |
13 |
14 | !test "check"
15 | lda data + 49
16 | !check A == 49
17 | lda data + 52
18 | !check A == 48
19 | rts
20 |
21 |
22 |
--------------------------------------------------------------------------------
/external/CLI11/.ci/azure-test.yml:
--------------------------------------------------------------------------------
1 | steps:
2 |
3 | - script: ctest --output-on-failure -C $(cli11.build_type) -T test
4 | displayName: 'Test'
5 | workingDirectory: build
6 |
7 | - task: PublishTestResults@2
8 | inputs:
9 | testResultsFormat: 'cTest'
10 | testResultsFiles: '**/Test.xml'
11 |
12 |
13 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/nav-divider.less:
--------------------------------------------------------------------------------
1 | // Horizontal dividers
2 | //
3 | // Dividers (basically an hr) within dropdowns and nav lists
4 |
5 | .nav-divider(@color: #e5e5e5) {
6 | height: 1px;
7 | margin: ((@line-height-computed / 2) - 1) 0;
8 | overflow: hidden;
9 | background-color: @color;
10 | }
11 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/reset-filter.less:
--------------------------------------------------------------------------------
1 | // Reset filters for IE
2 | //
3 | // When you need to remove a gradient background, do not forget to use this to reset
4 | // the IE filter for IE9 and below.
5 |
6 | .reset-filter() {
7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
8 | }
9 |
--------------------------------------------------------------------------------
/external/CLI11/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "extern/googletest"]
2 | path = extern/googletest
3 | url = ../../google/googletest.git
4 | [submodule "extern/sanitizers"]
5 | path = extern/sanitizers
6 | url = ../../arsenm/sanitizers-cmake
7 | [submodule "extern/json"]
8 | path = extern/json
9 | url = ../../nlohmann/json.git
10 |
--------------------------------------------------------------------------------
/external/fmt/support/cmake/fmt.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | exec_prefix=@CMAKE_INSTALL_PREFIX@
3 | libdir=@libdir_for_pc_file@
4 | includedir=@includedir_for_pc_file@
5 |
6 | Name: fmt
7 | Description: A modern formatting library
8 | Version: @FMT_VERSION@
9 | Libs: -L${libdir} -l@FMT_LIB_NAME@
10 | Cflags: -I${includedir}
11 |
12 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/alerts.less:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | .alert-variant(@background; @border; @text-color) {
4 | background-color: @background;
5 | border-color: @border;
6 | color: @text-color;
7 |
8 | hr {
9 | border-top-color: darken(@border, 5%);
10 | }
11 | .alert-link {
12 | color: darken(@text-color, 10%);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/external/fmt/support/cmake/FindSetEnv.cmake:
--------------------------------------------------------------------------------
1 | # A CMake script to find SetEnv.cmd.
2 |
3 | find_program(WINSDK_SETENV NAMES SetEnv.cmd
4 | PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/bin")
5 | if (WINSDK_SETENV AND PRINT_PATH)
6 | execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WINSDK_SETENV}")
7 | endif ()
8 |
--------------------------------------------------------------------------------
/external/ansi/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 | project(cpp-mods.ansi VERSION 1.0)
3 |
4 | set(CMAKE_CXX_STANDARD 17)
5 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
6 |
7 | set(SOURCE_FILES
8 | terminal.cpp
9 | )
10 |
11 | add_library(ansi STATIC ${SOURCE_FILES})
12 | target_include_directories(ansi INTERFACE ..)
13 | target_link_libraries(ansi PUBLIC coreutils)
14 |
--------------------------------------------------------------------------------
/external/CLI11/meson.build:
--------------------------------------------------------------------------------
1 | project('CLI11', ['cpp'],
2 | version : run_command(find_program('scripts/ExtractVersion.py')).stdout().strip(),
3 | default_options : ['cpp_std=c++11']
4 | )
5 |
6 | CLI11_inc = include_directories(['include'])
7 |
8 | CLI11_dep = declare_dependency(
9 | include_directories : CLI11_inc,
10 | version : meson.project_version(),
11 | )
12 |
--------------------------------------------------------------------------------
/external/fmt/support/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | include $(CLEAR_VARS)
3 |
4 | LOCAL_MODULE := fmt_static
5 | LOCAL_MODULE_FILENAME := libfmt
6 |
7 | LOCAL_SRC_FILES := ../src/format.cc
8 |
9 | LOCAL_C_INCLUDES := $(LOCAL_PATH)
10 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
11 |
12 | LOCAL_CFLAGS += -std=c++11 -fexceptions
13 |
14 | include $(BUILD_STATIC_LIBRARY)
15 |
16 |
--------------------------------------------------------------------------------
/external/CLI11/include/CLI/Version.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Distributed under the 3-Clause BSD License. See accompanying
4 | // file LICENSE or https://github.com/CLIUtils/CLI11 for details.
5 |
6 | // [CLI11:verbatim]
7 |
8 | #define CLI11_VERSION_MAJOR 1
9 | #define CLI11_VERSION_MINOR 8
10 | #define CLI11_VERSION_PATCH 0
11 | #define CLI11_VERSION "1.8.0"
12 |
13 | // [CLI11:verbatim]
14 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/pkgconfig/libdivsufsort.pc.cmake:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | exec_prefix=${prefix}
3 | libdir=@CMAKE_INSTALL_LIBDIR@
4 | includedir=@CMAKE_INSTALL_INCLUDEDIR@
5 |
6 | Name: @PROJECT_NAME@@W64BIT@
7 | Description: @PROJECT_DESCRIPTION@
8 | Version: @PROJECT_VERSION_FULL@
9 | URL: @PROJECT_URL@
10 | Libs: -L${libdir} -ldivsufsort@W64BIT@
11 | Cflags: -I${includedir}
12 |
--------------------------------------------------------------------------------
/tests/if.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 | !ifndef X {
4 | X = 3
5 | }
6 |
7 |
8 | !ifdef Y {
9 | Y = 3
10 | }
11 |
12 | !test X=9, "hey"
13 | hey:
14 | clc
15 | ;!run {: print("X", reg_x()) :}
16 | txa
17 | adc #$a0
18 | ;!run {: print("A", reg_a()) :}
19 | !check A == $a9
20 | ldx #$e0
21 | !log "RTS"
22 | rts
23 |
24 | !assert X == 3
25 | ; !assert Y != 3
26 |
--------------------------------------------------------------------------------
/external/CLI11/.ci/azure-build.yml:
--------------------------------------------------------------------------------
1 | steps:
2 |
3 | - task: CMake@1
4 | inputs:
5 | cmakeArgs: .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=$(cli11.single) -DCLI11_CXX_STD=$(cli11.std) -DCLI11_SINGLE_FILE_TESTS=$(cli11.single) -DCMAKE_BUILD_TYPE=$(cli11.build_type) $(cli11.options)
6 | displayName: 'Configure'
7 |
8 | - script: cmake --build .
9 | displayName: 'Build'
10 | workingDirectory: build
11 |
12 |
--------------------------------------------------------------------------------
/src/chars.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | enum class Translation
7 | {
8 | Ascii,
9 | PetsciiUpper,
10 | PetsciiLower,
11 | ScreencodeUpper,
12 | ScreencodeLower
13 | };
14 |
15 | void setTranslation(Translation t);
16 | void setTranslation(std::string_view t);
17 | void setTranslation(char32_t c, uint8_t p);
18 |
19 | uint8_t translateChar(uint32_t c);
20 |
21 |
--------------------------------------------------------------------------------
/asm/vic.inc:
--------------------------------------------------------------------------------
1 |
2 | !macro VicAdr(adr) {
3 | !assert (adr & $3fff) == 0
4 | lda #((~adr)&$ffff)>>14
5 | sta $dd00
6 | }
7 |
8 | ; Set the Bitmap and Screen offsets within VIC
9 | !macro BitmapAndScreen(bm_offs, scr_offs) {
10 | !assert (bm_offs & $dfff) == 0
11 | !assert (scr_offs & $c3ff) == 0
12 | .bits0 = (bm_offs>>10)
13 | .bits1 = (scr_offs>>6)
14 | lda #.bits0 | .bits1
15 | sta $d018
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/src/fuzz.cpp:
--------------------------------------------------------------------------------
1 | #include "assembler.h"
2 | #include "defines.h"
3 | #include "machine.h"
4 |
5 | #include
6 | #include
7 | #include
8 |
9 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
10 |
11 | std::string data{(char*)Data, Size};
12 | Assembler ass;
13 |
14 | ass.parse(data, "fuzz.asm");
15 | puts(ass.getErrors().empty() ? "OK" : "ERROR");
16 | return 0;
17 | }
18 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/.gitignore:
--------------------------------------------------------------------------------
1 | # Object files
2 | *.o
3 | *.ko
4 | *.obj
5 | *.elf
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Libraries
12 | *.lib
13 | *.a
14 | *.la
15 | *.lo
16 |
17 | # Shared objects (inc. Windows DLLs)
18 | *.dll
19 | *.so
20 | *.so.*
21 | *.dylib
22 |
23 | # Executables
24 | *.exe
25 | *.out
26 | *.app
27 | *.i*86
28 | *.x86_64
29 | *.hex
30 |
31 | # CMake files/directories
32 | build/
33 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/nav-vertical-align.less:
--------------------------------------------------------------------------------
1 | // Navbar vertical align
2 | //
3 | // Vertically center elements in the navbar.
4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
5 |
6 | .navbar-vertical-align(@element-height) {
7 | margin-top: ((@navbar-height - @element-height) / 2);
8 | margin-bottom: ((@navbar-height - @element-height) / 2);
9 | }
10 |
--------------------------------------------------------------------------------
/tests/illegals.asm:
--------------------------------------------------------------------------------
1 |
2 | !cpu "6502"
3 |
4 | !section "main", $c000
5 | !test
6 | test_lax:
7 | lax data
8 | !check A == $77
9 | !check X == $77
10 | lda #$f0
11 | sax data2
12 | ldy data2
13 | !check Y == $70
14 |
15 | rts
16 |
17 | !test
18 | test_nop:
19 |
20 | nop #3
21 | nop $01
22 | nop
23 | nop $1234
24 | rts
25 |
26 | data:
27 | !byte $77
28 | data2:
29 | !byte 0
30 |
31 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/responsive-visibility.less:
--------------------------------------------------------------------------------
1 | // Responsive utilities
2 |
3 | //
4 | // More easily include all the states for responsive-utilities.less.
5 | .responsive-visibility() {
6 | display: block !important;
7 | table& { display: table; }
8 | tr& { display: table-row !important; }
9 | th&,
10 | td& { display: table-cell !important; }
11 | }
12 |
13 | .responsive-invisibility() {
14 | display: none !important;
15 | }
16 |
--------------------------------------------------------------------------------
/external/sol3/subprojects/lua.wrap:
--------------------------------------------------------------------------------
1 | [wrap-file]
2 | directory = lua-5.3.4
3 |
4 | source_url = https://www.lua.org/ftp/lua-5.3.4.tar.gz
5 | source_filename = lua-5.3.4.tar.gz
6 | source_hash = f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c
7 |
8 | patch_url = https://github.com/OrfeasZ/lua-meson/releases/download/v5.3.4/lua-5.3.4-wrap.zip
9 | patch_filename = lua-5.3.4-wrap.zip
10 | patch_hash = 400ca3e7f2a7e2a8363abe7a25f339b87488d56a1351ad843931a4d097624e57
--------------------------------------------------------------------------------
/external/sol3/.style.yapf:
--------------------------------------------------------------------------------
1 | [style]
2 | based_on_style = pep8
3 | use_tabs = true
4 | indent_width = 5
5 |
6 | spaces_before_comment = 1
7 | spaces_around_power_operator = true
8 | space_between_ending_comma_and_closing_bracket = true
9 |
10 | continuation_align_style = SPACE
11 | split_before_first_argument = false
12 | split_complex_comprehension = true
13 | dedent_closing_brackets = false
14 | coalesce_brackets = true
15 | align_closing_bracket_with_visual_indent = false
16 |
--------------------------------------------------------------------------------
/external/fmt/test/cuda-test/cpp14.cc:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // The purpose of this part is to ensure NVCC's host compiler also supports
4 | // the standard version. See 'cuda-cpp14.cu'.
5 | //
6 | // https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros
7 | static_assert(__cplusplus >= 201402L, "expect C++ 2014 for host compiler");
8 |
9 | auto make_message_cpp() -> std::string {
10 | return fmt::format("host compiler \t: __cplusplus == {}", __cplusplus);
11 | }
12 |
--------------------------------------------------------------------------------
/external/fmt/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.
7 |
--------------------------------------------------------------------------------
/external/CLI11/.ci/build_lcov.sh:
--------------------------------------------------------------------------------
1 | #!/bin/env sh
2 | # (Source me)
3 | set -evx
4 |
5 | LCOV_URL="http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz"
6 | cd "${DEPS_DIR}"
7 |
8 | if [[ ! -f "${DEPS_DIR}/lcov/bin/lcov" ]] ; then
9 | echo "Downloading lcov"
10 | mkdir -p lcov
11 | travis_retry wget --no-check-certificate --quiet -O - "${LCOV_URL}" | tar --strip-components=1 -xz -C lcov
12 | fi
13 |
14 | export PATH="${DEPS_DIR}/lcov/bin:${PATH}"
15 | cd "${TRAVIS_BUILD_DIR}"
16 |
17 | set +evx
18 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/examples/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | ## Add definitions ##
2 | add_definitions(-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64)
3 |
4 | ## Targets ##
5 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include"
6 | "${CMAKE_CURRENT_BINARY_DIR}/../include")
7 | link_directories("${CMAKE_CURRENT_BINARY_DIR}/../lib")
8 | foreach(src suftest mksary sasearch bwt unbwt)
9 | add_executable(${src} ${src}.c)
10 | target_link_libraries(${src} divsufsort)
11 | endforeach(src)
12 |
--------------------------------------------------------------------------------
/tests/slice.asm:
--------------------------------------------------------------------------------
1 |
2 | !org $2000
3 |
4 | data:
5 | !fill [i -> i][$80:$E0]
6 |
7 | mysin = [x -> (sin(x*M_PI*2/256)+1)*127]
8 |
9 | xxx = mysin[:100]
10 | !print xxx
11 |
12 | sin:
13 | !fill mysin[:100]
14 |
15 |
16 | sin2:
17 | !fill 100, mysin
18 | end:
19 |
20 | !assert sin2-sin == 100
21 | !assert end-sin2 == 100
22 |
23 |
24 | !test "slice"
25 | ldx #99
26 | $
27 | lda sin,x
28 | tay
29 | lda sin2,x
30 | !check A == Y
31 | dex
32 | bne -
33 | rts
34 |
--------------------------------------------------------------------------------
/external/CLI11/cmake/CLI11ConfigVersion.cmake.in:
--------------------------------------------------------------------------------
1 | # Adapted from write_basic_package_version_file(... COMPATIBILITY AnyNewerVersion) output
2 | # ARCH_INDEPENDENT is only present in cmake 3.14 and onwards
3 |
4 | set(PACKAGE_VERSION "@VERSION_STRING@")
5 |
6 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
7 | set(PACKAGE_VERSION_COMPATIBLE FALSE)
8 | else()
9 | set(PACKAGE_VERSION_COMPATIBLE TRUE)
10 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
11 | set(PACKAGE_VERSION_EXACT TRUE)
12 | endif()
13 | endif()
14 |
--------------------------------------------------------------------------------
/external/CLI11/scripts/check_style_docker.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | # Also good but untagged: CLANG_FORMAT=unibeautify/clang-format
4 | # This might provide more control in the future: silkeh/clang:8 (etc)
5 | CLANG_FORMAT=saschpe/clang-format:5.0.1
6 |
7 | set -evx
8 |
9 | docker run --rm ${CLANG_FORMAT} --version
10 | docker run --rm --user $(id -u):$(id -g) -v "$(pwd)":/workdir -w /workdir ${CLANG_FORMAT} -style=file -sort-includes -i $(git ls-files -- '*.cpp' '*.hpp')
11 |
12 | git diff --exit-code --color
13 |
14 | set +evx
15 |
--------------------------------------------------------------------------------
/src/keycodes.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | enum
3 | {
4 | KEY_BACKSPACE = 1,
5 | KEY_LEFT,
6 | KEY_UP,
7 | KEY_RIGHT,
8 | KEY_DOWN,
9 | KEY_PAGEUP,
10 | KEY_PAGEDOWN,
11 | KEY_HOME,
12 | KEY_END,
13 | KEY_ENTER,
14 | KEY_TAB,
15 | KEY_DELETE,
16 |
17 | KEY_F1,
18 | KEY_F2,
19 | KEY_F3,
20 | KEY_F4,
21 | KEY_F5,
22 | KEY_F6,
23 | KEY_F7,
24 | KEY_F8,
25 |
26 | KEY_ESCAPE = 0x1b,
27 |
28 | KEY_UNKNOWN = 0x1fffe,
29 | KEY_TIMEOUT = 0x1ffff
30 |
31 | };
32 |
33 |
--------------------------------------------------------------------------------
/src/test_utils.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | static fs::path findProjectDir()
7 | {
8 | auto current = fs::absolute(".");
9 |
10 | while(!current.empty()) {
11 | if (fs::exists(current / ".git")) {
12 | return current;
13 | }
14 | current = current.parent_path();
15 | }
16 | return {};
17 | }
18 |
19 | inline fs::path projDir()
20 | {
21 | static fs::path projectDir = findProjectDir();
22 | return projectDir;
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/6502.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | namespace sixfive {
7 |
8 | // Addressing modes
9 | enum class Mode : uint8_t
10 | {
11 | NONE,
12 | ACC,
13 | IMM,
14 | REL,
15 | ZP,
16 | ZPX,
17 | ZPY,
18 | INDX,
19 | INDY,
20 | INDZ,
21 | IND,
22 | ABS,
23 | ABSX,
24 | ABSY,
25 | ZP_REL,
26 | };
27 |
28 | enum class Reg
29 | {
30 | A,
31 | X,
32 | Y,
33 | SP,
34 | SR,
35 | PC
36 | };
37 |
38 |
39 | } // namespace sixfive
40 |
--------------------------------------------------------------------------------
/tests/macro.asm:
--------------------------------------------------------------------------------
1 |
2 | !section "x", 0
3 | yy = 99
4 |
5 | !macro apa(x,y) {
6 | ldx #x
7 | !rept 5 { nop }
8 | !if (x ==3) {
9 | sta $d020
10 | }
11 | ldy #y
12 | }
13 |
14 | !macro test(a) {
15 | lda #a
16 | jsr other
17 | }
18 | !section "main" , $800
19 | !test "apa"
20 | lda #9
21 | a0:
22 | apa(3,4)
23 | a1:
24 | !assert (a1-a0) == 12
25 | !check X == 3
26 | !check Y == 4
27 | !check RAM[$d020] == 9
28 | test(3)
29 | rts
30 | other:
31 | rts
32 |
33 |
--------------------------------------------------------------------------------
/external/fmt/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | .vs/
3 |
4 | *.iml
5 | .idea/
6 | .externalNativeBuild/
7 | .gradle/
8 | gradle/
9 | gradlew*
10 | local.properties
11 | build/
12 |
13 | bin/
14 | /_CPack_Packages
15 | /CMakeScripts
16 | /doc/doxyxml
17 | /doc/html
18 | /doc/node_modules
19 | virtualenv
20 | /Testing
21 | /install_manifest.txt
22 | *~
23 | *.a
24 | *.so*
25 | *.xcodeproj
26 | *.zip
27 | cmake_install.cmake
28 | CPack*.cmake
29 | fmt-*.cmake
30 | CTestTestfile.cmake
31 | CMakeCache.txt
32 | CMakeFiles
33 | FMT.build
34 | Makefile
35 | run-msbuild.bat
36 | fmt.pc
37 |
--------------------------------------------------------------------------------
/asm/simple_scroller.asm:
--------------------------------------------------------------------------------
1 | !include "pet100.inc"
2 |
3 | !section "main", $8000
4 |
5 | Line = $0400+24*40
6 |
7 | Border(LightBlue)
8 | !log "LOOP"
9 | loop:
10 | !rept 39 {
11 | lda Line+i+1
12 | sta Line+i
13 | }
14 |
15 | .x lda text
16 | sta Line+39
17 | inc .x+1
18 | CheckQuit()
19 | Wait(4)
20 | jmp loop
21 |
22 | !align 256
23 | text:
24 | !encoding "screencode_upper"
25 | !text "THIS IS A SCROLLER THAT EXEMPLIFIES A VERY SIMPLE ROUTINE "
26 | !text "RENDERING ON THE TEXT CONSOLE. "
27 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/pagination.less:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
4 | > li {
5 | > a,
6 | > span {
7 | padding: @padding-vertical @padding-horizontal;
8 | font-size: @font-size;
9 | }
10 | &:first-child {
11 | > a,
12 | > span {
13 | .border-left-radius(@border-radius);
14 | }
15 | }
16 | &:last-child {
17 | > a,
18 | > span {
19 | .border-right-radius(@border-radius);
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/external/CLI11/.clang-tidy:
--------------------------------------------------------------------------------
1 | #Checks: '*,-clang-analyzer-alpha.*'
2 | #Checks: '-*,google-readability-casting,llvm-namespace-comment,performance-unnecessary-value-param,llvm-include-order,misc-throw-by-value-catch-by-reference,readability-container-size-empty,google-runtime-references,modernize*'
3 | Checks: '-*,llvm-namespace-comment,readability-container-size-empty,misc-throw-by-value-catch-by-reference,modernize*,google-readability-casting'
4 | HeaderFilterRegex: '.*hpp'
5 | CheckOptions:
6 | - key: readability-braces-around-statements.ShortStatementLines
7 | value: '1'
8 |
9 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/border-radius.less:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | .border-top-radius(@radius) {
4 | border-top-right-radius: @radius;
5 | border-top-left-radius: @radius;
6 | }
7 | .border-right-radius(@radius) {
8 | border-bottom-right-radius: @radius;
9 | border-top-right-radius: @radius;
10 | }
11 | .border-bottom-radius(@radius) {
12 | border-bottom-right-radius: @radius;
13 | border-bottom-left-radius: @radius;
14 | }
15 | .border-left-radius(@radius) {
16 | border-bottom-left-radius: @radius;
17 | border-top-left-radius: @radius;
18 | }
19 |
--------------------------------------------------------------------------------
/external/fmt/support/rtd/theme/layout.html:
--------------------------------------------------------------------------------
1 | {% extends "basic/layout.html" %}
2 |
3 | {% block extrahead %}
4 |
5 |
6 |
9 | Page Redirection
10 | {% endblock %}
11 |
12 | {% block document %}
13 | If you are not redirected automatically, follow the link to the fmt documentation.
14 | {% endblock %}
15 |
16 | {% block footer %}
17 | {% endblock %}
18 |
--------------------------------------------------------------------------------
/tests/operators.asm:
--------------------------------------------------------------------------------
1 |
2 | hey = $1234
3 |
4 | hi = >hey
5 | lo =
11 | hi2 = >hey + $70 * 2
12 | lo2 = top++; api_check(L, L->top <= L->ci->top, \
15 | "stack overflow");}
16 |
17 | #define adjustresults(L,nres) \
18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
19 |
20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
21 | "not enough elements in the stack")
22 |
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | os: windows
2 | language: cpp
3 | env:
4 | - MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
5 | install:
6 | - choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
7 | script:
8 | - export PATH=$MSBUILD_PATH:$PATH
9 | - cmake -Bbuild -G"Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo
10 | - cmake --build build --config RelWithDebInfo
11 | deploy:
12 | provider: releases
13 | skip_cleanup: true
14 | api_key: $GH_TOKEN
15 | file_glob: true
16 | file: "build/RelWithDebInfo/bass.exe"
17 | tags: true
18 |
19 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/panels.less:
--------------------------------------------------------------------------------
1 | // Panels
2 |
3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
4 | border-color: @border;
5 |
6 | & > .panel-heading {
7 | color: @heading-text-color;
8 | background-color: @heading-bg-color;
9 | border-color: @heading-border;
10 |
11 | + .panel-collapse > .panel-body {
12 | border-top-color: @border;
13 | }
14 | .badge {
15 | color: @heading-bg-color;
16 | background-color: @heading-text-color;
17 | }
18 | }
19 | & > .panel-footer {
20 | + .panel-collapse > .panel-body {
21 | border-bottom-color: @border;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/external/ansi/localconsole.h:
--------------------------------------------------------------------------------
1 | #ifndef LOCALCONSOLE_H
2 | #define LOCALCONSOLE_H
3 |
4 | #include "console.h"
5 |
6 | //#ifdef LINUX
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | namespace bbs {
13 |
14 | class LocalTerminal : public Terminal {
15 | public:
16 |
17 | virtual void open() override;
18 | virtual int getWidth() const override;
19 | virtual int getHeight() const override;
20 |
21 | virtual void close() override;
22 |
23 | private:
24 | struct termios orig_term_attr;
25 | struct winsize ws;
26 |
27 |
28 | };
29 | extern LocalTerminal localTerminal;
30 |
31 | }
32 | //#endif
33 |
34 | #endif // LOCALCONSOLE_H
35 |
36 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/CMakeModules/CheckFunctionKeywords.cmake:
--------------------------------------------------------------------------------
1 | include(CheckCSourceCompiles)
2 |
3 | macro(check_function_keywords _wordlist)
4 | set(${_result} "")
5 | foreach(flag ${_wordlist})
6 | string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}")
7 | string(TOUPPER "${flagname}" flagname)
8 | set(have_flag "HAVE_${flagname}")
9 | check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag})
10 | if(${have_flag} AND NOT ${_result})
11 | set(${_result} "${flag}")
12 | # break()
13 | endif(${have_flag} AND NOT ${_result})
14 | endforeach(flag)
15 | endmacro(check_function_keywords)
16 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/wells.less:
--------------------------------------------------------------------------------
1 | //
2 | // Wells
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .well {
8 | min-height: 20px;
9 | padding: 19px;
10 | margin-bottom: 20px;
11 | background-color: @well-bg;
12 | border: 1px solid @well-border;
13 | border-radius: @border-radius-base;
14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
15 | blockquote {
16 | border-color: #ddd;
17 | border-color: rgba(0,0,0,.15);
18 | }
19 | }
20 |
21 | // Sizes
22 | .well-lg {
23 | padding: 24px;
24 | border-radius: @border-radius-large;
25 | }
26 | .well-sm {
27 | padding: 9px;
28 | border-radius: @border-radius-small;
29 | }
30 |
--------------------------------------------------------------------------------
/external/fmt/doc/_static/breathe.css:
--------------------------------------------------------------------------------
1 |
2 | /* -- breathe specific styles ----------------------------------------------- */
3 |
4 | /* So enum value descriptions are displayed inline to the item */
5 | .breatheenumvalues li tt + p {
6 | display: inline;
7 | }
8 |
9 | /* So parameter descriptions are displayed inline to the item */
10 | .breatheparameterlist li tt + p {
11 | display: inline;
12 | }
13 |
14 | .container .breathe-sectiondef {
15 | width: inherit;
16 | }
17 |
18 | .github-btn {
19 | border: 0;
20 | overflow: hidden;
21 | }
22 |
23 | .jumbotron {
24 | background-size: 100% 4px;
25 | background-repeat: repeat-y;
26 | color: white;
27 | text-align: center;
28 | }
29 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | CMAKE_FLAGS = -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
2 | all : bass
3 |
4 | builds/debug/cmake_install.cmake :
5 | rm -rf builds/debug
6 | cmake -Bbuilds/debug -H. ${CMAKE_FLAGS} -DCMAKE_BUILD_TYPE=Debug
7 |
8 | compile_commands.json : builds/debug/compile_commands.json
9 | rm -f compile_commands.json
10 | ln -s builds/debug/compile_commands.json .
11 |
12 | debug : builds/debug/cmake_install.cmake compile_commands.json
13 |
14 |
15 | bass : debug
16 | cmake --build builds/debug -- -j8 bass
17 |
18 |
19 | gtest : debug
20 | cmake --build builds/debug -- -j8 gtest
21 |
22 | test : debug
23 | cmake --build builds/debug -- -j8 tester
24 | builds/debug/tester all
25 |
26 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/list-group.less:
--------------------------------------------------------------------------------
1 | // List Groups
2 |
3 | .list-group-item-variant(@state; @background; @color) {
4 | .list-group-item-@{state} {
5 | color: @color;
6 | background-color: @background;
7 |
8 | a& {
9 | color: @color;
10 |
11 | .list-group-item-heading {
12 | color: inherit;
13 | }
14 |
15 | &:hover,
16 | &:focus {
17 | color: @color;
18 | background-color: darken(@background, 5%);
19 | }
20 | &.active,
21 | &.active:hover,
22 | &.active:focus {
23 | color: #fff;
24 | background-color: @color;
25 | border-color: @color;
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/external/fmt/test/find-package-test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.1...3.18)
2 |
3 | project(fmt-test)
4 |
5 | find_package(FMT REQUIRED)
6 |
7 | add_executable(library-test main.cc)
8 | target_link_libraries(library-test fmt::fmt)
9 | target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
10 | target_include_directories(library-test PUBLIC SYSTEM .)
11 |
12 | if (TARGET fmt::fmt-header-only)
13 | add_executable(header-only-test main.cc)
14 | target_link_libraries(header-only-test fmt::fmt-header-only)
15 | target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
16 | target_include_directories(header-only-test PUBLIC SYSTEM .)
17 | endif ()
18 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/hide-text.less:
--------------------------------------------------------------------------------
1 | // CSS image replacement
2 | //
3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
4 | // mixins being reused as classes with the same name, this doesn't hold up. As
5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
6 | //
7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
8 |
9 | // Deprecated as of v3.0.1 (will be removed in v4)
10 | .hide-text() {
11 | font: ~"0/0" a;
12 | color: transparent;
13 | text-shadow: none;
14 | background-color: transparent;
15 | border: 0;
16 | }
17 |
18 | // New mixin to use as of v3.0.1
19 | .text-hide() {
20 | .hide-text();
21 | }
22 |
--------------------------------------------------------------------------------
/external/fmt/support/Vagrantfile:
--------------------------------------------------------------------------------
1 | # -*- mode: ruby -*-
2 | # vi: set ft=ruby :
3 |
4 | # A vagrant config for testing against gcc-4.8.
5 | Vagrant.configure("2") do |config|
6 | config.vm.box = "ubuntu/xenial64"
7 | config.disksize.size = '15GB'
8 |
9 | config.vm.provider "virtualbox" do |vb|
10 | vb.memory = "4096"
11 | end
12 |
13 | config.vm.provision "shell", inline: <<-SHELL
14 | apt-get update
15 | apt-get install -y g++ make wget git
16 | wget -q https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.tar.gz
17 | tar xzf cmake-3.14.4-Linux-x86_64.tar.gz
18 | ln -s `pwd`/cmake-3.14.4-Linux-x86_64/bin/cmake /usr/local/bin
19 | SHELL
20 | end
21 |
--------------------------------------------------------------------------------
/external/fmt/test/add-subdirectory-test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.1...3.18)
2 |
3 | project(fmt-test)
4 |
5 | add_subdirectory(../.. fmt)
6 |
7 | add_executable(library-test "main.cc")
8 | target_link_libraries(library-test fmt::fmt)
9 | target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
10 | target_include_directories(library-test PUBLIC SYSTEM .)
11 |
12 | if (TARGET fmt::fmt-header-only)
13 | add_executable(header-only-test "main.cc")
14 | target_link_libraries(header-only-test fmt::fmt-header-only)
15 | target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
16 | target_include_directories(header-only-test PUBLIC SYSTEM .)
17 | endif ()
18 |
--------------------------------------------------------------------------------
/external/fmt/test/fuzzing/main.cc:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "fuzzer-common.h"
6 |
7 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
8 |
9 | int main(int argc, char** argv) {
10 | for (int i = 1; i < argc; ++i) {
11 | std::ifstream in(argv[i]);
12 | assert(in);
13 | in.seekg(0, std::ios_base::end);
14 | const auto size = in.tellg();
15 | assert(size >= 0);
16 | in.seekg(0, std::ios_base::beg);
17 | std::vector buf(static_cast(size));
18 | in.read(buf.data(), size);
19 | assert(in.gcount() == size);
20 | LLVMFuzzerTestOneInput(as_bytes(buf.data()), buf.size());
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/external/ansi/terminal.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | namespace bbs {
10 |
11 | class Terminal
12 | {
13 |
14 | public:
15 |
16 | virtual size_t write(std::string_view source) = 0;
17 | virtual bool read(std::string& target) = 0;
18 |
19 | virtual void open() {}
20 | virtual void close() {}
21 |
22 | virtual int width() const { return -1; }
23 | virtual int height() const { return -1; }
24 | virtual std::string term_type() const { return ""; }
25 |
26 | virtual ~Terminal() = default;
27 | };
28 |
29 | std::unique_ptr create_local_terminal();
30 |
31 | } // namespace bbs
32 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/clearfix.less:
--------------------------------------------------------------------------------
1 | // Clearfix
2 | //
3 | // For modern browsers
4 | // 1. The space content is one way to avoid an Opera bug when the
5 | // contenteditable attribute is included anywhere else in the document.
6 | // Otherwise it causes space to appear at the top and bottom of elements
7 | // that are clearfixed.
8 | // 2. The use of `table` rather than `block` is only necessary if using
9 | // `:before` to contain the top-margins of child elements.
10 | //
11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12 |
13 | .clearfix() {
14 | &:before,
15 | &:after {
16 | content: " "; // 1
17 | display: table; // 2
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/breadcrumbs.less:
--------------------------------------------------------------------------------
1 | //
2 | // Breadcrumbs
3 | // --------------------------------------------------
4 |
5 |
6 | .breadcrumb {
7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
8 | margin-bottom: @line-height-computed;
9 | list-style: none;
10 | background-color: @breadcrumb-bg;
11 | border-radius: @border-radius-base;
12 |
13 | > li {
14 | display: inline-block;
15 |
16 | + li:before {
17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
18 | padding: 0 5px;
19 | color: @breadcrumb-color;
20 | }
21 | }
22 |
23 | > .active {
24 | color: @breadcrumb-active-color;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/external/CLI11/.ci/azure-cmake.yml:
--------------------------------------------------------------------------------
1 | steps:
2 |
3 | # Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
4 | - bash: |
5 | wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
6 | echo "29faa62fb3a0b6323caa3d9557e1a5f1205614c0d4c5c2a9917f16a74f7eff68 cmake-3.14.3-Linux-x86_64.tar.gz" | shasum -sca 256
7 | displayName: Download CMake
8 |
9 | - task: ExtractFiles@1
10 | inputs:
11 | archiveFilePatterns: 'cmake*.tar.gz'
12 | destinationFolder: 'cmake_program'
13 | displayName: Extract CMake
14 |
15 | - bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
16 | displayName: Add CMake to PATH
17 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/responsive-embed.less:
--------------------------------------------------------------------------------
1 | // Embeds responsive
2 | //
3 | // Credit: Nicolas Gallagher and SUIT CSS.
4 |
5 | .embed-responsive {
6 | position: relative;
7 | display: block;
8 | height: 0;
9 | padding: 0;
10 | overflow: hidden;
11 |
12 | .embed-responsive-item,
13 | iframe,
14 | embed,
15 | object,
16 | video {
17 | position: absolute;
18 | top: 0;
19 | left: 0;
20 | bottom: 0;
21 | height: 100%;
22 | width: 100%;
23 | border: 0;
24 | }
25 | }
26 |
27 | // Modifier class for 16:9 aspect ratio
28 | .embed-responsive-16by9 {
29 | padding-bottom: 56.25%;
30 | }
31 |
32 | // Modifier class for 4:3 aspect ratio
33 | .embed-responsive-4by3 {
34 | padding-bottom: 75%;
35 | }
36 |
--------------------------------------------------------------------------------
/external/CLI11/include/CLI/CLI.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Distributed under the 3-Clause BSD License. See accompanying
4 | // file LICENSE or https://github.com/CLIUtils/CLI11 for details.
5 |
6 | // CLI Library includes
7 | // Order is important for combiner script
8 |
9 | #include "CLI/Version.hpp"
10 |
11 | #include "CLI/Macros.hpp"
12 |
13 | #include "CLI/StringTools.hpp"
14 |
15 | #include "CLI/Error.hpp"
16 |
17 | #include "CLI/TypeTools.hpp"
18 |
19 | #include "CLI/Split.hpp"
20 |
21 | #include "CLI/ConfigFwd.hpp"
22 |
23 | #include "CLI/Validators.hpp"
24 |
25 | #include "CLI/FormatterFwd.hpp"
26 |
27 | #include "CLI/Option.hpp"
28 |
29 | #include "CLI/App.hpp"
30 |
31 | #include "CLI/Config.hpp"
32 |
33 | #include "CLI/Formatter.hpp"
34 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/compatibility/compat-5.4.h:
--------------------------------------------------------------------------------
1 | #ifndef NOT_KEPLER_PROJECT_COMPAT54_H_
2 | #define NOT_KEPLER_PROJECT_COMPAT54_H_
3 |
4 | #if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP)
5 | extern "C" {
6 | #endif
7 | #include
8 | #include
9 | #include
10 | #if defined(__cplusplus) && !defined(COMPAT53_LUA_CPP)
11 | }
12 | #endif
13 |
14 | #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 504
15 |
16 | #if !defined(LUA_ERRGCMM)
17 | /* So Lua 5.4 actually removes this, which breaks sol2...
18 | man, this API is quite unstable...!
19 | */
20 | # define LUA_ERRGCMM (LUA_ERRERR + 2)
21 | #endif /* LUA_ERRGCMM define */
22 |
23 | #endif // Lua 5.4 only
24 |
25 | #endif // NOT_KEPLER_PROJECT_COMPAT54_H_
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # libdivsufsort Change Log
2 |
3 | See full changelog at: https://github.com/y-256/libdivsufsort/commits
4 |
5 | ## [2.0.1] - 2010-11-11
6 | ### Fixed
7 | * Wrong variable used in `divbwt` function
8 | * Enclose some string variables with double quotation marks in include/CMakeLists.txt
9 | * Fix typo in include/CMakeLists.txt
10 |
11 | ## 2.0.0 - 2008-08-23
12 | ### Changed
13 | * Switch the build system to [CMake](http://www.cmake.org/)
14 | * Improve the performance of the suffix-sorting algorithm
15 |
16 | ### Added
17 | * OpenMP support
18 | * 64-bit version of divsufsort
19 |
20 | [Unreleased]: https://github.com/y-256/libdivsufsort/compare/2.0.1...HEAD
21 | [2.0.1]: https://github.com/y-256/libdivsufsort/compare/2.0.0...2.0.1
22 |
--------------------------------------------------------------------------------
/asm/x16.inc:
--------------------------------------------------------------------------------
1 |
2 |
3 | !macro SetFileName(name) {
4 | lda #.fname_end - .fname
5 | ldx #<.fname
6 | ldy #>.fname
7 | !section in = "text" {
8 | .fname !fill name
9 | .fname_end
10 | }
11 | }
12 |
13 | !section in = "utils" {
14 |
15 | kernel_load:
16 | jsr $ffbd ; call SETNAM
17 | lda #$01
18 | ldx $ba ; last used device number
19 | bne .skip
20 | ldx #$08 ; default to device 8
21 | .skip
22 | ldy #$01 ; not $01 means: load to address stored in file
23 | jsr $ffba ; call SETLFS
24 |
25 | lda #$00 ; $00 means: load to memory (not verify)
26 | jsr $ffd5 ; call LOAD
27 | ;bcs VBL ; if carry set, a load error has happened
28 |
29 | rts
30 | }
31 |
--------------------------------------------------------------------------------
/external/coreutils/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 | project(apone.coreutils)
3 |
4 |
5 | if(NOT TARGET fmt::fmt)
6 | add_subdirectory(../fmt fmt)
7 | endif()
8 | set(CMAKE_CXX_STANDARD 17)
9 | set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
10 | set(CMAKE_POSITION_INDEPENDENT_CODE ON)
11 |
12 | set(SOURCE_FILES src/coreutils/log.cpp)
13 | add_library(coreutils ${SOURCE_FILES})
14 | target_link_libraries(coreutils PUBLIC fmt::fmt)
15 | target_compile_definitions(coreutils PUBLIC )
16 | target_include_directories(coreutils INTERFACE src)
17 |
18 | set_property(TARGET coreutils PROPERTY POSITION_INDEPENDENT_CODE ON)
19 | set_property(TARGET coreutils PROPERTY CXX_STANDARD 14)
20 | set_property(TARGET coreutils PROPERTY CXX_STANDARD_REQUIRED ON)
21 |
22 | add_library(apone::coreutils ALIAS coreutils)
23 |
--------------------------------------------------------------------------------
/external/fmt/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing to {fmt}
2 | =====================
3 |
4 | By submitting a pull request or a patch, you represent that you have the right
5 | to license your contribution to the {fmt} project owners and the community,
6 | agree that your contributions are licensed under the {fmt} license, and agree
7 | to future changes to the licensing.
8 |
9 | All C++ code must adhere to [Google C++ Style Guide](
10 | https://google.github.io/styleguide/cppguide.html) with the following
11 | exceptions:
12 |
13 | * Exceptions are permitted
14 | * snake_case should be used instead of UpperCamelCase for function and type
15 | names
16 |
17 | All documentation must adhere to the [Google Developer Documentation Style
18 | Guide](https://developers.google.com/style).
19 |
20 | Thanks for contributing!
21 |
--------------------------------------------------------------------------------
/external/CLI11/scripts/UpdateDownloadProj.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from __future__ import print_function, division
4 |
5 | from plumbum import local, cli, FG
6 | from plumbum.cmd import curl
7 |
8 | FILES = [ 'https://raw.githubusercontent.com/Crascit/DownloadProject/master/DownloadProject.cmake',
9 | 'https://raw.githubusercontent.com/Crascit/DownloadProject/master/DownloadProject.CMakeLists.cmake.in']
10 |
11 | DIR = local.path(__file__).dirname
12 |
13 | def download_file(path):
14 | name = path.split('/')[-1]
15 | (curl[path] > name) & FG
16 |
17 | class UpdateDownloadProj(cli.Application):
18 | def main(self):
19 | with local.cwd(DIR / '../cmake'):
20 | for f in FILES:
21 | download_file(f)
22 |
23 | if __name__ == "__main__":
24 | UpdateDownloadProj()
25 |
--------------------------------------------------------------------------------
/src/cart.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | enum ChipType : uint16_t
5 | {
6 | Rom,
7 | Ram,
8 | Flash
9 | };
10 |
11 | enum CartType
12 | {
13 | Normalcartridge,
14 | ActionReplay,
15 | KCSPowerCartridge,
16 | FinalCartridgeIII,
17 | SimonsBasic,
18 | Oceantype1,
19 | ExpertCartridge,
20 | FunPlay,
21 | PowerPlay,
22 | SuperGames,
23 | AtomicPower,
24 | EpyxFastload,
25 | WestermannLearning,
26 | RexUtility,
27 | FinalCartridgeI,
28 | MagicFormel,
29 | C64GameSystem,
30 | WarpSpeed,
31 | Dinamic,
32 | Zaxxon,
33 | MagicDesk,
34 | SuperSnapshot5,
35 | Comal80,
36 | StructuredBasic,
37 | Ross,
38 | DelaEP64,
39 | DelaEP7x8,
40 | DelaEP256,
41 | RexEP256,
42 | EasyFlash = 32
43 | };
44 |
45 |
--------------------------------------------------------------------------------
/external/sol3/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Read these guidelines. They are relatively simple and will allow me to help you better:
2 |
3 | 1. Produce a simple, short, compilable test case that reproduces your problem.
4 | 2. Make a descriptive title that summarises the bug as a whole.
5 | 3. Explain the bug in as much detail as you can in the body of the issue.
6 | 4. Include Compiler/IDE (Visual Studio, XCode...), Build and Deployment System, Language (C++, Objective-C++), and any special defines you have set.
7 |
8 | If you want to request a feature:
9 |
10 | 1. Produce any relevant imaginary code that illustrates what you would like or desired behavior.
11 | 2. Include a description and title of what you would like.
12 | 3. Annotate and describe the behavior through comments, asserts or just a small write up.
13 |
14 | Thanks for helping sol grow!
15 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/component-animations.less:
--------------------------------------------------------------------------------
1 | //
2 | // Component animations
3 | // --------------------------------------------------
4 |
5 | // Heads up!
6 | //
7 | // We don't use the `.opacity()` mixin here since it causes a bug with text
8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9 |
10 | .fade {
11 | opacity: 0;
12 | .transition(opacity .15s linear);
13 | &.in {
14 | opacity: 1;
15 | }
16 | }
17 |
18 | .collapse {
19 | display: none;
20 |
21 | &.in { display: block; }
22 | tr&.in { display: table-row; }
23 | tbody&.in { display: table-row-group; }
24 | }
25 |
26 | .collapsing {
27 | position: relative;
28 | height: 0;
29 | overflow: hidden;
30 | .transition-property(~"height, visibility");
31 | .transition-duration(.35s);
32 | .transition-timing-function(ease);
33 | }
34 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/table-row.less:
--------------------------------------------------------------------------------
1 | // Tables
2 |
3 | .table-row-variant(@state; @background) {
4 | // Exact selectors below required to override `.table-striped` and prevent
5 | // inheritance to nested tables.
6 | .table > thead > tr,
7 | .table > tbody > tr,
8 | .table > tfoot > tr {
9 | > td.@{state},
10 | > th.@{state},
11 | &.@{state} > td,
12 | &.@{state} > th {
13 | background-color: @background;
14 | }
15 | }
16 |
17 | // Hover states for `.table-hover`
18 | // Note: this is not available for cells or rows within `thead` or `tfoot`.
19 | .table-hover > tbody > tr {
20 | > td.@{state}:hover,
21 | > th.@{state}:hover,
22 | &.@{state}:hover > td,
23 | &:hover > .@{state},
24 | &.@{state}:hover > th {
25 | background-color: darken(@background, 5%);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/external/coreutils/src/coreutils/format.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "format.h"
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #ifdef UNIT_TEST
11 |
12 | #include "catch.hpp"
13 |
14 | TEST_CASE("utils::format", "format operations") {
15 |
16 | using namespace utils;
17 | using namespace std;
18 |
19 | int a = 20;
20 | const char *b = "test";
21 | string c = "case";
22 |
23 | string res = format("%x %03x %s %d %s", a, a, b, a, c);
24 | REQUIRE(res == "14 014 test 20 case");
25 |
26 | vector v { 128, 129, 130, 131 };
27 | res = format("%02x", v);
28 | //TODO: Actual broken test
29 | //REQUIRE(res == "80 81 82 83");
30 |
31 | //auto s = make_slice(v, 1, 2);
32 | //res = format("%02x", s);
33 | //REQUIRE(res == "81 82");
34 | }
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/external/CLI11/.appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 1.8.0.{build}
2 |
3 | branches:
4 | only:
5 | - master
6 |
7 | install:
8 | - git submodule update --init --recursive
9 | - set PATH=C:\Python36;%PATH%
10 | - cmake --version
11 | - pip install conan
12 | - conan user
13 | - conan --version
14 |
15 | build_script:
16 | - mkdir build
17 | - cd build
18 | - ps: cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015"
19 | - ps: cmake --build .
20 | - cd ..
21 | - conan create . CLIUtils/CLI11
22 |
23 | test_script:
24 | - cd build
25 | - ps: ctest --output-on-failure -C Debug
26 |
27 | notifications:
28 | - provider: Webhook
29 | url: https://webhooks.gitter.im/e/0185e91c5d989a476d7b
30 | on_build_success: false
31 | on_build_failure: true
32 | on_build_status_changed: true
33 |
--------------------------------------------------------------------------------
/external/fmt/test/fuzzing/README.md:
--------------------------------------------------------------------------------
1 | # Running the fuzzers locally
2 |
3 | There is a [helper script](build.sh) to build the fuzzers, which has only been
4 | tested on Debian and Ubuntu linux so far. There should be no problems fuzzing on
5 | Windows (using clang>=8) or on Mac, but the script will probably not work out of
6 | the box.
7 |
8 | Something along
9 | ```sh
10 | mkdir build
11 | cd build
12 | export CXX=clang++
13 | export CXXFLAGS="-fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION= -g"
14 | cmake .. -DFMT_SAFE_DURATION_CAST=On -DFMT_FUZZ=On -DFMT_FUZZ_LINKMAIN=Off -DFMT_FUZZ_LDFLAGS="-fsanitize=fuzzer"
15 | cmake --build .
16 | ```
17 | should work to build the fuzzers for all platforms which clang supports.
18 |
19 | Execute a fuzzer with for instance
20 | ```sh
21 | cd build
22 | export UBSAN_OPTIONS=halt_on_error=1
23 | mkdir out_chrono
24 | bin/fuzzer_chrono_duration out_chrono
25 | ```
26 |
--------------------------------------------------------------------------------
/external/lua/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 | project(lua)
3 |
4 | set(CORE_FILES lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c
5 | llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c
6 | ltm.c lundump.c lvm.c lzio.c)
7 |
8 | set(LIB_FILES lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c
9 | lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c linit.c)
10 |
11 | set(LUA_SOURCES ${CORE_FILES} ${LIB_FILES})
12 | SET_SOURCE_FILES_PROPERTIES( ${LUA_SOURCES} PROPERTIES LANGUAGE CXX )
13 | add_library(lua ${LUA_SOURCES})
14 | if(NOT ANDROID AND NOT WIN32)
15 | target_compile_definitions(lua PRIVATE LUA_USE_POSIX)
16 | endif()
17 | if(WIN32)
18 | target_compile_options(lua PRIVATE /TP)
19 | else()
20 | target_compile_options(lua PRIVATE -Wno-string-plus-int -x c++)
21 | endif()
22 | target_include_directories(lua INTERFACE ${PROJECT_SOURCE_DIR})
23 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/close.less:
--------------------------------------------------------------------------------
1 | //
2 | // Close icons
3 | // --------------------------------------------------
4 |
5 |
6 | .close {
7 | float: right;
8 | font-size: (@font-size-base * 1.5);
9 | font-weight: @close-font-weight;
10 | line-height: 1;
11 | color: @close-color;
12 | text-shadow: @close-text-shadow;
13 | .opacity(.2);
14 |
15 | &:hover,
16 | &:focus {
17 | color: @close-color;
18 | text-decoration: none;
19 | cursor: pointer;
20 | .opacity(.5);
21 | }
22 |
23 | // Additional properties for button version
24 | // iOS requires the button element instead of an anchor tag.
25 | // If you want the anchor version, it requires `href="#"`.
26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27 | button& {
28 | padding: 0;
29 | cursor: pointer;
30 | background: transparent;
31 | border: 0;
32 | -webkit-appearance: none;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/thumbnails.less:
--------------------------------------------------------------------------------
1 | //
2 | // Thumbnails
3 | // --------------------------------------------------
4 |
5 |
6 | // Mixin and adjust the regular image class
7 | .thumbnail {
8 | display: block;
9 | padding: @thumbnail-padding;
10 | margin-bottom: @line-height-computed;
11 | line-height: @line-height-base;
12 | background-color: @thumbnail-bg;
13 | border: 1px solid @thumbnail-border;
14 | border-radius: @thumbnail-border-radius;
15 | .transition(border .2s ease-in-out);
16 |
17 | > img,
18 | a > img {
19 | &:extend(.img-responsive);
20 | margin-left: auto;
21 | margin-right: auto;
22 | }
23 |
24 | // Add a hover state for linked versions only
25 | a&:hover,
26 | a&:focus,
27 | a&.active {
28 | border-color: @link-color;
29 | }
30 |
31 | // Image captions
32 | .caption {
33 | padding: @thumbnail-caption-padding;
34 | color: @thumbnail-caption-color;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/external/lua/lundump.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lundump.h,v 1.45.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** load precompiled Lua chunks
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 | #ifndef lundump_h
8 | #define lundump_h
9 |
10 | #include "llimits.h"
11 | #include "lobject.h"
12 | #include "lzio.h"
13 |
14 |
15 | /* data to catch conversion errors */
16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n"
17 |
18 | #define LUAC_INT 0x5678
19 | #define LUAC_NUM cast_num(370.5)
20 |
21 | #define MYINT(s) (s[0]-'0')
22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
23 | #define LUAC_FORMAT 0 /* this is the official format */
24 |
25 | /* load one chunk; from lundump.c */
26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
27 |
28 | /* dump one chunk; from ldump.c */
29 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
30 | void* data, int strip);
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/external/lzsa/LICENSE.zlib.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019 Emmanuel Marty
2 |
3 | This software is provided 'as-is', without any express or implied warranty. In
4 | no event will the authors be held liable for any damages arising from the use of
5 | this software.
6 |
7 | Permission is granted to anyone to use this software for any purpose, including
8 | commercial applications, and to alter it and redistribute it freely, subject to
9 | the following restrictions:
10 |
11 | 1. The origin of this software must not be misrepresented; you must not claim
12 | that you wrote the original software. If you use this software in a product,
13 | an acknowledgment in the product documentation would be appreciated but is
14 | not required.
15 |
16 | 2. Altered source versions must be plainly marked as such, and must not be
17 | misrepresented as being the original software.
18 |
19 | 3. This notice may not be removed or altered from any source distribution.
20 |
--------------------------------------------------------------------------------
/external/fmt/test/test-assert.h:
--------------------------------------------------------------------------------
1 | // Formatting library for C++ - test version of FMT_ASSERT
2 | //
3 | // Copyright (c) 2012 - present, Victor Zverovich
4 | // All rights reserved.
5 | //
6 | // For the license information refer to format.h.
7 |
8 | #ifndef FMT_TEST_ASSERT_H_
9 | #define FMT_TEST_ASSERT_H_
10 |
11 | #include
12 |
13 | #include "gtest.h"
14 |
15 | class assertion_failure : public std::logic_error {
16 | public:
17 | explicit assertion_failure(const char* message) : std::logic_error(message) {}
18 |
19 | private:
20 | virtual void avoid_weak_vtable();
21 | };
22 |
23 | void assertion_failure::avoid_weak_vtable() {}
24 |
25 | #define FMT_ASSERT(condition, message) \
26 | if (!(condition)) throw assertion_failure(message);
27 |
28 | // Expects an assertion failure.
29 | #define EXPECT_ASSERT(stmt, message) \
30 | FMT_TEST_THROW_(stmt, assertion_failure, message, GTEST_NONFATAL_FAILURE_)
31 |
32 | #endif // FMT_TEST_ASSERT_H_
33 |
--------------------------------------------------------------------------------
/external/fmt/support/appveyor.yml:
--------------------------------------------------------------------------------
1 | configuration:
2 | - Debug
3 | - Release
4 |
5 | clone_depth: 1
6 |
7 | image:
8 | - Visual Studio 2015
9 | - Visual Studio 2019
10 | - Visual Studio 2017
11 |
12 | platform:
13 | - Win32
14 | - x64
15 |
16 | environment:
17 | CTEST_OUTPUT_ON_FAILURE: 1
18 | MSVC_DEFAULT_OPTIONS: ON
19 | BUILD: msvc
20 |
21 | matrix:
22 | exclude:
23 | - image: Visual Studio 2015
24 | platform: Win32
25 | - image: Visual Studio 2019
26 | platform: Win32
27 |
28 | before_build:
29 | - mkdir build
30 | - cd build
31 |
32 | build_script:
33 | - python ../support/appveyor-build.py
34 |
35 | on_failure:
36 | - appveyor PushArtifact Testing/Temporary/LastTest.log
37 | - appveyor AddTest test
38 |
39 | # Uncomment this to debug AppVeyor failures.
40 | #on_finish:
41 | # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
42 |
--------------------------------------------------------------------------------
/external/CLI11/.ci/run_codecov.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo -en "travis_fold:start:script.build\\r"
4 | echo "Building..."
5 | set -evx
6 |
7 | cd ${TRAVIS_BUILD_DIR}
8 | mkdir -p build
9 | cd build
10 | cmake .. -DCLI11_SINGLE_FILE_TESTS=OFF -DCLI11_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Coverage
11 | cmake --build . -- -j2
12 | cmake --build . --target CLI11_coverage
13 |
14 | set +evx
15 | echo -en "travis_fold:end:script.build\\r"
16 | echo -en "travis_fold:start:script.lcov\\r"
17 | echo "Capturing and uploading LCov..."
18 | set -evx
19 |
20 | lcov --directory . --capture --output-file coverage.info # capture coverage info
21 | lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info # filter out system
22 | lcov --list coverage.info #debug info
23 | # Uploading report to CodeCov
24 | bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
25 |
26 | set +evx
27 | echo -en "travis_fold:end:script.lcov\\r"
28 |
--------------------------------------------------------------------------------
/external/sol3/sol2.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | empty
5 | {*((value_type*)(&storage_[0]))}
6 |
7 | - *((value_type*)(&storage_[0]))
8 |
9 |
10 |
11 | ref={ref} state={luastate}
12 |
13 | - ref
14 | - luastate
15 |
16 |
17 |
18 | index={index} state={luastate}
19 |
20 | - index
21 | - luastate
22 |
23 |
24 |
--------------------------------------------------------------------------------
/external/fmt/test/assert-test.cc:
--------------------------------------------------------------------------------
1 | // Formatting library for C++ - FMT_ASSERT test
2 | //
3 | // It is a separate test to minimize the number of EXPECT_DEBUG_DEATH checks
4 | // which are slow on some platforms. In other tests FMT_ASSERT is made to throw
5 | // an exception which is much faster and easier to check.
6 | //
7 | // Copyright (c) 2012 - present, Victor Zverovich
8 | // All rights reserved.
9 | //
10 | // For the license information refer to format.h.
11 |
12 | #include "fmt/core.h"
13 | #include "gtest.h"
14 |
15 | TEST(AssertTest, Fail) {
16 | #if GTEST_HAS_DEATH_TEST
17 | EXPECT_DEBUG_DEATH(FMT_ASSERT(false, "don't panic!"), "don't panic!");
18 | #else
19 | fmt::print("warning: death tests are not supported\n");
20 | #endif
21 | }
22 |
23 | bool test_condition = false;
24 |
25 | TEST(AssertTest, DanglingElse) {
26 | bool executed_else = false;
27 | if (test_condition)
28 | FMT_ASSERT(true, "");
29 | else
30 | executed_else = true;
31 | EXPECT_TRUE(executed_else);
32 | }
33 |
--------------------------------------------------------------------------------
/external/CLI11/scripts/clang-format-pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # To use:
4 | # ln -s scripts/clang-format.hook .git/hooks/pre-commit
5 |
6 | # Based loosely on https://github.com/andrewseidl/githook-clang-format
7 |
8 | format_file() {
9 | file="${1}"
10 | case "$file" in
11 | *.hpp | *.cpp | .c | *.cc | *.cu | *.h )
12 | if [ -f "${1}" ] ; then
13 | clang-format -i -style=file -sort-includes "${1}"
14 | if git diff-files --quiet -- "${1}" ; then
15 | echo "Already nicely formatted: ${1}"
16 | else
17 | git add "${1}"
18 | echo "Reformatting file: ${1}"
19 | fi
20 | fi
21 | ;;
22 | *)
23 | ;;
24 | esac
25 | }
26 |
27 | case "${1}" in
28 | --about )
29 | echo "Runs clang-format on source files"
30 | ;;
31 | * )
32 | for file in `git diff-index --cached --name-only HEAD` ; do
33 | format_file "${file}"
34 | done
35 | ;;
36 | esac
37 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // Floats
7 | // -------------------------
8 |
9 | .clearfix {
10 | .clearfix();
11 | }
12 | .center-block {
13 | .center-block();
14 | }
15 | .pull-right {
16 | float: right !important;
17 | }
18 | .pull-left {
19 | float: left !important;
20 | }
21 |
22 |
23 | // Toggling content
24 | // -------------------------
25 |
26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
27 | .hide {
28 | display: none !important;
29 | }
30 | .show {
31 | display: block !important;
32 | }
33 | .invisible {
34 | visibility: hidden;
35 | }
36 | .text-hide {
37 | .text-hide();
38 | }
39 |
40 |
41 | // Hide from screenreaders and browsers
42 | //
43 | // Credit: HTML5 Boilerplate
44 |
45 | .hidden {
46 | display: none !important;
47 | }
48 |
49 |
50 | // For Affix plugin
51 | // -------------------------
52 |
53 | .affix {
54 | position: fixed;
55 | }
56 |
--------------------------------------------------------------------------------
/external/fmt/support/fmt.pro:
--------------------------------------------------------------------------------
1 | # Staticlib configuration for qmake builds
2 | # For some reason qmake 3.1 fails to identify source dependencies and excludes format.cc and printf.cc
3 | # from compilation so it _MUST_ be called as qmake -nodepend
4 | # A workaround is implemented below: a custom compiler is defined which does not track dependencies
5 |
6 | TEMPLATE = lib
7 |
8 | TARGET = fmt
9 |
10 | QMAKE_EXT_CPP = .cc
11 |
12 | CONFIG = staticlib warn_on c++11
13 |
14 | FMT_SOURCES = \
15 | ../src/format.cc \
16 | ../src/posix.cc
17 |
18 | fmt.name = libfmt
19 | fmt.input = FMT_SOURCES
20 | fmt.output = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ
21 | fmt.clean = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ
22 | fmt.depends = ${QMAKE_FILE_IN}
23 | # QMAKE_RUN_CXX will not be expanded
24 | fmt.commands = $$QMAKE_CXX -c $$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_WARN_ON $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO $$QMAKE_CXXFLAGS_CXX11 ${QMAKE_FILE_IN}
25 | fmt.variable_out = OBJECTS
26 | fmt.CONFIG = no_dependencies no_link
27 | QMAKE_EXTRA_COMPILERS += fmt
28 |
--------------------------------------------------------------------------------
/asm/sub.asm:
--------------------------------------------------------------------------------
1 | clc
2 | lda #$90
3 | adc #$80
4 |
5 | sec
6 |
7 | lda #$50
8 | sbc #$20
9 | nop
10 | @req a=0x30,sr=0x01
11 | sbc #$40
12 | @req a=0xf0,sr=0x80
13 | adc #$90
14 | @req a=0x80,sr=0x81
15 |
16 | lda #'h'
17 | sta $d000
18 | lda #'i'
19 | sta $d000
20 |
21 | CLC ; 1 + 1 = 2, returns V = 0
22 | LDA #$01
23 | ADC #$01
24 | @req a=2,sr=0
25 | CLC ; 1 + -1 = 0, returns V = 0
26 | LDA #$01
27 | ADC #$FF
28 | @rea a=0,sr=1
29 | CLC ; 127 + 1 = 128, returns V = 1
30 | LDA #$7F
31 | ADC #$01
32 | nop
33 | @req a=0x80sr=0xc0
34 | CLC ; -128 + -1 = -129, returns V = 1
35 | LDA #$80
36 | ADC #$FF
37 | @req a=0x7f,sr=0x41
38 | SEC ; 0 - 1 = -1, returns V = 0
39 | LDA #$00
40 | nop
41 | @req sr=0x43
42 | SBC #$01
43 | @req a=0xff,sr=0x80
44 | SEC ; -128 - 1 = -129, returns V = 1
45 | LDA #$80
46 | @req sr=0x81
47 | SBC #$01
48 | @req a=0x7f,sr=0x41
49 | SEC ; 127 - -1 = 128, returns V = 1
50 | LDA #$7F
51 | SBC #$FF
52 | @req a=0x80,sr=0xc0
53 | rts
54 |
55 |
--------------------------------------------------------------------------------
/external/fmt/test/cuda-test/cuda-cpp14.cu:
--------------------------------------------------------------------------------
1 | // Direct NVCC command line example:
2 | //
3 | // nvcc ./cuda-cpp14.cu -x cu -I"../include" -l"fmtd" -L"../build/Debug" \
4 | // -std=c++14 -Xcompiler /std:c++14 -Xcompiler /Zc:__cplusplus
5 |
6 | // Ensure that we are using the latest C++ standard for NVCC
7 | // The version is C++14
8 | //
9 | // https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-cplusplus-language-support
10 | // https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros
11 | static_assert(__cplusplus >= 201402L, "expect C++ 2014 for nvcc");
12 |
13 | #include
14 |
15 | #include
16 | #include
17 |
18 | extern auto make_message_cpp() -> std::string;
19 | extern auto make_message_cuda() -> std::string;
20 |
21 | int main() {
22 | std::cout << make_message_cuda() << std::endl;
23 | std::cout << make_message_cpp() << std::endl;
24 | }
25 |
26 | auto make_message_cuda() -> std::string {
27 | return fmt::format("nvcc compiler \t: __cplusplus == {}", __cplusplus);
28 | }
29 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/VERSION.cmake:
--------------------------------------------------------------------------------
1 | set(PROJECT_VERSION_MAJOR "2")
2 | set(PROJECT_VERSION_MINOR "0")
3 | set(PROJECT_VERSION_PATCH "2")
4 | set(PROJECT_VERSION_EXTRA "-1")
5 | set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
6 | set(PROJECT_VERSION_FULL "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_EXTRA}")
7 |
8 | set(LIBRARY_VERSION "3.0.1")
9 | set(LIBRARY_SOVERSION "3")
10 |
11 | ## Git revision number ##
12 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
13 | execute_process(COMMAND git describe --tags HEAD
14 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
15 | OUTPUT_VARIABLE GIT_DESCRIBE_TAGS ERROR_QUIET)
16 | if(GIT_DESCRIBE_TAGS)
17 | string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION "${GIT_DESCRIBE_TAGS}")
18 | string(STRIP "${GIT_REVISION}" GIT_REVISION)
19 | if(GIT_REVISION)
20 | set(PROJECT_VERSION_FULL "${GIT_REVISION}")
21 | endif(GIT_REVISION)
22 | endif(GIT_DESCRIBE_TAGS)
23 | endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
24 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/media.less:
--------------------------------------------------------------------------------
1 | .media {
2 | // Proper spacing between instances of .media
3 | margin-top: 15px;
4 |
5 | &:first-child {
6 | margin-top: 0;
7 | }
8 | }
9 |
10 | .media,
11 | .media-body {
12 | zoom: 1;
13 | overflow: hidden;
14 | }
15 |
16 | .media-body {
17 | width: 10000px;
18 | }
19 |
20 | .media-object {
21 | display: block;
22 | }
23 |
24 | .media-right,
25 | .media > .pull-right {
26 | padding-left: 10px;
27 | }
28 |
29 | .media-left,
30 | .media > .pull-left {
31 | padding-right: 10px;
32 | }
33 |
34 | .media-left,
35 | .media-right,
36 | .media-body {
37 | display: table-cell;
38 | vertical-align: top;
39 | }
40 |
41 | .media-middle {
42 | vertical-align: middle;
43 | }
44 |
45 | .media-bottom {
46 | vertical-align: bottom;
47 | }
48 |
49 | // Reset margins on headings for tighter default spacing
50 | .media-heading {
51 | margin-top: 0;
52 | margin-bottom: 5px;
53 | }
54 |
55 | // Media list variation
56 | //
57 | // Undo default ul/ol styles
58 | .media-list {
59 | padding-left: 0;
60 | list-style: none;
61 | }
62 |
--------------------------------------------------------------------------------
/external/fmt/support/update-coverity-branch.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # Update the coverity branch from the master branch.
3 | # It is not done automatically because Coverity Scan limits
4 | # the number of submissions per day.
5 |
6 | from __future__ import print_function
7 | import shutil, tempfile
8 | from subprocess import check_output, STDOUT
9 |
10 | class Git:
11 | def __init__(self, dir):
12 | self.dir = dir
13 |
14 | def __call__(self, *args):
15 | output = check_output(['git'] + list(args), cwd=self.dir, stderr=STDOUT)
16 | print(output)
17 | return output
18 |
19 | dir = tempfile.mkdtemp()
20 | try:
21 | git = Git(dir)
22 | git('clone', '-b', 'coverity', 'git@github.com:fmtlib/fmt.git', dir)
23 | output = git('merge', '-X', 'theirs', '--no-commit', 'origin/master')
24 | if 'Fast-forward' not in output:
25 | git('reset', 'HEAD', '.travis.yml')
26 | git('checkout', '--', '.travis.yml')
27 | git('commit', '-m', 'Update coverity branch')
28 | git('push')
29 | finally:
30 | shutil.rmtree(dir)
31 |
--------------------------------------------------------------------------------
/external/lua/lprefix.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lprefix.h,v 1.2.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** Definitions for Lua code that must come before any other header file
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 | #ifndef lprefix_h
8 | #define lprefix_h
9 |
10 |
11 | /*
12 | ** Allows POSIX/XSI stuff
13 | */
14 | #if !defined(LUA_USE_C89) /* { */
15 |
16 | #if !defined(_XOPEN_SOURCE)
17 | #define _XOPEN_SOURCE 600
18 | #elif _XOPEN_SOURCE == 0
19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */
20 | #endif
21 |
22 | /*
23 | ** Allows manipulation of large files in gcc and some other compilers
24 | */
25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS)
26 | #define _LARGEFILE_SOURCE 1
27 | #define _FILE_OFFSET_BITS 64
28 | #endif
29 |
30 | #endif /* } */
31 |
32 |
33 | /*
34 | ** Windows stuff
35 | */
36 | #if defined(_WIN32) /* { */
37 |
38 | #if !defined(_CRT_SECURE_NO_WARNINGS)
39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */
40 | #endif
41 |
42 | #endif /* } */
43 |
44 | #endif
45 |
46 |
--------------------------------------------------------------------------------
/external/fmt/support/cmake/JoinPaths.cmake:
--------------------------------------------------------------------------------
1 | # This module provides function for joining paths
2 | # known from from most languages
3 | #
4 | # Original license:
5 | # SPDX-License-Identifier: (MIT OR CC0-1.0)
6 | # Explicit permission given to distribute this module under
7 | # the terms of the project as described in /LICENSE.rst.
8 | # Copyright 2020 Jan Tojnar
9 | # https://github.com/jtojnar/cmake-snips
10 | #
11 | # Modelled after Python’s os.path.join
12 | # https://docs.python.org/3.7/library/os.path.html#os.path.join
13 | # Windows not supported
14 | function(join_paths joined_path first_path_segment)
15 | set(temp_path "${first_path_segment}")
16 | foreach(current_segment IN LISTS ARGN)
17 | if(NOT ("${current_segment}" STREQUAL ""))
18 | if(IS_ABSOLUTE "${current_segment}")
19 | set(temp_path "${current_segment}")
20 | else()
21 | set(temp_path "${temp_path}/${current_segment}")
22 | endif()
23 | endif()
24 | endforeach()
25 | set(${joined_path} "${temp_path}" PARENT_SCOPE)
26 | endfunction()
27 |
--------------------------------------------------------------------------------
/lua/sid.lua:
--------------------------------------------------------------------------------
1 | function be_word(data, offs)
2 | return data[offs+2] | (data[offs+1]<<8)
3 | end
4 |
5 | function le_word(data, offs)
6 | return data[offs+1] | (data[offs+2]<<8)
7 | end
8 |
9 | function read_string(data, offs, len)
10 | s = ''
11 | for i=offs+1,len+offs+1 do
12 | if data[i] == 0 then
13 | break
14 | end
15 | s = s .. string.char(data[i])
16 | end
17 | s = string.gsub(s, "%s+$", "")
18 | return s
19 | end
20 |
21 | function sid_parse(data)
22 |
23 | res = {
24 | start = be_word(data, 6),
25 | load = be_word(data, 8),
26 | init = be_word(data, 10),
27 | play = be_word(data, 12),
28 | title = read_string(data, 0x16, 32),
29 | composer = read_string(data, 0x36, 32)
30 | }
31 |
32 | if res.load == 0 then
33 | res.load = le_word(data, res.start)
34 | res.start = res.start + 2
35 | end
36 |
37 | res.data = {}
38 | for i=res.start,#data do
39 | table.insert(res.data, data[i+1])
40 | end
41 |
42 | return res
43 |
44 | end
45 |
46 |
47 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/pager.less:
--------------------------------------------------------------------------------
1 | //
2 | // Pager pagination
3 | // --------------------------------------------------
4 |
5 |
6 | .pager {
7 | padding-left: 0;
8 | margin: @line-height-computed 0;
9 | list-style: none;
10 | text-align: center;
11 | &:extend(.clearfix all);
12 | li {
13 | display: inline;
14 | > a,
15 | > span {
16 | display: inline-block;
17 | padding: 5px 14px;
18 | background-color: @pager-bg;
19 | border: 1px solid @pager-border;
20 | border-radius: @pager-border-radius;
21 | }
22 |
23 | > a:hover,
24 | > a:focus {
25 | text-decoration: none;
26 | background-color: @pager-hover-bg;
27 | }
28 | }
29 |
30 | .next {
31 | > a,
32 | > span {
33 | float: right;
34 | }
35 | }
36 |
37 | .previous {
38 | > a,
39 | > span {
40 | float: left;
41 | }
42 | }
43 |
44 | .disabled {
45 | > a,
46 | > a:hover,
47 | > a:focus,
48 | > span {
49 | color: @pager-disabled-color;
50 | background-color: @pager-bg;
51 | cursor: @cursor-disabled;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/tests/65c02.asm:
--------------------------------------------------------------------------------
1 |
2 | !cpu "65C02"
3 |
4 | !section "main",$1000
5 | !test
6 | start:
7 | !log "Start"
8 | nop
9 | bra +
10 | nop
11 | $
12 | lda #table
15 | sta $03
16 |
17 | lda #<(table+1)
18 | sta $06
19 | lda #>(table+1)
20 | sta $07
21 |
22 | lda ($02)
23 | !check A == 1
24 | sec
25 | adc ($06)
26 | !check A == 4
27 |
28 | lda $04
29 | !check A == $55
30 | ldx #1
31 | bbr $04:1,.s0
32 | inx
33 | .s0
34 | bbr $04:0,+
35 | inx
36 | $
37 | !check X == 2
38 |
39 | lda #34
40 | bbs $04:6,+
41 | lda #12
42 | $
43 | !check A == 34
44 |
45 |
46 | ldx table+1
47 | lda #$01
48 | tsb table+1
49 | beq +
50 | ldx #0
51 | $ ldy table+1
52 | !check X == 2
53 | !check Y == 3
54 |
55 | lda #$02
56 | tsb table+1
57 | bne +
58 | ldx #0
59 | $
60 | !check X == 2
61 |
62 | rts
63 |
64 | !section "table",$4000
65 | table:
66 | !byte 1,2,3
67 |
68 | !section "zpage", $0
69 |
70 | !byte 0,0,0,0
71 | !byte $55,$aa
72 |
73 |
--------------------------------------------------------------------------------
/src/script.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "defines.h"
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | class script_error : public std::exception
13 | {
14 | public:
15 | explicit script_error(std::string m = "Script error") : msg(std::move(m)) {}
16 | const char* what() const noexcept override { return msg.c_str(); }
17 |
18 | private:
19 | std::string msg;
20 | };
21 |
22 | class Scripting
23 | {
24 | public:
25 | Scripting();
26 | ~Scripting();
27 | void load(fs::path const& p);
28 | void add(std::string_view code);
29 | bool hasFunction(std::string_view name);
30 | std::any call(std::string_view name, std::vector const& args);
31 |
32 | sol::state& getState() { return *luap; }
33 |
34 | sol::object to_object(std::any const& a);
35 | std::any to_any(sol::object const& obj);
36 |
37 | static constexpr int StartIndex = 1;
38 | std::function make_function(std::string_view code);
39 |
40 | private:
41 | std::unique_ptr luap;
42 | sol::state& lua;
43 | };
44 |
--------------------------------------------------------------------------------
/tests/special_labels.asm:
--------------------------------------------------------------------------------
1 |
2 | !section "a", $1000
3 | first:
4 | nop
5 | $ lda $c001
6 | !check A==30
7 | cmp #30
8 | bne -
9 | tax
10 | lda $c000
11 | !check A==0
12 | beq +
13 | jmp -
14 | $ rts
15 | nop
16 |
17 | !section "data", $c000
18 | !byte 0,30
19 |
20 | !section "b", $2000
21 | second
22 | nop
23 | loop:
24 | lda $d012
25 | cmp #30
26 | bne loop
27 | lda $c000
28 | beq skip
29 | jmp loop
30 | skip
31 | rts
32 | $ nop
33 |
34 | !section "c", $3000
35 | !macro dummy(a) {
36 | .x lda $d012
37 | cmp #30
38 | bne .x
39 | lda $c000
40 | beq .y
41 | jmp .x
42 | .y rts
43 | }
44 | $ nop
45 | dummy(0)
46 | $ nop
47 |
48 |
49 | many:
50 | clc
51 |
52 | ldx #0
53 | bcc +++
54 | nop
55 | $
56 | bcc .out
57 | $
58 | inx
59 | bcc .out
60 | $
61 | ldx #3
62 | bcc --
63 | rts
64 | .out
65 | rts
66 |
67 | !test "labels"
68 | !log "We are here"
69 | jsr first
70 | ;!log "X=",X
71 | jsr many
72 | !check X == 4
73 | nop
74 | rts
75 |
--------------------------------------------------------------------------------
/external/fmt/test/fuzzing/float.cc:
--------------------------------------------------------------------------------
1 | // A fuzzer for floating-point formatter.
2 | // For the license information refer to format.h.
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #include "fuzzer-common.h"
11 |
12 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
13 | if (size <= sizeof(double) || !std::numeric_limits::is_iec559)
14 | return 0;
15 |
16 | auto value = assign_from_buf(data);
17 | auto buffer = fmt::memory_buffer();
18 | fmt::format_to(buffer, "{}", value);
19 |
20 | // Check a round trip.
21 | if (std::isnan(value)) {
22 | auto nan = std::signbit(value) ? "-nan" : "nan";
23 | if (fmt::string_view(buffer.data(), buffer.size()) != nan)
24 | throw std::runtime_error("round trip failure");
25 | return 0;
26 | }
27 | buffer.push_back('\0');
28 | char* ptr = nullptr;
29 | if (std::strtod(buffer.data(), &ptr) != value)
30 | throw std::runtime_error("round trip failure");
31 | if (ptr + 1 != buffer.end())
32 | throw std::runtime_error("unparsed output");
33 | return 0;
34 | }
35 |
--------------------------------------------------------------------------------
/external/sol3/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # 🎉 Donators! ♥ 🎉
2 |
3 | Thank you to all patrons, donators and contributors who help keep sol3 amazing.
4 |
5 | - Robert Salvet
6 | - Ορφέας Ζαφείρης - 2x Donations!
7 | - Michael Wallar
8 | - Johannes Schultz
9 | - Elias Daler
10 | - BECKMANN & EGLE Industrieelektronik GmbH [bue.de](https://www.bue.de/)
11 |
12 |
13 | # 🎉 Patrons! ♥ 🎉
14 |
15 | Beyond just a one-time donation, patrons make a continued commitment to help keep sol3 supported and bug-free. Thank you for your patronage! Here are the supporters that wanted to be featured as sol3 contributors.
16 |
17 | - Joel Falcou
18 | - Michael Caisse
19 | - Joshua Fisher
20 | - Ορφέας Ζαφείρης
21 |
22 |
23 | # Company Patrons / Supporters #
24 |
25 | Companies who sign up for a long-term support contract or patronage are listed here! They really push forward what's possible with sol3 (and the newer v3)! Please reach out to phdofthehouse@gmail.com if you are interested in a custom solution or a long-term support contract that goes beyond the current release's needs!
26 |
27 | - Intrepid Control Systems [intrepidcs.com](https://www.intrepidcs.com/)
28 |
--------------------------------------------------------------------------------
/src/sha512.h:
--------------------------------------------------------------------------------
1 | /*
2 | * sha512.h - interface to mbedTLS SHA512 hash function.
3 | *
4 | * Copyright 2017 Google Inc.
5 | * Author: Joe Richey (joerichey@google.com)
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
8 | * use this file except in compliance with the License. You may obtain a copy of
9 | * the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 | * License for the specific language governing permissions and limitations under
17 | * the License.
18 | */
19 |
20 | #ifndef SHA512_H
21 | #define SHA512_H
22 |
23 | #include
24 | #include
25 |
26 | #define SHA512_DIGEST_LENGTH 64
27 |
28 | extern void SHA512(const uint8_t* in, size_t n,
29 | uint8_t out[SHA512_DIGEST_LENGTH]);
30 |
31 | // Zero the memory pointed to by v; this will not be optimized away.
32 | extern void secure_wipe(uint8_t* v, uint32_t n);
33 |
34 | #endif /* SHA512_H */
35 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2003 Yuta Mori All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/external/sol3/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013-2020 Rapptz, ThePhD, and contributors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/tests/vector.asm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | %{
5 |
6 | function my_test(arr)
7 | for i=1,#arr do
8 | print(arr[i])
9 | end
10 | return 0
11 | end
12 |
13 | function check_img(img, cols)
14 | for i=1,#img.colors do
15 | print(i, img.colors[i])
16 | end
17 |
18 | print(img.width)
19 | end
20 |
21 | }%
22 |
23 |
24 | a = [1,2,3]
25 | b = a[2]
26 | !print b
27 | c = my_test(a[0:2])
28 |
29 | min(5, 3)
30 | min($, 1)
31 | min(8, $)
32 | !print $
33 |
34 |
35 | load_png("../data/test.png")
36 | save_png("org.png", $)
37 | remap_image($, [$ffffff, $000000, $080000, $0000e0, $c0c000])
38 | save_png("remapped.png", $)
39 | change_bpp($, 4)
40 | save_png("bpp.png", $)
41 | layout_image($, 8, 8)
42 | save_png("layed.png", $)
43 | !section "main",0
44 | !fill $.pixels
45 |
46 |
47 | load_png("../data/mountain.png")
48 | remap_image($, [$0000, $555555, $aaaaaa, $ffffff])
49 | remapped = remap_image($, [$0000, $ffffff])
50 | x = to_monochrome(remapped.pixels)
51 | remapped2 = change_bpp(remapped, 1)
52 | save_png("mountain2.png", remapped2)
53 |
54 | !assert x == remapped2.pixels
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/asm/music2.asm:
--------------------------------------------------------------------------------
1 | ;----------------------------------------------------------
2 | ; badass -- C64 Example source
3 | ; Music with relocation
4 | ; sasq - 2020
5 | ;----------------------------------------------------------
6 |
7 | !include "utils.inc"
8 | !include "vic.inc"
9 |
10 | musicLocation = $1000
11 | !section "RAM",$801
12 |
13 | !section "code",in="RAM" {
14 | BasicStart()
15 |
16 | sei
17 |
18 | !test "copy"
19 | MemMove(musicLocation, sections.music.start, sections.music.size)
20 | !rts
21 | !assert compare(tests.copy.ram[musicLocation:musicLocation+sections.music.size], sections.music.data)
22 |
23 | lda #0
24 | tax
25 | tay
26 | jsr music_init
27 |
28 | $ lda #100
29 | cmp $d012
30 | bne -
31 |
32 | lda #4
33 | sta $d020
34 | jsr music_play
35 | lda #0
36 | sta $d020
37 |
38 | jmp -
39 |
40 | !include "../external/lzsa/asm/6502/decompress_fast_v1.asm"
41 | }
42 |
43 | sid = load("../data/test.sid")
44 | music_init = big_word(sid[$a:$c])
45 | music_play = big_word(sid[$c:$e])
46 |
47 | !assert music_init == musicLocation
48 |
49 | music_data = sid[$7e:]
50 |
51 | !section "music", in="RAM" {
52 | !fill music_data
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/external/lzsa/Makefile:
--------------------------------------------------------------------------------
1 | CC=clang
2 | CFLAGS=-O3 -g -fomit-frame-pointer -Isrc/libdivsufsort/include -Isrc
3 | OBJDIR=obj
4 | LDFLAGS=
5 |
6 | $(OBJDIR)/%.o: src/../%.c
7 | @mkdir -p '$(@D)'
8 | $(CC) $(CFLAGS) -c $< -o $@
9 |
10 | APP := lzsa
11 |
12 | OBJS += $(OBJDIR)/src/lzsa.o
13 | OBJS += $(OBJDIR)/src/dictionary.o
14 | OBJS += $(OBJDIR)/src/expand_block_v1.o
15 | OBJS += $(OBJDIR)/src/expand_block_v2.o
16 | OBJS += $(OBJDIR)/src/expand_context.o
17 | OBJS += $(OBJDIR)/src/expand_inmem.o
18 | OBJS += $(OBJDIR)/src/expand_streaming.o
19 | OBJS += $(OBJDIR)/src/frame.o
20 | OBJS += $(OBJDIR)/src/matchfinder.o
21 | OBJS += $(OBJDIR)/src/shrink_block_v1.o
22 | OBJS += $(OBJDIR)/src/shrink_block_v2.o
23 | OBJS += $(OBJDIR)/src/shrink_context.o
24 | OBJS += $(OBJDIR)/src/shrink_inmem.o
25 | OBJS += $(OBJDIR)/src/shrink_streaming.o
26 | OBJS += $(OBJDIR)/src/stream.o
27 | OBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort.o
28 | OBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort_utils.o
29 | OBJS += $(OBJDIR)/src/libdivsufsort/lib/sssort.o
30 | OBJS += $(OBJDIR)/src/libdivsufsort/lib/trsort.o
31 |
32 | all: $(APP)
33 |
34 | $(APP): $(OBJS)
35 | $(CC) $^ $(LDFLAGS) -o $(APP)
36 |
37 | clean:
38 | @rm -rf $(APP) $(OBJDIR)
39 |
40 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/image.less:
--------------------------------------------------------------------------------
1 | // Image Mixins
2 | // - Responsive image
3 | // - Retina image
4 |
5 |
6 | // Responsive image
7 | //
8 | // Keep images from scaling beyond the width of their parents.
9 | .img-responsive(@display: block) {
10 | display: @display;
11 | max-width: 100%; // Part 1: Set a maximum relative to the parent
12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
13 | }
14 |
15 |
16 | // Retina image
17 | //
18 | // Short retina mixin for setting background-image and -size. Note that the
19 | // spelling of `min--moz-device-pixel-ratio` is intentional.
20 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
21 | background-image: url("@{file-1x}");
22 |
23 | @media
24 | only screen and (-webkit-min-device-pixel-ratio: 2),
25 | only screen and ( min--moz-device-pixel-ratio: 2),
26 | only screen and ( -o-min-device-pixel-ratio: 2/1),
27 | only screen and ( min-device-pixel-ratio: 2),
28 | only screen and ( min-resolution: 192dpi),
29 | only screen and ( min-resolution: 2dppx) {
30 | background-image: url("@{file-2x}");
31 | background-size: @width-1x @height-1x;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/jumbotron.less:
--------------------------------------------------------------------------------
1 | //
2 | // Jumbotron
3 | // --------------------------------------------------
4 |
5 |
6 | .jumbotron {
7 | padding: @jumbotron-padding (@jumbotron-padding / 2);
8 | margin-bottom: @jumbotron-padding;
9 | color: @jumbotron-color;
10 | background-color: @jumbotron-bg;
11 |
12 | h1,
13 | .h1 {
14 | color: @jumbotron-heading-color;
15 | }
16 |
17 | p {
18 | margin-bottom: (@jumbotron-padding / 2);
19 | font-size: @jumbotron-font-size;
20 | font-weight: 200;
21 | }
22 |
23 | > hr {
24 | border-top-color: darken(@jumbotron-bg, 10%);
25 | }
26 |
27 | .tb-container &,
28 | .container-fluid & {
29 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
30 | }
31 |
32 | .tb-container {
33 | max-width: 100%;
34 | }
35 |
36 | @media screen and (min-width: @screen-sm-min) {
37 | padding: (@jumbotron-padding * 1.6) 0;
38 |
39 | .tb-container &,
40 | .container-fluid & {
41 | padding-left: (@jumbotron-padding * 2);
42 | padding-right: (@jumbotron-padding * 2);
43 | }
44 |
45 | h1,
46 | .h1 {
47 | font-size: (@font-size-base * 4.5);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/docs/TESTS.adoc:
--------------------------------------------------------------------------------
1 | == Testing
2 |
3 | Since bass has a built in 6502 emulator, you can test your code as part of
4 | the build step.
5 |
6 | Basic testing is very simple: Just add `!test` in front of a routine you
7 | want to test:
8 |
9 | ```asm
10 | !test
11 | add_xy:
12 | txa
13 | stx $2
14 | clc
15 | adc $2
16 | rts
17 | ```
18 |
19 | This will add a test starting at the given position.
20 |
21 | After the assembler has successfully compiled your program, it will run
22 | your tests by just jumping to the indicated position.
23 |
24 | Just adding `!test` like this is a great way to make sure you haven't done something
25 | stupid like an infinite loop or jumping into zero memory. But of course it will
26 | be more useful if you add checks:
27 |
28 |
29 | ```asm
30 | !test X=5,Y=9
31 | add_xy:
32 | txa
33 | stx $2
34 | clc
35 | adc $2
36 | !check A == 14
37 | rts
38 | ```
39 |
40 | You can also insert arbitrary lua code, and a "virtual" rts intruction for
41 | testing parts your code:
42 |
43 |
44 | ```asm
45 | add_xy:
46 | txa
47 | !test
48 | !run {: mem_write($2, $e9) :}
49 | ldx $2
50 | tax
51 | and #$f
52 | !check X == 9
53 | !rts
54 | stx $4
55 | nop
56 | rts
57 | ```
58 |
--------------------------------------------------------------------------------
/tests/index_labels.asm:
--------------------------------------------------------------------------------
1 | ; constant D011VALUE == value in d011
2 | ; \1 == Raster row
3 |
4 | D011VALUE = 0
5 |
6 | !macro DrawRasterColors(row) {
7 | !if (row & 7) == (D011VALUE & 7) {
8 | ; 23 cycle macro
9 | col[row]:
10 | lda #0 ; 2
11 | sta $d020 ; 6
12 | sta $d021 ; 10
13 | !rept 5 { nop }
14 | bit $ea ; 23
15 | } else {
16 | ;63 cycle macro
17 | col[row]:
18 | lda #0 ; 2
19 | sta $d020 ; 6
20 | sta $d021 ; 10
21 | !rept 25 { nop }
22 | bit $ea ; 63
23 | }
24 | }
25 |
26 | !section "main", $c000
27 |
28 | !rept 6*8 {
29 | DrawRasterColors(i + $40)
30 | }
31 |
32 | !test "bad"
33 | DrawRasterColors(0)
34 | rts
35 |
36 | !print tests.bad.cycles
37 | !assert tests.bad.cycles == 23
38 |
39 | !test "good"
40 | DrawRasterColors(1)
41 | rts
42 |
43 | !assert tests.good.cycles == 63
44 |
45 | !test "modify"
46 | lda #9
47 | sta col[$40]+1
48 | lda #8
49 | sta col[$41]+1
50 | rts
51 |
52 | !assert tests.modify.ram[$c001] == 9
53 | !assert tests.modify.ram[$c010] == 8
54 |
55 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 |
4 | // Utilities
5 | @import "mixins/hide-text.less";
6 | @import "mixins/opacity.less";
7 | @import "mixins/image.less";
8 | @import "mixins/labels.less";
9 | @import "mixins/reset-filter.less";
10 | @import "mixins/resize.less";
11 | @import "mixins/responsive-visibility.less";
12 | @import "mixins/size.less";
13 | @import "mixins/tab-focus.less";
14 | @import "mixins/text-emphasis.less";
15 | @import "mixins/text-overflow.less";
16 | @import "mixins/vendor-prefixes.less";
17 |
18 | // Components
19 | @import "mixins/alerts.less";
20 | @import "mixins/buttons.less";
21 | @import "mixins/panels.less";
22 | @import "mixins/pagination.less";
23 | @import "mixins/list-group.less";
24 | @import "mixins/nav-divider.less";
25 | @import "mixins/forms.less";
26 | @import "mixins/progress-bar.less";
27 | @import "mixins/table-row.less";
28 |
29 | // Skins
30 | @import "mixins/background-variant.less";
31 | @import "mixins/border-radius.less";
32 | @import "mixins/gradients.less";
33 |
34 | // Layout
35 | @import "mixins/clearfix.less";
36 | @import "mixins/center-block.less";
37 | @import "mixins/nav-vertical-align.less";
38 | @import "mixins/grid-framework.less";
39 | @import "mixins/grid.less";
40 |
--------------------------------------------------------------------------------
/external/coreutils/src/coreutils/format.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | #ifdef USE_FMT
8 |
9 | # include
10 | # include
11 |
12 | namespace utils {
13 |
14 | template std::string format(const std::string& fmt, A&&... args)
15 | {
16 | return fmt::sprintf(fmt, std::forward(args)...);
17 | }
18 |
19 | template void print_fmt(const std::string& fmt, A&&... args)
20 | {
21 | fmt::printf(fmt, std::forward(args)...);
22 | }
23 |
24 | template void println(const std::string& fmt = "", A&&... args)
25 | {
26 | fmt::printf(fmt + "\n", std::forward(args)...);
27 | }
28 |
29 | } // namespace utils
30 |
31 | #else
32 |
33 | namespace utils {
34 |
35 | template std::string format(const std::string& fmt, A&&... args)
36 | {
37 | return fmt;//fmt::sprintf(fmt, std::forward(args)...);
38 | }
39 |
40 | template void print_fmt(const std::string& fmt, A&&... args)
41 | {
42 |
43 | //fmt::printf(fmt, std::forward(args)...);
44 | }
45 |
46 | template void println(const std::string& fmt = "", A&&... args)
47 | {
48 | //fmt::printf(fmt + "\n", std::forward(args)...);
49 | }
50 |
51 | } // namespace utils
52 |
53 | #endif
54 |
55 |
--------------------------------------------------------------------------------
/src/sectiontest.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include "catch.hpp"
3 |
4 | #include "machine.h"
5 |
6 | #include
7 |
8 | using namespace std::string_literals;
9 |
10 | TEST_CASE("sections.basic", "[sections]")
11 | {
12 | Machine m;
13 |
14 | auto& main = m.addSection({"main", 0x1000});
15 |
16 | main.size = 0x3000;
17 | main.flags |= (FixedSize|FixedStart);
18 |
19 | auto& text = m.addSection({"text", "main"});
20 | auto& extra = m.addSection({"extra", "main"});
21 | auto& utils = m.addSection({"utils", "main"});
22 |
23 | utils.size = 0x100;
24 | utils.data = std::vector(0x100);
25 | text.size = 0x200;
26 | text.flags |= FixedSize;
27 |
28 | m.layoutSections();
29 |
30 | REQUIRE(utils.start == 0x1000 + 0x200);
31 | REQUIRE(text.start == 0x1000);
32 |
33 | auto& a = m.addSection({"a", "extra"});
34 | auto& b = m.addSection({"b", "extra"});
35 |
36 | a.data = std::vector(0x20);
37 | b.data = std::vector(0x30);
38 |
39 | m.layoutSections();
40 | REQUIRE(text.start == 0x1000);
41 | REQUIRE(utils.start == 0x1000 + 0x200 + 0x50);
42 | REQUIRE(b.start == 0x1000 + 0x200 + 0x20);
43 |
44 | m.layoutSections();
45 | REQUIRE(utils.start == 0x1000 + 0x200 + 0x50);
46 | REQUIRE(b.start == 0x1000 + 0x200 + 0x20);
47 | }
48 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/mixins/buttons.less:
--------------------------------------------------------------------------------
1 | // Button variants
2 | //
3 | // Easily pump out default styles, as well as :hover, :focus, :active,
4 | // and disabled options for all buttons
5 |
6 | .button-variant(@color; @background; @border) {
7 | color: @color;
8 | background-color: @background;
9 | border-color: @border;
10 |
11 | &:hover,
12 | &:focus,
13 | &.focus,
14 | &:active,
15 | &.active,
16 | .open > .dropdown-toggle& {
17 | color: @color;
18 | background-color: darken(@background, 10%);
19 | border-color: darken(@border, 12%);
20 | }
21 | &:active,
22 | &.active,
23 | .open > .dropdown-toggle& {
24 | background-image: none;
25 | }
26 | &.disabled,
27 | &[disabled],
28 | fieldset[disabled] & {
29 | &,
30 | &:hover,
31 | &:focus,
32 | &.focus,
33 | &:active,
34 | &.active {
35 | background-color: @background;
36 | border-color: @border;
37 | }
38 | }
39 |
40 | .badge {
41 | color: @background;
42 | background-color: @color;
43 | }
44 | }
45 |
46 | // Button sizes
47 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
48 | padding: @padding-vertical @padding-horizontal;
49 | font-size: @font-size;
50 | line-height: @line-height;
51 | border-radius: @border-radius;
52 | }
53 |
--------------------------------------------------------------------------------
/external/sol3/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # sol3
2 |
3 | # The MIT License (MIT)
4 |
5 | # Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | # this software and associated documentation files (the "Software"), to deal in
9 | # the Software without restriction, including without limitation the rights to
10 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | # the Software, and to permit persons to whom the Software is furnished to do so,
12 | # subject to the following conditions:
13 |
14 | # The above copyright notice and this permission notice shall be included in all
15 | # copies or substantial portions of the Software.
16 |
17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | github: ThePhD
25 | custom: https://thephd.github.io/support/
26 |
--------------------------------------------------------------------------------
/external/CLI11/conanfile.py:
--------------------------------------------------------------------------------
1 | from conans import ConanFile, CMake
2 | from conans.tools import load
3 | import re
4 |
5 | def get_version():
6 | try:
7 | content = load("include/CLI/Version.hpp")
8 | version = re.search(r'#define CLI11_VERSION "(.*)"', content).group(1)
9 | return version
10 | except Exception:
11 | return None
12 |
13 | class CLI11Conan(ConanFile):
14 | name = "CLI11"
15 | version = get_version()
16 | description = "Command Line Interface toolkit for C++11"
17 | topics = ("cli", "c++11", "parser", "cli11")
18 | url = "https://github.com/CLIUtils/CLI11"
19 | homepage = "https://github.com/CLIUtils/CLI11"
20 | author = "Henry Schreiner "
21 | license = "BSD-3-Clause"
22 |
23 | settings = "os", "compiler", "arch", "build_type"
24 | exports_sources = "LICENSE", "README.md", "include/*", "extern/*", "cmake/*", "CMakeLists.txt", "tests/*"
25 |
26 | def build(self): # this is not building a library, just tests
27 | cmake = CMake(self)
28 | cmake.definitions["CLI11_EXAMPLES"] = "OFF"
29 | cmake.definitions["CLI11_SINGLE_FILE"] = "OFF"
30 | cmake.configure()
31 | cmake.build()
32 | cmake.test()
33 | cmake.install()
34 |
35 | def package_id(self):
36 | self.info.header_only()
37 |
--------------------------------------------------------------------------------
/external/fmt/test/fuzzing/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019, Paul Dreik
2 | # License: see LICENSE.rst in the fmt root directory
3 |
4 | # Link in the main function. Useful for reproducing, kcov, gdb, afl, valgrind.
5 | # (Note that libFuzzer can also reproduce, just pass it the files.)
6 | option(FMT_FUZZ_LINKMAIN "Enables the reproduce mode, instead of libFuzzer" On)
7 |
8 | # For oss-fuzz - insert $LIB_FUZZING_ENGINE into the link flags, but only for
9 | # the fuzz targets, otherwise the CMake configuration step fails.
10 | set(FMT_FUZZ_LDFLAGS "" CACHE STRING "LDFLAGS for the fuzz targets")
11 |
12 | # Adds a binary for reproducing, i.e. no fuzzing, just enables replaying data
13 | # through the fuzzers.
14 | function(add_fuzzer source)
15 | get_filename_component(basename ${source} NAME_WE)
16 | set(name ${basename}-fuzzer)
17 | add_executable(${name} ${source} fuzzer-common.h)
18 | if (FMT_FUZZ_LINKMAIN)
19 | target_sources(${name} PRIVATE main.cc)
20 | endif ()
21 | target_link_libraries(${name} PRIVATE fmt)
22 | if (FMT_FUZZ_LDFLAGS)
23 | target_link_libraries(${name} PRIVATE ${FMT_FUZZ_LDFLAGS})
24 | endif ()
25 | target_compile_features(${name} PRIVATE cxx_generic_lambdas)
26 | endfunction()
27 |
28 | foreach (source chrono-duration.cc float.cc named-arg.cc one-arg.cc two-args.cc)
29 | add_fuzzer(${source})
30 | endforeach ()
31 |
--------------------------------------------------------------------------------
/external/sol3/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing to sol
2 |
3 | Looking to contribute to sol? Well, first thing I want to mention is thank you!
4 | Second of all, this is probably where you should look :)
5 |
6 | ## Reporting Issues
7 |
8 | If you found a bug, please make sure to make an issue in the issue tracker.
9 |
10 | The guidelines for reporting a bug are relatively simple and are as follows:
11 |
12 | 1. Produce a simple, short, compilable test case that reproduces your problem.
13 | 2. Make a descriptive title that summarises the bug as a whole.
14 | 3. Explain the bug in as much detail as you can in the body of the issue.
15 |
16 | If you have all of those requirements set, then your issue reporting is golden.
17 |
18 | ## Submitting a pull request
19 |
20 | Submitting a pull request is fairly simple, just make sure it focuses on a single aspect and doesn't
21 | manage to have scope creep and it's probably good to go. It would be incredibly lovely if the style is
22 | consistent to those found in the repository.
23 |
24 | To help with this, a `.clang-format` is included. Please run it on your code before you push anything.
25 |
26 | If you don't meet all of these style guidelines, don't fret. I'll probably fix it. But please
27 | do make an effort to actually meet them. Otherwise I'm more likely to reject the pull request.
28 |
--------------------------------------------------------------------------------
/asm/simple_scroller2.asm:
--------------------------------------------------------------------------------
1 | !include "pet100.inc"
2 |
3 | !section "main", $8000
4 |
5 | Line = $0400
6 |
7 |
8 | start:
9 | lda #0
10 | sta Regs.WinX
11 | lda #CONSOLE_HEIGHT-2
12 | sta Regs.WinY
13 | lda #1
14 | sta Regs.WinH
15 | lda #CONSOLE_WIDTH
16 | sta Regs.WinW
17 |
18 |
19 | lda #Palette
22 | sta $03
23 |
24 | lda #0
25 | tay
26 | clc
27 | $
28 | !rept 3 {
29 | sta ($02),y
30 | inc $02
31 | }
32 | adc #16
33 | bne -
34 |
35 | ldx #CONSOLE_WIDTH
36 | $
37 | dex
38 | lda colors,x
39 | sta $d800,x
40 | cpx #0
41 | bne -
42 |
43 | .res
44 | lda # i]
72 | !fill CONSOLE_WIDTH-28, 15
73 | !fill 14, [i -> 15-i]
74 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/bootstrap.less:
--------------------------------------------------------------------------------
1 | // Core variables and mixins
2 | @import "variables.less";
3 | @import "mixins.less";
4 |
5 | // Reset and dependencies
6 | @import "normalize.less";
7 | @import "print.less";
8 | @import "glyphicons.less";
9 |
10 | // Core CSS
11 | @import "scaffolding.less";
12 | @import "type.less";
13 | @import "code.less";
14 | @import "grid.less";
15 | @import "tables.less";
16 | @import "forms.less";
17 | @import "buttons.less";
18 |
19 | // Components
20 | @import "component-animations.less";
21 | @import "dropdowns.less";
22 | @import "button-groups.less";
23 | @import "input-groups.less";
24 | @import "navs.less";
25 | @import "navbar.less";
26 | @import "breadcrumbs.less";
27 | @import "pagination.less";
28 | @import "pager.less";
29 | @import "labels.less";
30 | @import "badges.less";
31 | @import "jumbotron.less";
32 | @import "thumbnails.less";
33 | @import "alerts.less";
34 | @import "progress-bars.less";
35 | @import "media.less";
36 | @import "list-group.less";
37 | @import "panels.less";
38 | @import "responsive-embed.less";
39 | @import "wells.less";
40 | @import "close.less";
41 |
42 | // Components w/ JavaScript
43 | @import "modals.less";
44 | @import "tooltip.less";
45 | @import "popovers.less";
46 | @import "carousel.less";
47 |
48 | // Utility classes
49 | @import "utilities.less";
50 | @import "responsive-utilities.less";
51 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/lib/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include"
2 | "${CMAKE_CURRENT_BINARY_DIR}/../include")
3 |
4 | set(divsufsort_SRCS divsufsort.c sssort.c trsort.c utils.c)
5 |
6 | ## libdivsufsort ##
7 | add_library(divsufsort ${divsufsort_SRCS})
8 | install(TARGETS divsufsort
9 | RUNTIME DESTINATION ${CMAKE_INSTALL_RUNTIMEDIR}
10 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
11 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
12 | set_target_properties(divsufsort PROPERTIES
13 | VERSION "${LIBRARY_VERSION}"
14 | SOVERSION "${LIBRARY_SOVERSION}"
15 | DEFINE_SYMBOL DIVSUFSORT_BUILD_DLL
16 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../examples")
17 |
18 | ## libdivsufsort64 ##
19 | if(BUILD_DIVSUFSORT64)
20 | add_library(divsufsort64 ${divsufsort_SRCS})
21 | install(TARGETS divsufsort64
22 | RUNTIME DESTINATION ${CMAKE_INSTALL_RUNTIMEDIR}
23 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
24 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
25 | set_target_properties(divsufsort64 PROPERTIES
26 | VERSION "${LIBRARY_VERSION}"
27 | SOVERSION "${LIBRARY_SOVERSION}"
28 | DEFINE_SYMBOL DIVSUFSORT_BUILD_DLL
29 | COMPILE_FLAGS "-DBUILD_DIVSUFSORT64"
30 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../examples")
31 | endif(BUILD_DIVSUFSORT64)
32 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/labels.less:
--------------------------------------------------------------------------------
1 | //
2 | // Labels
3 | // --------------------------------------------------
4 |
5 | .label {
6 | display: inline;
7 | padding: .2em .6em .3em;
8 | font-size: 75%;
9 | font-weight: bold;
10 | line-height: 1;
11 | color: @label-color;
12 | text-align: center;
13 | white-space: nowrap;
14 | vertical-align: baseline;
15 | border-radius: .25em;
16 |
17 | // Add hover effects, but only for links
18 | a& {
19 | &:hover,
20 | &:focus {
21 | color: @label-link-hover-color;
22 | text-decoration: none;
23 | cursor: pointer;
24 | }
25 | }
26 |
27 | // Empty labels collapse automatically (not available in IE8)
28 | &:empty {
29 | display: none;
30 | }
31 |
32 | // Quick fix for labels in buttons
33 | .btn & {
34 | position: relative;
35 | top: -1px;
36 | }
37 | }
38 |
39 | // Colors
40 | // Contextual variations (linked labels get darker on :hover)
41 |
42 | .label-default {
43 | .label-variant(@label-default-bg);
44 | }
45 |
46 | .label-primary {
47 | .label-variant(@label-primary-bg);
48 | }
49 |
50 | .label-success {
51 | .label-variant(@label-success-bg);
52 | }
53 |
54 | .label-info {
55 | .label-variant(@label-info-bg);
56 | }
57 |
58 | .label-warning {
59 | .label-variant(@label-warning-bg);
60 | }
61 |
62 | .label-danger {
63 | .label-variant(@label-danger-bg);
64 | }
65 |
--------------------------------------------------------------------------------
/external/sol3/.dockerignore:
--------------------------------------------------------------------------------
1 | # # # # sol3
2 | # The MIT License (MIT)
3 | #
4 | # Copyright (c) 2013-2020 Rapptz, ThePhD, and contributors
5 | #
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | # this software and associated documentation files (the "Software"), to deal in
8 | # the Software without restriction, including without limitation the rights to
9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | # the Software, and to permit persons to whom the Software is furnished to do so,
11 | # subject to the following conditions:
12 | #
13 | # The above copyright notice and this permission notice shall be included in all
14 | # copies or substantial portions of the Software.
15 | #
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | # Ignore literally everything
24 | **
25 |
26 | # Except the script directory
27 | !scripts/preparation*
28 |
--------------------------------------------------------------------------------
/external/CLI11/include/CLI/Macros.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Distributed under the 3-Clause BSD License. See accompanying
4 | // file LICENSE or https://github.com/CLIUtils/CLI11 for details.
5 |
6 | // [CLI11:verbatim]
7 |
8 | // The following version macro is very similar to the one in PyBind11
9 | #if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER)
10 | #if __cplusplus >= 201402L
11 | #define CLI11_CPP14
12 | #if __cplusplus >= 201703L
13 | #define CLI11_CPP17
14 | #if __cplusplus > 201703L
15 | #define CLI11_CPP20
16 | #endif
17 | #endif
18 | #endif
19 | #elif defined(_MSC_VER) && __cplusplus == 199711L
20 | // MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fully implemented)
21 | // Unless you use the /Zc:__cplusplus flag on Visual Studio 2017 15.7 Preview 3 or newer
22 | #if _MSVC_LANG >= 201402L
23 | #define CLI11_CPP14
24 | #if _MSVC_LANG > 201402L && _MSC_VER >= 1910
25 | #define CLI11_CPP17
26 | #if __MSVC_LANG > 201703L && _MSC_VER >= 1910
27 | #define CLI11_CPP20
28 | #endif
29 | #endif
30 | #endif
31 | #endif
32 |
33 | #if defined(CLI11_CPP14)
34 | #define CLI11_DEPRECATED(reason) [[deprecated(reason)]]
35 | #elif defined(_MSC_VER)
36 | #define CLI11_DEPRECATED(reason) __declspec(deprecated(reason))
37 | #else
38 | #define CLI11_DEPRECATED(reason) __attribute__((deprecated(reason)))
39 | #endif
40 |
41 | // [CLI11:verbatim]
42 |
--------------------------------------------------------------------------------
/external/fmt/test/test-main.cc:
--------------------------------------------------------------------------------
1 | // Formatting library for C++ - test main function.
2 | //
3 | // Copyright (c) 2012 - present, Victor Zverovich
4 | // All rights reserved.
5 | //
6 | // For the license information refer to format.h.
7 |
8 | #include
9 |
10 | #include "gtest.h"
11 |
12 | #ifdef _WIN32
13 | # include
14 | #endif
15 |
16 | #ifdef _MSC_VER
17 | # include
18 | #else
19 | # define _CrtSetReportFile(a, b)
20 | # define _CrtSetReportMode(a, b)
21 | #endif
22 |
23 | int main(int argc, char** argv) {
24 | #ifdef _WIN32
25 | // Don't display any error dialogs. This also suppresses message boxes
26 | // on assertion failures in MinGW where _set_error_mode/CrtSetReportMode
27 | // doesn't help.
28 | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
29 | SEM_NOOPENFILEERRORBOX);
30 | #endif
31 | // Disable message boxes on assertion failures.
32 | _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
33 | _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
34 | _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
35 | _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
36 | try {
37 | testing::InitGoogleTest(&argc, argv);
38 | return RUN_ALL_TESTS();
39 | } catch (...) {
40 | // Catch all exceptions to make Coverity happy.
41 | }
42 | return EXIT_FAILURE;
43 | }
44 |
--------------------------------------------------------------------------------
/external/fmt/test/util.cc:
--------------------------------------------------------------------------------
1 | // Formatting library for C++ - test utilities
2 | //
3 | // Copyright (c) 2012 - present, Victor Zverovich
4 | // All rights reserved.
5 | //
6 | // For the license information refer to format.h.
7 |
8 | #include "util.h"
9 |
10 | #include
11 |
12 | void increment(char* s) {
13 | for (int i = static_cast(std::strlen(s)) - 1; i >= 0; --i) {
14 | if (s[i] != '9') {
15 | ++s[i];
16 | break;
17 | }
18 | s[i] = '0';
19 | }
20 | }
21 |
22 | std::string get_system_error(int error_code) {
23 | #if defined(__MINGW32__) || !defined(_WIN32)
24 | return strerror(error_code);
25 | #else
26 | enum { BUFFER_SIZE = 200 };
27 | char buffer[BUFFER_SIZE];
28 | if (strerror_s(buffer, BUFFER_SIZE, error_code))
29 | throw std::exception("strerror_s failed");
30 | return buffer;
31 | #endif
32 | }
33 |
34 | const char* const FILE_CONTENT = "Don't panic!";
35 |
36 | fmt::buffered_file open_buffered_file(FILE** fp) {
37 | #if FMT_USE_FCNTL
38 | fmt::file read_end, write_end;
39 | fmt::file::pipe(read_end, write_end);
40 | write_end.write(FILE_CONTENT, std::strlen(FILE_CONTENT));
41 | write_end.close();
42 | fmt::buffered_file f = read_end.fdopen("r");
43 | if (fp) *fp = f.get();
44 | #else
45 | fmt::buffered_file f("test-file", "w");
46 | fputs(FILE_CONTENT, f.get());
47 | if (fp) *fp = f.get();
48 | #endif
49 | return f;
50 | }
51 |
--------------------------------------------------------------------------------
/src/gtest.cpp:
--------------------------------------------------------------------------------
1 |
2 | extern char const* const grammar6502;
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include
10 | #include
11 |
12 | int main(int argc, char** argv)
13 | {
14 | peg::parser p{grammar6502};
15 | p.enable_ast();
16 |
17 | printf("Parsing\n");
18 |
19 | utils::File f{argv[1]};
20 |
21 | auto data = f.readAllString();
22 | p.log = [](size_t line, size_t col, const std::string& msg) {
23 | std::cerr << line << ":" << col << ": " << msg << "\n";
24 | };
25 | std::shared_ptr ast;
26 |
27 | std::string spaces{
28 | " "};
29 |
30 | std::function eval = [&](const peg::Ast& ast,
31 | int indent) {
32 | fmt::print("{}{} ({})\n", spaces.substr(indent), ast.name, ast.token);
33 | const auto& nodes = ast.nodes;
34 | for (auto i = 0; i < nodes.size(); i++) {
35 | eval(*nodes[i], indent - 2);
36 | }
37 | };
38 |
39 | p.enable_packrat_parsing();
40 | auto rc = p.parse(data.c_str(), ast);
41 |
42 | ast = peg::AstOptimizer(true).optimize(ast);
43 | if (rc) {
44 | eval(*ast, 54);
45 | }
46 | printf("Result %d\n", (int)rc);
47 |
48 | return 0;
49 | }
50 |
--------------------------------------------------------------------------------
/asm/c64.asm:
--------------------------------------------------------------------------------
1 | %{
2 | function convertBit(b)
3 | if b == 0b00 then return 0b11 end
4 | if b == 0b11 then return 0b00 end
5 | return b
6 | end
7 |
8 | function convertByte(b)
9 | newB = 255 - b
10 |
11 | b0 = (newB >> 6) & 3
12 | b1 = (newB >> 4) & 3
13 | b2 = (newB >> 2) & 3
14 | b3 = newB & 3
15 |
16 | b0 = convertBit(b0)
17 | b1 = convertBit(b1)
18 | b2 = convertBit(b2)
19 | b3 = convertBit(b3)
20 |
21 | return b0 << 6 | b1 << 4 | b2 << 2 | b3
22 | end
23 |
24 | function convByte(b)
25 |
26 | return ((b & 0xaa) >> 1) | ((b & 0x55)<<1)
27 |
28 |
29 | end
30 |
31 | function convertAll(a)
32 | res = {}
33 | for i,v in ipairs(a) do
34 | table.insert(res, convertByte(v))
35 | end
36 | return res
37 | end
38 | }%
39 |
40 | !section "main", 0x801
41 | !byte $0b, $08,$01,$00,$9e,str(start)," BY SASQ", $00,$00,$00
42 |
43 | !section "code", 0x901
44 | start:
45 | .loop
46 | lda $d012
47 | sta $d020
48 | sta $d021
49 | rts
50 |
51 | charsetFile = "jumps.asm"
52 |
53 | !section "car0", *
54 | charset0:
55 | !block convertAll(load(charsetFile))
56 | !section "car1", *
57 | carset1:
58 | !fill load(charsetFile) { ((v & 0xaa) >> 1) | ((v & 0x55)<<1) }
59 |
60 | !assert compare(section.car0.data, section.car1.data)
61 |
62 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/stack_get.hpp:
--------------------------------------------------------------------------------
1 | // sol3
2 |
3 | // The MIT License (MIT)
4 |
5 | // Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | // this software and associated documentation files (the "Software"), to deal in
9 | // the Software without restriction, including without limitation the rights to
10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | // the Software, and to permit persons to whom the Software is furnished to do so,
12 | // subject to the following conditions:
13 |
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 |
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | #ifndef SOL_STACK_GET_HPP
25 | #define SOL_STACK_GET_HPP
26 |
27 | #include
28 | #include
29 |
30 | #endif // SOL_STACK_GET_HPP
31 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/stack_check.hpp:
--------------------------------------------------------------------------------
1 | // sol3
2 |
3 | // The MIT License (MIT)
4 |
5 | // Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | // this software and associated documentation files (the "Software"), to deal in
9 | // the Software without restriction, including without limitation the rights to
10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | // the Software, and to permit persons to whom the Software is furnished to do so,
12 | // subject to the following conditions:
13 |
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 |
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | #ifndef SOL_STACK_CHECK_HPP
25 | #define SOL_STACK_CHECK_HPP
26 |
27 | #include
28 | #include
29 |
30 | #endif // SOL_STACK_CHECK_HPP
31 |
--------------------------------------------------------------------------------
/external/fmt/doc/fmt.less:
--------------------------------------------------------------------------------
1 | @import 'bootstrap.less';
2 |
3 | @header-bg: #094d75;
4 | @icon-font-path: "fonts/";
5 |
6 | html {
7 | overflow-y: scroll;
8 | }
9 |
10 | .navbar {
11 | border-radius: 0;
12 | margin-bottom: 0;
13 | background-color: darken(@header-bg, 10%);
14 | }
15 |
16 | .jumbotron {
17 | #gradient > .vertical(@header-bg; darken(@header-bg, 2%); 50%; 50%);
18 | background-size: 100% 4px;
19 | background-color: @header-bg;
20 | background-repeat: repeat-y;
21 | color: white;
22 | text-align: center;
23 | }
24 |
25 | div.sphinxsidebar {
26 | margin-left: 0;
27 | }
28 |
29 | // Keep content not too wide for better readability.
30 | .navbar-content, .content {
31 | .make-md-column-offset(1);
32 | .make-md-column(10);
33 | .make-lg-column-offset(2);
34 | .make-lg-column(8);
35 | }
36 |
37 | .footer {
38 | padding-top: 20px;
39 | padding-bottom: 20px;
40 | border-top: 1px solid @gray-lighter;
41 | text-align: center;
42 | }
43 |
44 | // Indent descriptions of classes, functions and macros.
45 | .class dd, .function dd, .macro dd {
46 | margin-left: 20px;
47 | }
48 |
49 | // Remove Bootstrap padding for Sphinx containers.
50 | .breathe-sectiondef.container {
51 | padding: 0;
52 | }
53 |
54 | // Remove Bootstrap padding for Sphinx code elements in API signatures.
55 | .descclassname, .descname {
56 | padding: 0;
57 | }
58 |
59 | p.rubric {
60 | margin-top: 10px;
61 | }
62 |
63 | .github-btn {
64 | border: 0;
65 | overflow: hidden;
66 | }
67 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/stack_check_get.hpp:
--------------------------------------------------------------------------------
1 | // sol3
2 |
3 | // The MIT License (MIT)
4 |
5 | // Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | // this software and associated documentation files (the "Software"), to deal in
9 | // the Software without restriction, including without limitation the rights to
10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | // the Software, and to permit persons to whom the Software is furnished to do so,
12 | // subject to the following conditions:
13 |
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 |
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | #ifndef SOL_STACK_CHECK_GET_HPP
25 | #define SOL_STACK_CHECK_GET_HPP
26 |
27 | #include
28 | #include
29 |
30 | #endif // SOL_STACK_CHECK_GET_HPP
31 |
--------------------------------------------------------------------------------
/external/lzsa/StreamFormat.md:
--------------------------------------------------------------------------------
1 | # Stream format
2 |
3 | The stream format is composed of:
4 |
5 | * a header
6 | * one or more frames
7 | * a footer
8 |
9 | # Header format
10 |
11 | The 3-bytes LZSA header contains a signature and a traits byte:
12 |
13 | 0 1 2
14 | 0x7b 0x9e 7 6 5 4 3 2 1
15 | V V V Z Z Z Z
16 | <--- signature ---> <- traits ->
17 |
18 | Trait bits:
19 |
20 | * V: 3 bit code that indicates which block data encoding is used. 0 is LZSA1 and 1 is LZSA2.
21 | * Z: these bits in the traits are set to 0 for LZSA1 and LZSA2.
22 |
23 | # Frame format
24 |
25 | Each frame contains a 3-bytes length followed by block data that expands to up to 64 Kb of decompressed data. The block data is encoded either as LZSA1 or LZSA2 depending on the V bits of the traits byte in the header.
26 |
27 | 0 1 2
28 | DSZ0 DSZ1 U|DSZ2
29 |
30 | * DSZ0 (length byte 0) contains bits 0-7 of the block data size
31 | * DSZ1 (length byte 1) contains bits 8-15 of the block data size
32 | * DSZ2 (bit 0 of length byte 2) contains bit 16 of the block data size
33 | * U (bit 7 of length byte 2) is set if the block data is uncompressed, and clear if the block data is compressed.
34 | * Bits 1..6 of length byte 2 are currently undefined and must be set to 0.
35 |
36 | # Footer format
37 |
38 | The stream ends with the EOD frame: the 3 length bytes are set to 0x00, 0x00, 0x00, and no block data follows.
39 |
40 |
--------------------------------------------------------------------------------
/external/fmt/LICENSE.rst:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 - present, Victor Zverovich
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 | --- Optional exception to the license ---
23 |
24 | As an exception, if, as a result of your compiling your source code, portions
25 | of this Software are embedded into a machine-executable object form of such
26 | source code, you may redistribute such embedded portions in such object form
27 | without including the above copyright and permission notices.
28 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/badges.less:
--------------------------------------------------------------------------------
1 | //
2 | // Badges
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .badge {
8 | display: inline-block;
9 | min-width: 10px;
10 | padding: 3px 7px;
11 | font-size: @font-size-small;
12 | font-weight: @badge-font-weight;
13 | color: @badge-color;
14 | line-height: @badge-line-height;
15 | vertical-align: baseline;
16 | white-space: nowrap;
17 | text-align: center;
18 | background-color: @badge-bg;
19 | border-radius: @badge-border-radius;
20 |
21 | // Empty badges collapse automatically (not available in IE8)
22 | &:empty {
23 | display: none;
24 | }
25 |
26 | // Quick fix for badges in buttons
27 | .btn & {
28 | position: relative;
29 | top: -1px;
30 | }
31 |
32 | .btn-xs &,
33 | .btn-group-xs > .btn & {
34 | top: 0;
35 | padding: 1px 5px;
36 | }
37 |
38 | // Hover state, but only for links
39 | a& {
40 | &:hover,
41 | &:focus {
42 | color: @badge-link-hover-color;
43 | text-decoration: none;
44 | cursor: pointer;
45 | }
46 | }
47 |
48 | // Account for badges in navs
49 | .list-group-item.active > &,
50 | .nav-pills > .active > a > & {
51 | color: @badge-active-color;
52 | background-color: @badge-active-bg;
53 | }
54 |
55 | .list-group-item > & {
56 | float: right;
57 | }
58 |
59 | .list-group-item > & + & {
60 | margin-right: 5px;
61 | }
62 |
63 | .nav-pills > li > a > & {
64 | margin-left: 3px;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/asm/font.asm:
--------------------------------------------------------------------------------
1 | !script "../lua/sid.lua"
2 |
3 | ; Set the 16k VIC area. Can only point
4 | ; to $0000, $4000, $8000 or $c000
5 | !macro VicAdr(adr) {
6 | !assert (adr & $3fff) == 0
7 | lda #((~adr)&$ffff)>>14
8 | sta $dd00
9 | }
10 |
11 | ; Set the Bitmap and Screen offsets within VIC
12 | !macro BitmapAndScreen(bm_offs, scr_offs) {
13 | !assert (bm_offs & $dfff) == 0
14 | !assert (scr_offs & $c3ff) == 0
15 | .bits0 = (bm_offs>>10)
16 | .bits1 = (scr_offs>>6)
17 | lda #.bits0 | .bits1
18 | sta $d018
19 | }
20 |
21 |
22 | !section "RAM",$801
23 | !section "main",in="RAM",start=$801
24 | !section "data",in="RAM"
25 |
26 | !section "code",in="main"
27 | !byte $0b,$08,$01,$00,$9e,str(start),$00,$00,$00
28 | start:
29 |
30 | sei
31 |
32 | lda #$31
33 | sta $1
34 |
35 | ldy #8
36 | ldx #0
37 | .loop
38 | lda font,x
39 | sta $2000,x
40 | inx
41 | bne .loop
42 | inc .loop+2
43 | inc .loop+5
44 | dey
45 | bne .loop
46 |
47 | lda #$37
48 | sta $1
49 |
50 | lda #0
51 | sta $d020
52 | sta $d021
53 |
54 | lda #$18
55 | sta $d018
56 |
57 | ldx #0
58 | $
59 | lda text,x
60 | beq +
61 | sta $400,x
62 | inx
63 | bne -
64 | $
65 | jmp -
66 | cli
67 | rts
68 |
69 | text:
70 | !text "HELLO PEOPLE WHAT'S UP ?"
71 | !byte 0
72 |
73 | font:
74 | load_png("../data/ff.png")
75 | layout_image($, 8, 8)
76 | !fill $.pixels[8*32:8*64]
77 | !fill $.pixels[0:8*32]
78 |
79 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/CMakeModules/cmake_uninstall.cmake.in:
--------------------------------------------------------------------------------
1 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
3 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
4 |
5 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
6 | STRING(REGEX REPLACE "\n" ";" files "${files}")
7 |
8 | SET(NUM 0)
9 | FOREACH(file ${files})
10 | IF(EXISTS "$ENV{DESTDIR}${file}")
11 | MESSAGE(STATUS "Looking for \"$ENV{DESTDIR}${file}\" - found")
12 | SET(UNINSTALL_CHECK_${NUM} 1)
13 | ELSE(EXISTS "$ENV{DESTDIR}${file}")
14 | MESSAGE(STATUS "Looking for \"$ENV{DESTDIR}${file}\" - not found")
15 | SET(UNINSTALL_CHECK_${NUM} 0)
16 | ENDIF(EXISTS "$ENV{DESTDIR}${file}")
17 | MATH(EXPR NUM "1 + ${NUM}")
18 | ENDFOREACH(file)
19 |
20 | SET(NUM 0)
21 | FOREACH(file ${files})
22 | IF(${UNINSTALL_CHECK_${NUM}})
23 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
24 | EXEC_PROGRAM(
25 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
26 | OUTPUT_VARIABLE rm_out
27 | RETURN_VALUE rm_retval
28 | )
29 | IF(NOT "${rm_retval}" STREQUAL 0)
30 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
31 | ENDIF(NOT "${rm_retval}" STREQUAL 0)
32 | ENDIF(${UNINSTALL_CHECK_${NUM}})
33 | MATH(EXPR NUM "1 + ${NUM}")
34 | ENDFOREACH(file)
35 |
36 | FILE(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
37 |
--------------------------------------------------------------------------------
/external/lzsa/VS2017/lzsa.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.489
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lzsa", "lzsa.vcxproj", "{3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Debug|x64.ActiveCfg = Debug|x64
17 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Debug|x64.Build.0 = Debug|x64
18 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Debug|x86.ActiveCfg = Debug|Win32
19 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Debug|x86.Build.0 = Debug|Win32
20 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Release|x64.ActiveCfg = Release|x64
21 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Release|x64.Build.0 = Release|x64
22 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Release|x86.ActiveCfg = Release|Win32
23 | {3F30FEE8-63C5-4D39-A175-EDD7EA93E9B8}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {A1E1655C-AA9F-41F0-80C9-18DD0B859D7C}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/external/CLI11/cmake/AddGoogletest.cmake:
--------------------------------------------------------------------------------
1 | #
2 | #
3 | # Includes GTest and provides a helper macro to add tests. Add make check, as well, which
4 | # gives output on failed tests without having to set an environment variable.
5 | #
6 | #
7 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
8 | set(BUILD_SHARED_LIBS OFF)
9 |
10 | add_subdirectory("${CLI11_SOURCE_DIR}/extern/googletest" "${CLI11_BINARY_DIR}/extern/googletest" EXCLUDE_FROM_ALL)
11 |
12 |
13 | if(GOOGLE_TEST_INDIVIDUAL)
14 | if(NOT CMAKE_VERSION VERSION_LESS 3.9)
15 | include(GoogleTest)
16 | else()
17 | set(GOOGLE_TEST_INDIVIDUAL OFF)
18 | endif()
19 | endif()
20 |
21 | # Target must already exist
22 | macro(add_gtest TESTNAME)
23 | target_link_libraries(${TESTNAME} PUBLIC gtest gmock gtest_main)
24 |
25 | if(GOOGLE_TEST_INDIVIDUAL)
26 | if(CMAKE_VERSION VERSION_LESS 3.10)
27 | gtest_add_tests(TARGET ${TESTNAME}
28 | TEST_PREFIX "${TESTNAME}."
29 | TEST_LIST TmpTestList)
30 | set_tests_properties(${TmpTestList} PROPERTIES FOLDER "Tests")
31 | else()
32 | gtest_discover_tests(${TESTNAME}
33 | TEST_PREFIX "${TESTNAME}."
34 | PROPERTIES FOLDER "Tests")
35 |
36 | endif()
37 | else()
38 | add_test(${TESTNAME} ${TESTNAME})
39 | set_target_properties(${TESTNAME} PROPERTIES FOLDER "Tests")
40 | endif()
41 |
42 | endmacro()
43 |
44 | set_target_properties(gtest gtest_main gmock gmock_main
45 | PROPERTIES FOLDER "Extern")
46 |
--------------------------------------------------------------------------------
/external/lua/lualib.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lualib.h,v 1.45.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** Lua standard libraries
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 |
8 | #ifndef lualib_h
9 | #define lualib_h
10 |
11 | #include "lua.h"
12 |
13 |
14 | /* version suffix for environment variable names */
15 | #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR
16 |
17 |
18 | LUAMOD_API int (luaopen_base) (lua_State *L);
19 |
20 | #define LUA_COLIBNAME "coroutine"
21 | LUAMOD_API int (luaopen_coroutine) (lua_State *L);
22 |
23 | #define LUA_TABLIBNAME "table"
24 | LUAMOD_API int (luaopen_table) (lua_State *L);
25 |
26 | #define LUA_IOLIBNAME "io"
27 | LUAMOD_API int (luaopen_io) (lua_State *L);
28 |
29 | #define LUA_OSLIBNAME "os"
30 | LUAMOD_API int (luaopen_os) (lua_State *L);
31 |
32 | #define LUA_STRLIBNAME "string"
33 | LUAMOD_API int (luaopen_string) (lua_State *L);
34 |
35 | #define LUA_UTF8LIBNAME "utf8"
36 | LUAMOD_API int (luaopen_utf8) (lua_State *L);
37 |
38 | #define LUA_BITLIBNAME "bit32"
39 | LUAMOD_API int (luaopen_bit32) (lua_State *L);
40 |
41 | #define LUA_MATHLIBNAME "math"
42 | LUAMOD_API int (luaopen_math) (lua_State *L);
43 |
44 | #define LUA_DBLIBNAME "debug"
45 | LUAMOD_API int (luaopen_debug) (lua_State *L);
46 |
47 | #define LUA_LOADLIBNAME "package"
48 | LUAMOD_API int (luaopen_package) (lua_State *L);
49 |
50 |
51 | /* open all previous libraries */
52 | LUALIB_API void (luaL_openlibs) (lua_State *L);
53 |
54 |
55 |
56 | #if !defined(lua_assert)
57 | #define lua_assert(x) ((void)0)
58 | #endif
59 |
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/external/lua/ldebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: ldebug.h,v 2.14.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** Auxiliary functions from Debug Interface module
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 | #ifndef ldebug_h
8 | #define ldebug_h
9 |
10 |
11 | #include "lstate.h"
12 |
13 |
14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
15 |
16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
17 |
18 | #define resethookcount(L) (L->hookcount = L->basehookcount)
19 |
20 |
21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
22 | const char *opname);
23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
24 | const TValue *p2);
25 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
26 | const TValue *p2,
27 | const char *msg);
28 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
29 | const TValue *p2);
30 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
31 | const TValue *p2);
32 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
33 | LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
34 | TString *src, int line);
35 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
36 | LUAI_FUNC void luaG_traceexec (lua_State *L);
37 |
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/external/sol3/scripts/preparation.osx.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 |
3 | # # # # sol3
4 | # The MIT License (MIT)
5 | #
6 | # Copyright (c) 2013-2020 Rapptz, ThePhD, and contributors
7 | #
8 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | # this software and associated documentation files (the "Software"), to deal in
10 | # the Software without restriction, including without limitation the rights to
11 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
12 | # the Software, and to permit persons to whom the Software is furnished to do so,
13 | # subject to the following conditions:
14 | #
15 | # The above copyright notice and this permission notice shall be included in all
16 | # copies or substantial portions of the Software.
17 | #
18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
20 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
21 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 |
25 | # This script installs and configures the dependencies for the project
26 |
27 | brew update > /dev/null
28 | brew install zsh || brew upgrade zsh || true
29 | brew install git || brew upgrade git || true
30 | brew install cmake || brew upgrade cmake || true
31 | brew install python3 || brew upgrade python3 || true
32 | brew install ninja || brew upgrade ninja || true
33 |
--------------------------------------------------------------------------------
/asm/week.asm:
--------------------------------------------------------------------------------
1 |
2 | ; This routine works for any date from 1900-03-01 to 2155-12-31.
3 | ; No range checking is done, so validate input before calling.
4 | ;
5 | ; I use the formula
6 | ; Weekday = (day + offset[month] + year + year/4 + fudge) mod 7
7 | ; where the value of fudge depends on the century.
8 | ;
9 | ; Input: Y = year (0=1900, 1=1901, ..., 255=2155)
10 | ; X = month (1=Jan, 2=Feb, ..., 12=Dec)
11 | ; A = day (1 to 31)
12 | ;
13 | ; Output: Weekday in A (0=Sunday, 1=Monday, ..., 6=Saturday)
14 |
15 | TMP = 6
16 |
17 | LDY #2016-1900
18 | LDX #10
19 | LDA #7
20 | JSR WEEKDAY
21 | @req a=5
22 | RTS
23 |
24 | WEEKDAY:
25 | CPX #3 ; Year starts in March to bypass
26 | BCS MARCH ; leap year problem
27 | DEY ; If Jan or Feb, decrement year
28 | MARCH: EOR #$7F ; Invert A so carry works right
29 | CPY #200 ; Carry will be 1 if 22nd century
30 | ADC MTAB-1,X ; A is now day+month offset
31 | STA TMP
32 | @req 0x06=0x7a
33 | TYA ; Get the year
34 | JSR MOD7 ; Do a modulo to prevent overflow
35 | SBC TMP ; Combine with day+month
36 | STA TMP
37 | @req 0x06=0x86
38 | TYA ; Get the year again
39 | LSR ; Divide it by 4
40 | LSR
41 | @req a=0x1d
42 | CLC ; Add it to y+m+d and fall through
43 | ADC TMP
44 | MOD7: ADC #7 ; Returns (A+3) modulo 7
45 | BCC MOD7 ; for A in 0..255
46 | RTS
47 | MTAB: DB 1,5,6,3,1,5,3,0,4,2,6,4 ; Month offsets
48 |
49 | !rept 6 { nop }
50 |
--------------------------------------------------------------------------------
/external/lua/lstring.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lstring.h,v 1.61.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** String table (keep all strings handled by Lua)
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 | #ifndef lstring_h
8 | #define lstring_h
9 |
10 | #include "lgc.h"
11 | #include "lobject.h"
12 | #include "lstate.h"
13 |
14 |
15 | #define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char))
16 |
17 | #define sizeludata(l) (sizeof(union UUdata) + (l))
18 | #define sizeudata(u) sizeludata((u)->len)
19 |
20 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
21 | (sizeof(s)/sizeof(char))-1))
22 |
23 |
24 | /*
25 | ** test whether a string is a reserved word
26 | */
27 | #define isreserved(s) ((s)->tt == LUA_TSHRSTR && (s)->extra > 0)
28 |
29 |
30 | /*
31 | ** equality for short strings, which are always internalized
32 | */
33 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_TSHRSTR, (a) == (b))
34 |
35 |
36 | LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed);
37 | LUAI_FUNC unsigned int luaS_hashlongstr (TString *ts);
38 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b);
39 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
40 | LUAI_FUNC void luaS_clearcache (global_State *g);
41 | LUAI_FUNC void luaS_init (lua_State *L);
42 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts);
43 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s);
44 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
45 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
46 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l);
47 |
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/asm/bank.asm:
--------------------------------------------------------------------------------
1 | !include "vera.inc"
2 | !include "x16.inc"
3 |
4 | !macro jsrf(adr) {
5 | .PC = *
6 | !if .PC > 0xa000 {
7 | pha
8 | lda BANK_SELECT
9 | pha
10 | lda #adr
13 | sta jump_adr+2
14 | lda #adr>>16
15 | jmp far_jsr
16 | }
17 | lda #adr>>16
18 | sta BANK_SELECT
19 | jsr adr & 0xffff
20 | }
21 |
22 | !section "main", $0801
23 | !byte $0b, $08,$01,$00,$9e,$32,$30,$36,$31,$00,$00,$00
24 |
25 | lda #1
26 | sta BANK_SELECT
27 |
28 | ldx $28e
29 | lda $8c
30 | sta .ptr+1
31 | lda $8d
32 | sta .ptr+2
33 |
34 | .ptr
35 | ldy $ffff,x
36 | sty filename,x
37 | cpy #'.'
38 | bne +
39 | tya
40 | dex
41 | bne .ptr
42 | ; a is dot offset
43 | !rept 16 { !byte 0 {
44 | .ext
45 | !text ".dat"
46 |
47 |
48 | SetFileName("BANKED")
49 | jsr kernel_load
50 |
51 | jsrf call_me
52 | jsrf start
53 |
54 | lda #1
55 | sta BANK_SELECT
56 | stx $1000
57 | sty $1001
58 | cli
59 | rts
60 |
61 | far_jsr:
62 | sta BANK_SELECT
63 | pla
64 | jump_adr
65 | jsr $ffff
66 | pla
67 | sta BANK_SELECT
68 | rts
69 |
70 |
71 | !section "bank1", $01a000
72 |
73 | nop
74 | call_me:
75 | ldx #2
76 | jsrf other
77 | rts
78 |
79 | !section "bank2", $02a000
80 | start:
81 | ldy #1
82 | rts
83 | other:
84 | ldy #9
85 | rts
86 |
87 | !section "bank1"
88 |
89 | nop
90 | more_code:
91 | lda #99
92 | jsr call_me
93 |
94 |
--------------------------------------------------------------------------------
/external/lua/lzio.c:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lzio.c,v 1.37.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** Buffered streams
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 | #define lzio_c
8 | #define LUA_CORE
9 |
10 | #include "lprefix.h"
11 |
12 |
13 | #include
14 |
15 | #include "lua.h"
16 |
17 | #include "llimits.h"
18 | #include "lmem.h"
19 | #include "lstate.h"
20 | #include "lzio.h"
21 |
22 |
23 | int luaZ_fill (ZIO *z) {
24 | size_t size;
25 | lua_State *L = z->L;
26 | const char *buff;
27 | lua_unlock(L);
28 | buff = z->reader(L, z->data, &size);
29 | lua_lock(L);
30 | if (buff == NULL || size == 0)
31 | return EOZ;
32 | z->n = size - 1; /* discount char being returned */
33 | z->p = buff;
34 | return cast_uchar(*(z->p++));
35 | }
36 |
37 |
38 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) {
39 | z->L = L;
40 | z->reader = reader;
41 | z->data = data;
42 | z->n = 0;
43 | z->p = NULL;
44 | }
45 |
46 |
47 | /* --------------------------------------------------------------- read --- */
48 | size_t luaZ_read (ZIO *z, void *b, size_t n) {
49 | while (n) {
50 | size_t m;
51 | if (z->n == 0) { /* no bytes in buffer? */
52 | if (luaZ_fill(z) == EOZ) /* try to read more */
53 | return n; /* no more input; return number of missing bytes */
54 | else {
55 | z->n++; /* luaZ_fill consumed first byte; put it back */
56 | z->p--;
57 | }
58 | }
59 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */
60 | memcpy(b, z->p, m);
61 | z->n -= m;
62 | z->p += m;
63 | b = (char *)b + m;
64 | n -= m;
65 | }
66 | return 0;
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/external/CLI11/LICENSE:
--------------------------------------------------------------------------------
1 | CLI11 1.8 Copyright (c) 2017-2019 University of Cincinnati, developed by Henry
2 | Schreiner under NSF AWARD 1414736. All rights reserved.
3 |
4 | Redistribution and use in source and binary forms of CLI11, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 | 2. Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the documentation
11 | and/or other materials provided with the distribution.
12 | 3. Neither the name of the copyright holder nor the names of its contributors
13 | may be used to endorse or promote products derived from this software without
14 | specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/external/sol3/cmake/Modules/Common/Core.cmake:
--------------------------------------------------------------------------------
1 | # # # # sol3
2 | # The MIT License (MIT)
3 | #
4 | # Copyright (c) 2013-2020 Rapptz, ThePhD, and contributors
5 | #
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | # this software and associated documentation files (the "Software"), to deal in
8 | # the Software without restriction, including without limitation the rights to
9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | # the Software, and to permit persons to whom the Software is furnished to do so,
11 | # subject to the following conditions:
12 | #
13 | # The above copyright notice and this permission notice shall be included in all
14 | # copies or substantial portions of the Software.
15 | #
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | if(_common_core_included)
24 | return()
25 | endif(_common_core_included)
26 | set(_common_core_included true)
27 |
28 | # # Prepend function (is there an equivalent in CMake somewhere...?)
29 | function(prepend var prefix)
30 | set(l "")
31 | foreach(f ${ARGN})
32 | list(APPEND l "${prefix}${f}")
33 | endforeach(f)
34 | SET(${var} "${l}" PARENT_SCOPE)
35 | ENDFUNCTION(prepend)
36 |
--------------------------------------------------------------------------------
/asm/pet100.inc:
--------------------------------------------------------------------------------
1 |
2 |
3 | !macro Wait(frames)
4 | {
5 | ldx #frames
6 | .l lda Regs.IrqReq
7 | and #1
8 | beq .l
9 | sta Regs.IrqReq
10 | dex
11 | bne .l
12 |
13 | }
14 | !macro CheckQuit()
15 | {
16 | lda Regs.Key
17 | cmp #KEY.ESCAPE
18 | bne .out
19 | inc Regs.Control
20 | jmp *
21 | .out
22 | }
23 | wait_t = $11
24 |
25 | !macro Border(col)
26 | {
27 | lda #col<<4
28 | sta Regs.Border
29 | }
30 |
31 | Palette = $d780
32 |
33 | !enum Regs
34 | {
35 | ; Window into real console. Default to 40x25
36 | WinX = $d700
37 | WinY
38 | WinW
39 | WinH
40 |
41 | RealW
42 | RealH
43 | TextPtr
44 | ColorPtr
45 |
46 | ; Write to fill border with given color
47 | Border
48 | ; Read keyboard fifo. 0 means empty
49 | Key
50 | Control
51 | Charset
52 |
53 | TimerLo
54 | TimerMid
55 | TimerHi
56 | TimerDiv
57 |
58 |
59 | IrqEna
60 | IrqReq
61 |
62 | }
63 |
64 | !enum KEY
65 | {
66 | NO_KEY
67 | BACKSPACE
68 | LEFT
69 | UP
70 | RIGHT
71 | DOWN
72 | PAGEUP
73 | PAGEDOWN
74 | HOME
75 | END
76 | ENTER
77 | TAB
78 | DELETE
79 | F1
80 | F2
81 | F3
82 | F4
83 | F5
84 | F6
85 | F7
86 | F8
87 | ESCAPE = $1b
88 | }
89 |
90 | !enum {
91 | Black
92 | White
93 | Red
94 | Cyan
95 | Purple
96 | Green
97 | Blue
98 | Yellow
99 | Orange
100 | Brown
101 | LightRed
102 | DarkGrey
103 | Grey
104 | LightGreen
105 | LightBlue
106 | LightGrey
107 | }
108 |
109 |
110 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/stack_get_qualified.hpp:
--------------------------------------------------------------------------------
1 | // sol3
2 |
3 | // The MIT License (MIT)
4 |
5 | // Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | // this software and associated documentation files (the "Software"), to deal in
9 | // the Software without restriction, including without limitation the rights to
10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | // the Software, and to permit persons to whom the Software is furnished to do so,
12 | // subject to the following conditions:
13 |
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 |
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | #ifndef SOL_STACK_QUALIFIED_GET_HPP
25 | #define SOL_STACK_QUALIFIED_GET_HPP
26 |
27 | #include
28 |
29 | namespace sol {
30 | namespace stack {
31 |
32 | // There are no more enable_ifs that can be used here,
33 | // so this is just for posterity, I guess?
34 | // maybe I'll fill this file in later.
35 |
36 | }
37 | } // namespace sol::stack
38 |
39 | #endif // SOL_STACK_QUALIFIED_GET_HPP
40 |
41 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/code.less:
--------------------------------------------------------------------------------
1 | //
2 | // Code (inline and block)
3 | // --------------------------------------------------
4 |
5 |
6 | // Inline and block code styles
7 | code,
8 | kbd,
9 | pre,
10 | samp {
11 | font-family: @font-family-monospace;
12 | }
13 |
14 | // Inline code
15 | code {
16 | padding: 2px 4px;
17 | font-size: 90%;
18 | color: @code-color;
19 | background-color: @code-bg;
20 | border-radius: @border-radius-base;
21 | }
22 |
23 | // User input typically entered via keyboard
24 | kbd {
25 | padding: 2px 4px;
26 | font-size: 90%;
27 | color: @kbd-color;
28 | background-color: @kbd-bg;
29 | border-radius: @border-radius-small;
30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
31 |
32 | kbd {
33 | padding: 0;
34 | font-size: 100%;
35 | font-weight: bold;
36 | box-shadow: none;
37 | }
38 | }
39 |
40 | // Blocks of code
41 | pre {
42 | display: block;
43 | padding: ((@line-height-computed - 1) / 2);
44 | margin: 0 0 (@line-height-computed / 2);
45 | font-size: (@font-size-base - 1); // 14px to 13px
46 | line-height: @line-height-base;
47 | word-break: break-all;
48 | word-wrap: break-word;
49 | color: @pre-color;
50 | background-color: @pre-bg;
51 | border: 1px solid @pre-border-color;
52 | border-radius: @border-radius-base;
53 |
54 | // Account for some code outputs that place code tags in pre tags
55 | code {
56 | padding: 0;
57 | font-size: inherit;
58 | color: inherit;
59 | white-space: pre-wrap;
60 | background-color: transparent;
61 | border-radius: 0;
62 | }
63 | }
64 |
65 | // Enable scrollable blocks of code
66 | .pre-scrollable {
67 | max-height: @pre-scrollable-max-height;
68 | overflow-y: scroll;
69 | }
70 |
--------------------------------------------------------------------------------
/external/fmt/test/mock-allocator.h:
--------------------------------------------------------------------------------
1 | // Formatting library for C++ - mock allocator
2 | //
3 | // Copyright (c) 2012 - present, Victor Zverovich
4 | // All rights reserved.
5 | //
6 | // For the license information refer to format.h.
7 |
8 | #ifndef FMT_MOCK_ALLOCATOR_H_
9 | #define FMT_MOCK_ALLOCATOR_H_
10 |
11 | #include "fmt/format.h"
12 | #include "gmock.h"
13 |
14 | template class mock_allocator {
15 | public:
16 | mock_allocator() {}
17 | mock_allocator(const mock_allocator&) {}
18 | typedef T value_type;
19 | MOCK_METHOD1_T(allocate, T*(size_t n));
20 | MOCK_METHOD2_T(deallocate, void(T* p, size_t n));
21 | };
22 |
23 | template class allocator_ref {
24 | private:
25 | Allocator* alloc_;
26 |
27 | void move(allocator_ref& other) {
28 | alloc_ = other.alloc_;
29 | other.alloc_ = nullptr;
30 | }
31 |
32 | public:
33 | typedef typename Allocator::value_type value_type;
34 |
35 | explicit allocator_ref(Allocator* alloc = nullptr) : alloc_(alloc) {}
36 |
37 | allocator_ref(const allocator_ref& other) : alloc_(other.alloc_) {}
38 | allocator_ref(allocator_ref&& other) { move(other); }
39 |
40 | allocator_ref& operator=(allocator_ref&& other) {
41 | assert(this != &other);
42 | move(other);
43 | return *this;
44 | }
45 |
46 | allocator_ref& operator=(const allocator_ref& other) {
47 | alloc_ = other.alloc_;
48 | return *this;
49 | }
50 |
51 | public:
52 | Allocator* get() const { return alloc_; }
53 |
54 | value_type* allocate(size_t n) {
55 | return std::allocator_traits::allocate(*alloc_, n);
56 | }
57 | void deallocate(value_type* p, size_t n) { alloc_->deallocate(p, n); }
58 | };
59 |
60 | #endif // FMT_MOCK_ALLOCATOR_H_
61 |
--------------------------------------------------------------------------------
/asm/bubble.asm:
--------------------------------------------------------------------------------
1 | !org 0
2 | ;THIS SUBROUTINE ARRANGES THE 8-BIT ELEMENTS OF A LIST IN ASCENDING
3 | ;ORDER. THE STARTING ADDRESS OF THE LIST IS IN LOCATIONS $30 AND
4 | ;$31. THE LENGTH OF THE LIST IS IN THE FIRST BYTE OF THE LIST. LOCATION
5 | ;$32 IS USED TO HOLD AN EXCHANGE FLAG.
6 |
7 | SORT8 LDY #$00 ;TURN EXCHANGE FLAG OFF (= 0)
8 | STY $32
9 | LDA ($30),Y ;FETCH ELEMENT COUNT
10 | TAX ; AND PUT IT INTO X
11 |
12 | INY ;POINT TO FIRST ELEMENT IN LIST
13 | DEX ;DECREMENT ELEMENT COUNT
14 | NXTEL LDA ($30),Y ;FETCH ELEMENT
15 | INY
16 | CMP ($30),Y ;IS IT LARGER THAN THE NEXT ELEMENT?
17 | BCC CHKEND
18 | BEQ CHKEND
19 | ;YES. EXCHANGE ELEMENTS IN MEMORY
20 | PHA ; BY SAVING LOW BYTE ON STACK.
21 | LDA ($30),Y ; THEN GET HIGH BYTE AND
22 | DEY ; STORE IT AT LOW ADDRESS
23 | STA ($30),Y
24 | PLA ;PULL LOW BYTE FROM STACK
25 | INY ; AND STORE IT AT HIGH ADDRESS
26 | STA ($30),Y
27 | LDA #$FF ;TURN EXCHANGE FLAG ON (= -1)
28 | STA $32
29 | CHKEND DEX ;END OF LIST?
30 | BNE NXTEL ;NO. FETCH NEXT ELEMENT
31 | BIT $32 ;YES. EXCHANGE FLAG STILL OFF?
32 | BMI SORT8 ;NO. GO THROUGH LIST AGAIN
33 | RTS ;YES. LIST IS NOW ORDERED
34 |
35 | !test bubblesort {
36 | LDA #LIST>>8
37 | STA $31
38 | LDA #LIST&0xff
39 | STA $30
40 | JSR SORT8
41 | RTS
42 | ;!assert compare(LIST, bytes(1,2,2,5,6,9,12,15))
43 |
44 | LIST
45 | !byte 8
46 | !byte 9,5,2,12,1,15,8,2
47 | }
48 |
49 | !print tests.bubblesort.ram[LIST:LIST+9]
50 |
--------------------------------------------------------------------------------
/external/lua/lzio.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lzio.h,v 1.31.1.1 2017/04/19 17:20:42 roberto Exp $
3 | ** Buffered streams
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 |
8 | #ifndef lzio_h
9 | #define lzio_h
10 |
11 | #include "lua.h"
12 |
13 | #include "lmem.h"
14 |
15 |
16 | #define EOZ (-1) /* end of stream */
17 |
18 | typedef struct Zio ZIO;
19 |
20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z))
21 |
22 |
23 | typedef struct Mbuffer {
24 | char *buffer;
25 | size_t n;
26 | size_t buffsize;
27 | } Mbuffer;
28 |
29 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0)
30 |
31 | #define luaZ_buffer(buff) ((buff)->buffer)
32 | #define luaZ_sizebuffer(buff) ((buff)->buffsize)
33 | #define luaZ_bufflen(buff) ((buff)->n)
34 |
35 | #define luaZ_buffremove(buff,i) ((buff)->n -= (i))
36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0)
37 |
38 |
39 | #define luaZ_resizebuffer(L, buff, size) \
40 | ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \
41 | (buff)->buffsize, size), \
42 | (buff)->buffsize = size)
43 |
44 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0)
45 |
46 |
47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader,
48 | void *data);
49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */
50 |
51 |
52 |
53 | /* --------- Private Part ------------------ */
54 |
55 | struct Zio {
56 | size_t n; /* bytes still unread */
57 | const char *p; /* current position in buffer */
58 | lua_Reader reader; /* reader function */
59 | void *data; /* additional data */
60 | lua_State *L; /* Lua state (for reader) */
61 | };
62 |
63 |
64 | LUAI_FUNC int luaZ_fill (ZIO *z);
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/grid.less:
--------------------------------------------------------------------------------
1 | //
2 | // Grid system
3 | // --------------------------------------------------
4 |
5 |
6 | // Container widths
7 | //
8 | // Set the container width, and override it for fixed navbars in media queries.
9 |
10 | .tb-container {
11 | .container-fixed();
12 |
13 | @media (min-width: @screen-sm-min) {
14 | width: @container-sm;
15 | }
16 | @media (min-width: @screen-md-min) {
17 | width: @container-md;
18 | }
19 | @media (min-width: @screen-lg-min) {
20 | width: @container-lg;
21 | }
22 | }
23 |
24 |
25 | // Fluid container
26 | //
27 | // Utilizes the mixin meant for fixed width containers, but without any defined
28 | // width for fluid, full width layouts.
29 |
30 | .container-fluid {
31 | .container-fixed();
32 | }
33 |
34 |
35 | // Row
36 | //
37 | // Rows contain and clear the floats of your columns.
38 |
39 | .row {
40 | .make-row();
41 | }
42 |
43 |
44 | // Columns
45 | //
46 | // Common styles for small and large grid columns
47 |
48 | .make-grid-columns();
49 |
50 |
51 | // Extra small grid
52 | //
53 | // Columns, offsets, pushes, and pulls for extra small devices like
54 | // smartphones.
55 |
56 | .make-grid(xs);
57 |
58 |
59 | // Small grid
60 | //
61 | // Columns, offsets, pushes, and pulls for the small device range, from phones
62 | // to tablets.
63 |
64 | @media (min-width: @screen-sm-min) {
65 | .make-grid(sm);
66 | }
67 |
68 |
69 | // Medium grid
70 | //
71 | // Columns, offsets, pushes, and pulls for the desktop device range.
72 |
73 | @media (min-width: @screen-md-min) {
74 | .make-grid(md);
75 | }
76 |
77 |
78 | // Large grid
79 | //
80 | // Columns, offsets, pushes, and pulls for the large desktop device range.
81 |
82 | @media (min-width: @screen-lg-min) {
83 | .make-grid(lg);
84 | }
85 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/CMakeModules/AppendCompilerFlags.cmake:
--------------------------------------------------------------------------------
1 | include(CheckCSourceCompiles)
2 | include(CheckCXXSourceCompiles)
3 |
4 | macro(append_c_compiler_flags _flags _name _result)
5 | set(SAFE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
6 | string(REGEX REPLACE "[-+/ ]" "_" cname "${_name}")
7 | string(TOUPPER "${cname}" cname)
8 | foreach(flag ${_flags})
9 | string(REGEX REPLACE "^[-+/ ]+(.*)[-+/ ]*$" "\\1" flagname "${flag}")
10 | string(REGEX REPLACE "[-+/ ]" "_" flagname "${flagname}")
11 | string(TOUPPER "${flagname}" flagname)
12 | set(have_flag "HAVE_${cname}_${flagname}")
13 | set(CMAKE_REQUIRED_FLAGS "${flag}")
14 | check_c_source_compiles("int main() { return 0; }" ${have_flag})
15 | if(${have_flag})
16 | set(${_result} "${${_result}} ${flag}")
17 | endif(${have_flag})
18 | endforeach(flag)
19 | set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS})
20 | endmacro(append_c_compiler_flags)
21 |
22 | macro(append_cxx_compiler_flags _flags _name _result)
23 | set(SAFE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
24 | string(REGEX REPLACE "[-+/ ]" "_" cname "${_name}")
25 | string(TOUPPER "${cname}" cname)
26 | foreach(flag ${_flags})
27 | string(REGEX REPLACE "^[-+/ ]+(.*)[-+/ ]*$" "\\1" flagname "${flag}")
28 | string(REGEX REPLACE "[-+/ ]" "_" flagname "${flagname}")
29 | string(TOUPPER "${flagname}" flagname)
30 | set(have_flag "HAVE_${cname}_${flagname}")
31 | set(CMAKE_REQUIRED_FLAGS "${flag}")
32 | check_cxx_source_compiles("int main() { return 0; }" ${have_flag})
33 | if(${have_flag})
34 | set(${_result} "${${_result}} ${flag}")
35 | endif(${have_flag})
36 | endforeach(flag)
37 | set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS})
38 | endmacro(append_cxx_compiler_flags)
39 |
--------------------------------------------------------------------------------
/external/sol3/meson.build:
--------------------------------------------------------------------------------
1 | project('sol3', 'cpp')
2 |
3 | # Find lua dependency
4 | if get_option('lua_cpp')
5 | lua_cpp = 'true'
6 | else
7 | lua_cpp = 'false'
8 | endif
9 |
10 | lua_dep = dependency('lua', fallback: [ 'lua', 'lua_dep' ], default_options: [ 'lua_cpp=' + lua_cpp ])
11 |
12 | # Set compiler flags if we're compiling lua as C++.
13 | compile_args = []
14 |
15 | if get_option('lua_cpp')
16 | compile_args = [ '-DSOL_USING_CXX_LUA=1' ]
17 | endif
18 |
19 | # Expose standard dependency.
20 | sol2_dep = declare_dependency(
21 | include_directories: include_directories('./include'),
22 | compile_args: compile_args,
23 | dependencies: [ lua_dep ],
24 | )
25 |
26 | # Single header targets requested.
27 | if get_option('single')
28 |
29 | # Check if we have python installed (required for creating single).
30 | python = find_program('python3', required: false)
31 |
32 | if not python.found()
33 | python = find_program('python', required: false)
34 | endif
35 |
36 | if not python.found()
37 | error('Could not locate Python. Python is required when building a single header.')
38 | endif
39 |
40 | # List all headers that the single header comprises of.
41 | cmd = run_command(python, 'list_headers.py')
42 |
43 | if cmd.returncode() != 0
44 | error('Could not list sol3 header files.')
45 | endif
46 |
47 | # Create our custom target to generate the single header file.
48 | sol2_single = custom_target('sol2_single',
49 | input: cmd.stdout().strip().split('\n'),
50 | output: 'sol.hpp',
51 | command: [ python, files('single/single.py'), '--input', './include', '--output', '@OUTPUT@' ]
52 | )
53 |
54 | # Expose the dependency.
55 | sol2_dep = declare_dependency(
56 | sources: [ sol2_single ],
57 | compile_args: compile_args,
58 | dependencies: [ lua_dep ],
59 | )
60 | endif
61 |
--------------------------------------------------------------------------------
/external/fmt/support/appveyor-build.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # Build the project on AppVeyor.
3 |
4 | import os
5 | from subprocess import check_call
6 |
7 | build = os.environ['BUILD']
8 | config = os.environ['CONFIGURATION']
9 | platform = os.environ['PLATFORM']
10 | path = os.environ['PATH']
11 | image = os.environ['APPVEYOR_BUILD_WORKER_IMAGE']
12 | jobid = os.environ['APPVEYOR_JOB_ID']
13 | cmake_command = ['cmake', '-DFMT_PEDANTIC=ON', '-DCMAKE_BUILD_TYPE=' + config, '..']
14 | if build == 'mingw':
15 | cmake_command.append('-GMinGW Makefiles')
16 | build_command = ['mingw32-make', '-j4']
17 | test_command = ['mingw32-make', 'test']
18 | # Remove the path to Git bin directory from $PATH because it breaks
19 | # MinGW config.
20 | path = path.replace(r'C:\Program Files (x86)\Git\bin', '')
21 | os.environ['PATH'] = r'C:\MinGW\bin;' + path
22 | else:
23 | # Add MSBuild 14.0 to PATH as described in
24 | # http://help.appveyor.com/discussions/problems/2229-v140-not-found-on-vs2105rc.
25 | os.environ['PATH'] = r'C:\Program Files (x86)\MSBuild\15.0\Bin;' + path
26 | if image == 'Visual Studio 2019':
27 | generator = 'Visual Studio 16 2019'
28 | if platform == 'x64':
29 | cmake_command.extend(['-A', 'x64'])
30 | else:
31 | if image == 'Visual Studio 2015':
32 | generator = 'Visual Studio 14 2015'
33 | elif image == 'Visual Studio 2017':
34 | generator = 'Visual Studio 15 2017'
35 | if platform == 'x64':
36 | generator += ' Win64'
37 | cmake_command.append('-G' + generator)
38 | build_command = ['cmake', '--build', '.', '--config', config, '--', '/m:4']
39 | test_command = ['ctest', '-C', config]
40 |
41 | check_call(cmake_command)
42 | check_call(build_command)
43 | check_call(test_command)
44 |
--------------------------------------------------------------------------------
/external/fmt/support/compute-powers.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # Compute 10 ** exp with exp in the range [min_exponent, max_exponent] and print
3 | # normalized (with most-significant bit equal to 1) significands in hexadecimal.
4 |
5 | from __future__ import print_function
6 |
7 | min_exponent = -348
8 | max_exponent = 340
9 | step = 8
10 | significand_size = 64
11 | exp_offset = 2000
12 |
13 | class fp:
14 | pass
15 |
16 | powers = []
17 | for i, exp in enumerate(range(min_exponent, max_exponent + 1, step)):
18 | result = fp()
19 | n = 10 ** exp if exp >= 0 else 2 ** exp_offset / 10 ** -exp
20 | k = significand_size + 1
21 | # Convert to binary and round.
22 | binary = '{:b}'.format(n)
23 | result.f = (int('{:0<{}}'.format(binary[:k], k), 2) + 1) / 2
24 | result.e = len(binary) - (exp_offset if exp < 0 else 0) - significand_size
25 | powers.append(result)
26 | # Sanity check.
27 | exp_offset10 = 400
28 | actual = result.f * 10 ** exp_offset10
29 | if result.e > 0:
30 | actual *= 2 ** result.e
31 | else:
32 | for j in range(-result.e):
33 | actual /= 2
34 | expected = 10 ** (exp_offset10 + exp)
35 | precision = len('{}'.format(expected)) - len('{}'.format(actual - expected))
36 | if precision < 19:
37 | print('low precision:', precision)
38 | exit(1)
39 |
40 | print('Significands:', end='')
41 | for i, fp in enumerate(powers):
42 | if i % 3 == 0:
43 | print(end='\n ')
44 | print(' {:0<#16x}'.format(fp.f, ), end=',')
45 |
46 | print('\n\nExponents:', end='')
47 | for i, fp in enumerate(powers):
48 | if i % 11 == 0:
49 | print(end='\n ')
50 | print(' {:5}'.format(fp.e), end=',')
51 |
52 | print('\n\nMax exponent difference:',
53 | max([x.e - powers[i - 1].e for i, x in enumerate(powers)][1:]))
54 |
--------------------------------------------------------------------------------
/external/fmt/doc/bootstrap/alerts.less:
--------------------------------------------------------------------------------
1 | //
2 | // Alerts
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // -------------------------
8 |
9 | .alert {
10 | padding: @alert-padding;
11 | margin-bottom: @line-height-computed;
12 | border: 1px solid transparent;
13 | border-radius: @alert-border-radius;
14 |
15 | // Headings for larger alerts
16 | h4 {
17 | margin-top: 0;
18 | // Specified for the h4 to prevent conflicts of changing @headings-color
19 | color: inherit;
20 | }
21 |
22 | // Provide class for links that match alerts
23 | .alert-link {
24 | font-weight: @alert-link-font-weight;
25 | }
26 |
27 | // Improve alignment and spacing of inner content
28 | > p,
29 | > ul {
30 | margin-bottom: 0;
31 | }
32 |
33 | > p + p {
34 | margin-top: 5px;
35 | }
36 | }
37 |
38 | // Dismissible alerts
39 | //
40 | // Expand the right padding and account for the close button's positioning.
41 |
42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
43 | .alert-dismissible {
44 | padding-right: (@alert-padding + 20);
45 |
46 | // Adjust close link position
47 | .close {
48 | position: relative;
49 | top: -2px;
50 | right: -21px;
51 | color: inherit;
52 | }
53 | }
54 |
55 | // Alternate styles
56 | //
57 | // Generate contextual modifier classes for colorizing the alert.
58 |
59 | .alert-success {
60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
61 | }
62 |
63 | .alert-info {
64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
65 | }
66 |
67 | .alert-warning {
68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
69 | }
70 |
71 | .alert-danger {
72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
73 | }
74 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/deprecate.hpp:
--------------------------------------------------------------------------------
1 | // sol3
2 |
3 | // The MIT License (MIT)
4 |
5 | // Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | // this software and associated documentation files (the "Software"), to deal in
9 | // the Software without restriction, including without limitation the rights to
10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | // the Software, and to permit persons to whom the Software is furnished to do so,
12 | // subject to the following conditions:
13 |
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 |
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | #ifndef SOL_DEPRECATE_HPP
25 | #define SOL_DEPRECATE_HPP
26 |
27 | #ifndef SOL_DEPRECATED
28 | #ifdef _MSC_VER
29 | #define SOL_DEPRECATED __declspec(deprecated)
30 | #elif __GNUC__
31 | #define SOL_DEPRECATED __attribute__((deprecated))
32 | #else
33 | #define SOL_DEPRECATED [[deprecated]]
34 | #endif // compilers
35 | #endif // SOL_DEPRECATED
36 |
37 | namespace sol {
38 | namespace detail {
39 | template
40 | struct SOL_DEPRECATED deprecate_type {
41 | using type = T;
42 | };
43 | }
44 | } // namespace sol::detail
45 |
46 | #endif // SOL_DEPRECATE_HPP
47 |
--------------------------------------------------------------------------------
/external/lua/lfunc.h:
--------------------------------------------------------------------------------
1 | /*
2 | ** $Id: lfunc.h,v 2.15.1.1 2017/04/19 17:39:34 roberto Exp $
3 | ** Auxiliary functions to manipulate prototypes and closures
4 | ** See Copyright Notice in lua.h
5 | */
6 |
7 | #ifndef lfunc_h
8 | #define lfunc_h
9 |
10 |
11 | #include "lobject.h"
12 |
13 |
14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
15 | cast(int, sizeof(TValue)*((n)-1)))
16 |
17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
18 | cast(int, sizeof(TValue *)*((n)-1)))
19 |
20 |
21 | /* test whether thread is in 'twups' list */
22 | #define isintwups(L) (L->twups != L)
23 |
24 |
25 | /*
26 | ** maximum number of upvalues in a closure (both C and Lua). (Value
27 | ** must fit in a VM register.)
28 | */
29 | #define MAXUPVAL 255
30 |
31 |
32 | /*
33 | ** Upvalues for Lua closures
34 | */
35 | struct UpVal {
36 | TValue *v; /* points to stack or to its own value */
37 | lu_mem refcount; /* reference counter */
38 | union {
39 | struct { /* (when open) */
40 | UpVal *next; /* linked list */
41 | int touched; /* mark to avoid cycles with dead threads */
42 | } open;
43 | TValue value; /* the value (when closed) */
44 | } u;
45 | };
46 |
47 | #define upisopen(up) ((up)->v != &(up)->u.value)
48 |
49 |
50 | LUAI_FUNC Proto *luaF_newproto (lua_State *L);
51 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems);
52 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems);
53 | LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl);
54 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
55 | LUAI_FUNC void luaF_close (lua_State *L, StkId level);
56 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
57 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
58 | int pc);
59 |
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/external/lzsa/src/libdivsufsort/CMakeModules/ProjectCPack.cmake:
--------------------------------------------------------------------------------
1 | # If the cmake version includes cpack, use it
2 | IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
3 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
4 | SET(CPACK_PACKAGE_VENDOR "${PROJECT_VENDOR}")
5 | SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
6 | SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
7 | SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
8 | SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
9 | SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
10 | # SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION}")
11 | SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_FULL}")
12 |
13 | IF(NOT DEFINED CPACK_SYSTEM_NAME)
14 | SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
15 | ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
16 |
17 | IF(${CPACK_SYSTEM_NAME} MATCHES Windows)
18 | IF(CMAKE_CL_64)
19 | SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
20 | ELSE(CMAKE_CL_64)
21 | SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
22 | ENDIF(CMAKE_CL_64)
23 | ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows)
24 |
25 | IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
26 | SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
27 | ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
28 |
29 | SET(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
30 | IF(UNIX)
31 | SET(CPACK_STRIP_FILES "")
32 | SET(CPACK_SOURCE_STRIP_FILES "")
33 | # SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
34 | ENDIF(UNIX)
35 | SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/build/" "/\\\\.build/" "/\\\\.svn/" "~$")
36 | # include CPack model once all variables are set
37 | INCLUDE(CPack)
38 | ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
39 |
--------------------------------------------------------------------------------
/external/sol3/cmake/sol2-config.cmake.in:
--------------------------------------------------------------------------------
1 | # # # # sol3
2 | # The MIT License (MIT)
3 | #
4 | # Copyright (c) 2013-2020 Rapptz, ThePhD, and contributors
5 | #
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | # this software and associated documentation files (the "Software"), to deal in
8 | # the Software without restriction, including without limitation the rights to
9 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | # the Software, and to permit persons to whom the Software is furnished to do so,
11 | # subject to the following conditions:
12 | #
13 | # The above copyright notice and this permission notice shall be included in all
14 | # copies or substantial portions of the Software.
15 | #
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @PACKAGE_INIT@
24 |
25 | include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake")
26 |
27 | MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR})
28 |
29 | if (TARGET sol2)
30 | get_target_property(SOL2_INCLUDE_DIRS
31 | sol2 INTERFACE_INCLUDE_DIRECTORIES)
32 | set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}")
33 | set(SOL2_LIBRARIES sol2)
34 | endif()
35 |
36 | if(TARGET sol2_single)
37 | get_target_property(SOL2_SINGLE_INCLUDE_DIRS
38 | sol2_single INTERFACE_INCLUDE_DIRECTORIES)
39 | set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}")
40 | set(SOL2_LIBRARIES_SINGLE sol2_single)
41 | endif()
42 |
--------------------------------------------------------------------------------
/external/sol3/include/sol/function_types_core.hpp:
--------------------------------------------------------------------------------
1 | // sol3
2 |
3 | // The MIT License (MIT)
4 |
5 | // Copyright (c) 2013-2020 Rapptz, ThePhD and contributors
6 |
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 | // this software and associated documentation files (the "Software"), to deal in
9 | // the Software without restriction, including without limitation the rights to
10 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 | // the Software, and to permit persons to whom the Software is furnished to do so,
12 | // subject to the following conditions:
13 |
14 | // The above copyright notice and this permission notice shall be included in all
15 | // copies or substantial portions of the Software.
16 |
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | #ifndef SOL_FUNCTION_TYPES_CORE_HPP
25 | #define SOL_FUNCTION_TYPES_CORE_HPP
26 |
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | namespace sol {
33 | namespace function_detail {
34 | template
35 | int call(lua_State* L) {
36 | Fx& fx = stack::get>(L, upvalue_index(start));
37 | int nr = fx(L);
38 | if (is_yielding) {
39 | return lua_yield(L, nr);
40 | }
41 | else {
42 | return nr;
43 | }
44 | }
45 | }
46 | } // namespace sol::function_detail
47 |
48 | #endif // SOL_FUNCTION_TYPES_CORE_HPP
49 |
--------------------------------------------------------------------------------