Commit Graph

144 Commits

Author SHA1 Message Date
Dave 953b9f7496 Add dipswitches back to Ace keymap 2023-11-27 12:30:14 -06:00
Dave 812f49ab20 Remove rowcol references.
Will re-implement row-col scanner after keymap improvements.
2023-05-12 22:42:31 -05:00
Dave e505693c38 Add rowcol to keymap list and cmakefile 2023-04-21 17:00:44 -05:00
Dave da0e89ed5e Define default row scanner in arch headers
- in header files, change ASDF_ARCH_DEFAULT_SCANNER to
ASDF_ARCH_DEFAULT_ROW_SCANNER

- remove unused ASDF_NUM_KEYMAPS definition in asdf_keymap_setup.h.in
2023-04-18 02:46:43 -05:00
Dave 3f2e8aa249 Add hook for keyscan routine
A new hook was added, ASDF_HOOK_KEY_SCANNER.  This allows the entire keyscan routine
to be specified for each keymap.
2023-04-17 11:51:08 -05:00
Christopher Ryu 30ac997552
Add support for Franklin ACE 1000 replacement keyboard (#42)
* Initial commit.

* Add support for Franklin ACE 1000.

* Add ace1000_keyboard_test() for completeness.

* Add link to replacement keyboard.

* Add Franklin ACE 1000 replacement keyboard link.

* Add Franklin ACE 1000 keyboard.

* Activate caps-lock at powerup, and swap keymaps accordingly.

---------

Co-authored-by: Christopher RYU <software+github@disavowed.jp>
2023-03-18 19:30:04 -05:00
Dave 1e3b5d1c50 Remove unused function 2023-01-02 04:17:27 -06:00
Dave 6a3c0073e5 remove phantom include 2023-01-02 04:07:28 -06:00
Dave f156ad9d80 removed extraneous function and source file61C0C5F1 2023-01-02 04:05:28 -06:00
Dave 62b27e0a3d fix videx keymappings fix applesoft keytest prog
- fixed the videx-like keymappings for the upper/lower keyboard
- moved @ to SHIFT-0 from CTRL-0, and put ID on CTRL-0
- bind the applesoft key test program to CTRL-3
- cram the keyboard test program into one line, to avoid adding a delay
 for BASIC parsing after the CR.
 - in main(), output only printable codes less than INVALID_CODE,
- instead of checking for code != INVALID_CODE.
2023-01-02 03:06:10 -06:00
Dave 8c8e021061 Add character test to apple keymap 2023-01-01 14:36:03 -06:00
Dave 573d6f842b Add user-bindable function to print ascii chars 2022-12-30 17:36:15 -06:00
Dave 14f7f1ed3e Added videx-style bindings to apple map
At the suggestion of @softwarejanitor, added the following ctrl codes to
upper/lower apple map:

CTRL-0: @
CTRL-1: | (vertical bar)
CTRL-2: ~ (tilde)
CTRL-6: ^ (caret)
CTRL-7: ` (grave)
CTRL-8: { (open curly brace)
CTRL-9: } (close curly brace)
CTRL--: _ (ctrl-dash -> underscore)
CTRL-,: [ (ctrl-comma -> open bracket)
CTRL-.: ] (ctrl-period -> close bracket)
CTRL-/: \ (ctrl-fwd_slash -> backslash)
2022-12-30 16:33:57 -06:00
Dave ca8cff670a Streamline build and add more processor variants
- CMakeLists.txt, src/CMakeLists.txt: user ARCH for the actual
processor, and ARCH_FAMILY to specify the arch_*.[ch] files.

- generic-gcc-avr.cmake: fix optimizations to O1 or O0

- make-targets.sh: simplify cmake invocation, eliminate mkdir+cd,
instead use cmake flags to specify directory names and source dir.
2022-12-30 02:31:02 -06:00
David Fenyes 27f2616d22 Remove extraneous include 2022-12-27 15:30:57 -06:00
Dave 51022040f1 Update to automate firmware builds
- build on checkin to asdf-release or asdf-built-test
- deploy to https://dfnr2.github.io/unified-retro-keyboard
2022-09-07 15:38:28 -05:00
Dave 9aa3bf4681 Fix compiler warning for GCC >= 11.3
- GCC version 12 generates a warnings for certain pointer
references.  Apparently this is to decect invalid offsets.  To properly
compiler, the recommended remedy is to add the compiler option
"--param=min-pagesize=0" to the flags.  This option was introduced in
version 11.3, so we need to check the compiler version and only add for
>11.3.

- Moved setting of compiler flags to a new function c_toolchain_flags in
the toolchain file "generic-gcc-avr.cmake".  This function is now called
from the CMakeLists.txt file in the src directory.  This allows the test
for the compiler version to be specified in the toolchain file, but not
executed until called by the src subdir CMakeLists.txt.  Delaying
evaluation of the function ensures that the CMAKE_C_VERSION variable is
properly set when the function is called.

- Moving the compiler flags out of the source dir CMakeLists.txt file
also improves portability by moving architecture-specific compiler
details from the source tree to the toolchain file.
2022-09-02 00:00:55 -05:00
Dave 18e451d8a6 Fix typo in src/CMakeLists.txt
for function create_keymap_valid, return statement had wrong function name.
2022-09-01 13:26:22 -05:00
David Fenyes 721cb6585d Add missing keymap header files 2022-02-28 20:08:38 -06:00
David Fenyes e13c9d6888 BugFix: asdf_buffer_get: check for valid handle
Was only testing for handle less than next_handle, but not checking for
negative handle values. Fixed to use buffer_handle_valid() to test for a
valid handle.
2021-12-14 11:31:39 -06:00
Dave 975bb0e6a5 Remove extraneous chars. 2021-12-10 22:26:59 -06:00
Dave 1d5e76590f make sure all tests pass
- added keymap_setup() function to keymap tests

- The test string was not long enough to overflow the larger buffer.
Switched to use pseudo-random sequence intstead of a fixe test string.
2021-12-10 22:25:13 -06:00
Dave 3d7c80916b Add sol id message to CTL-0 and bump version 2021-12-05 00:08:16 -06:00
Dave 8bb2711ccb Fix bad msec delay routine in 2560 arch module 2021-12-05 00:07:41 -06:00
Dave 03069fc8b5 Tie message ID strings to function keys
for classic and classic_caps keyboards.
2021-12-04 23:53:15 -06:00
Dave 68086cde31 Apple2 u/l keyboard has CAPS by default.
Start LED off, and turn on by activating CAPS
2021-12-04 23:51:58 -06:00
Dave 7ce550257c Breakout keyboard init
factor out common code and add back wrappers, so keyboard initializes to
default keyboard on power up, and afterwards, won't reinitialize the
keyboard unless the map changes.
2021-12-04 23:12:32 -06:00
Dave 3a7e279453 Add ID message and keyboard test for apple2 kbds 2021-12-04 23:10:33 -06:00
Dave 116455ea61 Added ability to set the output rate for messages
A delay after each output character can be set, so slow interpreters,
etc. will not miss characters on systems with no handshaking.
2021-12-04 23:08:44 -06:00
Dave 66df34a972 Added arch API for msec delay. 2021-12-04 23:06:39 -06:00
Dave 45329de193 Fix slow repeat on some columns (Fixes #15)
Removed a bit of logic from the column bit test code that created
different scan rates for different columns.
2021-12-04 11:32:38 -06:00
Dave 7796b7f753 Cleanups for new map scheme
- update ARCHITECTURE-keymaps.org file for new keymap definition method
- remove unused keymap table template files
- in keymap_setup.c template, set default to keymap 0.
2021-12-01 15:56:25 -06:00
Dave 9c0e9a9326 Fix Apple CAPS power LED to stay on. 2021-11-29 23:30:52 -06:00
Dave 562b859540 Add apple 2 caps, printing, bug fixes
- Added the apple 2 CAPS map

- auto-generate a function to check validity of a keymap index

- Added buffered message printing. This is different from keycode
buffering, since an extra delay is added for each message character to
allow polling hosts to keep up. Keycodes are generated at human speeds
and need no further slowdown.

- Added a message character delay to the arch-* modules

- enlarged the buffer pool, and created a buffer for messages

- bumped version number
2021-11-29 16:26:08 -06:00
Dave 233cda3e25 Add back the upper/lower Apple map
Port the old .h macro-based keymap definition to new C module based
definition.
2021-11-28 23:50:28 -06:00
Dave 17d5313fe9 Merge branch 'master' into newmaps 2021-11-28 15:48:03 -06:00
Dave 304022ce93 Add cmake templates for keymap setup files 2021-11-28 15:34:32 -06:00
Dave 07ff09720b Fix library-related indirection bug
Accessing library functions via function pointer seems to cause a reset.
Still investigating the cause.

- compile keymaps subdir as part of main src cmakefile, rather than as a
separate library.

- rather than setup table of function pointers and using an indirection
in the main code, set up a jump table (switch).  This is cleaner.
2021-11-28 15:28:03 -06:00
Dave 52527265c0 Remove arch_init from main. 2021-11-27 23:26:47 -06:00
Dave 56d9c52edb Removed unused declaration 2021-11-27 23:26:09 -06:00
Dave f70a6006e1 Remove redundant reset code
keymaps_init calls select, which sets the index to 0 and resets the
keymaps.
2021-11-27 23:19:16 -06:00
Dave 836d0c4a4f Initialze buffers before other subsystems
Other subsystems may want to use buffers for output, e.g., for status
and debug.
2021-11-27 23:16:51 -06:00
Dave 3e6c82830e Update comment do reflect correct DIPswitch row 2021-11-22 16:46:18 -06:00
Dave f8a314d0ca BUGFIX: 328P OUT2 output was changing OUT1
This appears to have been a cut-paste typo in the asdf_arch_out2_set() function
in asdf_arch_atmega328p.c.  The port was set to OUT2, but the bit was OUT1.
2021-11-08 22:36:09 -06:00
Dave ebe9344c82 Clean up keymap init routine
- replace asdf_keymaps_clear() with asdf_keymaps_reset() which does the
  clear, and also resets hooks and virtual devices for the keymap
2021-09-21 21:02:37 -05:00
Dave fc22f5be53 Fixed comment 2021-09-21 20:59:00 -05:00
Dave 8fa6f3f648 Fix c compile flags.
C Flags set in src and test directories were not getting set because
they were assigned to C_FLAGS, which is ignored. Changed to CFLAGS,
which is used by cmake to set default c compilation options.
2021-08-25 11:46:23 -05:00
Dave 8acb6085eb fixed C FLAGS in newmaps
C compiler flags were ignored because they were assigned to C_FLAGS
var, which is ignored.  Changed to CFLAGS.
2021-08-25 10:53:11 -05:00
Dave 63805800af firmware now compiles without errors
test suite passes
have not yet tested firmware
2021-05-19 13:32:23 -05:00
Dave 1f2f420de0 Cleaned up generation of keymap table and NUM_KEYMAPS definition
Toward #23 and #27
2021-03-07 23:22:05 -06:00