Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The most important early product on the way to developing a good product is an imperfect version.


devel / comp.sys.apple2.programmer / Keyboard layout/character set question

SubjectAuthor
* Keyboard layout/character set questionColin Leroy-Mira
`* Re: Keyboard layout/character set questionStu M
 +* Re: Keyboard layout/character set questionColin Leroy-Mira
 |`* Re: Keyboard layout/character set questionfadden
 | `- Re: Keyboard layout/character set questionAntoine Vignau
 `* Re: Keyboard layout/character set questionMichael J. Mahon
  `* Re: Keyboard layout/character set questionStu M
   `* Re: Keyboard layout/character set questionqkumba
    +- Re: Keyboard layout/character set questionStu M
    `* Re: Keyboard layout/character set questionAndrew Roughan
     `- Re: Keyboard layout/character set questionStu M

1
Keyboard layout/character set question

<20230120090302.0a08a296@SGX-CMP-480>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=272&group=comp.sys.apple2.programmer#272

  copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Keyboard layout/character set question
Date: Fri, 20 Jan 2023 09:03:02 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <20230120090302.0a08a296@SGX-CMP-480>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: reader01.eternal-september.org; posting-host="a52288462d26fb7c0cedeb0c8d5cdbe7";
logging-data="2082494"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KQkDEFsOBP7DlhuHMqR5ePEm1Hy72QIQ="
Cancel-Lock: sha1:152T/akloDVuDDObyjUnehpsGlc=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Fri, 20 Jan 2023 08:03 UTC

Hi,

I have a french Apple 2c, with a french keyboard and a toggle button
that allows to switch the keyboard layout from french to US. The button
has two effects. It switches characters codes for standard ASCII
characters (ie, 'a' becomes 'q' and vice-versa), but for "extended"
characters, the code is not changed, only the display is.
For example, if I hit 'é' while in french mode, it's going to display as
'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen,
the display of this character changes and becomes an '{'. (this is
quite funny, but a bit impractical).

I'd like to programmaticaly know which mode the keyboard is in, but I
can't find anything related in PEEKs and POKEs or anything. Does anyone
know if this is possible ?

Thanks!
--
Colin
https://www.colino.net/

Re: Keyboard layout/character set question

<021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=273&group=comp.sys.apple2.programmer#273

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a05:620a:20d9:b0:706:6dd9:b7d9 with SMTP id f25-20020a05620a20d900b007066dd9b7d9mr581606qka.111.1674275098007;
Fri, 20 Jan 2023 20:24:58 -0800 (PST)
X-Received: by 2002:a05:6808:1412:b0:35a:d20d:52be with SMTP id
w18-20020a056808141200b0035ad20d52bemr1256451oiv.270.1674275097636; Fri, 20
Jan 2023 20:24:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Fri, 20 Jan 2023 20:24:57 -0800 (PST)
In-Reply-To: <20230120090302.0a08a296@SGX-CMP-480>
Injection-Info: google-groups.googlegroups.com; posting-host=72.89.235.247; posting-account=ZfVBEQoAAAAj56_HkzwGkEm3hDm_YfB3
NNTP-Posting-Host: 72.89.235.247
References: <20230120090302.0a08a296@SGX-CMP-480>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: nixom...@gmail.com (Stu M)
Injection-Date: Sat, 21 Jan 2023 04:24:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3211
 by: Stu M - Sat, 21 Jan 2023 04:24 UTC

On Friday, January 20, 2023 at 3:03:05 AM UTC-5, Colin Leroy-Mira wrote:
> Hi,
>
> I have a french Apple 2c, with a french keyboard and a toggle button
> that allows to switch the keyboard layout from french to US. The button
> has two effects. It switches characters codes for standard ASCII
> characters (ie, 'a' becomes 'q' and vice-versa), but for "extended"
> characters, the code is not changed, only the display is.
> For example, if I hit 'é' while in french mode, it's going to display as
> 'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen,
> the display of this character changes and becomes an '{'. (this is
> quite funny, but a bit impractical).
>
> I'd like to programmaticaly know which mode the keyboard is in, but I
> can't find anything related in PEEKs and POKEs or anything. Does anyone
> know if this is possible ?
>
> Thanks!
> --
> Colin
> https://www.colino.net/

I don't know for sure, this is probably more a hardware question than a software question, but I'd guess it's not possible.
I did a lot of playing around with the keyboard (I had a U.S. apple //e) and the only available information was the key pressed, read from $C000 and the high bit of the $C010 soft switch was the any-key-down flag.

So if you're going to probe around, I'd look at the bits in $C010 and probably the other bytes from $C001 to $C010 and see if they show any change when the switch is flipped.

My guess is that this is done in hardware and never makes it to the software side of the machine.

I only remember this so well, because I played around a lot with the keyboard trying to make the $C010 any-key-down flag line up with the byte read from $C000 to tell me what key was down. But the important bit there is that the auto-repeat feature of the keyboard is in hardware and not adjustable or even detectable in software, which is why I'm going to guess that your switch isn't either.

Re: Keyboard layout/character set question

<20230124113642.0c355771@SGX-CMP-480>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=274&group=comp.sys.apple2.programmer#274

  copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: col...@colino.net (Colin Leroy-Mira)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Keyboard layout/character set question
Date: Tue, 24 Jan 2023 11:36:42 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20230124113642.0c355771@SGX-CMP-480>
References: <20230120090302.0a08a296@SGX-CMP-480>
<021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="c892bf0acb0409484d28fc6ca9feedf3";
logging-data="119613"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Gq2KAC0SUH5LUu3XWjz3xAyi2e1fsahw="
Cancel-Lock: sha1:ItlBdZNVkHpfe52y9xMhJUE4nP0=
X-Newsreader: Claws Mail 3.19.1git18 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: Colin Leroy-Mira - Tue, 24 Jan 2023 10:36 UTC

Hi,

>So if you're going to probe around, I'd look at the bits in $C010 and
>probably the other bytes from $C001 to $C010 and see if they show any
>change when the switch is flipped.

Thanks for your reply Stu.

I've checked and see no bit move in this region when toggling the
keyboard layout switch.

Well, that was worth trying ! Thanks :)
--
Colin
https://www.colino.net/

Re: Keyboard layout/character set question

<768e8cb6-ddbe-45db-8b3f-e42ce7db76b9n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=275&group=comp.sys.apple2.programmer#275

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:ae9:e607:0:b0:706:1b9c:854c with SMTP id z7-20020ae9e607000000b007061b9c854cmr1509426qkf.55.1674574828348;
Tue, 24 Jan 2023 07:40:28 -0800 (PST)
X-Received: by 2002:a05:6870:1014:b0:15f:e328:82d2 with SMTP id
20-20020a056870101400b0015fe32882d2mr843756oai.137.1674574828083; Tue, 24 Jan
2023 07:40:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Tue, 24 Jan 2023 07:40:27 -0800 (PST)
In-Reply-To: <20230124113642.0c355771@SGX-CMP-480>
Injection-Info: google-groups.googlegroups.com; posting-host=24.130.68.111; posting-account=UAtoeQoAAADrX7T-MHdWWRC4Fzf0dsLP
NNTP-Posting-Host: 24.130.68.111
References: <20230120090302.0a08a296@SGX-CMP-480> <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<20230124113642.0c355771@SGX-CMP-480>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <768e8cb6-ddbe-45db-8b3f-e42ce7db76b9n@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: fad...@fadden.com (fadden)
Injection-Date: Tue, 24 Jan 2023 15:40:28 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1486
 by: fadden - Tue, 24 Jan 2023 15:40 UTC

On Tuesday, January 24, 2023 at 2:36:47 AM UTC-8, Colin Leroy-Mira wrote:
> I've checked and see no bit move in this region when toggling the
> keyboard layout switch.
>
> Well, that was worth trying ! Thanks :)

Another good place to ask: https://retrocomputing.stackexchange.com/

Re: Keyboard layout/character set question

<71f15580-d160-4d33-9d62-8ffcff438c50n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=276&group=comp.sys.apple2.programmer#276

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a05:6214:4189:b0:4c7:6212:4a12 with SMTP id ld9-20020a056214418900b004c762124a12mr1177885qvb.75.1674592029861;
Tue, 24 Jan 2023 12:27:09 -0800 (PST)
X-Received: by 2002:a05:6808:d4e:b0:35b:ed95:6ff9 with SMTP id
w14-20020a0568080d4e00b0035bed956ff9mr1672957oik.286.1674592029584; Tue, 24
Jan 2023 12:27:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Tue, 24 Jan 2023 12:27:09 -0800 (PST)
In-Reply-To: <768e8cb6-ddbe-45db-8b3f-e42ce7db76b9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=90.91.239.246; posting-account=c4quJwoAAABUj_DOmUN3HIuXxN1tF7gT
NNTP-Posting-Host: 90.91.239.246
References: <20230120090302.0a08a296@SGX-CMP-480> <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<20230124113642.0c355771@SGX-CMP-480> <768e8cb6-ddbe-45db-8b3f-e42ce7db76b9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <71f15580-d160-4d33-9d62-8ffcff438c50n@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: ntn.vig...@gmail.com (Antoine Vignau)
Injection-Date: Tue, 24 Jan 2023 20:27:09 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 8652
 by: Antoine Vignau - Tue, 24 Jan 2023 20:27 UTC

Hi All,

Here are the //c firmware equates:

SBTL "Apple //c Video Firmware"
********************************
* * Apple //c
* Video Firmware and
* Monitor ROM Source
* * COPYRIGHT 1977-1983 BY
* APPLE COMPUTER, INC.
* * ALL RIGHTS RESERVED
* * S. WOZNIAK 1977
* A. BAUM 1977
* JOHN A NOV 1978
* R. AURICCHIO SEP 1981
* E. BEERNINK 1983
* ********************************
* * ZERO PAGE EQUATES
* LOC0 EQU $00 ;vector for autostart from disk
LOC1 EQU $01
WNDLFT EQU $20 ;left edge of text window
WNDWDTH EQU $21 ;width of text window
WNDTOP EQU $22 ;top of text window
WNDBTM EQU $23 ;bottom+1 of text window
CH EQU $24 ;cursor horizontal position
CV EQU $25 ;cursor vertical position
GBASL EQU $26 ;lo-res graphics base addr.
GBASH EQU $27
BASL EQU $28 ;text base address
BASH EQU $29
BAS2L EQU $2A ;temp base for scrolling
BAS2H EQU $2B
H2 EQU $2C ;temp for lo-res graphics
LMNEM EQU $2C ;temp for mnemonic decoding
RTNL equ $2C ;Step return address
V2 EQU $2D ;temp for lo-res graphics
RMNEM EQU $2D ;temp for mnemonic decoding
rtnh equ $2D ;Step return address
MASK EQU $2E ;color mask for lo-res gr.
FORMAT EQU $2E ;temp for opcode decode
LENGTH EQU $2F ;temp for opcode decode
COLOR EQU $30 ;color for lo-res graphics
MODE EQU $31 ;Monitor mode
INVFLG EQU $32 ;normal/inverse(/flash)
PROMPT EQU $33 ;prompt character
YSAV EQU $34 ;position in Monitor command
YSAV1 EQU $35 ;temp for Y register
CSWL EQU $36 ;character output hook
CSWH EQU $37
KSWL EQU $38 ;character input hook
KSWH EQU $39
PCL EQU $3A ;temp for program counter
PCH EQU $3B
XQT EQU $3C ;Step and trace execute area
A1L EQU $3C ;Monitor temp
A1H EQU $3D ;Monitor temp
A2L EQU $3E ;Monitor temp
A2H EQU $3F ;Monitor temp
A3L EQU $40 ;Monitor temp
A3H EQU $41 ;Monitor temp
A4L EQU $42 ;Monitor temp
A4H EQU $43 ;Monitor temp
A5L EQU $44 ;Monitor temp
A5H EQU $45 ;Monitor temp
* * Note: In Apple II, //e, both interrupts and BRK destroyed
* location $45. Now only BRK destroys $45 (ACC) and it
* also destroys $44 (MACSTAT).
* MACSTAT EQU $44 ;Machine state after BRK
ACC EQU $45 ;Acc after BRK
* XREG EQU $46 ;X reg after break
YREG EQU $47 ;Y reg after break
STATUS EQU $48 ;P reg after break
SPNT EQU $49 ;SP after break
RNDL EQU $4E ;random counter low
RNDH EQU $4F ;random counter high
* * Value equates
* GOODF8 EQU $06 ;value of //e, lolly ID byte
PICK EQU $95 ;CONTROL-U character
ESC EQU $9B ;what ESC generates
* * Characters read by GETLN are placed in
* IN, terminated by a carriage return.
* IN EQU $0200 ;input buffer for GETLN
* * Page 3 vectors
* BRKV EQU $03F0 ;vectors here after break
SOFTEV EQU $03F2 ;vector for warm start
PWREDUP EQU $03F4 ;THIS MUST = EOR #$A5 OF SOFTEV+1
AMPERV EQU $03F5 ;APPLESOFT & EXIT VECTOR
USRADR EQU $03F8 ;APPLESOFT USR function vector
NMI EQU $03FB ;NMI vector
IRQLOC EQU $03FE ;Maskable interrupt vector
LINE1 EQU $0400 ;first line of text screen
MSLOT EQU $07F8 ;owner of $C8 space
* * HARDWARE EQUATES
* IOADR EQU $C000 ;for IN#, PR# vector
KBD EQU $C000 ;>127 if keystroke
CLR80COL EQU $C000 ;disable 80 column store
SET80COL EQU $C001 ;enable 80 column store
RDMAINRAM EQU $C002 ;read from main 48K RAM
RDCARDRAM EQU $C003 ;read from alt. 48K RAM
WRMAINRAM EQU $C004 ;write to main 48K RAM
WRCARDRAM EQU $C005 ;write to alt. 48K RAM
SETSTDZP EQU $C008 ;use main zero page/stack
SETALTZP EQU $C009 ;use alt. zero page/stack
CLR80VID EQU $C00C ;disable 80 column hardware
SET80VID EQU $C00D ;enable 80 column hardware
CLRALTCHAR EQU $C00E ;normal LC, flashing UC
SETALTCHAR EQU $C00F ;normal inverse, LC; no flash
KBDSTRB EQU $C010 ;turn off key pressed flag
RDLCBNK2 EQU $C011 ;>127 if LC bank 2 is in
RDLCRAM EQU $C012 ;>127 if LC RAM read enabled
RDRAMRD EQU $C013 ;>127 if reading main 48K
RDRAMWRT EQU $C014 ;>127 if writing main 48K
RDALTZP EQU $C016 ;>127 if Alt ZP and LC switched in
RD80COL EQU $C018 ;>127 if 80 column store
RDVBLBAR EQU $C019 ;>127 if not VBL
RDTEXT EQU $C01A ;>127 if text (not graphics)
RDMIX EQU $C01B ;>127 if mixed mode on
RDPAGE2 EQU $C01C ;>127 if TXTPAGE2 switched in
RDHIRES EQU $C01D ;>127 if HIRES is on
ALTCHARSET EQU $C01E ;>127 if alternate char set in use
RD80VID EQU $C01F ;>127 if 80 column hardware in
ROMBANK EQU $C028 ;Switches rombanks
SPKR EQU $C030 ;clicks the speaker
TXTCLR EQU $C050 ;switch in graphics (not text)
TXTSET EQU $C051 ;switch in text (not graphics)
MIXCLR EQU $C052 ;clear mixed-mode
MIXSET EQU $C053 ;set mixed-mode (4 lines text)
TXTPAGE1 EQU $C054 ;switch in text page 1
TXTPAGE2 EQU $C055 ;switch in text page 2
LORES EQU $C056 ;low-resolution graphics
HIRES EQU $C057 ;high-resolution graphics
CLRAN0 EQU $C058
SETAN0 EQU $C059
CLRAN1 EQU $C05A
SETAN1 EQU $C05B
CLRAN2 EQU $C05C
SETAN2 EQU $C05D
CLRAN3 EQU $C05E
SETAN3 EQU $C05F
RD40SW EQU $C060 ;>127 if 40/80 switch in 40 pos
BUTN0 EQU $C061 ;open apple key
BUTN1 EQU $C062 ;closed apple key
PADDL0 EQU $C064 ;read paddle 0
PTRIG EQU $C070 ;trigger the paddles
ROMIN EQU $C081 ;switch in $D000-$FFFF ROM
LCBANK2 EQU $C083 ;switch in LC bank 2
LCBANK1 EQU $C08B ;switch in LC bank 1
CLRROM EQU $CFFF ;switch out $C8 ROMs
BASIC EQU $E000 ;BASIC entry point
BASIC2 EQU $E003 ;BASIC warm entry point
* VMODE EQU $4F8+3 ;OPERATING MODE
* * BASIC VMODE BITS
* * 1....... - BASIC active
* 0....... - Pascal active
* .0......
* .1......
* ..0..... - Print control characters
* ..1..... - Don't print ctrl chars
* ...0.... -
* ...1.... -
* ....0... - Print control characters
* ....1... - Don't print ctrl chars.
* .....0.. -
* .....1.. -
* ......0. -
* ......1. -
* .......0 - Print mouse characters
* .......1 - Don't print mouse characters
* M.40 EQU $40
M.CTL2 EQU $20 ;Don't print controls
M.CTL EQU $08 ;Don't print controls
M.MOUSE EQU $01 ;Don't print mouse chars
* * Pascal Mode Bits
* * 1....... - BASIC active
* 0....... - Pascal active
* .0......
* .1......
* ..0..... -
* ..1..... -
* ...0.... - Cursor always on
* ...1.... - Cursor always off
* ....0... - GOTOXY n/a
* ....1... - GOTOXY in progress
* .....0.. - Normal Video
* .....1.. - Inverse Video
* ......0. -
* ......1. -
* .......0 - Print mouse chars
* .......1 - Don't print mouse chars
* M.PASCAL EQU $80 ;Pascal active
M.CURSOR EQU $10 ;Don't print cursor
M.GOXY EQU $08 ;GOTOXY IN PROGRESS
M.VMODE EQU $04
* ROMSTATE EQU $478 ;temp store of ROM state
TEMP1 EQU $4F8 ;used by CTLCHAR
TEMPA EQU $578 ;used by scroll
TEMPY EQU $5F8 ;used by scroll
* OLDCH EQU $478+3 ;last value of CH
OURCH EQU $578+3 ;80-COL CH
OURCV EQU $5F8+3 ;CURSOR VERTICAL
VFACTV EQU $678+3 ;Bit7=video firmware inactive
XCOORD EQU $6F8+3 ;X-COORD (GOTOXY)
NXTCUR EQU $778+3 ;next cursor to display
CURSOR EQU $7F8+3 ;the current cursor char
* * Disk II boot rom equates
* DNIBL EQU $356
NBUF1 EQU $300
SLOTZ EQU $2B
BOOTTMP EQU $3C
BOOTDEV EQU $4F
skp 3
rep 40
* Entry points for other modules
rep 40
pcnv equ $C880
bootfail equ $C5F5 ;Boot fails message
pcnvrst equ $C5F8 ;Protocol converter reset
atalk equ $C580 ;Apple talk

--
Antoine

Re: Keyboard layout/character set question

<4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=277&group=comp.sys.apple2.programmer#277

  copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 24 Jan 2023 22:50:39 +0000
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:O309nFECNS/s0WOhB/SdHgufosY=
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Keyboard layout/character set question
Content-Type: text/plain; charset=UTF-8
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
From: mjma...@aol.com (Michael J. Mahon)
References: <20230120090302.0a08a296@SGX-CMP-480>
<021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
Message-ID: <4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com>
Date: Tue, 24 Jan 2023 22:50:39 +0000
Lines: 55
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-Oq3dB3T4RXuwsCY4Ti9glCLANhWcQ6g/anv6O0EaXXk+RNb7XCy9Pybokmpg6VupXTYbrtgaQ8qFovs!Dcm7B5AlJP+0ZBJV2e34fXZ4PJcf08m90X8b1wDuvasQrEPtHchMSsDKWOJvdXpFi0rGXchkuFQ=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Michael J. Mahon - Tue, 24 Jan 2023 22:50 UTC

Stu M <nixomose@gmail.com> wrote:
> On Friday, January 20, 2023 at 3:03:05 AM UTC-5, Colin Leroy-Mira wrote:
>> Hi,
>>
>> I have a french Apple 2c, with a french keyboard and a toggle button
>> that allows to switch the keyboard layout from french to US. The button
>> has two effects. It switches characters codes for standard ASCII
>> characters (ie, 'a' becomes 'q' and vice-versa), but for "extended"
>> characters, the code is not changed, only the display is.
>> For example, if I hit 'é' while in french mode, it's going to display as
>> 'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen,
>> the display of this character changes and becomes an '{'. (this is
>> quite funny, but a bit impractical).
>>
>> I'd like to programmaticaly know which mode the keyboard is in, but I
>> can't find anything related in PEEKs and POKEs or anything. Does anyone
>> know if this is possible ?
>>
>> Thanks!
>> --
>> Colin
>> https://www.colino.net/
>
> I don't know for sure, this is probably more a hardware question than a
> software question, but I'd guess it's not possible.
> I did a lot of playing around with the keyboard (I had a U.S. apple //e)
> and the only available information was the key pressed, read from $C000
> and the high bit of the $C010 soft switch was the any-key-down flag.
>
> So if you're going to probe around, I'd look at the bits in $C010 and
> probably the other bytes from $C001 to $C010 and see if they show any
> change when the switch is flipped.
>
> My guess is that this is done in hardware and never makes it to the
> software side of the machine.
>
> I only remember this so well, because I played around a lot with the
> keyboard trying to make the $C010 any-key-down flag line up with the byte
> read from $C000 to tell me what key was down. But the important bit there
> is that the auto-repeat feature of the keyboard is in hardware and not
> adjustable or even detectable in software, which is why I'm going to
> guess that your switch isn't either.
>
Stu, the Any Key Down bit reports that one or more keys are depressed. The
$C000 port reports the last key depressed. One or more keys can be held
down, and the code at $C000 will change as any key is depressed. If I
remember correctly, the key code is also reported at $C010 a few
milliseconds before it shows up at $C000 (prior to denouncing).

Take a look at the code for RTSYNTH on my website for details. This
behavior is what allowed me to implement _glissando_ keying, in which a
newly pressed key sounds even as other key(s) are being held down.

--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com

Re: Keyboard layout/character set question

<5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=278&group=comp.sys.apple2.programmer#278

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a05:6214:15ce:b0:534:2059:eb59 with SMTP id p14-20020a05621415ce00b005342059eb59mr1603344qvz.14.1674649732541;
Wed, 25 Jan 2023 04:28:52 -0800 (PST)
X-Received: by 2002:a05:6870:1014:b0:15f:e328:82d2 with SMTP id
20-20020a056870101400b0015fe32882d2mr1070125oai.137.1674649731862; Wed, 25
Jan 2023 04:28:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Wed, 25 Jan 2023 04:28:51 -0800 (PST)
In-Reply-To: <4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=72.89.235.247; posting-account=ZfVBEQoAAAAj56_HkzwGkEm3hDm_YfB3
NNTP-Posting-Host: 72.89.235.247
References: <20230120090302.0a08a296@SGX-CMP-480> <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: nixom...@gmail.com (Stu M)
Injection-Date: Wed, 25 Jan 2023 12:28:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Stu M - Wed, 25 Jan 2023 12:28 UTC

On Tuesday, January 24, 2023 at 5:50:45 PM UTC-5, mjmahon@aol.com wrote:
> Stu M <nixo...@gmail.com> wrote:
> > On Friday, January 20, 2023 at 3:03:05 AM UTC-5, Colin Leroy-Mira wrote:
> >> Hi,
> >>
> >> I have a french Apple 2c, with a french keyboard and a toggle button
> >> that allows to switch the keyboard layout from french to US. The button
> >> has two effects. It switches characters codes for standard ASCII
> >> characters (ie, 'a' becomes 'q' and vice-versa), but for "extended"
> >> characters, the code is not changed, only the display is.
> >> For example, if I hit 'é' while in french mode, it's going to display as
> >> 'é'. If I toggle the keyboard to US when an 'é' is displayed on-screen,
> >> the display of this character changes and becomes an '{'. (this is
> >> quite funny, but a bit impractical).
> >>
> >> I'd like to programmaticaly know which mode the keyboard is in, but I
> >> can't find anything related in PEEKs and POKEs or anything. Does anyone
> >> know if this is possible ?
> >>
> >> Thanks!
> >> --
> >> Colin
> >> https://www.colino.net/
> >
> > I don't know for sure, this is probably more a hardware question than a
> > software question, but I'd guess it's not possible.
> > I did a lot of playing around with the keyboard (I had a U.S. apple //e)
> > and the only available information was the key pressed, read from $C000
> > and the high bit of the $C010 soft switch was the any-key-down flag.
> >
> > So if you're going to probe around, I'd look at the bits in $C010 and
> > probably the other bytes from $C001 to $C010 and see if they show any
> > change when the switch is flipped.
> >
> > My guess is that this is done in hardware and never makes it to the
> > software side of the machine.
> >
> > I only remember this so well, because I played around a lot with the
> > keyboard trying to make the $C010 any-key-down flag line up with the byte
> > read from $C000 to tell me what key was down. But the important bit there
> > is that the auto-repeat feature of the keyboard is in hardware and not
> > adjustable or even detectable in software, which is why I'm going to
> > guess that your switch isn't either.
> >
> Stu, the Any Key Down bit reports that one or more keys are depressed. The
> $C000 port reports the last key depressed. One or more keys can be held
> down, and the code at $C000 will change as any key is depressed. If I
> remember correctly, the key code is also reported at $C010 a few
> milliseconds before it shows up at $C000 (prior to denouncing).
>
> Take a look at the code for RTSYNTH on my website for details. This
> behavior is what allowed me to implement _glissando_ keying, in which a
> newly pressed key sounds even as other key(s) are being held down.
>
> --
> -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com

I remember spending a lot of time on this though I may forget some details.
the big thing I remember is that there was lag on the data coming in on $C000, as in if you waited for the any-key-down bit to go high and then read from $C000 to find out what key was pressed, you'd get the previously pressed key for a few ms and then the correct key would show up.
at the time I was trying to write a key-repeat input program so that you could alter the delay and repeat frequency of the auto-repeat feature of the keyboard, since you couldn't modify the hardware. and that little bit of lag made it unusable because when you're trying to type, the key you actually his is important. :-)

Re: Keyboard layout/character set question

<c0c2406b-487a-4395-8715-092eeabb0113n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=279&group=comp.sys.apple2.programmer#279

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a05:6214:3483:b0:534:dfd1:419d with SMTP id mr3-20020a056214348300b00534dfd1419dmr1994756qvb.102.1674673154415;
Wed, 25 Jan 2023 10:59:14 -0800 (PST)
X-Received: by 2002:a05:6870:6706:b0:15e:fa9b:1dcd with SMTP id
gb6-20020a056870670600b0015efa9b1dcdmr2380066oab.208.1674673154038; Wed, 25
Jan 2023 10:59:14 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Wed, 25 Jan 2023 10:59:13 -0800 (PST)
In-Reply-To: <5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=54.240.198.38; posting-account=bGpciwoAAACg2KT8pQMph7tnt3o_9vtu
NNTP-Posting-Host: 54.240.198.38
References: <20230120090302.0a08a296@SGX-CMP-480> <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com> <5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c0c2406b-487a-4395-8715-092eeabb0113n@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: peter.fe...@gmail.com (qkumba)
Injection-Date: Wed, 25 Jan 2023 18:59:14 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1459
 by: qkumba - Wed, 25 Jan 2023 18:59 UTC

....which is exactly the issue in Prince of Persia, which can register "false" keypresses as a result of the polling $C010 and then fetching the wrong key from $C000.

Re: Keyboard layout/character set question

<d86def0c-5836-4ccf-be7d-8c5bdebe1d22n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=280&group=comp.sys.apple2.programmer#280

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a05:6214:3b0c:b0:532:2644:864d with SMTP id nm12-20020a0562143b0c00b005322644864dmr1062784qvb.36.1674678411474;
Wed, 25 Jan 2023 12:26:51 -0800 (PST)
X-Received: by 2002:a05:6808:1c2:b0:35b:d783:bfb4 with SMTP id
x2-20020a05680801c200b0035bd783bfb4mr1757982oic.216.1674678411093; Wed, 25
Jan 2023 12:26:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Wed, 25 Jan 2023 12:26:50 -0800 (PST)
In-Reply-To: <c0c2406b-487a-4395-8715-092eeabb0113n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=72.89.235.247; posting-account=ZfVBEQoAAAAj56_HkzwGkEm3hDm_YfB3
NNTP-Posting-Host: 72.89.235.247
References: <20230120090302.0a08a296@SGX-CMP-480> <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com> <5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>
<c0c2406b-487a-4395-8715-092eeabb0113n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d86def0c-5836-4ccf-be7d-8c5bdebe1d22n@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: nixom...@gmail.com (Stu M)
Injection-Date: Wed, 25 Jan 2023 20:26:51 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1826
 by: Stu M - Wed, 25 Jan 2023 20:26 UTC

On Wednesday, January 25, 2023 at 1:59:15 PM UTC-5, qkumba wrote:
> ...which is exactly the issue in Prince of Persia, which can register "false" keypresses as a result of the polling $C010 and then fetching the wrong key from $C000.

I saw this in the apple ][ implementation of gauntlet as well. that game is what first clued me into the fact that there was an any-key-down flag in the first place, and then I found a one line comment about it in the apple ][ reference manual

Re: Keyboard layout/character set question

<tr89n1$3938g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=281&group=comp.sys.apple2.programmer#281

  copy link   Newsgroups: comp.sys.apple2.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: no_em...@invalid.invalid (Andrew Roughan)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: Keyboard layout/character set question
Date: Mon, 30 Jan 2023 11:29:37 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <tr89n1$3938g$1@dont-email.me>
References: <20230120090302.0a08a296@SGX-CMP-480>
<021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com>
<5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>
<c0c2406b-487a-4395-8715-092eeabb0113n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 30 Jan 2023 11:29:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="a5566bc2517f0c722679c0f899afcebb";
logging-data="3443984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Pmv2/loMKkB4HFppbaA9WdSdZndbnMWA="
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
Cancel-Lock: sha1:L/9jjp6/dvLHjExWO4iXwEU0Czo=
sha1:uut/0OTxBZQKbEgMsBGbZpikTWk=
 by: Andrew Roughan - Mon, 30 Jan 2023 11:29 UTC

qkumba <peter.ferrie@gmail.com> wrote:
> ...which is exactly the issue in Prince of Persia, which can register
> "false" keypresses as a result of the polling $C010 and then fetching the
> wrong key from $C000.
>

There’s more information about this issue
https://www.applefritter.com/comment/101047#comment-101047

Re: Keyboard layout/character set question

<6ef7b3cd-a37e-4ed7-a531-b4cd10d363e8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=282&group=comp.sys.apple2.programmer#282

  copy link   Newsgroups: comp.sys.apple2.programmer
X-Received: by 2002:a37:aa4e:0:b0:71d:27f2:b4fd with SMTP id t75-20020a37aa4e000000b0071d27f2b4fdmr317750qke.457.1675113346807;
Mon, 30 Jan 2023 13:15:46 -0800 (PST)
X-Received: by 2002:aca:5fd4:0:b0:364:9e62:1784 with SMTP id
t203-20020aca5fd4000000b003649e621784mr3517725oib.87.1675113346481; Mon, 30
Jan 2023 13:15:46 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2.programmer
Date: Mon, 30 Jan 2023 13:15:46 -0800 (PST)
In-Reply-To: <tr89n1$3938g$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=72.89.235.247; posting-account=ZfVBEQoAAAAj56_HkzwGkEm3hDm_YfB3
NNTP-Posting-Host: 72.89.235.247
References: <20230120090302.0a08a296@SGX-CMP-480> <021d6a99-198f-42c4-bcb0-bedb20afee3bn@googlegroups.com>
<4JScnW1rEswi_U3-nZ2dnZfqn_idnZ2d@giganews.com> <5a60e3d9-1f18-4712-bbb7-4eb6da6a48f1n@googlegroups.com>
<c0c2406b-487a-4395-8715-092eeabb0113n@googlegroups.com> <tr89n1$3938g$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6ef7b3cd-a37e-4ed7-a531-b4cd10d363e8n@googlegroups.com>
Subject: Re: Keyboard layout/character set question
From: nixom...@gmail.com (Stu M)
Injection-Date: Mon, 30 Jan 2023 21:15:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3014
 by: Stu M - Mon, 30 Jan 2023 21:15 UTC

On Monday, January 30, 2023 at 6:29:39 AM UTC-5, Andrew Roughan wrote:
> qkumba <peter....@gmail.com> wrote:
> > ...which is exactly the issue in Prince of Persia, which can register
> > "false" keypresses as a result of the polling $C010 and then fetching the
> > wrong key from $C000.
> >
> There’s more information about this issue
> https://www.applefritter.com/comment/101047#comment-101047

so it took some digging, but I was finally able to find it.
so somebody a long time ago asked a question on stackoverflow: what's the coolest hack you've ever seen or done.
lots of great juicy stuff there and then some stuffy people went and deleted it.
but thanks to technology, and the wonderful people at the internet archive, we still have it.

https://web.archive.org/web/20150925080324/https://stackoverflow.com/questions/192479/whats-the-coolest-hack-youve-seen-or-done/510143

search for "I've ever created was on my Apple //e" and you'll see my entry..
somewhere along the way I was able to find a copy of the little program I came up with that correctly got the key that was pressed once you checked the any-key-down flag.

What I *didn't* know, which I'm happy to finally find out, is why it works.

> Unfortunately, as noted here on page 7-12 of James Sather's book Understanding the Apple IIe, AKD does not wait for a key to be decoded, so software must "wait until KEYSTROBE is set before interpreting the keyboard ASCII.

That little nugget of information is something I've been wanting to know for 30 something years now....

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor