Skip to content

Keyboard mappings for typing BASIC.#2

Open
kervinck wants to merge 7 commits intoPhilThomas:masterfrom
kervinck:master
Open

Keyboard mappings for typing BASIC.#2
kervinck wants to merge 7 commits intoPhilThomas:masterfrom
kervinck:master

Conversation

@kervinck
Copy link

I'm running these changes as preview on https://marcelk.net/gigatron/

To enter BASIC, either load TinyBASIC.gt1, or hold down [Start] for 5 seconds.

The keyboard shortcuts have been moved to allow for typing. The mapping is now the same as we use for PS/2 keyboards using the Arduino and/or ATtiny85 interface adapter.

There are cosmetic changes to the rendering of the game controller, so that it looks the same as in the kit. The two extra unlabelled buttons are just dead in the emulation. In the kit that are auto-fire buttons for A and B.

kervinck added 6 commits July 18, 2018 14:24
- Can type normal ASCII now in Tiny BASIC, WozMon, Terminal etcetera
- Game controller buttons:
        A      = Delete, Backspace or End
        B      = Insert, Home
        Select = PageDown
        Start  = PageUp
- Update image of game controller to match with Gigatron layout
- Make gamepad smaller and remove logo to reduce scrolling
Ctrl-Space = ASCII 0     (NUL)
Ctrl-?     = ASCII 127   (DEL)
Ctrl-Other = ASCII 1..31 (e.g. Ctrl-C = ASCII 3 = ETX = BREAK)
@kervinck
Copy link
Author

I've just added handling of Ctrl key to make it behave more or less the same as with the PS/2 keyboard adapter. For example, Ctrl-C will send ASCII code 3.

Caused by a combination of
- not including the pulse length in the countdown from vPulse start to
  visible pixels (losing 2 lines)
- off-by-one error in row counting (winning back 1 line)
- using 34 as vertical backporch instead of 33 (to compensate the off-by-one?)

In reality, Gigatron signals are slightly different from standard
VGA anyway. Now made the code more symmetric and use the typical
Gigatron numbers.
@kervinck
Copy link
Author

kervinck commented Aug 27, 2018

Also fixed the issue of missing 2 last VGA scan lines. Made the logic identical for vertical and horizontal sync, and initialised with actual Gigatron numbers (although they are compatible the VGA defaults and give the same result).

@kervinck
Copy link
Author

@PhilThomas: What are your thoughts? I believe this is now a reasonably self-contained update.

One more thing that might be added is the ability of dragging text-files (*.TXT, *.GTB) into the emulator, and sending them as individual ASCII keystrokes to the input port.

kervinck added a commit to kervinck/gigatron-rom that referenced this pull request Jan 6, 2019
Include pull request PhilThomas/gigatron#2
to support keyboard input (for BASIC etc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant