From 1347be51aea61ee49ebff89225f8c75cf5a028ff Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Fri, 20 Sep 2019 01:44:18 +0200 Subject: [PATCH] Document Lynx --- CHANGELOG.md | 2 ++ README.md | 2 +- docs/api/target-platforms.md | 2 ++ docs/doc_index.md | 2 ++ docs/stdlib/lynx.md | 36 ++++++++++++++++++++++++++++++++++++ examples/README.md | 4 ++++ mkdocs.yml | 1 + 7 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docs/stdlib/lynx.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 1af7b4ea..12d63948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ * Added full 16-bit multiplication and unsigned division. +* Added preliminary support for Atari Lynx (thanks to @Nullious) + * Added preliminary support for EasyFlash. * Added preliminary support for Commander X16. diff --git a/README.md b/README.md index bb5ea6ac..df832963 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ For build instructions, see [Build instructions](./COMPILING.md). * other Commodore computers: C16, Plus/4, C128, PET, VIC-20 (stock or with RAM extensions) - * other 6502-based machines: Famicom/NES, Atari 8-bit computers, BBC Micro, Apple II+/IIe/Enhanced IIe, Atari 2600 (experimental), Commander X16 (experimental) + * other 6502-based machines: Famicom/NES, Atari Lynx, Atari 8-bit computers, BBC Micro, Apple II+/IIe/Enhanced IIe, Atari 2600 (experimental), Commander X16 (experimental) * Z80-based machines: ZX Spectrum 48k, NEC PC-88, Amstrad CPC, MSX diff --git a/docs/api/target-platforms.md b/docs/api/target-platforms.md index a8f2b668..615aff5d 100644 --- a/docs/api/target-platforms.md +++ b/docs/api/target-platforms.md @@ -61,6 +61,8 @@ The compiler emits NES files. For more complex programs, you need to create your own "platform" definition. Read [the NES programming guide](./famicom-programming-guide.md) for more info. +* `atari_lynx` – Atari Lynx + * `vcs` – Atari VCS (also known as Atari 2600), 4K cartridge (experimental) * `a8` – Atari 8-bit computers. diff --git a/docs/doc_index.md b/docs/doc_index.md index 504ddf94..a526e899 100644 --- a/docs/doc_index.md +++ b/docs/doc_index.md @@ -58,6 +58,8 @@ * [NES-only modules](stdlib/nes.md) +* [Atari Lynx-only modules](stdlib/lynx.md) + * [Game Boy–only modules](stdlib/gb.md) * [X16–only modules](stdlib/x16.md) diff --git a/docs/stdlib/lynx.md b/docs/stdlib/lynx.md new file mode 100644 index 00000000..d601f190 --- /dev/null +++ b/docs/stdlib/lynx.md @@ -0,0 +1,36 @@ +[< back to index](../doc_index.md) + +# Atari Lynx-oriented modules + +## atari_lynx_hardware + +The `atari_lynx_hardware` module is imported automatically on NES targets. + +It also implements a joystick API compatible with the `joy` module. + +TODO + +#### `void lynx_init()` + +TODO + +#### `void lynx_wait_suzy()` + +TODO + +#### `alias input_a = input_btn` + +1 if A button pressed, 0 if not pressed. + +#### `byte input_b` + +1 if B button pressed, 0 if not pressed. + +#### `void read_joy()` + +Reads the joypad. + +#### `void lynx_reset_joy()` +#### `alias reset_joy = lynx_reset_joy!` + +Resets the state variables. diff --git a/examples/README.md b/examples/README.md index f2992a49..216b954c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -49,6 +49,10 @@ how to create a program made of multiple files loaded on demand * [MMC4 example](nes/nestest_mmc4.mfk) – the same thing as above, but uses a MMC4 mapper just to test bankswitching +## Atari Lynx examples + +* [Lynx demo example](atari_lynx/atari_lynx_demo.mfk) – a simple sprite demo + ## Game Boy examples * [GB test example](gb/gbtest.mfk) – a partial port of the NES example, with a rudimentary experimental text output implementation diff --git a/mkdocs.yml b/mkdocs.yml index cecd1827..e68b377b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -41,6 +41,7 @@ nav: - cbm_file module: stdlib/cbm_file.md - C64-only modules: stdlib/c64.md - NES-only modules: stdlib/nes.md + - Lynx-only modules: stdlib/lynx.md - Game Boy–only modules: stdlib/gb.md - X16–only modules: stdlib/x16.md - Implementation details: