Weird issue with the Pet 2001-N

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird issue with the Pet 2001-N

David Laffineuse
The keyboard seems to be working perfectly fine.
For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
What is going on?
David
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Steve Gray
Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.

Steve


> On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>
> The keyboard seems to be working perfectly fine.
> For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
> The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
> What is going on?
> David


Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Francesco Messineo
On Wed, Apr 3, 2019 at 3:57 AM Steve Gray <[hidden email]> wrote:
>
> Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.

That could be possible, but the fault must still allow the RAM
initialization and check to function properly, it the correct bytes
free amount is printed at startup.
RAM is initialized with $AA if I remember correctly, so bit 3 = 0
would be possible and not detected.
If it's a 2001N with two banks, the problem is likely on bank1

Frank

>
> Steve
>
>
> > On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
> >
> > The keyboard seems to be working perfectly fine.
> > For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
> > The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
> > What is going on?
> > David
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

daver2nab
It could also be the octal read buffer from the screen RAM dropping a bit rather than the main RAM itself. The 'Y' gets entered onto the screen correctly. I can't just remember off hand whether the command line is constructed in main RAM or read from the screen RAM when RETURN is entered.

Just a thought, I will have a look in more detail later on today.

Dave 

On Wed, 3 Apr 2019 at 08:19, Francesco Messineo <[hidden email]> wrote:
On Wed, Apr 3, 2019 at 3:57 AM Steve Gray <[hidden email]> wrote:
>
> Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.

That could be possible, but the fault must still allow the RAM
initialization and check to function properly, it the correct bytes
free amount is printed at startup.
RAM is initialized with $AA if I remember correctly, so bit 3 = 0
would be possible and not detected.
If it's a 2001N with two banks, the problem is likely on bank1

Frank
>
> Steve
>
>
> > On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
> >
> > The keyboard seems to be working perfectly fine.
> > For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
> > The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
> > What is going on?
> > David
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Francesco Messineo
On Fri, Apr 5, 2019 at 8:29 AM David Roberts <[hidden email]> wrote:
>
> It could also be the octal read buffer from the screen RAM dropping a bit rather than the main RAM itself. The 'Y' gets entered onto the screen correctly. I can't just remember off hand whether the command line is constructed in main RAM or read from the screen RAM when RETURN is entered.

if this would be the fault, then every byte entered on screen would
suffer the same problem, so it would result in a lot of syntax errors.
If only the variable names are affected, I would still think about a
fault in bank 1 DRAM/data bus.

>
> Just a thought, I will have a look in more detail later on today.
>
> Dave
>
> On Wed, 3 Apr 2019 at 08:19, Francesco Messineo <[hidden email]> wrote:
>>
>> On Wed, Apr 3, 2019 at 3:57 AM Steve Gray <[hidden email]> wrote:
>> >
>> > Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.
>>
>> That could be possible, but the fault must still allow the RAM
>> initialization and check to function properly, it the correct bytes
>> free amount is printed at startup.
>> RAM is initialized with $AA if I remember correctly, so bit 3 = 0
>> would be possible and not detected.
>> If it's a 2001N with two banks, the problem is likely on bank1
>>
>> Frank
>> >
>> > Steve
>> >
>> >
>> > > On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>> > >
>> > > The keyboard seems to be working perfectly fine.
>> > > For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
>> > > The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
>> > > What is going on?
>> > > David
>> >
>> >
>>

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

daver2nab
I agree, for a large sample.

But the OP has not stated that; only that a simple direct statement caused an issue.

The OP could try loading a$ with "ABCDEFGHIJKLMNOPQRSTUVWXYZ" and see what the result is when printed...

Dave

On Fri, 5 Apr 2019 at 08:07, Francesco Messineo <[hidden email]> wrote:
On Fri, Apr 5, 2019 at 8:29 AM David Roberts <[hidden email]> wrote:
>
> It could also be the octal read buffer from the screen RAM dropping a bit rather than the main RAM itself. The 'Y' gets entered onto the screen correctly. I can't just remember off hand whether the command line is constructed in main RAM or read from the screen RAM when RETURN is entered.

if this would be the fault, then every byte entered on screen would
suffer the same problem, so it would result in a lot of syntax errors.
If only the variable names are affected, I would still think about a
fault in bank 1 DRAM/data bus.

>
> Just a thought, I will have a look in more detail later on today.
>
> Dave
>
> On Wed, 3 Apr 2019 at 08:19, Francesco Messineo <[hidden email]> wrote:
>>
>> On Wed, Apr 3, 2019 at 3:57 AM Steve Gray <[hidden email]> wrote:
>> >
>> > Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.
>>
>> That could be possible, but the fault must still allow the RAM
>> initialization and check to function properly, it the correct bytes
>> free amount is printed at startup.
>> RAM is initialized with $AA if I remember correctly, so bit 3 = 0
>> would be possible and not detected.
>> If it's a 2001N with two banks, the problem is likely on bank1
>>
>> Frank
>> >
>> > Steve
>> >
>> >
>> > > On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>> > >
>> > > The keyboard seems to be working perfectly fine.
>> > > For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
>> > > The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
>> > > What is going on?
>> > > David
>> >
>> >
>>

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Bill Degnan


>> >
>> > > On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>> > >
>> > > The keyboard seems to be working perfectly fine.
>> > > For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
>> > > The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
>> > > What is going on?
>> > > David
>> >
>> >
>>

 Is there any correlation between the PET ASCII and regular ASCII mapping to this symptom?  i.e is Y = Q in one vs. the other?
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Francesco Messineo
On Fri, Apr 5, 2019 at 6:04 PM Bill Degnan <[hidden email]> wrote:

>>>
>>>
>>>
>>> >> >
>>> >> > > On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>>> >> > >
>>> >> > > The keyboard seems to be working perfectly fine.
>>> >> > > For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
>>> >> > > The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
>>> >> > > What is going on?
>>> >> > > David
>>> >> >
>>> >> >
>>> >>
>
>
>  Is there any correlation between the PET ASCII and regular ASCII mapping to this symptom?  i.e is Y = Q in one vs. the other?

https://en.wikipedia.org/wiki/PETSCII

Regular ASCII is similar to the lowercase version of CBM (or PET) character set.

Frank

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Steve Gray
In reply to this post by Steve Gray
On FB the OP said he replaced some ram and the problem has been solved.

Steve


On Tuesday, April 2, 2019, 9:56:55 p.m. EDT, Steve Gray <[hidden email]> wrote:


Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.

Steve


> On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>
> The keyboard seems to be working perfectly fine.
> For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
> The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
> What is going on?
> David
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Bill Degnan
Maybe he should put the bad RAM back in so we can continue to diagnose the problem  :-)
b

On Fri, Apr 5, 2019 at 12:18 PM Steve Gray <[hidden email]> wrote:
On FB the OP said he replaced some ram and the problem has been solved.

Steve


On Tuesday, April 2, 2019, 9:56:55 p.m. EDT, Steve Gray <[hidden email]> wrote:


Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.

Steve


> On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>
> The keyboard seems to be working perfectly fine.
> For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
> The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
> What is going on?
> David
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

David Laffineuse
Hi guys, i do confirm that a partial RAM replacement fixed the problem so thanks for all the troubleshooting help!

Sent from my iPhone

On Apr 5, 2019, at 12:27 PM, Bill Degnan <[hidden email]> wrote:

Maybe he should put the bad RAM back in so we can continue to diagnose the problem  :-)
b

On Fri, Apr 5, 2019 at 12:18 PM Steve Gray <[hidden email]> wrote:
On FB the OP said he replaced some ram and the problem has been solved.

Steve


On Tuesday, April 2, 2019, 9:56:55 p.m. EDT, Steve Gray <[hidden email]> wrote:


Sounds like bit 3 is being dropped when stored as a variable. That would suggest that you have a bad ram at the top end of user memory space.

Steve


> On Apr 2, 2019, at 9:07 PM, David Laffineuse <[hidden email]> wrote:
>
> The keyboard seems to be working perfectly fine.
> For instance if I type on the key 'Y', the letter Y is displayed on the screen.  However if I set a variable to Y, e.g. a$="Y" then I print a$, I get a Q on the screen...
> The same occurs with I which produces an A, H which produces @, Z which produces R, X which produces P, 8 that produces 0, and 9 that produces 1.  All the other letters are fine.
> What is going on?
> David
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Rhialto
In reply to this post by Francesco Messineo
On April 5, 2019 6:08:01 PM GMT+02:00, Francesco Messineo <[hidden email]> wrote:

>
>https://en.wikipedia.org/wiki/PETSCII
>
>Regular ASCII is similar to the lowercase version of CBM (or PET)
>character set.

Note that that page contains a lot of nonsense regarding which characters are valid. See the discussion page. Someone should really correct it now.

>Frank
-Olaf.


--
Sent from my Android device with K-9 . Please excuse my brevity.

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

MiaM
In reply to this post by David Laffineuse
Den Fri, 5 Apr 2019 20:17:47 -0400 skrev David Laffineuse
<[hidden email]>:
> Hi guys, i do confirm that a partial RAM replacement fixed the
> problem so thanks for all the troubleshooting help!

Which part(s) of the ram did you replace?

--
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

MiaM
In reply to this post by daver2nab
Den Fri, 5 Apr 2019 07:28:24 +0100 skrev David Roberts
<[hidden email]>:
> It could also be the octal read buffer from the screen RAM dropping a
> bit rather than the main RAM itself. The 'Y' gets entered onto the
> screen correctly. I can't just remember off hand whether the command
> line is constructed in main RAM or read from the screen RAM when
> RETURN is entered.

(Even though the problem is solved, it's an interesting discussion so
I'll continue this subthread)

Wouldn't that also make the text on the screen to break as soon as the
cursor is above any of the "troublesome" chars?

A way of testing this might be to use the abbrevations for basic
commands. Assuming this problem also affect commands and not only
variable contents, ? should produce PRINT while PRINT should produce
PRANT (or some similar error).


--
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with the Pet 2001-N

Rhialto
In reply to this post by daver2nab
On Fri 05 Apr 2019 at 07:28:24 +0100, David Roberts wrote:
> It could also be the octal read buffer from the screen RAM dropping a bit
> rather than the main RAM itself. The 'Y' gets entered onto the screen
> correctly. I can't just remember off hand whether the command line is
> constructed in main RAM or read from the screen RAM when RETURN is entered.

Yes, the normal procedure is that whatever you type is collected in
screen memory. Once you hit RETURN, the text is read from the screen
memory and put into the INPUT buffer. (At least that is what the Basic
editor and the INPUT statement do). There is a location which remembers
the initial cursor position (so that if there is a prompt with INPUT
"prompt", A$, you get only what you typed into A$). But that location is
reset once you use the cursor up or down keys. That explains what
happens when you move the cursor wrong and then back, upon answering an
INPUT.

Once upon a time I looked deeply into this. Did you know that you can
also open a file on the keyboard (OPEN 1,0) and INPUT#1 from it? That
works out slightly differently than a normal INPUT statement.

Similarly you can OPEN the screen (OPEN 1,3) and PRINT# to it, but also
GET# from it, and I think also INPUT# from it.

-Olaf.
--
___ Olaf 'Rhialto' Seibert  -- "What good is a Ring of Power
\X/ rhialto/at/falu.nl      -- if you're unable...to Speak." - Agent Elrond

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Another discussion re PETSCII

MiaM
In reply to this post by Rhialto
Den Sat, 06 Apr 2019 12:07:25 +0200 skrev Rhialto <[hidden email]>:
> On April 5, 2019 6:08:01 PM GMT+02:00, Francesco Messineo
> <[hidden email]> wrote:
>
> >https://en.wikipedia.org/wiki/PETSCII
>
> Note that that page contains a lot of nonsense regarding which
> characters are valid. See the discussion page. Someone should really
> correct it now.

Side track:
Are/were the terms "shifted" and "unshifted" really a thing, or is it
something that were invented by whoever wrote that parts of the
Wikipedia article?

Re correct the page: Where to start? It's kind of a mess that would
benefit from a more or less complete rewrite.

A few things spring to mind: It states that the VIC 20 font is the same
as the PET font, even though the pound sign replaced another char. The
talk page incorrectly states that this change happend with the C64.

Re the disussion of why Commodore did chose upper-lower case as they
did needs some more background.

Noteable is that PET is the only one of the three "1977 computers" to
have lower case at all. APPLE II and TRS-80 only had upper case! (Well,
Apple II had a hires mode so you could roll your own lower case but
then the display would be rather slow).

Lower case weren't that common at the time. Digitals VT50 terminal
(july 1974) only had upper case. The VT52 added lower case (september
1975).

Btw the physical layout of the PET business keyboard is the same as the
Digital "Decscope" VT50/VT52 terminals.

https://en.wikipedia.org/wiki/VT52

According to the "DECscope Users' Manual" the VT52 has both a
upper+lower case mode (default) and a upper case + graphics mode, much
like Commodore did. It seems like this was done the same way as in the
first PET, with upper case staying at the same positions and lower case
being replaced with graphics chars.

http://bitsavers.trailing-edge.com/pdf/dec/terminal/vt52/EK-VT5X-OP-001_DECscope_Users_Manual_Mar77.pdf

One notable computer manufacturer at the time, IBM, used their
completely different EBCDIC encoding.

What other computers did use lower case at the time?

A terminal that seems to have been common for hobbyists back in the
days were the ASR-33, a teletype which used ASCII. According to
Wikipedia it were upper case only.

https://en.wikipedia.org/wiki/Teletype_Model_33

It seems like the TV Typewriter only did upper case, but in 1977 an
updated version also did lower case
https://en.wikipedia.org/wiki/TV_Typewriter

The VDM-1, the first video display card for S100 computers, did both
lower and upper case. It seems like it had upper case and lower case as
in usual ASCII.
http://www.s100computers.com/Hardware%20Folder/Processor%20Technology/VDM-1/VDM-1.htm


--
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.

Reply | Threaded
Open this post in threaded view
|

Re: Another discussion re PETSCII

Rhialto
On Sat 06 Apr 2019 at 14:04:22 +0200, Mia Magnusson wrote:

> Den Sat, 06 Apr 2019 12:07:25 +0200 skrev Rhialto <[hidden email]>:
> > On April 5, 2019 6:08:01 PM GMT+02:00, Francesco Messineo
> > <[hidden email]> wrote:
> >
> > >https://en.wikipedia.org/wiki/PETSCII
> >
> > Note that that page contains a lot of nonsense regarding which
> > characters are valid. See the discussion page. Someone should really
> > correct it now.
>
> Side track:
> Are/were the terms "shifted" and "unshifted" really a thing, or is it
> something that were invented by whoever wrote that parts of the
> Wikipedia article?
No, those terms were probably invented by that article's author. The
terms usually used were something like "graphics mode" or "uppercase and
graphics mode", versus "lowercase mode" or "upper/lowercase mode", or
obvious variations on that. Later with the Basic 4.0 machines possibly
even "text" vs "graphics", because switching between the modes changes
the spacing between the lines. In text mode the screen is "stretched
out" by putting 2 pixel lines of spacing between text lines.

That article seems to have been based on what you see if you do
something like PRINT CHR$(123), which is misleading. It should be based
on ASC("X") for the various characters one is interested in. Then you
clearly find that PETSCII follows the original 1963(?) uppercase-only
ASCII, and that they set the high bit for all extra (graphical)
characters. On the original chicklet keyboard as pictured you can even
see why the graphics characters have the sometimes weird codes they
have: they make (somewhat) sensible patterns on the keyboard. Where
SHIFT directly translates to +128 on the PETSCII code; I think I
remember it is literally like that in the ROM code.

(ASC("shift-A") turns out to be 193 = 128 + 65, not the 97 as shown in
the first two images)

> Re correct the page: Where to start? It's kind of a mess that would
> benefit from a more or less complete rewrite.

That is why I haven't attempted it myself :-(

"Some PETSCII codes cannot be printed and are only used for keyboard
input (e.g. F1, RUN/STOP). " is also misleading, because there are lots
of control codes that do nothing when printed. But you can certainly put
them in text strings in your program. In "quote mode", RUN/STOP is (of
course) an inverse C.

> A few things spring to mind: It states that the VIC 20 font is the same
> as the PET font, even though the pound sign replaced another char. The
> talk page incorrectly states that this change happend with the C64.

I may have misstated that (or being imprecise). In any case it is the
backslash which was replaced with the pound.

> Re the disussion of why Commodore did chose upper-lower case as they
> did needs some more background.
>
> Noteable is that PET is the only one of the three "1977 computers" to
> have lower case at all. APPLE II and TRS-80 only had upper case! (Well,
> Apple II had a hires mode so you could roll your own lower case but
> then the display would be rather slow).
>
> Lower case weren't that common at the time. Digitals VT50 terminal
> (july 1974) only had upper case. The VT52 added lower case (september
> 1975).
The well-known "cheap" Lear Siegler ADM-3(a) terminal also had only
uppercase; lowercase was an option.
https://en.wikipedia.org/wiki/ADM-3A

> Btw the physical layout of the PET business keyboard is the same as the
> Digital "Decscope" VT50/VT52 terminals.
>
> https://en.wikipedia.org/wiki/VT52
>
> According to the "DECscope Users' Manual" the VT52 has both a
> upper+lower case mode (default) and a upper case + graphics mode, much
> like Commodore did. It seems like this was done the same way as in the
> first PET, with upper case staying at the same positions and lower case
> being replaced with graphics chars.
>
> http://bitsavers.trailing-edge.com/pdf/dec/terminal/vt52/EK-VT5X-OP-001_DECscope_Users_Manual_Mar77.pdf
Ah interesting, I wasn't aware of that!

-Olaf.
--
___ Olaf 'Rhialto' Seibert  -- "What good is a Ring of Power
\X/ rhialto/at/falu.nl      -- if you're unable...to Speak." - Agent Elrond

signature.asc (465 bytes) Download Attachment