Emulations (running on Linux/Unix/Windows/macOS, utilizing SDL2) of some - mainly - 8 bit machines, including the Commodore LCD, Commodore 65, and the MEGA65 as well.
This is basically #388 however since then, there were many additional changes (in mega65-core) which are more broad in scope. Also there can be problems now with "automated tasks" (with new ROMs) like auto-start programs with -prg options and such.
ASCIIKEY (D610) and PETSCIIKEY (D619) now share a single queue. Touching either register dequeues the shared queue.
ASCIIKEY presents $00 and PETSCIIKEY presents $FF when this single queue is empty. (This is backwards compatible.)
D60A[0:6] is a new register that presents the modifier keys that were held down during the typing event at the top of the queue. It's the modifier keys that accompany the currently presented ASCIIKEY/PETSCIIKEY value.
D60A[7] presents 1 if the unified queue is non-empty. You can write a 0 to this bit to flush the queue.
D611 is still there to have the state of the current modifier keys (no change here) not the queued ones!
if a keypress would result in ASCII code 0 (no ASCII representation) according to the scan to ascii tables, then the key must queued with ASCII value of $FF to avoid breaking $D610 (0 would mean empty queue!)
Quick summary
Basically, it seems, the unified queues scheme stores three kind of information in a single queue entry: PETSCII value, ASCII value, applied modifier keys (at the time of the event, this is nothing to do with D611!). Any write to D610 or D619 dequeues the top most item, also bit 0 to D60A[7] does so.
This is basically #388 however since then, there were many additional changes (in mega65-core) which are more broad in scope. Also there can be problems now with "automated tasks" (with new ROMs) like auto-start programs with
-prg
options and such.Changes in mega65-core
https://github.com/MEGA65/mega65-core/issues/582
D610
) and PETSCIIKEY (D619
) now share a single queue. Touching either register dequeues the shared queue.$00
and PETSCIIKEY presents$FF
when this single queue is empty. (This is backwards compatible.)D60A[0:6]
is a new register that presents the modifier keys that were held down during the typing event at the top of the queue. It's the modifier keys that accompany the currently presented ASCIIKEY/PETSCIIKEY value.D60A[7]
presents 1 if the unified queue is non-empty. You can write a 0 to this bit to flush the queue.D611
is still there to have the state of the current modifier keys (no change here) not the queued ones!GS $D611.7 UARTMISC:MDISABLE Disable modifiers
-> confirmed, PETSCIIKEY honors MDISABLE, https://github.com/MEGA65/mega65-core/blob/7af2409563f37f35c718c4bf3da5282ebc26f207/src/vhdl/matrix_to_ascii.vhdl#L1009$D610
(0 would mean empty queue!)Quick summary
Basically, it seems, the unified queues scheme stores three kind of information in a single queue entry: PETSCII value, ASCII value, applied modifier keys (at the time of the event, this is nothing to do with
D611
!). Any write toD610
orD619
dequeues the top most item, also bit0
toD60A[7]
does so.